Sui Full Node gRPC
This content describes a beta feature or service. Beta features and services are in active development, so details are likely to change.
This feature or service is currently available in
- Devnet
- Testnet
- Mainnet
Sui Full node gRPC API will replace the JSON-RPC on Full nodes, such that JSON-RPC will be deprecated when gRPC API is generally available.
sui.node.v2.proto
The sui.node.v2 package contains API definitions for services that are expected to run on Full nodes.
BalanceChange
The delta, or change, in balance for an address for a particular Coin
type.
Fields
BalanceChanges
Set of BalanceChange
s that occurred as the result of a transaction.
This set of events are calculated by analyzing all input and output Coin
type objects.
Fields
EffectsFinality
Indicates the finality of the executed transaction.
Fields
ExecuteTransactionOptions
Fields
BalanceChanges
in the response. Defaults to false
if not included.sui.types.TransactionEffects
message in the response. Defaults to false
if not included.TransactionEffects
formatted as BCS in the response. Defaults to false
if not included.sui.types.TransactionEvents
message in the response. Defaults to false
if not included.TransactionEvents
formatted as BCS in the response. Defaults to false
if not included.ExecuteTransactionRequest
Request message for NodeService.ExecuteTransaction
.
Note: You must provide only one of transaction
or transaction_bcs
.
Fields
ExecuteTransactionResponse
should be returned.UserSiganture
s authorizing the execution of the provided transaction.UserSiganture
s authorizing the execution of the provided transaction, encoded as bytes.ExecuteTransactionResponse
Response message for NodeService.ExecuteTransaction
.
Fields
TransactionEvents
for this transaction. This field might be empty, even if it was explicitly requested, if the transaction didn't produce any events. sui.types.TransactionEffects.events_digest
is populated if the transaction produced any events.FullCheckpointObject
An object used by or produced from a transaction.
Fields
FullCheckpointObjects
Set of objects used by or produced from a transaction.
Fields
FullCheckpointTransaction
A transaction, with all of its inputs and outputs.
Fields
TransactionEvents
for this transaction. This field might be empty, even if it was explicitly requested, if the transaction didn't produce any events. sui.types.TransactionEffects.events_digest
is populated if the transaction produced any events.GetCheckpointOptions
Options for which parts of the GetCheckpointResponse
should be returned.
Fields
sui.types.CheckpointContents
message in the response. Defaults to false
if not included.CheckpointContents
formatted as BCS in the response. Defaults to false
if not included.sui.types.ValidatorAggregatedSignature
in the response. Defaults to false
if not included.sui.types.CheckpointSummary
in the response. Defaults to false
if not included.CheckpointSummary
formatted as BCS in the response. Defaults to false
if not included.GetCheckpointRequest
Request message for NodeService.GetCheckpoint
.
At most, provide one of sequence_number
or digest
. An error is
returned if you attempt to provide both. If you provide neither, the service
returns the latest executed checkpoint.
Fields
GetCheckpointResponse
should be returned.GetCheckpointResponse
Response message for NodeService.GetCheckpoint
.
Fields
GetCommitteeRequest
Request message for NodeService.GetCommittee.
Fields
GetCommitteeResponse
Response message for NodeService.GetCommittee
.
Fields
GetFullCheckpointOptions
Options for which parts of the GetFullCheckpointResponse
should be returned.
Fields
sui.types.CheckpointContents
message in the response. Defaults to false
if not included.CheckpointContents
formatted as BCS in the response. Defaults to false
if not included.sui.types.TransactionEffects
message in the response. Defaults to false
if not included.TransactionEffects
formatted as BCS in the response. Defaults to false
if not included.sui.types.TransactionEvents
message in the response. Defaults to false
if not included.TransactionEvents
formatted as BCS in the response. Defaults to false
if not included.false
if not included.sui.types.Object
message in the response. Defaults to false
if not included.false
if not included.false
if not included.sui.types.ValidatorAggregatedSignature
in the response. Defaults to false
if not included.sui.types.CheckpointSummary
in the response. Defaults to false
if not included.CheckpointSummary
formatted as BCS in the response. Defaults to false
if not included.sui.types.Transaction
message in the response. Defaults to false
if not included.false
if not included.GetFullCheckpointRequest
Request message for NodeService.GetFullCheckpoint
.
At most, provide one of sequence_number
or digest
. An error is
returned if you provide both. If you provide neither, the service
returns the latest executed checkpoint.
Fields
GetFullCheckpointResponse
should be returned.GetFullCheckpointResponse
Response message for NodeService.GetFullCheckpoint
.
Fields
GetNodeInfoRequest
Request message for NodeService.GetNodeInfo
.
GetNodeInfoResponse
Response message for NodeService.GetNodeInfo
.
Fields
mainnet
, testnet
, and so on.GetObjectOptions
Fields
GetObjectRequest
Request message for NodeService.GetObject
.
Fields
GetObjectResponse
should be returned.GetObjectResponse
Response message for NodeService.GetObject
.
Fields
GetTransactionOptions
Options for which parts of the GetTransactionResponse
should be returned.
Fields
sui.types.TransactionEffects
message in the response. Defaults to false
if not included.TransactionEffects
formatted as BCS in the response. Defaults to false
if not included.sui.types.TransactionEvents
message in the response. Defaults to false
if not included.TransactionEvents
formatted as BCS in the response. Defaults to false
if not included.sui.types.UserSignature
s in the response. Defaults to false
if not included.UserSignature
s encoded as bytes in the response. Defaults to false
if not included.sui.types.Transaction
message in the response. Defaults to false
if not included.false
if not included.GetTransactionRequest
Request message for NodeService.GetTransaction
.
Fields
GetTransactionResponse
should be returned.GetTransactionResponse
Response message for NodeService.GetTransactio
n.
Fields
TransactionEvents
for this transaction. This field might be empty, even if it was explicitly requested, if the transaction didn't produce any events. sui.types.TransactionEffects.events_digest
is populated if the transaction produced any events.UserSignatures
List of UserSignature
s used to authorize a transaction.
Fields
UserSignaturesBytes
List of UserSignature
s used to authorize a transaction encoded as bytes.
Fields
sui.types.proto
Protobuf definitions of public Sui core types.
This file contains a complete set of protobuf definitions for all of the public sui core types. All sui types are intended to have a 1:1 mapping to a protobuf message defined in this file and be able to roundtrip to/from their rust and protobuf definitions assuming a sufficiently up-to-date version of both these definitions.
For more information on the types these proto messages correspond with, see
the documentation for their rust versions defined in the
sui-sdk-types
library.
Use of optional
These message definitions use protobuf version 3 (proto3). In proto3, fields
that are primitives (that is, they are not a message
) and are not present
on the wire are zero-initialized. To gain the ability to detect
field presence,
these definitions follow the convention of having all fields marked
optional
, and wrapping repeated
fields in a message as needed.
Even if a field is marked as optional
, it might not actually be optional from
the perspective of the Sui protocol. Such fields are explicitly labled
as Required
or Optional
in their documentation.
ActiveJwk
A new JWK.
Fields
Address
Unique identifier for an account on the Sui blockchain.
An Address
is a 32-byte pseudonymous identifier used to uniquely identify an account and
asset-ownership on the Sui blockchain. Often, human-readable addresses are encoded in
hexadecimal with a 0x
prefix. For example, this is a valid Sui address:
0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331
.
Fields
AddressDeniedForCoinError
Address is denied for this coin type.
Fields
Argument
An argument to a programmable transaction command.
Fields
TransferObjects
, which can use it by-value.Result
but it accesses a nested result. Currently, the only usage of this is to access a value from a Move call with multiple return values.AuthenticatorStateExpire
Expire old JWKs.
Fields
AuthenticatorStateUpdate
Update the set of valid JWKs.
Fields
Bcs
Message that represents a type that is serialized and encoded using the BCS format.
Fields
Bn254FieldElement
A point on the BN254 elliptic curve.
Fields
CancelledTransaction
A transaction that was cancelled.
Fields
CancelledTransactions
Set of cancelled transactions.
Fields
ChangeEpoch
System transaction used to change the epoch.
Fields
ChangeEpoch
txn, the validator must write out the following modules. Modules are provided with the version they will be upgraded to, their modules in serialized form (which include their package ID), and a list of their transitive dependencies.ChangedObject
Input/output state of an object that was changed during execution.
Fields
CheckpointCommitment
A commitment made by a checkpoint.
Fields
CheckpointContents
The committed to contents of a checkpoint.
Fields
V1
Version 1 of CheckpointContents
.
Fields
CheckpointSummary
A header for a checkpoint on the Sui blockchain.
On the Sui network, checkpoints define the history of the blockchain. They are quite similar to the concept of blocks used by other blockchains like Bitcoin or Ethereum. The Sui blockchain, however, forms checkpoints after transaction execution has already happened to provide a certified history of the chain, instead of being formed before execution.
Checkpoints commit to a variety of state, including but not limited to:
- The hash of the previous checkpoint.
- The set of transaction digests, their corresponding effects digests, as well as the set of user signatures that authorized its execution.
- The objects produced by a transaction.
- The set of live objects that make up the current state of the chain.
- On epoch transitions, the next validator committee.
CheckpointSummary
s themselves don't directly include all of the previous information but they
are the top-level type by which all the information is committed to transitively via cryptographic
hashes included in the summary. CheckpointSummary
s are signed and certified by a quorum of
the validator committee in a given epoch to allow verification of the chain's state.
Fields
CheckpointSummary
. This will be None
only for the first, or genesis, checkpoint.CheckpointSummary
is not an evolvable structure - it must be readable by any version of the code. Therefore, to allow extensions to be added to CheckpointSummary
, opaque data can be added to checkpoints, which can be deserialized based on the current protocol version.CheckpointedTransactionInfo
Transaction information committed to in a checkpoint.
Fields
CircomG1
A G1 point.
Fields
CircomG2
A G2 point.
Fields
Command
A single command in a programmable transaction.
Fields
forall T: Vec<T> -> vector<T>
Given n-values of the same type, it constructs a vector. For non-objects or an empty vector, the type tag must be specified.(&mut Coin<T>, Vec<u64>)
-> Vec<Coin<T>>
It splits off some amounts into new coins with those amounts.(Vec<forall T:key+store. T>, address)
It sends n-objects to the specified address. These objects must have store (public transfer) and either the previous owner must be an address or the object must be newly created.UpgradeTicket
that must have been produced from an earlier command in the same programmable transaction.CommandArgumentError
An error with an argument to a command.
Fields
TransferObject
command.CongestedObjectsError
Set of objects that were congested, leading to the transaction's cancellation.
Fields
ConsensusCommitPrologue
Consensus commit prologue system transaction.
This message can represent V1, V2, and V3 prologue types.
Fields
ConsensusDeterminedVersionAssignments
Version assignments performed by consensus.
Fields
Digest
32-byte output of hashing a Sui structure using the Blake2b256 hash function.
Fields
EndOfEpochData
Data, which when included in a CheckpointSummary
, signals the end of an Epoch
.
Fields
ValidatorCommittee
for the next epoch.EndOfEpochTransaction
Set of operations run at the end of the epoch to close out the current epoch and start the next one.
Fields
EndOfEpochTransactionKind
Operation run at the end of an epoch.
Fields
Event
An event.
Fields
MoveCall
command that triggered this event to be emitted.MoveCall
command that triggered this event to be emitted.ExecutionStatus
The status of an executed transaction.
Fields
FailureStatus
An error that can occur during the execution of a transaction.
Fields
GasCostSummary
Summary of gas charges.
Storage is charged independently of computation. There are three parts to the storage charges:
storage_cost
: the charge of storage at the time the transaction is executed. The cost of storage is the number of bytes of the objects being mutated multiplied by a variable storage cost per byte.storage_rebate
: the amount a user gets back when manipulating an object. Thestorage_rebate
is thestorage_cost
for an object minus fees.non_refundable_storage_fee
: not all the value of the object storage cost is given back to user and there is a small fraction that is kept by the system. This value tracks that charge.
When looking at a gas cost summary the amount charged to the user is
computation_cost + storage_cost - storage_rebate
and that is the amount that is deducted from the gas coins.
non_refundable_storage_fee
is collected from the objects being mutated/deleted
and it is tracked by the system in storage funds.
Objects deleted, including the older versions of objects mutated, have the storage field
on the objects added up to a pool of "potential rebate". This rebate then is reduced
by the "nonrefundable rate" such that:
potential_rebate(storage cost of deleted/mutated objects) = storage_rebate + non_refundable_storage_fee
Fields
GasPayment
Payment information for executing a transaction.
Fields
GenesisObject
An object part of the initial chain state.
Fields
GenesisTransaction
The genesis transaction.
Fields
I128
A signed 128-bit integer encoded in little-endian using 16-bytes.
Fields
Identifier
A Move identifier.
Identifiers are only valid if they conform to the following ABNF:
identifier = (ALPHA *127(ALPHA / DIGIT / UNDERSCORE)) /
(UNDERSCORE 1*127(ALPHA / DIGIT / UNDERSCORE))
UNDERSCORE = %x95
Fields
Input
An input to a user transaction.
Fields
Jwk
A JSON web key.
Struct that contains info for a JWK. A list of them for different kinds can be retrieved from the JWK endpoint (for example, &#lt;https://www.googleapis.com/oauth2/v3/certs>). The JWK is used to verify the JWT token.
Fields
JwkId
Key to uniquely identify a JWK.
Fields
MakeMoveVector
Command to build a Move vector out of a set of individual elements.
Fields
MergeCoins
Command to merge multiple coins of the same type into a single coin.
Fields
ModifiedAtVersion
Indicates that an object was modified at a specific version.
Fields
MoveCall
Command to call a Move function.
Functions that can be called by a MoveCall
command are those that have a function signature
that is either entry
or public
(which don't have a reference return type).
Fields
MoveError
Error that occurred in Move.
Fields
MoveField
Fields
MoveLocation
Location in Move bytecode where an error occurred.s
Fields
MoveModule
Module defined by a package.
Fields
MovePackage
A Move package.
Fields
MoveStruct
A Move struct.
Fields
MoveStructValue
Fields
MoveValue
Fields
MoveVariant
Fields
MoveVector
Fields
MultisigAggregatedSignature
Aggregated signature from members of a multisig committee.
Fields
MultisigCommittee
A multisig committee.
Fields
MultisigMember
A member in a multisig committee.
Fields
MultisigMemberPublicKey
Set of valid public keys for multisig committee members.
Fields
MultisigMemberSignature
A signature from a member of a multisig committee.
Fields
NestedResult
An argument type for a nested result.
Fields
Object
An object on the Sui blockchain.
Fields
ObjectData
Object data, either a package or struct.
Fields
ObjectExist
Information about the old version of the object.
Fields
ObjectId
Unique identifier for an object on the Sui blockchain.
An ObjectId
is a 32-byte identifier used to uniquely identify an object on the Sui
blockchain.
Fields
ObjectReference
Reference to an object.
Fields
ObjectReferenceWithOwner
An object reference with owner information.
Fields
ObjectWrite
Object write, including all of mutated, created, unwrapped.
Fields
Owner
Enum of different types of ownership for an object.
Fields
PackageIdDoesNotMatch
Package ID does not match PackageId
in upgrade ticket.
Fields
PackageUpgradeError
An error with a upgrading a package.
Fields
PackageId
in upgrade ticket.PackageWrite
Package write.
Fields
PasskeyAuthenticator
A passkey authenticator.
See
struct.PasskeyAuthenticator
for more information on the requirements on the shape of the
client_data_json
field.
Fields
ProgrammableTransaction
A user transaction.
Contains a series of native commands and Move calls where the results of one command can be used in future commands.
Fields
Publish
Command to publish a new Move package.
Fields
RandomnessStateUpdate
Randomness update.
Fields
ReadOnlyRoot
Read-only shared object from the input.
Fields
RoaringBitmap
A RoaringBitmap. See
RoaringFormatSpec for the
specification for the serialized format of RoaringBitmap
s.
Fields
SharedObjectInput
A shared object input.
Fields
SimpleSignature
A basic signature.
Can either be an ed25519, secp256k1, or secp256r1 signature with corresponding public key.
Fields
SizeError
A size error.
Fields
SplitCoins
Command to split a single coin object into multiple coins.
Fields
StructTag
Type information for a Move struct.
Fields
SystemPackage
System package.
Fields
Transaction
A transaction.
Fields
TransactionV1
Version 1 of Transaction
.
Fields
TransactionEffects
The output or effects of executing a transaction.
Fields
TransactionEffectsV1
Version 1 of TransactionEffects
.
Fields
ObjectReference
and owner of mutated objects, including gas object.ObjectReference
and owner of objects that are unwrapped in this transaction. Unwrapped objects are objects that were wrapped into other objects in the past, and just got extracted out.None
if the transaction does not emit any event.TransactionEffectsV2
Version 2 of TransactionEffects
.
Fields
None
if the transaction does not emit any event.changed_objects
vector. Having a dedicated field for convenient access. System transaction that don't require gas will leave this as None
.TransactionEvents
Events emitted during the successful execution of a transaction.
Fields
TransactionExpiration
A TTL for a transaction.
Fields
TransactionKind
Transaction type.
Fields
ChangeEpoch
variant is now deprecated (but the ChangeEpoch
struct is still used by EndOfEpochTransaction
).TransferObjects
Command to transfer ownership of a set of objects to an address.
Fields
TypeArgumentError
Type argument error.
Fields
TypeOrigin
Identifies a struct and the module it was defined in.
Fields
TypeTag
Type of a Move value.
Fields
U128
An unsigned 128-bit integer encoded in little-endian using 16-bytes.
Fields
U256
An unsigned 256-bit integer encoded in little-endian using 32-bytes.
Fields
UnchangedSharedObject
A shared object that wasn't changed during execution.
Fields
Upgrade
Command to upgrade an already published package.
Fields
UpgradeInfo
Upgraded package info for the linkage table.
Fields
UserSignature
A signature from a user.
Fields
ValidatorAggregatedSignature
An aggregated signature from multiple validators.
Fields
ValidatorCommittee
from this epoch to verify this signature.ValidatorCommittee
The validator set for a particular epoch.
Fields
ValidatorCommitteeMember
A member of a validator committee.
Fields
VersionAssignment
Object version assignment from consensus.
Fields
ZkLoginAuthenticator
A zklogin authenticator.
Fields
ZkLoginClaim
A claim of the iss in a zklogin proof.
Fields
ZkLoginInputs
A zklogin groth16 proof and the required inputs to perform proof verification.
Fields
ZkLoginProof
A zklogin groth16 proof.
Fields
ZkLoginPublicIdentifier
Public key equivalent for zklogin authenticators.
Fields
google/protobuf/empty.proto
Empty
A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
google/protobuf/timestamp.proto
Timestamp
A Timestamp represents a point in time independent of any time zone
or calendar, represented as seconds and fractions of seconds at
nanosecond resolution in UTC Epoch time. It is encoded using the
Proleptic Gregorian Calendar which extends the Gregorian calendar
backwards to year one. It is encoded assuming all minutes are 60
seconds long, i.e. leap seconds are "smeared" so that no leap second
table is needed for interpretation. Range is from
0001-01-01T00:00:00Z
to 9999-12-31T23:59:59.999999999Z
.
Restricting to that range ensures that conversion to
and from RFC 3339 date strings is possible.
See https://www.ietf.org/rfc/rfc3339.txt.
Examples
Example 1: Compute Timestamp from POSIX time()
.
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday()
.
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime()
.
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) &#lt;&#lt; 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); //
Example 4: Compute Timestamp from Java System.currentTimeMillis()
.
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp
type is encoded as a string in the
RFC 3339 format. That is, the
format is {year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z
where {year}
is always expressed using four digits while {month}
, {day}
,
{hour}
, {min}
, and {sec}
are zero-padded to two digits each. The fractional
seconds, which can go up to 9 digits (so up to 1 nanosecond resolution),
are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
is required, though only UTC (as indicated by "Z") is presently supported.
For example, 2017-01-15T01:30:15.01Z
encodes 15.01 seconds past
01:30 UTC on January 15, 2017.
In JavaScript, you can convert a Date
object to this format using the
standard toISOString()
method. In Python, you can convert a standard datetime.datetime
object
to this format using strftime
with the time format spec %Y-%m-%dT%H:%M:%S.%fZ
. Likewise, in Java, you
can use the Joda Time's ISODateTimeFormat.dateTime()
to obtain a formatter capable of generating timestamps in this format.
Fields
1970-01-01T00:00:00Z
. Must be from 0001-01-01T00:00:00Z
to 9999-12-31T23:59:59Z
inclusive.Scalar Value Types
double
float
int32
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.
int64
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.
uint32
Uses variable-length encoding.
uint64
Uses variable-length encoding.
sint32
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.
sint64
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.
fixed32
Always four bytes. More efficient than uint32 if values are often greater than 2^28.
fixed64
Always eight bytes. More efficient than uint64 if values are often greater than 2^56.
sfixed32
Always four bytes.
sfixed64
Always eight bytes.
bool
string
A string must always contain UTF-8 encoded or 7-bit ASCII text.
bytes
May contain any arbitrary sequence of bytes.