Skip to main content

Full Node Protocol

The Full node protocol ...

sui.node.v2.proto

BalanceChange

Fields

One of
address
optional
amount
optional
coin_type
optional

BalanceChanges

Fields

balance_changes

EffectsFinality

Fields

One of
checkpointed
quorum_executed

ExecuteTransactionOptions

Fields

One of
balance_changes
optional
Include the BalanceChanges in the response.Defaults to false if not included
effects
optional
Include the sui.types.TransactionEffects message in the response.Defaults to false if not included
effects_bcs
optional
Include the TransactionEffects formatted as BCS in the response.Defaults to false if not included
events
optional
Include the sui.types.TransactionEvents message in the response.Defaults to false if not included
events_bcs
optional
Include the TransactionEvents formatted as BCS in the response.Defaults to false if not included

ExecuteTransactionRequest

Fields

One of
signatures
signatures_bytes
transaction
optional
transaction_bcs
optional

ExecuteTransactionResponse

Fields

One of
balance_changes
effects
effects_bcs
optional
events
events_bcs
optional
finality

FullCheckpointObject

Fields

One of
digest
optional
The digest of this object
object
optional
object_bcs
optional
object_id
optional
version
optional

FullCheckpointObjects

Fields

objects

FullCheckpointTransaction

Fields

One of
digest
optional
The digest of this transaction
effects
effects_bcs
optional
events
events_bcs
optional
input_objects
output_objects
transaction
optional
transaction_bcs
optional

GetCheckpointOptions

Fields

One of
contents
optional
Include the sui.types.CheckpointContents message in the response.Defaults to false if not included
contents_bcs
optional
Include the CheckpointContents formatted as BCS in the response.Defaults to false if not included
signature
optional
Include the sui.types.ValidatorAggregatedSignature in the response.Defaults to false if not included
summary
optional
Include the sui.types.CheckpointSummary in the response.Defaults to false if not included
summary_bcs
optional
Include the CheckpointSummary formatted as BCS in the response.Defaults to false if not included

GetCheckpointRequest

Fields

One of
digest
optional
options
sequence_number
optional

GetCheckpointResponse

Fields

One of
contents
contents_bcs
optional
digest
optional
The digest of this Checkpoint's CheckpointSummary
sequence_number
optional
The sequence number of this Checkpoint
summary
summary_bcs
optional

GetCommitteeRequest

Fields

One of
epoch
optional

GetCommitteeResponse

Fields

One of
committee

GetFullCheckpointOptions

Fields

One of
contents
optional
Include the sui.types.CheckpointContents message in the response.Defaults to false if not included
contents_bcs
optional
Include the CheckpointContents formatted as BCS in the response.Defaults to false if not included
effects
optional
Include the sui.types.TransactionEffects message in the response.Defaults to false if not included
effects_bcs
optional
Include the TransactionEffects formatted as BCS in the response.Defaults to false if not included
events
optional
Include the sui.types.TransactionEvents message in the response.Defaults to false if not included
events_bcs
optional
Include the TransactionEvents formatted as BCS in the response.Defaults to false if not included
input_objects
optional
Include the input objects for transactions in the response.Defaults to false if not included
object
optional
Include the sui.types.Object message in the response.Defaults to false if not included
object_bcs
optional
Include the Object formatted as BCS in the response.Defaults to false if not included
output_objects
optional
Include the output objects for transactions in the response.Defaults to false if not included
signature
optional
Include the sui.types.ValidatorAggregatedSignature in the response.Defaults to false if not included
summary
optional
Include the sui.types.CheckpointSummary in the response.Defaults to false if not included
summary_bcs
optional
Include the CheckpointSummary formatted as BCS in the response.Defaults to false if not included
transaction
optional
Include the sui.types.Transaction message in the response.Defaults to false if not included
transaction_bcs
optional
Include the Transaction formatted as BCS in the response.Defaults to false if not included

GetFullCheckpointRequest

Fields

One of
digest
optional
sequence_number
optional

GetFullCheckpointResponse

Fields

transactions
One of
contents
contents_bcs
optional
digest
optional
The digest of this Checkpoint's CheckpointSummary
sequence_number
optional
The sequence number of this Checkpoint
summary
summary_bcs
optional

GetNodeInfoRequest

GetNodeInfoResponse

Fields

One of
chain
optional
Human readable name of the chain that this Node is on
chain_id
optional
The chain identifier of the chain that this Node is on
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 is available
lowest_available_checkpoint_objects
optional
The lowest checkpoint for which object data is available
software_version
optional
timestamp
optional
Unix timestamp of the most recently executed checkpoint

GetObjectOptions

Fields

One of
object
optional
Include the sui.types.Object message in the response.Defaults to false if not included
object_bcs
optional
Include the Object formatted as BCS in the response.Defaults to false if not included

GetObjectRequest

Fields

One of
object_id
optional
options
version
optional

GetObjectResponse

Fields

One of
digest
optional
The digest of this object
object
optional
object_bcs
optional
object_id
optional
version
optional

GetTransactionOptions

Fields

One of
effects
optional
Include the sui.types.TransactionEffects message in the response.Defaults to false if not included
effects_bcs
optional
Include the TransactionEffects formatted as BCS in the response.Defaults to false if not included
events
optional
Include the sui.types.TransactionEvents message in the response.Defaults to false if not included
events_bcs
optional
Include the TransactionEvents formatted as BCS in the response.Defaults to false if not included
signatures
optional
Include the set of sui.types.UserSignature's in the response.Defaults to false if not included
signatures_bytes
optional
Include the set of UserSignature's encoded as bytes in the response.Defaults to false if not included
transaction
optional
Include the sui.types.Transaction message in the response.Defaults to false if not included
transaction_bcs
optional
Include the Transaction formatted as BCS in the response.Defaults to false if not included

GetTransactionRequest

Fields

One of
digest
optional
options

GetTransactionResponse

Fields

One of
checkpoint
optional
digest
optional
The digest of this transaction
effects
effects_bcs
optional
events
events_bcs
optional
signatures
signatures_bytes
timestamp
optional
transaction
optional
transaction_bcs
optional

UserSignatures

Fields

signatures

UserSignaturesBytes

Fields

signatures
repeated

sui.types.proto

ActiveJwk

Fields

One of
epoch
optional
id
optional
jwk
optional

Address

Fields

One of
address
optional

AddressDeniedForCoinError

Fields

One of
address
optional
coin_type
optional

Argument

Fields

One of
input
nested_result
result

AuthenticatorStateExpire

Fields

One of
authenticator_object_initial_shared_version
optional
min_epoch
optional

AuthenticatorStateUpdate

Fields

new_active_jwks
repeated
One of
authenticator_object_initial_shared_version
optional
epoch
optional
round
optional

Bcs

Fields

One of
bcs
optional

Bn254FieldElement

Fields

One of
element
optional

CancelledTransaction

Fields

version_assignments
One of
digest
optional

CancelledTransactions

Fields

cancelled_transactions

ChangeEpoch

Fields

system_packages
System packages (specifically framework and move stdlib) that are written before the newepoch starts. This tracks framework upgrades on chain. When executing the ChangeEpoch txn,the validator must write out the modules below. Modules are provided with the version theywill be upgraded to, their modules in serialized form (which include their package ID), anda 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

Fields

One of
created
deleted
none
not_exist
object_id
optional
object_write
package_write
removed

CheckpointCommitment

Fields

One of
ecmh_live_object_set

CheckpointContents

Fields

One of
v1

V1

Fields

transactions

CheckpointSummary

Fields

commitments
One of
content_digest
optional
end_of_epoch_data
epoch
optional
epoch_rolling_gas_cost_summary
previous_digest
optional
sequence_number
optional
timestamp_ms
optional
total_network_transactions
optional
version_specific_data
optional

CheckpointedTransactionInfo

Fields

signatures
One of
effects
optional
EffectsDigest
transaction
optional
TransactionDigest

CircomG1

Fields

One of

CircomG2

Fields

One of

Command

Fields

One of
make_move_vector
merge_coins
move_call
publish
split_coins
transfer_objects
upgrade

CommandArgumentError

Fields

One of
argument
optional
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 TransferObjects 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 a wrapping, freezing, or converting to owned are not allowed.
type_mismatch
The type of the value does not match the expected type

CongestedObjectsError

Fields

congested_objects
repeated

ConsensusCommitPrologue

Fields

One of
commit_timestamp_ms
optional
consensus_commit_digest
optional
consensus_determined_version_assignments
epoch
optional
round
optional
sub_dag_index
optional

ConsensusDeterminedVersionAssignments

Fields

One of
cancelled_transactions

Digest

Fields

One of
digest
optional

EndOfEpochData

Fields

epoch_commitments
next_epoch_committee
One of
next_epoch_protocol_version
optional

EndOfEpochTransaction

Fields

transactions

EndOfEpochTransactionKind

Fields

One of
authenticator_state_create
Use higher field numbers for kinds which happen infrequently
authenticator_state_expire
bridge_committee_init
bridge_state_create
change_epoch
deny_list_state_create
randomness_state_create

Event

Fields

One of
contents
optional
event_type
optional
module
optional
package_id
optional
sender
optional

ExecutionStatus

Fields

One of
status
success
optional

FailureStatus

Fields

One of
address_denied_for_coin
Address is denied for this coin type
arity_mismatch
Arity 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
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 used 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, etc."
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 arity 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

Fields

One of
computation_cost
optional
non_refundable_storage_fee
optional
storage_cost
optional
storage_rebate
optional

GasPayment

Fields

objects
One of
budget
optional
owner
optional
price
optional

GenesisObject

Fields

One of
object
optional
object_id
optional
owner
optional
version
optional

GenesisTransaction

Fields

objects

I128

Little-endian encoded i128

Fields

One of
bytes
optional

Identifier

Fields

One of
identifier
optional

Input

Fields

One of
immutable_or_owned
pure

Jwk

Fields

JwkId

Fields

One of
iss
optional
kid
optional

MakeMoveVector

Fields

elements
repeated
One of
element_type
optional

MergeCoins

Fields

coins_to_merge
repeated
One of
coin
optional

ModifiedAtVersion

Fields

One of
object_id
optional
version
optional

MoveCall

Fields

arguments
repeated
type_arguments
repeated
One of
function
optional
module
optional
package
optional

MoveError

Fields

One of
abort_code
optional
location
optional

MoveField

Fields

One of
name
optional
value
optional

MoveLocation

Fields

One of
function
optional
function_name
optional
instruction
optional
module
optional
package
optional

MoveModule

Fields

One of
contents
optional
name
optional

MovePackage

Fields

linkage_table
repeated
modules
repeated
type_origin_table
repeated
One of
id
optional
version
optional

MoveStruct

Fields

One of
contents
optional
has_public_transfer
optional
object_id
optional
object_type
optional
version
optional

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

Fields

signatures
One of
bitmap
optional
committee
legacy_bitmap

MultisigCommittee

Fields

members
One of
threshold
optional

MultisigMember

Fields

One of
public_key
weight
optional

MultisigMemberPublicKey

Fields

One of
ed25519
secp256k1
secp256r1

MultisigMemberSignature

Fields

One of
ed25519
secp256k1
secp256r1

NestedResult

Fields

One of
result
optional
subresult
optional

Object

Fields

One of
object
optional
object_id
optional
owner
optional
previous_transaction
optional
storage_rebate
optional
version
optional

ObjectData

Fields

One of

ObjectExist

Fields

One of
digest
optional
owner
optional
version
optional

ObjectId

Fields

One of
object_id
optional

ObjectReference

Fields

One of
digest
optional
object_id
optional
version
optional

ObjectReferenceWithOwner

Fields

One of
owner
optional
reference

ObjectWrite

Fields

One of
digest
optional
owner
optional

Owner

Fields

One of
address
immutable
object
shared

PackageIdDoesNotMatch

Fields

One of
object_id
optional
package_id
optional

PackageUpgradeError

Fields

One of
digets_does_not_match
incompatible_upgrade
not_a_package
package_id_does_not_match
unable_to_fetch_package
unknown_upgrade_policy

PackageWrite

Fields

One of
digest
optional
version
optional

PasskeyAuthenticator

Fields

One of
authenticator_data
optional
client_data_json
optional
signature

ProgrammableTransaction

Fields

commands
repeated
inputs
repeated

Publish

Fields

dependencies
repeated
modules
repeated

RandomnessStateUpdate

Fields

One of
epoch
optional
random_bytes
optional
randomness_object_initial_shared_version
optional
randomness_round
optional

ReadOnlyRoot

Fields

One of
digest
optional
version
optional

RoaringBitmap

Fields

One of
bitmap
optional

SharedObjectInput

Fields

One of
initial_shared_version
optional
mutable
optional
object_id
optional

SimpleSignature

Fields

One of
public_key
optional
scheme
signature
optional

SizeError

Fields

One of
max_size
optional
size
optional

SplitCoins

Fields

amounts
repeated
One of
coin
optional

StructTag

Fields

type_parameters
repeated
One of
address
optional
module
optional
name
optional

SystemPackage

Fields

dependencies
repeated
modules
repeated
One of
version
optional

Transaction

Fields

TransactionV1

Fields

One of
expiration
gas_payment
optional
kind
sender
optional

TransactionEffects

Fields

TransactionEffectsV1

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
status
The status of the execution
transaction_digest
optional
The transaction digest

TransactionEffectsV2

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
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

Fields

events
repeated

TransactionExpiration

Fields

One of
epoch
none

TransactionKind

Fields

One of
authenticator_state_update
change_epoch
consensus_commit_prologue_v1
consensus_commit_prologue_v2
consensus_commit_prologue_v3
programmable_transaction
randomness_state_update

TransferObjects

Fields

objects
repeated
One of
address
optional

TypeArgumentError

Fields

One of
constraint_not_satisfied
type_argument
optional
type_not_found

TypeOrigin

Fields

One of
module_name
optional
package_id
optional
struct_name
optional

TypeTag

Fields

One of
address
bool
signer
struct
u128
u256
vector

U128

Little-endian encoded u128

Fields

One of
bytes
optional

U256

Little-endian encoded u256

Fields

One of
bytes
optional

UnchangedSharedObject

Fields

One of
cancelled
mutate_deleted
object_id
optional
per_epoch_config
read_deleted
read_only_root

Upgrade

Fields

dependencies
repeated
modules
repeated
One of
package
optional
ticket
optional

UpgradeInfo

Fields

One of
original_id
optional
upgraded_id
optional
upgraded_version
optional

UserSignature

Fields

ValidatorAggregatedSignature

Fields

One of
bitmap
epoch
optional
signature
optional

ValidatorCommittee

Fields

One of
epoch
optional

ValidatorCommitteeMember

Fields

One of
public_key
optional
stake
optional

VersionAssignment

Fields

One of
object_id
optional
version
optional

ZkLoginAuthenticator

Fields

One of
inputs
max_epoch
optional
signature

ZkLoginClaim

Fields

One of
index_mod_4
optional
value
optional

ZkLoginInputs

Fields

One of
address_seed
header_base64
optional
iss_base64_details
optional
proof_points
optional

ZkLoginProof

Fields

One of
a
optional
b
optional
c
optional

ZkLoginPublicIdentifier

Fields

One of
address_seed
iss
optional

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. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. 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 (i.e. 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, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard datetime.datetime object can be converted to this format using strftime with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one 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. Negativesecond values with fractions must still have non-negative nanos valuesthat count forward in time. Must be from 0 to 999,999,999inclusive.
seconds
Represents seconds of UTC time since Unix epoch1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to9999-12-31T23:59:59Z inclusive.

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)