StaticbytesDecodes a vector<u8> Move field into a number array.
gRPC's json view base64-encodes byte vectors ("CQk="), where JSON-RPC
returned a number array ([9, 9]). Indexing the gRPC form directly yields
a one-character string, so Number(...) of it is NaN, a silently wrong
value rather than an error. Always route a byte vector through here.
A number array or Uint8Array is copied with Array.from, so JSON-RPC-shaped
fixtures work without sharing the input array.
A gRPC base64 string or an already decoded byte collection.
A new array of byte numbers.
StaticbytesStaticcoinReshapes a gRPC Coin into a JSON-RPC-shaped CoinStruct.
coinType is the substring between the first < and the last > in
coin.type. A non-generic type is returned unchanged, and any address
padding inside the extracted type is preserved. The gRPC coin does not
provide previousTransaction, so the returned field is always "".
The gRPC coin to reshape.
A JSON-RPC-shaped coin struct. The input is not mutated.
StaticdisplayReshapes a gRPC Display into a JSON-RPC-shaped display response.
String values in output become data fields. Non-string values are
dropped. Per-field entries in errors do not populate the whole-object
error while output exists. When output is absent, all error entries
are joined as field: message pairs in an error with code displayError.
A null or undefined display returns { data: null, error: null }.
The gRPC display response, or null or undefined when
no display template or display data is available.
The JSON-RPC-shaped display response.
StaticdynamicReshapes a gRPC DynamicFieldEntry into a JSON-RPC-shaped DynamicFieldInfo.
Field mapping (verified live against a real parent object):
fieldId -> objectIdvalueType -> objectType$kind -> type ("DynamicField" | "DynamicObject")name.bcs -> bcsName (base64), bcsEncoding: "base64"name.value and bcsName contain the base64 encoding of name.bcs; gRPC
does not provide the parsed JSON value. version and digest are omitted
because the list response does not provide them.
The gRPC dynamic-field entry to reshape.
The JSON-RPC-shaped dynamic-field information.
StaticsuiBuilds a SuiObjectResponse from a gRPC object's BCS content.
The returned data.bcs.bcsBytes is the base64 encoding of content, which
is the field consumed by Casting.castObjectBcs. The result includes the
object's ID, version, digest, type, owner, and a moveObject BCS record.
hasPublicTransfer is omitted because gRPC does not provide it.
A gRPC object requested with include.content: true.
A JSON-RPC-shaped object response containing the BCS bytes.
StatictransactionReads the transaction out of a gRPC simulateTransaction /
executeTransaction result.
The result is a $kind-discriminated union: a simulation that fails
on-chain still returns effects, but under FailedTransaction rather
than Transaction. Reading only the success arm silently drops the gas
estimate exactly when the caller most needs it. The method returns the arm
selected by $kind and does not clone or mutate the transaction result.
The $kind-discriminated gRPC transaction result.
The successful or failed transaction arm.
StaticunwrapUnwraps a nested Move struct out of JSON-RPC's { type, fields } envelope.
gRPC's json view returns nested structs bare, such as { value: "..." }, where
JSON-RPC returned
{ type: "0x2::balance::Supply<…>", fields: { value: "…" } }. The type
gRPC drops is not recoverable from the nested value itself; where a caster
needs it, take it from the enclosing object's own type parameters via
Helpers.getObjectType.
Any non-null object with a fields property whose value is not undefined
is unwrapped. Bare structs, primitives, null, and envelopes with an
undefined fields value pass through unchanged.
The nested fields or the original value.
StaticunwrapReads a Move UID as a bare object id.
gRPC's json view flattens UID to a plain string, where JSON-RPC nested
it as { id: "0x…" } (and, one level up, { id: { id: "0x…" } }).
The method recursively follows id properties until it reaches a string.
It does not normalize the address or validate malformed runtime values.
A bare ID or a one- or two-level UID envelope.
The extracted object ID.
Adapts
SuiGrpcClientresponse shapes to the JSON-RPC-shaped types exposed by this SDK.These methods only reshape values. They do not perform network I/O or mutate their inputs. Fields that gRPC cannot supply are omitted or represented by the documented compatibility value.