Documentation
¶
Index ¶
- Variables
- func Ed25519PublicKeyToSuiAddress(pubKey []byte) string
- func IntentWithScope(intentScope constant.IntentScope) []int
- func NewMessageWithIntent(message []byte, scope constant.IntentScope) []byte
- func ToSerializedSignature(signature, pubKey []byte) string
- func VerifyMessage(message, signature string, scope constant.IntentScope) (signer string, pass bool, err error)
- func VerifyPersonalMessage(message string, signature string) (signer string, pass bool, err error)
- func VerifyTransaction(b64Message string, signature string) (signer string, pass bool, err error)
- type AddStakeRequest
- type AppId
- type Apy
- type BalanceChangeOwner
- type BalanceChanges
- type Base64Data
- type BatchTransactionRequest
- type BatchTransactionResponse
- type Bytes
- type CheckpointResponse
- type ChildObjectsResponse
- type CoinAllBalanceResponse
- type CoinBalanceResponse
- type CoinData
- type CoinLockedBalance
- type CoinMetadataResponse
- type DelegatedStakeInfo
- type DelegatedStakesResponse
- type Digest
- type Display
- type DisplayFieldsResponse
- func (display DisplayFieldsResponse) Creator() string
- func (display DisplayFieldsResponse) Description() string
- func (display DisplayFieldsResponse) ImageURL() string
- func (display DisplayFieldsResponse) Link() string
- func (display DisplayFieldsResponse) Name() string
- func (display DisplayFieldsResponse) ProjectURL() string
- func (display DisplayFieldsResponse) ThumbnailURL() string
- type DynamicFieldInfo
- type DynamicFieldName
- type DynamicFieldObjectName
- type EndOfEpochInfo
- type EpochInfo
- type EpochRollingGasCostSummary
- type EventFilterByMoveEventField
- type EventFilterByMoveEventModule
- type EventFilterByMoveEventType
- type EventFilterByMoveModule
- type EventFilterByPackage
- type EventFilterBySenderAddress
- type EventFilterBySuiAddress
- type EventFilterByTimeRange
- type EventFilterByTransaction
- type EventId
- type ExecutionMode
- type ExecutionStatus
- type FaucetCoinInfo
- type FaucetFixedAmountRequest
- type FaucetRequest
- type GasCostSummary
- type GetEventsResponse
- type GetMoveFunctionArgTypesRequest
- type GetMoveFunctionArgTypesResponse
- type GetNormalizedMoveFunctionRequest
- type GetNormalizedMoveFunctionResponse
- type GetNormalizedMoveModuleRequest
- type GetNormalizedMoveModuleResponse
- type GetNormalizedMoveModulesByPackageRequest
- type GetNormalizedMoveModulesByPackageResponse
- type GetNormalizedMoveStructRequest
- type GetNormalizedMoveStructResponse
- type GetTransactionMetaData
- type HexData
- type IOwner
- type InputObjectKind
- type IntentVersion
- type JsonRPCRequest
- type MergeCoinsRequest
- type ModifiedAtVersions
- type MoveCallRequest
- type MoveCallResponse
- type MoveCallSuiTransaction
- type MoveEventField
- type MoveEventModule
- type MoveFunction
- type MoveModule
- type ObjectChange
- type ObjectDigest
- type ObjectDigestBytes
- type ObjectFilterByAddressOwner
- type ObjectFilterByObjectId
- type ObjectFilterByObjectIds
- type ObjectFilterByObjectOwner
- type ObjectFilterByPackage
- type ObjectFilterByStructType
- type ObjectFilterByVersion
- type ObjectId
- type ObjectOwner
- type ObjectRef
- type ObjectShare
- type OwnedObjectRef
- type OwnerString
- type PaginatedCheckpointsResponse
- type PaginatedCoinsResponse
- type PaginatedDynamicFieldInfoResponse
- type PaginatedEpochInfoResponse
- type PaginatedEventsResponse
- type PaginatedObjectsResponse
- type PastObject
- type PastObjectResponse
- type PayAllSuiRequest
- type PayRequest
- type PaySuiRequest
- type ProgrammableTransaction
- type ProtocolConfigResponse
- type PublishRequest
- type RPCTransactionRequestParams
- type SigFlag
- type SigScheme
- type SignAndExecuteTransactionBlockRequest
- type SignaturePubkeyPair
- type SignedTransaction
- type SignedTransactionSerializedSig
- type SplitCoinEqualRequest
- type SplitCoinRequest
- type SuiAddress
- type SuiAddressBytes
- type SuiArgument
- type SuiCallArg
- type SuiDevInspectTransactionBlockRequest
- type SuiDryRunTransactionBlockRequest
- type SuiEffects
- type SuiEventFilter
- type SuiEventResponse
- type SuiExecuteTransactionBlockRequest
- type SuiGasData
- type SuiGetCheckpointRequest
- type SuiGetCheckpointsRequest
- type SuiGetEventsRequest
- type SuiGetLoadedChildObjectsRequest
- type SuiGetObjectRequest
- type SuiGetProtocolConfigRequest
- type SuiGetTransactionBlockRequest
- type SuiKeyPair
- type SuiLoadedChildObject
- type SuiMoveModuleId
- type SuiMoveNormalizedModule
- type SuiMoveObject
- type SuiMovePackage
- type SuiMultiGetObjectsRequest
- type SuiMultiGetTransactionBlocksRequest
- type SuiMultiGetTransactionBlocksResponse
- type SuiObjectChangeCreated
- type SuiObjectChangeDeleted
- type SuiObjectChangeMutated
- type SuiObjectChangePublished
- type SuiObjectChangeTransferred
- type SuiObjectChangeWrapped
- type SuiObjectData
- type SuiObjectDataFilter
- type SuiObjectDataOptions
- type SuiObjectInfo
- type SuiObjectRef
- type SuiObjectResponse
- type SuiObjectResponseError
- type SuiObjectResponseQuery
- type SuiParsedData
- type SuiRawData
- type SuiRawMoveObject
- type SuiRawMovePackage
- type SuiSystemStateSummary
- type SuiTransactionBlock
- type SuiTransactionBlockData
- type SuiTransactionBlockKind
- type SuiTransactionBlockOptions
- type SuiTransactionBlockResponse
- type SuiTransactionBlockResponseQuery
- type SuiTransactionEnum
- type SuiTryGetPastObjectRequest
- type SuiTryMultiGetPastObjectsRequest
- type SuiValidatorSummary
- type SuiXGetAllBalanceRequest
- type SuiXGetAllCoinsRequest
- type SuiXGetBalanceRequest
- type SuiXGetCoinMetadataRequest
- type SuiXGetCoinsRequest
- type SuiXGetCommitteeInfoRequest
- type SuiXGetCommitteeInfoResponse
- type SuiXGetDynamicFieldObjectRequest
- type SuiXGetDynamicFieldRequest
- type SuiXGetEpochsRequest
- type SuiXGetOwnedObjectsRequest
- type SuiXGetStakesByIdsRequest
- type SuiXGetStakesRequest
- type SuiXGetTotalSupplyRequest
- type SuiXQueryEventsRequest
- type SuiXQueryTransactionBlocksRequest
- type SuiXQueryTransactionBlocksResponse
- type SuiXResolveNameServiceAddressRequest
- type SuiXResolveNameServiceNamesRequest
- type SuiXResolveNameServiceNamesResponse
- type SuiXSubscribeEventsRequest
- type SuiXSubscribeTransactionsRequest
- type TimeRange
- type TotalSupplyResponse
- type TransactionDigest
- type TransactionFilter
- type TransactionFilterByChangedObjectFilter
- type TransactionFilterByFromAddress
- type TransactionFilterByInputObject
- type TransactionFilterByMoveFunction
- type TransactionFilterByToAddress
- type TransferObjectRequest
- type TransferSuiRequest
- type TxnMetaData
- type ValidatorsApy
- type WithdrawStakeRequest
Constants ¶
This section is empty.
Variables ¶
var IntentBytes = []byte{0, 0, 0}
Functions ¶
func Ed25519PublicKeyToSuiAddress ¶ added in v1.0.6
func IntentWithScope ¶ added in v1.0.6
func IntentWithScope(intentScope constant.IntentScope) []int
func NewMessageWithIntent ¶ added in v1.0.6
func NewMessageWithIntent(message []byte, scope constant.IntentScope) []byte
func ToSerializedSignature ¶ added in v1.0.6
func VerifyMessage ¶ added in v1.0.6
func VerifyPersonalMessage ¶ added in v1.0.6
Types ¶
type AddStakeRequest ¶ added in v1.0.2
type AddStakeRequest struct {
// the transaction signer's Sui address
Signer string `json:"signer"`
// Coin<SUI> object to stake
Coins []string `json:"coins"`
// stake amount
Amount string `json:"amount"`
// the validator's Sui address
Validator string `json:"validator"`
// gas object to be used in this transaction, node will pick one from the signer's possession if not provided
Gas *string `json:"gas"`
// the gas budget, the transaction will fail if the gas cost exceed the budget
GasBudget string `json:"gasBudget"`
}
type BalanceChangeOwner ¶ added in v1.0.7
type BalanceChanges ¶ added in v1.0.2
type BalanceChanges struct {
Owner json.RawMessage `json:"owner"`
CoinType string `json:"coinType"`
Amount string `json:"amount"`
}
func (BalanceChanges) GetBalanceChangeOwner ¶ added in v1.0.7
func (o BalanceChanges) GetBalanceChangeOwner() string
type Base64Data ¶ added in v1.0.2
type Base64Data struct {
// contains filtered or unexported fields
}
func NewBase64Data ¶ added in v1.0.2
func NewBase64Data(str string) (*Base64Data, error)
func (Base64Data) Data ¶ added in v1.0.2
func (h Base64Data) Data() []byte
type BatchTransactionRequest ¶
type BatchTransactionRequest struct {
// the transaction signer's Sui address
Signer string `json:"signer"`
// list of transaction request parameters
RPCTransactionRequestParams []RPCTransactionRequestParams `json:"RPCTransactionRequestParams"`
// gas object to be used in this transaction, node will pick one from the signer's possession if not provided
Gas *string `json:"gas"`
// the gas budget, the transaction will fail if the gas cost exceed the budget
GasBudget string `json:"gasBudget"`
// Whether this is a regular transaction or a Dev Inspect Transaction
// The optional enumeration values are: `DevInspect`, or `Commit`
SuiTransactionBlockBuilderMode string `json:"suiTransactionBlockBuilderMode"`
}
type BatchTransactionResponse ¶
type BatchTransactionResponse struct {
Gas []sui_types.SuiObjectRef `json:"gas"`
InputObjects []interface{} `json:"inputObjects"`
TxBytes string `json:"txBytes"`
}
type Bytes ¶ added in v1.0.2
type Bytes []byte
func (Bytes) GetBase64Data ¶ added in v1.0.2
func (b Bytes) GetBase64Data() Base64Data
func (Bytes) GetHexData ¶ added in v1.0.2
type CheckpointResponse ¶ added in v1.0.2
type CheckpointResponse struct {
Epoch string `json:"epoch"`
SequenceNumber string `json:"sequenceNumber"`
Digest string `json:"digest"`
NetworkTotalTransactions string `json:"networkTotalTransactions"`
PreviousDigest string `json:"previousDigest"`
EpochRollingGasCostSummary EpochRollingGasCostSummary `json:"epochRollingGasCostSummary"`
TimestampMs string `json:"timestampMs"`
Transactions []string `json:"transactions"`
CheckpointCommitments []interface{} `json:"checkpointCommitments"`
ValidatorSignature string `json:"validatorSignature"`
}
type ChildObjectsResponse ¶ added in v1.0.2
type ChildObjectsResponse struct {
LoadedChildObjects []*SuiLoadedChildObject `json:"loadedChildObjects"`
}
type CoinAllBalanceResponse ¶ added in v1.0.2
type CoinAllBalanceResponse []CoinBalanceResponse
type CoinBalanceResponse ¶ added in v1.0.2
type CoinBalanceResponse struct {
CoinType string `json:"coinType"`
CoinObjectCount uint64 `json:"coinObjectCount"`
TotalBalance string `json:"totalBalance"`
LockedBalance CoinLockedBalance `json:"lockedBalance"`
FundsInAddressBalance string `json:"fundsInAddressBalance"`
}
type CoinData ¶ added in v1.0.2
type CoinData struct {
CoinType string `json:"coinType"`
CoinObjectId string `json:"coinObjectId"`
Version string `json:"version"`
Digest string `json:"digest"`
Balance string `json:"balance"`
LockedUntilEpoch uint64 `json:"lockedUntilEpoch"`
PreviousTransaction string `json:"previousTransaction"`
}
type CoinLockedBalance ¶ added in v1.0.2
type CoinMetadataResponse ¶ added in v1.0.2
type DelegatedStakeInfo ¶ added in v1.0.2
type DelegatedStakesResponse ¶ added in v1.0.2
type DelegatedStakesResponse struct {
ValidatorAddress string `json:"validatorAddress"`
StakingPool string `json:"stakingPool"`
Stakes []DelegatedStakeInfo `json:"stakes"`
}
type Digest ¶ added in v1.0.2
type Digest = Base64Data
type DisplayFieldsResponse ¶ added in v1.0.2
type DisplayFieldsResponse struct {
Data any `json:"data"`
Error *SuiObjectResponseError `json:"error"`
}
func (DisplayFieldsResponse) Creator ¶ added in v1.0.6
func (display DisplayFieldsResponse) Creator() string
func (DisplayFieldsResponse) Description ¶ added in v1.0.6
func (display DisplayFieldsResponse) Description() string
func (DisplayFieldsResponse) ImageURL ¶ added in v1.0.6
func (display DisplayFieldsResponse) ImageURL() string
func (DisplayFieldsResponse) Link ¶ added in v1.0.6
func (display DisplayFieldsResponse) Link() string
func (DisplayFieldsResponse) Name ¶ added in v1.0.6
func (display DisplayFieldsResponse) Name() string
func (DisplayFieldsResponse) ProjectURL ¶ added in v1.0.6
func (display DisplayFieldsResponse) ProjectURL() string
func (DisplayFieldsResponse) ThumbnailURL ¶ added in v1.0.6
func (display DisplayFieldsResponse) ThumbnailURL() string
type DynamicFieldInfo ¶ added in v1.0.2
type DynamicFieldName ¶ added in v1.0.4
type DynamicFieldName struct {
Type string `json:"type"`
Value json.RawMessage `json:"value"`
}
type DynamicFieldObjectName ¶ added in v1.0.6
type DynamicFieldObjectName struct {
Type string `json:"type"`
Value interface{} `json:"value"`
}
type EndOfEpochInfo ¶ added in v1.0.2
type EndOfEpochInfo struct {
LastCheckpointId string `json:"lastCheckpointId"`
EpochEndTimestamp string `json:"epochEndTimestamp"`
ProtocolVersion string `json:"protocolVersion"`
ReferenceGasPrice string `json:"referenceGasPrice"`
TotalStake string `json:"totalStake"`
StorageFundReinvestment string `json:"storageFundReinvestment"`
StorageCharge string `json:"storageCharge"`
StorageRebate string `json:"storageRebate"`
StorageFundBalance string `json:"storageFundBalance"`
StakeSubsidyAmount string `json:"stakeSubsidyAmount"`
TotalGasFees string `json:"totalGasFees"`
TotalStakeRewardsDistributed string `json:"totalStakeRewardsDistributed"`
LeftoverStorageFundInflow string `json:"leftoverStorageFundInflow"`
}
type EpochInfo ¶ added in v1.0.2
type EpochInfo struct {
Epoch string `json:"epoch"`
Validators []SuiValidatorSummary `json:"validators"`
EpochTotalTransactions string `json:"epochTotalTransactions"`
FirstCheckpointId string `json:"firstCheckpointId"`
EpochStartTimestamp string `json:"epochStartTimestamp"`
EndOfEpochInfo EndOfEpochInfo `json:"endOfEpochInfo"`
}
type EpochRollingGasCostSummary ¶ added in v1.0.2
type EventFilterByMoveEventField ¶ added in v1.0.2
type EventFilterByMoveEventField struct {
MoveEventField MoveEventField `json:"MoveEventField"`
}
the event query by `MoveEventField`: Filter using the data fields in the move event object JSON-RPC Parameter Example: {"MoveEventField":{ "path":"/name", "value":"NFT"}}
type EventFilterByMoveEventModule ¶ added in v1.0.4
type EventFilterByMoveEventModule struct {
MoveEventModule MoveEventModule `json:"MoveEventModule"`
}
the event query by `MoveEventModule`: Move event module defined in the move code JSON-RPC Parameter Example: {"MoveEventModule": {"package": "<PACKAGE-ID>", "module": "nft", "event": "MintNFTEvent"}}
type EventFilterByMoveEventType ¶ added in v1.0.2
type EventFilterByMoveEventType struct {
MoveEventType string `json:"MoveEventType"`
}
the event query by `MoveEventType`: Move event type defined in the move code JSON-RPC Parameter Example:{"MoveEventType":"<PACKAGE-ID>::nft::MintNFTEvent"}
type EventFilterByMoveModule ¶ added in v1.0.2
type EventFilterByMoveModule struct {
MoveModule MoveModule `json:"MoveModule"`
}
the event query by `MoveModule`: Move module where the event was emitted JSON-RPC Parameter Example: {"MoveModule": {"package": "<PACKAGE-ID>", "module": "nft"}}
type EventFilterByPackage ¶ added in v1.0.2
type EventFilterByPackage struct {
Package string `json:"Package"`
}
the event query by `Package`: Move package ID JSON-RPC Parameter Example: {"Package":"<PACKAGE-ID>"}
type EventFilterBySenderAddress ¶ added in v1.0.4
type EventFilterBySenderAddress struct {
SenderAddress string `json:"SenderAddress"`
}
the event query by `SenderAddress`: Address that started the transaction JSON-RPC Parameter Example: {"SenderAddress": "0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106"}
type EventFilterBySuiAddress ¶ added in v1.0.2
type EventFilterBySuiAddress struct {
Sender string `json:"Sender"`
}
the event query by `Sender`: Filter Sender address JSON-RPC Parameter Example: {"Sender":"0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106"}
type EventFilterByTimeRange ¶ added in v1.0.2
type EventFilterByTimeRange struct {
TimeRange TimeRange `json:"TimeRange"`
}
the event query by `TimeRange`: Time range in millisecond JSON-RPC Parameter Example: {"TimeRange": {"start_time": "1685959791871", "end_time": "1685959791871"}}
type EventFilterByTransaction ¶ added in v1.0.2
type EventFilterByTransaction struct {
Transaction string `json:"Transaction"`
}
the event query by `Transaction`: Filter Transaction hash JSON-RPC Parameter Example: {"Transaction":"ENmjG42TE4GyqYb1fGNwJe7oxBbbXWCdNfRiQhCNLBJQ"}
type ExecutionMode ¶ added in v1.0.6
type ExecutionMode string
const ( TransactionExecutionCommit ExecutionMode = "Commit" TransactionExecutionDevInspect ExecutionMode = "DevInspect" )
type ExecutionStatus ¶ added in v1.0.2
type FaucetCoinInfo ¶ added in v1.0.4
type FaucetFixedAmountRequest ¶ added in v1.0.4
type FaucetFixedAmountRequest struct {
Recipient string `json:"recipient"`
}
type FaucetRequest ¶ added in v1.0.4
type FaucetRequest struct {
FixedAmountRequest *FaucetFixedAmountRequest `json:"FixedAmountRequest"`
}
type GasCostSummary ¶ added in v1.0.2
type GetEventsResponse ¶ added in v1.0.2
type GetEventsResponse []*SuiEventResponse
type GetMoveFunctionArgTypesResponse ¶
type GetMoveFunctionArgTypesResponse []interface{}
type GetNormalizedMoveFunctionResponse ¶
type GetNormalizedMoveFunctionResponse sui_json_rpc_types.SuiMoveNormalizedFunction
type GetNormalizedMoveModuleResponse ¶
type GetNormalizedMoveModuleResponse sui_json_rpc_types.SuiMoveNormalizedModule
type GetNormalizedMoveModulesByPackageRequest ¶
type GetNormalizedMoveModulesByPackageRequest struct {
Package string `json:"package"`
}
type GetNormalizedMoveModulesByPackageResponse ¶
type GetNormalizedMoveModulesByPackageResponse map[string]sui_json_rpc_types.SuiMoveNormalizedModule
type GetNormalizedMoveStructResponse ¶
type GetNormalizedMoveStructResponse sui_json_rpc_types.SuiMoveNormalizedStruct
type GetTransactionMetaData ¶
type HexData ¶ added in v1.0.2
type HexData struct {
// contains filtered or unexported fields
}
func NewHexData ¶ added in v1.0.2
type InputObjectKind ¶ added in v1.0.2
type InputObjectKind map[string]interface{}
type JsonRPCRequest ¶
type MergeCoinsRequest ¶
type MergeCoinsRequest struct {
// the transaction signer's Sui address
Signer string `json:"signer"`
PrimaryCoin string `json:"primaryCoin"`
CoinToMerge string `json:"coinToMerge"`
// gas object to be used in this transaction, node will pick one from the signer's possession if not provided
Gas *string `json:"gas"`
// the gas budget, the transaction will fail if the gas cost exceed the budget
GasBudget string `json:"gasBudget"`
}
type ModifiedAtVersions ¶ added in v1.0.2
type MoveCallRequest ¶
type MoveCallRequest struct {
// the transaction signer's Sui address
Signer string `json:"signer"`
// the package containing the module and function
PackageObjectId string `json:"packageObjectId"`
// the specific module in the package containing the function
Module string `json:"module"`
// the function to be called
Function string `json:"function"`
// the type arguments to the function
TypeArguments []interface{} `json:"typeArguments"`
// the arguments to the function
Arguments []interface{} `json:"arguments"`
// gas object to be used in this transaction, node will pick one from the signer's possession if not provided
Gas *string `json:"gas"`
// the gas budget, the transaction will fail if the gas cost exceed the budget
GasBudget string `json:"gasBudget"`
ExecutionMode ExecutionMode `json:"executionMode"`
}
type MoveCallResponse ¶
type MoveCallResponse struct {
Gas []sui_types.SuiObjectRef `json:"gas"`
InputObjects interface{} `json:"inputObjects"`
TxBytes string `json:"txBytes"`
}
type MoveCallSuiTransaction ¶ added in v1.0.2
type MoveCallSuiTransaction struct {
Package string `json:"package"`
Module string `json:"module"`
Function string `json:"function"`
TypeArguments []string `json:"type_arguments"`
Arguments []interface{} `json:"arguments"`
}
func MoveCall ¶ added in v1.0.6
func MoveCall(data any) *MoveCallSuiTransaction
type MoveEventField ¶ added in v1.0.2
type MoveEventModule ¶ added in v1.0.4
type MoveFunction ¶ added in v1.0.4
type MoveModule ¶ added in v1.0.2
type ObjectChange ¶ added in v1.0.2
type ObjectChange struct {
Type string `json:"type"`
Sender string `json:"sender"`
Owner interface{} `json:"owner"`
ObjectType string `json:"objectType"`
ObjectId string `json:"objectId"`
PackageId string `json:"packageId"`
Modules []string `json:"modules"`
Version string `json:"version"`
PreviousVersion string `json:"previousVersion,omitempty"`
Digest string `json:"digest"`
}
func (ObjectChange) GetObjectChangeAddressOwner ¶ added in v1.0.6
func (o ObjectChange) GetObjectChangeAddressOwner() string
func (ObjectChange) GetObjectChangeObjectOwner ¶ added in v1.0.6
func (o ObjectChange) GetObjectChangeObjectOwner() string
func (ObjectChange) GetObjectOwnerShare ¶ added in v1.0.6
func (o ObjectChange) GetObjectOwnerShare() ObjectShare
type ObjectDigest ¶ added in v1.0.7
type ObjectDigest string
type ObjectDigestBytes ¶ added in v1.0.7
type ObjectDigestBytes []byte
func (ObjectDigestBytes) IsEqual ¶ added in v1.0.7
func (o ObjectDigestBytes) IsEqual(other ObjectDigestBytes) bool
type ObjectFilterByAddressOwner ¶ added in v1.0.2
type ObjectFilterByAddressOwner struct {
AddressOwner string `json:"AddressOwner"`
}
type ObjectFilterByObjectId ¶ added in v1.0.2
type ObjectFilterByObjectId struct {
ObjectId string `json:"ObjectId"`
}
type ObjectFilterByObjectIds ¶ added in v1.0.2
type ObjectFilterByObjectIds struct {
ObjectIds []string `json:"ObjectIds"`
}
type ObjectFilterByObjectOwner ¶ added in v1.0.2
type ObjectFilterByObjectOwner struct {
ObjectOwner string `json:"ObjectOwner"`
}
type ObjectFilterByPackage ¶ added in v1.0.2
type ObjectFilterByPackage struct {
Package string `json:"Package"`
}
type ObjectFilterByStructType ¶ added in v1.0.2
type ObjectFilterByStructType struct {
StructType string `json:"StructType"`
}
type ObjectFilterByVersion ¶ added in v1.0.2
type ObjectFilterByVersion struct {
Version string `json:"Version"`
}
type ObjectOwner ¶ added in v1.0.2
type ObjectShare ¶ added in v1.0.2
type ObjectShare struct {
}
type OwnedObjectRef ¶ added in v1.0.2
type OwnedObjectRef struct {
Owner interface{} `json:"owner"`
Reference SuiObjectRef `json:"reference"`
}
type OwnerString ¶ added in v1.0.7
type OwnerString string
func (OwnerString) GetBalanceChangeOwner ¶ added in v1.0.7
func (o OwnerString) GetBalanceChangeOwner() string
type PaginatedCheckpointsResponse ¶ added in v1.0.2
type PaginatedCheckpointsResponse struct {
Data []CheckpointResponse `json:"data"`
NextCursor string `json:"nextCursor"`
HasNextPage bool `json:"hasNextPage"`
}
type PaginatedCoinsResponse ¶ added in v1.0.2
type PaginatedDynamicFieldInfoResponse ¶ added in v1.0.2
type PaginatedDynamicFieldInfoResponse struct {
Data []DynamicFieldInfo `json:"data"`
NextCursor string `json:"nextCursor"`
HasNextPage bool `json:"hasNextPage"`
}
type PaginatedEpochInfoResponse ¶ added in v1.0.2
type PaginatedEventsResponse ¶ added in v1.0.2
type PaginatedEventsResponse struct {
Data []SuiEventResponse `json:"data"`
NextCursor EventId `json:"nextCursor"`
HasNextPage bool `json:"hasNextPage"`
}
type PaginatedObjectsResponse ¶ added in v1.0.2
type PaginatedObjectsResponse struct {
Data []SuiObjectResponse `json:"data"`
NextCursor string `json:"nextCursor"`
HasNextPage bool `json:"hasNextPage"`
}
type PastObject ¶ added in v1.0.4
type PastObjectResponse ¶ added in v1.0.2
type PastObjectResponse struct {
Status string `json:"status"`
Details interface{} `json:"details"`
}
type PayAllSuiRequest ¶ added in v1.0.2
type PayRequest ¶ added in v1.0.2
type PayRequest struct {
// the transaction signer's Sui address
Signer string `json:"signer"`
SuiObjectId []string `json:"suiObjectId"`
Recipient []string `json:"recipient"`
Amount []string `json:"amount"`
// gas object to be used in this transaction, node will pick one from the signer's possession if not provided
Gas *string `json:"gas"`
// the gas budget, the transaction will fail if the gas cost exceed the budget
GasBudget string `json:"gasBudget"`
}
type PaySuiRequest ¶ added in v1.0.2
type PaySuiRequest struct {
// the transaction signer's Sui address
Signer string `json:"signer"`
SuiObjectId []string `json:"suiObjectId"`
Recipient []string `json:"recipient"`
Amount []string `json:"amount"`
// the gas budget, the transaction will fail if the gas cost exceed the budget
GasBudget string `json:"gasBudget"`
}
type ProgrammableTransaction ¶ added in v1.0.2
type ProgrammableTransaction struct {
Transactions []any `json:"transactions"`
Inputs []SuiCallArg `json:"inputs"`
}
type ProtocolConfigResponse ¶ added in v1.0.4
type ProtocolConfigResponse struct {
MinSupportedProtocolVersion string `json:"minSupportedProtocolVersion"`
MaxSupportedProtocolVersion string `json:"maxSupportedProtocolVersion"`
ProtocolVersion string `json:"protocolVersion"`
FeatureFlags map[string]bool `json:"featureFlags"`
Attributes map[string]map[string]string `json:"attributes"`
}
type PublishRequest ¶
type PublishRequest struct {
// the transaction signer's Sui address
Sender string `json:"sender"`
CompiledModules []string `json:"compiled_modules"`
Dependencies []string `json:"dependencies"`
// gas object to be used in this transaction, node will pick one from the signer's possession if not provided
Gas *string `json:"gas"`
// the gas budget, the transaction will fail if the gas cost exceed the budget
GasBudget string `json:"gasBudget"`
}
type RPCTransactionRequestParams ¶ added in v1.0.2
type RPCTransactionRequestParams struct {
MoveCallRequestParams *MoveCallRequest `json:"moveCallRequestParams,omitempty"`
TransferObjectRequestParams *TransferObjectRequest `json:"transferObjectRequestParams,omitempty"`
}
type SignAndExecuteTransactionBlockRequest ¶ added in v1.0.2
type SignAndExecuteTransactionBlockRequest struct {
TxnMetaData TxnMetaData
// the address private key to sign the transaction
PriKey ed25519.PrivateKey
Options SuiTransactionBlockOptions `json:"options"`
// The optional enumeration values are: `WaitForEffectsCert`, or `WaitForLocalExecution`
RequestType string `json:"requestType"`
}
type SignaturePubkeyPair ¶ added in v1.0.6
func FromSerializedSignature ¶ added in v1.0.6
func FromSerializedSignature(serializedSignature string) (*SignaturePubkeyPair, error)
type SignedTransaction ¶ added in v1.0.2
type SignedTransaction struct {
// transaction data bytes
TxBytes string `json:"tx_bytes"`
// Flag of the signature scheme that is used.
SigScheme SigScheme `json:"sig_scheme"`
// transaction signature
Signature *Base64Data `json:"signature"`
// signer's public key
PublicKey *Base64Data `json:"pub_key"`
}
type SignedTransactionSerializedSig ¶ added in v1.0.2
type SplitCoinEqualRequest ¶
type SplitCoinEqualRequest struct {
// the transaction signer's Sui address
Signer string `json:"signer"`
CoinObjectId string `json:"coinObjectId"`
SplitCount string `json:"splitCount"`
// gas object to be used in this transaction, node will pick one from the signer's possession if not provided
Gas *string `json:"gas"`
// the gas budget, the transaction will fail if the gas cost exceed the budget
GasBudget string `json:"gasBudget"`
}
type SplitCoinRequest ¶
type SplitCoinRequest struct {
// the transaction signer's Sui address
Signer string `json:"signer"`
CoinObjectId string `json:"coinObjectId"`
SplitAmounts []string `json:"splitAmounts"`
// gas object to be used in this transaction, node will pick one from the signer's possession if not provided
Gas *string `json:"gas"`
// the gas budget, the transaction will fail if the gas cost exceed the budget
GasBudget string `json:"gasBudget"`
}
type SuiAddress ¶ added in v1.0.2
type SuiAddress string
type SuiAddressBytes ¶ added in v1.0.7
type SuiAddressBytes [32]byte
func (SuiAddressBytes) IsEqual ¶ added in v1.0.7
func (s SuiAddressBytes) IsEqual(other SuiAddressBytes) bool
type SuiArgument ¶ added in v1.0.2
type SuiArgument map[string]interface{}
type SuiCallArg ¶ added in v1.0.2
type SuiCallArg map[string]interface{}
type SuiDevInspectTransactionBlockRequest ¶ added in v1.0.2
type SuiDevInspectTransactionBlockRequest struct {
// the transaction signer's Sui address
Sender string `json:"sender"`
// BCS encoded TransactionKind(as opposed to TransactionData, which include gasBudget and gasPrice)
TxBytes string `json:"txBytes"`
// Gas is not charged, but gas usage is still calculated. Default to use reference gas price
GasPrice string `json:"gasPrice,omitempty"`
// The epoch to perform the call. Will be set from the system state object if not provided
Epoch string `json:"epoch,omitempty"`
}
type SuiDryRunTransactionBlockRequest ¶ added in v1.0.2
type SuiDryRunTransactionBlockRequest struct {
TxBytes string `json:"txBytes"`
}
type SuiEffects ¶ added in v1.0.2
type SuiEffects struct {
MessageVersion string `json:"messageVersion"`
Status ExecutionStatus `json:"status"`
ExecutedEpoch string `json:"executedEpoch"`
GasUsed GasCostSummary `json:"gasUsed"`
ModifiedAtVersions []ModifiedAtVersions `json:"modifiedAtVersions"`
TransactionDigest string `json:"transactionDigest"`
Created []OwnedObjectRef `json:"created"`
Mutated []OwnedObjectRef `json:"mutated"`
Deleted []SuiObjectRef `json:"deleted"`
GasObject OwnedObjectRef `json:"gasObject"`
EventsDigest string `json:"eventsDigest"`
Dependencies []string `json:"dependencies"`
}
type SuiEventFilter ¶ added in v1.0.2
type SuiEventFilter map[string]interface{}
type SuiEventResponse ¶ added in v1.0.2
type SuiEventResponse struct {
Id EventId `json:"id"`
PackageId string `json:"packageId"`
TransactionModule string `json:"transactionModule"`
Sender string `json:"sender"`
Type string `json:"type"`
ParsedJson map[string]interface{} `json:"parsedJson"`
Bcs string `json:"bcs"`
TimestampMs string `json:"timestampMs"`
}
type SuiExecuteTransactionBlockRequest ¶ added in v1.0.2
type SuiExecuteTransactionBlockRequest struct {
// BCS serialized transaction data bytes without its type tag, as base-64 encoded string.
TxBytes string `json:"txBytes"`
// A list of signatures (`flag || signature || pubkey` bytes, as base-64 encoded string).
// Signature is committed to the intent message of the transaction data, as base-64 encoded string.
Signature []string `json:"signature"`
// Options for specifying the content to be returned
Options SuiTransactionBlockOptions `json:"options"`
// The request type, derived from `SuiTransactionBlockResponseOptions` if None.
// The optional enumeration values are: `WaitForEffectsCert`, or `WaitForLocalExecution`
RequestType string `json:"requestType"`
}
type SuiGasData ¶ added in v1.0.2
type SuiGasData struct {
Payment []SuiObjectRef `json:"payment"`
// the owner's Sui address
Owner string `json:"owner"`
Price string `json:"price"`
Budget string `json:"budget"`
}
type SuiGetCheckpointRequest ¶ added in v1.0.2
type SuiGetCheckpointRequest struct {
CheckpointID string `json:"id"`
}
type SuiGetCheckpointsRequest ¶ added in v1.0.2
type SuiGetCheckpointsRequest struct {
// optional paging cursor
Cursor interface{} `json:"cursor"`
// maximum number of items per page
Limit uint64 `json:"limit" validate:"lte=50"`
// query result ordering, default to false (ascending order), oldest record first
DescendingOrder bool `json:"descendingOrder"`
}
type SuiGetEventsRequest ¶ added in v1.0.2
type SuiGetEventsRequest struct {
Digest string `json:"digest"`
}
type SuiGetLoadedChildObjectsRequest ¶ added in v1.0.2
type SuiGetLoadedChildObjectsRequest struct {
Digest string `json:"digest"`
}
type SuiGetObjectRequest ¶ added in v1.0.4
type SuiGetObjectRequest struct {
// the ID of the queried object
ObjectId string `json:"ObjectId"`
// config which fields to include in the response, by default only digest is included
Options SuiObjectDataOptions `json:"options"`
}
type SuiGetProtocolConfigRequest ¶ added in v1.0.4
type SuiGetProtocolConfigRequest struct {
Version string `json:"version"`
}
type SuiGetTransactionBlockRequest ¶ added in v1.0.2
type SuiGetTransactionBlockRequest struct {
Digest string `json:"digest"`
Options SuiTransactionBlockOptions `json:"options"`
}
type SuiKeyPair ¶
type SuiLoadedChildObject ¶ added in v1.0.2
type SuiMoveModuleId ¶
type SuiMoveNormalizedModule ¶
type SuiMoveNormalizedModule struct {
FileFormatVersion uint64
Address string
Name string
Friends []SuiMoveModuleId
}
type SuiMoveObject ¶
type SuiMovePackage ¶ added in v1.0.2
type SuiMovePackage struct {
Disassembled interface{} `json:"disassembled"`
}
type SuiMultiGetObjectsRequest ¶ added in v1.0.2
type SuiMultiGetObjectsRequest struct {
ObjectIds []string `json:"objectIds"`
Options SuiObjectDataOptions `json:"options"`
}
type SuiMultiGetTransactionBlocksRequest ¶ added in v1.0.2
type SuiMultiGetTransactionBlocksRequest struct {
Digests []string `json:"digests"`
Options SuiTransactionBlockOptions `json:"options"`
}
type SuiMultiGetTransactionBlocksResponse ¶ added in v1.0.2
type SuiMultiGetTransactionBlocksResponse []*SuiTransactionBlockResponse
type SuiObjectChangeCreated ¶ added in v1.0.2
type SuiObjectChangeDeleted ¶ added in v1.0.2
type SuiObjectChangeMutated ¶ added in v1.0.2
type SuiObjectChangeMutated struct {
Type string `json:"type"`
Sender string `json:"sender"`
Owner ObjectOwner `json:"owner"`
ObjectType string `json:"objectType"`
ObjectId string `json:"objectId"`
Version uint64 `json:"version"`
PreviousVersion uint64 `json:"previousVersion"`
Digest string `json:"digest"`
}
type SuiObjectChangePublished ¶ added in v1.0.2
type SuiObjectChangeTransferred ¶ added in v1.0.2
type SuiObjectChangeWrapped ¶ added in v1.0.2
type SuiObjectData ¶ added in v1.0.2
type SuiObjectData struct {
ObjectId string `json:"objectId"`
Version string `json:"version"`
Digest string `json:"digest"`
Type string `json:"type"`
Owner interface{} `json:"owner"`
PreviousTransaction string `json:"previousTransaction,omitempty"`
StorageRebate string `json:"storageRebate"`
Display DisplayFieldsResponse `json:"display"`
Content *SuiParsedData `json:"content,omitempty"`
Bcs *SuiRawData `json:"bcs,omitempty"`
}
type SuiObjectDataFilter ¶ added in v1.0.2
type SuiObjectDataFilter map[string]interface{}
type SuiObjectDataOptions ¶ added in v1.0.2
type SuiObjectDataOptions struct {
ShowType bool `json:"showType"`
ShowContent bool `json:"showContent"`
ShowBcs bool `json:"showBcs"`
ShowOwner bool `json:"showOwner"`
ShowPreviousTransaction bool `json:"showPreviousTransaction"`
ShowStorageRebate bool `json:"showStorageRebate"`
ShowDisplay bool `json:"showDisplay"`
}
type SuiObjectInfo ¶
type SuiObjectRef ¶ added in v1.0.2
type SuiObjectResponse ¶ added in v1.0.2
type SuiObjectResponse struct {
Data *SuiObjectData `json:"data,omitempty"`
Error *SuiObjectResponseError `json:"error,omitempty"`
}
type SuiObjectResponseError ¶ added in v1.0.2
type SuiObjectResponseQuery ¶ added in v1.0.2
type SuiObjectResponseQuery struct {
// If None, no filter will be applied
Filter interface{} `json:"filter"`
// config which fields to include in the response, by default only digest is included
Options SuiObjectDataOptions `json:"options"`
}
type SuiParsedData ¶ added in v1.0.2
type SuiParsedData struct {
DataType string `json:"dataType"`
SuiMoveObject
SuiMovePackage
}
type SuiRawData ¶ added in v1.0.2
type SuiRawData struct {
DataType string `json:"dataType"`
SuiRawMoveObject
SuiRawMovePackage
}
type SuiRawMoveObject ¶ added in v1.0.2
type SuiRawMovePackage ¶ added in v1.0.2
type SuiSystemStateSummary ¶ added in v1.0.2
type SuiSystemStateSummary struct {
Epoch string `json:"epoch"`
ProtocolVersion string `json:"protocolVersion"`
SystemStateVersion string `json:"systemStateVersion"`
StorageFundTotalObjectStorageRebates string `json:"storageFundTotalObjectStorageRebates"`
StorageFundNonRefundableBalance string `json:"storageFundNonRefundableBalance"`
ReferenceGasPrice string `json:"referenceGasPrice"`
SafeMode bool `json:"safeMode"`
SafeModeStorageRewards string `json:"safeModeStorageRewards"`
SafeModeComputationRewards string `json:"safeModeComputationRewards"`
SafeModeStorageRebates string `json:"safeModeStorageRebates"`
SafeModeNonRefundableStorageFee string `json:"safeModeNonRefundableStorageFee"`
EpochStartTimestampMs string `json:"epochStartTimestampMs"`
EpochDurationMs string `json:"epochDurationMs"`
StakeSubsidyStartEpoch string `json:"stakeSubsidyStartEpoch"`
MaxValidatorCount string `json:"maxValidatorCount"`
MinValidatorJoiningStake string `json:"minValidatorJoiningStake"`
ValidatorLowStakeThreshold string `json:"validatorLowStakeThreshold"`
ValidatorVeryLowStakeThreshold string `json:"validatorVeryLowStakeThreshold"`
ValidatorLowStakeGracePeriod string `json:"validatorLowStakeGracePeriod"`
StakeSubsidyBalance string `json:"stakeSubsidyBalance"`
StakeSubsidyDistributionCounter string `json:"stakeSubsidyDistributionCounter"`
StakeSubsidyCurrentDistributionAmount string `json:"stakeSubsidyCurrentDistributionAmount"`
StakeSubsidyPeriodLength string `json:"stakeSubsidyPeriodLength"`
StakeSubsidyDecreaseRate int `json:"stakeSubsidyDecreaseRate"`
TotalStake string `json:"totalStake"`
ActiveValidators []SuiValidatorSummary `json:"activeValidators"`
PendingActiveValidatorsId string `json:"pendingActiveValidatorsId"`
PendingActiveValidatorsSize string `json:"pendingActiveValidatorsSize"`
PendingRemovals []string `json:"pendingRemovals"`
StakingPoolMappingsId string `json:"stakingPoolMappingsId"`
StakingPoolMappingsSize string `json:"stakingPoolMappingsSize"`
InactivePoolsId string `json:"inactivePoolsId"`
InactivePoolsSize string `json:"inactivePoolsSize"`
ValidatorCandidatesId string `json:"validatorCandidatesId"`
ValidatorCandidatesSize string `json:"validatorCandidatesSize"`
AtRiskValidators []interface{} `json:"atRiskValidators"`
ValidatorReportRecords [][]interface{} `json:"validatorReportRecords"`
}
type SuiTransactionBlock ¶ added in v1.0.2
type SuiTransactionBlock struct {
Data SuiTransactionBlockData `json:"data"`
TxSignatures []string `json:"txSignatures"`
}
type SuiTransactionBlockData ¶ added in v1.0.2
type SuiTransactionBlockData struct {
MessageVersion string `json:"messageVersion"`
Transaction SuiTransactionBlockKind `json:"transaction"`
Sender string `json:"sender"`
GasData SuiGasData `json:"gasData"`
}
type SuiTransactionBlockKind ¶ added in v1.0.2
type SuiTransactionBlockKind struct {
Kind string `json:"kind"`
Inputs []SuiCallArg `json:"inputs"`
Transactions []any `json:"transactions"`
}
type SuiTransactionBlockOptions ¶ added in v1.0.2
type SuiTransactionBlockOptions struct {
ShowInput bool `json:"showInput,omitempty"`
ShowRawInput bool `json:"showRawInput,omitempty"`
ShowEffects bool `json:"showEffects,omitempty"`
ShowEvents bool `json:"showEvents,omitempty"`
ShowObjectChanges bool `json:"showObjectChanges,omitempty"`
ShowBalanceChanges bool `json:"showBalanceChanges,omitempty"`
}
type SuiTransactionBlockResponse ¶ added in v1.0.2
type SuiTransactionBlockResponse struct {
Digest string `json:"digest"`
Transaction SuiTransactionBlock `json:"transaction,omitempty"`
RawTransaction string `json:"rawTransaction,omitempty"`
Effects SuiEffects `json:"effects,omitempty"`
Events []SuiEventResponse `json:"events,omitempty"`
ObjectChanges []ObjectChange `json:"objectChanges,omitempty"`
BalanceChanges []BalanceChanges `json:"balanceChanges,omitempty"`
TimestampMs string `json:"timestampMs,omitempty"`
Checkpoint string `json:"checkpoint,omitempty"`
ConfirmedLocalExecution bool `json:"confirmedLocalExecution,omitempty"`
Results json.RawMessage `json:"results,omitempty"`
}
type SuiTransactionBlockResponseQuery ¶ added in v1.0.2
type SuiTransactionBlockResponseQuery struct {
TransactionFilter TransactionFilter `json:"filter"`
Options SuiTransactionBlockOptions `json:"options"`
}
type SuiTransactionEnum ¶ added in v1.0.6
type SuiTransactionEnum struct {
MakeMoveVec []interface{} `json:"MakeMoveVec,omitempty"`
MergeCoins []interface{} `json:"MergeCoins,omitempty"`
SplitCoins []interface{} `json:"SplitCoins,omitempty"`
TransferObjects []interface{} `json:"TransferObjects,omitempty"`
Publish []interface{} `json:"Publish,omitempty"`
Upgrade []interface{} `json:"Upgrade,omitempty"`
MoveCall *MoveCallSuiTransaction `json:"MoveCall,omitempty"`
}
type SuiTryGetPastObjectRequest ¶ added in v1.0.2
type SuiTryGetPastObjectRequest struct {
// the ID of the queried object
ObjectId string `json:"objectId"`
// the version of the queried object
Version uint64 `json:"version"`
Options SuiObjectDataOptions `json:"options"`
}
type SuiTryMultiGetPastObjectsRequest ¶ added in v1.0.4
type SuiTryMultiGetPastObjectsRequest struct {
// a vector of object and versions to be queried
MultiGetPastObjects []*PastObject
// options for specifying the content to be returned
Options SuiObjectDataOptions
}
type SuiValidatorSummary ¶ added in v1.0.2
type SuiValidatorSummary struct {
SuiAddress SuiAddress `json:"suiAddress"`
ProtocolPubkeyBytes string `json:"protocolPubkeyBytes"`
NetworkPubkeyBytes string `json:"networkPubkeyBytes"`
WorkerPubkeyBytes string `json:"workerPubkeyBytes"`
ProofOfPossessionBytes string `json:"proofOfPossessionBytes"`
OperationCapId string `json:"operationCapId"`
Name string `json:"name"`
Description string `json:"description"`
ImageUrl string `json:"imageUrl"`
ProjectUrl string `json:"projectUrl"`
P2pAddress string `json:"p2pAddress"`
NetAddress string `json:"netAddress"`
PrimaryAddress string `json:"primaryAddress"`
WorkerAddress string `json:"workerAddress"`
NextEpochProtocolPubkeyBytes string `json:"nextEpochProtocolPubkeyBytes"`
NextEpochProofOfPossession string `json:"nextEpochProofOfPossession"`
NextEpochNetworkPubkeyBytes string `json:"nextEpochNetworkPubkeyBytes"`
NextEpochWorkerPubkeyBytes string `json:"nextEpochWorkerPubkeyBytes"`
NextEpochNetAddress string `json:"nextEpochNetAddress"`
NextEpochP2pAddress string `json:"nextEpochP2pAddress"`
NextEpochPrimaryAddress string `json:"nextEpochPrimaryAddress"`
NextEpochWorkerAddress string `json:"nextEpochWorkerAddress"`
VotingPower string `json:"votingPower"`
GasPrice string `json:"gasPrice"`
CommissionRate string `json:"commissionRate"`
NextEpochStake string `json:"nextEpochStake"`
NextEpochGasPrice string `json:"nextEpochGasPrice"`
NextEpochCommissionRate string `json:"nextEpochCommissionRate"`
StakingPoolId string `json:"stakingPoolId"`
StakingPoolActivationEpoch string `json:"stakingPoolActivationEpoch"`
StakingPoolDeactivationEpoch string `json:"stakingPoolDeactivationEpoch"`
StakingPoolSuiBalance string `json:"stakingPoolSuiBalance"`
RewardsPool string `json:"rewardsPool"`
PoolTokenBalance string `json:"poolTokenBalance"`
PendingStake string `json:"pendingStake"`
PendingPoolTokenWithdraw string `json:"pendingPoolTokenWithdraw"`
PendingTotalSuiWithdraw string `json:"pendingTotalSuiWithdraw"`
ExchangeRatesId string `json:"exchangeRatesId"`
ExchangeRatesSize string `json:"exchangeRatesSize"`
}
type SuiXGetAllBalanceRequest ¶ added in v1.0.2
type SuiXGetAllBalanceRequest struct {
// the owner's Sui address
Owner string `json:"owner"`
}
type SuiXGetAllCoinsRequest ¶ added in v1.0.2
type SuiXGetBalanceRequest ¶ added in v1.0.2
type SuiXGetCoinMetadataRequest ¶ added in v1.0.2
type SuiXGetCoinMetadataRequest struct {
// type name for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)
CoinType string `json:"coinType"`
}
type SuiXGetCoinsRequest ¶ added in v1.0.2
type SuiXGetCoinsRequest struct {
// the owner's Sui address
Owner string `json:"owner"`
// optional type name for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC), default to 0x2::sui::SUI if not specified.
CoinType string `json:"coin_type"`
// optional paging cursor
Cursor interface{} `json:"cursor"`
// maximum number of items per page
Limit uint64 `json:"limit" validate:"lte=50"`
}
type SuiXGetCommitteeInfoRequest ¶ added in v1.0.2
type SuiXGetCommitteeInfoRequest struct {
Epoch string `json:"epoch"`
}
type SuiXGetCommitteeInfoResponse ¶ added in v1.0.2
type SuiXGetDynamicFieldObjectRequest ¶ added in v1.0.2
type SuiXGetDynamicFieldObjectRequest struct {
ObjectId string `json:"objectId"`
DynamicFieldName DynamicFieldObjectName `json:"dynamicFieldName"`
}
type SuiXGetDynamicFieldRequest ¶ added in v1.0.2
type SuiXGetEpochsRequest ¶ added in v1.0.2
type SuiXGetEpochsRequest struct {
// optional paging cursor
Cursor interface{} `json:"cursor"`
// maximum number of items per page
Limit uint64 `json:"limit" validate:"lte=50"`
// query result ordering, default to false (ascending order), oldest record first
DescendingOrder bool `json:"descendingOrder"`
}
type SuiXGetOwnedObjectsRequest ¶ added in v1.0.2
type SuiXGetOwnedObjectsRequest struct {
// the owner's Sui address
Address string `json:"address" validate:"checkAddress"`
// the objects query criteria
Query SuiObjectResponseQuery
// optional paging cursor
Cursor interface{} `json:"cursor"`
// maximum number of items per page
Limit uint64 `json:"limit" validate:"lte=50"`
}
type SuiXGetStakesByIdsRequest ¶ added in v1.0.2
type SuiXGetStakesByIdsRequest struct {
StakedSuiIds []string `json:"stakedSuiIds"`
}
type SuiXGetStakesRequest ¶ added in v1.0.2
type SuiXGetStakesRequest struct {
Owner string `json:"owner"`
}
type SuiXGetTotalSupplyRequest ¶ added in v1.0.2
type SuiXGetTotalSupplyRequest struct {
// type name for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)
CoinType string `json:"coinType"`
}
type SuiXQueryEventsRequest ¶ added in v1.0.2
type SuiXQueryEventsRequest struct {
// the event query criteria. See Event filter documentation[https://docs.sui.io/sui-jsonrpc#suix_queryEvents] for examples.
SuiEventFilter interface{} `json:"suiEventFilter"`
// optional paging cursor
Cursor interface{} `json:"cursor"`
// maximum number of items per page
Limit uint64 `json:"limit" validate:"lte=50"`
// query result ordering, default to false (ascending order), oldest record first
DescendingOrder bool `json:"descendingOrder"`
}
type SuiXQueryTransactionBlocksRequest ¶ added in v1.0.2
type SuiXQueryTransactionBlocksRequest struct {
SuiTransactionBlockResponseQuery SuiTransactionBlockResponseQuery
// optional paging cursor
Cursor interface{} `json:"cursor"`
// maximum number of items per page
Limit uint64 `json:"limit" validate:"lte=50"`
// query result ordering, default to false (ascending order), oldest record first
DescendingOrder bool `json:"descendingOrder"`
}
type SuiXQueryTransactionBlocksResponse ¶ added in v1.0.2
type SuiXQueryTransactionBlocksResponse struct {
Data []SuiTransactionBlockResponse `json:"data"`
NextCursor string `json:"nextCursor"`
HasNextPage bool `json:"hasNextPage"`
}
type SuiXResolveNameServiceAddressRequest ¶ added in v1.0.4
type SuiXResolveNameServiceAddressRequest struct {
Name string `json:"name"`
}
type SuiXResolveNameServiceNamesRequest ¶ added in v1.0.4
type SuiXResolveNameServiceNamesResponse ¶ added in v1.0.4
type SuiXSubscribeEventsRequest ¶ added in v1.0.4
type SuiXSubscribeEventsRequest struct {
// the event query criteria.
SuiEventFilter interface{} `json:"suiEventFilter"`
}
type SuiXSubscribeTransactionsRequest ¶ added in v1.0.4
type SuiXSubscribeTransactionsRequest struct {
// the transaction query criteria.
TransactionFilter interface{} `json:"filter"`
}
type TotalSupplyResponse ¶ added in v1.0.2
type TotalSupplyResponse struct {
Value string `json:"value"`
}
type TransactionDigest ¶ added in v1.0.2
type TransactionDigest string
type TransactionFilter ¶ added in v1.0.2
type TransactionFilter map[string]interface{}
type TransactionFilterByChangedObjectFilter ¶ added in v1.0.4
type TransactionFilterByChangedObjectFilter struct {
// ChangedObject is a filter for changed objects
ChangedObject string `json:"ChangedObject"`
}
TransactionFilterByChangedObjectFilter is a filter for changed objects
type TransactionFilterByFromAddress ¶ added in v1.0.4
type TransactionFilterByFromAddress struct {
FromAddress string `json:"FromAddress"`
}
TransactionFilterByFromAddress is a filter for from address
type TransactionFilterByInputObject ¶ added in v1.0.4
type TransactionFilterByInputObject struct {
// InputObject is the id of the object
InputObject string `json:"InputObject"`
}
TransactionFilterByInputObject is a filter for input objects
type TransactionFilterByMoveFunction ¶ added in v1.0.4
type TransactionFilterByMoveFunction struct {
MoveFunction MoveFunction `json:"MoveFunction"`
}
TransactionFilterByMoveFunction is a filter for move functions
type TransactionFilterByToAddress ¶ added in v1.0.4
type TransactionFilterByToAddress struct {
ToAddress string `json:"ToAddress"`
}
TransactionFilterByToAddress is a filter for to address
type TransferObjectRequest ¶
type TransferObjectRequest struct {
// the transaction signer's Sui address
Signer string `json:"signer"`
ObjectId string `json:"objectId"`
// gas object to be used in this transaction, node will pick one from the signer's possession if not provided
Gas *string `json:"gas"`
// the gas budget, the transaction will fail if the gas cost exceed the budget
GasBudget string `json:"gasBudget"`
Recipient string `json:"recipient"`
}
type TransferSuiRequest ¶
type TransferSuiRequest struct {
// the transaction signer's Sui address
Signer string `json:"signer"`
SuiObjectId string `json:"suiObjectId"`
// the gas budget, the transaction will fail if the gas cost exceed the budget
GasBudget string `json:"gasBudget"`
Recipient string `json:"recipient"`
Amount string `json:"amount"`
}
type TxnMetaData ¶ added in v1.0.2
type TxnMetaData struct {
Gas []sui_types.SuiObjectRef `json:"gas"`
InputObjects []interface{} `json:"inputObjects"`
TxBytes string `json:"txBytes"`
}
func (*TxnMetaData) SignSerializedSigWith ¶ added in v1.0.2
func (txn *TxnMetaData) SignSerializedSigWith(privateKey ed25519.PrivateKey) *SignedTransactionSerializedSig
type ValidatorsApy ¶ added in v1.0.4
type WithdrawStakeRequest ¶ added in v1.0.2
type WithdrawStakeRequest struct {
// the transaction signer's Sui address
Signer string `json:"signer"`
// StakedSui object ID
StakedObjectId string `json:"stakedObjectId"`
// gas object to be used in this transaction, node will pick one from the signer's possession if not provided
Gas *string `json:"gas"`
// the gas budget, the transaction will fail if the gas cost exceed the budget
GasBudget string `json:"gasBudget"`
}