Available methods on Shinami's JSON-RPC API to send requests to Shinami’s boosted Sui nodes
Note:
Shinami will support two URL formats for our Sui API.
Network Agnostic: network is determined by the Shinami access key
- node.shinami.com
Network Specific: Shinami access key network should match the network in the URL
- sui-devnet.shinami.com
- sui-testnet.shinami.com
Reading Event Data from Sui
sui_getEvents
Description
Return transaction events.
Params
transaction_digest
:<TransactionDigest>
- the event query criteria.
curl https://node.shinami.com/api/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
:<uint64>
- 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://node.shinami.com/api/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
: <EventEnvelope_EventIDPage>
Event Query | Description | Parameter Example |
---|---|---|
All | All events | {"All"} |
Transaction | Events emitted from the specified transaction | {"Transaction":"DGUe2TXiJdN3FI6MH1FwghYbiHw+NKu8Nh579zdFtUk="} |
MoveModule | Events emitted from the specified Move module | {"MoveModule":{"package":"0x2", "module":"devnet_nft"}} |
MoveEvent | Move struct name of the event | {"MoveEvent":"0x2::event_nft::MintNFTEvent"} |
EventType | Type of event described in this Events section | {"EventType": "NewObject"} |
Sender | Query by sender address | {"Sender":"0x70613f4f17ae1363f7a7e7251daab5c5b06f68c1"} |
Recipient | Query by recipient | {"Recipient":{"AddressOwner":"0x70613f4f17ae1363f7a7e7251daab5c5b06f68c1"}} |
Object | Return events associated with the given object | {"Object":"0xe3a6bc7bf1dba4d17a91724009c461bd69870719"} |
TimeRange | Return events emitted in [start_time, end_time] interval | {"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://node.shinami.com/api/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://node.shinami.com/api/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://node.shinami.com/api/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://node.shinami.com/api/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://node.shinami.com/api/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>
- options for specifying the content to be returned
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_getObject",
"params":["{{object_id}}",
"{{options}}"],
"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>
- options for specifying the content to be returned
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_multiGetObjects",
"params":["{{object_ids}}",
"{{options}}",
"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>
- options for specifying the content to be returned
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_tryGetPastObject",
"params":["{{object_id}}",
{{version}},
"{{options}}"],
"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>
- options for specifying the content to be returned
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_multitryGetPastObject",
"params":["{{past_objects}}",
"{{options}}"],
"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://node.shinami.com/api/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://node.shinami.com/api/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
: <DynamicFieldInfo_ObjectIDPage>
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
:<uint64>
- maximum number of items per page; default to maximum limit if not specified
curl https://node.shinami.com/api/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
: <SuiObjectResponse_CheckpointedObjectIDPage>
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://node.shinami.com/api/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 :
<uint128>
suix_getAllBalances
Description
Return all Coin balances owned by an address.
Params
owner
:<SuiAddress>
- the owner's Sui address
curl https://node.shinami.com/api/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://node.shinami.com/api/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
: <Coin_ObjectIDPage>
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://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"suix_getAllCoins",
"params":["{{owner}}",
"{{cursor}}",
{{limit}}],
"id":1}'
Result
CoinPage
: <Coin_ObjectIDPage>
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://node.shinami.com/api/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://node.shinami.com/api/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 :
<uint64>
Reading System Data from Sui
suix_getReferenceGasPrice
Description
Return the reference gas price for the network
Params
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getReferenceGasPrice", "params":[], "id":1}'
Result
BigInt
:< BigInt>
suix_getCommitteeInfo
Description
Return the committee information for the epoch of interest.
Params
epoch
:<uint64>
- the epoch of interest. If None, default to the latest epoch
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getCommitteeInfo", "params":[{{epoch}}], "id":1}'
Result
SuiCommittee
:< CommitteeInfo>
suix_getStakes
Description
Return all delegated stake.
Params
owner
:<SuiAddress>
- the owner's Sui address
curl https://node.shinami.com/api/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://node.shinami.com/api/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://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getLatestCheckpointSequenceNumber", "params":[], "id":1}'
Result
SuiCheckpointSequenceNumber
:<BigInt>
sui_getCheckpoint
Description
Return a checkpoint.
Params
id
:<CheckpointID>
- checkpoint identifier; can use either checkpoint digest, or checkpoint sequence number as input
curl https://node.shinami.com/api/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 :
<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 :
<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 :
<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>
- 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 item 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://node.shinami.com/api/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
:<Checkpoint_BigIntPage>
sui_getLatestCheckpointSequenceNumber
Description
Return the sequence number of the latest checkpoint that has been executed
Params
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getLatestCheckpointSequenceNumber", "params":[], "id":1}'
Result
SuiCheckpointSequenceNumber
:< BigInt>
suix_getEpochs
Return a list of epoch info.
Params
cursor
:<uint64>
- optional paging cursorlimit
:<uint>
- maximum number of items per pagedescending_order
:<boolean>
- flag to return results in descending order
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"suix_getEpochs",
"params":[{{cursor}},
{{limit}},
{{descending_order}}],
"id":1}'
Result
EpochPage
:<EpochInfo_uint64Page>
suix_getCurrentEpoch
Return current epoch info.
Params
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getCurrentEpoch", "params":[], "id":1}'
Result
EpochInfo
:<EpochInfo>
- endOfEpochInfo :
<[EndOfEpochInfo]>
- epoch :
<uint64>
- epoch number - epochStartTimestamp :
<uint64>
- epochTotalTransactions :
<uint64>
- count of tx in epoch - firstCheckpointId :
<uint64>
- first, last checkpoint sequence numbers - validators :
<[SuiValidatorSummary]>
- list of validators included in epoch
suix_getLatestSuiSystemState
Return the latest SUI system state object on-chain.
Params
curl https://node.shinami.com/api/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 :
<uint64>
- The current epoch ID, starting from 0. - epochDurationMs :
<uint64>
- The duration of an epoch, in milliseconds. - epochStartTimestampMs :
<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 :
<uint64>
- Number of inactive staking pools.
maxValidatorCount :<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 :
<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 :
<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 :
<uint64>
- The current protocol version, starting from 1. - referenceGasPrice :
<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 :
<uint64>
- Amount of computation rewards accumulated (and not yet distributed) during safe mode. - safeModeNonRefundableStorageFee :
<uint64>
- Amount of non-refundable storage fee accumulated during safe mode. - safeModeStorageRebates :
<uint64>
- Amount of storage rebates accumulated (and not yet burned) during safe mode. - safeModeStorageRewards :
<uint64>
- Amount of storage rewards accumulated (and not yet distributed) during safe mode. - stakeSubsidyBalance :
<uint64>
- Balance of SUI set aside for stake subsidies that will be drawn down over time. - stakeSubsidyCurrentDistributionAmount :
<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 :
<uint64>
- This counter may be different from the current epoch number if in some epochs we decide to skip the subsidy. - stakeSubsidyPeriodLength :
<uint64>
- Number of distributions to occur before the distribution amount decays. - stakeSubsidyStartEpoch :
<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 :
<uint64>
- Number of staking pool mappings. - storageFundNonRefundableBalance :
<uint64>
- The non-refundable portion of the storage fund coming from storage reinvestment, non-refundable storage rebates and any leftover staking rewards. - storageFundTotalObjectStorageRebates :
<uint64>
- The storage rebates of all the objects on-chain stored in the storage fund. - systemStateVersion :
<uint64>
- The current version of the system state data structure type. - totalStake :
<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 :
<uint64>
- Number of preactive validators. - validatorLowStakeGracePeriod :
<uint64>
- A validator can have stake below the validator_low_stake_threshold for this many epochs before being kicked out. - validatorLowStakeThreshold :
<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 :
<uint64>
- Validators with stake below validator_very_low_stake_threshold will be removed immediately at epoch change, no grace period.
suix_getMoveCallMetrics
Return Move call metrics.
Params
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getMoveCallMetrics", "params":[], "id":1}'
Result
MoveCallMetrics
:< MoveCallMetrics>
- rank30Days :
<[MoveFunctionName]>
- rank3Days :
<[MoveFunctionName]>
- rank7Days :
<[MoveFunctionName]>
suix_getNetworkMetrics
Return Move call metrics.
Params
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"suix_getNetworkMetrics", "params":[], "id":1}'
Result
NetworkMetrics
:< NetworkMetrics>
- cps30Days :
<double>
- Peak CPS in the past 30 days - currentCheckpoint :
<uint64>
- Current checkpoint number - currentCps :
<double>
- Current TPS - Sui Command per Second. - currentEpoch :
<uint64>
- Current epoch number - currentTps :
<double>
- Current TPS - Transaction per Second. - totalAddresses :
<uint64>
- Total number of addresses seen in the network - totalObjects :
<uint64>
- Total number of live objects in the network - totalPackages :
<uint64>
- Total number of packages published in the network - tps30Days :
<double>
- Peak TPS in the past 30 days
Reading Transaction Data from Sui
sui_dryRunTransaction
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://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_dryRunTransaction", "params":["{{tx_bytes}}"], "id":1}'
Result
DryRunTransactionResponse
:< DryRunTransactionResponse>
- balanceChanges :
<[BalanceChange]>
- effects :
<TransactionEffects>
- events :
<[Event]>
- objectChanges :
<[ObjectChange]>
sui_devInspectTransaction
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_address
:<Sui_Address>
- the caller's Sui addresstx_bytes
:<Base64>
- transaction data bytes, as base-64 encoded stringgas_price
:<uint64>
- Gas is not charged, but gas usage is still calculated. Default to use reference gas price
epoch
:<uint64>
- The epoch to perform the call. Will be set from the system state object if not provided
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_devInspectMoveCall",
"params":["{{sender_address}}",
"{{tx_bytes}}",
{{gas_price}},
{{epoch}},
"id":1}'
Result
DevInspectResults
:< DevInspectResults>
- effects :
<[TransactionEffects]>
- 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_getTotalTransactionNumber
Description
Return the total number of transactions known to the node.
Params
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"sui_getTotalTransactionNumber", "params":[], "id":1}'
Result
BigInt
: <BigInt>
sui_getTransaction
Description
Return the transaction response object for a specified transaction digest.
Params
digest
:<TransactionDigest>
- the digest of the queried transactionoptions
:<TransactionResponseOptions>
- options for specifying the content to be returned
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_getTransaction",
"params":["{{digest}}",
"{{options}}"],
"id":1}'
Result
SuiTransactionResponse
:<TransactionResponse>
sui_multiGetTransactions
Description
Return the transaction response object for multiple transaction digests.
Params
digests
:<TransactionDigest>
- the digests of the queried transactionsoptions
:<TransactionResponseOptions>
- config options to control which fields to fetch
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_multiGetTransactions",
"params":["{{digest}}",
"{{options}}"],
"id":1}'
Result
Vec<SuiTransactionResponse>
:<[SuiTransactionResponse]>
suix_queryTransactions
Description
Return list of transactions for a specified query criteria.
Params
query
:<TransactionResponseQuery>
- 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://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"suix_queryTransactions",
"params":["{{query}}",
"{{cursor}}",
{{limit}},
{{descending_order}}],
"id":1}'
Result
TransactionsPage
:<TransactionResponse_TransactionDigestPage>
Writing Transactions to Sui
Note:
Transactions on Sui are a bit more involved because of Sui's unique architecture. Check out our transactions guide for details.
sui_executeTransaction
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>
- options for specifying the content to be returnedrequest_type
:<ExecuteTransactionRequestType>
- the request type (WaitForEffectsCert or WaitForLocalExecution)
curl https://node.shinami.com/api/v1/<<apiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"sui_executeTransaction",
"params":["{{tx_bytes}}",
"{{signatures}}",
"{{options}}",
"{{request_type}}"],
"id":1}'
Result
SuiTransactionResponse
: <SuiTransactionResponse>
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
:<uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget- execution_mode : - Whether this is a Normal transaction or a Dev Inspect Transaction. Default to be
SuiTransactionBuilderMode::Commit
when it's None.
curl https://node.shinami.com/api/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
:<uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://node.shinami.com/api/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
:<uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://node.shinami.com/api/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
:<uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://node.shinami.com/api/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
:<uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://node.shinami.com/api/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
:<uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budgetrecipient
:<SuiAddress>
- the recipient's Sui address
curl https://node.shinami.com/api/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
:<uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budgetrecipient
:<SuiAddress>
- the recipient's Sui addressamount
:<uint64>
- gas object to be used in this transaction; the gateway will pick one from the signer's possession if not provided
curl https://node.shinami.com/api/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
:<uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://node.shinami.com/api/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
:<uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://node.shinami.com/api/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
:<uint64>
- the gas budget; the transaction will fail if the gas cost exceed the budget
curl https://node.shinami.com/api/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
:<uint64>
- the gas budget; the transaction will fail if the gas cost exceeds the budget
curl https://node.shinami.com/api/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
Writing Delegation Transactions to Sui
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
:<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
:<uint64>
- the gas budget; the transaction will fail if the gas cost exceeds the budget
curl https://node.shinami.com/api/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
:<uint64>
- the gas budget; the transaction will fail if the gas cost exceeds the budget
curl https://node.shinami.com/api/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