@mysten/sui 2.39.0 → 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 +162 -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 +8 -8
- 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/forking/v1alpha/forking_service.client.d.mts +4 -4
- 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.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/name_service.client.d.mts +4 -4
- 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.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 +20 -14
- 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 +14 -13
- 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 +3 -4
- 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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { SuiStreamError } from '../../client/stream/index.js';
|
|
5
|
+
import type { SuiClientTypes } from '../../client/types.js';
|
|
6
|
+
import type { GraphQLQueryOptions, GraphQLQueryResult, SuiGraphQLClient } from '../client.js';
|
|
7
|
+
import { SuiGraphQLRequestError } from '../errors.js';
|
|
8
|
+
import { LedgerStreamStateDocument } from '../generated/queries.js';
|
|
9
|
+
|
|
10
|
+
/** Response error codes that may clear on retry. */
|
|
11
|
+
const RETRY_REASONS: Record<string, SuiClientTypes.RetryReason> = {
|
|
12
|
+
INTERNAL_SERVER_ERROR: 'ServerError',
|
|
13
|
+
REQUEST_TIMEOUT: 'ServerError',
|
|
14
|
+
// A reconnect gets a fresh server meter; a limit hit on every attempt fails once the budget runs out.
|
|
15
|
+
RESOURCE_EXHAUSTED: 'RateLimited',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** A result's data, or its errors thrown. The errors may clear on retry only if each of them may. */
|
|
19
|
+
export function unwrap<Result>(result: GraphQLQueryResult<Result>): Result {
|
|
20
|
+
const errors = result.errors ?? [];
|
|
21
|
+
const message = errors.map((error) => error.message).join('\n');
|
|
22
|
+
if (errors.length > 0) {
|
|
23
|
+
const reasons = errors.map(({ extensions }) => RETRY_REASONS[String(extensions?.code)]);
|
|
24
|
+
const reason = reasons.every((each) => each !== undefined) ? reasons[0] : undefined;
|
|
25
|
+
throw new SuiGraphQLRequestError(message, { reason, cause: errors });
|
|
26
|
+
}
|
|
27
|
+
if (!result.data) throw new SuiStreamError('Protocol', 'GraphQL response has no data');
|
|
28
|
+
return result.data;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export async function queryData<Result, Variables>(
|
|
32
|
+
client: SuiGraphQLClient,
|
|
33
|
+
options: GraphQLQueryOptions<Result, Variables>,
|
|
34
|
+
): Promise<Result> {
|
|
35
|
+
return unwrap(await client.query(options));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function notIndexedYet() {
|
|
39
|
+
return new SuiGraphQLRequestError('No checkpoint has been indexed yet', {
|
|
40
|
+
reason: 'Unavailable',
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** The chain identity and the indexed tip in one request. */
|
|
45
|
+
export async function readChainTip(
|
|
46
|
+
client: SuiGraphQLClient,
|
|
47
|
+
signal: AbortSignal,
|
|
48
|
+
): Promise<{ chain: string; tip: bigint }> {
|
|
49
|
+
const data = await queryData(client, { query: LedgerStreamStateDocument, signal });
|
|
50
|
+
if (!data.checkpoint) throw notIndexedYet();
|
|
51
|
+
return { chain: data.chainIdentifier, tip: BigInt(data.checkpoint.sequenceNumber) };
|
|
52
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import type { GraphQLQueryResult } from './client.js';
|
|
5
|
+
import { httpStatusReason } from '../client/errors.js';
|
|
6
|
+
import { cancelQuietly } from '../client/utils.js';
|
|
7
|
+
import { SuiGraphQLRequestError } from './errors.js';
|
|
8
|
+
import { ServerSentEventParser } from './sse-parser.js';
|
|
9
|
+
|
|
10
|
+
/** The largest SSE message, in characters, before the subscription fails. */
|
|
11
|
+
const MAX_MESSAGE_SIZE = 16 * 1024 * 1024;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Read a GraphQL-over-SSE response body.
|
|
15
|
+
* @yields GraphQL responses, preserving partial data and errors.
|
|
16
|
+
*/
|
|
17
|
+
export async function* readGraphQLSSE<Result>(
|
|
18
|
+
response: Response,
|
|
19
|
+
signal: AbortSignal,
|
|
20
|
+
onOpen?: () => void,
|
|
21
|
+
): AsyncGenerator<GraphQLQueryResult<Result>> {
|
|
22
|
+
// A custom `fetch` that ignores the signal can resolve after the abort.
|
|
23
|
+
if (signal.aborted) {
|
|
24
|
+
cancelQuietly(response.body);
|
|
25
|
+
signal.throwIfAborted();
|
|
26
|
+
}
|
|
27
|
+
if (!response.ok) {
|
|
28
|
+
cancelQuietly(response.body);
|
|
29
|
+
throw new SuiGraphQLRequestError(
|
|
30
|
+
`GraphQL subscription failed: ${response.statusText} (${response.status})`,
|
|
31
|
+
{ reason: httpStatusReason(response.status) },
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
if (
|
|
35
|
+
response.headers.get('content-type')?.split(';', 1)[0].trim().toLowerCase() !==
|
|
36
|
+
'text/event-stream' ||
|
|
37
|
+
!response.body
|
|
38
|
+
) {
|
|
39
|
+
cancelQuietly(response.body);
|
|
40
|
+
throw new SuiGraphQLRequestError('GraphQL subscription requires a text/event-stream response');
|
|
41
|
+
}
|
|
42
|
+
onOpen?.();
|
|
43
|
+
const reader = response.body.getReader();
|
|
44
|
+
const decoder = new TextDecoder();
|
|
45
|
+
const parser = new ServerSentEventParser(MAX_MESSAGE_SIZE);
|
|
46
|
+
const abort = () => {
|
|
47
|
+
cancelQuietly(reader, signal.reason);
|
|
48
|
+
};
|
|
49
|
+
signal.addEventListener('abort', abort, { once: true });
|
|
50
|
+
try {
|
|
51
|
+
while (true) {
|
|
52
|
+
let chunk: ReadableStreamReadResult<Uint8Array>;
|
|
53
|
+
try {
|
|
54
|
+
chunk = await reader.read();
|
|
55
|
+
} catch (cause) {
|
|
56
|
+
signal.throwIfAborted();
|
|
57
|
+
throw new SuiGraphQLRequestError('GraphQL subscription body could not be read', {
|
|
58
|
+
reason: 'Unavailable',
|
|
59
|
+
cause,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
signal.throwIfAborted();
|
|
63
|
+
for (const message of parser.feed(decoder.decode(chunk.value, { stream: !chunk.done }))) {
|
|
64
|
+
signal.throwIfAborted();
|
|
65
|
+
if (message.event === 'complete') return;
|
|
66
|
+
if (message.event && message.event !== 'next' && message.event !== 'message') continue;
|
|
67
|
+
let result: GraphQLQueryResult<Result>;
|
|
68
|
+
try {
|
|
69
|
+
result = JSON.parse(message.data);
|
|
70
|
+
} catch (cause) {
|
|
71
|
+
throw new SuiGraphQLRequestError('Invalid GraphQL subscription response', { cause });
|
|
72
|
+
}
|
|
73
|
+
yield result;
|
|
74
|
+
}
|
|
75
|
+
// Sui closes a finished subscription without a `complete` event.
|
|
76
|
+
if (chunk.done) return;
|
|
77
|
+
}
|
|
78
|
+
} finally {
|
|
79
|
+
signal.removeEventListener('abort', abort);
|
|
80
|
+
cancelQuietly(reader);
|
|
81
|
+
reader.releaseLock();
|
|
82
|
+
}
|
|
83
|
+
}
|
package/src/grpc/client.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Copyright (c) Mysten Labs, Inc.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import type { GrpcWebOptions } from '@protobuf-ts/grpcweb-transport';
|
|
5
4
|
import { TransactionExecutionServiceClient } from './proto/sui/rpc/v2/transaction_execution_service.client.js';
|
|
6
5
|
import { LedgerServiceClient } from './proto/sui/rpc/v2/ledger_service.client.js';
|
|
7
6
|
import { MovePackageServiceClient } from './proto/sui/rpc/v2/move_package_service.client.js';
|
|
@@ -12,13 +11,16 @@ import { SubscriptionServiceClient } from './proto/sui/rpc/v2/subscription_servi
|
|
|
12
11
|
import { GrpcCoreClient } from './core.js';
|
|
13
12
|
import type { SuiClientTypes } from '../client/index.js';
|
|
14
13
|
import { BaseClient } from '../client/index.js';
|
|
15
|
-
import { DynamicField_DynamicFieldKind } from './proto/sui/rpc/v2/state_service.js';
|
|
16
|
-
import { normalizeStructTag } from '../utils/sui-types.js';
|
|
17
|
-
import { fromBase64, toBase64 } from '@mysten/utils';
|
|
18
14
|
import { NameServiceClient } from './proto/sui/rpc/v2/name_service.client.js';
|
|
19
15
|
import { ForkingServiceClient } from './proto/sui/forking/v1alpha/forking_service.client.js';
|
|
20
16
|
import type { TransactionPlugin } from '../transactions/index.js';
|
|
21
|
-
import { GrpcWebFetchTransport,
|
|
17
|
+
import { GrpcWebFetchTransport, withClientDefaults } from './transport.js';
|
|
18
|
+
import type { GrpcWebOptions } from '@protobuf-ts/grpcweb-transport';
|
|
19
|
+
import type {
|
|
20
|
+
GrpcStreamCheckpointsOptions,
|
|
21
|
+
GrpcStreamEventsOptions,
|
|
22
|
+
GrpcStreamTransactionsOptions,
|
|
23
|
+
} from './stream-types.js';
|
|
22
24
|
|
|
23
25
|
interface SuiGrpcTransportOptions extends GrpcWebOptions {
|
|
24
26
|
transport?: never;
|
|
@@ -27,6 +29,12 @@ interface SuiGrpcTransportOptions extends GrpcWebOptions {
|
|
|
27
29
|
export type SuiGrpcClientOptions = {
|
|
28
30
|
network: SuiClientTypes.Network;
|
|
29
31
|
mvr?: SuiClientTypes.MvrOptions;
|
|
32
|
+
/**
|
|
33
|
+
* `package`, `package::module` or `package::module::function` entries that transactions built
|
|
34
|
+
* with this client can't call. A per-call `restrictedMoveCalls` on `build` or `toJSON` takes
|
|
35
|
+
* precedence. Defaults to `DEFAULT_RESTRICTED_MOVE_CALLS`.
|
|
36
|
+
*/
|
|
37
|
+
restrictedMoveCalls?: readonly string[];
|
|
30
38
|
} & (
|
|
31
39
|
| {
|
|
32
40
|
transport: RpcTransport;
|
|
@@ -42,21 +50,6 @@ export function isSuiGrpcClient(client: unknown): client is SuiGrpcClient {
|
|
|
42
50
|
);
|
|
43
51
|
}
|
|
44
52
|
|
|
45
|
-
export interface DynamicFieldInclude {
|
|
46
|
-
value?: boolean;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export type DynamicFieldEntryWithValue<Include extends DynamicFieldInclude = {}> =
|
|
50
|
-
SuiClientTypes.DynamicFieldEntry & {
|
|
51
|
-
value: Include extends { value: true } ? SuiClientTypes.DynamicFieldValue : undefined;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export interface ListDynamicFieldsWithValueResponse<Include extends DynamicFieldInclude = {}> {
|
|
55
|
-
hasNextPage: boolean;
|
|
56
|
-
cursor: string | null;
|
|
57
|
-
dynamicFields: DynamicFieldEntryWithValue<Include>[];
|
|
58
|
-
}
|
|
59
|
-
|
|
60
53
|
export interface GrpcTransactionInclude extends SuiClientTypes.TransactionInclude {
|
|
61
54
|
/** Include the parsed protobuf JSON value for the gRPC transaction response. */
|
|
62
55
|
protoJson?: boolean;
|
|
@@ -126,16 +119,6 @@ export interface GrpcSimulateTransactionOptions<
|
|
|
126
119
|
Include extends GrpcSimulateTransactionInclude = {},
|
|
127
120
|
> extends SuiClientTypes.SimulateTransactionOptions<Include> {
|
|
128
121
|
include?: Include & GrpcSimulateTransactionInclude;
|
|
129
|
-
/**
|
|
130
|
-
* Overrides whether the server selects gas payment during simulation.
|
|
131
|
-
*
|
|
132
|
-
* When not set, gas selection is enabled only when the transaction's gas payment is explicitly
|
|
133
|
-
* set to an empty list (`[]`); the server then pays gas from the sender's address balance or
|
|
134
|
-
* coin objects. Transactions with gas coins set are simulated as-is, and transactions without a
|
|
135
|
-
* gas payment are simulated with a mocked gas coin (reported as `gasPaymentMocked` on the
|
|
136
|
-
* result).
|
|
137
|
-
*/
|
|
138
|
-
doGasSelection?: boolean;
|
|
139
122
|
}
|
|
140
123
|
|
|
141
124
|
export class SuiGrpcClient extends BaseClient implements SuiClientTypes.TransportMethods {
|
|
@@ -161,14 +144,16 @@ export class SuiGrpcClient extends BaseClient implements SuiClientTypes.Transpor
|
|
|
161
144
|
const {
|
|
162
145
|
network: _network,
|
|
163
146
|
mvr: _mvr,
|
|
147
|
+
restrictedMoveCalls: _restrictedMoveCalls,
|
|
164
148
|
// Not forwarded: every Core API call passes its own `signal`, which would overwrite it.
|
|
165
149
|
abort: _abort,
|
|
166
150
|
transport: providedTransport,
|
|
167
151
|
...transportOptions
|
|
168
152
|
} = options as SuiGrpcClientOptions & SuiGrpcTransportOptions & { transport?: RpcTransport };
|
|
169
153
|
|
|
170
|
-
// Add the protocol-version
|
|
171
|
-
|
|
154
|
+
// Add the protocol-version header and fill unset request oneofs for every transport,
|
|
155
|
+
// including native gRPC.
|
|
156
|
+
const transport = withClientDefaults(
|
|
172
157
|
providedTransport ?? new GrpcWebFetchTransport(transportOptions),
|
|
173
158
|
);
|
|
174
159
|
this.transactionExecutionService = new TransactionExecutionServiceClient(transport);
|
|
@@ -182,9 +167,11 @@ export class SuiGrpcClient extends BaseClient implements SuiClientTypes.Transpor
|
|
|
182
167
|
|
|
183
168
|
this.core = new GrpcCoreClient({
|
|
184
169
|
client: this,
|
|
170
|
+
transport,
|
|
185
171
|
base: this,
|
|
186
172
|
network: options.network,
|
|
187
173
|
mvr: options.mvr,
|
|
174
|
+
restrictedMoveCalls: options.restrictedMoveCalls,
|
|
188
175
|
});
|
|
189
176
|
}
|
|
190
177
|
|
|
@@ -280,53 +267,10 @@ export class SuiGrpcClient extends BaseClient implements SuiClientTypes.Transpor
|
|
|
280
267
|
return this.core.getChainIdentifier(input);
|
|
281
268
|
}
|
|
282
269
|
|
|
283
|
-
|
|
284
|
-
input: SuiClientTypes.ListDynamicFieldsOptions
|
|
285
|
-
): Promise<
|
|
286
|
-
|
|
287
|
-
const paths = ['field_id', 'name', 'value_type', 'kind', 'child_id'];
|
|
288
|
-
if (includeValue) {
|
|
289
|
-
paths.push('value');
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
const response = await this.stateService.listDynamicFields(
|
|
293
|
-
{
|
|
294
|
-
parent: input.parentId,
|
|
295
|
-
pageToken: input.cursor ? fromBase64(input.cursor) : undefined,
|
|
296
|
-
pageSize: input.limit,
|
|
297
|
-
readMask: {
|
|
298
|
-
paths,
|
|
299
|
-
},
|
|
300
|
-
},
|
|
301
|
-
{ abort: input.signal },
|
|
302
|
-
);
|
|
303
|
-
|
|
304
|
-
return {
|
|
305
|
-
dynamicFields: response.response.dynamicFields.map(
|
|
306
|
-
(field): DynamicFieldEntryWithValue<Include> => {
|
|
307
|
-
const isDynamicObject = field.kind === DynamicField_DynamicFieldKind.OBJECT;
|
|
308
|
-
const fieldType = isDynamicObject
|
|
309
|
-
? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${field.name?.name!}>,0x2::object::ID>`
|
|
310
|
-
: `0x2::dynamic_field::Field<${field.name?.name!},${field.valueType!}>`;
|
|
311
|
-
return {
|
|
312
|
-
$kind: isDynamicObject ? 'DynamicObject' : 'DynamicField',
|
|
313
|
-
fieldId: field.fieldId!,
|
|
314
|
-
name: {
|
|
315
|
-
type: field.name?.name!,
|
|
316
|
-
bcs: field.name?.value!,
|
|
317
|
-
},
|
|
318
|
-
valueType: field.valueType!,
|
|
319
|
-
type: normalizeStructTag(fieldType),
|
|
320
|
-
childId: field.childId,
|
|
321
|
-
value: (includeValue
|
|
322
|
-
? { type: field.valueType!, bcs: field.value?.value ?? new Uint8Array() }
|
|
323
|
-
: undefined) as DynamicFieldEntryWithValue<Include>['value'],
|
|
324
|
-
} as DynamicFieldEntryWithValue<Include>;
|
|
325
|
-
},
|
|
326
|
-
),
|
|
327
|
-
cursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,
|
|
328
|
-
hasNextPage: response.response.nextPageToken !== undefined,
|
|
329
|
-
};
|
|
270
|
+
listDynamicFields<Include extends SuiClientTypes.DynamicFieldInclude = {}>(
|
|
271
|
+
input: SuiClientTypes.ListDynamicFieldsOptions<Include>,
|
|
272
|
+
): Promise<SuiClientTypes.ListDynamicFieldsResponse<Include>> {
|
|
273
|
+
return this.core.listDynamicFields(input);
|
|
330
274
|
}
|
|
331
275
|
|
|
332
276
|
getDynamicField(
|
|
@@ -335,6 +279,12 @@ export class SuiGrpcClient extends BaseClient implements SuiClientTypes.Transpor
|
|
|
335
279
|
return this.core.getDynamicField(input);
|
|
336
280
|
}
|
|
337
281
|
|
|
282
|
+
getAddressAliases(
|
|
283
|
+
input: SuiClientTypes.GetAddressAliasesOptions,
|
|
284
|
+
): Promise<SuiClientTypes.GetAddressAliasesResponse> {
|
|
285
|
+
return this.core.getAddressAliases(input);
|
|
286
|
+
}
|
|
287
|
+
|
|
338
288
|
getDynamicObjectField<Include extends SuiClientTypes.ObjectInclude = {}>(
|
|
339
289
|
input: SuiClientTypes.GetDynamicObjectFieldOptions<Include>,
|
|
340
290
|
): Promise<SuiClientTypes.GetDynamicObjectFieldResponse<Include>> {
|
|
@@ -351,6 +301,12 @@ export class SuiGrpcClient extends BaseClient implements SuiClientTypes.Transpor
|
|
|
351
301
|
return this.core.listEvents(input);
|
|
352
302
|
}
|
|
353
303
|
|
|
304
|
+
listCheckpoints(
|
|
305
|
+
input: SuiClientTypes.ListCheckpointsOptions,
|
|
306
|
+
): Promise<SuiClientTypes.ListCheckpointsResponse> {
|
|
307
|
+
return this.core.listCheckpoints(input);
|
|
308
|
+
}
|
|
309
|
+
|
|
354
310
|
getMoveFunction(
|
|
355
311
|
input: SuiClientTypes.GetMoveFunctionOptions,
|
|
356
312
|
): Promise<SuiClientTypes.GetMoveFunctionResponse> {
|
|
@@ -361,6 +317,16 @@ export class SuiGrpcClient extends BaseClient implements SuiClientTypes.Transpor
|
|
|
361
317
|
return this.core.resolveTransactionPlugin();
|
|
362
318
|
}
|
|
363
319
|
|
|
320
|
+
verifySignature(
|
|
321
|
+
input: SuiClientTypes.VerifySignatureOptions,
|
|
322
|
+
): Promise<SuiClientTypes.VerifySignatureResponse> {
|
|
323
|
+
return this.core.verifySignature(input);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* @deprecated Use `verifySignature`. This method accepts signatures from the address's aliases,
|
|
328
|
+
* like `verifySignature` does by default.
|
|
329
|
+
*/
|
|
364
330
|
verifyZkLoginSignature(
|
|
365
331
|
input: SuiClientTypes.VerifyZkLoginSignatureOptions,
|
|
366
332
|
): Promise<SuiClientTypes.ZkLoginVerifyResponse> {
|
|
@@ -378,4 +344,40 @@ export class SuiGrpcClient extends BaseClient implements SuiClientTypes.Transpor
|
|
|
378
344
|
): Promise<SuiClientTypes.ResolveNameServiceAddressResponse> {
|
|
379
345
|
return this.core.resolveNameServiceAddress(input);
|
|
380
346
|
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Streams checkpoints in ledger order, resumable from any frame's `resumeToken`, following new
|
|
350
|
+
* checkpoints by default. `grpcFilter` keeps only checkpoints with a matching transaction.
|
|
351
|
+
*/
|
|
352
|
+
streamCheckpoints<
|
|
353
|
+
Include extends SuiClientTypes.StreamCheckpointInclude = {},
|
|
354
|
+
Frames extends SuiClientTypes.StreamFrameOptions = {},
|
|
355
|
+
>(
|
|
356
|
+
options?: GrpcStreamCheckpointsOptions<Include, Frames>,
|
|
357
|
+
): AsyncGenerator<SuiClientTypes.StreamCheckpointFrame<Include, Frames>> {
|
|
358
|
+
return this.core.streamCheckpoints(options);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Streams transactions matching `filter` in ledger order, resumable from any frame's
|
|
363
|
+
* `resumeToken`. `grpcFilter` replaces `filter` with a native filter.
|
|
364
|
+
*/
|
|
365
|
+
streamTransactions<
|
|
366
|
+
Include extends SuiClientTypes.TransactionInclude = {},
|
|
367
|
+
Frames extends SuiClientTypes.StreamFrameOptions = {},
|
|
368
|
+
>(
|
|
369
|
+
options?: GrpcStreamTransactionsOptions<Include, Frames>,
|
|
370
|
+
): AsyncGenerator<SuiClientTypes.StreamTransactionFrame<Include, Frames>> {
|
|
371
|
+
return this.core.streamTransactions(options);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Streams events matching `filter` in ledger order, resumable from any frame's `resumeToken`.
|
|
376
|
+
* `grpcFilter` replaces `filter` with a native filter.
|
|
377
|
+
*/
|
|
378
|
+
streamEvents<Frames extends SuiClientTypes.StreamFrameOptions = {}>(
|
|
379
|
+
options?: GrpcStreamEventsOptions<Frames>,
|
|
380
|
+
): AsyncGenerator<SuiClientTypes.StreamEventFrame<Frames>> {
|
|
381
|
+
return this.core.streamEvents(options);
|
|
382
|
+
}
|
|
381
383
|
}
|