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