@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
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
// SPDX-License-Identifier: Apache-2.0
|
|
11
11
|
//
|
|
12
12
|
/**
|
|
13
|
+
* Error reasons in the `sui.io` error domain, used as the `reason` of a
|
|
14
|
+
* `google.rpc.ErrorInfo` or of a `google.rpc.BadRequest.FieldViolation`.
|
|
15
|
+
*
|
|
13
16
|
* @generated from protobuf enum sui.rpc.v2.ErrorReason
|
|
14
17
|
*/
|
|
15
18
|
export enum ErrorReason {
|
|
@@ -25,4 +28,176 @@ export enum ErrorReason {
|
|
|
25
28
|
* @generated from protobuf enum value: FIELD_MISSING = 2;
|
|
26
29
|
*/
|
|
27
30
|
FIELD_MISSING = 2,
|
|
31
|
+
/**
|
|
32
|
+
* Gas selection could not find enough SUI to cover the gas budget.
|
|
33
|
+
* `SimulateTransaction` returns this with `INVALID_ARGUMENT`. Gas selection
|
|
34
|
+
* runs only when `do_gas_selection` is set, `checks` is not `DISABLED`, and
|
|
35
|
+
* the transaction has no gas payment objects. When the server estimates the
|
|
36
|
+
* budget and the transaction fails in that estimation, `SimulateTransaction`
|
|
37
|
+
* returns `TRANSACTION_EXECUTION_FAILED` instead of this error, so with an
|
|
38
|
+
* estimated budget this reason means the transaction executed successfully
|
|
39
|
+
* in simulation.
|
|
40
|
+
*
|
|
41
|
+
* Example of an ErrorInfo when the gas owner holds a single 2246360 MIST
|
|
42
|
+
* coin, has no address balance, and the transaction needs a budget of
|
|
43
|
+
* 8924024 MIST:
|
|
44
|
+
*
|
|
45
|
+
* { "reason": "INSUFFICIENT_GAS_BALANCE",
|
|
46
|
+
* "domain": "sui.io",
|
|
47
|
+
* "metadata": {
|
|
48
|
+
* "owner": "0x0000000000000000000000000000000000000000000000000000000000000123",
|
|
49
|
+
* "requiredBudget": "8924024",
|
|
50
|
+
* "coinBalance": "2246360",
|
|
51
|
+
* "addressBalance": "0"
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
*
|
|
55
|
+
* Metadata, with amounts in MIST as decimal strings:
|
|
56
|
+
* - `owner`: the gas owner's address, as "0x" followed by 64 hex digits.
|
|
57
|
+
* - `requiredBudget`: the gas budget the transaction needs. When the
|
|
58
|
+
* request leaves the budget unset, this is the server's estimate plus the
|
|
59
|
+
* cost of loading every coin counted in `coinBalance` beyond the first;
|
|
60
|
+
* otherwise it is the budget from the request. An estimated
|
|
61
|
+
* `requiredBudget` depends on how many coins the gas owner holds: when
|
|
62
|
+
* the owner already holds coins, sending it a new coin raises
|
|
63
|
+
* `requiredBudget` by up to the cost of loading one more coin. A new coin
|
|
64
|
+
* worth `requiredBudget` covers that increase unless `coinBalance` is
|
|
65
|
+
* less than the cost of loading one coin; a new coin worth only
|
|
66
|
+
* `requiredBudget` minus `coinBalance` can fall short.
|
|
67
|
+
* - `coinBalance`: total of the gas owner's `Coin<SUI>` objects considered
|
|
68
|
+
* by gas selection: owned, non-consensus coins not already used as
|
|
69
|
+
* transaction inputs, largest first, up to the protocol's maximum number
|
|
70
|
+
* of gas payment objects.
|
|
71
|
+
* - `addressBalance`: the gas owner's SUI address balance remaining after
|
|
72
|
+
* the transaction's own explicit SUI withdrawals from the gas owner; "0"
|
|
73
|
+
* if there is none.
|
|
74
|
+
*
|
|
75
|
+
* The two balances are reported separately because they combine
|
|
76
|
+
* differently. When the transaction uses the gas coin (an `Argument` of kind
|
|
77
|
+
* `GAS`), coins and address balance are combined to pay for gas. Otherwise
|
|
78
|
+
* they are never combined: the address balance pays for gas only if it
|
|
79
|
+
* alone covers the budget before coin-loading costs, which is at most
|
|
80
|
+
* `requiredBudget`; if it does not, the coins alone must cover
|
|
81
|
+
* `requiredBudget`.
|
|
82
|
+
*
|
|
83
|
+
* @generated from protobuf enum value: INSUFFICIENT_GAS_BALANCE = 3;
|
|
84
|
+
*/
|
|
85
|
+
INSUFFICIENT_GAS_BALANCE = 3,
|
|
86
|
+
/**
|
|
87
|
+
* The transaction failed while executing in simulation. `SimulateTransaction`
|
|
88
|
+
* returns this with `INVALID_ARGUMENT` when it estimates the budget, the
|
|
89
|
+
* transaction fails in that estimation, and gas selection then cannot cover
|
|
90
|
+
* the budget. It is returned instead of the `INSUFFICIENT_GAS_BALANCE`
|
|
91
|
+
* reason in that case because the transaction fails even with its gas paid
|
|
92
|
+
* for, so the gas budget is not what stops it; `kind` says what does. Some
|
|
93
|
+
* kinds can still be fixed by adding funds: for example,
|
|
94
|
+
* `INSUFFICIENT_FUNDS_FOR_WITHDRAW` means a balance the transaction
|
|
95
|
+
* withdraws from holds too little. `INSUFFICIENT_GAS` cannot: the estimation
|
|
96
|
+
* runs with the maximum gas budget, so it means the transaction needs more
|
|
97
|
+
* gas than any budget allows. A gas owner that can cover the budget instead
|
|
98
|
+
* gets a successful response whose `effects.status.error` describes the
|
|
99
|
+
* failure.
|
|
100
|
+
*
|
|
101
|
+
* The status details also carry the `ExecutionError`, in the same form as
|
|
102
|
+
* `effects.status.error`.
|
|
103
|
+
*
|
|
104
|
+
* Example of an ErrorInfo for a Move abort in the first command:
|
|
105
|
+
*
|
|
106
|
+
* { "reason": "TRANSACTION_EXECUTION_FAILED",
|
|
107
|
+
* "domain": "sui.io",
|
|
108
|
+
* "metadata": {
|
|
109
|
+
* "kind": "MOVE_ABORT",
|
|
110
|
+
* "command": "0"
|
|
111
|
+
* }
|
|
112
|
+
* }
|
|
113
|
+
*
|
|
114
|
+
* Metadata:
|
|
115
|
+
* - `kind`: the failure's `ExecutionError.ExecutionErrorKind` name.
|
|
116
|
+
* - `command`: index of the command that failed, as a decimal string, or
|
|
117
|
+
* "" if no single command failed.
|
|
118
|
+
*
|
|
119
|
+
* @generated from protobuf enum value: TRANSACTION_EXECUTION_FAILED = 4;
|
|
120
|
+
*/
|
|
121
|
+
TRANSACTION_EXECUTION_FAILED = 4,
|
|
122
|
+
/**
|
|
123
|
+
* The request reads ledger data above what this server has indexed. The
|
|
124
|
+
* `LedgerService` `List*` RPCs return this with `OUT_OF_RANGE` for a
|
|
125
|
+
* descending query when:
|
|
126
|
+
* - its `before` or `after` cursor names a position this server has not
|
|
127
|
+
* indexed.
|
|
128
|
+
* - its `end_checkpoint`, which is exclusive, is above
|
|
129
|
+
* `firstUnavailableCheckpoint`, or, with `end_checkpoint` unset, its
|
|
130
|
+
* `start_checkpoint` is at or above `firstUnavailableCheckpoint`.
|
|
131
|
+
* An ascending query never gets this error. Its `before` cursor and its
|
|
132
|
+
* checkpoint range end at the latest indexed checkpoint, and an `after`
|
|
133
|
+
* cursor past it ends an empty response with `LEDGER_TIP` at the position
|
|
134
|
+
* that cursor resumes from.
|
|
135
|
+
*
|
|
136
|
+
* Such a cursor comes from a newer view of the ledger than this server's,
|
|
137
|
+
* for example from another replica behind the same load balancer. The data
|
|
138
|
+
* is not indexed here yet, so the same request becomes servable once this
|
|
139
|
+
* server catches up, and a client may resend it unchanged after a delay. A
|
|
140
|
+
* cursor comes from a server that had indexed its position, so a request
|
|
141
|
+
* rejected for its cursor (`bound` is "cursor") is servable within the time
|
|
142
|
+
* replicas take to catch up with each other. A checkpoint bound may name a
|
|
143
|
+
* checkpoint the chain has not reached, so retrying it can wait
|
|
144
|
+
* indefinitely.
|
|
145
|
+
*
|
|
146
|
+
* Example of an ErrorInfo for a descending query's `before` cursor at
|
|
147
|
+
* checkpoint 1205, sent to a server whose latest indexed checkpoint is 1199:
|
|
148
|
+
*
|
|
149
|
+
* { "reason": "ABOVE_LATEST_AVAILABLE",
|
|
150
|
+
* "domain": "sui.io",
|
|
151
|
+
* "metadata": {
|
|
152
|
+
* "bound": "cursor",
|
|
153
|
+
* "requestedCheckpoint": "1205",
|
|
154
|
+
* "firstUnavailableCheckpoint": "1200"
|
|
155
|
+
* }
|
|
156
|
+
* }
|
|
157
|
+
*
|
|
158
|
+
* Metadata, with checkpoints as decimal strings:
|
|
159
|
+
* - `bound`: what reads above the indexed data: "cursor" for a `before` or
|
|
160
|
+
* `after` cursor, or the name of the request field, "start_checkpoint"
|
|
161
|
+
* or "end_checkpoint".
|
|
162
|
+
* - `requestedCheckpoint`: the checkpoint recorded in the cursor, or the
|
|
163
|
+
* value of the request field.
|
|
164
|
+
* - `firstUnavailableCheckpoint`: the lowest checkpoint this server has not
|
|
165
|
+
* indexed, one above its latest indexed checkpoint, or "0" if it has
|
|
166
|
+
* indexed none.
|
|
167
|
+
*
|
|
168
|
+
* @generated from protobuf enum value: ABOVE_LATEST_AVAILABLE = 5;
|
|
169
|
+
*/
|
|
170
|
+
ABOVE_LATEST_AVAILABLE = 5,
|
|
171
|
+
/**
|
|
172
|
+
* The request needs ledger data this server has pruned. The
|
|
173
|
+
* `LedgerService` `List*` RPCs return this with `OUT_OF_RANGE` when the
|
|
174
|
+
* request's `start_checkpoint` or `after` cursor is below the lowest
|
|
175
|
+
* checkpoint this server serves, when its checkpoint range ends at or below
|
|
176
|
+
* that checkpoint, when a descending query with no lower bound of its own
|
|
177
|
+
* reaches it, or when the server prunes data a query has not read yet. A
|
|
178
|
+
* descending query that reaches the lowest checkpoint fails after it
|
|
179
|
+
* streams every item at or above that checkpoint, and its last response
|
|
180
|
+
* carries a watermark at that checkpoint.
|
|
181
|
+
*
|
|
182
|
+
* Pruned data does not come back, so the same request fails the same way
|
|
183
|
+
* on this server. A client can send it to a server that retains the data,
|
|
184
|
+
* or resume at or above `lowestAvailableCheckpoint`.
|
|
185
|
+
*
|
|
186
|
+
* Example of an ErrorInfo from a server whose lowest available checkpoint
|
|
187
|
+
* is 5000:
|
|
188
|
+
*
|
|
189
|
+
* { "reason": "BELOW_EARLIEST_AVAILABLE",
|
|
190
|
+
* "domain": "sui.io",
|
|
191
|
+
* "metadata": {
|
|
192
|
+
* "lowestAvailableCheckpoint": "5000"
|
|
193
|
+
* }
|
|
194
|
+
* }
|
|
195
|
+
*
|
|
196
|
+
* Metadata:
|
|
197
|
+
* - `lowestAvailableCheckpoint`: the lowest checkpoint this server serves,
|
|
198
|
+
* as a decimal string.
|
|
199
|
+
*
|
|
200
|
+
* @generated from protobuf enum value: BELOW_EARLIEST_AVAILABLE = 6;
|
|
201
|
+
*/
|
|
202
|
+
BELOW_EARLIEST_AVAILABLE = 6,
|
|
28
203
|
}
|
|
@@ -452,6 +452,47 @@ export interface ListTransactionsRequest {
|
|
|
452
452
|
* @generated from protobuf field: optional sui.rpc.v2.QueryOptions options = 5;
|
|
453
453
|
*/
|
|
454
454
|
options?: QueryOptions;
|
|
455
|
+
/**
|
|
456
|
+
* Optional. Transaction position within `start_checkpoint` at which the
|
|
457
|
+
* query starts (inclusive): within `start_checkpoint`, only transactions
|
|
458
|
+
* whose `ExecutedTransaction.transaction_index` is at least this value are
|
|
459
|
+
* returned. Unset starts at the beginning of `start_checkpoint`. An index at
|
|
460
|
+
* or past the checkpoint's transaction count starts at the next checkpoint.
|
|
461
|
+
* Requires `start_checkpoint`. When this position leaves transactions of
|
|
462
|
+
* `start_checkpoint` out, a descending query does not report that checkpoint
|
|
463
|
+
* as covered in `Watermark.checkpoint`.
|
|
464
|
+
*
|
|
465
|
+
* Combines with `options.after` by intersection: the query starts at
|
|
466
|
+
* whichever of the two is later in ledger order.
|
|
467
|
+
*
|
|
468
|
+
* Servers that predate this field ignore it and start at the beginning of
|
|
469
|
+
* `start_checkpoint`, so clients must still drop transactions before this
|
|
470
|
+
* position themselves.
|
|
471
|
+
*
|
|
472
|
+
* @generated from protobuf field: optional uint64 start_transaction_index = 6;
|
|
473
|
+
*/
|
|
474
|
+
startTransactionIndex?: bigint;
|
|
475
|
+
/**
|
|
476
|
+
* Optional. Transaction position within the last checkpoint of the range,
|
|
477
|
+
* `end_checkpoint - 1`, at which the query ends (exclusive): within that
|
|
478
|
+
* checkpoint, only transactions whose `ExecutedTransaction.transaction_index`
|
|
479
|
+
* is below this value are returned, so 0 returns none of it. Unset ends after
|
|
480
|
+
* the whole checkpoint. An index at or past the checkpoint's transaction
|
|
481
|
+
* count ends after the whole checkpoint. Requires `end_checkpoint`. A query
|
|
482
|
+
* that stops at this position ends with `QUERY_END_REASON_CHECKPOINT_BOUND`.
|
|
483
|
+
* When this position leaves transactions of that checkpoint out, an
|
|
484
|
+
* ascending query does not report it as covered in `Watermark.checkpoint`.
|
|
485
|
+
*
|
|
486
|
+
* Combines with `options.before` by intersection: the query ends at
|
|
487
|
+
* whichever of the two is earlier in ledger order.
|
|
488
|
+
*
|
|
489
|
+
* Servers that predate this field ignore it and return the whole
|
|
490
|
+
* checkpoint, so clients must still drop transactions at or after this
|
|
491
|
+
* position themselves.
|
|
492
|
+
*
|
|
493
|
+
* @generated from protobuf field: optional uint64 end_transaction_index = 7;
|
|
494
|
+
*/
|
|
495
|
+
endTransactionIndex?: bigint;
|
|
455
496
|
}
|
|
456
497
|
/**
|
|
457
498
|
* Response message for LedgerService.ListTransactions.
|
|
@@ -533,6 +574,76 @@ export interface ListEventsRequest {
|
|
|
533
574
|
* @generated from protobuf field: optional sui.rpc.v2.QueryOptions options = 5;
|
|
534
575
|
*/
|
|
535
576
|
options?: QueryOptions;
|
|
577
|
+
/**
|
|
578
|
+
* Optional. Transaction position within `start_checkpoint` at which the
|
|
579
|
+
* query starts (inclusive): within `start_checkpoint`, only events of
|
|
580
|
+
* transactions whose `Event.transaction_index` is at least this value are
|
|
581
|
+
* returned. Unset starts at the beginning of `start_checkpoint`. An index at
|
|
582
|
+
* or past the checkpoint's transaction count starts at the next checkpoint,
|
|
583
|
+
* ignoring `start_event_index`. Requires `start_checkpoint`. When this
|
|
584
|
+
* position leaves events of `start_checkpoint` out, a descending query does
|
|
585
|
+
* not report that checkpoint as covered in `Watermark.checkpoint`.
|
|
586
|
+
*
|
|
587
|
+
* Combines with `options.after` by intersection: the query starts at
|
|
588
|
+
* whichever of the two is later in ledger order.
|
|
589
|
+
*
|
|
590
|
+
* Servers that predate this field ignore it and start at the beginning of
|
|
591
|
+
* `start_checkpoint`, so clients must still drop events before this
|
|
592
|
+
* position themselves.
|
|
593
|
+
*
|
|
594
|
+
* @generated from protobuf field: optional uint64 start_transaction_index = 6;
|
|
595
|
+
*/
|
|
596
|
+
startTransactionIndex?: bigint;
|
|
597
|
+
/**
|
|
598
|
+
* Optional. Event position within the transaction at
|
|
599
|
+
* `start_transaction_index` at which the query starts (inclusive): within
|
|
600
|
+
* that transaction, only events whose `Event.event_index` is at least this
|
|
601
|
+
* value are returned. Unset starts at the transaction's first event. An
|
|
602
|
+
* index past the transaction's last event starts at the next transaction.
|
|
603
|
+
* Requires `start_transaction_index`.
|
|
604
|
+
*
|
|
605
|
+
* Servers that predate this field ignore it, as for
|
|
606
|
+
* `start_transaction_index`.
|
|
607
|
+
*
|
|
608
|
+
* @generated from protobuf field: optional uint32 start_event_index = 7;
|
|
609
|
+
*/
|
|
610
|
+
startEventIndex?: number;
|
|
611
|
+
/**
|
|
612
|
+
* Optional. Transaction position within the last checkpoint of the range,
|
|
613
|
+
* `end_checkpoint - 1`, at which the query ends (exclusive): within that
|
|
614
|
+
* checkpoint, only events of transactions whose `Event.transaction_index` is
|
|
615
|
+
* below this value are returned, plus, with `end_event_index`, the events
|
|
616
|
+
* of the transaction at this index that precede it. Unset ends after the
|
|
617
|
+
* whole checkpoint. An index at or past the checkpoint's transaction count
|
|
618
|
+
* ends after the whole checkpoint. Requires `end_checkpoint`. A query that
|
|
619
|
+
* stops at this position ends with `QUERY_END_REASON_CHECKPOINT_BOUND`.
|
|
620
|
+
* When this position leaves events of that checkpoint out, an ascending
|
|
621
|
+
* query does not report it as covered in `Watermark.checkpoint`.
|
|
622
|
+
*
|
|
623
|
+
* Combines with `options.before` by intersection: the query ends at
|
|
624
|
+
* whichever of the two is earlier in ledger order.
|
|
625
|
+
*
|
|
626
|
+
* Servers that predate this field ignore it and return the whole
|
|
627
|
+
* checkpoint, so clients must still drop events at or after this position
|
|
628
|
+
* themselves.
|
|
629
|
+
*
|
|
630
|
+
* @generated from protobuf field: optional uint64 end_transaction_index = 8;
|
|
631
|
+
*/
|
|
632
|
+
endTransactionIndex?: bigint;
|
|
633
|
+
/**
|
|
634
|
+
* Optional. Event position within the transaction at
|
|
635
|
+
* `end_transaction_index` at which the query ends (exclusive): events of
|
|
636
|
+
* that transaction whose `Event.event_index` is below this value are also
|
|
637
|
+
* returned. Unset, like 0, returns none of the transaction's events. An
|
|
638
|
+
* index past the transaction's last event returns all of them. Requires
|
|
639
|
+
* `end_transaction_index`.
|
|
640
|
+
*
|
|
641
|
+
* Servers that predate this field ignore it, as for
|
|
642
|
+
* `end_transaction_index`.
|
|
643
|
+
*
|
|
644
|
+
* @generated from protobuf field: optional uint32 end_event_index = 9;
|
|
645
|
+
*/
|
|
646
|
+
endEventIndex?: number;
|
|
536
647
|
}
|
|
537
648
|
/**
|
|
538
649
|
* Response message for LedgerService.ListEvents.
|
|
@@ -926,6 +1037,22 @@ class ListTransactionsRequest$Type extends MessageType<ListTransactionsRequest>
|
|
|
926
1037
|
},
|
|
927
1038
|
{ no: 4, name: 'filter', kind: 'message', T: () => TransactionFilter },
|
|
928
1039
|
{ no: 5, name: 'options', kind: 'message', T: () => QueryOptions },
|
|
1040
|
+
{
|
|
1041
|
+
no: 6,
|
|
1042
|
+
name: 'start_transaction_index',
|
|
1043
|
+
kind: 'scalar',
|
|
1044
|
+
opt: true,
|
|
1045
|
+
T: 4 /*ScalarType.UINT64*/,
|
|
1046
|
+
L: 0 /*LongType.BIGINT*/,
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
no: 7,
|
|
1050
|
+
name: 'end_transaction_index',
|
|
1051
|
+
kind: 'scalar',
|
|
1052
|
+
opt: true,
|
|
1053
|
+
T: 4 /*ScalarType.UINT64*/,
|
|
1054
|
+
L: 0 /*LongType.BIGINT*/,
|
|
1055
|
+
},
|
|
929
1056
|
]);
|
|
930
1057
|
}
|
|
931
1058
|
}
|
|
@@ -970,6 +1097,24 @@ class ListEventsRequest$Type extends MessageType<ListEventsRequest> {
|
|
|
970
1097
|
},
|
|
971
1098
|
{ no: 4, name: 'filter', kind: 'message', T: () => EventFilter },
|
|
972
1099
|
{ no: 5, name: 'options', kind: 'message', T: () => QueryOptions },
|
|
1100
|
+
{
|
|
1101
|
+
no: 6,
|
|
1102
|
+
name: 'start_transaction_index',
|
|
1103
|
+
kind: 'scalar',
|
|
1104
|
+
opt: true,
|
|
1105
|
+
T: 4 /*ScalarType.UINT64*/,
|
|
1106
|
+
L: 0 /*LongType.BIGINT*/,
|
|
1107
|
+
},
|
|
1108
|
+
{ no: 7, name: 'start_event_index', kind: 'scalar', opt: true, T: 13 /*ScalarType.UINT32*/ },
|
|
1109
|
+
{
|
|
1110
|
+
no: 8,
|
|
1111
|
+
name: 'end_transaction_index',
|
|
1112
|
+
kind: 'scalar',
|
|
1113
|
+
opt: true,
|
|
1114
|
+
T: 4 /*ScalarType.UINT64*/,
|
|
1115
|
+
L: 0 /*LongType.BIGINT*/,
|
|
1116
|
+
},
|
|
1117
|
+
{ no: 9, name: 'end_event_index', kind: 'scalar', opt: true, T: 13 /*ScalarType.UINT32*/ },
|
|
973
1118
|
]);
|
|
974
1119
|
}
|
|
975
1120
|
}
|
|
@@ -19,11 +19,37 @@ import { Package } from './move_package.js';
|
|
|
19
19
|
*/
|
|
20
20
|
export interface GetPackageRequest {
|
|
21
21
|
/**
|
|
22
|
-
* Required. The `storage_id` of the requested package.
|
|
22
|
+
* Required. The `storage_id` of any version of the requested package.
|
|
23
|
+
*
|
|
24
|
+
* When no `selector` is set, the package stored at exactly this id is
|
|
25
|
+
* returned. When a `selector` is set, `package_id` only identifies the
|
|
26
|
+
* package's upgrade lineage (via its original id), and the selected
|
|
27
|
+
* version within that lineage is returned.
|
|
23
28
|
*
|
|
24
29
|
* @generated from protobuf field: optional string package_id = 1;
|
|
25
30
|
*/
|
|
26
31
|
packageId?: string;
|
|
32
|
+
/**
|
|
33
|
+
* @generated from protobuf oneof: selector
|
|
34
|
+
*/
|
|
35
|
+
selector:
|
|
36
|
+
| {
|
|
37
|
+
oneofKind: 'version';
|
|
38
|
+
/**
|
|
39
|
+
* @generated from protobuf field: uint64 version = 2;
|
|
40
|
+
*/
|
|
41
|
+
version: bigint;
|
|
42
|
+
}
|
|
43
|
+
| {
|
|
44
|
+
oneofKind: 'atCheckpoint';
|
|
45
|
+
/**
|
|
46
|
+
* @generated from protobuf field: uint64 at_checkpoint = 3;
|
|
47
|
+
*/
|
|
48
|
+
atCheckpoint: bigint;
|
|
49
|
+
}
|
|
50
|
+
| {
|
|
51
|
+
oneofKind: undefined;
|
|
52
|
+
};
|
|
27
53
|
}
|
|
28
54
|
/**
|
|
29
55
|
* @generated from protobuf message sui.rpc.v2.GetPackageResponse
|
|
@@ -175,6 +201,22 @@ class GetPackageRequest$Type extends MessageType<GetPackageRequest> {
|
|
|
175
201
|
constructor() {
|
|
176
202
|
super('sui.rpc.v2.GetPackageRequest', [
|
|
177
203
|
{ no: 1, name: 'package_id', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
|
|
204
|
+
{
|
|
205
|
+
no: 2,
|
|
206
|
+
name: 'version',
|
|
207
|
+
kind: 'scalar',
|
|
208
|
+
oneof: 'selector',
|
|
209
|
+
T: 4 /*ScalarType.UINT64*/,
|
|
210
|
+
L: 0 /*LongType.BIGINT*/,
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
no: 3,
|
|
214
|
+
name: 'at_checkpoint',
|
|
215
|
+
kind: 'scalar',
|
|
216
|
+
oneof: 'selector',
|
|
217
|
+
T: 4 /*ScalarType.UINT64*/,
|
|
218
|
+
L: 0 /*LongType.BIGINT*/,
|
|
219
|
+
},
|
|
178
220
|
]);
|
|
179
221
|
}
|
|
180
222
|
}
|
|
@@ -66,20 +66,89 @@ export interface QueryOptions {
|
|
|
66
66
|
ordering?: Ordering;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
69
|
+
* A point in ledger order: the boundary between the items whose keys sort
|
|
70
|
+
* below this position and the items whose keys sort at or above it.
|
|
71
|
+
*
|
|
72
|
+
* An item's key is (`sequence_number`) for a `Checkpoint`, (`checkpoint`,
|
|
73
|
+
* `transaction_index`) for an `ExecutedTransaction`, and (`checkpoint`,
|
|
74
|
+
* `transaction_index`, `event_index`) for an `Event`. Keys and positions sort
|
|
75
|
+
* lexicographically, with unset fields counting as 0.
|
|
76
|
+
*
|
|
77
|
+
* An index past the last transaction of a checkpoint, or past the last event of
|
|
78
|
+
* a transaction, names the start of the next one, so different positions can
|
|
79
|
+
* name the same boundary: after the last of checkpoint `c`'s `n` transactions,
|
|
80
|
+
* both (`c`, `n`) and (`c + 1`, 0) name the start of checkpoint `c + 1`.
|
|
81
|
+
* Sorting never contradicts ledger order: a position that sorts below another
|
|
82
|
+
* is at or before it. Use comparisons to drop what is behind, and never assume
|
|
83
|
+
* that positions that differ name different boundaries.
|
|
84
|
+
*
|
|
85
|
+
* To bound a request at a position: as its start, set `start_checkpoint` to
|
|
86
|
+
* `checkpoint` and, when either index is nonzero, the start index fields to
|
|
87
|
+
* both indexes, including one that is 0 (`start_transaction_index`, plus
|
|
88
|
+
* `start_event_index` for events). As its end, set `end_checkpoint` to
|
|
89
|
+
* `checkpoint` when both indexes are 0; otherwise set `end_checkpoint` to
|
|
90
|
+
* `checkpoint + 1` and the end index fields to both indexes
|
|
91
|
+
* (`end_transaction_index`, plus `end_event_index` for events). Checkpoint
|
|
92
|
+
* positions carry only `checkpoint`, so they set only `start_checkpoint` or
|
|
93
|
+
* `end_checkpoint`.
|
|
94
|
+
*
|
|
95
|
+
* @generated from protobuf message sui.rpc.v2.LedgerPosition
|
|
96
|
+
*/
|
|
97
|
+
export interface LedgerPosition {
|
|
98
|
+
/**
|
|
99
|
+
* Checkpoint sequence number.
|
|
100
|
+
*
|
|
101
|
+
* @generated from protobuf field: optional uint64 checkpoint = 1;
|
|
102
|
+
*/
|
|
103
|
+
checkpoint?: bigint;
|
|
104
|
+
/**
|
|
105
|
+
* Zero-based position of a transaction within `checkpoint`.
|
|
106
|
+
*
|
|
107
|
+
* @generated from protobuf field: optional uint64 transaction_index = 2;
|
|
108
|
+
*/
|
|
109
|
+
transactionIndex?: bigint;
|
|
110
|
+
/**
|
|
111
|
+
* Zero-based index of an event within its transaction's event list. Event
|
|
112
|
+
* streams only.
|
|
113
|
+
*
|
|
114
|
+
* @generated from protobuf field: optional uint32 event_index = 3;
|
|
115
|
+
*/
|
|
116
|
+
eventIndex?: number;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Progress of a scan, carried on every response frame, whether or not the
|
|
120
|
+
* frame delivers a matching item. Watermarks never regress in the requested
|
|
121
|
+
* ordering, but consecutive frames may carry the same watermark when
|
|
72
122
|
* additional work does not advance the safe resume frontier.
|
|
73
123
|
*
|
|
124
|
+
* A watermark has two parts:
|
|
125
|
+
*
|
|
126
|
+
* - The resume point, in two forms: `cursor`, opaque, for the server, and
|
|
127
|
+
* `cursor_position`, in ledger coordinates, for clients to order frames and
|
|
128
|
+
* drop duplicates.
|
|
129
|
+
* - Coverage: `checkpoint`, the boundary checkpoint the scan has proven fully
|
|
130
|
+
* covered. It trails the resume point.
|
|
131
|
+
*
|
|
132
|
+
* To continue in the same direction, set the request's start (ascending) or
|
|
133
|
+
* end (descending) at `cursor_position`. To read in the other direction, set
|
|
134
|
+
* the other bound at `cursor_position` from a frame without an item; from a
|
|
135
|
+
* frame with an item, start a page after the item at its key with the finest
|
|
136
|
+
* index incremented, or end a page before it at its key. In both cases pass
|
|
137
|
+
* `cursor` as `options.after` with a start and as `options.before` with an
|
|
138
|
+
* end.
|
|
139
|
+
*
|
|
74
140
|
* @generated from protobuf message sui.rpc.v2.Watermark
|
|
75
141
|
*/
|
|
76
142
|
export interface Watermark {
|
|
77
143
|
/**
|
|
78
|
-
* Opaque cursor at
|
|
144
|
+
* Opaque cursor at the resume point. Set on every watermark. Use as
|
|
79
145
|
* `options.after` (ascending) or `options.before` (descending) on the next
|
|
80
146
|
* request to resume from here. The most recently received cursor is always
|
|
81
147
|
* the safe resume point.
|
|
82
148
|
*
|
|
149
|
+
* Pass cursors back unchanged; never compare or inspect them. Cursors that
|
|
150
|
+
* differ can name the same point, and their encoding may change.
|
|
151
|
+
*
|
|
83
152
|
* @generated from protobuf field: optional bytes cursor = 1;
|
|
84
153
|
*/
|
|
85
154
|
cursor?: Uint8Array;
|
|
@@ -100,6 +169,30 @@ export interface Watermark {
|
|
|
100
169
|
* @generated from protobuf field: optional uint64 checkpoint = 2;
|
|
101
170
|
*/
|
|
102
171
|
checkpoint?: bigint;
|
|
172
|
+
/**
|
|
173
|
+
* The resume point in ledger coordinates. Set on every watermark by servers
|
|
174
|
+
* that support it.
|
|
175
|
+
*
|
|
176
|
+
* Ascending, every match from the request's start up to (excluding)
|
|
177
|
+
* `cursor_position` has been delivered. Descending, every match from
|
|
178
|
+
* `cursor_position` up to (excluding) the request's end has been delivered.
|
|
179
|
+
*
|
|
180
|
+
* On a frame that carries an item, ascending, it is the boundary just past
|
|
181
|
+
* the item, so it is not the item's own key: it is that key with its finest
|
|
182
|
+
* index incremented (`event_index` for events, `transaction_index` for
|
|
183
|
+
* transactions, `checkpoint` for checkpoints). Descending, it is the boundary
|
|
184
|
+
* just before the item, which is the item's key.
|
|
185
|
+
*
|
|
186
|
+
* It never moves before the request's start (ascending) or past its end
|
|
187
|
+
* (descending), so an ascending request that starts beyond what the server
|
|
188
|
+
* has indexed gets its start echoed back: the resume point says where the
|
|
189
|
+
* client is, not where the ledger is. `cursor` may then name an earlier
|
|
190
|
+
* point; bounds intersect, so resuming with both starts at
|
|
191
|
+
* `cursor_position`.
|
|
192
|
+
*
|
|
193
|
+
* @generated from protobuf field: optional sui.rpc.v2.LedgerPosition cursor_position = 4;
|
|
194
|
+
*/
|
|
195
|
+
cursorPosition?: LedgerPosition;
|
|
103
196
|
}
|
|
104
197
|
/**
|
|
105
198
|
* Marker for the final frame of a successful query stream. Every successful
|
|
@@ -130,13 +223,13 @@ export interface QueryEnd {
|
|
|
130
223
|
*/
|
|
131
224
|
export enum Ordering {
|
|
132
225
|
/**
|
|
133
|
-
* Return results in increasing
|
|
226
|
+
* Return results in increasing ledger order.
|
|
134
227
|
*
|
|
135
228
|
* @generated from protobuf enum value: ORDERING_ASCENDING = 0;
|
|
136
229
|
*/
|
|
137
230
|
ASCENDING = 0,
|
|
138
231
|
/**
|
|
139
|
-
* Return results in decreasing
|
|
232
|
+
* Return results in decreasing ledger order.
|
|
140
233
|
*
|
|
141
234
|
* @generated from protobuf enum value: ORDERING_DESCENDING = 1;
|
|
142
235
|
*/
|
|
@@ -172,8 +265,10 @@ export enum QueryEndReason {
|
|
|
172
265
|
*/
|
|
173
266
|
SCAN_LIMIT = 2,
|
|
174
267
|
/**
|
|
175
|
-
* The scan reached
|
|
176
|
-
*
|
|
268
|
+
* The scan reached the edge of the window the request set: its checkpoint
|
|
269
|
+
* range bound, or a start or end position the request set within a
|
|
270
|
+
* checkpoint at that range's edge (for example `end_transaction_index` on
|
|
271
|
+
* `ListTransactionsRequest`). The terminal frame carries no item.
|
|
177
272
|
*
|
|
178
273
|
* @generated from protobuf enum value: QUERY_END_REASON_CHECKPOINT_BOUND = 3;
|
|
179
274
|
*/
|
|
@@ -216,6 +311,34 @@ class QueryOptions$Type extends MessageType<QueryOptions> {
|
|
|
216
311
|
*/
|
|
217
312
|
export const QueryOptions = new QueryOptions$Type();
|
|
218
313
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
314
|
+
class LedgerPosition$Type extends MessageType<LedgerPosition> {
|
|
315
|
+
constructor() {
|
|
316
|
+
super('sui.rpc.v2.LedgerPosition', [
|
|
317
|
+
{
|
|
318
|
+
no: 1,
|
|
319
|
+
name: 'checkpoint',
|
|
320
|
+
kind: 'scalar',
|
|
321
|
+
opt: true,
|
|
322
|
+
T: 4 /*ScalarType.UINT64*/,
|
|
323
|
+
L: 0 /*LongType.BIGINT*/,
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
no: 2,
|
|
327
|
+
name: 'transaction_index',
|
|
328
|
+
kind: 'scalar',
|
|
329
|
+
opt: true,
|
|
330
|
+
T: 4 /*ScalarType.UINT64*/,
|
|
331
|
+
L: 0 /*LongType.BIGINT*/,
|
|
332
|
+
},
|
|
333
|
+
{ no: 3, name: 'event_index', kind: 'scalar', opt: true, T: 13 /*ScalarType.UINT32*/ },
|
|
334
|
+
]);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* @generated MessageType for protobuf message sui.rpc.v2.LedgerPosition
|
|
339
|
+
*/
|
|
340
|
+
export const LedgerPosition = new LedgerPosition$Type();
|
|
341
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
219
342
|
class Watermark$Type extends MessageType<Watermark> {
|
|
220
343
|
constructor() {
|
|
221
344
|
super('sui.rpc.v2.Watermark', [
|
|
@@ -228,6 +351,7 @@ class Watermark$Type extends MessageType<Watermark> {
|
|
|
228
351
|
T: 4 /*ScalarType.UINT64*/,
|
|
229
352
|
L: 0 /*LongType.BIGINT*/,
|
|
230
353
|
},
|
|
354
|
+
{ no: 4, name: 'cursor_position', kind: 'message', T: () => LedgerPosition },
|
|
231
355
|
]);
|
|
232
356
|
}
|
|
233
357
|
}
|
|
@@ -41,7 +41,7 @@ export interface UserSignature {
|
|
|
41
41
|
| {
|
|
42
42
|
oneofKind: 'simple';
|
|
43
43
|
/**
|
|
44
|
-
* Simple signature if scheme is ed25519 | secp256k1 | secp256r1.
|
|
44
|
+
* Simple signature if scheme is ed25519 | secp256k1 | secp256r1 | mldsa65.
|
|
45
45
|
*
|
|
46
46
|
* @generated from protobuf field: sui.rpc.v2.SimpleSignature simple = 3;
|
|
47
47
|
*/
|
|
@@ -79,7 +79,7 @@ export interface UserSignature {
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
* Either an ed25519, secp256k1 or
|
|
82
|
+
* Either an ed25519, secp256k1, secp256r1 or mldsa65 signature
|
|
83
83
|
*
|
|
84
84
|
* @generated from protobuf message sui.rpc.v2.SimpleSignature
|
|
85
85
|
*/
|
|
@@ -133,7 +133,7 @@ export interface MultisigMemberPublicKey {
|
|
|
133
133
|
*/
|
|
134
134
|
scheme?: SignatureScheme;
|
|
135
135
|
/**
|
|
136
|
-
* Public key bytes if scheme is ed25519 | secp256k1 | secp256r1 | passkey.
|
|
136
|
+
* Public key bytes if scheme is ed25519 | secp256k1 | secp256r1 | passkey | mldsa65.
|
|
137
137
|
*
|
|
138
138
|
* @generated from protobuf field: optional bytes public_key = 2;
|
|
139
139
|
*/
|
|
@@ -232,7 +232,7 @@ export interface MultisigMemberSignature {
|
|
|
232
232
|
*/
|
|
233
233
|
scheme?: SignatureScheme;
|
|
234
234
|
/**
|
|
235
|
-
* Signature bytes if scheme is ed25519 | secp256k1 | secp256r1.
|
|
235
|
+
* Signature bytes if scheme is ed25519 | secp256k1 | secp256r1 | mldsa65.
|
|
236
236
|
*
|
|
237
237
|
* @generated from protobuf field: optional bytes signature = 2;
|
|
238
238
|
*/
|