@aeternity/aepp-sdk 13.2.1 → 13.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/bin/aesophia_cli +0 -0
- package/bin/aesophia_cli_8 +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 +7288 -9464
- package/dist/aepp-sdk.js.map +1 -1
- package/es/AeSdk.d.ts +3 -0
- package/es/AeSdk.mjs +12 -12
- package/es/AeSdk.mjs.map +1 -1
- package/es/AeSdkAepp.d.ts +0 -1
- package/es/AeSdkAepp.mjs +12 -16
- package/es/AeSdkAepp.mjs.map +1 -1
- package/es/AeSdkBase.d.ts +61 -6
- package/es/AeSdkBase.mjs +150 -69
- package/es/AeSdkBase.mjs.map +1 -1
- package/es/AeSdkMethods.d.ts +19 -7
- package/es/AeSdkMethods.mjs +39 -38
- package/es/AeSdkMethods.mjs.map +1 -1
- package/es/AeSdkWallet.mjs +86 -55
- package/es/AeSdkWallet.mjs.map +1 -1
- package/es/Middleware.d.ts +1 -1
- package/es/Middleware.mjs +32 -28
- package/es/Middleware.mjs.map +1 -1
- package/es/MiddlewareSubscriber.mjs +5 -14
- package/es/MiddlewareSubscriber.mjs.map +1 -1
- package/es/Node.d.ts +11 -3
- package/es/Node.mjs +65 -57
- package/es/Node.mjs.map +1 -1
- package/es/account/Base.d.ts +39 -3
- package/es/account/Base.mjs +35 -1
- package/es/account/Base.mjs.map +1 -1
- package/es/account/Generalized.d.ts +2 -0
- package/es/account/Generalized.mjs +15 -6
- package/es/account/Generalized.mjs.map +1 -1
- package/es/account/Ledger.d.ts +2 -0
- package/es/account/Ledger.mjs +14 -5
- package/es/account/Ledger.mjs.map +1 -1
- package/es/account/LedgerFactory.mjs +4 -6
- package/es/account/LedgerFactory.mjs.map +1 -1
- package/es/account/Memory.d.ts +15 -4
- package/es/account/Memory.mjs +96 -31
- package/es/account/Memory.mjs.map +1 -1
- package/es/account/Rpc.d.ts +16 -5
- package/es/account/Rpc.mjs +94 -21
- package/es/account/Rpc.mjs.map +1 -1
- package/es/aens.d.ts +17 -44
- package/es/aens.mjs +32 -71
- package/es/aens.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection/Browser.mjs +3 -4
- package/es/aepp-wallet-communication/connection/Browser.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection/BrowserRuntime.d.ts +3 -0
- package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs +7 -5
- package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs +8 -9
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs.map +1 -1
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs +7 -7
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs.map +1 -1
- package/es/aepp-wallet-communication/rpc/types.d.ts +14 -0
- package/es/aepp-wallet-communication/rpc/types.mjs.map +1 -1
- package/es/aepp-wallet-communication/schema.d.ts +2 -0
- package/es/aepp-wallet-communication/schema.mjs +2 -0
- package/es/aepp-wallet-communication/schema.mjs.map +1 -1
- package/es/aepp-wallet-communication/wallet-detector.d.ts +2 -5
- package/es/aepp-wallet-communication/wallet-detector.mjs +13 -9
- package/es/aepp-wallet-communication/wallet-detector.mjs.map +1 -1
- package/es/apis/compiler/compiler.mjs.map +1 -1
- package/es/apis/compiler/models/index.d.ts +1 -0
- package/es/apis/compiler/models/index.mjs.map +1 -1
- package/es/apis/compiler/models/mappers.mjs +13 -0
- package/es/apis/compiler/models/mappers.mjs.map +1 -1
- package/es/apis/compiler/models/parameters.mjs.map +1 -1
- package/es/apis/middleware/middleware.d.ts +23 -5
- package/es/apis/middleware/middleware.mjs +114 -18
- package/es/apis/middleware/middleware.mjs.map +1 -1
- package/es/apis/middleware/models/index.d.ts +164 -15
- package/es/apis/middleware/models/index.mjs +53 -3
- package/es/apis/middleware/models/index.mjs.map +1 -1
- package/es/apis/middleware/models/mappers.d.ts +8 -1
- package/es/apis/middleware/models/mappers.mjs +376 -3
- package/es/apis/middleware/models/mappers.mjs.map +1 -1
- package/es/apis/middleware/models/parameters.d.ts +6 -3
- package/es/apis/middleware/models/parameters.mjs +38 -11
- package/es/apis/middleware/models/parameters.mjs.map +1 -1
- package/es/apis/node/models/index.d.ts +66 -2
- package/es/apis/node/models/index.mjs.map +1 -1
- package/es/apis/node/models/mappers.d.ts +5 -1
- package/es/apis/node/models/mappers.mjs +229 -7
- package/es/apis/node/models/mappers.mjs.map +1 -1
- package/es/apis/node/models/parameters.d.ts +2 -2
- package/es/apis/node/models/parameters.mjs +2 -2
- package/es/apis/node/models/parameters.mjs.map +1 -1
- package/es/apis/node/node.d.ts +24 -3
- package/es/apis/node/node.mjs +135 -3
- package/es/apis/node/node.mjs.map +1 -1
- package/es/chain.d.ts +14 -44
- package/es/chain.mjs +125 -219
- package/es/chain.mjs.map +1 -1
- package/es/channel/Base.d.ts +3 -47
- package/es/channel/Base.mjs +21 -54
- package/es/channel/Base.mjs.map +1 -1
- package/es/channel/Contract.d.ts +16 -25
- package/es/channel/Contract.mjs +39 -63
- package/es/channel/Contract.mjs.map +1 -1
- package/es/channel/Spend.d.ts +0 -8
- package/es/channel/Spend.mjs +17 -29
- package/es/channel/Spend.mjs.map +1 -1
- package/es/channel/handlers.mjs +1 -1
- package/es/channel/handlers.mjs.map +1 -1
- package/es/channel/internal.d.ts +104 -5
- package/es/channel/internal.mjs +26 -34
- package/es/channel/internal.mjs.map +1 -1
- package/es/contract/Contract.d.ts +10 -2
- package/es/contract/Contract.mjs +83 -79
- package/es/contract/Contract.mjs.map +1 -1
- package/es/contract/compiler/Base.d.ts +14 -8
- package/es/contract/compiler/Base.mjs.map +1 -1
- package/es/contract/compiler/Cli.d.ts +12 -11
- package/es/contract/compiler/Cli.mjs +52 -25
- package/es/contract/compiler/Cli.mjs.map +1 -1
- package/es/contract/compiler/Cli8.d.ts +13 -0
- package/es/contract/compiler/Cli8.mjs +22 -0
- package/es/contract/compiler/Cli8.mjs.map +1 -0
- package/es/contract/compiler/Http.d.ts +3 -9
- package/es/contract/compiler/Http.mjs +28 -16
- package/es/contract/compiler/Http.mjs.map +1 -1
- package/es/contract/compiler/HttpNode.d.ts +2 -5
- package/es/contract/compiler/HttpNode.mjs.map +1 -1
- package/es/contract/delegation-signature.d.ts +2 -1
- package/es/contract/delegation-signature.mjs +18 -14
- package/es/contract/delegation-signature.mjs.map +1 -1
- package/es/contract/ga.d.ts +1 -2
- package/es/contract/ga.mjs +23 -25
- package/es/contract/ga.mjs.map +1 -1
- package/es/deprecated.d.ts +48 -0
- package/es/deprecated.mjs +66 -1
- package/es/deprecated.mjs.map +1 -1
- package/es/index-browser.d.ts +11 -6
- package/es/index-browser.mjs +10 -6
- package/es/index-browser.mjs.map +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.mjs +1 -0
- package/es/index.mjs.map +1 -1
- package/es/oracle.d.ts +6 -37
- package/es/oracle.mjs +32 -66
- package/es/oracle.mjs.map +1 -1
- package/es/send-transaction.d.ts +53 -0
- package/es/send-transaction.mjs +109 -0
- package/es/send-transaction.mjs.map +1 -0
- package/es/spend.d.ts +4 -3
- package/es/spend.mjs +6 -1
- package/es/spend.mjs.map +1 -1
- package/es/tx/builder/common.d.ts +29 -0
- package/es/tx/builder/common.mjs +42 -0
- package/es/tx/builder/common.mjs.map +1 -0
- package/es/tx/builder/constants.d.ts +6 -5
- package/es/tx/builder/constants.mjs +7 -15
- package/es/tx/builder/constants.mjs.map +1 -1
- package/es/tx/builder/delegation/index.d.ts +20 -0
- package/es/tx/builder/delegation/index.mjs +24 -0
- package/es/tx/builder/delegation/index.mjs.map +1 -0
- package/es/tx/builder/delegation/schema.d.ts +130 -0
- package/es/tx/builder/delegation/schema.generated.d.ts +141 -0
- package/es/tx/builder/delegation/schema.generated.mjs +2 -0
- package/es/tx/builder/delegation/schema.generated.mjs.map +1 -0
- package/es/tx/builder/delegation/schema.mjs +54 -0
- package/es/tx/builder/delegation/schema.mjs.map +1 -0
- package/es/tx/builder/field-types/abi-version.mjs +8 -11
- package/es/tx/builder/field-types/abi-version.mjs.map +1 -1
- package/es/tx/builder/field-types/address.mjs +1 -4
- package/es/tx/builder/field-types/address.mjs.map +1 -1
- package/es/tx/builder/field-types/coin-amount.d.ts +2 -2
- package/es/tx/builder/field-types/coin-amount.mjs +6 -6
- package/es/tx/builder/field-types/coin-amount.mjs.map +1 -1
- package/es/tx/builder/field-types/ct-version.d.ts +1 -1
- package/es/tx/builder/field-types/ct-version.mjs +4 -5
- package/es/tx/builder/field-types/ct-version.mjs.map +1 -1
- package/es/tx/builder/field-types/entry.mjs +7 -13
- package/es/tx/builder/field-types/entry.mjs.map +1 -1
- package/es/tx/builder/field-types/fee.d.ts +19 -11
- package/es/tx/builder/field-types/fee.mjs +57 -39
- package/es/tx/builder/field-types/fee.mjs.map +1 -1
- package/es/tx/builder/field-types/gas-limit.mjs +13 -15
- package/es/tx/builder/field-types/gas-limit.mjs.map +1 -1
- package/es/tx/builder/field-types/gas-price.d.ts +10 -2
- package/es/tx/builder/field-types/gas-price.mjs +53 -4
- package/es/tx/builder/field-types/gas-price.mjs.map +1 -1
- package/es/tx/builder/field-types/index.d.ts +31 -29
- package/es/tx/builder/field-types/index.mjs +31 -29
- package/es/tx/builder/field-types/index.mjs.map +1 -1
- package/es/tx/builder/field-types/map.mjs +20 -31
- package/es/tx/builder/field-types/map.mjs.map +1 -1
- package/es/tx/builder/field-types/mptree.mjs +14 -29
- package/es/tx/builder/field-types/mptree.mjs.map +1 -1
- package/es/tx/builder/field-types/name-fee.d.ts +1 -1
- package/es/tx/builder/field-types/name-fee.mjs +1 -1
- package/es/tx/builder/field-types/name-fee.mjs.map +1 -1
- package/es/tx/builder/field-types/nonce.d.ts +1 -0
- package/es/tx/builder/field-types/nonce.mjs +2 -0
- package/es/tx/builder/field-types/nonce.mjs.map +1 -1
- package/es/tx/builder/field-types/pointers.mjs +4 -7
- package/es/tx/builder/field-types/pointers.mjs.map +1 -1
- package/es/tx/builder/field-types/pointers2.d.ts +23 -0
- package/es/tx/builder/field-types/pointers2.mjs +65 -0
- package/es/tx/builder/field-types/pointers2.mjs.map +1 -0
- package/es/tx/builder/field-types/query-fee.d.ts +19 -0
- package/es/tx/builder/field-types/query-fee.mjs +20 -0
- package/es/tx/builder/field-types/query-fee.mjs.map +1 -0
- package/es/tx/builder/field-types/ttl.d.ts +9 -1
- package/es/tx/builder/field-types/ttl.mjs +19 -8
- package/es/tx/builder/field-types/ttl.mjs.map +1 -1
- package/es/tx/builder/field-types/with-default.d.ts +7 -0
- package/es/tx/builder/field-types/with-default.mjs +9 -0
- package/es/tx/builder/field-types/with-default.mjs.map +1 -0
- package/es/tx/builder/field-types/with-formatting.d.ts +7 -0
- package/es/tx/builder/field-types/with-formatting.mjs +9 -0
- package/es/tx/builder/field-types/with-formatting.mjs.map +1 -0
- package/es/tx/builder/field-types/wrapped.mjs +6 -8
- package/es/tx/builder/field-types/wrapped.mjs.map +1 -1
- package/es/tx/builder/helpers.d.ts +2 -2
- package/es/tx/builder/helpers.mjs +12 -21
- package/es/tx/builder/helpers.mjs.map +1 -1
- package/es/tx/builder/index.d.ts +17 -10
- package/es/tx/builder/index.mjs +39 -65
- package/es/tx/builder/index.mjs.map +1 -1
- package/es/tx/builder/schema.d.ts +478 -257
- package/es/tx/builder/schema.generated.d.ts +39 -3
- package/es/tx/builder/schema.generated.mjs.map +1 -1
- package/es/tx/builder/schema.mjs +48 -36
- package/es/tx/builder/schema.mjs.map +1 -1
- package/es/tx/execution-cost.d.ts +6 -5
- package/es/tx/execution-cost.mjs +16 -17
- package/es/tx/execution-cost.mjs.map +1 -1
- package/es/tx/transaction-signer.mjs +1 -4
- package/es/tx/transaction-signer.mjs.map +1 -1
- package/es/tx/validator.mjs +61 -42
- package/es/tx/validator.mjs.map +1 -1
- package/es/utils/amount-formatter.mjs +15 -22
- package/es/utils/amount-formatter.mjs.map +1 -1
- package/es/utils/autorest.d.ts +2 -3
- package/es/utils/autorest.mjs +41 -25
- package/es/utils/autorest.mjs.map +1 -1
- package/es/utils/bytes.mjs +1 -2
- package/es/utils/bytes.mjs.map +1 -1
- package/es/utils/crypto.d.ts +9 -5
- package/es/utils/crypto.mjs +18 -14
- package/es/utils/crypto.mjs.map +1 -1
- package/es/utils/errors.d.ts +6 -0
- package/es/utils/errors.mjs +12 -6
- package/es/utils/errors.mjs.map +1 -1
- package/es/utils/hd-wallet.d.ts +2 -0
- package/es/utils/hd-wallet.mjs +6 -5
- package/es/utils/hd-wallet.mjs.map +1 -1
- package/es/utils/json-big.mjs +2 -10
- package/es/utils/json-big.mjs.map +1 -1
- package/es/utils/jwt.d.ts +53 -0
- package/es/utils/jwt.mjs +120 -0
- package/es/utils/jwt.mjs.map +1 -0
- package/es/utils/keystore.d.ts +6 -2
- package/es/utils/keystore.mjs +8 -16
- package/es/utils/keystore.mjs.map +1 -1
- package/es/utils/typed-data.d.ts +0 -2
- package/es/utils/typed-data.mjs +8 -23
- package/es/utils/typed-data.mjs.map +1 -1
- package/es/utils/wrap-proxy.d.ts +2 -0
- package/es/utils/wrap-proxy.mjs +15 -0
- package/es/utils/wrap-proxy.mjs.map +1 -0
- package/package.json +57 -51
- package/src/AeSdk.ts +3 -0
- package/src/AeSdkAepp.ts +0 -1
- package/src/AeSdkBase.ts +97 -10
- package/src/AeSdkMethods.ts +37 -33
- package/src/AeSdkWallet.ts +22 -3
- package/src/Middleware.ts +17 -9
- package/src/MiddlewareSubscriber.ts +1 -1
- package/src/Node.ts +51 -21
- package/src/account/Base.ts +62 -3
- package/src/account/Generalized.ts +10 -0
- package/src/account/Ledger.ts +10 -0
- package/src/account/Memory.ts +83 -9
- package/src/account/Rpc.ts +69 -6
- package/src/aens.ts +35 -56
- package/src/aepp-wallet-communication/connection/BrowserRuntime.ts +3 -0
- package/src/aepp-wallet-communication/connection/BrowserWindowMessage.ts +2 -2
- package/src/aepp-wallet-communication/rpc/RpcClient.ts +4 -2
- package/src/aepp-wallet-communication/rpc/types.ts +14 -1
- package/src/aepp-wallet-communication/schema.ts +2 -0
- package/src/aepp-wallet-communication/wallet-detector.ts +10 -10
- package/src/apis/compiler/compiler.ts +93 -93
- package/src/apis/compiler/models/index.ts +1 -0
- package/src/apis/compiler/models/mappers.ts +178 -165
- package/src/apis/compiler/models/parameters.ts +18 -18
- package/src/apis/middleware/middleware.ts +462 -341
- package/src/apis/middleware/models/index.ts +258 -56
- package/src/apis/middleware/models/mappers.ts +2357 -1919
- package/src/apis/middleware/models/parameters.ts +172 -142
- package/src/apis/node/models/index.ts +79 -2
- package/src/apis/node/models/mappers.ts +1529 -1302
- package/src/apis/node/models/parameters.ts +51 -51
- package/src/apis/node/node.ts +420 -275
- package/src/chain.ts +42 -128
- package/src/channel/Base.ts +14 -47
- package/src/channel/Contract.ts +18 -26
- package/src/channel/Spend.ts +0 -8
- package/src/channel/internal.ts +115 -13
- package/src/contract/Contract.ts +36 -12
- package/src/contract/compiler/Base.ts +15 -8
- package/src/contract/compiler/Cli.ts +44 -23
- package/src/contract/compiler/Cli8.ts +17 -0
- package/src/contract/compiler/Http.ts +24 -14
- package/src/contract/compiler/HttpNode.ts +2 -2
- package/src/contract/delegation-signature.ts +11 -5
- package/src/contract/ga.ts +4 -3
- package/src/deprecated.ts +55 -1
- package/src/index-browser.ts +18 -11
- package/src/index.ts +1 -0
- package/src/oracle.ts +11 -54
- package/src/send-transaction.ts +136 -0
- package/src/spend.ts +25 -11
- package/src/tx/builder/common.ts +74 -0
- package/src/tx/builder/constants.ts +7 -9
- package/src/tx/builder/delegation/index.ts +28 -0
- package/src/tx/builder/delegation/schema.generated.ts +143 -0
- package/src/tx/builder/delegation/schema.ts +61 -0
- package/src/tx/builder/field-types/coin-amount.ts +3 -2
- package/src/tx/builder/field-types/ct-version.ts +1 -1
- package/src/tx/builder/field-types/entry.ts +1 -4
- package/src/tx/builder/field-types/fee.ts +72 -44
- package/src/tx/builder/field-types/gas-limit.ts +4 -4
- package/src/tx/builder/field-types/gas-price.ts +59 -3
- package/src/tx/builder/field-types/index.ts +31 -59
- package/src/tx/builder/field-types/name-fee.ts +1 -1
- package/src/tx/builder/field-types/nonce.ts +7 -1
- package/src/tx/builder/field-types/pointers2.ts +62 -0
- package/src/tx/builder/field-types/query-fee.ts +25 -0
- package/src/tx/builder/field-types/ttl.ts +13 -3
- package/src/tx/builder/field-types/with-default.ts +18 -0
- package/src/tx/builder/field-types/with-formatting.ts +18 -0
- package/src/tx/builder/helpers.ts +2 -2
- package/src/tx/builder/index.ts +42 -59
- package/src/tx/builder/schema.generated.ts +39 -3
- package/src/tx/builder/schema.ts +55 -29
- package/src/tx/execution-cost.ts +6 -5
- package/src/tx/validator.ts +31 -5
- package/src/utils/autorest.ts +37 -28
- package/src/utils/crypto.ts +24 -14
- package/src/utils/errors.ts +10 -0
- package/src/utils/hd-wallet.ts +2 -0
- package/src/utils/jwt.ts +126 -0
- package/src/utils/keystore.ts +6 -2
- package/src/utils/typed-data.ts +4 -30
- package/src/utils/wrap-proxy.ts +24 -0
- package/types-legacy/ts4.2/AeSdk.d.ts +3 -0
- package/types-legacy/ts4.2/AeSdkAepp.d.ts +0 -1
- package/types-legacy/ts4.2/AeSdkBase.d.ts +61 -6
- package/types-legacy/ts4.2/AeSdkMethods.d.ts +19 -7
- package/types-legacy/ts4.2/Middleware.d.ts +1 -1
- package/types-legacy/ts4.2/Node.d.ts +15 -2
- package/types-legacy/ts4.2/account/Base.d.ts +39 -3
- package/types-legacy/ts4.2/account/Generalized.d.ts +2 -0
- package/types-legacy/ts4.2/account/Ledger.d.ts +2 -0
- package/types-legacy/ts4.2/account/Memory.d.ts +15 -4
- package/types-legacy/ts4.2/account/Rpc.d.ts +16 -5
- package/types-legacy/ts4.2/aens.d.ts +17 -44
- package/types-legacy/ts4.2/aepp-wallet-communication/connection/BrowserRuntime.d.ts +3 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/rpc/types.d.ts +14 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/schema.d.ts +2 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/wallet-detector.d.ts +2 -5
- package/types-legacy/ts4.2/apis/compiler/models/index.d.ts +1 -0
- package/types-legacy/ts4.2/apis/middleware/middleware.d.ts +23 -5
- package/types-legacy/ts4.2/apis/middleware/models/index.d.ts +164 -15
- package/types-legacy/ts4.2/apis/middleware/models/mappers.d.ts +8 -1
- package/types-legacy/ts4.2/apis/middleware/models/parameters.d.ts +6 -3
- package/types-legacy/ts4.2/apis/node/models/index.d.ts +66 -2
- package/types-legacy/ts4.2/apis/node/models/mappers.d.ts +5 -1
- package/types-legacy/ts4.2/apis/node/models/parameters.d.ts +2 -2
- package/types-legacy/ts4.2/apis/node/node.d.ts +24 -3
- package/types-legacy/ts4.2/chain.d.ts +14 -44
- package/types-legacy/ts4.2/channel/Base.d.ts +3 -47
- package/types-legacy/ts4.2/channel/Contract.d.ts +16 -25
- package/types-legacy/ts4.2/channel/Spend.d.ts +0 -8
- package/types-legacy/ts4.2/channel/internal.d.ts +104 -5
- package/types-legacy/ts4.2/contract/Contract.d.ts +10 -2
- package/types-legacy/ts4.2/contract/compiler/Base.d.ts +14 -8
- package/types-legacy/ts4.2/contract/compiler/Cli.d.ts +12 -11
- package/types-legacy/ts4.2/contract/compiler/Cli8.d.ts +13 -0
- package/types-legacy/ts4.2/contract/compiler/Http.d.ts +3 -9
- package/types-legacy/ts4.2/contract/compiler/HttpNode.d.ts +2 -5
- package/types-legacy/ts4.2/contract/delegation-signature.d.ts +2 -1
- package/types-legacy/ts4.2/contract/ga.d.ts +1 -2
- package/types-legacy/ts4.2/deprecated.d.ts +48 -0
- package/types-legacy/ts4.2/index-browser.d.ts +11 -6
- package/types-legacy/ts4.2/index.d.ts +1 -0
- package/types-legacy/ts4.2/oracle.d.ts +6 -37
- package/types-legacy/ts4.2/send-transaction.d.ts +53 -0
- package/types-legacy/ts4.2/spend.d.ts +4 -3
- package/types-legacy/ts4.2/tx/builder/common.d.ts +32 -0
- package/types-legacy/ts4.2/tx/builder/constants.d.ts +6 -5
- package/types-legacy/ts4.2/tx/builder/delegation/index.d.ts +20 -0
- package/types-legacy/ts4.2/tx/builder/delegation/schema.d.ts +136 -0
- package/types-legacy/ts4.2/tx/builder/delegation/schema.generated.d.ts +141 -0
- package/types-legacy/ts4.2/tx/builder/field-types/coin-amount.d.ts +2 -2
- package/types-legacy/ts4.2/tx/builder/field-types/ct-version.d.ts +1 -1
- package/types-legacy/ts4.2/tx/builder/field-types/fee.d.ts +19 -11
- package/types-legacy/ts4.2/tx/builder/field-types/gas-price.d.ts +10 -2
- package/types-legacy/ts4.2/tx/builder/field-types/index.d.ts +31 -29
- package/types-legacy/ts4.2/tx/builder/field-types/name-fee.d.ts +1 -1
- package/types-legacy/ts4.2/tx/builder/field-types/nonce.d.ts +1 -0
- package/types-legacy/ts4.2/tx/builder/field-types/pointers2.d.ts +26 -0
- package/types-legacy/ts4.2/tx/builder/field-types/query-fee.d.ts +19 -0
- package/types-legacy/ts4.2/tx/builder/field-types/ttl.d.ts +9 -1
- package/types-legacy/ts4.2/tx/builder/field-types/with-default.d.ts +7 -0
- package/types-legacy/ts4.2/tx/builder/field-types/with-formatting.d.ts +7 -0
- package/types-legacy/ts4.2/tx/builder/helpers.d.ts +2 -2
- package/types-legacy/ts4.2/tx/builder/index.d.ts +17 -10
- package/types-legacy/ts4.2/tx/builder/schema.d.ts +482 -257
- package/types-legacy/ts4.2/tx/builder/schema.generated.d.ts +39 -3
- package/types-legacy/ts4.2/tx/execution-cost.d.ts +6 -5
- package/types-legacy/ts4.2/utils/autorest.d.ts +2 -3
- package/types-legacy/ts4.2/utils/crypto.d.ts +9 -5
- package/types-legacy/ts4.2/utils/errors.d.ts +6 -0
- package/types-legacy/ts4.2/utils/hd-wallet.d.ts +2 -0
- package/types-legacy/ts4.2/utils/jwt.d.ts +53 -0
- package/types-legacy/ts4.2/utils/keystore.d.ts +6 -2
- package/types-legacy/ts4.2/utils/typed-data.d.ts +0 -2
- package/types-legacy/ts4.2/utils/wrap-proxy.d.ts +2 -0
- package/types-legacy/ts4.5/AeSdk.d.ts +3 -0
- package/types-legacy/ts4.5/AeSdkAepp.d.ts +0 -1
- package/types-legacy/ts4.5/AeSdkBase.d.ts +61 -6
- package/types-legacy/ts4.5/AeSdkMethods.d.ts +19 -7
- package/types-legacy/ts4.5/Middleware.d.ts +1 -1
- package/types-legacy/ts4.5/Node.d.ts +15 -2
- package/types-legacy/ts4.5/account/Base.d.ts +39 -3
- package/types-legacy/ts4.5/account/Generalized.d.ts +2 -0
- package/types-legacy/ts4.5/account/Ledger.d.ts +2 -0
- package/types-legacy/ts4.5/account/Memory.d.ts +15 -4
- package/types-legacy/ts4.5/account/Rpc.d.ts +16 -5
- package/types-legacy/ts4.5/aens.d.ts +17 -44
- package/types-legacy/ts4.5/aepp-wallet-communication/connection/BrowserRuntime.d.ts +3 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/rpc/types.d.ts +14 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/schema.d.ts +2 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/wallet-detector.d.ts +2 -5
- package/types-legacy/ts4.5/apis/compiler/models/index.d.ts +1 -0
- package/types-legacy/ts4.5/apis/middleware/middleware.d.ts +23 -5
- package/types-legacy/ts4.5/apis/middleware/models/index.d.ts +164 -15
- package/types-legacy/ts4.5/apis/middleware/models/mappers.d.ts +8 -1
- package/types-legacy/ts4.5/apis/middleware/models/parameters.d.ts +6 -3
- package/types-legacy/ts4.5/apis/node/models/index.d.ts +66 -2
- package/types-legacy/ts4.5/apis/node/models/mappers.d.ts +5 -1
- package/types-legacy/ts4.5/apis/node/models/parameters.d.ts +2 -2
- package/types-legacy/ts4.5/apis/node/node.d.ts +24 -3
- package/types-legacy/ts4.5/chain.d.ts +14 -44
- package/types-legacy/ts4.5/channel/Base.d.ts +3 -47
- package/types-legacy/ts4.5/channel/Contract.d.ts +16 -25
- package/types-legacy/ts4.5/channel/Spend.d.ts +0 -8
- package/types-legacy/ts4.5/channel/internal.d.ts +104 -5
- package/types-legacy/ts4.5/contract/Contract.d.ts +10 -2
- package/types-legacy/ts4.5/contract/compiler/Base.d.ts +14 -8
- package/types-legacy/ts4.5/contract/compiler/Cli.d.ts +12 -11
- package/types-legacy/ts4.5/contract/compiler/Cli8.d.ts +13 -0
- package/types-legacy/ts4.5/contract/compiler/Http.d.ts +3 -9
- package/types-legacy/ts4.5/contract/compiler/HttpNode.d.ts +2 -5
- package/types-legacy/ts4.5/contract/delegation-signature.d.ts +2 -1
- package/types-legacy/ts4.5/contract/ga.d.ts +1 -2
- package/types-legacy/ts4.5/deprecated.d.ts +48 -0
- package/types-legacy/ts4.5/index-browser.d.ts +11 -6
- package/types-legacy/ts4.5/index.d.ts +1 -0
- package/types-legacy/ts4.5/oracle.d.ts +6 -37
- package/types-legacy/ts4.5/send-transaction.d.ts +53 -0
- package/types-legacy/ts4.5/spend.d.ts +4 -3
- package/types-legacy/ts4.5/tx/builder/common.d.ts +32 -0
- package/types-legacy/ts4.5/tx/builder/constants.d.ts +6 -5
- package/types-legacy/ts4.5/tx/builder/delegation/index.d.ts +20 -0
- package/types-legacy/ts4.5/tx/builder/delegation/schema.d.ts +136 -0
- package/types-legacy/ts4.5/tx/builder/delegation/schema.generated.d.ts +141 -0
- package/types-legacy/ts4.5/tx/builder/field-types/coin-amount.d.ts +2 -2
- package/types-legacy/ts4.5/tx/builder/field-types/ct-version.d.ts +1 -1
- package/types-legacy/ts4.5/tx/builder/field-types/fee.d.ts +19 -11
- package/types-legacy/ts4.5/tx/builder/field-types/gas-price.d.ts +10 -2
- package/types-legacy/ts4.5/tx/builder/field-types/index.d.ts +31 -29
- package/types-legacy/ts4.5/tx/builder/field-types/name-fee.d.ts +1 -1
- package/types-legacy/ts4.5/tx/builder/field-types/nonce.d.ts +1 -0
- package/types-legacy/ts4.5/tx/builder/field-types/pointers2.d.ts +26 -0
- package/types-legacy/ts4.5/tx/builder/field-types/query-fee.d.ts +19 -0
- package/types-legacy/ts4.5/tx/builder/field-types/ttl.d.ts +9 -1
- package/types-legacy/ts4.5/tx/builder/field-types/with-default.d.ts +7 -0
- package/types-legacy/ts4.5/tx/builder/field-types/with-formatting.d.ts +7 -0
- package/types-legacy/ts4.5/tx/builder/helpers.d.ts +2 -2
- package/types-legacy/ts4.5/tx/builder/index.d.ts +17 -10
- package/types-legacy/ts4.5/tx/builder/schema.d.ts +482 -257
- package/types-legacy/ts4.5/tx/builder/schema.generated.d.ts +39 -3
- package/types-legacy/ts4.5/tx/execution-cost.d.ts +6 -5
- package/types-legacy/ts4.5/utils/autorest.d.ts +2 -3
- package/types-legacy/ts4.5/utils/crypto.d.ts +9 -5
- package/types-legacy/ts4.5/utils/errors.d.ts +6 -0
- package/types-legacy/ts4.5/utils/hd-wallet.d.ts +2 -0
- package/types-legacy/ts4.5/utils/jwt.d.ts +53 -0
- package/types-legacy/ts4.5/utils/keystore.d.ts +6 -2
- package/types-legacy/ts4.5/utils/typed-data.d.ts +0 -2
- package/types-legacy/ts4.5/utils/wrap-proxy.d.ts +2 -0
- package/es/tx/builder/field-types/deposit.d.ts +0 -15
- package/es/tx/builder/field-types/deposit.mjs +0 -18
- package/es/tx/builder/field-types/deposit.mjs.map +0 -1
- package/src/tx/builder/field-types/deposit.ts +0 -23
- package/types-legacy/ts4.2/tx/builder/field-types/deposit.d.ts +0 -15
- package/types-legacy/ts4.5/tx/builder/field-types/deposit.d.ts +0 -15
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { AciValue } from './utils/typed-data';
|
|
2
|
+
import { Encoded } from './utils/encoder';
|
|
1
3
|
import { RpcError } from './aepp-wallet-communication/schema';
|
|
4
|
+
import { ORACLE_TTL_TYPES } from './tx/builder/schema';
|
|
2
5
|
/**
|
|
3
6
|
* @category exception
|
|
4
7
|
* @deprecated this exception is not thrown anymore
|
|
@@ -12,3 +15,48 @@ export declare class RpcBroadcastError extends RpcError {
|
|
|
12
15
|
* @deprecated use isAuctionName instead
|
|
13
16
|
*/
|
|
14
17
|
export declare const NAME_BID_MAX_LENGTH = 12;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated use ContractByteArrayEncoder:encodeWithType from \@aeternity/aepp-calldata
|
|
20
|
+
*/
|
|
21
|
+
export declare function encodeFateValue(value: unknown, aci: AciValue): Encoded.ContractBytearray;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated use ContractByteArrayEncoder:decodeWithType from \@aeternity/aepp-calldata
|
|
24
|
+
*/
|
|
25
|
+
export declare function decodeFateValue(value: Encoded.ContractBytearray, aci: AciValue): any;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated inlined in buildTx or use `180000`
|
|
28
|
+
*/
|
|
29
|
+
export declare const NAME_TTL = 180000;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated inlined in buildTx or use `36000`
|
|
32
|
+
*/
|
|
33
|
+
export declare const NAME_MAX_TTL = 36000;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated inlined in buildTx or use `60 * 60`
|
|
36
|
+
*/
|
|
37
|
+
export declare const NAME_MAX_CLIENT_TTL: number;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated inlined in buildTx or use `60 * 60`
|
|
40
|
+
*/
|
|
41
|
+
export declare const CLIENT_TTL: number;
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated inlined in buildTx or use `{ type: ORACLE_TTL_TYPES.delta, value: 500 }`
|
|
44
|
+
*/
|
|
45
|
+
export declare const ORACLE_TTL: {
|
|
46
|
+
type: ORACLE_TTL_TYPES;
|
|
47
|
+
value: number;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated inlined in buildTx or use `{ type: ORACLE_TTL_TYPES.delta, value: 10 }`
|
|
51
|
+
*/
|
|
52
|
+
export declare const QUERY_TTL: {
|
|
53
|
+
type: ORACLE_TTL_TYPES;
|
|
54
|
+
value: number;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated inlined in buildTx or use `{ type: ORACLE_TTL_TYPES.delta, value: 10 }`
|
|
58
|
+
*/
|
|
59
|
+
export declare const RESPONSE_TTL: {
|
|
60
|
+
type: ORACLE_TTL_TYPES;
|
|
61
|
+
value: number;
|
|
62
|
+
};
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
export { _getPollInterval,
|
|
1
|
+
export { _getPollInterval, getHeight, poll, awaitHeight, waitForTxConfirm, getAccount, getBalance, getCurrentGeneration, getGeneration, getMicroBlockTransactions, getKeyBlock, getMicroBlockHeader, txDryRun, getContractByteCode, getContract, getName, resolveName, } from './chain';
|
|
2
|
+
export { InvalidTxError, sendTransaction } from './send-transaction';
|
|
2
3
|
export { getAddressFromPriv, isAddressValid, genSalt, encodeUnsigned, hash, encodeContractAddress, generateKeyPairFromSecret, generateKeyPair, sign, verify, messageToHash, signMessage, verifyMessage, isValidKeypair, } from './utils/crypto';
|
|
4
|
+
export { signJwt, unpackJwt, verifyJwt, isJwt, ensureJwt, } from './utils/jwt';
|
|
5
|
+
export type { Jwt } from './utils/jwt';
|
|
3
6
|
export { recover, dump } from './utils/keystore';
|
|
4
7
|
export type { Keystore } from './utils/keystore';
|
|
5
8
|
export { toBytes } from './utils/bytes';
|
|
6
9
|
export { buildTx, buildTxAsync, buildTxHash, unpackTx, buildContractIdByContractTx, } from './tx/builder';
|
|
7
10
|
export { buildContractId, oracleQueryId, produceNameId, commitmentHash, readInt, isNameValid, ensureName, getDefaultPointerKey, getMinimumNameFee, computeBidFee, computeAuctionEndBlock, isAuctionName, } from './tx/builder/helpers';
|
|
8
|
-
export { MAX_AUTH_FUN_GAS,
|
|
11
|
+
export { MAX_AUTH_FUN_GAS, 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, DRY_RUN_ACCOUNT, } from './tx/builder/constants';
|
|
9
12
|
export type { Int, AensName } from './tx/builder/constants';
|
|
10
|
-
export { ORACLE_TTL_TYPES,
|
|
13
|
+
export { ORACLE_TTL_TYPES, CallReturnType } from './tx/builder/schema';
|
|
14
|
+
export { DelegationTag } from './tx/builder/delegation/schema';
|
|
15
|
+
export { packDelegation, unpackDelegation } from './tx/builder/delegation';
|
|
11
16
|
export { getExecutionCost, getExecutionCostBySignedTx, getExecutionCostUsingNode, } from './tx/execution-cost';
|
|
12
17
|
export { default as getTransactionSignerAddress } from './tx/transaction-signer';
|
|
13
18
|
export { AE_AMOUNT_FORMATS, formatAmount, toAe, toAettos, prefixedAmount, } from './utils/amount-formatter';
|
|
14
19
|
export { DerivationError, deriveChild, derivePathFromKey, getMasterKeyFromSeed, derivePathFromSeed, getKeyPair, generateSaveHDWalletFromSeed, getSaveHDWalletAccounts, getHdWalletAccountFromSeed, } from './utils/hd-wallet';
|
|
15
20
|
export { encode, decode, Encoding, Encoded, } from './utils/encoder';
|
|
16
|
-
export {
|
|
21
|
+
export { hashTypedData, hashDomain, hashJson } from './utils/typed-data';
|
|
17
22
|
export { aensRevoke, aensUpdate, aensTransfer, aensQuery, aensClaim, aensPreclaim, aensBid, } from './aens';
|
|
18
23
|
export { default as Contract } from './contract/Contract';
|
|
19
24
|
export type { ContractMethodsBase } from './contract/Contract';
|
|
@@ -42,5 +47,5 @@ export { MESSAGE_DIRECTION, WALLET_TYPE, SUBSCRIPTION_TYPES, METHODS, RPC_STATUS
|
|
|
42
47
|
export { default as walletDetector } from './aepp-wallet-communication/wallet-detector';
|
|
43
48
|
export { default as BrowserRuntimeConnection } from './aepp-wallet-communication/connection/BrowserRuntime';
|
|
44
49
|
export { default as BrowserWindowMessageConnection } from './aepp-wallet-communication/connection/BrowserWindowMessage';
|
|
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';
|
|
50
|
+
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, LogicError, 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';
|
|
51
|
+
export { RpcBroadcastError, NAME_BID_MAX_LENGTH, encodeFateValue, decodeFateValue, NAME_TTL, NAME_MAX_TTL, NAME_MAX_CLIENT_TTL, CLIENT_TTL, ORACLE_TTL, QUERY_TTL, RESPONSE_TTL, } from './deprecated';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './index-browser';
|
|
2
2
|
export { default as CompilerCli } from './contract/compiler/Cli';
|
|
3
|
+
export { default as CompilerCli8 } from './contract/compiler/Cli8';
|
|
3
4
|
export { default as getFileSystem } from './contract/compiler/getFileSystem';
|
|
4
5
|
export { default as CompilerHttpNode } from './contract/compiler/HttpNode';
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* repository.
|
|
7
7
|
*/
|
|
8
8
|
import { BuildTxOptions } from './tx/builder';
|
|
9
|
-
import { ORACLE_TTL_TYPES } from './tx/builder/schema';
|
|
10
9
|
import { Tag } from './tx/builder/constants';
|
|
11
10
|
import { Encoded } from './utils/encoder';
|
|
12
|
-
import { _getPollInterval
|
|
11
|
+
import { _getPollInterval } from './chain';
|
|
12
|
+
import { sendTransaction, SendTransactionOptions } from './send-transaction';
|
|
13
13
|
import Node from './Node';
|
|
14
14
|
import AccountBase from './account/Base';
|
|
15
15
|
type OracleQueries = Awaited<ReturnType<Node['getOracleQueriesByPubkey']>>['oracleQueries'];
|
|
@@ -62,37 +62,20 @@ interface GetQueryObjectReturnType extends Awaited<ReturnType<Node['getOracleQue
|
|
|
62
62
|
* @param oracleId - Oracle public key
|
|
63
63
|
* @param query - Oracle query object
|
|
64
64
|
* @param options - Options object
|
|
65
|
-
* @param options.queryTtl - queryTtl Oracle query time to leave
|
|
66
|
-
* @param options.responseTtl - queryFee Oracle query response time to leave
|
|
67
|
-
* @param options.queryFee - queryFee Oracle query fee
|
|
68
|
-
* @param options.fee - fee Transaction fee
|
|
69
|
-
* @param options.ttl - Transaction time to leave
|
|
70
65
|
* @returns Query object
|
|
71
66
|
*/
|
|
72
67
|
export declare function postQueryToOracle(oracleId: Encoded.OracleAddress, query: string, options: PostQueryToOracleOptions): Promise<Awaited<ReturnType<typeof sendTransaction>> & Awaited<ReturnType<typeof getQueryObject>>>;
|
|
73
|
-
type PostQueryToOracleOptionsType = Parameters<typeof sendTransaction>[1] & Parameters<typeof getQueryObject>[2] & BuildTxOptions<Tag.OracleQueryTx, 'oracleId' | 'senderId' | 'query'
|
|
74
|
-
queryTtlType?: ORACLE_TTL_TYPES;
|
|
75
|
-
queryTtlValue?: number;
|
|
76
|
-
responseTtlType?: ORACLE_TTL_TYPES;
|
|
77
|
-
responseTtlValue?: number;
|
|
78
|
-
};
|
|
68
|
+
type PostQueryToOracleOptionsType = Parameters<typeof sendTransaction>[1] & Parameters<typeof getQueryObject>[2] & BuildTxOptions<Tag.OracleQueryTx, 'oracleId' | 'senderId' | 'query'>;
|
|
79
69
|
interface PostQueryToOracleOptions extends PostQueryToOracleOptionsType {
|
|
80
70
|
}
|
|
81
71
|
/**
|
|
82
72
|
* Extend oracle ttl
|
|
83
73
|
* @category oracle
|
|
84
74
|
* @param options - Options object
|
|
85
|
-
* @param options.fee - fee Transaction fee
|
|
86
|
-
* @param options.ttl - Transaction time to leave
|
|
87
|
-
* @param options.oracleTtlType - Oracle time to leave for extend
|
|
88
|
-
* @param options.oracleTtlValue - Oracle time to leave for extend
|
|
89
75
|
* @returns Oracle object
|
|
90
76
|
*/
|
|
91
77
|
export declare function extendOracleTtl(options: ExtendOracleTtlOptions): Promise<Awaited<ReturnType<typeof sendTransaction>> & Awaited<ReturnType<typeof getOracleObject>>>;
|
|
92
|
-
type ExtendOracleTtlOptionsType = SendTransactionOptions & Parameters<typeof getOracleObject>[1] & BuildTxOptions<Tag.OracleExtendTx, '
|
|
93
|
-
oracleTtlType?: ORACLE_TTL_TYPES;
|
|
94
|
-
oracleTtlValue?: number;
|
|
95
|
-
};
|
|
78
|
+
type ExtendOracleTtlOptionsType = SendTransactionOptions & Parameters<typeof getOracleObject>[1] & BuildTxOptions<Tag.OracleExtendTx, 'callerId' | 'oracleId'>;
|
|
96
79
|
interface ExtendOracleTtlOptions extends ExtendOracleTtlOptionsType {
|
|
97
80
|
}
|
|
98
81
|
/**
|
|
@@ -101,16 +84,10 @@ interface ExtendOracleTtlOptions extends ExtendOracleTtlOptionsType {
|
|
|
101
84
|
* @param queryId - Oracle query id
|
|
102
85
|
* @param response - Oracle query response
|
|
103
86
|
* @param options - Options object
|
|
104
|
-
* @param options.responseTtl - responseTtl Query response time to leave
|
|
105
|
-
* @param options.fee - Transaction fee
|
|
106
|
-
* @param options.ttl - Transaction time to leave
|
|
107
87
|
* @returns Oracle object
|
|
108
88
|
*/
|
|
109
89
|
export declare function respondToQuery(queryId: Encoded.OracleQueryId, response: string, options: RespondToQueryOptions): Promise<Awaited<ReturnType<typeof sendTransaction>> & Awaited<ReturnType<typeof getOracleObject>>>;
|
|
110
|
-
type RespondToQueryOptionsType = SendTransactionOptions & Parameters<typeof getOracleObject>[1] & BuildTxOptions<Tag.OracleResponseTx, 'callerId' | 'oracleId' | 'queryId' | 'response'
|
|
111
|
-
responseTtlType?: ORACLE_TTL_TYPES;
|
|
112
|
-
responseTtlValue?: number;
|
|
113
|
-
};
|
|
90
|
+
type RespondToQueryOptionsType = SendTransactionOptions & Parameters<typeof getOracleObject>[1] & BuildTxOptions<Tag.OracleResponseTx, 'callerId' | 'oracleId' | 'queryId' | 'response'>;
|
|
114
91
|
interface RespondToQueryOptions extends RespondToQueryOptionsType {
|
|
115
92
|
}
|
|
116
93
|
/**
|
|
@@ -139,18 +116,10 @@ interface GetOracleObjectReturnType extends Awaited<ReturnType<Node['getOracleBy
|
|
|
139
116
|
* @param queryFormat - Format of query
|
|
140
117
|
* @param responseFormat - Format of query response
|
|
141
118
|
* @param options - Options
|
|
142
|
-
* @param options.queryFee - Oracle query Fee
|
|
143
|
-
* @param options - Options object
|
|
144
|
-
* @param options.abiVersion - Always 0 (do not use virtual machine)
|
|
145
|
-
* @param options.fee - Transaction fee
|
|
146
|
-
* @param options.ttl - Transaction time to leave
|
|
147
119
|
* @returns Oracle object
|
|
148
120
|
*/
|
|
149
121
|
export declare function registerOracle(queryFormat: string, responseFormat: string, options: RegisterOracleOptions): Promise<Awaited<ReturnType<typeof sendTransaction>> & Awaited<ReturnType<typeof getOracleObject>>>;
|
|
150
|
-
type RegisterOracleOptionsType = SendTransactionOptions & Parameters<typeof getOracleObject>[1] & BuildTxOptions<Tag.OracleRegisterTx, 'accountId' | 'queryFormat' | 'responseFormat'
|
|
151
|
-
oracleTtlType?: ORACLE_TTL_TYPES;
|
|
152
|
-
oracleTtlValue?: number;
|
|
153
|
-
};
|
|
122
|
+
type RegisterOracleOptionsType = SendTransactionOptions & Parameters<typeof getOracleObject>[1] & BuildTxOptions<Tag.OracleRegisterTx, 'accountId' | 'queryFormat' | 'responseFormat'>;
|
|
154
123
|
interface RegisterOracleOptions extends RegisterOracleOptionsType {
|
|
155
124
|
}
|
|
156
125
|
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ValidatorResult } from './tx/validator';
|
|
2
|
+
import { TransactionError } from './utils/errors';
|
|
3
|
+
import Node, { TransformNodeType } from './Node';
|
|
4
|
+
import { SignedTx } from './apis/node';
|
|
5
|
+
import { Encoded } from './utils/encoder';
|
|
6
|
+
import AccountBase from './account/Base';
|
|
7
|
+
import { poll, waitForTxConfirm } from './chain';
|
|
8
|
+
/**
|
|
9
|
+
* @category exception
|
|
10
|
+
*/
|
|
11
|
+
export declare class InvalidTxError extends TransactionError {
|
|
12
|
+
validation: ValidatorResult[];
|
|
13
|
+
transaction: Encoded.Transaction;
|
|
14
|
+
constructor(message: string, validation: ValidatorResult[], transaction: Encoded.Transaction);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Signs and submits transaction for mining
|
|
18
|
+
* @category chain
|
|
19
|
+
* @param txUnsigned - Transaction to sign and submit
|
|
20
|
+
* @param options - Options
|
|
21
|
+
* @returns Transaction details
|
|
22
|
+
*/
|
|
23
|
+
export declare function sendTransaction(txUnsigned: Encoded.Transaction, { onNode, onAccount, verify, waitMined, confirm, innerTx, ...options }: SendTransactionOptions): Promise<SendTransactionReturnType>;
|
|
24
|
+
type SendTransactionOptionsType = {
|
|
25
|
+
/**
|
|
26
|
+
* Node to use
|
|
27
|
+
*/
|
|
28
|
+
onNode: Node;
|
|
29
|
+
/**
|
|
30
|
+
* Account to use
|
|
31
|
+
*/
|
|
32
|
+
onAccount: AccountBase;
|
|
33
|
+
/**
|
|
34
|
+
* Verify transaction before broadcast, throw error if not
|
|
35
|
+
*/
|
|
36
|
+
verify?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Ensure that transaction get into block
|
|
39
|
+
*/
|
|
40
|
+
waitMined?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Number of micro blocks that should be mined after tx get included
|
|
43
|
+
*/
|
|
44
|
+
confirm?: boolean | number;
|
|
45
|
+
} & Parameters<typeof poll>[1] & Omit<Parameters<typeof waitForTxConfirm>[1], 'confirm'> & Parameters<AccountBase['signTransaction']>[1];
|
|
46
|
+
export interface SendTransactionOptions extends SendTransactionOptionsType {
|
|
47
|
+
}
|
|
48
|
+
interface SendTransactionReturnType extends Partial<TransformNodeType<SignedTx>> {
|
|
49
|
+
hash: Encoded.TxHash;
|
|
50
|
+
rawTx: Encoded.Transaction;
|
|
51
|
+
confirmationHeight?: number;
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveName } from './chain';
|
|
2
|
+
import { sendTransaction, SendTransactionOptions } from './send-transaction';
|
|
2
3
|
import { BuildTxOptions } from './tx/builder';
|
|
3
4
|
import { Encoded } from './utils/encoder';
|
|
4
5
|
import { Tag, AensName } from './tx/builder/constants';
|
|
@@ -11,7 +12,7 @@ import AccountBase from './account/Base';
|
|
|
11
12
|
* @param options - Options
|
|
12
13
|
* @returns Transaction
|
|
13
14
|
*/
|
|
14
|
-
export declare function spend(amount: number | string, recipientIdOrName: Encoded.AccountAddress | AensName, options: SpendOptions): ReturnType<typeof sendTransaction>;
|
|
15
|
+
export declare function spend(amount: number | string, recipientIdOrName: Encoded.AccountAddress | Encoded.ContractAddress | AensName, options: SpendOptions): ReturnType<typeof sendTransaction>;
|
|
15
16
|
type SpendOptionsType = BuildTxOptions<Tag.SpendTx, 'senderId' | 'recipientId' | 'amount'> & Parameters<typeof resolveName>[2] & {
|
|
16
17
|
onAccount: AccountBase;
|
|
17
18
|
} & SendTransactionOptions;
|
|
@@ -35,7 +36,7 @@ interface SpendOptions extends SpendOptionsType {
|
|
|
35
36
|
* ```
|
|
36
37
|
*/
|
|
37
38
|
export declare function transferFunds(fraction: number | string, // TODO: accept only number
|
|
38
|
-
recipientIdOrName: AensName | Encoded.AccountAddress, options: TransferFundsOptions): ReturnType<typeof sendTransaction>;
|
|
39
|
+
recipientIdOrName: AensName | Encoded.AccountAddress | Encoded.ContractAddress, options: TransferFundsOptions): ReturnType<typeof sendTransaction>;
|
|
39
40
|
type TransferFundsOptionsType = BuildTxOptions<Tag.SpendTx, 'senderId' | 'recipientId' | 'amount'> & Parameters<typeof resolveName>[2] & {
|
|
40
41
|
onAccount: AccountBase;
|
|
41
42
|
} & SendTransactionOptions;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Field } from './field-types';
|
|
2
|
+
import { Encoding, Encoded } from '../../utils/encoder';
|
|
3
|
+
type Schemas = ReadonlyArray<{
|
|
4
|
+
tag: {
|
|
5
|
+
constValue: number;
|
|
6
|
+
} & Field;
|
|
7
|
+
version: {
|
|
8
|
+
constValue: number;
|
|
9
|
+
constValueOptional: boolean;
|
|
10
|
+
} & Field;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function getSchema(schemas: Schemas, Tag: {
|
|
13
|
+
[key: number]: string;
|
|
14
|
+
}, tag: number, version: number | undefined): Array<[
|
|
15
|
+
string,
|
|
16
|
+
Field
|
|
17
|
+
]>;
|
|
18
|
+
export declare function packRecord<E extends Encoding>(schemas: Schemas, Tag: {
|
|
19
|
+
[key: number]: string;
|
|
20
|
+
}, params: {
|
|
21
|
+
tag: number;
|
|
22
|
+
version?: number;
|
|
23
|
+
[k: string]: unknown;
|
|
24
|
+
}, extraParams: {
|
|
25
|
+
[k: string]: unknown;
|
|
26
|
+
}, encoding: E): Encoded.Generic<E>;
|
|
27
|
+
export declare function unpackRecord(schemas: Schemas, Tag: {
|
|
28
|
+
[key: number]: string;
|
|
29
|
+
}, encodedRecord: Encoded.Any, expectedTag: number | undefined, extraParams: {
|
|
30
|
+
[k: string]: unknown;
|
|
31
|
+
}): unknown;
|
|
32
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
|
+
export declare const DRY_RUN_ACCOUNT: {
|
|
3
|
+
readonly pub: "ak_11111111111111111111111111111111273Yts";
|
|
4
|
+
readonly amount: 100000000000000000000000000000000000n;
|
|
5
|
+
};
|
|
2
6
|
export declare const MAX_AUTH_FUN_GAS = 50000;
|
|
3
7
|
export type Int = number | string | BigNumber;
|
|
4
8
|
export type AensName = `${string}.chain`;
|
|
5
|
-
export declare const NAME_TTL = 180000;
|
|
6
|
-
export declare const NAME_MAX_TTL = 36000;
|
|
7
|
-
export declare const NAME_MAX_CLIENT_TTL = 84600;
|
|
8
|
-
export declare const CLIENT_TTL = 84600;
|
|
9
9
|
export declare const MIN_GAS_PRICE = 1000000000;
|
|
10
10
|
export declare const NAME_FEE_MULTIPLIER = 100000000000000;
|
|
11
11
|
export declare const NAME_FEE_BID_INCREMENT = 0.05;
|
|
@@ -29,7 +29,8 @@ export declare enum VmVersion {
|
|
|
29
29
|
SophiaImprovementsFortuna = 4,
|
|
30
30
|
Fate = 5,
|
|
31
31
|
SophiaImprovementsLima = 6,
|
|
32
|
-
Fate2 = 7
|
|
32
|
+
Fate2 = 7,
|
|
33
|
+
Fate3 = 8
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
36
|
* @category transaction builder
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Encoded } from '../../../utils/encoder';
|
|
2
|
+
import { DelegationTag } from './schema';
|
|
3
|
+
import { DlgParams, DlgUnpacked } from './schema.generated';
|
|
4
|
+
/**
|
|
5
|
+
* Pack delegation
|
|
6
|
+
* @category delegation signature
|
|
7
|
+
* @param params - Params of delegation
|
|
8
|
+
* @returns Encoded delegation
|
|
9
|
+
*/
|
|
10
|
+
export declare function packDelegation(params: DlgParams): Encoded.Bytearray;
|
|
11
|
+
/**
|
|
12
|
+
* Unpack delegation
|
|
13
|
+
* @category delegation signature
|
|
14
|
+
* @param encoded - Encoded delegation
|
|
15
|
+
* @param expectedTag - Expected delegation signature type
|
|
16
|
+
* @returns Params of delegation
|
|
17
|
+
*/
|
|
18
|
+
export declare function unpackDelegation<T extends DelegationTag>(encoded: Encoded.Bytearray, expectedTag?: T): DlgUnpacked & {
|
|
19
|
+
tag: T;
|
|
20
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import SchemaTypes from '../SchemaTypes';
|
|
3
|
+
import { Encoded } from '../../../utils/encoder';
|
|
4
|
+
/**
|
|
5
|
+
* @category delegation signature
|
|
6
|
+
*/
|
|
7
|
+
export declare enum DelegationTag {
|
|
8
|
+
AensWildcard = 1,
|
|
9
|
+
AensName = 2,
|
|
10
|
+
AensPreclaim = 3,
|
|
11
|
+
Oracle = 4,
|
|
12
|
+
OracleResponse = 5
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @see {@link https://github.com/aeternity/protocol/blob/8a9d1d1206174627f6aaef86159dc9c643080653/contracts/fate.md#from-ceres-serialized-signature-data}
|
|
16
|
+
*/
|
|
17
|
+
export declare const schemas: readonly [
|
|
18
|
+
{
|
|
19
|
+
readonly tag: {
|
|
20
|
+
serialize: (value: DelegationTag.AensWildcard) => Buffer;
|
|
21
|
+
deserialize: (value: Buffer) => DelegationTag.AensWildcard;
|
|
22
|
+
constValue: DelegationTag.AensWildcard;
|
|
23
|
+
constValueOptional: boolean;
|
|
24
|
+
};
|
|
25
|
+
readonly version: {
|
|
26
|
+
serialize: (value?: 1 | undefined) => Buffer;
|
|
27
|
+
deserialize: (value: Buffer) => 1;
|
|
28
|
+
constValue: 1;
|
|
29
|
+
constValueOptional: boolean;
|
|
30
|
+
};
|
|
31
|
+
readonly accountAddress: {
|
|
32
|
+
serialize: (value: `ak_${string}`) => Buffer;
|
|
33
|
+
deserialize: (value: Buffer) => `ak_${string}`;
|
|
34
|
+
};
|
|
35
|
+
readonly contractAddress: {
|
|
36
|
+
serialize: (value: `ct_${string}`) => Buffer;
|
|
37
|
+
deserialize: (value: Buffer) => `ct_${string}`;
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
readonly tag: {
|
|
42
|
+
serialize: (value: DelegationTag.AensName) => Buffer;
|
|
43
|
+
deserialize: (value: Buffer) => DelegationTag.AensName;
|
|
44
|
+
constValue: DelegationTag.AensName;
|
|
45
|
+
constValueOptional: boolean;
|
|
46
|
+
};
|
|
47
|
+
readonly version: {
|
|
48
|
+
serialize: (value?: 1 | undefined) => Buffer;
|
|
49
|
+
deserialize: (value: Buffer) => 1;
|
|
50
|
+
constValue: 1;
|
|
51
|
+
constValueOptional: boolean;
|
|
52
|
+
};
|
|
53
|
+
readonly accountAddress: {
|
|
54
|
+
serialize: (value: `ak_${string}`) => Buffer;
|
|
55
|
+
deserialize: (value: Buffer) => `ak_${string}`;
|
|
56
|
+
};
|
|
57
|
+
readonly nameId: {
|
|
58
|
+
serialize(value: `${string}.chain` | `nm_${string}`): Buffer;
|
|
59
|
+
deserialize: (value: Buffer) => `nm_${string}`;
|
|
60
|
+
};
|
|
61
|
+
readonly contractAddress: {
|
|
62
|
+
serialize: (value: `ct_${string}`) => Buffer;
|
|
63
|
+
deserialize: (value: Buffer) => `ct_${string}`;
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
readonly tag: {
|
|
68
|
+
serialize: (value: DelegationTag.AensPreclaim) => Buffer;
|
|
69
|
+
deserialize: (value: Buffer) => DelegationTag.AensPreclaim;
|
|
70
|
+
constValue: DelegationTag.AensPreclaim;
|
|
71
|
+
constValueOptional: boolean;
|
|
72
|
+
};
|
|
73
|
+
readonly version: {
|
|
74
|
+
serialize: (value?: 1 | undefined) => Buffer;
|
|
75
|
+
deserialize: (value: Buffer) => 1;
|
|
76
|
+
constValue: 1;
|
|
77
|
+
constValueOptional: boolean;
|
|
78
|
+
};
|
|
79
|
+
readonly accountAddress: {
|
|
80
|
+
serialize: (value: `ak_${string}`) => Buffer;
|
|
81
|
+
deserialize: (value: Buffer) => `ak_${string}`;
|
|
82
|
+
};
|
|
83
|
+
readonly contractAddress: {
|
|
84
|
+
serialize: (value: `ct_${string}`) => Buffer;
|
|
85
|
+
deserialize: (value: Buffer) => `ct_${string}`;
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
readonly tag: {
|
|
90
|
+
serialize: (value: DelegationTag.Oracle) => Buffer;
|
|
91
|
+
deserialize: (value: Buffer) => DelegationTag.Oracle;
|
|
92
|
+
constValue: DelegationTag.Oracle;
|
|
93
|
+
constValueOptional: boolean;
|
|
94
|
+
};
|
|
95
|
+
readonly version: {
|
|
96
|
+
serialize: (value?: 1 | undefined) => Buffer;
|
|
97
|
+
deserialize: (value: Buffer) => 1;
|
|
98
|
+
constValue: 1;
|
|
99
|
+
constValueOptional: boolean;
|
|
100
|
+
};
|
|
101
|
+
readonly accountAddress: {
|
|
102
|
+
serialize: (value: `ak_${string}`) => Buffer;
|
|
103
|
+
deserialize: (value: Buffer) => `ak_${string}`;
|
|
104
|
+
};
|
|
105
|
+
readonly contractAddress: {
|
|
106
|
+
serialize: (value: `ct_${string}`) => Buffer;
|
|
107
|
+
deserialize: (value: Buffer) => `ct_${string}`;
|
|
108
|
+
};
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
readonly tag: {
|
|
112
|
+
serialize: (value: DelegationTag.OracleResponse) => Buffer;
|
|
113
|
+
deserialize: (value: Buffer) => DelegationTag.OracleResponse;
|
|
114
|
+
constValue: DelegationTag.OracleResponse;
|
|
115
|
+
constValueOptional: boolean;
|
|
116
|
+
};
|
|
117
|
+
readonly version: {
|
|
118
|
+
serialize: (value?: 1 | undefined) => Buffer;
|
|
119
|
+
deserialize: (value: Buffer) => 1;
|
|
120
|
+
constValue: 1;
|
|
121
|
+
constValueOptional: boolean;
|
|
122
|
+
};
|
|
123
|
+
readonly queryId: {
|
|
124
|
+
readonly serialize: (value: Encoded.OracleQueryId) => Buffer;
|
|
125
|
+
readonly deserialize: (value: Buffer) => Encoded.OracleQueryId;
|
|
126
|
+
};
|
|
127
|
+
readonly contractAddress: {
|
|
128
|
+
serialize: (value: `ct_${string}`) => Buffer;
|
|
129
|
+
deserialize: (value: Buffer) => `ct_${string}`;
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
];
|
|
133
|
+
type Schemas = SchemaTypes<typeof schemas>;
|
|
134
|
+
export type DlgParams = Schemas['TxParams'];
|
|
135
|
+
export type DlgUnpacked = Schemas['TxUnpacked'];
|
|
136
|
+
export {};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { DlgParams as DlgParamsComplex, DlgUnpacked as DlgUnpackedComplex } from "./schema";
|
|
2
|
+
import { DelegationTag as Tag } from "./schema";
|
|
3
|
+
/**
|
|
4
|
+
* @category delegation signature
|
|
5
|
+
*/
|
|
6
|
+
type DlgParamsAensWildcard1Type = Omit<DlgParamsComplex & {
|
|
7
|
+
tag: Tag.AensWildcard;
|
|
8
|
+
version: 1;
|
|
9
|
+
}, "version"> & {
|
|
10
|
+
version?: 1;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* @category delegation signature
|
|
14
|
+
*/
|
|
15
|
+
export interface DlgParamsAensWildcard1 extends DlgParamsAensWildcard1Type {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @category delegation signature
|
|
19
|
+
*/
|
|
20
|
+
type DlgUnpackedAensWildcard1Type = DlgUnpackedComplex & {
|
|
21
|
+
tag: Tag.AensWildcard;
|
|
22
|
+
version: 1;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @category delegation signature
|
|
26
|
+
*/
|
|
27
|
+
export interface DlgUnpackedAensWildcard1 extends DlgUnpackedAensWildcard1Type {
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @category delegation signature
|
|
31
|
+
*/
|
|
32
|
+
type DlgParamsAensName1Type = Omit<DlgParamsComplex & {
|
|
33
|
+
tag: Tag.AensName;
|
|
34
|
+
version: 1;
|
|
35
|
+
}, "version"> & {
|
|
36
|
+
version?: 1;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* @category delegation signature
|
|
40
|
+
*/
|
|
41
|
+
export interface DlgParamsAensName1 extends DlgParamsAensName1Type {
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @category delegation signature
|
|
45
|
+
*/
|
|
46
|
+
type DlgUnpackedAensName1Type = DlgUnpackedComplex & {
|
|
47
|
+
tag: Tag.AensName;
|
|
48
|
+
version: 1;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* @category delegation signature
|
|
52
|
+
*/
|
|
53
|
+
export interface DlgUnpackedAensName1 extends DlgUnpackedAensName1Type {
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @category delegation signature
|
|
57
|
+
*/
|
|
58
|
+
type DlgParamsAensPreclaim1Type = Omit<DlgParamsComplex & {
|
|
59
|
+
tag: Tag.AensPreclaim;
|
|
60
|
+
version: 1;
|
|
61
|
+
}, "version"> & {
|
|
62
|
+
version?: 1;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* @category delegation signature
|
|
66
|
+
*/
|
|
67
|
+
export interface DlgParamsAensPreclaim1 extends DlgParamsAensPreclaim1Type {
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @category delegation signature
|
|
71
|
+
*/
|
|
72
|
+
type DlgUnpackedAensPreclaim1Type = DlgUnpackedComplex & {
|
|
73
|
+
tag: Tag.AensPreclaim;
|
|
74
|
+
version: 1;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* @category delegation signature
|
|
78
|
+
*/
|
|
79
|
+
export interface DlgUnpackedAensPreclaim1 extends DlgUnpackedAensPreclaim1Type {
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @category delegation signature
|
|
83
|
+
*/
|
|
84
|
+
type DlgParamsOracle1Type = Omit<DlgParamsComplex & {
|
|
85
|
+
tag: Tag.Oracle;
|
|
86
|
+
version: 1;
|
|
87
|
+
}, "version"> & {
|
|
88
|
+
version?: 1;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* @category delegation signature
|
|
92
|
+
*/
|
|
93
|
+
export interface DlgParamsOracle1 extends DlgParamsOracle1Type {
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* @category delegation signature
|
|
97
|
+
*/
|
|
98
|
+
type DlgUnpackedOracle1Type = DlgUnpackedComplex & {
|
|
99
|
+
tag: Tag.Oracle;
|
|
100
|
+
version: 1;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* @category delegation signature
|
|
104
|
+
*/
|
|
105
|
+
export interface DlgUnpackedOracle1 extends DlgUnpackedOracle1Type {
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @category delegation signature
|
|
109
|
+
*/
|
|
110
|
+
type DlgParamsOracleResponse1Type = Omit<DlgParamsComplex & {
|
|
111
|
+
tag: Tag.OracleResponse;
|
|
112
|
+
version: 1;
|
|
113
|
+
}, "version"> & {
|
|
114
|
+
version?: 1;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* @category delegation signature
|
|
118
|
+
*/
|
|
119
|
+
export interface DlgParamsOracleResponse1 extends DlgParamsOracleResponse1Type {
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* @category delegation signature
|
|
123
|
+
*/
|
|
124
|
+
type DlgUnpackedOracleResponse1Type = DlgUnpackedComplex & {
|
|
125
|
+
tag: Tag.OracleResponse;
|
|
126
|
+
version: 1;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* @category delegation signature
|
|
130
|
+
*/
|
|
131
|
+
export interface DlgUnpackedOracleResponse1 extends DlgUnpackedOracleResponse1Type {
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* @category delegation signature
|
|
135
|
+
*/
|
|
136
|
+
export type DlgParams = DlgParamsAensWildcard1 | DlgParamsAensName1 | DlgParamsAensPreclaim1 | DlgParamsOracle1 | DlgParamsOracleResponse1;
|
|
137
|
+
/**
|
|
138
|
+
* @category delegation signature
|
|
139
|
+
*/
|
|
140
|
+
export type DlgUnpacked = DlgUnpackedAensWildcard1 | DlgUnpackedAensName1 | DlgUnpackedAensPreclaim1 | DlgUnpackedOracle1 | DlgUnpackedOracleResponse1;
|
|
141
|
+
export {};
|
|
@@ -2,8 +2,8 @@
|
|
|
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, params: {}): string;
|
|
6
|
-
serialize(value: Int | undefined, params: {}, { denomination }: {
|
|
5
|
+
serializeAettos(value: string | undefined, params: {}, options: {}): string;
|
|
6
|
+
serialize(value: Int | undefined, params: {}, { denomination, ...options }: {
|
|
7
7
|
denomination?: AE_AMOUNT_FORMATS | undefined;
|
|
8
8
|
}): Buffer;
|
|
9
9
|
deserialize(value: Buffer): string;
|