wowok 2.1.40 → 2.1.41
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/dist/cjs/bcs/bcs.js +1 -253
- package/dist/cjs/bcs/effects.js +1 -199
- package/dist/cjs/bcs/index.js +1 -51
- package/dist/cjs/bcs/pure.js +1 -36
- package/dist/cjs/bcs/type-tag-serializer.js +1 -104
- package/dist/cjs/bcs/types.js +1 -3
- package/dist/cjs/client/index.js +1 -4
- package/dist/cjs/client/network.js +1 -15
- package/dist/cjs/cryptography/index.js +1 -6
- package/dist/cjs/cryptography/intent.js +1 -14
- package/dist/cjs/cryptography/keypair.js +1 -74
- package/dist/cjs/cryptography/mnemonics.js +1 -20
- package/dist/cjs/cryptography/publickey.js +1 -80
- package/dist/cjs/cryptography/signature-scheme.js +1 -22
- package/dist/cjs/cryptography/signature.js +1 -41
- package/dist/cjs/experimental/cache.js +1 -58
- package/dist/cjs/experimental/client.js +1 -19
- package/dist/cjs/experimental/core.js +1 -80
- package/dist/cjs/experimental/errors.js +1 -24
- package/dist/cjs/experimental/index.js +1 -5
- package/dist/cjs/experimental/persistent-storage.js +1 -220
- package/dist/cjs/experimental/persistent-storage.test.js +1 -144
- package/dist/cjs/experimental/transports/utils.js +1 -96
- package/dist/cjs/experimental/types.js +1 -1
- package/dist/cjs/faucet/faucet.js +1 -99
- package/dist/cjs/faucet/index.js +1 -1
- package/dist/cjs/grpc/client.js +1 -42
- package/dist/cjs/grpc/core.js +1 -587
- package/dist/cjs/grpc/index.js +1 -2
- package/dist/cjs/grpc/proto/google/protobuf/any.js +1 -106
- package/dist/cjs/grpc/proto/google/protobuf/duration.js +1 -58
- package/dist/cjs/grpc/proto/google/protobuf/empty.js +1 -7
- package/dist/cjs/grpc/proto/google/protobuf/field_mask.js +1 -47
- package/dist/cjs/grpc/proto/google/protobuf/struct.js +1 -191
- package/dist/cjs/grpc/proto/google/protobuf/timestamp.js +1 -91
- package/dist/cjs/grpc/proto/google/rpc/error_details.js +1 -265
- package/dist/cjs/grpc/proto/google/rpc/status.js +1 -23
- package/dist/cjs/grpc/proto/sui/rpc/v2/argument.js +1 -46
- package/dist/cjs/grpc/proto/sui/rpc/v2/balance_change.js +1 -29
- package/dist/cjs/grpc/proto/sui/rpc/v2/bcs.js +1 -22
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.js +1 -54
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_contents.js +1 -60
- package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_summary.js +1 -144
- package/dist/cjs/grpc/proto/sui/rpc/v2/effects.js +1 -271
- package/dist/cjs/grpc/proto/sui/rpc/v2/epoch.js +1 -64
- package/dist/cjs/grpc/proto/sui/rpc/v2/error_reason.js +1 -6
- package/dist/cjs/grpc/proto/sui/rpc/v2/event.js +1 -62
- package/dist/cjs/grpc/proto/sui/rpc/v2/executed_transaction.js +1 -64
- package/dist/cjs/grpc/proto/sui/rpc/v2/execution_status.js +1 -481
- package/dist/cjs/grpc/proto/sui/rpc/v2/gas_cost_summary.js +1 -40
- package/dist/cjs/grpc/proto/sui/rpc/v2/input.js +1 -61
- package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.js +1 -57
- package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.client.js +1 -39
- package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.js +1 -329
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package.js +1 -447
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.client.js +1 -27
- package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.js +1 -206
- package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.client.js +1 -19
- package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.js +1 -109
- package/dist/cjs/grpc/proto/sui/rpc/v2/object.js +1 -90
- package/dist/cjs/grpc/proto/sui/rpc/v2/object_reference.js +1 -30
- package/dist/cjs/grpc/proto/sui/rpc/v2/owner.js +1 -39
- package/dist/cjs/grpc/proto/sui/rpc/v2/protocol_config.js +1 -30
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature.js +1 -501
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_scheme.js +1 -10
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.client.js +1 -15
- package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.js +1 -62
- package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.js +1 -31
- package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.js +1 -504
- package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.client.js +1 -15
- package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.js +1 -37
- package/dist/cjs/grpc/proto/sui/rpc/v2/system_state.js +1 -709
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction.js +1 -950
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js +1 -19
- package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.js +1 -144
- package/dist/cjs/index.js +1 -22
- package/dist/cjs/jsonRpc/client.js +1 -516
- package/dist/cjs/jsonRpc/core.js +1 -587
- package/dist/cjs/jsonRpc/errors.js +1 -38
- package/dist/cjs/jsonRpc/http-transport.js +1 -70
- package/dist/cjs/jsonRpc/index.js +1 -3
- package/dist/cjs/jsonRpc/json-rpc-resolver.js +1 -296
- package/dist/cjs/jsonRpc/rpc-websocket-client.js +1 -155
- package/dist/cjs/jsonRpc/types/chain.js +1 -1
- package/dist/cjs/jsonRpc/types/changes.js +1 -1
- package/dist/cjs/jsonRpc/types/coins.js +1 -1
- package/dist/cjs/jsonRpc/types/common.js +1 -1
- package/dist/cjs/jsonRpc/types/generated.js +1 -1
- package/dist/cjs/jsonRpc/types/index.js +1 -1
- package/dist/cjs/jsonRpc/types/params.js +1 -1
- package/dist/cjs/keypairs/ed25519/ed25519-hd-key.js +1 -58
- package/dist/cjs/keypairs/ed25519/index.js +1 -2
- package/dist/cjs/keypairs/ed25519/keypair.js +1 -90
- package/dist/cjs/keypairs/ed25519/publickey.js +1 -50
- package/dist/cjs/keypairs/index.js +1 -4
- package/dist/cjs/keypairs/passkey/index.js +1 -2
- package/dist/cjs/keypairs/passkey/keypair.js +1 -155
- package/dist/cjs/keypairs/passkey/publickey.js +1 -117
- package/dist/cjs/keypairs/passkey/types.js +1 -1
- package/dist/cjs/keypairs/secp256k1/index.js +1 -2
- package/dist/cjs/keypairs/secp256k1/keypair.js +1 -82
- package/dist/cjs/keypairs/secp256k1/publickey.js +1 -51
- package/dist/cjs/keypairs/secp256r1/index.js +1 -2
- package/dist/cjs/keypairs/secp256r1/keypair.js +1 -78
- package/dist/cjs/keypairs/secp256r1/publickey.js +1 -52
- package/dist/cjs/multisig/index.js +1 -2
- package/dist/cjs/multisig/publickey.js +1 -201
- package/dist/cjs/multisig/signer.js +1 -58
- package/dist/cjs/transactions/Arguments.js +1 -9
- package/dist/cjs/transactions/Commands.js +1 -102
- package/dist/cjs/transactions/Inputs.js +1 -52
- package/dist/cjs/transactions/ObjectCache.js +1 -205
- package/dist/cjs/transactions/Transaction.js +1 -574
- package/dist/cjs/transactions/TransactionData.js +1 -409
- package/dist/cjs/transactions/__tests__/Transaction.test.js +1 -160
- package/dist/cjs/transactions/__tests__/bcs.test.js +1 -182
- package/dist/cjs/transactions/data/internal.js +1 -169
- package/dist/cjs/transactions/data/v1.js +1 -469
- package/dist/cjs/transactions/data/v2.js +1 -97
- package/dist/cjs/transactions/executor/caching.js +1 -65
- package/dist/cjs/transactions/executor/parallel.js +1 -347
- package/dist/cjs/transactions/executor/queue.js +1 -59
- package/dist/cjs/transactions/executor/serial.js +1 -99
- package/dist/cjs/transactions/hash.js +1 -8
- package/dist/cjs/transactions/index.js +1 -12
- package/dist/cjs/transactions/intents/CoinWithBalance.js +1 -145
- package/dist/cjs/transactions/object.js +1 -87
- package/dist/cjs/transactions/plugins/NamedPackagesPlugin.js +1 -11
- package/dist/cjs/transactions/pure.js +1 -36
- package/dist/cjs/transactions/resolve.js +1 -69
- package/dist/cjs/transactions/serializer.js +1 -167
- package/dist/cjs/transactions/utils.js +1 -121
- package/dist/cjs/utils/constants.js +1 -18
- package/dist/cjs/utils/derived-objects.js +1 -8
- package/dist/cjs/utils/dynamic-fields.js +1 -17
- package/dist/cjs/utils/format.js +1 -11
- package/dist/cjs/utils/index.js +1 -8
- package/dist/cjs/utils/move-registry.js +1 -24
- package/dist/cjs/utils/sui-types.js +1 -66
- package/dist/cjs/utils/suins.js +1 -33
- package/dist/cjs/verify/index.js +1 -1
- package/dist/cjs/verify/verify.js +1 -87
- package/dist/cjs/version.js +1 -2
- package/dist/cjs/w/call/allocation.js +1 -345
- package/dist/cjs/w/call/arb.js +1 -103
- package/dist/cjs/w/call/arbitration.js +1 -1192
- package/dist/cjs/w/call/base.js +1 -293
- package/dist/cjs/w/call/contact.js +1 -345
- package/dist/cjs/w/call/demand.js +1 -681
- package/dist/cjs/w/call/entity.js +1 -173
- package/dist/cjs/w/call/guard-ins.js +1 -4449
- package/dist/cjs/w/call/guard.d.ts +111 -0
- package/dist/cjs/w/call/guard.js +1 -1048
- package/dist/cjs/w/call/index.js +1 -22
- package/dist/cjs/w/call/machine.js +1 -1127
- package/dist/cjs/w/call/order.js +1 -337
- package/dist/cjs/w/call/passport.js +1 -220
- package/dist/cjs/w/call/payment.js +1 -178
- package/dist/cjs/w/call/permission.js +1 -1162
- package/dist/cjs/w/call/personal.js +1 -139
- package/dist/cjs/w/call/progress.js +1 -678
- package/dist/cjs/w/call/proof.js +1 -66
- package/dist/cjs/w/call/repository.js +1 -1024
- package/dist/cjs/w/call/resource.js +1 -108
- package/dist/cjs/w/call/reward.js +1 -675
- package/dist/cjs/w/call/service.js +1 -1960
- package/dist/cjs/w/call/treasury.js +1 -873
- package/dist/cjs/w/call/util.d.ts +1 -0
- package/dist/cjs/w/call/util.js +1 -566
- package/dist/cjs/w/common.js +1 -571
- package/dist/cjs/w/exception.js +1 -618
- package/dist/cjs/w/index.js +1 -8
- package/dist/cjs/w/local/account.js +1 -656
- package/dist/cjs/w/local/cache.js +1 -161
- package/dist/cjs/w/local/config.js +1 -43
- package/dist/cjs/w/local/index.js +1 -228
- package/dist/cjs/w/local/local.js +1 -574
- package/dist/cjs/w/local/storage.js +1 -185
- package/dist/cjs/w/local/token.js +1 -131
- package/dist/cjs/w/local/util.js +1 -26
- package/dist/cjs/w/local/wip.js +1 -864
- package/dist/cjs/w/messenger/crypto.js +1 -380
- package/dist/cjs/w/messenger/index.js +1 -4
- package/dist/cjs/w/messenger/messenger-api.js +1 -1154
- package/dist/cjs/w/messenger/messenger-manager.js +1 -1003
- package/dist/cjs/w/messenger/messenger.js +1 -1093
- package/dist/cjs/w/messenger/server.js +1 -343
- package/dist/cjs/w/messenger/session.js +1 -628
- package/dist/cjs/w/messenger/storage.js +1 -1023
- package/dist/cjs/w/messenger/templates/wts-html-template.js +1 -371
- package/dist/cjs/w/messenger/types.js +1 -76
- package/dist/cjs/w/messenger/utils.js +1 -12
- package/dist/cjs/w/query/bult-in.js +1 -95
- package/dist/cjs/w/query/event.js +1 -137
- package/dist/cjs/w/query/index.js +1 -5
- package/dist/cjs/w/query/object.js +1 -1550
- package/dist/cjs/w/query/received.js +1 -62
- package/dist/cjs/w/query/util.js +1 -49
- package/dist/cjs/w/util.js +1 -587
- package/dist/esm/bcs/bcs.js +1 -253
- package/dist/esm/bcs/effects.js +1 -199
- package/dist/esm/bcs/index.js +1 -51
- package/dist/esm/bcs/pure.js +1 -36
- package/dist/esm/bcs/type-tag-serializer.js +1 -104
- package/dist/esm/bcs/types.js +1 -3
- package/dist/esm/client/index.js +1 -4
- package/dist/esm/client/network.js +1 -15
- package/dist/esm/cryptography/index.js +1 -6
- package/dist/esm/cryptography/intent.js +1 -14
- package/dist/esm/cryptography/keypair.js +1 -74
- package/dist/esm/cryptography/mnemonics.js +1 -20
- package/dist/esm/cryptography/publickey.js +1 -80
- package/dist/esm/cryptography/signature-scheme.js +1 -22
- package/dist/esm/cryptography/signature.js +1 -41
- package/dist/esm/experimental/cache.js +1 -58
- package/dist/esm/experimental/client.js +1 -19
- package/dist/esm/experimental/core.js +1 -80
- package/dist/esm/experimental/errors.js +1 -24
- package/dist/esm/experimental/index.js +1 -5
- package/dist/esm/experimental/persistent-storage.js +1 -220
- package/dist/esm/experimental/persistent-storage.test.js +1 -144
- package/dist/esm/experimental/transports/utils.js +1 -96
- package/dist/esm/experimental/types.js +1 -1
- package/dist/esm/faucet/faucet.js +1 -99
- package/dist/esm/faucet/index.js +1 -1
- package/dist/esm/grpc/client.js +1 -42
- package/dist/esm/grpc/core.js +1 -587
- package/dist/esm/grpc/index.js +1 -2
- package/dist/esm/grpc/proto/google/protobuf/any.js +1 -106
- package/dist/esm/grpc/proto/google/protobuf/duration.js +1 -58
- package/dist/esm/grpc/proto/google/protobuf/empty.js +1 -7
- package/dist/esm/grpc/proto/google/protobuf/field_mask.js +1 -47
- package/dist/esm/grpc/proto/google/protobuf/struct.js +1 -191
- package/dist/esm/grpc/proto/google/protobuf/timestamp.js +1 -91
- package/dist/esm/grpc/proto/google/rpc/error_details.js +1 -265
- package/dist/esm/grpc/proto/google/rpc/status.js +1 -23
- package/dist/esm/grpc/proto/sui/rpc/v2/argument.js +1 -46
- package/dist/esm/grpc/proto/sui/rpc/v2/balance_change.js +1 -29
- package/dist/esm/grpc/proto/sui/rpc/v2/bcs.js +1 -22
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.js +1 -54
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_contents.js +1 -60
- package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_summary.js +1 -144
- package/dist/esm/grpc/proto/sui/rpc/v2/effects.js +1 -271
- package/dist/esm/grpc/proto/sui/rpc/v2/epoch.js +1 -64
- package/dist/esm/grpc/proto/sui/rpc/v2/error_reason.js +1 -6
- package/dist/esm/grpc/proto/sui/rpc/v2/event.js +1 -62
- package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.js +1 -64
- package/dist/esm/grpc/proto/sui/rpc/v2/execution_status.js +1 -481
- package/dist/esm/grpc/proto/sui/rpc/v2/gas_cost_summary.js +1 -40
- package/dist/esm/grpc/proto/sui/rpc/v2/input.js +1 -61
- package/dist/esm/grpc/proto/sui/rpc/v2/jwk.js +1 -57
- package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.js +1 -39
- package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.js +1 -329
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package.js +1 -447
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.client.js +1 -27
- package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.js +1 -206
- package/dist/esm/grpc/proto/sui/rpc/v2/name_service.client.js +1 -19
- package/dist/esm/grpc/proto/sui/rpc/v2/name_service.js +1 -109
- package/dist/esm/grpc/proto/sui/rpc/v2/object.js +1 -90
- package/dist/esm/grpc/proto/sui/rpc/v2/object_reference.js +1 -30
- package/dist/esm/grpc/proto/sui/rpc/v2/owner.js +1 -39
- package/dist/esm/grpc/proto/sui/rpc/v2/protocol_config.js +1 -30
- package/dist/esm/grpc/proto/sui/rpc/v2/signature.js +1 -501
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_scheme.js +1 -10
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.client.js +1 -15
- package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.js +1 -62
- package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.js +1 -31
- package/dist/esm/grpc/proto/sui/rpc/v2/state_service.js +1 -504
- package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.client.js +1 -15
- package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.js +1 -37
- package/dist/esm/grpc/proto/sui/rpc/v2/system_state.js +1 -709
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction.js +1 -950
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js +1 -19
- package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.js +1 -144
- package/dist/esm/index.js +1 -22
- package/dist/esm/jsonRpc/client.js +1 -516
- package/dist/esm/jsonRpc/core.js +1 -587
- package/dist/esm/jsonRpc/errors.js +1 -38
- package/dist/esm/jsonRpc/http-transport.js +1 -70
- package/dist/esm/jsonRpc/index.js +1 -3
- package/dist/esm/jsonRpc/json-rpc-resolver.js +1 -296
- package/dist/esm/jsonRpc/rpc-websocket-client.js +1 -155
- package/dist/esm/jsonRpc/types/chain.js +1 -1
- package/dist/esm/jsonRpc/types/changes.js +1 -1
- package/dist/esm/jsonRpc/types/coins.js +1 -1
- package/dist/esm/jsonRpc/types/common.js +1 -1
- package/dist/esm/jsonRpc/types/generated.js +1 -1
- package/dist/esm/jsonRpc/types/index.js +1 -1
- package/dist/esm/jsonRpc/types/params.js +1 -1
- package/dist/esm/keypairs/ed25519/ed25519-hd-key.js +1 -58
- package/dist/esm/keypairs/ed25519/index.js +1 -2
- package/dist/esm/keypairs/ed25519/keypair.js +1 -90
- package/dist/esm/keypairs/ed25519/publickey.js +1 -50
- package/dist/esm/keypairs/index.js +1 -4
- package/dist/esm/keypairs/passkey/index.js +1 -2
- package/dist/esm/keypairs/passkey/keypair.js +1 -155
- package/dist/esm/keypairs/passkey/publickey.js +1 -117
- package/dist/esm/keypairs/passkey/types.js +1 -1
- package/dist/esm/keypairs/secp256k1/index.js +1 -2
- package/dist/esm/keypairs/secp256k1/keypair.js +1 -82
- package/dist/esm/keypairs/secp256k1/publickey.js +1 -51
- package/dist/esm/keypairs/secp256r1/index.js +1 -2
- package/dist/esm/keypairs/secp256r1/keypair.js +1 -78
- package/dist/esm/keypairs/secp256r1/publickey.js +1 -52
- package/dist/esm/multisig/index.js +1 -2
- package/dist/esm/multisig/publickey.js +1 -201
- package/dist/esm/multisig/signer.js +1 -58
- package/dist/esm/transactions/Arguments.js +1 -9
- package/dist/esm/transactions/Commands.js +1 -102
- package/dist/esm/transactions/Inputs.js +1 -52
- package/dist/esm/transactions/ObjectCache.js +1 -205
- package/dist/esm/transactions/Transaction.js +1 -574
- package/dist/esm/transactions/TransactionData.js +1 -409
- package/dist/esm/transactions/__tests__/Transaction.test.js +1 -160
- package/dist/esm/transactions/__tests__/bcs.test.js +1 -182
- package/dist/esm/transactions/data/internal.js +1 -169
- package/dist/esm/transactions/data/v1.js +1 -469
- package/dist/esm/transactions/data/v2.js +1 -97
- package/dist/esm/transactions/executor/caching.js +1 -65
- package/dist/esm/transactions/executor/parallel.js +1 -347
- package/dist/esm/transactions/executor/queue.js +1 -59
- package/dist/esm/transactions/executor/serial.js +1 -99
- package/dist/esm/transactions/hash.js +1 -8
- package/dist/esm/transactions/index.js +1 -12
- package/dist/esm/transactions/intents/CoinWithBalance.js +1 -145
- package/dist/esm/transactions/object.js +1 -87
- package/dist/esm/transactions/plugins/NamedPackagesPlugin.js +1 -11
- package/dist/esm/transactions/pure.js +1 -36
- package/dist/esm/transactions/resolve.js +1 -69
- package/dist/esm/transactions/serializer.js +1 -167
- package/dist/esm/transactions/utils.js +1 -121
- package/dist/esm/utils/constants.js +1 -18
- package/dist/esm/utils/derived-objects.js +1 -8
- package/dist/esm/utils/dynamic-fields.js +1 -17
- package/dist/esm/utils/format.js +1 -11
- package/dist/esm/utils/index.js +1 -8
- package/dist/esm/utils/move-registry.js +1 -24
- package/dist/esm/utils/sui-types.js +1 -66
- package/dist/esm/utils/suins.js +1 -33
- package/dist/esm/verify/index.js +1 -1
- package/dist/esm/verify/verify.js +1 -87
- package/dist/esm/version.js +1 -2
- package/dist/esm/w/call/allocation.js +1 -345
- package/dist/esm/w/call/arb.js +1 -103
- package/dist/esm/w/call/arbitration.js +1 -1192
- package/dist/esm/w/call/base.js +1 -293
- package/dist/esm/w/call/contact.js +1 -345
- package/dist/esm/w/call/demand.js +1 -681
- package/dist/esm/w/call/entity.js +1 -173
- package/dist/esm/w/call/guard-ins.js +1 -4449
- package/dist/esm/w/call/guard.d.ts +111 -0
- package/dist/esm/w/call/guard.js +1 -1048
- package/dist/esm/w/call/index.js +1 -22
- package/dist/esm/w/call/machine.js +1 -1127
- package/dist/esm/w/call/order.js +1 -337
- package/dist/esm/w/call/passport.js +1 -220
- package/dist/esm/w/call/payment.js +1 -178
- package/dist/esm/w/call/permission.js +1 -1162
- package/dist/esm/w/call/personal.js +1 -139
- package/dist/esm/w/call/progress.js +1 -678
- package/dist/esm/w/call/proof.js +1 -66
- package/dist/esm/w/call/repository.js +1 -1024
- package/dist/esm/w/call/resource.js +1 -108
- package/dist/esm/w/call/reward.js +1 -675
- package/dist/esm/w/call/service.js +1 -1960
- package/dist/esm/w/call/treasury.js +1 -873
- package/dist/esm/w/call/util.d.ts +1 -0
- package/dist/esm/w/call/util.js +1 -566
- package/dist/esm/w/common.js +1 -571
- package/dist/esm/w/exception.js +1 -618
- package/dist/esm/w/index.js +1 -8
- package/dist/esm/w/local/account.js +1 -656
- package/dist/esm/w/local/cache.js +1 -161
- package/dist/esm/w/local/config.js +1 -43
- package/dist/esm/w/local/index.js +1 -228
- package/dist/esm/w/local/local.js +1 -574
- package/dist/esm/w/local/storage.js +1 -185
- package/dist/esm/w/local/token.js +1 -131
- package/dist/esm/w/local/util.js +1 -26
- package/dist/esm/w/local/wip.js +1 -864
- package/dist/esm/w/messenger/crypto.js +1 -380
- package/dist/esm/w/messenger/index.js +1 -4
- package/dist/esm/w/messenger/messenger-api.js +1 -1154
- package/dist/esm/w/messenger/messenger-manager.js +1 -1003
- package/dist/esm/w/messenger/messenger.js +1 -1093
- package/dist/esm/w/messenger/server.js +1 -343
- package/dist/esm/w/messenger/session.js +1 -628
- package/dist/esm/w/messenger/storage.js +1 -1023
- package/dist/esm/w/messenger/templates/wts-html-template.js +1 -371
- package/dist/esm/w/messenger/types.js +1 -76
- package/dist/esm/w/messenger/utils.js +1 -12
- package/dist/esm/w/query/bult-in.js +1 -95
- package/dist/esm/w/query/event.js +1 -137
- package/dist/esm/w/query/index.js +1 -5
- package/dist/esm/w/query/object.js +1 -1550
- package/dist/esm/w/query/received.js +1 -62
- package/dist/esm/w/query/util.js +1 -49
- package/dist/esm/w/util.js +1 -587
- package/package.json +5 -2
package/dist/cjs/jsonRpc/core.js
CHANGED
|
@@ -1,587 +1 @@
|
|
|
1
|
-
import { fromBase64 } from "@mysten/bcs";
|
|
2
|
-
import { bcs } from "../bcs/index.js";
|
|
3
|
-
import { Transaction } from "../transactions/Transaction.js";
|
|
4
|
-
import { jsonRpcClientResolveTransactionPlugin } from "./json-rpc-resolver.js";
|
|
5
|
-
import { TransactionDataBuilder } from "../transactions/TransactionData.js";
|
|
6
|
-
import { chunk } from "@mysten/utils";
|
|
7
|
-
import { normalizeWowAddress } from "../utils/sui-types.js";
|
|
8
|
-
import { Experimental_CoreClient } from "../experimental/core.js";
|
|
9
|
-
import { ObjectError } from "../experimental/errors.js";
|
|
10
|
-
import { parseTransactionBcs, parseTransactionEffectsBcs, } from "../experimental/index.js";
|
|
11
|
-
export class JSONRpcCoreClient extends Experimental_CoreClient {
|
|
12
|
-
#jsonRpcClient;
|
|
13
|
-
constructor({ jsonRpcClient }) {
|
|
14
|
-
super({ network: jsonRpcClient.network, base: jsonRpcClient });
|
|
15
|
-
this.#jsonRpcClient = jsonRpcClient;
|
|
16
|
-
}
|
|
17
|
-
async getObjects(options) {
|
|
18
|
-
const batches = chunk(options.objectIds, 50);
|
|
19
|
-
const results = [];
|
|
20
|
-
for (const batch of batches) {
|
|
21
|
-
const objects = await this.#jsonRpcClient.multiGetObjects({
|
|
22
|
-
ids: batch,
|
|
23
|
-
options: {
|
|
24
|
-
showOwner: true,
|
|
25
|
-
showType: true,
|
|
26
|
-
showBcs: true,
|
|
27
|
-
showPreviousTransaction: true,
|
|
28
|
-
},
|
|
29
|
-
signal: options.signal,
|
|
30
|
-
});
|
|
31
|
-
for (const [idx, object] of objects.entries()) {
|
|
32
|
-
if (object.error) {
|
|
33
|
-
results.push(ObjectError.fromResponse(object.error, batch[idx]));
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
results.push(parseObject(object.data));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
objects: results,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
async getOwnedObjects(options) {
|
|
45
|
-
const objects = await this.#jsonRpcClient.getOwnedObjects({
|
|
46
|
-
owner: options.address,
|
|
47
|
-
limit: options.limit,
|
|
48
|
-
cursor: options.cursor,
|
|
49
|
-
options: {
|
|
50
|
-
showOwner: true,
|
|
51
|
-
showType: true,
|
|
52
|
-
showBcs: true,
|
|
53
|
-
showPreviousTransaction: true,
|
|
54
|
-
},
|
|
55
|
-
filter: options.type ? { StructType: options.type } : null,
|
|
56
|
-
signal: options.signal,
|
|
57
|
-
});
|
|
58
|
-
return {
|
|
59
|
-
objects: objects.data.map((result) => {
|
|
60
|
-
if (result.error) {
|
|
61
|
-
throw ObjectError.fromResponse(result.error);
|
|
62
|
-
}
|
|
63
|
-
return parseObject(result.data);
|
|
64
|
-
}),
|
|
65
|
-
hasNextPage: objects.hasNextPage,
|
|
66
|
-
cursor: objects.nextCursor ?? null,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
async getCoins(options) {
|
|
70
|
-
const coins = await this.#jsonRpcClient.getCoins({
|
|
71
|
-
owner: options.address,
|
|
72
|
-
coinType: options.coinType,
|
|
73
|
-
limit: options.limit,
|
|
74
|
-
cursor: options.cursor,
|
|
75
|
-
signal: options.signal,
|
|
76
|
-
});
|
|
77
|
-
return {
|
|
78
|
-
objects: coins.data.map((coin) => {
|
|
79
|
-
return {
|
|
80
|
-
id: coin.coinObjectId,
|
|
81
|
-
version: coin.version,
|
|
82
|
-
digest: coin.digest,
|
|
83
|
-
balance: coin.balance,
|
|
84
|
-
type: `0x2::coin::Coin<${coin.coinType}>`,
|
|
85
|
-
content: Promise.resolve(Coin.serialize({
|
|
86
|
-
id: coin.coinObjectId,
|
|
87
|
-
balance: {
|
|
88
|
-
value: coin.balance,
|
|
89
|
-
},
|
|
90
|
-
}).toBytes()),
|
|
91
|
-
owner: {
|
|
92
|
-
$kind: "ObjectOwner",
|
|
93
|
-
ObjectOwner: options.address,
|
|
94
|
-
},
|
|
95
|
-
previousTransaction: coin.previousTransaction,
|
|
96
|
-
};
|
|
97
|
-
}),
|
|
98
|
-
hasNextPage: coins.hasNextPage,
|
|
99
|
-
cursor: coins.nextCursor ?? null,
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
async getBalance(options) {
|
|
103
|
-
const balance = await this.#jsonRpcClient.getBalance({
|
|
104
|
-
owner: options.address,
|
|
105
|
-
coinType: options.coinType,
|
|
106
|
-
signal: options.signal,
|
|
107
|
-
});
|
|
108
|
-
return {
|
|
109
|
-
balance: {
|
|
110
|
-
coinType: balance.coinType,
|
|
111
|
-
balance: balance.totalBalance,
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
async getAllBalances(options) {
|
|
116
|
-
const balances = await this.#jsonRpcClient.getAllBalances({
|
|
117
|
-
owner: options.address,
|
|
118
|
-
signal: options.signal,
|
|
119
|
-
});
|
|
120
|
-
return {
|
|
121
|
-
balances: balances.map((balance) => ({
|
|
122
|
-
coinType: balance.coinType,
|
|
123
|
-
balance: balance.totalBalance,
|
|
124
|
-
})),
|
|
125
|
-
hasNextPage: false,
|
|
126
|
-
cursor: null,
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
async getTransaction(options) {
|
|
130
|
-
const transaction = await this.#jsonRpcClient.getTransactionBlock({
|
|
131
|
-
digest: options.digest,
|
|
132
|
-
options: {
|
|
133
|
-
showRawInput: true,
|
|
134
|
-
showObjectChanges: true,
|
|
135
|
-
showRawEffects: true,
|
|
136
|
-
showEvents: true,
|
|
137
|
-
showEffects: true,
|
|
138
|
-
showBalanceChanges: true,
|
|
139
|
-
},
|
|
140
|
-
signal: options.signal,
|
|
141
|
-
});
|
|
142
|
-
return {
|
|
143
|
-
transaction: parseTransaction(transaction),
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
async executeTransaction(options) {
|
|
147
|
-
const transaction = await this.#jsonRpcClient.executeTransactionBlock({
|
|
148
|
-
transactionBlock: options.transaction,
|
|
149
|
-
signature: options.signatures,
|
|
150
|
-
options: {
|
|
151
|
-
showRawEffects: true,
|
|
152
|
-
showEvents: true,
|
|
153
|
-
showObjectChanges: true,
|
|
154
|
-
showRawInput: true,
|
|
155
|
-
showEffects: true,
|
|
156
|
-
showBalanceChanges: true,
|
|
157
|
-
},
|
|
158
|
-
signal: options.signal,
|
|
159
|
-
});
|
|
160
|
-
return {
|
|
161
|
-
transaction: parseTransaction(transaction),
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
async dryRunTransaction(options) {
|
|
165
|
-
const tx = Transaction.from(options.transaction);
|
|
166
|
-
const result = await this.#jsonRpcClient.dryRunTransactionBlock({
|
|
167
|
-
transactionBlock: options.transaction,
|
|
168
|
-
signal: options.signal,
|
|
169
|
-
});
|
|
170
|
-
const { effects, objectTypes } = parseTransactionEffectsJson({
|
|
171
|
-
effects: result.effects,
|
|
172
|
-
objectChanges: result.objectChanges,
|
|
173
|
-
});
|
|
174
|
-
return {
|
|
175
|
-
transaction: {
|
|
176
|
-
digest: await tx.getDigest(),
|
|
177
|
-
epoch: null,
|
|
178
|
-
effects,
|
|
179
|
-
objectTypes: Promise.resolve(objectTypes),
|
|
180
|
-
signatures: [],
|
|
181
|
-
transaction: parseTransactionBcs(options.transaction),
|
|
182
|
-
balanceChanges: result.balanceChanges.map((change) => ({
|
|
183
|
-
coinType: change.coinType,
|
|
184
|
-
address: parseOwnerAddress(change.owner),
|
|
185
|
-
amount: change.amount,
|
|
186
|
-
})),
|
|
187
|
-
},
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
async getReferenceGasPrice(options) {
|
|
191
|
-
const referenceGasPrice = await this.#jsonRpcClient.getReferenceGasPrice({
|
|
192
|
-
signal: options?.signal,
|
|
193
|
-
});
|
|
194
|
-
return {
|
|
195
|
-
referenceGasPrice: String(referenceGasPrice),
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
async getDynamicFields(options) {
|
|
199
|
-
const dynamicFields = await this.#jsonRpcClient.getDynamicFields({
|
|
200
|
-
parentId: options.parentId,
|
|
201
|
-
limit: options.limit,
|
|
202
|
-
cursor: options.cursor,
|
|
203
|
-
});
|
|
204
|
-
return {
|
|
205
|
-
dynamicFields: dynamicFields.data.map((dynamicField) => {
|
|
206
|
-
return {
|
|
207
|
-
id: dynamicField.objectId,
|
|
208
|
-
type: dynamicField.objectType,
|
|
209
|
-
name: {
|
|
210
|
-
type: dynamicField.name.type,
|
|
211
|
-
bcs: fromBase64(dynamicField.bcsName),
|
|
212
|
-
},
|
|
213
|
-
};
|
|
214
|
-
}),
|
|
215
|
-
hasNextPage: dynamicFields.hasNextPage,
|
|
216
|
-
cursor: dynamicFields.nextCursor,
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
resolveTransactionPlugin() {
|
|
220
|
-
return jsonRpcClientResolveTransactionPlugin(this.#jsonRpcClient);
|
|
221
|
-
}
|
|
222
|
-
async getMoveFunction(options) {
|
|
223
|
-
const result = await this.#jsonRpcClient.getNormalizedMoveFunction({
|
|
224
|
-
package: options.packageId,
|
|
225
|
-
module: options.moduleName,
|
|
226
|
-
function: options.name,
|
|
227
|
-
});
|
|
228
|
-
return {
|
|
229
|
-
function: {
|
|
230
|
-
packageId: normalizeWowAddress(options.packageId),
|
|
231
|
-
moduleName: options.moduleName,
|
|
232
|
-
name: options.name,
|
|
233
|
-
visibility: parseVisibility(result.visibility),
|
|
234
|
-
isEntry: result.isEntry,
|
|
235
|
-
typeParameters: result.typeParameters.map((abilities) => ({
|
|
236
|
-
isPhantom: false,
|
|
237
|
-
constraints: parseAbilities(abilities),
|
|
238
|
-
})),
|
|
239
|
-
parameters: result.parameters.map((param) => parseNormalizedSuiMoveType(param)),
|
|
240
|
-
returns: result.return.map((ret) => parseNormalizedSuiMoveType(ret)),
|
|
241
|
-
},
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
function parseObject(object) {
|
|
246
|
-
return {
|
|
247
|
-
id: object.objectId,
|
|
248
|
-
version: object.version,
|
|
249
|
-
digest: object.digest,
|
|
250
|
-
type: object.type,
|
|
251
|
-
content: Promise.resolve(object.bcs?.dataType === "moveObject"
|
|
252
|
-
? fromBase64(object.bcs.bcsBytes)
|
|
253
|
-
: new Uint8Array()),
|
|
254
|
-
owner: parseOwner(object.owner),
|
|
255
|
-
previousTransaction: object.previousTransaction ?? null,
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
function parseOwner(owner) {
|
|
259
|
-
if (owner === "Immutable") {
|
|
260
|
-
return {
|
|
261
|
-
$kind: "Immutable",
|
|
262
|
-
Immutable: true,
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
if ("ConsensusAddressOwner" in owner) {
|
|
266
|
-
return {
|
|
267
|
-
$kind: "ConsensusAddressOwner",
|
|
268
|
-
ConsensusAddressOwner: {
|
|
269
|
-
owner: owner.ConsensusAddressOwner.owner,
|
|
270
|
-
startVersion: owner.ConsensusAddressOwner.start_version,
|
|
271
|
-
},
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
if ("AddressOwner" in owner) {
|
|
275
|
-
return {
|
|
276
|
-
$kind: "AddressOwner",
|
|
277
|
-
AddressOwner: owner.AddressOwner,
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
if ("ObjectOwner" in owner) {
|
|
281
|
-
return {
|
|
282
|
-
$kind: "ObjectOwner",
|
|
283
|
-
ObjectOwner: owner.ObjectOwner,
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
if ("Shared" in owner) {
|
|
287
|
-
return {
|
|
288
|
-
$kind: "Shared",
|
|
289
|
-
Shared: {
|
|
290
|
-
initialSharedVersion: owner.Shared.initial_shared_version,
|
|
291
|
-
},
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
throw new Error(`Unknown owner type: ${JSON.stringify(owner)}`);
|
|
295
|
-
}
|
|
296
|
-
function parseOwnerAddress(owner) {
|
|
297
|
-
if (owner === "Immutable") {
|
|
298
|
-
return null;
|
|
299
|
-
}
|
|
300
|
-
if ("ConsensusAddressOwner" in owner) {
|
|
301
|
-
return owner.ConsensusAddressOwner.owner;
|
|
302
|
-
}
|
|
303
|
-
if ("AddressOwner" in owner) {
|
|
304
|
-
return owner.AddressOwner;
|
|
305
|
-
}
|
|
306
|
-
if ("ObjectOwner" in owner) {
|
|
307
|
-
return owner.ObjectOwner;
|
|
308
|
-
}
|
|
309
|
-
if ("Shared" in owner) {
|
|
310
|
-
return null;
|
|
311
|
-
}
|
|
312
|
-
throw new Error(`Unknown owner type: ${JSON.stringify(owner)}`);
|
|
313
|
-
}
|
|
314
|
-
function parseTransaction(transaction) {
|
|
315
|
-
const parsedTx = bcs.SenderSignedData.parse(fromBase64(transaction.rawTransaction))[0];
|
|
316
|
-
const objectTypes = {};
|
|
317
|
-
transaction.objectChanges?.forEach((change) => {
|
|
318
|
-
if (change.type !== "published") {
|
|
319
|
-
objectTypes[change.objectId] = change.objectType;
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
const bytes = bcs.TransactionData.serialize(parsedTx.intentMessage.value).toBytes();
|
|
323
|
-
const data = TransactionDataBuilder.restore({
|
|
324
|
-
version: 2,
|
|
325
|
-
sender: parsedTx.intentMessage.value.V1.sender,
|
|
326
|
-
expiration: parsedTx.intentMessage.value.V1.expiration,
|
|
327
|
-
gasData: parsedTx.intentMessage.value.V1.gasData,
|
|
328
|
-
inputs: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction
|
|
329
|
-
.inputs,
|
|
330
|
-
commands: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction
|
|
331
|
-
.commands,
|
|
332
|
-
});
|
|
333
|
-
return {
|
|
334
|
-
digest: transaction.digest,
|
|
335
|
-
epoch: transaction.effects?.executedEpoch ?? null,
|
|
336
|
-
effects: parseTransactionEffectsBcs(new Uint8Array(transaction.rawEffects)),
|
|
337
|
-
objectTypes: Promise.resolve(objectTypes),
|
|
338
|
-
transaction: {
|
|
339
|
-
...data,
|
|
340
|
-
bcs: bytes,
|
|
341
|
-
},
|
|
342
|
-
signatures: parsedTx.txSignatures,
|
|
343
|
-
balanceChanges: transaction.balanceChanges?.map((change) => ({
|
|
344
|
-
coinType: change.coinType,
|
|
345
|
-
address: parseOwnerAddress(change.owner),
|
|
346
|
-
amount: change.amount,
|
|
347
|
-
})) ?? [],
|
|
348
|
-
};
|
|
349
|
-
}
|
|
350
|
-
function parseTransactionEffectsJson({ bytes, effects, objectChanges, }) {
|
|
351
|
-
const changedObjects = [];
|
|
352
|
-
const unchangedConsensusObjects = [];
|
|
353
|
-
const objectTypes = {};
|
|
354
|
-
objectChanges?.forEach((change) => {
|
|
355
|
-
switch (change.type) {
|
|
356
|
-
case "published":
|
|
357
|
-
changedObjects.push({
|
|
358
|
-
id: change.packageId,
|
|
359
|
-
inputState: "DoesNotExist",
|
|
360
|
-
inputVersion: null,
|
|
361
|
-
inputDigest: null,
|
|
362
|
-
inputOwner: null,
|
|
363
|
-
outputState: "PackageWrite",
|
|
364
|
-
outputVersion: change.version,
|
|
365
|
-
outputDigest: change.digest,
|
|
366
|
-
outputOwner: null,
|
|
367
|
-
idOperation: "Created",
|
|
368
|
-
});
|
|
369
|
-
break;
|
|
370
|
-
case "transferred":
|
|
371
|
-
changedObjects.push({
|
|
372
|
-
id: change.objectId,
|
|
373
|
-
inputState: "Exists",
|
|
374
|
-
inputVersion: change.version,
|
|
375
|
-
inputDigest: change.digest,
|
|
376
|
-
inputOwner: {
|
|
377
|
-
$kind: "AddressOwner",
|
|
378
|
-
AddressOwner: change.sender,
|
|
379
|
-
},
|
|
380
|
-
outputState: "ObjectWrite",
|
|
381
|
-
outputVersion: change.version,
|
|
382
|
-
outputDigest: change.digest,
|
|
383
|
-
outputOwner: parseOwner(change.recipient),
|
|
384
|
-
idOperation: "None",
|
|
385
|
-
});
|
|
386
|
-
objectTypes[change.objectId] = change.objectType;
|
|
387
|
-
break;
|
|
388
|
-
case "mutated":
|
|
389
|
-
changedObjects.push({
|
|
390
|
-
id: change.objectId,
|
|
391
|
-
inputState: "Exists",
|
|
392
|
-
inputVersion: change.previousVersion,
|
|
393
|
-
inputDigest: null,
|
|
394
|
-
inputOwner: parseOwner(change.owner),
|
|
395
|
-
outputState: "ObjectWrite",
|
|
396
|
-
outputVersion: change.version,
|
|
397
|
-
outputDigest: change.digest,
|
|
398
|
-
outputOwner: parseOwner(change.owner),
|
|
399
|
-
idOperation: "None",
|
|
400
|
-
});
|
|
401
|
-
objectTypes[change.objectId] = change.objectType;
|
|
402
|
-
break;
|
|
403
|
-
case "deleted":
|
|
404
|
-
changedObjects.push({
|
|
405
|
-
id: change.objectId,
|
|
406
|
-
inputState: "Exists",
|
|
407
|
-
inputVersion: change.version,
|
|
408
|
-
inputDigest: effects.deleted?.find((d) => d.objectId === change.objectId)?.digest ?? null,
|
|
409
|
-
inputOwner: null,
|
|
410
|
-
outputState: "DoesNotExist",
|
|
411
|
-
outputVersion: null,
|
|
412
|
-
outputDigest: null,
|
|
413
|
-
outputOwner: null,
|
|
414
|
-
idOperation: "Deleted",
|
|
415
|
-
});
|
|
416
|
-
objectTypes[change.objectId] = change.objectType;
|
|
417
|
-
break;
|
|
418
|
-
case "wrapped":
|
|
419
|
-
changedObjects.push({
|
|
420
|
-
id: change.objectId,
|
|
421
|
-
inputState: "Exists",
|
|
422
|
-
inputVersion: change.version,
|
|
423
|
-
inputDigest: null,
|
|
424
|
-
inputOwner: {
|
|
425
|
-
$kind: "AddressOwner",
|
|
426
|
-
AddressOwner: change.sender,
|
|
427
|
-
},
|
|
428
|
-
outputState: "ObjectWrite",
|
|
429
|
-
outputVersion: change.version,
|
|
430
|
-
outputDigest: effects.wrapped?.find((w) => w.objectId === change.objectId)?.digest ?? null,
|
|
431
|
-
outputOwner: {
|
|
432
|
-
$kind: "ObjectOwner",
|
|
433
|
-
ObjectOwner: change.sender,
|
|
434
|
-
},
|
|
435
|
-
idOperation: "None",
|
|
436
|
-
});
|
|
437
|
-
objectTypes[change.objectId] = change.objectType;
|
|
438
|
-
break;
|
|
439
|
-
case "created":
|
|
440
|
-
changedObjects.push({
|
|
441
|
-
id: change.objectId,
|
|
442
|
-
inputState: "DoesNotExist",
|
|
443
|
-
inputVersion: null,
|
|
444
|
-
inputDigest: null,
|
|
445
|
-
inputOwner: null,
|
|
446
|
-
outputState: "ObjectWrite",
|
|
447
|
-
outputVersion: change.version,
|
|
448
|
-
outputDigest: change.digest,
|
|
449
|
-
outputOwner: parseOwner(change.owner),
|
|
450
|
-
idOperation: "Created",
|
|
451
|
-
});
|
|
452
|
-
objectTypes[change.objectId] = change.objectType;
|
|
453
|
-
break;
|
|
454
|
-
}
|
|
455
|
-
});
|
|
456
|
-
return {
|
|
457
|
-
objectTypes,
|
|
458
|
-
effects: {
|
|
459
|
-
bcs: bytes ?? null,
|
|
460
|
-
digest: effects.transactionDigest,
|
|
461
|
-
version: 2,
|
|
462
|
-
status: effects.status.status === "success"
|
|
463
|
-
? { success: true, error: null }
|
|
464
|
-
: { success: false, error: effects.status.error },
|
|
465
|
-
gasUsed: effects.gasUsed,
|
|
466
|
-
transactionDigest: effects.transactionDigest,
|
|
467
|
-
gasObject: {
|
|
468
|
-
id: effects.gasObject?.reference.objectId,
|
|
469
|
-
inputState: "Exists",
|
|
470
|
-
inputVersion: null,
|
|
471
|
-
inputDigest: null,
|
|
472
|
-
inputOwner: null,
|
|
473
|
-
outputState: "ObjectWrite",
|
|
474
|
-
outputVersion: effects.gasObject.reference.version,
|
|
475
|
-
outputDigest: effects.gasObject.reference.digest,
|
|
476
|
-
outputOwner: parseOwner(effects.gasObject.owner),
|
|
477
|
-
idOperation: "None",
|
|
478
|
-
},
|
|
479
|
-
eventsDigest: effects.eventsDigest ?? null,
|
|
480
|
-
dependencies: effects.dependencies ?? [],
|
|
481
|
-
lamportVersion: effects.gasObject.reference.version,
|
|
482
|
-
changedObjects,
|
|
483
|
-
unchangedConsensusObjects,
|
|
484
|
-
auxiliaryDataDigest: null,
|
|
485
|
-
},
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
const Balance = bcs.struct("Balance", {
|
|
489
|
-
value: bcs.u64(),
|
|
490
|
-
});
|
|
491
|
-
const Coin = bcs.struct("Coin", {
|
|
492
|
-
id: bcs.Address,
|
|
493
|
-
balance: Balance,
|
|
494
|
-
});
|
|
495
|
-
function parseNormalizedSuiMoveType(type) {
|
|
496
|
-
if (typeof type !== "string") {
|
|
497
|
-
if ("Reference" in type) {
|
|
498
|
-
return {
|
|
499
|
-
reference: "immutable",
|
|
500
|
-
body: parseNormalizedSuiMoveTypeBody(type.Reference),
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
|
-
if ("MutableReference" in type) {
|
|
504
|
-
return {
|
|
505
|
-
reference: "mutable",
|
|
506
|
-
body: parseNormalizedSuiMoveTypeBody(type.MutableReference),
|
|
507
|
-
};
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
return {
|
|
511
|
-
reference: null,
|
|
512
|
-
body: parseNormalizedSuiMoveTypeBody(type),
|
|
513
|
-
};
|
|
514
|
-
}
|
|
515
|
-
function parseNormalizedSuiMoveTypeBody(type) {
|
|
516
|
-
switch (type) {
|
|
517
|
-
case "Address":
|
|
518
|
-
return { $kind: "address" };
|
|
519
|
-
case "Bool":
|
|
520
|
-
return { $kind: "bool" };
|
|
521
|
-
case "U8":
|
|
522
|
-
return { $kind: "u8" };
|
|
523
|
-
case "U16":
|
|
524
|
-
return { $kind: "u16" };
|
|
525
|
-
case "U32":
|
|
526
|
-
return { $kind: "u32" };
|
|
527
|
-
case "U64":
|
|
528
|
-
return { $kind: "u64" };
|
|
529
|
-
case "U128":
|
|
530
|
-
return { $kind: "u128" };
|
|
531
|
-
case "U256":
|
|
532
|
-
return { $kind: "u256" };
|
|
533
|
-
}
|
|
534
|
-
if (typeof type === "string") {
|
|
535
|
-
throw new Error(`Unknown type: ${type}`);
|
|
536
|
-
}
|
|
537
|
-
if ("Vector" in type) {
|
|
538
|
-
return {
|
|
539
|
-
$kind: "vector",
|
|
540
|
-
vector: parseNormalizedSuiMoveTypeBody(type.Vector),
|
|
541
|
-
};
|
|
542
|
-
}
|
|
543
|
-
if ("Struct" in type) {
|
|
544
|
-
return {
|
|
545
|
-
$kind: "datatype",
|
|
546
|
-
datatype: {
|
|
547
|
-
typeName: `${normalizeWowAddress(type.Struct.address)}::${type.Struct.module}::${type.Struct.name}`,
|
|
548
|
-
typeParameters: type.Struct.typeArguments.map((t) => parseNormalizedSuiMoveTypeBody(t)),
|
|
549
|
-
},
|
|
550
|
-
};
|
|
551
|
-
}
|
|
552
|
-
if ("TypeParameter" in type) {
|
|
553
|
-
return {
|
|
554
|
-
$kind: "typeParameter",
|
|
555
|
-
index: type.TypeParameter,
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
throw new Error(`Unknown type: ${JSON.stringify(type)}`);
|
|
559
|
-
}
|
|
560
|
-
function parseAbilities(abilitySet) {
|
|
561
|
-
return abilitySet.abilities.map((ability) => {
|
|
562
|
-
switch (ability) {
|
|
563
|
-
case "Copy":
|
|
564
|
-
return "copy";
|
|
565
|
-
case "Drop":
|
|
566
|
-
return "drop";
|
|
567
|
-
case "Store":
|
|
568
|
-
return "store";
|
|
569
|
-
case "Key":
|
|
570
|
-
return "key";
|
|
571
|
-
default:
|
|
572
|
-
return "unknown";
|
|
573
|
-
}
|
|
574
|
-
});
|
|
575
|
-
}
|
|
576
|
-
function parseVisibility(visibility) {
|
|
577
|
-
switch (visibility) {
|
|
578
|
-
case "Public":
|
|
579
|
-
return "public";
|
|
580
|
-
case "Private":
|
|
581
|
-
return "private";
|
|
582
|
-
case "Friend":
|
|
583
|
-
return "friend";
|
|
584
|
-
default:
|
|
585
|
-
return "unknown";
|
|
586
|
-
}
|
|
587
|
-
}
|
|
1
|
+
import{fromBase64}from'@mysten/bcs';import{bcs}from'../bcs/index.js';import{Transaction}from'../transactions/Transaction.js';import{jsonRpcClientResolveTransactionPlugin}from'./json-rpc-resolver.js';import{TransactionDataBuilder}from'../transactions/TransactionData.js';import{chunk}from'@mysten/utils';import{normalizeWowAddress}from'../utils/sui-types.js';import{Experimental_CoreClient}from'../experimental/core.js';import{ObjectError}from'../experimental/errors.js';import{parseTransactionBcs,parseTransactionEffectsBcs}from'../experimental/index.js';export class JSONRpcCoreClient extends Experimental_CoreClient{#jsonRpcClient;constructor({jsonRpcClient:a}){super({'network':a['network'],'base':a}),this.#jsonRpcClient=a;}async['getObjects'](a){const b=chunk(a['objectIds'],0x32),c=[];for(const d of b){const e=await this.#jsonRpcClient['multiGetObjects']({'ids':d,'options':{'showOwner':!![],'showType':!![],'showBcs':!![],'showPreviousTransaction':!![]},'signal':a['signal']});for(const [f,g]of e['entries']()){g['error']?c['push'](ObjectError['fromResponse'](g['error'],d[f])):c['push'](parseObject(g['data']));}}return{'objects':c};}async['getOwnedObjects'](a){const b=await this.#jsonRpcClient['getOwnedObjects']({'owner':a['address'],'limit':a['limit'],'cursor':a['cursor'],'options':{'showOwner':!![],'showType':!![],'showBcs':!![],'showPreviousTransaction':!![]},'filter':a['type']?{'StructType':a['type']}:null,'signal':a['signal']});return{'objects':b['data']['map'](c=>{if(c['error'])throw ObjectError['fromResponse'](c['error']);return parseObject(c['data']);}),'hasNextPage':b['hasNextPage'],'cursor':b['nextCursor']??null};}async['getCoins'](a){const b=await this.#jsonRpcClient['getCoins']({'owner':a['address'],'coinType':a['coinType'],'limit':a['limit'],'cursor':a['cursor'],'signal':a['signal']});return{'objects':b['data']['map'](c=>{return{'id':c['coinObjectId'],'version':c['version'],'digest':c['digest'],'balance':c['balance'],'type':'0x2::coin::Coin<'+c['coinType']+'>','content':Promise['resolve'](Coin['serialize']({'id':c['coinObjectId'],'balance':{'value':c['balance']}})['toBytes']()),'owner':{'$kind':'ObjectOwner','ObjectOwner':a['address']},'previousTransaction':c['previousTransaction']};}),'hasNextPage':b['hasNextPage'],'cursor':b['nextCursor']??null};}async['getBalance'](a){const b=await this.#jsonRpcClient['getBalance']({'owner':a['address'],'coinType':a['coinType'],'signal':a['signal']});return{'balance':{'coinType':b['coinType'],'balance':b['totalBalance']}};}async['getAllBalances'](a){const b=await this.#jsonRpcClient['getAllBalances']({'owner':a['address'],'signal':a['signal']});return{'balances':b['map'](c=>({'coinType':c['coinType'],'balance':c['totalBalance']})),'hasNextPage':![],'cursor':null};}async['getTransaction'](a){const b=await this.#jsonRpcClient['getTransactionBlock']({'digest':a['digest'],'options':{'showRawInput':!![],'showObjectChanges':!![],'showRawEffects':!![],'showEvents':!![],'showEffects':!![],'showBalanceChanges':!![]},'signal':a['signal']});return{'transaction':parseTransaction(b)};}async['executeTransaction'](a){const b=await this.#jsonRpcClient['executeTransactionBlock']({'transactionBlock':a['transaction'],'signature':a['signatures'],'options':{'showRawEffects':!![],'showEvents':!![],'showObjectChanges':!![],'showRawInput':!![],'showEffects':!![],'showBalanceChanges':!![]},'signal':a['signal']});return{'transaction':parseTransaction(b)};}async['dryRunTransaction'](a){const b=Transaction['from'](a['transaction']),c=await this.#jsonRpcClient['dryRunTransactionBlock']({'transactionBlock':a['transaction'],'signal':a['signal']}),{effects:d,objectTypes:e}=parseTransactionEffectsJson({'effects':c['effects'],'objectChanges':c['objectChanges']});return{'transaction':{'digest':await b['getDigest'](),'epoch':null,'effects':d,'objectTypes':Promise['resolve'](e),'signatures':[],'transaction':parseTransactionBcs(a['transaction']),'balanceChanges':c['balanceChanges']['map'](f=>({'coinType':f['coinType'],'address':parseOwnerAddress(f['owner']),'amount':f['amount']}))}};}async['getReferenceGasPrice'](a){const b=await this.#jsonRpcClient['getReferenceGasPrice']({'signal':a?.['signal']});return{'referenceGasPrice':String(b)};}async['getDynamicFields'](a){const b=await this.#jsonRpcClient['getDynamicFields']({'parentId':a['parentId'],'limit':a['limit'],'cursor':a['cursor']});return{'dynamicFields':b['data']['map'](c=>{return{'id':c['objectId'],'type':c['objectType'],'name':{'type':c['name']['type'],'bcs':fromBase64(c['bcsName'])}};}),'hasNextPage':b['hasNextPage'],'cursor':b['nextCursor']};}['resolveTransactionPlugin'](){return jsonRpcClientResolveTransactionPlugin(this.#jsonRpcClient);}async['getMoveFunction'](a){const b=await this.#jsonRpcClient['getNormalizedMoveFunction']({'package':a['packageId'],'module':a['moduleName'],'function':a['name']});return{'function':{'packageId':normalizeWowAddress(a['packageId']),'moduleName':a['moduleName'],'name':a['name'],'visibility':parseVisibility(b['visibility']),'isEntry':b['isEntry'],'typeParameters':b['typeParameters']['map'](c=>({'isPhantom':![],'constraints':parseAbilities(c)})),'parameters':b['parameters']['map'](c=>parseNormalizedSuiMoveType(c)),'returns':b['return']['map'](c=>parseNormalizedSuiMoveType(c))}};}}function parseObject(a){return{'id':a['objectId'],'version':a['version'],'digest':a['digest'],'type':a['type'],'content':Promise['resolve'](a['bcs']?.['dataType']==='moveObject'?fromBase64(a['bcs']['bcsBytes']):new Uint8Array()),'owner':parseOwner(a['owner']),'previousTransaction':a['previousTransaction']??null};}function parseOwner(a){if(a==='Immutable')return{'$kind':'Immutable','Immutable':!![]};if('ConsensusAddressOwner'in a)return{'$kind':'ConsensusAddressOwner','ConsensusAddressOwner':{'owner':a['ConsensusAddressOwner']['owner'],'startVersion':a['ConsensusAddressOwner']['start_version']}};if('AddressOwner'in a)return{'$kind':'AddressOwner','AddressOwner':a['AddressOwner']};if('ObjectOwner'in a)return{'$kind':'ObjectOwner','ObjectOwner':a['ObjectOwner']};if('Shared'in a)return{'$kind':'Shared','Shared':{'initialSharedVersion':a['Shared']['initial_shared_version']}};throw new Error('Unknown\x20owner\x20type:\x20'+JSON['stringify'](a));}function parseOwnerAddress(a){if(a==='Immutable')return null;if('ConsensusAddressOwner'in a)return a['ConsensusAddressOwner']['owner'];if('AddressOwner'in a)return a['AddressOwner'];if('ObjectOwner'in a)return a['ObjectOwner'];if('Shared'in a)return null;throw new Error('Unknown\x20owner\x20type:\x20'+JSON['stringify'](a));}function parseTransaction(a){const b=bcs['SenderSignedData']['parse'](fromBase64(a['rawTransaction']))[0x0],c={};a['objectChanges']?.['forEach'](f=>{f['type']!=='published'&&(c[f['objectId']]=f['objectType']);});const d=bcs['TransactionData']['serialize'](b['intentMessage']['value'])['toBytes'](),e=TransactionDataBuilder['restore']({'version':0x2,'sender':b['intentMessage']['value']['V1']['sender'],'expiration':b['intentMessage']['value']['V1']['expiration'],'gasData':b['intentMessage']['value']['V1']['gasData'],'inputs':b['intentMessage']['value']['V1']['kind']['ProgrammableTransaction']['inputs'],'commands':b['intentMessage']['value']['V1']['kind']['ProgrammableTransaction']['commands']});return{'digest':a['digest'],'epoch':a['effects']?.['executedEpoch']??null,'effects':parseTransactionEffectsBcs(new Uint8Array(a['rawEffects'])),'objectTypes':Promise['resolve'](c),'transaction':{...e,'bcs':d},'signatures':b['txSignatures'],'balanceChanges':a['balanceChanges']?.['map'](f=>({'coinType':f['coinType'],'address':parseOwnerAddress(f['owner']),'amount':f['amount']}))??[]};}function parseTransactionEffectsJson({bytes:a,effects:b,objectChanges:c}){const d=[],e=[],f={};return c?.['forEach'](g=>{switch(g['type']){case'published':d['push']({'id':g['packageId'],'inputState':'DoesNotExist','inputVersion':null,'inputDigest':null,'inputOwner':null,'outputState':'PackageWrite','outputVersion':g['version'],'outputDigest':g['digest'],'outputOwner':null,'idOperation':'Created'});break;case'transferred':d['push']({'id':g['objectId'],'inputState':'Exists','inputVersion':g['version'],'inputDigest':g['digest'],'inputOwner':{'$kind':'AddressOwner','AddressOwner':g['sender']},'outputState':'ObjectWrite','outputVersion':g['version'],'outputDigest':g['digest'],'outputOwner':parseOwner(g['recipient']),'idOperation':'None'}),f[g['objectId']]=g['objectType'];break;case'mutated':d['push']({'id':g['objectId'],'inputState':'Exists','inputVersion':g['previousVersion'],'inputDigest':null,'inputOwner':parseOwner(g['owner']),'outputState':'ObjectWrite','outputVersion':g['version'],'outputDigest':g['digest'],'outputOwner':parseOwner(g['owner']),'idOperation':'None'}),f[g['objectId']]=g['objectType'];break;case'deleted':d['push']({'id':g['objectId'],'inputState':'Exists','inputVersion':g['version'],'inputDigest':b['deleted']?.['find'](h=>h['objectId']===g['objectId'])?.['digest']??null,'inputOwner':null,'outputState':'DoesNotExist','outputVersion':null,'outputDigest':null,'outputOwner':null,'idOperation':'Deleted'}),f[g['objectId']]=g['objectType'];break;case'wrapped':d['push']({'id':g['objectId'],'inputState':'Exists','inputVersion':g['version'],'inputDigest':null,'inputOwner':{'$kind':'AddressOwner','AddressOwner':g['sender']},'outputState':'ObjectWrite','outputVersion':g['version'],'outputDigest':b['wrapped']?.['find'](h=>h['objectId']===g['objectId'])?.['digest']??null,'outputOwner':{'$kind':'ObjectOwner','ObjectOwner':g['sender']},'idOperation':'None'}),f[g['objectId']]=g['objectType'];break;case'created':d['push']({'id':g['objectId'],'inputState':'DoesNotExist','inputVersion':null,'inputDigest':null,'inputOwner':null,'outputState':'ObjectWrite','outputVersion':g['version'],'outputDigest':g['digest'],'outputOwner':parseOwner(g['owner']),'idOperation':'Created'}),f[g['objectId']]=g['objectType'];break;}}),{'objectTypes':f,'effects':{'bcs':a??null,'digest':b['transactionDigest'],'version':0x2,'status':b['status']['status']==='success'?{'success':!![],'error':null}:{'success':![],'error':b['status']['error']},'gasUsed':b['gasUsed'],'transactionDigest':b['transactionDigest'],'gasObject':{'id':b['gasObject']?.['reference']['objectId'],'inputState':'Exists','inputVersion':null,'inputDigest':null,'inputOwner':null,'outputState':'ObjectWrite','outputVersion':b['gasObject']['reference']['version'],'outputDigest':b['gasObject']['reference']['digest'],'outputOwner':parseOwner(b['gasObject']['owner']),'idOperation':'None'},'eventsDigest':b['eventsDigest']??null,'dependencies':b['dependencies']??[],'lamportVersion':b['gasObject']['reference']['version'],'changedObjects':d,'unchangedConsensusObjects':e,'auxiliaryDataDigest':null}};}const Balance=bcs['struct']('Balance',{'value':bcs['u64']()}),Coin=bcs['struct']('Coin',{'id':bcs['Address'],'balance':Balance});function parseNormalizedSuiMoveType(a){if(typeof a!=='string'){if('Reference'in a)return{'reference':'immutable','body':parseNormalizedSuiMoveTypeBody(a['Reference'])};if('MutableReference'in a)return{'reference':'mutable','body':parseNormalizedSuiMoveTypeBody(a['MutableReference'])};}return{'reference':null,'body':parseNormalizedSuiMoveTypeBody(a)};}function parseNormalizedSuiMoveTypeBody(a){switch(a){case'Address':return{'$kind':'address'};case'Bool':return{'$kind':'bool'};case'U8':return{'$kind':'u8'};case'U16':return{'$kind':'u16'};case'U32':return{'$kind':'u32'};case'U64':return{'$kind':'u64'};case'U128':return{'$kind':'u128'};case'U256':return{'$kind':'u256'};}if(typeof a==='string')throw new Error('Unknown\x20type:\x20'+a);if('Vector'in a)return{'$kind':'vector','vector':parseNormalizedSuiMoveTypeBody(a['Vector'])};if('Struct'in a)return{'$kind':'datatype','datatype':{'typeName':normalizeWowAddress(a['Struct']['address'])+'::'+a['Struct']['module']+'::'+a['Struct']['name'],'typeParameters':a['Struct']['typeArguments']['map'](b=>parseNormalizedSuiMoveTypeBody(b))}};if('TypeParameter'in a)return{'$kind':'typeParameter','index':a['TypeParameter']};throw new Error('Unknown\x20type:\x20'+JSON['stringify'](a));}function parseAbilities(a){return a['abilities']['map'](b=>{switch(b){case'Copy':return'copy';case'Drop':return'drop';case'Store':return'store';case'Key':return'key';default:return'unknown';}});}function parseVisibility(a){switch(a){case'Public':return'public';case'Private':return'private';case'Friend':return'friend';default:return'unknown';}}
|
|
@@ -1,38 +1 @@
|
|
|
1
|
-
const CODE_TO_ERROR_TYPE = {
|
|
2
|
-
"-32700": "ParseError",
|
|
3
|
-
"-32701": "OversizedRequest",
|
|
4
|
-
"-32702": "OversizedResponse",
|
|
5
|
-
"-32600": "InvalidRequest",
|
|
6
|
-
"-32601": "MethodNotFound",
|
|
7
|
-
"-32602": "InvalidParams",
|
|
8
|
-
"-32603": "InternalError",
|
|
9
|
-
"-32604": "ServerBusy",
|
|
10
|
-
"-32000": "CallExecutionFailed",
|
|
11
|
-
"-32001": "UnknownError",
|
|
12
|
-
"-32003": "SubscriptionClosed",
|
|
13
|
-
"-32004": "SubscriptionClosedWithError",
|
|
14
|
-
"-32005": "BatchesNotSupported",
|
|
15
|
-
"-32006": "TooManySubscriptions",
|
|
16
|
-
"-32050": "TransientError",
|
|
17
|
-
"-32002": "TransactionExecutionClientError",
|
|
18
|
-
};
|
|
19
|
-
export class SuiHTTPTransportError extends Error {
|
|
20
|
-
}
|
|
21
|
-
export class JsonRpcError extends SuiHTTPTransportError {
|
|
22
|
-
code;
|
|
23
|
-
type;
|
|
24
|
-
constructor(message, code) {
|
|
25
|
-
super(message);
|
|
26
|
-
this.code = code;
|
|
27
|
-
this.type = CODE_TO_ERROR_TYPE[code] ?? "ServerError";
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export class SuiHTTPStatusError extends SuiHTTPTransportError {
|
|
31
|
-
status;
|
|
32
|
-
statusText;
|
|
33
|
-
constructor(message, status, statusText) {
|
|
34
|
-
super(message);
|
|
35
|
-
this.status = status;
|
|
36
|
-
this.statusText = statusText;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
const CODE_TO_ERROR_TYPE={'-32700':'ParseError','-32701':'OversizedRequest','-32702':'OversizedResponse','-32600':'InvalidRequest','-32601':'MethodNotFound','-32602':'InvalidParams','-32603':'InternalError','-32604':'ServerBusy','-32000':'CallExecutionFailed','-32001':'UnknownError','-32003':'SubscriptionClosed','-32004':'SubscriptionClosedWithError','-32005':'BatchesNotSupported','-32006':'TooManySubscriptions','-32050':'TransientError','-32002':'TransactionExecutionClientError'};export class SuiHTTPTransportError extends Error{}export class JsonRpcError extends SuiHTTPTransportError{['code'];['type'];constructor(a,b){super(a),this['code']=b,this['type']=CODE_TO_ERROR_TYPE[b]??'ServerError';}}export class SuiHTTPStatusError extends SuiHTTPTransportError{['status'];['statusText'];constructor(a,b,c){super(a),this['status']=b,this['statusText']=c;}}
|