@aeternity/aepp-sdk 11.0.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/aepp-sdk.browser-script.js +1 -1
- package/dist/aepp-sdk.browser-script.js.LICENSE.txt +0 -22
- package/dist/aepp-sdk.browser-script.js.map +1 -1
- package/dist/aepp-sdk.browser.js +2 -1
- package/dist/aepp-sdk.browser.js.LICENSE.txt +1 -0
- package/dist/aepp-sdk.browser.js.map +1 -1
- package/dist/aepp-sdk.js +20764 -1
- package/dist/aepp-sdk.js.map +1 -1
- package/es/AeSdk.d.ts +37 -0
- package/es/AeSdk.mjs +81 -0
- package/es/AeSdk.mjs.map +1 -0
- package/es/AeSdkAepp.d.ts +70 -0
- package/es/AeSdkAepp.mjs +176 -0
- package/es/AeSdkAepp.mjs.map +1 -0
- package/es/AeSdkBase.d.ts +213 -0
- package/es/AeSdkBase.mjs +314 -0
- package/es/AeSdkBase.mjs.map +1 -0
- package/es/AeSdkWallet.d.ts +104 -0
- package/es/AeSdkWallet.mjs +326 -0
- package/es/AeSdkWallet.mjs.map +1 -0
- package/es/Node.d.ts +41 -0
- package/es/Node.mjs +147 -0
- package/es/Node.mjs.map +1 -0
- package/es/account/Base.d.ts +68 -0
- package/es/account/Base.mjs +123 -0
- package/es/account/Base.mjs.map +1 -0
- package/es/account/Memory.d.ts +26 -0
- package/es/account/Memory.mjs +103 -0
- package/es/account/Memory.mjs.map +1 -0
- package/es/account/Rpc.d.ts +27 -0
- package/es/account/Rpc.mjs +80 -0
- package/es/account/Rpc.mjs.map +1 -0
- package/es/aens.d.ts +222 -0
- package/es/aens.mjs +338 -0
- package/es/aens.mjs.map +1 -0
- package/es/aepp-wallet-communication/connection/Browser.d.ts +33 -0
- package/es/aepp-wallet-communication/connection/Browser.mjs +73 -0
- package/es/aepp-wallet-communication/connection/Browser.mjs.map +1 -0
- package/es/aepp-wallet-communication/connection/BrowserRuntime.d.ts +18 -0
- package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs +58 -0
- package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs.map +1 -0
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.d.ts +36 -0
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs +146 -0
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs.map +1 -0
- package/es/aepp-wallet-communication/connection-proxy.d.ts +11 -0
- package/{src/utils/crypto-ts.ts → es/aepp-wallet-communication/connection-proxy.mjs} +16 -11
- package/es/aepp-wallet-communication/connection-proxy.mjs.map +1 -0
- package/es/aepp-wallet-communication/rpc/RpcClient.d.ts +34 -0
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs +169 -0
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs.map +1 -0
- package/es/aepp-wallet-communication/rpc/types.d.ts +77 -0
- package/es/aepp-wallet-communication/rpc/types.mjs +3 -0
- package/es/aepp-wallet-communication/rpc/types.mjs.map +1 -0
- package/es/aepp-wallet-communication/schema.d.ts +105 -46
- package/es/aepp-wallet-communication/schema.mjs +251 -0
- package/es/aepp-wallet-communication/schema.mjs.map +1 -0
- package/es/aepp-wallet-communication/wallet-detector.d.ts +25 -0
- package/es/aepp-wallet-communication/wallet-detector.mjs +62 -0
- package/es/aepp-wallet-communication/wallet-detector.mjs.map +1 -0
- package/es/apis/compiler/compiler.d.ts +92 -0
- package/es/apis/compiler/compiler.mjs +576 -0
- package/es/apis/compiler/compiler.mjs.map +1 -0
- package/es/apis/compiler/index.d.ts +2 -0
- package/es/apis/compiler/index.mjs +3 -0
- package/es/apis/compiler/index.mjs.map +1 -0
- package/es/apis/compiler/models/index.d.ts +248 -0
- package/es/apis/compiler/models/index.mjs +48 -0
- package/es/apis/compiler/models/index.mjs.map +1 -0
- package/es/apis/compiler/models/mappers.d.ts +23 -0
- package/es/apis/compiler/models/mappers.mjs +585 -0
- package/es/apis/compiler/models/mappers.mjs.map +1 -0
- package/es/apis/compiler/models/parameters.d.ts +13 -0
- package/es/apis/compiler/models/parameters.mjs +71 -0
- package/es/apis/compiler/models/parameters.mjs.map +1 -0
- package/es/apis/node/index.d.ts +2 -0
- package/es/apis/node/index.mjs +3 -0
- package/es/apis/node/index.mjs.map +1 -0
- package/es/apis/node/models/index.d.ts +1065 -0
- package/es/apis/node/models/index.mjs +2 -0
- package/es/apis/node/models/index.mjs.map +1 -0
- package/es/apis/node/models/mappers.d.ts +95 -0
- package/es/apis/node/models/mappers.mjs +4166 -0
- package/es/apis/node/models/mappers.mjs.map +1 -0
- package/es/apis/node/models/parameters.d.ts +17 -0
- package/es/apis/node/models/parameters.mjs +165 -0
- package/es/apis/node/models/parameters.mjs.map +1 -0
- package/es/apis/node/node.d.ts +215 -0
- package/es/apis/node/node.mjs +1165 -0
- package/es/apis/node/node.mjs.map +1 -0
- package/es/chain.d.ts +248 -0
- package/es/chain.mjs +560 -0
- package/es/chain.mjs.map +1 -0
- package/es/channel/handlers.d.ts +34 -0
- package/es/channel/handlers.mjs +164 -131
- package/es/channel/handlers.mjs.map +1 -1
- package/es/channel/index.d.ts +625 -0
- package/es/channel/index.mjs +897 -902
- package/es/channel/index.mjs.map +1 -1
- package/es/channel/internal.d.ts +101 -0
- package/es/channel/internal.mjs +138 -88
- package/es/channel/internal.mjs.map +1 -1
- package/es/contract/Compiler.d.ts +18 -0
- package/es/contract/Compiler.mjs +68 -0
- package/es/contract/Compiler.mjs.map +1 -0
- package/es/contract/aci.d.ts +127 -0
- package/es/contract/aci.mjs +225 -193
- package/es/contract/aci.mjs.map +1 -1
- package/es/contract/ga.d.ts +69 -0
- package/es/contract/ga.mjs +195 -0
- package/es/contract/ga.mjs.map +1 -0
- package/es/contract/methods.d.ts +71 -0
- package/es/contract/methods.mjs +104 -0
- package/es/contract/methods.mjs.map +1 -0
- package/es/deprecated/index.d.ts +143 -0
- package/es/deprecated/index.mjs +162 -0
- package/es/deprecated/index.mjs.map +1 -0
- package/es/deprecated/methods.d.ts +18 -0
- package/es/deprecated/methods.mjs +26 -0
- package/es/deprecated/methods.mjs.map +1 -0
- package/es/index.d.ts +35 -0
- package/es/index.mjs +35 -40
- package/es/index.mjs.map +1 -1
- package/es/oracle.d.ts +161 -0
- package/es/oracle.mjs +306 -0
- package/es/oracle.mjs.map +1 -0
- package/es/spend.d.ts +62 -0
- package/es/spend.mjs +111 -0
- package/es/spend.mjs.map +1 -0
- package/es/tx/builder/address.d.ts +25 -0
- package/es/tx/builder/address.mjs +45 -0
- package/es/tx/builder/address.mjs.map +1 -0
- package/es/tx/builder/constants.d.ts +70 -0
- package/es/tx/builder/constants.mjs +122 -0
- package/es/tx/builder/constants.mjs.map +1 -0
- package/es/tx/builder/field-types/coin-amount.d.ts +13 -0
- package/es/tx/builder/field-types/coin-amount.mjs +26 -0
- package/es/tx/builder/field-types/coin-amount.mjs.map +1 -0
- package/es/tx/builder/field-types/deposit.d.ts +15 -0
- package/es/tx/builder/field-types/deposit.mjs +19 -0
- package/es/tx/builder/field-types/deposit.mjs.map +1 -0
- package/es/tx/builder/field-types/fee.d.ts +25 -0
- package/es/tx/builder/field-types/fee.mjs +150 -0
- package/es/tx/builder/field-types/fee.mjs.map +1 -0
- package/es/tx/builder/field-types/field.d.ts +6 -0
- package/es/tx/builder/field-types/field.mjs +15 -0
- package/es/tx/builder/field-types/field.mjs.map +1 -0
- package/es/tx/builder/field-types/gas-limit.d.ts +12 -0
- package/es/tx/builder/field-types/gas-limit.mjs +33 -0
- package/es/tx/builder/field-types/gas-limit.mjs.map +1 -0
- package/es/tx/builder/field-types/gas-price.d.ts +8 -0
- package/es/tx/builder/field-types/gas-price.mjs +18 -0
- package/es/tx/builder/field-types/gas-price.mjs.map +1 -0
- package/es/tx/builder/field-types/index.d.ts +70 -0
- package/es/tx/builder/field-types/index.mjs +25 -0
- package/es/tx/builder/field-types/index.mjs.map +1 -0
- package/es/tx/builder/field-types/name-fee.d.ts +20 -0
- package/es/tx/builder/field-types/name-fee.mjs +24 -0
- package/es/tx/builder/field-types/name-fee.mjs.map +1 -0
- package/es/tx/builder/field-types/name-id.d.ts +14 -0
- package/es/tx/builder/field-types/name-id.mjs +19 -0
- package/es/tx/builder/field-types/name-id.mjs.map +1 -0
- package/es/tx/builder/field-types/name.d.ts +13 -0
- package/es/tx/builder/field-types/name.mjs +18 -0
- package/es/tx/builder/field-types/name.mjs.map +1 -0
- package/es/tx/builder/field-types/short-u-int.d.ts +6 -0
- package/es/tx/builder/field-types/short-u-int.mjs +12 -0
- package/es/tx/builder/field-types/short-u-int.mjs.map +1 -0
- package/es/tx/builder/field-types/u-int.d.ts +8 -0
- package/es/tx/builder/field-types/u-int.mjs +14 -0
- package/es/tx/builder/field-types/u-int.mjs.map +1 -0
- package/es/tx/builder/helpers.d.ts +125 -0
- package/es/tx/builder/helpers.mjs +94 -240
- package/es/tx/builder/helpers.mjs.map +1 -1
- package/es/tx/builder/index.d.ts +88 -0
- package/es/tx/builder/index.mjs +167 -358
- package/es/tx/builder/index.mjs.map +1 -1
- package/es/tx/builder/schema.d.ts +1201 -0
- package/es/tx/builder/schema.mjs +175 -664
- package/es/tx/builder/schema.mjs.map +1 -1
- package/es/tx/index.d.ts +64 -0
- package/es/tx/index.mjs +151 -265
- package/es/tx/index.mjs.map +1 -1
- package/es/tx/validator.d.ts +20 -0
- package/es/tx/validator.mjs +104 -124
- package/es/tx/validator.mjs.map +1 -1
- package/es/typings/@aeternity__argon2-browser/index.d.mjs +2 -0
- package/es/typings/@aeternity__argon2-browser/index.d.mjs.map +1 -0
- package/es/typings/@aeternity__uuid/index.d.mjs +2 -0
- package/es/typings/@aeternity__uuid/index.d.mjs.map +1 -0
- package/es/typings/bip32-path/index.d.mjs +2 -0
- package/es/typings/bip32-path/index.d.mjs.map +1 -0
- package/es/typings/blakejs/index.d.mjs.map +1 -1
- package/es/typings/sha-js/index.d.mjs +2 -0
- package/es/typings/sha-js/index.d.mjs.map +1 -0
- package/es/typings/tweetnacl-auth/index.d.mjs +2 -0
- package/es/typings/tweetnacl-auth/index.d.mjs.map +1 -0
- package/es/utils/amount-formatter.d.ts +42 -0
- package/es/utils/amount-formatter.mjs +36 -49
- package/es/utils/amount-formatter.mjs.map +1 -1
- package/es/utils/autorest.d.ts +6 -0
- package/es/utils/autorest.mjs +97 -0
- package/es/utils/autorest.mjs.map +1 -0
- package/es/utils/bignumber.d.ts +13 -0
- package/es/utils/bignumber.mjs +11 -8
- package/es/utils/bignumber.mjs.map +1 -1
- package/es/{bytes.d.ts → utils/bytes.d.ts} +10 -13
- package/es/utils/bytes.mjs +11 -15
- package/es/utils/bytes.mjs.map +1 -1
- package/es/utils/crypto.d.ts +88 -0
- package/es/utils/crypto.mjs +64 -108
- package/es/utils/crypto.mjs.map +1 -1
- package/es/utils/encoder-types.d.ts +61 -0
- package/es/utils/encoder-types.mjs +36 -0
- package/es/utils/encoder-types.mjs.map +1 -0
- package/es/utils/encoder.d.ts +25 -0
- package/es/utils/encoder.mjs +118 -0
- package/es/utils/encoder.mjs.map +1 -0
- package/es/{errors.d.ts → utils/errors.d.ts} +246 -59
- package/es/utils/errors.mjs +313 -136
- package/es/utils/errors.mjs.map +1 -1
- package/es/utils/hd-wallet.d.ts +50 -0
- package/es/utils/hd-wallet.mjs +86 -45
- package/es/utils/hd-wallet.mjs.map +1 -1
- package/es/utils/json-big.d.ts +5 -0
- package/es/utils/json-big.mjs +12 -16
- package/es/utils/json-big.mjs.map +1 -1
- package/es/utils/keystore.d.ts +51 -0
- package/es/utils/keystore.mjs +101 -194
- package/es/utils/keystore.mjs.map +1 -1
- package/es/{mptree.d.ts → utils/mptree.d.ts} +6 -9
- package/es/utils/mptree.mjs +22 -18
- package/es/utils/mptree.mjs.map +1 -1
- package/es/utils/other.d.ts +20 -0
- package/es/utils/other.mjs +32 -35
- package/es/utils/other.mjs.map +1 -1
- package/es/utils/semver-satisfies.d.ts +1 -0
- package/es/utils/semver-satisfies.mjs +2 -2
- package/es/utils/semver-satisfies.mjs.map +1 -1
- package/es/utils/string.d.ts +24 -0
- package/es/utils/string.mjs +8 -10
- package/es/utils/string.mjs.map +1 -1
- package/package.json +56 -42
- package/src/AeSdk.ts +68 -0
- package/src/AeSdkAepp.ts +176 -0
- package/src/AeSdkBase.ts +338 -0
- package/src/AeSdkWallet.ts +348 -0
- package/src/Node.ts +173 -0
- package/src/account/Base.ts +124 -0
- package/src/account/Memory.ts +98 -0
- package/src/account/Rpc.ts +69 -0
- package/src/aens.ts +407 -0
- package/src/aepp-wallet-communication/connection/Browser.ts +71 -0
- package/src/aepp-wallet-communication/connection/BrowserRuntime.ts +59 -0
- package/src/aepp-wallet-communication/connection/BrowserWindowMessage.ts +122 -0
- package/{es/utils/crypto-ts.mjs → src/aepp-wallet-communication/connection-proxy.ts} +18 -18
- package/src/aepp-wallet-communication/rpc/RpcClient.ts +143 -0
- package/src/aepp-wallet-communication/rpc/types.ts +66 -0
- package/src/aepp-wallet-communication/schema.ts +224 -0
- package/src/aepp-wallet-communication/wallet-detector.ts +72 -0
- package/src/apis/compiler/code-model-v4.yaml +2649 -0
- package/src/apis/compiler/compiler.ts +585 -0
- package/src/apis/compiler/index.ts +2 -0
- package/src/apis/compiler/models/index.ts +301 -0
- package/src/apis/compiler/models/mappers.ts +583 -0
- package/src/apis/compiler/models/parameters.ts +93 -0
- package/src/apis/node/code-model-v4.yaml +10080 -0
- package/src/apis/node/index.ts +2 -0
- package/src/apis/node/models/index.ts +1257 -0
- package/src/apis/node/models/mappers.ts +4280 -0
- package/src/apis/node/models/parameters.ts +188 -0
- package/src/apis/node/node.ts +1299 -0
- package/src/chain.ts +502 -0
- package/src/channel/handlers.ts +817 -0
- package/src/channel/index.ts +1025 -0
- package/src/channel/internal.ts +361 -0
- package/src/contract/Compiler.ts +67 -0
- package/src/contract/aci.ts +538 -0
- package/src/contract/ga.ts +199 -0
- package/src/contract/methods.ts +123 -0
- package/src/deprecated/index.ts +170 -0
- package/src/deprecated/methods.ts +25 -0
- package/src/index.ts +56 -0
- package/src/oracle.ts +364 -0
- package/src/spend.ts +164 -0
- package/src/tx/builder/address.ts +50 -0
- package/src/tx/builder/constants.ts +126 -0
- package/src/tx/builder/field-types/coin-amount.ts +27 -0
- package/src/tx/builder/field-types/deposit.ts +21 -0
- package/src/tx/builder/field-types/fee.ts +143 -0
- package/src/tx/builder/field-types/field.ts +9 -0
- package/src/tx/builder/field-types/gas-limit.ts +41 -0
- package/src/tx/builder/field-types/gas-price.ts +16 -0
- package/src/tx/builder/field-types/index.ts +45 -0
- package/src/tx/builder/field-types/name-fee.ts +32 -0
- package/src/tx/builder/field-types/name-id.ts +20 -0
- package/src/tx/builder/field-types/name.ts +18 -0
- package/src/tx/builder/field-types/short-u-int.ts +11 -0
- package/src/tx/builder/field-types/u-int.ts +16 -0
- package/src/tx/builder/helpers.ts +248 -0
- package/src/tx/builder/index.ts +400 -0
- package/src/tx/builder/schema.ts +727 -0
- package/src/tx/index.ts +192 -0
- package/src/tx/validator.ts +230 -0
- package/src/typings/@aeternity__argon2-browser/index.d.ts +3 -0
- package/src/typings/@aeternity__uuid/index.d.ts +5 -0
- package/src/typings/bip32-path/index.d.ts +33 -0
- package/src/typings/blakejs/index.d.ts +4 -32
- package/src/typings/sha-js/index.d.ts +5 -0
- package/src/typings/tweetnacl-auth/index.d.ts +14 -0
- package/src/utils/amount-formatter.ts +56 -69
- package/src/utils/autorest.ts +93 -0
- package/src/utils/bignumber.ts +11 -12
- package/src/utils/bytes.ts +29 -31
- package/src/utils/crypto.ts +205 -0
- package/src/utils/encoder-types.ts +63 -0
- package/src/utils/encoder.ts +146 -0
- package/src/utils/errors.ts +482 -366
- package/src/utils/hd-wallet.ts +166 -0
- package/src/utils/json-big.ts +27 -0
- package/src/utils/keystore.ts +182 -0
- package/src/utils/mptree.ts +64 -61
- package/src/utils/other.ts +34 -41
- package/src/utils/semver-satisfies.ts +15 -11
- package/src/utils/string.ts +18 -20
- package/es/account/base.mjs +0 -179
- package/es/account/base.mjs.map +0 -1
- package/es/account/memory.mjs +0 -99
- package/es/account/memory.mjs.map +0 -1
- package/es/account/multiple.mjs +0 -179
- package/es/account/multiple.mjs.map +0 -1
- package/es/ae/aens.mjs +0 -404
- package/es/ae/aens.mjs.map +0 -1
- package/es/ae/aepp.mjs +0 -45
- package/es/ae/aepp.mjs.map +0 -1
- package/es/ae/contract.mjs +0 -159
- package/es/ae/contract.mjs.map +0 -1
- package/es/ae/index.mjs +0 -207
- package/es/ae/index.mjs.map +0 -1
- package/es/ae/oracle.mjs +0 -339
- package/es/ae/oracle.mjs.map +0 -1
- package/es/ae/universal.mjs +0 -45
- package/es/ae/universal.mjs.map +0 -1
- package/es/ae/wallet.mjs +0 -50
- package/es/ae/wallet.mjs.map +0 -1
- package/es/amount-formatter.d.ts +0 -58
- package/es/bignumber.d.ts +0 -18
- package/es/chain/index.mjs +0 -272
- package/es/chain/index.mjs.map +0 -1
- package/es/chain/node.mjs +0 -442
- package/es/chain/node.mjs.map +0 -1
- package/es/contract/compiler.mjs +0 -115
- package/es/contract/compiler.mjs.map +0 -1
- package/es/contract/ga/helpers.mjs +0 -30
- package/es/contract/ga/helpers.mjs.map +0 -1
- package/es/contract/ga/index.mjs +0 -178
- package/es/contract/ga/index.mjs.map +0 -1
- package/es/crypto-ts.d.ts +0 -9
- package/es/node-pool/index.mjs +0 -188
- package/es/node-pool/index.mjs.map +0 -1
- package/es/node.mjs +0 -133
- package/es/node.mjs.map +0 -1
- package/es/other.d.ts +0 -31
- package/es/semver-satisfies.d.ts +0 -1
- package/es/string.d.ts +0 -26
- package/es/tx/builder/field-types.mjs +0 -74
- package/es/tx/builder/field-types.mjs.map +0 -1
- package/es/tx/tx-object.mjs +0 -283
- package/es/tx/tx-object.mjs.map +0 -1
- package/es/tx/tx.mjs +0 -938
- package/es/tx/tx.mjs.map +0 -1
- package/es/utils/aepp-wallet-communication/connection/browser-runtime.mjs +0 -132
- package/es/utils/aepp-wallet-communication/connection/browser-runtime.mjs.map +0 -1
- package/es/utils/aepp-wallet-communication/connection/browser-window-message.mjs +0 -183
- package/es/utils/aepp-wallet-communication/connection/browser-window-message.mjs.map +0 -1
- package/es/utils/aepp-wallet-communication/connection/index.mjs +0 -87
- package/es/utils/aepp-wallet-communication/connection/index.mjs.map +0 -1
- package/es/utils/aepp-wallet-communication/content-script-bridge.mjs +0 -98
- package/es/utils/aepp-wallet-communication/content-script-bridge.mjs.map +0 -1
- package/es/utils/aepp-wallet-communication/helpers.mjs +0 -92
- package/es/utils/aepp-wallet-communication/helpers.mjs.map +0 -1
- package/es/utils/aepp-wallet-communication/rpc/aepp-rpc.mjs +0 -375
- package/es/utils/aepp-wallet-communication/rpc/aepp-rpc.mjs.map +0 -1
- package/es/utils/aepp-wallet-communication/rpc/rpc-client.mjs +0 -275
- package/es/utils/aepp-wallet-communication/rpc/rpc-client.mjs.map +0 -1
- package/es/utils/aepp-wallet-communication/rpc/wallet-rpc.mjs +0 -541
- package/es/utils/aepp-wallet-communication/rpc/wallet-rpc.mjs.map +0 -1
- package/es/utils/aepp-wallet-communication/schema.mjs +0 -102
- package/es/utils/aepp-wallet-communication/schema.mjs.map +0 -1
- package/es/utils/aepp-wallet-communication/wallet-detector.mjs +0 -110
- package/es/utils/aepp-wallet-communication/wallet-detector.mjs.map +0 -1
- package/es/utils/async-init.mjs +0 -64
- package/es/utils/async-init.mjs.map +0 -1
- package/es/utils/crypto-ts.mjs.map +0 -1
- package/es/utils/swagger.mjs +0 -164
- package/es/utils/swagger.mjs.map +0 -1
- package/src/account/base.js +0 -153
- package/src/account/memory.js +0 -83
- package/src/account/multiple.js +0 -162
- package/src/ae/aens.js +0 -361
- package/src/ae/aepp.js +0 -45
- package/src/ae/contract.js +0 -148
- package/src/ae/index.js +0 -168
- package/src/ae/oracle.js +0 -311
- package/src/ae/universal.js +0 -47
- package/src/ae/wallet.js +0 -50
- package/src/chain/index.js +0 -269
- package/src/chain/node.js +0 -320
- package/src/channel/handlers.js +0 -673
- package/src/channel/index.js +0 -898
- package/src/channel/internal.js +0 -237
- package/src/contract/aci.js +0 -376
- package/src/contract/compiler.js +0 -100
- package/src/contract/ga/helpers.js +0 -19
- package/src/contract/ga/index.js +0 -150
- package/src/index.js +0 -89
- package/src/node-pool/index.js +0 -172
- package/src/node.js +0 -116
- package/src/tx/builder/field-types.js +0 -61
- package/src/tx/builder/helpers.js +0 -380
- package/src/tx/builder/index.js +0 -465
- package/src/tx/builder/schema.js +0 -1197
- package/src/tx/index.js +0 -301
- package/src/tx/tx-object.js +0 -187
- package/src/tx/tx.js +0 -631
- package/src/tx/validator.js +0 -181
- package/src/utils/aepp-wallet-communication/connection/browser-runtime.js +0 -119
- package/src/utils/aepp-wallet-communication/connection/browser-window-message.js +0 -165
- package/src/utils/aepp-wallet-communication/connection/index.js +0 -85
- package/src/utils/aepp-wallet-communication/content-script-bridge.js +0 -86
- package/src/utils/aepp-wallet-communication/helpers.js +0 -60
- package/src/utils/aepp-wallet-communication/rpc/aepp-rpc.js +0 -294
- package/src/utils/aepp-wallet-communication/rpc/rpc-client.js +0 -232
- package/src/utils/aepp-wallet-communication/rpc/wallet-rpc.js +0 -401
- package/src/utils/aepp-wallet-communication/schema.ts +0 -80
- package/src/utils/aepp-wallet-communication/wallet-detector.js +0 -92
- package/src/utils/async-init.js +0 -45
- package/src/utils/crypto.js +0 -229
- package/src/utils/hd-wallet.js +0 -100
- package/src/utils/json-big.js +0 -26
- package/src/utils/keystore.js +0 -219
- package/src/utils/swagger.js +0 -156
package/es/utils/errors.mjs
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
* Error module
|
|
3
|
-
* @module @aeternity/aepp-sdk/es/utils/errors
|
|
4
|
-
* @example import { BytecodeMismatchError } from '@aeternity/aepp-sdk'
|
|
5
|
-
*/
|
|
1
|
+
// eslint-disable-next-line max-classes-per-file
|
|
6
2
|
|
|
7
3
|
/**
|
|
8
4
|
* aepp-sdk originated error
|
|
5
|
+
* @category exception
|
|
9
6
|
*/
|
|
10
7
|
export class BaseError extends Error {
|
|
11
8
|
constructor(message) {
|
|
@@ -14,6 +11,10 @@ export class BaseError extends Error {
|
|
|
14
11
|
}
|
|
15
12
|
|
|
16
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* @category exception
|
|
16
|
+
*/
|
|
17
|
+
|
|
17
18
|
export class AccountError extends BaseError {
|
|
18
19
|
constructor(message) {
|
|
19
20
|
super(message);
|
|
@@ -21,6 +22,10 @@ export class AccountError extends BaseError {
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* @category exception
|
|
27
|
+
*/
|
|
28
|
+
|
|
24
29
|
export class AensError extends BaseError {
|
|
25
30
|
constructor(message) {
|
|
26
31
|
super(message);
|
|
@@ -28,6 +33,10 @@ export class AensError extends BaseError {
|
|
|
28
33
|
}
|
|
29
34
|
|
|
30
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* @category exception
|
|
38
|
+
*/
|
|
39
|
+
|
|
31
40
|
export class AeppError extends BaseError {
|
|
32
41
|
constructor(message) {
|
|
33
42
|
super(message);
|
|
@@ -35,6 +44,10 @@ export class AeppError extends BaseError {
|
|
|
35
44
|
}
|
|
36
45
|
|
|
37
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* @category exception
|
|
49
|
+
*/
|
|
50
|
+
|
|
38
51
|
export class ChannelError extends BaseError {
|
|
39
52
|
constructor(message) {
|
|
40
53
|
super(message);
|
|
@@ -42,6 +55,10 @@ export class ChannelError extends BaseError {
|
|
|
42
55
|
}
|
|
43
56
|
|
|
44
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* @category exception
|
|
60
|
+
*/
|
|
61
|
+
|
|
45
62
|
export class CompilerError extends BaseError {
|
|
46
63
|
constructor(message) {
|
|
47
64
|
super(message);
|
|
@@ -49,6 +66,10 @@ export class CompilerError extends BaseError {
|
|
|
49
66
|
}
|
|
50
67
|
|
|
51
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* @category exception
|
|
71
|
+
*/
|
|
72
|
+
|
|
52
73
|
export class ContractError extends BaseError {
|
|
53
74
|
constructor(message) {
|
|
54
75
|
super(message);
|
|
@@ -56,6 +77,10 @@ export class ContractError extends BaseError {
|
|
|
56
77
|
}
|
|
57
78
|
|
|
58
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* @category exception
|
|
82
|
+
*/
|
|
83
|
+
|
|
59
84
|
export class CryptographyError extends BaseError {
|
|
60
85
|
constructor(message) {
|
|
61
86
|
super(message);
|
|
@@ -63,6 +88,10 @@ export class CryptographyError extends BaseError {
|
|
|
63
88
|
}
|
|
64
89
|
|
|
65
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* @category exception
|
|
93
|
+
*/
|
|
94
|
+
|
|
66
95
|
export class NodeError extends BaseError {
|
|
67
96
|
constructor(message) {
|
|
68
97
|
super(message);
|
|
@@ -70,6 +99,10 @@ export class NodeError extends BaseError {
|
|
|
70
99
|
}
|
|
71
100
|
|
|
72
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* @category exception
|
|
104
|
+
*/
|
|
105
|
+
|
|
73
106
|
export class TransactionError extends BaseError {
|
|
74
107
|
constructor(message) {
|
|
75
108
|
super(message);
|
|
@@ -77,6 +110,10 @@ export class TransactionError extends BaseError {
|
|
|
77
110
|
}
|
|
78
111
|
|
|
79
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* @category exception
|
|
115
|
+
*/
|
|
116
|
+
|
|
80
117
|
export class WalletError extends BaseError {
|
|
81
118
|
constructor(message) {
|
|
82
119
|
super(message);
|
|
@@ -84,15 +121,21 @@ export class WalletError extends BaseError {
|
|
|
84
121
|
}
|
|
85
122
|
|
|
86
123
|
}
|
|
87
|
-
|
|
124
|
+
/**
|
|
125
|
+
* @category exception
|
|
126
|
+
*/
|
|
88
127
|
|
|
89
128
|
export class ArgumentError extends BaseError {
|
|
90
129
|
constructor(argumentName, requirement, argumentValue) {
|
|
91
|
-
super(`${argumentName} should be ${requirement}, got ${argumentValue} instead`);
|
|
130
|
+
super(`${argumentName} should be ${requirement}, got ${String(argumentValue)} instead`);
|
|
92
131
|
this.name = 'ArgumentError';
|
|
93
132
|
}
|
|
94
133
|
|
|
95
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* @category exception
|
|
137
|
+
*/
|
|
138
|
+
|
|
96
139
|
export class IllegalArgumentError extends CryptographyError {
|
|
97
140
|
constructor(message) {
|
|
98
141
|
super(message);
|
|
@@ -100,6 +143,10 @@ export class IllegalArgumentError extends CryptographyError {
|
|
|
100
143
|
}
|
|
101
144
|
|
|
102
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* @category exception
|
|
148
|
+
*/
|
|
149
|
+
|
|
103
150
|
export class ArgumentCountMismatchError extends BaseError {
|
|
104
151
|
constructor(functionName, requiredCount, providedCount) {
|
|
105
152
|
super(`${functionName} expects ${requiredCount} arguments, got ${providedCount} instead`);
|
|
@@ -107,6 +154,10 @@ export class ArgumentCountMismatchError extends BaseError {
|
|
|
107
154
|
}
|
|
108
155
|
|
|
109
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* @category exception
|
|
159
|
+
*/
|
|
160
|
+
|
|
110
161
|
export class InsufficientBalanceError extends BaseError {
|
|
111
162
|
constructor(message) {
|
|
112
163
|
super(message);
|
|
@@ -114,20 +165,10 @@ export class InsufficientBalanceError extends BaseError {
|
|
|
114
165
|
}
|
|
115
166
|
|
|
116
167
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
this.name = 'InvalidDenominationError';
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
export class InvalidNameError extends BaseError {
|
|
125
|
-
constructor(message) {
|
|
126
|
-
super(message);
|
|
127
|
-
this.name = 'InvalidNameError';
|
|
128
|
-
}
|
|
168
|
+
/**
|
|
169
|
+
* @category exception
|
|
170
|
+
*/
|
|
129
171
|
|
|
130
|
-
}
|
|
131
172
|
export class MissingParamError extends BaseError {
|
|
132
173
|
constructor(message) {
|
|
133
174
|
super(message);
|
|
@@ -135,13 +176,10 @@ export class MissingParamError extends BaseError {
|
|
|
135
176
|
}
|
|
136
177
|
|
|
137
178
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
this.name = 'NoBrowserFoundError';
|
|
142
|
-
}
|
|
179
|
+
/**
|
|
180
|
+
* @category exception
|
|
181
|
+
*/
|
|
143
182
|
|
|
144
|
-
}
|
|
145
183
|
export class NoSerializerFoundError extends BaseError {
|
|
146
184
|
constructor() {
|
|
147
185
|
super('Byte serialization not supported');
|
|
@@ -149,25 +187,32 @@ export class NoSerializerFoundError extends BaseError {
|
|
|
149
187
|
}
|
|
150
188
|
|
|
151
189
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
super(`Giving up after ${requestTime}ms, current height: ${currentHeight}, desired height: ${height}`);
|
|
156
|
-
} else {
|
|
157
|
-
super(`Giving up after ${requestTime} ms`);
|
|
158
|
-
}
|
|
190
|
+
/**
|
|
191
|
+
* @category exception
|
|
192
|
+
*/
|
|
159
193
|
|
|
194
|
+
export class RequestTimedOutError extends BaseError {
|
|
195
|
+
constructor(height) {
|
|
196
|
+
super(`Giving up at height ${height}`);
|
|
160
197
|
this.name = 'RequestTimedOutError';
|
|
161
198
|
}
|
|
162
199
|
|
|
163
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* @category exception
|
|
203
|
+
*/
|
|
204
|
+
|
|
164
205
|
export class TxTimedOutError extends BaseError {
|
|
165
|
-
constructor(blocks, th
|
|
166
|
-
super([`Giving up after ${blocks} blocks mined`, `transaction hash: ${th}
|
|
206
|
+
constructor(blocks, th) {
|
|
207
|
+
super([`Giving up after ${blocks} blocks mined`, `transaction hash: ${th}`].join(', '));
|
|
167
208
|
this.name = 'TxTimedOutError';
|
|
168
209
|
}
|
|
169
210
|
|
|
170
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* @category exception
|
|
214
|
+
*/
|
|
215
|
+
|
|
171
216
|
export class TypeError extends BaseError {
|
|
172
217
|
constructor(message) {
|
|
173
218
|
super(message);
|
|
@@ -175,6 +220,10 @@ export class TypeError extends BaseError {
|
|
|
175
220
|
}
|
|
176
221
|
|
|
177
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* @category exception
|
|
225
|
+
*/
|
|
226
|
+
|
|
178
227
|
export class UnsupportedPlatformError extends BaseError {
|
|
179
228
|
constructor(message) {
|
|
180
229
|
super(message);
|
|
@@ -182,6 +231,10 @@ export class UnsupportedPlatformError extends BaseError {
|
|
|
182
231
|
}
|
|
183
232
|
|
|
184
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* @category exception
|
|
236
|
+
*/
|
|
237
|
+
|
|
185
238
|
export class UnsupportedProtocolError extends BaseError {
|
|
186
239
|
constructor(message) {
|
|
187
240
|
super(message);
|
|
@@ -189,6 +242,10 @@ export class UnsupportedProtocolError extends BaseError {
|
|
|
189
242
|
}
|
|
190
243
|
|
|
191
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* @category exception
|
|
247
|
+
*/
|
|
248
|
+
|
|
192
249
|
export class NotImplementedError extends BaseError {
|
|
193
250
|
constructor(message) {
|
|
194
251
|
super(message);
|
|
@@ -196,6 +253,10 @@ export class NotImplementedError extends BaseError {
|
|
|
196
253
|
}
|
|
197
254
|
|
|
198
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* @category exception
|
|
258
|
+
*/
|
|
259
|
+
|
|
199
260
|
export class UnsupportedVersionError extends BaseError {
|
|
200
261
|
constructor(dependency, version, geVersion, ltVersion) {
|
|
201
262
|
super(`Unsupported ${dependency} version ${version}. Supported: >= ${geVersion} < ${ltVersion}`);
|
|
@@ -203,6 +264,10 @@ export class UnsupportedVersionError extends BaseError {
|
|
|
203
264
|
}
|
|
204
265
|
|
|
205
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* @category exception
|
|
269
|
+
*/
|
|
270
|
+
|
|
206
271
|
export class InternalError extends BaseError {
|
|
207
272
|
constructor(message) {
|
|
208
273
|
super(message);
|
|
@@ -210,7 +275,21 @@ export class InternalError extends BaseError {
|
|
|
210
275
|
}
|
|
211
276
|
|
|
212
277
|
}
|
|
213
|
-
|
|
278
|
+
/**
|
|
279
|
+
* @category exception
|
|
280
|
+
*/
|
|
281
|
+
|
|
282
|
+
export class UnexpectedTsError extends InternalError {
|
|
283
|
+
constructor() {
|
|
284
|
+
let message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Expected to not happen, required for TS';
|
|
285
|
+
super(message);
|
|
286
|
+
this.name = 'UnexpectedTsError';
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* @category exception
|
|
292
|
+
*/
|
|
214
293
|
|
|
215
294
|
export class InvalidKeypairError extends AccountError {
|
|
216
295
|
constructor(message) {
|
|
@@ -219,6 +298,10 @@ export class InvalidKeypairError extends AccountError {
|
|
|
219
298
|
}
|
|
220
299
|
|
|
221
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* @category exception
|
|
303
|
+
*/
|
|
304
|
+
|
|
222
305
|
export class UnavailableAccountError extends AccountError {
|
|
223
306
|
constructor(address) {
|
|
224
307
|
super(`Account for ${address} not available`);
|
|
@@ -226,7 +309,9 @@ export class UnavailableAccountError extends AccountError {
|
|
|
226
309
|
}
|
|
227
310
|
|
|
228
311
|
}
|
|
229
|
-
|
|
312
|
+
/**
|
|
313
|
+
* @category exception
|
|
314
|
+
*/
|
|
230
315
|
|
|
231
316
|
export class AensPointerContextError extends AensError {
|
|
232
317
|
constructor(nameOrId, prefix) {
|
|
@@ -235,13 +320,21 @@ export class AensPointerContextError extends AensError {
|
|
|
235
320
|
}
|
|
236
321
|
|
|
237
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* @category exception
|
|
325
|
+
*/
|
|
326
|
+
|
|
238
327
|
export class InsufficientNameFeeError extends AensError {
|
|
239
328
|
constructor(nameFee, minNameFee) {
|
|
240
|
-
super(`the provided fee ${nameFee} is not enough to execute the claim, required: ${minNameFee}`);
|
|
329
|
+
super(`the provided fee ${nameFee.toString()} is not enough to execute the claim, required: ${minNameFee.toString()}`);
|
|
241
330
|
this.name = 'InsufficientNameFeeError';
|
|
242
331
|
}
|
|
243
332
|
|
|
244
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* @category exception
|
|
336
|
+
*/
|
|
337
|
+
|
|
245
338
|
export class InvalidAensNameError extends AensError {
|
|
246
339
|
constructor(message) {
|
|
247
340
|
super(message);
|
|
@@ -249,15 +342,10 @@ export class InvalidAensNameError extends AensError {
|
|
|
249
342
|
}
|
|
250
343
|
|
|
251
344
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
constructor() {
|
|
256
|
-
super('Callback Already exist');
|
|
257
|
-
this.name = 'DuplicateCallbackError';
|
|
258
|
-
}
|
|
345
|
+
/**
|
|
346
|
+
* @category exception
|
|
347
|
+
*/
|
|
259
348
|
|
|
260
|
-
}
|
|
261
349
|
export class InvalidRpcMessageError extends AeppError {
|
|
262
350
|
constructor(message) {
|
|
263
351
|
super(`Received invalid message: ${message}`);
|
|
@@ -265,6 +353,10 @@ export class InvalidRpcMessageError extends AeppError {
|
|
|
265
353
|
}
|
|
266
354
|
|
|
267
355
|
}
|
|
356
|
+
/**
|
|
357
|
+
* @category exception
|
|
358
|
+
*/
|
|
359
|
+
|
|
268
360
|
export class MissingCallbackError extends AeppError {
|
|
269
361
|
constructor(id) {
|
|
270
362
|
super(`Can't find callback for this messageId ${id}`);
|
|
@@ -272,6 +364,10 @@ export class MissingCallbackError extends AeppError {
|
|
|
272
364
|
}
|
|
273
365
|
|
|
274
366
|
}
|
|
367
|
+
/**
|
|
368
|
+
* @category exception
|
|
369
|
+
*/
|
|
370
|
+
|
|
275
371
|
export class UnAuthorizedAccountError extends AeppError {
|
|
276
372
|
constructor(onAccount) {
|
|
277
373
|
super(`You do not have access to account ${onAccount}`);
|
|
@@ -279,6 +375,10 @@ export class UnAuthorizedAccountError extends AeppError {
|
|
|
279
375
|
}
|
|
280
376
|
|
|
281
377
|
}
|
|
378
|
+
/**
|
|
379
|
+
* @category exception
|
|
380
|
+
*/
|
|
381
|
+
|
|
282
382
|
export class UnknownRpcClientError extends AeppError {
|
|
283
383
|
constructor(id) {
|
|
284
384
|
super(`RpcClient with id ${id} do not exist`);
|
|
@@ -286,6 +386,10 @@ export class UnknownRpcClientError extends AeppError {
|
|
|
286
386
|
}
|
|
287
387
|
|
|
288
388
|
}
|
|
389
|
+
/**
|
|
390
|
+
* @category exception
|
|
391
|
+
*/
|
|
392
|
+
|
|
289
393
|
export class UnsubscribedAccountError extends AeppError {
|
|
290
394
|
constructor() {
|
|
291
395
|
super('You are not subscribed for an account.');
|
|
@@ -293,7 +397,9 @@ export class UnsubscribedAccountError extends AeppError {
|
|
|
293
397
|
}
|
|
294
398
|
|
|
295
399
|
}
|
|
296
|
-
|
|
400
|
+
/**
|
|
401
|
+
* @category exception
|
|
402
|
+
*/
|
|
297
403
|
|
|
298
404
|
export class ChannelCallError extends ChannelError {
|
|
299
405
|
constructor(message) {
|
|
@@ -302,6 +408,10 @@ export class ChannelCallError extends ChannelError {
|
|
|
302
408
|
}
|
|
303
409
|
|
|
304
410
|
}
|
|
411
|
+
/**
|
|
412
|
+
* @category exception
|
|
413
|
+
*/
|
|
414
|
+
|
|
305
415
|
export class ChannelConnectionError extends ChannelError {
|
|
306
416
|
constructor(message) {
|
|
307
417
|
super(message);
|
|
@@ -309,6 +419,10 @@ export class ChannelConnectionError extends ChannelError {
|
|
|
309
419
|
}
|
|
310
420
|
|
|
311
421
|
}
|
|
422
|
+
/**
|
|
423
|
+
* @category exception
|
|
424
|
+
*/
|
|
425
|
+
|
|
312
426
|
export class ChannelPingTimedOutError extends ChannelError {
|
|
313
427
|
constructor() {
|
|
314
428
|
super('Server pong timed out');
|
|
@@ -316,6 +430,10 @@ export class ChannelPingTimedOutError extends ChannelError {
|
|
|
316
430
|
}
|
|
317
431
|
|
|
318
432
|
}
|
|
433
|
+
/**
|
|
434
|
+
* @category exception
|
|
435
|
+
*/
|
|
436
|
+
|
|
319
437
|
export class UnexpectedChannelMessageError extends ChannelError {
|
|
320
438
|
constructor(message) {
|
|
321
439
|
super(message);
|
|
@@ -323,6 +441,10 @@ export class UnexpectedChannelMessageError extends ChannelError {
|
|
|
323
441
|
}
|
|
324
442
|
|
|
325
443
|
}
|
|
444
|
+
/**
|
|
445
|
+
* @category exception
|
|
446
|
+
*/
|
|
447
|
+
|
|
326
448
|
export class UnknownChannelStateError extends ChannelError {
|
|
327
449
|
constructor() {
|
|
328
450
|
super('State Channels FSM entered unknown state');
|
|
@@ -330,9 +452,9 @@ export class UnknownChannelStateError extends ChannelError {
|
|
|
330
452
|
}
|
|
331
453
|
|
|
332
454
|
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
455
|
+
/**
|
|
456
|
+
* @category exception
|
|
457
|
+
*/
|
|
336
458
|
|
|
337
459
|
export class InvalidAuthDataError extends CompilerError {
|
|
338
460
|
constructor(message) {
|
|
@@ -341,7 +463,9 @@ export class InvalidAuthDataError extends CompilerError {
|
|
|
341
463
|
}
|
|
342
464
|
|
|
343
465
|
}
|
|
344
|
-
|
|
466
|
+
/**
|
|
467
|
+
* @category exception
|
|
468
|
+
*/
|
|
345
469
|
|
|
346
470
|
export class BytecodeMismatchError extends ContractError {
|
|
347
471
|
constructor(source) {
|
|
@@ -350,6 +474,10 @@ export class BytecodeMismatchError extends ContractError {
|
|
|
350
474
|
}
|
|
351
475
|
|
|
352
476
|
}
|
|
477
|
+
/**
|
|
478
|
+
* @category exception
|
|
479
|
+
*/
|
|
480
|
+
|
|
353
481
|
export class DuplicateContractError extends ContractError {
|
|
354
482
|
constructor() {
|
|
355
483
|
super('Contract already deployed');
|
|
@@ -357,6 +485,10 @@ export class DuplicateContractError extends ContractError {
|
|
|
357
485
|
}
|
|
358
486
|
|
|
359
487
|
}
|
|
488
|
+
/**
|
|
489
|
+
* @category exception
|
|
490
|
+
*/
|
|
491
|
+
|
|
360
492
|
export class InactiveContractError extends ContractError {
|
|
361
493
|
constructor(contractAddress) {
|
|
362
494
|
super(`Contract with address ${contractAddress} not active`);
|
|
@@ -364,6 +496,10 @@ export class InactiveContractError extends ContractError {
|
|
|
364
496
|
}
|
|
365
497
|
|
|
366
498
|
}
|
|
499
|
+
/**
|
|
500
|
+
* @category exception
|
|
501
|
+
*/
|
|
502
|
+
|
|
367
503
|
export class InvalidMethodInvocationError extends ContractError {
|
|
368
504
|
constructor(message) {
|
|
369
505
|
super(message);
|
|
@@ -371,6 +507,10 @@ export class InvalidMethodInvocationError extends ContractError {
|
|
|
371
507
|
}
|
|
372
508
|
|
|
373
509
|
}
|
|
510
|
+
/**
|
|
511
|
+
* @category exception
|
|
512
|
+
*/
|
|
513
|
+
|
|
374
514
|
export class MissingContractAddressError extends ContractError {
|
|
375
515
|
constructor(message) {
|
|
376
516
|
super(message);
|
|
@@ -378,6 +518,10 @@ export class MissingContractAddressError extends ContractError {
|
|
|
378
518
|
}
|
|
379
519
|
|
|
380
520
|
}
|
|
521
|
+
/**
|
|
522
|
+
* @category exception
|
|
523
|
+
*/
|
|
524
|
+
|
|
381
525
|
export class MissingContractDefError extends ContractError {
|
|
382
526
|
constructor() {
|
|
383
527
|
super('Either ACI or source code is required');
|
|
@@ -385,6 +529,10 @@ export class MissingContractDefError extends ContractError {
|
|
|
385
529
|
}
|
|
386
530
|
|
|
387
531
|
}
|
|
532
|
+
/**
|
|
533
|
+
* @category exception
|
|
534
|
+
*/
|
|
535
|
+
|
|
388
536
|
export class MissingFunctionNameError extends ContractError {
|
|
389
537
|
constructor() {
|
|
390
538
|
super('Function name is required');
|
|
@@ -392,16 +540,22 @@ export class MissingFunctionNameError extends ContractError {
|
|
|
392
540
|
}
|
|
393
541
|
|
|
394
542
|
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
543
|
+
/**
|
|
544
|
+
* @category exception
|
|
545
|
+
*/
|
|
398
546
|
|
|
399
|
-
|
|
400
|
-
|
|
547
|
+
export class NodeInvocationError extends ContractError {
|
|
548
|
+
constructor(message, transaction) {
|
|
549
|
+
super(`Invocation failed${message == null ? '' : `: "${message}"`}`);
|
|
401
550
|
this.name = 'NodeInvocationError';
|
|
551
|
+
this.transaction = transaction;
|
|
402
552
|
}
|
|
403
553
|
|
|
404
554
|
}
|
|
555
|
+
/**
|
|
556
|
+
* @category exception
|
|
557
|
+
*/
|
|
558
|
+
|
|
405
559
|
export class NoSuchContractFunctionError extends ContractError {
|
|
406
560
|
constructor(name) {
|
|
407
561
|
super(`Function ${name} doesn't exist in contract`);
|
|
@@ -409,13 +563,21 @@ export class NoSuchContractFunctionError extends ContractError {
|
|
|
409
563
|
}
|
|
410
564
|
|
|
411
565
|
}
|
|
566
|
+
/**
|
|
567
|
+
* @category exception
|
|
568
|
+
*/
|
|
569
|
+
|
|
412
570
|
export class NotPayableFunctionError extends ContractError {
|
|
413
571
|
constructor(amount, fn) {
|
|
414
|
-
super(`You try to pay "${amount}" to function "${fn}" which is not payable. ` + 'Only payable function can accept
|
|
572
|
+
super(`You try to pay "${amount}" to function "${fn}" which is not payable. ` + 'Only payable function can accept coins');
|
|
415
573
|
this.name = 'NotPayableFunctionError';
|
|
416
574
|
}
|
|
417
575
|
|
|
418
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
* @category exception
|
|
579
|
+
*/
|
|
580
|
+
|
|
419
581
|
export class MissingEventDefinitionError extends ContractError {
|
|
420
582
|
constructor(eventNameHash, eventAddress) {
|
|
421
583
|
super(`Can't find definition of ${eventNameHash} event emitted by ${eventAddress}` + ' (use omitUnknown option to ignore events like this)');
|
|
@@ -423,6 +585,10 @@ export class MissingEventDefinitionError extends ContractError {
|
|
|
423
585
|
}
|
|
424
586
|
|
|
425
587
|
}
|
|
588
|
+
/**
|
|
589
|
+
* @category exception
|
|
590
|
+
*/
|
|
591
|
+
|
|
426
592
|
export class AmbiguousEventDefinitionError extends ContractError {
|
|
427
593
|
constructor(eventAddress, matchedEvents) {
|
|
428
594
|
super(`Found multiple definitions of "${matchedEvents[0][1]}" event emitted by ${eventAddress}` + ` in ${matchedEvents.map(_ref => {
|
|
@@ -433,7 +599,9 @@ export class AmbiguousEventDefinitionError extends ContractError {
|
|
|
433
599
|
}
|
|
434
600
|
|
|
435
601
|
}
|
|
436
|
-
|
|
602
|
+
/**
|
|
603
|
+
* @category exception
|
|
604
|
+
*/
|
|
437
605
|
|
|
438
606
|
export class InvalidChecksumError extends CryptographyError {
|
|
439
607
|
constructor() {
|
|
@@ -442,27 +610,21 @@ export class InvalidChecksumError extends CryptographyError {
|
|
|
442
610
|
}
|
|
443
611
|
|
|
444
612
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
this.name = 'InvalidDerivationPathError';
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
}
|
|
452
|
-
export class InvalidKeyError extends CryptographyError {
|
|
453
|
-
constructor(message) {
|
|
454
|
-
super(message);
|
|
455
|
-
this.name = 'InvalidKeyError';
|
|
456
|
-
}
|
|
613
|
+
/**
|
|
614
|
+
* @category exception
|
|
615
|
+
*/
|
|
457
616
|
|
|
458
|
-
}
|
|
459
617
|
export class InvalidPasswordError extends CryptographyError {
|
|
460
|
-
constructor(
|
|
461
|
-
super(
|
|
618
|
+
constructor() {
|
|
619
|
+
super('Invalid password or nonce');
|
|
462
620
|
this.name = 'InvalidPasswordError';
|
|
463
621
|
}
|
|
464
622
|
|
|
465
623
|
}
|
|
624
|
+
/**
|
|
625
|
+
* @category exception
|
|
626
|
+
*/
|
|
627
|
+
|
|
466
628
|
export class MerkleTreeHashMismatchError extends CryptographyError {
|
|
467
629
|
constructor() {
|
|
468
630
|
super('Node hash is not equal to provided one');
|
|
@@ -470,6 +632,10 @@ export class MerkleTreeHashMismatchError extends CryptographyError {
|
|
|
470
632
|
}
|
|
471
633
|
|
|
472
634
|
}
|
|
635
|
+
/**
|
|
636
|
+
* @category exception
|
|
637
|
+
*/
|
|
638
|
+
|
|
473
639
|
export class MissingNodeInTreeError extends CryptographyError {
|
|
474
640
|
constructor(message) {
|
|
475
641
|
super(message);
|
|
@@ -477,20 +643,10 @@ export class MissingNodeInTreeError extends CryptographyError {
|
|
|
477
643
|
}
|
|
478
644
|
|
|
479
645
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
this.name = 'UnsupportedAlgorithmError';
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
}
|
|
487
|
-
export class NotHardenedSegmentError extends CryptographyError {
|
|
488
|
-
constructor(message) {
|
|
489
|
-
super(message);
|
|
490
|
-
this.name = 'NotHardenedSegmentError';
|
|
491
|
-
}
|
|
646
|
+
/**
|
|
647
|
+
* @category exception
|
|
648
|
+
*/
|
|
492
649
|
|
|
493
|
-
}
|
|
494
650
|
export class UnknownNodeLengthError extends CryptographyError {
|
|
495
651
|
constructor(nodeLength) {
|
|
496
652
|
super(`Unknown node length: ${nodeLength}`);
|
|
@@ -498,6 +654,10 @@ export class UnknownNodeLengthError extends CryptographyError {
|
|
|
498
654
|
}
|
|
499
655
|
|
|
500
656
|
}
|
|
657
|
+
/**
|
|
658
|
+
* @category exception
|
|
659
|
+
*/
|
|
660
|
+
|
|
501
661
|
export class UnknownPathNibbleError extends CryptographyError {
|
|
502
662
|
constructor(nibble) {
|
|
503
663
|
super(`Unknown path nibble: ${nibble}`);
|
|
@@ -505,22 +665,10 @@ export class UnknownPathNibbleError extends CryptographyError {
|
|
|
505
665
|
}
|
|
506
666
|
|
|
507
667
|
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
this.name = 'UnsupportedChildIndexError';
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
/* Node errors */
|
|
516
|
-
|
|
517
|
-
export class DisconnectedError extends NodeError {
|
|
518
|
-
constructor() {
|
|
519
|
-
super('Can not get node info. Node is not connected');
|
|
520
|
-
this.name = 'DisconnectedError';
|
|
521
|
-
}
|
|
668
|
+
/**
|
|
669
|
+
* @category exception
|
|
670
|
+
*/
|
|
522
671
|
|
|
523
|
-
}
|
|
524
672
|
export class DuplicateNodeError extends NodeError {
|
|
525
673
|
constructor(name) {
|
|
526
674
|
super(`Node with name ${name} already exist`);
|
|
@@ -528,6 +676,10 @@ export class DuplicateNodeError extends NodeError {
|
|
|
528
676
|
}
|
|
529
677
|
|
|
530
678
|
}
|
|
679
|
+
/**
|
|
680
|
+
* @category exception
|
|
681
|
+
*/
|
|
682
|
+
|
|
531
683
|
export class NodeNotFoundError extends NodeError {
|
|
532
684
|
constructor(message) {
|
|
533
685
|
super(message);
|
|
@@ -535,7 +687,9 @@ export class NodeNotFoundError extends NodeError {
|
|
|
535
687
|
}
|
|
536
688
|
|
|
537
689
|
}
|
|
538
|
-
|
|
690
|
+
/**
|
|
691
|
+
* @category exception
|
|
692
|
+
*/
|
|
539
693
|
|
|
540
694
|
export class DecodeError extends TransactionError {
|
|
541
695
|
constructor(message) {
|
|
@@ -544,13 +698,10 @@ export class DecodeError extends TransactionError {
|
|
|
544
698
|
}
|
|
545
699
|
|
|
546
700
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
this.name = 'EncodeError';
|
|
551
|
-
}
|
|
701
|
+
/**
|
|
702
|
+
* @category exception
|
|
703
|
+
*/
|
|
552
704
|
|
|
553
|
-
}
|
|
554
705
|
export class PayloadLengthError extends TransactionError {
|
|
555
706
|
constructor(message) {
|
|
556
707
|
super(message);
|
|
@@ -558,6 +709,10 @@ export class PayloadLengthError extends TransactionError {
|
|
|
558
709
|
}
|
|
559
710
|
|
|
560
711
|
}
|
|
712
|
+
/**
|
|
713
|
+
* @category exception
|
|
714
|
+
*/
|
|
715
|
+
|
|
561
716
|
export class DryRunError extends TransactionError {
|
|
562
717
|
constructor(message) {
|
|
563
718
|
super(message);
|
|
@@ -565,6 +720,10 @@ export class DryRunError extends TransactionError {
|
|
|
565
720
|
}
|
|
566
721
|
|
|
567
722
|
}
|
|
723
|
+
/**
|
|
724
|
+
* @category exception
|
|
725
|
+
*/
|
|
726
|
+
|
|
568
727
|
export class IllegalBidFeeError extends TransactionError {
|
|
569
728
|
constructor(message) {
|
|
570
729
|
super(message);
|
|
@@ -572,6 +731,10 @@ export class IllegalBidFeeError extends TransactionError {
|
|
|
572
731
|
}
|
|
573
732
|
|
|
574
733
|
}
|
|
734
|
+
/**
|
|
735
|
+
* @category exception
|
|
736
|
+
*/
|
|
737
|
+
|
|
575
738
|
export class InvalidSignatureError extends TransactionError {
|
|
576
739
|
constructor(message) {
|
|
577
740
|
super(message);
|
|
@@ -579,13 +742,10 @@ export class InvalidSignatureError extends TransactionError {
|
|
|
579
742
|
}
|
|
580
743
|
|
|
581
744
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
this.name = 'InvalidTxError';
|
|
586
|
-
}
|
|
745
|
+
/**
|
|
746
|
+
* @category exception
|
|
747
|
+
*/
|
|
587
748
|
|
|
588
|
-
}
|
|
589
749
|
export class InvalidTxParamsError extends TransactionError {
|
|
590
750
|
constructor(message) {
|
|
591
751
|
super(message);
|
|
@@ -593,20 +753,10 @@ export class InvalidTxParamsError extends TransactionError {
|
|
|
593
753
|
}
|
|
594
754
|
|
|
595
755
|
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
this.name = 'NoDefaultAensPointerError';
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
}
|
|
603
|
-
export class PrefixMismatchError extends TransactionError {
|
|
604
|
-
constructor(prefix, requiredPrefix) {
|
|
605
|
-
super(`Encoded string have a wrong type: ${prefix} (expected: ${requiredPrefix})`);
|
|
606
|
-
this.name = 'PrefixMismatchError';
|
|
607
|
-
}
|
|
756
|
+
/**
|
|
757
|
+
* @category exception
|
|
758
|
+
*/
|
|
608
759
|
|
|
609
|
-
}
|
|
610
760
|
export class PrefixNotFoundError extends TransactionError {
|
|
611
761
|
constructor(tag) {
|
|
612
762
|
super(`Prefix for id-tag ${tag} not found.`);
|
|
@@ -614,13 +764,21 @@ export class PrefixNotFoundError extends TransactionError {
|
|
|
614
764
|
}
|
|
615
765
|
|
|
616
766
|
}
|
|
767
|
+
/**
|
|
768
|
+
* @category exception
|
|
769
|
+
*/
|
|
770
|
+
|
|
617
771
|
export class SchemaNotFoundError extends TransactionError {
|
|
618
|
-
constructor(
|
|
619
|
-
super(
|
|
772
|
+
constructor(schemaName, key, version) {
|
|
773
|
+
super(`Transaction ${schemaName} not implemented for ${key} version ${version}`);
|
|
620
774
|
this.name = 'SchemaNotFoundError';
|
|
621
775
|
}
|
|
622
776
|
|
|
623
777
|
}
|
|
778
|
+
/**
|
|
779
|
+
* @category exception
|
|
780
|
+
*/
|
|
781
|
+
|
|
624
782
|
export class TagNotFoundError extends TransactionError {
|
|
625
783
|
constructor(prefix) {
|
|
626
784
|
super(`Id tag for prefix ${prefix} not found.`);
|
|
@@ -628,6 +786,10 @@ export class TagNotFoundError extends TransactionError {
|
|
|
628
786
|
}
|
|
629
787
|
|
|
630
788
|
}
|
|
789
|
+
/**
|
|
790
|
+
* @category exception
|
|
791
|
+
*/
|
|
792
|
+
|
|
631
793
|
export class TxNotInChainError extends TransactionError {
|
|
632
794
|
constructor(txHash) {
|
|
633
795
|
super(`Transaction ${txHash} is removed from chain`);
|
|
@@ -635,6 +797,10 @@ export class TxNotInChainError extends TransactionError {
|
|
|
635
797
|
}
|
|
636
798
|
|
|
637
799
|
}
|
|
800
|
+
/**
|
|
801
|
+
* @category exception
|
|
802
|
+
*/
|
|
803
|
+
|
|
638
804
|
export class UnknownTxError extends TransactionError {
|
|
639
805
|
constructor(message) {
|
|
640
806
|
super(message);
|
|
@@ -642,6 +808,10 @@ export class UnknownTxError extends TransactionError {
|
|
|
642
808
|
}
|
|
643
809
|
|
|
644
810
|
}
|
|
811
|
+
/**
|
|
812
|
+
* @category exception
|
|
813
|
+
*/
|
|
814
|
+
|
|
645
815
|
export class UnsupportedABIversionError extends TransactionError {
|
|
646
816
|
constructor(message) {
|
|
647
817
|
super(message);
|
|
@@ -649,6 +819,10 @@ export class UnsupportedABIversionError extends TransactionError {
|
|
|
649
819
|
}
|
|
650
820
|
|
|
651
821
|
}
|
|
822
|
+
/**
|
|
823
|
+
* @category exception
|
|
824
|
+
*/
|
|
825
|
+
|
|
652
826
|
export class UnsupportedVMversionError extends TransactionError {
|
|
653
827
|
constructor(message) {
|
|
654
828
|
super(message);
|
|
@@ -656,7 +830,9 @@ export class UnsupportedVMversionError extends TransactionError {
|
|
|
656
830
|
}
|
|
657
831
|
|
|
658
832
|
}
|
|
659
|
-
|
|
833
|
+
/**
|
|
834
|
+
* @category exception
|
|
835
|
+
*/
|
|
660
836
|
|
|
661
837
|
export class AlreadyConnectedError extends WalletError {
|
|
662
838
|
constructor(message) {
|
|
@@ -665,13 +841,10 @@ export class AlreadyConnectedError extends WalletError {
|
|
|
665
841
|
}
|
|
666
842
|
|
|
667
843
|
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
this.name = 'MessageDirectionError';
|
|
672
|
-
}
|
|
844
|
+
/**
|
|
845
|
+
* @category exception
|
|
846
|
+
*/
|
|
673
847
|
|
|
674
|
-
}
|
|
675
848
|
export class NoWalletConnectedError extends WalletError {
|
|
676
849
|
constructor(message) {
|
|
677
850
|
super(message);
|
|
@@ -679,6 +852,10 @@ export class NoWalletConnectedError extends WalletError {
|
|
|
679
852
|
}
|
|
680
853
|
|
|
681
854
|
}
|
|
855
|
+
/**
|
|
856
|
+
* @category exception
|
|
857
|
+
*/
|
|
858
|
+
|
|
682
859
|
export class RpcConnectionError extends WalletError {
|
|
683
860
|
constructor(message) {
|
|
684
861
|
super(message);
|