GrpcCoreClient class
gRPC-web implementation of CoreClient over sui.rpc.v2.
- Inheritance
-
- Object
- CoreClient
- GrpcCoreClient
- Available extensions
Constructors
- GrpcCoreClient({required SuiNetwork network, Dio? dio})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- network → SuiNetwork
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
executeTransaction(
Uint8List transactionBcs, List< Uint8List> signatures, {List<String> ? readMask}) → Future<ExecutedTransaction> -
override
-
getBalance(
String owner, {String coinType = '0x2::sui::SUI'}) → Future< Balance> -
override
-
getChainIdentifier(
) → Future< String> -
Chain identifier = digest of the genesis checkpoint.
inherited
-
getCheckpoint(
{int? sequenceNumber, String? digest, List< String> ? readMask}) → Future<Checkpoint> -
override
-
getCoinInfo(
String coinType) → Future< GetCoinInfoResponse> -
override
-
getCurrentSystemState(
) → Future< SystemState> -
Snapshot of the on-chain system state (
0x3::sui_system::SystemState).override -
getDynamicFieldObject(
String parentId, String nameType, Uint8List nameBcs, {List< String> ? readMask}) → Future<Object> -
Fetch the dynamic field object on
parentIdidentified by field name typenameTypeand BCS-encoded name valuenameBcs.inherited -
getDynamicObjectField(
String parentId, String nameType, Uint8List nameBcs, {List< String> ? readMask}) → Future<Object> -
Fetch the child object of a dynamic OBJECT field on
parentId.inherited -
getEpoch(
{int? epoch, List< String> ? readMask}) → Future<Epoch> -
override
-
getFunction(
String packageId, String moduleName, String functionName) → Future< FunctionDescriptor> -
override
-
getObject(
String objectId, {List< String> ? readMask}) → Future<Object> -
Fetch a single object; throws if the node returns an error for it.
inherited
-
getObjects(
List< String> objectIds, {List<String> ? readMask}) → Future<List< GetObjectResult> > -
override
-
getPackage(
String packageId) → Future< Package> -
override
-
getReferenceGasPrice(
) → Future< Int64> -
Current reference gas price (from the current epoch).
inherited
-
getServiceInfo(
) → Future< GetServiceInfoResponse> -
override
-
getTransaction(
String digest, {List< String> ? readMask}) → Future<ExecutedTransaction> -
override
-
listBalances(
String owner, {int? pageSize, Uint8List? pageToken}) → Future< ListBalancesResponse> -
override
-
listCoins(
String owner, {String coinType = '0x2::sui::SUI', Uint8List? cursor, int? limit}) → Future< SuiCoinPage> -
List
Coin<coinType>objects owned byowner(with per-coin balance).override -
listDynamicFields(
String parentId, {int? pageSize, Uint8List? pageToken, List< String> ? readMask}) → Future<ListDynamicFieldsResponse> -
override
-
listOwnedObjects(
String owner, {int? pageSize, Uint8List? pageToken, String? objectType, List< String> ? readMask}) → Future<ListOwnedObjectsResponse> -
override
-
lookupName(
String name) → Future< NameRecord> -
Resolve a SuiNS name (
@nameorname.sui) to its record.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prepareTransaction(
Transaction tx, {required String sender, BigInt? gasBudget}) → Future< Uint8List> -
Available on GrpcCoreClient, provided by the GrpcTransactionExecutor extension
Preparetx(sender, gas price/payment/budget) and return the built TransactionData BCS bytes, ready to sign. -
resolveNameServiceAddress(
String name) → Future< String?> -
Resolve a SuiNS name to its target address (null if unset).
inherited
-
resolvePackage(
String package) → Future< String> -
Resolve an MVR package name to its address (pass-through by default).
override
-
resolveType(
String type) → Future< String> -
Resolve MVR names inside a type string (pass-through by default).
override
-
reverseLookupName(
String address) → Future< NameRecord> -
Reverse-resolve an address to its default SuiNS record.
override
-
signAndExecuteTransaction(
SuiAccount signer, Transaction tx, {BigInt? gasBudget, List< String> ? readMask}) → Future<ExecutedTransaction> -
Available on GrpcCoreClient, provided by the GrpcTransactionExecutor extension
Prepare, sign and executetxin one call. -
simulateTransaction(
Uint8List transactionBcs, {List< String> ? readMask, bool doGasSelection = true, bool checksEnabled = true}) → Future<SimulateTransactionResponse> -
override
-
subscribeCheckpoints(
{List< String> ? readMask}) → Stream<SubscribeCheckpointsResponse> - Subscribe to the stream of executed checkpoints (server-streaming). Replaces the deprecated JSON-RPC WebSocket subscriptions.
-
toString(
) → String -
A string representation of this object.
inherited
-
verifySignature(
Uint8List message, Uint8List signature, {required IntentScope intentScope, String? address}) → Future< SignatureVerification> -
Verify a user signature (Ed25519 / secp / multisig / zkLogin) over
messageunder the givenintentScope.signatureis the serialized signature bytes.override -
waitForTransaction(
String digest, {Duration timeout = const Duration(seconds: 60), Duration pollInterval = const Duration(milliseconds: 500), List< String> ? readMask}) → Future<ExecutedTransaction> -
Poll getTransaction until
digestis available ortimeoutelapses.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited