SuiGraphQLClient class

Client for Sui's indexer-backed GraphQL API.

Constructors

SuiGraphQLClient({required String endpoint, Dio? dio, Map<String, String> headers = const {}})
SuiGraphQLClient.forNetwork(SuiNetwork network, {Dio? dio, Map<String, String> headers = const {}})

Properties

core GraphQLCoreClient
latefinal
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transport GraphQLTransport
final

Methods

defaultNameServiceName(String address) Future<String?>
execute<TData, TVariables>(GraphQLOperation<TData, TVariables> operation, TVariables variables, {Map<String, dynamic>? extensions, CancelToken? cancelToken}) Future<TypedGraphQLResponse<TData>>
Executes a generated operation with typed variables and response data.
executeData<TData, TVariables>(GraphQLOperation<TData, TVariables> operation, TVariables variables, {Map<String, dynamic>? extensions, CancelToken? cancelToken}) Future<TData>
Executes a generated operation, throwing on GraphQL errors or no data.
executeTransaction(Uint8List transactionBytes, List<String> signatures, {TransactionIncludeOptions? include}) Future<TransactionResponse>
getActiveValidators({int? epochId, int pageSize = 50, String? after}) Future<List<ValidatorInfo>>
All active validators, paging from after with requests of pageSize.
getActiveValidatorsPage({int? epochId, int first = 50, String? after}) Future<ValidatorPage>
One page of active validators for the current epoch.
getAllBalances(String owner) Future<List<Balance>>
getBalance(String owner, {String coinType = '0x2::sui::SUI'}) Future<Balance>
getChainIdentifier() Future<String>
getCoinMetadata(String coinType) Future<CoinMetadata?>
getCoins(String owner, {String coinType = '0x2::sui::SUI', String? cursor, int? limit}) Future<Page<CoinData>>
getCurrentSystemState() Future<SystemState>
getDynamicFields(String parentId, {String? cursor, int? limit}) Future<Page<DynamicFieldEntry>>
getEpochSummary({int? epochId}) Future<EpochSummary>
Summary of the current epoch, or epochId when provided.
getMoveFunction(String packageId, String moduleName, String functionName) Future<MoveFunction>
getObjects(List<String> ids, {ObjectIncludeOptions? include}) Future<List<ObjectResult>>
getOwnedObjects(String owner, {String? objectType, String? cursor, int? limit, ObjectIncludeOptions? include}) Future<Page<ObjectData>>
getProtocolConfig() Future<ProtocolConfig>
getReferenceGasPrice() Future<String>
getStakes(String owner, {int first = 50, String? after}) Future<StakedSuiPage>
Staked SUI objects owned by owner.
getTransaction(String digest, {TransactionIncludeOptions? include}) Future<TransactionResponse>
getTransactionGasSummary(String digest) Future<TransactionGasSummary?>
listEvents({EventFilter? filter, String? after, String? before, QueryOrder? order, int? limit, int? startCheckpoint, int? endCheckpoint}) Future<Page<Event>>
listTransactions({TransactionFilter? filter, String? after, String? before, QueryOrder? order, int? limit, int? startCheckpoint, int? endCheckpoint, TransactionIncludeOptions? include}) Future<Page<TransactionResponse>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String document, {Map<String, dynamic>? variables, String? operationName, Map<String, dynamic>? extensions, CancelToken? cancelToken}) Future<GraphQLResponse>
Executes a custom query and preserves partial data and structured errors.
queryEventsByModule(String packageId, String module, {int first = 20, String? after}) Future<SuiGraphQLEventPage>
Events emitted by module in packageId.
queryTransactionsByAddress(String address, {int first = 20, String? after, TransactionHistoryOptions options = const TransactionHistoryOptions()}) Future<SenderTransactionPage>
Transactions that affected address, including sent and received ones.
queryTransactionsByObject(String objectId, {int first = 20, String? after}) Future<TransactionDigestPage>
Transaction digests involving objectId.
queryTransactionsBySender(String sender, {int first = 20, String? after, TransactionHistoryOptions options = const TransactionHistoryOptions()}) Future<SenderTransactionPage>
Transactions signed by sender.
resolveNameServiceAddress(String name) Future<String?>
simulateTransaction(Transaction transactionBlock, {TransactionIncludeOptions? include, bool? doGasSelection, bool? checksEnabled}) Future<TransactionResponse>
toString() String
A string representation of this object.
inherited
verifyZkLoginSignature(Uint8List bytes, String signature, {String? address}) Future<VerifySignatureResult>

Operators

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