Skip to main content

Sui Full Node gRPC

⚙️Early-Stage Feature

This content describes an alpha/beta feature or service. These early stage 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.

google/protobuf/any.proto

Any

Any contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message.

Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type.

Example 1: Pack and unpack a message in C++.

Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... }

Example 2: Pack and unpack a message in Java.

Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } // or ... if (any.isSameTypeAs(Foo.getDefaultInstance())) { foo = any.unpack(Foo.getDefaultInstance()); }

Example 3: Pack and unpack a message in Python.

foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...

Example 4: Pack and unpack a message in Go

foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... }

The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z".

JSON

The JSON representation of an Any value uses the regular representation of the deserialized, embedded message, with an additional field @type which contains the type URL. Example:

package google.profile; message Person { string first_name = 1; string last_name = 2; }

{ "@type": "type.googleapis.com/google.profile.Person", "firstName": &#lt;string>, "lastName": &#lt;string> }

If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field value which holds the custom JSON in addition to the @type field. Example (for message [google.protobuf.Duration][]):

{ "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" }

Fields

type_url
A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in path/google.protobuf.Duration). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme http, https, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, https is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one. Schemes other than http, https (or the empty scheme) might be used with implementation specific semantics.
value
Must be a valid serialized protocol buffer of the above specified type.

google/protobuf/duration.proto

Duration

A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years.

Examples

Example 1: Compute Duration from two Timestamps in pseudo code.

Timestamp start = ...; Timestamp end = ...; Duration duration = ...;

duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos;

if (duration.seconds &#lt; 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos &#lt; 0) { duration.seconds -= 1; duration.nanos += 1000000000; }

Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.

Timestamp start = ...; Duration duration = ...; Timestamp end = ...;

end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos;

if (end.nanos &#lt; 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; }

Example 3: Compute Duration from datetime.timedelta in Python.

td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td)

JSON Mapping

In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s".

Fields

nanos
Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 seconds field and a positive or negative nanos field. For durations of one second or more, a non-zero value for the nanos field must be of the same sign as the seconds field. Must be from -999,999,999 to +999,999,999 inclusive.
seconds
Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years

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/field_mask.proto

FieldMask

FieldMask represents a set of symbolic field paths, for example:

paths: "f.a" paths: "f.b.d"

Here f represents a field in some root message, a and b fields in the message found in f, and d a field found in the message in f.b.

Field masks are used to specify a subset of fields that should be returned by a get operation or modified by an update operation. Field masks also have a custom JSON encoding (see below).

Field Masks in Projections

When used in the context of a projection, a response message or sub-message is filtered by the API to only contain those fields as specified in the mask. For example, if the mask in the previous example is applied to a response message as follows:

f { a : 22 b { d : 1 x : 2 } y : 13 } z: 8

The result will not contain specific values for fields x,y and z (their value will be set to the default, and omitted in proto text output):

f { a : 22 b { d : 1 } }

A repeated field is not allowed except at the last position of a paths string.

If a FieldMask object is not present in a get operation, the operation applies to all fields (as if a FieldMask of all fields had been specified).

Note that a field mask does not necessarily apply to the top-level response message. In case of a REST get operation, the field mask applies directly to the response, but in case of a REST list operation, the mask instead applies to each individual message in the returned resource list. In case of a REST custom method, other definitions may be used. Where the mask applies will be clearly documented together with its declaration in the API. In any case, the effect on the returned resource/resources is required behavior for APIs.

Field Masks in Update Operations

A field mask in update operations specifies which fields of the targeted resource are going to be updated. The API is required to only change the values of the fields as specified in the mask and leave the others untouched. If a resource is passed in to describe the updated values, the API ignores the values of all fields not covered by the mask.

If a repeated field is specified for an update operation, new values will be appended to the existing repeated field in the target resource. Note that a repeated field is only allowed in the last position of a paths string.

If a sub-message is specified in the last position of the field mask for an update operation, then new value will be merged into the existing sub-message in the target resource.

For example, given the target message:

f { b { d: 1 x: 2 } c: [1] }

And an update message:

f { b { d: 10 } c: [2] }

then if the field mask is:

paths: ["f.b", "f.c"]

then the result will be:

f { b { d: 10 x: 2 } c: [1, 2] }

An implementation may provide options to override this default behavior for repeated and message fields.

In order to reset a field's value to the default, the field must be in the mask and set to the default value in the provided resource. Hence, in order to reset all fields of a resource, provide a default instance of the resource and set all fields in the mask, or do not provide a mask as described below.

If a field mask is not present on update, the operation applies to all fields (as if a field mask of all fields has been specified). Note that in the presence of schema evolution, this may mean that fields the client does not know and has therefore not filled into the request will be reset to their default. If this is unwanted behavior, a specific service may require a client to always specify a field mask, producing an error if not.

As with get operations, the location of the resource which describes the updated values in the request message depends on the operation kind. In any case, the effect of the field mask is required to be honored by the API.

Considerations for HTTP REST

The HTTP kind of an update operation which uses a field mask must be set to PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used for full updates).

JSON Encoding of Field Masks

In JSON, a field mask is encoded as a single string where paths are separated by a comma. Fields name in each path are converted to/from lower-camel naming conventions.

As an example, consider the following message declarations:

message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; }

In proto a field mask for Profile may look as such:

mask { paths: "user.display_name" paths: "photo" }

In JSON, the same mask is represented as below:

{ mask: "user.displayName,photo" }

Field Masks and Oneof Fields

Field masks treat fields in oneofs just as regular fields. Consider the following message:

message SampleMessage { oneof test_oneof { string name = 4; SubMessage sub_message = 9; } }

The field mask can be:

mask { paths: "name" }

Or:

mask { paths: "sub_message" }

Note that oneof type names ("test_oneof" in this case) cannot be used in paths.

Field Mask Verification

The implementation of any API method which has a FieldMask type field in the request should verify the included field paths, and return an INVALID_ARGUMENT error if any path is unmappable.

Fields

paths
repeated
The set of field mask paths.

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

nanos
Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nano values that count forward in time. Must be from 0 to 999,999,999 inclusive.
seconds
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.

google/rpc/error_details.proto

BadRequest

Describes violations in a client request. This error type focuses on the syntactic aspects of the request.

Fields

field_violations
Describes all violations in a client request.

FieldViolation

A message type used to describe a single bad request field.

Fields

description
A description of why the request element is bad.
field
A path that leads to a field in the request body. The value will be a sequence of dot-separated identifiers that identify a protocol buffer field. Consider the following: text,json message CreateContactRequest { message EmailAddress { enum Type { TYPE_UNSPECIFIED = 0; HOME = 1; WORK = 2; } optional string email = 1; repeated EmailType type = 2; } string full_name = 1; repeated EmailAddress email_addresses = 2; } In this example, in proto field could take one of the following values: * full_name for a violation in the full_name value * email_addresses[1].email for a violation in the email field of the first email_addresses message * email_addresses[3].type[2] for a violation in the second type value in the third email_addresses message. In JSON, the same values are represented as: * fullName for a violation in the fullName value * emailAddresses[1].email for a violation in the email field of the first emailAddresses message * emailAddresses[3].type[2] for a violation in the second type value in the third emailAddresses message.
localized_message
Provides a localized error message for field-level errors that is safe to return to the API consumer.
reason
The reason of the field-level error. This is a constant value that identifies the proximate cause of the field-level error. It should uniquely identify the type of the FieldViolation within the scope of the google.rpc.ErrorInfo.domain. This should be at most 63 characters and match a regular expression of [A-Z][A-Z0-9_]+[A-Z0-9], which represents UPPER_SNAKE_CASE.

DebugInfo

Describes additional debugging info.

Fields

detail
Additional debugging information provided by the server.
stack_entries
repeated
The stack trace entries indicating where the error occurred.

ErrorInfo

Describes the cause of the error with structured details.

Example of an error when contacting the "pubsub.googleapis.com" API when it is not enabled:

{ "reason": "API_DISABLED"
"domain": "googleapis.com"
"metadata": {
"resource": "projects/123",
"service": "pubsub.googleapis.com"
}
}

This response indicates that the pubsub.googleapis.com API is not enabled.

Example of an error that is returned when attempting to create a Spanner instance in a region that is out of stock:

{ "reason": "STOCKOUT"
"domain": "spanner.googleapis.com",
"metadata": {
"availableRegions": "us-central1,us-east2"
}
}

Fields

domain
The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com".
metadata
Additional structured details about this error. Keys must match a regular expression of [a-z][a-zA-Z0-9-_]+ but should ideally be lowerCamelCase. Also, they must be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request.
reason
The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of [A-Z][A-Z0-9_]+[A-Z0-9], which represents UPPER_SNAKE_CASE.

MetadataEntry

Fields

value

Help

Provides links to documentation or for performing an out of band action.

For example, if a quota check failed with an error indicating the calling project hasn't enabled the accessed service, this can contain a URL pointing directly to the right place in the developer console to flip the bit.

Fields

links
repeated
URL(s) pointing to additional information on handling the current error.

Describes a URL link.

Fields

description
Describes what the link offers.
url
The URL of the link.

LocalizedMessage

Provides a localized error message that is safe to return to the user which can be attached to an RPC error.

Fields

locale
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"
message
The localized error message in the above locale.

PreconditionFailure

Describes what preconditions have failed.

For example, if an RPC failed because it required the Terms of Service to be acknowledged, it could list the terms of service violation in the PreconditionFailure message.

Fields

violations
repeated
Describes all precondition violations.

Violation

A message type used to describe a single precondition failure.

Fields

description
A description of how the precondition failed. Developers can use this description to understand how to fix the failure. For example: "Terms of service not accepted".
subject
The subject, relative to the type, that failed. For example, "google.com/cloud" relative to the "TOS" type would indicate which terms of service is being referenced.
type
The type of PreconditionFailure. We recommend using a service-specific enum type to define the supported precondition violation subjects. For example, "TOS" for "Terms of Service violation".

QuotaFailure

Describes how a quota check failed.

For example if a daily limit was exceeded for the calling project, a service could respond with a QuotaFailure detail containing the project id and the description of the quota limit that was exceeded. If the calling project hasn't enabled the service in the developer console, then a service could respond with the project id and set service_disabled to true.

Also see RetryInfo and Help types for other details about handling a quota failure.

Fields

violations
repeated
Describes all quota violations.

Violation

A message type used to describe a single quota violation. For example, a daily quota or a custom quota that was exceeded.

Fields

description
A description of how the quota check failed. Clients can use this description to find more about the quota configuration in the service's public documentation, or find the relevant quota limit to adjust through developer console. For example: "Service disabled" or "Daily Limit for read operations exceeded".
subject
The subject on which the quota check failed. For example, clientip:<ip address of client> or project:<Google developer project id>.

RequestInfo

Contains metadata about the request that clients can attach when filing a bug or providing other forms of feedback.

Fields

request_id
An opaque string that should only be interpreted by the service generating it. For example, it can be used to identify requests in the service's logs.
serving_data
Any data that was used to serve this request. For example, an encrypted stack trace that can be sent back to the service provider for debugging.

ResourceInfo

Describes the resource that is being accessed.

Fields

description
Describes what error is encountered when accessing this resource. For example, updating a cloud project may require the writer permission on the developer console project.
owner
The owner of the resource (optional). For example, user:<owner email> or project:<Google developer project id>.
resource_name
The name of the resource being accessed. For example, a shared calendar name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current error is [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
resource_type
A name for the type of resource being accessed, e.g. "sql table", "cloud storage bucket", "file", "Google calendar"; or the type URL of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".

RetryInfo

Describes when the clients can retry a failed request. Clients could ignore the recommendation here or retry when this information is missing from error responses.

It's always recommended that clients should use exponential backoff when retrying.

Clients should wait until retry_delay amount of time has passed since receiving the error response before retrying. If retrying requests also fail, clients should use an exponential backoff scheme to gradually increase the delay between retries based on retry_delay, until either a maximum number of retries have been reached or a maximum retry delay cap has been reached.

Fields

retry_delay
Clients should wait at least this long between retrying the same request.

google/rpc/status.proto

Status

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details.

You can find out more about this error model and how to work with it in the API Design Guide.

Fields

code
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
details
repeated
A list of messages that carry the error details. There is a common set of message types for APIs to use.
message
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

sui/node/v2/node_service.proto

The sui.node.v2 package contains API definitions for services that are expected to run on Fullnodes.

BalanceChange

The delta, or change, in balance for an address for a particular Coin type.

Fields

One of
address
optional
The account address that is affected by this balance change event.
amount
optional
The amount or change in balance.
coin_type
optional
The Coin type of this balance change event.

EffectsFinality

Indicates the finality of the executed transaction.

Fields

One of
certified
A quorum certificate certifying that a transaction is final but might not be included in a checkpoint yet.
checkpointed
Sequence number of the checkpoint that includes the transaction.
quorum_executed
Indicates that a quorum of validators has executed the transaction but that it might not be included in a checkpoint yet.

ExecuteTransactionRequest

Request message for NodeService.ExecuteTransaction.

Note: You must provide only one of transaction or transaction_bcs.

Fields

signatures
Optional. Set of UserSigantures authorizing the execution of the provided transaction.
signatures_bytes
repeated
Optional. Set of UserSigantures authorizing the execution of the provided transaction, encoded as bytes.
One of
read_mask
optional
Optional. Mask for specifying which parts of the ExecuteTransactionResponse should be returned.
transaction
optional
Optional. The transaction to execute.
transaction_bcs
optional
Optional. The transaction to execute, encoded as BCS bytes.

ExecuteTransactionResponse

Response message for NodeService.ExecuteTransaction.

Fields

balance_changes
Set of balance change events as a result of this transaction. This set of events are calculated by analyzing all input and output Coin type objects.
One of
effects
The TransactionEffects for this transaction.
effects_bcs
optional
The TransactionEffects for this transaction encoded as BCS bytes.
events
The 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.
events_bcs
optional
The TransactionEvents for this transaction encoded as BCS bytes.
finality
Indicates the finality of the executed transaction.

FullCheckpointObject

An object used by or produced from a transaction.

Fields

One of
digest
optional
The digest of this object.
object
optional
The object itself.
object_bcs
optional
The object encoded as BCS bytes.
object_id
optional
The ObjectId of this object.
version
optional
The version of this object.

FullCheckpointTransaction

A transaction, with all of its inputs and outputs.

Fields

input_objects
Set of input objects used during the execution of this transaction.
output_objects
Set of output objects produced from the execution of this transaction.
One of
digest
optional
The digest of this transaction.
effects
The TransactionEffects for this transaction.
effects_bcs
optional
The TransactionEffects for this transaction encoded as BCS bytes.
events
The 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.
events_bcs
optional
The TransactionEvents for this transaction encoded as BCS bytes.
transaction
optional
The transaction itself.
transaction_bcs
optional
The Transaction encoded as BCS bytes.

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

One of
digest
optional
Optional. The digest of the requested checkpoint.
read_mask
optional
Optional. Mask for specifying which parts of the GetCheckpointResponse should be returned.
sequence_number
optional
Optional. The sequence number of the requested checkpoint.

GetCheckpointResponse

Response message for NodeService.GetCheckpoint.

Fields

One of
contents
The CheckpointContents for this checkpoint.
contents_bcs
optional
The CheckpointContents for this checkpoint encoded as BCS bytes.
digest
optional
The digest of this checkpoint's CheckpointSummary.
sequence_number
optional
The sequence number of this checkpoint.
signature
An aggregated quorum signature from the validator committee that certifies this checkpoint.
summary
The CheckpointSummary for this checkpoint.
summary_bcs
optional
The CheckpointSummary for this checkpoint encoded as BCS bytes.

GetCommitteeRequest

Request message for NodeService.GetCommittee.

Fields

One of
epoch
optional
Optional. Request the sui.types.ValidatorCommittee corresponding to the provided epoch. If no epoch is provided the committee for the current epoch will be returned.

GetCommitteeResponse

Response message for NodeService.GetCommittee.

Fields

One of
committee
The committee of either the requested epoch or the current epoch.

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

One of
digest
optional
Optional. The digest of the requested checkpoint.
read_mask
optional
Optional. Mask for specifying which parts of the GetFullCheckpointResponse should be returned.
sequence_number
optional
Optional. The sequence number of the requested checkpoint.

GetFullCheckpointResponse

Response message for NodeService.GetFullCheckpoint.

Fields

transactions
List of transactions included in this checkpoint.
One of
contents
The CheckpointContents for this checkpoint.
contents_bcs
optional
The CheckpointContents for this checkpoint encoded as BCS bytes.
digest
optional
The digest of this checkpoint's CheckpointSummary.
sequence_number
optional
The sequence number of this checkpoint.
signature
An aggregated quorum signature from the validator committee that certifies this checkpoint.
summary
The CheckpointSummary for this checkpoint.
summary_bcs
optional
The CheckpointSummary for this checkpoint encoded as BCS bytes.

GetNodeInfoRequest

Request message for NodeService.GetNodeInfo.

GetNodeInfoResponse

Response message for NodeService.GetNodeInfo.

Fields

One of
chain
optional
Human-readable name of the chain that this node is on. This is intended to be a human-readable name like mainnet, testnet, and so on.
chain_id
optional
The chain identifier of the chain that this node is on. The chain identifier is the digest of the genesis checkpoint, the checkpoint with sequence number 0.
checkpoint_height
optional
Checkpoint height of the most recently executed checkpoint.
epoch
optional
Current epoch of the node based on its highest executed checkpoint.
lowest_available_checkpoint
optional
The lowest checkpoint for which checkpoints and transaction data are available.
lowest_available_checkpoint_objects
optional
The lowest checkpoint for which object data is available.
software_version
optional
Software version of the sui-node binary.
timestamp
optional
Unix timestamp of the most recently executed checkpoint.

GetObjectRequest

Request message for NodeService.GetObject.

Fields

One of
object_id
optional
Required. The ObjectId of the requested object.
read_mask
optional
Optional. Mask for specifying which parts of the GetObjectResponse should be returned.
version
optional
Optional. Request that a specific version of the requested object is returned. If no version is provided, then then the latest version for the object is returned.

GetObjectResponse

Response message for NodeService.GetObject.

Fields

One of
digest
optional
The digest of this object.
object
optional
The object itself.
object_bcs
optional
The Object encoded as BCS bytes.
object_id
optional
The ObjectId of this object.
version
optional
The version of this object.

GetTransactionRequest

Request message for NodeService.GetTransaction.

Fields

One of
digest
optional
Required. The digest of the requested transaction.
read_mask
optional
Optional. Mask for specifying which parts of the GetTransactionResponse should be returned.

GetTransactionResponse

Response message for NodeService.GetTransaction.

Fields

signatures
List of user signatures that are used to authorize the execution of this transaction.
signatures_bytes
repeated
List of UserSignatures encoded as bytes.
One of
checkpoint
optional
The sequence number for the checkpoint that includes this transaction.
digest
optional
The digest of this Transaction.
effects
The TransactionEffects for this transaction.
effects_bcs
optional
The TransactionEffects for this transaction encoded as BCS bytes.
events
The 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.
events_bcs
optional
The TransactionEvents for this transaction encoded as BCS bytes.
timestamp
optional
The Unix timestamp of the checkpoint that includes this transaction.
transaction
optional
The transaction itself.
transaction_bcs
optional
The Transaction encoded as BCS bytes.

sui/node/v2alpha/node_service.proto

The sui.node.v2alpha package contains experimental services that have yet to stabilize

Everything in here is subject to change and there is no gaurentee about stability or breaking changes.

AccountObject

Fields

One of
object_id
optional
object_type
optional
owner
optional
version
optional

CoinMetadata

Metadata for a coin type

Fields

One of
decimals
optional
Number of decimal places to coin uses.
description
optional
Description of the token
icon_url
optional
URL for the token logo
id
optional
ObjectId of the 0x2::coin::CoinMetadata object.
name
optional
Name for the token
symbol
optional
Symbol for the token

CoinTreasury

Information about a coin type's 0x2::coin::TreasuryCap and its total available supply

Fields

One of
id
optional
ObjectId of the 0x2::coin::TreasuryCap object.
total_supply
optional
Total available supply for this coin type.

DynamicField

Fields

One of
dynamic_object_id
optional
The ObjectId of the child object when a child is a dynamic object field. The presence or absence of this field can be used to determine if a child is a dynamic field or a dynamic child object
field_id
optional
Required. ObjectId of this dynamic field.
name_type
optional
Required. The type of the dynamic field "name"
name_value
optional
Required. The serialized move value of "name"
parent
optional
Required. ObjectId of this dynamic field's parent.

GetCoinInfoRequest

Request message for NodeService.GetCoinInfo.

Fields

One of
coin_type
optional
The coin type to request information about

GetCoinInfoResponse

Response message for NodeService.GetCoinInfo.

Fields

One of
coin_type
optional
Required. The coin type.
metadata
optional
This field will be populated with information about this coin type's 0x2::coin::CoinMetadata if it exists and has not been wrapped.
treasury
optional
This field will be populated with information about this coin type's 0x2::coin::TreasuryCap if it exists and has not been wrapped.

GetGasInfoRequest

GetGasInfoResponse

Fields

One of
reference_gas_price
optional
Reference gas price denominated in MIST

GetProtocolConfigRequest

Fields

One of
version
optional

GetProtocolConfigResponse

Fields

attributes
feature_flags
One of
max_suppported_protocol_version
optional
min_suppported_protocol_version
optional
protocol_version
optional

AttributesEntry

Fields

value

FeatureFlagsEntry

Fields

value

ListAccountObjectsRequest

Request message for NodeService.ListAccountObjects

Fields

One of
owner
optional
Required. The address of the account that owns the objects.
page_size
optional
The maximum number of entries return. The service may return fewer than this value. If unspecified, at most 50 entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
page_token
optional
A page token, received from a previous ListAccountObjects call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAccountObjects must match the call that provided the page token.

ListAccountObjectsResponse

Response message for NodeService.ListAccountObjects

Fields

objects
Page of dynamic fields owned by the specified parent.
One of
next_page_token
optional
A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

ListDynamicFieldsRequest

Request message for NodeService.ListDynamicFields

Fields

One of
page_size
optional
The maximum number of dynamic fields to return. The service may return fewer than this value. If unspecified, at most 50 entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
page_token
optional
A page token, received from a previous ListDynamicFields call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListDynamicFields must match the call that provided the page token.
parent
optional
Required. The UID of the parent, which owns the collections of dynamic fields.

ListDynamicFieldsResponse

Response message for NodeService.ListDynamicFields

Fields

dynamic_fields
repeated
Page of dynamic fields owned by the specified parent.
One of
next_page_token
optional
A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

RegulatedCoinMetadata

Information about a regulated coin, which indicates that it makes use of the transfer deny list.

Fields

One of
coin_metadata_object
optional
The ID of the coin's CoinMetadata object.
deny_cap_object
optional
The ID of the coin's DenyCap object.
id
optional
ObjectId of the 0x2::coin::RegulatedCoinMetadata object.

ResolveTransactionRequest

Fields

One of
read_mask
optional
unresolved_transaction
optional
TODO FIX TYPE Json unresolved transaction type

ResolveTransactionResponse

Fields

One of
simulation
transaction_bcs
optional

SimulateTransactionRequest

Fields

One of
read_mask
optional
transaction_bcs
optional

SimulateTransactionResponse

Fields

balance_changes
One of
effects_bcs
optional
events_bcs
optional

sui/node/v2alpha/subscription_service.proto

The sui.node.v2alpha package contains experimental services that have yet to stabilize

Everything in here is subject to change and there is no gaurentee about stability or breaking changes.

SubscribeCheckpointsRequest

Request message for SubscriptionService.SubscribeCheckpoints

Fields

One of
read_mask
optional
Optional. Mask for specifiying which parts of the SubscribeCheckpointsResponse should be returned.

SubscribeCheckpointsResponse

Response message for SubscriptionService.SubscribeCheckpoints

Fields

One of
checkpoint
The requested data for this checkpoint
cursor
optional
Required. The checkpoint sequence number and value of the current cursor into the checkpoint stream

sui/types/signature_scheme.proto

sui/types/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.

ActiveJwk

A new JWK.

Fields

One of
epoch
optional
Most recent epoch in which the JWK was validated.
id
optional
Identifier used to uniquely identify a JWK.
jwk
optional
The JWK.

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

One of
address
optional
32-byte address.

AddressDeniedForCoinError

Address is denied for this coin type.

Fields

One of
address
optional
Denied address.
coin_type
optional
Coin type.

Argument

An argument to a programmable transaction command.

Fields

One of
gas
The gas coin. The gas coin can only be used by-ref, except for with TransferObjects, which can use it by-value.
input
One of the input objects or primitive values (from ProgrammableTransaction inputs).
nested_result
Like a 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.
result
The result of another command (from ProgrammableTransaction commands).

AuthenticatorStateExpire

Expire old JWKs.

Fields

One of
authenticator_object_initial_shared_version
optional
The initial version of the authenticator object that it was shared at.
min_epoch
optional
Expire JWKs that have a lower epoch than this.

AuthenticatorStateUpdate

Update the set of valid JWKs.

Fields

new_active_jwks
repeated
Newly active JWKs.
One of
authenticator_object_initial_shared_version
optional
The initial version of the authenticator object that it was shared at.
epoch
optional
Epoch of the authenticator state update transaction.
round
optional
Consensus round of the authenticator state update.

Bcs

Message that represents a type that is serialized and encoded using the BCS format.

Fields

One of
bcs
optional
Bytes of a BCS encoded value.

Bn254FieldElement

A point on the BN254 elliptic curve.

Fields

One of
element
optional
32-byte big-endian field element.

CancelledTransaction

A transaction that was cancelled.

Fields

version_assignments
List of object version assignments.
One of
digest
optional
Digest of the cancelled transaction.

CancelledTransactions

Set of cancelled transactions.

Fields

cancelled_transactions

ChangeEpoch

System transaction used to change the epoch.

Fields

system_packages
System packages (specifically framework and Move stdlib) that are written before the new epoch starts. This tracks framework upgrades on chain. When executing the 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.
One of
computation_charge
optional
The total amount of gas charged for computation during the epoch.
epoch
optional
The next (to become) epoch ID.
epoch_start_timestamp_ms
optional
Unix timestamp when epoch started.
non_refundable_storage_fee
optional
The non-refundable storage fee.
protocol_version
optional
The protocol version in effect in the new epoch.
storage_charge
optional
The total amount of gas charged for storage during the epoch.
storage_rebate
optional
The amount of storage rebate refunded to the txn senders.

ChangedObject

Input/output state of an object that was changed during execution.

Fields

One of
created
deleted
exist
Object existed prior to this transaction.
none
not_exist
Object did not exist prior to this transaction.
object_id
optional
ID of the object.
object_write
Object was written, including all of mutated, created, unwrapped.
package_write
Package was written.
removed
Object was removed from the store due to this transaction.

CheckpointCommitment

A commitment made by a checkpoint.

Fields

One of
ecmh_live_object_set
An elliptic curve multiset hash attesting to the set of objects that comprise the live state of the Sui blockchain.

CheckpointContents

The committed to contents of a checkpoint.

Fields

One of
v1

V1

Version 1 of CheckpointContents.

Fields

transactions

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.

CheckpointSummarys 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. CheckpointSummarys are signed and certified by a quorum of the validator committee in a given epoch to allow verification of the chain's state.

Fields

commitments
Commitments to checkpoint-specific state.
One of
content_digest
optional
The hash of the CheckpointContents for this checkpoint.
end_of_epoch_data
Extra data only present in the final checkpoint of an epoch.
epoch
optional
Epoch that this checkpoint belongs to.
epoch_rolling_gas_cost_summary
The running total gas costs of all transactions included in the current epoch so far until this checkpoint.
previous_digest
optional
The hash of the previous CheckpointSummary. This will be None only for the first, or genesis, checkpoint.
sequence_number
optional
The height of this checkpoint.
timestamp_ms
optional
Timestamp of the checkpoint - number of milliseconds from the Unix epoch Checkpoint timestamps are monotonic, but not strongly monotonic - subsequent checkpoints can have the same timestamp if they originate from the same underlining consensus commit.
total_network_transactions
optional
Total number of transactions committed since genesis, including those in this checkpoint.
version_specific_data
optional
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

signatures
Set of user signatures that authorized the transaction.
One of
effects
optional
Digest of the effects.
transaction
optional
Digest of the transaction.

CircomG1

A G1 point.

Fields

One of

CircomG2

A G2 point.

Fields

One of

Command

A single command in a programmable transaction.

Fields

One of
make_move_vector
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.
merge_coins
(&mut Coin<T>, Vec<Coin<T>>) It merges n-coins into the first coin.
move_call
A call to either an entry or a public Move function.
publish
Publishes a Move package. It takes the package bytes and a list of the package's transitive dependencies to link against on chain.
split_coins
(&mut Coin<T>, Vec<u64>) -> Vec<Coin<T>> It splits off some amounts into new coins with those amounts.
transfer_objects
(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.
upgrade
Upgrades a Move package. Takes (in order): 1. A vector of serialized modules for the package. 2. A vector of object ids for the transitive dependencies of the new package. 3. The object ID of the package being upgraded. 4. An argument holding the 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

One of
argument
optional
Position of the problematic argument.
index_out_of_bounds
Out of bounds access to input or results.
invalid_argument_to_private_entry_function
Invalid argument to private entry function. Private entry functions cannot take arguments from other Move functions.
invalid_bcs_bytes
The argument cannot be deserialized into a value of the specified type.
invalid_gas_coin_usage
Invalid usage of gas coin. The gas coin can only be used by-value with a TransferObject command.
invalid_object_by_mut_ref
Immutable objects cannot be passed by mutable reference, &mut.
invalid_object_by_value
Immutable objects cannot be passed by-value.
invalid_result_arity
Invalid usage of result. Expected a single result but found either no return value or multiple.
invalid_usage_of_pure_argument
The argument cannot be instantiated from raw bytes.
invalid_value_usage
Invalid usage of Move value. - Mutably borrowed values require unique usage. - Immutably borrowed values cannot be taken or borrowed mutably. - Taken values cannot be used again.
secondary_index_out_of_bounds
Out of bounds access to subresult.
shared_object_operation_not_allowed
Shared object operations such as wrapping, freezing, or converting to owned are not allowed.
type_mismatch
The type of the value does not match the expected type.

CongestedObjectsError

Set of objects that were congested, leading to the transaction's cancellation.

Fields

congested_objects
repeated
Set of congested objects.

ConsensusCommitPrologue

Consensus commit prologue system transaction.

This message can represent V1, V2, and V3 prologue types.

Fields

One of
commit_timestamp_ms
optional
Unix timestamp from consensus. Present in V1, V2, and V3.
consensus_commit_digest
optional
Digest of consensus output. Present in V2 and V3.
consensus_determined_version_assignments
Stores consensus handler determined shared object version assignments. Present in V3.
epoch
optional
Epoch of the commit prologue transaction. Present in V1, V2, and V3.
round
optional
Consensus round of the commit. Present in V1, V2, and V3.
sub_dag_index
optional
The sub DAG index of the consensus commit. This field is populated if there are multiple consensus commits per round. Present in V3.

ConsensusDeterminedVersionAssignments

Version assignments performed by consensus.

Fields

One of
cancelled_transactions
Cancelled transaction version assignment.

Digest

32-byte output of hashing a Sui structure using the Blake2b256 hash function.

Fields

One of
digest
optional
32-byte hash.

EndOfEpochData

Data, which when included in a CheckpointSummary, signals the end of an Epoch.

Fields

epoch_commitments
Commitments to epoch specific state (live object set)
next_epoch_committee
The set of validators that will be in the ValidatorCommittee for the next epoch.
One of
next_epoch_protocol_version
optional
The protocol version that is in effect during 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

transactions

EndOfEpochTransactionKind

Operation run at the end of an epoch.

Fields

One of
authenticator_state_create
Create and initialize the authenticator object used for zklogin.
authenticator_state_expire
Expire JWKs used for zklogin.
bridge_committee_init
Initialize the bridge committee.
bridge_state_create
Create and initialize the bridge object.
change_epoch
End the epoch and start the next one.
deny_list_state_create
Create and initialize the deny list object.
randomness_state_create
Create and initialize the randomness object.

Event

An event.

Fields

One of
contents
optional
BCS serialized bytes of the event.
event_type
optional
The type of the event emitted.
module
optional
Module name of the top-level function invoked by a MoveCall command that triggered this event to be emitted.
package_id
optional
Package ID of the top-level function invoked by a MoveCall command that triggered this event to be emitted.
sender
optional
Address of the account that sent the transaction where this event was emitted.

ExecutionStatus

The status of an executed transaction.

Fields

One of
status
The error if success is false.
success
optional
Indicates if the transaction was successful or not.

FailureStatus

An error that can occur during the execution of a transaction.

Fields

One of
address_denied_for_coin
Address is denied for this coin type.
arity_mismatch
Parity mismatch for Move function. The number of arguments does not match the number of parameters.
certificate_denied
Certificate is on the deny list.
circular_object_ownership
Circular object ownership.
coin_balance_overflow
Coin balance overflowed an u64.
coin_type_global_pause
Coin type is globally paused for use.
command
optional
The command, if any, during which the error occurred.
command_argument_error
Invalid command argument.
effects_too_large
Post-execution errors. Effects from the transaction are too large.
execution_cancelled_due_to_randomness_unavailable
Certificate is cancelled because randomness could not be generated this epoch.
execution_cancelled_due_to_shared_object_congestion
Certificate is cancelled due to congestion on shared objects.
feature_not_yet_supported
Attempted to use feature that is not supported yet.
function_not_found
Programmable transaction errors. Function not found.
input_object_deleted
Requested shared object has been deleted.
insufficient_coin_balance
Coin errors. Insufficient coin balance for requested operation.
insufficient_gas
Insufficient gas.
invalid_gas_object
Invalid Gas object.
invalid_public_function_return_type
Invalid public Move function signature. Unsupported return type for return value.
invalid_transfer_object
Invalid transfer object, object does not have public transfer.
invariant_violation
Invariant violation.
move_abort
Move runtime abort.
move_primitive_runtime_error
MoveVm errors. Error from a non-abort instruction. Possible causes: Arithmetic error, stack overflow, max value depth, or similar.
non_entry_function_invoked
Non-entry function invoked. Move Call must start with an entry function.
object_too_big
Move object is larger than the maximum allowed size.
package_too_big
Package is larger than the maximum allowed size.
package_upgrade_error
Invalid package upgrade.
publish_error_non_zero_address
Publish/Upgrade errors. Publish error, non-zero address. The modules in the package must have their self-addresses set to zero.
publish_upgrade_dependency_downgrade
Publish or upgrade dependency downgrade. Indirect (transitive) dependency of published or upgraded package has been assigned an on-chain version that is less than the version required by one of the package's transitive dependencies.
publish_upgrade_missing_dependency
Publish or Upgrade is missing dependency.
shared_object_operation_not_allowed
The requested shared object operation is not allowed.
sui_move_verification_error
Sui Move bytecode verification error.
sui_move_verification_timedout
Sui Move bytecode verification timed out.
type_argument_error
Type argument error.
type_arity_mismatch
Type parity mismatch for Move function. Mismatch between the number of actual versus expected type arguments.
unused_value_without_drop
Unused result without the drop ability.
vm_invariant_violation
MoveVm invariant violation.
vm_verification_or_deserialization_error
Bytecode verification error.
written_objects_too_large
Indicates the transaction tried to write objects too large to storage.

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. The storage_rebate is the storage_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

One of
computation_cost
optional
Cost of computation/execution.
non_refundable_storage_fee
optional
The fee for the rebate. The portion of the storage rebate kept by the system.
storage_cost
optional
Storage cost, it's the sum of all storage cost for all objects created or mutated.
storage_rebate
optional
The amount of storage cost refunded to the user for all objects deleted or mutated in the transaction.

GasPayment

Payment information for executing a transaction.

Fields

objects
Set of gas objects to use for payment.
One of
budget
optional
Total budget willing to spend for the execution of a transaction.
owner
optional
Owner of the gas objects, either the transaction sender or a sponsor.
price
optional
Gas unit price to use when charging for computation. Must be greater than or equal to the network's current RGP (reference gas price).

GenesisObject

An object part of the initial chain state.

Fields

One of
object
optional
object_id
optional
owner
optional
version
optional

GenesisTransaction

The genesis transaction.

Fields

objects
Set of genesis objects.

I128

A signed 128-bit integer encoded in little-endian using 16-bytes.

Fields

One of
bytes
optional
16-byte little-endian bytes.

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

One of
identifier
optional

Input

An input to a user transaction.

Fields

One of
immutable_or_owned
A Move object that is either immutable or address owned.
pure
A move value serialized as BCS. For normal operations this is required to be a move primitive type and not contain structs or objects.
receiving
A Move object that is attempted to be received in this transaction.
shared
A Move object whose owner is "Shared".

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

One of
iss
optional
The issuer or identity of the OIDC provider.
kid
optional
A key ID used to uniquely identify a key from an OIDC provider.

MakeMoveVector

Command to build a Move vector out of a set of individual elements.

Fields

elements
repeated
The set individual elements to build the vector with.
One of
element_type
optional
Type of the individual elements. This is required to be set when the type can't be inferred, for example when the set of provided arguments are all pure input values.

MergeCoins

Command to merge multiple coins of the same type into a single coin.

Fields

coins_to_merge
repeated
Set of coins to merge into coin. All listed coins must be of the same type and be the same type as coin
One of
coin
optional
Coin to merge coins into.

ModifiedAtVersion

Indicates that an object was modified at a specific version.

Fields

One of
object_id
optional
ObjectId of the object.
version
optional
Version of the object prior to this transaction.

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

arguments
repeated
The arguments to the function.
type_arguments
repeated
The type arguments to the function.
One of
function
optional
The function to be called.
module
optional
The specific module in the package containing the function.
package
optional
The package containing the module and function.

MoveError

Error that occurred in Move.

Fields

One of
abort_code
optional
Abort code from Move.
location
optional
Location in Move where the error occurred.

MoveField

Fields

One of
name
optional
value
optional

MoveLocation

Location in Move bytecode where an error occurred.s

Fields

One of
function
optional
The function index.
function_name
optional
The name of the function, if available.
instruction
optional
Offset of the instruction where the error occurred.
module
optional
The module name.
package
optional
The package ID.

MoveModule

Module defined by a package.

Fields

One of
contents
optional
Serialized bytecode of the module.
name
optional
Name of the module.

MovePackage

A Move package.

Fields

linkage_table
repeated
For each dependency, maps original package ID to the info about the (upgraded) dependency version that this package is using.
modules
repeated
Set of modules defined by this package.
type_origin_table
repeated
Maps struct/module to a package version where it was first defined, stored as a vector for simple serialization and deserialization.
One of
id
optional
Address or ID of this package.
version
optional
Version of the package.

MoveStruct

A Move struct.

Fields

One of
contents
optional
BCS bytes of a Move struct value.
has_public_transfer
optional
DEPRECATED this field is no longer used to determine whether a tx can transfer this object. Instead, it is always calculated from the objects type when loaded in execution.
object_id
optional
ObjectId for this object.
object_type
optional
The type of this object.
version
optional
Version of the object.

MoveStructValue

Fields

fields
repeated
One of
struct_type
optional

MoveValue

Fields

One of
address
bool
signer
u128
u256

MoveVariant

Fields

fields
repeated
One of
enum_type
optional
tag
optional
variant_name
optional

MoveVector

Fields

values
repeated

MultisigAggregatedSignature

Aggregated signature from members of a multisig committee.

Fields

signatures
The plain signatures encoded with signature scheme. The signatures must be in the same order as they are listed in the committee.
One of
bitmap
optional
Bitmap indicating which committee members contributed to the signature.
committee
The committee to use to validate this signature.
legacy_bitmap
If present, means this signature's on-chain format uses the old legacy multisig format.

MultisigCommittee

A multisig committee.

Fields

members
A list of committee members and their corresponding weight.
One of
threshold
optional
The threshold of signatures needed to validate a signature from this committee.

MultisigMember

A member in a multisig committee.

Fields

One of
public_key
The public key of the committee member.
weight
optional
The weight of this member's signature.

MultisigMemberPublicKey

Set of valid public keys for multisig committee members.

Fields

One of
ed25519
An ed25519 public key
secp256k1
A secp256k1 public key
secp256r1
A secp256r1 public key
zklogin
A zklogin public identifier

MultisigMemberSignature

A signature from a member of a multisig committee.

Fields

One of
ed25519
An ed25519 signature.
secp256k1
A secp256k1 signature.
secp256r1
A secp256r1 signature.
zklogin
A zklogin signature.

NestedResult

An argument type for a nested result.

Fields

One of
result
optional
The command index.
subresult
optional
The index into the command's output.

Object

An object on the Sui blockchain.

Fields

One of
object
optional
object_id
optional
ObjectId for this object.
owner
optional
Owner of the object.
previous_transaction
optional
The digest of the transaction that created or last mutated this object
storage_rebate
optional
The amount of SUI to rebate if this object gets deleted. This number is re-calculated each time the object is mutated based on the present storage gas price.
version
optional
Version of the object.

ObjectData

Object data, either a package or struct.

Fields

One of

ObjectExist

Information about the old version of the object.

Fields

One of
digest
optional
Digest of the object.
owner
optional
Owner of the object.
version
optional
Version of the object.

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

One of
object_id
optional
32-byte object-id.

ObjectReference

Reference to an object.

Fields

One of
digest
optional
The digest of this object.
object_id
optional
The object ID of this object.
version
optional
The version of this object.

ObjectReferenceWithOwner

An object reference with owner information.

Fields

One of
owner
optional
Owner.
reference
ObjectReference.

ObjectWrite

Object write, including all of mutated, created, unwrapped.

Fields

One of
digest
optional
Digest of the new version of the object.
owner
optional
Owner of the new version of the object.

Owner

Enum of different types of ownership for an object.

Fields

One of
address
Object is exclusively owned by a single address, and is mutable.
immutable
Object is immutable, and hence ownership doesn't matter.
object
Object is exclusively owned by a single object, and is mutable.
shared
Object is shared, can be used by any address, and is mutable.

PackageIdDoesNotMatch

Package ID does not match PackageId in upgrade ticket.

Fields

One of
package_id
optional
The package ID.
ticket_id
optional
The ticket ID.

PackageUpgradeError

An error with a upgrading a package.

Fields

One of
digets_does_not_match
Digest in upgrade ticket and computed digest differ.
incompatible_upgrade
Package upgrade is incompatible with previous version.
not_a_package
Object is not a package.
package_id_does_not_match
Package ID does not match PackageId in upgrade ticket.
unable_to_fetch_package
Unable to fetch package.
unknown_upgrade_policy
Upgrade policy is not valid.

PackageWrite

Package write.

Fields

One of
digest
optional
Digest of the new package.
version
optional
Version of the new package.

PasskeyAuthenticator

A passkey authenticator.

See struct.PasskeyAuthenticator for more information on the requirements on the shape of the client_data_json field.

Fields

One of
authenticator_data
optional
Opaque authenticator data for this passkey signature. See Authenticator Data for more information on this field.
client_data_json
optional
Structured, unparsed, JSON for this passkey signature. See CollectedClientData for more information on this field.
signature
A secp256r1 signature.

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

commands
repeated
The commands to be executed sequentially. A failure in any command results in the failure of the entire transaction.
inputs
repeated
Input objects or primitive values.

Publish

Command to publish a new Move package.

Fields

dependencies
repeated
Set of packages that the to-be published package depends on.
modules
repeated
The serialized Move modules.

RandomnessStateUpdate

Randomness update.

Fields

One of
epoch
optional
Epoch of the randomness state update transaction.
random_bytes
optional
Updated random bytes.
randomness_object_initial_shared_version
optional
The initial version of the randomness object that it was shared at.
randomness_round
optional
Randomness round of the update.

ReadOnlyRoot

Read-only shared object from the input.

Fields

One of
digest
optional
Digest of the shared object.
version
optional
Version of the shared object.

RoaringBitmap

A RoaringBitmap. See RoaringFormatSpec for the specification for the serialized format of RoaringBitmaps.

Fields

One of
bitmap
optional
Serialized RoaringBitmap.

SharedObjectInput

A shared object input.

Fields

One of
initial_shared_version
optional
Initial version of the object when it was shared.
mutable
optional
Controls whether the caller asks for a mutable reference to the shared object.
object_id
optional
ObjectId of the shared object.

SimpleSignature

A basic signature.

Can either be an ed25519, secp256k1, or secp256r1 signature with corresponding public key.

Fields

One of
public_key
optional
Public key bytes.
scheme
optional
The signature scheme of the signautre and public key, which should be an enum value of [sui.types.SignatureScheme][sui.types.SignatureScheme]
signature
optional
Signature bytes.

SizeError

A size error.

Fields

One of
max_size
optional
The maximum allowable size.
size
optional
The offending size.

SplitCoins

Command to split a single coin object into multiple coins.

Fields

amounts
repeated
The amounts to split off.
One of
coin
optional
The coin to split.

StructTag

Type information for a Move struct.

Fields

type_parameters
repeated
List of type parameters, if any.
One of
address
optional
Address of the package where this type was defined.
module
optional
Name of the module where this type was defined.
name
optional
Name of the type itself.

SystemPackage

System package.

Fields

dependencies
repeated
Package dependencies.
modules
repeated
Move modules.
One of
version
optional
Version of the package.

Transaction

A transaction.

Fields

TransactionV1

Version 1 of Transaction.

Fields

One of
expiration
gas_payment
optional
kind
sender
optional

TransactionEffects

The output or effects of executing a transaction.

Fields

TransactionEffectsV1

Version 1 of TransactionEffects.

Fields

created
ObjectReference and owner of new objects created.
deleted
Object refs of objects now deleted (the new refs).
dependencies
repeated
The set of transaction digests this transaction depends on.
modified_at_versions
The version that every modified (mutated or deleted) object had before it was modified by this transaction.
mutated
ObjectReference and owner of mutated objects, including gas object.
shared_objects
The object references of the shared objects used in this transaction. Empty if no shared objects were used.
unwrapped
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.
unwrapped_then_deleted
Object refs of objects previously wrapped in other objects but now deleted.
wrapped
Object refs of objects now wrapped in other objects.
One of
epoch
optional
The epoch when this transaction was executed.
events_digest
optional
The digest of the events emitted during execution, can be None if the transaction does not emit any event.
gas_object
The updated gas object reference. Have a dedicated field for convenient access. It's also included in mutated.
gas_used
The gas used by this transaction.
status
The status of the execution.
transaction_digest
optional
The transaction digest.

TransactionEffectsV2

Version 2 of TransactionEffects.

Fields

changed_objects
Objects whose state are changed in the object store.
dependencies
repeated
The set of transaction digests this transaction depends on.
unchanged_shared_objects
Shared objects that are not mutated in this transaction. Unlike owned objects, read-only shared objects' version are not committed in the transaction, and in order for a node to catch up and execute it without consensus sequencing, the version needs to be committed in the effects.
One of
auxiliary_data_digest
optional
Auxiliary data that are not protocol-critical, generated as part of the effects but are stored separately. Storing it separately allows us to avoid bloating the effects with data that are not critical. It also provides more flexibility on the format and type of the data.
epoch
optional
The epoch when this transaction was executed.
events_digest
optional
The digest of the events emitted during execution, can be None if the transaction does not emit any event.
gas_object_index
optional
The updated gas object reference, as an index into the changed_objects vector. Having a dedicated field for convenient access. System transaction that don't require gas will leave this as None.
gas_used
The gas used by this transaction.
lamport_version
optional
The version number of all the written Move objects by this transaction.
status
The status of the execution.
transaction_digest
optional
The transaction digest.

TransactionEvents

Events emitted during the successful execution of a transaction.

Fields

events
repeated

TransactionExpiration

A TTL for a transaction.

Fields

One of
epoch
Validators won't sign and execute transaction unless the expiration epoch is greater than or equal to the current epoch.
none
The transaction has no expiration.

TransactionKind

Transaction type.

Fields

One of
authenticator_state_update
Update set of valid JWKs used for zklogin.
change_epoch
System transaction used to end an epoch. The ChangeEpoch variant is now deprecated (but the ChangeEpoch struct is still used by EndOfEpochTransaction).
consensus_commit_prologue_v1
V1 consensus commit update.
consensus_commit_prologue_v2
V2 consensus commit update.
consensus_commit_prologue_v3
V3 consensus commit update.
end_of_epoch
Set of operations to run at the end of the epoch to close out the current epoch and start the next one.
genesis
Transaction used to initialize the chain state. Only valid if in the genesis checkpoint (0) and if this is the very first transaction ever executed on the chain.
programmable_transaction
A user transaction comprised of a list of native commands and Move calls.
randomness_state_update
Randomness update.

TransferObjects

Command to transfer ownership of a set of objects to an address.

Fields

objects
repeated
Set of objects to transfer.
One of
address
optional
The address to transfer ownership to.

TypeArgumentError

Type argument error.

Fields

One of
constraint_not_satisfied
A type provided did not match the specified constraint.
type_argument
optional
Index of the problematic type argument.
type_not_found
A type was not found in the module specified.

TypeOrigin

Identifies a struct and the module it was defined in.

Fields

One of
module_name
optional
package_id
optional
struct_name
optional

TypeTag

Type of a Move value.

Fields

One of
address
bool
signer
struct
u128
u256
vector

U128

An unsigned 128-bit integer encoded in little-endian using 16-bytes.

Fields

One of
bytes
optional
16-byte little-endian bytes.

U256

An unsigned 256-bit integer encoded in little-endian using 32-bytes.

Fields

One of
bytes
optional
16-byte little-endian bytes.

UnchangedSharedObject

A shared object that wasn't changed during execution.

Fields

One of
cancelled
Shared objects that was congested and resulted in this transaction being cancelled.
mutate_deleted
Deleted shared objects that appear mutably/owned in the input.
object_id
optional
ObjectId of the shared object.
per_epoch_config
Read of a per-epoch config object that should remain the same during an epoch.
read_deleted
Deleted shared objects that appear as read-only in the input.
read_only_root
Read-only shared object from the input.

Upgrade

Command to upgrade an already published package.

Fields

dependencies
repeated
Set of packages that the to-be published package depends on.
modules
repeated
The serialized Move modules.
One of
package
optional
Package ID of the package to upgrade.
ticket
optional
Ticket authorizing the upgrade.

UpgradeInfo

Upgraded package info for the linkage table.

Fields

One of
original_id
optional
ID of the original package.
upgraded_id
optional
ID of the upgraded package.
upgraded_version
optional
Version of the upgraded package.

UserSignature

A signature from a user.

Fields

ValidatorAggregatedSignature

An aggregated signature from multiple validators.

Fields

One of
bitmap
Bitmap indicating which members of the committee contributed to this signature.
epoch
optional
The epoch when this signature was produced. This can be used to lookup the ValidatorCommittee from this epoch to verify this signature.
signature
optional
The 48-byte Bls12381 aggregated signature.

ValidatorCommittee

The validator set for a particular epoch.

Fields

members
The committee members.
One of
epoch
optional
The epoch where this committee governs.

ValidatorCommitteeMember

A member of a validator committee.

Fields

One of
public_key
optional
The 96-byte Bls12381 public key for this validator.
stake
optional
Stake weight this validator possesses.

VersionAssignment

Object version assignment from consensus.

Fields

One of
object_id
optional
ObjectId of the object.
version
optional
Assigned version.

ZkLoginAuthenticator

A zklogin authenticator.

Fields

One of
inputs
Zklogin proof and inputs required to perform proof verification.
max_epoch
optional
Maximum epoch for which the proof is valid.
signature
User signature with the public key attested to by the provided proof.

ZkLoginClaim

A claim of the iss in a zklogin proof.

Fields

One of
index_mod_4
optional
value
optional

ZkLoginInputs

A zklogin groth16 proof and the required inputs to perform proof verification.

Fields

One of
address_seed
header_base64
optional
iss_base64_details
optional
proof_points
optional

ZkLoginProof

A zklogin groth16 proof.

Fields

One of
a
optional
b
optional
c
optional

ZkLoginPublicIdentifier

Public key equivalent for zklogin authenticators.

Fields

One of
address_seed
iss
optional

Scalar Value Types

double

C++
double
C#
double
Go
float64
Java
double
PHP
float
Python
float
Ruby
Float

float

C++
float
C#
float
Go
float32
Java
float
PHP
float
Python
float
Ruby
Float

int32

Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.

C++
int32
C#
int
Go
int32
Java
int
PHP
integer
Python
int
Ruby
Bignum or Fixnum (as required)

int64

Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.

C++
int64
C#
long
Go
int64
Java
long
PHP
integer/string
Python
int/long
Ruby
Bignum

uint32

Uses variable-length encoding.

C++
uint32
C#
uint
Go
uint32
Java
int
PHP
integer
Python
int/long
Ruby
Bignum or Fixnum (as required)

uint64

Uses variable-length encoding.

C++
uint64
C#
ulong
Go
uint64
Java
long
PHP
integer/string
Python
int/long
Ruby
Bignum or Fixnum (as required)

sint32

Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.

C++
int32
C#
int
Go
int32
Java
int
PHP
integer
Python
int
Ruby
Bignum or Fixnum (as required)

sint64

Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.

C++
int64
C#
long
Go
int64
Java
long
PHP
integer/string
Python
int/long
Ruby
Bignum

fixed32

Always four bytes. More efficient than uint32 if values are often greater than 2^28.

C++
uint32
C#
uint
Go
uint32
Java
int
PHP
integer
Python
int
Ruby
Bignum or Fixnum (as required)

fixed64

Always eight bytes. More efficient than uint64 if values are often greater than 2^56.

C++
uint64
C#
ulong
Go
uint64
Java
long
PHP
integer/string
Python
int/long
Ruby
Bignum

sfixed32

Always four bytes.

C++
int32
C#
int
Go
int32
Java
int
PHP
integer
Python
int
Ruby
Bignum or Fixnum (as required)

sfixed64

Always eight bytes.

C++
int64
C#
long
Go
int64
Java
long
PHP
integer/string
Python
int/long
Ruby
Bignum

bool

C++
bool
C#
bool
Go
bool
Java
boolean
PHP
boolean
Python
boolean
Ruby
TrueClass/FalseClass

string

A string must always contain UTF-8 encoded or 7-bit ASCII text.

C++
string
C#
string
Go
string
Java
String
PHP
string
Python
str/unicode
Ruby
String (UTF-8)

bytes

May contain any arbitrary sequence of bytes.

C++
string
C#
ByteString
Go
[]byte
Java
ByteString
PHP
string
Python
str
Ruby
String (ASCII-8BIT)