CoreClient class abstract

Transport-agnostic core API, mirroring the official TypeScript SDK's CoreClient (client/core.ts).

Concrete transports (gRPC-web now, GraphQL later) implement the abstract primitives; shared derived methods live here so they are written once.

NOTE (migration decision): for now these methods return the sui.rpc.v2 protobuf message types directly. A later compat/ layer will map them to the SDK's legacy model classes to soften breaking changes. Normalizing into transport-neutral Dart models is deferred to keep momentum.

Implementers

Constructors

CoreClient({required SuiNetwork network})

Properties

hashCode int
The hash code for this object.
no setterinherited
network SuiNetwork
final
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>
getBalance(String owner, {String coinType}) Future<Balance>
getChainIdentifier() Future<String>
Chain identifier = digest of the genesis checkpoint.
getCheckpoint({int? sequenceNumber, String? digest, List<String>? readMask}) Future<Checkpoint>
getCoinInfo(String coinType) Future<GetCoinInfoResponse>
getCurrentSystemState() Future<SystemState>
Snapshot of the on-chain system state (0x3::sui_system::SystemState).
getDynamicFieldObject(String parentId, String nameType, Uint8List nameBcs, {List<String>? readMask}) Future<Object>
Fetch the dynamic field object on parentId identified by field name type nameType and BCS-encoded name value nameBcs.
getDynamicObjectField(String parentId, String nameType, Uint8List nameBcs, {List<String>? readMask}) Future<Object>
Fetch the child object of a dynamic OBJECT field on parentId.
getEpoch({int? epoch, List<String>? readMask}) Future<Epoch>
getFunction(String packageId, String moduleName, String functionName) Future<FunctionDescriptor>
getObject(String objectId, {List<String>? readMask}) Future<Object>
Fetch a single object; throws if the node returns an error for it.
getObjects(List<String> objectIds, {List<String>? readMask}) Future<List<GetObjectResult>>
getPackage(String packageId) Future<Package>
getReferenceGasPrice() Future<Int64>
Current reference gas price (from the current epoch).
getServiceInfo() Future<GetServiceInfoResponse>
getTransaction(String digest, {List<String>? readMask}) Future<ExecutedTransaction>
listBalances(String owner, {int? pageSize, Uint8List? pageToken}) Future<ListBalancesResponse>
listCoins(String owner, {String coinType, Uint8List? cursor, int? limit}) Future<SuiCoinPage>
List Coin<coinType> objects owned by owner (with per-coin balance).
listDynamicFields(String parentId, {int? pageSize, Uint8List? pageToken, List<String>? readMask}) Future<ListDynamicFieldsResponse>
listOwnedObjects(String owner, {int? pageSize, Uint8List? pageToken, String? objectType, List<String>? readMask}) Future<ListOwnedObjectsResponse>
lookupName(String name) Future<NameRecord>
Resolve a SuiNS name (@name or name.sui) to its record.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveNameServiceAddress(String name) Future<String?>
Resolve a SuiNS name to its target address (null if unset).
resolvePackage(String package) Future<String>
Resolve an MVR package name to its address (pass-through by default).
resolveType(String type) Future<String>
Resolve MVR names inside a type string (pass-through by default).
reverseLookupName(String address) Future<NameRecord>
Reverse-resolve an address to its default SuiNS record.
simulateTransaction(Uint8List transactionBcs, {List<String>? readMask, bool doGasSelection, bool checksEnabled}) Future<SimulateTransactionResponse>
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 message under the given intentScope. signature is the serialized signature bytes.
waitForTransaction(String digest, {Duration timeout = const Duration(seconds: 60), Duration pollInterval = const Duration(milliseconds: 500), List<String>? readMask}) Future<ExecutedTransaction>
Poll getTransaction until digest is available or timeout elapses.

Operators

operator ==(Object other) bool
The equality operator.
inherited