@aeternity/aepp-sdk 13.0.1 → 13.2.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/README.md +4 -2
- 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 +28490 -17706
- package/dist/aepp-sdk.js.map +1 -1
- package/es/AeSdkAepp.mjs.map +1 -1
- package/es/AeSdkBase.d.ts +21 -3
- package/es/AeSdkBase.mjs +51 -3
- package/es/AeSdkBase.mjs.map +1 -1
- package/es/AeSdkMethods.d.ts +9 -14
- package/es/AeSdkMethods.mjs +20 -49
- package/es/AeSdkMethods.mjs.map +1 -1
- package/es/AeSdkWallet.d.ts +1 -1
- package/es/AeSdkWallet.mjs +79 -23
- package/es/AeSdkWallet.mjs.map +1 -1
- package/es/Middleware.d.ts +38 -0
- package/es/Middleware.mjs +90 -0
- package/es/Middleware.mjs.map +1 -0
- package/es/MiddlewareSubscriber.d.ts +30 -0
- package/es/MiddlewareSubscriber.mjs +198 -0
- package/es/MiddlewareSubscriber.mjs.map +1 -0
- package/es/Node.d.ts +1 -1
- package/es/Node.mjs.map +1 -1
- package/es/account/Base.d.ts +57 -3
- package/es/account/Base.mjs +95 -1
- package/es/account/Base.mjs.map +1 -1
- package/es/account/Generalized.d.ts +4 -0
- package/es/account/Generalized.mjs +20 -0
- package/es/account/Generalized.mjs.map +1 -1
- package/es/account/Ledger.d.ts +4 -0
- package/es/account/Ledger.mjs +20 -0
- package/es/account/Ledger.mjs.map +1 -1
- package/es/account/LedgerFactory.mjs.map +1 -1
- package/es/account/Memory.d.ts +12 -0
- package/es/account/Memory.mjs +52 -0
- package/es/account/Memory.mjs.map +1 -1
- package/es/account/Rpc.d.ts +5 -6
- package/es/account/Rpc.mjs +53 -10
- package/es/account/Rpc.mjs.map +1 -1
- package/es/aens.d.ts +1 -1
- package/es/aens.mjs +1 -1
- package/es/aens.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection/Browser.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection-proxy.mjs.map +1 -1
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs +5 -2
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs.map +1 -1
- package/es/aepp-wallet-communication/rpc/types.d.ts +19 -0
- package/es/aepp-wallet-communication/rpc/types.mjs.map +1 -1
- package/es/aepp-wallet-communication/schema.d.ts +2 -8
- package/es/aepp-wallet-communication/schema.mjs +21 -33
- package/es/aepp-wallet-communication/schema.mjs.map +1 -1
- package/es/aepp-wallet-communication/wallet-detector.d.ts +1 -1
- package/es/aepp-wallet-communication/wallet-detector.mjs +0 -3
- package/es/aepp-wallet-communication/wallet-detector.mjs.map +1 -1
- package/es/apis/compiler/compiler.mjs +15 -1
- package/es/apis/compiler/compiler.mjs.map +1 -1
- package/es/apis/compiler/models/index.d.ts +1 -7
- package/es/apis/compiler/models/index.mjs.map +1 -1
- package/es/apis/compiler/models/mappers.d.ts +0 -1
- package/es/apis/compiler/models/mappers.mjs +0 -43
- package/es/apis/compiler/models/mappers.mjs.map +1 -1
- package/es/apis/middleware/index.d.ts +2 -0
- package/es/apis/middleware/index.mjs +3 -0
- package/es/apis/middleware/index.mjs.map +1 -0
- package/es/apis/middleware/middleware.d.ts +309 -0
- package/es/apis/middleware/middleware.mjs +1527 -0
- package/es/apis/middleware/middleware.mjs.map +1 -0
- package/es/apis/middleware/models/index.d.ts +1496 -0
- package/es/apis/middleware/models/index.mjs +580 -0
- package/es/apis/middleware/models/index.mjs.map +1 -0
- package/es/apis/middleware/models/mappers.d.ts +102 -0
- package/es/apis/middleware/models/mappers.mjs +3334 -0
- package/es/apis/middleware/models/mappers.mjs.map +1 -0
- package/es/apis/middleware/models/parameters.d.ts +43 -0
- package/es/apis/middleware/models/parameters.mjs +417 -0
- package/es/apis/middleware/models/parameters.mjs.map +1 -0
- package/es/apis/node/node.mjs.map +1 -1
- package/es/chain.d.ts +2 -1
- package/es/chain.mjs +5 -3
- package/es/chain.mjs.map +1 -1
- package/es/channel/Base.d.ts +1 -1
- package/es/channel/Base.mjs +1 -4
- package/es/channel/Base.mjs.map +1 -1
- package/es/channel/Contract.mjs.map +1 -1
- package/es/channel/Spend.mjs.map +1 -1
- package/es/channel/handlers.mjs +2 -2
- package/es/channel/handlers.mjs.map +1 -1
- package/es/channel/internal.mjs +7 -5
- package/es/channel/internal.mjs.map +1 -1
- package/es/contract/Contract.mjs +2 -2
- package/es/contract/Contract.mjs.map +1 -1
- package/es/contract/compiler/Base.d.ts +21 -0
- package/es/contract/compiler/Base.mjs.map +1 -1
- package/es/contract/compiler/Cli.d.ts +2 -0
- package/es/contract/compiler/Cli.mjs +24 -3
- package/es/contract/compiler/Cli.mjs.map +1 -1
- package/es/contract/compiler/Http.d.ts +2 -0
- package/es/contract/compiler/Http.mjs +22 -2
- package/es/contract/compiler/Http.mjs.map +1 -1
- package/es/contract/compiler/HttpNode.d.ts +1 -0
- package/es/contract/compiler/HttpNode.mjs +5 -0
- package/es/contract/compiler/HttpNode.mjs.map +1 -1
- package/es/contract/delegation-signature.d.ts +2 -1
- package/es/contract/delegation-signature.mjs +39 -8
- package/es/contract/delegation-signature.mjs.map +1 -1
- package/es/contract/ga.mjs.map +1 -1
- package/es/deprecated.d.ts +14 -0
- package/es/deprecated.mjs +22 -0
- package/es/deprecated.mjs.map +1 -0
- package/es/index-browser.d.ts +20 -14
- package/es/index-browser.mjs +19 -15
- package/es/index-browser.mjs.map +1 -1
- package/es/oracle.mjs.map +1 -1
- package/es/spend.d.ts +2 -1
- package/es/spend.mjs +4 -2
- package/es/spend.mjs.map +1 -1
- package/es/tx/builder/constants.d.ts +0 -1
- package/es/tx/builder/constants.mjs +26 -24
- package/es/tx/builder/constants.mjs.map +1 -1
- package/es/tx/builder/field-types/abi-version.mjs.map +1 -1
- package/es/tx/builder/field-types/coin-amount.d.ts +1 -1
- package/es/tx/builder/field-types/coin-amount.mjs +2 -1
- package/es/tx/builder/field-types/coin-amount.mjs.map +1 -1
- package/es/tx/builder/field-types/ct-version.mjs.map +1 -1
- 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/entry.mjs +2 -1
- package/es/tx/builder/field-types/entry.mjs.map +1 -1
- package/es/tx/builder/field-types/fee.mjs.map +1 -1
- package/es/tx/builder/field-types/field.mjs.map +1 -1
- package/es/tx/builder/field-types/gas-limit.mjs.map +1 -1
- package/es/tx/builder/field-types/gas-price.mjs.map +1 -1
- package/es/tx/builder/field-types/index.d.ts +28 -150
- package/es/tx/builder/field-types/index.mjs +28 -56
- package/es/tx/builder/field-types/index.mjs.map +1 -1
- package/es/tx/builder/field-types/map.mjs.map +1 -1
- package/es/tx/builder/field-types/mptree.mjs +3 -3
- package/es/tx/builder/field-types/mptree.mjs.map +1 -1
- package/es/tx/builder/field-types/name-fee.mjs.map +1 -1
- package/es/tx/builder/field-types/pointers.mjs.map +1 -1
- package/es/tx/builder/field-types/string.mjs.map +1 -1
- package/es/tx/builder/field-types/ttl.mjs.map +1 -1
- package/es/tx/builder/field-types/u-int.mjs +1 -1
- package/es/tx/builder/field-types/u-int.mjs.map +1 -1
- package/es/tx/builder/helpers.d.ts +8 -1
- package/es/tx/builder/helpers.mjs +53 -9
- package/es/tx/builder/helpers.mjs.map +1 -1
- package/es/tx/builder/index.d.ts +4 -2
- package/es/tx/builder/index.mjs +0 -1
- package/es/tx/builder/index.mjs.map +1 -1
- package/es/tx/builder/schema.d.ts +9 -9
- package/es/tx/builder/schema.mjs +11 -10
- package/es/tx/builder/schema.mjs.map +1 -1
- package/es/tx/execution-cost.mjs.map +1 -1
- package/es/tx/transaction-signer.mjs.map +1 -1
- package/es/tx/validator.mjs +6 -3
- package/es/tx/validator.mjs.map +1 -1
- package/es/utils/amount-formatter.mjs +7 -7
- package/es/utils/amount-formatter.mjs.map +1 -1
- package/es/utils/autorest.mjs +6 -8
- package/es/utils/autorest.mjs.map +1 -1
- package/es/utils/bignumber.mjs.map +1 -1
- package/es/utils/bytes.mjs.map +1 -1
- package/es/utils/crypto.d.ts +1 -0
- package/es/utils/crypto.mjs +12 -2
- package/es/utils/crypto.mjs.map +1 -1
- package/es/utils/encoder-types.mjs +3 -3
- package/es/utils/encoder-types.mjs.map +1 -1
- package/es/utils/encoder.mjs.map +1 -1
- package/es/utils/errors.d.ts +2 -2
- package/es/utils/errors.mjs.map +1 -1
- package/es/utils/hd-wallet.mjs.map +1 -1
- package/es/utils/keystore.mjs.map +1 -1
- package/es/utils/other.d.ts +1 -0
- package/es/utils/other.mjs +5 -0
- package/es/utils/other.mjs.map +1 -1
- package/es/utils/semver-satisfies.mjs.map +1 -1
- package/es/utils/string.mjs.map +1 -1
- package/es/utils/typed-data.d.ts +45 -0
- package/es/utils/typed-data.mjs +70 -0
- package/es/utils/typed-data.mjs.map +1 -0
- package/package.json +56 -37
- package/src/AeSdkBase.ts +66 -5
- package/src/AeSdkMethods.ts +31 -50
- package/src/AeSdkWallet.ts +63 -17
- package/src/Middleware.ts +141 -0
- package/src/MiddlewareSubscriber.ts +207 -0
- package/src/Node.ts +1 -1
- package/src/account/Base.ts +102 -4
- package/src/account/Generalized.ts +20 -0
- package/src/account/Ledger.ts +20 -0
- package/src/account/Memory.ts +68 -1
- package/src/account/Rpc.ts +54 -7
- package/src/aens.ts +1 -1
- package/src/aepp-wallet-communication/rpc/RpcClient.ts +11 -3
- package/src/aepp-wallet-communication/rpc/types.ts +21 -0
- package/src/aepp-wallet-communication/schema.ts +3 -17
- package/src/aepp-wallet-communication/wallet-detector.ts +1 -2
- package/src/apis/compiler/compiler.ts +8 -1
- package/src/apis/compiler/models/index.ts +1 -8
- package/src/apis/compiler/models/mappers.ts +0 -36
- package/src/apis/middleware/index.ts +2 -0
- package/src/apis/middleware/middleware.ts +1807 -0
- package/src/apis/middleware/models/index.ts +1747 -0
- package/src/apis/middleware/models/mappers.ts +3370 -0
- package/src/apis/middleware/models/parameters.ts +463 -0
- package/src/chain.ts +4 -3
- package/src/channel/Base.ts +5 -5
- package/src/channel/internal.ts +2 -0
- package/src/contract/Contract.ts +2 -1
- package/src/contract/compiler/Base.ts +26 -0
- package/src/contract/compiler/Cli.ts +27 -3
- package/src/contract/compiler/Http.ts +21 -2
- package/src/contract/compiler/HttpNode.ts +6 -0
- package/src/contract/delegation-signature.ts +37 -11
- package/src/deprecated.ts +23 -0
- package/src/index-browser.ts +77 -15
- package/src/spend.ts +2 -2
- package/src/tx/builder/constants.ts +0 -1
- package/src/tx/builder/field-types/coin-amount.ts +2 -1
- package/src/tx/builder/field-types/entry.ts +1 -1
- package/src/tx/builder/field-types/index.ts +28 -58
- package/src/tx/builder/field-types/u-int.ts +1 -1
- package/src/tx/builder/helpers.ts +54 -9
- package/src/tx/builder/index.ts +6 -9
- package/src/tx/validator.ts +4 -2
- package/src/utils/autorest.ts +5 -10
- package/src/utils/crypto.ts +12 -2
- package/src/utils/errors.ts +2 -2
- package/src/utils/other.ts +5 -0
- package/src/utils/typed-data.ts +95 -0
- package/types-legacy/ts4.2/AeSdkBase.d.ts +21 -3
- package/types-legacy/ts4.2/AeSdkMethods.d.ts +9 -14
- package/types-legacy/ts4.2/AeSdkWallet.d.ts +1 -1
- package/types-legacy/ts4.2/Middleware.d.ts +46 -0
- package/types-legacy/ts4.2/MiddlewareSubscriber.d.ts +30 -0
- package/types-legacy/ts4.2/Node.d.ts +1 -1
- package/types-legacy/ts4.2/account/Base.d.ts +57 -3
- package/types-legacy/ts4.2/account/Generalized.d.ts +4 -0
- package/types-legacy/ts4.2/account/Ledger.d.ts +4 -0
- package/types-legacy/ts4.2/account/Memory.d.ts +12 -0
- package/types-legacy/ts4.2/account/Rpc.d.ts +5 -6
- package/types-legacy/ts4.2/aens.d.ts +1 -1
- package/types-legacy/ts4.2/aepp-wallet-communication/rpc/types.d.ts +19 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/schema.d.ts +2 -8
- package/types-legacy/ts4.2/aepp-wallet-communication/wallet-detector.d.ts +1 -1
- package/types-legacy/ts4.2/apis/compiler/models/index.d.ts +1 -7
- package/types-legacy/ts4.2/apis/compiler/models/mappers.d.ts +0 -1
- package/types-legacy/ts4.2/apis/middleware/index.d.ts +2 -0
- package/types-legacy/ts4.2/apis/middleware/middleware.d.ts +309 -0
- package/types-legacy/ts4.2/apis/middleware/models/index.d.ts +1496 -0
- package/types-legacy/ts4.2/apis/middleware/models/mappers.d.ts +102 -0
- package/types-legacy/ts4.2/apis/middleware/models/parameters.d.ts +43 -0
- package/types-legacy/ts4.2/chain.d.ts +2 -1
- package/types-legacy/ts4.2/channel/Base.d.ts +1 -1
- package/types-legacy/ts4.2/contract/compiler/Base.d.ts +21 -0
- package/types-legacy/ts4.2/contract/compiler/Cli.d.ts +2 -0
- package/types-legacy/ts4.2/contract/compiler/Http.d.ts +2 -0
- package/types-legacy/ts4.2/contract/compiler/HttpNode.d.ts +1 -0
- package/types-legacy/ts4.2/contract/delegation-signature.d.ts +2 -1
- package/types-legacy/ts4.2/deprecated.d.ts +14 -0
- package/types-legacy/ts4.2/index-browser.d.ts +20 -14
- package/types-legacy/ts4.2/spend.d.ts +2 -1
- package/types-legacy/ts4.2/tx/builder/constants.d.ts +0 -1
- package/types-legacy/ts4.2/tx/builder/field-types/coin-amount.d.ts +1 -1
- package/types-legacy/ts4.2/tx/builder/field-types/deposit.d.ts +1 -1
- package/types-legacy/ts4.2/tx/builder/field-types/index.d.ts +28 -153
- package/types-legacy/ts4.2/tx/builder/helpers.d.ts +8 -1
- package/types-legacy/ts4.2/tx/builder/index.d.ts +4 -2
- package/types-legacy/ts4.2/tx/builder/schema.d.ts +9 -9
- package/types-legacy/ts4.2/utils/crypto.d.ts +1 -0
- package/types-legacy/ts4.2/utils/errors.d.ts +2 -2
- package/types-legacy/ts4.2/utils/other.d.ts +1 -0
- package/types-legacy/ts4.2/utils/typed-data.d.ts +60 -0
- package/types-legacy/ts4.5/AeSdkBase.d.ts +21 -3
- package/types-legacy/ts4.5/AeSdkMethods.d.ts +9 -14
- package/types-legacy/ts4.5/AeSdkWallet.d.ts +1 -1
- package/types-legacy/ts4.5/Middleware.d.ts +46 -0
- package/types-legacy/ts4.5/MiddlewareSubscriber.d.ts +30 -0
- package/types-legacy/ts4.5/Node.d.ts +1 -1
- package/types-legacy/ts4.5/account/Base.d.ts +57 -3
- package/types-legacy/ts4.5/account/Generalized.d.ts +4 -0
- package/types-legacy/ts4.5/account/Ledger.d.ts +4 -0
- package/types-legacy/ts4.5/account/Memory.d.ts +12 -0
- package/types-legacy/ts4.5/account/Rpc.d.ts +5 -6
- package/types-legacy/ts4.5/aens.d.ts +1 -1
- package/types-legacy/ts4.5/aepp-wallet-communication/rpc/types.d.ts +19 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/schema.d.ts +2 -8
- package/types-legacy/ts4.5/aepp-wallet-communication/wallet-detector.d.ts +1 -1
- package/types-legacy/ts4.5/apis/compiler/models/index.d.ts +1 -7
- package/types-legacy/ts4.5/apis/compiler/models/mappers.d.ts +0 -1
- package/types-legacy/ts4.5/apis/middleware/index.d.ts +2 -0
- package/types-legacy/ts4.5/apis/middleware/middleware.d.ts +309 -0
- package/types-legacy/ts4.5/apis/middleware/models/index.d.ts +1496 -0
- package/types-legacy/ts4.5/apis/middleware/models/mappers.d.ts +102 -0
- package/types-legacy/ts4.5/apis/middleware/models/parameters.d.ts +43 -0
- package/types-legacy/ts4.5/chain.d.ts +2 -1
- package/types-legacy/ts4.5/channel/Base.d.ts +1 -1
- package/types-legacy/ts4.5/contract/compiler/Base.d.ts +21 -0
- package/types-legacy/ts4.5/contract/compiler/Cli.d.ts +2 -0
- package/types-legacy/ts4.5/contract/compiler/Http.d.ts +2 -0
- package/types-legacy/ts4.5/contract/compiler/HttpNode.d.ts +1 -0
- package/types-legacy/ts4.5/contract/delegation-signature.d.ts +2 -1
- package/types-legacy/ts4.5/deprecated.d.ts +14 -0
- package/types-legacy/ts4.5/index-browser.d.ts +20 -14
- package/types-legacy/ts4.5/spend.d.ts +2 -1
- package/types-legacy/ts4.5/tx/builder/constants.d.ts +0 -1
- package/types-legacy/ts4.5/tx/builder/field-types/coin-amount.d.ts +1 -1
- package/types-legacy/ts4.5/tx/builder/field-types/deposit.d.ts +1 -1
- package/types-legacy/ts4.5/tx/builder/field-types/index.d.ts +28 -153
- package/types-legacy/ts4.5/tx/builder/helpers.d.ts +8 -1
- package/types-legacy/ts4.5/tx/builder/index.d.ts +4 -2
- package/types-legacy/ts4.5/tx/builder/schema.d.ts +9 -9
- package/types-legacy/ts4.5/utils/crypto.d.ts +1 -0
- package/types-legacy/ts4.5/utils/errors.d.ts +2 -2
- package/types-legacy/ts4.5/utils/other.d.ts +1 -0
- package/types-legacy/ts4.5/utils/typed-data.d.ts +60 -0
|
@@ -217,7 +217,7 @@ export declare const txSchema: readonly [
|
|
|
217
217
|
deserialize: (value: Buffer) => `ak_${string}` | `nm_${string}`;
|
|
218
218
|
};
|
|
219
219
|
readonly amount: {
|
|
220
|
-
serializeAettos(value: string | undefined): string;
|
|
220
|
+
serializeAettos(value: string | undefined, params: {}): string;
|
|
221
221
|
serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
|
|
222
222
|
denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
|
|
223
223
|
}): Buffer;
|
|
@@ -656,7 +656,7 @@ export declare const txSchema: readonly [
|
|
|
656
656
|
serialize(value: import("./constants").Int | undefined, options: {}, parameters: {
|
|
657
657
|
denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
|
|
658
658
|
}): Buffer;
|
|
659
|
-
serializeAettos(value: string | undefined): string;
|
|
659
|
+
serializeAettos(value: string | undefined, params: {}): string;
|
|
660
660
|
deserialize(value: Buffer): string;
|
|
661
661
|
};
|
|
662
662
|
},
|
|
@@ -727,11 +727,11 @@ export declare const txSchema: readonly [
|
|
|
727
727
|
serialize(value: import("./constants").Int | undefined, options: {}, parameters: {
|
|
728
728
|
denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
|
|
729
729
|
}): Buffer;
|
|
730
|
-
serializeAettos(value: string | undefined): string;
|
|
730
|
+
serializeAettos(value: string | undefined, params: {}): string;
|
|
731
731
|
deserialize(value: Buffer): string;
|
|
732
732
|
};
|
|
733
733
|
readonly amount: {
|
|
734
|
-
serializeAettos(value: string | undefined): string;
|
|
734
|
+
serializeAettos(value: string | undefined, params: {}): string;
|
|
735
735
|
serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
|
|
736
736
|
denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
|
|
737
737
|
}): Buffer;
|
|
@@ -830,7 +830,7 @@ export declare const txSchema: readonly [
|
|
|
830
830
|
deserialize(value: Buffer): number;
|
|
831
831
|
};
|
|
832
832
|
readonly amount: {
|
|
833
|
-
serializeAettos(value: string | undefined): string;
|
|
833
|
+
serializeAettos(value: string | undefined, params: {}): string;
|
|
834
834
|
serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
|
|
835
835
|
denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
|
|
836
836
|
}): Buffer;
|
|
@@ -936,7 +936,7 @@ export declare const txSchema: readonly [
|
|
|
936
936
|
deserialize(buffer: Buffer): string;
|
|
937
937
|
};
|
|
938
938
|
readonly queryFee: {
|
|
939
|
-
serializeAettos(value: string | undefined): string;
|
|
939
|
+
serializeAettos(value: string | undefined, params: {}): string;
|
|
940
940
|
serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
|
|
941
941
|
denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
|
|
942
942
|
}): Buffer;
|
|
@@ -999,7 +999,7 @@ export declare const txSchema: readonly [
|
|
|
999
999
|
deserialize(buffer: Buffer): string;
|
|
1000
1000
|
};
|
|
1001
1001
|
readonly queryFee: {
|
|
1002
|
-
serializeAettos(value: string | undefined): string;
|
|
1002
|
+
serializeAettos(value: string | undefined, params: {}): string;
|
|
1003
1003
|
serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
|
|
1004
1004
|
denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
|
|
1005
1005
|
}): Buffer;
|
|
@@ -1145,7 +1145,7 @@ export declare const txSchema: readonly [
|
|
|
1145
1145
|
deserialize(buffer: Buffer): string;
|
|
1146
1146
|
};
|
|
1147
1147
|
readonly queryFee: {
|
|
1148
|
-
serializeAettos(value: string | undefined): string;
|
|
1148
|
+
serializeAettos(value: string | undefined, params: {}): string;
|
|
1149
1149
|
serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
|
|
1150
1150
|
denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
|
|
1151
1151
|
}): Buffer;
|
|
@@ -2982,7 +2982,7 @@ export declare const txSchema: readonly [
|
|
|
2982
2982
|
constValueOptional: boolean;
|
|
2983
2983
|
};
|
|
2984
2984
|
readonly fee: {
|
|
2985
|
-
serializeAettos(value: string | undefined): string;
|
|
2985
|
+
serializeAettos(value: string | undefined, params: {}): string;
|
|
2986
2986
|
serialize(value: import("./constants").Int | undefined, params: {}, { denomination }: {
|
|
2987
2987
|
denomination?: import("../..").AE_AMOUNT_FORMATS | undefined;
|
|
2988
2988
|
}): Buffer;
|
|
@@ -74,6 +74,7 @@ export declare function sign(data: string | Uint8Array, privateKey: string | Uin
|
|
|
74
74
|
* @returns is data was signed by address
|
|
75
75
|
*/
|
|
76
76
|
export declare function verify(data: Uint8Array, signature: Uint8Array, address: Encoded.AccountAddress): boolean;
|
|
77
|
+
export declare const messagePrefixLength: Buffer;
|
|
77
78
|
export declare function messageToHash(message: string): Buffer;
|
|
78
79
|
export declare function signMessage(message: string, privateKey: string | Buffer): Uint8Array;
|
|
79
80
|
/**
|
|
@@ -240,11 +240,11 @@ export declare class UnexpectedChannelMessageError extends ChannelError {
|
|
|
240
240
|
* @category exception
|
|
241
241
|
*/
|
|
242
242
|
export declare class ChannelIncomingMessageError extends ChannelError {
|
|
243
|
-
handlerError:
|
|
243
|
+
handlerError: Error;
|
|
244
244
|
incomingMessage: {
|
|
245
245
|
[key: string]: any;
|
|
246
246
|
};
|
|
247
|
-
constructor(handlerError:
|
|
247
|
+
constructor(handlerError: Error, incomingMessage: {
|
|
248
248
|
[key: string]: any;
|
|
249
249
|
});
|
|
250
250
|
}
|
|
@@ -29,3 +29,4 @@ export declare function isKeyOfObject<T extends object>(key: string | number | s
|
|
|
29
29
|
export declare function isItemOfArray<T>(item: any, array: readonly T[]): item is T;
|
|
30
30
|
export declare function isAccountNotFoundError(error: Error): boolean;
|
|
31
31
|
export type UnionToIntersection<Union> = (Union extends any ? (k: Union) => void : never) extends ((k: infer Intersection) => void) ? Intersection : never;
|
|
32
|
+
export declare function ensureError(error: unknown): asserts error is Error;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Encoded } from './encoder';
|
|
3
|
+
/**
|
|
4
|
+
* Hashes arbitrary object, can be used to inline the aci hash to contract source code
|
|
5
|
+
*/
|
|
6
|
+
export declare function hashJson(data: unknown): Buffer;
|
|
7
|
+
export type AciValue = 'void' | 'unit' | 'int' | 'bool' | 'string' | 'bits' | 'hash' | 'signature' | 'address' | 'contract_pubkey' | 'Chain.ttl' | 'Chain.ga_meta_tx' | 'Chain.paying_for_tx' | 'Chain.base_tx' | 'AENS.pointee' | 'AENS.name' | 'MCL_BLS12_381.fr' | 'MCL_BLS12_381.fp' | {
|
|
8
|
+
'Set.set': readonly [
|
|
9
|
+
AciValue
|
|
10
|
+
];
|
|
11
|
+
} | {
|
|
12
|
+
bytes: number;
|
|
13
|
+
} | {
|
|
14
|
+
list: readonly [
|
|
15
|
+
AciValue
|
|
16
|
+
];
|
|
17
|
+
} | {
|
|
18
|
+
map: readonly [
|
|
19
|
+
AciValue,
|
|
20
|
+
AciValue
|
|
21
|
+
];
|
|
22
|
+
} | {
|
|
23
|
+
tuple: readonly AciValue[];
|
|
24
|
+
} | {
|
|
25
|
+
record: ReadonlyArray<{
|
|
26
|
+
name: string;
|
|
27
|
+
type: AciValue;
|
|
28
|
+
}>;
|
|
29
|
+
} | {
|
|
30
|
+
variant: ReadonlyArray<{
|
|
31
|
+
[key: string]: readonly AciValue[];
|
|
32
|
+
}>;
|
|
33
|
+
} | {
|
|
34
|
+
option: readonly [
|
|
35
|
+
AciValue
|
|
36
|
+
];
|
|
37
|
+
} | {
|
|
38
|
+
oracle: readonly [
|
|
39
|
+
AciValue,
|
|
40
|
+
AciValue
|
|
41
|
+
];
|
|
42
|
+
} | {
|
|
43
|
+
oracle_query: readonly [
|
|
44
|
+
AciValue,
|
|
45
|
+
AciValue
|
|
46
|
+
];
|
|
47
|
+
};
|
|
48
|
+
export interface Domain {
|
|
49
|
+
name?: string;
|
|
50
|
+
version?: number;
|
|
51
|
+
networkId?: string;
|
|
52
|
+
contractAddress?: Encoded.ContractAddress;
|
|
53
|
+
}
|
|
54
|
+
export declare function encodeFateValue(value: unknown, aci: AciValue): Encoded.ContractBytearray;
|
|
55
|
+
export declare function decodeFateValue(value: Encoded.ContractBytearray, aci: AciValue): Encoded.ContractBytearray;
|
|
56
|
+
/**
|
|
57
|
+
* Hashes domain object, can be used to inline domain hash to contract source code
|
|
58
|
+
*/
|
|
59
|
+
export declare function hashDomain(domain: Domain): Buffer;
|
|
60
|
+
export declare function hashTypedData(data: Encoded.ContractBytearray, aci: AciValue, domain: Domain): Buffer;
|