SuiGraphQLClient class
GraphQL client for Sui GraphQL RPC (the secondary transport).
Use for query patterns full nodes cannot serve over gRPC (filtered
transaction/event queries, staking, validator APYs). Mysten operates public
endpoints at graphql.<network>.sui.io; see graphqlEndpoint.
Constructors
- SuiGraphQLClient({required String endpoint, Dio? dio})
- SuiGraphQLClient.forNetwork(SuiNetwork network, {Dio? dio})
-
Construct against the public GraphQL endpoint for
network.
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
-
getActiveValidators(
{int? epochId, int first = 50, String? after}) → Future< List< ValidatorInfo> > -
Active validators for the current (or given) epoch, parsed from each
validator's on-chain
0x3::validator::Validatorcontents. -
getChainIdentifier(
) → Future< String> - Chain identifier (digest of the genesis checkpoint).
-
getEpochSummary(
{int? epochId}) → Future< EpochSummary> - Summary of an epoch (defaults to the current epoch).
-
getStakes(
String owner, {int first = 50, String? after}) → Future< List< StakedSuiInfo> > -
Staked SUI objects owned by
owner(0x3::staking_pool::StakedSui). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryEventsByModule(
String packageId, String module, {int first = 20, String? after}) → Future< List< Map< >String, dynamic> > -
Query events emitted by a Move module, e.g. package
0x2, modulecoin. -
queryTransactionsByObject(
String objectId, {int first = 20, String? after}) → Future< TransactionDigestPage> - Query transaction digests that affected a given object (its history).
-
queryTransactionsBySender(
String sender, {int first = 20, String? after}) → Future< TransactionDigestPage> - Query transaction digests filtered by sender address.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited