Home

gRPC

NOWNodes provides access to the SUI gRPC API, allowing developers to query blockchain data, read objects, inspect transactions, execute or simulate transactions, resolve SuiNS names, verify signatures, and subscribe to checkpoint streams using Protocol Buffers and gRPC.

SUI gRPC API

NOWNodes provides access to the SUI gRPC API, allowing developers to query blockchain data, read objects, inspect transactions, execute or simulate transactions, resolve SuiNS names, verify signatures, and subscribe to checkpoint streams using Protocol Buffers and gRPC.


Endpoint

Copied!
sui-grpc.nownodes.io

Authentication

All requests must include your NOWNodes API key as gRPC metadata.

Copied!
api-key: YOUR_API_KEY

Proto files

SUI gRPC methods are described in .proto files.

Download the SUI proto files from:

Copied!
https://github.com/NOWNodes/sui-apis-grpc

Clone the repository:

Copied!
git clone https://github.com/NOWNodes/sui-apis-grpc

The SUI gRPC proto files are located here:

Copied!
sui-apis-grpc/proto/sui/rpc/v2

The proto root directory should be:

Copied!
sui-apis-grpc/proto

Use this directory as the import path in tools such as grpcurl or Postman.


Available services

ServiceProto fileDescription
sui.rpc.v2.LedgerServiceledger_service.protoReads ledger data such as objects, transactions, checkpoints, epochs, and service status.
sui.rpc.v2.StateServicestate_service.protoReads live state data such as owned objects, dynamic fields, balances, and coin metadata.
sui.rpc.v2.TransactionExecutionServicetransaction_execution_service.protoExecutes or simulates SUI transactions.
sui.rpc.v2.MovePackageServicemove_package_service.protoReads Move package metadata, datatypes, functions, and package versions.
sui.rpc.v2.SignatureVerificationServicesignature_verification_service.protoVerifies user signatures against supported SUI message types.
sui.rpc.v2.SubscriptionServicesubscription_service.protoProvides server-streaming subscriptions, such as checkpoint streaming.
sui.rpc.v2.NameServicename_service.protoResolves SuiNS names and reverse-resolves addresses to names.

LedgerService

The LedgerService provides access to core ledger data: service information, objects, transactions, checkpoints, and epochs.

Proto file:

Copied!
sui-apis-grpc/proto/sui/rpc/v2/ledger_service.proto

LedgerService methods

MethodTypeDescription
GetServiceInfoUnaryReturns general information about the node and chain state.
GetObjectUnaryReturns a single object by object ID and optional version.
BatchGetObjectsUnaryReturns multiple objects in a single request.
GetTransactionUnaryReturns a single executed transaction by digest.
BatchGetTransactionsUnaryReturns multiple executed transactions by digest.
GetCheckpointUnaryReturns a checkpoint by sequence number, digest, or the latest checkpoint if no identifier is provided.
GetEpochUnaryReturns epoch information by epoch number, or the current epoch if no epoch is provided.

GetServiceInfo

Returns general information about the current state of the service.

Full method:

Copied!
sui.rpc.v2.LedgerService.GetServiceInfo

Request:

Copied!
{}

Example grpcurl request:

Copied!
ggrpcurl \
  -insecure \
  -H 'api-key: YOUR_API_KEY' \
  -emit-defaults \
  -proto './sui-apis-grpc/proto/sui/rpc/v2/ledger_service.proto' \
  -import-path './sui-apis-grpc/proto' \
  -d '{}' \
  'sui-grpc.nownodes.io' \
  sui.rpc.v2.LedgerService.GetServiceInfo

Response includes fields such as:

FieldDescription
chainIdChain identifier.
chainHuman-readable chain name, such as mainnet or testnet.
epochCurrent epoch based on the highest executed checkpoint.
checkpointHeightHeight of the most recently executed checkpoint.
timestampTimestamp of the most recently executed checkpoint.
lowestAvailableCheckpointLowest checkpoint for which checkpoint and transaction data is available.
lowestAvailableCheckpointObjectsLowest checkpoint for which object data is available.
serverSoftware version or server identifier.

GetObject

Returns an object by object ID.

Full method:

Copied!
sui.rpc.v2.LedgerService.GetObject

Request by latest object version:

Copied!
{
  "objectId": "0xOBJECT_ID"
}

Request by specific object version:

Copied!
{
  "objectId": "0xOBJECT_ID",
  "version": "123"
}

Request with read mask:

Copied!
{
"objectId": "0xOBJECT_ID",
  "readMask": {
    "paths": [
      "object_id",
      "version",
      "digest",
      "object_type"
    ]
  }
}

Request fields:

FieldTypeRequiredDescription
objectIdstringYesObject ID of the requested object.
versionstring / uint64NoSpecific object version. If omitted and the object is live, the latest version is returned.
readMaskobjectNoField mask that limits which object fields are returned.

BatchGetObjects

Returns multiple objects in one request.

Full method:

Copied!
sui.rpc.v2.LedgerService.BatchGetObjects

Request:

Copied!
{
  "requests": [
    {
      "objectId": "0xOBJECT_ID_1"
    },
    {
      "objectId": "0xOBJECT_ID_2"
    }
  ]
}

Request with read mask:

Copied!
{
  "requests": [
    {
      "objectId": "0xOBJECT_ID_1"
    },
    {
      "objectId": "0xOBJECT_ID_2"
    }
  ],
  "readMask": {
    "paths": [
      "object_id",
      "version",
      "digest"
    ]
  }
}

Request fields:

FieldTypeRequiredDescription
requestsarrayYesList of object lookup requests.
readMaskobjectNoField mask applied to returned objects.

GetTransaction

Returns an executed transaction by digest.

Full method:

Copied!
sui.rpc.v2.LedgerService.GetTransaction

Request:

Copied!
{
  "digest": "TRANSACTION_DIGEST"
}

Request with read mask:

Copied!
{
  "digest": "TRANSACTION_DIGEST",
  "readMask": {
    "paths": [
      "digest",
      "effects",
      "events",
      "checkpoint"
    ]
  }
}

Request fields:

FieldTypeRequiredDescription
digeststringYesDigest of the requested transaction.
readMaskobjectNoField mask that limits which transaction fields are returned.

BatchGetTransactions

Returns multiple executed transactions by digest.

Full method:

Copied!
sui.rpc.v2.LedgerService.BatchGetTransactions

Request:

Copied!
{
  "digests": [
    "TRANSACTION_DIGEST_1",
    "TRANSACTION_DIGEST_2"
  ]
}

Request fields:

FieldTypeRequiredDescription
digestsarrayYesList of transaction digests.
readMaskobjectNoField mask applied to returned transactions.

GetCheckpoint

Returns a checkpoint.

If neither sequenceNumber nor digest is provided, the latest checkpoint is returned.

Full method:

Copied!
sui.rpc.v2.LedgerService.GetCheckpoint

Latest checkpoint request:

Copied!
{}

Checkpoint by sequence number:

Copied!
{
  "sequenceNumber": "1000"
}

Checkpoint by digest:

Copied!
{
  "digest": "CHECKPOINT_DIGEST"
}

Request with read mask:

Copied!
{
  "sequenceNumber": "1000",
  "readMask": {
    "paths": [
      "sequence_number",
      "digest",
      "timestamp"
    ]
  }
}

Request fields:

FieldTypeRequiredDescription
sequenceNumberstring / uint64NoCheckpoint sequence number.
digeststringNoCheckpoint digest.
readMaskobjectNoField mask that limits which checkpoint fields are returned.

Example grpcurl request:

Copied!
grpcurl \
  -insecure \
  -H 'api-key: YOUR_API_KEY' \
  -emit-defaults \
  -proto './sui-apis-grpc/proto/sui/rpc/v2/ledger_service.proto' \
  -import-path './sui-apis-grpc/proto' \
  -d '{}' \
  'sui-grpc.nownodes.io' \
  sui.rpc.v2.LedgerService.GetCheckpoint

GetEpoch

Returns epoch information.

If no epoch is provided, the current epoch is returned.

Full method:

Copied!
sui.rpc.v2.LedgerService.GetEpoch

Current epoch request:

Copied!
{}

Specific epoch request:

Copied!
{
  "epoch": "10"
}

Request fields:

FieldTypeRequiredDescription
epochstring / uint64NoRequested epoch number. If omitted, the current epoch is returned.
readMaskobjectNoField mask that limits which epoch fields are returned.

StateService

The StateService provides access to live state data such as dynamic fields, owned objects, coin metadata, and balances.

Proto file:

Copied!
sui-apis-grpc/proto/sui/rpc/v2/state_service.proto

StateService methods

MethodTypeDescription
ListDynamicFieldsUnaryLists dynamic fields owned by a parent object.
ListOwnedObjectsUnaryLists objects owned by an address.
GetCoinInfoUnaryReturns metadata and treasury information for a coin type.
GetBalanceUnaryReturns the total balance for a specific coin type owned by an address.
ListBalancesUnaryLists all coin balances owned by an address.

ListDynamicFields

Lists dynamic fields owned by a parent object.

Full method:

Copied!
sui.rpc.v2.StateService.ListDynamicFields

Request:

Copied!
{
  "parent": "0xPARENT_OBJECT_ID",
  "pageSize": 50
}

Request fields:

FieldTypeRequiredDescription
parentstringYesUID of the parent object that owns the dynamic fields.
pageSizeintegerNoMaximum number of dynamic fields to return.
pageTokenbytes / base64 stringNoToken received from a previous paginated response.
readMaskobjectNoField mask that limits returned dynamic field data.

ListOwnedObjects

Lists objects owned by an address.

Full method:

Copied!
sui.rpc.v2.StateService.ListOwnedObjects

Request:

Copied!
{
  "owner": "0xOWNER_ADDRESS",
  "pageSize": 50
}

Request with object type filter:

Copied!
{
  "owner": "0xOWNER_ADDRESS",
  "objectType": "0x2::coin::Coin<0x2::sui::SUI>"
}

Request fields:

FieldTypeRequiredDescription
ownerstringYesAddress that owns the objects.
pageSizeintegerNoMaximum number of objects to return.
pageTokenbytes / base64 stringNoToken received from a previous paginated response.
readMaskobjectNoField mask that limits returned object data.
objectTypestringNoOptional type filter.

GetCoinInfo

Returns metadata and treasury information for a coin type.

Full method:

Copied!
sui.rpc.v2.StateService.GetCoinInfo

Request:

Copied!
{
  "coinType": "0x2::sui::SUI"
}

Request fields:

FieldTypeRequiredDescription
coinTypestringYesCoin type to request information about.

GetBalance

Returns the total balance for one coin type owned by an address.

Full method:

Copied!
sui.rpc.v2.StateService.GetBalance

Request:

Copied!
{
  "owner": "0xOWNER_ADDRESS",
  "coinType": "0x2::sui::SUI"
}

Request fields:

FieldTypeRequiredDescription
ownerstringYesOwner address.
coinTypestringYesCoin type, for example 0x2::sui::SUI.

ListBalances

Lists all coin balances owned by an address.

Full method:

Copied!
sui.rpc.v2.StateService.ListBalances

Request:

Copied!
{
  "owner": "0xOWNER_ADDRESS",
  "pageSize": 50
}

Request fields:

FieldTypeRequiredDescription
ownerstringYesOwner address.
pageSizeintegerNoMaximum number of balance entries to return.
pageTokenbytes / base64 stringNoToken received from a previous paginated response.

Example grpcurl request:

Copied!
grpcurl \
  -insecure \
  -H 'api-key: YOUR_API_KEY' \
  -emit-defaults \
  -proto './sui-apis-grpc/proto/sui/rpc/v2/state_service.proto' \
  -import-path './sui-apis-grpc/proto' \
  -d '{
    "owner": "0xOWNER_ADDRESS"
  }' \
  'sui-grpc.nownodes.io' \
  sui.rpc.v2.StateService.ListBalances

TransactionExecutionService

The TransactionExecutionService executes or simulates SUI transactions.

Proto file:

Copied!
sui-apis-grpc/proto/sui/rpc/v2/transaction_execution_service.proto

TransactionExecutionService methods

MethodTypeDescription
ExecuteTransactionUnaryExecutes a signed transaction on the network.
SimulateTransactionUnarySimulates a transaction without committing it to the network.

ExecuteTransaction

Executes a signed transaction.

Full method:

Copied!
sui.rpc.v2.TransactionExecutionService.ExecuteTransaction

Request structure:

Copied!
{
  "transaction": {},
  "signatures": [],
  "readMask": {
    "paths": [
      "effects.status",
      "checkpoint"
    ]
  }
}

Request fields:

FieldTypeRequiredDescription
transactionobjectYesTransaction to execute.
signaturesarrayYesUser signatures authorizing execution of the transaction.
readMaskobjectNoField mask that controls which fields are returned.

SimulateTransaction

Simulates a transaction without committing it.

Full method:

Copied!
sui.rpc.v2.TransactionExecutionService.SimulateTransaction

Request structure:

Copied!
{
  "transaction": {},
  "checks": "ENABLED",
  "doGasSelection": true
}

Request fields:

FieldTypeRequiredDescription
transactionobjectYesTransaction to simulate.
readMaskobjectNoField mask that controls which fields are returned.
checksenumNoControls whether transaction checks are enabled or disabled.
doGasSelectionbooleanNoPerforms gas selection based on budget estimation and includes selected gas payment and budget in the response.

MovePackageService

The MovePackageService reads Move package metadata, datatypes, functions, and package versions.

Proto file:

Copied!
sui-apis-grpc/proto/sui/rpc/v2/move_package_service.proto

MovePackageService methods

MethodTypeDescription
GetPackageUnaryReturns a Move package by package ID.
GetDatatypeUnaryReturns a datatype descriptor from a package module.
GetFunctionUnaryReturns a function descriptor from a package module.
ListPackageVersionsUnaryLists all versions of a package.

GetPackage

Returns a Move package.

Full method:

Copied!
sui.rpc.v2.MovePackageService.GetPackage

Request:

Copied!
{
  "packageId": "0xPACKAGE_ID"
}

Request fields:

FieldTypeRequiredDescription
packageIdstringYesStorage ID of the requested package.

GetDatatype

Returns a datatype descriptor from a Move package module.

Full method:

Copied!
sui.rpc.v2.MovePackageService.GetDatatype

Request:

Copied!
{
  "packageId": "0xPACKAGE_ID",
  "moduleName": "module_name",
  "name": "DatatypeName"
}

Request fields:

FieldTypeRequiredDescription
packageIdstringYesStorage ID of the requested package.
moduleNamestringYesName of the requested module.
namestringYesName of the requested datatype.

GetFunction

Returns a function descriptor from a Move package module.

Full method:

Copied!
sui.rpc.v2.MovePackageService.GetFunction

Request:

Copied!
{
  "packageId": "0xPACKAGE_ID",
  "moduleName": "module_name",
  "name": "function_name"
}

Request fields:

FieldTypeRequiredDescription
packageIdstringYesStorage ID of the requested package.
moduleNamestringYesName of the requested module.
namestringYesName of the requested function.

ListPackageVersions

Lists versions of a Move package.

Full method:

Copied!
sui.rpc.v2.MovePackageService.ListPackageVersions

Request:

Copied!
{
  "packageId": "0xPACKAGE_ID",
  "pageSize": 100
}

Request fields:

FieldTypeRequiredDescription
packageIdstringYesStorage ID of any version of the package.
pageSizeintegerNoMaximum number of versions to return.
pageTokenbytes / base64 stringNoToken received from a previous paginated response.

SignatureVerificationService

The SignatureVerificationService verifies user signatures against supported SUI message types.

Proto file:

Copied!
sui-apis-grpc/proto/sui/rpc/v2/signature_verification_service.proto

SignatureVerificationService methods

MethodTypeDescription
VerifySignatureUnaryVerifies a user signature against a provided message and, optionally, an expected address.

VerifySignature

Verifies a user signature.

Full method:

Copied!
sui.rpc.v2.SignatureVerificationService.VerifySignature

Request structure:

Copied!
{
  "message": {},
  "signature": {},
  "address": "0xADDRESS"
}

Request fields:

FieldTypeRequiredDescription
messageobjectYesMessage to verify. Supported message types include PersonalMessage and TransactionData.
signatureobjectYesUser signature to verify.
addressstringNoOptional address to validate against the signature.
jwksarrayNoOptional JWK set used for verifying zkLogin signatures.
epochstring / uint64NoEpoch to use for verification.

Response fields:

FieldDescription
isValidIndicates whether the signature is valid.
reasonReason why verification failed, if isValid is false.

SubscriptionService

The SubscriptionService provides server-streaming APIs.

Proto file:

Copied!
sui-apis-grpc/proto/sui/rpc/v2/subscription_service.proto

SubscriptionService methods

MethodTypeDescription
SubscribeCheckpointsServer streamingSubscribes to the checkpoint stream. The server returns checkpoint messages in order and without gaps.

SubscribeCheckpoints

Subscribes to checkpoint updates.

Full method:

Copied!
sui.rpc.v2.SubscriptionService.SubscribeCheckpoints

Request:

Copied!
{}

Request with read mask:

Copied!
{
  "readMask": {
    "paths": [
      "cursor",
      "checkpoint.sequence_number",
      "checkpoint.digest"
    ]
  }
}

Request fields:

FieldTypeRequiredDescription
readMaskobjectNoField mask specifying which parts of the streaming response should be returned.

Response fields:

FieldDescription
cursorCheckpoint sequence number and current cursor in the stream.
checkpointRequested checkpoint data.

Example grpcurl request:

Copied!
grpcurl \
  -insecure \
  -H 'api-key: YOUR_API_KEY' \
  -emit-defaults \
  -proto './sui-apis-grpc/proto/sui/rpc/v2/subscription_service.proto' \
  -import-path './sui-apis-grpc/proto' \
  -d '{}' \
  'sui-grpc.nownodes.io' \
  sui.rpc.v2.SubscriptionService.SubscribeCheckpoints

This request stays open and returns new checkpoint messages until the connection is closed.

To stop the stream, press:

Ctrl + C


NameService

The NameService resolves SuiNS names and reverse-resolves addresses.

Proto file:

Copied!
sui-apis-grpc/proto/sui/rpc/v2/name_service.proto

NameService methods

MethodTypeDescription
LookupNameUnaryResolves a SuiNS name to its name record.
ReverseLookupNameUnaryResolves an address to its linked SuiNS name record.

LookupName

Looks up a SuiNS name.

Full method:

Copied!
sui.rpc.v2.NameService.LookupName

Request:

Copied!
{
  "name": "example.sui"
}

Alternative request format:

Copied!
{
  "name": "@example"
}

Request fields:

FieldTypeRequiredDescription
namestringYesSuiNS name. Supports both @name and name.sui formats.

ReverseLookupName

Looks up the SuiNS name linked to an address.

Full method:

Copied!
sui.rpc.v2.NameService.ReverseLookupName

Request:

Copied!
{
  "address": "0xADDRESS"
}

Request fields:

FieldTypeRequiredDescription
addressstringYesAddress to reverse-resolve.

Postman setup

You can send SUI gRPC requests using Postman.

Step 1: Create a gRPC request

Open Postman and select:

Copied!
New → gRPC Request

Step 2: Enter the endpoint

Copied!
sui-grpc.nownodes.io

Step 3: Import a proto file

Choose:

Copied!
Import a .proto file

For example, to use LedgerService, import:

Copied!
sui-apis-grpc/proto/sui/rpc/v2/ledger_service.proto

Import path:

Copied!
sui-apis-grpc/proto

Step 4: Select service and method

Example:

Copied!
sui.rpc.v2.LedgerService / GetCheckpoint

Step 5: Add metadata

Add the following metadata:

Copied!
api-key: YOUR_API_KEY

Step 6: Add request body

Example:

Copied!
{}

Click Invoke to send the request.


grpcurl syntax

General syntax:

Copied!
grpcurl \
  -insecure \
  -H 'api-key: YOUR_API_KEY' \
  -emit-defaults \
  -proto './sui-apis-grpc/proto/sui/rpc/v2/SERVICE_FILE.proto' \
  -import-path './sui-apis-grpc/proto' \
  -d 'REQUEST_JSON' \
  'sui-grpc.nownodes.io' \
  sui.rpc.v2.ServiceName.MethodName

Common errors

UNAUTHENTICATED

The API key is missing or incorrect.

Make sure your request includes metadata:

Copied!
api-key: YOUR_API_KEY

Method not found

The selected method name is incorrect, or the wrong proto file was imported.

Examples of correct method formats:

Copied!
sui.rpc.v2.LedgerService.GetCheckpoint

Some tools may use slash notation:

Copied!
sui.rpc.v2.LedgerService/GetCheckpoint

google/rpc/status.proto: File not found

The import path is incomplete or missing Google RPC proto definitions.

Make sure your import path points to:

Copied!
sui-apis-grpc/proto

If your tool does not provide google/rpc definitions automatically, make sure these files are available:

Copied!
google/rpc/status.proto
Copied!
google/rpc/error_details.proto

Missing input file

The gRPC client cannot find the selected .proto file.

Check that the selected proto file exists, for example:

Copied!
sui-apis-grpc/proto/sui/rpc/v2/ledger_service.proto

And that the import path is:

Copied!
sui-apis-grpc/proto

\