@mysten/sui 2.39.1 → 3.0.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 +169 -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 +5 -3
- package/dist/client/index.mjs +6 -3
- 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 +17 -0
- package/dist/client/transaction-data.d.mts.map +1 -0
- package/dist/client/transaction-data.mjs +472 -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 +2 -2
- package/dist/client/utils.d.mts.map +1 -1
- package/dist/client/utils.mjs +91 -30
- 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 +294 -118
- 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.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/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.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 +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 +10 -9
- 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 +2 -0
- 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/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 +247 -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 +4 -5
- 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 -2
- 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 +610 -0
- package/src/client/transaction-resolver.ts +158 -69
- package/src/client/types.ts +530 -115
- package/src/client/utils.ts +146 -61
- 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/dist/client/types.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ClientCache } from "./cache.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { EndOfEpochTransactionKind as EndOfEpochTransactionKind$1, TransactionKind as TransactionKind$1 } from "../bcs/transactions.mjs";
|
|
3
|
+
import { CallArg, Command, TransactionData as TransactionData$1 } from "../transactions/data/internal.mjs";
|
|
3
4
|
import { TransactionPlugin } from "../transactions/resolve.mjs";
|
|
4
5
|
import { Transaction as Transaction$1 } from "../transactions/Transaction.mjs";
|
|
5
6
|
import { Signer } from "../cryptography/keypair.mjs";
|
|
@@ -13,14 +14,16 @@ type SuiClientRegistration<T extends BaseClient = BaseClient, Name extends strin
|
|
|
13
14
|
readonly register: (client: T) => Extension;
|
|
14
15
|
};
|
|
15
16
|
type ClientWithExtensions<T, Base extends BaseClient = BaseClient> = Base & T;
|
|
17
|
+
type BcsTransactionKind = typeof TransactionKind$1.$inferType;
|
|
18
|
+
type BcsEndOfEpochTransactionKind = typeof EndOfEpochTransactionKind$1.$inferType;
|
|
16
19
|
declare namespace SuiClientTypes {
|
|
17
|
-
type Network = 'mainnet' | 'testnet' | 'devnet' | 'localnet' | (string & {});
|
|
18
|
-
interface SuiClientOptions {
|
|
20
|
+
export type Network = 'mainnet' | 'testnet' | 'devnet' | 'localnet' | (string & {});
|
|
21
|
+
export interface SuiClientOptions {
|
|
19
22
|
network: Network;
|
|
20
23
|
base?: BaseClient;
|
|
21
24
|
cache?: ClientCache;
|
|
22
25
|
}
|
|
23
|
-
interface MvrOptions {
|
|
26
|
+
export interface MvrOptions {
|
|
24
27
|
url?: string;
|
|
25
28
|
pageSize?: number;
|
|
26
29
|
overrides?: {
|
|
@@ -28,18 +31,178 @@ declare namespace SuiClientTypes {
|
|
|
28
31
|
types?: Record<string, string>;
|
|
29
32
|
};
|
|
30
33
|
}
|
|
31
|
-
interface CoreClientMethodOptions {
|
|
34
|
+
export interface CoreClientMethodOptions {
|
|
32
35
|
signal?: AbortSignal;
|
|
33
36
|
}
|
|
37
|
+
export type Order = 'ascending' | 'descending';
|
|
38
|
+
/** Opaque resume position, valid only for the stream that produced it. */
|
|
39
|
+
export type StreamResumeToken = string;
|
|
40
|
+
/**
|
|
41
|
+
* Where a stream starts: at a checkpoint (inclusive), or after the frame that carried a resume
|
|
42
|
+
* token, so save a token only once its frame is processed.
|
|
43
|
+
*/
|
|
44
|
+
export type StreamStart = {
|
|
45
|
+
checkpoint: CheckpointNumber;
|
|
46
|
+
resumeToken?: never;
|
|
47
|
+
} | {
|
|
48
|
+
resumeToken: StreamResumeToken;
|
|
49
|
+
checkpoint?: never;
|
|
50
|
+
};
|
|
51
|
+
/** Where a finite stream stops: before this checkpoint (exclusive). */
|
|
52
|
+
export interface StreamEnd {
|
|
53
|
+
checkpoint: CheckpointNumber;
|
|
54
|
+
}
|
|
55
|
+
export interface StreamRetryOptions {
|
|
56
|
+
/**
|
|
57
|
+
* First retry delay in milliseconds; each further failure doubles it.
|
|
58
|
+
* @default 250
|
|
59
|
+
*/
|
|
60
|
+
initialDelay?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Cap on the retry delay in milliseconds.
|
|
63
|
+
* @default 30_000
|
|
64
|
+
*/
|
|
65
|
+
maxDelay?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Consecutive failures without progress before the stream throws. 0 disables retries.
|
|
68
|
+
* @default 10
|
|
69
|
+
*/
|
|
70
|
+
maxAttempts?: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Why a failed request may succeed on retry.
|
|
74
|
+
* - `Unavailable`: the server could not be reached, the connection dropped, or a live feed ended.
|
|
75
|
+
* - `RateLimited`: the server or a proxy is limiting requests.
|
|
76
|
+
* - `ServerError`: any other failure that may clear on retry.
|
|
77
|
+
*/
|
|
78
|
+
export type RetryReason = 'Unavailable' | 'RateLimited' | 'ServerError';
|
|
79
|
+
/** Connection state reported to `onStatus`, for diagnostics only. Use frame tokens to resume. */
|
|
80
|
+
export type StreamStatus = /** An attempt is starting; `attempt` counts consecutive failures without progress. */{
|
|
81
|
+
$kind: 'Connecting';
|
|
82
|
+
attempt: number;
|
|
83
|
+
} /** This attempt received its first page or live frame, or its GraphQL subscription opened. */ | {
|
|
84
|
+
$kind: 'Connected';
|
|
85
|
+
} /** Waiting `delay` ms before the next attempt after `error`. */ | {
|
|
86
|
+
$kind: 'Retrying';
|
|
87
|
+
attempt: number;
|
|
88
|
+
delay: number;
|
|
89
|
+
reason: RetryReason;
|
|
90
|
+
error: unknown;
|
|
91
|
+
};
|
|
92
|
+
/** Control frames to emit in addition to items. */
|
|
93
|
+
export interface StreamFrameOptions {
|
|
94
|
+
/** Emit a final Complete frame after a finite stream finishes. */
|
|
95
|
+
completion?: boolean;
|
|
96
|
+
/** Emit Progress frames carrying resumable positions that no item reported. */
|
|
97
|
+
progress?: boolean;
|
|
98
|
+
}
|
|
99
|
+
export interface StreamOptions<Frames extends StreamFrameOptions = {}> extends CoreClientMethodOptions {
|
|
100
|
+
/**
|
|
101
|
+
* Where to start: at a checkpoint, or after the frame that carried a resume token. Required
|
|
102
|
+
* for a finite ascending read.
|
|
103
|
+
*/
|
|
104
|
+
start?: StreamStart;
|
|
105
|
+
/** Where a finite stream stops (exclusive). */
|
|
106
|
+
end?: StreamEnd;
|
|
107
|
+
/** Defaults to the resume token's order, else `'ascending'`. */
|
|
108
|
+
order?: Order;
|
|
109
|
+
/**
|
|
110
|
+
* Keep following new checkpoints after the history.
|
|
111
|
+
* @default true for an ascending stream without an `end`
|
|
112
|
+
*/
|
|
113
|
+
follow?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* How a followed stream receives new data: a live subscription, or polling every
|
|
116
|
+
* `pollInterval`.
|
|
117
|
+
* @default 'subscribe'
|
|
118
|
+
*/
|
|
119
|
+
delivery?: 'subscribe' | 'poll';
|
|
120
|
+
/**
|
|
121
|
+
* Milliseconds between polls, and between reads while waiting for the server to index.
|
|
122
|
+
* @default 1000
|
|
123
|
+
*/
|
|
124
|
+
pollInterval?: number;
|
|
125
|
+
retry?: StreamRetryOptions;
|
|
126
|
+
/** Called synchronously with each status. Throwing ends the stream with that error. */
|
|
127
|
+
onStatus?: (status: StreamStatus) => void;
|
|
128
|
+
/** Control frames to emit alongside items. */
|
|
129
|
+
frames?: Frames;
|
|
130
|
+
}
|
|
131
|
+
/** Data to deliver with each streamed checkpoint. */
|
|
132
|
+
export interface StreamCheckpointInclude {
|
|
133
|
+
/**
|
|
134
|
+
* Deliver every transaction of the checkpoint, in execution order, with these fields. Each
|
|
135
|
+
* checkpoint is yielded once all of its transactions have been read.
|
|
136
|
+
*/
|
|
137
|
+
transactions?: TransactionInclude;
|
|
138
|
+
}
|
|
139
|
+
export interface StreamCheckpointsOptions<Include extends StreamCheckpointInclude = {}, Frames extends StreamFrameOptions = {}> extends StreamOptions<Frames> {
|
|
140
|
+
include?: Include;
|
|
141
|
+
}
|
|
142
|
+
export interface StreamTransactionsOptions<Include extends TransactionInclude = {}, Frames extends StreamFrameOptions = {}> extends StreamOptions<Frames> {
|
|
143
|
+
filter?: TransactionFilter;
|
|
144
|
+
include?: Include;
|
|
145
|
+
}
|
|
146
|
+
export interface StreamEventsOptions<Frames extends StreamFrameOptions = {}> extends StreamOptions<Frames> {
|
|
147
|
+
filter?: EventFilter;
|
|
148
|
+
}
|
|
149
|
+
export interface StreamCheckpoint<Include extends StreamCheckpointInclude = {}> {
|
|
150
|
+
$kind: 'Checkpoint';
|
|
151
|
+
/** Includes `transactions` when `include.transactions` is set. */
|
|
152
|
+
checkpoint: Checkpoint & (Include extends {
|
|
153
|
+
transactions: infer TransactionFields extends TransactionInclude;
|
|
154
|
+
} ? {
|
|
155
|
+
transactions: TransactionResult<TransactionFields>[];
|
|
156
|
+
} : {});
|
|
157
|
+
resumeToken: StreamResumeToken;
|
|
158
|
+
}
|
|
159
|
+
export interface StreamTransaction<Include extends TransactionInclude = {}> {
|
|
160
|
+
$kind: 'Transaction';
|
|
161
|
+
transaction: TransactionResult<Include>;
|
|
162
|
+
resumeToken: StreamResumeToken;
|
|
163
|
+
}
|
|
164
|
+
export interface StreamEvent {
|
|
165
|
+
$kind: 'Event';
|
|
166
|
+
event: EventEntry;
|
|
167
|
+
resumeToken: StreamResumeToken;
|
|
168
|
+
}
|
|
169
|
+
/** A resumable position that no item reported, such as the end of an empty range. */
|
|
170
|
+
export interface StreamProgressFrame {
|
|
171
|
+
$kind: 'Progress';
|
|
172
|
+
resumeToken: StreamResumeToken;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Sent once after a finite stream finishes, even an empty one.
|
|
176
|
+
* - `checkpointBound`: reached `end`.
|
|
177
|
+
* - `indexedTip`: reached the indexed tip read when the stream started (`follow: false`).
|
|
178
|
+
* - `genesis`: a descending read reached checkpoint 0.
|
|
179
|
+
* - `retentionLimit`: a descending read reached the oldest checkpoint the server retains.
|
|
180
|
+
*/
|
|
181
|
+
export interface StreamCompletionFrame {
|
|
182
|
+
$kind: 'Complete';
|
|
183
|
+
reason: 'checkpointBound' | 'indexedTip' | 'genesis' | 'retentionLimit';
|
|
184
|
+
/** Last delivered position, if there is one. */
|
|
185
|
+
resumeToken?: StreamResumeToken;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* `T` when `Frames[Key]` may be true; includes non-literal booleans. Distributes over a union of
|
|
189
|
+
* option objects, so a frame that any member enables is included.
|
|
190
|
+
*/
|
|
191
|
+
type EnabledFrame<Frames extends StreamFrameOptions, Key extends keyof StreamFrameOptions, T> = Frames extends unknown ? Key extends keyof Frames ? true extends Frames[Key] ? T : never : never : never;
|
|
192
|
+
export type StreamResult<Item, Frames extends StreamFrameOptions = {}> = Item | EnabledFrame<Frames, 'completion', StreamCompletionFrame> | EnabledFrame<Frames, 'progress', StreamProgressFrame>;
|
|
193
|
+
export type StreamCheckpointFrame<Include extends StreamCheckpointInclude = {}, Frames extends StreamFrameOptions = {}> = StreamResult<StreamCheckpoint<Include>, Frames>;
|
|
194
|
+
export type StreamTransactionFrame<Include extends TransactionInclude = {}, Frames extends StreamFrameOptions = {}> = StreamResult<StreamTransaction<Include>, Frames>;
|
|
195
|
+
export type StreamEventFrame<Frames extends StreamFrameOptions = {}> = StreamResult<StreamEvent, Frames>;
|
|
34
196
|
/** Object methods */
|
|
35
|
-
interface TransportMethods {
|
|
197
|
+
export interface TransportMethods {
|
|
36
198
|
getObjects: <Include extends ObjectInclude = {}>(options: GetObjectsOptions<Include>) => Promise<GetObjectsResponse<Include>>;
|
|
37
199
|
listOwnedObjects: <Include extends ObjectInclude = {}>(options: ListOwnedObjectsOptions<Include>) => Promise<ListOwnedObjectsResponse<Include>>;
|
|
38
200
|
listCoins: (options: ListCoinsOptions) => Promise<ListCoinsResponse>;
|
|
39
|
-
listDynamicFields: (options: ListDynamicFieldsOptions) => Promise<ListDynamicFieldsResponse
|
|
201
|
+
listDynamicFields: <Include extends DynamicFieldInclude = {}>(options: ListDynamicFieldsOptions<Include>) => Promise<ListDynamicFieldsResponse<Include>>;
|
|
40
202
|
getDynamicField: (options: GetDynamicFieldOptions) => Promise<GetDynamicFieldResponse>;
|
|
203
|
+
getAddressAliases: (options: GetAddressAliasesOptions) => Promise<GetAddressAliasesResponse>;
|
|
41
204
|
}
|
|
42
|
-
interface ObjectInclude {
|
|
205
|
+
export interface ObjectInclude {
|
|
43
206
|
/**
|
|
44
207
|
* Include the BCS-encoded Move struct content of the object.
|
|
45
208
|
*
|
|
@@ -63,7 +226,7 @@ declare namespace SuiClientTypes {
|
|
|
63
226
|
* Include the JSON representation of the object's Move struct content.
|
|
64
227
|
*
|
|
65
228
|
* **Warning:** The exact shape and field names of this data may vary between different
|
|
66
|
-
* API implementations (
|
|
229
|
+
* API implementations (gRPC or GraphQL). For consistent data across APIs,
|
|
67
230
|
* use the `content` field and parse the BCS data directly.
|
|
68
231
|
*/
|
|
69
232
|
json?: boolean;
|
|
@@ -78,54 +241,78 @@ declare namespace SuiClientTypes {
|
|
|
78
241
|
*/
|
|
79
242
|
display?: boolean;
|
|
80
243
|
}
|
|
81
|
-
interface GetObjectsOptions<Include extends ObjectInclude = {}> extends CoreClientMethodOptions {
|
|
244
|
+
export interface GetObjectsOptions<Include extends ObjectInclude = {}> extends CoreClientMethodOptions {
|
|
82
245
|
objectIds: string[];
|
|
83
246
|
include?: Include & ObjectInclude;
|
|
84
247
|
}
|
|
85
|
-
interface GetObjectOptions<Include extends ObjectInclude = {}> extends CoreClientMethodOptions {
|
|
248
|
+
export interface GetObjectOptions<Include extends ObjectInclude = {}> extends CoreClientMethodOptions {
|
|
86
249
|
objectId: string;
|
|
87
250
|
include?: Include & ObjectInclude;
|
|
88
251
|
}
|
|
89
|
-
interface ListOwnedObjectsOptions<Include extends ObjectInclude = {}> extends CoreClientMethodOptions {
|
|
252
|
+
export interface ListOwnedObjectsOptions<Include extends ObjectInclude = {}> extends CoreClientMethodOptions {
|
|
90
253
|
owner: string;
|
|
91
254
|
limit?: number;
|
|
92
255
|
cursor?: string | null;
|
|
93
256
|
type?: string;
|
|
94
257
|
include?: Include & ObjectInclude;
|
|
95
258
|
}
|
|
96
|
-
interface ListCoinsOptions extends CoreClientMethodOptions {
|
|
259
|
+
export interface ListCoinsOptions extends CoreClientMethodOptions {
|
|
97
260
|
owner: string;
|
|
98
261
|
/** Defaults to `0x2::sui::SUI` */
|
|
99
262
|
coinType?: string;
|
|
100
263
|
limit?: number;
|
|
101
264
|
cursor?: string | null;
|
|
102
265
|
}
|
|
103
|
-
interface
|
|
266
|
+
export interface DynamicFieldInclude {
|
|
267
|
+
/** Include each field's `value`. */
|
|
268
|
+
value?: boolean;
|
|
269
|
+
}
|
|
270
|
+
export interface ListDynamicFieldsOptions<Include extends DynamicFieldInclude = {}> extends CoreClientMethodOptions {
|
|
104
271
|
parentId: string;
|
|
105
272
|
limit?: number;
|
|
106
273
|
cursor?: string | null;
|
|
274
|
+
include?: Include & DynamicFieldInclude;
|
|
107
275
|
}
|
|
108
|
-
interface GetDynamicFieldOptions extends CoreClientMethodOptions {
|
|
276
|
+
export interface GetDynamicFieldOptions extends CoreClientMethodOptions {
|
|
109
277
|
parentId: string;
|
|
110
278
|
name: DynamicFieldName;
|
|
111
279
|
}
|
|
112
|
-
interface
|
|
280
|
+
export interface GetAddressAliasesOptions extends CoreClientMethodOptions {
|
|
281
|
+
address: string;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* The addresses whose signatures are accepted for `address`. An address that never enabled
|
|
285
|
+
* aliases is only its own alias.
|
|
286
|
+
*/
|
|
287
|
+
export interface AddressAliases {
|
|
288
|
+
address: string;
|
|
289
|
+
/** Whether `address` has enabled aliases, so its alias set is an object on chain. */
|
|
290
|
+
enabled: boolean;
|
|
291
|
+
/** The current alias set; `[address]` when aliases are not enabled. */
|
|
292
|
+
aliases: string[];
|
|
293
|
+
/** The ID of the alias set object, derived from `address` whether or not it exists. */
|
|
294
|
+
objectId: string;
|
|
295
|
+
}
|
|
296
|
+
export interface GetAddressAliasesResponse {
|
|
297
|
+
addressAliases: AddressAliases;
|
|
298
|
+
}
|
|
299
|
+
export interface GetObjectsResponse<out Include extends ObjectInclude = {}> {
|
|
113
300
|
objects: (Object<Include> | Error)[];
|
|
114
301
|
}
|
|
115
|
-
interface GetObjectResponse<out Include extends ObjectInclude = {}> {
|
|
302
|
+
export interface GetObjectResponse<out Include extends ObjectInclude = {}> {
|
|
116
303
|
object: Object<Include>;
|
|
117
304
|
}
|
|
118
|
-
interface ListOwnedObjectsResponse<out Include extends ObjectInclude = {}> {
|
|
305
|
+
export interface ListOwnedObjectsResponse<out Include extends ObjectInclude = {}> {
|
|
119
306
|
objects: Object<Include>[];
|
|
120
307
|
hasNextPage: boolean;
|
|
121
308
|
cursor: string | null;
|
|
122
309
|
}
|
|
123
|
-
interface ListCoinsResponse {
|
|
310
|
+
export interface ListCoinsResponse {
|
|
124
311
|
objects: Coin[];
|
|
125
312
|
hasNextPage: boolean;
|
|
126
313
|
cursor: string | null;
|
|
127
314
|
}
|
|
128
|
-
interface Object<Include extends ObjectInclude = {}> {
|
|
315
|
+
export interface Object<Include extends ObjectInclude = {}> {
|
|
129
316
|
objectId: string;
|
|
130
317
|
version: string;
|
|
131
318
|
digest: string;
|
|
@@ -146,7 +333,7 @@ declare namespace SuiClientTypes {
|
|
|
146
333
|
* The JSON representation of the object's Move struct content.
|
|
147
334
|
*
|
|
148
335
|
* **Warning:** The exact shape and field names of this data may vary between different
|
|
149
|
-
* API implementations (
|
|
336
|
+
* API implementations (gRPC or GraphQL). For consistent data across APIs use
|
|
150
337
|
* the `content` field and parse the BCS data directly.
|
|
151
338
|
*/
|
|
152
339
|
json: Include extends {
|
|
@@ -157,7 +344,7 @@ declare namespace SuiClientTypes {
|
|
|
157
344
|
display: true;
|
|
158
345
|
} ? Display | null : undefined;
|
|
159
346
|
}
|
|
160
|
-
interface Display {
|
|
347
|
+
export interface Display {
|
|
161
348
|
/**
|
|
162
349
|
* Successfully rendered display field values, keyed by field name.
|
|
163
350
|
*
|
|
@@ -169,7 +356,7 @@ declare namespace SuiClientTypes {
|
|
|
169
356
|
/** Per-field rendering errors, keyed by field name. `null` if all fields succeeded. */
|
|
170
357
|
errors: Record<string, string> | null;
|
|
171
358
|
}
|
|
172
|
-
interface Coin {
|
|
359
|
+
export interface Coin {
|
|
173
360
|
objectId: string;
|
|
174
361
|
version: string;
|
|
175
362
|
digest: string;
|
|
@@ -177,11 +364,23 @@ declare namespace SuiClientTypes {
|
|
|
177
364
|
type: string;
|
|
178
365
|
balance: string;
|
|
179
366
|
}
|
|
180
|
-
type DynamicFieldEntry = {
|
|
181
|
-
fieldId: string;
|
|
367
|
+
export type DynamicFieldEntry<Include extends DynamicFieldInclude = {}> = {
|
|
368
|
+
/** ID of the `0x2::dynamic_field::Field` object. */fieldId: string; /** Type of the `0x2::dynamic_field::Field` object. */
|
|
182
369
|
type: string;
|
|
183
370
|
name: DynamicFieldName;
|
|
371
|
+
/**
|
|
372
|
+
* Type of the value. For dynamic object fields, `listDynamicFields` reports the child object's
|
|
373
|
+
* type and `getDynamicField` reports `0x2::object::ID`.
|
|
374
|
+
*/
|
|
184
375
|
valueType: string;
|
|
376
|
+
/**
|
|
377
|
+
* The field's value; `value.type` always equals `valueType`. For dynamic object fields,
|
|
378
|
+
* `listDynamicFields` returns the child object's BCS-encoded content and `getDynamicField`
|
|
379
|
+
* the child's ID.
|
|
380
|
+
*/
|
|
381
|
+
value: Include extends {
|
|
382
|
+
value: true;
|
|
383
|
+
} ? DynamicFieldValue : undefined;
|
|
185
384
|
} & ({
|
|
186
385
|
$kind: 'DynamicField';
|
|
187
386
|
childId?: never;
|
|
@@ -189,73 +388,74 @@ declare namespace SuiClientTypes {
|
|
|
189
388
|
$kind: 'DynamicObject';
|
|
190
389
|
childId: string;
|
|
191
390
|
});
|
|
192
|
-
type DynamicField = DynamicFieldEntry
|
|
193
|
-
value:
|
|
391
|
+
export type DynamicField = DynamicFieldEntry<{
|
|
392
|
+
value: true;
|
|
393
|
+
}> & {
|
|
194
394
|
version: string;
|
|
195
395
|
digest: string;
|
|
196
396
|
previousTransaction: string | null;
|
|
197
397
|
};
|
|
198
|
-
interface ListDynamicFieldsResponse {
|
|
398
|
+
export interface ListDynamicFieldsResponse<out Include extends DynamicFieldInclude = {}> {
|
|
199
399
|
hasNextPage: boolean;
|
|
200
400
|
cursor: string | null;
|
|
201
|
-
dynamicFields: DynamicFieldEntry[];
|
|
401
|
+
dynamicFields: DynamicFieldEntry<Include>[];
|
|
202
402
|
}
|
|
203
|
-
interface GetDynamicFieldResponse {
|
|
403
|
+
export interface GetDynamicFieldResponse {
|
|
204
404
|
dynamicField: DynamicField;
|
|
205
405
|
}
|
|
206
|
-
interface GetDynamicObjectFieldOptions<Include extends ObjectInclude = {}> extends CoreClientMethodOptions {
|
|
406
|
+
export interface GetDynamicObjectFieldOptions<Include extends ObjectInclude = {}> extends CoreClientMethodOptions {
|
|
207
407
|
parentId: string;
|
|
208
408
|
name: DynamicFieldName;
|
|
209
409
|
include?: Include & ObjectInclude;
|
|
210
410
|
}
|
|
211
|
-
interface GetDynamicObjectFieldResponse<out Include extends ObjectInclude = {}> {
|
|
411
|
+
export interface GetDynamicObjectFieldResponse<out Include extends ObjectInclude = {}> {
|
|
212
412
|
object: Object<Include>;
|
|
213
413
|
}
|
|
214
|
-
interface DynamicFieldName {
|
|
414
|
+
export interface DynamicFieldName {
|
|
215
415
|
type: string;
|
|
216
416
|
bcs: Uint8Array;
|
|
217
417
|
}
|
|
218
|
-
interface DynamicFieldValue {
|
|
418
|
+
export interface DynamicFieldValue {
|
|
219
419
|
type: string;
|
|
220
420
|
bcs: Uint8Array;
|
|
221
421
|
}
|
|
222
422
|
/** Balance methods */
|
|
223
|
-
interface TransportMethods {
|
|
423
|
+
export interface TransportMethods {
|
|
224
424
|
getBalance: (options: GetBalanceOptions) => Promise<GetBalanceResponse>;
|
|
225
425
|
listBalances: (options: ListBalancesOptions) => Promise<ListBalancesResponse>;
|
|
226
426
|
}
|
|
227
|
-
interface GetBalanceOptions extends CoreClientMethodOptions {
|
|
427
|
+
export interface GetBalanceOptions extends CoreClientMethodOptions {
|
|
228
428
|
owner: string;
|
|
229
429
|
/** Defaults to `0x2::sui::SUI` */
|
|
230
430
|
coinType?: string;
|
|
231
431
|
}
|
|
232
|
-
interface Balance {
|
|
432
|
+
export interface Balance {
|
|
233
433
|
coinType: string;
|
|
234
434
|
balance: string;
|
|
235
435
|
coinBalance: string;
|
|
236
436
|
addressBalance: string;
|
|
237
437
|
}
|
|
238
|
-
interface GetBalanceResponse {
|
|
438
|
+
export interface GetBalanceResponse {
|
|
239
439
|
balance: Balance;
|
|
240
440
|
}
|
|
241
|
-
interface ListBalancesOptions extends CoreClientMethodOptions {
|
|
441
|
+
export interface ListBalancesOptions extends CoreClientMethodOptions {
|
|
242
442
|
owner: string;
|
|
243
443
|
limit?: number;
|
|
244
444
|
cursor?: string | null;
|
|
245
445
|
}
|
|
246
|
-
interface ListBalancesResponse {
|
|
446
|
+
export interface ListBalancesResponse {
|
|
247
447
|
balances: Balance[];
|
|
248
448
|
hasNextPage: boolean;
|
|
249
449
|
cursor: string | null;
|
|
250
450
|
}
|
|
251
451
|
/** Coin metadata methods */
|
|
252
|
-
interface TransportMethods {
|
|
452
|
+
export interface TransportMethods {
|
|
253
453
|
getCoinMetadata: (options: GetCoinMetadataOptions) => Promise<GetCoinMetadataResponse>;
|
|
254
454
|
}
|
|
255
|
-
interface GetCoinMetadataOptions extends CoreClientMethodOptions {
|
|
455
|
+
export interface GetCoinMetadataOptions extends CoreClientMethodOptions {
|
|
256
456
|
coinType: string;
|
|
257
457
|
}
|
|
258
|
-
interface CoinMetadata {
|
|
458
|
+
export interface CoinMetadata {
|
|
259
459
|
id: string | null;
|
|
260
460
|
decimals: number;
|
|
261
461
|
name: string;
|
|
@@ -263,18 +463,20 @@ declare namespace SuiClientTypes {
|
|
|
263
463
|
description: string;
|
|
264
464
|
iconUrl: string | null;
|
|
265
465
|
}
|
|
266
|
-
interface GetCoinMetadataResponse {
|
|
466
|
+
export interface GetCoinMetadataResponse {
|
|
267
467
|
coinMetadata: CoinMetadata | null;
|
|
268
468
|
}
|
|
269
469
|
/** Transaction methods */
|
|
270
|
-
interface TransportMethods {
|
|
470
|
+
export interface TransportMethods {
|
|
271
471
|
getTransaction: <Include extends TransactionInclude = {}>(options: GetTransactionOptions<Include>) => Promise<TransactionResult<Include>>;
|
|
272
472
|
executeTransaction: <Include extends TransactionInclude = {}>(options: ExecuteTransactionOptions<Include>) => Promise<TransactionResult<Include>>;
|
|
273
473
|
simulateTransaction: <Include extends SimulateTransactionInclude = {}>(options: SimulateTransactionOptions<Include>) => Promise<SimulateTransactionResult<Include>>;
|
|
274
474
|
resolveTransactionPlugin: () => TransactionPlugin;
|
|
275
475
|
}
|
|
276
|
-
interface Transaction<out Include extends TransactionInclude = {}> {
|
|
476
|
+
export interface Transaction<out Include extends TransactionInclude = {}> {
|
|
277
477
|
digest: string;
|
|
478
|
+
/** The address that sent the transaction: `0x0` for system transactions. */
|
|
479
|
+
sender: string;
|
|
278
480
|
signatures: string[];
|
|
279
481
|
epoch: string | null;
|
|
280
482
|
/**
|
|
@@ -307,7 +509,7 @@ declare namespace SuiClientTypes {
|
|
|
307
509
|
bcs: true;
|
|
308
510
|
} ? Uint8Array : undefined;
|
|
309
511
|
}
|
|
310
|
-
type TransactionResult<Include extends TransactionInclude = {}> = {
|
|
512
|
+
export type TransactionResult<Include extends TransactionInclude = {}> = {
|
|
311
513
|
$kind: 'Transaction';
|
|
312
514
|
Transaction: Transaction<Include>;
|
|
313
515
|
FailedTransaction?: never;
|
|
@@ -316,7 +518,7 @@ declare namespace SuiClientTypes {
|
|
|
316
518
|
Transaction?: never;
|
|
317
519
|
FailedTransaction: Transaction<Include>;
|
|
318
520
|
};
|
|
319
|
-
type SimulateTransactionResult<Include extends SimulateTransactionInclude = {}> = {
|
|
521
|
+
export type SimulateTransactionResult<Include extends SimulateTransactionInclude = {}> = {
|
|
320
522
|
$kind: 'Transaction';
|
|
321
523
|
Transaction: Transaction<Include>;
|
|
322
524
|
FailedTransaction?: never;
|
|
@@ -347,7 +549,7 @@ declare namespace SuiClientTypes {
|
|
|
347
549
|
*/
|
|
348
550
|
gasPaymentMocked: boolean;
|
|
349
551
|
};
|
|
350
|
-
interface TransactionInclude {
|
|
552
|
+
export interface TransactionInclude {
|
|
351
553
|
/** Include balance changes caused by the transaction. */
|
|
352
554
|
balanceChanges?: boolean;
|
|
353
555
|
/** Include parsed transaction effects (gas used, changed objects, status, etc.). */
|
|
@@ -355,8 +557,8 @@ declare namespace SuiClientTypes {
|
|
|
355
557
|
/**
|
|
356
558
|
* Include events emitted by the transaction.
|
|
357
559
|
*
|
|
358
|
-
* On the GraphQL transport,
|
|
359
|
-
*
|
|
560
|
+
* On the GraphQL transport, `executeTransaction` and `simulateTransaction` return at most
|
|
561
|
+
* the first 50 events of a transaction; gRPC returns the full event list.
|
|
360
562
|
*/
|
|
361
563
|
events?: boolean;
|
|
362
564
|
/** Include a map of object IDs to their types for all changed objects. */
|
|
@@ -366,35 +568,97 @@ declare namespace SuiClientTypes {
|
|
|
366
568
|
/** Include the raw BCS-encoded transaction bytes. */
|
|
367
569
|
bcs?: boolean;
|
|
368
570
|
}
|
|
369
|
-
interface SimulateTransactionInclude extends TransactionInclude {
|
|
571
|
+
export interface SimulateTransactionInclude extends TransactionInclude {
|
|
370
572
|
/** Include return values and mutated references from each command (simulation only). */
|
|
371
573
|
commandResults?: boolean;
|
|
372
574
|
}
|
|
373
|
-
interface CommandResult {
|
|
575
|
+
export interface CommandResult {
|
|
374
576
|
returnValues: CommandOutput[];
|
|
375
577
|
mutatedReferences: CommandOutput[];
|
|
376
578
|
}
|
|
377
|
-
interface CommandOutput {
|
|
579
|
+
export interface CommandOutput {
|
|
378
580
|
bcs: Uint8Array;
|
|
379
581
|
}
|
|
380
|
-
interface BalanceChange {
|
|
582
|
+
export interface BalanceChange {
|
|
381
583
|
coinType: string;
|
|
382
584
|
address: string;
|
|
383
585
|
amount: string;
|
|
384
586
|
}
|
|
385
|
-
|
|
386
|
-
interface
|
|
587
|
+
/** Ledger transaction data. Narrow `kind.$kind` to read the transaction's payload. */
|
|
588
|
+
export interface TransactionData {
|
|
589
|
+
version: 2;
|
|
590
|
+
sender: string;
|
|
591
|
+
gasData: GasData;
|
|
592
|
+
expiration: TransactionExpiration | null;
|
|
593
|
+
/**
|
|
594
|
+
* The inputs of a `ProgrammableTransaction` or `ProgrammableSystemTransaction` kind; empty for
|
|
595
|
+
* every other kind.
|
|
596
|
+
*/
|
|
597
|
+
inputs: TransactionInput[];
|
|
598
|
+
/**
|
|
599
|
+
* The commands of a `ProgrammableTransaction` or `ProgrammableSystemTransaction` kind; empty
|
|
600
|
+
* for every other kind.
|
|
601
|
+
*/
|
|
602
|
+
commands: TransactionCommand[];
|
|
603
|
+
kind: TransactionKind;
|
|
604
|
+
}
|
|
605
|
+
export interface GasData {
|
|
606
|
+
budget: string;
|
|
607
|
+
price: string;
|
|
608
|
+
owner: string;
|
|
609
|
+
payment: {
|
|
610
|
+
objectId: string;
|
|
611
|
+
version: string;
|
|
612
|
+
digest: string;
|
|
613
|
+
}[];
|
|
614
|
+
}
|
|
615
|
+
export type TransactionExpiration = NonNullable<TransactionData$1['expiration']>;
|
|
616
|
+
/** A kind this SDK cannot fully map, inputs and commands included, is `Unknown`. */
|
|
617
|
+
export type TransactionKind = EnumOutputShape<{ [Kind in BcsTransactionKind['$kind'] | 'Unknown']: Kind extends 'Unknown' ? true : Kind extends 'ProgrammableTransaction' | 'ProgrammableSystemTransaction' ? ProgrammableTransaction : Kind extends 'EndOfEpochTransaction' ? EndOfEpochTransactionKind[] : Kind extends 'Genesis' ? {
|
|
618
|
+
objects: GenesisObject[];
|
|
619
|
+
} : NonNullable<BcsTransactionKind[Exclude<Kind, 'Unknown'>]> }>;
|
|
620
|
+
export interface ProgrammableTransaction {
|
|
621
|
+
inputs: TransactionInput[];
|
|
622
|
+
commands: TransactionCommand[];
|
|
623
|
+
}
|
|
624
|
+
/** A resolved input; transactions on chain never contain unresolved inputs. */
|
|
625
|
+
export type TransactionInput = Exclude<CallArg, {
|
|
626
|
+
$kind: 'UnresolvedPure' | 'UnresolvedObject';
|
|
627
|
+
}>;
|
|
628
|
+
/** A command; transactions on chain never contain intents. */
|
|
629
|
+
export type TransactionCommand = Exclude<Command, {
|
|
630
|
+
$kind: '$Intent';
|
|
631
|
+
}>;
|
|
632
|
+
export type ActiveJwk = NonNullable<TransactionKind['AuthenticatorStateUpdate']>['newActiveJwks'][number];
|
|
633
|
+
/** An end-of-epoch operation; ones this SDK version does not recognize are `Unknown`. */
|
|
634
|
+
export type EndOfEpochTransactionKind = EnumOutputShape<{ [Kind in BcsEndOfEpochTransactionKind['$kind'] | 'Unknown']: Kind extends 'Unknown' ? true : Kind extends 'BridgeStateCreate' ? BridgeStateCreate : NonNullable<BcsEndOfEpochTransactionKind[Exclude<Kind, 'Unknown'>]> }>;
|
|
635
|
+
/** An object created by the genesis transaction. */
|
|
636
|
+
export interface GenesisObject {
|
|
637
|
+
objectId: string;
|
|
638
|
+
version: string;
|
|
639
|
+
owner: ObjectOwner;
|
|
640
|
+
/** The object's Move type, or `package` for a package. */
|
|
641
|
+
type: string;
|
|
642
|
+
}
|
|
643
|
+
export interface BridgeStateCreate {
|
|
644
|
+
/**
|
|
645
|
+
* The chain identifier the bridge was created for: the first 4 bytes of the genesis
|
|
646
|
+
* checkpoint digest, hex encoded.
|
|
647
|
+
*/
|
|
648
|
+
chainId: string;
|
|
649
|
+
}
|
|
650
|
+
export interface GetTransactionOptions<Include extends TransactionInclude = {}> extends CoreClientMethodOptions {
|
|
387
651
|
digest: string;
|
|
388
652
|
include?: Include & TransactionInclude;
|
|
389
653
|
}
|
|
390
|
-
type WaitForTransactionOptions<Include extends TransactionInclude = {}> = WaitForTransactionByDigest<Include> | WaitForTransactionByResult<Include>;
|
|
391
|
-
interface WaitForTransactionByDigest<Include extends TransactionInclude = {}> extends GetTransactionOptions<Include> {
|
|
654
|
+
export type WaitForTransactionOptions<Include extends TransactionInclude = {}> = WaitForTransactionByDigest<Include> | WaitForTransactionByResult<Include>;
|
|
655
|
+
export interface WaitForTransactionByDigest<Include extends TransactionInclude = {}> extends GetTransactionOptions<Include> {
|
|
392
656
|
timeout?: number;
|
|
393
657
|
/** Absolute times (ms from start) to poll, e.g. [0, 300, 600, 1500]. After exhausted, repeats the last interval. */
|
|
394
658
|
pollSchedule?: number[];
|
|
395
659
|
result?: never;
|
|
396
660
|
}
|
|
397
|
-
interface WaitForTransactionByResult<Include extends TransactionInclude = {}> extends CoreClientMethodOptions {
|
|
661
|
+
export interface WaitForTransactionByResult<Include extends TransactionInclude = {}> extends CoreClientMethodOptions {
|
|
398
662
|
result: TransactionResult<any>;
|
|
399
663
|
include?: Include & TransactionInclude;
|
|
400
664
|
timeout?: number;
|
|
@@ -402,18 +666,18 @@ declare namespace SuiClientTypes {
|
|
|
402
666
|
pollSchedule?: number[];
|
|
403
667
|
digest?: never;
|
|
404
668
|
}
|
|
405
|
-
interface ExecuteTransactionOptions<Include extends TransactionInclude = {}> extends CoreClientMethodOptions {
|
|
669
|
+
export interface ExecuteTransactionOptions<Include extends TransactionInclude = {}> extends CoreClientMethodOptions {
|
|
406
670
|
transaction: Uint8Array;
|
|
407
671
|
signatures: string[];
|
|
408
672
|
include?: Include & TransactionInclude;
|
|
409
673
|
}
|
|
410
|
-
interface SignAndExecuteTransactionOptions<Include extends TransactionInclude = {}> extends CoreClientMethodOptions {
|
|
674
|
+
export interface SignAndExecuteTransactionOptions<Include extends TransactionInclude = {}> extends CoreClientMethodOptions {
|
|
411
675
|
transaction: Uint8Array | Transaction$1;
|
|
412
676
|
signer: Signer;
|
|
413
677
|
additionalSignatures?: string[];
|
|
414
678
|
include?: Include & TransactionInclude;
|
|
415
679
|
}
|
|
416
|
-
interface SimulateTransactionOptions<Include extends SimulateTransactionInclude = {}> extends CoreClientMethodOptions {
|
|
680
|
+
export interface SimulateTransactionOptions<Include extends SimulateTransactionInclude = {}> extends CoreClientMethodOptions {
|
|
417
681
|
transaction: Uint8Array | Transaction$1;
|
|
418
682
|
include?: Include & SimulateTransactionInclude;
|
|
419
683
|
/**
|
|
@@ -425,19 +689,41 @@ declare namespace SuiClientTypes {
|
|
|
425
689
|
* Defaults to `true` (checks enabled).
|
|
426
690
|
*/
|
|
427
691
|
checksEnabled?: boolean;
|
|
692
|
+
/**
|
|
693
|
+
* Whether the server selects the sender's real gas payment during simulation. When
|
|
694
|
+
* disabled, a transaction without gas coins may be simulated with a mocked gas coin
|
|
695
|
+
* (reported as `gasPaymentMocked`). Ignored when `checksEnabled` is `false`.
|
|
696
|
+
*
|
|
697
|
+
* @default `true` when the gas payment is set to `[]`, otherwise `false`
|
|
698
|
+
*/
|
|
699
|
+
doGasSelection?: boolean;
|
|
428
700
|
}
|
|
429
701
|
/** Query methods */
|
|
430
|
-
interface TransportMethods {
|
|
702
|
+
export interface TransportMethods {
|
|
431
703
|
listTransactions: <Include extends TransactionInclude = {}>(options: ListTransactionsOptions<Include>) => Promise<ListTransactionsResponse<Include>>;
|
|
432
704
|
listEvents: (options: ListEventsOptions) => Promise<ListEventsResponse>;
|
|
705
|
+
listCheckpoints: (options: ListCheckpointsOptions) => Promise<ListCheckpointsResponse>;
|
|
433
706
|
}
|
|
434
707
|
/**
|
|
435
|
-
* A filter matching transactions.
|
|
708
|
+
* A filter matching transactions. Every specified predicate must match (predicates are
|
|
709
|
+
* ANDed), and an empty filter matches every transaction.
|
|
436
710
|
*
|
|
437
|
-
*
|
|
711
|
+
* At most one of `affectedAddress`, `affectedObject`, or `function` may be specified;
|
|
712
|
+
* `sender` can be combined with any of them.
|
|
438
713
|
*/
|
|
439
|
-
type TransactionFilter = {
|
|
440
|
-
/** Match transactions sent by this address. */sender
|
|
714
|
+
export type TransactionFilter = {
|
|
715
|
+
/** Match transactions sent by this address. */sender?: string;
|
|
716
|
+
} & ({
|
|
717
|
+
/**
|
|
718
|
+
* Match transactions this address sent or paid gas for, or that changed objects it owned
|
|
719
|
+
* before or owns after the transaction, or its address balance.
|
|
720
|
+
*/
|
|
721
|
+
affectedAddress: string;
|
|
722
|
+
affectedObject?: never;
|
|
723
|
+
function?: never;
|
|
724
|
+
} | {
|
|
725
|
+
/** Match transactions whose effects include a change to this object. */affectedObject: string;
|
|
726
|
+
affectedAddress?: never;
|
|
441
727
|
function?: never;
|
|
442
728
|
} | {
|
|
443
729
|
/**
|
|
@@ -446,73 +732,96 @@ declare namespace SuiClientTypes {
|
|
|
446
732
|
* `package::module::function`.
|
|
447
733
|
*/
|
|
448
734
|
function: string;
|
|
449
|
-
|
|
450
|
-
|
|
735
|
+
affectedAddress?: never;
|
|
736
|
+
affectedObject?: never;
|
|
737
|
+
} | {
|
|
738
|
+
affectedAddress?: never;
|
|
739
|
+
affectedObject?: never;
|
|
740
|
+
function?: never;
|
|
741
|
+
});
|
|
451
742
|
/**
|
|
452
|
-
* A filter matching events.
|
|
743
|
+
* A filter matching events. Every specified predicate must match (predicates are ANDed),
|
|
744
|
+
* and an empty filter matches every event.
|
|
453
745
|
*
|
|
454
|
-
*
|
|
455
|
-
* JSON-RPC transport, an `eventType` naming a generic type must include type arguments —
|
|
456
|
-
* a bare generic name (e.g. `0xpkg::mod::Event` for events of type `0xpkg::mod::Event<T>`)
|
|
457
|
-
* matches any instantiation on gRPC and GraphQL, but matches nothing on JSON-RPC, which
|
|
458
|
-
* compares the full type for exact equality.
|
|
746
|
+
* `emitModule` and `eventType` cannot be combined; `sender` can be combined with either.
|
|
459
747
|
*/
|
|
460
|
-
type EventFilter = {
|
|
461
|
-
/** Match events emitted by transactions sent by this address. */sender
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
748
|
+
export type EventFilter = {
|
|
749
|
+
/** Match events emitted by transactions sent by this address. */sender?: string;
|
|
750
|
+
} & ({
|
|
751
|
+
/**
|
|
752
|
+
* Match events emitted by a module, specified as `package` (any module in the
|
|
753
|
+
* package) or `package::module`.
|
|
754
|
+
*/
|
|
755
|
+
emitModule: string;
|
|
467
756
|
eventType?: never;
|
|
468
757
|
} | {
|
|
469
758
|
/**
|
|
470
|
-
* Match events by type:
|
|
471
|
-
* module (`package::module`), or events with a fully qualified type
|
|
472
|
-
*
|
|
759
|
+
* Match events by type: every event whose type is defined in a package (`package`)
|
|
760
|
+
* or module (`package::module`), or events with a fully qualified type name
|
|
761
|
+
* (`package::module::Name` or `package::module::Name<T1, T2>`).
|
|
473
762
|
*
|
|
474
763
|
* A bare generic name (`package::module::Name` without type arguments) matches
|
|
475
|
-
* any instantiation
|
|
476
|
-
*
|
|
764
|
+
* any instantiation, while a name with type arguments only matches that exact
|
|
765
|
+
* instantiation.
|
|
477
766
|
*/
|
|
478
767
|
eventType: string;
|
|
479
|
-
sender?: never;
|
|
480
768
|
emitModule?: never;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
|
|
769
|
+
} | {
|
|
770
|
+
emitModule?: never;
|
|
771
|
+
eventType?: never;
|
|
772
|
+
});
|
|
773
|
+
/** A checkpoint sequence number. */
|
|
774
|
+
export type CheckpointNumber = string | number | bigint;
|
|
775
|
+
/** Pagination and range options shared by the ledger query methods. */
|
|
776
|
+
export interface LedgerQueryOptions extends CoreClientMethodOptions {
|
|
484
777
|
/**
|
|
485
778
|
* Maximum number of items to return. Defaults to 50.
|
|
486
779
|
*
|
|
487
780
|
* Servers cap page sizes (50 by default): values above the server's cap cause the
|
|
488
|
-
* GraphQL
|
|
489
|
-
*
|
|
781
|
+
* GraphQL transport to throw, while gRPC servers silently truncate the page to their
|
|
782
|
+
* configured maximum.
|
|
490
783
|
*/
|
|
491
784
|
limit?: number;
|
|
492
785
|
/**
|
|
493
|
-
* Return items strictly after this cursor in ledger order
|
|
494
|
-
* an ascending page, or the `startCursor` of a descending
|
|
495
|
-
*
|
|
786
|
+
* Return items strictly after this cursor in ledger order, regardless of `order`.
|
|
787
|
+
* Usually the `endCursor` of an ascending page, or the `startCursor` of a descending
|
|
788
|
+
* page to poll for new items. Can be combined with `before` to read a window.
|
|
789
|
+
*
|
|
790
|
+
* Cursors are only valid for the query that produced them: pass them back with the same
|
|
791
|
+
* filter and checkpoint range.
|
|
496
792
|
*/
|
|
497
793
|
after?: string | null;
|
|
498
794
|
/**
|
|
499
|
-
* Return items strictly before this cursor in ledger order
|
|
500
|
-
* a descending page
|
|
501
|
-
*
|
|
795
|
+
* Return items strictly before this cursor in ledger order, regardless of `order`.
|
|
796
|
+
* Usually the `endCursor` of a descending page. Can be combined with `after` to read a
|
|
797
|
+
* window.
|
|
502
798
|
*/
|
|
503
799
|
before?: string | null;
|
|
504
|
-
/**
|
|
505
|
-
|
|
506
|
-
|
|
800
|
+
/**
|
|
801
|
+
* Order of returned results. Defaults to `descending` when only `before` is provided,
|
|
802
|
+
* and `ascending` (oldest first) otherwise.
|
|
803
|
+
*/
|
|
804
|
+
order?: Order;
|
|
805
|
+
/**
|
|
806
|
+
* Only return items from checkpoints at or after this sequence number (inclusive).
|
|
807
|
+
* Intersects with `after`/`before`.
|
|
808
|
+
*/
|
|
809
|
+
startCheckpoint?: CheckpointNumber;
|
|
810
|
+
/**
|
|
811
|
+
* Only return items from checkpoints before this sequence number (exclusive). Must not
|
|
812
|
+
* be less than `startCheckpoint`. Intersects with `after`/`before`.
|
|
813
|
+
*/
|
|
814
|
+
endCheckpoint?: CheckpointNumber;
|
|
507
815
|
}
|
|
508
|
-
|
|
509
|
-
|
|
816
|
+
/** Pagination fields shared by `listTransactions`, `listEvents` and `listCheckpoints`. */
|
|
817
|
+
export interface LedgerQueryResponse {
|
|
510
818
|
/**
|
|
511
819
|
* Whether more items may be available after this page.
|
|
512
820
|
*
|
|
513
|
-
*
|
|
514
|
-
* query can return fewer items than `limit` (even none) with
|
|
515
|
-
* continuing from `endCursor` always makes progress through the
|
|
821
|
+
* Servers can bound how much of the ledger a single request scans, on gRPC and GraphQL
|
|
822
|
+
* alike, so a query can return fewer items than `limit` (even none) with
|
|
823
|
+
* `hasNextPage: true`; continuing from `endCursor` always makes progress through the
|
|
824
|
+
* scanned range.
|
|
516
825
|
*/
|
|
517
826
|
hasNextPage: boolean;
|
|
518
827
|
/**
|
|
@@ -521,106 +830,86 @@ declare namespace SuiClientTypes {
|
|
|
521
830
|
*/
|
|
522
831
|
startCursor: string | null;
|
|
523
832
|
/**
|
|
524
|
-
*
|
|
525
|
-
*
|
|
833
|
+
* Position to continue from: the last returned item on a final page, otherwise the
|
|
834
|
+
* server's scan position, which can be past the last item or set on an empty page.
|
|
835
|
+
* Continue the query by passing it as `after` (ascending) or `before` (descending).
|
|
836
|
+
* When paging a window (`after` + `before`),
|
|
837
|
+
* keep the fixed bound and replace the moving one with `endCursor`.
|
|
526
838
|
*/
|
|
527
839
|
endCursor: string | null;
|
|
528
840
|
}
|
|
529
|
-
interface
|
|
841
|
+
export interface ListTransactionsOptions<Include extends TransactionInclude = {}> extends LedgerQueryOptions {
|
|
842
|
+
filter?: TransactionFilter;
|
|
843
|
+
include?: Include & TransactionInclude;
|
|
844
|
+
}
|
|
845
|
+
export interface ListTransactionsResponse<out Include extends TransactionInclude = {}> extends LedgerQueryResponse {
|
|
846
|
+
transactions: TransactionResult<Include>[];
|
|
847
|
+
}
|
|
848
|
+
export interface ListEventsOptions extends LedgerQueryOptions {
|
|
530
849
|
filter?: EventFilter;
|
|
531
|
-
/**
|
|
532
|
-
* Maximum number of items to return. Defaults to 50.
|
|
533
|
-
*
|
|
534
|
-
* Servers cap page sizes (50 by default): values above the server's cap cause the
|
|
535
|
-
* GraphQL and JSON-RPC transports to throw, while gRPC servers silently truncate
|
|
536
|
-
* the page to their configured maximum.
|
|
537
|
-
*/
|
|
538
|
-
limit?: number;
|
|
539
|
-
/**
|
|
540
|
-
* Return items strictly after this cursor in ledger order (usually the `endCursor` of
|
|
541
|
-
* an ascending page, or the `startCursor` of a descending page to poll for new items).
|
|
542
|
-
* Implies `order: 'ascending'`, and cannot be combined with `before`.
|
|
543
|
-
*/
|
|
544
|
-
after?: string | null;
|
|
545
|
-
/**
|
|
546
|
-
* Return items strictly before this cursor in ledger order (usually the `endCursor` of
|
|
547
|
-
* a descending page). Implies `order: 'descending'`, and cannot be combined with
|
|
548
|
-
* `after`.
|
|
549
|
-
*/
|
|
550
|
-
before?: string | null;
|
|
551
|
-
/** Order of returned results. Defaults to `ascending` (oldest first). */
|
|
552
|
-
order?: 'ascending' | 'descending';
|
|
553
850
|
}
|
|
554
851
|
/** An event returned from a query, along with its position in the ledger. */
|
|
555
|
-
interface EventEntry extends Event {
|
|
556
|
-
/**
|
|
557
|
-
|
|
558
|
-
*
|
|
559
|
-
* `null` on the JSON-RPC transport, which does not expose checkpoint
|
|
560
|
-
* information for queried events.
|
|
561
|
-
*/
|
|
562
|
-
checkpoint: string | null;
|
|
852
|
+
export interface EventEntry extends Event {
|
|
853
|
+
/** The sequence number of the checkpoint containing the emitting transaction. */
|
|
854
|
+
checkpoint: string;
|
|
563
855
|
/** The digest of the transaction that emitted this event. */
|
|
564
856
|
transactionDigest: string;
|
|
565
857
|
/** The index of this event within its transaction's event list. */
|
|
566
858
|
eventIndex: number;
|
|
567
859
|
}
|
|
568
|
-
interface ListEventsResponse {
|
|
860
|
+
export interface ListEventsResponse extends LedgerQueryResponse {
|
|
569
861
|
events: EventEntry[];
|
|
570
|
-
/**
|
|
571
|
-
* Whether more items may be available after this page.
|
|
572
|
-
*
|
|
573
|
-
* gRPC servers bound how much of the ledger a single request scans, so a scan-limited
|
|
574
|
-
* query can return fewer items than `limit` (even none) with `hasNextPage: true`;
|
|
575
|
-
* continuing from `endCursor` always makes progress through the scanned range.
|
|
576
|
-
*/
|
|
577
|
-
hasNextPage: boolean;
|
|
578
|
-
/**
|
|
579
|
-
* Cursor at the first returned item. After a descending read of the most recent
|
|
580
|
-
* items, pass as `after` to poll for items added since.
|
|
581
|
-
*/
|
|
582
|
-
startCursor: string | null;
|
|
583
|
-
/**
|
|
584
|
-
* Cursor at the last returned item. Continue the query by passing it as `after`
|
|
585
|
-
* (ascending) or `before` (descending).
|
|
586
|
-
*/
|
|
587
|
-
endCursor: string | null;
|
|
588
862
|
}
|
|
589
|
-
interface
|
|
590
|
-
|
|
863
|
+
export interface ListCheckpointsOptions extends LedgerQueryOptions {}
|
|
864
|
+
/** A checkpoint summary. */
|
|
865
|
+
export interface Checkpoint {
|
|
866
|
+
/** The checkpoint's sequence number. */
|
|
867
|
+
sequenceNumber: string;
|
|
868
|
+
/** The digest of the checkpoint summary. */
|
|
869
|
+
digest: string;
|
|
870
|
+
/** The epoch the checkpoint belongs to. */
|
|
871
|
+
epoch: string;
|
|
872
|
+
/** The checkpoint's timestamp, in milliseconds since the Unix epoch. */
|
|
873
|
+
timestampMs: number;
|
|
874
|
+
}
|
|
875
|
+
export interface ListCheckpointsResponse extends LedgerQueryResponse {
|
|
876
|
+
checkpoints: Checkpoint[];
|
|
877
|
+
}
|
|
878
|
+
export interface GetReferenceGasPriceOptions extends CoreClientMethodOptions {}
|
|
879
|
+
export interface TransportMethods {
|
|
591
880
|
getReferenceGasPrice?: (options?: GetReferenceGasPriceOptions) => Promise<GetReferenceGasPriceResponse>;
|
|
592
881
|
}
|
|
593
|
-
interface GetReferenceGasPriceResponse {
|
|
882
|
+
export interface GetReferenceGasPriceResponse {
|
|
594
883
|
referenceGasPrice: string;
|
|
595
884
|
}
|
|
596
|
-
interface GetCurrentSystemStateOptions extends CoreClientMethodOptions {}
|
|
597
|
-
interface TransportMethods {
|
|
885
|
+
export interface GetCurrentSystemStateOptions extends CoreClientMethodOptions {}
|
|
886
|
+
export interface TransportMethods {
|
|
598
887
|
getCurrentSystemState?: (options?: GetCurrentSystemStateOptions) => Promise<GetCurrentSystemStateResponse>;
|
|
599
888
|
}
|
|
600
|
-
interface GetCurrentSystemStateResponse {
|
|
889
|
+
export interface GetCurrentSystemStateResponse {
|
|
601
890
|
systemState: SystemStateInfo;
|
|
602
891
|
}
|
|
603
|
-
interface GetProtocolConfigOptions extends CoreClientMethodOptions {}
|
|
604
|
-
interface TransportMethods {
|
|
892
|
+
export interface GetProtocolConfigOptions extends CoreClientMethodOptions {}
|
|
893
|
+
export interface TransportMethods {
|
|
605
894
|
getProtocolConfig?: (options?: GetProtocolConfigOptions) => Promise<GetProtocolConfigResponse>;
|
|
606
895
|
}
|
|
607
|
-
interface GetProtocolConfigResponse {
|
|
896
|
+
export interface GetProtocolConfigResponse {
|
|
608
897
|
protocolConfig: ProtocolConfig;
|
|
609
898
|
}
|
|
610
|
-
interface ProtocolConfig {
|
|
899
|
+
export interface ProtocolConfig {
|
|
611
900
|
protocolVersion: string;
|
|
612
901
|
featureFlags: Record<string, boolean>;
|
|
613
902
|
attributes: Record<string, string | null>;
|
|
614
903
|
}
|
|
615
|
-
interface GetChainIdentifierOptions extends CoreClientMethodOptions {}
|
|
616
|
-
interface TransportMethods {
|
|
904
|
+
export interface GetChainIdentifierOptions extends CoreClientMethodOptions {}
|
|
905
|
+
export interface TransportMethods {
|
|
617
906
|
getChainIdentifier?: (options?: GetChainIdentifierOptions) => Promise<GetChainIdentifierResponse>;
|
|
618
907
|
}
|
|
619
908
|
/** The 32-byte genesis checkpoint digest (uniquely identifies the network), base58 encoded. */
|
|
620
|
-
interface GetChainIdentifierResponse {
|
|
909
|
+
export interface GetChainIdentifierResponse {
|
|
621
910
|
chainIdentifier: string;
|
|
622
911
|
}
|
|
623
|
-
interface SystemStateInfo {
|
|
912
|
+
export interface SystemStateInfo {
|
|
624
913
|
systemStateVersion: string;
|
|
625
914
|
epoch: string;
|
|
626
915
|
protocolVersion: string;
|
|
@@ -635,7 +924,7 @@ declare namespace SuiClientTypes {
|
|
|
635
924
|
storageFund: StorageFund;
|
|
636
925
|
stakeSubsidy: StakeSubsidy;
|
|
637
926
|
}
|
|
638
|
-
interface SystemParameters {
|
|
927
|
+
export interface SystemParameters {
|
|
639
928
|
epochDurationMs: string;
|
|
640
929
|
stakeSubsidyStartEpoch: string;
|
|
641
930
|
maxValidatorCount: string;
|
|
@@ -643,76 +932,107 @@ declare namespace SuiClientTypes {
|
|
|
643
932
|
validatorLowStakeThreshold: string;
|
|
644
933
|
validatorLowStakeGracePeriod: string;
|
|
645
934
|
}
|
|
646
|
-
interface StorageFund {
|
|
935
|
+
export interface StorageFund {
|
|
647
936
|
totalObjectStorageRebates: string;
|
|
648
937
|
nonRefundableBalance: string;
|
|
649
938
|
}
|
|
650
|
-
interface StakeSubsidy {
|
|
939
|
+
export interface StakeSubsidy {
|
|
651
940
|
balance: string;
|
|
652
941
|
distributionCounter: string;
|
|
653
942
|
currentDistributionAmount: string;
|
|
654
943
|
stakeSubsidyPeriodLength: string;
|
|
655
944
|
stakeSubsidyDecreaseRate: number;
|
|
656
945
|
}
|
|
946
|
+
/** Signature verification methods */
|
|
947
|
+
export interface VerifySignatureBaseOptions extends CoreClientMethodOptions {
|
|
948
|
+
/** The serialized signature (flag, signature and public key), Base64. */
|
|
949
|
+
signature: string;
|
|
950
|
+
/** The account the signature must be valid for. */
|
|
951
|
+
address: string;
|
|
952
|
+
/**
|
|
953
|
+
* Accept a signature from any of `address`'s current address aliases, not only from `address`
|
|
954
|
+
* itself. Defaults to `true`.
|
|
955
|
+
*/
|
|
956
|
+
checkAddressAliases?: boolean;
|
|
957
|
+
}
|
|
958
|
+
export type VerifySignatureOptions = VerifySignatureBaseOptions & ({
|
|
959
|
+
/** The signed personal message; a string is UTF-8 encoded. */personalMessage: Uint8Array | string;
|
|
960
|
+
transaction?: never;
|
|
961
|
+
} | {
|
|
962
|
+
/** The signed BCS `TransactionData` bytes. */transaction: Uint8Array;
|
|
963
|
+
personalMessage?: never;
|
|
964
|
+
});
|
|
965
|
+
export interface VerifySignatureResponse {
|
|
966
|
+
valid: boolean;
|
|
967
|
+
/** Why verification failed, for logs. The text differs by transport, so don't match on it. */
|
|
968
|
+
reason?: string;
|
|
969
|
+
}
|
|
970
|
+
export interface TransportMethods {
|
|
971
|
+
verifySignature: (options: VerifySignatureOptions) => Promise<VerifySignatureResponse>;
|
|
972
|
+
}
|
|
657
973
|
/** ZkLogin methods */
|
|
658
|
-
interface VerifyZkLoginSignatureOptions extends CoreClientMethodOptions {
|
|
974
|
+
export interface VerifyZkLoginSignatureOptions extends CoreClientMethodOptions {
|
|
659
975
|
bytes: string;
|
|
660
976
|
signature: string;
|
|
661
977
|
intentScope: 'TransactionData' | 'PersonalMessage';
|
|
662
978
|
address: string;
|
|
663
979
|
}
|
|
664
|
-
interface ZkLoginVerifyResponse {
|
|
980
|
+
export interface ZkLoginVerifyResponse {
|
|
665
981
|
success: boolean;
|
|
666
982
|
errors: string[];
|
|
667
983
|
}
|
|
668
|
-
interface TransportMethods {
|
|
984
|
+
export interface TransportMethods {
|
|
985
|
+
/**
|
|
986
|
+
* @deprecated Use `verifySignature`. This method accepts signatures from the address's
|
|
987
|
+
* aliases, like `verifySignature` does by default.
|
|
988
|
+
*/
|
|
669
989
|
verifyZkLoginSignature: (options: VerifyZkLoginSignatureOptions) => Promise<ZkLoginVerifyResponse>;
|
|
670
990
|
}
|
|
671
991
|
/** Name service methods */
|
|
672
|
-
interface ResolveNameServiceAddressOptions extends CoreClientMethodOptions {
|
|
992
|
+
export interface ResolveNameServiceAddressOptions extends CoreClientMethodOptions {
|
|
673
993
|
name: string;
|
|
674
994
|
}
|
|
675
|
-
interface ResolveNameServiceAddressResponse {
|
|
995
|
+
export interface ResolveNameServiceAddressResponse {
|
|
676
996
|
address: string | null;
|
|
677
997
|
}
|
|
678
|
-
interface DefaultNameServiceNameOptions extends CoreClientMethodOptions {
|
|
998
|
+
export interface DefaultNameServiceNameOptions extends CoreClientMethodOptions {
|
|
679
999
|
address: string;
|
|
680
1000
|
}
|
|
681
|
-
interface DefaultNameServiceNameResponse {
|
|
1001
|
+
export interface DefaultNameServiceNameResponse {
|
|
682
1002
|
data: {
|
|
683
1003
|
name: string | null;
|
|
684
1004
|
};
|
|
685
1005
|
}
|
|
686
|
-
interface TransportMethods {
|
|
1006
|
+
export interface TransportMethods {
|
|
687
1007
|
resolveNameServiceAddress: (options: ResolveNameServiceAddressOptions) => Promise<ResolveNameServiceAddressResponse>;
|
|
688
1008
|
defaultNameServiceName: (options: DefaultNameServiceNameOptions) => Promise<DefaultNameServiceNameResponse>;
|
|
689
1009
|
}
|
|
690
1010
|
/** MVR methods */
|
|
691
|
-
interface TransportMethods {
|
|
1011
|
+
export interface TransportMethods {
|
|
692
1012
|
mvr: MvrMethods;
|
|
693
1013
|
}
|
|
694
|
-
interface MvrMethods {
|
|
1014
|
+
export interface MvrMethods {
|
|
695
1015
|
resolvePackage: (options: MvrResolvePackageOptions) => Promise<MvrResolvePackageResponse>;
|
|
696
1016
|
resolveType: (options: MvrResolveTypeOptions) => Promise<MvrResolveTypeResponse>;
|
|
697
1017
|
resolve: (options: MvrResolveOptions) => Promise<MvrResolveResponse>;
|
|
698
1018
|
}
|
|
699
|
-
interface MvrResolvePackageOptions extends CoreClientMethodOptions {
|
|
1019
|
+
export interface MvrResolvePackageOptions extends CoreClientMethodOptions {
|
|
700
1020
|
package: string;
|
|
701
1021
|
}
|
|
702
|
-
interface MvrResolveTypeOptions extends CoreClientMethodOptions {
|
|
1022
|
+
export interface MvrResolveTypeOptions extends CoreClientMethodOptions {
|
|
703
1023
|
type: string;
|
|
704
1024
|
}
|
|
705
|
-
interface MvrResolveOptions extends CoreClientMethodOptions {
|
|
1025
|
+
export interface MvrResolveOptions extends CoreClientMethodOptions {
|
|
706
1026
|
packages?: string[];
|
|
707
1027
|
types?: string[];
|
|
708
1028
|
}
|
|
709
|
-
interface MvrResolvePackageResponse {
|
|
1029
|
+
export interface MvrResolvePackageResponse {
|
|
710
1030
|
package: string;
|
|
711
1031
|
}
|
|
712
|
-
interface MvrResolveTypeResponse {
|
|
1032
|
+
export interface MvrResolveTypeResponse {
|
|
713
1033
|
type: string;
|
|
714
1034
|
}
|
|
715
|
-
interface MvrResolveResponse {
|
|
1035
|
+
export interface MvrResolveResponse {
|
|
716
1036
|
packages: Record<string, {
|
|
717
1037
|
package: string;
|
|
718
1038
|
}>;
|
|
@@ -721,27 +1041,27 @@ declare namespace SuiClientTypes {
|
|
|
721
1041
|
}>;
|
|
722
1042
|
}
|
|
723
1043
|
/** Move package methods */
|
|
724
|
-
interface TransportMethods {
|
|
1044
|
+
export interface TransportMethods {
|
|
725
1045
|
getMoveFunction: (options: GetMoveFunctionOptions) => Promise<GetMoveFunctionResponse>;
|
|
726
1046
|
}
|
|
727
|
-
interface GetMovePackageOptions extends CoreClientMethodOptions {
|
|
1047
|
+
export interface GetMovePackageOptions extends CoreClientMethodOptions {
|
|
728
1048
|
packageId: string;
|
|
729
1049
|
}
|
|
730
|
-
interface GetMovePackageResponse {
|
|
1050
|
+
export interface GetMovePackageResponse {
|
|
731
1051
|
package: PackageResponse;
|
|
732
1052
|
}
|
|
733
|
-
interface PackageResponse {
|
|
1053
|
+
export interface PackageResponse {
|
|
734
1054
|
storageId: string;
|
|
735
1055
|
originalId: string;
|
|
736
1056
|
version: string;
|
|
737
1057
|
modules: ModuleResponse[];
|
|
738
1058
|
}
|
|
739
|
-
interface ModuleResponse {
|
|
1059
|
+
export interface ModuleResponse {
|
|
740
1060
|
name: string;
|
|
741
1061
|
datatypes: DatatypeResponse[];
|
|
742
1062
|
functions: FunctionResponse[];
|
|
743
1063
|
}
|
|
744
|
-
type DatatypeResponse = {
|
|
1064
|
+
export type DatatypeResponse = {
|
|
745
1065
|
$kind: 'struct';
|
|
746
1066
|
typeName: string;
|
|
747
1067
|
definingId: string;
|
|
@@ -760,40 +1080,40 @@ declare namespace SuiClientTypes {
|
|
|
760
1080
|
typeParameters: TypeParameter[];
|
|
761
1081
|
variants: VariantDescriptor[];
|
|
762
1082
|
};
|
|
763
|
-
type Ability = 'copy' | 'drop' | 'store' | 'key' | 'unknown';
|
|
764
|
-
type DatatypeKind = 'struct' | 'enum' | 'unknown';
|
|
765
|
-
interface TypeParameter {
|
|
1083
|
+
export type Ability = 'copy' | 'drop' | 'store' | 'key' | 'unknown';
|
|
1084
|
+
export type DatatypeKind = 'struct' | 'enum' | 'unknown';
|
|
1085
|
+
export interface TypeParameter {
|
|
766
1086
|
constraints: Ability[];
|
|
767
1087
|
isPhantom: boolean;
|
|
768
1088
|
}
|
|
769
|
-
interface FieldDescriptor {
|
|
1089
|
+
export interface FieldDescriptor {
|
|
770
1090
|
name: string;
|
|
771
1091
|
position: number;
|
|
772
1092
|
type: OpenSignatureBody;
|
|
773
1093
|
}
|
|
774
|
-
interface VariantDescriptor {
|
|
1094
|
+
export interface VariantDescriptor {
|
|
775
1095
|
name: string;
|
|
776
1096
|
position: number;
|
|
777
1097
|
fields: FieldDescriptor[];
|
|
778
1098
|
}
|
|
779
|
-
interface GetMoveFunctionOptions extends CoreClientMethodOptions {
|
|
1099
|
+
export interface GetMoveFunctionOptions extends CoreClientMethodOptions {
|
|
780
1100
|
packageId: string;
|
|
781
1101
|
moduleName: string;
|
|
782
1102
|
name: string;
|
|
783
1103
|
}
|
|
784
|
-
interface GetMoveFunctionResponse {
|
|
1104
|
+
export interface GetMoveFunctionResponse {
|
|
785
1105
|
function: FunctionResponse;
|
|
786
1106
|
}
|
|
787
|
-
interface GetMoveDatatypeOptions extends CoreClientMethodOptions {
|
|
1107
|
+
export interface GetMoveDatatypeOptions extends CoreClientMethodOptions {
|
|
788
1108
|
packageId: string;
|
|
789
1109
|
moduleName: string;
|
|
790
1110
|
name: string;
|
|
791
1111
|
}
|
|
792
|
-
interface GetMoveDatatypeResponse {
|
|
1112
|
+
export interface GetMoveDatatypeResponse {
|
|
793
1113
|
datatype: DatatypeResponse;
|
|
794
1114
|
}
|
|
795
|
-
type Visibility = 'public' | 'friend' | 'private' | 'unknown';
|
|
796
|
-
interface FunctionResponse {
|
|
1115
|
+
export type Visibility = 'public' | 'friend' | 'private' | 'unknown';
|
|
1116
|
+
export interface FunctionResponse {
|
|
797
1117
|
packageId: string;
|
|
798
1118
|
moduleName: string;
|
|
799
1119
|
name: string;
|
|
@@ -803,12 +1123,12 @@ declare namespace SuiClientTypes {
|
|
|
803
1123
|
parameters: OpenSignature[];
|
|
804
1124
|
returns: OpenSignature[];
|
|
805
1125
|
}
|
|
806
|
-
type ReferenceType = 'mutable' | 'immutable' | 'unknown';
|
|
807
|
-
type OpenSignature = {
|
|
1126
|
+
export type ReferenceType = 'mutable' | 'immutable' | 'unknown';
|
|
1127
|
+
export type OpenSignature = {
|
|
808
1128
|
reference: ReferenceType | null;
|
|
809
1129
|
body: OpenSignatureBody;
|
|
810
1130
|
};
|
|
811
|
-
type OpenSignatureBody = {
|
|
1131
|
+
export type OpenSignatureBody = {
|
|
812
1132
|
$kind: 'u8' | 'u16' | 'u32' | 'u64' | 'u128' | 'u256' | 'bool' | 'address' | 'unknown';
|
|
813
1133
|
} | {
|
|
814
1134
|
$kind: 'vector';
|
|
@@ -824,7 +1144,7 @@ declare namespace SuiClientTypes {
|
|
|
824
1144
|
index: number;
|
|
825
1145
|
};
|
|
826
1146
|
/** ObjectOwner types */
|
|
827
|
-
interface AddressOwner {
|
|
1147
|
+
export interface AddressOwner {
|
|
828
1148
|
$kind: 'AddressOwner';
|
|
829
1149
|
AddressOwner: string;
|
|
830
1150
|
ObjectOwner?: never;
|
|
@@ -832,7 +1152,7 @@ declare namespace SuiClientTypes {
|
|
|
832
1152
|
Immutable?: never;
|
|
833
1153
|
ConsensusAddressOwner?: never;
|
|
834
1154
|
}
|
|
835
|
-
interface ParentOwner {
|
|
1155
|
+
export interface ParentOwner {
|
|
836
1156
|
$kind: 'ObjectOwner';
|
|
837
1157
|
ObjectOwner: string;
|
|
838
1158
|
AddressOwner?: never;
|
|
@@ -840,7 +1160,7 @@ declare namespace SuiClientTypes {
|
|
|
840
1160
|
Immutable?: never;
|
|
841
1161
|
ConsensusAddressOwner?: never;
|
|
842
1162
|
}
|
|
843
|
-
interface SharedOwner {
|
|
1163
|
+
export interface SharedOwner {
|
|
844
1164
|
$kind: 'Shared';
|
|
845
1165
|
Shared: {
|
|
846
1166
|
initialSharedVersion: string;
|
|
@@ -850,7 +1170,7 @@ declare namespace SuiClientTypes {
|
|
|
850
1170
|
Immutable?: never;
|
|
851
1171
|
ConsensusAddressOwner?: never;
|
|
852
1172
|
}
|
|
853
|
-
interface ImmutableOwner {
|
|
1173
|
+
export interface ImmutableOwner {
|
|
854
1174
|
$kind: 'Immutable';
|
|
855
1175
|
Immutable: true;
|
|
856
1176
|
AddressOwner?: never;
|
|
@@ -858,7 +1178,7 @@ declare namespace SuiClientTypes {
|
|
|
858
1178
|
Shared?: never;
|
|
859
1179
|
ConsensusAddressOwner?: never;
|
|
860
1180
|
}
|
|
861
|
-
interface ConsensusAddressOwner {
|
|
1181
|
+
export interface ConsensusAddressOwner {
|
|
862
1182
|
$kind: 'ConsensusAddressOwner';
|
|
863
1183
|
ConsensusAddressOwner: {
|
|
864
1184
|
startVersion: string;
|
|
@@ -869,7 +1189,7 @@ declare namespace SuiClientTypes {
|
|
|
869
1189
|
Shared?: never;
|
|
870
1190
|
Immutable?: never;
|
|
871
1191
|
}
|
|
872
|
-
interface UnknownOwner {
|
|
1192
|
+
export interface UnknownOwner {
|
|
873
1193
|
$kind: 'Unknown';
|
|
874
1194
|
AddressOwner?: never;
|
|
875
1195
|
ObjectOwner?: never;
|
|
@@ -877,9 +1197,9 @@ declare namespace SuiClientTypes {
|
|
|
877
1197
|
Immutable?: never;
|
|
878
1198
|
ConsensusAddressOwner?: never;
|
|
879
1199
|
}
|
|
880
|
-
type ObjectOwner = AddressOwner | ParentOwner | SharedOwner | ImmutableOwner | ConsensusAddressOwner | UnknownOwner;
|
|
1200
|
+
export type ObjectOwner = AddressOwner | ParentOwner | SharedOwner | ImmutableOwner | ConsensusAddressOwner | UnknownOwner;
|
|
881
1201
|
/** Effects */
|
|
882
|
-
interface TransactionEffects {
|
|
1202
|
+
export interface TransactionEffects {
|
|
883
1203
|
bcs: Uint8Array | null;
|
|
884
1204
|
version: number;
|
|
885
1205
|
status: ExecutionStatus;
|
|
@@ -893,7 +1213,7 @@ declare namespace SuiClientTypes {
|
|
|
893
1213
|
unchangedConsensusObjects: UnchangedConsensusObject[];
|
|
894
1214
|
auxiliaryDataDigest: string | null;
|
|
895
1215
|
}
|
|
896
|
-
interface ChangedObject {
|
|
1216
|
+
export interface ChangedObject {
|
|
897
1217
|
objectId: string;
|
|
898
1218
|
inputState: 'Unknown' | 'DoesNotExist' | 'Exists';
|
|
899
1219
|
inputVersion: string | null;
|
|
@@ -905,26 +1225,26 @@ declare namespace SuiClientTypes {
|
|
|
905
1225
|
outputOwner: ObjectOwner | null;
|
|
906
1226
|
idOperation: 'Unknown' | 'None' | 'Created' | 'Deleted';
|
|
907
1227
|
}
|
|
908
|
-
interface GasCostSummary {
|
|
1228
|
+
export interface GasCostSummary {
|
|
909
1229
|
computationCost: string;
|
|
910
1230
|
storageCost: string;
|
|
911
1231
|
storageRebate: string;
|
|
912
1232
|
nonRefundableStorageFee: string;
|
|
913
1233
|
}
|
|
914
|
-
type ExecutionStatus = {
|
|
1234
|
+
export type ExecutionStatus = {
|
|
915
1235
|
success: true;
|
|
916
1236
|
error: null;
|
|
917
1237
|
} | {
|
|
918
1238
|
success: false;
|
|
919
1239
|
error: ExecutionError;
|
|
920
1240
|
};
|
|
921
|
-
interface UnchangedConsensusObject {
|
|
1241
|
+
export interface UnchangedConsensusObject {
|
|
922
1242
|
kind: 'Unknown' | 'ReadOnlyRoot' | 'MutateConsensusStreamEnded' | 'ReadConsensusStreamEnded' | 'Cancelled' | 'PerEpochConfig';
|
|
923
1243
|
objectId: string;
|
|
924
1244
|
version: string | null;
|
|
925
1245
|
digest: string | null;
|
|
926
1246
|
}
|
|
927
|
-
interface Event {
|
|
1247
|
+
export interface Event {
|
|
928
1248
|
packageId: string;
|
|
929
1249
|
module: string;
|
|
930
1250
|
sender: string;
|
|
@@ -934,66 +1254,65 @@ declare namespace SuiClientTypes {
|
|
|
934
1254
|
* The JSON representation of the event's Move struct data.
|
|
935
1255
|
*
|
|
936
1256
|
* **Warning:** The exact shape and field names of this data may vary between different
|
|
937
|
-
* API implementations (
|
|
1257
|
+
* API implementations (gRPC or GraphQL). For consistent data across APIs use
|
|
938
1258
|
* the `bcs` field and parse the BCS data directly.
|
|
939
1259
|
*/
|
|
940
1260
|
json: Record<string, unknown> | null;
|
|
941
1261
|
}
|
|
942
|
-
interface MoveAbort {
|
|
1262
|
+
export interface MoveAbort {
|
|
943
1263
|
abortCode: string;
|
|
944
1264
|
location?: MoveLocation;
|
|
945
1265
|
cleverError?: CleverError;
|
|
946
1266
|
}
|
|
947
|
-
interface MoveLocation {
|
|
1267
|
+
export interface MoveLocation {
|
|
948
1268
|
package?: string;
|
|
949
1269
|
module?: string;
|
|
950
|
-
function?: number;
|
|
951
1270
|
functionName?: string;
|
|
952
1271
|
instruction?: number;
|
|
953
1272
|
}
|
|
954
|
-
interface CleverError {
|
|
1273
|
+
export interface CleverError {
|
|
955
1274
|
errorCode?: number;
|
|
956
1275
|
lineNumber?: number;
|
|
957
1276
|
constantName?: string;
|
|
958
1277
|
constantType?: string;
|
|
959
1278
|
value?: string;
|
|
960
1279
|
}
|
|
961
|
-
interface SizeError {
|
|
1280
|
+
export interface SizeError {
|
|
962
1281
|
name: string;
|
|
963
1282
|
size: number;
|
|
964
1283
|
maxSize: number;
|
|
965
1284
|
}
|
|
966
|
-
interface CommandArgumentError {
|
|
1285
|
+
export interface CommandArgumentError {
|
|
967
1286
|
argument: number;
|
|
968
1287
|
name: string;
|
|
969
1288
|
}
|
|
970
|
-
interface TypeArgumentError {
|
|
1289
|
+
export interface TypeArgumentError {
|
|
971
1290
|
typeArgument: number;
|
|
972
1291
|
name: string;
|
|
973
1292
|
}
|
|
974
|
-
interface PackageUpgradeError {
|
|
1293
|
+
export interface PackageUpgradeError {
|
|
975
1294
|
name: string;
|
|
976
1295
|
packageId?: string;
|
|
977
1296
|
digest?: string;
|
|
978
1297
|
}
|
|
979
|
-
interface CoinDenyListError {
|
|
1298
|
+
export interface CoinDenyListError {
|
|
980
1299
|
name: string;
|
|
981
1300
|
coinType: string;
|
|
982
1301
|
address?: string;
|
|
983
1302
|
}
|
|
984
|
-
interface CongestedObjects {
|
|
1303
|
+
export interface CongestedObjects {
|
|
985
1304
|
name: string;
|
|
986
1305
|
objects: string[];
|
|
987
1306
|
}
|
|
988
|
-
interface IndexError {
|
|
1307
|
+
export interface IndexError {
|
|
989
1308
|
index?: number;
|
|
990
1309
|
subresult?: number;
|
|
991
1310
|
}
|
|
992
|
-
interface ObjectIdError {
|
|
1311
|
+
export interface ObjectIdError {
|
|
993
1312
|
name?: string;
|
|
994
1313
|
objectId: string;
|
|
995
1314
|
}
|
|
996
|
-
type ExecutionError = {
|
|
1315
|
+
export type ExecutionError = {
|
|
997
1316
|
message: string;
|
|
998
1317
|
command?: number;
|
|
999
1318
|
} & EnumOutputShape<{
|
|
@@ -1008,6 +1327,7 @@ declare namespace SuiClientTypes {
|
|
|
1008
1327
|
ObjectIdError: ObjectIdError;
|
|
1009
1328
|
Unknown: null;
|
|
1010
1329
|
}>;
|
|
1330
|
+
export {};
|
|
1011
1331
|
}
|
|
1012
1332
|
//#endregion
|
|
1013
1333
|
export { ClientWithExtensions, SuiClientRegistration, SuiClientTypes };
|