Available methods on Shinami's JSON-RPC API to send requests to Shinami’s enhanced Sui nodes
Reading Event Data from Sui
sui_getEvents
Description
Return transaction events.
Params
transaction_digest
:<TransactionDigest>
- the event query criteria
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getEvents", "params":["{{transaction_digest}}"], "id":1}'
Result
Vec<SuiEvent>
: <[Event]>
suix_queryEvents
Description
Return a list of events for a specified query criteria.
Params
query
:<EventQuery>
- the event query criteriacursor
:<EventID>
- optional paging cursorlimit
:<uint>
- maximum number of items per page; default to maximum limit of 1000 if not specifieddescending_order
:<boolean>
- query result ordering; default to false (ascending order), oldest record first
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"suix_queryEvents",
"params":["{{query}}",
"{{cursor}}",
{{limit}},
{{descending_order}}],
"id":1}'
Result
EventPage
: <Page_for_Event_and_EventID>
Event Query | Description | Parameter Example |
---|---|---|
Transaction | Events emitted from the specified transaction | {"Transaction":"<TransactionBlock>"} |
MoveModule | Events emitted from the specified Move module | {"MoveModule":{"package":"", "module":"nft"}} |
MoveEvent | Move struct name of the event | {"MoveEvent":"::nft::MintNFTEvent"} |
EventType | Type of event described in this Events section | {"EventType": "NewObject"} |
Sender | Query by sender address | {"Sender": "<SuiAddress>"} |
Recipient | Query by recipient | {"Recipient":{"AddressOwner":"<SuiAddress>"}} |
Object | Return events associated with the given object | {"Object":"<ObjectID>"} |
TimeRange | Return events emitted within a time range | {"TimeRange":{"startTime":1669039504014, "endTime":1669039604014}} |
Reading Move Data from Sui
sui_getMoveFunctionArgTypes
Description
Return the argument types of a Move function based on normalized type.
Params
package
:<ObjectID>
- the Move package ID, e.g. '0x2'module
:<string>
- the Move module name, e.g. 'devnet_nft'function
:<string>
- the Move function name, e.g. 'mint'
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_getMoveFunctionArgTypes",
"params":["{{package}}",
"{{module}}",
"{{function}}"],
"id":1}'
Result
Vec<MoveFunctionArgType>
: <[MoveFunctionArgType]>
sui_getNormalizedMoveModulesByPackage
Description
Return the structured representations of all modules in the given package.
Params
package
:<ObjectID>
- the Move package ID, e.g. '0x2'
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getNormalizedMoveModulesByPackage", "params":["{{package}}"], "id":1}'
Result
BTreeMap<String,SuiMoveNormalizedModule>
: <object>
sui_getNormalizedMoveModule
Description
Return a structured representation of a Move module.
Params
package
:<ObjectID>
- the Move package ID, e.g. '0x2'module_name
:<string>
- the Move module name, e.g. 'devnet_nft'
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_getNormalizedMoveModule",
"params":["{{package}}",
"{{module_name}}",
"id":1}'
Result
<SuiMoveNormalizedModule>
:<[SuiMoveNormalizedModule]>
- address :
<string>
- exposed_functions :
<object>
- file_format_version :
<uint32>
- friends :
<[SuiMoveModuleId]>
- name :
<string>
- structs :
<object>
sui_getNormalizedMoveStruct
Description
Return a structured representation of a Move struct.
Params
package
:<ObjectID>
- the Move package ID, e.g. '0x2'module_name
:<string>
- the Move module name, e.g. 'devnet_nft'struct_name
:<string>
- the struct name
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_getNormalizedMoveStruct",
"params":["{{package}}",
"{{module_name}}",
"{{struct_name}}"],
"id":1}'
Result
<SuiMoveNormalizedStruct>
:<[SuiMoveNormalizedStruct]>
- abilities :
<SuiMoveAbilitySet>
- fields :
<[SuiMoveNormalizedField]>
- type_parameters :
<[SuiMoveStructTypeParameter]>
sui_getNormalizedMoveFunction
Description
Return a structured representation of a Move function.
Params
package
:<ObjectID>
- the Move package ID, e.g. '0x2'module_name
:<string>
- the Move module name, e.g. 'devnet_nft'function_name
:<string>
- the Move function name, e.g.mint
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_getNormalizedMoveFunction",
"params":["{{package}}",
"{{module_name}}",
"{{function_name}}"],
"id":1}'
Result
<SuiMoveNormalizedFunction>
:<[SuiMoveNormalizedFunction]>
- is_entry :
<boolean>
- parameters :
<[SuiMoveNormalizedType]>
- return :
<[SuiMoveNormalizedType]>
- type_parameters :
<[SuiMoveAbilitySet]>
- visibility :
<SuiMoveVisibility>
Reading Object Data from Sui
sui_getObject
Description
Return the object information for a specified object.
Params
object_id
:<ObjectID>
- the ID of the queried objectoptions
:<ObjectDataOptions>
- Optional. Sui options for specifying the object content to be returned
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_getObject",
"params":["{{object_id}}",
"showType": true,
"showOwner": true,
"showPreviousTransaction": true,
"showDisplay": false,
"showContent": true,
"showBcs": false,
"showStorageRebate": true],
"id":1}'
Result
SuiObjectResponse
:<SuiObjectResponse>
- data :
<[ObjectData]>
- error :
<[ObjectResponseError]>
sui_multiGetObjects
Description
Return the object data for a list of objects
Params
object_ids
:<ObjectID>
- the IDs of the queried objectsoptions
:<ObjectDataOptions>
- Optional. Sui options for specifying the object content to be returned
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_multiGetObjects",
"params":["{{object_ids}}",
"showType": true,
"showOwner": true,
"showPreviousTransaction": true,
"showDisplay": false,
"showContent": true,
"showBcs": false,
"showStorageRebate": true],
"id":1}'
Result
Vec<SuiObjectResponse>
: <[SuiObjectResponse]>
sui_tryGetPastObject
Description
Return the object information for a specified version. There is no guarantee that objects with past versions can be retrieved by this API. The result may vary across nodes depending on their pruning policies.
Params
object_id
:<ObjectID>
- the ID of the queried objectversion
:<SequenceNumber>
- the version of the queried object. If None, default to the latest known versionoptions
:<ObjectDataOptions>
- Optional. Sui options for specifying the object content to be returned
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_tryGetPastObject",
"params":["{{object_id}}",
{{version}},
"showType": true,
"showOwner": true,
"showPreviousTransaction": true,
"showDisplay": false,
"showContent": true,
"showBcs": false,
"showStorageRebate": true],
"id":1}'
Result
SuiPastObjectResponse
: <ObjectRead>
sui_multitryGetPastObject
Description
Return object information for a vector of objects and versions. There is no guarantee that objects with past versions can be retrieved by this API. The result may vary across nodes depending on their pruning policies.
Params
past_objects
:<[GetPastObjectRequest]>
- a vector of objects and versions to be queriedoptions
:<ObjectDataOptions>
- Optional. Sui options for specifying the object content to be returned
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_multitryGetPastObject",
"params":["{{past_objects}}",
"showType": true,
"showOwner": true,
"showPreviousTransaction": true,
"showDisplay": false,
"showContent": true,
"showBcs": false,
"showStorageRebate": true],
"id":1}'
Result
Vec<SuiPastObjectResponse>
: <[ObjectRead]>
suix_getDynamicFieldObject
Description
Return the dynamic field object information for a specified object.
Params
parent_object_id
:<ObjectID>
- the ID of the queried parent objectname
:<DynamicFieldName>
- the Name of the dynamic field
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"suix_tryGetPastObject",
"params":["{{parent_object_id}}",
"{{name}}",
"id":1}'
Result
SuiObjectResponse
:<SuiObjectResponse>
- data :
<[ObjectData]>
- error :
<[ObjectResponseError]>
suix_getDynamicFields
Description
Return the list of dynamic field objects owned by an object.
Params
parent_object_id
:<ObjectID>
- the ID of the queried parent objectcursor
:<ObjectID>
- optional paging cursorlimit
:<uint>
- maximum item returned per page, default to [QUERY_MAX_RESULT_LIMIT] if not specified.
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"suix_getDynamicFields",
"params":["{{parent_object_id}}",
"{{cursor}}",
{{limit}}],
"id":1}'
Result
DynamicFieldPage
: <Page_for_DynamicFieldInfo_and_ObjectID>
sui_getLoadedChildObjects
Description
Return loaded child objects for specified transaction digest
Params
digest
:<TransactionDigest>
- the digest of the queried transaction
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getLoadedChildObjects", "params":["{{digest}}"], "id":1}'
Result
SuiLoadedChildObjectsResponse
: <LoadedChildObjectsResponse>
suix_getOwnedObjects
Description
Return the list of objects owned by an address.
Params
address
:<SuiAddress>
- the owner's Sui addressquery
:<ObjectResponseQuery>
- the object query criteriacursor
:<CheckpointedObjectID>
- optional paging cursor. If provided, the query will start from the next item after the specified cursor. Default to start from the first item if not specified.limit
:<uint>
- maximum number of items per page; default to maximum limit if not specified
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"suix_getOwnedObjects",
"params":["{{address}}",
"{{query}}",
"{{cursor}}",
{{limit}}],
"id":1}'
Result
ObjectsPage
: <Page_for_SuiObjectResponse_and_ObjectID>
Reading Coin Data from Sui
suix_getBalance
Description
Return the total Coin balance for each coin type owned by an address.
Params
owner
:<SuiAddress>
- the owner's Sui addresscoin_type
:<string>
- fully qualified type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"suix_getbalance",
"params":["{{owner}}",
"{{coin_type}}",
"id":1}'
Result
Balance
:<Balance>
- coinObjectCount :
<uint>
- coinType :
<string>
- lockedBalance :
<object>
- totalBalance :
<BigInt_for_uint128>
suix_getAllBalances
Description
Return all Coin balances owned by an address.
Params
owner
:<SuiAddress>
- the owner's Sui address
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getAllBalances", "params":["{{owner}}"], "id":1}'
Result
Vec<Balance>
: <[Balance]>
suix_getCoins
Description
Return a list of Coin objects by type owned by an address.
Params
owner
:<SuiAddress>
- the owner's Sui addresscoin_type
:<string>
- fully qualified type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)cursor
:<ObjectID>
- optional paging cursorlimit
:<uint>
- maximum number of items per page
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"suix_getCoins",
"params":["{{owner}}",
"{{coin_type}}",
"{{cursor}}",
{{limit}}],
"id":1}'
Result
CoinPage
: <Page_for_Coin_and_ObjectID>
suix_getAllCoins
Description
Return all Coin objects owned by an address.
Params
owner
:<SuiAddress>
- the owner's Sui addresscursor
:<ObjectID>
- optional paging cursorlimit
:<uint>
- maximum number of items per page
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"suix_getAllCoins",
"params":["{{owner}}",
"{{cursor}}",
{{limit}}],
"id":1}'
Result
CoinPage
: <Page_for_Coin_and_ObjectID>
suix_getCoinMetadata
Description
Return metadata(e.g., symbol, decimals) for a coin.
Params
coin_type
:<string>
- fully qualified type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getCoinMetadata", "params":["{{coin_type}}"], "id":1}'
Result
SuiCoinMetadata
:<SuiCoinMetadata>
- decimals :
<uint8>
- Number of decimal places the coin uses - description :
<string>
- Description of the token - iconUrl :
<string,null>
- URL for the token logo - id :
<[ObjectID]>
- Object id for the CoinMetadata object - name :
<string>
- Name for the token - symbol :
<string>
- Symbol for the token
suix_getTotalSupply
Description
Return total supply for a coin.
Params
coin_type
:<string>
- fully qualified type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC)
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getTotalSupply", "params":["{{coin_type}}"], "id":1}'
Result
Supply
:<Supply>
- value :
<BigInt_for_uint64>
Reading Name Service Data from Sui
suix_resolveNameServiceAddress
Description
Return the resolved address given resolver and name.
Params
name
:<string>
- the name to resolve
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_resolveNameServiceAddress", "params":["{{name}}"], "id":1}'
Result
SuiAddress
:<SuiAddress>
suix_resolveNameServiceNames
Description
Return the resolved names given address, if multiple names are resolved, the first one is the primary name.
Params
address
:<SuiAddress>
- the address to resolvecursor
:<ObjectID>
limit
:<uint>
- maximum number of items per page
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"suix_resolveNameServiceNames",
"params":["{{address}}",
"{{cursor}}",
{{limit}}],
"id":1}'
Result
Page<String,ObjectID>
:<Page_for_String_and_ObjectID>
Reading System Data from Sui
suix_getReferenceGasPrice
Description
Return the reference gas price for the network
Params
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getReferenceGasPrice", "params":[], "id":1}'
Result
BigInt<u64>
:<BigInt_for_uint64>
suix_getCommitteeInfo
Description
Return the committee information for the epoch of interest.
Params
epoch
:<BigInt_for_uint64>
- the epoch of interest. If None, default to the latest epoch
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getCommitteeInfo", "params":[{{epoch}}], "id":1}'
Result
SuiCommittee
:<CommitteeInfo>
sui_getProtocolConfig
Description
Return the protocol config table for the given version number. If the version number is not specified, If none is specified, the node uses the version of the latest epoch it has processed.
Params
version
:<BigInt_for_uint64>
- optional protocol version specifier
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getStakes", "params":[{{version}}], "id":1}'
Result
ProtocolConfigResponse
:<ProtocolConfig>
suix_getStakes
Description
Return all delegated stake.
Params
owner
:<SuiAddress>
- the owner's Sui address
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getStakes", "params":["{{owner}}"], "id":1}'
Result
Vec<DelegatedStake>
:<[DelegatedStake]>
suix_getStakesByIds
Description
Return one or more delegated stake. If a Stake was withdrawn, its status will be Unstaked.
Params
staked_sui_ids
:<[ObjectID]>
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getStakesByIds", "params":["{{staked_sui_ids}}"], "id":1}'
Result
Vec<DelegatedStake>
:<[DelegatedStake]>
sui_getLatestCheckpointSequenceNumber
Description
Return the sequence number of the latest checkpoint that has been executed
Params
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getLatestCheckpointSequenceNumber", "params":[], "id":1}'
Result
BigInt<u64>
:<BigInt_for_uint64>
sui_getCheckpoint
Description
Return a checkpoint.
Params
id
:<CheckpointID>
- checkpoint identifier; can use either checkpoint digest, or checkpoint sequence number as input
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getCheckpoint", "params":["{{id}}"], "id":1}'
Result
Checkpoint
:<Checkpoint>
- checkpointCommitments :
<[CheckpointCommitment]>
- Commitments to checkpoint state - digest :
<[CheckpointDigest]>
- Checkpoint digest - endOfEpochData :
<[EndOfEpochData]>
- Present only on the final checkpoint of the epoch. - epoch :
<BigInt_for_uint64>
- Checkpoint's epoch ID - epochRollingGasCostSummary :
<[GasCostSummary]>
- The running total gas costs of all transactions included in the current epoch so far until this checkpoint. - networkTotalTransactions :
<BigInt_for_uint64>
- Total number of transactions committed since genesis, including those in this checkpoint. - previousDigest :
<[CheckpointDigest]>
- Digest of the previous checkpoint - sequenceNumber :
<[BigInt]>
- Checkpoint sequence number - timestampMs :
<BigInt_for_uint64>
- Timestamp of the checkpoint - number of milliseconds from the Unix epoch Checkpoint timestamps are monotonic, but not strongly monotonic - subsequent checkpoints can have same timestamp if they originate from the same underlining consensus commit - transactions :
<[TransactionDigest]>
- Transaction digests
sui_getCheckpoints
Description
Return contents of a checkpoint based on checkpoint content digest
Params
cursor
:<BigInt_for_uint64>
- an optional paging cursor. If provided, the query will start from the next item after the specified cursor. Default to start from the first item if not specifiedlimit
:<uint>
- maximum items returned per page, default to maximum limit if not specifieddescending_order
:<boolean>
- query result ordering, default to false (ascending order), oldest record first
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_getCheckpoints",
"params":[{{cursor}},
{{limit}},
{{descending_order}}],
"id":1}'
Result
CheckpointPage
:<Page_for_Checkpoint_and_BigInt_for_uint64>
sui_getLatestCheckpointSequenceNumber
Description
Return the sequence number of the latest checkpoint that has been executed
Params
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getLatestCheckpointSequenceNumber", "params":[], "id":1}'
Result
SuiCheckpointSequenceNumber
:<BigInt_for_uint64>
sui_getChainIdentifier
Description
Return the chain's identifier
Params
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getChainIdentifier", "params":[], "id":1}'
Result
String
:<string>
suix_getValidatorsApy
Return the validator APY
Params
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getValidatorsApy", "params":[], "id":1}'
Result
ValidatorApys
:<ValidatorApys>
- apys :
<[ValidatorApy]>
- epoch :
<BigInt_for_uint64>
suix_getLatestSuiSystemState
Return the latest SUI system state object on-chain.
Params
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getLatestSuiSystemState", "params":[], "id":1}'
Result
SuiSystemStateSummary
:<SuiSystemStateSummary>
- activeValidators :
<[SuiValidatorSummary]>
- The list of active validators in the current epoch. - atRiskValidators :
<[SuiAddress]>
- Map storing the number of epochs for which each validator has been below the low stake threshold. - epoch :
<BigInt_for_uint64>
- The current epoch ID, starting from 0. - epochDurationMs :
<BigInt_for_uint64>
- The duration of an epoch, in milliseconds. - epochStartTimestampMs :
<BigInt_for_uint64>
- Unix timestamp of the current epoch start - inactivePoolsId :
<[ObjectID]>
- ID of the object that maps from a staking pool ID to the inactive validator that has that pool as its staking pool. - inactivePoolsSize :
<BigInt_for_uint64>
- Number of inactive staking pools.
maxValidatorCount :<BigInt_for_uint64>
- Maximum number of active validators at any moment. We do not allow the number of validators in any epoch to go above this. - minValidatorJoiningStake :
<BigInt_for_uint64>
- Lower-bound on the amount of stake required to become a validator. - pendingActiveValidatorsId :
<[ObjectID]>
- ID of the object that contains the list of new validators that will join at the end of the epoch. - pendingActiveValidatorsSize :
<BigInt_for_uint64>
- Number of new validators that will join at the end of the epoch. - pendingRemovals :
<[]>
- Removal requests from the validators. Each element is an index pointing toactive_validators
. - protocolVersion :
<BigInt_for_uint64>
- The current protocol version, starting from 1. - referenceGasPrice :
<BigInt_for_uint64>
- The reference gas price for the current epoch. - safeMode :
<boolean>
- Whether the system is running in a downgraded safe mode due to a non-recoverable bug. This is set whenever we failed to execute advance_epoch, and ended up executing advance_epoch_safe_mode. It can be reset once we are able to successfully execute advance_epoch. - safeModeComputationRewards :
<BigInt_for_uint64>
- Amount of computation rewards accumulated (and not yet distributed) during safe mode. - safeModeNonRefundableStorageFee :
<BigInt_for_uint64>
- Amount of non-refundable storage fee accumulated during safe mode. - safeModeStorageRebates :
<BigInt_for_uint64>
- Amount of storage rebates accumulated (and not yet burned) during safe mode. - safeModeStorageRewards :
<BigInt_for_uint64>
- Amount of storage rewards accumulated (and not yet distributed) during safe mode. - stakeSubsidyBalance :
<BigInt_for_uint64>
- Balance of SUI set aside for stake subsidies that will be drawn down over time. - stakeSubsidyCurrentDistributionAmount :
<BigInt_for_uint64>
- The amount of stake subsidy to be drawn down per epoch. This amount decays and decreases over time. - stakeSubsidyDecreaseRate :
<uint16>
- The rate at which the distribution amount decays at the end of each period. Expressed in basis points. - stakeSubsidyDistributionCounter :
<BigInt_for_uint64>
- This counter may be different from the current epoch number if in some epochs we decide to skip the subsidy. - stakeSubsidyPeriodLength :
<BigInt_for_uint64>
- Number of distributions to occur before the distribution amount decays. - stakeSubsidyStartEpoch :
<BigInt_for_uint64>
- The starting epoch in which stake subsidies start being paid out - stakingPoolMappingsId :
<[ObjectID]>
- ID of the object that maps from staking pool's ID to the sui address of a validator. - stakingPoolMappingsSize :
<BigInt_for_uint64>
- Number of staking pool mappings. - storageFundNonRefundableBalance :
<BigInt_for_uint64>
- The non-refundable portion of the storage fund coming from storage reinvestment, non-refundable storage rebates and any leftover staking rewards. - storageFundTotalObjectStorageRebates :
<BigInt_for_uint64>
- The storage rebates of all the objects on-chain stored in the storage fund. - systemStateVersion :
<BigInt_for_uint64>
- The current version of the system state data structure type. - totalStake :
<BigInt_for_uint64>
- Total amount of stake from all active validators at the beginning of the epoch. - validatorCandidatesId :
<[ObjectID]>
- ID of the object that stores preactive validators, mapping their addresses to theirValidator
structs. - validatorCandidatesSize :
<BigInt_for_uint64>
- Number of preactive validators. - validatorLowStakeGracePeriod :
<BigInt_for_uint64>
- A validator can have stake below the validator_low_stake_threshold for this many epochs before being kicked out. - validatorLowStakeThreshold :
<BigInt_for_uint64>
- Validators with stake amount below validator_low_stake_threshold are considered to have low stake and will be escorted out of the validator set after being below this threshold for more thanvalidator_low_stake_grace_period
number of epochs. - validatorReportRecords :
<[SuiAddress]>
- A map storing the records of validator reporting each other. - validatorVeryLowStakeThreshold :
<BigInt_for_uint64>
- Validators with stake below validator_very_low_stake_threshold will be removed immediately at epoch change, no grace period.
Reading Transaction Block Data from Sui
sui_dryRunTransactionBlock
Description
Return transaction execution effects including the gas cost summary, while the effects are not committed to the chain.
Params
tx_bytes
:<Base64>
- transaction data bytes, as base-64 encoded string
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_dryRunTransactionBlock", "params":["{{tx_bytes}}"], "id":1}'
Result
DryRunTransactionBlockResponse
:<DryRunTransactionBlockResponse>
- balanceChanges :
<[BalanceChange]>
- effects :
<TransactionBlockEffects>
- events :
<[Event]>
- objectChanges :
<[ObjectChange]>
sui_devInspectTransactionBlock
Description
Runs the transaction in dev-inspect mode, which allows for nearly any transaction (or Move call) with any arguments. Detailed results are provided, including both the transaction effects and any return values
Params
sender
:<SuiAddress>
- the caller's Sui addresstx_bytes
:<Base64>
- transaction data bytes, as base-64 encoded stringgas_price
:<BigInt_for_uint64>
- Gas is not charged, but gas usage is still calculated. Default to use reference gas price
epoch
:<BigInt_for_uint64>
- The epoch to perform the call. Will be set from the system state object if not provided
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_devInspectTransactionBlock",
"params":["{{sender}}",
"{{tx_bytes}}",
{{gas_price}},
{{epoch}},
"id":1}'
Result
DevInspectResults
:<DevInspectResults>
- effects :
<[TransactionBlockEffects]>
- Summary of effects that likely would be generated if the transaction is actually run. Note however, that not all dev-inspect transactions are actually usable as transactions so it might not be possible actually generate these effects from a normal transaction. - error :
<string,null>
- Execution error from executing the transaction commands - events :
<[Event]>
- Events that likely would be generated if the transaction is actually run. - results :
<[SuiExecutionResult]>
- Execution results (including return values) from executing the transaction commands
sui_getTotalTransactionBlocks
Description
Return the total number of transactions known to the node.
Params
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getTotalTransactionBlocks", "params":[], "id":1}'
Result
BigInt<u64>
: <BigInt_for_uint64>
sui_getTransactionBlock
Description
Return the transaction response object for a specified transaction digest.
Params
digest
:<TransactionDigest>
- the digest of the queried transactionoptions
:<TransactionBlockResponseOptions>
- Optional. Sui options for specifying the transaction content to be returned
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_getTransactionBlock",
"params":["{{digest}}",
{"showInput": true,
"showRawInput": true,
"showEffects": true,
"showEvents": false,
"showObjectChanges": true,
"showBalanceChanges": false}],
"id":1}'
Result
SuiTransactionBlockResponse
:<TransactionBlockResponse>
sui_multiGetTransactionBlocks
Description
Return the transaction response object for multiple transaction digests.
Params
digests
:<TransactionDigest>
- the digests of the queried transactionsoptions
:<TransactionBlockResponseOptions>
- Optional. Sui options for specifying the transaction content to be returned
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_multiGetTransactionBlocks",
"params":["{{digests}}",
{"showInput": true,
"showRawInput": true,
"showEffects": true,
"showEvents": false,
"showObjectChanges": true,
"showBalanceChanges": false}],
"id":1}'
Result
Vec<SuiTransactionBlockResponse>
:<[SuiTransactionBlockResponse]>
suix_queryTransactionBlocks
Description
Return list of transactions for a specified query criteria.
Params
query
:<TransactionBlockResponseQuery>
- the transaction query criteria.cursor
:<TransactionDigest>
- An optional paging cursor. If provided, the query will start from the next item after the specified cursor. Default to start from the first item if not specified.limit
:<uint>
- Maximum item returned per page, default to QUERY_MAX_RESULT_LIMIT if not specified.descending_order
:<boolean>
- query result ordering, default to false (ascending order), oldest record first.
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"suix_queryTransactionBlocks",
"params":["{{query}}",
"{{cursor}}",
{{limit}},
{{descending_order}}],
"id":1}'
Result
TransactionsBlocksPage
:<Page_for_TransactionBlockResponse_and_TransactionDigest>
Writing Transaction Blocks to Sui
Note:
Using Programmable Transaction Blocks via Sui's SDK is recommended for writing to Sui.
sui_executeTransactionBlock
Description
Execute a transaction using the transaction data and signature(s).
Params
tx_bytes
:<Base64>
- BCS serialized transaction data bytes without its type tag, as base-64 encoded stringsignatures
:<Base64>
- list of signatures (flag || signature || pubkey bytes, as base-64 encoded string). Signature is committed to the intent message of the transaction dataoptions
:<TransactionResponseOptions>
- Optional. Sui options for specifying the transaction content to be returnedrequest_type
:<ExecuteTransactionRequestType>
- Optional. The execution request type (WaitForEffectsCert
orWaitForLocalExecution
)
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_executeTransactionBlock",
"params":["{{tx_bytes}}",
"{{signatures}}",
{"showInput": true,
"showRawInput": true,
"showEffects": true,
"showEvents": false,
"showObjectChanges": true,
"showBalanceChanges": false},
"{{request_type}}"}],
"id":1}'
Result
SuiTransactionBlockResponse
: <SuiTransactionBlockResponse>
Method Deprecation Warning
Transaction builder methods with the unsafe namespace are expected to be deprecated.
unsafe_moveCall
Description
Create an unsigned transaction to execute a Move call on the network, by calling the specified function in the module of a given package.
Params
signer
:<SuiAddress>
- the transaction signer's Sui addresspackage_object_id
:<ObjectID>
- the Move package ID, e.g.0x2
module
:<string>
- the Move module name, e.g.devnet_nft
function
:<string>
- the Move function name, e.g.mint
type_arguments
:<[TypeTag]>
- the type arguments of the Move functionarguments
:<[SuiJsonValue]>
- the arguments to be passed into the Move function, in SuiJSON formatgas
:<ObjectID>
- gas object to be used in this transaction; the gateway will pick one from the signer's possession if not providedgas_budget
:<BigInt_for_uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budgetexecution_mode
:<SuiTransactionBuilderMode>
- Whether this is a Normal transaction or a Dev Inspect Transaction. Default to beSuiTransactionBuilderMode::Commit
when it's None.
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"unsafe_moveCall",
"params":["{{signer}}",
"{{package_object_id}}",
"{{module}}",
"{{function}}",
"{{type_arguments}}",
"{{arguments}}",
"{{gas}}",
{{gas_budget}},
"{{execution_mode}}"],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- gas :
<[ObjectRef]>
- the gas object to be used - inputObjects :
<[InputObjectKind]>
- objects to be used in this transaction - txBytes :
<[Base64]>
- transaction data bytes, as base-64 encoded string
unsafe_mergeCoins
Description
Create an unsigned transaction to merge multiple coins into one coin.
Params
signer
:<SuiAddress>
- the transaction signer's Sui addressprimary_coin
:<ObjectID>
- the coin object to merge into; this coin will remain after the transactioncoin_to_merge
:<ObjectID>
- the coin object to be merged; this coin will be destroyed and the balance will be added to theprimary_coin
gas
:<ObjectID>
- gas object to be used in this transaction; the gateway will pick one from the signer's possession if not providedgas_budget
:<BigInt_for_uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"unsafe_mergeCoins",
"params":["{{signer}}",
"{{primary_coin}}",
"{{coin_to_merge}}",
"{{gas}}",
{{gas_budget}}],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- gas :
<[ObjectRef]>
- the gas object to be used - inputObjects :
<[InputObjectKind]>
- objects to be used in this transaction - txBytes :
<[Base64]>
- transaction data bytes, as base-64 encoded string
unsafe_splitCoin
Description
Create an unsigned transaction to split a coin object into multiple coins.
Params
signer
:<SuiAddress>
- the transaction signer's Sui addresscoin_object_id
:<ObjectID>
- the coin object to be spiltsplit_amounts
:<[]>
- the amounts to split out from the coingas
:<ObjectID>
- gas object to be used in this transaction; the gateway will pick one from the signer's possession if not providedgas_budget
:<BigInt_for_uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"unsafe_splitCoin",
"params":["{{signer}}",
"{{coin_object_id}}",
{{split_amounts}},
"{{gas}}",
{{gas_budget}}],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- gas :
<[ObjectRef]>
- the gas object to be used - inputObjects :
<[InputObjectKind]>
- objects to be used in this transaction - txBytes :
<[Base64]>
- transaction data bytes, as base-64 encoded string
unsafe_splitCoinEqual
Description
Create an unsigned transaction to split a coin object into multiple equal-size coins.
Params
signer
:<SuiAddress>
- the transaction signer's Sui addresscoin_object_id
:<ObjectID>
- the coin object to be spiltsplit_count
:<uint164>
- the number of coins to split intogas
:<ObjectID>
- gas object to be used in this transaction; the gateway will pick one from the signer's possession if not providedgas_budget
:<BigInt_for_uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"unsafe_splitCoinEqual",
"params":["{{signer}}",
"{{coin_object_id}}",
{{split_count}},
"{{gas}}",
{{gas_budget}}],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- gas :
<[ObjectRef]>
- the gas object to be used - inputObjects :
<[InputObjectKind]>
- objects to be used in this transaction - txBytes :
<[Base64]>
- transaction data bytes, as base-64 encoded string
unsafe_publish
Description
Create an unsigned transaction to publish a Move module.
Params
sender
:<SuiAddress>
- the transaction signer's Sui addresscompiled_modules
:<[Base64]>
- the compiled bytes of a Move module, thegas
:<ObjectID>
- gas object to be used in this transaction; the gateway will pick one from the signer's possession if not providedgas_budget
:<BigInt_for_uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"unsafe_publish",
"params":["{{sender}}",
"{{compiled_modules}}",
"{{gas}}",
{{gas_budget}}],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- gas :
<[ObjectRef]>
- the gas object to be used - inputObjects :
<[InputObjectKind]>
- objects to be used in this transaction - txBytes :
<[Base64]>
- transaction data bytes, as base-64 encoded string
unsafe_transferObject
Description
Create an unsigned transaction to transfer an object from one address to another. The object's type must allow public transfers
Params
signer
:<SuiAddress>
- the transaction signer's Sui addressobject_id
:<ObjectID>
- the ID of the object to be transferredgas
:<ObjectID>
- gas object to be used in this transaction; the gateway will pick one from the signer's possession if not providedgas_budget
:<BigInt_for_uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budgetrecipient
:<SuiAddress>
- the recipient's Sui address
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"unsafe_transferObject",
"params":["{{signer}}",
"{{object_id}}",
"{{gas}}",
{{gas_budget}},
"{{recipient}}"],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- gas :
<[ObjectRef]>
- the gas object to be used - inputObjects :
<[InputObjectKind]>
- objects to be used in this transaction - txBytes :
<[Base64]>
- transaction data bytes, as base-64 encoded string
unsafe_transferSui
Description
Create an unsigned transaction to send SUI coin object to a Sui address. The SUI object is also used as the gas object.
Params
signer
:<SuiAddress>
- the transaction signer's Sui addresssui_object_id
:<ObjectID>
- the Sui coin object to be used in this transactiongas_budget
:<BigInt_for_uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budgetrecipient
:<SuiAddress>
- the recipient's Sui addressamount
:<BigInt_for_uint64>
- gas object to be used in this transaction; the gateway will pick one from the signer's possession if not provided
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"unsafe_transferSui",
"params":["{{signer}}",
"{{sui_object_id}}",
{{gas_budget}},
"{{recipient}}",
{{amount}}],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- gas :
<[ObjectRef]>
- the gas object to be used - inputObjects :
<[InputObjectKind]>
- objects to be used in this transaction - txBytes :
<[Base64]>
- transaction data bytes, as base-64 encoded string
unsafe_pay
Description
Send Coin to a list of addresses, where T
can be any coin type, following a list of amounts, The object specified in the gas
field will be used to pay the gas fee for the transaction. The gas object can not appear in input_coins
. If the gas object is not specified, the RPC server will auto-select one.
Params
signer
:<SuiAddress>
- the transaction signer's Sui addressinput_coins
:<ObjectID>
- the Sui coins to be used in this transactionrecipients
:<SuiAddress>
- the recipients' addresses, the length of this vector must be the same as amounts.amounts
:<[]>
- the amounts to be transferred to recipients, following the same ordergas
:<ObjectID>
- the gas object to be used in this transaction, the gateway will pick one from the signer's possession if not providedgas_budget
:<BigInt_for_uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"unsafe_pay",
"params":["{{signer}}",
"{{input_coins}}",
"{{recipients}}",
{{amounts}},
"{{gas}}",
{{gas_budget}}],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- gas :
<[ObjectRef]>
- the gas object to be used - inputObjects :
<[InputObjectKind]>
- objects to be used in this transaction - txBytes :
<[Base64]>
- transaction data bytes, as base-64 encoded string
unsafe_payAllSui
Description
Send all SUI coins to one recipient. This is for SUI coin only and does not require a separate gas coin object. Specifically, what the method does is:
- accumulate all SUI from input coins and deposit all SUI to the first input coin
- transfer the updated first coin to the recipient and also use this first coin as gas coin object.
- the balance of the first input coin after tx is sum(input_coins) - actual_gas_cost.
- all other input coins other than the first are deleted.
Params
signer
:<SuiAddress>
- the transaction signer's Sui addressinput_coins
:<ObjectID>
- the Sui coins to be used in this transaction, including the coin for gas payment.recipient
:<SuiAddress>
- the recipient addressgas_budget
:<BigInt_for_uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"unsafe_payAllSui",
"params":["{{signer}}",
"{{input_coins}}",
"{{recipient}}",
{{gas_budget}}],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- gas :
<[ObjectRef]>
- the gas object to be used - inputObjects :
<[InputObjectKind]>
- objects to be used in this transaction - txBytes :
<[Base64]>
- transaction data bytes, as base-64 encoded string
unsafe_paySui
Description
Send all SUI coins to one recipient. This is for SUI coin only and does not require a separate gas coin object. Specifically, what pay_all_sui does are:
- Accumulate all SUI from input coins and deposit all SUI to the first input coin
- Transfer the updated first coin to the recipient and also use this first coin as gas coin object
- The balance of the first input coin after tx = sum(input_coins) - sum(amounts) - actual_gas_cost
- All other input coins other than the first are deleted
Params
signer
:<SuiAddress>
- the transaction signer's Sui addressinput_coins
:<ObjectID>
- the Sui coins to be used in this transaction, including the coin for gas payment.recipients
:<SuiAddress>
- the recipients' addresses, the length of this vector must be the same as amounts.amounts
:<[]>
- the amounts to be transferred to recipients, following the same ordergas_budget
:<BigInt_for_uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"unsafe_paySui",
"params":["{{signer}}",
"{{input_coins}}",
"{{recipients}}",
{{amounts}},
{{gas_budget}}],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- gas :
<[ObjectRef]>
- the gas object to be used - inputObjects :
<[InputObjectKind]>
- objects to be used in this transaction - txBytes :
<[Base64]>
- transaction data bytes, as base-64 encoded string
unsafe_batchTransaction
Description
Create an unsigned batched transaction.
Params
signer
:<SuiAddress>
- the transaction signer's Sui addresssingle_transaction_params
:<[RPCTransactionRequestParams]>
- list of transaction request parameters (moveCallRequestParams, transferObjectRequestParams, transferSuiRequestParams)gas
:<ObjectID>
- gas object to be used in this transaction; the gateway will pick one from the signer's possession if not providedgas_budget
:<BigInt_for_uint64>
- the gas budget; the transaction will fail if the gas cost exceeds the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"unsafe_batchTransaction",
"params":[
"{{signer}}",
[
{
"moveCallRequestParams": {
"{{arguments}}": [],
"{{function}},
"{{module}}",
"{{package_object_id}}",
"{{type_arguments}}": []
}
},
{
"transferObjectRequestParams": {
"{{object_id}}",
"{{recipient}}"
}
}
],
"{{gas}}",
{{gas_budget}}],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- gas :
<[ObjectRef]>
- the gas object to be used - inputObjects :
<[InputObjectKind]>
- objects to be used in this transaction - txBytes :
<[Base64]>
- transaction data bytes, as base-64 encoded string
unsafe_requestAddStake
Description
Add delegated stake to a validator's staking pool using multiple coins and amount.
Params
signer
:<SuiAddress>
- the transaction signer's Sui addresscoins
:<[ObjectID]>
- Coin or LockedCoin object to delegateamount
:<BigInt_for_uint64>
- delegation amount
-validator
:<SuiAddress>
- the validator's Sui addressgas
:<ObjectID>
- gas object to be used in this transaction; the gateway will pick one from the signer's possession if not providedgas_budget
:<BigInt_for_uint64>
- the gas budget; the transaction will fail if the gas cost exceeds the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"unsafe_requestAddStake",
"params":["{{signer}}",
"{{coins}}",
{{amount}},
"{{validator}}",
"{{gas}}",
{{gas_budget}}],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- gas :
<[ObjectRef]>
- the gas object to be used - inputObjects :
<[InputObjectKind]>
- objects to be used in this transaction - txBytes :
<[Base64]>
- transaction data bytes, as base-64 encoded string
unsafe_requestWithdrawStake
Description
Withdraw stake from a validator's staking pool.
Params
signer
:<SuiAddress>
- the transaction signer's Sui addressstaked_sui
:<[ObjectID]>
- staked Sui object IDgas
:<ObjectID>
- gas object to be used in this transaction; the gateway will pick one from the signer's possession if not providedgas_budget
:<BigInt_for_uint64>
- the gas budget; the transaction will fail if the gas cost exceeds the budget
curl https://api.shinami.com/node/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_requestWithdrawDelegation",
"params":["{{signer}}",
"{{staked_sui}}",
"{{gas}}",
{{gas_budget}}],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- gas :
<[ObjectRef]>
- the gas object to be used - inputObjects :
<[InputObjectKind]>
- objects to be used in this transaction - txBytes :
<[Base64]>
- BCS serialized transaction data bytes without its type tag, as base-64 encoded string