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