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/w/exception.js
CHANGED
|
@@ -1,618 +1 @@
|
|
|
1
|
-
export var WErrors;
|
|
2
|
-
(function (WErrors) {
|
|
3
|
-
WErrors["AccountNotFound"] = "account not found";
|
|
4
|
-
WErrors["AddressNotFound"] = "address not found";
|
|
5
|
-
WErrors["IsValidDescription"] = "invalid description";
|
|
6
|
-
WErrors["IsValidName"] = "invalid name";
|
|
7
|
-
WErrors["IsValidName_AllowEmpty"] = "invalid name";
|
|
8
|
-
WErrors["IsValidEndpoint"] = "invalid endpoint";
|
|
9
|
-
WErrors["IsValidAddress"] = "invalid address";
|
|
10
|
-
WErrors["IsValidArgType"] = "invalid argument type";
|
|
11
|
-
WErrors["IsValidTokenType"] = "invalid token type";
|
|
12
|
-
WErrors["IsValidUint"] = "invalid uint";
|
|
13
|
-
WErrors["IsValidInt"] = "invalid int";
|
|
14
|
-
WErrors["IsValidU8"] = "invalid u8";
|
|
15
|
-
WErrors["IsValidU16"] = "invalid u16";
|
|
16
|
-
WErrors["IsValidU32"] = "invalid u32";
|
|
17
|
-
WErrors["IsValidU64"] = "invalid u64";
|
|
18
|
-
WErrors["IsValidU128"] = "invalid u128";
|
|
19
|
-
WErrors["IsValidU256"] = "invalid u256";
|
|
20
|
-
WErrors["IsValidRate"] = "invalid rate[0-10000]";
|
|
21
|
-
WErrors["IsValidArray"] = "invalid array";
|
|
22
|
-
WErrors["IsValidObjects"] = "invalid objects";
|
|
23
|
-
WErrors["AllInvalid"] = "one valid at least";
|
|
24
|
-
WErrors["InvalidParam"] = "invalid parameter";
|
|
25
|
-
WErrors["IsValidPermissionIndex"] = "invalid permission index";
|
|
26
|
-
WErrors["IsValidKey"] = "invalid key";
|
|
27
|
-
WErrors["Fail"] = "fail";
|
|
28
|
-
WErrors["IsValidIdentifier"] = "identifier invalid";
|
|
29
|
-
WErrors["IsValidHttpUrl"] = "invalid url";
|
|
30
|
-
WErrors["IsValidBizPermissionIndex"] = "invalid biz-permission id[1000 - 65535]";
|
|
31
|
-
WErrors["BcsTypeInvalid"] = "invalid bcs type";
|
|
32
|
-
WErrors["IsValidServiceItemName"] = "invalid service item name";
|
|
33
|
-
WErrors["IsValidCoinType"] = "not the coin type";
|
|
34
|
-
WErrors["IsValidGuardIdentifier"] = "guard identifier invalid";
|
|
35
|
-
WErrors["NoPermission"] = "no permission";
|
|
36
|
-
WErrors["IsValidValue"] = "invalid value";
|
|
37
|
-
WErrors["IsValidValueType"] = "invalid value type";
|
|
38
|
-
WErrors["IsValidLocation"] = "invalid location";
|
|
39
|
-
WErrors["NetworkInvalid"] = "protocol network not specified";
|
|
40
|
-
WErrors["WitnessTypeInvalid"] = "witness type invalid";
|
|
41
|
-
WErrors["AddressCountExceeded"] = "address count exceeded";
|
|
42
|
-
WErrors["NumberCountExceeded"] = "number count exceeded";
|
|
43
|
-
WErrors["NewGuardCheckFailed"] = "new guard check failed";
|
|
44
|
-
WErrors["GuardTableItemLengthExceeded"] = "guard table item length exceeded";
|
|
45
|
-
WErrors["AccountPersistentStorageNotSet"] = "account persistent storage not set";
|
|
46
|
-
WErrors["AccountPersistentStorageNotFound"] = "account persistent storage not found";
|
|
47
|
-
WErrors["AccountNameExist"] = "account name exist";
|
|
48
|
-
WErrors["ConfigPersistentStorageNotSet"] = "config persistent storage not set";
|
|
49
|
-
WErrors["TokenNotFoundLocally"] = "token not found";
|
|
50
|
-
WErrors["LocalMarkNameExist"] = "local mark name exist";
|
|
51
|
-
WErrors["MaxObjectsPerQuery"] = "max objects per query";
|
|
52
|
-
WErrors["ResourceTagCountExceeded"] = "resource tag count exceeded";
|
|
53
|
-
WErrors["ParseObjectContentFailed"] = "parse object content failed";
|
|
54
|
-
})(WErrors || (WErrors = {}));
|
|
55
|
-
export class WException extends Error {
|
|
56
|
-
code;
|
|
57
|
-
details;
|
|
58
|
-
constructor(error, details) {
|
|
59
|
-
const message = error.toString() + (details ? ":" + details : "");
|
|
60
|
-
super(message);
|
|
61
|
-
this.code = error;
|
|
62
|
-
this.details = details;
|
|
63
|
-
Object.setPrototypeOf(this, WException.prototype);
|
|
64
|
-
}
|
|
65
|
-
getErrorMessage() {
|
|
66
|
-
return this.message;
|
|
67
|
-
}
|
|
68
|
-
getErrorCode() {
|
|
69
|
-
return this.code;
|
|
70
|
-
}
|
|
71
|
-
getDetails() {
|
|
72
|
-
return this.details;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
export const W_ERROR = (error, details) => {
|
|
76
|
-
throw new WException(error, details);
|
|
77
|
-
};
|
|
78
|
-
export const W_SUCCESS = (data) => ({
|
|
79
|
-
success: true,
|
|
80
|
-
data,
|
|
81
|
-
});
|
|
82
|
-
export const W_FAILURE = (error, details) => ({
|
|
83
|
-
success: false,
|
|
84
|
-
error: new WException(error, details),
|
|
85
|
-
});
|
|
86
|
-
export function WValidate(fn) {
|
|
87
|
-
return function (...args) {
|
|
88
|
-
try {
|
|
89
|
-
return fn.apply(this, args);
|
|
90
|
-
}
|
|
91
|
-
catch (error) {
|
|
92
|
-
if (error instanceof WException) {
|
|
93
|
-
throw error;
|
|
94
|
-
}
|
|
95
|
-
throw new WException(WErrors.Fail, error);
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
export const W_SAFE = (fn, error, details) => {
|
|
100
|
-
try {
|
|
101
|
-
const result = fn();
|
|
102
|
-
return W_SUCCESS(result);
|
|
103
|
-
}
|
|
104
|
-
catch (err) {
|
|
105
|
-
if (err instanceof WException) {
|
|
106
|
-
return W_FAILURE(err.code, err.details);
|
|
107
|
-
}
|
|
108
|
-
return W_FAILURE(error || WErrors.Fail, details || err);
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
export const W_ENSURE = (condition, error, details) => {
|
|
112
|
-
if (!condition) {
|
|
113
|
-
W_ERROR(error, details);
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
export const W_VALIDATE_PARAM = (param, validator, error, details) => {
|
|
117
|
-
if (!validator(param)) {
|
|
118
|
-
W_ERROR(error, details);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
export const MoveErrors = [
|
|
122
|
-
{ module: "service", code: 1, description: "Maximum sale count exceeded" },
|
|
123
|
-
{
|
|
124
|
-
module: "service",
|
|
125
|
-
code: 2,
|
|
126
|
-
description: "Maximum repository count exceeded",
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
module: "service",
|
|
130
|
-
code: 3,
|
|
131
|
-
description: "Maximum arbitration count exceeded",
|
|
132
|
-
},
|
|
133
|
-
{ module: "service", code: 4, description: "Maximum WIP length exceeded" },
|
|
134
|
-
{
|
|
135
|
-
module: "service",
|
|
136
|
-
code: 5,
|
|
137
|
-
description: "Maximum WIP hash length exceeded",
|
|
138
|
-
},
|
|
139
|
-
{ module: "service", code: 6, description: "Service already published" },
|
|
140
|
-
{ module: "service", code: 7, description: "Service not published" },
|
|
141
|
-
{
|
|
142
|
-
module: "service",
|
|
143
|
-
code: 8,
|
|
144
|
-
description: "Invalid off-on discount rates",
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
module: "service",
|
|
148
|
-
code: 9,
|
|
149
|
-
description: "Maximum discount count per operation exceeded",
|
|
150
|
-
},
|
|
151
|
-
{ module: "service", code: 10, description: "Discount not transferable" },
|
|
152
|
-
{ module: "service", code: 11, description: "Discount receiver empty" },
|
|
153
|
-
{ module: "service", code: 12, description: "Discount count empty" },
|
|
154
|
-
{
|
|
155
|
-
module: "service",
|
|
156
|
-
code: 13,
|
|
157
|
-
description: "Maximum discount receiver per operation exceeded",
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
module: "service",
|
|
161
|
-
code: 14,
|
|
162
|
-
description: "Maximum total discount count exceeded",
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
module: "service",
|
|
166
|
-
code: 15,
|
|
167
|
-
description: "Service discount does not match",
|
|
168
|
-
},
|
|
169
|
-
{ module: "service", code: 16, description: "Stock not enough" },
|
|
170
|
-
{ module: "service", code: 17, description: "Invalid quote" },
|
|
171
|
-
{
|
|
172
|
-
module: "service",
|
|
173
|
-
code: 18,
|
|
174
|
-
description: "Buyer guard passport required",
|
|
175
|
-
},
|
|
176
|
-
{ module: "service", code: 19, description: "Service is paused" },
|
|
177
|
-
{ module: "service", code: 20, description: "Coin not enough" },
|
|
178
|
-
{
|
|
179
|
-
module: "service",
|
|
180
|
-
code: 21,
|
|
181
|
-
description: "Maximum required info size exceeded",
|
|
182
|
-
},
|
|
183
|
-
{ module: "service", code: 22, description: "Machine does not match" },
|
|
184
|
-
{ module: "service", code: 23, description: "No allocator configured" },
|
|
185
|
-
{
|
|
186
|
-
module: "service",
|
|
187
|
-
code: 24,
|
|
188
|
-
description: "Compensation withdraw time not enough",
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
module: "service",
|
|
192
|
-
code: 25,
|
|
193
|
-
description: "Arbitration not set with compensation fund",
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
module: "service",
|
|
197
|
-
code: 26,
|
|
198
|
-
description: "Order service does not match",
|
|
199
|
-
},
|
|
200
|
-
{ module: "service", code: 27, description: "Compensation does not match" },
|
|
201
|
-
{
|
|
202
|
-
module: "service",
|
|
203
|
-
code: 28,
|
|
204
|
-
description: "Maximum reward count exceeded",
|
|
205
|
-
},
|
|
206
|
-
{ module: "service", code: 29, description: "Invalid discount type" },
|
|
207
|
-
{ module: "service", code: 30, description: "Invalid timestamp ms end" },
|
|
208
|
-
{ module: "service", code: 31, description: "WIP hash not match" },
|
|
209
|
-
{ module: "service", code: 32, description: "Sale item not found" },
|
|
210
|
-
{ module: "permission", code: 1, description: "Not the builder" },
|
|
211
|
-
{ module: "permission", code: 2, description: "Not admin" },
|
|
212
|
-
{
|
|
213
|
-
module: "permission",
|
|
214
|
-
code: 3,
|
|
215
|
-
description: "Address count in permission exceeded limit",
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
module: "permission",
|
|
219
|
-
code: 4,
|
|
220
|
-
description: "Permission count exceeded limit",
|
|
221
|
-
},
|
|
222
|
-
{ module: "permission", code: 5, description: "Permission denied" },
|
|
223
|
-
{
|
|
224
|
-
module: "permission",
|
|
225
|
-
code: 6,
|
|
226
|
-
description: "Admin count exceeded limit",
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
module: "permission",
|
|
230
|
-
code: 7,
|
|
231
|
-
description: "Permission index not found",
|
|
232
|
-
},
|
|
233
|
-
{ module: "permission", code: 8, description: "Permission does not match" },
|
|
234
|
-
{ module: "permission", code: 9, description: "Not user address" },
|
|
235
|
-
{ module: "passport", code: 1, description: "Guard count exceeded limit" },
|
|
236
|
-
{ module: "passport", code: 2, description: "Relies guard not added" },
|
|
237
|
-
{
|
|
238
|
-
module: "passport",
|
|
239
|
-
code: 3,
|
|
240
|
-
description: "Submission size exceeded limit",
|
|
241
|
-
},
|
|
242
|
-
{ module: "passport", code: 4, description: "Already verified" },
|
|
243
|
-
{ module: "passport", code: 5, description: "Not verified" },
|
|
244
|
-
{ module: "passport", code: 6, description: "Not impact guard" },
|
|
245
|
-
{ module: "passport", code: 7, description: "Verification failed" },
|
|
246
|
-
{ module: "passport", code: 8, description: "Transaction does not match" },
|
|
247
|
-
{ module: "passport", code: 9, description: "Impact guard not found" },
|
|
248
|
-
{ module: "passport", code: 10, description: "Submission not found" },
|
|
249
|
-
{ module: "passport", code: 11, description: "Digest not match" },
|
|
250
|
-
{
|
|
251
|
-
module: "reward",
|
|
252
|
-
code: 1,
|
|
253
|
-
description: "Guard locked time not increasing",
|
|
254
|
-
},
|
|
255
|
-
{ module: "reward", code: 2, description: "Guard expired" },
|
|
256
|
-
{ module: "reward", code: 3, description: "Guard count exceeded limit" },
|
|
257
|
-
{
|
|
258
|
-
module: "reward",
|
|
259
|
-
code: 4,
|
|
260
|
-
description: "Recipient identifier not address type",
|
|
261
|
-
},
|
|
262
|
-
{ module: "reward", code: 5, description: "Amount not u64 type" },
|
|
263
|
-
{ module: "reward", code: 6, description: "Insufficient balance" },
|
|
264
|
-
{ module: "reward", code: 7, description: "Guard not found" },
|
|
265
|
-
{ module: "reward", code: 8, description: "Record count exceeded limit" },
|
|
266
|
-
{ module: "reward", code: 10, description: "Invalid guard locked time" },
|
|
267
|
-
{ module: "reward", code: 11, description: "Guard locked time invalid" },
|
|
268
|
-
{ module: "reward", code: 12, description: "Store from ID not compatible" },
|
|
269
|
-
{
|
|
270
|
-
module: "arbitration",
|
|
271
|
-
code: 1,
|
|
272
|
-
description: "Guard identifier not number type",
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
module: "arbitration",
|
|
276
|
-
code: 2,
|
|
277
|
-
description: "Voting guard already used",
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
module: "arbitration",
|
|
281
|
-
code: 3,
|
|
282
|
-
description: "Arbitration does not match",
|
|
283
|
-
},
|
|
284
|
-
{ module: "arbitration", code: 4, description: "Arbitration is paused" },
|
|
285
|
-
{ module: "arbitration", code: 5, description: "Fee not enough" },
|
|
286
|
-
{ module: "arbitration", code: 6, description: "Passport required" },
|
|
287
|
-
{
|
|
288
|
-
module: "arbitration",
|
|
289
|
-
code: 7,
|
|
290
|
-
description: "Guard identifier number invalid",
|
|
291
|
-
},
|
|
292
|
-
{ module: "arbitration", code: 8, description: "Voting guard not found" },
|
|
293
|
-
{
|
|
294
|
-
module: "arbitration",
|
|
295
|
-
code: 9,
|
|
296
|
-
description: "Maximum voting guard count exceeded",
|
|
297
|
-
},
|
|
298
|
-
{ module: "demand", code: 1, description: "Maximum reward count exceeded" },
|
|
299
|
-
{ module: "demand", code: 2, description: "Maximum guard count exceeded" },
|
|
300
|
-
{ module: "demand", code: 3, description: "Passport required" },
|
|
301
|
-
{ module: "demand", code: 4, description: "Guard not found" },
|
|
302
|
-
{
|
|
303
|
-
module: "progress",
|
|
304
|
-
code: 1,
|
|
305
|
-
description: "Maximum context repository count exceeded",
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
module: "progress",
|
|
309
|
-
code: 2,
|
|
310
|
-
description: "Maximum named operator count exceeded",
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
module: "progress",
|
|
314
|
-
code: 3,
|
|
315
|
-
description: "Maximum named operator address count exceeded",
|
|
316
|
-
},
|
|
317
|
-
{ module: "progress", code: 4, description: "Machine does not match" },
|
|
318
|
-
{ module: "progress", code: 5, description: "Task already set" },
|
|
319
|
-
{ module: "progress", code: 6, description: "Not the holder" },
|
|
320
|
-
{
|
|
321
|
-
module: "progress",
|
|
322
|
-
code: 7,
|
|
323
|
-
description: "Forward already accomplished",
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
module: "progress",
|
|
327
|
-
code: 8,
|
|
328
|
-
description: "Permission not defined when hold",
|
|
329
|
-
},
|
|
330
|
-
{ module: "progress", code: 9, description: "Passport required" },
|
|
331
|
-
{ module: "progress", code: 10, description: "Order does not match" },
|
|
332
|
-
{ module: "guard", code: 1, description: "Input empty" },
|
|
333
|
-
{ module: "guard", code: 2, description: "Input size exceeded limit" },
|
|
334
|
-
{ module: "guard", code: 3, description: "Table size exceeded limit" },
|
|
335
|
-
{ module: "guard", code: 5, description: "Dependent count exceeded limit" },
|
|
336
|
-
{ module: "guard", code: 6, description: "Not dependent guard" },
|
|
337
|
-
{ module: "guard", code: 7, description: "Guard cannot depend on itself" },
|
|
338
|
-
{ module: "guard", code: 8, description: "Guard IDs parse error" },
|
|
339
|
-
{ module: "guard", code: 9, description: "Guard IDs type error" },
|
|
340
|
-
{
|
|
341
|
-
module: "guard",
|
|
342
|
-
code: 10,
|
|
343
|
-
description: "ID value count not equal to guard count",
|
|
344
|
-
},
|
|
345
|
-
{ module: "guard", code: 11, description: "Submission ID not found" },
|
|
346
|
-
{ module: "guard", code: 12, description: "Submission value type error" },
|
|
347
|
-
{ module: "order", code: 1, description: "Not the owner" },
|
|
348
|
-
{ module: "order", code: 2, description: "Maximum agent count exceeded" },
|
|
349
|
-
{ module: "order", code: 3, description: "Progress not specified" },
|
|
350
|
-
{ module: "order", code: 5, description: "No operation permission" },
|
|
351
|
-
{ module: "order", code: 6, description: "Maximum dispute count exceeded" },
|
|
352
|
-
{ module: "order", code: 7, description: "Order already claimed" },
|
|
353
|
-
{ module: "order", code: 8, description: "Invalid customer info" },
|
|
354
|
-
{ module: "order", code: 9, description: "Allocation not specified" },
|
|
355
|
-
{ module: "order", code: 10, description: "Allocation already specified" },
|
|
356
|
-
{ module: "order", code: 11, description: "Progress already specified" },
|
|
357
|
-
{
|
|
358
|
-
module: "machine",
|
|
359
|
-
code: 1,
|
|
360
|
-
description: "Maximum consensus repositories exceeded",
|
|
361
|
-
},
|
|
362
|
-
{ module: "machine", code: 2, description: "Machine not published" },
|
|
363
|
-
{ module: "machine", code: 3, description: "Machine already published" },
|
|
364
|
-
{
|
|
365
|
-
module: "machine",
|
|
366
|
-
code: 4,
|
|
367
|
-
description: "Maximum forward order count exceeded",
|
|
368
|
-
},
|
|
369
|
-
{ module: "machine", code: 5, description: "Maximum node count exceeded" },
|
|
370
|
-
{ module: "machine", code: 6, description: "Duplicate forward name" },
|
|
371
|
-
{ module: "machine", code: 7, description: "Duplicate node previous" },
|
|
372
|
-
{ module: "machine", code: 8, description: "Old node name does not exist" },
|
|
373
|
-
{ module: "machine", code: 9, description: "New node name already exists" },
|
|
374
|
-
{ module: "machine", code: 10, description: "Node not found" },
|
|
375
|
-
{ module: "machine", code: 11, description: "Machine is paused" },
|
|
376
|
-
{ module: "machine", code: 12, description: "Retained submission error" },
|
|
377
|
-
{ module: "machine", code: 13, description: "Info not found" },
|
|
378
|
-
{ module: "machine", code: 14, description: "Permission not defined" },
|
|
379
|
-
{
|
|
380
|
-
module: "machine",
|
|
381
|
-
code: 15,
|
|
382
|
-
description: "Maximum node pair count exceeded",
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
module: "machine",
|
|
386
|
-
code: 16,
|
|
387
|
-
description: "Maximum forward count exceeded",
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
module: "treasury",
|
|
391
|
-
code: 1,
|
|
392
|
-
description: "Maximum external deposit guard count exceeded",
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
module: "treasury",
|
|
396
|
-
code: 2,
|
|
397
|
-
description: "Maximum external withdraw guard count exceeded",
|
|
398
|
-
},
|
|
399
|
-
{
|
|
400
|
-
module: "treasury",
|
|
401
|
-
code: 3,
|
|
402
|
-
description: "External deposit guard not found",
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
module: "treasury",
|
|
406
|
-
code: 4,
|
|
407
|
-
description: "External withdraw guard not found",
|
|
408
|
-
},
|
|
409
|
-
{ module: "treasury", code: 5, description: "Identifier not number type" },
|
|
410
|
-
{ module: "treasury", code: 6, description: "Deposit insufficient amount" },
|
|
411
|
-
{
|
|
412
|
-
module: "treasury",
|
|
413
|
-
code: 7,
|
|
414
|
-
description: "Withdraw insufficient amount",
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
module: "treasury",
|
|
418
|
-
code: 8,
|
|
419
|
-
description: "Store from ID not compatible",
|
|
420
|
-
},
|
|
421
|
-
{
|
|
422
|
-
module: "arb",
|
|
423
|
-
code: 1,
|
|
424
|
-
description: "Maximum proposition count exceeded",
|
|
425
|
-
},
|
|
426
|
-
{ module: "arb", code: 2, description: "Arbitration order does not match" },
|
|
427
|
-
{ module: "arb", code: 3, description: "Status does not match" },
|
|
428
|
-
{ module: "arb", code: 4, description: "Voting deadline not passed" },
|
|
429
|
-
{ module: "arb", code: 5, description: "Proposition not found" },
|
|
430
|
-
{ module: "arb", code: 6, description: "Maximum voter count exceeded" },
|
|
431
|
-
{ module: "arb", code: 7, description: "Voting deadline passed" },
|
|
432
|
-
{
|
|
433
|
-
module: "arb",
|
|
434
|
-
code: 8,
|
|
435
|
-
description: "Withdraw duration time not passed",
|
|
436
|
-
},
|
|
437
|
-
{
|
|
438
|
-
module: "repository",
|
|
439
|
-
code: 1,
|
|
440
|
-
description: "Policy description length exceeded",
|
|
441
|
-
},
|
|
442
|
-
{
|
|
443
|
-
module: "repository",
|
|
444
|
-
code: 2,
|
|
445
|
-
description: "Policy guard count exceeded",
|
|
446
|
-
},
|
|
447
|
-
{ module: "repository", code: 3, description: "Policy count exceeded" },
|
|
448
|
-
{ module: "repository", code: 4, description: "Data size exceeded limit" },
|
|
449
|
-
{ module: "repository", code: 5, description: "ID count exceeded limit" },
|
|
450
|
-
{ module: "repository", code: 6, description: "Quantities not equal" },
|
|
451
|
-
{ module: "repository", code: 7, description: "Policy not found" },
|
|
452
|
-
{ module: "repository", code: 8, description: "Policy ID from none" },
|
|
453
|
-
{ module: "repository", code: 9, description: "Passport required" },
|
|
454
|
-
{ module: "repository", code: 10, description: "Data type does not match" },
|
|
455
|
-
{
|
|
456
|
-
module: "repository",
|
|
457
|
-
code: 11,
|
|
458
|
-
description: "Guard specified ID from submission",
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
module: "repository",
|
|
462
|
-
code: 12,
|
|
463
|
-
description: "Not impact guard in passport",
|
|
464
|
-
},
|
|
465
|
-
{
|
|
466
|
-
module: "repository",
|
|
467
|
-
code: 13,
|
|
468
|
-
description: "Guard specified not in policy",
|
|
469
|
-
},
|
|
470
|
-
{ module: "repository", code: 14, description: "ID vector not enough" },
|
|
471
|
-
{ module: "repository", code: 15, description: "Data vector not enough" },
|
|
472
|
-
{
|
|
473
|
-
module: "repository",
|
|
474
|
-
code: 16,
|
|
475
|
-
description: "Invalid ID in guard table",
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
module: "repository",
|
|
479
|
-
code: 17,
|
|
480
|
-
description: "Invalid data in guard table",
|
|
481
|
-
},
|
|
482
|
-
{ module: "repository", code: 18, description: "Invalid ID from" },
|
|
483
|
-
{
|
|
484
|
-
module: "repository",
|
|
485
|
-
code: 19,
|
|
486
|
-
description: "Maximum reward count exceeded",
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
module: "repository",
|
|
490
|
-
code: 20,
|
|
491
|
-
description: "Guard not specified ID from submission",
|
|
492
|
-
},
|
|
493
|
-
{ module: "repository", code: 21, description: "Need dependent guard" },
|
|
494
|
-
{ module: "common", code: 1, description: "Name length exceeded limit" },
|
|
495
|
-
{ module: "common", code: 2, description: "Name is empty" },
|
|
496
|
-
{
|
|
497
|
-
module: "common",
|
|
498
|
-
code: 3,
|
|
499
|
-
description: "Description length exceeded limit",
|
|
500
|
-
},
|
|
501
|
-
{ module: "common", code: 6, description: "Invalid value type" },
|
|
502
|
-
{ module: "common", code: 7, description: "Address type does not match" },
|
|
503
|
-
{ module: "common", code: 8, description: "Number type does not match" },
|
|
504
|
-
{ module: "common", code: 9, description: "Invalid data value" },
|
|
505
|
-
{ module: "common", code: 10, description: "Invalid string value" },
|
|
506
|
-
{
|
|
507
|
-
module: "common",
|
|
508
|
-
code: 11,
|
|
509
|
-
description: "Long name length exceeded limit",
|
|
510
|
-
},
|
|
511
|
-
{ module: "common", code: 12, description: "Not u64 type" },
|
|
512
|
-
{ module: "common", code: 13, description: "Invalid service object type" },
|
|
513
|
-
{ module: "resource", code: 1, description: "Tags count exceeded limit" },
|
|
514
|
-
{
|
|
515
|
-
module: "allocation",
|
|
516
|
-
code: 1,
|
|
517
|
-
description: "Recipient identifier not address type",
|
|
518
|
-
},
|
|
519
|
-
{ module: "allocation", code: 2, description: "Allocator count exceeded" },
|
|
520
|
-
{ module: "allocation", code: 3, description: "No allocator" },
|
|
521
|
-
{ module: "allocation", code: 4, description: "Rate not 10000" },
|
|
522
|
-
{ module: "allocation", code: 5, description: "Multiple surplus" },
|
|
523
|
-
{ module: "allocation", code: 6, description: "Rate exceeds 10000" },
|
|
524
|
-
{ module: "allocation", code: 7, description: "Insufficient balance" },
|
|
525
|
-
{ module: "allocation", code: 8, description: "Allocators empty" },
|
|
526
|
-
{ module: "allocation", code: 9, description: "No payment info" },
|
|
527
|
-
{ module: "allocation", code: 10, description: "Sharing count exceeded" },
|
|
528
|
-
{ module: "allocation", code: 11, description: "Sharing mode invalid" },
|
|
529
|
-
{ module: "allocation", code: 12, description: "Amount below threshold" },
|
|
530
|
-
{ module: "allocation", code: 13, description: "Amount exceeds max" },
|
|
531
|
-
{ module: "proof", code: 1, description: "Maximum proof size exceeded" },
|
|
532
|
-
{
|
|
533
|
-
module: "proof",
|
|
534
|
-
code: 2,
|
|
535
|
-
description: "Maximum server pubkey size exceeded",
|
|
536
|
-
},
|
|
537
|
-
{
|
|
538
|
-
module: "proof",
|
|
539
|
-
code: 3,
|
|
540
|
-
description: "Maximum server signature size exceeded",
|
|
541
|
-
},
|
|
542
|
-
{ module: "payment", code: 1, description: "Recipient count exceeded" },
|
|
543
|
-
{ module: "payment", code: 2, description: "Vector count not equal" },
|
|
544
|
-
{ module: "payment", code: 3, description: "Payment not match" },
|
|
545
|
-
{ module: "payment", code: 4, description: "Recipient empty" },
|
|
546
|
-
{ module: "contact", code: 1, description: "IM count exceeded" },
|
|
547
|
-
{ module: "registrar", code: 0, description: "Not system address" },
|
|
548
|
-
{ module: "registrar", code: 1, description: "Record count exceeded" },
|
|
549
|
-
{ module: "registrar", code: 2, description: "Record length exceeded" },
|
|
550
|
-
{ module: "registrar", code: 3, description: "Record type empty" },
|
|
551
|
-
{ module: "transfer", code: 0, description: "Shared non-new object" },
|
|
552
|
-
{ module: "transfer", code: 1, description: "BCS serialization failure" },
|
|
553
|
-
{
|
|
554
|
-
module: "transfer",
|
|
555
|
-
code: 2,
|
|
556
|
-
description: "Receiving object type mismatch",
|
|
557
|
-
},
|
|
558
|
-
{ module: "transfer", code: 3, description: "Unable to receive object" },
|
|
559
|
-
{
|
|
560
|
-
module: "transfer",
|
|
561
|
-
code: 4,
|
|
562
|
-
description: "Shared object operation not supported",
|
|
563
|
-
},
|
|
564
|
-
{ module: "transfer", code: 5, description: "Operation not supported" },
|
|
565
|
-
{ module: "transfer", code: 6, description: "Invalid party permissions" },
|
|
566
|
-
{
|
|
567
|
-
module: "tx_context",
|
|
568
|
-
code: 0,
|
|
569
|
-
description: "Bad transaction hash length",
|
|
570
|
-
},
|
|
571
|
-
{ module: "coin", code: 0, description: "Bad witness" },
|
|
572
|
-
{ module: "coin", code: 1, description: "Invalid argument" },
|
|
573
|
-
{ module: "coin", code: 2, description: "Not enough balance" },
|
|
574
|
-
{ module: "coin", code: 3, description: "Global pause not allowed" },
|
|
575
|
-
{ module: "borrow", code: 0, description: "Wrong borrow" },
|
|
576
|
-
{ module: "borrow", code: 1, description: "Wrong value" },
|
|
577
|
-
{ module: "bcs", code: 0, description: "Out of range" },
|
|
578
|
-
{ module: "bcs", code: 1, description: "Not bool" },
|
|
579
|
-
{ module: "bcs", code: 2, description: "Length out of range" },
|
|
580
|
-
{ module: "balance", code: 0, description: "Non-zero balance" },
|
|
581
|
-
{ module: "balance", code: 1, description: "Overflow" },
|
|
582
|
-
{ module: "balance", code: 2, description: "Not enough" },
|
|
583
|
-
{ module: "balance", code: 3, description: "Not system address" },
|
|
584
|
-
{ module: "balance", code: 4, description: "Not WOW" },
|
|
585
|
-
{ module: "parent_table", code: 0, description: "Parent table not match" },
|
|
586
|
-
{ module: "parent_table_vec", code: 0, description: "Index out of bound" },
|
|
587
|
-
{ module: "parent_linked_table", code: 0, description: "Table is empty" },
|
|
588
|
-
{ module: "parent_linked_table", code: 1, description: "Table not match" },
|
|
589
|
-
];
|
|
590
|
-
export function getMoveErrorDescription(module, code) {
|
|
591
|
-
const error = MoveErrors.find((e) => e.module === module && e.code === code);
|
|
592
|
-
return error ? error.description : null;
|
|
593
|
-
}
|
|
594
|
-
export function enrichMoveError(errorMessage) {
|
|
595
|
-
if (!errorMessage || typeof errorMessage !== "string") {
|
|
596
|
-
return errorMessage;
|
|
597
|
-
}
|
|
598
|
-
const moveAbortRegex = /MoveAbort\([^,]+,\s*(\d+)\)/;
|
|
599
|
-
const moduleNameRegex = /name:\s*Identifier\("([^"]+)"\)/;
|
|
600
|
-
const addressRegex = /address:\s*([0-9a-fA-Fx]+)/;
|
|
601
|
-
const moveAbortMatch = errorMessage.match(moveAbortRegex);
|
|
602
|
-
const moduleNameMatch = errorMessage.match(moduleNameRegex);
|
|
603
|
-
const addressMatch = errorMessage.match(addressRegex);
|
|
604
|
-
const WOWOK_ADDRESS = "0x0000000000000000000000000000000000000000000000000000000000000002";
|
|
605
|
-
if (moveAbortMatch && moduleNameMatch && addressMatch) {
|
|
606
|
-
const errorCode = parseInt(moveAbortMatch[1], 10);
|
|
607
|
-
const moduleName = moduleNameMatch[1].toLowerCase();
|
|
608
|
-
const moduleAddress = addressMatch[1].toLowerCase();
|
|
609
|
-
if (moduleAddress === WOWOK_ADDRESS || moduleAddress === "0x2") {
|
|
610
|
-
const matchedError = MoveErrors.find((e) => e.module.toLowerCase() === moduleName &&
|
|
611
|
-
e.code === errorCode);
|
|
612
|
-
if (matchedError) {
|
|
613
|
-
return `Error Description: ${matchedError.description}\n${errorMessage}`;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
return errorMessage;
|
|
618
|
-
}
|
|
1
|
+
export var WErrors;(function(a){a['AccountNotFound']='account\x20not\x20found',a['AddressNotFound']='address\x20not\x20found',a['IsValidDescription']='invalid\x20description',a['IsValidName']='invalid\x20name',a['IsValidName_AllowEmpty']='invalid\x20name',a['IsValidEndpoint']='invalid\x20endpoint',a['IsValidAddress']='invalid\x20address',a['IsValidArgType']='invalid\x20argument\x20type',a['IsValidTokenType']='invalid\x20token\x20type',a['IsValidUint']='invalid\x20uint',a['IsValidInt']='invalid\x20int',a['IsValidU8']='invalid\x20u8',a['IsValidU16']='invalid\x20u16',a['IsValidU32']='invalid\x20u32',a['IsValidU64']='invalid\x20u64',a['IsValidU128']='invalid\x20u128',a['IsValidU256']='invalid\x20u256',a['IsValidRate']='invalid\x20rate[0-10000]',a['IsValidArray']='invalid\x20array',a['IsValidObjects']='invalid\x20objects',a['AllInvalid']='one\x20valid\x20at\x20least',a['InvalidParam']='invalid\x20parameter',a['IsValidPermissionIndex']='invalid\x20permission\x20index',a['IsValidKey']='invalid\x20key',a['Fail']='fail',a['IsValidIdentifier']='identifier\x20invalid',a['IsValidHttpUrl']='invalid\x20url',a['IsValidBizPermissionIndex']='invalid\x20biz-permission\x20id[1000\x20-\x2065535]',a['BcsTypeInvalid']='invalid\x20bcs\x20type',a['IsValidServiceItemName']='invalid\x20service\x20item\x20name',a['IsValidCoinType']='not\x20the\x20coin\x20type',a['IsValidGuardIdentifier']='guard\x20identifier\x20invalid',a['NoPermission']='no\x20permission',a['IsValidValue']='invalid\x20value',a['IsValidValueType']='invalid\x20value\x20type',a['IsValidLocation']='invalid\x20location',a['NetworkInvalid']='protocol\x20network\x20not\x20specified',a['WitnessTypeInvalid']='witness\x20type\x20invalid',a['AddressCountExceeded']='address\x20count\x20exceeded',a['NumberCountExceeded']='number\x20count\x20exceeded',a['NewGuardCheckFailed']='new\x20guard\x20check\x20failed',a['GuardTableItemLengthExceeded']='guard\x20table\x20item\x20length\x20exceeded',a['AccountPersistentStorageNotSet']='account\x20persistent\x20storage\x20not\x20set',a['AccountPersistentStorageNotFound']='account\x20persistent\x20storage\x20not\x20found',a['AccountNameExist']='account\x20name\x20exist',a['ConfigPersistentStorageNotSet']='config\x20persistent\x20storage\x20not\x20set',a['TokenNotFoundLocally']='token\x20not\x20found',a['LocalMarkNameExist']='local\x20mark\x20name\x20exist',a['MaxObjectsPerQuery']='max\x20objects\x20per\x20query',a['ResourceTagCountExceeded']='resource\x20tag\x20count\x20exceeded',a['ParseObjectContentFailed']='parse\x20object\x20content\x20failed';}(WErrors||(WErrors={})));export class WException extends Error{['code'];['details'];constructor(a,b){const c=a['toString']()+(b?':'+b:'');super(c),this['code']=a,this['details']=b,Object['setPrototypeOf'](this,WException['prototype']);}['getErrorMessage'](){return this['message'];}['getErrorCode'](){return this['code'];}['getDetails'](){return this['details'];}}export const W_ERROR=(a,b)=>{throw new WException(a,b);};export const W_SUCCESS=a=>({'success':!![],'data':a});export const W_FAILURE=(a,b)=>({'success':![],'error':new WException(a,b)});export function WValidate(a){return function(...b){try{return a['apply'](this,b);}catch(c){if(c instanceof WException)throw c;throw new WException(WErrors['Fail'],c);}};}export const W_SAFE=(a,b,c)=>{try{const d=a();return W_SUCCESS(d);}catch(e){if(e instanceof WException)return W_FAILURE(e['code'],e['details']);return W_FAILURE(b||WErrors['Fail'],c||e);}};export const W_ENSURE=(a,b,c)=>{!a&&W_ERROR(b,c);};export const W_VALIDATE_PARAM=(a,b,c,d)=>{!b(a)&&W_ERROR(c,d);};export const MoveErrors=[{'module':'service','code':0x1,'description':'Maximum\x20sale\x20count\x20exceeded'},{'module':'service','code':0x2,'description':'Maximum\x20repository\x20count\x20exceeded'},{'module':'service','code':0x3,'description':'Maximum\x20arbitration\x20count\x20exceeded'},{'module':'service','code':0x4,'description':'Maximum\x20WIP\x20length\x20exceeded'},{'module':'service','code':0x5,'description':'Maximum\x20WIP\x20hash\x20length\x20exceeded'},{'module':'service','code':0x6,'description':'Service\x20already\x20published'},{'module':'service','code':0x7,'description':'Service\x20not\x20published'},{'module':'service','code':0x8,'description':'Invalid\x20off-on\x20discount\x20rates'},{'module':'service','code':0x9,'description':'Maximum\x20discount\x20count\x20per\x20operation\x20exceeded'},{'module':'service','code':0xa,'description':'Discount\x20not\x20transferable'},{'module':'service','code':0xb,'description':'Discount\x20receiver\x20empty'},{'module':'service','code':0xc,'description':'Discount\x20count\x20empty'},{'module':'service','code':0xd,'description':'Maximum\x20discount\x20receiver\x20per\x20operation\x20exceeded'},{'module':'service','code':0xe,'description':'Maximum\x20total\x20discount\x20count\x20exceeded'},{'module':'service','code':0xf,'description':'Service\x20discount\x20does\x20not\x20match'},{'module':'service','code':0x10,'description':'Stock\x20not\x20enough'},{'module':'service','code':0x11,'description':'Invalid\x20quote'},{'module':'service','code':0x12,'description':'Buyer\x20guard\x20passport\x20required'},{'module':'service','code':0x13,'description':'Service\x20is\x20paused'},{'module':'service','code':0x14,'description':'Coin\x20not\x20enough'},{'module':'service','code':0x15,'description':'Maximum\x20required\x20info\x20size\x20exceeded'},{'module':'service','code':0x16,'description':'Machine\x20does\x20not\x20match'},{'module':'service','code':0x17,'description':'No\x20allocator\x20configured'},{'module':'service','code':0x18,'description':'Compensation\x20withdraw\x20time\x20not\x20enough'},{'module':'service','code':0x19,'description':'Arbitration\x20not\x20set\x20with\x20compensation\x20fund'},{'module':'service','code':0x1a,'description':'Order\x20service\x20does\x20not\x20match'},{'module':'service','code':0x1b,'description':'Compensation\x20does\x20not\x20match'},{'module':'service','code':0x1c,'description':'Maximum\x20reward\x20count\x20exceeded'},{'module':'service','code':0x1d,'description':'Invalid\x20discount\x20type'},{'module':'service','code':0x1e,'description':'Invalid\x20timestamp\x20ms\x20end'},{'module':'service','code':0x1f,'description':'WIP\x20hash\x20not\x20match'},{'module':'service','code':0x20,'description':'Sale\x20item\x20not\x20found'},{'module':'permission','code':0x1,'description':'Not\x20the\x20builder'},{'module':'permission','code':0x2,'description':'Not\x20admin'},{'module':'permission','code':0x3,'description':'Address\x20count\x20in\x20permission\x20exceeded\x20limit'},{'module':'permission','code':0x4,'description':'Permission\x20count\x20exceeded\x20limit'},{'module':'permission','code':0x5,'description':'Permission\x20denied'},{'module':'permission','code':0x6,'description':'Admin\x20count\x20exceeded\x20limit'},{'module':'permission','code':0x7,'description':'Permission\x20index\x20not\x20found'},{'module':'permission','code':0x8,'description':'Permission\x20does\x20not\x20match'},{'module':'permission','code':0x9,'description':'Not\x20user\x20address'},{'module':'passport','code':0x1,'description':'Guard\x20count\x20exceeded\x20limit'},{'module':'passport','code':0x2,'description':'Relies\x20guard\x20not\x20added'},{'module':'passport','code':0x3,'description':'Submission\x20size\x20exceeded\x20limit'},{'module':'passport','code':0x4,'description':'Already\x20verified'},{'module':'passport','code':0x5,'description':'Not\x20verified'},{'module':'passport','code':0x6,'description':'Not\x20impact\x20guard'},{'module':'passport','code':0x7,'description':'Verification\x20failed'},{'module':'passport','code':0x8,'description':'Transaction\x20does\x20not\x20match'},{'module':'passport','code':0x9,'description':'Impact\x20guard\x20not\x20found'},{'module':'passport','code':0xa,'description':'Submission\x20not\x20found'},{'module':'passport','code':0xb,'description':'Digest\x20not\x20match'},{'module':'reward','code':0x1,'description':'Guard\x20locked\x20time\x20not\x20increasing'},{'module':'reward','code':0x2,'description':'Guard\x20expired'},{'module':'reward','code':0x3,'description':'Guard\x20count\x20exceeded\x20limit'},{'module':'reward','code':0x4,'description':'Recipient\x20identifier\x20not\x20address\x20type'},{'module':'reward','code':0x5,'description':'Amount\x20not\x20u64\x20type'},{'module':'reward','code':0x6,'description':'Insufficient\x20balance'},{'module':'reward','code':0x7,'description':'Guard\x20not\x20found'},{'module':'reward','code':0x8,'description':'Record\x20count\x20exceeded\x20limit'},{'module':'reward','code':0xa,'description':'Invalid\x20guard\x20locked\x20time'},{'module':'reward','code':0xb,'description':'Guard\x20locked\x20time\x20invalid'},{'module':'reward','code':0xc,'description':'Store\x20from\x20ID\x20not\x20compatible'},{'module':'arbitration','code':0x1,'description':'Guard\x20identifier\x20not\x20number\x20type'},{'module':'arbitration','code':0x2,'description':'Voting\x20guard\x20already\x20used'},{'module':'arbitration','code':0x3,'description':'Arbitration\x20does\x20not\x20match'},{'module':'arbitration','code':0x4,'description':'Arbitration\x20is\x20paused'},{'module':'arbitration','code':0x5,'description':'Fee\x20not\x20enough'},{'module':'arbitration','code':0x6,'description':'Passport\x20required'},{'module':'arbitration','code':0x7,'description':'Guard\x20identifier\x20number\x20invalid'},{'module':'arbitration','code':0x8,'description':'Voting\x20guard\x20not\x20found'},{'module':'arbitration','code':0x9,'description':'Maximum\x20voting\x20guard\x20count\x20exceeded'},{'module':'demand','code':0x1,'description':'Maximum\x20reward\x20count\x20exceeded'},{'module':'demand','code':0x2,'description':'Maximum\x20guard\x20count\x20exceeded'},{'module':'demand','code':0x3,'description':'Passport\x20required'},{'module':'demand','code':0x4,'description':'Guard\x20not\x20found'},{'module':'progress','code':0x1,'description':'Maximum\x20context\x20repository\x20count\x20exceeded'},{'module':'progress','code':0x2,'description':'Maximum\x20named\x20operator\x20count\x20exceeded'},{'module':'progress','code':0x3,'description':'Maximum\x20named\x20operator\x20address\x20count\x20exceeded'},{'module':'progress','code':0x4,'description':'Machine\x20does\x20not\x20match'},{'module':'progress','code':0x5,'description':'Task\x20already\x20set'},{'module':'progress','code':0x6,'description':'Not\x20the\x20holder'},{'module':'progress','code':0x7,'description':'Forward\x20already\x20accomplished'},{'module':'progress','code':0x8,'description':'Permission\x20not\x20defined\x20when\x20hold'},{'module':'progress','code':0x9,'description':'Passport\x20required'},{'module':'progress','code':0xa,'description':'Order\x20does\x20not\x20match'},{'module':'guard','code':0x1,'description':'Input\x20empty'},{'module':'guard','code':0x2,'description':'Input\x20size\x20exceeded\x20limit'},{'module':'guard','code':0x3,'description':'Table\x20size\x20exceeded\x20limit'},{'module':'guard','code':0x5,'description':'Dependent\x20count\x20exceeded\x20limit'},{'module':'guard','code':0x6,'description':'Not\x20dependent\x20guard'},{'module':'guard','code':0x7,'description':'Guard\x20cannot\x20depend\x20on\x20itself'},{'module':'guard','code':0x8,'description':'Guard\x20IDs\x20parse\x20error'},{'module':'guard','code':0x9,'description':'Guard\x20IDs\x20type\x20error'},{'module':'guard','code':0xa,'description':'ID\x20value\x20count\x20not\x20equal\x20to\x20guard\x20count'},{'module':'guard','code':0xb,'description':'Submission\x20ID\x20not\x20found'},{'module':'guard','code':0xc,'description':'Submission\x20value\x20type\x20error'},{'module':'order','code':0x1,'description':'Not\x20the\x20owner'},{'module':'order','code':0x2,'description':'Maximum\x20agent\x20count\x20exceeded'},{'module':'order','code':0x3,'description':'Progress\x20not\x20specified'},{'module':'order','code':0x5,'description':'No\x20operation\x20permission'},{'module':'order','code':0x6,'description':'Maximum\x20dispute\x20count\x20exceeded'},{'module':'order','code':0x7,'description':'Order\x20already\x20claimed'},{'module':'order','code':0x8,'description':'Invalid\x20customer\x20info'},{'module':'order','code':0x9,'description':'Allocation\x20not\x20specified'},{'module':'order','code':0xa,'description':'Allocation\x20already\x20specified'},{'module':'order','code':0xb,'description':'Progress\x20already\x20specified'},{'module':'machine','code':0x1,'description':'Maximum\x20consensus\x20repositories\x20exceeded'},{'module':'machine','code':0x2,'description':'Machine\x20not\x20published'},{'module':'machine','code':0x3,'description':'Machine\x20already\x20published'},{'module':'machine','code':0x4,'description':'Maximum\x20forward\x20order\x20count\x20exceeded'},{'module':'machine','code':0x5,'description':'Maximum\x20node\x20count\x20exceeded'},{'module':'machine','code':0x6,'description':'Duplicate\x20forward\x20name'},{'module':'machine','code':0x7,'description':'Duplicate\x20node\x20previous'},{'module':'machine','code':0x8,'description':'Old\x20node\x20name\x20does\x20not\x20exist'},{'module':'machine','code':0x9,'description':'New\x20node\x20name\x20already\x20exists'},{'module':'machine','code':0xa,'description':'Node\x20not\x20found'},{'module':'machine','code':0xb,'description':'Machine\x20is\x20paused'},{'module':'machine','code':0xc,'description':'Retained\x20submission\x20error'},{'module':'machine','code':0xd,'description':'Info\x20not\x20found'},{'module':'machine','code':0xe,'description':'Permission\x20not\x20defined'},{'module':'machine','code':0xf,'description':'Maximum\x20node\x20pair\x20count\x20exceeded'},{'module':'machine','code':0x10,'description':'Maximum\x20forward\x20count\x20exceeded'},{'module':'treasury','code':0x1,'description':'Maximum\x20external\x20deposit\x20guard\x20count\x20exceeded'},{'module':'treasury','code':0x2,'description':'Maximum\x20external\x20withdraw\x20guard\x20count\x20exceeded'},{'module':'treasury','code':0x3,'description':'External\x20deposit\x20guard\x20not\x20found'},{'module':'treasury','code':0x4,'description':'External\x20withdraw\x20guard\x20not\x20found'},{'module':'treasury','code':0x5,'description':'Identifier\x20not\x20number\x20type'},{'module':'treasury','code':0x6,'description':'Deposit\x20insufficient\x20amount'},{'module':'treasury','code':0x7,'description':'Withdraw\x20insufficient\x20amount'},{'module':'treasury','code':0x8,'description':'Store\x20from\x20ID\x20not\x20compatible'},{'module':'arb','code':0x1,'description':'Maximum\x20proposition\x20count\x20exceeded'},{'module':'arb','code':0x2,'description':'Arbitration\x20order\x20does\x20not\x20match'},{'module':'arb','code':0x3,'description':'Status\x20does\x20not\x20match'},{'module':'arb','code':0x4,'description':'Voting\x20deadline\x20not\x20passed'},{'module':'arb','code':0x5,'description':'Proposition\x20not\x20found'},{'module':'arb','code':0x6,'description':'Maximum\x20voter\x20count\x20exceeded'},{'module':'arb','code':0x7,'description':'Voting\x20deadline\x20passed'},{'module':'arb','code':0x8,'description':'Withdraw\x20duration\x20time\x20not\x20passed'},{'module':'repository','code':0x1,'description':'Policy\x20description\x20length\x20exceeded'},{'module':'repository','code':0x2,'description':'Policy\x20guard\x20count\x20exceeded'},{'module':'repository','code':0x3,'description':'Policy\x20count\x20exceeded'},{'module':'repository','code':0x4,'description':'Data\x20size\x20exceeded\x20limit'},{'module':'repository','code':0x5,'description':'ID\x20count\x20exceeded\x20limit'},{'module':'repository','code':0x6,'description':'Quantities\x20not\x20equal'},{'module':'repository','code':0x7,'description':'Policy\x20not\x20found'},{'module':'repository','code':0x8,'description':'Policy\x20ID\x20from\x20none'},{'module':'repository','code':0x9,'description':'Passport\x20required'},{'module':'repository','code':0xa,'description':'Data\x20type\x20does\x20not\x20match'},{'module':'repository','code':0xb,'description':'Guard\x20specified\x20ID\x20from\x20submission'},{'module':'repository','code':0xc,'description':'Not\x20impact\x20guard\x20in\x20passport'},{'module':'repository','code':0xd,'description':'Guard\x20specified\x20not\x20in\x20policy'},{'module':'repository','code':0xe,'description':'ID\x20vector\x20not\x20enough'},{'module':'repository','code':0xf,'description':'Data\x20vector\x20not\x20enough'},{'module':'repository','code':0x10,'description':'Invalid\x20ID\x20in\x20guard\x20table'},{'module':'repository','code':0x11,'description':'Invalid\x20data\x20in\x20guard\x20table'},{'module':'repository','code':0x12,'description':'Invalid\x20ID\x20from'},{'module':'repository','code':0x13,'description':'Maximum\x20reward\x20count\x20exceeded'},{'module':'repository','code':0x14,'description':'Guard\x20not\x20specified\x20ID\x20from\x20submission'},{'module':'repository','code':0x15,'description':'Need\x20dependent\x20guard'},{'module':'common','code':0x1,'description':'Name\x20length\x20exceeded\x20limit'},{'module':'common','code':0x2,'description':'Name\x20is\x20empty'},{'module':'common','code':0x3,'description':'Description\x20length\x20exceeded\x20limit'},{'module':'common','code':0x6,'description':'Invalid\x20value\x20type'},{'module':'common','code':0x7,'description':'Address\x20type\x20does\x20not\x20match'},{'module':'common','code':0x8,'description':'Number\x20type\x20does\x20not\x20match'},{'module':'common','code':0x9,'description':'Invalid\x20data\x20value'},{'module':'common','code':0xa,'description':'Invalid\x20string\x20value'},{'module':'common','code':0xb,'description':'Long\x20name\x20length\x20exceeded\x20limit'},{'module':'common','code':0xc,'description':'Not\x20u64\x20type'},{'module':'common','code':0xd,'description':'Invalid\x20service\x20object\x20type'},{'module':'resource','code':0x1,'description':'Tags\x20count\x20exceeded\x20limit'},{'module':'allocation','code':0x1,'description':'Recipient\x20identifier\x20not\x20address\x20type'},{'module':'allocation','code':0x2,'description':'Allocator\x20count\x20exceeded'},{'module':'allocation','code':0x3,'description':'No\x20allocator'},{'module':'allocation','code':0x4,'description':'Rate\x20not\x2010000'},{'module':'allocation','code':0x5,'description':'Multiple\x20surplus'},{'module':'allocation','code':0x6,'description':'Rate\x20exceeds\x2010000'},{'module':'allocation','code':0x7,'description':'Insufficient\x20balance'},{'module':'allocation','code':0x8,'description':'Allocators\x20empty'},{'module':'allocation','code':0x9,'description':'No\x20payment\x20info'},{'module':'allocation','code':0xa,'description':'Sharing\x20count\x20exceeded'},{'module':'allocation','code':0xb,'description':'Sharing\x20mode\x20invalid'},{'module':'allocation','code':0xc,'description':'Amount\x20below\x20threshold'},{'module':'allocation','code':0xd,'description':'Amount\x20exceeds\x20max'},{'module':'proof','code':0x1,'description':'Maximum\x20proof\x20size\x20exceeded'},{'module':'proof','code':0x2,'description':'Maximum\x20server\x20pubkey\x20size\x20exceeded'},{'module':'proof','code':0x3,'description':'Maximum\x20server\x20signature\x20size\x20exceeded'},{'module':'payment','code':0x1,'description':'Recipient\x20count\x20exceeded'},{'module':'payment','code':0x2,'description':'Vector\x20count\x20not\x20equal'},{'module':'payment','code':0x3,'description':'Payment\x20not\x20match'},{'module':'payment','code':0x4,'description':'Recipient\x20empty'},{'module':'contact','code':0x1,'description':'IM\x20count\x20exceeded'},{'module':'registrar','code':0x0,'description':'Not\x20system\x20address'},{'module':'registrar','code':0x1,'description':'Record\x20count\x20exceeded'},{'module':'registrar','code':0x2,'description':'Record\x20length\x20exceeded'},{'module':'registrar','code':0x3,'description':'Record\x20type\x20empty'},{'module':'transfer','code':0x0,'description':'Shared\x20non-new\x20object'},{'module':'transfer','code':0x1,'description':'BCS\x20serialization\x20failure'},{'module':'transfer','code':0x2,'description':'Receiving\x20object\x20type\x20mismatch'},{'module':'transfer','code':0x3,'description':'Unable\x20to\x20receive\x20object'},{'module':'transfer','code':0x4,'description':'Shared\x20object\x20operation\x20not\x20supported'},{'module':'transfer','code':0x5,'description':'Operation\x20not\x20supported'},{'module':'transfer','code':0x6,'description':'Invalid\x20party\x20permissions'},{'module':'tx_context','code':0x0,'description':'Bad\x20transaction\x20hash\x20length'},{'module':'coin','code':0x0,'description':'Bad\x20witness'},{'module':'coin','code':0x1,'description':'Invalid\x20argument'},{'module':'coin','code':0x2,'description':'Not\x20enough\x20balance'},{'module':'coin','code':0x3,'description':'Global\x20pause\x20not\x20allowed'},{'module':'borrow','code':0x0,'description':'Wrong\x20borrow'},{'module':'borrow','code':0x1,'description':'Wrong\x20value'},{'module':'bcs','code':0x0,'description':'Out\x20of\x20range'},{'module':'bcs','code':0x1,'description':'Not\x20bool'},{'module':'bcs','code':0x2,'description':'Length\x20out\x20of\x20range'},{'module':'balance','code':0x0,'description':'Non-zero\x20balance'},{'module':'balance','code':0x1,'description':'Overflow'},{'module':'balance','code':0x2,'description':'Not\x20enough'},{'module':'balance','code':0x3,'description':'Not\x20system\x20address'},{'module':'balance','code':0x4,'description':'Not\x20WOW'},{'module':'parent_table','code':0x0,'description':'Parent\x20table\x20not\x20match'},{'module':'parent_table_vec','code':0x0,'description':'Index\x20out\x20of\x20bound'},{'module':'parent_linked_table','code':0x0,'description':'Table\x20is\x20empty'},{'module':'parent_linked_table','code':0x1,'description':'Table\x20not\x20match'}];export function getMoveErrorDescription(a,b){const c=MoveErrors['find'](d=>d['module']===a&&d['code']===b);return c?c['description']:null;}export function enrichMoveError(a){if(!a||typeof a!=='string')return a;const b=/MoveAbort\([^,]+,\s*(\d+)\)/,c=/name:\s*Identifier\("([^"]+)"\)/,d=/address:\s*([0-9a-fA-Fx]+)/,e=a['match'](b),f=a['match'](c),g=a['match'](d),h='0x0000000000000000000000000000000000000000000000000000000000000002';if(e&&f&&g){const i=parseInt(e[0x1],0xa),j=f[0x1]['toLowerCase'](),k=g[0x1]['toLowerCase']();if(k===h||k==='0x2'){const l=MoveErrors['find'](m=>m['module']['toLowerCase']()===j&&m['code']===i);if(l)return'Error\x20Description:\x20'+l['description']+'\x0a'+a;}}return a;}
|