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