@mysten/sui 2.39.1 → 3.0.0
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 +160 -0
- package/README.md +5 -188
- package/dist/bcs/bcs.d.mts +6 -6
- package/dist/bcs/bcs.d.mts.map +1 -1
- package/dist/bcs/bcs.mjs +49 -22
- package/dist/bcs/bcs.mjs.map +1 -1
- package/dist/bcs/effects.mjs +49 -20
- package/dist/bcs/effects.mjs.map +1 -1
- package/dist/bcs/index.d.mts +1441 -624
- 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.d.mts +1059 -0
- package/dist/bcs/transactions.d.mts.map +1 -0
- package/dist/bcs/transactions.mjs +33 -14
- package/dist/bcs/transactions.mjs.map +1 -1
- package/dist/bcs/types.d.mts +6 -1
- package/dist/bcs/types.d.mts.map +1 -1
- package/dist/client/core-resolver.mjs +4 -4
- package/dist/client/core-resolver.mjs.map +1 -1
- package/dist/client/core.d.mts +55 -4
- package/dist/client/core.d.mts.map +1 -1
- package/dist/client/core.mjs +98 -1
- package/dist/client/core.mjs.map +1 -1
- package/dist/client/errors.mjs +11 -1
- package/dist/client/errors.mjs.map +1 -1
- package/dist/client/index.d.mts +4 -2
- package/dist/client/index.mjs +5 -2
- package/dist/client/mvr.d.mts +12 -2
- package/dist/client/mvr.d.mts.map +1 -1
- package/dist/client/mvr.mjs +34 -13
- package/dist/client/mvr.mjs.map +1 -1
- package/dist/client/query-filters.mjs +80 -76
- package/dist/client/query-filters.mjs.map +1 -1
- package/dist/client/stream/adapter.d.mts +102 -0
- package/dist/client/stream/adapter.d.mts.map +1 -0
- package/dist/client/stream/errors.d.mts +14 -0
- package/dist/client/stream/errors.d.mts.map +1 -0
- package/dist/client/stream/errors.mjs +25 -0
- package/dist/client/stream/errors.mjs.map +1 -0
- package/dist/client/stream/filter.mjs +18 -0
- package/dist/client/stream/filter.mjs.map +1 -0
- package/dist/client/stream/follow.mjs +48 -0
- package/dist/client/stream/follow.mjs.map +1 -0
- package/dist/client/stream/index.d.mts +4 -0
- package/dist/client/stream/pager.mjs +123 -0
- package/dist/client/stream/pager.mjs.map +1 -0
- package/dist/client/stream/plan.mjs +79 -0
- package/dist/client/stream/plan.mjs.map +1 -0
- package/dist/client/stream/position.d.mts +30 -0
- package/dist/client/stream/position.d.mts.map +1 -0
- package/dist/client/stream/position.mjs +121 -0
- package/dist/client/stream/position.mjs.map +1 -0
- package/dist/client/stream/run.d.mts +2 -0
- package/dist/client/stream/run.mjs +99 -0
- package/dist/client/stream/run.mjs.map +1 -0
- package/dist/client/stream/session.mjs +205 -0
- package/dist/client/stream/session.mjs.map +1 -0
- package/dist/client/stream/status.mjs +47 -0
- package/dist/client/stream/status.mjs.map +1 -0
- package/dist/client/stream/token.mjs +80 -0
- package/dist/client/stream/token.mjs.map +1 -0
- package/dist/client/transaction-data.d.mts +12 -0
- package/dist/client/transaction-data.d.mts.map +1 -0
- package/dist/client/transaction-data.mjs +469 -0
- package/dist/client/transaction-data.mjs.map +1 -0
- package/dist/client/transaction-resolver.mjs +102 -58
- package/dist/client/transaction-resolver.mjs.map +1 -1
- package/dist/client/types.d.mts +560 -240
- package/dist/client/types.d.mts.map +1 -1
- package/dist/client/utils.d.mts +3 -1
- package/dist/client/utils.d.mts.map +1 -1
- package/dist/client/utils.mjs +91 -26
- package/dist/client/utils.mjs.map +1 -1
- package/dist/cryptography/index.d.mts +1 -1
- package/dist/cryptography/keypair.d.mts +1 -1
- package/dist/cryptography/publickey.d.mts +11 -0
- package/dist/cryptography/publickey.d.mts.map +1 -1
- package/dist/cryptography/publickey.mjs +12 -1
- package/dist/cryptography/publickey.mjs.map +1 -1
- package/dist/cryptography/signature.d.mts +2 -2
- package/dist/cryptography/signature.mjs +18 -7
- package/dist/cryptography/signature.mjs.map +1 -1
- package/dist/graphql/client.d.mts +51 -35
- package/dist/graphql/client.d.mts.map +1 -1
- package/dist/graphql/client.mjs +125 -69
- package/dist/graphql/client.mjs.map +1 -1
- package/dist/graphql/core.d.mts +14 -9
- package/dist/graphql/core.d.mts.map +1 -1
- package/dist/graphql/core.mjs +293 -117
- package/dist/graphql/core.mjs.map +1 -1
- package/dist/graphql/errors.d.mts +20 -0
- package/dist/graphql/errors.d.mts.map +1 -0
- package/dist/graphql/errors.mjs +19 -0
- package/dist/graphql/errors.mjs.map +1 -0
- package/dist/graphql/filters.mjs +32 -0
- package/dist/graphql/filters.mjs.map +1 -0
- package/dist/graphql/generated/queries.d.mts.map +1 -1
- package/dist/graphql/generated/queries.mjs +1216 -208
- package/dist/graphql/generated/queries.mjs.map +1 -1
- package/dist/graphql/generated/tada-env.d.mts +820 -11
- package/dist/graphql/index.d.mts +2 -1
- package/dist/graphql/index.mjs +2 -1
- package/dist/graphql/sse-parser.mjs +82 -0
- package/dist/graphql/sse-parser.mjs.map +1 -0
- package/dist/graphql/stream/families.mjs +306 -0
- package/dist/graphql/stream/families.mjs.map +1 -0
- package/dist/graphql/stream/index.mjs +38 -0
- package/dist/graphql/stream/index.mjs.map +1 -0
- package/dist/graphql/stream/live.mjs +60 -0
- package/dist/graphql/stream/live.mjs.map +1 -0
- package/dist/graphql/stream/page.mjs +38 -0
- package/dist/graphql/stream/page.mjs.map +1 -0
- package/dist/graphql/stream/query.mjs +47 -0
- package/dist/graphql/stream/query.mjs.map +1 -0
- package/dist/graphql/subscribe.mjs +70 -0
- package/dist/graphql/subscribe.mjs.map +1 -0
- package/dist/grpc/client.d.mts +31 -27
- package/dist/grpc/client.d.mts.map +1 -1
- package/dist/grpc/client.mjs +42 -46
- package/dist/grpc/client.mjs.map +1 -1
- package/dist/grpc/core.d.mts +13 -6
- package/dist/grpc/core.d.mts.map +1 -1
- package/dist/grpc/core.mjs +254 -166
- package/dist/grpc/core.mjs.map +1 -1
- package/dist/grpc/filters.mjs +44 -34
- package/dist/grpc/filters.mjs.map +1 -1
- package/dist/grpc/grpc-web-pull.mjs +245 -0
- package/dist/grpc/grpc-web-pull.mjs.map +1 -0
- package/dist/grpc/index.d.mts +2 -1
- package/dist/grpc/index.mjs +1 -1
- package/dist/grpc/network-error.mjs +31 -0
- package/dist/grpc/network-error.mjs.map +1 -0
- package/dist/grpc/proto/google/rpc/error_details.mjs +306 -0
- package/dist/grpc/proto/google/rpc/error_details.mjs.map +1 -0
- package/dist/grpc/proto/sui/rpc/v2/error_reason.d.mts +176 -1
- package/dist/grpc/proto/sui/rpc/v2/error_reason.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/error_reason.mjs +175 -0
- package/dist/grpc/proto/sui/rpc/v2/error_reason.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/executed_transaction.d.mts +2 -2
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.d.mts +111 -0
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.mjs +46 -0
- 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/move_package_service.d.mts +24 -1
- package/dist/grpc/proto/sui/rpc/v2/move_package_service.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/move_package_service.mjs +25 -7
- package/dist/grpc/proto/sui/rpc/v2/move_package_service.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/object.mjs +1 -1
- package/dist/grpc/proto/sui/rpc/v2/query_options.d.mts +111 -9
- package/dist/grpc/proto/sui/rpc/v2/query_options.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/query_options.mjs +63 -19
- package/dist/grpc/proto/sui/rpc/v2/query_options.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/signature.d.mts +5 -5
- package/dist/grpc/proto/sui/rpc/v2/signature.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/signature_scheme.d.mts +5 -1
- package/dist/grpc/proto/sui/rpc/v2/signature_scheme.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/signature_scheme.mjs +4 -0
- package/dist/grpc/proto/sui/rpc/v2/signature_scheme.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.d.mts +20 -1
- package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.mjs +30 -13
- package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.mjs.map +1 -1
- 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 +16 -10
- 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 +8 -5
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/transaction.d.mts +11 -5
- package/dist/grpc/proto/sui/rpc/v2/transaction.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/transaction.mjs +6 -0
- package/dist/grpc/proto/sui/rpc/v2/transaction.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.d.mts +6 -2
- package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.mjs.map +1 -1
- package/dist/grpc/proto/types.d.mts +7 -7
- package/dist/grpc/proto/types.mjs +3 -2
- package/dist/grpc/pull-call.d.mts +20 -0
- package/dist/grpc/pull-call.d.mts.map +1 -0
- package/dist/grpc/pull-call.mjs +28 -0
- package/dist/grpc/pull-call.mjs.map +1 -0
- package/dist/grpc/stream/call.mjs +238 -0
- package/dist/grpc/stream/call.mjs.map +1 -0
- package/dist/grpc/stream/families.d.mts +26 -0
- package/dist/grpc/stream/families.d.mts.map +1 -0
- package/dist/grpc/stream/families.mjs +145 -0
- package/dist/grpc/stream/families.mjs.map +1 -0
- package/dist/grpc/stream/index.d.mts +41 -0
- package/dist/grpc/stream/index.d.mts.map +1 -0
- package/dist/grpc/stream/index.mjs +127 -0
- package/dist/grpc/stream/index.mjs.map +1 -0
- package/dist/grpc/stream/live.mjs +31 -0
- package/dist/grpc/stream/live.mjs.map +1 -0
- package/dist/grpc/stream/page.mjs +120 -0
- package/dist/grpc/stream/page.mjs.map +1 -0
- package/dist/grpc/stream-types.d.mts +28 -0
- package/dist/grpc/stream-types.d.mts.map +1 -0
- package/dist/grpc/transport.d.mts +8 -3
- package/dist/grpc/transport.d.mts.map +1 -1
- package/dist/grpc/transport.mjs +88 -45
- package/dist/grpc/transport.mjs.map +1 -1
- package/dist/jsonRpc/index.d.mts +34 -12
- package/dist/jsonRpc/index.d.mts.map +1 -0
- package/dist/jsonRpc/index.mjs +39 -5
- package/dist/jsonRpc/index.mjs.map +1 -0
- package/dist/jsonRpc/types.d.mts +420 -0
- package/dist/jsonRpc/types.d.mts.map +1 -0
- package/dist/keypairs/passkey/keypair.d.mts +1 -1
- package/dist/multisig/publickey.d.mts +12 -4
- package/dist/multisig/publickey.d.mts.map +1 -1
- package/dist/multisig/publickey.mjs +5 -5
- package/dist/multisig/publickey.mjs.map +1 -1
- package/dist/multisig/signer.d.mts +1 -1
- package/dist/transactions/ObjectCache.d.mts +1 -1
- package/dist/transactions/ObjectCache.mjs +5 -5
- package/dist/transactions/ObjectCache.mjs.map +1 -1
- package/dist/transactions/Transaction.d.mts +11 -10
- package/dist/transactions/Transaction.d.mts.map +1 -1
- package/dist/transactions/Transaction.mjs +17 -6
- package/dist/transactions/Transaction.mjs.map +1 -1
- package/dist/transactions/data/internal.d.mts +135 -133
- package/dist/transactions/data/internal.d.mts.map +1 -1
- package/dist/transactions/data/internal.mjs +2 -1
- package/dist/transactions/data/internal.mjs.map +1 -1
- package/dist/transactions/data/v1.d.mts +239 -239
- package/dist/transactions/data/v1.d.mts.map +1 -1
- package/dist/transactions/data/v2.d.mts +16 -16
- package/dist/transactions/data/v2.d.mts.map +1 -1
- package/dist/transactions/executor/parallel.d.mts +2 -2
- package/dist/transactions/executor/serial.d.mts +1 -1
- package/dist/transactions/executor/serial.mjs +2 -2
- package/dist/transactions/executor/serial.mjs.map +1 -1
- package/dist/transactions/index.d.mts +3 -2
- package/dist/transactions/index.mjs +4 -3
- package/dist/transactions/intents/AllowanceBalance.mjs +1 -1
- package/dist/transactions/intents/CoinWithBalance.mjs +1 -1
- package/dist/transactions/resolve.d.mts +6 -0
- package/dist/transactions/resolve.d.mts.map +1 -1
- package/dist/transactions/resolve.mjs.map +1 -1
- package/dist/transactions/restricted-move-calls.d.mts +25 -0
- package/dist/transactions/restricted-move-calls.d.mts.map +1 -0
- package/dist/transactions/restricted-move-calls.mjs +47 -0
- package/dist/transactions/restricted-move-calls.mjs.map +1 -0
- package/dist/transactions/serializer.d.mts +1 -4
- package/dist/transactions/serializer.d.mts.map +1 -1
- package/dist/transactions/serializer.mjs +1 -44
- package/dist/transactions/serializer.mjs.map +1 -1
- package/dist/transactions/utils.d.mts +0 -1
- package/dist/transactions/utils.d.mts.map +1 -1
- package/dist/transactions/utils.mjs.map +1 -1
- package/dist/utils/abort.mjs +89 -0
- package/dist/utils/abort.mjs.map +1 -0
- package/dist/utils/coin-reservation.mjs +1 -4
- package/dist/utils/coin-reservation.mjs.map +1 -1
- package/dist/utils/index.mjs +1 -1
- package/dist/utils/sui-types.mjs +1 -1
- package/dist/verify/index.d.mts +2 -2
- package/dist/verify/verify.d.mts +74 -24
- package/dist/verify/verify.d.mts.map +1 -1
- package/dist/verify/verify.mjs +128 -42
- package/dist/verify/verify.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/publickey.d.mts.map +1 -1
- package/dist/zklogin/publickey.mjs +15 -20
- package/dist/zklogin/publickey.mjs.map +1 -1
- package/docs/bcs.md +2 -2
- package/docs/clients/core.md +19 -18
- package/docs/clients/executing.md +53 -8
- package/docs/clients/graphql.md +81 -11
- package/docs/clients/grpc.md +31 -15
- package/docs/clients/index.md +8 -7
- package/docs/clients/querying.md +134 -30
- package/docs/clients/streaming.md +324 -0
- package/docs/cryptography/index.md +85 -58
- package/docs/llms-index.md +4 -2
- package/docs/migrations/sui-2.0/dapp-kit.md +3 -2
- package/docs/migrations/sui-2.0/json-rpc-migration.md +106 -79
- package/docs/migrations/sui-3.0/index.md +250 -0
- package/docs/plugins.md +10 -10
- package/docs/sdk-building.md +3 -4
- package/docs/transactions/coins-and-balances.md +6 -11
- package/docs/transactions/reference.md +36 -1
- package/package.json +2 -3
- package/src/bcs/bcs.ts +80 -41
- package/src/bcs/effects.ts +61 -25
- package/src/bcs/index.ts +2 -0
- package/src/bcs/transactions.ts +36 -17
- package/src/bcs/types.ts +10 -4
- package/src/client/core-resolver.ts +3 -5
- package/src/client/core.ts +180 -8
- package/src/client/errors.ts +12 -0
- package/src/client/index.ts +4 -1
- package/src/client/mvr.ts +37 -10
- package/src/client/query-filters.ts +151 -97
- package/src/client/stream/adapter.ts +110 -0
- package/src/client/stream/errors.ts +40 -0
- package/src/client/stream/filter.ts +17 -0
- package/src/client/stream/follow.ts +63 -0
- package/src/client/stream/index.ts +9 -0
- package/src/client/stream/pager.ts +158 -0
- package/src/client/stream/plan.ts +147 -0
- package/src/client/stream/position.ts +143 -0
- package/src/client/stream/run.ts +147 -0
- package/src/client/stream/session.ts +259 -0
- package/src/client/stream/status.ts +44 -0
- package/src/client/stream/token.ts +104 -0
- package/src/client/transaction-data.ts +587 -0
- package/src/client/transaction-resolver.ts +158 -69
- package/src/client/types.ts +530 -115
- package/src/client/utils.ts +147 -50
- package/src/cryptography/publickey.ts +12 -1
- package/src/cryptography/signature.ts +6 -3
- package/src/graphql/client.ts +204 -135
- package/src/graphql/core.ts +446 -139
- package/src/graphql/errors.ts +24 -0
- package/src/graphql/filters.ts +48 -0
- package/src/graphql/generated/queries.ts +1455 -277
- package/src/graphql/generated/schema.graphql +282 -9
- package/src/graphql/generated/tada-env.ts +933 -4
- package/src/graphql/queries/checkpoints.graphql +34 -0
- package/src/graphql/queries/getDynamicFields.graphql +1 -0
- package/src/graphql/queries/listEvents.graphql +16 -24
- package/src/graphql/queries/streams.graphql +212 -0
- package/src/graphql/queries/transactions.graphql +71 -28
- package/src/graphql/queries/verifySignature.graphql +17 -0
- package/src/graphql/sse-parser.ts +99 -0
- package/src/graphql/stream/families.ts +515 -0
- package/src/graphql/stream/index.ts +55 -0
- package/src/graphql/stream/live.ts +70 -0
- package/src/graphql/stream/page.ts +47 -0
- package/src/graphql/stream/query.ts +52 -0
- package/src/graphql/subscribe.ts +83 -0
- package/src/grpc/client.ts +81 -79
- package/src/grpc/core.ts +388 -274
- package/src/grpc/filters.ts +59 -60
- package/src/grpc/grpc-web-pull.ts +360 -0
- package/src/grpc/index.ts +5 -0
- package/src/grpc/network-error.ts +33 -0
- package/src/grpc/proto/sui/rpc/v2/error_reason.ts +175 -0
- package/src/grpc/proto/sui/rpc/v2/ledger_service.ts +145 -0
- package/src/grpc/proto/sui/rpc/v2/move_package_service.ts +43 -1
- package/src/grpc/proto/sui/rpc/v2/query_options.ts +132 -8
- package/src/grpc/proto/sui/rpc/v2/signature.ts +4 -4
- package/src/grpc/proto/sui/rpc/v2/signature_scheme.ts +4 -0
- package/src/grpc/proto/sui/rpc/v2/signature_verification_service.ts +30 -0
- package/src/grpc/proto/sui/rpc/v2/subscription_service.client.ts +16 -10
- package/src/grpc/proto/sui/rpc/v2/transaction.ts +6 -0
- package/src/grpc/proto/sui/rpc/v2/transaction_execution_service.ts +5 -1
- package/src/grpc/pull-call.ts +54 -0
- package/src/grpc/stream/call.ts +317 -0
- package/src/grpc/stream/families.ts +228 -0
- package/src/grpc/stream/index.ts +182 -0
- package/src/grpc/stream/live.ts +33 -0
- package/src/grpc/stream/page.ts +161 -0
- package/src/grpc/stream-types.ts +33 -0
- package/src/grpc/transport.ts +116 -59
- package/src/jsonRpc/index.ts +60 -17
- package/src/jsonRpc/types.ts +421 -0
- package/src/multisig/publickey.ts +19 -7
- package/src/transactions/ObjectCache.ts +6 -6
- package/src/transactions/Transaction.ts +30 -6
- package/src/transactions/data/internal.ts +2 -0
- package/src/transactions/executor/serial.ts +2 -2
- package/src/transactions/index.ts +8 -1
- package/src/transactions/resolve.ts +6 -0
- package/src/transactions/restricted-move-calls.ts +87 -0
- package/src/transactions/serializer.ts +0 -70
- package/src/transactions/utils.ts +0 -37
- package/src/utils/abort.ts +101 -0
- package/src/verify/index.ts +1 -0
- package/src/verify/verify.ts +190 -62
- package/src/version.ts +1 -1
- package/src/zklogin/publickey.ts +18 -34
- package/dist/client/core-resolver.d.mts +0 -9
- package/dist/client/core-resolver.d.mts.map +0 -1
- package/dist/jsonRpc/client.d.mts +0 -507
- package/dist/jsonRpc/client.d.mts.map +0 -1
- package/dist/jsonRpc/client.mjs +0 -868
- package/dist/jsonRpc/client.mjs.map +0 -1
- package/dist/jsonRpc/core.d.mts +0 -168
- package/dist/jsonRpc/core.d.mts.map +0 -1
- package/dist/jsonRpc/core.mjs +0 -1054
- package/dist/jsonRpc/core.mjs.map +0 -1
- package/dist/jsonRpc/errors.d.mts +0 -27
- package/dist/jsonRpc/errors.d.mts.map +0 -1
- package/dist/jsonRpc/errors.mjs +0 -50
- package/dist/jsonRpc/errors.mjs.map +0 -1
- package/dist/jsonRpc/http-transport.d.mts +0 -62
- package/dist/jsonRpc/http-transport.d.mts.map +0 -1
- package/dist/jsonRpc/http-transport.mjs +0 -60
- package/dist/jsonRpc/http-transport.mjs.map +0 -1
- package/dist/jsonRpc/network.d.mts +0 -9
- package/dist/jsonRpc/network.d.mts.map +0 -1
- package/dist/jsonRpc/network.mjs +0 -18
- package/dist/jsonRpc/network.mjs.map +0 -1
- package/dist/jsonRpc/types/chain.d.mts +0 -169
- package/dist/jsonRpc/types/chain.d.mts.map +0 -1
- package/dist/jsonRpc/types/changes.d.mts +0 -48
- package/dist/jsonRpc/types/changes.d.mts.map +0 -1
- package/dist/jsonRpc/types/coins.d.mts +0 -15
- package/dist/jsonRpc/types/coins.d.mts.map +0 -1
- package/dist/jsonRpc/types/common.d.mts +0 -9
- package/dist/jsonRpc/types/common.d.mts.map +0 -1
- package/dist/jsonRpc/types/generated.d.mts +0 -1976
- package/dist/jsonRpc/types/generated.d.mts.map +0 -1
- package/dist/jsonRpc/types/index.d.mts +0 -6
- package/dist/jsonRpc/types/params.d.mts +0 -898
- package/dist/jsonRpc/types/params.d.mts.map +0 -1
- package/src/graphql/generated/tsconfig.tada.json +0 -11
- package/src/graphql/queries/verifyZkLoginSignature.graphql +0 -15
- package/src/jsonRpc/client.ts +0 -1252
- package/src/jsonRpc/core.ts +0 -1557
- package/src/jsonRpc/errors.ts +0 -57
- package/src/jsonRpc/http-transport.ts +0 -118
- package/src/jsonRpc/network.ts +0 -21
- package/src/jsonRpc/types/chain.ts +0 -190
- package/src/jsonRpc/types/changes.ts +0 -35
- package/src/jsonRpc/types/coins.ts +0 -14
- package/src/jsonRpc/types/common.ts +0 -8
- package/src/jsonRpc/types/generated.ts +0 -2165
- package/src/jsonRpc/types/index.ts +0 -9
- package/src/jsonRpc/types/params.ts +0 -908
package/src/graphql/client.ts
CHANGED
|
@@ -13,11 +13,14 @@ import { BaseClient } from '../client/index.js';
|
|
|
13
13
|
import type { SuiClientTypes } from '../client/index.js';
|
|
14
14
|
import { GraphQLCoreClient } from './core.js';
|
|
15
15
|
import type { TypedDocumentString } from './generated/queries.js';
|
|
16
|
-
import { GetDynamicFieldsDocument } from './generated/queries.js';
|
|
17
|
-
import { fromBase64 } from '@mysten/utils';
|
|
18
|
-
import { normalizeStructTag } from '../utils/sui-types.js';
|
|
19
|
-
import { deriveDynamicFieldID } from '../utils/dynamic-fields.js';
|
|
20
16
|
import type { TransactionPlugin } from '../transactions/index.js';
|
|
17
|
+
import { abortableAsyncGenerator } from '../utils/abort.js';
|
|
18
|
+
import { httpStatusReason } from '../client/errors.js';
|
|
19
|
+
import { assertClientUrl } from '../client/utils.js';
|
|
20
|
+
import { SuiGraphQLRequestError } from './errors.js';
|
|
21
|
+
import { readGraphQLSSE } from './subscribe.js';
|
|
22
|
+
|
|
23
|
+
export { SuiGraphQLRequestError } from './errors.js';
|
|
21
24
|
|
|
22
25
|
export type GraphQLDocument<Result = Record<string, unknown>, Variables = Record<string, unknown>> =
|
|
23
26
|
| string
|
|
@@ -34,11 +37,17 @@ export type GraphQLQueryOptions<
|
|
|
34
37
|
operationName?: string;
|
|
35
38
|
extensions?: Record<string, unknown>;
|
|
36
39
|
signal?: AbortSignal;
|
|
37
|
-
} & (
|
|
40
|
+
} & (Record<string, unknown> extends Variables
|
|
38
41
|
? { variables?: Variables }
|
|
39
|
-
: {
|
|
40
|
-
|
|
41
|
-
});
|
|
42
|
+
: Variables extends { [key: string]: never }
|
|
43
|
+
? { variables?: Variables }
|
|
44
|
+
: { variables: Variables });
|
|
45
|
+
|
|
46
|
+
/** Internal: runs a subscription and calls `onOpen` once its event stream opens. */
|
|
47
|
+
export type OpenSubscription = <Result, Variables>(
|
|
48
|
+
options: GraphQLQueryOptions<Result, Variables>,
|
|
49
|
+
onOpen: () => void,
|
|
50
|
+
) => AsyncGenerator<GraphQLQueryResult<Result>>;
|
|
42
51
|
|
|
43
52
|
export type GraphQLQueryResult<Result = Record<string, unknown>> = {
|
|
44
53
|
data?: Result;
|
|
@@ -50,18 +59,51 @@ export type GraphQLResponseErrors = Array<{
|
|
|
50
59
|
message: string;
|
|
51
60
|
locations?: { line: number; column: number }[];
|
|
52
61
|
path?: (string | number)[];
|
|
62
|
+
extensions?: Record<string, unknown>;
|
|
53
63
|
}>;
|
|
54
64
|
|
|
55
65
|
export interface SuiGraphQLClientOptions<Queries extends Record<string, GraphQLDocument>> {
|
|
56
66
|
url: string;
|
|
67
|
+
/** SSE endpoint; defaults to the query URL with `/subscriptions` appended. */
|
|
68
|
+
subscriptionUrl?: string;
|
|
57
69
|
fetch?: typeof fetch;
|
|
58
70
|
headers?: Record<string, string>;
|
|
59
71
|
queries?: Queries;
|
|
60
72
|
network: SuiClientTypes.Network;
|
|
61
73
|
mvr?: SuiClientTypes.MvrOptions;
|
|
74
|
+
/**
|
|
75
|
+
* `package`, `package::module` or `package::module::function` entries that transactions built
|
|
76
|
+
* with this client can't call. A per-call `restrictedMoveCalls` on `build` or `toJSON` takes
|
|
77
|
+
* precedence. Defaults to `DEFAULT_RESTRICTED_MOVE_CALLS`.
|
|
78
|
+
*/
|
|
79
|
+
restrictedMoveCalls?: readonly string[];
|
|
62
80
|
}
|
|
63
81
|
|
|
64
|
-
|
|
82
|
+
/** Serialize the request body before `fetch`, so serialization errors are never retryable. */
|
|
83
|
+
function requestBody(options: {
|
|
84
|
+
query: GraphQLDocument<any, any>;
|
|
85
|
+
variables?: unknown;
|
|
86
|
+
operationName?: string;
|
|
87
|
+
extensions?: Record<string, unknown>;
|
|
88
|
+
}) {
|
|
89
|
+
return JSON.stringify({
|
|
90
|
+
query:
|
|
91
|
+
typeof options.query === 'string' || options.query instanceof String
|
|
92
|
+
? String(options.query)
|
|
93
|
+
: print(options.query),
|
|
94
|
+
variables: options.variables,
|
|
95
|
+
extensions: options.extensions,
|
|
96
|
+
operationName: options.operationName,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** `url` with `/subscriptions` appended to its path. */
|
|
101
|
+
function subscriptionUrlFor(url: string) {
|
|
102
|
+
const suffixAt = url.search(/[?#]/);
|
|
103
|
+
const path = suffixAt === -1 ? url : url.slice(0, suffixAt);
|
|
104
|
+
const suffix = suffixAt === -1 ? '' : url.slice(suffixAt);
|
|
105
|
+
return `${path.replace(/\/$/, '')}/subscriptions${suffix}`;
|
|
106
|
+
}
|
|
65
107
|
|
|
66
108
|
const SUI_CLIENT_BRAND = Symbol.for('@mysten/SuiGraphQLClient') as never;
|
|
67
109
|
|
|
@@ -71,41 +113,17 @@ export function isSuiGraphQLClient(client: unknown): client is SuiGraphQLClient
|
|
|
71
113
|
);
|
|
72
114
|
}
|
|
73
115
|
|
|
74
|
-
|
|
116
|
+
/** @deprecated Use SuiClientTypes.SimulateTransactionOptions */
|
|
117
|
+
export type GraphQLSimulateTransactionOptions<
|
|
75
118
|
Include extends SuiClientTypes.SimulateTransactionInclude = {},
|
|
76
|
-
>
|
|
77
|
-
/**
|
|
78
|
-
* Overrides whether the server selects gas payment during simulation.
|
|
79
|
-
*
|
|
80
|
-
* When not set, gas selection is enabled only when the transaction's gas payment is explicitly
|
|
81
|
-
* set to an empty list (`[]`); the server then pays gas from the sender's address balance or
|
|
82
|
-
* coin objects. Transactions with gas coins set are simulated as-is, and transactions without a
|
|
83
|
-
* gas payment are simulated with a mocked gas coin (reported as `gasPaymentMocked` on the
|
|
84
|
-
* result).
|
|
85
|
-
*/
|
|
86
|
-
doGasSelection?: boolean;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface DynamicFieldInclude {
|
|
90
|
-
value?: boolean;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export type DynamicFieldEntryWithValue<Include extends DynamicFieldInclude = {}> =
|
|
94
|
-
SuiClientTypes.DynamicFieldEntry & {
|
|
95
|
-
value: Include extends { value: true } ? SuiClientTypes.DynamicFieldValue : undefined;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export interface ListDynamicFieldsWithValueResponse<Include extends DynamicFieldInclude = {}> {
|
|
99
|
-
hasNextPage: boolean;
|
|
100
|
-
cursor: string | null;
|
|
101
|
-
dynamicFields: DynamicFieldEntryWithValue<Include>[];
|
|
102
|
-
}
|
|
119
|
+
> = SuiClientTypes.SimulateTransactionOptions<Include>;
|
|
103
120
|
|
|
104
121
|
export class SuiGraphQLClient<Queries extends Record<string, GraphQLDocument> = {}>
|
|
105
122
|
extends BaseClient
|
|
106
123
|
implements SuiClientTypes.TransportMethods
|
|
107
124
|
{
|
|
108
125
|
#url: string;
|
|
126
|
+
#subscriptionUrl: string;
|
|
109
127
|
#queries: Queries;
|
|
110
128
|
#headers: Record<string, string>;
|
|
111
129
|
#fetch: typeof fetch;
|
|
@@ -120,56 +138,124 @@ export class SuiGraphQLClient<Queries extends Record<string, GraphQLDocument> =
|
|
|
120
138
|
|
|
121
139
|
constructor({
|
|
122
140
|
url,
|
|
141
|
+
subscriptionUrl = subscriptionUrlFor(url),
|
|
123
142
|
fetch: fetchFn = fetch,
|
|
124
143
|
headers = {},
|
|
125
144
|
queries = {} as Queries,
|
|
126
145
|
network,
|
|
127
146
|
mvr,
|
|
147
|
+
restrictedMoveCalls,
|
|
128
148
|
}: SuiGraphQLClientOptions<Queries>) {
|
|
129
149
|
super({
|
|
130
150
|
network,
|
|
131
151
|
});
|
|
152
|
+
assertClientUrl(url, 'SuiGraphQLClient url');
|
|
153
|
+
assertClientUrl(subscriptionUrl, 'SuiGraphQLClient subscriptionUrl');
|
|
132
154
|
this.#url = url;
|
|
155
|
+
this.#subscriptionUrl = subscriptionUrl;
|
|
133
156
|
this.#queries = queries;
|
|
134
157
|
this.#headers = headers;
|
|
135
158
|
this.#fetch = (...args) => fetchFn(...args);
|
|
136
159
|
this.core = new GraphQLCoreClient({
|
|
137
160
|
graphqlClient: this,
|
|
138
161
|
mvr,
|
|
162
|
+
restrictedMoveCalls,
|
|
163
|
+
subscribe: (options, onOpen) => this.#subscribe(options, onOpen),
|
|
139
164
|
});
|
|
140
165
|
}
|
|
141
166
|
|
|
142
167
|
async query<Result = Record<string, unknown>, Variables = Record<string, unknown>>(
|
|
143
168
|
options: GraphQLQueryOptions<Result, Variables>,
|
|
144
169
|
): Promise<GraphQLQueryResult<Result>> {
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
170
|
+
const res = await this.#fetchResponse(this.#url, {
|
|
171
|
+
method: 'POST',
|
|
172
|
+
headers: this.#requestHeaders({ 'Content-Type': 'application/json' }),
|
|
173
|
+
body: requestBody(options),
|
|
174
|
+
signal: options.signal,
|
|
148
175
|
});
|
|
149
|
-
|
|
150
|
-
|
|
176
|
+
|
|
177
|
+
if (!res.ok) {
|
|
178
|
+
throw new SuiGraphQLRequestError(
|
|
179
|
+
`GraphQL request failed: ${res.statusText} (${res.status})`,
|
|
180
|
+
{ reason: httpStatusReason(res.status) },
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
let body: string;
|
|
185
|
+
try {
|
|
186
|
+
body = await res.text();
|
|
187
|
+
} catch (cause) {
|
|
188
|
+
options.signal?.throwIfAborted();
|
|
189
|
+
throw new SuiGraphQLRequestError('GraphQL response body could not be read', {
|
|
190
|
+
reason: 'Unavailable',
|
|
191
|
+
cause,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
try {
|
|
195
|
+
return JSON.parse(body);
|
|
196
|
+
} catch (cause) {
|
|
197
|
+
// A protocol error, not a transport failure, so it has no retry reason.
|
|
198
|
+
throw new SuiGraphQLRequestError('Invalid GraphQL response', { cause });
|
|
151
199
|
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Run a GraphQL subscription over server-sent events. Does not reconnect; transport failures
|
|
204
|
+
* throw `SuiGraphQLRequestError`.
|
|
205
|
+
*/
|
|
206
|
+
subscribe<Result = Record<string, unknown>, Variables = Record<string, unknown>>(
|
|
207
|
+
options: GraphQLQueryOptions<Result, Variables>,
|
|
208
|
+
): AsyncGenerator<GraphQLQueryResult<Result>> {
|
|
209
|
+
return this.#subscribe(options);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
#subscribe<Result, Variables>(
|
|
213
|
+
options: GraphQLQueryOptions<Result, Variables>,
|
|
214
|
+
onOpen?: () => void,
|
|
215
|
+
): AsyncGenerator<GraphQLQueryResult<Result>> {
|
|
216
|
+
return abortableAsyncGenerator(
|
|
217
|
+
(signal) => this.#runSubscription(options, signal, onOpen),
|
|
218
|
+
options.signal,
|
|
219
|
+
);
|
|
220
|
+
}
|
|
152
221
|
|
|
153
|
-
|
|
222
|
+
async *#runSubscription<Result, Variables>(
|
|
223
|
+
options: GraphQLQueryOptions<Result, Variables>,
|
|
224
|
+
signal: AbortSignal,
|
|
225
|
+
onOpen?: () => void,
|
|
226
|
+
): AsyncGenerator<GraphQLQueryResult<Result>> {
|
|
227
|
+
const response = await this.#fetchResponse(this.#subscriptionUrl, {
|
|
154
228
|
method: 'POST',
|
|
155
|
-
headers
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
typeof options.query === 'string' || options.query instanceof String
|
|
159
|
-
? String(options.query)
|
|
160
|
-
: print(options.query),
|
|
161
|
-
variables: options.variables,
|
|
162
|
-
extensions: options.extensions,
|
|
163
|
-
operationName: options.operationName,
|
|
229
|
+
headers: this.#requestHeaders({
|
|
230
|
+
'Content-Type': 'application/json',
|
|
231
|
+
Accept: 'text/event-stream',
|
|
164
232
|
}),
|
|
165
|
-
|
|
233
|
+
body: requestBody(options),
|
|
234
|
+
signal,
|
|
166
235
|
});
|
|
236
|
+
yield* readGraphQLSSE<Result>(response, signal, onOpen);
|
|
237
|
+
}
|
|
167
238
|
|
|
168
|
-
|
|
169
|
-
|
|
239
|
+
#requestHeaders(defaults: Record<string, string>): Headers {
|
|
240
|
+
const headers = new Headers({ ...defaults, ...this.#headers });
|
|
241
|
+
if (!headers.has(CLIENT_PROTOCOL_VERSION_HEADER)) {
|
|
242
|
+
headers.set(CLIENT_PROTOCOL_VERSION_HEADER, String(MAX_PROTOCOL_VERSION));
|
|
170
243
|
}
|
|
244
|
+
return headers;
|
|
245
|
+
}
|
|
171
246
|
|
|
172
|
-
|
|
247
|
+
/** `fetch` that reports a network failure (a `TypeError`) as a retryable request error. */
|
|
248
|
+
async #fetchResponse(url: string, init: RequestInit): Promise<Response> {
|
|
249
|
+
try {
|
|
250
|
+
return await this.#fetch(url, init);
|
|
251
|
+
} catch (cause) {
|
|
252
|
+
init.signal?.throwIfAborted();
|
|
253
|
+
if (!(cause instanceof TypeError)) throw cause;
|
|
254
|
+
throw new SuiGraphQLRequestError('GraphQL network request failed', {
|
|
255
|
+
reason: 'Unavailable',
|
|
256
|
+
cause,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
173
259
|
}
|
|
174
260
|
|
|
175
261
|
async execute<
|
|
@@ -251,7 +337,7 @@ export class SuiGraphQLClient<Queries extends Record<string, GraphQLDocument> =
|
|
|
251
337
|
}
|
|
252
338
|
|
|
253
339
|
simulateTransaction<Include extends SuiClientTypes.SimulateTransactionInclude = {}>(
|
|
254
|
-
input:
|
|
340
|
+
input: SuiClientTypes.SimulateTransactionOptions<Include>,
|
|
255
341
|
): Promise<SuiClientTypes.SimulateTransactionResult<Include>> {
|
|
256
342
|
return this.core.simulateTransaction(input);
|
|
257
343
|
}
|
|
@@ -280,84 +366,10 @@ export class SuiGraphQLClient<Queries extends Record<string, GraphQLDocument> =
|
|
|
280
366
|
return this.core.getChainIdentifier(input);
|
|
281
367
|
}
|
|
282
368
|
|
|
283
|
-
|
|
284
|
-
input: SuiClientTypes.ListDynamicFieldsOptions
|
|
285
|
-
): Promise<
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
const { data, errors } = await this.query({
|
|
289
|
-
query: GetDynamicFieldsDocument,
|
|
290
|
-
signal: input.signal,
|
|
291
|
-
variables: {
|
|
292
|
-
parentId: input.parentId,
|
|
293
|
-
first: input.limit,
|
|
294
|
-
cursor: input.cursor,
|
|
295
|
-
includeValue,
|
|
296
|
-
},
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
if (errors?.length) {
|
|
300
|
-
throw errors.length === 1
|
|
301
|
-
? new Error(errors[0].message)
|
|
302
|
-
: new AggregateError(errors.map((e) => new Error(e.message)));
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
const result = data?.address?.dynamicFields;
|
|
306
|
-
if (!result) {
|
|
307
|
-
throw new Error('Missing response data');
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
return {
|
|
311
|
-
dynamicFields: result.nodes.map((dynamicField): DynamicFieldEntryWithValue<Include> => {
|
|
312
|
-
const valueType =
|
|
313
|
-
dynamicField.value?.__typename === 'MoveObject'
|
|
314
|
-
? dynamicField.value.contents?.type?.repr!
|
|
315
|
-
: dynamicField.value?.type?.repr!;
|
|
316
|
-
const isDynamicObject = dynamicField.value?.__typename === 'MoveObject';
|
|
317
|
-
const derivedNameType = isDynamicObject
|
|
318
|
-
? `0x2::dynamic_object_field::Wrapper<${dynamicField.name?.type?.repr}>`
|
|
319
|
-
: dynamicField.name?.type?.repr!;
|
|
320
|
-
|
|
321
|
-
let value: SuiClientTypes.DynamicFieldValue | undefined;
|
|
322
|
-
if (includeValue) {
|
|
323
|
-
let valueBcs: Uint8Array;
|
|
324
|
-
if (dynamicField.value?.__typename === 'MoveValue') {
|
|
325
|
-
valueBcs = fromBase64(dynamicField.value.bcs ?? '');
|
|
326
|
-
} else if (dynamicField.value?.__typename === 'MoveObject') {
|
|
327
|
-
valueBcs = fromBase64(dynamicField.value.contents?.bcs ?? '');
|
|
328
|
-
} else {
|
|
329
|
-
valueBcs = new Uint8Array();
|
|
330
|
-
}
|
|
331
|
-
value = { type: valueType, bcs: valueBcs };
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
return {
|
|
335
|
-
$kind: isDynamicObject ? 'DynamicObject' : 'DynamicField',
|
|
336
|
-
fieldId: deriveDynamicFieldID(
|
|
337
|
-
input.parentId,
|
|
338
|
-
derivedNameType,
|
|
339
|
-
fromBase64(dynamicField.name?.bcs!),
|
|
340
|
-
),
|
|
341
|
-
type: normalizeStructTag(
|
|
342
|
-
isDynamicObject
|
|
343
|
-
? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${dynamicField.name?.type?.repr}>,0x2::object::ID>`
|
|
344
|
-
: `0x2::dynamic_field::Field<${dynamicField.name?.type?.repr},${valueType}>`,
|
|
345
|
-
),
|
|
346
|
-
name: {
|
|
347
|
-
type: dynamicField.name?.type?.repr!,
|
|
348
|
-
bcs: fromBase64(dynamicField.name?.bcs!),
|
|
349
|
-
},
|
|
350
|
-
valueType,
|
|
351
|
-
childId:
|
|
352
|
-
isDynamicObject && dynamicField.value?.__typename === 'MoveObject'
|
|
353
|
-
? dynamicField.value.address
|
|
354
|
-
: undefined,
|
|
355
|
-
value: (includeValue ? value : undefined) as DynamicFieldEntryWithValue<Include>['value'],
|
|
356
|
-
} as DynamicFieldEntryWithValue<Include>;
|
|
357
|
-
}),
|
|
358
|
-
cursor: result.pageInfo.endCursor ?? null,
|
|
359
|
-
hasNextPage: result.pageInfo.hasNextPage,
|
|
360
|
-
};
|
|
369
|
+
listDynamicFields<Include extends SuiClientTypes.DynamicFieldInclude = {}>(
|
|
370
|
+
input: SuiClientTypes.ListDynamicFieldsOptions<Include>,
|
|
371
|
+
): Promise<SuiClientTypes.ListDynamicFieldsResponse<Include>> {
|
|
372
|
+
return this.core.listDynamicFields(input);
|
|
361
373
|
}
|
|
362
374
|
|
|
363
375
|
getDynamicField(
|
|
@@ -366,6 +378,12 @@ export class SuiGraphQLClient<Queries extends Record<string, GraphQLDocument> =
|
|
|
366
378
|
return this.core.getDynamicField(input);
|
|
367
379
|
}
|
|
368
380
|
|
|
381
|
+
getAddressAliases(
|
|
382
|
+
input: SuiClientTypes.GetAddressAliasesOptions,
|
|
383
|
+
): Promise<SuiClientTypes.GetAddressAliasesResponse> {
|
|
384
|
+
return this.core.getAddressAliases(input);
|
|
385
|
+
}
|
|
386
|
+
|
|
369
387
|
getDynamicObjectField<Include extends SuiClientTypes.ObjectInclude = {}>(
|
|
370
388
|
input: SuiClientTypes.GetDynamicObjectFieldOptions<Include>,
|
|
371
389
|
): Promise<SuiClientTypes.GetDynamicObjectFieldResponse<Include>> {
|
|
@@ -382,6 +400,47 @@ export class SuiGraphQLClient<Queries extends Record<string, GraphQLDocument> =
|
|
|
382
400
|
return this.core.listEvents(input);
|
|
383
401
|
}
|
|
384
402
|
|
|
403
|
+
listCheckpoints(
|
|
404
|
+
input: SuiClientTypes.ListCheckpointsOptions,
|
|
405
|
+
): Promise<SuiClientTypes.ListCheckpointsResponse> {
|
|
406
|
+
return this.core.listCheckpoints(input);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Streams checkpoints in ledger order, resumable from any frame's `resumeToken`, following new
|
|
411
|
+
* checkpoints by default.
|
|
412
|
+
*/
|
|
413
|
+
streamCheckpoints<
|
|
414
|
+
Include extends SuiClientTypes.StreamCheckpointInclude = {},
|
|
415
|
+
Frames extends SuiClientTypes.StreamFrameOptions = {},
|
|
416
|
+
>(
|
|
417
|
+
input?: SuiClientTypes.StreamCheckpointsOptions<Include, Frames>,
|
|
418
|
+
): AsyncGenerator<SuiClientTypes.StreamCheckpointFrame<Include, Frames>> {
|
|
419
|
+
return this.core.streamCheckpoints(input);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Streams transactions matching `filter` in ledger order, resumable from any frame's
|
|
424
|
+
* `resumeToken`.
|
|
425
|
+
*/
|
|
426
|
+
streamTransactions<
|
|
427
|
+
Include extends SuiClientTypes.TransactionInclude = {},
|
|
428
|
+
Frames extends SuiClientTypes.StreamFrameOptions = {},
|
|
429
|
+
>(
|
|
430
|
+
input?: SuiClientTypes.StreamTransactionsOptions<Include, Frames>,
|
|
431
|
+
): AsyncGenerator<SuiClientTypes.StreamTransactionFrame<Include, Frames>> {
|
|
432
|
+
return this.core.streamTransactions(input);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Streams events matching `filter` in ledger order, resumable from any frame's `resumeToken`.
|
|
437
|
+
*/
|
|
438
|
+
streamEvents<Frames extends SuiClientTypes.StreamFrameOptions = {}>(
|
|
439
|
+
input?: SuiClientTypes.StreamEventsOptions<Frames>,
|
|
440
|
+
): AsyncGenerator<SuiClientTypes.StreamEventFrame<Frames>> {
|
|
441
|
+
return this.core.streamEvents(input);
|
|
442
|
+
}
|
|
443
|
+
|
|
385
444
|
getMoveFunction(
|
|
386
445
|
input: SuiClientTypes.GetMoveFunctionOptions,
|
|
387
446
|
): Promise<SuiClientTypes.GetMoveFunctionResponse> {
|
|
@@ -392,6 +451,16 @@ export class SuiGraphQLClient<Queries extends Record<string, GraphQLDocument> =
|
|
|
392
451
|
return this.core.resolveTransactionPlugin();
|
|
393
452
|
}
|
|
394
453
|
|
|
454
|
+
verifySignature(
|
|
455
|
+
input: SuiClientTypes.VerifySignatureOptions,
|
|
456
|
+
): Promise<SuiClientTypes.VerifySignatureResponse> {
|
|
457
|
+
return this.core.verifySignature(input);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* @deprecated Use `verifySignature`. This method accepts signatures from the address's aliases,
|
|
462
|
+
* like `verifySignature` does by default.
|
|
463
|
+
*/
|
|
395
464
|
verifyZkLoginSignature(
|
|
396
465
|
input: SuiClientTypes.VerifyZkLoginSignatureOptions,
|
|
397
466
|
): Promise<SuiClientTypes.ZkLoginVerifyResponse> {
|