models

package
v1.0.52 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type AddStakeRequest

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

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

type BalanceChanges

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

type Base64Data

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

func NewBase64Data

func NewBase64Data(str string) (*Base64Data, error)

func (Base64Data) Data

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

type Bytes []byte

func (Bytes) GetBase64Data

func (b Bytes) GetBase64Data() Base64Data

func (Bytes) GetHexData

func (b Bytes) GetHexData() HexData

type CheckpointResponse

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

type ChildObjectsResponse struct {
	LoadedChildObjects []*SuiLoadedChildObject `json:"loadedChildObjects"`
}

type CoinAllBalanceResponse

type CoinAllBalanceResponse []CoinBalanceResponse

type CoinBalanceResponse

type CoinBalanceResponse struct {
	CoinType        string            `json:"coinType"`
	CoinObjectCount int               `json:"coinObjectCount"`
	TotalBalance    string            `json:"totalBalance"`
	LockedBalance   CoinLockedBalance `json:"lockedBalance"`
}

type CoinData

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

type CoinLockedBalance struct {
	EpochId int `json:"epochId"`
	Number  int `json:"number"`
}

type CoinMetadataResponse

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

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

type DelegatedStakesResponse struct {
	ValidatorAddress string               `json:"validatorAddress"`
	StakingPool      string               `json:"stakingPool"`
	Stakes           []DelegatedStakeInfo `json:"stakes"`
}

type Digest

type Digest = Base64Data

type Display

type Display interface {
	Name() string
	Description() string
	Link() string
	ImageURL() string
	ThumbnailURL() string
	ProjectURL() string
	Creator() string
}

type DisplayFieldsResponse

type DisplayFieldsResponse struct {
	Data  any                     `json:"data"`
	Error *SuiObjectResponseError `json:"error"`
}

func (DisplayFieldsResponse) Creator

func (display DisplayFieldsResponse) Creator() string

func (DisplayFieldsResponse) Description

func (display DisplayFieldsResponse) Description() string

func (DisplayFieldsResponse) ImageURL

func (display DisplayFieldsResponse) ImageURL() string
func (display DisplayFieldsResponse) Link() string

func (DisplayFieldsResponse) Name

func (display DisplayFieldsResponse) Name() string

func (DisplayFieldsResponse) ProjectURL

func (display DisplayFieldsResponse) ProjectURL() string

func (DisplayFieldsResponse) ThumbnailURL

func (display DisplayFieldsResponse) ThumbnailURL() string

type DynamicFieldInfo

type DynamicFieldInfo struct {
	Name       DynamicFieldName `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

type DynamicFieldName struct {
	Type  string          `json:"type"`
	Value json.RawMessage `json:"value"`
}

func (DynamicFieldName) Field

func (v DynamicFieldName) Field(field string) gjson.Result

type DynamicFieldObjectName

type DynamicFieldObjectName struct {
	Type  string      `json:"type"`
	Value interface{} `json:"value"`
}

type EndOfEpochInfo

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

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

type EpochRollingGasCostSummary struct {
	ComputationCost         string `json:"computationCost"`
	StorageCost             string `json:"storageCost"`
	StorageRebate           string `json:"storageRebate"`
	NonRefundableStorageFee string `json:"nonRefundableStorageFee"`
}

type EventFilterByMoveEventField

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

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

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

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

type EventFilterByPackage struct {
	Package string `json:"Package"`
}

the event query by `Package`: Move package ID JSON-RPC Parameter Example: {"Package":"<PACKAGE-ID>"}

type EventFilterBySenderAddress

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

type EventFilterBySuiAddress struct {
	Sender string `json:"Sender"`
}

the event query by `Sender`: Filter Sender address JSON-RPC Parameter Example: {"Sender":"0x008e9c621f4fdb210b873aab59a1e5bf32ddb1d33ee85eb069b348c234465106"}

type EventFilterByTimeRange

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

type EventFilterByTransaction struct {
	Transaction string `json:"Transaction"`
}

the event query by `Transaction`: Filter Transaction hash JSON-RPC Parameter Example: {"Transaction":"ENmjG42TE4GyqYb1fGNwJe7oxBbbXWCdNfRiQhCNLBJQ"}

type EventId

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

type ExecutionMode

type ExecutionMode string
const (
	TransactionExecutionCommit     ExecutionMode = "Commit"
	TransactionExecutionDevInspect ExecutionMode = "DevInspect"
)

type ExecutionStatus

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

type FaucetCoinInfo

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

type FaucetFixedAmountRequest

type FaucetFixedAmountRequest struct {
	Recipient string `json:"recipient"`
}

type FaucetRequest

type FaucetRequest struct {
	FixedAmountRequest *FaucetFixedAmountRequest `json:"FixedAmountRequest"`
}

type GasCostSummary

type GasCostSummary struct {
	ComputationCost         string `json:"computationCost"`
	StorageCost             string `json:"storageCost"`
	StorageRebate           string `json:"storageRebate"`
	NonRefundableStorageFee string `json:"nonRefundableStorageFee"`
}

type GetEventsResponse

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

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

func NewHexData

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

func (HexData) Data

func (a HexData) Data() []byte

type InputObjectKind

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

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

	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

type MoveCallSuiTransaction struct {
	Package       string        `json:"package"`
	Module        string        `json:"module"`
	Function      string        `json:"function"`
	TypeArguments []string      `json:"type_arguments"`
	Arguments     []interface{} `json:"arguments"`
}

type MoveEventField

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

type MoveEventModule

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

type MoveFunction

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

type MoveModule

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

type ObjectChange

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

type ObjectFilterByAddressOwner struct {
	AddressOwner string `json:"AddressOwner"`
}

type ObjectFilterByObjectId

type ObjectFilterByObjectId struct {
	ObjectId string `json:"ObjectId"`
}

type ObjectFilterByObjectIds

type ObjectFilterByObjectIds struct {
	ObjectIds []string `json:"ObjectIds"`
}

type ObjectFilterByObjectOwner

type ObjectFilterByObjectOwner struct {
	ObjectOwner string `json:"ObjectOwner"`
}

type ObjectFilterByPackage

type ObjectFilterByPackage struct {
	Package string `json:"Package"`
}

type ObjectFilterByStructType

type ObjectFilterByStructType struct {
	StructType string `json:"StructType"`
}

type ObjectFilterByVersion

type ObjectFilterByVersion struct {
	Version string `json:"Version"`
}

type ObjectId

type ObjectId = HexData

type ObjectOwner

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

type ObjectRef

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

type ObjectShare

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

type OwnedObjectRef

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

type PaginatedCheckpointsResponse

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

type PaginatedCoinsResponse

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

type PaginatedDynamicFieldInfoResponse

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

type PaginatedEpochInfoResponse

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

type PaginatedEventsResponse

type PaginatedEventsResponse struct {
	Data        []SuiEventResponse `json:"data"`
	NextCursor  EventId            `json:"nextCursor"`
	HasNextPage bool               `json:"hasNextPage"`
}

type PaginatedObjectsResponse

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

type PastObject

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

type PastObjectResponse struct {
	Status  string      `json:"status"`
	Details interface{} `json:"details"`
}

type PayAllSuiRequest

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

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

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

type ProgrammableTransaction struct {
	Transactions []SuiTransaction `json:"transactions"`
	Inputs       []SuiCallArg     `json:"inputs"`
}

type ProtocolConfigResponse

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

type RPCTransactionRequestParams struct {
	MoveCallRequestParams       *MoveCallRequest       `json:"moveCallRequestParams,omitempty"`
	TransferObjectRequestParams *TransferObjectRequest `json:"transferObjectRequestParams,omitempty"`
}

type SigFlag

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

type SigScheme

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

type SignAndExecuteTransactionBlockRequest

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

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

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

type SuiAddress string

type SuiArgument

type SuiArgument map[string]interface{}

type SuiCallArg

type SuiCallArg map[string]interface{}

type SuiDevInspectTransactionBlockRequest

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

type SuiDryRunTransactionBlockRequest struct {
	TxBytes string `json:"txBytes"`
}

type SuiEffects

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

type SuiEventFilter map[string]interface{}

type SuiEventResponse

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

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

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

type SuiGetCheckpointRequest struct {
	CheckpointID string `json:"id"`
}

type SuiGetCheckpointsRequest

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

type SuiGetEventsRequest struct {
	Digest string `json:"digest"`
}

type SuiGetLoadedChildObjectsRequest

type SuiGetLoadedChildObjectsRequest struct {
	Digest string `json:"digest"`
}

type SuiGetObjectRequest

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

type SuiGetProtocolConfigRequest struct {
	Version string `json:"version"`
}

type SuiGetTransactionBlockRequest

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

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

type SuiMoveModuleId

type SuiMoveModuleId struct {
	Address string `json:"address"`
	Name    string `json:"name"`
}

type SuiMoveNormalizedModule

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

type SuiMoveObject

type SuiMoveObject struct {
	Type              string                 `json:"type"`
	Fields            map[string]interface{} `json:"fields"`
	HasPublicTransfer bool                   `json:"hasPublicTransfer"`
}

type SuiMovePackage

type SuiMovePackage struct {
	Disassembled string `json:"disassembled"`
}

type SuiMultiGetObjectsRequest

type SuiMultiGetObjectsRequest struct {
	ObjectIds []string             `json:"objectIds"`
	Options   SuiObjectDataOptions `json:"options"`
}

type SuiMultiGetTransactionBlocksRequest

type SuiMultiGetTransactionBlocksRequest struct {
	Digests []string                   `json:"digests"`
	Options SuiTransactionBlockOptions `json:"options"`
}

type SuiMultiGetTransactionBlocksResponse

type SuiMultiGetTransactionBlocksResponse []*SuiTransactionBlockResponse

type SuiObjectChangeCreated

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

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

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

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

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

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

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

type SuiObjectDataFilter

type SuiObjectDataFilter map[string]interface{}

type SuiObjectDataOptions

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

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

type SuiObjectResponse

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

type SuiObjectResponseError

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

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

type SuiParsedData struct {
	DataType string `json:"dataType"`
	SuiMoveObject
	SuiMovePackage
}

type SuiRawData

type SuiRawData struct {
	DataType string `json:"dataType"`
	SuiRawMoveObject
	SuiRawMovePackage
}

type SuiRawMoveObject

type SuiRawMoveObject struct {
	Type              string `json:"type"`
	HasPublicTransfer bool   `json:"hasPublicTransfer"`
	Version           int    `json:"version"`
	BcsBytes          string `json:"bcsBytes"`
}

type SuiRawMovePackage

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

type SuiSystemStateSummary

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

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

type SuiTransactionBlock struct {
	Data         SuiTransactionBlockData `json:"data"`
	TxSignatures []string                `json:"txSignatures"`
}

type SuiTransactionBlockData

type SuiTransactionBlockData struct {
	MessageVersion string                  `json:"messageVersion"`
	Transaction    SuiTransactionBlockKind `json:"transaction"`
	Sender         string                  `json:"sender"`
	GasData        SuiGasData              `json:"gasData"`
}

type SuiTransactionBlockKind

type SuiTransactionBlockKind struct {
	Kind         string           `json:"kind"`
	Inputs       []SuiCallArg     `json:"inputs"`
	Transactions []SuiTransaction `json:"transactions"`
}

type SuiTransactionBlockOptions

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

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

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

type SuiTryGetPastObjectRequest

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

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

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

type SuiXGetAllBalanceRequest struct {
	// the owner's Sui address
	Owner string `json:"owner"`
}

type SuiXGetAllCoinsRequest

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

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

type SuiXGetCoinMetadataRequest struct {
	// type name for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)
	CoinType string `json:"coinType"`
}

type SuiXGetCoinsRequest

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

type SuiXGetCommitteeInfoRequest struct {
	Epoch string `json:"epoch"`
}

type SuiXGetCommitteeInfoResponse

type SuiXGetCommitteeInfoResponse struct {
	Epoch      string     `json:"epoch"`
	Validators [][]string `json:"validators"`
}

type SuiXGetDynamicFieldObjectRequest

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

type SuiXGetDynamicFieldRequest

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

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

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

type SuiXGetStakesByIdsRequest struct {
	StakedSuiIds []string `json:"stakedSuiIds"`
}

type SuiXGetStakesRequest

type SuiXGetStakesRequest struct {
	Owner string `json:"owner"`
}

type SuiXGetTotalSupplyRequest

type SuiXGetTotalSupplyRequest struct {
	// type name for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)
	CoinType string `json:"coinType"`
}

type SuiXQueryEventsRequest

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

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

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

type SuiXResolveNameServiceAddressRequest

type SuiXResolveNameServiceAddressRequest struct {
	Name string `json:"name"`
}

type SuiXResolveNameServiceNamesRequest

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

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

type SuiXSubscribeEventsRequest

type SuiXSubscribeEventsRequest struct {
	// the event query criteria.
	SuiEventFilter interface{} `json:"suiEventFilter"`
}

type SuiXSubscribeTransactionsRequest

type SuiXSubscribeTransactionsRequest struct {
	// the transaction query criteria.
	TransactionFilter interface{} `json:"filter"`
}

type TimeRange

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

type TotalSupplyResponse

type TotalSupplyResponse struct {
	Value string `json:"value"`
}

type TransactionDigest

type TransactionDigest string

type TransactionFilter

type TransactionFilter map[string]interface{}

type TransactionFilterByChangedObjectFilter

type TransactionFilterByChangedObjectFilter struct {
	// ChangedObject is a filter for changed objects
	ChangedObject string `json:"ChangedObject"`
}

TransactionFilterByChangedObjectFilter is a filter for changed objects

type TransactionFilterByFromAddress

type TransactionFilterByFromAddress struct {
	FromAddress string `json:"FromAddress"`
}

TransactionFilterByFromAddress is a filter for from address

type TransactionFilterByInputObject

type TransactionFilterByInputObject struct {
	// InputObject is the id of the object
	InputObject string `json:"InputObject"`
}

TransactionFilterByInputObject is a filter for input objects

type TransactionFilterByMoveFunction

type TransactionFilterByMoveFunction struct {
	MoveFunction MoveFunction `json:"MoveFunction"`
}

TransactionFilterByMoveFunction is a filter for move functions

type TransactionFilterByToAddress

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

type TxnMetaData struct {
	Gas          []sui_types.SuiObjectRef `json:"gas"`
	InputObjects []interface{}            `json:"inputObjects"`
	TxBytes      string                   `json:"txBytes"`
}

func (*TxnMetaData) SignSerializedSigWith

func (txn *TxnMetaData) SignSerializedSigWith(privateKey ed25519.PrivateKey) *SignedTransactionSerializedSig

type ValidatorsApy

type ValidatorsApy struct {
	Apys  []Apy  `json:"apys"`
	Epoch string `json:"epoch"`
}

type WithdrawStakeRequest

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