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
- 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
-
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.
-
getActiveValidators(
{int? epochId, int pageSize = 50, String? after}) → Future< List< ValidatorInfo> > -
All active validators, paging from
afterwith requests ofpageSize. -
getActiveValidatorsPage(
{int? epochId, int first = 50, String? after}) → Future< ValidatorPage> - One page of active validators for the current epoch.
-
getChainIdentifier(
) → Future< String> -
getEpochSummary(
{int? epochId}) → Future< EpochSummary> -
Summary of the current epoch, or
epochIdwhen provided. -
getStakes(
String owner, {int first = 50, String? after}) → Future< StakedSuiPage> -
Staked SUI objects owned by
owner. -
getTransactionGasSummary(
String digest) → Future< TransactionGasSummary?> -
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
moduleinpackageId. -
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. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited