@aeternity/aepp-sdk 13.0.1 → 13.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +26702 -16514
- package/dist/aepp-sdk.js.map +1 -1
- package/es/AeSdkBase.d.ts +11 -3
- package/es/AeSdkBase.mjs +24 -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.mjs +28 -5
- 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 +14 -2
- package/es/account/Base.mjs.map +1 -1
- package/es/account/Generalized.d.ts +1 -0
- package/es/account/Generalized.mjs +5 -0
- package/es/account/Generalized.mjs.map +1 -1
- package/es/account/Ledger.d.ts +1 -0
- package/es/account/Ledger.mjs +5 -0
- package/es/account/Ledger.mjs.map +1 -1
- package/es/account/Memory.d.ts +2 -0
- package/es/account/Memory.mjs +18 -0
- package/es/account/Memory.mjs.map +1 -1
- package/es/account/Rpc.d.ts +1 -6
- package/es/account/Rpc.mjs +24 -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/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 +10 -0
- package/es/aepp-wallet-communication/rpc/types.mjs.map +1 -1
- package/es/aepp-wallet-communication/schema.d.ts +1 -8
- package/es/aepp-wallet-communication/schema.mjs +1 -14
- 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 +364 -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/chain.d.ts +2 -1
- package/es/chain.mjs +4 -2
- 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/internal.mjs +2 -0
- package/es/channel/internal.mjs.map +1 -1
- package/es/contract/Contract.mjs +1 -1
- 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/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/tx/builder/constants.d.ts +0 -1
- package/es/tx/builder/constants.mjs +0 -1
- package/es/tx/builder/constants.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/deposit.d.ts +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/index.d.ts +2 -2
- 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/validator.mjs +6 -3
- package/es/tx/validator.mjs.map +1 -1
- package/es/utils/autorest.mjs +6 -8
- package/es/utils/autorest.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/errors.d.ts +2 -2
- package/es/utils/errors.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/typed-data.d.ts +45 -0
- package/es/utils/typed-data.mjs +71 -0
- package/es/utils/typed-data.mjs.map +1 -0
- package/package.json +23 -4
- package/src/AeSdkBase.ts +30 -5
- package/src/AeSdkMethods.ts +31 -50
- package/src/AeSdkWallet.ts +27 -5
- package/src/Middleware.ts +141 -0
- package/src/MiddlewareSubscriber.ts +207 -0
- package/src/Node.ts +1 -1
- package/src/account/Base.ts +20 -3
- package/src/account/Generalized.ts +5 -0
- package/src/account/Ledger.ts +5 -0
- package/src/account/Memory.ts +15 -0
- package/src/account/Rpc.ts +19 -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 +11 -0
- package/src/aepp-wallet-communication/schema.ts +2 -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 +3 -2
- package/src/channel/Base.ts +5 -5
- package/src/channel/internal.ts +2 -0
- package/src/contract/Contract.ts +1 -0
- 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/deprecated.ts +23 -0
- package/src/index-browser.ts +77 -15
- 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/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 +11 -3
- package/types-legacy/ts4.2/AeSdkMethods.d.ts +9 -14
- 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 +14 -2
- package/types-legacy/ts4.2/account/Generalized.d.ts +1 -0
- package/types-legacy/ts4.2/account/Ledger.d.ts +1 -0
- package/types-legacy/ts4.2/account/Memory.d.ts +2 -0
- package/types-legacy/ts4.2/account/Rpc.d.ts +1 -6
- package/types-legacy/ts4.2/aens.d.ts +1 -1
- package/types-legacy/ts4.2/aepp-wallet-communication/rpc/types.d.ts +10 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/schema.d.ts +1 -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/deprecated.d.ts +14 -0
- package/types-legacy/ts4.2/index-browser.d.ts +20 -14
- 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 +2 -2
- 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 +11 -3
- package/types-legacy/ts4.5/AeSdkMethods.d.ts +9 -14
- 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 +14 -2
- package/types-legacy/ts4.5/account/Generalized.d.ts +1 -0
- package/types-legacy/ts4.5/account/Ledger.d.ts +1 -0
- package/types-legacy/ts4.5/account/Memory.d.ts +2 -0
- package/types-legacy/ts4.5/account/Rpc.d.ts +1 -6
- package/types-legacy/ts4.5/aens.d.ts +1 -1
- package/types-legacy/ts4.5/aepp-wallet-communication/rpc/types.d.ts +10 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/schema.d.ts +1 -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/deprecated.d.ts +14 -0
- package/types-legacy/ts4.5/index-browser.d.ts +20 -14
- 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 +2 -2
- 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
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as coreClient from "@azure/core-client";
|
|
2
|
+
export declare const Paths1I5J7OcV2AccountsIdActivitiesGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
3
|
+
export declare const Activity: coreClient.CompositeMapper;
|
|
4
|
+
export declare const PaginatedResponse: coreClient.CompositeMapper;
|
|
5
|
+
export declare const ErrorResponse: coreClient.CompositeMapper;
|
|
6
|
+
export declare const Paths17FlgdkV2Aex141GetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
7
|
+
export declare const Aex141Response: coreClient.CompositeMapper;
|
|
8
|
+
export declare const PathsAxw0PwV2Aex141OwnedNftsAccountidGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
9
|
+
export declare const Aex141OwnedTokenResponse: coreClient.CompositeMapper;
|
|
10
|
+
export declare const PathsN3Ru7DV2Aex141ContractidOwnersGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
11
|
+
export declare const PathsRa6Pv6V2Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
12
|
+
export declare const Aex141TemplatesResponse: coreClient.CompositeMapper;
|
|
13
|
+
export declare const Paths19B9O7TV2Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
14
|
+
export declare const Aex141TemplateTokensResponse: coreClient.CompositeMapper;
|
|
15
|
+
export declare const Paths1Fe570RV2Aex9GetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
16
|
+
export declare const Aex9Response: coreClient.CompositeMapper;
|
|
17
|
+
export declare const PathsO9MbpkV2Aex9AccountBalancesAccountIdGetResponses200ContentApplicationJsonSchemaAllof1: coreClient.CompositeMapper;
|
|
18
|
+
export declare const Aex9BalanceResponse: coreClient.CompositeMapper;
|
|
19
|
+
export declare const PathsY2JwfkV2Aex9TransfersFromToSenderRecipientGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
20
|
+
export declare const Aex9TransferResponse: coreClient.CompositeMapper;
|
|
21
|
+
export declare const Paths5U7W2V2Aex9TransfersFromIdGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
22
|
+
export declare const Paths12TleqhV2Aex9TransfersToIdGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
23
|
+
export declare const Paths1C2B0UpV2Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
24
|
+
export declare const Aex9ContractBalanceResponse: coreClient.CompositeMapper;
|
|
25
|
+
export declare const PathsBelvp6V2Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
26
|
+
export declare const Paths11X7LpcV2Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
27
|
+
export declare const Paths5LeqfqV2BlocksGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
28
|
+
export declare const Block: coreClient.CompositeMapper;
|
|
29
|
+
export declare const NotFoundResponse: coreClient.CompositeMapper;
|
|
30
|
+
export declare const PathsC25EgV2ChannelsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
31
|
+
export declare const Channel: coreClient.CompositeMapper;
|
|
32
|
+
export declare const Paths1Csrt0IV2ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
33
|
+
export declare const ContractCall: coreClient.CompositeMapper;
|
|
34
|
+
export declare const Paths9Ya94MV2ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
35
|
+
export declare const ContractLog: coreClient.CompositeMapper;
|
|
36
|
+
export declare const PathsRzn6HzV2DeltastatsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
37
|
+
export declare const DeltaStat: coreClient.CompositeMapper;
|
|
38
|
+
export declare const Paths10TrrshV2KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
39
|
+
export declare const KeyBlock: coreClient.CompositeMapper;
|
|
40
|
+
export declare const Paths7Hfka2V2KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
41
|
+
export declare const MicroBlock: coreClient.CompositeMapper;
|
|
42
|
+
export declare const Paths1RxrrvbV2MicroBlocksHashTxsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
43
|
+
export declare const Tx: coreClient.CompositeMapper;
|
|
44
|
+
export declare const Paths16Srg6EV2NamesGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
45
|
+
export declare const Name: coreClient.CompositeMapper;
|
|
46
|
+
export declare const NameInfo: coreClient.CompositeMapper;
|
|
47
|
+
export declare const NameInfoOwnership: coreClient.CompositeMapper;
|
|
48
|
+
export declare const NameInfoPointers: coreClient.CompositeMapper;
|
|
49
|
+
export declare const Auction: coreClient.CompositeMapper;
|
|
50
|
+
export declare const AuctionInfo: coreClient.CompositeMapper;
|
|
51
|
+
export declare const AuctionInfoLastBid: coreClient.CompositeMapper;
|
|
52
|
+
export declare const Paths1I6PwfdV2NamesSearchGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
53
|
+
export declare const Paths7P6Qc1V2NamesSearchGetResponses200ContentApplicationJsonSchemaAllof0PropertiesDataItemsAllof1: coreClient.CompositeMapper;
|
|
54
|
+
export declare const NameClaim: coreClient.CompositeMapper;
|
|
55
|
+
export declare const PathsDjelzuV2NamesIdPointeesGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
56
|
+
export declare const NameTransfer: coreClient.CompositeMapper;
|
|
57
|
+
export declare const NameUpdate: coreClient.CompositeMapper;
|
|
58
|
+
export declare const Oracle: coreClient.CompositeMapper;
|
|
59
|
+
export declare const OracleExtendsItem: coreClient.CompositeMapper;
|
|
60
|
+
export declare const PathsMherz6V2OraclesGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
61
|
+
export declare const Status: coreClient.CompositeMapper;
|
|
62
|
+
export declare const StatusMdwAsyncTasks: coreClient.CompositeMapper;
|
|
63
|
+
export declare const PathsDpxn99V2TotalstatsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
64
|
+
export declare const TotalStat: coreClient.CompositeMapper;
|
|
65
|
+
export declare const Paths17Cjtx5V2TransfersGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
66
|
+
export declare const Transfer: coreClient.CompositeMapper;
|
|
67
|
+
export declare const Paths1R74KpvV2TxsGetResponses200ContentApplicationJsonSchemaAllof0: coreClient.CompositeMapper;
|
|
68
|
+
export declare const Paths16Tt677V2TxsCountIdGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
69
|
+
export declare const Aex141TransferEvent: coreClient.CompositeMapper;
|
|
70
|
+
export declare const Aex9TransferEvent: coreClient.CompositeMapper;
|
|
71
|
+
export declare const InternalContractCallEvent: coreClient.CompositeMapper;
|
|
72
|
+
export declare const InternalTransferEvent: coreClient.CompositeMapper;
|
|
73
|
+
export declare const NameClaimEvent: coreClient.CompositeMapper;
|
|
74
|
+
export declare const PathsKlr2M2V2AccountsIdActivitiesGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
75
|
+
export declare const PathsFlc7UjV2Aex141GetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
76
|
+
export declare const PathsSs61ZgV2Aex141OwnedNftsAccountidGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
77
|
+
export declare const Paths1Ilysy5V2Aex141ContractidOwnersGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
78
|
+
export declare const Paths17O9Fn6V2Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
79
|
+
export declare const PathsNuoourV2Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
80
|
+
export declare const Paths1Wbogg8V2Aex9GetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
81
|
+
export declare const Paths1BsirxgV2Aex9AccountBalancesAccountIdGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
82
|
+
export declare const Paths1V0FiznV2Aex9TransfersFromToSenderRecipientGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
83
|
+
export declare const Paths1X48QgjV2Aex9TransfersFromIdGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
84
|
+
export declare const Paths1DkkopqV2Aex9TransfersToIdGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
85
|
+
export declare const PathsNi359V2Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
86
|
+
export declare const Paths15Ih6XV2BlocksGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
87
|
+
export declare const Paths1Txl2A9V2ChannelsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
88
|
+
export declare const Paths187U0XzV2ContractsCallsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
89
|
+
export declare const PathsB246H1V2ContractsLogsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
90
|
+
export declare const Paths7Pbec0V2DeltastatsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
91
|
+
export declare const Paths1Ulxr59V2KeyBlocksGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
92
|
+
export declare const PathsO99PhzV2KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
93
|
+
export declare const PathsGuqvhdV2MicroBlocksHashTxsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
94
|
+
export declare const PathsK9TkttV2NamesGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
95
|
+
export declare const Paths3Msq0DV2NamesSearchGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
96
|
+
export declare const PathsB0YvynV2OraclesGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
97
|
+
export declare const Paths15PsutbV2TotalstatsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
98
|
+
export declare const PathsIgs9Z1V2TransfersGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
99
|
+
export declare const PathsFclv4TV2TxsGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
100
|
+
export declare const Paths1R02SlwV2Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
101
|
+
export declare const Paths1T9RwnyV2Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema: coreClient.CompositeMapper;
|
|
102
|
+
export declare const Get200ApplicationJsonAllOfPropertiesItemsItem: coreClient.CompositeMapper;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { OperationParameter, OperationURLParameter, OperationQueryParameter } from "@azure/core-client";
|
|
2
|
+
export declare const accept: OperationParameter;
|
|
3
|
+
export declare const $host: OperationURLParameter;
|
|
4
|
+
export declare const id: OperationURLParameter;
|
|
5
|
+
export declare const ownedOnly: OperationQueryParameter;
|
|
6
|
+
export declare const type: OperationQueryParameter;
|
|
7
|
+
export declare const limit: OperationQueryParameter;
|
|
8
|
+
export declare const scope: OperationQueryParameter;
|
|
9
|
+
export declare const direction: OperationQueryParameter;
|
|
10
|
+
export declare const by: OperationQueryParameter;
|
|
11
|
+
export declare const prefix: OperationQueryParameter;
|
|
12
|
+
export declare const accountId: OperationURLParameter;
|
|
13
|
+
export declare const contractId: OperationURLParameter;
|
|
14
|
+
export declare const tokenId: OperationURLParameter;
|
|
15
|
+
export declare const templateId: OperationURLParameter;
|
|
16
|
+
export declare const accountId1: OperationURLParameter;
|
|
17
|
+
export declare const sender: OperationURLParameter;
|
|
18
|
+
export declare const recipient: OperationURLParameter;
|
|
19
|
+
export declare const hash: OperationQueryParameter;
|
|
20
|
+
export declare const hashOrKbi: OperationURLParameter;
|
|
21
|
+
export declare const kbi: OperationURLParameter;
|
|
22
|
+
export declare const mbi: OperationURLParameter;
|
|
23
|
+
export declare const state: OperationQueryParameter;
|
|
24
|
+
export declare const contractId1: OperationQueryParameter;
|
|
25
|
+
export declare const event: OperationQueryParameter;
|
|
26
|
+
export declare const functionPrefix: OperationQueryParameter;
|
|
27
|
+
export declare const data: OperationQueryParameter;
|
|
28
|
+
export declare const aexnArgs: OperationQueryParameter;
|
|
29
|
+
export declare const hash1: OperationURLParameter;
|
|
30
|
+
export declare const ownedBy: OperationQueryParameter;
|
|
31
|
+
export declare const state1: OperationQueryParameter;
|
|
32
|
+
export declare const type1: OperationQueryParameter;
|
|
33
|
+
export declare const typeGroup: OperationQueryParameter;
|
|
34
|
+
export declare const account: OperationQueryParameter;
|
|
35
|
+
export declare const contract: OperationQueryParameter;
|
|
36
|
+
export declare const channel: OperationQueryParameter;
|
|
37
|
+
export declare const oracle: OperationQueryParameter;
|
|
38
|
+
export declare const senderId: OperationQueryParameter;
|
|
39
|
+
export declare const recipientId: OperationQueryParameter;
|
|
40
|
+
export declare const entrypoint: OperationQueryParameter;
|
|
41
|
+
export declare const txType: OperationQueryParameter;
|
|
42
|
+
export declare const id1: OperationQueryParameter;
|
|
43
|
+
export declare const hashOrIndex: OperationURLParameter;
|
|
@@ -9,7 +9,8 @@ import AccountBase from './account/Base';
|
|
|
9
9
|
/**
|
|
10
10
|
* @category chain
|
|
11
11
|
*/
|
|
12
|
-
export declare function _getPollInterval(type: 'block' | 'microblock',
|
|
12
|
+
export declare function _getPollInterval(type: 'block' | 'microblock', // TODO: rename to 'key-block' | 'micro-block'
|
|
13
|
+
{ _expectedMineRate, _microBlockCycle, _maxPollInterval }: {
|
|
13
14
|
_expectedMineRate?: number;
|
|
14
15
|
_microBlockCycle?: number;
|
|
15
16
|
_maxPollInterval?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import
|
|
2
|
+
import EventEmitter from 'events';
|
|
3
3
|
import { w3cwebsocket as W3CWebSocket } from 'websocket';
|
|
4
4
|
import { Tag } from '../tx/builder/constants';
|
|
5
5
|
import { SignTx, ChannelOptions, ChannelState, ChannelHandler, ChannelAction, ChannelStatus, ChannelFsm, ChannelMessage, ChannelEvents } from './internal';
|
|
@@ -47,6 +47,27 @@ export default abstract class CompilerBase {
|
|
|
47
47
|
bytecode: Encoded.ContractBytearray;
|
|
48
48
|
aci: Aci;
|
|
49
49
|
}>;
|
|
50
|
+
/**
|
|
51
|
+
* Generate contract's ACI by contract's path
|
|
52
|
+
* Available only in Node.js
|
|
53
|
+
* @param path - Path to contract source code
|
|
54
|
+
* @returns ACI
|
|
55
|
+
*/
|
|
56
|
+
abstract generateAci(path: string): Promise<Aci>;
|
|
57
|
+
/**
|
|
58
|
+
* Generate contract's ACI by contract's source code
|
|
59
|
+
* @param sourceCode - Contract source code as string
|
|
60
|
+
* @param fileSystem - A map of contract filename to the corresponding contract source code to
|
|
61
|
+
* include into the main contract
|
|
62
|
+
* @example
|
|
63
|
+
* ```js
|
|
64
|
+
* {
|
|
65
|
+
* 'library.aes': 'namespace TestLib =\n function sum(x: int, y: int) : int = x + y'
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
* @returns ACI
|
|
69
|
+
*/
|
|
70
|
+
abstract generateAciBySourceCode(sourceCode: string, fileSystem?: Record<string, string>): Promise<Aci>;
|
|
50
71
|
/**
|
|
51
72
|
* Verify that a contract bytecode is the result of compiling the given source code
|
|
52
73
|
* Available only in Node.js
|
|
@@ -17,6 +17,8 @@ export default class CompilerCli extends CompilerBase {
|
|
|
17
17
|
bytecode: Encoded.ContractBytearray;
|
|
18
18
|
aci: Aci;
|
|
19
19
|
}>;
|
|
20
|
+
generateAci(path: string): Promise<Aci>;
|
|
21
|
+
generateAciBySourceCode(sourceCode: string, fileSystem?: Record<string, string>): Promise<Aci>;
|
|
20
22
|
validate(bytecode: Encoded.ContractBytearray, path: string): Promise<boolean>;
|
|
21
23
|
validateBySourceCode(bytecode: Encoded.ContractBytearray, sourceCode: string, fileSystem?: Record<string, string>): Promise<boolean>;
|
|
22
24
|
version(): Promise<string>;
|
|
@@ -26,6 +26,8 @@ export default class CompilerHttp extends CompilerBase {
|
|
|
26
26
|
bytecode: Encoded.ContractBytearray;
|
|
27
27
|
aci: Aci;
|
|
28
28
|
}>;
|
|
29
|
+
generateAciBySourceCode(sourceCode: string, fileSystem?: Record<string, string>): Promise<Aci>;
|
|
30
|
+
generateAci(path: string): Promise<Aci>;
|
|
29
31
|
validateBySourceCode(bytecode: Encoded.ContractBytearray, sourceCode: string, fileSystem?: Record<string, string>): Promise<boolean>;
|
|
30
32
|
validate(bytecode: Encoded.ContractBytearray, path: string): Promise<boolean>;
|
|
31
33
|
version(): Promise<string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RpcError } from './aepp-wallet-communication/schema';
|
|
2
|
+
/**
|
|
3
|
+
* @category exception
|
|
4
|
+
* @deprecated this exception is not thrown anymore
|
|
5
|
+
*/
|
|
6
|
+
export declare class RpcBroadcastError extends RpcError {
|
|
7
|
+
static code: number;
|
|
8
|
+
code: number;
|
|
9
|
+
constructor(data?: any);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated use isAuctionName instead
|
|
13
|
+
*/
|
|
14
|
+
export declare const NAME_BID_MAX_LENGTH = 12;
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export { _getPollInterval, InvalidTxError, getHeight, poll, awaitHeight, waitForTxConfirm, sendTransaction, getAccount, getBalance, getCurrentGeneration, getGeneration, getMicroBlockTransactions, getKeyBlock, getMicroBlockHeader, txDryRun, getContractByteCode, getContract, getName, resolveName, } from './chain';
|
|
2
|
+
export { getAddressFromPriv, isAddressValid, genSalt, encodeUnsigned, hash, encodeContractAddress, generateKeyPairFromSecret, generateKeyPair, sign, verify, messageToHash, signMessage, verifyMessage, isValidKeypair, } from './utils/crypto';
|
|
3
|
+
export { recover, dump } from './utils/keystore';
|
|
4
|
+
export type { Keystore } from './utils/keystore';
|
|
5
|
+
export { toBytes } from './utils/bytes';
|
|
5
6
|
export { buildTx, buildTxAsync, buildTxHash, unpackTx, buildContractIdByContractTx, } from './tx/builder';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
7
|
+
export { buildContractId, oracleQueryId, produceNameId, commitmentHash, readInt, isNameValid, ensureName, getDefaultPointerKey, getMinimumNameFee, computeBidFee, computeAuctionEndBlock, isAuctionName, } from './tx/builder/helpers';
|
|
8
|
+
export { MAX_AUTH_FUN_GAS, NAME_TTL, NAME_MAX_TTL, NAME_MAX_CLIENT_TTL, CLIENT_TTL, MIN_GAS_PRICE, NAME_FEE_MULTIPLIER, NAME_FEE_BID_INCREMENT, NAME_BID_TIMEOUT_BLOCKS, NAME_MAX_LENGTH_FEE, NAME_BID_RANGES, ConsensusProtocolVersion, VmVersion, AbiVersion, Tag, } from './tx/builder/constants';
|
|
9
|
+
export type { Int, AensName } from './tx/builder/constants';
|
|
8
10
|
export { ORACLE_TTL_TYPES, ORACLE_TTL, QUERY_TTL, RESPONSE_TTL, DRY_RUN_ACCOUNT, CallReturnType, } from './tx/builder/schema';
|
|
9
11
|
export { getExecutionCost, getExecutionCostBySignedTx, getExecutionCostUsingNode, } from './tx/execution-cost';
|
|
10
12
|
export { default as getTransactionSignerAddress } from './tx/transaction-signer';
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
+
export { AE_AMOUNT_FORMATS, formatAmount, toAe, toAettos, prefixedAmount, } from './utils/amount-formatter';
|
|
14
|
+
export { DerivationError, deriveChild, derivePathFromKey, getMasterKeyFromSeed, derivePathFromSeed, getKeyPair, generateSaveHDWalletFromSeed, getSaveHDWalletAccounts, getHdWalletAccountFromSeed, } from './utils/hd-wallet';
|
|
13
15
|
export { encode, decode, Encoding, Encoded, } from './utils/encoder';
|
|
14
|
-
export
|
|
16
|
+
export { encodeFateValue, decodeFateValue, hashTypedData, hashDomain, hashJson, } from './utils/typed-data';
|
|
17
|
+
export { aensRevoke, aensUpdate, aensTransfer, aensQuery, aensClaim, aensPreclaim, aensBid, } from './aens';
|
|
15
18
|
export { default as Contract } from './contract/Contract';
|
|
16
19
|
export type { ContractMethodsBase } from './contract/Contract';
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
+
export { pollForQueries, pollForQueryResponse, getQueryObject, postQueryToOracle, extendOracleTtl, respondToQuery, getOracleObject, registerOracle, } from './oracle';
|
|
21
|
+
export { spend, transferFunds, payForTransaction } from './spend';
|
|
22
|
+
export { createGeneralizedAccount, buildAuthTxHash, buildAuthTxHashByGaMetaTx } from './contract/ga';
|
|
20
23
|
export { default as AeSdkMethods } from './AeSdkMethods';
|
|
21
24
|
export { default as AeSdkBase } from './AeSdkBase';
|
|
22
25
|
export { default as AeSdk } from './AeSdk';
|
|
@@ -32,9 +35,12 @@ export { default as AccountLedgerFactory } from './account/LedgerFactory';
|
|
|
32
35
|
export { default as CompilerBase } from './contract/compiler/Base';
|
|
33
36
|
export { default as CompilerHttp } from './contract/compiler/Http';
|
|
34
37
|
export { default as Channel } from './channel/Contract';
|
|
38
|
+
export { default as _MiddlewareSubscriber, MiddlewareSubscriberError as _MiddlewareSubscriberError, MiddlewareSubscriberDisconnected as _MiddlewareSubscriberDisconnected, } from './MiddlewareSubscriber';
|
|
39
|
+
export { default as _Middleware } from './Middleware';
|
|
35
40
|
export { default as connectionProxy } from './aepp-wallet-communication/connection-proxy';
|
|
36
|
-
export
|
|
41
|
+
export { MESSAGE_DIRECTION, WALLET_TYPE, SUBSCRIPTION_TYPES, METHODS, RPC_STATUS, RpcError, RpcInvalidTransactionError, RpcRejectedByUserError, RpcUnsupportedProtocolError, RpcConnectionDenyError, RpcNotAuthorizeError, RpcPermissionDenyError, RpcInternalError, RpcMethodNotFoundError, } from './aepp-wallet-communication/schema';
|
|
37
42
|
export { default as walletDetector } from './aepp-wallet-communication/wallet-detector';
|
|
38
43
|
export { default as BrowserRuntimeConnection } from './aepp-wallet-communication/connection/BrowserRuntime';
|
|
39
44
|
export { default as BrowserWindowMessageConnection } from './aepp-wallet-communication/connection/BrowserWindowMessage';
|
|
40
|
-
export
|
|
45
|
+
export { BaseError, AccountError, AensError, AeppError, ChannelError, CompilerError, ContractError, CryptographyError, NodeError, TransactionError, WalletError, ArgumentError, IllegalArgumentError, ArgumentCountMismatchError, InsufficientBalanceError, MissingParamError, NoSerializerFoundError, RequestTimedOutError, TxTimedOutError, TypeError, UnsupportedPlatformError, UnsupportedProtocolError, NotImplementedError, UnsupportedVersionError, InternalError, UnexpectedTsError, UnavailableAccountError, AensPointerContextError, InsufficientNameFeeError, InvalidAensNameError, InvalidRpcMessageError, MissingCallbackError, UnAuthorizedAccountError, UnknownRpcClientError, UnsubscribedAccountError, ChannelCallError, ChannelConnectionError, ChannelPingTimedOutError, UnexpectedChannelMessageError, ChannelIncomingMessageError, UnknownChannelStateError, InvalidAuthDataError, BytecodeMismatchError, DuplicateContractError, InactiveContractError, InvalidMethodInvocationError, MissingContractAddressError, MissingContractDefError, MissingFunctionNameError, NodeInvocationError, NoSuchContractFunctionError, NotPayableFunctionError, MissingEventDefinitionError, AmbiguousEventDefinitionError, InvalidChecksumError, InvalidPasswordError, MerkleTreeHashMismatchError, MissingNodeInTreeError, UnknownNodeLengthError, UnknownPathNibbleError, DuplicateNodeError, NodeNotFoundError, DecodeError, PayloadLengthError, DryRunError, IllegalBidFeeError, InvalidSignatureError, PrefixNotFoundError, SchemaNotFoundError, TagNotFoundError, TxNotInChainError, AlreadyConnectedError, NoWalletConnectedError, RpcConnectionError, } from './utils/errors';
|
|
46
|
+
export { RpcBroadcastError, NAME_BID_MAX_LENGTH } from './deprecated';
|
|
@@ -11,7 +11,6 @@ export declare const NAME_FEE_MULTIPLIER = 100000000000000;
|
|
|
11
11
|
export declare const NAME_FEE_BID_INCREMENT = 0.05;
|
|
12
12
|
export declare const NAME_BID_TIMEOUT_BLOCKS = 480;
|
|
13
13
|
export declare const NAME_MAX_LENGTH_FEE = 31;
|
|
14
|
-
export declare const NAME_BID_MAX_LENGTH = 12;
|
|
15
14
|
export declare const NAME_BID_RANGES: {
|
|
16
15
|
[k: string]: BigNumber;
|
|
17
16
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Int } from '../constants';
|
|
3
3
|
import { AE_AMOUNT_FORMATS } from '../../../utils/amount-formatter';
|
|
4
4
|
declare const _default: {
|
|
5
|
-
serializeAettos(value: string | undefined): string;
|
|
5
|
+
serializeAettos(value: string | undefined, params: {}): string;
|
|
6
6
|
serialize(value: Int | undefined, params: {}, { denomination }: {
|
|
7
7
|
denomination?: AE_AMOUNT_FORMATS | undefined;
|
|
8
8
|
}): Buffer;
|
|
@@ -9,7 +9,7 @@ declare const _default: {
|
|
|
9
9
|
* @returns Deposit value Buffer.
|
|
10
10
|
*/
|
|
11
11
|
serialize(value: Int | undefined, options: Parameters<(typeof coinAmount)['serialize']>[1], parameters: Parameters<(typeof coinAmount)['serialize']>[2]): Buffer;
|
|
12
|
-
serializeAettos(value: string | undefined): string;
|
|
12
|
+
serializeAettos(value: string | undefined, params: {}): string;
|
|
13
13
|
deserialize(value: Buffer): string;
|
|
14
14
|
};
|
|
15
15
|
export default _default;
|
|
@@ -31,7 +31,7 @@ declare const boolean: {
|
|
|
31
31
|
deserialize(buffer: Buffer): boolean;
|
|
32
32
|
};
|
|
33
33
|
declare const coinAmount: {
|
|
34
|
-
serializeAettos(value: string | undefined): string;
|
|
34
|
+
serializeAettos(value: string | undefined, params: {}): string;
|
|
35
35
|
serialize(value: import("../constants").Int | undefined, params: {}, { denomination }: {
|
|
36
36
|
denomination?: import("../../..").AE_AMOUNT_FORMATS | undefined;
|
|
37
37
|
}): Buffer;
|
|
@@ -51,7 +51,7 @@ declare const deposit: {
|
|
|
51
51
|
serialize(value: import("../constants").Int | undefined, options: {}, parameters: {
|
|
52
52
|
denomination?: import("../../..").AE_AMOUNT_FORMATS | undefined;
|
|
53
53
|
}): Buffer;
|
|
54
|
-
serializeAettos(value: string | undefined): string;
|
|
54
|
+
serializeAettos(value: string | undefined, params: {}): string;
|
|
55
55
|
deserialize(value: Buffer): string;
|
|
56
56
|
};
|
|
57
57
|
declare const encoded: typeof _encoded;
|
|
@@ -22,6 +22,7 @@ export declare function buildContractId(ownerId: Encoded.AccountAddress, nonce:
|
|
|
22
22
|
* @returns Contract public key
|
|
23
23
|
*/
|
|
24
24
|
export declare function oracleQueryId(senderId: Encoded.AccountAddress, nonce: number | BigNumber | string, oracleId: Encoded.OracleAddress): Encoded.OracleQueryId;
|
|
25
|
+
export declare function nameToPunycode(maybeName: string): AensName;
|
|
25
26
|
/**
|
|
26
27
|
* Encode an AENS name
|
|
27
28
|
* @category AENS
|
|
@@ -45,12 +46,18 @@ export declare function commitmentHash(name: AensName, salt?: number): Encoded.C
|
|
|
45
46
|
* @returns Buffer Buffer from number(BigEndian)
|
|
46
47
|
*/
|
|
47
48
|
export declare function readInt(buf?: Buffer): string;
|
|
49
|
+
/**
|
|
50
|
+
* Ensure that name is valid AENS name, would throw an exception otherwise
|
|
51
|
+
* @category AENS
|
|
52
|
+
* @param name - AENS name
|
|
53
|
+
*/
|
|
54
|
+
export declare function ensureName(maybeName: string): asserts maybeName is AensName;
|
|
48
55
|
/**
|
|
49
56
|
* Is AENS name valid
|
|
50
57
|
* @category AENS
|
|
51
58
|
* @param name - AENS name
|
|
52
59
|
*/
|
|
53
|
-
export declare function isNameValid(
|
|
60
|
+
export declare function isNameValid(maybeName: string): maybeName is AensName;
|
|
54
61
|
declare const encodingToPointerKey: readonly [
|
|
55
62
|
readonly [
|
|
56
63
|
Encoded.Encoding.AccountAddress,
|
|
@@ -9,6 +9,7 @@ export declare function getSchema(tag: Tag, version?: number): Array<[
|
|
|
9
9
|
string,
|
|
10
10
|
Field
|
|
11
11
|
]>;
|
|
12
|
+
type TxEncoding = Encoding.Transaction | Encoding.Poi | Encoding.StateTrees | Encoding.CallStateTree;
|
|
12
13
|
/**
|
|
13
14
|
* Build transaction hash
|
|
14
15
|
* @category transaction builder
|
|
@@ -17,7 +18,7 @@ export declare function getSchema(tag: Tag, version?: number): Array<[
|
|
|
17
18
|
* @param options.prefix - Prefix of transaction
|
|
18
19
|
* @returns object Base64Check transaction hash with 'tx_' prefix
|
|
19
20
|
*/
|
|
20
|
-
export declare function buildTx<E extends
|
|
21
|
+
export declare function buildTx<E extends TxEncoding = Encoding.Transaction>(params: TxParams, { prefix }?: {
|
|
21
22
|
prefix?: E;
|
|
22
23
|
}): Encoded.Generic<E>;
|
|
23
24
|
export type BuildTxOptions<TxType extends Tag, OmitFields extends string> = Omit<TxParamsAsync & {
|
|
@@ -34,7 +35,7 @@ export declare function buildTxAsync(params: TxParamsAsync): Promise<Encoded.Tra
|
|
|
34
35
|
* @param txType - Expected transaction type
|
|
35
36
|
* @returns Object with transaction param's
|
|
36
37
|
*/
|
|
37
|
-
export declare function unpackTx<TxType extends Tag>(encodedTx: Encoded.
|
|
38
|
+
export declare function unpackTx<TxType extends Tag>(encodedTx: Encoded.Generic<TxEncoding>, txType?: TxType): TxUnpacked & {
|
|
38
39
|
tag: TxType;
|
|
39
40
|
};
|
|
40
41
|
/**
|
|
@@ -51,3 +52,4 @@ export declare function buildTxHash(rawTx: Encoded.Transaction | Uint8Array): En
|
|
|
51
52
|
* @returns Contract public key
|
|
52
53
|
*/
|
|
53
54
|
export declare function buildContractIdByContractTx(contractTx: Encoded.Transaction): Encoded.ContractAddress;
|
|
55
|
+
export {};
|
|
@@ -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;
|
|
@@ -2,7 +2,7 @@ import Node from './Node';
|
|
|
2
2
|
import AccountBase from './account/Base';
|
|
3
3
|
import { Encoded } from './utils/encoder';
|
|
4
4
|
import CompilerBase from './contract/compiler/Base';
|
|
5
|
-
import AeSdkMethods, { OnAccount } from './AeSdkMethods';
|
|
5
|
+
import AeSdkMethods, { OnAccount, AeSdkMethodsOptions } from './AeSdkMethods';
|
|
6
6
|
type NodeInfo = Awaited<ReturnType<Node['getNodeInfo']>> & {
|
|
7
7
|
name: string;
|
|
8
8
|
};
|
|
@@ -19,7 +19,7 @@ export default class AeSdkBase extends AeSdkMethods {
|
|
|
19
19
|
* @param options - Options
|
|
20
20
|
* @param options.nodes - Array of nodes
|
|
21
21
|
*/
|
|
22
|
-
constructor({ nodes, ...options }?:
|
|
22
|
+
constructor({ nodes, ...options }?: AeSdkMethodsOptions & {
|
|
23
23
|
nodes?: Array<{
|
|
24
24
|
name: string;
|
|
25
25
|
instance: Node;
|
|
@@ -72,6 +72,11 @@ export default class AeSdkBase extends AeSdkMethods {
|
|
|
72
72
|
*/
|
|
73
73
|
getNodesInPool(): Promise<NodeInfo[]>;
|
|
74
74
|
addresses(): Encoded.AccountAddress[];
|
|
75
|
+
/**
|
|
76
|
+
* Resolves an account
|
|
77
|
+
* @param account - ak-address, instance of AccountBase, or keypair
|
|
78
|
+
*/
|
|
79
|
+
_resolveAccount(account?: OnAccount): AccountBase;
|
|
75
80
|
get address(): Encoded.AccountAddress;
|
|
76
81
|
sign(data: string | Uint8Array, { onAccount, ...options }?: {
|
|
77
82
|
onAccount?: OnAccount;
|
|
@@ -82,7 +87,10 @@ export default class AeSdkBase extends AeSdkMethods {
|
|
|
82
87
|
signMessage(message: string, { onAccount, ...options }?: {
|
|
83
88
|
onAccount?: OnAccount;
|
|
84
89
|
} & Parameters<AccountBase['signMessage']>[1]): Promise<Uint8Array>;
|
|
85
|
-
|
|
90
|
+
signTypedData(data: Encoded.ContractBytearray, aci: Parameters<AccountBase['signTypedData']>[1], { onAccount, ...options }?: {
|
|
91
|
+
onAccount?: OnAccount;
|
|
92
|
+
} & Parameters<AccountBase['signTypedData']>[2]): Promise<Encoded.Signature>;
|
|
93
|
+
_getOptions(callOptions?: AeSdkMethodsOptions): {
|
|
86
94
|
onNode: Node;
|
|
87
95
|
onAccount: AccountBase;
|
|
88
96
|
onCompiler: CompilerBase;
|