models

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IntentBytes = []byte{0, 0, 0}

Functions

This section is empty.

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 Apy added in v1.0.4

type Apy struct {
	Address string  `json:"address"`
	Apy     float64 `json:"apy"`
}

type BalanceChanges added in v1.0.2

type BalanceChanges struct {
	Owner    ObjectOwner `json:"owner"`
	CoinType string      `json:"coinType"`
	Amount   string      `json:"amount"`
}

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

func (b Bytes) GetHexData() HexData

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 int               `json:"coinObjectCount"`
	TotalBalance    string            `json:"totalBalance"`
	LockedBalance   CoinLockedBalance `json:"lockedBalance"`
}

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 CoinLockedBalance struct {
	EpochId int `json:"epochId"`
	Number  int `json:"number"`
}

type CoinMetadataResponse added in v1.0.2

type CoinMetadataResponse struct {
	Id          string `json:"id"`
	Decimals    int    `json:"decimals"`
	Name        string `json:"name"`
	Symbol      string `json:"symbol"`
	Description string `json:"description"`
	IconUrl     string `json:"iconUrl"`
}

type DelegatedStakeInfo added in v1.0.2

type DelegatedStakeInfo struct {
	StakedSuiId       string `json:"stakedSuiId"`
	StakeRequestEpoch string `json:"stakeRequestEpoch"`
	StakeActiveEpoch  string `json:"stakeActiveEpoch"`
	Principal         string `json:"principal"`
	Status            string `json:"status"`
	EstimatedReward   string `json:"estimatedReward"`
}

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  interface{}            `json:"data,omitempty"`
	Error SuiObjectResponseError `json:"error,omitempty"`
}

type DynamicFieldInfo added in v1.0.2

type DynamicFieldInfo struct {
	Name       string `json:"name"`
	BcsName    string `json:"bcsName"`
	Type       string `json:"type"`
	ObjectType string `json:"objectType"`
	ObjectId   string `json:"objectId"`
	Version    int    `json:"version"`
	Digest     string `json:"digest"`
}

type DynamicFieldName added in v1.0.4

type DynamicFieldName 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 EpochRollingGasCostSummary struct {
	ComputationCost         string `json:"computationCost"`
	StorageCost             string `json:"storageCost"`
	StorageRebate           string `json:"storageRebate"`
	NonRefundableStorageFee string `json:"nonRefundableStorageFee"`
}

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 EventId added in v1.0.2

type EventId struct {
	TxDigest string `json:"txDigest"`
	EventSeq string `json:"eventSeq"`
}

type ExecutionStatus added in v1.0.2

type ExecutionStatus struct {
	Status string `json:"status"`
	Error  string `json:"error,omitempty"`
}

type FaucetCoinInfo added in v1.0.4

type FaucetCoinInfo struct {
	Amount           int    `json:"amount"`
	ID               string `json:"id"`
	TransferTxDigest string `json:"transferTxDigest"`
}

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 GasCostSummary struct {
	ComputationCost         string `json:"computationCost"`
	StorageCost             string `json:"storageCost"`
	StorageRebate           string `json:"storageRebate"`
	NonRefundableStorageFee string `json:"nonRefundableStorageFee"`
}

type GetEventsResponse added in v1.0.2

type GetEventsResponse []*SuiEventResponse

type GetMoveFunctionArgTypesRequest

type GetMoveFunctionArgTypesRequest struct {
	Package  string
	Module   string
	Function string
}

type GetMoveFunctionArgTypesResponse

type GetMoveFunctionArgTypesResponse []interface{}

type GetNormalizedMoveFunctionRequest

type GetNormalizedMoveFunctionRequest struct {
	Package      string `json:"package"`
	ModuleName   string `json:"moduleName"`
	FunctionName string `json:"functionName"`
}

type GetNormalizedMoveModuleRequest

type GetNormalizedMoveModuleRequest struct {
	Package    string `json:"package"`
	ModuleName string `json:"moduleName"`
}

type GetNormalizedMoveModulesByPackageRequest

type GetNormalizedMoveModulesByPackageRequest struct {
	Package string `json:"package"`
}

type GetNormalizedMoveModulesByPackageResponse

type GetNormalizedMoveModulesByPackageResponse map[string]sui_json_rpc_types.SuiMoveNormalizedModule

type GetNormalizedMoveStructRequest

type GetNormalizedMoveStructRequest struct {
	Package    string `json:"package"`
	ModuleName string `json:"moduleName"`
	StructName string `json:"structName"`
}

type GetTransactionMetaData

type GetTransactionMetaData struct {
	GatewayTxSeqNumber uint64 `json:"gatewayTxSeqNumber"`
	TransactionDigest  string `json:"transactionDigest"`
}

type HexData added in v1.0.2

type HexData struct {
	// contains filtered or unexported fields
}

func NewHexData added in v1.0.2

func NewHexData(str string) (*HexData, error)

func (HexData) Data added in v1.0.2

func (a HexData) Data() []byte

type InputObjectKind added in v1.0.2

type InputObjectKind map[string]interface{}

type JsonRPCRequest

type JsonRPCRequest struct {
	JsonRPC string        `json:"jsonrpc"`
	ID      interface{}   `json:"id"`
	Method  string        `json:"method"`
	Params  []interface{} `json:"params"`
}

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 ModifiedAtVersions struct {
	ObjectId       string `json:"objectId"`
	SequenceNumber string `json:"sequenceNumber"`
}

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"`
}

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     []struct {
		Input  int `json:"Input,omitempty"`
		Result int `json:"Result,omitempty"`
	} `json:"arguments"`
}

type MoveEventField added in v1.0.2

type MoveEventField struct {
	Field string `json:"field"`
	Type  string `json:"type"`
	Value string `json:"value"`
}

type MoveEventModule added in v1.0.4

type MoveEventModule struct {
	Package string `json:"package"`
	Module  string `json:"module"`
	Event   string `json:"event"`
}

type MoveFunction added in v1.0.4

type MoveFunction struct {
	Package  string  `json:"package"`
	Module   *string `json:"module"`
	Function *string `json:"function"`
}

type MoveModule added in v1.0.2

type MoveModule struct {
	Package string `json:"package"`
	Module  string `json:"module"`
}

type ObjectChange added in v1.0.2

type ObjectChange struct {
	Type            string      `json:"type"`
	Sender          string      `json:"sender"`
	Owner           ObjectOwner `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"`
}

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 ObjectId added in v1.0.2

type ObjectId = HexData

type ObjectOwner added in v1.0.2

type ObjectOwner struct {
	// the owner's Sui address
	AddressOwner string      `json:"AddressOwner"`
	ObjectOwner  string      `json:"ObjectOwner"`
	Shared       ObjectShare `json:"Shared"`
}

type ObjectRef added in v1.0.2

type ObjectRef struct {
	Digest   string   `json:"digest"`
	ObjectId ObjectId `json:"objectId"`
	Version  int64    `json:"version"`
}

type ObjectShare added in v1.0.2

type ObjectShare struct {
	InitialSharedVersion int `json:"initial_shared_version"`
}

type OwnedObjectRef added in v1.0.2

type OwnedObjectRef struct {
	Owner     interface{}  `json:"owner"`
	Reference SuiObjectRef `json:"reference"`
}

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 PaginatedCoinsResponse struct {
	Data        []CoinData `json:"data"`
	NextCursor  string     `json:"nextCursor"`
	HasNextPage bool       `json:"hasNextPage"`
}

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 PaginatedEpochInfoResponse struct {
	Data        []EpochInfo `json:"data"`
	NextCursor  string      `json:"nextCursor"`
	HasNextPage bool        `json:"hasNextPage"`
}

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 PastObject struct {
	// the ID of the queried object
	ObjectId string `json:"objectId"`
	// the version of the queried object
	Version string `json:"version"`
}

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 PayAllSuiRequest struct {
	// the transaction signer's Sui address
	Signer      string   `json:"signer"`
	SuiObjectId []string `json:"suiObjectId"`
	Recipient   string   `json:"recipient"`
	// the gas budget, the transaction will fail if the gas cost exceed the budget
	GasBudget string `json:"gasBudget"`
}

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 []SuiTransaction `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 SigFlag added in v1.0.2

type SigFlag byte
const (
	SigFlagEd25519   SigFlag = 0x00
	SigFlagSecp256k1 SigFlag = 0x01
)

type SigScheme added in v1.0.2

type SigScheme string
const (
	SigEd25519   SigScheme = "ED25519"
	SigSecp256k1 SigScheme = "Secp256k1"
)

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 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 SignedTransactionSerializedSig struct {
	// transaction data bytes
	TxBytes string `json:"tx_bytes"`

	// transaction signature
	Signature string `json:"signature"`
}

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 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"`
	// The epoch to perform the call. Will be set from the system state object if not provided
	Epoch string `json:"epoch"`
}

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"`
	SharedObjects      []SuiObjectRef       `json:"sharedObjects"`
	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 SuiKeyPair struct {
	Flag    byte
	Address string

	PublicKey       []byte
	PublicKeyBase64 string

	PrivateKey []byte
}

type SuiLoadedChildObject added in v1.0.2

type SuiLoadedChildObject struct {
	ObjectID       string `json:"objectId"`
	SequenceNumber string `json:"sequenceNumber"`
}

type SuiMoveModuleId

type SuiMoveModuleId struct {
	Address string
	Name    string
}

type SuiMoveNormalizedModule

type SuiMoveNormalizedModule struct {
	FileFormatVersion uint64
	Address           string
	Name              string
	Friends           []SuiMoveModuleId
}

type SuiMoveObject

type SuiMoveObject struct {
	Type              string
	Fields            map[string]interface{}
	HasPublicTransfer bool
}

type SuiMovePackage added in v1.0.2

type SuiMovePackage struct {
	Disassembled string `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 SuiObjectChangeCreated struct {
	Type       string      `json:"type"`
	Sender     string      `json:"sender"`
	Owner      ObjectOwner `json:"owner"`
	ObjectType string      `json:"objectType"`
	ObjectId   string      `json:"objectId"`
	Version    int         `json:"version"`
	Digest     string      `json:"digest"`
}

type SuiObjectChangeDeleted added in v1.0.2

type SuiObjectChangeDeleted struct {
	Type       string `json:"type"`
	Sender     string `json:"sender"`
	ObjectType string `json:"objectType"`
	ObjectId   string `json:"objectId"`
	Version    int    `json:"version"`
}

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         int         `json:"version"`
	PreviousVersion int         `json:"previousVersion"`
	Digest          string      `json:"digest"`
}

type SuiObjectChangePublished added in v1.0.2

type SuiObjectChangePublished struct {
	Type      string   `json:"type"`
	PackageId string   `json:"packageId"`
	Version   int      `json:"version"`
	Digest    string   `json:"digest"`
	Modules   []string `json:"modules"`
}

type SuiObjectChangeTransferred added in v1.0.2

type SuiObjectChangeTransferred struct {
	Type       string      `json:"type"`
	Sender     string      `json:"sender"`
	Recipient  ObjectOwner `json:"recipient"`
	ObjectType string      `json:"objectType"`
	ObjectId   string      `json:"objectId"`
	Version    int         `json:"version"`
	Digest     string      `json:"digest"`
}

type SuiObjectChangeWrapped added in v1.0.2

type SuiObjectChangeWrapped struct {
	Type       string `json:"type"`
	Sender     string `json:"sender"`
	ObjectType string `json:"objectType"`
	ObjectId   string `json:"objectId"`
	Version    int    `json:"version"`
}

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"`
	Display             DisplayFieldsResponse `json:"display"`
	Content             SuiParsedData         `json:"content"`
	Bcs                 SuiRawData            `json:"bcs"`
}

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 SuiObjectInfo struct {
	sui_types.SuiObjectRef
	Type string `json:"type_"`
	sui_types.Owner
	PreviousTransaction string `json:"previousTransaction"`
}

type SuiObjectRef added in v1.0.2

type SuiObjectRef struct {
	ObjectId string `json:"objectId"`
	Version  int    `json:"version"`
	Digest   string `json:"digest"`
}

type SuiObjectResponse added in v1.0.2

type SuiObjectResponse struct {
	Data  SuiObjectData          `json:"data"`
	Error SuiObjectResponseError `json:"error"`
}

type SuiObjectResponseError added in v1.0.2

type SuiObjectResponseError struct {
	Code     string `json:"code"`
	Error    string `json:"error"`
	ObjectId string `json:"object_id"`
	Version  int    `json:"version"`
	Digest   string `json:"digest"`
}

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 SuiRawMoveObject struct {
	Type              string `json:"type"`
	HasPublicTransfer bool   `json:"hasPublicTransfer"`
	Version           int    `json:"version"`
	BcsBytes          string `json:"bcsBytes"`
}

type SuiRawMovePackage added in v1.0.2

type SuiRawMovePackage struct {
	Id        string `json:"id,omitempty"`
	ModuleMap string `json:"moduleMap,omitempty"`
}

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                      []string              `json:"atRiskValidators"`
	ValidatorReportRecords                [][]interface{}       `json:"validatorReportRecords"`
}

type SuiTransaction added in v1.0.2

type SuiTransaction 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 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 []SuiTransaction `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"`
}

type SuiTransactionBlockResponseQuery added in v1.0.2

type SuiTransactionBlockResponseQuery struct {
	TransactionFilter TransactionFilter          `json:"filter"`
	Options           SuiTransactionBlockOptions `json:"options"`
}

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 SuiXGetAllCoinsRequest struct {
	// the owner's Sui address
	Owner string `json:"owner"`
	// optional paging cursor
	Cursor interface{} `json:"cursor"`
	// maximum number of items per page
	Limit uint64 `json:"limit" validate:"lte=50"`
}

type SuiXGetBalanceRequest added in v1.0.2

type SuiXGetBalanceRequest 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:"coinType"`
}

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 SuiXGetCommitteeInfoResponse struct {
	Epoch      string     `json:"epoch"`
	Validators [][]string `json:"validators"`
}

type SuiXGetDynamicFieldObjectRequest added in v1.0.2

type SuiXGetDynamicFieldObjectRequest struct {
	ObjectId         string           `json:"objectId"`
	DynamicFieldName DynamicFieldName `json:"dynamicFieldName"`
}

type SuiXGetDynamicFieldRequest added in v1.0.2

type SuiXGetDynamicFieldRequest struct {
	ObjectId string `json:"objectId"`
	// optional paging cursor
	Cursor interface{} `json:"cursor"`
	// maximum number of items per page
	Limit uint64 `json:"limit" validate:"lte=50"`
}

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 SuiXResolveNameServiceNamesRequest struct {
	Address string `json:"address"`
	// optional paging cursor
	Cursor interface{} `json:"cursor"`
	// maximum number of items per page
	Limit uint64 `json:"limit" validate:"lte=50"`
}

type SuiXResolveNameServiceNamesResponse added in v1.0.4

type SuiXResolveNameServiceNamesResponse struct {
	Data        []string `json:"data"`
	NextCursor  string   `json:"nextCursor"`
	HasNextPage bool     `json:"hasNextPage"`
}

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 TimeRange added in v1.0.2

type TimeRange struct {
	StartTime uint64 `json:"start_time"`
	EndTime   uint64 `json:"end_time"`
}

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 ValidatorsApy struct {
	Apys  []Apy  `json:"apys"`
	Epoch string `json:"epoch"`
}

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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL