Class: SuiGrpcChainClient
Defined in: sui/grpc.ts:140
A gRPC-backed implementation of the SDK's Sui client surface (SuiClientLike), translating results into the JSON-RPC response shapes the Sui implementation was built against.
This is the gRPC path parallel to HTTP: Sui's public fullnodes no longer
serve JSON-RPC at all, and the keyless JSON-RPC gateways the HTTP path used
are gone, while Sui's official gRPC endpoint (fullnode.<net>.sui.io)
remains. The adapter is built on SuiGrpcClient (plus the raw ledger
service for the calls the normalized client does not expose), so no gRPC
dependency beyond the already-present @mysten/sui package is introduced.
Endpoints: the built-in gRPC-Web transport serves any gRPC-Web-enabled
endpoint; anything else (e.g. a native-gRPC transport the CLI builds with
its own dependencies) injects through SuiGrpcChainClient.from.
Intentional fidelity gaps vs JSON-RPC (no SDK consumer needs more; extend deliberately if one appears):
- PTB pure inputs render
0x<hex of the BCS bytes>— the SDK's report decoders (toUint8Array) consume that form — not JSON-RPC's decoded JSON values. getBalance.coinObjectCountis always 0 andgetCoinscoins carrypreviousTransaction: ''— the gRPC endpoints do not serve them.- Package objects render
content.disassembledas{}; the real disassembly is synthesized bygetPackageDisassembly. - Raw-transaction responses omit
signatures(the raw service returns Signature messages, not JSON-RPC's base64 strings). waitForTransactionignorespollInterval(the normalized client's own poll schedule applies).devInspectTransactionBlockrejects string transaction blocks.- Filters: only the predicates gRPC serves — sender, function, affected object (transactions); type (owned objects); sender, event type, module (events). Unsupported filters throw rather than silently under-filter.
getCheckpointscursors: the adapter's envelope resumes exclusively after/before the anchor; a bare sequence number starts AT it.
Implements
Accessors
baseUrl
Get Signature
get baseUrl():
string|undefined
Defined in: sui/grpc.ts:193
Returns
string | undefined
underlying
Get Signature
get underlying():
SuiGrpcClient
Defined in: sui/grpc.ts:189
The underlying SuiGrpcClient (for callers that need raw service access).
Returns
SuiGrpcClient
Methods
devInspectTransactionBlock()
devInspectTransactionBlock(
input:DevInspectTransactionBlockParams):Promise<DevInspectResults>
Defined in: sui/grpc.ts:742
Runs the transaction block in dev-inspect mode. Which allows for nearly any transaction (or Move call) with any arguments. Detailed results are provided, including both the transaction effects and any return values.
Parameters
| Parameter | Type |
|---|---|
input | DevInspectTransactionBlockParams |
Returns
Promise<DevInspectResults>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.devInspectTransactionBlock
getBalance()
getBalance(
input:GetBalanceParams):Promise<CoinBalance>
Defined in: sui/grpc.ts:643
Get the total coin balance for one coin type, owned by the address owner.
Parameters
| Parameter | Type |
|---|---|
input | GetBalanceParams |
Returns
Promise<CoinBalance>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.getBalance
getChainIdentifier()
getChainIdentifier():
Promise<string>
Defined in: sui/grpc.ts:205
The gRPC chain identifier is the base58 genesis checkpoint digest; the
JSON-RPC one is its first 4 bytes hexlified (4c78adac for testnet).
Reports the JSON-RPC form so SuiChain.fromUrl's network mapping applies
to both transports.
Returns
Promise<string>
Implementation of
SuiClientLike.getChainIdentifier
getCheckpoint()
getCheckpoint(
input: {id:string; }):Promise<Checkpoint>
Defined in: sui/grpc.ts:222
Returns information about a given checkpoint
Parameters
| Parameter | Type |
|---|---|
input | { id: string; } |
input.id | string |
Returns
Promise<Checkpoint>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.getCheckpoint
getCheckpoints()
getCheckpoints(
input: {cursor?:string|null;descendingOrder?:boolean|null;limit?:number|null;signal?:AbortSignal; }):Promise<CheckpointPage>
Defined in: sui/grpc.ts:241
Returns historical checkpoints paginated
Parameters
| Parameter | Type |
|---|---|
input | { cursor?: string | null; descendingOrder?: boolean | null; limit?: number | null; signal?: AbortSignal; } |
input.cursor? | string | null |
input.descendingOrder? | boolean | null |
input.limit? | number | null |
input.signal? | AbortSignal |
Returns
Promise<CheckpointPage>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.getCheckpoints
getCoinMetadata()
getCoinMetadata(
input:GetCoinMetadataParams):Promise<CoinMetadata|null>
Defined in: sui/grpc.ts:682
Fetch CoinMetadata for a given coin type
Parameters
| Parameter | Type |
|---|---|
input | GetCoinMetadataParams |
Returns
Promise<CoinMetadata | null>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.getCoinMetadata
getCoins()
getCoins(
input:GetCoinsParams):Promise<PaginatedCoins>
Defined in: sui/grpc.ts:656
Get all Coin<coin_type> objects owned by an address.
Parameters
| Parameter | Type |
|---|---|
input | GetCoinsParams |
Returns
Promise<PaginatedCoins>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.getCoins
getDynamicFieldObject()
getDynamicFieldObject(
input:GetDynamicFieldObjectParams):Promise<SuiObjectResponse>
Defined in: sui/grpc.ts:573
Return the dynamic field object information for a specified object
Parameters
| Parameter | Type |
|---|---|
input | GetDynamicFieldObjectParams |
Returns
Promise<SuiObjectResponse>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.getDynamicFieldObject
getDynamicFields()
getDynamicFields(
input:GetDynamicFieldsParams):Promise<DynamicFieldPage>
Defined in: sui/grpc.ts:554
Return the list of dynamic field objects owned by an object
Parameters
| Parameter | Type |
|---|---|
input | GetDynamicFieldsParams |
Returns
Promise<DynamicFieldPage>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.getDynamicFields
getLatestCheckpointSequenceNumber()
getLatestCheckpointSequenceNumber():
Promise<string>
Defined in: sui/grpc.ts:210
Get the sequence number of the latest checkpoint that has been executed
Returns
Promise<string>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.getLatestCheckpointSequenceNumber
getNormalizedMoveModule()
getNormalizedMoveModule(
input:GetNormalizedMoveModuleParams):Promise<SuiMoveNormalizedModule>
Defined in: sui/grpc.ts:601
Get a structured representation of Move module
Parameters
| Parameter | Type |
|---|---|
input | GetNormalizedMoveModuleParams |
Returns
Promise<SuiMoveNormalizedModule>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.getNormalizedMoveModule
getNormalizedMoveModulesByPackage()
getNormalizedMoveModulesByPackage(
input:GetNormalizedMoveModulesByPackageParams):Promise<SuiMoveNormalizedModules>
Defined in: sui/grpc.ts:614
Get a map from module name to structured representations of Move modules
Parameters
| Parameter | Type |
|---|---|
input | GetNormalizedMoveModulesByPackageParams |
Returns
Promise<SuiMoveNormalizedModules>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.getNormalizedMoveModulesByPackage
getObject()
getObject(
input:GetObjectParams):Promise<SuiObjectResponse>
Defined in: sui/grpc.ts:508
Get details about an object
Parameters
| Parameter | Type |
|---|---|
input | GetObjectParams |
Returns
Promise<SuiObjectResponse>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.getObject
getOwnedObjects()
getOwnedObjects(
input:GetOwnedObjectsParams):Promise<PaginatedObjectsResponse>
Defined in: sui/grpc.ts:521
Get all objects owned by an address
Parameters
| Parameter | Type |
|---|---|
input | GetOwnedObjectsParams |
Returns
Promise<PaginatedObjectsResponse>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.getOwnedObjects
getPackageDisassembly()
getPackageDisassembly(
packageId:string):Promise<Record<string,string>>
Defined in: sui/grpc.ts:632
The JSON-RPC package object's content.disassembled has no gRPC
equivalent, so this synthesizes a disassembly-like source per module from
the package service's metadata: it carries the pieces consumers parse —
module names (the keys), use <addr>::<module> import lines,
<field>_object_id: field names, and struct names.
Parameters
| Parameter | Type |
|---|---|
packageId | string |
Returns
Promise<Record<string, string>>
Implementation of
SuiClientLike.getPackageDisassembly
getTransactionBlock()
getTransactionBlock(
input:GetTransactionBlockParams):Promise<SuiTransactionBlockResponse>
Defined in: sui/grpc.ts:322
Parameters
| Parameter | Type |
|---|---|
input | GetTransactionBlockParams |
Returns
Promise<SuiTransactionBlockResponse>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.getTransactionBlock
multiGetTransactionBlocks()
multiGetTransactionBlocks(
input:MultiGetTransactionBlocksParams):Promise<SuiTransactionBlockResponse[]>
Defined in: sui/grpc.ts:330
Parameters
| Parameter | Type |
|---|---|
input | MultiGetTransactionBlocksParams |
Returns
Promise<SuiTransactionBlockResponse[]>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.multiGetTransactionBlocks
queryEvents()
queryEvents(
input:QueryEventsParams):Promise<PaginatedEvents>
Defined in: sui/grpc.ts:689
Get events for a given query criteria
Parameters
| Parameter | Type |
|---|---|
input | QueryEventsParams |
Returns
Promise<PaginatedEvents>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.queryEvents
queryTransactionBlocks()
queryTransactionBlocks(
input:QueryTransactionBlocksParams):Promise<PaginatedTransactionResponse>
Defined in: sui/grpc.ts:360
Get transaction blocks for a given query criteria
Parameters
| Parameter | Type |
|---|---|
input | QueryTransactionBlocksParams |
Returns
Promise<PaginatedTransactionResponse>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.queryTransactionBlocks
signAndExecuteTransaction()
signAndExecuteTransaction(
input: { } &Omit<ExecuteTransactionBlockParams,"signature"|"transactionBlock">):Promise<SuiTransactionBlockResponse>
Defined in: sui/grpc.ts:767
Parameters
| Parameter | Type |
|---|---|
input | { } & Omit<ExecuteTransactionBlockParams, "signature" | "transactionBlock"> |
Returns
Promise<SuiTransactionBlockResponse>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.signAndExecuteTransaction
waitForTransaction()
waitForTransaction(
input: { } &GetTransactionBlockParams):Promise<SuiTransactionBlockResponse>
Defined in: sui/grpc.ts:783
Wait for a transaction block result to be available over the API.
This can be used in conjunction with executeTransactionBlock to wait for the transaction to
be available via the API.
This currently polls the getTransactionBlock API to check for the transaction.
Parameters
| Parameter | Type |
|---|---|
input | { } & GetTransactionBlockParams |
Returns
Promise<SuiTransactionBlockResponse>
Deprecated
JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use SuiGrpcClient
from @mysten/sui/grpc or SuiGraphQLClient from @mysten/sui/graphql instead.
Implementation of
SuiClientLike.waitForTransaction
from()
staticfrom(options:SuiGrpcChainClientOptions):SuiGrpcChainClient
Defined in: sui/grpc.ts:158
Parameters
| Parameter | Type |
|---|---|
options | SuiGrpcChainClientOptions |
Returns
SuiGrpcChainClient
fromBaseUrl()
staticfromBaseUrl(baseUrl:string,fetchImpl?: (input:string|URL|Request,init?:RequestInit) =>Promise<Response>):SuiGrpcChainClient
Defined in: sui/grpc.ts:184
Parameters
| Parameter | Type |
|---|---|
baseUrl | string |
fetchImpl? | (input: string | URL | Request, init?: RequestInit) => Promise<Response> |
Returns
SuiGrpcChainClient