Overview
Authentication, rate limits, error handling, and sending to specific regions
See our JSON-RPC API overview doc for information on how to send toTokyo - apac1
Mainnet and US-East - us1
Mainnet or Testnet. The examples below use the US-East
region URL.
Reading Move Data
sui_getMoveFunctionArgTypes
DescriptionReturn 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. ‘nft_minter’function
:<string>
- the Move function name, e.g. ‘mint’
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
Vec<MoveFunctionArgType>
: <[MoveFunctionArgType]>
sui_getNormalizedMoveFunction
DescriptionReturn a structured representation of a Move function. Remember that the API key you use determines the network you query. Params
package
:<ObjectID>
- the Move package ID, e.g."0x64254dd3675459aae82e063ed6276f99fe23616f75fdb0b683f5d2c6024a0bd7"
module_name
:<string>
- the Move module name, e.g."bird_entries"
function_name
:<string>
- the Move function name, e.g."mineBird"
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. The TypeScript example uses the Shinami Clients SDK, which you can install with:
Shell
Replace all instances of{{name}} with the actual value for that name
SuiMoveNormalizedFunction
with fields:
Name | Type | Description |
---|---|---|
isEntry | boolean | Whether or not the function is an entry function |
parameters | SuiMoveNormalizedType[] | The function’s parameters. |
return | SuiMoveNormalizedType[] | The function’s return values. |
typeParameters | SuiMoveAbilitySet[] | The function’s type parameters. |
visibility | SuiMoveVisibility | The function’s visibility, e.g. “Private”, “Public”, or “Friend” |
<SuiMoveNormalizedFunction>
:<[SuiMoveNormalizedFunction]>
- is_entry :
<boolean>
- parameters :
<[SuiMoveNormalizedType]>
- return :
<[SuiMoveNormalizedType]>
- type_parameters :
<[SuiMoveAbilitySet]>
- visibility :
<SuiMoveVisibility>
sui_getNormalizedMoveModule
DescriptionReturn 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. ‘nft_minter’
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
<SuiMoveNormalizedModule>
:<[SuiMoveNormalizedModule]>
- address :
<string>
- exposed_functions :
<object>
- file_format_version :
<uint32>
- friends :
<[SuiMoveModuleId]>
- name :
<string>
- structs :
<object>
sui_getNormalizedMoveModulesByPackage
DescriptionReturn the structured representations of all modules in the given package. Params
package
:<ObjectID>
- the Move package ID, e.g. ‘0x2’
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
BTreeMap<String,SuiMoveNormalizedModule>
: <object>
sui_getNormalizedMoveStruct
DescriptionReturn 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. ‘nft_minter’struct_name
:<string>
- the struct name
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScriptShinami Clients SDK.
<SuiMoveNormalizedStruct>
:<[SuiMoveNormalizedStruct]>
- abilities :
<SuiMoveAbilitySet>
- fields :
<[SuiMoveNormalizedField]>
- type_parameters :
<[SuiMoveStructTypeParameter]>
Reading Name Service Data
suix_resolveNameServiceAddress
DescriptionReturn the address the given name resolves to on the network, if any.
Request Parameters
Name | Type | Description |
---|---|---|
name | string | The name you want resolved into an address. |
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. The TypeScript example uses the Shinami Clients SDK, which you can install with:
Replace all instances of{{name}} with the actual value for that name
Type | Description |
---|---|
string || null | The address the name resolves to on the network, if found. |
suix_resolveNameServiceNames
DescriptionReturn the names the given address resolves to on the network, if any. If multiple names are resolved, the first one is the primary name.
Request Parameters
Name | Type | Description |
---|---|---|
address | string | The Sui address you want resolved into a list of associated names. |
cursor | string | * (Optional)_ The object id to start the results from. Used for paging through the results when multiple requests are needed to get all the associated names. |
limit | integer | (_Optional) _Maximum number of results returned per request. |
(SDK-only) format | string | - (Optional) _'at' | 'dot' : the representation you wish to receive. For 'sam' , 'at' = '@sam' and 'dot' = 'sam.sui' |
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. The TypeScript example uses the Shinami Clients SDK, which you can install with:
Shell
Replace all instances of{{name}} with the actual value for that name
ResolvedNameServiceNames
with fields:
Name | Type | Description |
---|---|---|
data | string[ ] | The name(s) the address resolves to on the network, if found. |
hasNextPage | boolean | Whether or not there is at least one more page of results. |
nextCursor | string | null | The value to use as the cursor parameter for the next request to get additional results. To be used if hasNextPage == true . |
Reading Sui Network Data
sui_getChainIdentifier
DescriptionReturn the chain’s identifier Params
- none
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
String
:<string>
sui_getCheckpoint
DescriptionReturn a checkpoint’s transaction digests and other information. Request Parameters
Name | Type | Description |
---|---|---|
id | string | The identifier of the checkpoint you want data for. Can use either checkpoint digest, or checkpoint sequence number (without commas) as input. |
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. The TypeScript example uses the Shinami Clients SDK, which you can install with:
Replace all instances of{{name}} with the actual value for that name
Checkpoint
with fields:
Name | Type | Description |
---|---|---|
checkpointCommitments | CheckpointCommitment[] | Commitments to checkpoint state |
digest | string | Checkpoint digest |
epoch | string | Checkpoint’s epoch ID |
endOfEpochData? | EndOfEpochData | null | (optional) Presented only on the final checkpoint of the epoch. |
epochRollingGasCostSummary | GasCostSummary | The running total gas costs of all transactions included in the current epoch so far until this checkpoint. |
networkTotalTransactions | string | Total number of transactions committed since genesis, including those in this checkpoint. |
previousDigest? | string | null | (optional) Digest of the previous checkpoint |
sequenceNumber | string | Checkpoint sequence number. |
timestampMs | string | 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 | string[] | Digests of the transactions in the checkpoint. |
validatorSignature | string | Validator Signature |
sui_getCheckpoints
DescriptionReturn 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
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. The TypeScript example uses the Shinami Clients SDK, which you can install with:
Shell
Replace all instances of{{name}} with the actual value for that name
CheckpointPage
:<Page_for_Checkpoint_and_BigInt_for_uint64>
sui_getLatestCheckpointSequenceNumber
DescriptionReturn the sequence number of the latest checkpoint of transactions that has been executed by the Fullnode. Example Request Template This example uses our
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. The TypeScript example uses the Shinami Clients SDK, which you can install with:
Shell
Replace all instances of{{name}} with the actual value for that name
BigInt<u64>
: The sequence number of the latest checkpoint that has been executed by the Fullnode.
sui_getProtocolConfig
DescriptionReturn 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
Name | Type | Description |
---|---|---|
version | string | (Optional) Protocol version specifier. If omitted, the latest protocol config table for the node will be returned. |
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. The TypeScript example uses the Shinami Clients SDK, which you can install with:
Shell
Replace all instances of{{name}} with the actual value for that name
ProtocolConfig
with fields
Name | Type | Description |
---|---|---|
attributes | [key: string]: ProtocolConfigValue | null | An map of the attributes of the current protocol version if present. |
featureFlags | A map of the feature flags and whether or not they are enabled for the current protocol version. | |
maxSupportedProtocolVersion | string | The maximum supported protocol version. |
minSupportedProtocolVersion | string | The minimum supported protocol version. |
protocolVersion | string | The current protocol version. |
suix_getCommitteeInfo
DescriptionReturn the committee information for the epoch of interest. Params
epoch
:<BigInt_for_uint64>
- the epoch of interest. If None, default to the latest epoch
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
Shell
SuiCommittee
:<CommitteeInfo>
suix_getLatestSuiSystemState
Return the latest SUI system state object on-chain. Params- none
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
Shell
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.
suix_getReferenceGasPrice
DescriptionReturn the reference gas price for the network for the current epoch, in MIST. Params
- none
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. The TypeScript example uses the Shinami Clients SDK, which you can install with:
Shell
Replace all instances of{{name}} with the actual value for that name
BigInt<u64>
: The reference gas price in MIST.
suix_getStakes
DescriptionReturn all delegated stake. Params
owner
:<SuiAddress>
- the owner’s Sui address
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
Vec<DelegatedStake>
:<[DelegatedStake]>
suix_getStakesByIds
DescriptionReturn one or more delegated stake. If a Stake was withdrawn, its status will be Unstaked. Params
staked_sui_ids
:<[ObjectID]>
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
Vec<DelegatedStake>
:<[DelegatedStake]>
suix_getValidatorsApy
Return the validator APY Params- none
US East - us1
region URL since it is currently the only region where we offer Testnet. To send to another region, see our our Node Service API Overview. We also have a TypeScript Shinami Clients SDK.
ValidatorApys
:<ValidatorApys>
- apys :
<[ValidatorApy]>
- epoch :
<BigInt_for_uint64>
Reading Other Data
sui_verifyZkLoginSignature
DescriptionVerify a zklogin signature for the given bytes, intent scope and author. Params
- bytes :
<string>
- The Base64 string of bcs bytes for raw transaction data or personal message indicated by intent_scope. - signature :
<string>
- The Base64 string of the zklogin signature to verify. - intent_scope :
< ZkLoginIntentScope >
- The intent scope, either transaction data or personal message. Used to parse bytes. - author :
< SuiAddress >
- The author of the signature.
ZkLoginVerifyResult
: < ZkLoginVerifyResult >
with fields:
- errors :
< [string] >
- The errors field captures any verification error. - success :
< Boolean >
- The boolean result of the verification. If true, errors should be empty.