@aeternity/aepp-sdk 12.1.3 → 13.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/aesophia_cli +0 -0
- package/dist/aepp-sdk.browser-script.js +1 -1
- package/dist/aepp-sdk.browser-script.js.map +1 -1
- package/dist/aepp-sdk.browser.js +1 -1
- package/dist/aepp-sdk.browser.js.map +1 -1
- package/dist/aepp-sdk.js +12031 -11231
- package/dist/aepp-sdk.js.map +1 -1
- package/es/AeSdk.d.ts +7 -3
- package/es/AeSdk.mjs +17 -22
- package/es/AeSdk.mjs.map +1 -1
- package/es/AeSdkAepp.d.ts +6 -5
- package/es/AeSdkAepp.mjs +7 -30
- package/es/AeSdkAepp.mjs.map +1 -1
- package/es/AeSdkBase.d.ts +18 -140
- package/es/AeSdkBase.mjs +30 -184
- package/es/AeSdkBase.mjs.map +1 -1
- package/es/AeSdkMethods.d.ts +123 -0
- package/es/AeSdkMethods.mjs +122 -0
- package/es/AeSdkMethods.mjs.map +1 -0
- package/es/AeSdkWallet.d.ts +7 -21
- package/es/AeSdkWallet.mjs +38 -86
- package/es/AeSdkWallet.mjs.map +1 -1
- package/es/Node.d.ts +11 -15
- package/es/Node.mjs +35 -48
- package/es/Node.mjs.map +1 -1
- package/es/account/Base.d.ts +24 -40
- package/es/account/Base.mjs +1 -101
- package/es/account/Base.mjs.map +1 -1
- package/es/account/Generalized.d.ts +16 -0
- package/es/account/Generalized.mjs +113 -0
- package/es/account/Generalized.mjs.map +1 -0
- package/es/account/Ledger.d.ts +28 -0
- package/es/account/Ledger.mjs +102 -0
- package/es/account/Ledger.mjs.map +1 -0
- package/es/account/LedgerFactory.d.ts +39 -0
- package/es/account/LedgerFactory.mjs +81 -0
- package/es/account/LedgerFactory.mjs.map +1 -0
- package/es/account/Memory.d.ts +13 -17
- package/es/account/Memory.mjs +43 -64
- package/es/account/Memory.mjs.map +1 -1
- package/es/account/Rpc.d.ts +6 -8
- package/es/account/Rpc.mjs +14 -32
- package/es/account/Rpc.mjs.map +1 -1
- package/es/aens.d.ts +4 -4
- package/es/aens.mjs +46 -41
- package/es/aens.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection/Browser.mjs +9 -13
- package/es/aepp-wallet-communication/connection/Browser.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection/BrowserRuntime.d.ts +1 -0
- package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs +22 -11
- package/es/aepp-wallet-communication/connection/BrowserRuntime.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.d.ts +1 -1
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs +0 -31
- package/es/aepp-wallet-communication/connection/BrowserWindowMessage.mjs.map +1 -1
- package/es/aepp-wallet-communication/connection-proxy.mjs.map +1 -1
- package/es/aepp-wallet-communication/rpc/RpcClient.d.ts +3 -3
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs +5 -42
- package/es/aepp-wallet-communication/rpc/RpcClient.mjs.map +1 -1
- package/es/aepp-wallet-communication/rpc/types.d.ts +7 -1
- package/es/aepp-wallet-communication/rpc/types.mjs.map +1 -1
- package/es/aepp-wallet-communication/schema.mjs +14 -68
- package/es/aepp-wallet-communication/schema.mjs.map +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.d.ts +23 -29
- package/es/apis/compiler/compiler.mjs +128 -189
- package/es/apis/compiler/compiler.mjs.map +1 -1
- package/es/apis/compiler/index.mjs.map +1 -1
- package/es/apis/compiler/models/index.d.ts +82 -135
- package/es/apis/compiler/models/index.mjs +1 -47
- package/es/apis/compiler/models/index.mjs.map +1 -1
- package/es/apis/compiler/models/mappers.d.ts +8 -8
- package/es/apis/compiler/models/mappers.mjs +165 -183
- package/es/apis/compiler/models/mappers.mjs.map +1 -1
- package/es/apis/compiler/models/parameters.d.ts +0 -1
- package/es/apis/compiler/models/parameters.mjs +5 -9
- package/es/apis/compiler/models/parameters.mjs.map +1 -1
- package/es/apis/node/index.mjs.map +1 -1
- package/es/apis/node/models/index.d.ts +48 -48
- package/es/apis/node/models/mappers.mjs +12 -6
- package/es/apis/node/models/mappers.mjs.map +1 -1
- package/es/apis/node/models/parameters.mjs.map +1 -1
- package/es/apis/node/node.mjs +43 -84
- package/es/apis/node/node.mjs.map +1 -1
- package/es/chain.d.ts +10 -2
- package/es/chain.mjs +37 -59
- package/es/chain.mjs.map +1 -1
- package/es/channel/Base.d.ts +200 -0
- package/es/channel/Base.mjs +293 -0
- package/es/channel/Base.mjs.map +1 -0
- package/es/channel/Contract.d.ts +248 -0
- package/es/channel/Contract.mjs +420 -0
- package/es/channel/Contract.mjs.map +1 -0
- package/es/channel/Spend.d.ts +219 -0
- package/es/channel/Spend.mjs +385 -0
- package/es/channel/Spend.mjs.map +1 -0
- package/es/channel/handlers.d.ts +8 -21
- package/es/channel/handlers.mjs +151 -899
- package/es/channel/handlers.mjs.map +1 -1
- package/es/channel/internal.d.ts +27 -21
- package/es/channel/internal.mjs +101 -191
- package/es/channel/internal.mjs.map +1 -1
- package/es/contract/Contract.d.ts +210 -0
- package/es/contract/Contract.mjs +551 -0
- package/es/contract/Contract.mjs.map +1 -0
- package/es/contract/compiler/Base.d.ts +81 -0
- package/es/contract/compiler/Base.mjs +5 -0
- package/es/contract/compiler/Base.mjs.map +1 -0
- package/es/contract/compiler/Cli.d.ts +23 -0
- package/es/contract/compiler/Cli.mjs +155 -0
- package/es/contract/compiler/Cli.mjs.map +1 -0
- package/es/contract/compiler/Http.d.ts +32 -0
- package/es/contract/compiler/Http.mjs +118 -0
- package/es/contract/compiler/Http.mjs.map +1 -0
- package/es/contract/compiler/HttpNode.d.ts +17 -0
- package/es/contract/compiler/HttpNode.mjs +26 -0
- package/es/contract/compiler/HttpNode.mjs.map +1 -0
- package/es/contract/compiler/getFileSystem.d.ts +6 -0
- package/es/contract/compiler/getFileSystem.mjs +40 -0
- package/es/contract/compiler/getFileSystem.mjs.map +1 -0
- package/es/contract/ga.d.ts +9 -34
- package/es/contract/ga.mjs +29 -112
- package/es/contract/ga.mjs.map +1 -1
- package/es/index-browser.d.ts +39 -0
- package/es/index-browser.mjs +55 -0
- package/es/index-browser.mjs.map +1 -0
- package/es/index.d.ts +4 -35
- package/es/index.mjs +4 -51
- package/es/index.mjs.map +1 -1
- package/es/oracle.d.ts +5 -5
- package/es/oracle.mjs +34 -40
- package/es/oracle.mjs.map +1 -1
- package/es/spend.d.ts +3 -3
- package/es/spend.mjs +18 -23
- package/es/spend.mjs.map +1 -1
- package/es/tx/builder/constants.d.ts +30 -2
- package/es/tx/builder/constants.mjs +43 -14
- package/es/tx/builder/constants.mjs.map +1 -1
- package/es/tx/builder/field-types/abi-version.d.ts +10 -0
- package/es/tx/builder/field-types/abi-version.mjs +20 -0
- package/es/tx/builder/field-types/abi-version.mjs.map +1 -0
- package/es/tx/builder/field-types/address.d.ts +14 -0
- package/es/tx/builder/field-types/address.mjs +51 -0
- package/es/tx/builder/field-types/address.mjs.map +1 -0
- package/es/tx/builder/field-types/array.d.ts +7 -0
- package/es/tx/builder/field-types/array.mjs +11 -0
- package/es/tx/builder/field-types/array.mjs.map +1 -0
- package/es/tx/builder/field-types/boolean.d.ts +6 -0
- package/es/tx/builder/field-types/boolean.mjs +13 -0
- package/es/tx/builder/field-types/boolean.mjs.map +1 -0
- package/es/tx/builder/field-types/coin-amount.d.ts +2 -3
- package/es/tx/builder/field-types/coin-amount.mjs +4 -12
- package/es/tx/builder/field-types/coin-amount.mjs.map +1 -1
- package/es/tx/builder/field-types/ct-version.d.ts +30 -0
- package/es/tx/builder/field-types/ct-version.mjs +48 -0
- package/es/tx/builder/field-types/ct-version.mjs.map +1 -0
- package/es/tx/builder/field-types/deposit.d.ts +1 -2
- package/es/tx/builder/field-types/deposit.mjs +2 -4
- package/es/tx/builder/field-types/deposit.mjs.map +1 -1
- package/es/tx/builder/field-types/encoded.d.ts +6 -0
- package/es/tx/builder/field-types/encoded.mjs +21 -0
- package/es/tx/builder/field-types/encoded.mjs.map +1 -0
- package/es/tx/builder/field-types/entry.d.ts +11 -0
- package/es/tx/builder/field-types/entry.mjs +31 -0
- package/es/tx/builder/field-types/entry.mjs.map +1 -0
- package/es/tx/builder/field-types/enumeration.d.ts +7 -0
- package/es/tx/builder/field-types/enumeration.mjs +30 -0
- package/es/tx/builder/field-types/enumeration.mjs.map +1 -0
- package/es/tx/builder/field-types/fee.d.ts +10 -15
- package/es/tx/builder/field-types/fee.mjs +31 -43
- package/es/tx/builder/field-types/fee.mjs.map +1 -1
- package/es/tx/builder/field-types/field.mjs +0 -2
- package/es/tx/builder/field-types/field.mjs.map +1 -1
- package/es/tx/builder/field-types/gas-limit.d.ts +5 -2
- package/es/tx/builder/field-types/gas-limit.mjs +12 -14
- package/es/tx/builder/field-types/gas-limit.mjs.map +1 -1
- package/es/tx/builder/field-types/gas-price.d.ts +1 -2
- package/es/tx/builder/field-types/gas-price.mjs +3 -7
- package/es/tx/builder/field-types/gas-price.mjs.map +1 -1
- package/es/tx/builder/field-types/index.d.ts +80 -30
- package/es/tx/builder/field-types/index.mjs +34 -9
- package/es/tx/builder/field-types/index.mjs.map +1 -1
- package/es/tx/builder/field-types/mptree.d.ts +37 -0
- package/es/tx/builder/field-types/mptree.mjs +268 -0
- package/es/tx/builder/field-types/mptree.mjs.map +1 -0
- package/es/tx/builder/field-types/name-fee.d.ts +1 -3
- package/es/tx/builder/field-types/name-fee.mjs +3 -5
- package/es/tx/builder/field-types/name-fee.mjs.map +1 -1
- package/es/tx/builder/field-types/name-id.d.ts +1 -4
- package/es/tx/builder/field-types/name-id.mjs +5 -10
- package/es/tx/builder/field-types/name-id.mjs.map +1 -1
- package/es/tx/builder/field-types/name.mjs +0 -2
- package/es/tx/builder/field-types/name.mjs.map +1 -1
- package/es/tx/builder/field-types/pointers.d.ts +23 -0
- package/es/tx/builder/field-types/pointers.mjs +36 -0
- package/es/tx/builder/field-types/pointers.mjs.map +1 -0
- package/es/tx/builder/field-types/raw.d.ts +6 -0
- package/es/tx/builder/field-types/raw.mjs +13 -0
- package/es/tx/builder/field-types/raw.mjs.map +1 -0
- package/es/tx/builder/field-types/short-u-int-const.d.ts +5 -0
- package/es/tx/builder/field-types/short-u-int-const.mjs +16 -0
- package/es/tx/builder/field-types/short-u-int-const.mjs.map +1 -0
- package/es/tx/builder/field-types/short-u-int.mjs +0 -2
- package/es/tx/builder/field-types/short-u-int.mjs.map +1 -1
- package/es/tx/builder/field-types/string.d.ts +6 -0
- package/es/tx/builder/field-types/string.mjs +10 -0
- package/es/tx/builder/field-types/string.mjs.map +1 -0
- package/es/tx/builder/field-types/u-int.d.ts +1 -2
- package/es/tx/builder/field-types/u-int.mjs +3 -4
- package/es/tx/builder/field-types/u-int.mjs.map +1 -1
- package/es/tx/builder/helpers.d.ts +2 -32
- package/es/tx/builder/helpers.mjs +19 -71
- package/es/tx/builder/helpers.mjs.map +1 -1
- package/es/tx/builder/index.d.ts +11 -49
- package/es/tx/builder/index.mjs +57 -337
- package/es/tx/builder/index.mjs.map +1 -1
- package/es/tx/builder/schema.d.ts +2367 -667
- package/es/tx/builder/schema.mjs +70 -145
- package/es/tx/builder/schema.mjs.map +1 -1
- package/es/tx/index.d.ts +4 -49
- package/es/tx/index.mjs +38 -112
- package/es/tx/index.mjs.map +1 -1
- package/es/tx/validator.d.ts +4 -6
- package/es/tx/validator.mjs +104 -90
- package/es/tx/validator.mjs.map +1 -1
- package/es/typings/{@aeternity__argon2-browser → @aeternity__aepp-calldata}/index.d.mjs +0 -0
- package/es/typings/@aeternity__aepp-calldata/index.d.mjs.map +1 -0
- package/es/utils/amount-formatter.mjs +4 -10
- package/es/utils/amount-formatter.mjs.map +1 -1
- package/es/utils/autorest.d.ts +1 -0
- package/es/utils/autorest.mjs +17 -19
- package/es/utils/autorest.mjs.map +1 -1
- package/es/utils/bignumber.mjs +4 -7
- package/es/utils/bignumber.mjs.map +1 -1
- package/es/utils/bytes.d.ts +0 -17
- package/es/utils/bytes.mjs +6 -35
- package/es/utils/bytes.mjs.map +1 -1
- package/es/utils/crypto.d.ts +15 -8
- package/es/utils/crypto.mjs +40 -40
- package/es/utils/crypto.mjs.map +1 -1
- package/es/utils/encoder-types.d.ts +28 -28
- package/es/utils/encoder-types.mjs +0 -1
- package/es/utils/encoder-types.mjs.map +1 -1
- package/es/utils/encoder.d.ts +0 -1
- package/es/utils/encoder.mjs +7 -15
- package/es/utils/encoder.mjs.map +1 -1
- package/es/utils/errors.d.ts +15 -14
- package/es/utils/errors.mjs +86 -172
- package/es/utils/errors.mjs.map +1 -1
- package/es/utils/hd-wallet.d.ts +27 -19
- package/es/utils/hd-wallet.mjs +42 -26
- package/es/utils/hd-wallet.mjs.map +1 -1
- package/es/utils/json-big.mjs +0 -8
- package/es/utils/json-big.mjs.map +1 -1
- package/es/utils/keystore.d.ts +2 -0
- package/es/utils/keystore.mjs +37 -36
- package/es/utils/keystore.mjs.map +1 -1
- package/es/utils/other.d.ts +4 -2
- package/es/utils/other.mjs +11 -7
- package/es/utils/other.mjs.map +1 -1
- package/es/utils/semver-satisfies.mjs +0 -3
- package/es/utils/semver-satisfies.mjs.map +1 -1
- package/es/utils/string.d.ts +0 -12
- package/es/utils/string.mjs +1 -21
- package/es/utils/string.mjs.map +1 -1
- package/package.json +98 -51
- package/src/AeSdk.ts +15 -11
- package/src/AeSdkAepp.ts +9 -7
- package/src/AeSdkBase.ts +31 -202
- package/src/AeSdkMethods.ts +169 -0
- package/src/AeSdkWallet.ts +16 -47
- package/src/Node.ts +17 -18
- package/src/account/Base.ts +29 -75
- package/src/account/Generalized.ts +98 -0
- package/src/account/Ledger.ts +131 -0
- package/src/account/LedgerFactory.ts +86 -0
- package/src/account/Memory.ts +46 -60
- package/src/account/Rpc.ts +17 -26
- package/src/aens.ts +13 -11
- package/src/aepp-wallet-communication/connection/BrowserRuntime.ts +21 -9
- package/src/aepp-wallet-communication/connection/BrowserWindowMessage.ts +3 -3
- package/src/aepp-wallet-communication/rpc/RpcClient.ts +4 -4
- package/src/aepp-wallet-communication/rpc/types.ts +11 -1
- package/src/aepp-wallet-communication/schema.ts +18 -18
- package/src/apis/compiler/code-model-v4.yaml +681 -888
- package/src/apis/compiler/compiler.ts +113 -154
- package/src/apis/compiler/models/index.ts +80 -140
- package/src/apis/compiler/models/mappers.ts +165 -183
- package/src/apis/compiler/models/parameters.ts +6 -12
- package/src/chain.ts +11 -6
- package/src/channel/Base.ts +335 -0
- package/src/channel/Contract.ts +488 -0
- package/src/channel/Spend.ts +408 -0
- package/src/channel/handlers.ts +164 -582
- package/src/channel/internal.ts +114 -143
- package/src/contract/Contract.ts +610 -0
- package/src/contract/compiler/Base.ts +94 -0
- package/src/contract/compiler/Cli.ts +134 -0
- package/src/contract/compiler/Http.ts +124 -0
- package/src/contract/compiler/HttpNode.ts +26 -0
- package/src/contract/compiler/getFileSystem.ts +42 -0
- package/src/contract/ga.ts +23 -106
- package/src/index-browser.ts +58 -0
- package/src/index.ts +4 -55
- package/src/oracle.ts +8 -8
- package/src/spend.ts +6 -14
- package/src/tx/builder/constants.ts +33 -3
- package/src/tx/builder/field-types/abi-version.ts +21 -0
- package/src/tx/builder/field-types/address.ts +62 -0
- package/src/tx/builder/field-types/array.ts +19 -0
- package/src/tx/builder/field-types/boolean.ts +9 -0
- package/src/tx/builder/field-types/coin-amount.ts +4 -9
- package/src/tx/builder/field-types/ct-version.ts +50 -0
- package/src/tx/builder/field-types/deposit.ts +1 -1
- package/src/tx/builder/field-types/encoded.ts +27 -0
- package/src/tx/builder/field-types/entry.ts +31 -0
- package/src/tx/builder/field-types/enumeration.ts +32 -0
- package/src/tx/builder/field-types/fee.ts +39 -21
- package/src/tx/builder/field-types/gas-limit.ts +13 -8
- package/src/tx/builder/field-types/gas-price.ts +0 -2
- package/src/tx/builder/field-types/index.ts +54 -15
- package/src/tx/builder/field-types/mptree.ts +242 -0
- package/src/tx/builder/field-types/name-fee.ts +2 -3
- package/src/tx/builder/field-types/name-id.ts +7 -10
- package/src/tx/builder/field-types/pointers.ts +41 -0
- package/src/tx/builder/field-types/raw.ts +9 -0
- package/src/tx/builder/field-types/short-u-int-const.ts +20 -0
- package/src/tx/builder/field-types/string.ts +11 -0
- package/src/tx/builder/field-types/u-int.ts +4 -5
- package/src/tx/builder/helpers.ts +10 -60
- package/src/tx/builder/index.ts +65 -308
- package/src/tx/builder/schema.ts +280 -341
- package/src/tx/index.ts +40 -103
- package/src/tx/validator.ts +91 -96
- package/src/typings/@aeternity__aepp-calldata/index.d.ts +20 -0
- package/src/utils/autorest.ts +16 -1
- package/src/utils/bytes.ts +6 -34
- package/src/utils/crypto.ts +23 -16
- package/src/utils/encoder.ts +0 -1
- package/src/utils/errors.ts +22 -25
- package/src/utils/hd-wallet.ts +30 -9
- package/src/utils/keystore.ts +24 -21
- package/src/utils/other.ts +16 -1
- package/src/utils/string.ts +0 -20
- package/types-legacy/ts4.2/AeSdk.d.ts +41 -0
- package/types-legacy/ts4.2/AeSdkAepp.d.ts +71 -0
- package/types-legacy/ts4.2/AeSdkBase.d.ts +91 -0
- package/types-legacy/ts4.2/AeSdkMethods.d.ts +140 -0
- package/types-legacy/ts4.2/AeSdkWallet.d.ts +90 -0
- package/types-legacy/ts4.2/Node.d.ts +78 -0
- package/types-legacy/ts4.2/account/Base.d.ts +52 -0
- package/types-legacy/ts4.2/account/Generalized.d.ts +16 -0
- package/types-legacy/ts4.2/account/Ledger.d.ts +28 -0
- package/types-legacy/ts4.2/account/LedgerFactory.d.ts +39 -0
- package/types-legacy/ts4.2/account/Memory.d.ts +22 -0
- package/types-legacy/ts4.2/account/Rpc.d.ts +25 -0
- package/types-legacy/ts4.2/aens.d.ts +222 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/connection/Browser.d.ts +33 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/connection/BrowserRuntime.d.ts +19 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/connection/BrowserWindowMessage.d.ts +36 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/connection-proxy.d.ts +11 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/rpc/RpcClient.d.ts +34 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/rpc/types.d.ts +83 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/schema.d.ts +133 -0
- package/types-legacy/ts4.2/aepp-wallet-communication/wallet-detector.d.ts +25 -0
- package/types-legacy/ts4.2/apis/compiler/compiler.d.ts +86 -0
- package/types-legacy/ts4.2/apis/compiler/index.d.ts +2 -0
- package/types-legacy/ts4.2/apis/compiler/models/index.d.ts +195 -0
- package/types-legacy/ts4.2/apis/compiler/models/mappers.d.ts +23 -0
- package/types-legacy/ts4.2/apis/compiler/models/parameters.d.ts +12 -0
- package/types-legacy/ts4.2/apis/node/index.d.ts +2 -0
- package/types-legacy/ts4.2/apis/node/models/index.d.ts +1065 -0
- package/types-legacy/ts4.2/apis/node/models/mappers.d.ts +95 -0
- package/types-legacy/ts4.2/apis/node/models/parameters.d.ts +17 -0
- package/types-legacy/ts4.2/apis/node/node.d.ts +215 -0
- package/types-legacy/ts4.2/chain.d.ts +256 -0
- package/types-legacy/ts4.2/channel/Base.d.ts +199 -0
- package/types-legacy/ts4.2/channel/Contract.d.ts +248 -0
- package/types-legacy/ts4.2/channel/Spend.d.ts +219 -0
- package/types-legacy/ts4.2/channel/handlers.d.ts +21 -0
- package/types-legacy/ts4.2/channel/internal.d.ts +107 -0
- package/types-legacy/ts4.2/contract/Contract.d.ts +212 -0
- package/types-legacy/ts4.2/contract/compiler/Base.d.ts +81 -0
- package/types-legacy/ts4.2/contract/compiler/Cli.d.ts +23 -0
- package/types-legacy/ts4.2/contract/compiler/Http.d.ts +32 -0
- package/types-legacy/ts4.2/contract/compiler/HttpNode.d.ts +17 -0
- package/types-legacy/ts4.2/contract/compiler/getFileSystem.d.ts +6 -0
- package/types-legacy/ts4.2/contract/ga.d.ts +44 -0
- package/types-legacy/ts4.2/globals.d.ts +16 -0
- package/types-legacy/ts4.2/index-browser.d.ts +39 -0
- package/types-legacy/ts4.2/index.d.ts +5 -0
- package/types-legacy/ts4.2/oracle.d.ts +161 -0
- package/types-legacy/ts4.2/spend.d.ts +62 -0
- package/types-legacy/ts4.2/tx/builder/constants.d.ts +98 -0
- package/types-legacy/ts4.2/tx/builder/field-types/abi-version.d.ts +10 -0
- package/types-legacy/ts4.2/tx/builder/field-types/address.d.ts +21 -0
- package/types-legacy/ts4.2/tx/builder/field-types/array.d.ts +7 -0
- package/types-legacy/ts4.2/tx/builder/field-types/boolean.d.ts +6 -0
- package/types-legacy/ts4.2/tx/builder/field-types/coin-amount.d.ts +12 -0
- package/types-legacy/ts4.2/tx/builder/field-types/ct-version.d.ts +42 -0
- package/types-legacy/ts4.2/tx/builder/field-types/deposit.d.ts +14 -0
- package/types-legacy/ts4.2/tx/builder/field-types/encoded.d.ts +6 -0
- package/types-legacy/ts4.2/tx/builder/field-types/entry.d.ts +11 -0
- package/types-legacy/ts4.2/tx/builder/field-types/enumeration.d.ts +7 -0
- package/types-legacy/ts4.2/tx/builder/field-types/fee.d.ts +20 -0
- package/types-legacy/ts4.2/tx/builder/field-types/field.d.ts +6 -0
- package/types-legacy/ts4.2/tx/builder/field-types/gas-limit.d.ts +15 -0
- package/types-legacy/ts4.2/tx/builder/field-types/gas-price.d.ts +7 -0
- package/types-legacy/ts4.2/tx/builder/field-types/index.d.ts +129 -0
- package/types-legacy/ts4.2/tx/builder/field-types/mptree.d.ts +43 -0
- package/types-legacy/ts4.2/tx/builder/field-types/name-fee.d.ts +18 -0
- package/types-legacy/ts4.2/tx/builder/field-types/name-id.d.ts +11 -0
- package/types-legacy/ts4.2/tx/builder/field-types/name.d.ts +13 -0
- package/types-legacy/ts4.2/tx/builder/field-types/pointers.d.ts +26 -0
- package/types-legacy/ts4.2/tx/builder/field-types/raw.d.ts +6 -0
- package/types-legacy/ts4.2/tx/builder/field-types/short-u-int-const.d.ts +5 -0
- package/types-legacy/ts4.2/tx/builder/field-types/short-u-int.d.ts +6 -0
- package/types-legacy/ts4.2/tx/builder/field-types/string.d.ts +6 -0
- package/types-legacy/ts4.2/tx/builder/field-types/u-int.d.ts +7 -0
- package/types-legacy/ts4.2/tx/builder/helpers.d.ts +112 -0
- package/types-legacy/ts4.2/tx/builder/index.d.ts +50 -0
- package/types-legacy/ts4.2/tx/builder/schema.d.ts +4675 -0
- package/types-legacy/ts4.2/tx/index.d.ts +19 -0
- package/types-legacy/ts4.2/tx/validator.d.ts +18 -0
- package/types-legacy/ts4.2/utils/amount-formatter.d.ts +42 -0
- package/types-legacy/ts4.2/utils/autorest.d.ts +7 -0
- package/types-legacy/ts4.2/utils/bignumber.d.ts +13 -0
- package/types-legacy/ts4.2/utils/bytes.d.ts +9 -0
- package/types-legacy/ts4.2/utils/crypto.d.ts +95 -0
- package/types-legacy/ts4.2/utils/encoder-types.d.ts +61 -0
- package/types-legacy/ts4.2/utils/encoder.d.ts +24 -0
- package/types-legacy/ts4.2/utils/errors.d.ts +475 -0
- package/types-legacy/ts4.2/utils/hd-wallet.d.ts +65 -0
- package/types-legacy/ts4.2/utils/json-big.d.ts +5 -0
- package/types-legacy/ts4.2/utils/keystore.d.ts +53 -0
- package/types-legacy/ts4.2/utils/other.d.ts +31 -0
- package/types-legacy/ts4.2/utils/semver-satisfies.d.ts +1 -0
- package/types-legacy/ts4.2/utils/string.d.ts +12 -0
- package/types-legacy/ts4.5/AeSdk.d.ts +41 -0
- package/types-legacy/ts4.5/AeSdkAepp.d.ts +71 -0
- package/types-legacy/ts4.5/AeSdkBase.d.ts +91 -0
- package/types-legacy/ts4.5/AeSdkMethods.d.ts +140 -0
- package/types-legacy/ts4.5/AeSdkWallet.d.ts +90 -0
- package/types-legacy/ts4.5/Node.d.ts +78 -0
- package/types-legacy/ts4.5/account/Base.d.ts +52 -0
- package/types-legacy/ts4.5/account/Generalized.d.ts +16 -0
- package/types-legacy/ts4.5/account/Ledger.d.ts +28 -0
- package/types-legacy/ts4.5/account/LedgerFactory.d.ts +39 -0
- package/types-legacy/ts4.5/account/Memory.d.ts +22 -0
- package/types-legacy/ts4.5/account/Rpc.d.ts +25 -0
- package/types-legacy/ts4.5/aens.d.ts +222 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/connection/Browser.d.ts +33 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/connection/BrowserRuntime.d.ts +19 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/connection/BrowserWindowMessage.d.ts +36 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/connection-proxy.d.ts +11 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/rpc/RpcClient.d.ts +34 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/rpc/types.d.ts +83 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/schema.d.ts +133 -0
- package/types-legacy/ts4.5/aepp-wallet-communication/wallet-detector.d.ts +25 -0
- package/types-legacy/ts4.5/apis/compiler/compiler.d.ts +86 -0
- package/types-legacy/ts4.5/apis/compiler/index.d.ts +2 -0
- package/types-legacy/ts4.5/apis/compiler/models/index.d.ts +195 -0
- package/types-legacy/ts4.5/apis/compiler/models/mappers.d.ts +23 -0
- package/types-legacy/ts4.5/apis/compiler/models/parameters.d.ts +12 -0
- package/types-legacy/ts4.5/apis/node/index.d.ts +2 -0
- package/types-legacy/ts4.5/apis/node/models/index.d.ts +1065 -0
- package/types-legacy/ts4.5/apis/node/models/mappers.d.ts +95 -0
- package/types-legacy/ts4.5/apis/node/models/parameters.d.ts +17 -0
- package/types-legacy/ts4.5/apis/node/node.d.ts +215 -0
- package/types-legacy/ts4.5/chain.d.ts +256 -0
- package/types-legacy/ts4.5/channel/Base.d.ts +199 -0
- package/types-legacy/ts4.5/channel/Contract.d.ts +248 -0
- package/types-legacy/ts4.5/channel/Spend.d.ts +219 -0
- package/types-legacy/ts4.5/channel/handlers.d.ts +21 -0
- package/types-legacy/ts4.5/channel/internal.d.ts +107 -0
- package/types-legacy/ts4.5/contract/Contract.d.ts +212 -0
- package/types-legacy/ts4.5/contract/compiler/Base.d.ts +81 -0
- package/types-legacy/ts4.5/contract/compiler/Cli.d.ts +23 -0
- package/types-legacy/ts4.5/contract/compiler/Http.d.ts +32 -0
- package/types-legacy/ts4.5/contract/compiler/HttpNode.d.ts +17 -0
- package/types-legacy/ts4.5/contract/compiler/getFileSystem.d.ts +6 -0
- package/types-legacy/ts4.5/contract/ga.d.ts +44 -0
- package/types-legacy/ts4.5/index-browser.d.ts +39 -0
- package/types-legacy/ts4.5/index.d.ts +4 -0
- package/types-legacy/ts4.5/oracle.d.ts +161 -0
- package/types-legacy/ts4.5/spend.d.ts +62 -0
- package/types-legacy/ts4.5/tx/builder/constants.d.ts +98 -0
- package/types-legacy/ts4.5/tx/builder/field-types/abi-version.d.ts +10 -0
- package/types-legacy/ts4.5/tx/builder/field-types/address.d.ts +21 -0
- package/types-legacy/ts4.5/tx/builder/field-types/array.d.ts +7 -0
- package/types-legacy/ts4.5/tx/builder/field-types/boolean.d.ts +6 -0
- package/types-legacy/ts4.5/tx/builder/field-types/coin-amount.d.ts +12 -0
- package/types-legacy/ts4.5/tx/builder/field-types/ct-version.d.ts +42 -0
- package/types-legacy/ts4.5/tx/builder/field-types/deposit.d.ts +14 -0
- package/types-legacy/ts4.5/tx/builder/field-types/encoded.d.ts +6 -0
- package/types-legacy/ts4.5/tx/builder/field-types/entry.d.ts +11 -0
- package/types-legacy/ts4.5/tx/builder/field-types/enumeration.d.ts +7 -0
- package/types-legacy/ts4.5/tx/builder/field-types/fee.d.ts +20 -0
- package/types-legacy/ts4.5/tx/builder/field-types/field.d.ts +6 -0
- package/types-legacy/ts4.5/tx/builder/field-types/gas-limit.d.ts +15 -0
- package/types-legacy/ts4.5/tx/builder/field-types/gas-price.d.ts +7 -0
- package/types-legacy/ts4.5/tx/builder/field-types/index.d.ts +129 -0
- package/types-legacy/ts4.5/tx/builder/field-types/mptree.d.ts +43 -0
- package/types-legacy/ts4.5/tx/builder/field-types/name-fee.d.ts +18 -0
- package/types-legacy/ts4.5/tx/builder/field-types/name-id.d.ts +11 -0
- package/types-legacy/ts4.5/tx/builder/field-types/name.d.ts +13 -0
- package/types-legacy/ts4.5/tx/builder/field-types/pointers.d.ts +26 -0
- package/types-legacy/ts4.5/tx/builder/field-types/raw.d.ts +6 -0
- package/types-legacy/ts4.5/tx/builder/field-types/short-u-int-const.d.ts +5 -0
- package/types-legacy/ts4.5/tx/builder/field-types/short-u-int.d.ts +6 -0
- package/types-legacy/ts4.5/tx/builder/field-types/string.d.ts +6 -0
- package/types-legacy/ts4.5/tx/builder/field-types/u-int.d.ts +7 -0
- package/types-legacy/ts4.5/tx/builder/helpers.d.ts +112 -0
- package/types-legacy/ts4.5/tx/builder/index.d.ts +50 -0
- package/types-legacy/ts4.5/tx/builder/schema.d.ts +4675 -0
- package/types-legacy/ts4.5/tx/index.d.ts +19 -0
- package/types-legacy/ts4.5/tx/validator.d.ts +18 -0
- package/types-legacy/ts4.5/utils/amount-formatter.d.ts +42 -0
- package/types-legacy/ts4.5/utils/autorest.d.ts +7 -0
- package/types-legacy/ts4.5/utils/bignumber.d.ts +13 -0
- package/types-legacy/ts4.5/utils/bytes.d.ts +9 -0
- package/types-legacy/ts4.5/utils/crypto.d.ts +95 -0
- package/types-legacy/ts4.5/utils/encoder-types.d.ts +61 -0
- package/types-legacy/ts4.5/utils/encoder.d.ts +24 -0
- package/types-legacy/ts4.5/utils/errors.d.ts +475 -0
- package/types-legacy/ts4.5/utils/hd-wallet.d.ts +65 -0
- package/types-legacy/ts4.5/utils/json-big.d.ts +5 -0
- package/types-legacy/ts4.5/utils/keystore.d.ts +53 -0
- package/types-legacy/ts4.5/utils/other.d.ts +31 -0
- package/types-legacy/ts4.5/utils/semver-satisfies.d.ts +1 -0
- package/types-legacy/ts4.5/utils/string.d.ts +12 -0
- package/es/channel/index.d.ts +0 -625
- package/es/channel/index.mjs +0 -975
- package/es/channel/index.mjs.map +0 -1
- package/es/contract/Compiler.d.ts +0 -18
- package/es/contract/Compiler.mjs +0 -68
- package/es/contract/Compiler.mjs.map +0 -1
- package/es/contract/aci.d.ts +0 -127
- package/es/contract/aci.mjs +0 -508
- package/es/contract/aci.mjs.map +0 -1
- package/es/contract/methods.d.ts +0 -71
- package/es/contract/methods.mjs +0 -104
- package/es/contract/methods.mjs.map +0 -1
- package/es/deprecated/index.d.ts +0 -143
- package/es/deprecated/index.mjs +0 -162
- package/es/deprecated/index.mjs.map +0 -1
- package/es/deprecated/methods.d.ts +0 -18
- package/es/deprecated/methods.mjs +0 -26
- package/es/deprecated/methods.mjs.map +0 -1
- package/es/tx/builder/address.d.ts +0 -25
- package/es/tx/builder/address.mjs +0 -45
- package/es/tx/builder/address.mjs.map +0 -1
- package/es/typings/@aeternity__argon2-browser/index.d.mjs.map +0 -1
- package/es/utils/mptree.d.ts +0 -26
- package/es/utils/mptree.mjs +0 -165
- package/es/utils/mptree.mjs.map +0 -1
- package/src/channel/index.ts +0 -1025
- package/src/contract/Compiler.ts +0 -67
- package/src/contract/aci.ts +0 -537
- package/src/contract/methods.ts +0 -123
- package/src/deprecated/index.ts +0 -172
- package/src/deprecated/methods.ts +0 -25
- package/src/tx/builder/address.ts +0 -50
- package/src/typings/@aeternity__argon2-browser/index.d.ts +0 -3
- package/src/utils/mptree.ts +0 -145
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Oracle methods - routines to interact with the æternity oracle system
|
|
3
|
+
*
|
|
4
|
+
* The high-level description of the oracle system is
|
|
5
|
+
* https://github.com/aeternity/protocol/blob/master/ORACLE.md in the protocol
|
|
6
|
+
* repository.
|
|
7
|
+
*/
|
|
8
|
+
import BigNumber from 'bignumber.js';
|
|
9
|
+
import { send, SendOptions } from './spend';
|
|
10
|
+
import { ORACLE_TTL_TYPES } from './tx/builder/schema';
|
|
11
|
+
import { Tag } from './tx/builder/constants';
|
|
12
|
+
import { Encoded } from './utils/encoder';
|
|
13
|
+
import { _getPollInterval } from './chain';
|
|
14
|
+
import { BuildTxOptions } from './tx';
|
|
15
|
+
import Node from './Node';
|
|
16
|
+
import AccountBase from './account/Base';
|
|
17
|
+
type OracleQueries = Awaited<ReturnType<Node['getOracleQueriesByPubkey']>>['oracleQueries'];
|
|
18
|
+
/**
|
|
19
|
+
* Poll for oracle queries
|
|
20
|
+
* @category oracle
|
|
21
|
+
* @param oracleId - Oracle public key
|
|
22
|
+
* @param onQuery - OnQuery callback
|
|
23
|
+
* @param options - Options object
|
|
24
|
+
* @param options.interval - Poll interval(default: 5000)
|
|
25
|
+
* @param options.onNode - Node to use
|
|
26
|
+
* @returns Callback to stop polling function
|
|
27
|
+
*/
|
|
28
|
+
export declare function pollForQueries(oracleId: Encoded.OracleAddress, onQuery: (queries: OracleQueries) => void, { interval, onNode, ...options }: {
|
|
29
|
+
interval?: number;
|
|
30
|
+
onNode: Node;
|
|
31
|
+
} & Parameters<typeof _getPollInterval>[1]): () => void;
|
|
32
|
+
/**
|
|
33
|
+
* Poll for oracle query response
|
|
34
|
+
* @category oracle
|
|
35
|
+
* @param oracleId - Oracle public key
|
|
36
|
+
* @param queryId - Oracle Query id
|
|
37
|
+
* @param options - Options object
|
|
38
|
+
* @param options.interval - Poll interval
|
|
39
|
+
* @param options.onNode - Node to use
|
|
40
|
+
* @returns OracleQuery object
|
|
41
|
+
*/
|
|
42
|
+
export declare function pollForQueryResponse(oracleId: Encoded.OracleAddress, queryId: Encoded.OracleQueryId, { interval, onNode, ...options }: {
|
|
43
|
+
interval?: number;
|
|
44
|
+
onNode: Node;
|
|
45
|
+
} & Parameters<typeof _getPollInterval>[1]): Promise<string>;
|
|
46
|
+
/**
|
|
47
|
+
* Constructor for OracleQuery Object (helper object for using OracleQuery)
|
|
48
|
+
* @category oracle
|
|
49
|
+
* @param oracleId - Oracle public key
|
|
50
|
+
* @param queryId - Oracle Query id
|
|
51
|
+
* @param options - Options
|
|
52
|
+
* @returns OracleQuery object
|
|
53
|
+
*/
|
|
54
|
+
export declare function getQueryObject(oracleId: Encoded.OracleAddress, queryId: Encoded.OracleQueryId, options: RespondToQueryOptions & Parameters<typeof pollForQueryResponse>[2]): Promise<GetQueryObjectReturnType>;
|
|
55
|
+
interface GetQueryObjectReturnType extends Awaited<ReturnType<Node['getOracleQueryByPubkeyAndQueryId']>> {
|
|
56
|
+
decodedQuery: string;
|
|
57
|
+
decodedResponse: string;
|
|
58
|
+
respond: (response: string, options?: Parameters<typeof respondToQuery>[3]) => ReturnType<typeof respondToQuery>;
|
|
59
|
+
pollForResponse: (options?: Parameters<typeof pollForQueryResponse>[2]) => ReturnType<typeof pollForQueryResponse>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Post query to oracle
|
|
63
|
+
* @category oracle
|
|
64
|
+
* @param oracleId - Oracle public key
|
|
65
|
+
* @param query - Oracle query object
|
|
66
|
+
* @param options - Options object
|
|
67
|
+
* @param options.queryTtl - queryTtl Oracle query time to leave
|
|
68
|
+
* @param options.responseTtl - queryFee Oracle query response time to leave
|
|
69
|
+
* @param options.queryFee - queryFee Oracle query fee
|
|
70
|
+
* @param options.fee - fee Transaction fee
|
|
71
|
+
* @param options.ttl - Transaction time to leave
|
|
72
|
+
* @returns Query object
|
|
73
|
+
*/
|
|
74
|
+
export declare function postQueryToOracle(oracleId: Encoded.OracleAddress, query: string, options: PostQueryToOracleOptions): Promise<Awaited<ReturnType<typeof send>> & Awaited<ReturnType<typeof getQueryObject>>>;
|
|
75
|
+
type PostQueryToOracleOptionsType = Parameters<typeof send>[1] & Parameters<typeof getQueryObject>[2] & BuildTxOptions<Tag.OracleQueryTx, 'oracleId' | 'senderId' | 'query' | 'queryTtlType' | 'queryTtlValue' | 'responseTtlType' | 'responseTtlValue'> & {
|
|
76
|
+
queryTtlType?: ORACLE_TTL_TYPES;
|
|
77
|
+
queryTtlValue?: number;
|
|
78
|
+
responseTtlType?: ORACLE_TTL_TYPES;
|
|
79
|
+
responseTtlValue?: number;
|
|
80
|
+
};
|
|
81
|
+
interface PostQueryToOracleOptions extends PostQueryToOracleOptionsType {
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Extend oracle ttl
|
|
85
|
+
* @category oracle
|
|
86
|
+
* @param oracleId - Oracle public key
|
|
87
|
+
* @param options - Options object
|
|
88
|
+
* @param options.fee - fee Transaction fee
|
|
89
|
+
* @param options.ttl - Transaction time to leave
|
|
90
|
+
* @param options.oracleTtlType - Oracle time to leave for extend
|
|
91
|
+
* @param options.oracleTtlValue - Oracle time to leave for extend
|
|
92
|
+
* @returns Oracle object
|
|
93
|
+
*/
|
|
94
|
+
export declare function extendOracleTtl(oracleId: Encoded.OracleAddress, options: ExtendOracleTtlOptions): Promise<Awaited<ReturnType<typeof send>> & Awaited<ReturnType<typeof getOracleObject>>>;
|
|
95
|
+
type ExtendOracleTtlOptionsType = SendOptions & Parameters<typeof getOracleObject>[1] & BuildTxOptions<Tag.OracleExtendTx, 'oracleTtlType' | 'oracleTtlValue' | 'callerId' | 'oracleId'> & {
|
|
96
|
+
oracleTtlType?: ORACLE_TTL_TYPES;
|
|
97
|
+
oracleTtlValue?: number;
|
|
98
|
+
};
|
|
99
|
+
interface ExtendOracleTtlOptions extends ExtendOracleTtlOptionsType {
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Extend oracle ttl
|
|
103
|
+
* @category oracle
|
|
104
|
+
* @param oracleId - Oracle public key
|
|
105
|
+
* @param queryId - Oracle query id
|
|
106
|
+
* @param response - Oracle query response
|
|
107
|
+
* @param options - Options object
|
|
108
|
+
* @param options.responseTtl - responseTtl Query response time to leave
|
|
109
|
+
* @param options.fee - Transaction fee
|
|
110
|
+
* @param options.ttl - Transaction time to leave
|
|
111
|
+
* @returns Oracle object
|
|
112
|
+
*/
|
|
113
|
+
export declare function respondToQuery(oracleId: Encoded.OracleAddress, queryId: Encoded.OracleQueryId, response: string, options: RespondToQueryOptions): Promise<Awaited<ReturnType<typeof send>> & Awaited<ReturnType<typeof getOracleObject>>>;
|
|
114
|
+
type RespondToQueryOptionsType = SendOptions & Parameters<typeof getOracleObject>[1] & BuildTxOptions<Tag.OracleResponseTx, 'callerId' | 'oracleId' | 'queryId' | 'response' | 'responseTtlType' | 'responseTtlValue'> & {
|
|
115
|
+
responseTtlType?: ORACLE_TTL_TYPES;
|
|
116
|
+
responseTtlValue?: number;
|
|
117
|
+
};
|
|
118
|
+
interface RespondToQueryOptions extends RespondToQueryOptionsType {
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Constructor for Oracle Object (helper object for using Oracle)
|
|
122
|
+
* @category oracle
|
|
123
|
+
* @param oracleId - Oracle public key
|
|
124
|
+
* @param options - Options
|
|
125
|
+
* @returns Oracle object
|
|
126
|
+
*/
|
|
127
|
+
export declare function getOracleObject(oracleId: Encoded.OracleAddress, options: {
|
|
128
|
+
onNode: Node;
|
|
129
|
+
onAccount: AccountBase;
|
|
130
|
+
}): Promise<GetOracleObjectReturnType>;
|
|
131
|
+
interface GetOracleObjectReturnType extends Awaited<ReturnType<Node['getOracleByPubkey']>> {
|
|
132
|
+
id: Encoded.OracleAddress;
|
|
133
|
+
queries: OracleQueries;
|
|
134
|
+
pollQueries: (cb: Parameters<typeof pollForQueries>[1]) => ReturnType<typeof pollForQueries>;
|
|
135
|
+
postQuery: Function;
|
|
136
|
+
respondToQuery: Function;
|
|
137
|
+
extendOracle: Function;
|
|
138
|
+
getQuery: Function;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Register oracle
|
|
142
|
+
* @category oracle
|
|
143
|
+
* @param queryFormat - Format of query
|
|
144
|
+
* @param responseFormat - Format of query response
|
|
145
|
+
* @param options - Options
|
|
146
|
+
* @param options.queryFee - Oracle query Fee
|
|
147
|
+
* @param options - Options object
|
|
148
|
+
* @param options.abiVersion - Always 0 (do not use virtual machine)
|
|
149
|
+
* @param options.fee - Transaction fee
|
|
150
|
+
* @param options.ttl - Transaction time to leave
|
|
151
|
+
* @returns Oracle object
|
|
152
|
+
*/
|
|
153
|
+
export declare function registerOracle(queryFormat: string, responseFormat: string, options: RegisterOracleOptions): Promise<Awaited<ReturnType<typeof send>> & Awaited<ReturnType<typeof getOracleObject>>>;
|
|
154
|
+
type RegisterOracleOptionsType = SendOptions & Parameters<typeof getOracleObject>[1] & BuildTxOptions<Tag.OracleRegisterTx, 'accountId' | 'queryFormat' | 'responseFormat' | 'queryFee' | 'oracleTtlType' | 'oracleTtlValue'> & {
|
|
155
|
+
queryFee?: number | string | BigNumber;
|
|
156
|
+
oracleTtlType?: ORACLE_TTL_TYPES;
|
|
157
|
+
oracleTtlValue?: number;
|
|
158
|
+
};
|
|
159
|
+
interface RegisterOracleOptions extends RegisterOracleOptionsType {
|
|
160
|
+
}
|
|
161
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { sendTransaction, resolveName } from './chain';
|
|
2
|
+
import { BuildTxOptions } from './tx';
|
|
3
|
+
import { Encoded } from './utils/encoder';
|
|
4
|
+
import { Tag, AensName } from './tx/builder/constants';
|
|
5
|
+
import AccountBase from './account/Base';
|
|
6
|
+
/**
|
|
7
|
+
* Sign and post a transaction to the chain
|
|
8
|
+
* @category chain
|
|
9
|
+
* @param tx - Transaction
|
|
10
|
+
* @param options - Options
|
|
11
|
+
* @param options.verify - Verify transaction before broadcast, throw error if not
|
|
12
|
+
* valid
|
|
13
|
+
* @returns Transaction
|
|
14
|
+
*/
|
|
15
|
+
export declare function send(tx: Encoded.Transaction, options: SendOptions): Promise<SendReturnType>;
|
|
16
|
+
type SendOptionsType = Parameters<AccountBase['signTransaction']>[1] & Parameters<typeof sendTransaction>[1] & {
|
|
17
|
+
onAccount: AccountBase;
|
|
18
|
+
};
|
|
19
|
+
export interface SendOptions extends SendOptionsType {
|
|
20
|
+
}
|
|
21
|
+
interface SendReturnType extends Awaited<ReturnType<typeof sendTransaction>> {
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Send coins to another account
|
|
25
|
+
* @category chain
|
|
26
|
+
* @param amount - Amount to spend
|
|
27
|
+
* @param recipientIdOrName - Address or name of recipient account
|
|
28
|
+
* @param options - Options
|
|
29
|
+
* @returns Transaction
|
|
30
|
+
*/
|
|
31
|
+
export declare function spend(amount: number | string, recipientIdOrName: Encoded.AccountAddress | AensName, options: SpendOptions): ReturnType<typeof send>;
|
|
32
|
+
type SpendOptionsType = BuildTxOptions<Tag.SpendTx, 'senderId' | 'recipientId' | 'amount'> & Parameters<typeof resolveName>[2] & {
|
|
33
|
+
onAccount: AccountBase;
|
|
34
|
+
} & SendOptions;
|
|
35
|
+
interface SpendOptions extends SpendOptionsType {
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Send a fraction of coin balance to another account
|
|
39
|
+
* @category chain
|
|
40
|
+
* @param fraction - Fraction of balance to spend (between 0 and 1)
|
|
41
|
+
* @param recipientIdOrName - Address or name of recipient account
|
|
42
|
+
* @param options - Options
|
|
43
|
+
* @returns Transaction
|
|
44
|
+
*/
|
|
45
|
+
export declare function transferFunds(fraction: number | string, recipientIdOrName: AensName | Encoded.AccountAddress, options: TransferFundsOptions): ReturnType<typeof send>;
|
|
46
|
+
type TransferFundsOptionsType = BuildTxOptions<Tag.SpendTx, 'senderId' | 'recipientId' | 'amount'> & Parameters<typeof resolveName>[2] & {
|
|
47
|
+
onAccount: AccountBase;
|
|
48
|
+
} & SendOptions;
|
|
49
|
+
interface TransferFundsOptions extends TransferFundsOptionsType {
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Submit transaction of another account paying for it (fee and gas)
|
|
53
|
+
* @category chain
|
|
54
|
+
* @param transaction - tx_<base64>-encoded transaction
|
|
55
|
+
* @param options - Options
|
|
56
|
+
* @returns Object Transaction
|
|
57
|
+
*/
|
|
58
|
+
export declare function payForTransaction(transaction: Encoded.Transaction, options: PayForTransactionOptions): ReturnType<typeof send>;
|
|
59
|
+
interface PayForTransactionOptions extends BuildTxOptions<Tag.PayingForTx, 'payerId' | 'tx'>, SendOptions {
|
|
60
|
+
onAccount: AccountBase;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
export declare const MAX_AUTH_FUN_GAS = 50000;
|
|
3
|
+
export type Int = number | string | BigNumber;
|
|
4
|
+
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
|
+
export declare const MIN_GAS_PRICE = 1000000000;
|
|
10
|
+
export declare const NAME_FEE_MULTIPLIER = 100000000000000;
|
|
11
|
+
export declare const NAME_FEE_BID_INCREMENT = 0.05;
|
|
12
|
+
export declare const NAME_BID_TIMEOUT_BLOCKS = 480;
|
|
13
|
+
export declare const NAME_MAX_LENGTH_FEE = 31;
|
|
14
|
+
export declare const NAME_BID_MAX_LENGTH = 12;
|
|
15
|
+
export declare const NAME_BID_RANGES: {
|
|
16
|
+
[k: string]: BigNumber;
|
|
17
|
+
};
|
|
18
|
+
export declare enum ConsensusProtocolVersion {
|
|
19
|
+
Iris = 5
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @category transaction builder
|
|
23
|
+
* @see {@link https://github.com/aeternity/protocol/blob/0f6dee3d9d1e8e2469816798f5c7587a6c918f94/contracts/contract_vms.md#virtual-machines-on-the-%C3%A6ternity-blockchain}
|
|
24
|
+
*/
|
|
25
|
+
export declare enum VmVersion {
|
|
26
|
+
NoVm = 0,
|
|
27
|
+
Sophia = 1,
|
|
28
|
+
SophiaImprovementsMinerva = 3,
|
|
29
|
+
SophiaImprovementsFortuna = 4,
|
|
30
|
+
Fate = 5,
|
|
31
|
+
SophiaImprovementsLima = 6,
|
|
32
|
+
Fate2 = 7
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @category transaction builder
|
|
36
|
+
* @see {@link https://github.com/aeternity/protocol/blob/0f6dee3d9d1e8e2469816798f5c7587a6c918f94/contracts/contract_vms.md#virtual-machines-on-the-%C3%A6ternity-blockchain}
|
|
37
|
+
*/
|
|
38
|
+
export declare enum AbiVersion {
|
|
39
|
+
NoAbi = 0,
|
|
40
|
+
Sophia = 1,
|
|
41
|
+
Fate = 3
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Enum with tag types
|
|
45
|
+
* @category transaction builder
|
|
46
|
+
* @see {@link https://github.com/aeternity/protocol/blob/0f6dee3d9d1e8e2469816798f5c7587a6c918f94/serializations.md#binary-serialization}
|
|
47
|
+
* @see {@link https://github.com/aeternity/aeserialization/blob/eb68fe331bd476910394966b7f5ede7a74d37e35/src/aeser_chain_objects.erl#L39-L97}
|
|
48
|
+
*/
|
|
49
|
+
export declare enum Tag {
|
|
50
|
+
Account = 10,
|
|
51
|
+
SignedTx = 11,
|
|
52
|
+
SpendTx = 12,
|
|
53
|
+
Oracle = 20,
|
|
54
|
+
OracleRegisterTx = 22,
|
|
55
|
+
OracleQueryTx = 23,
|
|
56
|
+
OracleResponseTx = 24,
|
|
57
|
+
OracleExtendTx = 25,
|
|
58
|
+
Name = 30,
|
|
59
|
+
NameClaimTx = 32,
|
|
60
|
+
NamePreclaimTx = 33,
|
|
61
|
+
NameUpdateTx = 34,
|
|
62
|
+
NameRevokeTx = 35,
|
|
63
|
+
NameTransferTx = 36,
|
|
64
|
+
Contract = 40,
|
|
65
|
+
ContractCall = 41,
|
|
66
|
+
ContractCreateTx = 42,
|
|
67
|
+
ContractCallTx = 43,
|
|
68
|
+
ChannelCreateTx = 50,
|
|
69
|
+
ChannelDepositTx = 51,
|
|
70
|
+
ChannelWithdrawTx = 52,
|
|
71
|
+
ChannelForceProgressTx = 521,
|
|
72
|
+
ChannelCloseMutualTx = 53,
|
|
73
|
+
ChannelCloseSoloTx = 54,
|
|
74
|
+
ChannelSlashTx = 55,
|
|
75
|
+
ChannelSettleTx = 56,
|
|
76
|
+
ChannelOffChainTx = 57,
|
|
77
|
+
ChannelOffChainUpdateTransfer = 570,
|
|
78
|
+
ChannelOffChainUpdateDeposit = 571,
|
|
79
|
+
ChannelOffChainUpdateWithdraw = 572,
|
|
80
|
+
ChannelOffChainUpdateCreateContract = 573,
|
|
81
|
+
ChannelOffChainUpdateCallContract = 574,
|
|
82
|
+
ChannelClientReconnectTx = 575,
|
|
83
|
+
Channel = 58,
|
|
84
|
+
ChannelSnapshotSoloTx = 59,
|
|
85
|
+
TreesPoi = 60,
|
|
86
|
+
StateTrees = 62,
|
|
87
|
+
Mtree = 63,
|
|
88
|
+
MtreeValue = 64,
|
|
89
|
+
ContractsMtree = 621,
|
|
90
|
+
CallsMtree = 622,
|
|
91
|
+
ChannelsMtree = 623,
|
|
92
|
+
NameserviceMtree = 624,
|
|
93
|
+
OraclesMtree = 625,
|
|
94
|
+
AccountsMtree = 626,
|
|
95
|
+
GaAttachTx = 80,
|
|
96
|
+
GaMetaTx = 81,
|
|
97
|
+
PayingForTx = 82
|
|
98
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Tag, ConsensusProtocolVersion, AbiVersion } from '../constants';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
serialize(value: AbiVersion | undefined, { tag, consensusProtocolVersion }: {
|
|
5
|
+
tag: Tag;
|
|
6
|
+
consensusProtocolVersion: ConsensusProtocolVersion;
|
|
7
|
+
}): Buffer;
|
|
8
|
+
deserialize(buffer: Buffer): AbiVersion;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Encoded } from '../../../utils/encoder';
|
|
3
|
+
/**
|
|
4
|
+
* Map of prefix to ID tag constant
|
|
5
|
+
* @see {@link https://github.com/aeternity/protocol/blob/master/serializations.md#the-id-type}
|
|
6
|
+
* @see {@link https://github.com/aeternity/aeserialization/blob/eb68fe331bd476910394966b7f5ede7a74d37e35/src/aeser_id.erl#L97-L102}
|
|
7
|
+
* @see {@link https://github.com/aeternity/aeserialization/blob/eb68fe331bd476910394966b7f5ede7a74d37e35/src/aeser_api_encoder.erl#L163-L168}
|
|
8
|
+
*/
|
|
9
|
+
export declare const idTagToEncoding: readonly [
|
|
10
|
+
Encoded.Encoding.AccountAddress,
|
|
11
|
+
Encoded.Encoding.Name,
|
|
12
|
+
Encoded.Encoding.Commitment,
|
|
13
|
+
Encoded.Encoding.OracleAddress,
|
|
14
|
+
Encoded.Encoding.ContractAddress,
|
|
15
|
+
Encoded.Encoding.Channel
|
|
16
|
+
];
|
|
17
|
+
export type AddressEncodings = typeof idTagToEncoding[number];
|
|
18
|
+
export default function genAddressField<Encoding extends AddressEncodings>(...encodings: Encoding[]): {
|
|
19
|
+
serialize: (value: Encoded.Generic<Encoding>) => Buffer;
|
|
20
|
+
deserialize: (value: Buffer) => Encoded.Generic<Encoding>;
|
|
21
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export default function genArrayField<Input, Output, Binary>(itemHandler: {
|
|
2
|
+
serialize: (value: Input, params: unknown) => Binary;
|
|
3
|
+
deserialize: (value: Binary, params: unknown) => Output;
|
|
4
|
+
}): {
|
|
5
|
+
serialize: (value: Input[], params: unknown) => Binary[];
|
|
6
|
+
deserialize: (value: Binary[], params: unknown) => Output[];
|
|
7
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Int } from '../constants';
|
|
3
|
+
import { AE_AMOUNT_FORMATS } from '../../../utils/amount-formatter';
|
|
4
|
+
export interface Options {
|
|
5
|
+
denomination?: AE_AMOUNT_FORMATS;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: {
|
|
8
|
+
serializeAettos(value: string | undefined): string;
|
|
9
|
+
serialize(value: Int | undefined, { denomination, ...options }: Options): Buffer;
|
|
10
|
+
deserialize(value: Buffer): string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { ConsensusProtocolVersion, VmVersion, AbiVersion } from '../constants';
|
|
3
|
+
export declare const ProtocolToVmAbi: {
|
|
4
|
+
readonly 5: {
|
|
5
|
+
readonly 'contract-create': {
|
|
6
|
+
readonly vmVersion: readonly [
|
|
7
|
+
VmVersion.Fate2
|
|
8
|
+
];
|
|
9
|
+
readonly abiVersion: readonly [
|
|
10
|
+
AbiVersion.Fate
|
|
11
|
+
];
|
|
12
|
+
};
|
|
13
|
+
readonly 'contract-call': {
|
|
14
|
+
readonly vmVersion: readonly [
|
|
15
|
+
];
|
|
16
|
+
readonly abiVersion: readonly [
|
|
17
|
+
AbiVersion.Fate,
|
|
18
|
+
AbiVersion.Sophia
|
|
19
|
+
];
|
|
20
|
+
};
|
|
21
|
+
readonly 'oracle-call': {
|
|
22
|
+
readonly vmVersion: readonly [
|
|
23
|
+
];
|
|
24
|
+
readonly abiVersion: readonly [
|
|
25
|
+
AbiVersion.NoAbi,
|
|
26
|
+
AbiVersion.Sophia
|
|
27
|
+
];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export interface CtVersion {
|
|
32
|
+
vmVersion: VmVersion;
|
|
33
|
+
abiVersion: AbiVersion;
|
|
34
|
+
}
|
|
35
|
+
export declare function getProtocolDetails(protocolVersion: ConsensusProtocolVersion, type: 'contract-create' | 'contract-call' | 'oracle-call'): CtVersion;
|
|
36
|
+
declare const _default: {
|
|
37
|
+
serialize(value: CtVersion | undefined, { consensusProtocolVersion }: {
|
|
38
|
+
consensusProtocolVersion: ConsensusProtocolVersion;
|
|
39
|
+
}): Buffer;
|
|
40
|
+
deserialize(buffer: Buffer): CtVersion;
|
|
41
|
+
};
|
|
42
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import coinAmount from './coin-amount';
|
|
3
|
+
import { Int } from '../constants';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
/**
|
|
6
|
+
* @param value - Deposit value in string format. Should be equal to '0'.
|
|
7
|
+
* @param options - Options
|
|
8
|
+
* @returns Deposit value Buffer.
|
|
9
|
+
*/
|
|
10
|
+
serialize(value: Int | undefined, options: Parameters<(typeof coinAmount)['serialize']>[1]): Buffer;
|
|
11
|
+
serializeAettos(value: string | undefined): string;
|
|
12
|
+
deserialize(value: Buffer): string;
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Encoded, Encoding } from '../../../utils/encoder';
|
|
3
|
+
export default function genEncodedField<E extends Encoding, Optional extends boolean = false>(encoding: E, optional?: Optional): {
|
|
4
|
+
serialize: Optional extends true ? (value?: Encoded.Generic<E>) => Buffer : (value: Encoded.Generic<E>) => Buffer;
|
|
5
|
+
deserialize: (value: Buffer) => Encoded.Generic<Encoding>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Tag } from '../constants';
|
|
3
|
+
import type { unpackTx as unpackTxType, buildTx as buildTxType } from '../index';
|
|
4
|
+
export default function genEntryField<T extends Tag = Tag>(tag?: T): {
|
|
5
|
+
serialize: (value: any, options: {
|
|
6
|
+
buildTx: typeof buildTxType;
|
|
7
|
+
}) => Buffer;
|
|
8
|
+
deserialize: (value: Buffer, options: {
|
|
9
|
+
unpackTx: typeof unpackTxType;
|
|
10
|
+
}) => any;
|
|
11
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { Encoded } from '../../../utils/encoder';
|
|
4
|
+
import type { unpackTx as unpackTxType, buildTx as buildTxType } from '../index';
|
|
5
|
+
/**
|
|
6
|
+
* Calculate fee based on tx type and params
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildFee(builtTx: Encoded.Transaction, unpackTx: typeof unpackTxType, buildTx: typeof buildTxType): BigNumber;
|
|
9
|
+
declare const _default: {
|
|
10
|
+
serializeAettos(_value: string | undefined, { rebuildTx, unpackTx, buildTx, _computingMinFee, _pickBiggerFee, }: {
|
|
11
|
+
rebuildTx: (params: any) => Encoded.Transaction;
|
|
12
|
+
unpackTx: typeof unpackTxType;
|
|
13
|
+
buildTx: typeof buildTxType;
|
|
14
|
+
_computingMinFee?: BigNumber | undefined;
|
|
15
|
+
_pickBiggerFee?: boolean | undefined;
|
|
16
|
+
}): string;
|
|
17
|
+
serialize(value: import("../constants").Int | undefined, { denomination, ...options }: import("./coin-amount").Options): Buffer;
|
|
18
|
+
deserialize(value: Buffer): string;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Tag } from '../constants';
|
|
3
|
+
import type { unpackTx as unpackTxType, buildTx as buildTxType } from '../index';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
serialize(_value: number | undefined, { tag, rebuildTx, unpackTx, buildTx, gasMax, _computingGasLimit, }: {
|
|
6
|
+
tag: Tag;
|
|
7
|
+
rebuildTx: (params: any) => any;
|
|
8
|
+
unpackTx: typeof unpackTxType;
|
|
9
|
+
buildTx: typeof buildTxType;
|
|
10
|
+
gasMax: number;
|
|
11
|
+
_computingGasLimit?: number | undefined;
|
|
12
|
+
}): Buffer;
|
|
13
|
+
deserialize(value: Buffer): number;
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
serializeAettos(value?: string | undefined): string;
|
|
4
|
+
serialize(value: import("../constants").Int | undefined, { denomination, ...options }: import("./coin-amount").Options): Buffer;
|
|
5
|
+
deserialize(value: Buffer): string;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import _address from './address';
|
|
3
|
+
import _array from './array';
|
|
4
|
+
import _encoded from './encoded';
|
|
5
|
+
import _entry from './entry';
|
|
6
|
+
import _enumeration from './enumeration';
|
|
7
|
+
import _mptree from './mptree';
|
|
8
|
+
import _shortUIntConst from './short-u-int-const';
|
|
9
|
+
declare const abiVersion: {
|
|
10
|
+
serialize(value: import("../constants").AbiVersion | undefined, { tag, consensusProtocolVersion }: {
|
|
11
|
+
tag: import("../constants").Tag;
|
|
12
|
+
consensusProtocolVersion: import("../constants").ConsensusProtocolVersion;
|
|
13
|
+
}): Buffer;
|
|
14
|
+
deserialize(buffer: Buffer): import("../constants").AbiVersion;
|
|
15
|
+
};
|
|
16
|
+
declare const address: typeof _address;
|
|
17
|
+
declare const array: typeof _array;
|
|
18
|
+
declare const boolean: {
|
|
19
|
+
serialize(value: boolean): Buffer;
|
|
20
|
+
deserialize(buffer: Buffer): boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const coinAmount: {
|
|
23
|
+
serializeAettos(value: string | undefined): string;
|
|
24
|
+
serialize(value: import("../constants").Int | undefined, { denomination, ...options }: import("./coin-amount").Options): Buffer;
|
|
25
|
+
deserialize(value: Buffer): string;
|
|
26
|
+
};
|
|
27
|
+
declare const ctVersion: {
|
|
28
|
+
serialize(value: import("./ct-version").CtVersion | undefined, { consensusProtocolVersion }: {
|
|
29
|
+
consensusProtocolVersion: import("../constants").ConsensusProtocolVersion;
|
|
30
|
+
}): Buffer;
|
|
31
|
+
deserialize(buffer: Buffer): import("./ct-version").CtVersion;
|
|
32
|
+
};
|
|
33
|
+
declare const deposit: {
|
|
34
|
+
serialize(value: import("../constants").Int | undefined, options: import("./coin-amount").Options): Buffer;
|
|
35
|
+
serializeAettos(value: string | undefined): string;
|
|
36
|
+
deserialize(value: Buffer): string;
|
|
37
|
+
};
|
|
38
|
+
declare const encoded: typeof _encoded;
|
|
39
|
+
declare const entry: typeof _entry;
|
|
40
|
+
declare const enumeration: typeof _enumeration;
|
|
41
|
+
declare const fee: {
|
|
42
|
+
serializeAettos(_value: string | undefined, { rebuildTx, unpackTx, buildTx, _computingMinFee, _pickBiggerFee, }: {
|
|
43
|
+
rebuildTx: (params: any) => `tx_${string}`;
|
|
44
|
+
unpackTx: typeof import("..").unpackTx;
|
|
45
|
+
buildTx: typeof import("..").buildTx;
|
|
46
|
+
_computingMinFee?: import("bignumber.js").BigNumber | undefined;
|
|
47
|
+
_pickBiggerFee?: boolean | undefined;
|
|
48
|
+
}): string;
|
|
49
|
+
serialize(value: import("../constants").Int | undefined, { denomination, ...options }: import("./coin-amount").Options): Buffer;
|
|
50
|
+
deserialize(value: Buffer): string;
|
|
51
|
+
};
|
|
52
|
+
declare const field: {
|
|
53
|
+
serialize(value: string): Buffer;
|
|
54
|
+
deserialize(value: Buffer): string;
|
|
55
|
+
};
|
|
56
|
+
declare const gasLimit: {
|
|
57
|
+
serialize(_value: number | undefined, { tag, rebuildTx, unpackTx, buildTx, gasMax, _computingGasLimit, }: {
|
|
58
|
+
tag: import("../constants").Tag;
|
|
59
|
+
rebuildTx: (params: any) => any;
|
|
60
|
+
unpackTx: typeof import("..").unpackTx;
|
|
61
|
+
buildTx: typeof import("..").buildTx;
|
|
62
|
+
gasMax: number;
|
|
63
|
+
_computingGasLimit?: number | undefined;
|
|
64
|
+
}): Buffer;
|
|
65
|
+
deserialize(value: Buffer): number;
|
|
66
|
+
};
|
|
67
|
+
declare const gasPrice: {
|
|
68
|
+
serializeAettos(value?: string | undefined): string;
|
|
69
|
+
serialize(value: import("../constants").Int | undefined, { denomination, ...options }: import("./coin-amount").Options): Buffer;
|
|
70
|
+
deserialize(value: Buffer): string;
|
|
71
|
+
};
|
|
72
|
+
declare const mptree: typeof _mptree;
|
|
73
|
+
declare const name: {
|
|
74
|
+
serialize(value: `${string}.chain`): Buffer;
|
|
75
|
+
deserialize(value: Buffer): `${string}.chain`;
|
|
76
|
+
};
|
|
77
|
+
declare const nameFee: {
|
|
78
|
+
serializeAettos(_value: string | undefined, txFields: {
|
|
79
|
+
name: `${string}.chain`;
|
|
80
|
+
}): string;
|
|
81
|
+
serialize(value: import("../constants").Int | undefined, txFields: {
|
|
82
|
+
name: `${string}.chain`;
|
|
83
|
+
} & import("./coin-amount").Options): Buffer;
|
|
84
|
+
deserialize(value: Buffer): string;
|
|
85
|
+
};
|
|
86
|
+
declare const nameId: {
|
|
87
|
+
serialize(value: `${string}.chain` | `nm_${string}`): Buffer;
|
|
88
|
+
deserialize: (value: Buffer) => `nm_${string}`;
|
|
89
|
+
};
|
|
90
|
+
declare const pointers: {
|
|
91
|
+
serialize(pointers: (import("../../../apis/node").NamePointer & {
|
|
92
|
+
id: `ch_${string}` | `ct_${string}` | `ok_${string}` | `ak_${string}` | `cm_${string}` | `nm_${string}`;
|
|
93
|
+
})[]): Buffer[][];
|
|
94
|
+
deserialize(pointers: [
|
|
95
|
+
key: Buffer,
|
|
96
|
+
id: Buffer
|
|
97
|
+
][]): (import("../../../apis/node").NamePointer & {
|
|
98
|
+
id: `ch_${string}` | `ct_${string}` | `ok_${string}` | `ak_${string}` | `cm_${string}` | `nm_${string}`;
|
|
99
|
+
})[];
|
|
100
|
+
};
|
|
101
|
+
declare const raw: {
|
|
102
|
+
serialize(buffer: Uint8Array): Buffer;
|
|
103
|
+
deserialize(buffer: Buffer): Buffer;
|
|
104
|
+
};
|
|
105
|
+
declare const shortUInt: {
|
|
106
|
+
serialize(value: number): Buffer;
|
|
107
|
+
deserialize(value: Buffer): number;
|
|
108
|
+
};
|
|
109
|
+
declare const shortUIntConst: typeof _shortUIntConst;
|
|
110
|
+
declare const string: {
|
|
111
|
+
serialize(string: string): Buffer;
|
|
112
|
+
deserialize(buffer: Buffer): string;
|
|
113
|
+
};
|
|
114
|
+
declare const uInt: {
|
|
115
|
+
serialize(value: import("../constants").Int): Buffer;
|
|
116
|
+
deserialize(value: Buffer): string;
|
|
117
|
+
};
|
|
118
|
+
export type BinaryData = Buffer | Buffer[] | Buffer[][] | Array<[
|
|
119
|
+
Buffer,
|
|
120
|
+
Array<[
|
|
121
|
+
Buffer,
|
|
122
|
+
Buffer[]
|
|
123
|
+
]>
|
|
124
|
+
]>;
|
|
125
|
+
export interface Field {
|
|
126
|
+
serialize: (value: any, options: any) => BinaryData;
|
|
127
|
+
deserialize: (value: BinaryData, options: any) => any;
|
|
128
|
+
}
|
|
129
|
+
export { abiVersion, address, array, boolean, coinAmount, ctVersion, deposit, encoded, entry, enumeration, fee, field, gasLimit, gasPrice, mptree, name, nameFee, nameId, pointers, raw, shortUInt, shortUIntConst, string, uInt, };
|