@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
package/src/contract/Contract.ts
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { Encoder as Calldata } from '@aeternity/aepp-calldata';
|
|
9
|
-
import {
|
|
10
|
-
|
|
9
|
+
import {
|
|
10
|
+
Tag, AensName, ConsensusProtocolVersion, DRY_RUN_ACCOUNT,
|
|
11
|
+
} from '../tx/builder/constants';
|
|
11
12
|
import {
|
|
12
13
|
buildContractIdByContractTx, unpackTx, buildTxAsync, BuildTxOptions, buildTxHash,
|
|
13
14
|
} from '../tx/builder';
|
|
@@ -39,11 +40,13 @@ import {
|
|
|
39
40
|
import CompilerBase, { Aci } from './compiler/Base';
|
|
40
41
|
import Node, { TransformNodeType } from '../Node';
|
|
41
42
|
import {
|
|
42
|
-
getAccount, getContract, getContractByteCode, resolveName, txDryRun,
|
|
43
|
-
SendTransactionOptions,
|
|
43
|
+
getAccount, getContract, getContractByteCode, resolveName, txDryRun,
|
|
44
44
|
} from '../chain';
|
|
45
|
+
import { sendTransaction, SendTransactionOptions } from '../send-transaction';
|
|
45
46
|
import AccountBase from '../account/Base';
|
|
46
47
|
import { TxUnpacked } from '../tx/builder/schema.generated';
|
|
48
|
+
import { isAccountNotFoundError } from '../utils/other';
|
|
49
|
+
import { isNameValid, produceNameId } from '../tx/builder/helpers';
|
|
47
50
|
|
|
48
51
|
type ContractAci = NonNullable<Aci[0]['contract']>;
|
|
49
52
|
type FunctionAci = ContractAci['functions'][0];
|
|
@@ -122,7 +125,7 @@ interface GetCallResultByHashReturnType<M extends ContractMethodsBase, Fn extend
|
|
|
122
125
|
* const staticCallResult = await contractIns.$call('setState', [123], { callStatic: true })
|
|
123
126
|
* ```
|
|
124
127
|
* Also you can call contract like: `await contractIns.setState(123, options)`
|
|
125
|
-
* Then sdk decide to make on-chain or static call(dry-run API) transaction based on function is
|
|
128
|
+
* Then sdk decide to make on-chain or static call (dry-run API) transaction based on function is
|
|
126
129
|
* stateful or not
|
|
127
130
|
*/
|
|
128
131
|
class Contract<M extends ContractMethodsBase> {
|
|
@@ -245,6 +248,7 @@ class Contract<M extends ContractMethodsBase> {
|
|
|
245
248
|
const ownerId = opt.onAccount.address;
|
|
246
249
|
if (this.$options.bytecode == null) throw new IllegalArgumentError('Can\'t deploy without bytecode');
|
|
247
250
|
const tx = await buildTxAsync({
|
|
251
|
+
_isInternalBuild: true,
|
|
248
252
|
...opt,
|
|
249
253
|
tag: Tag.ContractCreateTx,
|
|
250
254
|
gasLimit: opt.gasLimit ?? await this._estimateGas('init', params, opt),
|
|
@@ -252,12 +256,12 @@ class Contract<M extends ContractMethodsBase> {
|
|
|
252
256
|
code: this.$options.bytecode,
|
|
253
257
|
ownerId,
|
|
254
258
|
});
|
|
255
|
-
this.$options.address = buildContractIdByContractTx(tx);
|
|
256
259
|
const { hash, ...other } = await this.#sendAndProcess(
|
|
257
260
|
tx,
|
|
258
261
|
'init',
|
|
259
262
|
{ ...opt, onAccount: opt.onAccount },
|
|
260
263
|
);
|
|
264
|
+
this.$options.address = buildContractIdByContractTx(other.rawTx);
|
|
261
265
|
return {
|
|
262
266
|
...other,
|
|
263
267
|
...other.result?.log != null && {
|
|
@@ -286,7 +290,7 @@ class Contract<M extends ContractMethodsBase> {
|
|
|
286
290
|
arguments: [], name: 'init', payable: false, returns: 'unit', stateful: true,
|
|
287
291
|
};
|
|
288
292
|
}
|
|
289
|
-
throw new NoSuchContractFunctionError(
|
|
293
|
+
throw new NoSuchContractFunctionError(name);
|
|
290
294
|
}
|
|
291
295
|
|
|
292
296
|
/**
|
|
@@ -307,7 +311,9 @@ class Contract<M extends ContractMethodsBase> {
|
|
|
307
311
|
): Promise<SendAndProcessReturnType & Partial<GetCallResultByHashReturnType<M, Fn>>> {
|
|
308
312
|
const { callStatic, top, ...opt } = { ...this.$options, ...options };
|
|
309
313
|
const fnAci = this.#getFunctionAci(fn);
|
|
310
|
-
const
|
|
314
|
+
const { address, name } = this.$options;
|
|
315
|
+
// TODO: call `produceNameId` on buildTx side
|
|
316
|
+
const contractId = name != null ? produceNameId(name) : address;
|
|
311
317
|
const { onNode } = opt;
|
|
312
318
|
|
|
313
319
|
if (fn == null) throw new MissingFunctionNameError();
|
|
@@ -332,10 +338,15 @@ class Contract<M extends ContractMethodsBase> {
|
|
|
332
338
|
const callData = this._calldata.encode(this._name, fn, params);
|
|
333
339
|
|
|
334
340
|
if (callStatic === true) {
|
|
335
|
-
if (opt.nonce == null
|
|
336
|
-
const
|
|
337
|
-
|
|
341
|
+
if (opt.nonce == null) {
|
|
342
|
+
const topOption = top != null && { [typeof top === 'number' ? 'height' : 'hash']: top };
|
|
343
|
+
const account = await getAccount(callerId, { ...topOption, onNode }).catch((error) => {
|
|
344
|
+
if (!isAccountNotFoundError(error)) throw error;
|
|
345
|
+
return { kind: 'basic', nonce: 0 };
|
|
346
|
+
});
|
|
347
|
+
opt.nonce = account.kind === 'generalized' ? 0 : account.nonce + 1;
|
|
338
348
|
}
|
|
349
|
+
|
|
339
350
|
const txOpt = { ...opt, onNode, callData };
|
|
340
351
|
let tx;
|
|
341
352
|
if (fn === 'init') {
|
|
@@ -369,6 +380,7 @@ class Contract<M extends ContractMethodsBase> {
|
|
|
369
380
|
if (top != null) throw new IllegalArgumentError('Can\'t handle `top` option in on-chain contract call');
|
|
370
381
|
if (contractId == null) throw new MissingContractAddressError('Can\'t call contract without address');
|
|
371
382
|
const tx = await buildTxAsync({
|
|
383
|
+
_isInternalBuild: true,
|
|
372
384
|
...opt,
|
|
373
385
|
tag: Tag.ContractCallTx,
|
|
374
386
|
gasLimit: opt.gasLimit ?? await this._estimateGas(fn, params, opt),
|
|
@@ -479,12 +491,16 @@ class Contract<M extends ContractMethodsBase> {
|
|
|
479
491
|
}
|
|
480
492
|
if (aci == null) throw new MissingContractDefError();
|
|
481
493
|
|
|
494
|
+
let name;
|
|
482
495
|
if (address != null) {
|
|
483
496
|
address = await resolveName(
|
|
484
497
|
address,
|
|
485
498
|
'contract_pubkey',
|
|
486
499
|
{ resolveByNode: true, onNode },
|
|
487
500
|
) as Encoded.ContractAddress;
|
|
501
|
+
const isIris = (await onNode.getNodeInfo())
|
|
502
|
+
.consensusProtocolVersion === ConsensusProtocolVersion.Iris;
|
|
503
|
+
if (!isIris && isNameValid(address)) name = address;
|
|
488
504
|
}
|
|
489
505
|
|
|
490
506
|
if (address == null && sourceCode == null && sourceCodePath == null && bytecode == null) {
|
|
@@ -521,6 +537,7 @@ class Contract<M extends ContractMethodsBase> {
|
|
|
521
537
|
bytecode,
|
|
522
538
|
aci,
|
|
523
539
|
address,
|
|
540
|
+
name,
|
|
524
541
|
fileSystem,
|
|
525
542
|
...otherOptions,
|
|
526
543
|
});
|
|
@@ -528,7 +545,7 @@ class Contract<M extends ContractMethodsBase> {
|
|
|
528
545
|
|
|
529
546
|
_aci: Aci;
|
|
530
547
|
|
|
531
|
-
#aciContract: ContractAci;
|
|
548
|
+
readonly #aciContract: ContractAci;
|
|
532
549
|
|
|
533
550
|
_name: string;
|
|
534
551
|
|
|
@@ -536,12 +553,19 @@ class Contract<M extends ContractMethodsBase> {
|
|
|
536
553
|
|
|
537
554
|
$options: Omit<ConstructorParameters<typeof Contract>[0], 'aci'>;
|
|
538
555
|
|
|
556
|
+
/**
|
|
557
|
+
* @param options - Options
|
|
558
|
+
*/
|
|
539
559
|
constructor({ aci, ...otherOptions }: {
|
|
540
560
|
onCompiler?: CompilerBase;
|
|
541
561
|
onNode: Node;
|
|
542
562
|
bytecode?: Encoded.ContractBytearray;
|
|
543
563
|
aci: Aci;
|
|
544
564
|
address?: Encoded.ContractAddress;
|
|
565
|
+
/**
|
|
566
|
+
* Supported only in Ceres
|
|
567
|
+
*/
|
|
568
|
+
name?: AensName;
|
|
545
569
|
sourceCodePath?: Parameters<CompilerBase['compile']>[0];
|
|
546
570
|
sourceCode?: Parameters<CompilerBase['compileBySourceCode']>[0];
|
|
547
571
|
fileSystem?: Parameters<CompilerBase['compileBySourceCode']>[1];
|
|
@@ -19,6 +19,19 @@ export type Aci = Array<{
|
|
|
19
19
|
};
|
|
20
20
|
}>;
|
|
21
21
|
|
|
22
|
+
export type CompileResult = Promise<{
|
|
23
|
+
bytecode: Encoded.ContractBytearray;
|
|
24
|
+
aci: Aci;
|
|
25
|
+
warnings: Array<{
|
|
26
|
+
message: string;
|
|
27
|
+
pos: {
|
|
28
|
+
file?: string;
|
|
29
|
+
line: number;
|
|
30
|
+
col: number;
|
|
31
|
+
};
|
|
32
|
+
}>;
|
|
33
|
+
}>;
|
|
34
|
+
|
|
22
35
|
/**
|
|
23
36
|
* A base class for all compiler implementations
|
|
24
37
|
*/
|
|
@@ -29,10 +42,7 @@ export default abstract class CompilerBase {
|
|
|
29
42
|
* @param path - Path to contract source code
|
|
30
43
|
* @returns ACI and bytecode
|
|
31
44
|
*/
|
|
32
|
-
abstract compile(path: string):
|
|
33
|
-
bytecode: Encoded.ContractBytearray;
|
|
34
|
-
aci: Aci;
|
|
35
|
-
}>;
|
|
45
|
+
abstract compile(path: string): CompileResult;
|
|
36
46
|
|
|
37
47
|
/**
|
|
38
48
|
* Compile contract by contract's source code
|
|
@@ -50,10 +60,7 @@ export default abstract class CompilerBase {
|
|
|
50
60
|
abstract compileBySourceCode(
|
|
51
61
|
sourceCode: string,
|
|
52
62
|
fileSystem?: Record<string, string>,
|
|
53
|
-
):
|
|
54
|
-
bytecode: Encoded.ContractBytearray;
|
|
55
|
-
aci: Aci;
|
|
56
|
-
}>;
|
|
63
|
+
): CompileResult;
|
|
57
64
|
|
|
58
65
|
/**
|
|
59
66
|
* Generate contract's ACI by contract's path
|
|
@@ -3,13 +3,13 @@ import { tmpdir } from 'os';
|
|
|
3
3
|
import { resolve, dirname, basename } from 'path';
|
|
4
4
|
import { mkdir, writeFile, rm } from 'fs/promises';
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
|
-
import CompilerBase, { Aci } from './Base';
|
|
6
|
+
import CompilerBase, { Aci, CompileResult } from './Base';
|
|
7
7
|
import { Encoded } from '../../utils/encoder';
|
|
8
8
|
import { CompilerError, InternalError, UnsupportedVersionError } from '../../utils/errors';
|
|
9
9
|
import semverSatisfies from '../../utils/semver-satisfies';
|
|
10
10
|
import { ensureError } from '../../utils/other';
|
|
11
11
|
|
|
12
|
-
const getPackagePath = (): string => {
|
|
12
|
+
export const getPackagePath = (): string => {
|
|
13
13
|
const path = dirname(fileURLToPath(import.meta.url));
|
|
14
14
|
if (basename(path) === 'dist') return resolve(path, '..');
|
|
15
15
|
if (basename(path) === 'compiler') return resolve(path, '../../..');
|
|
@@ -17,14 +17,20 @@ const getPackagePath = (): string => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* A wrapper around aesophia_cli, available only in Node.js
|
|
21
|
-
*
|
|
20
|
+
* A wrapper around aesophia_cli, available only in Node.js.
|
|
21
|
+
* Requires Erlang installed, assumes that `escript` is available in PATH.
|
|
22
|
+
* @category contract
|
|
22
23
|
*/
|
|
23
24
|
export default class CompilerCli extends CompilerBase {
|
|
24
|
-
#path: string;
|
|
25
|
+
readonly #path: string;
|
|
25
26
|
|
|
26
|
-
#ensureCompatibleVersion = Promise.resolve();
|
|
27
|
+
readonly #ensureCompatibleVersion = Promise.resolve();
|
|
27
28
|
|
|
29
|
+
/**
|
|
30
|
+
* @param compilerPath - A path to aesophia_cli binary, by default uses the integrated one
|
|
31
|
+
* @param options - Options
|
|
32
|
+
* @param options.ignoreVersion - Don't ensure that the compiler is supported
|
|
33
|
+
*/
|
|
28
34
|
constructor(
|
|
29
35
|
compilerPath = resolve(getPackagePath(), './bin/aesophia_cli'),
|
|
30
36
|
{ ignoreVersion }: { ignoreVersion?: boolean } = {},
|
|
@@ -33,22 +39,27 @@ export default class CompilerCli extends CompilerBase {
|
|
|
33
39
|
this.#path = compilerPath;
|
|
34
40
|
if (ignoreVersion !== true) {
|
|
35
41
|
this.#ensureCompatibleVersion = this.version().then((version) => {
|
|
36
|
-
const versions = [version, '7.2.1', '
|
|
42
|
+
const versions = [version, '7.2.1', '9.0.0'] as const;
|
|
37
43
|
if (!semverSatisfies(...versions)) throw new UnsupportedVersionError('compiler', ...versions);
|
|
38
44
|
});
|
|
39
45
|
}
|
|
40
46
|
}
|
|
41
47
|
|
|
42
|
-
async #
|
|
48
|
+
async #runWithStderr(...parameters: string[]): Promise<{ stderr: string; stdout: string }> {
|
|
43
49
|
return new Promise((pResolve, pReject) => {
|
|
44
50
|
execFile('escript', [this.#path, ...parameters], (error, stdout, stderr) => {
|
|
45
51
|
if (error != null) pReject(error);
|
|
46
|
-
else
|
|
47
|
-
else pResolve(stdout);
|
|
52
|
+
else pResolve({ stdout, stderr });
|
|
48
53
|
});
|
|
49
54
|
});
|
|
50
55
|
}
|
|
51
56
|
|
|
57
|
+
async #run(...parameters: string[]): Promise<string> {
|
|
58
|
+
const { stderr, stdout } = await this.#runWithStderr(...parameters);
|
|
59
|
+
if (stderr !== '') throw new CompilerError(stderr);
|
|
60
|
+
return stdout;
|
|
61
|
+
}
|
|
62
|
+
|
|
52
63
|
static async #saveContractToTmpDir(
|
|
53
64
|
sourceCode: string,
|
|
54
65
|
fileSystem: Record<string, string> = {},
|
|
@@ -67,19 +78,29 @@ export default class CompilerCli extends CompilerBase {
|
|
|
67
78
|
return sourceCodePath;
|
|
68
79
|
}
|
|
69
80
|
|
|
70
|
-
async compile(path: string):
|
|
71
|
-
bytecode: Encoded.ContractBytearray;
|
|
72
|
-
aci: Aci;
|
|
73
|
-
}> {
|
|
81
|
+
async compile(path: string): CompileResult {
|
|
74
82
|
await this.#ensureCompatibleVersion;
|
|
75
83
|
try {
|
|
76
|
-
const [
|
|
77
|
-
this.#
|
|
78
|
-
this
|
|
84
|
+
const [compileRes, aci] = await Promise.all([
|
|
85
|
+
this.#runWithStderr(path),
|
|
86
|
+
this.generateAci(path),
|
|
79
87
|
]);
|
|
80
88
|
return {
|
|
81
|
-
bytecode:
|
|
89
|
+
bytecode: compileRes.stdout.trimEnd() as Encoded.ContractBytearray,
|
|
82
90
|
aci,
|
|
91
|
+
warnings: compileRes.stderr.split('Warning in ').slice(1).map((warning) => {
|
|
92
|
+
const reg = /^'(.+)' at line (\d+), col (\d+):\n(.+)$/s;
|
|
93
|
+
const match = warning.match(reg);
|
|
94
|
+
if (match == null) throw new InternalError(`Can't parse compiler output: "${warning}"`);
|
|
95
|
+
return {
|
|
96
|
+
message: match[4].trimEnd(),
|
|
97
|
+
pos: {
|
|
98
|
+
...match[1] !== path && { file: match[1] },
|
|
99
|
+
line: +match[2],
|
|
100
|
+
col: +match[3],
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}),
|
|
83
104
|
};
|
|
84
105
|
} catch (error) {
|
|
85
106
|
ensureError(error);
|
|
@@ -87,10 +108,10 @@ export default class CompilerCli extends CompilerBase {
|
|
|
87
108
|
}
|
|
88
109
|
}
|
|
89
110
|
|
|
90
|
-
async compileBySourceCode(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
111
|
+
async compileBySourceCode(
|
|
112
|
+
sourceCode: string,
|
|
113
|
+
fileSystem?: Record<string, string>,
|
|
114
|
+
): CompileResult {
|
|
94
115
|
const tmp = await CompilerCli.#saveContractToTmpDir(sourceCode, fileSystem);
|
|
95
116
|
try {
|
|
96
117
|
return await this.compile(tmp);
|
|
@@ -145,7 +166,7 @@ export default class CompilerCli extends CompilerBase {
|
|
|
145
166
|
|
|
146
167
|
async version(): Promise<string> {
|
|
147
168
|
const verMessage = await this.#run('--version');
|
|
148
|
-
const ver = verMessage.match(/Sophia compiler version ([\d.]
|
|
169
|
+
const ver = verMessage.match(/Sophia compiler version ([\d.]+.*)\n/)?.[1];
|
|
149
170
|
if (ver == null) throw new CompilerError('Can\'t get compiler version');
|
|
150
171
|
return ver;
|
|
151
172
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { resolve } from 'path';
|
|
2
|
+
import CompilerCli, { getPackagePath } from './Cli';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @category contract
|
|
6
|
+
*/
|
|
7
|
+
export default class CompilerCli8 extends CompilerCli {
|
|
8
|
+
/**
|
|
9
|
+
* @param options - Options
|
|
10
|
+
* @param options.ignoreVersion - Don't ensure that the compiler is supported
|
|
11
|
+
*/
|
|
12
|
+
constructor(
|
|
13
|
+
{ ignoreVersion }: { ignoreVersion?: boolean } = {},
|
|
14
|
+
) {
|
|
15
|
+
super(resolve(getPackagePath(), './bin/aesophia_cli_8'), { ignoreVersion });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
RestError, userAgentPolicyName, setClientRequestIdPolicyName,
|
|
3
|
+
} from '@azure/core-rest-pipeline';
|
|
4
|
+
import { OperationOptions } from '@azure/core-client';
|
|
2
5
|
import {
|
|
3
6
|
Compiler as CompilerApi,
|
|
4
7
|
ErrorModel,
|
|
5
8
|
CompilerError as CompilerErrorApi,
|
|
6
9
|
} from '../../apis/compiler';
|
|
7
10
|
import { genErrorFormatterPolicy, genVersionCheckPolicy } from '../../utils/autorest';
|
|
8
|
-
import CompilerBase, { Aci } from './Base';
|
|
11
|
+
import CompilerBase, { Aci, CompileResult } from './Base';
|
|
9
12
|
import { Encoded } from '../../utils/encoder';
|
|
10
13
|
import { CompilerError, NotImplementedError } from '../../utils/errors';
|
|
11
14
|
|
|
@@ -29,11 +32,20 @@ export default class CompilerHttp extends CompilerBase {
|
|
|
29
32
|
* @param options - Options
|
|
30
33
|
* @param options.ignoreVersion - Don't check compiler version
|
|
31
34
|
*/
|
|
32
|
-
constructor(compilerUrl: string, { ignoreVersion }: { ignoreVersion?: boolean } = {}) {
|
|
35
|
+
constructor(compilerUrl: string, { ignoreVersion = false }: { ignoreVersion?: boolean } = {}) {
|
|
33
36
|
super();
|
|
37
|
+
|
|
38
|
+
let version: string | undefined;
|
|
39
|
+
const getVersion = async (opts: OperationOptions): Promise<string> => {
|
|
40
|
+
if (version != null) return version;
|
|
41
|
+
version = (await this.api.apiVersion(opts)).apiVersion;
|
|
42
|
+
return version;
|
|
43
|
+
};
|
|
44
|
+
|
|
34
45
|
this.api = new CompilerApi(compilerUrl, {
|
|
35
46
|
allowInsecureConnection: true,
|
|
36
47
|
additionalPolicies: [
|
|
48
|
+
...ignoreVersion ? [] : [genVersionCheckPolicy('compiler', getVersion, '7.3.0', '9.0.0')],
|
|
37
49
|
genErrorFormatterPolicy((body: GeneralCompilerError | CompilerErrorApi[]) => {
|
|
38
50
|
let message = '';
|
|
39
51
|
if ('reason' in body) {
|
|
@@ -51,23 +63,21 @@ export default class CompilerHttp extends CompilerBase {
|
|
|
51
63
|
}),
|
|
52
64
|
],
|
|
53
65
|
});
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
.then(({ apiVersion }) => apiVersion, (error) => error);
|
|
57
|
-
this.api.pipeline.addPolicy(
|
|
58
|
-
genVersionCheckPolicy('compiler', '/api-version', versionPromise, '7.3.0', '8.0.0'),
|
|
59
|
-
);
|
|
60
|
-
}
|
|
66
|
+
this.api.pipeline.removePolicy({ name: userAgentPolicyName });
|
|
67
|
+
this.api.pipeline.removePolicy({ name: setClientRequestIdPolicyName });
|
|
61
68
|
}
|
|
62
69
|
|
|
63
70
|
async compileBySourceCode(
|
|
64
71
|
sourceCode: string,
|
|
65
72
|
fileSystem?: Record<string, string>,
|
|
66
|
-
):
|
|
73
|
+
): CompileResult {
|
|
67
74
|
try {
|
|
68
|
-
const
|
|
75
|
+
const cmpOut = await this.api.compileContract({ code: sourceCode, options: { fileSystem } });
|
|
76
|
+
cmpOut.warnings ??= []; // TODO: remove after requiring http compiler above or equal to 8.0.0
|
|
77
|
+
const warnings = cmpOut.warnings.map(({ type, ...warning }) => warning);
|
|
78
|
+
const res = { ...cmpOut, warnings };
|
|
69
79
|
// TODO: should be fixed when the compiledAci interface gets updated
|
|
70
|
-
return res as
|
|
80
|
+
return res as Awaited<CompileResult>;
|
|
71
81
|
} catch (error) {
|
|
72
82
|
if (error instanceof RestError && error.statusCode === 400) {
|
|
73
83
|
throw new CompilerError(error.message);
|
|
@@ -77,7 +87,7 @@ export default class CompilerHttp extends CompilerBase {
|
|
|
77
87
|
}
|
|
78
88
|
|
|
79
89
|
// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
|
|
80
|
-
async compile(path: string):
|
|
90
|
+
async compile(path: string): CompileResult {
|
|
81
91
|
throw new NotImplementedError('File system access, use CompilerHttpNode instead');
|
|
82
92
|
}
|
|
83
93
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'fs/promises';
|
|
2
2
|
import HttpBrowser from './Http';
|
|
3
|
-
import { Aci } from './Base';
|
|
3
|
+
import { Aci, CompileResult } from './Base';
|
|
4
4
|
import { Encoded } from '../../utils/encoder';
|
|
5
5
|
import getFileSystem from './getFileSystem';
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ import getFileSystem from './getFileSystem';
|
|
|
12
12
|
* @example CompilerHttpNode('COMPILER_URL')
|
|
13
13
|
*/
|
|
14
14
|
export default class CompilerHttpNode extends HttpBrowser {
|
|
15
|
-
override async compile(path: string):
|
|
15
|
+
override async compile(path: string): CompileResult {
|
|
16
16
|
const fileSystem = await getFileSystem(path);
|
|
17
17
|
const sourceCode = await readFile(path, 'utf8');
|
|
18
18
|
return this.compileBySourceCode(sourceCode, fileSystem);
|
|
@@ -47,19 +47,25 @@ function ensureOracleQuery(oq: string): asserts oq is Encoded.OracleQueryId {
|
|
|
47
47
|
export default async function createDelegationSignature(
|
|
48
48
|
contractAddress: Encoded.ContractAddress,
|
|
49
49
|
ids: Array<Encoded.Any | AensName>,
|
|
50
|
-
{
|
|
50
|
+
{
|
|
51
|
+
onAccount, omitAddress, isOracle, ...options
|
|
52
|
+
}: {
|
|
51
53
|
omitAddress?: boolean;
|
|
52
54
|
onAccount: AccountBase;
|
|
55
|
+
isOracle?: boolean;
|
|
53
56
|
onNode: Node;
|
|
54
57
|
},
|
|
55
58
|
): Promise<Uint8Array> {
|
|
56
59
|
if (ids.length > 1) throw new ArgumentError('ids', 'shorter than 2', ids);
|
|
57
|
-
const
|
|
60
|
+
const { nodeNetworkId, consensusProtocolVersion } = await options.onNode.getNodeInfo();
|
|
61
|
+
const signOpts = { networkId: nodeNetworkId, consensusProtocolVersion };
|
|
58
62
|
if (ids.length === 0) {
|
|
59
63
|
if (omitAddress === true) {
|
|
60
64
|
throw new ArgumentError('omitAddress', 'equal false', omitAddress);
|
|
61
65
|
}
|
|
62
|
-
return decode(
|
|
66
|
+
return decode(
|
|
67
|
+
await onAccount.signDelegationToContract(contractAddress, { ...signOpts, isOracle }),
|
|
68
|
+
);
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
const [payload] = ids;
|
|
@@ -68,7 +74,7 @@ export default async function createDelegationSignature(
|
|
|
68
74
|
throw new ArgumentError('omitAddress', 'equal false', omitAddress);
|
|
69
75
|
}
|
|
70
76
|
return decode(
|
|
71
|
-
await onAccount.signNameDelegationToContract(contractAddress, payload,
|
|
77
|
+
await onAccount.signNameDelegationToContract(contractAddress, payload, signOpts),
|
|
72
78
|
);
|
|
73
79
|
}
|
|
74
80
|
|
|
@@ -77,6 +83,6 @@ export default async function createDelegationSignature(
|
|
|
77
83
|
throw new ArgumentError('omitAddress', 'equal true', omitAddress);
|
|
78
84
|
}
|
|
79
85
|
return decode(
|
|
80
|
-
await onAccount.signOracleQueryDelegationToContract(contractAddress, payload,
|
|
86
|
+
await onAccount.signOracleQueryDelegationToContract(contractAddress, payload, signOpts),
|
|
81
87
|
);
|
|
82
88
|
}
|
package/src/contract/ga.ts
CHANGED
|
@@ -15,14 +15,14 @@ import { concatBuffers } from '../utils/other';
|
|
|
15
15
|
import AccountBase from '../account/Base';
|
|
16
16
|
import Contract from './Contract';
|
|
17
17
|
import Node from '../Node';
|
|
18
|
-
import {
|
|
18
|
+
import { getAccount } from '../chain';
|
|
19
|
+
import { sendTransaction, SendTransactionOptions } from '../send-transaction';
|
|
19
20
|
import CompilerBase from './compiler/Base';
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* Convert current account to GA
|
|
23
24
|
* @category contract
|
|
24
25
|
* @param authFnName - Authorization function name
|
|
25
|
-
* @param sourceCode - Auth contract source code
|
|
26
26
|
* @param args - init arguments
|
|
27
27
|
* @param options - Options
|
|
28
28
|
* @returns General Account Object
|
|
@@ -49,6 +49,7 @@ export async function createGeneralizedAccount(
|
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
const tx = await buildTxAsync({
|
|
52
|
+
_isInternalBuild: true,
|
|
52
53
|
...options,
|
|
53
54
|
tag: Tag.GaAttachTx,
|
|
54
55
|
onNode,
|
|
@@ -58,10 +59,10 @@ export async function createGeneralizedAccount(
|
|
|
58
59
|
callData: contract._calldata.encode(contract._name, 'init', args),
|
|
59
60
|
authFun: hash(authFnName),
|
|
60
61
|
});
|
|
61
|
-
const contractId = buildContractIdByContractTx(tx);
|
|
62
62
|
const { hash: transaction, rawTx } = await sendTransaction(tx, {
|
|
63
63
|
onNode, onAccount, onCompiler, ...options,
|
|
64
64
|
});
|
|
65
|
+
const contractId = buildContractIdByContractTx(rawTx);
|
|
65
66
|
|
|
66
67
|
return Object.freeze({
|
|
67
68
|
owner: ownerId,
|
package/src/deprecated.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { TypeResolver, ContractByteArrayEncoder } from '@aeternity/aepp-calldata';
|
|
2
|
+
import { AciValue } from './utils/typed-data';
|
|
3
|
+
import { Encoded } from './utils/encoder';
|
|
1
4
|
import { RpcError } from './aepp-wallet-communication/schema';
|
|
5
|
+
import { ORACLE_TTL_TYPES } from './tx/builder/schema';
|
|
2
6
|
|
|
3
7
|
/**
|
|
4
8
|
* @category exception
|
|
5
9
|
* @deprecated this exception is not thrown anymore
|
|
6
10
|
*/
|
|
7
|
-
// eslint-disable-next-line import/prefer-default-export
|
|
8
11
|
export class RpcBroadcastError extends RpcError {
|
|
9
12
|
static override code = 3;
|
|
10
13
|
|
|
@@ -21,3 +24,54 @@ export class RpcBroadcastError extends RpcError {
|
|
|
21
24
|
* @deprecated use isAuctionName instead
|
|
22
25
|
*/
|
|
23
26
|
export const NAME_BID_MAX_LENGTH = 12; // # this is the max length for a domain to be part of a bid
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated use ContractByteArrayEncoder:encodeWithType from \@aeternity/aepp-calldata
|
|
30
|
+
*/
|
|
31
|
+
export function encodeFateValue(value: unknown, aci: AciValue): Encoded.ContractBytearray {
|
|
32
|
+
const valueType = new TypeResolver().resolveType(aci, {});
|
|
33
|
+
return new ContractByteArrayEncoder().encodeWithType(value, valueType);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated use ContractByteArrayEncoder:decodeWithType from \@aeternity/aepp-calldata
|
|
38
|
+
*/
|
|
39
|
+
export function decodeFateValue(value: Encoded.ContractBytearray, aci: AciValue): any {
|
|
40
|
+
const valueType = new TypeResolver().resolveType(aci, {});
|
|
41
|
+
return new ContractByteArrayEncoder().decodeWithType(value, valueType);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated inlined in buildTx or use `180000`
|
|
46
|
+
*/
|
|
47
|
+
export const NAME_TTL = 180000;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated inlined in buildTx or use `36000`
|
|
51
|
+
*/
|
|
52
|
+
export const NAME_MAX_TTL = 36000;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated inlined in buildTx or use `60 * 60`
|
|
56
|
+
*/
|
|
57
|
+
export const NAME_MAX_CLIENT_TTL = 60 * 60;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated inlined in buildTx or use `60 * 60`
|
|
61
|
+
*/
|
|
62
|
+
export const CLIENT_TTL = NAME_MAX_CLIENT_TTL;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated inlined in buildTx or use `{ type: ORACLE_TTL_TYPES.delta, value: 500 }`
|
|
66
|
+
*/
|
|
67
|
+
export const ORACLE_TTL = { type: ORACLE_TTL_TYPES.delta, value: 500 };
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated inlined in buildTx or use `{ type: ORACLE_TTL_TYPES.delta, value: 10 }`
|
|
71
|
+
*/
|
|
72
|
+
export const QUERY_TTL = { type: ORACLE_TTL_TYPES.delta, value: 10 };
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated inlined in buildTx or use `{ type: ORACLE_TTL_TYPES.delta, value: 10 }`
|
|
76
|
+
*/
|
|
77
|
+
export const RESPONSE_TTL = { type: ORACLE_TTL_TYPES.delta, value: 10 };
|
package/src/index-browser.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
export {
|
|
2
|
-
_getPollInterval,
|
|
2
|
+
_getPollInterval, getHeight, poll, awaitHeight, waitForTxConfirm,
|
|
3
3
|
getAccount, getBalance, getCurrentGeneration, getGeneration, getMicroBlockTransactions,
|
|
4
4
|
getKeyBlock, getMicroBlockHeader, txDryRun, getContractByteCode, getContract, getName,
|
|
5
5
|
resolveName,
|
|
6
6
|
} from './chain';
|
|
7
|
+
export { InvalidTxError, sendTransaction } from './send-transaction';
|
|
7
8
|
export {
|
|
8
9
|
getAddressFromPriv, isAddressValid, genSalt, encodeUnsigned, hash, encodeContractAddress,
|
|
9
10
|
generateKeyPairFromSecret, generateKeyPair, sign, verify, messageToHash, signMessage,
|
|
10
11
|
verifyMessage, isValidKeypair,
|
|
11
12
|
} from './utils/crypto';
|
|
13
|
+
export {
|
|
14
|
+
signJwt, unpackJwt, verifyJwt, isJwt, ensureJwt,
|
|
15
|
+
} from './utils/jwt';
|
|
16
|
+
export type { Jwt } from './utils/jwt';
|
|
12
17
|
export { recover, dump } from './utils/keystore';
|
|
13
18
|
export type { Keystore } from './utils/keystore';
|
|
14
19
|
export { toBytes } from './utils/bytes';
|
|
@@ -20,15 +25,15 @@ export {
|
|
|
20
25
|
getDefaultPointerKey, getMinimumNameFee, computeBidFee, computeAuctionEndBlock, isAuctionName,
|
|
21
26
|
} from './tx/builder/helpers';
|
|
22
27
|
export {
|
|
23
|
-
MAX_AUTH_FUN_GAS,
|
|
28
|
+
MAX_AUTH_FUN_GAS, MIN_GAS_PRICE,
|
|
24
29
|
NAME_FEE_MULTIPLIER, NAME_FEE_BID_INCREMENT, NAME_BID_TIMEOUT_BLOCKS, NAME_MAX_LENGTH_FEE,
|
|
25
|
-
NAME_BID_RANGES, ConsensusProtocolVersion, VmVersion, AbiVersion, Tag,
|
|
30
|
+
NAME_BID_RANGES, ConsensusProtocolVersion, VmVersion, AbiVersion, Tag, DRY_RUN_ACCOUNT,
|
|
26
31
|
} from './tx/builder/constants';
|
|
27
32
|
export type { Int, AensName } from './tx/builder/constants';
|
|
28
33
|
// TODO: move to constants
|
|
29
|
-
export {
|
|
30
|
-
|
|
31
|
-
} from './tx/builder/
|
|
34
|
+
export { ORACLE_TTL_TYPES, CallReturnType } from './tx/builder/schema';
|
|
35
|
+
export { DelegationTag } from './tx/builder/delegation/schema';
|
|
36
|
+
export { packDelegation, unpackDelegation } from './tx/builder/delegation';
|
|
32
37
|
export {
|
|
33
38
|
getExecutionCost, getExecutionCostBySignedTx, getExecutionCostUsingNode,
|
|
34
39
|
} from './tx/execution-cost';
|
|
@@ -43,9 +48,7 @@ export {
|
|
|
43
48
|
export {
|
|
44
49
|
encode, decode, Encoding, Encoded,
|
|
45
50
|
} from './utils/encoder';
|
|
46
|
-
export {
|
|
47
|
-
encodeFateValue, decodeFateValue, hashTypedData, hashDomain, hashJson,
|
|
48
|
-
} from './utils/typed-data';
|
|
51
|
+
export { hashTypedData, hashDomain, hashJson } from './utils/typed-data';
|
|
49
52
|
export {
|
|
50
53
|
aensRevoke, aensUpdate, aensTransfer, aensQuery, aensClaim, aensPreclaim, aensBid,
|
|
51
54
|
} from './aens';
|
|
@@ -95,7 +98,7 @@ export {
|
|
|
95
98
|
CryptographyError, NodeError, TransactionError, WalletError, ArgumentError, IllegalArgumentError,
|
|
96
99
|
ArgumentCountMismatchError, InsufficientBalanceError, MissingParamError, NoSerializerFoundError,
|
|
97
100
|
RequestTimedOutError, TxTimedOutError, TypeError, UnsupportedPlatformError,
|
|
98
|
-
UnsupportedProtocolError, NotImplementedError, UnsupportedVersionError, InternalError,
|
|
101
|
+
UnsupportedProtocolError, NotImplementedError, UnsupportedVersionError, LogicError, InternalError,
|
|
99
102
|
UnexpectedTsError, UnavailableAccountError, AensPointerContextError, InsufficientNameFeeError,
|
|
100
103
|
InvalidAensNameError, InvalidRpcMessageError, MissingCallbackError, UnAuthorizedAccountError,
|
|
101
104
|
UnknownRpcClientError, UnsubscribedAccountError, ChannelCallError, ChannelConnectionError,
|
|
@@ -111,4 +114,8 @@ export {
|
|
|
111
114
|
TagNotFoundError, TxNotInChainError, AlreadyConnectedError, NoWalletConnectedError,
|
|
112
115
|
RpcConnectionError,
|
|
113
116
|
} from './utils/errors';
|
|
114
|
-
export {
|
|
117
|
+
export {
|
|
118
|
+
RpcBroadcastError, NAME_BID_MAX_LENGTH, encodeFateValue, decodeFateValue,
|
|
119
|
+
NAME_TTL, NAME_MAX_TTL, NAME_MAX_CLIENT_TTL, CLIENT_TTL,
|
|
120
|
+
ORACLE_TTL, QUERY_TTL, RESPONSE_TTL,
|
|
121
|
+
} from './deprecated';
|