@aeternity/aepp-sdk 13.0.0-alpha.0 → 13.0.0-alpha.1
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/bin/aesophia_cli +0 -0
- package/dist/aepp-sdk.browser-script.js +1 -1
- 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 +4206 -1127
- package/dist/aepp-sdk.js.map +1 -1
- package/es/AeSdkBase.d.ts +3 -3
- package/es/AeSdkBase.mjs +4 -0
- package/es/AeSdkBase.mjs.map +1 -1
- package/es/AeSdkMethods.d.ts +3 -4
- package/es/AeSdkMethods.mjs.map +1 -1
- package/es/Node.d.ts +4 -3
- package/es/Node.mjs +1 -1
- package/es/Node.mjs.map +1 -1
- package/es/account/Base.d.ts +2 -2
- package/es/account/Base.mjs.map +1 -1
- package/es/account/Generalized.mjs +5 -3
- package/es/account/Generalized.mjs.map +1 -1
- package/es/account/Ledger.mjs +2 -1
- package/es/account/Ledger.mjs.map +1 -1
- package/es/account/Memory.mjs +2 -1
- package/es/account/Memory.mjs.map +1 -1
- package/es/aens.d.ts +1 -1
- package/es/aens.mjs +5 -1
- package/es/aens.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection/BrowserRuntime.d.ts +1 -0
- package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs +19 -4
- package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs.map +1 -1
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs +1 -1
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs.map +1 -1
- package/es/chain.d.ts +9 -1
- package/es/chain.mjs +4 -1
- package/es/chain.mjs.map +1 -1
- package/es/channel/Base.d.ts +6 -1
- package/es/channel/Base.mjs +9 -6
- package/es/channel/Base.mjs.map +1 -1
- package/es/channel/Contract.d.ts +8 -7
- package/es/channel/Contract.mjs +1 -1
- package/es/channel/Contract.mjs.map +1 -1
- package/es/channel/Spend.d.ts +3 -1
- package/es/channel/Spend.mjs +4 -2
- package/es/channel/Spend.mjs.map +1 -1
- package/es/channel/handlers.mjs +11 -9
- package/es/channel/handlers.mjs.map +1 -1
- package/es/channel/internal.mjs +3 -1
- package/es/channel/internal.mjs.map +1 -1
- package/es/contract/Contract.d.ts +21 -46
- package/es/contract/Contract.mjs +69 -52
- package/es/contract/Contract.mjs.map +1 -1
- package/es/contract/compiler/Base.d.ts +81 -0
- package/es/contract/compiler/Base.mjs +5 -0
- package/es/contract/compiler/Base.mjs.map +1 -0
- package/es/contract/compiler/Cli.d.ts +23 -0
- package/es/contract/compiler/Cli.mjs +155 -0
- package/es/contract/compiler/Cli.mjs.map +1 -0
- package/es/contract/compiler/Http.d.ts +32 -0
- package/es/contract/{CompilerHttp.mjs → compiler/Http.mjs} +64 -9
- package/es/contract/compiler/Http.mjs.map +1 -0
- package/es/contract/compiler/HttpNode.d.ts +17 -0
- package/es/contract/compiler/HttpNode.mjs +26 -0
- package/es/contract/compiler/HttpNode.mjs.map +1 -0
- package/es/contract/compiler/getFileSystem.d.ts +6 -0
- package/es/contract/compiler/getFileSystem.mjs +40 -0
- package/es/contract/compiler/getFileSystem.mjs.map +1 -0
- package/es/contract/ga.d.ts +5 -4
- package/es/contract/ga.mjs +11 -2
- package/es/contract/ga.mjs.map +1 -1
- package/es/index-browser.d.ts +39 -0
- package/es/index-browser.mjs +55 -0
- package/es/index-browser.mjs.map +1 -0
- package/es/index.d.ts +4 -38
- package/es/index.mjs +4 -53
- package/es/index.mjs.map +1 -1
- package/es/oracle.mjs +1 -1
- package/es/oracle.mjs.map +1 -1
- package/es/spend.mjs +1 -3
- package/es/spend.mjs.map +1 -1
- package/es/tx/builder/constants.d.ts +28 -1
- package/es/tx/builder/constants.mjs +32 -3
- package/es/tx/builder/constants.mjs.map +1 -1
- package/es/tx/builder/field-types/abi-version.d.ts +10 -0
- package/es/tx/builder/field-types/abi-version.mjs +20 -0
- package/es/tx/builder/field-types/abi-version.mjs.map +1 -0
- package/es/tx/builder/field-types/address.d.ts +5 -6
- package/es/tx/builder/field-types/address.mjs +17 -8
- package/es/tx/builder/field-types/address.mjs.map +1 -1
- package/es/tx/builder/field-types/array.d.ts +7 -0
- package/es/tx/builder/field-types/array.mjs +11 -0
- package/es/tx/builder/field-types/array.mjs.map +1 -0
- package/es/tx/builder/field-types/boolean.d.ts +6 -0
- package/es/tx/builder/field-types/boolean.mjs +13 -0
- package/es/tx/builder/field-types/boolean.mjs.map +1 -0
- package/es/tx/builder/field-types/coin-amount.d.ts +1 -1
- package/es/tx/builder/field-types/coin-amount.mjs.map +1 -1
- package/es/tx/builder/field-types/ct-version.d.ts +30 -0
- package/es/tx/builder/field-types/ct-version.mjs +48 -0
- package/es/tx/builder/field-types/ct-version.mjs.map +1 -0
- package/es/tx/builder/field-types/deposit.d.ts +1 -1
- package/es/tx/builder/field-types/deposit.mjs.map +1 -1
- package/es/tx/builder/field-types/encoded.d.ts +6 -0
- package/es/tx/builder/field-types/encoded.mjs +21 -0
- package/es/tx/builder/field-types/encoded.mjs.map +1 -0
- package/es/tx/builder/field-types/entry.d.ts +11 -0
- package/es/tx/builder/field-types/entry.mjs +31 -0
- package/es/tx/builder/field-types/entry.mjs.map +1 -0
- package/es/tx/builder/field-types/enumeration.d.ts +5 -3
- package/es/tx/builder/field-types/enumeration.mjs +11 -2
- package/es/tx/builder/field-types/enumeration.mjs.map +1 -1
- package/es/tx/builder/field-types/fee.d.ts +10 -7
- package/es/tx/builder/field-types/fee.mjs +24 -20
- package/es/tx/builder/field-types/fee.mjs.map +1 -1
- package/es/tx/builder/field-types/gas-limit.d.ts +5 -2
- package/es/tx/builder/field-types/gas-limit.mjs +9 -6
- package/es/tx/builder/field-types/gas-limit.mjs.map +1 -1
- package/es/tx/builder/field-types/gas-price.d.ts +1 -1
- package/es/tx/builder/field-types/index.d.ts +66 -28
- package/es/tx/builder/field-types/index.mjs +30 -12
- package/es/tx/builder/field-types/index.mjs.map +1 -1
- package/es/tx/builder/field-types/mptree.d.ts +37 -0
- package/es/tx/builder/field-types/mptree.mjs +268 -0
- package/es/tx/builder/field-types/mptree.mjs.map +1 -0
- package/es/tx/builder/field-types/name-fee.d.ts +1 -2
- package/es/tx/builder/field-types/name-fee.mjs.map +1 -1
- package/es/tx/builder/field-types/name-id.mjs +2 -1
- package/es/tx/builder/field-types/name-id.mjs.map +1 -1
- package/es/tx/builder/field-types/pointers.mjs +2 -2
- package/es/tx/builder/field-types/pointers.mjs.map +1 -1
- package/es/tx/builder/field-types/raw.d.ts +6 -0
- package/es/tx/builder/field-types/raw.mjs +13 -0
- package/es/tx/builder/field-types/raw.mjs.map +1 -0
- package/es/tx/builder/field-types/short-u-int-const.d.ts +5 -0
- package/es/tx/builder/field-types/short-u-int-const.mjs +16 -0
- package/es/tx/builder/field-types/short-u-int-const.mjs.map +1 -0
- package/es/tx/builder/field-types/string.d.ts +6 -0
- package/es/tx/builder/field-types/string.mjs +10 -0
- package/es/tx/builder/field-types/string.mjs.map +1 -0
- package/es/tx/builder/field-types/u-int.d.ts +1 -2
- package/es/tx/builder/field-types/u-int.mjs.map +1 -1
- package/es/tx/builder/index.d.ts +11 -29
- package/es/tx/builder/index.mjs +50 -211
- package/es/tx/builder/index.mjs.map +1 -1
- package/es/tx/builder/schema.d.ts +2111 -571
- package/es/tx/builder/schema.mjs +57 -125
- package/es/tx/builder/schema.mjs.map +1 -1
- package/es/tx/index.d.ts +5 -20
- package/es/tx/index.mjs +31 -88
- package/es/tx/index.mjs.map +1 -1
- package/es/tx/validator.d.ts +3 -5
- package/es/tx/validator.mjs +82 -95
- package/es/tx/validator.mjs.map +1 -1
- package/es/utils/bytes.mjs +1 -1
- package/es/utils/bytes.mjs.map +1 -1
- package/es/utils/errors.d.ts +3 -8
- package/es/utils/errors.mjs +1 -11
- package/es/utils/errors.mjs.map +1 -1
- package/es/utils/other.d.ts +1 -1
- package/package.json +35 -27
- package/src/AeSdkBase.ts +6 -3
- package/src/AeSdkMethods.ts +3 -4
- package/src/Node.ts +6 -3
- package/src/account/Base.ts +2 -2
- package/src/account/Generalized.ts +2 -2
- package/src/account/Ledger.ts +1 -1
- package/src/account/Memory.ts +1 -1
- package/src/aens.ts +3 -2
- package/src/aepp-wallet-communication/connection/BrowserRuntime.ts +18 -7
- package/src/aepp-wallet-communication/rpc/RpcClient.ts +2 -2
- package/src/chain.ts +5 -3
- package/src/channel/Base.ts +13 -5
- package/src/channel/Contract.ts +11 -10
- package/src/channel/Spend.ts +7 -2
- package/src/channel/handlers.ts +10 -9
- package/src/channel/internal.ts +1 -1
- package/src/contract/Contract.ts +69 -79
- package/src/contract/compiler/Base.ts +94 -0
- package/src/contract/compiler/Cli.ts +134 -0
- package/src/contract/compiler/Http.ts +124 -0
- package/src/contract/compiler/HttpNode.ts +26 -0
- package/src/contract/compiler/getFileSystem.ts +42 -0
- package/src/contract/ga.ts +9 -6
- package/src/index-browser.ts +58 -0
- package/src/index.ts +4 -56
- package/src/oracle.ts +1 -1
- package/src/spend.ts +1 -1
- package/src/tx/builder/constants.ts +32 -3
- package/src/tx/builder/field-types/abi-version.ts +21 -0
- package/src/tx/builder/field-types/address.ts +23 -13
- package/src/tx/builder/field-types/array.ts +19 -0
- package/src/tx/builder/field-types/boolean.ts +9 -0
- package/src/tx/builder/field-types/coin-amount.ts +2 -1
- package/src/tx/builder/field-types/ct-version.ts +50 -0
- package/src/tx/builder/field-types/deposit.ts +1 -1
- package/src/tx/builder/field-types/encoded.ts +27 -0
- package/src/tx/builder/field-types/entry.ts +31 -0
- package/src/tx/builder/field-types/enumeration.ts +15 -4
- package/src/tx/builder/field-types/fee.ts +38 -18
- package/src/tx/builder/field-types/gas-limit.ts +12 -7
- package/src/tx/builder/field-types/index.ts +46 -17
- package/src/tx/builder/field-types/mptree.ts +242 -0
- package/src/tx/builder/field-types/name-fee.ts +1 -2
- package/src/tx/builder/field-types/name-id.ts +1 -1
- package/src/tx/builder/field-types/pointers.ts +2 -2
- package/src/tx/builder/field-types/raw.ts +9 -0
- package/src/tx/builder/field-types/short-u-int-const.ts +20 -0
- package/src/tx/builder/field-types/string.ts +11 -0
- package/src/tx/builder/field-types/u-int.ts +1 -3
- package/src/tx/builder/index.ts +63 -247
- package/src/tx/builder/schema.ts +273 -323
- package/src/tx/index.ts +37 -104
- package/src/tx/validator.ts +72 -95
- package/src/utils/bytes.ts +1 -1
- package/src/utils/errors.ts +4 -13
- package/types-legacy/ts4.2/AeSdkBase.d.ts +3 -3
- package/types-legacy/ts4.2/AeSdkMethods.d.ts +3 -4
- package/types-legacy/ts4.2/Node.d.ts +3 -3
- package/types-legacy/ts4.2/account/Base.d.ts +2 -2
- package/types-legacy/ts4.2/aens.d.ts +1 -1
- package/types-legacy/ts4.2/aepp-wallet-communication/connection/BrowserRuntime.d.ts +1 -0
- package/types-legacy/ts4.2/chain.d.ts +9 -1
- package/types-legacy/ts4.2/channel/Base.d.ts +6 -1
- package/types-legacy/ts4.2/channel/Contract.d.ts +8 -7
- package/types-legacy/ts4.2/channel/Spend.d.ts +3 -1
- package/types-legacy/ts4.2/contract/Contract.d.ts +21 -46
- package/types-legacy/ts4.2/contract/compiler/Base.d.ts +81 -0
- package/types-legacy/ts4.2/contract/compiler/Cli.d.ts +23 -0
- package/types-legacy/ts4.2/contract/compiler/Http.d.ts +32 -0
- package/types-legacy/ts4.2/contract/compiler/HttpNode.d.ts +17 -0
- package/types-legacy/ts4.2/contract/compiler/getFileSystem.d.ts +6 -0
- package/types-legacy/ts4.2/contract/ga.d.ts +5 -4
- package/types-legacy/ts4.2/index-browser.d.ts +39 -0
- package/types-legacy/ts4.2/index.d.ts +4 -38
- package/types-legacy/ts4.2/tx/builder/constants.d.ts +28 -1
- package/types-legacy/ts4.2/tx/builder/field-types/abi-version.d.ts +10 -0
- package/types-legacy/ts4.2/tx/builder/field-types/address.d.ts +11 -12
- package/types-legacy/ts4.2/tx/builder/field-types/array.d.ts +7 -0
- package/types-legacy/ts4.2/tx/builder/field-types/boolean.d.ts +6 -0
- package/types-legacy/ts4.2/tx/builder/field-types/coin-amount.d.ts +1 -1
- package/types-legacy/ts4.2/tx/builder/field-types/ct-version.d.ts +42 -0
- package/types-legacy/ts4.2/tx/builder/field-types/deposit.d.ts +1 -1
- package/types-legacy/ts4.2/tx/builder/field-types/encoded.d.ts +6 -0
- package/types-legacy/ts4.2/tx/builder/field-types/entry.d.ts +11 -0
- package/types-legacy/ts4.2/tx/builder/field-types/enumeration.d.ts +5 -3
- package/types-legacy/ts4.2/tx/builder/field-types/fee.d.ts +10 -7
- package/types-legacy/ts4.2/tx/builder/field-types/gas-limit.d.ts +5 -2
- package/types-legacy/ts4.2/tx/builder/field-types/gas-price.d.ts +1 -1
- package/types-legacy/ts4.2/tx/builder/field-types/index.d.ts +72 -28
- package/types-legacy/ts4.2/tx/builder/field-types/mptree.d.ts +43 -0
- package/types-legacy/ts4.2/tx/builder/field-types/name-fee.d.ts +1 -2
- package/types-legacy/ts4.2/tx/builder/field-types/raw.d.ts +6 -0
- package/types-legacy/ts4.2/tx/builder/field-types/short-u-int-const.d.ts +5 -0
- package/types-legacy/ts4.2/tx/builder/field-types/string.d.ts +6 -0
- package/types-legacy/ts4.2/tx/builder/field-types/u-int.d.ts +1 -2
- package/types-legacy/ts4.2/tx/builder/index.d.ts +11 -29
- package/types-legacy/ts4.2/tx/builder/schema.d.ts +2380 -668
- package/types-legacy/ts4.2/tx/index.d.ts +5 -20
- package/types-legacy/ts4.2/tx/validator.d.ts +3 -5
- package/types-legacy/ts4.2/utils/errors.d.ts +3 -8
- package/types-legacy/ts4.2/utils/other.d.ts +1 -1
- package/types-legacy/ts4.5/AeSdkBase.d.ts +3 -3
- package/types-legacy/ts4.5/AeSdkMethods.d.ts +3 -4
- package/types-legacy/ts4.5/Node.d.ts +3 -3
- package/types-legacy/ts4.5/account/Base.d.ts +2 -2
- package/types-legacy/ts4.5/aens.d.ts +1 -1
- package/types-legacy/ts4.5/aepp-wallet-communication/connection/BrowserRuntime.d.ts +1 -0
- package/types-legacy/ts4.5/chain.d.ts +9 -1
- package/types-legacy/ts4.5/channel/Base.d.ts +6 -1
- package/types-legacy/ts4.5/channel/Contract.d.ts +8 -7
- package/types-legacy/ts4.5/channel/Spend.d.ts +3 -1
- package/types-legacy/ts4.5/contract/Contract.d.ts +21 -46
- package/types-legacy/ts4.5/contract/compiler/Base.d.ts +81 -0
- package/types-legacy/ts4.5/contract/compiler/Cli.d.ts +23 -0
- package/types-legacy/ts4.5/contract/compiler/Http.d.ts +32 -0
- package/types-legacy/ts4.5/contract/compiler/HttpNode.d.ts +17 -0
- package/types-legacy/ts4.5/contract/compiler/getFileSystem.d.ts +6 -0
- package/types-legacy/ts4.5/contract/ga.d.ts +5 -4
- package/types-legacy/ts4.5/index-browser.d.ts +39 -0
- package/types-legacy/ts4.5/index.d.ts +4 -38
- package/types-legacy/ts4.5/tx/builder/constants.d.ts +28 -1
- package/types-legacy/ts4.5/tx/builder/field-types/abi-version.d.ts +10 -0
- package/types-legacy/ts4.5/tx/builder/field-types/address.d.ts +11 -12
- package/types-legacy/ts4.5/tx/builder/field-types/array.d.ts +7 -0
- package/types-legacy/ts4.5/tx/builder/field-types/boolean.d.ts +6 -0
- package/types-legacy/ts4.5/tx/builder/field-types/coin-amount.d.ts +1 -1
- package/types-legacy/ts4.5/tx/builder/field-types/ct-version.d.ts +42 -0
- package/types-legacy/ts4.5/tx/builder/field-types/deposit.d.ts +1 -1
- package/types-legacy/ts4.5/tx/builder/field-types/encoded.d.ts +6 -0
- package/types-legacy/ts4.5/tx/builder/field-types/entry.d.ts +11 -0
- package/types-legacy/ts4.5/tx/builder/field-types/enumeration.d.ts +5 -3
- package/types-legacy/ts4.5/tx/builder/field-types/fee.d.ts +10 -7
- package/types-legacy/ts4.5/tx/builder/field-types/gas-limit.d.ts +5 -2
- package/types-legacy/ts4.5/tx/builder/field-types/gas-price.d.ts +1 -1
- package/types-legacy/ts4.5/tx/builder/field-types/index.d.ts +72 -28
- package/types-legacy/ts4.5/tx/builder/field-types/mptree.d.ts +43 -0
- package/types-legacy/ts4.5/tx/builder/field-types/name-fee.d.ts +1 -2
- package/types-legacy/ts4.5/tx/builder/field-types/raw.d.ts +6 -0
- package/types-legacy/ts4.5/tx/builder/field-types/short-u-int-const.d.ts +5 -0
- package/types-legacy/ts4.5/tx/builder/field-types/string.d.ts +6 -0
- package/types-legacy/ts4.5/tx/builder/field-types/u-int.d.ts +1 -2
- package/types-legacy/ts4.5/tx/builder/index.d.ts +11 -29
- package/types-legacy/ts4.5/tx/builder/schema.d.ts +2380 -668
- package/types-legacy/ts4.5/tx/index.d.ts +5 -20
- package/types-legacy/ts4.5/tx/validator.d.ts +3 -5
- package/types-legacy/ts4.5/utils/errors.d.ts +3 -8
- package/types-legacy/ts4.5/utils/other.d.ts +1 -1
- package/es/contract/CompilerHttp.d.ts +0 -18
- package/es/contract/CompilerHttp.mjs.map +0 -1
- package/es/tx/builder/field-types/addresses.d.ts +0 -6
- package/es/tx/builder/field-types/addresses.mjs +0 -13
- package/es/tx/builder/field-types/addresses.mjs.map +0 -1
- package/es/utils/mptree.d.ts +0 -26
- package/es/utils/mptree.mjs +0 -143
- package/es/utils/mptree.mjs.map +0 -1
- package/src/contract/CompilerHttp.ts +0 -67
- package/src/tx/builder/field-types/addresses.ts +0 -18
- package/src/utils/mptree.ts +0 -145
- package/types-legacy/ts4.2/contract/CompilerHttp.d.ts +0 -18
- package/types-legacy/ts4.2/tx/builder/field-types/addresses.d.ts +0 -6
- package/types-legacy/ts4.2/utils/mptree.d.ts +0 -32
- package/types-legacy/ts4.5/contract/CompilerHttp.d.ts +0 -18
- package/types-legacy/ts4.5/tx/builder/field-types/addresses.d.ts +0 -6
- package/types-legacy/ts4.5/utils/mptree.d.ts +0 -32
package/es/utils/errors.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { Int } from '../tx/builder/constants';
|
|
2
3
|
/**
|
|
3
4
|
* aepp-sdk originated error
|
|
4
5
|
* @category exception
|
|
@@ -70,7 +71,7 @@ export declare class WalletError extends BaseError {
|
|
|
70
71
|
* @category exception
|
|
71
72
|
*/
|
|
72
73
|
export declare class ArgumentError extends BaseError {
|
|
73
|
-
constructor(argumentName: string, requirement:
|
|
74
|
+
constructor(argumentName: string, requirement: unknown, argumentValue: unknown);
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
77
|
* @category exception
|
|
@@ -317,7 +318,7 @@ export declare class NoSuchContractFunctionError extends ContractError {
|
|
|
317
318
|
* @category exception
|
|
318
319
|
*/
|
|
319
320
|
export declare class NotPayableFunctionError extends ContractError {
|
|
320
|
-
constructor(amount:
|
|
321
|
+
constructor(amount: Int, fn: string);
|
|
321
322
|
}
|
|
322
323
|
/**
|
|
323
324
|
* @category exception
|
|
@@ -439,12 +440,6 @@ export declare class TagNotFoundError extends TransactionError {
|
|
|
439
440
|
export declare class TxNotInChainError extends TransactionError {
|
|
440
441
|
constructor(txHash: string);
|
|
441
442
|
}
|
|
442
|
-
/**
|
|
443
|
-
* @category exception
|
|
444
|
-
*/
|
|
445
|
-
export declare class UnknownTxError extends TransactionError {
|
|
446
|
-
constructor(message: string);
|
|
447
|
-
}
|
|
448
443
|
/**
|
|
449
444
|
* @category exception
|
|
450
445
|
*/
|
package/es/utils/errors.mjs
CHANGED
|
@@ -116,7 +116,7 @@ export class WalletError extends BaseError {
|
|
|
116
116
|
*/
|
|
117
117
|
export class ArgumentError extends BaseError {
|
|
118
118
|
constructor(argumentName, requirement, argumentValue) {
|
|
119
|
-
super(`${argumentName} should be ${requirement}, got ${
|
|
119
|
+
super(`${argumentName} should be ${requirement}, got ${argumentValue} instead`);
|
|
120
120
|
this.name = 'ArgumentError';
|
|
121
121
|
}
|
|
122
122
|
}
|
|
@@ -728,16 +728,6 @@ export class TxNotInChainError extends TransactionError {
|
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
730
|
|
|
731
|
-
/**
|
|
732
|
-
* @category exception
|
|
733
|
-
*/
|
|
734
|
-
export class UnknownTxError extends TransactionError {
|
|
735
|
-
constructor(message) {
|
|
736
|
-
super(message);
|
|
737
|
-
this.name = 'UnknownTxError';
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
|
|
741
731
|
/**
|
|
742
732
|
* @category exception
|
|
743
733
|
*/
|
package/es/utils/errors.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.mjs","names":["BaseError","Error","constructor","message","name","AccountError","AensError","AeppError","ChannelError","CompilerError","ContractError","CryptographyError","NodeError","TransactionError","WalletError","ArgumentError","argumentName","requirement","argumentValue","String","IllegalArgumentError","ArgumentCountMismatchError","functionName","requiredCount","providedCount","InsufficientBalanceError","MissingParamError","NoSerializerFoundError","RequestTimedOutError","height","TxTimedOutError","blocks","th","join","TypeError","UnsupportedPlatformError","UnsupportedProtocolError","NotImplementedError","UnsupportedVersionError","dependency","version","geVersion","ltVersion","InternalError","UnexpectedTsError","UnavailableAccountError","address","AensPointerContextError","nameOrId","prefix","InsufficientNameFeeError","nameFee","minNameFee","toString","InvalidAensNameError","InvalidRpcMessageError","MissingCallbackError","id","UnAuthorizedAccountError","onAccount","UnknownRpcClientError","UnsubscribedAccountError","ChannelCallError","ChannelConnectionError","ChannelPingTimedOutError","UnexpectedChannelMessageError","ChannelIncomingMessageError","handlerError","incomingMessage","UnknownChannelStateError","InvalidAuthDataError","BytecodeMismatchError","source","DuplicateContractError","InactiveContractError","contractAddress","InvalidMethodInvocationError","MissingContractAddressError","MissingContractDefError","MissingFunctionNameError","NodeInvocationError","transaction","NoSuchContractFunctionError","NotPayableFunctionError","amount","fn","MissingEventDefinitionError","eventNameHash","eventAddress","AmbiguousEventDefinitionError","matchedEvents","map","InvalidChecksumError","InvalidPasswordError","MerkleTreeHashMismatchError","MissingNodeInTreeError","UnknownNodeLengthError","nodeLength","UnknownPathNibbleError","nibble","DuplicateNodeError","NodeNotFoundError","DecodeError","PayloadLengthError","DryRunError","IllegalBidFeeError","InvalidSignatureError","InvalidTxParamsError","PrefixNotFoundError","tag","SchemaNotFoundError","schemaName","key","TagNotFoundError","TxNotInChainError","txHash","UnknownTxError","UnsupportedABIversionError","UnsupportedVMversionError","AlreadyConnectedError","NoWalletConnectedError","RpcConnectionError"],"sources":["../../src/utils/errors.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport BigNumber from 'bignumber.js';\n\n/**\n * aepp-sdk originated error\n * @category exception\n */\nexport abstract class BaseError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'BaseError';\n }\n}\n\n/**\n * @category exception\n */\nexport class AccountError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'AccountError';\n }\n}\n\n/**\n * @category exception\n */\nexport class AensError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'AensError';\n }\n}\n\n/**\n * @category exception\n */\nexport class AeppError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'AeppError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ChannelError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'ChannelError';\n }\n}\n\n/**\n * @category exception\n */\nexport class CompilerError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'CompilerError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ContractError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'ContractError';\n }\n}\n\n/**\n * @category exception\n */\nexport class CryptographyError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'CryptographyError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NodeError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'NodeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class TransactionError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'TransactionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class WalletError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'WalletError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ArgumentError extends BaseError {\n constructor(argumentName: string, requirement: string, argumentValue: any) {\n super(`${argumentName} should be ${requirement}, got ${String(argumentValue)} instead`);\n this.name = 'ArgumentError';\n }\n}\n\n/**\n * @category exception\n */\nexport class IllegalArgumentError extends CryptographyError {\n constructor(message: string) {\n super(message);\n this.name = 'IllegalArgumentError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ArgumentCountMismatchError extends BaseError {\n constructor(functionName: string, requiredCount: number, providedCount: number) {\n super(`${functionName} expects ${requiredCount} arguments, got ${providedCount} instead`);\n this.name = 'ArgumentCountMismatchError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InsufficientBalanceError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'InsufficientBalanceError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingParamError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'MissingParamError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NoSerializerFoundError extends BaseError {\n constructor() {\n super('Byte serialization not supported');\n this.name = 'NoSerializerFoundError';\n }\n}\n\n/**\n * @category exception\n */\nexport class RequestTimedOutError extends BaseError {\n constructor(height: number) {\n super(`Giving up at height ${height}`);\n this.name = 'RequestTimedOutError';\n }\n}\n\n/**\n * @category exception\n */\nexport class TxTimedOutError extends BaseError {\n constructor(blocks: number, th: string) {\n super([\n `Giving up after ${blocks} blocks mined`,\n `transaction hash: ${th}`,\n ].join(', '));\n this.name = 'TxTimedOutError';\n }\n}\n\n/**\n * @category exception\n */\nexport class TypeError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'TypeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnsupportedPlatformError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedPlatformError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnsupportedProtocolError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedProtocolError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NotImplementedError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'NotImplementedError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnsupportedVersionError extends BaseError {\n constructor(dependency: string, version: string, geVersion: string, ltVersion: string) {\n super(`Unsupported ${dependency} version ${version}. Supported: >= ${geVersion} < ${ltVersion}`);\n this.name = 'UnsupportedVersionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InternalError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'InternalError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnexpectedTsError extends InternalError {\n constructor(message = 'Expected to not happen, required for TS') {\n super(message);\n this.name = 'UnexpectedTsError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnavailableAccountError extends AccountError {\n constructor(address: string) {\n super(`Account for ${address} not available`);\n this.name = 'UnavailableAccountError';\n }\n}\n\n/**\n * @category exception\n */\nexport class AensPointerContextError extends AensError {\n constructor(nameOrId: string, prefix: string) {\n super(`Name ${nameOrId} don't have pointers for ${prefix}`);\n this.name = 'AensPointerContextError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InsufficientNameFeeError extends AensError {\n constructor(nameFee: BigNumber, minNameFee: BigNumber) {\n super(`the provided fee ${nameFee.toString()} is not enough to execute the claim, required: ${minNameFee.toString()}`);\n this.name = 'InsufficientNameFeeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidAensNameError extends AensError {\n constructor(message: string) {\n super(message);\n this.name = 'InvalidAensNameError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidRpcMessageError extends AeppError {\n constructor(message: string) {\n super(`Received invalid message: ${message}`);\n this.name = 'InvalidRpcMessageError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingCallbackError extends AeppError {\n constructor(id: number) {\n super(`Can't find callback for this messageId ${id}`);\n this.name = 'MissingCallbackError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnAuthorizedAccountError extends AeppError {\n constructor(onAccount: string) {\n super(`You do not have access to account ${onAccount}`);\n this.name = 'UnAuthorizedAccountError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnknownRpcClientError extends AeppError {\n constructor(id: string) {\n super(`RpcClient with id ${id} do not exist`);\n this.name = 'UnknownRpcClientError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnsubscribedAccountError extends AeppError {\n constructor() {\n super('You are not subscribed for an account.');\n this.name = 'UnsubscribedAccountError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ChannelCallError extends ChannelError {\n constructor(message: string) {\n super(message);\n this.name = 'ChannelCallError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ChannelConnectionError extends ChannelError {\n constructor(message: string) {\n super(message);\n this.name = 'ChannelConnectionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ChannelPingTimedOutError extends ChannelError {\n constructor() {\n super('Server pong timed out');\n this.name = 'ChannelPingTimedOutError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnexpectedChannelMessageError extends ChannelError {\n constructor(message: string) {\n super(message);\n this.name = 'UnexpectedChannelMessageError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ChannelIncomingMessageError extends ChannelError {\n handlerError: BaseError;\n\n incomingMessage: { [key: string]: any };\n\n constructor(handlerError: BaseError, incomingMessage: { [key: string]: any }) {\n super(handlerError.message);\n this.handlerError = handlerError;\n this.incomingMessage = incomingMessage;\n this.name = 'ChannelIncomingMessageError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnknownChannelStateError extends ChannelError {\n constructor() {\n super('State Channels FSM entered unknown state');\n this.name = 'UnknownChannelStateError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidAuthDataError extends CompilerError {\n constructor(message: string) {\n super(message);\n this.name = 'InvalidAuthDataError';\n }\n}\n\n/**\n * @category exception\n */\nexport class BytecodeMismatchError extends ContractError {\n constructor(source: string) {\n super(`Contract ${source} do not correspond to the bytecode deployed on the chain`);\n this.name = 'BytecodeMismatchError';\n }\n}\n\n/**\n * @category exception\n */\nexport class DuplicateContractError extends ContractError {\n constructor() {\n super('Contract already deployed');\n this.name = 'DuplicateContractError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InactiveContractError extends ContractError {\n constructor(contractAddress: string) {\n super(`Contract with address ${contractAddress} not active`);\n this.name = 'InactiveContractError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidMethodInvocationError extends ContractError {\n constructor(message: string) {\n super(message);\n this.name = 'InvalidMethodInvocationError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingContractAddressError extends ContractError {\n constructor(message: string) {\n super(message);\n this.name = 'MissingContractAddressError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingContractDefError extends ContractError {\n constructor() {\n super('Either ACI or source code is required');\n this.name = 'MissingContractDefError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingFunctionNameError extends ContractError {\n constructor() {\n super('Function name is required');\n this.name = 'MissingFunctionNameError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NodeInvocationError extends ContractError {\n transaction: string;\n\n constructor(message: string, transaction: string) {\n super(`Invocation failed${message == null ? '' : `: \"${message}\"`}`);\n this.name = 'NodeInvocationError';\n this.transaction = transaction;\n }\n}\n\n/**\n * @category exception\n */\nexport class NoSuchContractFunctionError extends ContractError {\n constructor(name: string) {\n super(`Function ${name} doesn't exist in contract`);\n this.name = 'NoSuchContractFunctionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NotPayableFunctionError extends ContractError {\n constructor(amount: string, fn: string) {\n super(\n `You try to pay \"${amount}\" to function \"${fn}\" which is not payable. `\n + 'Only payable function can accept coins',\n );\n this.name = 'NotPayableFunctionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingEventDefinitionError extends ContractError {\n constructor(eventNameHash: string, eventAddress: string) {\n super(\n `Can't find definition of ${eventNameHash} event emitted by ${eventAddress}`\n + ' (use omitUnknown option to ignore events like this)',\n );\n this.name = 'MissingEventDefinitionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class AmbiguousEventDefinitionError extends ContractError {\n constructor(eventAddress: string, matchedEvents: Array<[string, string]>) {\n super(\n `Found multiple definitions of \"${matchedEvents[0][1]}\" event with different types emitted by`\n + ` ${eventAddress} in ${matchedEvents.map(([name]) => `\"${name}\"`).join(', ')} contracts`\n + ' (use contractAddressToName option to specify contract name corresponding to address)',\n );\n this.name = 'AmbiguousEventDefinitionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidChecksumError extends CryptographyError {\n constructor() {\n super('Invalid checksum');\n this.name = 'InvalidChecksumError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidPasswordError extends CryptographyError {\n constructor() {\n super('Invalid password or nonce');\n this.name = 'InvalidPasswordError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MerkleTreeHashMismatchError extends CryptographyError {\n constructor() {\n super('Node hash is not equal to provided one');\n this.name = 'MerkleTreeHashMismatchError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingNodeInTreeError extends CryptographyError {\n constructor(message: string) {\n super(message);\n this.name = 'MissingNodeInTreeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnknownNodeLengthError extends CryptographyError {\n constructor(nodeLength: number) {\n super(`Unknown node length: ${nodeLength}`);\n this.name = 'UnknownNodeLengthError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnknownPathNibbleError extends CryptographyError {\n constructor(nibble: number) {\n super(`Unknown path nibble: ${nibble}`);\n this.name = 'UnknownPathNibbleError';\n }\n}\n\n/**\n * @category exception\n */\nexport class DuplicateNodeError extends NodeError {\n constructor(name: string) {\n super(`Node with name ${name} already exist`);\n this.name = 'DuplicateNodeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NodeNotFoundError extends NodeError {\n constructor(message: string) {\n super(message);\n this.name = 'NodeNotFoundError';\n }\n}\n\n/**\n * @category exception\n */\nexport class DecodeError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'DecodeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class PayloadLengthError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'PayloadLengthError';\n }\n}\n\n/**\n * @category exception\n */\nexport class DryRunError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'DryRunError';\n }\n}\n\n/**\n * @category exception\n */\nexport class IllegalBidFeeError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'IllegalBidFeeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidSignatureError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'InvalidSignatureError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidTxParamsError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'InvalidTxParamsError';\n }\n}\n\n/**\n * @category exception\n */\nexport class PrefixNotFoundError extends TransactionError {\n constructor(tag: number) {\n super(`Prefix for id-tag ${tag} not found.`);\n this.name = 'PrefixNotFoundError';\n }\n}\n\n/**\n * @category exception\n */\nexport class SchemaNotFoundError extends TransactionError {\n constructor(schemaName: string, key: string, version: number) {\n super(`Transaction ${schemaName} not implemented for ${key} version ${version}`);\n this.name = 'SchemaNotFoundError';\n }\n}\n\n/**\n * @category exception\n */\nexport class TagNotFoundError extends TransactionError {\n constructor(prefix: string) {\n super(`Id tag for prefix ${prefix} not found.`);\n this.name = 'DecodeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class TxNotInChainError extends TransactionError {\n constructor(txHash: string) {\n super(`Transaction ${txHash} is removed from chain`);\n this.name = 'TxNotInChainError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnknownTxError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'UnknownTxError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnsupportedABIversionError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedABIversionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnsupportedVMversionError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedVMversionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class AlreadyConnectedError extends WalletError {\n constructor(message: string) {\n super(message);\n this.name = 'AlreadyConnectedError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NoWalletConnectedError extends WalletError {\n constructor(message: string) {\n super(message);\n this.name = 'NoWalletConnectedError';\n }\n}\n\n/**\n * @category exception\n */\nexport class RpcConnectionError extends WalletError {\n constructor(message: string) {\n super(message);\n this.name = 'RpcConnectionError';\n }\n}\n"],"mappings":"AAAA;;AAGA;AACA;AACA;AACA;AACA,OAAO,MAAeA,SAAS,SAASC,KAAK,CAAC;EAC5CC,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,WAAW;EACzB;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,SAASL,SAAS,CAAC;EAC1CE,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,cAAc;EAC5B;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAME,SAAS,SAASN,SAAS,CAAC;EACvCE,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,WAAW;EACzB;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMG,SAAS,SAASP,SAAS,CAAC;EACvCE,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,WAAW;EACzB;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMI,YAAY,SAASR,SAAS,CAAC;EAC1CE,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,cAAc;EAC5B;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMK,aAAa,SAAST,SAAS,CAAC;EAC3CE,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO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ACC,IAAI,GAAG,2BAA2B;EACzC;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMmH,qBAAqB,SAASzG,WAAW,CAAC;EACrDZ,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,uBAAuB;EACrC;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMoH,sBAAsB,SAAS1G,WAAW,CAAC;EACtDZ,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,wBAAwB;EACtC;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMqH,kBAAkB,SAAS3G,WAAW,CAAC;EAClDZ,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,oBAAoB;EAClC;AACF"}
|
|
1
|
+
{"version":3,"file":"errors.mjs","names":["BaseError","Error","constructor","message","name","AccountError","AensError","AeppError","ChannelError","CompilerError","ContractError","CryptographyError","NodeError","TransactionError","WalletError","ArgumentError","argumentName","requirement","argumentValue","IllegalArgumentError","ArgumentCountMismatchError","functionName","requiredCount","providedCount","InsufficientBalanceError","MissingParamError","NoSerializerFoundError","RequestTimedOutError","height","TxTimedOutError","blocks","th","join","TypeError","UnsupportedPlatformError","UnsupportedProtocolError","NotImplementedError","UnsupportedVersionError","dependency","version","geVersion","ltVersion","InternalError","UnexpectedTsError","UnavailableAccountError","address","AensPointerContextError","nameOrId","prefix","InsufficientNameFeeError","nameFee","minNameFee","toString","InvalidAensNameError","InvalidRpcMessageError","MissingCallbackError","id","UnAuthorizedAccountError","onAccount","UnknownRpcClientError","UnsubscribedAccountError","ChannelCallError","ChannelConnectionError","ChannelPingTimedOutError","UnexpectedChannelMessageError","ChannelIncomingMessageError","handlerError","incomingMessage","UnknownChannelStateError","InvalidAuthDataError","BytecodeMismatchError","source","DuplicateContractError","InactiveContractError","contractAddress","InvalidMethodInvocationError","MissingContractAddressError","MissingContractDefError","MissingFunctionNameError","NodeInvocationError","transaction","NoSuchContractFunctionError","NotPayableFunctionError","amount","fn","MissingEventDefinitionError","eventNameHash","eventAddress","AmbiguousEventDefinitionError","matchedEvents","map","InvalidChecksumError","InvalidPasswordError","MerkleTreeHashMismatchError","MissingNodeInTreeError","UnknownNodeLengthError","nodeLength","UnknownPathNibbleError","nibble","DuplicateNodeError","NodeNotFoundError","DecodeError","PayloadLengthError","DryRunError","IllegalBidFeeError","InvalidSignatureError","InvalidTxParamsError","PrefixNotFoundError","tag","SchemaNotFoundError","schemaName","key","TagNotFoundError","TxNotInChainError","txHash","UnsupportedABIversionError","UnsupportedVMversionError","AlreadyConnectedError","NoWalletConnectedError","RpcConnectionError"],"sources":["../../src/utils/errors.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport BigNumber from 'bignumber.js';\nimport { Int } from '../tx/builder/constants';\n\n/**\n * aepp-sdk originated error\n * @category exception\n */\nexport abstract class BaseError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'BaseError';\n }\n}\n\n/**\n * @category exception\n */\nexport class AccountError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'AccountError';\n }\n}\n\n/**\n * @category exception\n */\nexport class AensError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'AensError';\n }\n}\n\n/**\n * @category exception\n */\nexport class AeppError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'AeppError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ChannelError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'ChannelError';\n }\n}\n\n/**\n * @category exception\n */\nexport class CompilerError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'CompilerError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ContractError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'ContractError';\n }\n}\n\n/**\n * @category exception\n */\nexport class CryptographyError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'CryptographyError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NodeError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'NodeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class TransactionError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'TransactionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class WalletError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'WalletError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ArgumentError extends BaseError {\n constructor(argumentName: string, requirement: unknown, argumentValue: unknown) {\n super(`${argumentName} should be ${requirement}, got ${argumentValue} instead`);\n this.name = 'ArgumentError';\n }\n}\n\n/**\n * @category exception\n */\nexport class IllegalArgumentError extends CryptographyError {\n constructor(message: string) {\n super(message);\n this.name = 'IllegalArgumentError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ArgumentCountMismatchError extends BaseError {\n constructor(functionName: string, requiredCount: number, providedCount: number) {\n super(`${functionName} expects ${requiredCount} arguments, got ${providedCount} instead`);\n this.name = 'ArgumentCountMismatchError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InsufficientBalanceError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'InsufficientBalanceError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingParamError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'MissingParamError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NoSerializerFoundError extends BaseError {\n constructor() {\n super('Byte serialization not supported');\n this.name = 'NoSerializerFoundError';\n }\n}\n\n/**\n * @category exception\n */\nexport class RequestTimedOutError extends BaseError {\n constructor(height: number) {\n super(`Giving up at height ${height}`);\n this.name = 'RequestTimedOutError';\n }\n}\n\n/**\n * @category exception\n */\nexport class TxTimedOutError extends BaseError {\n constructor(blocks: number, th: string) {\n super([\n `Giving up after ${blocks} blocks mined`,\n `transaction hash: ${th}`,\n ].join(', '));\n this.name = 'TxTimedOutError';\n }\n}\n\n/**\n * @category exception\n */\nexport class TypeError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'TypeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnsupportedPlatformError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedPlatformError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnsupportedProtocolError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedProtocolError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NotImplementedError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'NotImplementedError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnsupportedVersionError extends BaseError {\n constructor(dependency: string, version: string, geVersion: string, ltVersion: string) {\n super(`Unsupported ${dependency} version ${version}. Supported: >= ${geVersion} < ${ltVersion}`);\n this.name = 'UnsupportedVersionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InternalError extends BaseError {\n constructor(message: string) {\n super(message);\n this.name = 'InternalError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnexpectedTsError extends InternalError {\n constructor(message = 'Expected to not happen, required for TS') {\n super(message);\n this.name = 'UnexpectedTsError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnavailableAccountError extends AccountError {\n constructor(address: string) {\n super(`Account for ${address} not available`);\n this.name = 'UnavailableAccountError';\n }\n}\n\n/**\n * @category exception\n */\nexport class AensPointerContextError extends AensError {\n constructor(nameOrId: string, prefix: string) {\n super(`Name ${nameOrId} don't have pointers for ${prefix}`);\n this.name = 'AensPointerContextError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InsufficientNameFeeError extends AensError {\n constructor(nameFee: BigNumber, minNameFee: BigNumber) {\n super(`the provided fee ${nameFee.toString()} is not enough to execute the claim, required: ${minNameFee.toString()}`);\n this.name = 'InsufficientNameFeeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidAensNameError extends AensError {\n constructor(message: string) {\n super(message);\n this.name = 'InvalidAensNameError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidRpcMessageError extends AeppError {\n constructor(message: string) {\n super(`Received invalid message: ${message}`);\n this.name = 'InvalidRpcMessageError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingCallbackError extends AeppError {\n constructor(id: number) {\n super(`Can't find callback for this messageId ${id}`);\n this.name = 'MissingCallbackError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnAuthorizedAccountError extends AeppError {\n constructor(onAccount: string) {\n super(`You do not have access to account ${onAccount}`);\n this.name = 'UnAuthorizedAccountError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnknownRpcClientError extends AeppError {\n constructor(id: string) {\n super(`RpcClient with id ${id} do not exist`);\n this.name = 'UnknownRpcClientError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnsubscribedAccountError extends AeppError {\n constructor() {\n super('You are not subscribed for an account.');\n this.name = 'UnsubscribedAccountError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ChannelCallError extends ChannelError {\n constructor(message: string) {\n super(message);\n this.name = 'ChannelCallError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ChannelConnectionError extends ChannelError {\n constructor(message: string) {\n super(message);\n this.name = 'ChannelConnectionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ChannelPingTimedOutError extends ChannelError {\n constructor() {\n super('Server pong timed out');\n this.name = 'ChannelPingTimedOutError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnexpectedChannelMessageError extends ChannelError {\n constructor(message: string) {\n super(message);\n this.name = 'UnexpectedChannelMessageError';\n }\n}\n\n/**\n * @category exception\n */\nexport class ChannelIncomingMessageError extends ChannelError {\n handlerError: BaseError;\n\n incomingMessage: { [key: string]: any };\n\n constructor(handlerError: BaseError, incomingMessage: { [key: string]: any }) {\n super(handlerError.message);\n this.handlerError = handlerError;\n this.incomingMessage = incomingMessage;\n this.name = 'ChannelIncomingMessageError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnknownChannelStateError extends ChannelError {\n constructor() {\n super('State Channels FSM entered unknown state');\n this.name = 'UnknownChannelStateError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidAuthDataError extends CompilerError {\n constructor(message: string) {\n super(message);\n this.name = 'InvalidAuthDataError';\n }\n}\n\n/**\n * @category exception\n */\nexport class BytecodeMismatchError extends ContractError {\n constructor(source: string) {\n super(`Contract ${source} do not correspond to the bytecode deployed on the chain`);\n this.name = 'BytecodeMismatchError';\n }\n}\n\n/**\n * @category exception\n */\nexport class DuplicateContractError extends ContractError {\n constructor() {\n super('Contract already deployed');\n this.name = 'DuplicateContractError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InactiveContractError extends ContractError {\n constructor(contractAddress: string) {\n super(`Contract with address ${contractAddress} not active`);\n this.name = 'InactiveContractError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidMethodInvocationError extends ContractError {\n constructor(message: string) {\n super(message);\n this.name = 'InvalidMethodInvocationError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingContractAddressError extends ContractError {\n constructor(message: string) {\n super(message);\n this.name = 'MissingContractAddressError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingContractDefError extends ContractError {\n constructor() {\n super('Either ACI or source code is required');\n this.name = 'MissingContractDefError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingFunctionNameError extends ContractError {\n constructor() {\n super('Function name is required');\n this.name = 'MissingFunctionNameError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NodeInvocationError extends ContractError {\n transaction: string;\n\n constructor(message: string, transaction: string) {\n super(`Invocation failed${message == null ? '' : `: \"${message}\"`}`);\n this.name = 'NodeInvocationError';\n this.transaction = transaction;\n }\n}\n\n/**\n * @category exception\n */\nexport class NoSuchContractFunctionError extends ContractError {\n constructor(name: string) {\n super(`Function ${name} doesn't exist in contract`);\n this.name = 'NoSuchContractFunctionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NotPayableFunctionError extends ContractError {\n constructor(amount: Int, fn: string) {\n super(\n `You try to pay \"${amount}\" to function \"${fn}\" which is not payable. `\n + 'Only payable function can accept coins',\n );\n this.name = 'NotPayableFunctionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingEventDefinitionError extends ContractError {\n constructor(eventNameHash: string, eventAddress: string) {\n super(\n `Can't find definition of ${eventNameHash} event emitted by ${eventAddress}`\n + ' (use omitUnknown option to ignore events like this)',\n );\n this.name = 'MissingEventDefinitionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class AmbiguousEventDefinitionError extends ContractError {\n constructor(eventAddress: string, matchedEvents: Array<[string, string]>) {\n super(\n `Found multiple definitions of \"${matchedEvents[0][1]}\" event with different types emitted by`\n + ` ${eventAddress} in ${matchedEvents.map(([name]) => `\"${name}\"`).join(', ')} contracts`\n + ' (use contractAddressToName option to specify contract name corresponding to address)',\n );\n this.name = 'AmbiguousEventDefinitionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidChecksumError extends CryptographyError {\n constructor() {\n super('Invalid checksum');\n this.name = 'InvalidChecksumError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidPasswordError extends CryptographyError {\n constructor() {\n super('Invalid password or nonce');\n this.name = 'InvalidPasswordError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MerkleTreeHashMismatchError extends CryptographyError {\n constructor() {\n super('Node hash is not equal to provided one');\n this.name = 'MerkleTreeHashMismatchError';\n }\n}\n\n/**\n * @category exception\n */\nexport class MissingNodeInTreeError extends CryptographyError {\n constructor(message: string) {\n super(message);\n this.name = 'MissingNodeInTreeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnknownNodeLengthError extends CryptographyError {\n constructor(nodeLength: number) {\n super(`Unknown node length: ${nodeLength}`);\n this.name = 'UnknownNodeLengthError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnknownPathNibbleError extends CryptographyError {\n constructor(nibble: number) {\n super(`Unknown path nibble: ${nibble}`);\n this.name = 'UnknownPathNibbleError';\n }\n}\n\n/**\n * @category exception\n */\nexport class DuplicateNodeError extends NodeError {\n constructor(name: string) {\n super(`Node with name ${name} already exist`);\n this.name = 'DuplicateNodeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NodeNotFoundError extends NodeError {\n constructor(message: string) {\n super(message);\n this.name = 'NodeNotFoundError';\n }\n}\n\n/**\n * @category exception\n */\nexport class DecodeError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'DecodeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class PayloadLengthError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'PayloadLengthError';\n }\n}\n\n/**\n * @category exception\n */\nexport class DryRunError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'DryRunError';\n }\n}\n\n/**\n * @category exception\n */\nexport class IllegalBidFeeError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'IllegalBidFeeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidSignatureError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'InvalidSignatureError';\n }\n}\n\n/**\n * @category exception\n */\nexport class InvalidTxParamsError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'InvalidTxParamsError';\n }\n}\n\n/**\n * @category exception\n */\nexport class PrefixNotFoundError extends TransactionError {\n constructor(tag: number) {\n super(`Prefix for id-tag ${tag} not found.`);\n this.name = 'PrefixNotFoundError';\n }\n}\n\n/**\n * @category exception\n */\nexport class SchemaNotFoundError extends TransactionError {\n constructor(schemaName: string, key: string, version: number) {\n super(`Transaction ${schemaName} not implemented for ${key} version ${version}`);\n this.name = 'SchemaNotFoundError';\n }\n}\n\n/**\n * @category exception\n */\nexport class TagNotFoundError extends TransactionError {\n constructor(prefix: string) {\n super(`Id tag for prefix ${prefix} not found.`);\n this.name = 'DecodeError';\n }\n}\n\n/**\n * @category exception\n */\nexport class TxNotInChainError extends TransactionError {\n constructor(txHash: string) {\n super(`Transaction ${txHash} is removed from chain`);\n this.name = 'TxNotInChainError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnsupportedABIversionError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedABIversionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class UnsupportedVMversionError extends TransactionError {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedVMversionError';\n }\n}\n\n/**\n * @category exception\n */\nexport class AlreadyConnectedError extends WalletError {\n constructor(message: string) {\n super(message);\n this.name = 'AlreadyConnectedError';\n }\n}\n\n/**\n * @category exception\n */\nexport class NoWalletConnectedError extends WalletError {\n constructor(message: string) {\n super(message);\n this.name = 'NoWalletConnectedError';\n }\n}\n\n/**\n * @category exception\n */\nexport class RpcConnectionError extends WalletError {\n constructor(message: string) {\n super(message);\n this.name = 'RpcConnectionError';\n }\n}\n"],"mappings":"AAAA;;AAIA;AACA;AACA;AACA;AACA,OAAO,MAAeA,SAAS,SAASC,KAAK,CAAC;EAC5CC,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,WAAW;EACzB;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,SAASL,SAAS,CAAC;EAC1CE,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,cAAc;EAC5B;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAME,SAAS,SAASN,SAAS,CAAC;EACvCE,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,WAAW;EACzB;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMG,SAAS,SAASP,SAAS,CAAC;EACvCE,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,WAAW;EACzB;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMI,YAAY,SAASR,SAAS,CAAC;EAC1CE,WAAW,CAACC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AC;IACd,IAAI,CAACC,IAAI,GAAG,2BAA2B;EACzC;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMiH,qBAAqB,SAASvG,WAAW,CAAC;EACrDZ,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,uBAAuB;EACrC;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMkH,sBAAsB,SAASxG,WAAW,CAAC;EACtDZ,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,wBAAwB;EACtC;AACF;;AAEA;AACA;AACA;AACA,OAAO,MAAMmH,kBAAkB,SAASzG,WAAW,CAAC;EAClDZ,WAAW,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACC,IAAI,GAAG,oBAAoB;EAClC;AACF"}
|
package/es/utils/other.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const mapObject: <InputV, OutputV>(object: {
|
|
|
5
5
|
}, fn: (value: [string, InputV], index: number, array: [string, InputV][]) => [string | number, OutputV]) => {
|
|
6
6
|
[k: string]: OutputV;
|
|
7
7
|
};
|
|
8
|
-
export declare const concatBuffers:
|
|
8
|
+
export declare const concatBuffers: typeof Buffer.concat;
|
|
9
9
|
/**
|
|
10
10
|
* Object key type guard
|
|
11
11
|
* @param key - Maybe object key
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeternity/aepp-sdk",
|
|
3
|
-
"version": "13.0.0-alpha.
|
|
3
|
+
"version": "13.0.0-alpha.1",
|
|
4
4
|
"description": "SDK for the æternity blockchain",
|
|
5
5
|
"main": "dist/aepp-sdk.js",
|
|
6
6
|
"types": "es/index.d.ts",
|
|
@@ -18,23 +18,29 @@
|
|
|
18
18
|
},
|
|
19
19
|
"module": "es/index.mjs",
|
|
20
20
|
"browser": {
|
|
21
|
+
"es/index.mjs": "./es/index-browser.mjs",
|
|
21
22
|
"dist/aepp-sdk.js": "./dist/aepp-sdk.browser.js"
|
|
22
23
|
},
|
|
23
24
|
"exports": {
|
|
24
|
-
"
|
|
25
|
-
|
|
25
|
+
"node": {
|
|
26
|
+
"import": "./es/index.mjs",
|
|
27
|
+
"default": "./dist/aepp-sdk.js"
|
|
28
|
+
},
|
|
29
|
+
"import": "./es/index-browser.mjs",
|
|
26
30
|
"default": "./dist/aepp-sdk.browser.js"
|
|
27
31
|
},
|
|
28
32
|
"sideEffects": false,
|
|
29
33
|
"scripts": {
|
|
34
|
+
"build:assets": "node tooling/fetch-aesophia-cli.mjs",
|
|
30
35
|
"build:types": "tsc && node tooling/downlevel/run.mjs",
|
|
31
36
|
"build:es": "babel src --config-file ./babel.esm.config.js --out-dir es --extensions .js,.ts --out-file-extension .mjs --source-maps true",
|
|
32
37
|
"build:api": "node tooling/autorest/compiler-prepare.mjs && autorest tooling/autorest/compiler.yaml --output-artifact:code-model-v4 && autorest tooling/autorest/node.yaml --output-artifact:code-model-v4",
|
|
33
|
-
"build": "npm run build:api && webpack && npm run build:types && npm run build:es",
|
|
38
|
+
"build": "npm run build:api && webpack && npm run build:types && npm run build:es && npm run build:assets",
|
|
34
39
|
"docs:examples": "node tooling/docs/examples-to-md.js examples/node/*.mjs",
|
|
35
40
|
"docs:api": "typedoc",
|
|
36
41
|
"commitlint": "commitlint --from develop",
|
|
37
|
-
"lint": "eslint . --ext .ts,.js,.mjs",
|
|
42
|
+
"lint": "npm run lint:types && eslint . --ext .ts,.js,.mjs",
|
|
43
|
+
"lint:types": "tsc -p tsconfig.tests.json",
|
|
38
44
|
"test": "mocha './test/unit/' './test/integration/'",
|
|
39
45
|
"test:integration": "mocha './test/integration/'",
|
|
40
46
|
"test:unit": "mocha './test/unit/'",
|
|
@@ -57,16 +63,16 @@
|
|
|
57
63
|
"@aeternity/uuid": "^0.0.1",
|
|
58
64
|
"@azure/core-client": "1.6.0",
|
|
59
65
|
"@azure/core-rest-pipeline": "^1.10.0",
|
|
60
|
-
"@babel/runtime-corejs3": "^7.20.
|
|
61
|
-
"@ledgerhq/hw-transport": "^6.27.
|
|
66
|
+
"@babel/runtime-corejs3": "^7.20.7",
|
|
67
|
+
"@ledgerhq/hw-transport": "^6.27.9",
|
|
62
68
|
"@types/aes-js": "^3.1.1",
|
|
63
69
|
"@types/json-bigint": "^1.0.1",
|
|
64
70
|
"@types/sha.js": "^2.4.0",
|
|
65
|
-
"@types/uuid": "^
|
|
66
|
-
"@types/webextension-polyfill": "^0.9.
|
|
71
|
+
"@types/uuid": "^9.0.0",
|
|
72
|
+
"@types/webextension-polyfill": "^0.9.2",
|
|
67
73
|
"@types/websocket": "^1.0.5",
|
|
68
74
|
"aes-js": "^3.1.2",
|
|
69
|
-
"bignumber.js": "^9.1.
|
|
75
|
+
"bignumber.js": "^9.1.1",
|
|
70
76
|
"bip32-path": "^0.4.2",
|
|
71
77
|
"blakejs": "^1.2.1",
|
|
72
78
|
"bs58": "^5.0.0",
|
|
@@ -86,54 +92,56 @@
|
|
|
86
92
|
"url": "https://github.com/aeternity/aepp-sdk-js"
|
|
87
93
|
},
|
|
88
94
|
"devDependencies": {
|
|
89
|
-
"@babel/cli": "^7.
|
|
90
|
-
"@babel/core": "^7.20.
|
|
91
|
-
"@babel/node": "^7.20.
|
|
95
|
+
"@babel/cli": "^7.20.7",
|
|
96
|
+
"@babel/core": "^7.20.7",
|
|
97
|
+
"@babel/node": "^7.20.7",
|
|
92
98
|
"@babel/plugin-transform-runtime": "^7.19.6",
|
|
93
99
|
"@babel/preset-env": "^7.20.2",
|
|
94
100
|
"@babel/preset-typescript": "^7.18.6",
|
|
95
101
|
"@babel/register": "^7.18.9",
|
|
96
102
|
"@commitlint/cli": "^17.3.0",
|
|
97
103
|
"@commitlint/config-conventional": "^17.3.0",
|
|
98
|
-
"@ledgerhq/hw-transport-mocker": "^6.27.
|
|
99
|
-
"@ledgerhq/hw-transport-node-hid-singleton": "^6.28.
|
|
100
|
-
"@ledgerhq/hw-transport-webusb": "^6.27.
|
|
104
|
+
"@ledgerhq/hw-transport-mocker": "^6.27.9",
|
|
105
|
+
"@ledgerhq/hw-transport-node-hid-singleton": "^6.28.6",
|
|
106
|
+
"@ledgerhq/hw-transport-webusb": "^6.27.9",
|
|
101
107
|
"@types/chai": "^4.3.4",
|
|
102
108
|
"@types/chai-as-promised": "^7.1.5",
|
|
103
|
-
"@types/mocha": "^10.0.
|
|
109
|
+
"@types/mocha": "^10.0.1",
|
|
110
|
+
"@types/node-hid": "^1.3.1",
|
|
104
111
|
"@types/sinon": "^10.0.13",
|
|
105
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
106
|
-
"@typescript-eslint/parser": "^5.
|
|
112
|
+
"@typescript-eslint/eslint-plugin": "^5.47.1",
|
|
113
|
+
"@typescript-eslint/parser": "^5.47.1",
|
|
107
114
|
"autorest": "^3.6.2",
|
|
108
115
|
"babel-loader": "^9.1.0",
|
|
109
116
|
"babel-plugin-add-import-extension": "^1.6.0",
|
|
110
117
|
"babel-plugin-import-globals": "^2.0.0",
|
|
111
118
|
"babel-plugin-transform-default-named-imports": "^1.2.2",
|
|
119
|
+
"babel-plugin-transform-import-meta": "^2.2.0",
|
|
112
120
|
"chai": "^4.3.7",
|
|
113
121
|
"chai-as-promised": "^7.1.1",
|
|
114
122
|
"cross-fetch": "^3.1.5",
|
|
115
123
|
"downlevel-dts": "github:aeternity/downlevel-dts",
|
|
116
|
-
"eslint": "^8.
|
|
124
|
+
"eslint": "^8.30.0",
|
|
117
125
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
118
126
|
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
119
|
-
"eslint-plugin-rulesdir": "^0.2.
|
|
127
|
+
"eslint-plugin-rulesdir": "^0.2.2",
|
|
120
128
|
"eslint-plugin-tsdoc": "^0.2.17",
|
|
121
129
|
"html-webpack-plugin": "^5.5.0",
|
|
122
|
-
"mocha": "^10.
|
|
130
|
+
"mocha": "^10.2.0",
|
|
123
131
|
"nyc": "^15.1.0",
|
|
124
|
-
"sinon": "^
|
|
132
|
+
"sinon": "^15.0.1",
|
|
125
133
|
"source-map": "^0.7.4",
|
|
126
134
|
"standard-version": "^9.5.0",
|
|
127
|
-
"
|
|
128
|
-
"typedoc": "^0.23.21",
|
|
135
|
+
"typedoc": "^0.23.23",
|
|
129
136
|
"typedoc-plugin-missing-exports": "^1.0.0",
|
|
130
|
-
"typescript": "^4.9.
|
|
137
|
+
"typescript": "^4.9.4",
|
|
131
138
|
"webpack": "^5.75.0",
|
|
132
139
|
"webpack-bundle-analyzer": "^4.7.0",
|
|
133
|
-
"webpack-cli": "^5.0.
|
|
140
|
+
"webpack-cli": "^5.0.1"
|
|
134
141
|
},
|
|
135
142
|
"files": [
|
|
136
143
|
"dist",
|
|
144
|
+
"bin",
|
|
137
145
|
"types-legacy",
|
|
138
146
|
"src",
|
|
139
147
|
"es"
|
package/src/AeSdkBase.ts
CHANGED
|
@@ -2,7 +2,7 @@ import Node from './Node';
|
|
|
2
2
|
import AccountBase from './account/Base';
|
|
3
3
|
import { CompilerError, DuplicateNodeError, NodeNotFoundError } from './utils/errors';
|
|
4
4
|
import { Encoded } from './utils/encoder';
|
|
5
|
-
import
|
|
5
|
+
import CompilerBase from './contract/compiler/Base';
|
|
6
6
|
import AeSdkMethods, { OnAccount, getValueOrErrorProxy } from './AeSdkMethods';
|
|
7
7
|
|
|
8
8
|
type NodeInfo = Awaited<ReturnType<Node['getNodeInfo']>> & { name: string };
|
|
@@ -32,7 +32,10 @@ export default class AeSdkBase extends AeSdkMethods {
|
|
|
32
32
|
nodes.forEach(({ name, instance }, i) => this.addNode(name, instance, i === 0));
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
// TODO: consider dropping this getter, because:
|
|
36
|
+
// compiler is not intended to be used separately any more (functionality limited to sdk needs)
|
|
37
|
+
// and user creates its instance by himself
|
|
38
|
+
get compilerApi(): CompilerBase {
|
|
36
39
|
if (this._options.onCompiler == null) {
|
|
37
40
|
throw new CompilerError('You can\'t use Compiler API. Compiler is not ready!');
|
|
38
41
|
}
|
|
@@ -153,7 +156,7 @@ export default class AeSdkBase extends AeSdkMethods {
|
|
|
153
156
|
override _getOptions(): {
|
|
154
157
|
onNode: Node;
|
|
155
158
|
onAccount: AccountBase;
|
|
156
|
-
onCompiler:
|
|
159
|
+
onCompiler: CompilerBase;
|
|
157
160
|
} {
|
|
158
161
|
return {
|
|
159
162
|
...super._getOptions(),
|
package/src/AeSdkMethods.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { AE_AMOUNT_FORMATS } from './utils/amount-formatter';
|
|
|
11
11
|
import { Tag } from './tx/builder/constants';
|
|
12
12
|
import AccountBase from './account/Base';
|
|
13
13
|
import { Encoded } from './utils/encoder';
|
|
14
|
-
import
|
|
14
|
+
import CompilerBase from './contract/compiler/Base';
|
|
15
15
|
import { ArgumentError, NotImplementedError, TypeError } from './utils/errors';
|
|
16
16
|
|
|
17
17
|
export type OnAccount = Encoded.AccountAddress | AccountBase | undefined;
|
|
@@ -112,8 +112,7 @@ class AeSdkMethods {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
async initializeContract<Methods extends ContractMethodsBase>(
|
|
115
|
-
options?: Omit<Parameters<typeof Contract.initialize>[0], 'onNode'
|
|
116
|
-
{ onNode?: Node; onCompiler?: CompilerHttp },
|
|
115
|
+
options?: Omit<Parameters<typeof Contract.initialize>[0], 'onNode'> & { onNode?: Node },
|
|
117
116
|
): Promise<Contract<Methods>> {
|
|
118
117
|
const { onNode, onCompiler, ...otherOptions } = this._getOptions();
|
|
119
118
|
if (onCompiler == null || onNode == null) {
|
|
@@ -136,7 +135,7 @@ type OptionalIfNotRequired<T extends [any]> = RequiredKeys<T[0]> extends never ?
|
|
|
136
135
|
|
|
137
136
|
type MakeOptional<Options> = OptionalIfNotRequired<[
|
|
138
137
|
Omit<Options, 'onNode' | 'onCompiler' | 'onAccount'>
|
|
139
|
-
& { onNode?: Node; onCompiler?:
|
|
138
|
+
& { onNode?: Node; onCompiler?: CompilerBase; onAccount?: OnAccount },
|
|
140
139
|
]>;
|
|
141
140
|
|
|
142
141
|
type TransformMethods <Methods extends { [key: string]: Function }> =
|
package/src/Node.ts
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
import { Node as NodeApi, NodeOptionalParams, ErrorModel } from './apis/node';
|
|
9
9
|
import { mapObject } from './utils/other';
|
|
10
10
|
import { Encoded } from './utils/encoder';
|
|
11
|
+
import { ConsensusProtocolVersion } from './tx/builder/constants';
|
|
11
12
|
|
|
12
13
|
const bigIntPropertyNames = [
|
|
13
14
|
'balance', 'queryFee', 'fee', 'amount', 'nameFee', 'channelAmount',
|
|
@@ -17,7 +18,7 @@ const bigIntPropertyNames = [
|
|
|
17
18
|
|
|
18
19
|
const numberPropertyNames = [
|
|
19
20
|
'time', 'gas', 'gasUsed', 'nameSalt',
|
|
20
|
-
'nonce', 'nextNonce', 'height', 'blockHeight', '
|
|
21
|
+
'nonce', 'nextNonce', 'height', 'blockHeight', 'topBlockHeight',
|
|
21
22
|
'ttl', 'nameTtl', 'clientTtl',
|
|
22
23
|
'inbound', 'outbound', 'peerCount', 'pendingTransactionsCount', 'effectiveAtHeight',
|
|
23
24
|
'version', 'solutions', 'round',
|
|
@@ -91,7 +92,9 @@ export type TransformNodeType<Type> =
|
|
|
91
92
|
? PreserveOptional<number, Type[Property]>
|
|
92
93
|
: Property extends 'txHash'
|
|
93
94
|
? PreserveOptional<Encoded.TxHash, Type[Property]>
|
|
94
|
-
:
|
|
95
|
+
: Property extends 'bytecode'
|
|
96
|
+
? PreserveOptional<Encoded.ContractBytearray, Type[Property]>
|
|
97
|
+
: TransformNodeType<Type[Property]>
|
|
95
98
|
}
|
|
96
99
|
: Type;
|
|
97
100
|
type NodeTransformedApi = new (...args: ConstructorParameters<typeof NodeApi>) => {
|
|
@@ -104,7 +107,7 @@ export interface NodeInfo {
|
|
|
104
107
|
url: string;
|
|
105
108
|
nodeNetworkId: string;
|
|
106
109
|
version: string;
|
|
107
|
-
consensusProtocolVersion:
|
|
110
|
+
consensusProtocolVersion: ConsensusProtocolVersion;
|
|
108
111
|
}
|
|
109
112
|
|
|
110
113
|
export default class Node extends (NodeTransformed as unknown as NodeTransformedApi) {
|
package/src/account/Base.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { Encoded } from '../utils/encoder';
|
|
18
18
|
import Node from '../Node';
|
|
19
|
-
import
|
|
19
|
+
import CompilerBase from '../contract/compiler/Base';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Account is one of the three basic building blocks of an
|
|
@@ -43,7 +43,7 @@ export default abstract class AccountBase {
|
|
|
43
43
|
args?: any[];
|
|
44
44
|
};
|
|
45
45
|
onNode?: Node;
|
|
46
|
-
onCompiler?:
|
|
46
|
+
onCompiler?: CompilerBase;
|
|
47
47
|
aeppOrigin?: string;
|
|
48
48
|
aeppRpcClientId?: string;
|
|
49
49
|
},
|
|
@@ -86,13 +86,13 @@ export default class AccountGeneralized extends AccountBase {
|
|
|
86
86
|
})();
|
|
87
87
|
|
|
88
88
|
const gaMetaTx = await _buildTx(Tag.GaMetaTx, {
|
|
89
|
-
tx: buildTx({ encodedTx: decode(tx), signatures: [] }
|
|
89
|
+
tx: decode(buildTx({ tag: Tag.SignedTx, encodedTx: decode(tx), signatures: [] })),
|
|
90
90
|
gaId: this.address,
|
|
91
91
|
authData: authCallData,
|
|
92
92
|
gasLimit,
|
|
93
93
|
nonce: 0,
|
|
94
94
|
onNode,
|
|
95
95
|
});
|
|
96
|
-
return buildTx({ encodedTx: decode(gaMetaTx), signatures: [] }
|
|
96
|
+
return buildTx({ tag: Tag.SignedTx, encodedTx: decode(gaMetaTx), signatures: [] });
|
|
97
97
|
}
|
|
98
98
|
}
|
package/src/account/Ledger.ts
CHANGED
|
@@ -91,7 +91,7 @@ export default class AccountLedger extends AccountBase {
|
|
|
91
91
|
);
|
|
92
92
|
const signatures = [response.subarray(0, 64)];
|
|
93
93
|
|
|
94
|
-
return buildTx({ encodedTx: rawTx, signatures }
|
|
94
|
+
return buildTx({ tag: Tag.SignedTx, encodedTx: rawTx, signatures });
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
override async signMessage(messageStr: string): Promise<Uint8Array> {
|
package/src/account/Memory.ts
CHANGED
|
@@ -75,7 +75,7 @@ export default class AccountMemory extends AccountBase {
|
|
|
75
75
|
const txWithNetworkId = concatBuffers([Buffer.from(prefixes.join('-')), hash(rlpBinaryTx)]);
|
|
76
76
|
|
|
77
77
|
const signatures = [await this.sign(txWithNetworkId, options)];
|
|
78
|
-
return buildTx({ encodedTx: rlpBinaryTx, signatures }
|
|
78
|
+
return buildTx({ tag: Tag.SignedTx, encodedTx: rlpBinaryTx, signatures });
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
override async signMessage(message: string, options?: any): Promise<Uint8Array> {
|
package/src/aens.ts
CHANGED
|
@@ -369,7 +369,8 @@ Awaited<ReturnType<typeof send>> & {
|
|
|
369
369
|
salt,
|
|
370
370
|
commitmentId,
|
|
371
371
|
async claim(opts?: Parameters<typeof aensClaim>[2]) {
|
|
372
|
-
|
|
372
|
+
const { version, ...otherOptions } = options;
|
|
373
|
+
return aensClaim(name, salt, { ...otherOptions, ...opts });
|
|
373
374
|
},
|
|
374
375
|
});
|
|
375
376
|
}
|
|
@@ -377,7 +378,7 @@ Awaited<ReturnType<typeof send>> & {
|
|
|
377
378
|
interface AensPreclaimOptions extends
|
|
378
379
|
BuildTxOptions<Tag.NamePreclaimTx, 'accountId' | 'commitmentId'>,
|
|
379
380
|
SendOptions,
|
|
380
|
-
AensClaimOptions {}
|
|
381
|
+
Omit<AensClaimOptions, 'version'> {}
|
|
381
382
|
|
|
382
383
|
/**
|
|
383
384
|
* Bid to name auction
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { Runtime } from 'webextension-polyfill';
|
|
19
19
|
import BrowserConnection from './Browser';
|
|
20
|
+
import { UnexpectedTsError } from '../../utils/errors';
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* BrowserRuntimeConnection
|
|
@@ -26,6 +27,8 @@ import BrowserConnection from './Browser';
|
|
|
26
27
|
export default class BrowserRuntimeConnection extends BrowserConnection {
|
|
27
28
|
port: Runtime.Port;
|
|
28
29
|
|
|
30
|
+
#listeners?: [(message: any, port: Runtime.Port) => void, () => void];
|
|
31
|
+
|
|
29
32
|
constructor({ port, ...options }: { port: Runtime.Port; debug: boolean }) {
|
|
30
33
|
super(options);
|
|
31
34
|
this.port = port;
|
|
@@ -34,6 +37,10 @@ export default class BrowserRuntimeConnection extends BrowserConnection {
|
|
|
34
37
|
override disconnect(): void {
|
|
35
38
|
super.disconnect();
|
|
36
39
|
this.port.disconnect();
|
|
40
|
+
if (this.#listeners == null) throw new UnexpectedTsError();
|
|
41
|
+
this.port.onMessage.removeListener(this.#listeners[0]);
|
|
42
|
+
this.port.onDisconnect.removeListener(this.#listeners[1]);
|
|
43
|
+
this.#listeners = undefined;
|
|
37
44
|
}
|
|
38
45
|
|
|
39
46
|
override connect(
|
|
@@ -41,12 +48,16 @@ export default class BrowserRuntimeConnection extends BrowserConnection {
|
|
|
41
48
|
onDisconnect: () => void,
|
|
42
49
|
): void {
|
|
43
50
|
super.connect(onMessage, onDisconnect);
|
|
44
|
-
this
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
this.#listeners = [
|
|
52
|
+
(message, port) => {
|
|
53
|
+
this.receiveMessage(message);
|
|
54
|
+
// TODO: make `origin` optional because sender url is not available on aepp side
|
|
55
|
+
onMessage(message, port.sender?.url ?? '', port);
|
|
56
|
+
},
|
|
57
|
+
onDisconnect,
|
|
58
|
+
];
|
|
59
|
+
this.port.onMessage.addListener(this.#listeners[0]);
|
|
60
|
+
this.port.onDisconnect.addListener(this.#listeners[1]);
|
|
50
61
|
}
|
|
51
62
|
|
|
52
63
|
override sendMessage(message: any): void {
|
|
@@ -55,6 +66,6 @@ export default class BrowserRuntimeConnection extends BrowserConnection {
|
|
|
55
66
|
}
|
|
56
67
|
|
|
57
68
|
isConnected(): boolean {
|
|
58
|
-
return this
|
|
69
|
+
return this.#listeners != null;
|
|
59
70
|
}
|
|
60
71
|
}
|
|
@@ -94,13 +94,13 @@ export default class RpcClient <
|
|
|
94
94
|
id: number,
|
|
95
95
|
method: keyof RemoteApi | keyof LocalApi, // TODO: remove as far it is not required in JSON RPC
|
|
96
96
|
result?: any,
|
|
97
|
-
error?:
|
|
97
|
+
error?: RpcError,
|
|
98
98
|
): void {
|
|
99
99
|
this.connection.sendMessage({
|
|
100
100
|
jsonrpc: '2.0',
|
|
101
101
|
id,
|
|
102
102
|
method,
|
|
103
|
-
...error != null ? { error } : { result },
|
|
103
|
+
...error != null ? { error: error.toJSON() } : { result },
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
|