@mysten/sui 2.22.1 → 2.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/dist/bcs/bcs.d.mts +6 -6
- package/dist/bcs/bcs.d.mts.map +1 -1
- package/dist/bcs/bcs.mjs +1 -19
- package/dist/bcs/bcs.mjs.map +1 -1
- package/dist/bcs/index.d.mts +3812 -906
- package/dist/bcs/index.d.mts.map +1 -1
- package/dist/bcs/index.mjs +2 -1
- package/dist/bcs/index.mjs.map +1 -1
- package/dist/bcs/transactions.mjs +147 -0
- package/dist/bcs/transactions.mjs.map +1 -0
- package/dist/client/core-resolver.mjs +2 -1
- package/dist/client/core-resolver.mjs.map +1 -1
- package/dist/client/core.d.mts +2 -0
- package/dist/client/core.d.mts.map +1 -1
- package/dist/client/core.mjs.map +1 -1
- package/dist/client/query-filters.mjs +119 -0
- package/dist/client/query-filters.mjs.map +1 -0
- package/dist/client/types.d.mts +166 -1
- package/dist/client/types.d.mts.map +1 -1
- package/dist/client/utils.d.mts.map +1 -1
- package/dist/client/utils.mjs +13 -1
- package/dist/client/utils.mjs.map +1 -1
- package/dist/cryptography/signature.d.mts +6 -6
- package/dist/graphql/client.d.mts +15 -2
- package/dist/graphql/client.d.mts.map +1 -1
- package/dist/graphql/client.mjs +6 -0
- package/dist/graphql/client.mjs.map +1 -1
- package/dist/graphql/core.d.mts +5 -1
- package/dist/graphql/core.d.mts.map +1 -1
- package/dist/graphql/core.mjs +85 -3
- package/dist/graphql/core.mjs.map +1 -1
- package/dist/graphql/generated/queries.d.mts.map +1 -1
- package/dist/graphql/generated/queries.mjs +137 -1
- package/dist/graphql/generated/queries.mjs.map +1 -1
- package/dist/graphql/generated/tada-env.d.mts +108 -0
- package/dist/graphql/index.d.mts +2 -2
- package/dist/grpc/client.d.mts +11 -0
- package/dist/grpc/client.d.mts.map +1 -1
- package/dist/grpc/client.mjs +6 -0
- package/dist/grpc/client.mjs.map +1 -1
- package/dist/grpc/core.d.mts +5 -1
- package/dist/grpc/core.d.mts.map +1 -1
- package/dist/grpc/core.mjs +100 -2
- package/dist/grpc/core.mjs.map +1 -1
- package/dist/grpc/filters.mjs +45 -0
- package/dist/grpc/filters.mjs.map +1 -0
- package/dist/grpc/proto/sui/rpc/v2/event.d.mts +31 -0
- package/dist/grpc/proto/sui/rpc/v2/event.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/event.mjs +30 -0
- package/dist/grpc/proto/sui/rpc/v2/event.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/executed_transaction.d.mts +7 -0
- package/dist/grpc/proto/sui/rpc/v2/executed_transaction.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/executed_transaction.mjs +8 -0
- package/dist/grpc/proto/sui/rpc/v2/executed_transaction.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/filter.d.mts +423 -0
- package/dist/grpc/proto/sui/rpc/v2/filter.d.mts.map +1 -0
- package/dist/grpc/proto/sui/rpc/v2/filter.mjs +297 -0
- package/dist/grpc/proto/sui/rpc/v2/filter.mjs.map +1 -0
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts +62 -6
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.mjs +37 -0
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.d.mts +293 -1
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.mjs +241 -1
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/move_package_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/name_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/protocol_config.d.mts +15 -2
- package/dist/grpc/proto/sui/rpc/v2/protocol_config.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/protocol_config.mjs +11 -0
- package/dist/grpc/proto/sui/rpc/v2/protocol_config.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/query_options.d.mts +211 -0
- package/dist/grpc/proto/sui/rpc/v2/query_options.d.mts.map +1 -0
- package/dist/grpc/proto/sui/rpc/v2/query_options.mjs +163 -0
- package/dist/grpc/proto/sui/rpc/v2/query_options.mjs.map +1 -0
- package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/state_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.d.mts +105 -23
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.mjs +56 -9
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.d.mts +148 -8
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.mjs +109 -8
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.mts +4 -4
- package/dist/grpc/proto/types.d.mts +5 -3
- package/dist/grpc/proto/types.mjs +33 -2
- package/dist/grpc/proto/types.mjs.map +1 -1
- package/dist/jsonRpc/core.d.mts +10 -0
- package/dist/jsonRpc/core.d.mts.map +1 -1
- package/dist/jsonRpc/core.mjs +85 -2
- package/dist/jsonRpc/core.mjs.map +1 -1
- package/dist/transactions/Transaction.d.mts +9 -9
- package/dist/transactions/Transaction.d.mts.map +1 -1
- package/dist/transactions/intents/CoinWithBalance.mjs +14 -18
- package/dist/transactions/intents/CoinWithBalance.mjs.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/dist/zklogin/bcs.d.mts +14 -14
- package/dist/zklogin/bcs.d.mts.map +1 -1
- package/docs/clients/core.md +115 -1
- package/docs/clients/grpc.md +68 -0
- package/docs/migrations/sui-2.0/json-rpc-migration.md +104 -101
- package/package.json +2 -2
- package/src/bcs/bcs.ts +0 -27
- package/src/bcs/index.ts +7 -5
- package/src/bcs/transactions.ts +226 -0
- package/src/client/core-resolver.ts +5 -1
- package/src/client/core.ts +8 -0
- package/src/client/query-filters.ts +195 -0
- package/src/client/types.ts +186 -1
- package/src/client/utils.ts +13 -0
- package/src/graphql/client.ts +25 -1
- package/src/graphql/core.ts +143 -3
- package/src/graphql/generated/queries.ts +226 -0
- package/src/graphql/generated/schema.graphql +75 -0
- package/src/graphql/generated/tada-env.ts +133 -0
- package/src/graphql/index.ts +1 -0
- package/src/graphql/queries/listEvents.graphql +40 -0
- package/src/graphql/queries/transactions.graphql +26 -0
- package/src/grpc/client.ts +19 -0
- package/src/grpc/core.ts +187 -3
- package/src/grpc/filters.ts +68 -0
- package/src/grpc/proto/sui/rpc/v2/event.ts +49 -0
- package/src/grpc/proto/sui/rpc/v2/executed_transaction.ts +15 -0
- package/src/grpc/proto/sui/rpc/v2/filter.ts +589 -0
- package/src/grpc/proto/sui/rpc/v2/ledger_service.client.ts +111 -0
- package/src/grpc/proto/sui/rpc/v2/ledger_service.ts +406 -0
- package/src/grpc/proto/sui/rpc/v2/protocol_config.ts +22 -2
- package/src/grpc/proto/sui/rpc/v2/query_options.ts +255 -0
- package/src/grpc/proto/sui/rpc/v2/subscription_service.client.ts +136 -18
- package/src/grpc/proto/sui/rpc/v2/subscription_service.ts +187 -7
- package/src/grpc/proto/types.ts +2 -0
- package/src/jsonRpc/core.ts +136 -2
- package/src/transactions/intents/CoinWithBalance.ts +41 -41
- package/src/version.ts +1 -1
|
@@ -8,6 +8,31 @@ type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
|
|
|
8
8
|
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
|
|
9
9
|
import { OpenMoveTypeSignature } from '../types.js';
|
|
10
10
|
import { DocumentTypeDecoration } from '@graphql-typed-document-node/core';
|
|
11
|
+
export type EventFilter = {
|
|
12
|
+
/** Limit to events that occured strictly after the given checkpoint. */
|
|
13
|
+
afterCheckpoint?: number | null | undefined;
|
|
14
|
+
/** Limit to events in the given checkpoint. */
|
|
15
|
+
atCheckpoint?: number | null | undefined;
|
|
16
|
+
/** Limit to event that occured strictly before the given checkpoint. */
|
|
17
|
+
beforeCheckpoint?: number | null | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Events emitted by a particular module. An event is emitted by a particular module if some function in the module is called by a PTB and emits an event.
|
|
20
|
+
*
|
|
21
|
+
* Modules can be filtered by their package, or package::module. We currently do not support filtering by emitting module and event type at the same time so if both are provided in one filter, the query will error.
|
|
22
|
+
*/
|
|
23
|
+
module?: string | null | undefined;
|
|
24
|
+
/** Filter on events by transaction sender address. */
|
|
25
|
+
sender?: string | null | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* This field is used to specify the type of event emitted.
|
|
28
|
+
*
|
|
29
|
+
* Events can be filtered by their type's package, package::module, or their fully qualified type name.
|
|
30
|
+
*
|
|
31
|
+
* Generic types can be queried by either the generic type name, e.g. `0x2::coin::Coin`, or by the full type name, such as `0x2::coin::Coin<0x2::sui::SUI>`.
|
|
32
|
+
*/
|
|
33
|
+
type?: string | null | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
11
36
|
/** The execution status of this transaction: success or failure. */
|
|
12
37
|
export enum ExecutionStatus {
|
|
13
38
|
/** The transaction could not be executed. */
|
|
@@ -116,6 +141,43 @@ export enum OwnerKind {
|
|
|
116
141
|
Shared = 'SHARED'
|
|
117
142
|
}
|
|
118
143
|
|
|
144
|
+
export type TransactionFilter = {
|
|
145
|
+
/**
|
|
146
|
+
* Limit to transactions that interacted with the given address.
|
|
147
|
+
* The address could be a sender, sponsor, or recipient of the transaction.
|
|
148
|
+
*/
|
|
149
|
+
affectedAddress?: string | null | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* Limit to transactions that interacted with the given object.
|
|
152
|
+
* The object could have been created, read, modified, deleted, wrapped, or unwrapped by the transaction.
|
|
153
|
+
* Objects that were passed as a `Receiving` input are not considered to have been affected by a transaction unless they were actually received.
|
|
154
|
+
*/
|
|
155
|
+
affectedObject?: string | null | undefined;
|
|
156
|
+
/** Filter to transactions that occurred strictly after the given checkpoint. */
|
|
157
|
+
afterCheckpoint?: number | null | undefined;
|
|
158
|
+
/** Filter to transactions in the given checkpoint. */
|
|
159
|
+
atCheckpoint?: number | null | undefined;
|
|
160
|
+
/** Filter to transaction that occurred strictly before the given checkpoint. */
|
|
161
|
+
beforeCheckpoint?: number | null | undefined;
|
|
162
|
+
/** Filter transactions by move function called. Calls can be filtered by the `package`, `package::module`, or the `package::module::name` of their function. */
|
|
163
|
+
function?: string | null | undefined;
|
|
164
|
+
/** An input filter selecting for either system or programmable transactions. */
|
|
165
|
+
kind?: TransactionKindInput | null | undefined;
|
|
166
|
+
/** Limit to transactions that were sent by the given address. */
|
|
167
|
+
sentAddress?: string | null | undefined;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/** An input filter selecting for either system or programmable transactions. */
|
|
171
|
+
export enum TransactionKindInput {
|
|
172
|
+
/** A user submitted transaction block. */
|
|
173
|
+
ProgrammableTx = 'PROGRAMMABLE_TX',
|
|
174
|
+
/**
|
|
175
|
+
* A system transaction can be one of several types of transactions.
|
|
176
|
+
* See [unions/transaction-block-kind] for more details.
|
|
177
|
+
*/
|
|
178
|
+
SystemTx = 'SYSTEM_TX'
|
|
179
|
+
}
|
|
180
|
+
|
|
119
181
|
/** An enum that specifies the intent scope to be used to parse the bytes for signature verification. */
|
|
120
182
|
export enum ZkLoginIntentScope {
|
|
121
183
|
/** Indicates that the bytes are to be parsed as a personal message. */
|
|
@@ -206,6 +268,17 @@ export type GetReferenceGasPriceQueryVariables = Exact<{ [key: string]: never; }
|
|
|
206
268
|
|
|
207
269
|
export type GetReferenceGasPriceQuery = { epoch: { referenceGasPrice: string | null } | null };
|
|
208
270
|
|
|
271
|
+
export type ListEventsQueryVariables = Exact<{
|
|
272
|
+
filter?: EventFilter | null | undefined;
|
|
273
|
+
first?: number | null | undefined;
|
|
274
|
+
after?: string | null | undefined;
|
|
275
|
+
last?: number | null | undefined;
|
|
276
|
+
before?: string | null | undefined;
|
|
277
|
+
}>;
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
export type ListEventsQuery = { events: { pageInfo: { hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null, endCursor: string | null }, nodes: Array<{ sequenceNumber: number, transaction: { digest: string, effects: { checkpoint: { sequenceNumber: number } | null } | null } | null, transactionModule: { name: string, package: { address: string } | null } | null, sender: { address: string } | null, contents: { bcs: string | null, json: unknown, type: { repr: string } | null } | null }> } | null };
|
|
281
|
+
|
|
209
282
|
export type DefaultSuinsNameQueryVariables = Exact<{
|
|
210
283
|
address: string;
|
|
211
284
|
}>;
|
|
@@ -329,6 +402,23 @@ export type GetTransactionBlockQueryVariables = Exact<{
|
|
|
329
402
|
|
|
330
403
|
export type GetTransactionBlockQuery = { transaction: { digest: string, transactionJson?: unknown, transactionBcs?: string | null, signatures: Array<{ signatureBytes: string | null }>, effects: { status: ExecutionStatus | null, effectsBcs?: string | null, effectsJson?: unknown, balanceChangesJson?: unknown, executionError: { message: string, abortCode: string | null, identifier: string | null, constant: string | null, sourceLineNumber: number | null, instructionOffset: number | null, module: { name: string, package: { address: string } | null } | null, function: { name: string } | null } | null, epoch: { epochId: number } | null, objectChanges?: { nodes: Array<{ address: string, outputState: { asMoveObject: { contents: { type: { repr: string } | null } | null } | null } | null }> } | null, events?: { pageInfo: { hasNextPage: boolean }, nodes: Array<{ transactionModule: { name: string, package: { address: string } | null } | null, sender: { address: string } | null, contents: { bcs: string | null, json: unknown, type: { repr: string } | null } | null }> } | null } | null } | null };
|
|
331
404
|
|
|
405
|
+
export type ListTransactionsQueryVariables = Exact<{
|
|
406
|
+
filter?: TransactionFilter | null | undefined;
|
|
407
|
+
first?: number | null | undefined;
|
|
408
|
+
after?: string | null | undefined;
|
|
409
|
+
last?: number | null | undefined;
|
|
410
|
+
before?: string | null | undefined;
|
|
411
|
+
includeTransaction?: boolean | null | undefined;
|
|
412
|
+
includeEffects?: boolean | null | undefined;
|
|
413
|
+
includeEvents?: boolean | null | undefined;
|
|
414
|
+
includeBalanceChanges?: boolean | null | undefined;
|
|
415
|
+
includeObjectTypes?: boolean | null | undefined;
|
|
416
|
+
includeBcs?: boolean | null | undefined;
|
|
417
|
+
}>;
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
export type ListTransactionsQuery = { transactions: { pageInfo: { hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null, endCursor: string | null }, nodes: Array<{ digest: string, transactionJson?: unknown, transactionBcs?: string | null, signatures: Array<{ signatureBytes: string | null }>, effects: { status: ExecutionStatus | null, effectsBcs?: string | null, effectsJson?: unknown, balanceChangesJson?: unknown, executionError: { message: string, abortCode: string | null, identifier: string | null, constant: string | null, sourceLineNumber: number | null, instructionOffset: number | null, module: { name: string, package: { address: string } | null } | null, function: { name: string } | null } | null, epoch: { epochId: number } | null, objectChanges?: { nodes: Array<{ address: string, outputState: { asMoveObject: { contents: { type: { repr: string } | null } | null } | null } | null }> } | null, events?: { pageInfo: { hasNextPage: boolean }, nodes: Array<{ transactionModule: { name: string, package: { address: string } | null } | null, sender: { address: string } | null, contents: { bcs: string | null, json: unknown, type: { repr: string } | null } | null }> } | null } | null }> } | null };
|
|
421
|
+
|
|
332
422
|
export type Transaction_FieldsFragment = { digest: string, transactionJson?: unknown, transactionBcs?: string | null, signatures: Array<{ signatureBytes: string | null }>, effects: { status: ExecutionStatus | null, effectsBcs?: string | null, effectsJson?: unknown, balanceChangesJson?: unknown, executionError: { message: string, abortCode: string | null, identifier: string | null, constant: string | null, sourceLineNumber: number | null, instructionOffset: number | null, module: { name: string, package: { address: string } | null } | null, function: { name: string } | null } | null, epoch: { epochId: number } | null, objectChanges?: { nodes: Array<{ address: string, outputState: { asMoveObject: { contents: { type: { repr: string } | null } | null } | null } | null }> } | null, events?: { pageInfo: { hasNextPage: boolean }, nodes: Array<{ transactionModule: { name: string, package: { address: string } | null } | null, sender: { address: string } | null, contents: { bcs: string | null, json: unknown, type: { repr: string } | null } | null }> } | null } | null };
|
|
333
423
|
|
|
334
424
|
export type ResolveTransactionQueryVariables = Exact<{
|
|
@@ -760,6 +850,51 @@ export const GetReferenceGasPriceDocument = new TypedDocumentString(`
|
|
|
760
850
|
}
|
|
761
851
|
}
|
|
762
852
|
`) as unknown as TypedDocumentString<GetReferenceGasPriceQuery, GetReferenceGasPriceQueryVariables>;
|
|
853
|
+
export const ListEventsDocument = new TypedDocumentString(`
|
|
854
|
+
query listEvents($filter: EventFilter, $first: Int, $after: String, $last: Int, $before: String) {
|
|
855
|
+
events(
|
|
856
|
+
filter: $filter
|
|
857
|
+
first: $first
|
|
858
|
+
after: $after
|
|
859
|
+
last: $last
|
|
860
|
+
before: $before
|
|
861
|
+
) {
|
|
862
|
+
pageInfo {
|
|
863
|
+
hasNextPage
|
|
864
|
+
hasPreviousPage
|
|
865
|
+
startCursor
|
|
866
|
+
endCursor
|
|
867
|
+
}
|
|
868
|
+
nodes {
|
|
869
|
+
sequenceNumber
|
|
870
|
+
transaction {
|
|
871
|
+
digest
|
|
872
|
+
effects {
|
|
873
|
+
checkpoint {
|
|
874
|
+
sequenceNumber
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
transactionModule {
|
|
879
|
+
package {
|
|
880
|
+
address
|
|
881
|
+
}
|
|
882
|
+
name
|
|
883
|
+
}
|
|
884
|
+
sender {
|
|
885
|
+
address
|
|
886
|
+
}
|
|
887
|
+
contents {
|
|
888
|
+
type {
|
|
889
|
+
repr
|
|
890
|
+
}
|
|
891
|
+
bcs
|
|
892
|
+
json
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
`) as unknown as TypedDocumentString<ListEventsQuery, ListEventsQueryVariables>;
|
|
763
898
|
export const DefaultSuinsNameDocument = new TypedDocumentString(`
|
|
764
899
|
query defaultSuinsName($address: SuiAddress!) {
|
|
765
900
|
address(address: $address) {
|
|
@@ -1142,6 +1277,97 @@ export const GetTransactionBlockDocument = new TypedDocumentString(`
|
|
|
1142
1277
|
}
|
|
1143
1278
|
}
|
|
1144
1279
|
}`) as unknown as TypedDocumentString<GetTransactionBlockQuery, GetTransactionBlockQueryVariables>;
|
|
1280
|
+
export const ListTransactionsDocument = new TypedDocumentString(`
|
|
1281
|
+
query listTransactions($filter: TransactionFilter, $first: Int, $after: String, $last: Int, $before: String, $includeTransaction: Boolean = false, $includeEffects: Boolean = false, $includeEvents: Boolean = false, $includeBalanceChanges: Boolean = false, $includeObjectTypes: Boolean = false, $includeBcs: Boolean = false) {
|
|
1282
|
+
transactions(
|
|
1283
|
+
filter: $filter
|
|
1284
|
+
first: $first
|
|
1285
|
+
after: $after
|
|
1286
|
+
last: $last
|
|
1287
|
+
before: $before
|
|
1288
|
+
) {
|
|
1289
|
+
pageInfo {
|
|
1290
|
+
hasNextPage
|
|
1291
|
+
hasPreviousPage
|
|
1292
|
+
startCursor
|
|
1293
|
+
endCursor
|
|
1294
|
+
}
|
|
1295
|
+
nodes {
|
|
1296
|
+
...TRANSACTION_FIELDS
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
fragment TRANSACTION_FIELDS on Transaction {
|
|
1301
|
+
digest
|
|
1302
|
+
transactionJson @include(if: $includeTransaction)
|
|
1303
|
+
transactionBcs @include(if: $includeBcs)
|
|
1304
|
+
signatures {
|
|
1305
|
+
signatureBytes
|
|
1306
|
+
}
|
|
1307
|
+
effects {
|
|
1308
|
+
status
|
|
1309
|
+
executionError {
|
|
1310
|
+
message
|
|
1311
|
+
abortCode
|
|
1312
|
+
identifier
|
|
1313
|
+
constant
|
|
1314
|
+
sourceLineNumber
|
|
1315
|
+
instructionOffset
|
|
1316
|
+
module {
|
|
1317
|
+
name
|
|
1318
|
+
package {
|
|
1319
|
+
address
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
function {
|
|
1323
|
+
name
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
epoch {
|
|
1327
|
+
epochId
|
|
1328
|
+
}
|
|
1329
|
+
effectsBcs @include(if: $includeEffects)
|
|
1330
|
+
effectsJson @include(if: $includeObjectTypes)
|
|
1331
|
+
objectChanges(first: 50) @include(if: $includeObjectTypes) {
|
|
1332
|
+
nodes {
|
|
1333
|
+
address
|
|
1334
|
+
outputState {
|
|
1335
|
+
asMoveObject {
|
|
1336
|
+
contents {
|
|
1337
|
+
type {
|
|
1338
|
+
repr
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
balanceChangesJson @include(if: $includeBalanceChanges)
|
|
1346
|
+
events(first: 50) @include(if: $includeEvents) {
|
|
1347
|
+
pageInfo {
|
|
1348
|
+
hasNextPage
|
|
1349
|
+
}
|
|
1350
|
+
nodes {
|
|
1351
|
+
transactionModule {
|
|
1352
|
+
package {
|
|
1353
|
+
address
|
|
1354
|
+
}
|
|
1355
|
+
name
|
|
1356
|
+
}
|
|
1357
|
+
sender {
|
|
1358
|
+
address
|
|
1359
|
+
}
|
|
1360
|
+
contents {
|
|
1361
|
+
type {
|
|
1362
|
+
repr
|
|
1363
|
+
}
|
|
1364
|
+
bcs
|
|
1365
|
+
json
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
}`) as unknown as TypedDocumentString<ListTransactionsQuery, ListTransactionsQueryVariables>;
|
|
1145
1371
|
export const ResolveTransactionDocument = new TypedDocumentString(`
|
|
1146
1372
|
query resolveTransaction($transaction: JSON!, $doGasSelection: Boolean = true, $checksEnabled: Boolean = true) {
|
|
1147
1373
|
simulateTransaction(
|
|
@@ -84,6 +84,16 @@ type Address implements Node & IAddressable {
|
|
|
84
84
|
"""
|
|
85
85
|
asObject: Object
|
|
86
86
|
"""
|
|
87
|
+
How this address (interpreted as an object ID) was referenced by a specific transaction.
|
|
88
|
+
|
|
89
|
+
Returns `null` if the object was not referenced, or was present only as a non-object marker variant of unchanged consensus input (e.g. cancelled, stream-ended, per-epoch).
|
|
90
|
+
|
|
91
|
+
The `transactionDigest` argument may be omitted when the query is scoped under a transaction context (e.g. a parent `Transaction`, `TransactionEffects`, or `Event`); the field then resolves against the in-scope transaction.
|
|
92
|
+
|
|
93
|
+
Passing an explicit `transactionDigest` other than the in-scope transaction in subscription context is not supported; for arbitrary transaction lookups, use the indexed Query API.
|
|
94
|
+
"""
|
|
95
|
+
asTransactionObject(transactionDigest: String): TransactionObject
|
|
96
|
+
"""
|
|
87
97
|
Fetch the total balance for coins with marker type `coinType` (e.g. `0x2::sui::SUI`), owned by this address.
|
|
88
98
|
|
|
89
99
|
Returns `None` when no checkpoint is set in scope (e.g. execution scope).
|
|
@@ -617,6 +627,16 @@ type CoinMetadata implements IAddressable & IMoveObject & IObject {
|
|
|
617
627
|
"""
|
|
618
628
|
allowGlobalPause: Boolean
|
|
619
629
|
"""
|
|
630
|
+
How this object was referenced by a specific transaction.
|
|
631
|
+
|
|
632
|
+
Returns `null` if the object was not referenced, or was present only as a non-object marker variant of unchanged consensus input (e.g. cancelled, stream-ended, per-epoch).
|
|
633
|
+
|
|
634
|
+
The `transactionDigest` argument may be omitted when the query is scoped under a transaction context (e.g. a parent `Transaction`, `TransactionEffects`, or `Event`); the field then resolves against the in-scope transaction.
|
|
635
|
+
|
|
636
|
+
Passing an explicit `transactionDigest` other than the in-scope transaction in subscription context is not supported; for arbitrary transaction lookups, use the indexed Query API.
|
|
637
|
+
"""
|
|
638
|
+
asTransactionObject(transactionDigest: String): TransactionObject
|
|
639
|
+
"""
|
|
620
640
|
Fetch the total balance for coins with marker type `coinType` (e.g. `0x2::sui::SUI`), owned by this address.
|
|
621
641
|
|
|
622
642
|
If the address does not own any coins of that type, a balance of zero is returned.
|
|
@@ -986,6 +1006,16 @@ type DynamicField implements Node & IAddressable & IMoveObject & IObject {
|
|
|
986
1006
|
"""
|
|
987
1007
|
addressAt(rootVersion: UInt53, checkpoint: UInt53): Address
|
|
988
1008
|
"""
|
|
1009
|
+
How this object was referenced by a specific transaction.
|
|
1010
|
+
|
|
1011
|
+
Returns `null` if the object was not referenced, or was present only as a non-object marker variant of unchanged consensus input (e.g. cancelled, stream-ended, per-epoch).
|
|
1012
|
+
|
|
1013
|
+
The `transactionDigest` argument may be omitted when the query is scoped under a transaction context (e.g. a parent `Transaction`, `TransactionEffects`, or `Event`); the field then resolves against the in-scope transaction.
|
|
1014
|
+
|
|
1015
|
+
Passing an explicit `transactionDigest` other than the in-scope transaction in subscription context is not supported; for arbitrary transaction lookups, use the indexed Query API.
|
|
1016
|
+
"""
|
|
1017
|
+
asTransactionObject(transactionDigest: String): TransactionObject
|
|
1018
|
+
"""
|
|
989
1019
|
Fetch the total balance for coins with marker type `coinType` (e.g. `0x2::sui::SUI`), owned by this address.
|
|
990
1020
|
|
|
991
1021
|
If the address does not own any coins of that type, a balance of zero is returned.
|
|
@@ -1641,6 +1671,16 @@ interface IAddressable {
|
|
|
1641
1671
|
"""
|
|
1642
1672
|
addressAt(rootVersion: UInt53, checkpoint: UInt53): Address
|
|
1643
1673
|
"""
|
|
1674
|
+
How this addressable entity was referenced by a specific transaction.
|
|
1675
|
+
|
|
1676
|
+
Returns `null` if the object was not referenced, or was present only as a non-object marker variant of unchanged consensus input (e.g. cancelled, stream-ended, per-epoch).
|
|
1677
|
+
|
|
1678
|
+
The `transactionDigest` argument may be omitted when the query is scoped under a transaction context (e.g. a parent `Transaction`, `TransactionEffects`, or `Event`); the field then resolves against the in-scope transaction.
|
|
1679
|
+
|
|
1680
|
+
Passing an explicit `transactionDigest` other than the in-scope transaction in subscription context is not supported; for arbitrary transaction lookups, use the indexed Query API.
|
|
1681
|
+
"""
|
|
1682
|
+
asTransactionObject(transactionDigest: String): TransactionObject
|
|
1683
|
+
"""
|
|
1644
1684
|
Fetch the total balance for coins with marker type `coinType` (e.g. `0x2::sui::SUI`), owned by this address.
|
|
1645
1685
|
|
|
1646
1686
|
If the address does not own any coins of that type, a balance of zero is returned.
|
|
@@ -2275,6 +2315,16 @@ type MoveObject implements Node & IAddressable & IMoveObject & IObject {
|
|
|
2275
2315
|
"""
|
|
2276
2316
|
asDynamicField: DynamicField
|
|
2277
2317
|
"""
|
|
2318
|
+
How this object was referenced by a specific transaction.
|
|
2319
|
+
|
|
2320
|
+
Returns `null` if the object was not referenced, or was present only as a non-object marker variant of unchanged consensus input (e.g. cancelled, stream-ended, per-epoch).
|
|
2321
|
+
|
|
2322
|
+
The `transactionDigest` argument may be omitted when the query is scoped under a transaction context (e.g. a parent `Transaction`, `TransactionEffects`, or `Event`); the field then resolves against the in-scope transaction.
|
|
2323
|
+
|
|
2324
|
+
Passing an explicit `transactionDigest` other than the in-scope transaction in subscription context is not supported; for arbitrary transaction lookups, use the indexed Query API.
|
|
2325
|
+
"""
|
|
2326
|
+
asTransactionObject(transactionDigest: String): TransactionObject
|
|
2327
|
+
"""
|
|
2278
2328
|
Fetch the total balance for coins with marker type `coinType` (e.g. `0x2::sui::SUI`), owned by this address.
|
|
2279
2329
|
|
|
2280
2330
|
If the address does not own any coins of that type, a balance of zero is returned.
|
|
@@ -2434,6 +2484,16 @@ type MovePackage implements Node & IAddressable & IObject {
|
|
|
2434
2484
|
"""
|
|
2435
2485
|
addressAt(rootVersion: UInt53, checkpoint: UInt53): Address
|
|
2436
2486
|
"""
|
|
2487
|
+
How this object was referenced by a specific transaction.
|
|
2488
|
+
|
|
2489
|
+
Returns `null` if the object was not referenced, or was present only as a non-object marker variant of unchanged consensus input (e.g. cancelled, stream-ended, per-epoch).
|
|
2490
|
+
|
|
2491
|
+
The `transactionDigest` argument may be omitted when the query is scoped under a transaction context (e.g. a parent `Transaction`, `TransactionEffects`, or `Event`); the field then resolves against the in-scope transaction.
|
|
2492
|
+
|
|
2493
|
+
Passing an explicit `transactionDigest` other than the in-scope transaction in subscription context is not supported; for arbitrary transaction lookups, use the indexed Query API.
|
|
2494
|
+
"""
|
|
2495
|
+
asTransactionObject(transactionDigest: String): TransactionObject
|
|
2496
|
+
"""
|
|
2437
2497
|
Fetch the total balance for coins with marker type `coinType` (e.g. `0x2::sui::SUI`), owned by this address.
|
|
2438
2498
|
|
|
2439
2499
|
If the address does not own any coins of that type, a balance of zero is returned.
|
|
@@ -2955,6 +3015,16 @@ type Object implements Node & IAddressable & IObject {
|
|
|
2955
3015
|
"""
|
|
2956
3016
|
asMovePackage: MovePackage
|
|
2957
3017
|
"""
|
|
3018
|
+
How this object was referenced by a specific transaction.
|
|
3019
|
+
|
|
3020
|
+
Returns `null` if the object was not referenced, or was present only as a non-object marker variant of unchanged consensus input (e.g. cancelled, stream-ended, per-epoch).
|
|
3021
|
+
|
|
3022
|
+
The `transactionDigest` argument may be omitted when the query is scoped under a transaction context (e.g. a parent `Transaction`, `TransactionEffects`, or `Event`); the field then resolves against the in-scope transaction.
|
|
3023
|
+
|
|
3024
|
+
Passing an explicit `transactionDigest` other than the in-scope transaction in subscription context is not supported; for arbitrary transaction lookups, use the indexed Query API.
|
|
3025
|
+
"""
|
|
3026
|
+
asTransactionObject(transactionDigest: String): TransactionObject
|
|
3027
|
+
"""
|
|
2958
3028
|
Fetch the total balance for coins with marker type `coinType` (e.g. `0x2::sui::SUI`), owned by this address.
|
|
2959
3029
|
|
|
2960
3030
|
If the address does not own any coins of that type, a balance of zero is returned.
|
|
@@ -4334,6 +4404,11 @@ enum TransactionKindInput {
|
|
|
4334
4404
|
PROGRAMMABLE_TX
|
|
4335
4405
|
}
|
|
4336
4406
|
|
|
4407
|
+
"""
|
|
4408
|
+
An object as it appears in a specific transaction. The variant discriminates whether the object was changed by the transaction or read as an unchanged consensus (shared) input.
|
|
4409
|
+
"""
|
|
4410
|
+
union TransactionObject = ObjectChange | ConsensusObjectRead
|
|
4411
|
+
|
|
4337
4412
|
"""
|
|
4338
4413
|
Transfers `inputs` to `address`. All inputs must have the `store` ability (allows public transfer) and must not be previously immutable or shared.
|
|
4339
4414
|
"""
|
|
@@ -253,6 +253,23 @@ const introspection = {
|
|
|
253
253
|
"args": [],
|
|
254
254
|
"isDeprecated": false
|
|
255
255
|
},
|
|
256
|
+
{
|
|
257
|
+
"name": "asTransactionObject",
|
|
258
|
+
"type": {
|
|
259
|
+
"kind": "UNION",
|
|
260
|
+
"name": "TransactionObject"
|
|
261
|
+
},
|
|
262
|
+
"args": [
|
|
263
|
+
{
|
|
264
|
+
"name": "transactionDigest",
|
|
265
|
+
"type": {
|
|
266
|
+
"kind": "SCALAR",
|
|
267
|
+
"name": "String"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
"isDeprecated": false
|
|
272
|
+
},
|
|
256
273
|
{
|
|
257
274
|
"name": "balance",
|
|
258
275
|
"type": {
|
|
@@ -1739,6 +1756,23 @@ const introspection = {
|
|
|
1739
1756
|
"args": [],
|
|
1740
1757
|
"isDeprecated": false
|
|
1741
1758
|
},
|
|
1759
|
+
{
|
|
1760
|
+
"name": "asTransactionObject",
|
|
1761
|
+
"type": {
|
|
1762
|
+
"kind": "UNION",
|
|
1763
|
+
"name": "TransactionObject"
|
|
1764
|
+
},
|
|
1765
|
+
"args": [
|
|
1766
|
+
{
|
|
1767
|
+
"name": "transactionDigest",
|
|
1768
|
+
"type": {
|
|
1769
|
+
"kind": "SCALAR",
|
|
1770
|
+
"name": "String"
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
],
|
|
1774
|
+
"isDeprecated": false
|
|
1775
|
+
},
|
|
1742
1776
|
{
|
|
1743
1777
|
"name": "balance",
|
|
1744
1778
|
"type": {
|
|
@@ -2805,6 +2839,23 @@ const introspection = {
|
|
|
2805
2839
|
],
|
|
2806
2840
|
"isDeprecated": false
|
|
2807
2841
|
},
|
|
2842
|
+
{
|
|
2843
|
+
"name": "asTransactionObject",
|
|
2844
|
+
"type": {
|
|
2845
|
+
"kind": "UNION",
|
|
2846
|
+
"name": "TransactionObject"
|
|
2847
|
+
},
|
|
2848
|
+
"args": [
|
|
2849
|
+
{
|
|
2850
|
+
"name": "transactionDigest",
|
|
2851
|
+
"type": {
|
|
2852
|
+
"kind": "SCALAR",
|
|
2853
|
+
"name": "String"
|
|
2854
|
+
}
|
|
2855
|
+
}
|
|
2856
|
+
],
|
|
2857
|
+
"isDeprecated": false
|
|
2858
|
+
},
|
|
2808
2859
|
{
|
|
2809
2860
|
"name": "balance",
|
|
2810
2861
|
"type": {
|
|
@@ -4741,6 +4792,23 @@ const introspection = {
|
|
|
4741
4792
|
],
|
|
4742
4793
|
"isDeprecated": false
|
|
4743
4794
|
},
|
|
4795
|
+
{
|
|
4796
|
+
"name": "asTransactionObject",
|
|
4797
|
+
"type": {
|
|
4798
|
+
"kind": "UNION",
|
|
4799
|
+
"name": "TransactionObject"
|
|
4800
|
+
},
|
|
4801
|
+
"args": [
|
|
4802
|
+
{
|
|
4803
|
+
"name": "transactionDigest",
|
|
4804
|
+
"type": {
|
|
4805
|
+
"kind": "SCALAR",
|
|
4806
|
+
"name": "String"
|
|
4807
|
+
}
|
|
4808
|
+
}
|
|
4809
|
+
],
|
|
4810
|
+
"isDeprecated": false
|
|
4811
|
+
},
|
|
4744
4812
|
{
|
|
4745
4813
|
"name": "balance",
|
|
4746
4814
|
"type": {
|
|
@@ -6808,6 +6876,23 @@ const introspection = {
|
|
|
6808
6876
|
"args": [],
|
|
6809
6877
|
"isDeprecated": false
|
|
6810
6878
|
},
|
|
6879
|
+
{
|
|
6880
|
+
"name": "asTransactionObject",
|
|
6881
|
+
"type": {
|
|
6882
|
+
"kind": "UNION",
|
|
6883
|
+
"name": "TransactionObject"
|
|
6884
|
+
},
|
|
6885
|
+
"args": [
|
|
6886
|
+
{
|
|
6887
|
+
"name": "transactionDigest",
|
|
6888
|
+
"type": {
|
|
6889
|
+
"kind": "SCALAR",
|
|
6890
|
+
"name": "String"
|
|
6891
|
+
}
|
|
6892
|
+
}
|
|
6893
|
+
],
|
|
6894
|
+
"isDeprecated": false
|
|
6895
|
+
},
|
|
6811
6896
|
{
|
|
6812
6897
|
"name": "balance",
|
|
6813
6898
|
"type": {
|
|
@@ -7499,6 +7584,23 @@ const introspection = {
|
|
|
7499
7584
|
],
|
|
7500
7585
|
"isDeprecated": false
|
|
7501
7586
|
},
|
|
7587
|
+
{
|
|
7588
|
+
"name": "asTransactionObject",
|
|
7589
|
+
"type": {
|
|
7590
|
+
"kind": "UNION",
|
|
7591
|
+
"name": "TransactionObject"
|
|
7592
|
+
},
|
|
7593
|
+
"args": [
|
|
7594
|
+
{
|
|
7595
|
+
"name": "transactionDigest",
|
|
7596
|
+
"type": {
|
|
7597
|
+
"kind": "SCALAR",
|
|
7598
|
+
"name": "String"
|
|
7599
|
+
}
|
|
7600
|
+
}
|
|
7601
|
+
],
|
|
7602
|
+
"isDeprecated": false
|
|
7603
|
+
},
|
|
7502
7604
|
{
|
|
7503
7605
|
"name": "balance",
|
|
7504
7606
|
"type": {
|
|
@@ -9041,6 +9143,23 @@ const introspection = {
|
|
|
9041
9143
|
"args": [],
|
|
9042
9144
|
"isDeprecated": false
|
|
9043
9145
|
},
|
|
9146
|
+
{
|
|
9147
|
+
"name": "asTransactionObject",
|
|
9148
|
+
"type": {
|
|
9149
|
+
"kind": "UNION",
|
|
9150
|
+
"name": "TransactionObject"
|
|
9151
|
+
},
|
|
9152
|
+
"args": [
|
|
9153
|
+
{
|
|
9154
|
+
"name": "transactionDigest",
|
|
9155
|
+
"type": {
|
|
9156
|
+
"kind": "SCALAR",
|
|
9157
|
+
"name": "String"
|
|
9158
|
+
}
|
|
9159
|
+
}
|
|
9160
|
+
],
|
|
9161
|
+
"isDeprecated": false
|
|
9162
|
+
},
|
|
9044
9163
|
{
|
|
9045
9164
|
"name": "balance",
|
|
9046
9165
|
"type": {
|
|
@@ -13053,6 +13172,20 @@ const introspection = {
|
|
|
13053
13172
|
}
|
|
13054
13173
|
]
|
|
13055
13174
|
},
|
|
13175
|
+
{
|
|
13176
|
+
"kind": "UNION",
|
|
13177
|
+
"name": "TransactionObject",
|
|
13178
|
+
"possibleTypes": [
|
|
13179
|
+
{
|
|
13180
|
+
"kind": "OBJECT",
|
|
13181
|
+
"name": "ConsensusObjectRead"
|
|
13182
|
+
},
|
|
13183
|
+
{
|
|
13184
|
+
"kind": "OBJECT",
|
|
13185
|
+
"name": "ObjectChange"
|
|
13186
|
+
}
|
|
13187
|
+
]
|
|
13188
|
+
},
|
|
13056
13189
|
{
|
|
13057
13190
|
"kind": "OBJECT",
|
|
13058
13191
|
"name": "TransferObjectsCommand",
|
package/src/graphql/index.ts
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
query listEvents($filter: EventFilter, $first: Int, $after: String, $last: Int, $before: String) {
|
|
5
|
+
events(filter: $filter, first: $first, after: $after, last: $last, before: $before) {
|
|
6
|
+
pageInfo {
|
|
7
|
+
hasNextPage
|
|
8
|
+
hasPreviousPage
|
|
9
|
+
startCursor
|
|
10
|
+
endCursor
|
|
11
|
+
}
|
|
12
|
+
nodes {
|
|
13
|
+
sequenceNumber
|
|
14
|
+
transaction {
|
|
15
|
+
digest
|
|
16
|
+
effects {
|
|
17
|
+
checkpoint {
|
|
18
|
+
sequenceNumber
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
transactionModule {
|
|
23
|
+
package {
|
|
24
|
+
address
|
|
25
|
+
}
|
|
26
|
+
name
|
|
27
|
+
}
|
|
28
|
+
sender {
|
|
29
|
+
address
|
|
30
|
+
}
|
|
31
|
+
contents {
|
|
32
|
+
type {
|
|
33
|
+
repr
|
|
34
|
+
}
|
|
35
|
+
bcs
|
|
36
|
+
json
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -71,6 +71,32 @@ query getTransactionBlock(
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
query listTransactions(
|
|
75
|
+
$filter: TransactionFilter
|
|
76
|
+
$first: Int
|
|
77
|
+
$after: String
|
|
78
|
+
$last: Int
|
|
79
|
+
$before: String
|
|
80
|
+
$includeTransaction: Boolean = false
|
|
81
|
+
$includeEffects: Boolean = false
|
|
82
|
+
$includeEvents: Boolean = false
|
|
83
|
+
$includeBalanceChanges: Boolean = false
|
|
84
|
+
$includeObjectTypes: Boolean = false
|
|
85
|
+
$includeBcs: Boolean = false
|
|
86
|
+
) {
|
|
87
|
+
transactions(filter: $filter, first: $first, after: $after, last: $last, before: $before) {
|
|
88
|
+
pageInfo {
|
|
89
|
+
hasNextPage
|
|
90
|
+
hasPreviousPage
|
|
91
|
+
startCursor
|
|
92
|
+
endCursor
|
|
93
|
+
}
|
|
94
|
+
nodes {
|
|
95
|
+
...TRANSACTION_FIELDS
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
74
100
|
fragment TRANSACTION_FIELDS on Transaction {
|
|
75
101
|
digest
|
|
76
102
|
transactionJson @include(if: $includeTransaction)
|