@mysten/sui 2.22.0 → 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 +47 -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 +4225 -1319
- 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/address-balance-transaction-expiration.mjs +22 -0
- package/dist/client/address-balance-transaction-expiration.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 +96 -4
- package/dist/graphql/core.mjs.map +1 -1
- package/dist/graphql/generated/queries.d.mts.map +1 -1
- package/dist/graphql/generated/queries.mjs +140 -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 +113 -4
- 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/forking/v1alpha/forking_service.client.d.mts +4 -4
- 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/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 +6 -6
- 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/address.mjs +2 -2
- package/dist/zklogin/address.mjs.map +1 -1
- package/dist/zklogin/bcs.d.mts +14 -14
- package/dist/zklogin/poseidon.mjs +5 -2
- package/dist/zklogin/poseidon.mjs.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/address-balance-transaction-expiration.ts +53 -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 +156 -6
- package/src/graphql/generated/queries.ts +230 -1
- 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 +29 -0
- package/src/grpc/client.ts +19 -0
- package/src/grpc/core.ts +201 -6
- 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
- package/src/zklogin/address.ts +2 -2
- package/src/zklogin/poseidon.ts +6 -4
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { normalizeSuiAddress } from '../utils/sui-types.js';
|
|
5
|
+
import type { SuiClientTypes } from './types.js';
|
|
6
|
+
|
|
7
|
+
export interface ResolvedPagination {
|
|
8
|
+
descending: boolean;
|
|
9
|
+
after: string | undefined;
|
|
10
|
+
before: string | undefined;
|
|
11
|
+
limit: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Default page size applied when `limit` is omitted, so every transport
|
|
16
|
+
* requests the same page size instead of falling back to differing server
|
|
17
|
+
* defaults.
|
|
18
|
+
*/
|
|
19
|
+
const DEFAULT_PAGE_SIZE = 50;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Validates pagination bounds and resolves the traversal direction.
|
|
23
|
+
*
|
|
24
|
+
* `after` and `before` are exclusive ledger-position bounds. Until every
|
|
25
|
+
* transport can combine bounds freely, a query accepts at most one bound, and
|
|
26
|
+
* the bound must match the traversal direction (`after` implies ascending,
|
|
27
|
+
* `before` implies descending).
|
|
28
|
+
*/
|
|
29
|
+
export function resolvePagination(options: {
|
|
30
|
+
after?: string | null;
|
|
31
|
+
before?: string | null;
|
|
32
|
+
order?: 'ascending' | 'descending';
|
|
33
|
+
limit?: number;
|
|
34
|
+
}): ResolvedPagination {
|
|
35
|
+
if (options.after != null && options.before != null) {
|
|
36
|
+
throw new Error('Only one of `after` or `before` may be provided');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const descending = options.order ? options.order === 'descending' : options.before != null;
|
|
40
|
+
|
|
41
|
+
if (options.after != null && descending) {
|
|
42
|
+
throw new Error('`after` can not be combined with descending queries');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (options.before != null && !descending) {
|
|
46
|
+
throw new Error('`before` can not be combined with ascending queries');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
descending,
|
|
51
|
+
after: options.after ?? undefined,
|
|
52
|
+
before: options.before ?? undefined,
|
|
53
|
+
limit: options.limit ?? DEFAULT_PAGE_SIZE,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type ResolvedTransactionFilter =
|
|
58
|
+
| { $kind: 'sender'; sender: string }
|
|
59
|
+
| { $kind: 'function'; package: string; module?: string; function?: string };
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Validates that a transaction query's filter supports pagination bounds.
|
|
63
|
+
*
|
|
64
|
+
* Function filters can only be paginated when fully qualified, since JSON-RPC
|
|
65
|
+
* rejects cursors on package- or module-level `MoveFunction` filters.
|
|
66
|
+
*/
|
|
67
|
+
export function validateTransactionQuery(
|
|
68
|
+
filter: ResolvedTransactionFilter | undefined,
|
|
69
|
+
pagination: ResolvedPagination,
|
|
70
|
+
): void {
|
|
71
|
+
if (
|
|
72
|
+
filter?.$kind === 'function' &&
|
|
73
|
+
(pagination.after != null || pagination.before != null) &&
|
|
74
|
+
(!filter.module || !filter.function)
|
|
75
|
+
) {
|
|
76
|
+
throw new Error(
|
|
77
|
+
'Paginating transactions filtered by function requires a fully qualified `package::module::function`',
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type ResolvedEventFilter =
|
|
83
|
+
| { $kind: 'sender'; sender: string }
|
|
84
|
+
| { $kind: 'emitModule'; package: string; module: string }
|
|
85
|
+
| { $kind: 'eventTypeModule'; package: string; module: string }
|
|
86
|
+
| { $kind: 'eventType'; eventType: string };
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Validates a transaction filter and resolves any MVR names it contains.
|
|
90
|
+
*
|
|
91
|
+
* Every transport resolves filters through this function so that validation
|
|
92
|
+
* errors and MVR handling are identical across clients.
|
|
93
|
+
*/
|
|
94
|
+
export async function resolveTransactionFilter(
|
|
95
|
+
mvr: SuiClientTypes.MvrMethods,
|
|
96
|
+
filter: SuiClientTypes.TransactionFilter,
|
|
97
|
+
signal?: AbortSignal,
|
|
98
|
+
): Promise<ResolvedTransactionFilter> {
|
|
99
|
+
assertSinglePredicate(filter, ['sender', 'function'], 'transaction');
|
|
100
|
+
|
|
101
|
+
if (filter.sender != null) {
|
|
102
|
+
return { $kind: 'sender', sender: normalizeSuiAddress(filter.sender) };
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const [pkg, module, fn, ...rest] = filter.function!.split('::');
|
|
106
|
+
|
|
107
|
+
if (!pkg || rest.length > 0 || module === '' || fn === '') {
|
|
108
|
+
throw new Error(
|
|
109
|
+
`Invalid function filter "${filter.function}": expected "package", "package::module", or "package::module::function"`,
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
$kind: 'function',
|
|
115
|
+
package: normalizeSuiAddress((await mvr.resolvePackage({ package: pkg, signal })).package),
|
|
116
|
+
module,
|
|
117
|
+
function: fn,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Validates an event filter and resolves any MVR names it contains.
|
|
123
|
+
*
|
|
124
|
+
* `emitModule` must name a module (`package::module`), and `eventType` must be
|
|
125
|
+
* at least module-qualified (`package::module` or a full type). Every transport
|
|
126
|
+
* resolves filters through this function so that validation errors and MVR
|
|
127
|
+
* handling are identical across clients.
|
|
128
|
+
*/
|
|
129
|
+
export async function resolveEventFilter(
|
|
130
|
+
mvr: SuiClientTypes.MvrMethods,
|
|
131
|
+
filter: SuiClientTypes.EventFilter,
|
|
132
|
+
signal?: AbortSignal,
|
|
133
|
+
): Promise<ResolvedEventFilter> {
|
|
134
|
+
assertSinglePredicate(filter, ['sender', 'emitModule', 'eventType'], 'event');
|
|
135
|
+
|
|
136
|
+
if (filter.sender != null) {
|
|
137
|
+
return { $kind: 'sender', sender: normalizeSuiAddress(filter.sender) };
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (filter.emitModule != null) {
|
|
141
|
+
const [pkg, module, ...rest] = filter.emitModule.split('::');
|
|
142
|
+
|
|
143
|
+
if (!pkg || !module || rest.length > 0) {
|
|
144
|
+
throw new Error(
|
|
145
|
+
`Invalid emitModule filter "${filter.emitModule}": expected "package::module"`,
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return {
|
|
150
|
+
$kind: 'emitModule',
|
|
151
|
+
package: normalizeSuiAddress((await mvr.resolvePackage({ package: pkg, signal })).package),
|
|
152
|
+
module,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const eventType = filter.eventType!;
|
|
157
|
+
const segments = eventType.split('::');
|
|
158
|
+
|
|
159
|
+
if (segments.length === 2 && segments.every((segment) => segment !== '')) {
|
|
160
|
+
return {
|
|
161
|
+
$kind: 'eventTypeModule',
|
|
162
|
+
package: normalizeSuiAddress(
|
|
163
|
+
(await mvr.resolvePackage({ package: segments[0], signal })).package,
|
|
164
|
+
),
|
|
165
|
+
module: segments[1],
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (segments.length < 3 || segments.some((segment) => segment === '')) {
|
|
170
|
+
throw new Error(
|
|
171
|
+
`Invalid eventType filter "${eventType}": expected "package::module" or a fully qualified type name`,
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return {
|
|
176
|
+
$kind: 'eventType',
|
|
177
|
+
eventType: (await mvr.resolveType({ type: eventType, signal })).type,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function assertSinglePredicate(
|
|
182
|
+
filter: Record<string, unknown>,
|
|
183
|
+
predicates: string[],
|
|
184
|
+
kind: string,
|
|
185
|
+
): void {
|
|
186
|
+
const present = predicates.filter((predicate) => filter[predicate] != null);
|
|
187
|
+
|
|
188
|
+
if (present.length !== 1) {
|
|
189
|
+
throw new Error(
|
|
190
|
+
`A ${kind} filter must specify exactly one of ${predicates.join(', ')}${
|
|
191
|
+
present.length ? ` (got ${present.join(', ')})` : ''
|
|
192
|
+
}`,
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
}
|
package/src/client/types.ts
CHANGED
|
@@ -366,7 +366,12 @@ export namespace SuiClientTypes {
|
|
|
366
366
|
balanceChanges?: boolean;
|
|
367
367
|
/** Include parsed transaction effects (gas used, changed objects, status, etc.). */
|
|
368
368
|
effects?: boolean;
|
|
369
|
-
/**
|
|
369
|
+
/**
|
|
370
|
+
* Include events emitted by the transaction.
|
|
371
|
+
*
|
|
372
|
+
* On the GraphQL transport, at most the first 50 events of a transaction are returned;
|
|
373
|
+
* gRPC and JSON-RPC return the full event list.
|
|
374
|
+
*/
|
|
370
375
|
events?: boolean;
|
|
371
376
|
/** Include a map of object IDs to their types for all changed objects. */
|
|
372
377
|
objectTypes?: boolean;
|
|
@@ -461,6 +466,186 @@ export namespace SuiClientTypes {
|
|
|
461
466
|
checksEnabled?: boolean;
|
|
462
467
|
}
|
|
463
468
|
|
|
469
|
+
/** Query methods */
|
|
470
|
+
export interface TransportMethods {
|
|
471
|
+
listTransactions: <Include extends TransactionInclude = {}>(
|
|
472
|
+
options: ListTransactionsOptions<Include>,
|
|
473
|
+
) => Promise<ListTransactionsResponse<Include>>;
|
|
474
|
+
listEvents: (options: ListEventsOptions) => Promise<ListEventsResponse>;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* A filter matching transactions. Exactly one predicate must be specified.
|
|
479
|
+
*
|
|
480
|
+
* All predicates are supported identically by every transport.
|
|
481
|
+
*/
|
|
482
|
+
export type TransactionFilter =
|
|
483
|
+
| {
|
|
484
|
+
/** Match transactions sent by this address. */
|
|
485
|
+
sender: string;
|
|
486
|
+
function?: never;
|
|
487
|
+
}
|
|
488
|
+
| {
|
|
489
|
+
/**
|
|
490
|
+
* Match transactions that called a Move function, specified as a
|
|
491
|
+
* `::`-delimited Move path: `package`, `package::module`, or
|
|
492
|
+
* `package::module::function`.
|
|
493
|
+
*/
|
|
494
|
+
function: string;
|
|
495
|
+
sender?: never;
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* A filter matching events. Exactly one predicate must be specified.
|
|
500
|
+
*
|
|
501
|
+
* All predicates are supported by every transport, with one caveat: on the deprecated
|
|
502
|
+
* JSON-RPC transport, an `eventType` naming a generic type must include type arguments —
|
|
503
|
+
* a bare generic name (e.g. `0xpkg::mod::Event` for events of type `0xpkg::mod::Event<T>`)
|
|
504
|
+
* matches any instantiation on gRPC and GraphQL, but matches nothing on JSON-RPC, which
|
|
505
|
+
* compares the full type for exact equality.
|
|
506
|
+
*/
|
|
507
|
+
export type EventFilter =
|
|
508
|
+
| {
|
|
509
|
+
/** Match events emitted by transactions sent by this address. */
|
|
510
|
+
sender: string;
|
|
511
|
+
emitModule?: never;
|
|
512
|
+
eventType?: never;
|
|
513
|
+
}
|
|
514
|
+
| {
|
|
515
|
+
/** Match events emitted by a module, specified as `package::module`. */
|
|
516
|
+
emitModule: string;
|
|
517
|
+
sender?: never;
|
|
518
|
+
eventType?: never;
|
|
519
|
+
}
|
|
520
|
+
| {
|
|
521
|
+
/**
|
|
522
|
+
* Match events by type: either every event whose type is defined in a
|
|
523
|
+
* module (`package::module`), or events with a fully qualified type
|
|
524
|
+
* name (`package::module::Name` or `package::module::Name<T1, T2>`).
|
|
525
|
+
*
|
|
526
|
+
* A bare generic name (`package::module::Name` without type arguments) matches
|
|
527
|
+
* any instantiation on gRPC and GraphQL, but matches nothing on the deprecated
|
|
528
|
+
* JSON-RPC transport, which compares the full type for exact equality.
|
|
529
|
+
*/
|
|
530
|
+
eventType: string;
|
|
531
|
+
sender?: never;
|
|
532
|
+
emitModule?: never;
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
export interface ListTransactionsOptions<
|
|
536
|
+
Include extends TransactionInclude = {},
|
|
537
|
+
> extends CoreClientMethodOptions {
|
|
538
|
+
filter?: TransactionFilter;
|
|
539
|
+
/**
|
|
540
|
+
* Maximum number of items to return. Defaults to 50.
|
|
541
|
+
*
|
|
542
|
+
* Servers cap page sizes (50 by default): values above the server's cap cause the
|
|
543
|
+
* GraphQL and JSON-RPC transports to throw, while gRPC servers silently truncate
|
|
544
|
+
* the page to their configured maximum.
|
|
545
|
+
*/
|
|
546
|
+
limit?: number;
|
|
547
|
+
/**
|
|
548
|
+
* Return items strictly after this cursor in ledger order (usually the `endCursor` of
|
|
549
|
+
* an ascending page, or the `startCursor` of a descending page to poll for new items).
|
|
550
|
+
* Implies `order: 'ascending'`, and cannot be combined with `before`.
|
|
551
|
+
*/
|
|
552
|
+
after?: string | null;
|
|
553
|
+
/**
|
|
554
|
+
* Return items strictly before this cursor in ledger order (usually the `endCursor` of
|
|
555
|
+
* a descending page). Implies `order: 'descending'`, and cannot be combined with
|
|
556
|
+
* `after`.
|
|
557
|
+
*/
|
|
558
|
+
before?: string | null;
|
|
559
|
+
/** Order of returned results. Defaults to `ascending` (oldest first). */
|
|
560
|
+
order?: 'ascending' | 'descending';
|
|
561
|
+
include?: Include & TransactionInclude;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
export interface ListTransactionsResponse<out Include extends TransactionInclude = {}> {
|
|
565
|
+
transactions: TransactionResult<Include>[];
|
|
566
|
+
/**
|
|
567
|
+
* Whether more items may be available after this page.
|
|
568
|
+
*
|
|
569
|
+
* gRPC servers bound how much of the ledger a single request scans, so a scan-limited
|
|
570
|
+
* query can return fewer items than `limit` (even none) with `hasNextPage: true`;
|
|
571
|
+
* continuing from `endCursor` always makes progress through the scanned range.
|
|
572
|
+
*/
|
|
573
|
+
hasNextPage: boolean;
|
|
574
|
+
/**
|
|
575
|
+
* Cursor at the first returned item. After a descending read of the most recent
|
|
576
|
+
* items, pass as `after` to poll for items added since.
|
|
577
|
+
*/
|
|
578
|
+
startCursor: string | null;
|
|
579
|
+
/**
|
|
580
|
+
* Cursor at the last returned item. Continue the query by passing it as `after`
|
|
581
|
+
* (ascending) or `before` (descending).
|
|
582
|
+
*/
|
|
583
|
+
endCursor: string | null;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
export interface ListEventsOptions extends CoreClientMethodOptions {
|
|
587
|
+
filter?: EventFilter;
|
|
588
|
+
/**
|
|
589
|
+
* Maximum number of items to return. Defaults to 50.
|
|
590
|
+
*
|
|
591
|
+
* Servers cap page sizes (50 by default): values above the server's cap cause the
|
|
592
|
+
* GraphQL and JSON-RPC transports to throw, while gRPC servers silently truncate
|
|
593
|
+
* the page to their configured maximum.
|
|
594
|
+
*/
|
|
595
|
+
limit?: number;
|
|
596
|
+
/**
|
|
597
|
+
* Return items strictly after this cursor in ledger order (usually the `endCursor` of
|
|
598
|
+
* an ascending page, or the `startCursor` of a descending page to poll for new items).
|
|
599
|
+
* Implies `order: 'ascending'`, and cannot be combined with `before`.
|
|
600
|
+
*/
|
|
601
|
+
after?: string | null;
|
|
602
|
+
/**
|
|
603
|
+
* Return items strictly before this cursor in ledger order (usually the `endCursor` of
|
|
604
|
+
* a descending page). Implies `order: 'descending'`, and cannot be combined with
|
|
605
|
+
* `after`.
|
|
606
|
+
*/
|
|
607
|
+
before?: string | null;
|
|
608
|
+
/** Order of returned results. Defaults to `ascending` (oldest first). */
|
|
609
|
+
order?: 'ascending' | 'descending';
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/** An event returned from a query, along with its position in the ledger. */
|
|
613
|
+
export interface EventEntry extends Event {
|
|
614
|
+
/**
|
|
615
|
+
* The sequence number of the checkpoint containing the emitting transaction.
|
|
616
|
+
*
|
|
617
|
+
* `null` on the JSON-RPC transport, which does not expose checkpoint
|
|
618
|
+
* information for queried events.
|
|
619
|
+
*/
|
|
620
|
+
checkpoint: string | null;
|
|
621
|
+
/** The digest of the transaction that emitted this event. */
|
|
622
|
+
transactionDigest: string;
|
|
623
|
+
/** The index of this event within its transaction's event list. */
|
|
624
|
+
eventIndex: number;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
export interface ListEventsResponse {
|
|
628
|
+
events: EventEntry[];
|
|
629
|
+
/**
|
|
630
|
+
* Whether more items may be available after this page.
|
|
631
|
+
*
|
|
632
|
+
* gRPC servers bound how much of the ledger a single request scans, so a scan-limited
|
|
633
|
+
* query can return fewer items than `limit` (even none) with `hasNextPage: true`;
|
|
634
|
+
* continuing from `endCursor` always makes progress through the scanned range.
|
|
635
|
+
*/
|
|
636
|
+
hasNextPage: boolean;
|
|
637
|
+
/**
|
|
638
|
+
* Cursor at the first returned item. After a descending read of the most recent
|
|
639
|
+
* items, pass as `after` to poll for items added since.
|
|
640
|
+
*/
|
|
641
|
+
startCursor: string | null;
|
|
642
|
+
/**
|
|
643
|
+
* Cursor at the last returned item. Continue the query by passing it as `after`
|
|
644
|
+
* (ascending) or `before` (descending).
|
|
645
|
+
*/
|
|
646
|
+
endCursor: string | null;
|
|
647
|
+
}
|
|
648
|
+
|
|
464
649
|
export interface GetReferenceGasPriceOptions extends CoreClientMethodOptions {}
|
|
465
650
|
|
|
466
651
|
export interface TransportMethods {
|
package/src/client/utils.ts
CHANGED
|
@@ -401,6 +401,19 @@ export function parseTransactionBcs(
|
|
|
401
401
|
).snapshot();
|
|
402
402
|
}
|
|
403
403
|
|
|
404
|
+
/**
|
|
405
|
+
* Checks whether serialized transaction bytes have a gas payment explicitly set to an empty
|
|
406
|
+
* list, which indicates gas is paid from the sender's address balance. Returns false for
|
|
407
|
+
* bytes that can't be parsed as `TransactionData`, leaving validation to the server.
|
|
408
|
+
*/
|
|
409
|
+
export function transactionBytesHaveEmptyGasPayment(bytes: Uint8Array): boolean {
|
|
410
|
+
try {
|
|
411
|
+
return bcs.TransactionData.parse(bytes).V1?.gasData.payment?.length === 0;
|
|
412
|
+
} catch {
|
|
413
|
+
return false;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
404
417
|
/**
|
|
405
418
|
* Extracts just the status from transaction effects BCS without fully parsing.
|
|
406
419
|
* This is optimized for cases where we only need the status (success/failure)
|
package/src/graphql/client.ts
CHANGED
|
@@ -70,6 +70,20 @@ export function isSuiGraphQLClient(client: unknown): client is SuiGraphQLClient
|
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
export interface GraphQLSimulateTransactionOptions<
|
|
74
|
+
Include extends SuiClientTypes.SimulateTransactionInclude = {},
|
|
75
|
+
> extends SuiClientTypes.SimulateTransactionOptions<Include> {
|
|
76
|
+
/**
|
|
77
|
+
* Overrides whether the server selects gas payment during simulation.
|
|
78
|
+
*
|
|
79
|
+
* When not set, gas selection is enabled only when the transaction's gas payment is explicitly
|
|
80
|
+
* set to an empty list (`[]`), which indicates gas is paid from the sender's address balance.
|
|
81
|
+
* Transactions with gas coins set are simulated as-is, and transactions without a gas payment
|
|
82
|
+
* are simulated with a mocked gas coin.
|
|
83
|
+
*/
|
|
84
|
+
doGasSelection?: boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
73
87
|
export interface DynamicFieldInclude {
|
|
74
88
|
value?: boolean;
|
|
75
89
|
}
|
|
@@ -230,7 +244,7 @@ export class SuiGraphQLClient<Queries extends Record<string, GraphQLDocument> =
|
|
|
230
244
|
}
|
|
231
245
|
|
|
232
246
|
simulateTransaction<Include extends SuiClientTypes.SimulateTransactionInclude = {}>(
|
|
233
|
-
input:
|
|
247
|
+
input: GraphQLSimulateTransactionOptions<Include>,
|
|
234
248
|
): Promise<SuiClientTypes.SimulateTransactionResult<Include>> {
|
|
235
249
|
return this.core.simulateTransaction(input);
|
|
236
250
|
}
|
|
@@ -324,6 +338,16 @@ export class SuiGraphQLClient<Queries extends Record<string, GraphQLDocument> =
|
|
|
324
338
|
return this.core.getDynamicField(input);
|
|
325
339
|
}
|
|
326
340
|
|
|
341
|
+
listTransactions<Include extends SuiClientTypes.TransactionInclude = {}>(
|
|
342
|
+
input: SuiClientTypes.ListTransactionsOptions<Include>,
|
|
343
|
+
): Promise<SuiClientTypes.ListTransactionsResponse<Include>> {
|
|
344
|
+
return this.core.listTransactions(input);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
listEvents(input: SuiClientTypes.ListEventsOptions): Promise<SuiClientTypes.ListEventsResponse> {
|
|
348
|
+
return this.core.listEvents(input);
|
|
349
|
+
}
|
|
350
|
+
|
|
327
351
|
getMoveFunction(
|
|
328
352
|
input: SuiClientTypes.GetMoveFunctionOptions,
|
|
329
353
|
): Promise<SuiClientTypes.GetMoveFunctionResponse> {
|
package/src/graphql/core.ts
CHANGED
|
@@ -28,6 +28,8 @@ import {
|
|
|
28
28
|
GetOwnedObjectsDocument,
|
|
29
29
|
GetReferenceGasPriceDocument,
|
|
30
30
|
GetTransactionBlockDocument,
|
|
31
|
+
ListEventsDocument,
|
|
32
|
+
ListTransactionsDocument,
|
|
31
33
|
MultiGetObjectsDocument,
|
|
32
34
|
ResolveTransactionDocument,
|
|
33
35
|
SimulateTransactionDocument,
|
|
@@ -36,19 +38,30 @@ import {
|
|
|
36
38
|
} from './generated/queries.js';
|
|
37
39
|
import { ObjectError, SimulationError } from '../client/errors.js';
|
|
38
40
|
import { chunk, fromBase64, toBase64 } from '@mysten/utils';
|
|
39
|
-
import { normalizeSuiAddress } from '../utils/sui-types.js';
|
|
40
|
-
import {
|
|
41
|
+
import { normalizeStructTag, normalizeSuiAddress } from '../utils/sui-types.js';
|
|
42
|
+
import {
|
|
43
|
+
formatMoveAbortMessage,
|
|
44
|
+
parseTransactionEffectsBcs,
|
|
45
|
+
transactionBytesHaveEmptyGasPayment,
|
|
46
|
+
} from '../client/utils.js';
|
|
41
47
|
import type { OpenMoveTypeSignatureBody, OpenMoveTypeSignature } from './types.js';
|
|
42
48
|
import {
|
|
43
49
|
transactionDataToGrpcTransaction,
|
|
44
50
|
transactionToGrpcJson,
|
|
45
51
|
grpcTransactionToTransactionData,
|
|
46
52
|
} from '../client/transaction-resolver.js';
|
|
53
|
+
import { setAddressBalanceTransactionExpirationFromSimulatedEpoch } from '../client/address-balance-transaction-expiration.js';
|
|
47
54
|
import { BalanceChange as BalanceChangeType } from '../grpc/proto/sui/rpc/v2/balance_change.js';
|
|
48
55
|
import { TransactionEffects as TransactionEffectsType } from '../grpc/proto/sui/rpc/v2/effects.js';
|
|
49
56
|
import { Transaction as GrpcTransactionType } from '../grpc/proto/sui/rpc/v2/transaction.js';
|
|
50
57
|
import { TransactionDataBuilder } from '../transactions/TransactionData.js';
|
|
51
58
|
import type { BuildTransactionOptions } from '../transactions/index.js';
|
|
59
|
+
import {
|
|
60
|
+
resolveEventFilter,
|
|
61
|
+
resolvePagination,
|
|
62
|
+
resolveTransactionFilter,
|
|
63
|
+
validateTransactionQuery,
|
|
64
|
+
} from '../client/query-filters.js';
|
|
52
65
|
|
|
53
66
|
export class GraphQLCoreClient extends CoreClient {
|
|
54
67
|
#graphqlClient: SuiGraphQLClient;
|
|
@@ -385,12 +398,21 @@ export class GraphQLCoreClient extends CoreClient {
|
|
|
385
398
|
return parseTransaction(result.effects?.transaction!, options.include);
|
|
386
399
|
}
|
|
387
400
|
async simulateTransaction<Include extends SuiClientTypes.SimulateTransactionInclude = {}>(
|
|
388
|
-
options: SuiClientTypes.SimulateTransactionOptions<Include
|
|
401
|
+
options: SuiClientTypes.SimulateTransactionOptions<Include> & { doGasSelection?: boolean },
|
|
389
402
|
): Promise<SuiClientTypes.SimulateTransactionResult<Include>> {
|
|
390
403
|
if (!(options.transaction instanceof Uint8Array)) {
|
|
391
404
|
await options.transaction.prepareForSerialization({ client: this });
|
|
392
405
|
}
|
|
393
406
|
|
|
407
|
+
// A gas payment explicitly set to an empty list means gas is paid from the sender's
|
|
408
|
+
// address balance, so the server needs to perform gas selection rather than simulating
|
|
409
|
+
// with a mocked gas coin.
|
|
410
|
+
const doGasSelection =
|
|
411
|
+
options.doGasSelection ??
|
|
412
|
+
(options.transaction instanceof Uint8Array
|
|
413
|
+
? transactionBytesHaveEmptyGasPayment(options.transaction)
|
|
414
|
+
: options.transaction.getData().gasData.payment?.length === 0);
|
|
415
|
+
|
|
394
416
|
const result = await this.#graphqlQuery(
|
|
395
417
|
{
|
|
396
418
|
query: SimulateTransactionDocument,
|
|
@@ -410,6 +432,7 @@ export class GraphQLCoreClient extends CoreClient {
|
|
|
410
432
|
includeObjectTypes: options.include?.objectTypes ?? false,
|
|
411
433
|
includeCommandResults: options.include?.commandResults ?? false,
|
|
412
434
|
includeBcs: options.include?.bcs ?? false,
|
|
435
|
+
doGasSelection,
|
|
413
436
|
checksEnabled: options.checksEnabled ?? true,
|
|
414
437
|
},
|
|
415
438
|
},
|
|
@@ -592,6 +615,124 @@ export class GraphQLCoreClient extends CoreClient {
|
|
|
592
615
|
return this.#graphqlClient.listDynamicFields(options);
|
|
593
616
|
}
|
|
594
617
|
|
|
618
|
+
async listTransactions<Include extends SuiClientTypes.TransactionInclude = {}>(
|
|
619
|
+
options: SuiClientTypes.ListTransactionsOptions<Include>,
|
|
620
|
+
): Promise<SuiClientTypes.ListTransactionsResponse<Include>> {
|
|
621
|
+
const pagination = resolvePagination(options);
|
|
622
|
+
const { descending, after, before, limit } = pagination;
|
|
623
|
+
const filter = options.filter
|
|
624
|
+
? await resolveTransactionFilter(this.mvr, options.filter, options.signal)
|
|
625
|
+
: undefined;
|
|
626
|
+
validateTransactionQuery(filter, pagination);
|
|
627
|
+
|
|
628
|
+
const transactions = await this.#graphqlQuery(
|
|
629
|
+
{
|
|
630
|
+
query: ListTransactionsDocument,
|
|
631
|
+
signal: options.signal,
|
|
632
|
+
variables: {
|
|
633
|
+
filter: filter && {
|
|
634
|
+
sentAddress: filter.$kind === 'sender' ? filter.sender : undefined,
|
|
635
|
+
function:
|
|
636
|
+
filter.$kind === 'function'
|
|
637
|
+
? [filter.package, filter.module, filter.function].filter(Boolean).join('::')
|
|
638
|
+
: undefined,
|
|
639
|
+
},
|
|
640
|
+
first: descending ? undefined : limit,
|
|
641
|
+
after,
|
|
642
|
+
last: descending ? limit : undefined,
|
|
643
|
+
before,
|
|
644
|
+
includeTransaction: options.include?.transaction ?? false,
|
|
645
|
+
includeEffects: options.include?.effects ?? false,
|
|
646
|
+
includeEvents: options.include?.events ?? false,
|
|
647
|
+
includeBalanceChanges: options.include?.balanceChanges ?? false,
|
|
648
|
+
includeObjectTypes: options.include?.objectTypes ?? false,
|
|
649
|
+
includeBcs: options.include?.bcs ?? false,
|
|
650
|
+
},
|
|
651
|
+
},
|
|
652
|
+
(result) => result.transactions,
|
|
653
|
+
);
|
|
654
|
+
|
|
655
|
+
// Backwards pagination returns nodes in ascending order, so reverse them for descending reads
|
|
656
|
+
const nodes = descending ? [...transactions.nodes].reverse() : transactions.nodes;
|
|
657
|
+
|
|
658
|
+
return {
|
|
659
|
+
transactions: nodes.map((transaction) => parseTransaction(transaction, options.include)),
|
|
660
|
+
hasNextPage: descending
|
|
661
|
+
? transactions.pageInfo.hasPreviousPage
|
|
662
|
+
: transactions.pageInfo.hasNextPage,
|
|
663
|
+
startCursor:
|
|
664
|
+
(descending ? transactions.pageInfo.endCursor : transactions.pageInfo.startCursor) ?? null,
|
|
665
|
+
endCursor:
|
|
666
|
+
(descending ? transactions.pageInfo.startCursor : transactions.pageInfo.endCursor) ?? null,
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
async listEvents(
|
|
671
|
+
options: SuiClientTypes.ListEventsOptions,
|
|
672
|
+
): Promise<SuiClientTypes.ListEventsResponse> {
|
|
673
|
+
const { descending, after, before, limit } = resolvePagination(options);
|
|
674
|
+
const filter = options.filter
|
|
675
|
+
? await resolveEventFilter(this.mvr, options.filter, options.signal)
|
|
676
|
+
: undefined;
|
|
677
|
+
|
|
678
|
+
const events = await this.#graphqlQuery(
|
|
679
|
+
{
|
|
680
|
+
query: ListEventsDocument,
|
|
681
|
+
signal: options.signal,
|
|
682
|
+
variables: {
|
|
683
|
+
filter: filter && {
|
|
684
|
+
sender: filter.$kind === 'sender' ? filter.sender : undefined,
|
|
685
|
+
module:
|
|
686
|
+
filter.$kind === 'emitModule' ? `${filter.package}::${filter.module}` : undefined,
|
|
687
|
+
type:
|
|
688
|
+
filter.$kind === 'eventTypeModule'
|
|
689
|
+
? `${filter.package}::${filter.module}`
|
|
690
|
+
: filter.$kind === 'eventType'
|
|
691
|
+
? filter.eventType
|
|
692
|
+
: undefined,
|
|
693
|
+
},
|
|
694
|
+
first: descending ? undefined : limit,
|
|
695
|
+
after,
|
|
696
|
+
last: descending ? limit : undefined,
|
|
697
|
+
before,
|
|
698
|
+
},
|
|
699
|
+
},
|
|
700
|
+
(result) => result.events,
|
|
701
|
+
);
|
|
702
|
+
|
|
703
|
+
// Backwards pagination returns nodes in ascending order, so reverse them for descending reads
|
|
704
|
+
const nodes = descending ? [...events.nodes].reverse() : events.nodes;
|
|
705
|
+
|
|
706
|
+
return {
|
|
707
|
+
events: nodes.map((event): SuiClientTypes.EventEntry => {
|
|
708
|
+
const packageId = event.transactionModule?.package?.address;
|
|
709
|
+
const module = event.transactionModule?.name;
|
|
710
|
+
const sender = event.sender?.address;
|
|
711
|
+
const eventType = event.contents?.type?.repr;
|
|
712
|
+
const transactionDigest = event.transaction?.digest;
|
|
713
|
+
|
|
714
|
+
if (!packageId || !module || !sender || !eventType || !transactionDigest) {
|
|
715
|
+
throw new Error('listEvents response is missing expected event fields');
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
return {
|
|
719
|
+
packageId: normalizeSuiAddress(packageId),
|
|
720
|
+
module,
|
|
721
|
+
sender: normalizeSuiAddress(sender),
|
|
722
|
+
eventType: normalizeStructTag(eventType),
|
|
723
|
+
bcs: event.contents?.bcs ? fromBase64(event.contents.bcs) : new Uint8Array(),
|
|
724
|
+
json: (event.contents?.json as Record<string, unknown>) ?? null,
|
|
725
|
+
checkpoint: event.transaction?.effects?.checkpoint?.sequenceNumber?.toString() ?? null,
|
|
726
|
+
transactionDigest,
|
|
727
|
+
eventIndex: event.sequenceNumber,
|
|
728
|
+
};
|
|
729
|
+
}),
|
|
730
|
+
hasNextPage: descending ? events.pageInfo.hasPreviousPage : events.pageInfo.hasNextPage,
|
|
731
|
+
startCursor: (descending ? events.pageInfo.endCursor : events.pageInfo.startCursor) ?? null,
|
|
732
|
+
endCursor: (descending ? events.pageInfo.startCursor : events.pageInfo.endCursor) ?? null,
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
|
|
595
736
|
async verifyZkLoginSignature(
|
|
596
737
|
options: SuiClientTypes.VerifyZkLoginSignatureOptions,
|
|
597
738
|
): Promise<SuiClientTypes.ZkLoginVerifyResponse> {
|
|
@@ -732,14 +873,15 @@ export class GraphQLCoreClient extends CoreClient {
|
|
|
732
873
|
}
|
|
733
874
|
const grpcTransaction = transactionDataToGrpcTransaction(snapshot);
|
|
734
875
|
const transactionJson = GrpcTransactionType.toJson(grpcTransaction);
|
|
876
|
+
const doGasSelection =
|
|
877
|
+
!options.onlyTransactionKind &&
|
|
878
|
+
(snapshot.gasData.budget == null || snapshot.gasData.payment == null);
|
|
735
879
|
|
|
736
880
|
const { data, errors } = await graphqlClient.query({
|
|
737
881
|
query: ResolveTransactionDocument,
|
|
738
882
|
variables: {
|
|
739
883
|
transaction: transactionJson,
|
|
740
|
-
doGasSelection
|
|
741
|
-
!options.onlyTransactionKind &&
|
|
742
|
-
(snapshot.gasData.budget == null || snapshot.gasData.payment == null),
|
|
884
|
+
doGasSelection,
|
|
743
885
|
checksEnabled: !options.onlyTransactionKind,
|
|
744
886
|
},
|
|
745
887
|
});
|
|
@@ -780,6 +922,14 @@ export class GraphQLCoreClient extends CoreClient {
|
|
|
780
922
|
} else {
|
|
781
923
|
transactionData.applyResolvedData(resolved);
|
|
782
924
|
}
|
|
925
|
+
await setAddressBalanceTransactionExpirationFromSimulatedEpoch({
|
|
926
|
+
transactionData,
|
|
927
|
+
client: graphqlClient,
|
|
928
|
+
epoch: transactionEffects?.epoch?.epochId,
|
|
929
|
+
originalTransactionData: snapshot,
|
|
930
|
+
isTransactionKindOnly: !!options.onlyTransactionKind,
|
|
931
|
+
doGasSelection,
|
|
932
|
+
});
|
|
783
933
|
|
|
784
934
|
return await next();
|
|
785
935
|
};
|