@alephium/web3 2.0.8 → 3.0.0-test.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 +165 -0
- package/README.md +11 -1
- package/dist/{src → _cjs}/address/address.js +60 -77
- package/dist/_cjs/address/address.js.map +1 -0
- package/dist/{src → _cjs}/address/index.js +1 -17
- package/dist/_cjs/address/index.js.map +1 -0
- package/dist/_cjs/api/api-alephium.d.ts +1152 -0
- package/dist/{src → _cjs}/api/api-alephium.js +5 -756
- package/dist/_cjs/api/api-alephium.js.map +1 -0
- package/dist/_cjs/api/api-explorer.d.ts +586 -0
- package/dist/{src → _cjs}/api/api-explorer.js +14 -454
- package/dist/_cjs/api/api-explorer.js.map +1 -0
- package/dist/{src → _cjs}/api/explorer-provider.js +1 -18
- package/dist/_cjs/api/explorer-provider.js.map +1 -0
- package/dist/{src → _cjs}/api/index.js +18 -24
- package/dist/_cjs/api/index.js.map +1 -0
- package/dist/{src → _cjs}/api/node-provider.d.ts +1 -1
- package/dist/{src → _cjs}/api/node-provider.js +4 -26
- package/dist/_cjs/api/node-provider.js.map +1 -0
- package/dist/{src → _cjs}/api/types.js +25 -43
- package/dist/_cjs/api/types.js.map +1 -0
- package/dist/{src → _cjs}/api/utils.d.ts +1 -1
- package/dist/{src → _cjs}/api/utils.js +9 -21
- package/dist/_cjs/api/utils.js.map +1 -0
- package/dist/{src → _cjs}/block/block.js +20 -26
- package/dist/_cjs/block/block.js.map +1 -0
- package/dist/_cjs/block/index.d.ts +2 -0
- package/dist/_cjs/block/index.js +6 -0
- package/dist/_cjs/block/index.js.map +1 -0
- package/dist/{src → _cjs}/codec/array-codec.js +1 -17
- package/dist/_cjs/codec/array-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/asset-output-codec.js +1 -17
- package/dist/_cjs/codec/asset-output-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/bigint-codec.js +2 -33
- package/dist/_cjs/codec/bigint-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/bytestring-codec.d.ts +1 -1
- package/dist/{src → _cjs}/codec/bytestring-codec.js +1 -17
- package/dist/_cjs/codec/bytestring-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/checksum-codec.js +1 -17
- package/dist/_cjs/codec/checksum-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/codec.js +3 -19
- package/dist/_cjs/codec/codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/compact-int-codec.js +2 -18
- package/dist/_cjs/codec/compact-int-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/contract-codec.js +1 -17
- package/dist/_cjs/codec/contract-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/contract-output-codec.js +1 -17
- package/dist/_cjs/codec/contract-output-codec.js.map +1 -0
- package/dist/_cjs/codec/contract-output-ref-codec.js +12 -0
- package/dist/_cjs/codec/contract-output-ref-codec.js.map +1 -0
- package/dist/_cjs/codec/either-codec.js +8 -0
- package/dist/_cjs/codec/either-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/hash.d.ts +1 -1
- package/dist/_cjs/codec/hash.js +20 -0
- package/dist/_cjs/codec/hash.js.map +1 -0
- package/dist/{src → _cjs}/codec/index.js +18 -24
- package/dist/_cjs/codec/index.js.map +1 -0
- package/dist/{src → _cjs}/codec/input-codec.js +1 -0
- package/dist/_cjs/codec/input-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/instr-codec.js +4 -21
- package/dist/_cjs/codec/instr-codec.js.map +1 -0
- package/dist/_cjs/codec/int-as-4bytes-codec.js +16 -0
- package/dist/_cjs/codec/int-as-4bytes-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/lockup-script-codec.d.ts +1 -1
- package/dist/{src → _cjs}/codec/lockup-script-codec.js +1 -17
- package/dist/_cjs/codec/lockup-script-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/method-codec.js +1 -17
- package/dist/_cjs/codec/method-codec.js.map +1 -0
- package/dist/_cjs/codec/option-codec.js +19 -0
- package/dist/_cjs/codec/option-codec.js.map +1 -0
- package/dist/_cjs/codec/output-codec.js +10 -0
- package/dist/_cjs/codec/output-codec.js.map +1 -0
- package/dist/_cjs/codec/public-key-like-codec.js +14 -0
- package/dist/_cjs/codec/public-key-like-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/reader.js +1 -17
- package/dist/_cjs/codec/reader.js.map +1 -0
- package/dist/_cjs/codec/script-codec.js +18 -0
- package/dist/_cjs/codec/script-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/signature-codec.d.ts +1 -1
- package/dist/_cjs/codec/signature-codec.js +8 -0
- package/dist/_cjs/codec/signature-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/timestamp-codec.js +1 -17
- package/dist/_cjs/codec/timestamp-codec.js.map +1 -0
- package/dist/_cjs/codec/token-codec.js +12 -0
- package/dist/_cjs/codec/token-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/transaction-codec.js +1 -17
- package/dist/_cjs/codec/transaction-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/unlock-script-codec.d.ts +1 -1
- package/dist/{src → _cjs}/codec/unlock-script-codec.js +1 -17
- package/dist/_cjs/codec/unlock-script-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/unsigned-tx-codec.js +1 -0
- package/dist/_cjs/codec/unsigned-tx-codec.js.map +1 -0
- package/dist/{src → _cjs}/codec/val.js +1 -17
- package/dist/_cjs/codec/val.js.map +1 -0
- package/dist/{src → _cjs}/constants.d.ts +0 -3
- package/dist/{src → _cjs}/constants.js +1 -20
- package/dist/_cjs/constants.js.map +1 -0
- package/dist/{src → _cjs}/contract/contract.js +89 -80
- package/dist/_cjs/contract/contract.js.map +1 -0
- package/dist/{src → _cjs}/contract/dapp-tx-builder.js +3 -19
- package/dist/_cjs/contract/dapp-tx-builder.js.map +1 -0
- package/dist/_cjs/contract/deployment.js +3 -0
- package/dist/_cjs/contract/deployment.js.map +1 -0
- package/dist/{src → _cjs}/contract/events.js +20 -26
- package/dist/_cjs/contract/events.js.map +1 -0
- package/dist/{src → _cjs}/contract/index.js +1 -17
- package/dist/_cjs/contract/index.js.map +1 -0
- package/dist/{src → _cjs}/contract/ralph.js +35 -69
- package/dist/_cjs/contract/ralph.js.map +1 -0
- package/dist/{src → _cjs}/contract/script-simulator.d.ts +0 -12
- package/dist/{src → _cjs}/contract/script-simulator.js +23 -64
- package/dist/_cjs/contract/script-simulator.js.map +1 -0
- package/dist/_cjs/debug.js +29 -0
- package/dist/_cjs/debug.js.map +1 -0
- package/dist/{src → _cjs}/error.js +1 -17
- package/dist/_cjs/error.js.map +1 -0
- package/dist/{src → _cjs}/exchange/exchange.js +8 -26
- package/dist/_cjs/exchange/exchange.js.map +1 -0
- package/dist/_cjs/exchange/index.d.ts +2 -0
- package/dist/{src → _cjs}/exchange/index.js +1 -17
- package/dist/_cjs/exchange/index.js.map +1 -0
- package/dist/{src → _cjs}/global.js +7 -26
- package/dist/_cjs/global.js.map +1 -0
- package/dist/{src → _cjs}/index.js +18 -27
- package/dist/_cjs/index.js.map +1 -0
- package/dist/_cjs/package.json +1 -0
- package/dist/{src → _cjs}/signer/index.js +1 -17
- package/dist/_cjs/signer/index.js.map +1 -0
- package/dist/{src → _cjs}/signer/signer.js +16 -63
- package/dist/_cjs/signer/signer.js.map +1 -0
- package/dist/{src → _cjs}/signer/tx-builder.js +4 -21
- package/dist/_cjs/signer/tx-builder.js.map +1 -0
- package/dist/{src → _cjs}/signer/types.js +6 -22
- package/dist/_cjs/signer/types.js.map +1 -0
- package/dist/{src → _cjs}/token/index.js +1 -17
- package/dist/_cjs/token/index.js.map +1 -0
- package/dist/{src → _cjs}/token/nft.d.ts +0 -1
- package/dist/{src → _cjs}/token/nft.js +5 -24
- package/dist/_cjs/token/nft.js.map +1 -0
- package/dist/{src → _cjs}/transaction/index.js +1 -17
- package/dist/_cjs/transaction/index.js.map +1 -0
- package/dist/{src → _cjs}/transaction/sign-verify.js +20 -27
- package/dist/_cjs/transaction/sign-verify.js.map +1 -0
- package/dist/{src → _cjs}/transaction/status.js +20 -26
- package/dist/_cjs/transaction/status.js.map +1 -0
- package/dist/{src → _cjs}/transaction/utils.js +3 -20
- package/dist/_cjs/transaction/utils.js.map +1 -0
- package/dist/{src → _cjs}/utils/bs58.d.ts +0 -1
- package/dist/{src → _cjs}/utils/bs58.js +4 -21
- package/dist/_cjs/utils/bs58.js.map +1 -0
- package/dist/_cjs/utils/djb2.js +11 -0
- package/dist/_cjs/utils/djb2.js.map +1 -0
- package/dist/{src → _cjs}/utils/index.js +1 -17
- package/dist/_cjs/utils/index.js.map +1 -0
- package/dist/{src → _cjs}/utils/number.d.ts +0 -2
- package/dist/{src → _cjs}/utils/number.fixture.js +1 -17
- package/dist/_cjs/utils/number.fixture.js.map +1 -0
- package/dist/{src → _cjs}/utils/number.js +10 -44
- package/dist/_cjs/utils/number.js.map +1 -0
- package/dist/_cjs/utils/sign.js +89 -0
- package/dist/_cjs/utils/sign.js.map +1 -0
- package/dist/{src → _cjs}/utils/subscription.js +1 -17
- package/dist/_cjs/utils/subscription.js.map +1 -0
- package/dist/{src → _cjs}/utils/utils.d.ts +7 -6
- package/dist/{src → _cjs}/utils/utils.js +60 -57
- package/dist/_cjs/utils/utils.js.map +1 -0
- package/dist/{src → _cjs}/utils/webcrypto.d.ts +1 -3
- package/dist/_cjs/utils/webcrypto.js +18 -0
- package/dist/_cjs/utils/webcrypto.js.map +1 -0
- package/dist/_esm/address/address.d.ts +36 -0
- package/dist/_esm/address/address.js +309 -0
- package/dist/_esm/address/address.js.map +1 -0
- package/dist/_esm/address/index.d.ts +1 -0
- package/dist/_esm/address/index.js +2 -0
- package/dist/_esm/address/index.js.map +1 -0
- package/dist/_esm/api/api-alephium.d.ts +1152 -0
- package/dist/_esm/api/api-alephium.js +797 -0
- package/dist/_esm/api/api-alephium.js.map +1 -0
- package/dist/_esm/api/api-explorer.d.ts +586 -0
- package/dist/_esm/api/api-explorer.js +577 -0
- package/dist/_esm/api/api-explorer.js.map +1 -0
- package/dist/_esm/api/explorer-provider.d.ts +21 -0
- package/dist/_esm/api/explorer-provider.js +48 -0
- package/dist/_esm/api/explorer-provider.js.map +1 -0
- package/dist/_esm/api/index.d.ts +6 -0
- package/dist/_esm/api/index.js +7 -0
- package/dist/_esm/api/index.js.map +1 -0
- package/dist/_esm/api/node-provider.d.ts +46 -0
- package/dist/_esm/api/node-provider.js +178 -0
- package/dist/_esm/api/node-provider.js.map +1 -0
- package/dist/_esm/api/types.d.ts +71 -0
- package/dist/_esm/api/types.js +219 -0
- package/dist/_esm/api/types.js.map +1 -0
- package/dist/_esm/api/utils.d.ts +10 -0
- package/dist/_esm/api/utils.js +37 -0
- package/dist/_esm/api/utils.js.map +1 -0
- package/dist/_esm/block/block.d.ts +27 -0
- package/dist/_esm/block/block.js +128 -0
- package/dist/_esm/block/block.js.map +1 -0
- package/dist/_esm/block/index.d.ts +2 -0
- package/dist/_esm/block/index.js +2 -0
- package/dist/_esm/block/index.js.map +1 -0
- package/dist/_esm/codec/array-codec.d.ts +8 -0
- package/dist/_esm/codec/array-codec.js +25 -0
- package/dist/_esm/codec/array-codec.js.map +1 -0
- package/dist/_esm/codec/asset-output-codec.d.ts +21 -0
- package/dist/_esm/codec/asset-output-codec.js +74 -0
- package/dist/_esm/codec/asset-output-codec.js.map +1 -0
- package/dist/_esm/codec/bigint-codec.d.ts +5 -0
- package/dist/_esm/codec/bigint-codec.js +62 -0
- package/dist/_esm/codec/bigint-codec.js.map +1 -0
- package/dist/_esm/codec/bytestring-codec.d.ts +10 -0
- package/dist/_esm/codec/bytestring-codec.js +16 -0
- package/dist/_esm/codec/bytestring-codec.js.map +1 -0
- package/dist/_esm/codec/checksum-codec.d.ts +8 -0
- package/dist/_esm/codec/checksum-codec.js +27 -0
- package/dist/_esm/codec/checksum-codec.js.map +1 -0
- package/dist/_esm/codec/codec.d.ts +57 -0
- package/dist/_esm/codec/codec.js +114 -0
- package/dist/_esm/codec/codec.js.map +1 -0
- package/dist/_esm/codec/compact-int-codec.d.ts +68 -0
- package/dist/_esm/codec/compact-int-codec.js +287 -0
- package/dist/_esm/codec/compact-int-codec.js.map +1 -0
- package/dist/_esm/codec/contract-codec.d.ts +19 -0
- package/dist/_esm/codec/contract-codec.js +47 -0
- package/dist/_esm/codec/contract-codec.js.map +1 -0
- package/dist/_esm/codec/contract-output-codec.d.ts +14 -0
- package/dist/_esm/codec/contract-output-codec.js +40 -0
- package/dist/_esm/codec/contract-output-codec.js.map +1 -0
- package/dist/_esm/codec/contract-output-ref-codec.d.ts +8 -0
- package/dist/_esm/codec/contract-output-ref-codec.js +9 -0
- package/dist/_esm/codec/contract-output-ref-codec.js.map +1 -0
- package/dist/_esm/codec/either-codec.d.ts +9 -0
- package/dist/_esm/codec/either-codec.js +5 -0
- package/dist/_esm/codec/either-codec.js.map +1 -0
- package/dist/_esm/codec/hash.d.ts +3 -0
- package/dist/_esm/codec/hash.js +15 -0
- package/dist/_esm/codec/hash.js.map +1 -0
- package/dist/_esm/codec/index.d.ts +24 -0
- package/dist/_esm/codec/index.js +25 -0
- package/dist/_esm/codec/index.js.map +1 -0
- package/dist/_esm/codec/input-codec.d.ts +15 -0
- package/dist/_esm/codec/input-codec.js +33 -0
- package/dist/_esm/codec/input-codec.js.map +1 -0
- package/dist/_esm/codec/instr-codec.d.ts +857 -0
- package/dist/_esm/codec/instr-codec.js +1138 -0
- package/dist/_esm/codec/instr-codec.js.map +1 -0
- package/dist/_esm/codec/int-as-4bytes-codec.d.ts +7 -0
- package/dist/_esm/codec/int-as-4bytes-codec.js +12 -0
- package/dist/_esm/codec/int-as-4bytes-codec.js.map +1 -0
- package/dist/_esm/codec/lockup-script-codec.d.ts +42 -0
- package/dist/_esm/codec/lockup-script-codec.js +28 -0
- package/dist/_esm/codec/lockup-script-codec.js.map +1 -0
- package/dist/_esm/codec/method-codec.d.ts +20 -0
- package/dist/_esm/codec/method-codec.js +54 -0
- package/dist/_esm/codec/method-codec.js.map +1 -0
- package/dist/_esm/codec/option-codec.d.ts +9 -0
- package/dist/_esm/codec/option-codec.js +16 -0
- package/dist/_esm/codec/option-codec.js.map +1 -0
- package/dist/_esm/codec/output-codec.d.ts +7 -0
- package/dist/_esm/codec/output-codec.js +7 -0
- package/dist/_esm/codec/output-codec.js.map +1 -0
- package/dist/_esm/codec/public-key-like-codec.d.ts +17 -0
- package/dist/_esm/codec/public-key-like-codec.js +11 -0
- package/dist/_esm/codec/public-key-like-codec.js.map +1 -0
- package/dist/_esm/codec/reader.d.ts +10 -0
- package/dist/_esm/codec/reader.js +38 -0
- package/dist/_esm/codec/reader.js.map +1 -0
- package/dist/_esm/codec/script-codec.d.ts +12 -0
- package/dist/_esm/codec/script-codec.js +14 -0
- package/dist/_esm/codec/script-codec.js.map +1 -0
- package/dist/_esm/codec/signature-codec.d.ts +5 -0
- package/dist/_esm/codec/signature-codec.js +5 -0
- package/dist/_esm/codec/signature-codec.js.map +1 -0
- package/dist/_esm/codec/timestamp-codec.d.ts +8 -0
- package/dist/_esm/codec/timestamp-codec.js +19 -0
- package/dist/_esm/codec/timestamp-codec.js.map +1 -0
- package/dist/_esm/codec/token-codec.d.ts +8 -0
- package/dist/_esm/codec/token-codec.js +9 -0
- package/dist/_esm/codec/token-codec.js.map +1 -0
- package/dist/_esm/codec/transaction-codec.d.ts +21 -0
- package/dist/_esm/codec/transaction-codec.js +82 -0
- package/dist/_esm/codec/transaction-codec.js.map +1 -0
- package/dist/_esm/codec/unlock-script-codec.d.ts +44 -0
- package/dist/_esm/codec/unlock-script-codec.js +49 -0
- package/dist/_esm/codec/unlock-script-codec.js.map +1 -0
- package/dist/_esm/codec/unsigned-tx-codec.d.ts +23 -0
- package/dist/_esm/codec/unsigned-tx-codec.js +57 -0
- package/dist/_esm/codec/unsigned-tx-codec.js.map +1 -0
- package/dist/_esm/codec/val.d.ts +27 -0
- package/dist/_esm/codec/val.js +14 -0
- package/dist/_esm/codec/val.js.map +1 -0
- package/dist/_esm/constants.d.ts +14 -0
- package/dist/_esm/constants.js +15 -0
- package/dist/_esm/constants.js.map +1 -0
- package/dist/_esm/contract/contract.d.ts +328 -0
- package/dist/_esm/contract/contract.js +1449 -0
- package/dist/_esm/contract/contract.js.map +1 -0
- package/dist/_esm/contract/dapp-tx-builder.d.ts +26 -0
- package/dist/_esm/contract/dapp-tx-builder.js +166 -0
- package/dist/_esm/contract/dapp-tx-builder.js.map +1 -0
- package/dist/_esm/contract/deployment.d.ts +21 -0
- package/dist/_esm/contract/deployment.js +2 -0
- package/dist/_esm/contract/deployment.js.map +1 -0
- package/dist/_esm/contract/events.d.ts +17 -0
- package/dist/_esm/contract/events.js +59 -0
- package/dist/_esm/contract/events.js.map +1 -0
- package/dist/_esm/contract/index.d.ts +6 -0
- package/dist/_esm/contract/index.js +7 -0
- package/dist/_esm/contract/index.js.map +1 -0
- package/dist/_esm/contract/ralph.d.ts +73 -0
- package/dist/_esm/contract/ralph.js +372 -0
- package/dist/_esm/contract/ralph.js.map +1 -0
- package/dist/_esm/contract/script-simulator.d.ts +15 -0
- package/dist/_esm/contract/script-simulator.js +712 -0
- package/dist/_esm/contract/script-simulator.js.map +1 -0
- package/dist/_esm/debug.d.ts +6 -0
- package/dist/_esm/debug.js +21 -0
- package/dist/_esm/debug.js.map +1 -0
- package/dist/_esm/error.d.ts +4 -0
- package/dist/_esm/error.js +16 -0
- package/dist/_esm/error.js.map +1 -0
- package/dist/_esm/exchange/exchange.d.ts +21 -0
- package/dist/_esm/exchange/exchange.js +137 -0
- package/dist/_esm/exchange/exchange.js.map +1 -0
- package/dist/_esm/exchange/index.d.ts +2 -0
- package/dist/_esm/exchange/index.js +2 -0
- package/dist/_esm/exchange/index.js.map +1 -0
- package/dist/_esm/global.d.ts +10 -0
- package/dist/_esm/global.js +49 -0
- package/dist/_esm/global.js.map +1 -0
- package/dist/_esm/index.d.ts +15 -0
- package/dist/_esm/index.js +16 -0
- package/dist/_esm/index.js.map +1 -0
- package/dist/_esm/package.json +1 -0
- package/dist/_esm/signer/index.d.ts +3 -0
- package/dist/_esm/signer/index.js +4 -0
- package/dist/_esm/signer/index.js.map +1 -0
- package/dist/_esm/signer/signer.d.ts +63 -0
- package/dist/_esm/signer/signer.js +279 -0
- package/dist/_esm/signer/signer.js.map +1 -0
- package/dist/_esm/signer/tx-builder.d.ts +22 -0
- package/dist/_esm/signer/tx-builder.js +270 -0
- package/dist/_esm/signer/tx-builder.js.map +1 -0
- package/dist/_esm/signer/types.d.ts +167 -0
- package/dist/_esm/signer/types.js +27 -0
- package/dist/_esm/signer/types.js.map +1 -0
- package/dist/_esm/token/index.d.ts +1 -0
- package/dist/_esm/token/index.js +2 -0
- package/dist/_esm/token/index.js.map +1 -0
- package/dist/_esm/token/nft.d.ts +8 -0
- package/dist/_esm/token/nft.js +95 -0
- package/dist/_esm/token/nft.js.map +1 -0
- package/dist/_esm/transaction/index.d.ts +3 -0
- package/dist/_esm/transaction/index.js +4 -0
- package/dist/_esm/transaction/index.js.map +1 -0
- package/dist/_esm/transaction/sign-verify.d.ts +3 -0
- package/dist/_esm/transaction/sign-verify.js +8 -0
- package/dist/_esm/transaction/sign-verify.js.map +1 -0
- package/dist/_esm/transaction/status.d.ts +12 -0
- package/dist/_esm/transaction/status.js +33 -0
- package/dist/_esm/transaction/status.js.map +1 -0
- package/dist/_esm/transaction/utils.d.ts +4 -0
- package/dist/_esm/transaction/utils.js +35 -0
- package/dist/_esm/transaction/utils.js.map +1 -0
- package/dist/_esm/utils/bs58.d.ts +5 -0
- package/dist/_esm/utils/bs58.js +25 -0
- package/dist/_esm/utils/bs58.js.map +1 -0
- package/dist/_esm/utils/djb2.d.ts +1 -0
- package/dist/_esm/utils/djb2.js +8 -0
- package/dist/_esm/utils/djb2.js.map +1 -0
- package/dist/_esm/utils/index.d.ts +7 -0
- package/dist/_esm/utils/index.js +8 -0
- package/dist/_esm/utils/index.js.map +1 -0
- package/dist/_esm/utils/number.d.ts +17 -0
- package/dist/_esm/utils/number.fixture.d.ts +12 -0
- package/dist/_esm/utils/number.fixture.js +170 -0
- package/dist/_esm/utils/number.fixture.js.map +1 -0
- package/dist/_esm/utils/number.js +104 -0
- package/dist/_esm/utils/number.js.map +1 -0
- package/dist/_esm/utils/sign.d.ts +3 -0
- package/dist/_esm/utils/sign.js +52 -0
- package/dist/_esm/utils/sign.js.map +1 -0
- package/dist/_esm/utils/subscription.d.ts +22 -0
- package/dist/_esm/utils/subscription.js +31 -0
- package/dist/_esm/utils/subscription.js.map +1 -0
- package/dist/_esm/utils/utils.d.ts +40 -0
- package/dist/_esm/utils/utils.js +116 -0
- package/dist/_esm/utils/utils.js.map +1 -0
- package/dist/_esm/utils/webcrypto.d.ts +4 -0
- package/dist/_esm/utils/webcrypto.js +14 -0
- package/dist/_esm/utils/webcrypto.js.map +1 -0
- package/package.json +34 -40
- package/src/address/address.ts +12 -17
- package/src/api/api-alephium.ts +4 -5
- package/src/api/api-explorer.ts +4 -5
- package/src/api/types.ts +3 -2
- package/src/api/utils.ts +13 -1
- package/src/block/index.ts +2 -1
- package/src/codec/hash.ts +2 -2
- package/src/contract/contract.ts +54 -15
- package/src/exchange/index.ts +1 -3
- package/src/index.ts +0 -4
- package/src/signer/signer.ts +17 -11
- package/src/token/nft.ts +0 -1
- package/src/utils/sign.ts +19 -20
- package/src/utils/utils.ts +9 -20
- package/src/utils/webcrypto.ts +4 -10
- package/tsconfig.build.json +9 -0
- package/dist/alephium-web3.min.js +0 -3
- package/dist/alephium-web3.min.js.LICENSE.txt +0 -12
- package/dist/alephium-web3.min.js.map +0 -1
- package/dist/scripts/check-versions.d.ts +0 -1
- package/dist/scripts/check-versions.js +0 -39
- package/dist/scripts/header.d.ts +0 -0
- package/dist/scripts/header.js +0 -18
- package/dist/src/api/api-alephium.d.ts +0 -2433
- package/dist/src/api/api-explorer.d.ts +0 -1472
- package/dist/src/block/index.d.ts +0 -1
- package/dist/src/block/index.js +0 -22
- package/dist/src/codec/contract-output-ref-codec.js +0 -28
- package/dist/src/codec/either-codec.js +0 -25
- package/dist/src/codec/hash.js +0 -40
- package/dist/src/codec/int-as-4bytes-codec.js +0 -32
- package/dist/src/codec/option-codec.js +0 -36
- package/dist/src/codec/output-codec.js +0 -26
- package/dist/src/codec/public-key-like-codec.js +0 -30
- package/dist/src/codec/script-codec.js +0 -34
- package/dist/src/codec/signature-codec.js +0 -24
- package/dist/src/codec/token-codec.js +0 -28
- package/dist/src/contract/deployment.js +0 -19
- package/dist/src/debug.js +0 -46
- package/dist/src/exchange/index.d.ts +0 -1
- package/dist/src/utils/djb2.js +0 -27
- package/dist/src/utils/sign.js +0 -96
- package/dist/src/utils/webcrypto.js +0 -41
- package/webpack.config.js +0 -56
- /package/dist/{src → _cjs}/address/address.d.ts +0 -0
- /package/dist/{src → _cjs}/address/index.d.ts +0 -0
- /package/dist/{src → _cjs}/api/explorer-provider.d.ts +0 -0
- /package/dist/{src → _cjs}/api/index.d.ts +0 -0
- /package/dist/{src → _cjs}/api/types.d.ts +0 -0
- /package/dist/{src → _cjs}/block/block.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/array-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/asset-output-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/bigint-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/checksum-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/compact-int-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/contract-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/contract-output-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/contract-output-ref-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/either-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/index.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/input-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/instr-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/int-as-4bytes-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/method-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/option-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/output-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/public-key-like-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/reader.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/script-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/timestamp-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/token-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/transaction-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/unsigned-tx-codec.d.ts +0 -0
- /package/dist/{src → _cjs}/codec/val.d.ts +0 -0
- /package/dist/{src → _cjs}/contract/contract.d.ts +0 -0
- /package/dist/{src → _cjs}/contract/dapp-tx-builder.d.ts +0 -0
- /package/dist/{src → _cjs}/contract/deployment.d.ts +0 -0
- /package/dist/{src → _cjs}/contract/events.d.ts +0 -0
- /package/dist/{src → _cjs}/contract/index.d.ts +0 -0
- /package/dist/{src → _cjs}/contract/ralph.d.ts +0 -0
- /package/dist/{src → _cjs}/debug.d.ts +0 -0
- /package/dist/{src → _cjs}/error.d.ts +0 -0
- /package/dist/{src → _cjs}/exchange/exchange.d.ts +0 -0
- /package/dist/{src → _cjs}/global.d.ts +0 -0
- /package/dist/{src → _cjs}/index.d.ts +0 -0
- /package/dist/{src → _cjs}/signer/index.d.ts +0 -0
- /package/dist/{src → _cjs}/signer/signer.d.ts +0 -0
- /package/dist/{src → _cjs}/signer/tx-builder.d.ts +0 -0
- /package/dist/{src → _cjs}/signer/types.d.ts +0 -0
- /package/dist/{src → _cjs}/token/index.d.ts +0 -0
- /package/dist/{src → _cjs}/transaction/index.d.ts +0 -0
- /package/dist/{src → _cjs}/transaction/sign-verify.d.ts +0 -0
- /package/dist/{src → _cjs}/transaction/status.d.ts +0 -0
- /package/dist/{src → _cjs}/transaction/utils.d.ts +0 -0
- /package/dist/{src → _cjs}/utils/djb2.d.ts +0 -0
- /package/dist/{src → _cjs}/utils/index.d.ts +0 -0
- /package/dist/{src → _cjs}/utils/number.fixture.d.ts +0 -0
- /package/dist/{src → _cjs}/utils/sign.d.ts +0 -0
- /package/dist/{src → _cjs}/utils/subscription.d.ts +0 -0
|
@@ -1,2433 +0,0 @@
|
|
|
1
|
-
/** AddressAssetState */
|
|
2
|
-
export interface AddressAssetState {
|
|
3
|
-
/** @format address */
|
|
4
|
-
address: string;
|
|
5
|
-
/** @format uint256 */
|
|
6
|
-
attoAlphAmount: string;
|
|
7
|
-
tokens?: Token[];
|
|
8
|
-
}
|
|
9
|
-
/** AddressBalance */
|
|
10
|
-
export interface AddressBalance {
|
|
11
|
-
/** @format address */
|
|
12
|
-
address: string;
|
|
13
|
-
/** @format uint256 */
|
|
14
|
-
balance: string;
|
|
15
|
-
/** @format x.x ALPH */
|
|
16
|
-
balanceHint: string;
|
|
17
|
-
/** @format uint256 */
|
|
18
|
-
lockedBalance: string;
|
|
19
|
-
/** @format x.x ALPH */
|
|
20
|
-
lockedBalanceHint: string;
|
|
21
|
-
}
|
|
22
|
-
/** AddressInfo */
|
|
23
|
-
export interface AddressInfo {
|
|
24
|
-
/** @format address */
|
|
25
|
-
address: string;
|
|
26
|
-
/** @format public-key */
|
|
27
|
-
publicKey: string;
|
|
28
|
-
/** @format group-index */
|
|
29
|
-
group: number;
|
|
30
|
-
path: string;
|
|
31
|
-
}
|
|
32
|
-
/** Addresses */
|
|
33
|
-
export interface Addresses {
|
|
34
|
-
/** @format address */
|
|
35
|
-
activeAddress: string;
|
|
36
|
-
addresses: AddressInfo[];
|
|
37
|
-
}
|
|
38
|
-
/** AssetInput */
|
|
39
|
-
export interface AssetInput {
|
|
40
|
-
outputRef: OutputRef;
|
|
41
|
-
/** @format hex-string */
|
|
42
|
-
unlockScript: string;
|
|
43
|
-
}
|
|
44
|
-
/** AssetOutput */
|
|
45
|
-
export interface AssetOutput {
|
|
46
|
-
/** @format int32 */
|
|
47
|
-
hint: number;
|
|
48
|
-
/** @format 32-byte-hash */
|
|
49
|
-
key: string;
|
|
50
|
-
/** @format uint256 */
|
|
51
|
-
attoAlphAmount: string;
|
|
52
|
-
/** @format address */
|
|
53
|
-
address: string;
|
|
54
|
-
tokens: Token[];
|
|
55
|
-
/** @format int64 */
|
|
56
|
-
lockTime: number;
|
|
57
|
-
/** @format hex-string */
|
|
58
|
-
message: string;
|
|
59
|
-
type: string;
|
|
60
|
-
}
|
|
61
|
-
/** AssetState */
|
|
62
|
-
export interface AssetState {
|
|
63
|
-
/** @format uint256 */
|
|
64
|
-
attoAlphAmount: string;
|
|
65
|
-
tokens?: Token[];
|
|
66
|
-
}
|
|
67
|
-
/** BadRequest */
|
|
68
|
-
export interface BadRequest {
|
|
69
|
-
detail: string;
|
|
70
|
-
}
|
|
71
|
-
/** Balance */
|
|
72
|
-
export interface Balance {
|
|
73
|
-
/** @format uint256 */
|
|
74
|
-
balance: string;
|
|
75
|
-
/** @format x.x ALPH */
|
|
76
|
-
balanceHint: string;
|
|
77
|
-
/** @format uint256 */
|
|
78
|
-
lockedBalance: string;
|
|
79
|
-
/** @format x.x ALPH */
|
|
80
|
-
lockedBalanceHint: string;
|
|
81
|
-
tokenBalances?: Token[];
|
|
82
|
-
lockedTokenBalances?: Token[];
|
|
83
|
-
/** @format int32 */
|
|
84
|
-
utxoNum: number;
|
|
85
|
-
}
|
|
86
|
-
/** Balances */
|
|
87
|
-
export interface Balances {
|
|
88
|
-
/** @format uint256 */
|
|
89
|
-
totalBalance: string;
|
|
90
|
-
/** @format x.x ALPH */
|
|
91
|
-
totalBalanceHint: string;
|
|
92
|
-
balances: AddressBalance[];
|
|
93
|
-
}
|
|
94
|
-
/** Ban */
|
|
95
|
-
export interface Ban {
|
|
96
|
-
peers: string[];
|
|
97
|
-
type: string;
|
|
98
|
-
}
|
|
99
|
-
/** Banned */
|
|
100
|
-
export interface Banned {
|
|
101
|
-
/** @format int64 */
|
|
102
|
-
until: number;
|
|
103
|
-
type: string;
|
|
104
|
-
}
|
|
105
|
-
/** BlockAndEvents */
|
|
106
|
-
export interface BlockAndEvents {
|
|
107
|
-
block: BlockEntry;
|
|
108
|
-
events: ContractEventByBlockHash[];
|
|
109
|
-
}
|
|
110
|
-
/** BlockEntry */
|
|
111
|
-
export interface BlockEntry {
|
|
112
|
-
/** @format block-hash */
|
|
113
|
-
hash: string;
|
|
114
|
-
/** @format int64 */
|
|
115
|
-
timestamp: number;
|
|
116
|
-
/** @format int32 */
|
|
117
|
-
chainFrom: number;
|
|
118
|
-
/** @format int32 */
|
|
119
|
-
chainTo: number;
|
|
120
|
-
/** @format int32 */
|
|
121
|
-
height: number;
|
|
122
|
-
deps: string[];
|
|
123
|
-
transactions: Transaction[];
|
|
124
|
-
/** @format hex-string */
|
|
125
|
-
nonce: string;
|
|
126
|
-
version: number;
|
|
127
|
-
/** @format 32-byte-hash */
|
|
128
|
-
depStateHash: string;
|
|
129
|
-
/** @format 32-byte-hash */
|
|
130
|
-
txsHash: string;
|
|
131
|
-
/** @format hex-string */
|
|
132
|
-
target: string;
|
|
133
|
-
ghostUncles: GhostUncleBlockEntry[];
|
|
134
|
-
conflictedTxs?: string[];
|
|
135
|
-
}
|
|
136
|
-
/** BlockHeaderEntry */
|
|
137
|
-
export interface BlockHeaderEntry {
|
|
138
|
-
/** @format block-hash */
|
|
139
|
-
hash: string;
|
|
140
|
-
/** @format int64 */
|
|
141
|
-
timestamp: number;
|
|
142
|
-
/** @format int32 */
|
|
143
|
-
chainFrom: number;
|
|
144
|
-
/** @format int32 */
|
|
145
|
-
chainTo: number;
|
|
146
|
-
/** @format int32 */
|
|
147
|
-
height: number;
|
|
148
|
-
deps: string[];
|
|
149
|
-
}
|
|
150
|
-
/** BlocksAndEventsPerTimeStampRange */
|
|
151
|
-
export interface BlocksAndEventsPerTimeStampRange {
|
|
152
|
-
blocksAndEvents: BlockAndEvents[][];
|
|
153
|
-
}
|
|
154
|
-
/** BlocksPerTimeStampRange */
|
|
155
|
-
export interface BlocksPerTimeStampRange {
|
|
156
|
-
blocks: BlockEntry[][];
|
|
157
|
-
}
|
|
158
|
-
/** BrokerInfo */
|
|
159
|
-
export interface BrokerInfo {
|
|
160
|
-
/** @format clique-id */
|
|
161
|
-
cliqueId: string;
|
|
162
|
-
/** @format int32 */
|
|
163
|
-
brokerId: number;
|
|
164
|
-
/** @format int32 */
|
|
165
|
-
brokerNum: number;
|
|
166
|
-
/** @format inet-socket-address */
|
|
167
|
-
address: {
|
|
168
|
-
addr: string;
|
|
169
|
-
/** @format int32 */
|
|
170
|
-
port: number;
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
/** BuildChainedDeployContractTx */
|
|
174
|
-
export interface BuildChainedDeployContractTx {
|
|
175
|
-
value: BuildDeployContractTx;
|
|
176
|
-
type: string;
|
|
177
|
-
}
|
|
178
|
-
/** BuildChainedDeployContractTxResult */
|
|
179
|
-
export interface BuildChainedDeployContractTxResult {
|
|
180
|
-
value: BuildSimpleDeployContractTxResult;
|
|
181
|
-
type: string;
|
|
182
|
-
}
|
|
183
|
-
/** BuildChainedExecuteScriptTx */
|
|
184
|
-
export interface BuildChainedExecuteScriptTx {
|
|
185
|
-
value: BuildExecuteScriptTx;
|
|
186
|
-
type: string;
|
|
187
|
-
}
|
|
188
|
-
/** BuildChainedExecuteScriptTxResult */
|
|
189
|
-
export interface BuildChainedExecuteScriptTxResult {
|
|
190
|
-
value: BuildSimpleExecuteScriptTxResult;
|
|
191
|
-
type: string;
|
|
192
|
-
}
|
|
193
|
-
/** BuildChainedTransferTx */
|
|
194
|
-
export interface BuildChainedTransferTx {
|
|
195
|
-
value: BuildTransferTx;
|
|
196
|
-
type: string;
|
|
197
|
-
}
|
|
198
|
-
/** BuildChainedTransferTxResult */
|
|
199
|
-
export interface BuildChainedTransferTxResult {
|
|
200
|
-
value: BuildSimpleTransferTxResult;
|
|
201
|
-
type: string;
|
|
202
|
-
}
|
|
203
|
-
/** BuildChainedTx */
|
|
204
|
-
export type BuildChainedTx = BuildChainedDeployContractTx | BuildChainedExecuteScriptTx | BuildChainedTransferTx;
|
|
205
|
-
/** BuildChainedTxResult */
|
|
206
|
-
export type BuildChainedTxResult = BuildChainedDeployContractTxResult | BuildChainedExecuteScriptTxResult | BuildChainedTransferTxResult;
|
|
207
|
-
/** BuildDeployContractTx */
|
|
208
|
-
export interface BuildDeployContractTx {
|
|
209
|
-
/** @format hex-string */
|
|
210
|
-
fromPublicKey: string;
|
|
211
|
-
/** @format hex-string */
|
|
212
|
-
fromPublicKeyType?: string;
|
|
213
|
-
/** @format hex-string */
|
|
214
|
-
bytecode: string;
|
|
215
|
-
/** @format uint256 */
|
|
216
|
-
initialAttoAlphAmount?: string;
|
|
217
|
-
initialTokenAmounts?: Token[];
|
|
218
|
-
/** @format uint256 */
|
|
219
|
-
issueTokenAmount?: string;
|
|
220
|
-
/** @format address */
|
|
221
|
-
issueTokenTo?: string;
|
|
222
|
-
/** @format gas */
|
|
223
|
-
gasAmount?: number;
|
|
224
|
-
/** @format uint256 */
|
|
225
|
-
gasPrice?: string;
|
|
226
|
-
/** @format group-index */
|
|
227
|
-
group?: number;
|
|
228
|
-
/** @format block-hash */
|
|
229
|
-
targetBlockHash?: string;
|
|
230
|
-
}
|
|
231
|
-
/** BuildDeployContractTxResult */
|
|
232
|
-
export type BuildDeployContractTxResult = BuildGrouplessDeployContractTxResult | BuildSimpleDeployContractTxResult;
|
|
233
|
-
/** BuildExecuteScriptTx */
|
|
234
|
-
export interface BuildExecuteScriptTx {
|
|
235
|
-
/** @format hex-string */
|
|
236
|
-
fromPublicKey: string;
|
|
237
|
-
/** @format hex-string */
|
|
238
|
-
fromPublicKeyType?: string;
|
|
239
|
-
/** @format hex-string */
|
|
240
|
-
bytecode: string;
|
|
241
|
-
/** @format uint256 */
|
|
242
|
-
attoAlphAmount?: string;
|
|
243
|
-
tokens?: Token[];
|
|
244
|
-
/** @format gas */
|
|
245
|
-
gasAmount?: number;
|
|
246
|
-
/** @format uint256 */
|
|
247
|
-
gasPrice?: string;
|
|
248
|
-
/** @format block-hash */
|
|
249
|
-
targetBlockHash?: string;
|
|
250
|
-
/** @format group-index */
|
|
251
|
-
group?: number;
|
|
252
|
-
/** @format double */
|
|
253
|
-
gasEstimationMultiplier?: number;
|
|
254
|
-
/** @format uint256 */
|
|
255
|
-
dustAmount?: string;
|
|
256
|
-
}
|
|
257
|
-
/** BuildExecuteScriptTxResult */
|
|
258
|
-
export type BuildExecuteScriptTxResult = BuildGrouplessExecuteScriptTxResult | BuildSimpleExecuteScriptTxResult;
|
|
259
|
-
/** BuildGrouplessDeployContractTxResult */
|
|
260
|
-
export interface BuildGrouplessDeployContractTxResult {
|
|
261
|
-
/** @format int32 */
|
|
262
|
-
fromGroup: number;
|
|
263
|
-
/** @format int32 */
|
|
264
|
-
toGroup: number;
|
|
265
|
-
unsignedTx: string;
|
|
266
|
-
/** @format gas */
|
|
267
|
-
gasAmount: number;
|
|
268
|
-
/** @format uint256 */
|
|
269
|
-
gasPrice: string;
|
|
270
|
-
/** @format 32-byte-hash */
|
|
271
|
-
txId: string;
|
|
272
|
-
/** @format address */
|
|
273
|
-
contractAddress: string;
|
|
274
|
-
fundingTxs?: BuildSimpleTransferTxResult[];
|
|
275
|
-
}
|
|
276
|
-
/** BuildGrouplessExecuteScriptTxResult */
|
|
277
|
-
export interface BuildGrouplessExecuteScriptTxResult {
|
|
278
|
-
/** @format int32 */
|
|
279
|
-
fromGroup: number;
|
|
280
|
-
/** @format int32 */
|
|
281
|
-
toGroup: number;
|
|
282
|
-
unsignedTx: string;
|
|
283
|
-
/** @format gas */
|
|
284
|
-
gasAmount: number;
|
|
285
|
-
/** @format uint256 */
|
|
286
|
-
gasPrice: string;
|
|
287
|
-
/** @format 32-byte-hash */
|
|
288
|
-
txId: string;
|
|
289
|
-
simulationResult: SimulationResult;
|
|
290
|
-
fundingTxs?: BuildSimpleTransferTxResult[];
|
|
291
|
-
}
|
|
292
|
-
/** BuildGrouplessTransferTxResult */
|
|
293
|
-
export interface BuildGrouplessTransferTxResult {
|
|
294
|
-
unsignedTx: string;
|
|
295
|
-
/** @format gas */
|
|
296
|
-
gasAmount: number;
|
|
297
|
-
/** @format uint256 */
|
|
298
|
-
gasPrice: string;
|
|
299
|
-
/** @format 32-byte-hash */
|
|
300
|
-
txId: string;
|
|
301
|
-
/** @format int32 */
|
|
302
|
-
fromGroup: number;
|
|
303
|
-
/** @format int32 */
|
|
304
|
-
toGroup: number;
|
|
305
|
-
fundingTxs?: BuildSimpleTransferTxResult[];
|
|
306
|
-
}
|
|
307
|
-
/** BuildInfo */
|
|
308
|
-
export interface BuildInfo {
|
|
309
|
-
releaseVersion: string;
|
|
310
|
-
commit: string;
|
|
311
|
-
}
|
|
312
|
-
/** BuildMultiAddressesTransaction */
|
|
313
|
-
export interface BuildMultiAddressesTransaction {
|
|
314
|
-
from: Source[];
|
|
315
|
-
/** @format uint256 */
|
|
316
|
-
gasPrice?: string;
|
|
317
|
-
/** @format block-hash */
|
|
318
|
-
targetBlockHash?: string;
|
|
319
|
-
}
|
|
320
|
-
/** BuildMultisig */
|
|
321
|
-
export interface BuildMultisig {
|
|
322
|
-
/** @format address */
|
|
323
|
-
fromAddress: string;
|
|
324
|
-
fromPublicKeys: string[];
|
|
325
|
-
fromPublicKeyTypes?: string[];
|
|
326
|
-
fromPublicKeyIndexes?: number[];
|
|
327
|
-
destinations: Destination[];
|
|
328
|
-
/** @format gas */
|
|
329
|
-
gas?: number;
|
|
330
|
-
/** @format uint256 */
|
|
331
|
-
gasPrice?: string;
|
|
332
|
-
/** @format group-index */
|
|
333
|
-
group?: number;
|
|
334
|
-
multiSigType?: 'P2HMPK' | 'P2MPKH';
|
|
335
|
-
}
|
|
336
|
-
/** BuildMultisigAddress */
|
|
337
|
-
export interface BuildMultisigAddress {
|
|
338
|
-
keys: string[];
|
|
339
|
-
keyTypes?: string[];
|
|
340
|
-
/** @format int32 */
|
|
341
|
-
mrequired: number;
|
|
342
|
-
multiSigType?: 'P2HMPK' | 'P2MPKH';
|
|
343
|
-
}
|
|
344
|
-
/** BuildMultisigAddressResult */
|
|
345
|
-
export interface BuildMultisigAddressResult {
|
|
346
|
-
/** @format address */
|
|
347
|
-
address: string;
|
|
348
|
-
}
|
|
349
|
-
/** BuildSimpleDeployContractTxResult */
|
|
350
|
-
export interface BuildSimpleDeployContractTxResult {
|
|
351
|
-
/** @format int32 */
|
|
352
|
-
fromGroup: number;
|
|
353
|
-
/** @format int32 */
|
|
354
|
-
toGroup: number;
|
|
355
|
-
unsignedTx: string;
|
|
356
|
-
/** @format gas */
|
|
357
|
-
gasAmount: number;
|
|
358
|
-
/** @format uint256 */
|
|
359
|
-
gasPrice: string;
|
|
360
|
-
/** @format 32-byte-hash */
|
|
361
|
-
txId: string;
|
|
362
|
-
/** @format address */
|
|
363
|
-
contractAddress: string;
|
|
364
|
-
}
|
|
365
|
-
/** BuildSimpleExecuteScriptTxResult */
|
|
366
|
-
export interface BuildSimpleExecuteScriptTxResult {
|
|
367
|
-
/** @format int32 */
|
|
368
|
-
fromGroup: number;
|
|
369
|
-
/** @format int32 */
|
|
370
|
-
toGroup: number;
|
|
371
|
-
unsignedTx: string;
|
|
372
|
-
/** @format gas */
|
|
373
|
-
gasAmount: number;
|
|
374
|
-
/** @format uint256 */
|
|
375
|
-
gasPrice: string;
|
|
376
|
-
/** @format 32-byte-hash */
|
|
377
|
-
txId: string;
|
|
378
|
-
simulationResult: SimulationResult;
|
|
379
|
-
}
|
|
380
|
-
/** BuildSimpleTransferTxResult */
|
|
381
|
-
export interface BuildSimpleTransferTxResult {
|
|
382
|
-
unsignedTx: string;
|
|
383
|
-
/** @format gas */
|
|
384
|
-
gasAmount: number;
|
|
385
|
-
/** @format uint256 */
|
|
386
|
-
gasPrice: string;
|
|
387
|
-
/** @format 32-byte-hash */
|
|
388
|
-
txId: string;
|
|
389
|
-
/** @format int32 */
|
|
390
|
-
fromGroup: number;
|
|
391
|
-
/** @format int32 */
|
|
392
|
-
toGroup: number;
|
|
393
|
-
}
|
|
394
|
-
/** BuildSweepAddressTransactions */
|
|
395
|
-
export interface BuildSweepAddressTransactions {
|
|
396
|
-
/** @format hex-string */
|
|
397
|
-
fromPublicKey: string;
|
|
398
|
-
/** @format hex-string */
|
|
399
|
-
fromPublicKeyType?: string;
|
|
400
|
-
/** @format address */
|
|
401
|
-
toAddress: string;
|
|
402
|
-
/** @format uint256 */
|
|
403
|
-
maxAttoAlphPerUTXO?: string;
|
|
404
|
-
/** @format int64 */
|
|
405
|
-
lockTime?: number;
|
|
406
|
-
/** @format gas */
|
|
407
|
-
gasAmount?: number;
|
|
408
|
-
/** @format uint256 */
|
|
409
|
-
gasPrice?: string;
|
|
410
|
-
/** @format block-hash */
|
|
411
|
-
targetBlockHash?: string;
|
|
412
|
-
/** @format int32 */
|
|
413
|
-
utxosLimit?: number;
|
|
414
|
-
/** @format group-index */
|
|
415
|
-
group?: number;
|
|
416
|
-
sweepAlphOnly?: boolean;
|
|
417
|
-
}
|
|
418
|
-
/** BuildSweepAddressTransactionsResult */
|
|
419
|
-
export interface BuildSweepAddressTransactionsResult {
|
|
420
|
-
unsignedTxs: SweepAddressTransaction[];
|
|
421
|
-
/** @format int32 */
|
|
422
|
-
fromGroup: number;
|
|
423
|
-
/** @format int32 */
|
|
424
|
-
toGroup: number;
|
|
425
|
-
}
|
|
426
|
-
/** BuildSweepMultisig */
|
|
427
|
-
export interface BuildSweepMultisig {
|
|
428
|
-
/** @format address */
|
|
429
|
-
fromAddress: string;
|
|
430
|
-
fromPublicKeys: string[];
|
|
431
|
-
fromPublicKeyTypes?: string[];
|
|
432
|
-
fromPublicKeyIndexes?: number[];
|
|
433
|
-
/** @format address */
|
|
434
|
-
toAddress: string;
|
|
435
|
-
/** @format uint256 */
|
|
436
|
-
maxAttoAlphPerUTXO?: string;
|
|
437
|
-
/** @format int64 */
|
|
438
|
-
lockTime?: number;
|
|
439
|
-
/** @format gas */
|
|
440
|
-
gasAmount?: number;
|
|
441
|
-
/** @format uint256 */
|
|
442
|
-
gasPrice?: string;
|
|
443
|
-
/** @format int32 */
|
|
444
|
-
utxosLimit?: number;
|
|
445
|
-
/** @format block-hash */
|
|
446
|
-
targetBlockHash?: string;
|
|
447
|
-
/** @format group-index */
|
|
448
|
-
group?: number;
|
|
449
|
-
multiSigType?: 'P2HMPK' | 'P2MPKH';
|
|
450
|
-
sweepAlphOnly?: boolean;
|
|
451
|
-
}
|
|
452
|
-
/** BuildTransferTx */
|
|
453
|
-
export interface BuildTransferTx {
|
|
454
|
-
/** @format hex-string */
|
|
455
|
-
fromPublicKey: string;
|
|
456
|
-
/** @format hex-string */
|
|
457
|
-
fromPublicKeyType?: string;
|
|
458
|
-
destinations: Destination[];
|
|
459
|
-
utxos?: OutputRef[];
|
|
460
|
-
/** @format gas */
|
|
461
|
-
gasAmount?: number;
|
|
462
|
-
/** @format uint256 */
|
|
463
|
-
gasPrice?: string;
|
|
464
|
-
/** @format group-index */
|
|
465
|
-
group?: number;
|
|
466
|
-
/** @format block-hash */
|
|
467
|
-
targetBlockHash?: string;
|
|
468
|
-
}
|
|
469
|
-
/** BuildTransferTxResult */
|
|
470
|
-
export type BuildTransferTxResult = BuildGrouplessTransferTxResult | BuildSimpleTransferTxResult;
|
|
471
|
-
/** CallContract */
|
|
472
|
-
export interface CallContract {
|
|
473
|
-
/** @format int32 */
|
|
474
|
-
group: number;
|
|
475
|
-
/** @format block-hash */
|
|
476
|
-
worldStateBlockHash?: string;
|
|
477
|
-
/** @format 32-byte-hash */
|
|
478
|
-
txId?: string;
|
|
479
|
-
/** @format address */
|
|
480
|
-
address: string;
|
|
481
|
-
/** @format address */
|
|
482
|
-
callerAddress?: string;
|
|
483
|
-
/** @format int32 */
|
|
484
|
-
methodIndex: number;
|
|
485
|
-
args?: Val[];
|
|
486
|
-
interestedContracts?: string[];
|
|
487
|
-
inputAssets?: TestInputAsset[];
|
|
488
|
-
}
|
|
489
|
-
/** CallContractFailed */
|
|
490
|
-
export interface CallContractFailed {
|
|
491
|
-
error: string;
|
|
492
|
-
type: string;
|
|
493
|
-
}
|
|
494
|
-
/** CallContractResult */
|
|
495
|
-
export type CallContractResult = CallContractFailed | CallContractSucceeded;
|
|
496
|
-
/** CallContractSucceeded */
|
|
497
|
-
export interface CallContractSucceeded {
|
|
498
|
-
returns: Val[];
|
|
499
|
-
/** @format int32 */
|
|
500
|
-
gasUsed: number;
|
|
501
|
-
contracts: ContractState[];
|
|
502
|
-
txInputs: string[];
|
|
503
|
-
txOutputs: Output[];
|
|
504
|
-
events: ContractEventByTxId[];
|
|
505
|
-
debugMessages: DebugMessage[];
|
|
506
|
-
type: string;
|
|
507
|
-
}
|
|
508
|
-
/** CallTxScript */
|
|
509
|
-
export interface CallTxScript {
|
|
510
|
-
/** @format int32 */
|
|
511
|
-
group: number;
|
|
512
|
-
/** @format hex-string */
|
|
513
|
-
bytecode: string;
|
|
514
|
-
/** @format address */
|
|
515
|
-
callerAddress?: string;
|
|
516
|
-
/** @format block-hash */
|
|
517
|
-
worldStateBlockHash?: string;
|
|
518
|
-
/** @format 32-byte-hash */
|
|
519
|
-
txId?: string;
|
|
520
|
-
inputAssets?: TestInputAsset[];
|
|
521
|
-
interestedContracts?: string[];
|
|
522
|
-
}
|
|
523
|
-
/** CallTxScriptResult */
|
|
524
|
-
export interface CallTxScriptResult {
|
|
525
|
-
returns: Val[];
|
|
526
|
-
/** @format int32 */
|
|
527
|
-
gasUsed: number;
|
|
528
|
-
contracts: ContractState[];
|
|
529
|
-
txInputs: string[];
|
|
530
|
-
txOutputs: Output[];
|
|
531
|
-
events: ContractEventByTxId[];
|
|
532
|
-
debugMessages: DebugMessage[];
|
|
533
|
-
}
|
|
534
|
-
/** ChainInfo */
|
|
535
|
-
export interface ChainInfo {
|
|
536
|
-
/** @format int32 */
|
|
537
|
-
currentHeight: number;
|
|
538
|
-
}
|
|
539
|
-
/** ChainParams */
|
|
540
|
-
export interface ChainParams {
|
|
541
|
-
networkId: number;
|
|
542
|
-
/** @format int32 */
|
|
543
|
-
numZerosAtLeastInHash: number;
|
|
544
|
-
/** @format int32 */
|
|
545
|
-
groupNumPerBroker: number;
|
|
546
|
-
/** @format int32 */
|
|
547
|
-
groups: number;
|
|
548
|
-
}
|
|
549
|
-
/** ChangeActiveAddress */
|
|
550
|
-
export interface ChangeActiveAddress {
|
|
551
|
-
/** @format address */
|
|
552
|
-
address: string;
|
|
553
|
-
}
|
|
554
|
-
/** CompileContractResult */
|
|
555
|
-
export interface CompileContractResult {
|
|
556
|
-
version: string;
|
|
557
|
-
name: string;
|
|
558
|
-
bytecode: string;
|
|
559
|
-
bytecodeDebugPatch: string;
|
|
560
|
-
/** @format 32-byte-hash */
|
|
561
|
-
codeHash: string;
|
|
562
|
-
/** @format 32-byte-hash */
|
|
563
|
-
codeHashDebug: string;
|
|
564
|
-
fields: FieldsSig;
|
|
565
|
-
functions: FunctionSig[];
|
|
566
|
-
constants: Constant[];
|
|
567
|
-
enums: Enum[];
|
|
568
|
-
events: EventSig[];
|
|
569
|
-
warnings: string[];
|
|
570
|
-
maps?: MapsSig;
|
|
571
|
-
stdInterfaceId?: string;
|
|
572
|
-
}
|
|
573
|
-
/** CompileProjectResult */
|
|
574
|
-
export interface CompileProjectResult {
|
|
575
|
-
contracts: CompileContractResult[];
|
|
576
|
-
scripts: CompileScriptResult[];
|
|
577
|
-
structs?: StructSig[];
|
|
578
|
-
constants?: Constant[];
|
|
579
|
-
enums?: Enum[];
|
|
580
|
-
warnings?: string[];
|
|
581
|
-
testError?: string;
|
|
582
|
-
}
|
|
583
|
-
/** CompileScriptResult */
|
|
584
|
-
export interface CompileScriptResult {
|
|
585
|
-
version: string;
|
|
586
|
-
name: string;
|
|
587
|
-
bytecodeTemplate: string;
|
|
588
|
-
bytecodeDebugPatch: string;
|
|
589
|
-
fields: FieldsSig;
|
|
590
|
-
functions: FunctionSig[];
|
|
591
|
-
warnings: string[];
|
|
592
|
-
}
|
|
593
|
-
/** CompilerOptions */
|
|
594
|
-
export interface CompilerOptions {
|
|
595
|
-
ignoreUnusedConstantsWarnings?: boolean;
|
|
596
|
-
ignoreUnusedVariablesWarnings?: boolean;
|
|
597
|
-
ignoreUnusedFieldsWarnings?: boolean;
|
|
598
|
-
ignoreUnusedPrivateFunctionsWarnings?: boolean;
|
|
599
|
-
ignoreUpdateFieldsCheckWarnings?: boolean;
|
|
600
|
-
ignoreCheckExternalCallerWarnings?: boolean;
|
|
601
|
-
ignoreUnusedFunctionReturnWarnings?: boolean;
|
|
602
|
-
skipAbstractContractCheck?: boolean;
|
|
603
|
-
skipTests?: boolean;
|
|
604
|
-
}
|
|
605
|
-
/** Confirmed */
|
|
606
|
-
export interface Confirmed {
|
|
607
|
-
/** @format block-hash */
|
|
608
|
-
blockHash: string;
|
|
609
|
-
/** @format int32 */
|
|
610
|
-
txIndex: number;
|
|
611
|
-
/** @format int32 */
|
|
612
|
-
chainConfirmations: number;
|
|
613
|
-
/** @format int32 */
|
|
614
|
-
fromGroupConfirmations: number;
|
|
615
|
-
/** @format int32 */
|
|
616
|
-
toGroupConfirmations: number;
|
|
617
|
-
type: string;
|
|
618
|
-
}
|
|
619
|
-
/** Conflicted */
|
|
620
|
-
export interface Conflicted {
|
|
621
|
-
/** @format block-hash */
|
|
622
|
-
blockHash: string;
|
|
623
|
-
/** @format int32 */
|
|
624
|
-
txIndex: number;
|
|
625
|
-
/** @format int32 */
|
|
626
|
-
chainConfirmations: number;
|
|
627
|
-
/** @format int32 */
|
|
628
|
-
fromGroupConfirmations: number;
|
|
629
|
-
/** @format int32 */
|
|
630
|
-
toGroupConfirmations: number;
|
|
631
|
-
type: string;
|
|
632
|
-
}
|
|
633
|
-
/** Constant */
|
|
634
|
-
export interface Constant {
|
|
635
|
-
name: string;
|
|
636
|
-
value: Val;
|
|
637
|
-
}
|
|
638
|
-
/** Contract */
|
|
639
|
-
export interface Contract {
|
|
640
|
-
code: string;
|
|
641
|
-
compilerOptions?: CompilerOptions;
|
|
642
|
-
}
|
|
643
|
-
/** ContractEvent */
|
|
644
|
-
export interface ContractEvent {
|
|
645
|
-
/** @format block-hash */
|
|
646
|
-
blockHash: string;
|
|
647
|
-
/** @format 32-byte-hash */
|
|
648
|
-
txId: string;
|
|
649
|
-
/** @format int32 */
|
|
650
|
-
eventIndex: number;
|
|
651
|
-
fields: Val[];
|
|
652
|
-
}
|
|
653
|
-
/** ContractEventByBlockHash */
|
|
654
|
-
export interface ContractEventByBlockHash {
|
|
655
|
-
/** @format 32-byte-hash */
|
|
656
|
-
txId: string;
|
|
657
|
-
/** @format address */
|
|
658
|
-
contractAddress: string;
|
|
659
|
-
/** @format int32 */
|
|
660
|
-
eventIndex: number;
|
|
661
|
-
fields: Val[];
|
|
662
|
-
}
|
|
663
|
-
/** ContractEventByTxId */
|
|
664
|
-
export interface ContractEventByTxId {
|
|
665
|
-
/** @format block-hash */
|
|
666
|
-
blockHash: string;
|
|
667
|
-
/** @format address */
|
|
668
|
-
contractAddress: string;
|
|
669
|
-
/** @format int32 */
|
|
670
|
-
eventIndex: number;
|
|
671
|
-
fields: Val[];
|
|
672
|
-
}
|
|
673
|
-
/** ContractEvents */
|
|
674
|
-
export interface ContractEvents {
|
|
675
|
-
events: ContractEvent[];
|
|
676
|
-
/** @format int32 */
|
|
677
|
-
nextStart: number;
|
|
678
|
-
}
|
|
679
|
-
/** ContractEventsByBlockHash */
|
|
680
|
-
export interface ContractEventsByBlockHash {
|
|
681
|
-
events: ContractEventByBlockHash[];
|
|
682
|
-
}
|
|
683
|
-
/** ContractEventsByTxId */
|
|
684
|
-
export interface ContractEventsByTxId {
|
|
685
|
-
events: ContractEventByTxId[];
|
|
686
|
-
}
|
|
687
|
-
/** ContractOutput */
|
|
688
|
-
export interface ContractOutput {
|
|
689
|
-
/** @format int32 */
|
|
690
|
-
hint: number;
|
|
691
|
-
/** @format 32-byte-hash */
|
|
692
|
-
key: string;
|
|
693
|
-
/** @format uint256 */
|
|
694
|
-
attoAlphAmount: string;
|
|
695
|
-
/** @format address */
|
|
696
|
-
address: string;
|
|
697
|
-
tokens: Token[];
|
|
698
|
-
type: string;
|
|
699
|
-
}
|
|
700
|
-
/** ContractState */
|
|
701
|
-
export interface ContractState {
|
|
702
|
-
/** @format address */
|
|
703
|
-
address: string;
|
|
704
|
-
/** @format contract */
|
|
705
|
-
bytecode: string;
|
|
706
|
-
/** @format 32-byte-hash */
|
|
707
|
-
codeHash: string;
|
|
708
|
-
/** @format 32-byte-hash */
|
|
709
|
-
initialStateHash?: string;
|
|
710
|
-
immFields: Val[];
|
|
711
|
-
mutFields: Val[];
|
|
712
|
-
asset: AssetState;
|
|
713
|
-
}
|
|
714
|
-
/** CurrentDifficulty */
|
|
715
|
-
export interface CurrentDifficulty {
|
|
716
|
-
/** @format bigint */
|
|
717
|
-
difficulty: string;
|
|
718
|
-
}
|
|
719
|
-
/** DebugMessage */
|
|
720
|
-
export interface DebugMessage {
|
|
721
|
-
/** @format address */
|
|
722
|
-
contractAddress: string;
|
|
723
|
-
message: string;
|
|
724
|
-
}
|
|
725
|
-
/** DecodeUnsignedTx */
|
|
726
|
-
export interface DecodeUnsignedTx {
|
|
727
|
-
unsignedTx: string;
|
|
728
|
-
}
|
|
729
|
-
/** DecodeUnsignedTxResult */
|
|
730
|
-
export interface DecodeUnsignedTxResult {
|
|
731
|
-
/** @format int32 */
|
|
732
|
-
fromGroup: number;
|
|
733
|
-
/** @format int32 */
|
|
734
|
-
toGroup: number;
|
|
735
|
-
unsignedTx: UnsignedTx;
|
|
736
|
-
}
|
|
737
|
-
/** Destination */
|
|
738
|
-
export interface Destination {
|
|
739
|
-
/** @format address */
|
|
740
|
-
address: string;
|
|
741
|
-
/** @format uint256 */
|
|
742
|
-
attoAlphAmount?: string;
|
|
743
|
-
tokens?: Token[];
|
|
744
|
-
/** @format int64 */
|
|
745
|
-
lockTime?: number;
|
|
746
|
-
/** @format hex-string */
|
|
747
|
-
message?: string;
|
|
748
|
-
}
|
|
749
|
-
/** DiscoveryAction */
|
|
750
|
-
export type DiscoveryAction = Reachable | Unreachable;
|
|
751
|
-
/** Enum */
|
|
752
|
-
export interface Enum {
|
|
753
|
-
name: string;
|
|
754
|
-
fields: EnumField[];
|
|
755
|
-
}
|
|
756
|
-
/** EnumField */
|
|
757
|
-
export interface EnumField {
|
|
758
|
-
name: string;
|
|
759
|
-
value: Val;
|
|
760
|
-
}
|
|
761
|
-
/** EventSig */
|
|
762
|
-
export interface EventSig {
|
|
763
|
-
name: string;
|
|
764
|
-
fieldNames: string[];
|
|
765
|
-
fieldTypes: string[];
|
|
766
|
-
}
|
|
767
|
-
/** FieldsSig */
|
|
768
|
-
export interface FieldsSig {
|
|
769
|
-
names: string[];
|
|
770
|
-
types: string[];
|
|
771
|
-
isMutable: boolean[];
|
|
772
|
-
}
|
|
773
|
-
/** FixedAssetOutput */
|
|
774
|
-
export interface FixedAssetOutput {
|
|
775
|
-
/** @format int32 */
|
|
776
|
-
hint: number;
|
|
777
|
-
/** @format 32-byte-hash */
|
|
778
|
-
key: string;
|
|
779
|
-
/** @format uint256 */
|
|
780
|
-
attoAlphAmount: string;
|
|
781
|
-
/** @format address */
|
|
782
|
-
address: string;
|
|
783
|
-
tokens: Token[];
|
|
784
|
-
/** @format int64 */
|
|
785
|
-
lockTime: number;
|
|
786
|
-
/** @format hex-string */
|
|
787
|
-
message: string;
|
|
788
|
-
}
|
|
789
|
-
/** FunctionSig */
|
|
790
|
-
export interface FunctionSig {
|
|
791
|
-
name: string;
|
|
792
|
-
usePreapprovedAssets: boolean;
|
|
793
|
-
useAssetsInContract: boolean;
|
|
794
|
-
isPublic: boolean;
|
|
795
|
-
paramNames: string[];
|
|
796
|
-
paramTypes: string[];
|
|
797
|
-
paramIsMutable: boolean[];
|
|
798
|
-
returnTypes: string[];
|
|
799
|
-
}
|
|
800
|
-
/** GatewayTimeout */
|
|
801
|
-
export interface GatewayTimeout {
|
|
802
|
-
detail: string;
|
|
803
|
-
}
|
|
804
|
-
/** GhostUncleBlockEntry */
|
|
805
|
-
export interface GhostUncleBlockEntry {
|
|
806
|
-
/** @format block-hash */
|
|
807
|
-
blockHash: string;
|
|
808
|
-
/** @format address */
|
|
809
|
-
miner: string;
|
|
810
|
-
}
|
|
811
|
-
/** Group */
|
|
812
|
-
export interface Group {
|
|
813
|
-
/** @format int32 */
|
|
814
|
-
group: number;
|
|
815
|
-
}
|
|
816
|
-
/** HashRateResponse */
|
|
817
|
-
export interface HashRateResponse {
|
|
818
|
-
hashrate: string;
|
|
819
|
-
}
|
|
820
|
-
/** HashesAtHeight */
|
|
821
|
-
export interface HashesAtHeight {
|
|
822
|
-
headers: string[];
|
|
823
|
-
}
|
|
824
|
-
/** InterCliquePeerInfo */
|
|
825
|
-
export interface InterCliquePeerInfo {
|
|
826
|
-
/** @format clique-id */
|
|
827
|
-
cliqueId: string;
|
|
828
|
-
/** @format int32 */
|
|
829
|
-
brokerId: number;
|
|
830
|
-
/** @format int32 */
|
|
831
|
-
groupNumPerBroker: number;
|
|
832
|
-
/** @format inet-socket-address */
|
|
833
|
-
address: {
|
|
834
|
-
addr: string;
|
|
835
|
-
/** @format int32 */
|
|
836
|
-
port: number;
|
|
837
|
-
};
|
|
838
|
-
isSynced: boolean;
|
|
839
|
-
clientVersion: string;
|
|
840
|
-
}
|
|
841
|
-
/** InternalServerError */
|
|
842
|
-
export interface InternalServerError {
|
|
843
|
-
detail: string;
|
|
844
|
-
}
|
|
845
|
-
/** MapsSig */
|
|
846
|
-
export interface MapsSig {
|
|
847
|
-
names: string[];
|
|
848
|
-
types: string[];
|
|
849
|
-
}
|
|
850
|
-
/** MemPooled */
|
|
851
|
-
export interface MemPooled {
|
|
852
|
-
type: string;
|
|
853
|
-
}
|
|
854
|
-
/** MempoolTransactions */
|
|
855
|
-
export interface MempoolTransactions {
|
|
856
|
-
/** @format int32 */
|
|
857
|
-
fromGroup: number;
|
|
858
|
-
/** @format int32 */
|
|
859
|
-
toGroup: number;
|
|
860
|
-
transactions: TransactionTemplate[];
|
|
861
|
-
}
|
|
862
|
-
/** MinerAddresses */
|
|
863
|
-
export interface MinerAddresses {
|
|
864
|
-
addresses: string[];
|
|
865
|
-
}
|
|
866
|
-
/** MinerAddressesInfo */
|
|
867
|
-
export interface MinerAddressesInfo {
|
|
868
|
-
addresses: AddressInfo[];
|
|
869
|
-
}
|
|
870
|
-
/** MisbehaviorAction */
|
|
871
|
-
export type MisbehaviorAction = Ban | Unban;
|
|
872
|
-
/** MultipleCallContract */
|
|
873
|
-
export interface MultipleCallContract {
|
|
874
|
-
calls: CallContract[];
|
|
875
|
-
}
|
|
876
|
-
/** MultipleCallContractResult */
|
|
877
|
-
export interface MultipleCallContractResult {
|
|
878
|
-
results: CallContractResult[];
|
|
879
|
-
}
|
|
880
|
-
/** NodeInfo */
|
|
881
|
-
export interface NodeInfo {
|
|
882
|
-
buildInfo: BuildInfo;
|
|
883
|
-
upnp: boolean;
|
|
884
|
-
/** @format inet-socket-address */
|
|
885
|
-
externalAddress?: {
|
|
886
|
-
addr: string;
|
|
887
|
-
/** @format int32 */
|
|
888
|
-
port: number;
|
|
889
|
-
};
|
|
890
|
-
}
|
|
891
|
-
/** NodeVersion */
|
|
892
|
-
export interface NodeVersion {
|
|
893
|
-
/** @format semver */
|
|
894
|
-
version: string;
|
|
895
|
-
}
|
|
896
|
-
/** NotFound */
|
|
897
|
-
export interface NotFound {
|
|
898
|
-
detail: string;
|
|
899
|
-
resource: string;
|
|
900
|
-
}
|
|
901
|
-
/** Output */
|
|
902
|
-
export type Output = AssetOutput | ContractOutput;
|
|
903
|
-
/** OutputRef */
|
|
904
|
-
export interface OutputRef {
|
|
905
|
-
/** @format int32 */
|
|
906
|
-
hint: number;
|
|
907
|
-
/** @format 32-byte-hash */
|
|
908
|
-
key: string;
|
|
909
|
-
}
|
|
910
|
-
/** PeerAddress */
|
|
911
|
-
export interface PeerAddress {
|
|
912
|
-
/** @format inet-address */
|
|
913
|
-
address: string;
|
|
914
|
-
/** @format int32 */
|
|
915
|
-
restPort: number;
|
|
916
|
-
/** @format int32 */
|
|
917
|
-
wsPort: number;
|
|
918
|
-
/** @format int32 */
|
|
919
|
-
minerApiPort: number;
|
|
920
|
-
}
|
|
921
|
-
/** PeerMisbehavior */
|
|
922
|
-
export interface PeerMisbehavior {
|
|
923
|
-
/** @format inet-address */
|
|
924
|
-
peer: string;
|
|
925
|
-
status: PeerStatus;
|
|
926
|
-
}
|
|
927
|
-
/** PeerStatus */
|
|
928
|
-
export type PeerStatus = Banned | Penalty;
|
|
929
|
-
/** Penalty */
|
|
930
|
-
export interface Penalty {
|
|
931
|
-
/** @format int32 */
|
|
932
|
-
value: number;
|
|
933
|
-
type: string;
|
|
934
|
-
}
|
|
935
|
-
/** Project */
|
|
936
|
-
export interface Project {
|
|
937
|
-
code: string;
|
|
938
|
-
compilerOptions?: CompilerOptions;
|
|
939
|
-
}
|
|
940
|
-
/** RawBlock */
|
|
941
|
-
export interface RawBlock {
|
|
942
|
-
/** @format hex-string */
|
|
943
|
-
value: string;
|
|
944
|
-
}
|
|
945
|
-
/** RawTransaction */
|
|
946
|
-
export interface RawTransaction {
|
|
947
|
-
/** @format hex-string */
|
|
948
|
-
value: string;
|
|
949
|
-
}
|
|
950
|
-
/** Reachable */
|
|
951
|
-
export interface Reachable {
|
|
952
|
-
peers: string[];
|
|
953
|
-
type: string;
|
|
954
|
-
}
|
|
955
|
-
/** Result */
|
|
956
|
-
export interface Result {
|
|
957
|
-
/** @format bigint */
|
|
958
|
-
hashrate: string;
|
|
959
|
-
}
|
|
960
|
-
/** RevealMnemonic */
|
|
961
|
-
export interface RevealMnemonic {
|
|
962
|
-
password: string;
|
|
963
|
-
}
|
|
964
|
-
/** RevealMnemonicResult */
|
|
965
|
-
export interface RevealMnemonicResult {
|
|
966
|
-
mnemonic: string;
|
|
967
|
-
}
|
|
968
|
-
/** RichAssetInput */
|
|
969
|
-
export interface RichAssetInput {
|
|
970
|
-
/** @format int32 */
|
|
971
|
-
hint: number;
|
|
972
|
-
/** @format 32-byte-hash */
|
|
973
|
-
key: string;
|
|
974
|
-
/** @format hex-string */
|
|
975
|
-
unlockScript: string;
|
|
976
|
-
/** @format uint256 */
|
|
977
|
-
attoAlphAmount: string;
|
|
978
|
-
/** @format address */
|
|
979
|
-
address: string;
|
|
980
|
-
tokens: Token[];
|
|
981
|
-
/** @format 32-byte-hash */
|
|
982
|
-
outputRefTxId: string;
|
|
983
|
-
}
|
|
984
|
-
/** RichBlockAndEvents */
|
|
985
|
-
export interface RichBlockAndEvents {
|
|
986
|
-
block: RichBlockEntry;
|
|
987
|
-
events: ContractEventByBlockHash[];
|
|
988
|
-
}
|
|
989
|
-
/** RichBlockEntry */
|
|
990
|
-
export interface RichBlockEntry {
|
|
991
|
-
/** @format block-hash */
|
|
992
|
-
hash: string;
|
|
993
|
-
/** @format int64 */
|
|
994
|
-
timestamp: number;
|
|
995
|
-
/** @format int32 */
|
|
996
|
-
chainFrom: number;
|
|
997
|
-
/** @format int32 */
|
|
998
|
-
chainTo: number;
|
|
999
|
-
/** @format int32 */
|
|
1000
|
-
height: number;
|
|
1001
|
-
deps: string[];
|
|
1002
|
-
transactions: RichTransaction[];
|
|
1003
|
-
/** @format hex-string */
|
|
1004
|
-
nonce: string;
|
|
1005
|
-
version: number;
|
|
1006
|
-
/** @format 32-byte-hash */
|
|
1007
|
-
depStateHash: string;
|
|
1008
|
-
/** @format 32-byte-hash */
|
|
1009
|
-
txsHash: string;
|
|
1010
|
-
/** @format hex-string */
|
|
1011
|
-
target: string;
|
|
1012
|
-
ghostUncles: GhostUncleBlockEntry[];
|
|
1013
|
-
conflictedTxs?: string[];
|
|
1014
|
-
}
|
|
1015
|
-
/** RichBlocksAndEventsPerTimeStampRange */
|
|
1016
|
-
export interface RichBlocksAndEventsPerTimeStampRange {
|
|
1017
|
-
blocksAndEvents: RichBlockAndEvents[][];
|
|
1018
|
-
}
|
|
1019
|
-
/** RichContractInput */
|
|
1020
|
-
export interface RichContractInput {
|
|
1021
|
-
/** @format int32 */
|
|
1022
|
-
hint: number;
|
|
1023
|
-
/** @format 32-byte-hash */
|
|
1024
|
-
key: string;
|
|
1025
|
-
/** @format uint256 */
|
|
1026
|
-
attoAlphAmount: string;
|
|
1027
|
-
/** @format address */
|
|
1028
|
-
address: string;
|
|
1029
|
-
tokens: Token[];
|
|
1030
|
-
/** @format 32-byte-hash */
|
|
1031
|
-
outputRefTxId: string;
|
|
1032
|
-
}
|
|
1033
|
-
/** RichTransaction */
|
|
1034
|
-
export interface RichTransaction {
|
|
1035
|
-
unsigned: RichUnsignedTx;
|
|
1036
|
-
scriptExecutionOk: boolean;
|
|
1037
|
-
contractInputs: RichContractInput[];
|
|
1038
|
-
generatedOutputs: Output[];
|
|
1039
|
-
inputSignatures: string[];
|
|
1040
|
-
scriptSignatures: string[];
|
|
1041
|
-
}
|
|
1042
|
-
/** RichUnsignedTx */
|
|
1043
|
-
export interface RichUnsignedTx {
|
|
1044
|
-
/** @format 32-byte-hash */
|
|
1045
|
-
txId: string;
|
|
1046
|
-
version: number;
|
|
1047
|
-
networkId: number;
|
|
1048
|
-
/** @format script */
|
|
1049
|
-
scriptOpt?: string;
|
|
1050
|
-
/** @format int32 */
|
|
1051
|
-
gasAmount: number;
|
|
1052
|
-
/** @format uint256 */
|
|
1053
|
-
gasPrice: string;
|
|
1054
|
-
inputs: RichAssetInput[];
|
|
1055
|
-
fixedOutputs: FixedAssetOutput[];
|
|
1056
|
-
}
|
|
1057
|
-
/** Script */
|
|
1058
|
-
export interface Script {
|
|
1059
|
-
code: string;
|
|
1060
|
-
compilerOptions?: CompilerOptions;
|
|
1061
|
-
}
|
|
1062
|
-
/** SelfClique */
|
|
1063
|
-
export interface SelfClique {
|
|
1064
|
-
/** @format clique-id */
|
|
1065
|
-
cliqueId: string;
|
|
1066
|
-
nodes: PeerAddress[];
|
|
1067
|
-
selfReady: boolean;
|
|
1068
|
-
synced: boolean;
|
|
1069
|
-
}
|
|
1070
|
-
/** ServiceUnavailable */
|
|
1071
|
-
export interface ServiceUnavailable {
|
|
1072
|
-
detail: string;
|
|
1073
|
-
}
|
|
1074
|
-
/** Sign */
|
|
1075
|
-
export interface Sign {
|
|
1076
|
-
/** @format 32-byte-hash */
|
|
1077
|
-
data: string;
|
|
1078
|
-
}
|
|
1079
|
-
/** SignResult */
|
|
1080
|
-
export interface SignResult {
|
|
1081
|
-
/** @format signature */
|
|
1082
|
-
signature: string;
|
|
1083
|
-
}
|
|
1084
|
-
/** SimulationResult */
|
|
1085
|
-
export interface SimulationResult {
|
|
1086
|
-
contractInputs: AddressAssetState[];
|
|
1087
|
-
generatedOutputs: AddressAssetState[];
|
|
1088
|
-
}
|
|
1089
|
-
/** Source */
|
|
1090
|
-
export interface Source {
|
|
1091
|
-
/** @format hex-string */
|
|
1092
|
-
fromPublicKey: string;
|
|
1093
|
-
destinations: Destination[];
|
|
1094
|
-
/** @format hex-string */
|
|
1095
|
-
fromPublicKeyType?: string;
|
|
1096
|
-
/** @format gas */
|
|
1097
|
-
gasAmount?: number;
|
|
1098
|
-
utxos?: OutputRef[];
|
|
1099
|
-
}
|
|
1100
|
-
/** StructSig */
|
|
1101
|
-
export interface StructSig {
|
|
1102
|
-
name: string;
|
|
1103
|
-
fieldNames: string[];
|
|
1104
|
-
fieldTypes: string[];
|
|
1105
|
-
isMutable: boolean[];
|
|
1106
|
-
}
|
|
1107
|
-
/** SubContracts */
|
|
1108
|
-
export interface SubContracts {
|
|
1109
|
-
subContracts: string[];
|
|
1110
|
-
/** @format int32 */
|
|
1111
|
-
nextStart: number;
|
|
1112
|
-
}
|
|
1113
|
-
/** SubmitMultisig */
|
|
1114
|
-
export interface SubmitMultisig {
|
|
1115
|
-
unsignedTx: string;
|
|
1116
|
-
signatures: string[];
|
|
1117
|
-
}
|
|
1118
|
-
/** SubmitTransaction */
|
|
1119
|
-
export interface SubmitTransaction {
|
|
1120
|
-
unsignedTx: string;
|
|
1121
|
-
/** @format signature */
|
|
1122
|
-
signature: string;
|
|
1123
|
-
}
|
|
1124
|
-
/** SubmitTxResult */
|
|
1125
|
-
export interface SubmitTxResult {
|
|
1126
|
-
/** @format 32-byte-hash */
|
|
1127
|
-
txId: string;
|
|
1128
|
-
/** @format int32 */
|
|
1129
|
-
fromGroup: number;
|
|
1130
|
-
/** @format int32 */
|
|
1131
|
-
toGroup: number;
|
|
1132
|
-
}
|
|
1133
|
-
/** Sweep */
|
|
1134
|
-
export interface Sweep {
|
|
1135
|
-
/** @format address */
|
|
1136
|
-
toAddress: string;
|
|
1137
|
-
/** @format int64 */
|
|
1138
|
-
lockTime?: number;
|
|
1139
|
-
/** @format gas */
|
|
1140
|
-
gasAmount?: number;
|
|
1141
|
-
/** @format uint256 */
|
|
1142
|
-
gasPrice?: string;
|
|
1143
|
-
/** @format int32 */
|
|
1144
|
-
utxosLimit?: number;
|
|
1145
|
-
/** @format block-hash */
|
|
1146
|
-
targetBlockHash?: string;
|
|
1147
|
-
}
|
|
1148
|
-
/** SweepAddressTransaction */
|
|
1149
|
-
export interface SweepAddressTransaction {
|
|
1150
|
-
/** @format 32-byte-hash */
|
|
1151
|
-
txId: string;
|
|
1152
|
-
unsignedTx: string;
|
|
1153
|
-
/** @format gas */
|
|
1154
|
-
gasAmount: number;
|
|
1155
|
-
/** @format uint256 */
|
|
1156
|
-
gasPrice: string;
|
|
1157
|
-
}
|
|
1158
|
-
/** TargetToHashrate */
|
|
1159
|
-
export interface TargetToHashrate {
|
|
1160
|
-
/** @format hex-string */
|
|
1161
|
-
target: string;
|
|
1162
|
-
}
|
|
1163
|
-
/** TestContract */
|
|
1164
|
-
export interface TestContract {
|
|
1165
|
-
/** @format int32 */
|
|
1166
|
-
group?: number;
|
|
1167
|
-
/** @format block-hash */
|
|
1168
|
-
blockHash?: string;
|
|
1169
|
-
/** @format int64 */
|
|
1170
|
-
blockTimeStamp?: number;
|
|
1171
|
-
/** @format 32-byte-hash */
|
|
1172
|
-
txId?: string;
|
|
1173
|
-
/** @format address */
|
|
1174
|
-
address?: string;
|
|
1175
|
-
/** @format address */
|
|
1176
|
-
callerContractAddress?: string;
|
|
1177
|
-
/** @format contract */
|
|
1178
|
-
bytecode: string;
|
|
1179
|
-
initialImmFields?: Val[];
|
|
1180
|
-
initialMutFields?: Val[];
|
|
1181
|
-
initialAsset?: AssetState;
|
|
1182
|
-
/** @format int32 */
|
|
1183
|
-
methodIndex?: number;
|
|
1184
|
-
args?: Val[];
|
|
1185
|
-
existingContracts?: ContractState[];
|
|
1186
|
-
inputAssets?: TestInputAsset[];
|
|
1187
|
-
/** @format uint256 */
|
|
1188
|
-
dustAmount?: string;
|
|
1189
|
-
}
|
|
1190
|
-
/** TestContractResult */
|
|
1191
|
-
export interface TestContractResult {
|
|
1192
|
-
/** @format address */
|
|
1193
|
-
address: string;
|
|
1194
|
-
/** @format 32-byte-hash */
|
|
1195
|
-
codeHash: string;
|
|
1196
|
-
returns: Val[];
|
|
1197
|
-
/** @format int32 */
|
|
1198
|
-
gasUsed: number;
|
|
1199
|
-
contracts: ContractState[];
|
|
1200
|
-
txInputs: string[];
|
|
1201
|
-
txOutputs: Output[];
|
|
1202
|
-
events: ContractEventByTxId[];
|
|
1203
|
-
debugMessages: DebugMessage[];
|
|
1204
|
-
}
|
|
1205
|
-
/** TestInputAsset */
|
|
1206
|
-
export interface TestInputAsset {
|
|
1207
|
-
/** @format address */
|
|
1208
|
-
address: string;
|
|
1209
|
-
asset: AssetState;
|
|
1210
|
-
}
|
|
1211
|
-
/** Token */
|
|
1212
|
-
export interface Token {
|
|
1213
|
-
/** @format 32-byte-hash */
|
|
1214
|
-
id: string;
|
|
1215
|
-
/** @format uint256 */
|
|
1216
|
-
amount: string;
|
|
1217
|
-
}
|
|
1218
|
-
/** Transaction */
|
|
1219
|
-
export interface Transaction {
|
|
1220
|
-
unsigned: UnsignedTx;
|
|
1221
|
-
scriptExecutionOk: boolean;
|
|
1222
|
-
contractInputs: OutputRef[];
|
|
1223
|
-
generatedOutputs: Output[];
|
|
1224
|
-
inputSignatures: string[];
|
|
1225
|
-
scriptSignatures: string[];
|
|
1226
|
-
}
|
|
1227
|
-
/** TransactionTemplate */
|
|
1228
|
-
export interface TransactionTemplate {
|
|
1229
|
-
unsigned: UnsignedTx;
|
|
1230
|
-
inputSignatures: string[];
|
|
1231
|
-
scriptSignatures: string[];
|
|
1232
|
-
/** @format int64 */
|
|
1233
|
-
seenAt: number;
|
|
1234
|
-
}
|
|
1235
|
-
/** Transfer */
|
|
1236
|
-
export interface Transfer {
|
|
1237
|
-
destinations: Destination[];
|
|
1238
|
-
/** @format gas */
|
|
1239
|
-
gas?: number;
|
|
1240
|
-
/** @format uint256 */
|
|
1241
|
-
gasPrice?: string;
|
|
1242
|
-
/** @format int32 */
|
|
1243
|
-
utxosLimit?: number;
|
|
1244
|
-
}
|
|
1245
|
-
/** TransferResult */
|
|
1246
|
-
export interface TransferResult {
|
|
1247
|
-
/** @format 32-byte-hash */
|
|
1248
|
-
txId: string;
|
|
1249
|
-
/** @format group-index */
|
|
1250
|
-
fromGroup: number;
|
|
1251
|
-
/** @format group-index */
|
|
1252
|
-
toGroup: number;
|
|
1253
|
-
}
|
|
1254
|
-
/** TransferResults */
|
|
1255
|
-
export interface TransferResults {
|
|
1256
|
-
results: TransferResult[];
|
|
1257
|
-
}
|
|
1258
|
-
/** TxNotFound */
|
|
1259
|
-
export interface TxNotFound {
|
|
1260
|
-
type: string;
|
|
1261
|
-
}
|
|
1262
|
-
/** TxStatus */
|
|
1263
|
-
export type TxStatus = Confirmed | Conflicted | MemPooled | TxNotFound;
|
|
1264
|
-
/** UTXO */
|
|
1265
|
-
export interface UTXO {
|
|
1266
|
-
ref: OutputRef;
|
|
1267
|
-
/** @format uint256 */
|
|
1268
|
-
amount: string;
|
|
1269
|
-
tokens?: Token[];
|
|
1270
|
-
/** @format int64 */
|
|
1271
|
-
lockTime?: number;
|
|
1272
|
-
/** @format hex-string */
|
|
1273
|
-
additionalData?: string;
|
|
1274
|
-
}
|
|
1275
|
-
/** UTXOs */
|
|
1276
|
-
export interface UTXOs {
|
|
1277
|
-
utxos: UTXO[];
|
|
1278
|
-
}
|
|
1279
|
-
/** Unauthorized */
|
|
1280
|
-
export interface Unauthorized {
|
|
1281
|
-
detail: string;
|
|
1282
|
-
}
|
|
1283
|
-
/** Unban */
|
|
1284
|
-
export interface Unban {
|
|
1285
|
-
peers: string[];
|
|
1286
|
-
type: string;
|
|
1287
|
-
}
|
|
1288
|
-
/** Unreachable */
|
|
1289
|
-
export interface Unreachable {
|
|
1290
|
-
peers: string[];
|
|
1291
|
-
type: string;
|
|
1292
|
-
}
|
|
1293
|
-
/** UnsignedTx */
|
|
1294
|
-
export interface UnsignedTx {
|
|
1295
|
-
/** @format 32-byte-hash */
|
|
1296
|
-
txId: string;
|
|
1297
|
-
version: number;
|
|
1298
|
-
networkId: number;
|
|
1299
|
-
/** @format script */
|
|
1300
|
-
scriptOpt?: string;
|
|
1301
|
-
/** @format int32 */
|
|
1302
|
-
gasAmount: number;
|
|
1303
|
-
/** @format uint256 */
|
|
1304
|
-
gasPrice: string;
|
|
1305
|
-
inputs: AssetInput[];
|
|
1306
|
-
fixedOutputs: FixedAssetOutput[];
|
|
1307
|
-
}
|
|
1308
|
-
/** Val */
|
|
1309
|
-
export type Val = ValAddress | ValArray | ValBool | ValByteVec | ValI256 | ValU256;
|
|
1310
|
-
/** ValAddress */
|
|
1311
|
-
export interface ValAddress {
|
|
1312
|
-
/** @format address */
|
|
1313
|
-
value: string;
|
|
1314
|
-
type: string;
|
|
1315
|
-
}
|
|
1316
|
-
/** ValArray */
|
|
1317
|
-
export interface ValArray {
|
|
1318
|
-
value: Val[];
|
|
1319
|
-
type: string;
|
|
1320
|
-
}
|
|
1321
|
-
/** ValBool */
|
|
1322
|
-
export interface ValBool {
|
|
1323
|
-
value: boolean;
|
|
1324
|
-
type: string;
|
|
1325
|
-
}
|
|
1326
|
-
/** ValByteVec */
|
|
1327
|
-
export interface ValByteVec {
|
|
1328
|
-
/** @format hex-string */
|
|
1329
|
-
value: string;
|
|
1330
|
-
type: string;
|
|
1331
|
-
}
|
|
1332
|
-
/** ValI256 */
|
|
1333
|
-
export interface ValI256 {
|
|
1334
|
-
/** @format bigint */
|
|
1335
|
-
value: string;
|
|
1336
|
-
type: string;
|
|
1337
|
-
}
|
|
1338
|
-
/** ValU256 */
|
|
1339
|
-
export interface ValU256 {
|
|
1340
|
-
/** @format uint256 */
|
|
1341
|
-
value: string;
|
|
1342
|
-
type: string;
|
|
1343
|
-
}
|
|
1344
|
-
/** VerifySignature */
|
|
1345
|
-
export interface VerifySignature {
|
|
1346
|
-
/** @format hex-string */
|
|
1347
|
-
data: string;
|
|
1348
|
-
/** @format signature */
|
|
1349
|
-
signature: string;
|
|
1350
|
-
/** @format public-key */
|
|
1351
|
-
publicKey: string;
|
|
1352
|
-
}
|
|
1353
|
-
/** WalletCreation */
|
|
1354
|
-
export interface WalletCreation {
|
|
1355
|
-
password: string;
|
|
1356
|
-
walletName: string;
|
|
1357
|
-
isMiner?: boolean;
|
|
1358
|
-
mnemonicPassphrase?: string;
|
|
1359
|
-
mnemonicSize?: number;
|
|
1360
|
-
}
|
|
1361
|
-
/** WalletCreationResult */
|
|
1362
|
-
export interface WalletCreationResult {
|
|
1363
|
-
walletName: string;
|
|
1364
|
-
mnemonic: string;
|
|
1365
|
-
}
|
|
1366
|
-
/** WalletRestore */
|
|
1367
|
-
export interface WalletRestore {
|
|
1368
|
-
password: string;
|
|
1369
|
-
mnemonic: string;
|
|
1370
|
-
walletName: string;
|
|
1371
|
-
isMiner?: boolean;
|
|
1372
|
-
mnemonicPassphrase?: string;
|
|
1373
|
-
}
|
|
1374
|
-
/** WalletRestoreResult */
|
|
1375
|
-
export interface WalletRestoreResult {
|
|
1376
|
-
walletName: string;
|
|
1377
|
-
}
|
|
1378
|
-
/** WalletStatus */
|
|
1379
|
-
export interface WalletStatus {
|
|
1380
|
-
walletName: string;
|
|
1381
|
-
locked: boolean;
|
|
1382
|
-
}
|
|
1383
|
-
/** WalletUnlock */
|
|
1384
|
-
export interface WalletUnlock {
|
|
1385
|
-
password: string;
|
|
1386
|
-
mnemonicPassphrase?: string;
|
|
1387
|
-
}
|
|
1388
|
-
import 'cross-fetch/polyfill';
|
|
1389
|
-
export type QueryParamsType = Record<string | number, any>;
|
|
1390
|
-
export type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
|
|
1391
|
-
export interface FullRequestParams extends Omit<RequestInit, 'body'> {
|
|
1392
|
-
/** set parameter to `true` for call `securityWorker` for this request */
|
|
1393
|
-
secure?: boolean;
|
|
1394
|
-
/** request path */
|
|
1395
|
-
path: string;
|
|
1396
|
-
/** content type of request body */
|
|
1397
|
-
type?: ContentType;
|
|
1398
|
-
/** query params */
|
|
1399
|
-
query?: QueryParamsType;
|
|
1400
|
-
/** format of response (i.e. response.json() -> format: "json") */
|
|
1401
|
-
format?: ResponseFormat;
|
|
1402
|
-
/** request body */
|
|
1403
|
-
body?: unknown;
|
|
1404
|
-
/** base url */
|
|
1405
|
-
baseUrl?: string;
|
|
1406
|
-
/** request cancellation token */
|
|
1407
|
-
cancelToken?: CancelToken;
|
|
1408
|
-
}
|
|
1409
|
-
export type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
|
|
1410
|
-
export interface ApiConfig<SecurityDataType = unknown> {
|
|
1411
|
-
baseUrl?: string;
|
|
1412
|
-
baseApiParams?: Omit<RequestParams, 'baseUrl' | 'cancelToken' | 'signal'>;
|
|
1413
|
-
securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
|
|
1414
|
-
customFetch?: typeof fetch;
|
|
1415
|
-
}
|
|
1416
|
-
export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
|
|
1417
|
-
data: D;
|
|
1418
|
-
error: E;
|
|
1419
|
-
}
|
|
1420
|
-
type CancelToken = Symbol | string | number;
|
|
1421
|
-
export declare enum ContentType {
|
|
1422
|
-
Json = "application/json",
|
|
1423
|
-
FormData = "multipart/form-data",
|
|
1424
|
-
UrlEncoded = "application/x-www-form-urlencoded",
|
|
1425
|
-
Text = "text/plain"
|
|
1426
|
-
}
|
|
1427
|
-
export declare class HttpClient<SecurityDataType = unknown> {
|
|
1428
|
-
baseUrl: string;
|
|
1429
|
-
private securityData;
|
|
1430
|
-
private securityWorker?;
|
|
1431
|
-
private abortControllers;
|
|
1432
|
-
private customFetch;
|
|
1433
|
-
private baseApiParams;
|
|
1434
|
-
constructor(apiConfig?: ApiConfig<SecurityDataType>);
|
|
1435
|
-
setSecurityData: (data: SecurityDataType | null) => void;
|
|
1436
|
-
protected encodeQueryParam(key: string, value: any): string;
|
|
1437
|
-
protected addQueryParam(query: QueryParamsType, key: string): string;
|
|
1438
|
-
protected addArrayQueryParam(query: QueryParamsType, key: string): any;
|
|
1439
|
-
protected toQueryString(rawQuery?: QueryParamsType): string;
|
|
1440
|
-
protected addQueryParams(rawQuery?: QueryParamsType): string;
|
|
1441
|
-
private contentFormatters;
|
|
1442
|
-
protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
|
|
1443
|
-
protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
|
|
1444
|
-
abortRequest: (cancelToken: CancelToken) => void;
|
|
1445
|
-
request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
|
|
1446
|
-
}
|
|
1447
|
-
/**
|
|
1448
|
-
* @title Alephium API
|
|
1449
|
-
* @version 4.2.5
|
|
1450
|
-
* @baseUrl ../
|
|
1451
|
-
*/
|
|
1452
|
-
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
1453
|
-
wallets: {
|
|
1454
|
-
/**
|
|
1455
|
-
* No description
|
|
1456
|
-
*
|
|
1457
|
-
* @tags Wallets
|
|
1458
|
-
* @name GetWallets
|
|
1459
|
-
* @summary List available wallets
|
|
1460
|
-
* @request GET:/wallets
|
|
1461
|
-
*/
|
|
1462
|
-
getWallets: (params?: RequestParams) => Promise<WalletStatus[]>;
|
|
1463
|
-
/**
|
|
1464
|
-
* No description
|
|
1465
|
-
*
|
|
1466
|
-
* @tags Wallets
|
|
1467
|
-
* @name PutWallets
|
|
1468
|
-
* @summary Restore a wallet from your mnemonic
|
|
1469
|
-
* @request PUT:/wallets
|
|
1470
|
-
*/
|
|
1471
|
-
putWallets: (data: WalletRestore, params?: RequestParams) => Promise<WalletRestoreResult>;
|
|
1472
|
-
/**
|
|
1473
|
-
* @description A new wallet will be created and respond with a mnemonic. Make sure to keep that mnemonic safely as it will allows you to recover your wallet. Default mnemonic size is 24, (options: 12, 15, 18, 21, 24).
|
|
1474
|
-
*
|
|
1475
|
-
* @tags Wallets
|
|
1476
|
-
* @name PostWallets
|
|
1477
|
-
* @summary Create a new wallet
|
|
1478
|
-
* @request POST:/wallets
|
|
1479
|
-
*/
|
|
1480
|
-
postWallets: (data: WalletCreation, params?: RequestParams) => Promise<WalletCreationResult>;
|
|
1481
|
-
/**
|
|
1482
|
-
* No description
|
|
1483
|
-
*
|
|
1484
|
-
* @tags Wallets
|
|
1485
|
-
* @name GetWalletsWalletName
|
|
1486
|
-
* @summary Get wallet's status
|
|
1487
|
-
* @request GET:/wallets/{wallet_name}
|
|
1488
|
-
*/
|
|
1489
|
-
getWalletsWalletName: (walletName: string, params?: RequestParams) => Promise<WalletStatus>;
|
|
1490
|
-
/**
|
|
1491
|
-
* No description
|
|
1492
|
-
*
|
|
1493
|
-
* @tags Wallets
|
|
1494
|
-
* @name DeleteWalletsWalletName
|
|
1495
|
-
* @summary Delete your wallet file (can be recovered with your mnemonic)
|
|
1496
|
-
* @request DELETE:/wallets/{wallet_name}
|
|
1497
|
-
*/
|
|
1498
|
-
deleteWalletsWalletName: (walletName: string, query: {
|
|
1499
|
-
password: string;
|
|
1500
|
-
}, params?: RequestParams) => Promise<void>;
|
|
1501
|
-
/**
|
|
1502
|
-
* No description
|
|
1503
|
-
*
|
|
1504
|
-
* @tags Wallets
|
|
1505
|
-
* @name PostWalletsWalletNameLock
|
|
1506
|
-
* @summary Lock your wallet
|
|
1507
|
-
* @request POST:/wallets/{wallet_name}/lock
|
|
1508
|
-
*/
|
|
1509
|
-
postWalletsWalletNameLock: (walletName: string, params?: RequestParams) => Promise<void>;
|
|
1510
|
-
/**
|
|
1511
|
-
* No description
|
|
1512
|
-
*
|
|
1513
|
-
* @tags Wallets
|
|
1514
|
-
* @name PostWalletsWalletNameUnlock
|
|
1515
|
-
* @summary Unlock your wallet
|
|
1516
|
-
* @request POST:/wallets/{wallet_name}/unlock
|
|
1517
|
-
*/
|
|
1518
|
-
postWalletsWalletNameUnlock: (walletName: string, data: WalletUnlock, params?: RequestParams) => Promise<void>;
|
|
1519
|
-
/**
|
|
1520
|
-
* No description
|
|
1521
|
-
*
|
|
1522
|
-
* @tags Wallets
|
|
1523
|
-
* @name GetWalletsWalletNameBalances
|
|
1524
|
-
* @summary Get your total balance
|
|
1525
|
-
* @request GET:/wallets/{wallet_name}/balances
|
|
1526
|
-
*/
|
|
1527
|
-
getWalletsWalletNameBalances: (walletName: string, params?: RequestParams) => Promise<Balances>;
|
|
1528
|
-
/**
|
|
1529
|
-
* No description
|
|
1530
|
-
*
|
|
1531
|
-
* @tags Wallets
|
|
1532
|
-
* @name PostWalletsWalletNameRevealMnemonic
|
|
1533
|
-
* @summary Reveal your mnemonic. !!! use it with caution !!!
|
|
1534
|
-
* @request POST:/wallets/{wallet_name}/reveal-mnemonic
|
|
1535
|
-
*/
|
|
1536
|
-
postWalletsWalletNameRevealMnemonic: (walletName: string, data: RevealMnemonic, params?: RequestParams) => Promise<RevealMnemonicResult>;
|
|
1537
|
-
/**
|
|
1538
|
-
* No description
|
|
1539
|
-
*
|
|
1540
|
-
* @tags Wallets
|
|
1541
|
-
* @name PostWalletsWalletNameTransfer
|
|
1542
|
-
* @summary Transfer ALPH from the active address
|
|
1543
|
-
* @request POST:/wallets/{wallet_name}/transfer
|
|
1544
|
-
*/
|
|
1545
|
-
postWalletsWalletNameTransfer: (walletName: string, data: Transfer, params?: RequestParams) => Promise<TransferResult>;
|
|
1546
|
-
/**
|
|
1547
|
-
* No description
|
|
1548
|
-
*
|
|
1549
|
-
* @tags Wallets
|
|
1550
|
-
* @name PostWalletsWalletNameSweepActiveAddress
|
|
1551
|
-
* @summary Transfer all unlocked ALPH from the active address to another address
|
|
1552
|
-
* @request POST:/wallets/{wallet_name}/sweep-active-address
|
|
1553
|
-
*/
|
|
1554
|
-
postWalletsWalletNameSweepActiveAddress: (walletName: string, data: Sweep, params?: RequestParams) => Promise<TransferResults>;
|
|
1555
|
-
/**
|
|
1556
|
-
* No description
|
|
1557
|
-
*
|
|
1558
|
-
* @tags Wallets
|
|
1559
|
-
* @name PostWalletsWalletNameSweepAllAddresses
|
|
1560
|
-
* @summary Transfer unlocked ALPH from all addresses (including all mining addresses if applicable) to another address
|
|
1561
|
-
* @request POST:/wallets/{wallet_name}/sweep-all-addresses
|
|
1562
|
-
*/
|
|
1563
|
-
postWalletsWalletNameSweepAllAddresses: (walletName: string, data: Sweep, params?: RequestParams) => Promise<TransferResults>;
|
|
1564
|
-
/**
|
|
1565
|
-
* No description
|
|
1566
|
-
*
|
|
1567
|
-
* @tags Wallets
|
|
1568
|
-
* @name PostWalletsWalletNameSign
|
|
1569
|
-
* @summary Sign the given data and return back the signature
|
|
1570
|
-
* @request POST:/wallets/{wallet_name}/sign
|
|
1571
|
-
*/
|
|
1572
|
-
postWalletsWalletNameSign: (walletName: string, data: Sign, params?: RequestParams) => Promise<SignResult>;
|
|
1573
|
-
/**
|
|
1574
|
-
* No description
|
|
1575
|
-
*
|
|
1576
|
-
* @tags Wallets
|
|
1577
|
-
* @name GetWalletsWalletNameAddresses
|
|
1578
|
-
* @summary List all your wallet's addresses
|
|
1579
|
-
* @request GET:/wallets/{wallet_name}/addresses
|
|
1580
|
-
*/
|
|
1581
|
-
getWalletsWalletNameAddresses: (walletName: string, params?: RequestParams) => Promise<Addresses>;
|
|
1582
|
-
/**
|
|
1583
|
-
* No description
|
|
1584
|
-
*
|
|
1585
|
-
* @tags Wallets
|
|
1586
|
-
* @name GetWalletsWalletNameAddressesAddress
|
|
1587
|
-
* @summary Get address' info
|
|
1588
|
-
* @request GET:/wallets/{wallet_name}/addresses/{address}
|
|
1589
|
-
*/
|
|
1590
|
-
getWalletsWalletNameAddressesAddress: (walletName: string, address: string, params?: RequestParams) => Promise<AddressInfo>;
|
|
1591
|
-
/**
|
|
1592
|
-
* @description This endpoint can only be called if the wallet was created with the `isMiner = true` flag
|
|
1593
|
-
*
|
|
1594
|
-
* @tags Miners
|
|
1595
|
-
* @name GetWalletsWalletNameMinerAddresses
|
|
1596
|
-
* @summary List all miner addresses per group
|
|
1597
|
-
* @request GET:/wallets/{wallet_name}/miner-addresses
|
|
1598
|
-
*/
|
|
1599
|
-
getWalletsWalletNameMinerAddresses: (walletName: string, params?: RequestParams) => Promise<MinerAddressesInfo[]>;
|
|
1600
|
-
/**
|
|
1601
|
-
* @description Cannot be called from a miner wallet
|
|
1602
|
-
*
|
|
1603
|
-
* @tags Wallets
|
|
1604
|
-
* @name PostWalletsWalletNameDeriveNextAddress
|
|
1605
|
-
* @summary Derive your next address
|
|
1606
|
-
* @request POST:/wallets/{wallet_name}/derive-next-address
|
|
1607
|
-
*/
|
|
1608
|
-
postWalletsWalletNameDeriveNextAddress: (walletName: string, query?: {
|
|
1609
|
-
/** @format int32 */
|
|
1610
|
-
group?: number;
|
|
1611
|
-
}, params?: RequestParams) => Promise<AddressInfo>;
|
|
1612
|
-
/**
|
|
1613
|
-
* @description Your wallet need to have been created with the miner flag set to true
|
|
1614
|
-
*
|
|
1615
|
-
* @tags Miners
|
|
1616
|
-
* @name PostWalletsWalletNameDeriveNextMinerAddresses
|
|
1617
|
-
* @summary Derive your next miner addresses for each group
|
|
1618
|
-
* @request POST:/wallets/{wallet_name}/derive-next-miner-addresses
|
|
1619
|
-
*/
|
|
1620
|
-
postWalletsWalletNameDeriveNextMinerAddresses: (walletName: string, params?: RequestParams) => Promise<AddressInfo[]>;
|
|
1621
|
-
/**
|
|
1622
|
-
* No description
|
|
1623
|
-
*
|
|
1624
|
-
* @tags Wallets
|
|
1625
|
-
* @name PostWalletsWalletNameChangeActiveAddress
|
|
1626
|
-
* @summary Choose the active address
|
|
1627
|
-
* @request POST:/wallets/{wallet_name}/change-active-address
|
|
1628
|
-
*/
|
|
1629
|
-
postWalletsWalletNameChangeActiveAddress: (walletName: string, data: ChangeActiveAddress, params?: RequestParams) => Promise<void>;
|
|
1630
|
-
};
|
|
1631
|
-
infos: {
|
|
1632
|
-
/**
|
|
1633
|
-
* No description
|
|
1634
|
-
*
|
|
1635
|
-
* @tags Infos
|
|
1636
|
-
* @name GetInfosNode
|
|
1637
|
-
* @summary Get info about that node
|
|
1638
|
-
* @request GET:/infos/node
|
|
1639
|
-
*/
|
|
1640
|
-
getInfosNode: (params?: RequestParams) => Promise<NodeInfo>;
|
|
1641
|
-
/**
|
|
1642
|
-
* No description
|
|
1643
|
-
*
|
|
1644
|
-
* @tags Infos
|
|
1645
|
-
* @name GetInfosVersion
|
|
1646
|
-
* @summary Get version about that node
|
|
1647
|
-
* @request GET:/infos/version
|
|
1648
|
-
*/
|
|
1649
|
-
getInfosVersion: (params?: RequestParams) => Promise<NodeVersion>;
|
|
1650
|
-
/**
|
|
1651
|
-
* No description
|
|
1652
|
-
*
|
|
1653
|
-
* @tags Infos
|
|
1654
|
-
* @name GetInfosChainParams
|
|
1655
|
-
* @summary Get key params about your blockchain
|
|
1656
|
-
* @request GET:/infos/chain-params
|
|
1657
|
-
*/
|
|
1658
|
-
getInfosChainParams: (params?: RequestParams) => Promise<ChainParams>;
|
|
1659
|
-
/**
|
|
1660
|
-
* No description
|
|
1661
|
-
*
|
|
1662
|
-
* @tags Infos
|
|
1663
|
-
* @name GetInfosSelfClique
|
|
1664
|
-
* @summary Get info about your own clique
|
|
1665
|
-
* @request GET:/infos/self-clique
|
|
1666
|
-
*/
|
|
1667
|
-
getInfosSelfClique: (params?: RequestParams) => Promise<SelfClique>;
|
|
1668
|
-
/**
|
|
1669
|
-
* No description
|
|
1670
|
-
*
|
|
1671
|
-
* @tags Infos
|
|
1672
|
-
* @name GetInfosInterCliquePeerInfo
|
|
1673
|
-
* @summary Get infos about the inter cliques
|
|
1674
|
-
* @request GET:/infos/inter-clique-peer-info
|
|
1675
|
-
*/
|
|
1676
|
-
getInfosInterCliquePeerInfo: (params?: RequestParams) => Promise<InterCliquePeerInfo[]>;
|
|
1677
|
-
/**
|
|
1678
|
-
* No description
|
|
1679
|
-
*
|
|
1680
|
-
* @tags Infos
|
|
1681
|
-
* @name GetInfosDiscoveredNeighbors
|
|
1682
|
-
* @summary Get discovered neighbors
|
|
1683
|
-
* @request GET:/infos/discovered-neighbors
|
|
1684
|
-
*/
|
|
1685
|
-
getInfosDiscoveredNeighbors: (params?: RequestParams) => Promise<BrokerInfo[]>;
|
|
1686
|
-
/**
|
|
1687
|
-
* No description
|
|
1688
|
-
*
|
|
1689
|
-
* @tags Infos
|
|
1690
|
-
* @name GetInfosMisbehaviors
|
|
1691
|
-
* @summary Get the misbehaviors of peers
|
|
1692
|
-
* @request GET:/infos/misbehaviors
|
|
1693
|
-
*/
|
|
1694
|
-
getInfosMisbehaviors: (params?: RequestParams) => Promise<PeerMisbehavior[]>;
|
|
1695
|
-
/**
|
|
1696
|
-
* No description
|
|
1697
|
-
*
|
|
1698
|
-
* @tags Infos
|
|
1699
|
-
* @name PostInfosMisbehaviors
|
|
1700
|
-
* @summary Ban/Unban given peers
|
|
1701
|
-
* @request POST:/infos/misbehaviors
|
|
1702
|
-
*/
|
|
1703
|
-
postInfosMisbehaviors: (data: MisbehaviorAction, params?: RequestParams) => Promise<void>;
|
|
1704
|
-
/**
|
|
1705
|
-
* No description
|
|
1706
|
-
*
|
|
1707
|
-
* @tags Infos
|
|
1708
|
-
* @name GetInfosUnreachable
|
|
1709
|
-
* @summary Get the unreachable brokers
|
|
1710
|
-
* @request GET:/infos/unreachable
|
|
1711
|
-
*/
|
|
1712
|
-
getInfosUnreachable: (params?: RequestParams) => Promise<string[]>;
|
|
1713
|
-
/**
|
|
1714
|
-
* No description
|
|
1715
|
-
*
|
|
1716
|
-
* @tags Infos
|
|
1717
|
-
* @name PostInfosDiscovery
|
|
1718
|
-
* @summary Set brokers to be unreachable/reachable
|
|
1719
|
-
* @request POST:/infos/discovery
|
|
1720
|
-
*/
|
|
1721
|
-
postInfosDiscovery: (data: DiscoveryAction, params?: RequestParams) => Promise<void>;
|
|
1722
|
-
/**
|
|
1723
|
-
* No description
|
|
1724
|
-
*
|
|
1725
|
-
* @tags Infos
|
|
1726
|
-
* @name GetInfosHistoryHashrate
|
|
1727
|
-
* @summary Get history average hashrate on the given time interval
|
|
1728
|
-
* @request GET:/infos/history-hashrate
|
|
1729
|
-
*/
|
|
1730
|
-
getInfosHistoryHashrate: (query: {
|
|
1731
|
-
/**
|
|
1732
|
-
* @format int64
|
|
1733
|
-
* @min 0
|
|
1734
|
-
*/
|
|
1735
|
-
fromTs: number;
|
|
1736
|
-
/**
|
|
1737
|
-
* @format int64
|
|
1738
|
-
* @min 0
|
|
1739
|
-
*/
|
|
1740
|
-
toTs?: number;
|
|
1741
|
-
}, params?: RequestParams) => Promise<HashRateResponse>;
|
|
1742
|
-
/**
|
|
1743
|
-
* No description
|
|
1744
|
-
*
|
|
1745
|
-
* @tags Infos
|
|
1746
|
-
* @name GetInfosCurrentHashrate
|
|
1747
|
-
* @summary Get average hashrate from `now - timespan(millis)` to `now`
|
|
1748
|
-
* @request GET:/infos/current-hashrate
|
|
1749
|
-
*/
|
|
1750
|
-
getInfosCurrentHashrate: (query?: {
|
|
1751
|
-
/**
|
|
1752
|
-
* @format int64
|
|
1753
|
-
* @min 1
|
|
1754
|
-
*/
|
|
1755
|
-
timespan?: number;
|
|
1756
|
-
}, params?: RequestParams) => Promise<HashRateResponse>;
|
|
1757
|
-
/**
|
|
1758
|
-
* No description
|
|
1759
|
-
*
|
|
1760
|
-
* @tags Infos
|
|
1761
|
-
* @name GetInfosCurrentDifficulty
|
|
1762
|
-
* @summary Get the average difficulty of the latest blocks from all shards
|
|
1763
|
-
* @request GET:/infos/current-difficulty
|
|
1764
|
-
*/
|
|
1765
|
-
getInfosCurrentDifficulty: (params?: RequestParams) => Promise<CurrentDifficulty>;
|
|
1766
|
-
};
|
|
1767
|
-
blockflow: {
|
|
1768
|
-
/**
|
|
1769
|
-
* No description
|
|
1770
|
-
*
|
|
1771
|
-
* @tags Blockflow
|
|
1772
|
-
* @name GetBlockflowBlocks
|
|
1773
|
-
* @summary List blocks on the given time interval
|
|
1774
|
-
* @request GET:/blockflow/blocks
|
|
1775
|
-
*/
|
|
1776
|
-
getBlockflowBlocks: (query: {
|
|
1777
|
-
/**
|
|
1778
|
-
* @format int64
|
|
1779
|
-
* @min 0
|
|
1780
|
-
*/
|
|
1781
|
-
fromTs: number;
|
|
1782
|
-
/**
|
|
1783
|
-
* @format int64
|
|
1784
|
-
* @min 0
|
|
1785
|
-
*/
|
|
1786
|
-
toTs?: number;
|
|
1787
|
-
}, params?: RequestParams) => Promise<BlocksPerTimeStampRange>;
|
|
1788
|
-
/**
|
|
1789
|
-
* No description
|
|
1790
|
-
*
|
|
1791
|
-
* @tags Blockflow
|
|
1792
|
-
* @name GetBlockflowBlocksWithEvents
|
|
1793
|
-
* @summary List blocks with events on the given time interval
|
|
1794
|
-
* @request GET:/blockflow/blocks-with-events
|
|
1795
|
-
*/
|
|
1796
|
-
getBlockflowBlocksWithEvents: (query: {
|
|
1797
|
-
/**
|
|
1798
|
-
* @format int64
|
|
1799
|
-
* @min 0
|
|
1800
|
-
*/
|
|
1801
|
-
fromTs: number;
|
|
1802
|
-
/**
|
|
1803
|
-
* @format int64
|
|
1804
|
-
* @min 0
|
|
1805
|
-
*/
|
|
1806
|
-
toTs?: number;
|
|
1807
|
-
}, params?: RequestParams) => Promise<BlocksAndEventsPerTimeStampRange>;
|
|
1808
|
-
/**
|
|
1809
|
-
* No description
|
|
1810
|
-
*
|
|
1811
|
-
* @tags Blockflow
|
|
1812
|
-
* @name GetBlockflowRichBlocks
|
|
1813
|
-
* @summary Given a time interval, list blocks containing events and transactions with enriched input information when node indexes are enabled.
|
|
1814
|
-
* @request GET:/blockflow/rich-blocks
|
|
1815
|
-
*/
|
|
1816
|
-
getBlockflowRichBlocks: (query: {
|
|
1817
|
-
/**
|
|
1818
|
-
* @format int64
|
|
1819
|
-
* @min 0
|
|
1820
|
-
*/
|
|
1821
|
-
fromTs: number;
|
|
1822
|
-
/**
|
|
1823
|
-
* @format int64
|
|
1824
|
-
* @min 0
|
|
1825
|
-
*/
|
|
1826
|
-
toTs?: number;
|
|
1827
|
-
}, params?: RequestParams) => Promise<RichBlocksAndEventsPerTimeStampRange>;
|
|
1828
|
-
/**
|
|
1829
|
-
* No description
|
|
1830
|
-
*
|
|
1831
|
-
* @tags Blockflow
|
|
1832
|
-
* @name GetBlockflowBlocksBlockHash
|
|
1833
|
-
* @summary Get a block with hash
|
|
1834
|
-
* @request GET:/blockflow/blocks/{block_hash}
|
|
1835
|
-
*/
|
|
1836
|
-
getBlockflowBlocksBlockHash: (blockHash: string, params?: RequestParams) => Promise<BlockEntry>;
|
|
1837
|
-
/**
|
|
1838
|
-
* No description
|
|
1839
|
-
*
|
|
1840
|
-
* @tags Blockflow
|
|
1841
|
-
* @name GetBlockflowMainChainBlockByGhostUncleGhostUncleHash
|
|
1842
|
-
* @summary Get a mainchain block by ghost uncle hash
|
|
1843
|
-
* @request GET:/blockflow/main-chain-block-by-ghost-uncle/{ghost_uncle_hash}
|
|
1844
|
-
*/
|
|
1845
|
-
getBlockflowMainChainBlockByGhostUncleGhostUncleHash: (ghostUncleHash: string, params?: RequestParams) => Promise<BlockEntry>;
|
|
1846
|
-
/**
|
|
1847
|
-
* No description
|
|
1848
|
-
*
|
|
1849
|
-
* @tags Blockflow
|
|
1850
|
-
* @name GetBlockflowBlocksWithEventsBlockHash
|
|
1851
|
-
* @summary Get a block and events with hash
|
|
1852
|
-
* @request GET:/blockflow/blocks-with-events/{block_hash}
|
|
1853
|
-
*/
|
|
1854
|
-
getBlockflowBlocksWithEventsBlockHash: (blockHash: string, params?: RequestParams) => Promise<BlockAndEvents>;
|
|
1855
|
-
/**
|
|
1856
|
-
* No description
|
|
1857
|
-
*
|
|
1858
|
-
* @tags Blockflow
|
|
1859
|
-
* @name GetBlockflowRichBlocksBlockHash
|
|
1860
|
-
* @summary Get a block containing events and transactions with enriched input information when node indexes are enabled.
|
|
1861
|
-
* @request GET:/blockflow/rich-blocks/{block_hash}
|
|
1862
|
-
*/
|
|
1863
|
-
getBlockflowRichBlocksBlockHash: (blockHash: string, params?: RequestParams) => Promise<RichBlockAndEvents>;
|
|
1864
|
-
/**
|
|
1865
|
-
* No description
|
|
1866
|
-
*
|
|
1867
|
-
* @tags Blockflow
|
|
1868
|
-
* @name GetBlockflowIsBlockInMainChain
|
|
1869
|
-
* @summary Check if the block is in main chain
|
|
1870
|
-
* @request GET:/blockflow/is-block-in-main-chain
|
|
1871
|
-
*/
|
|
1872
|
-
getBlockflowIsBlockInMainChain: (query: {
|
|
1873
|
-
/** @format block-hash */
|
|
1874
|
-
blockHash: string;
|
|
1875
|
-
}, params?: RequestParams) => Promise<boolean>;
|
|
1876
|
-
/**
|
|
1877
|
-
* No description
|
|
1878
|
-
*
|
|
1879
|
-
* @tags Blockflow
|
|
1880
|
-
* @name GetBlockflowHashes
|
|
1881
|
-
* @summary Get all block's hashes at given height for given groups
|
|
1882
|
-
* @request GET:/blockflow/hashes
|
|
1883
|
-
*/
|
|
1884
|
-
getBlockflowHashes: (query: {
|
|
1885
|
-
/** @format int32 */
|
|
1886
|
-
fromGroup: number;
|
|
1887
|
-
/** @format int32 */
|
|
1888
|
-
toGroup: number;
|
|
1889
|
-
/** @format int32 */
|
|
1890
|
-
height: number;
|
|
1891
|
-
}, params?: RequestParams) => Promise<HashesAtHeight>;
|
|
1892
|
-
/**
|
|
1893
|
-
* No description
|
|
1894
|
-
*
|
|
1895
|
-
* @tags Blockflow
|
|
1896
|
-
* @name GetBlockflowChainInfo
|
|
1897
|
-
* @summary Get infos about the chain from the given groups
|
|
1898
|
-
* @request GET:/blockflow/chain-info
|
|
1899
|
-
*/
|
|
1900
|
-
getBlockflowChainInfo: (query: {
|
|
1901
|
-
/** @format int32 */
|
|
1902
|
-
fromGroup: number;
|
|
1903
|
-
/** @format int32 */
|
|
1904
|
-
toGroup: number;
|
|
1905
|
-
}, params?: RequestParams) => Promise<ChainInfo>;
|
|
1906
|
-
/**
|
|
1907
|
-
* No description
|
|
1908
|
-
*
|
|
1909
|
-
* @tags Blockflow
|
|
1910
|
-
* @name GetBlockflowHeadersBlockHash
|
|
1911
|
-
* @summary Get block header
|
|
1912
|
-
* @request GET:/blockflow/headers/{block_hash}
|
|
1913
|
-
*/
|
|
1914
|
-
getBlockflowHeadersBlockHash: (blockHash: string, params?: RequestParams) => Promise<BlockHeaderEntry>;
|
|
1915
|
-
/**
|
|
1916
|
-
* No description
|
|
1917
|
-
*
|
|
1918
|
-
* @tags Blockflow
|
|
1919
|
-
* @name GetBlockflowRawBlocksBlockHash
|
|
1920
|
-
* @summary Get raw block in hex format
|
|
1921
|
-
* @request GET:/blockflow/raw-blocks/{block_hash}
|
|
1922
|
-
*/
|
|
1923
|
-
getBlockflowRawBlocksBlockHash: (blockHash: string, params?: RequestParams) => Promise<RawBlock>;
|
|
1924
|
-
};
|
|
1925
|
-
addresses: {
|
|
1926
|
-
/**
|
|
1927
|
-
* No description
|
|
1928
|
-
*
|
|
1929
|
-
* @tags Addresses
|
|
1930
|
-
* @name GetAddressesAddressBalance
|
|
1931
|
-
* @summary Get the balance of an address
|
|
1932
|
-
* @request GET:/addresses/{address}/balance
|
|
1933
|
-
*/
|
|
1934
|
-
getAddressesAddressBalance: (address: string, query?: {
|
|
1935
|
-
mempool?: boolean;
|
|
1936
|
-
}, params?: RequestParams) => Promise<Balance>;
|
|
1937
|
-
/**
|
|
1938
|
-
* No description
|
|
1939
|
-
*
|
|
1940
|
-
* @tags Addresses
|
|
1941
|
-
* @name GetAddressesAddressUtxos
|
|
1942
|
-
* @summary Get the UTXOs of an address
|
|
1943
|
-
* @request GET:/addresses/{address}/utxos
|
|
1944
|
-
*/
|
|
1945
|
-
getAddressesAddressUtxos: (address: string, query?: {
|
|
1946
|
-
'error-if-exceed-max-utxos'?: boolean;
|
|
1947
|
-
}, params?: RequestParams) => Promise<UTXOs>;
|
|
1948
|
-
/**
|
|
1949
|
-
* No description
|
|
1950
|
-
*
|
|
1951
|
-
* @tags Addresses
|
|
1952
|
-
* @name GetAddressesAddressGroup
|
|
1953
|
-
* @summary Get the group of an address
|
|
1954
|
-
* @request GET:/addresses/{address}/group
|
|
1955
|
-
*/
|
|
1956
|
-
getAddressesAddressGroup: (address: string, params?: RequestParams) => Promise<Group>;
|
|
1957
|
-
};
|
|
1958
|
-
transactions: {
|
|
1959
|
-
/**
|
|
1960
|
-
* No description
|
|
1961
|
-
*
|
|
1962
|
-
* @tags Transactions
|
|
1963
|
-
* @name PostTransactionsBuild
|
|
1964
|
-
* @summary Build an unsigned transfer transaction to a number of recipients
|
|
1965
|
-
* @request POST:/transactions/build
|
|
1966
|
-
*/
|
|
1967
|
-
postTransactionsBuild: (data: BuildTransferTx, params?: RequestParams) => Promise<BuildSimpleTransferTxResult | BuildGrouplessTransferTxResult>;
|
|
1968
|
-
/**
|
|
1969
|
-
* No description
|
|
1970
|
-
*
|
|
1971
|
-
* @tags Transactions
|
|
1972
|
-
* @name PostTransactionsBuildTransferFromOneToManyGroups
|
|
1973
|
-
* @summary Build unsigned transfer transactions from an address of one group to addresses of many groups. Each target group requires a dedicated transaction or more in case large number of outputs needed to be split.
|
|
1974
|
-
* @request POST:/transactions/build-transfer-from-one-to-many-groups
|
|
1975
|
-
*/
|
|
1976
|
-
postTransactionsBuildTransferFromOneToManyGroups: (data: BuildTransferTx, params?: RequestParams) => Promise<BuildSimpleTransferTxResult[]>;
|
|
1977
|
-
/**
|
|
1978
|
-
* No description
|
|
1979
|
-
*
|
|
1980
|
-
* @tags Transactions
|
|
1981
|
-
* @name PostTransactionsBuildMultiAddresses
|
|
1982
|
-
* @summary Build an unsigned transaction with multiple addresses to a number of recipients
|
|
1983
|
-
* @request POST:/transactions/build-multi-addresses
|
|
1984
|
-
*/
|
|
1985
|
-
postTransactionsBuildMultiAddresses: (data: BuildMultiAddressesTransaction, params?: RequestParams) => Promise<BuildSimpleTransferTxResult>;
|
|
1986
|
-
/**
|
|
1987
|
-
* No description
|
|
1988
|
-
*
|
|
1989
|
-
* @tags Transactions
|
|
1990
|
-
* @name PostTransactionsSweepAddressBuild
|
|
1991
|
-
* @summary Build unsigned transactions to send all unlocked ALPH and token balances of one address to another address
|
|
1992
|
-
* @request POST:/transactions/sweep-address/build
|
|
1993
|
-
*/
|
|
1994
|
-
postTransactionsSweepAddressBuild: (data: BuildSweepAddressTransactions, params?: RequestParams) => Promise<BuildSweepAddressTransactionsResult>;
|
|
1995
|
-
/**
|
|
1996
|
-
* No description
|
|
1997
|
-
*
|
|
1998
|
-
* @tags Transactions
|
|
1999
|
-
* @name PostTransactionsSubmit
|
|
2000
|
-
* @summary Submit a signed transaction
|
|
2001
|
-
* @request POST:/transactions/submit
|
|
2002
|
-
*/
|
|
2003
|
-
postTransactionsSubmit: (data: SubmitTransaction, params?: RequestParams) => Promise<SubmitTxResult>;
|
|
2004
|
-
/**
|
|
2005
|
-
* No description
|
|
2006
|
-
*
|
|
2007
|
-
* @tags Transactions
|
|
2008
|
-
* @name PostTransactionsDecodeUnsignedTx
|
|
2009
|
-
* @summary Decode an unsigned transaction
|
|
2010
|
-
* @request POST:/transactions/decode-unsigned-tx
|
|
2011
|
-
*/
|
|
2012
|
-
postTransactionsDecodeUnsignedTx: (data: DecodeUnsignedTx, params?: RequestParams) => Promise<DecodeUnsignedTxResult>;
|
|
2013
|
-
/**
|
|
2014
|
-
* No description
|
|
2015
|
-
*
|
|
2016
|
-
* @tags Transactions
|
|
2017
|
-
* @name GetTransactionsDetailsTxid
|
|
2018
|
-
* @summary Get transaction details
|
|
2019
|
-
* @request GET:/transactions/details/{txId}
|
|
2020
|
-
*/
|
|
2021
|
-
getTransactionsDetailsTxid: (txId: string, query?: {
|
|
2022
|
-
/** @format int32 */
|
|
2023
|
-
fromGroup?: number;
|
|
2024
|
-
/** @format int32 */
|
|
2025
|
-
toGroup?: number;
|
|
2026
|
-
}, params?: RequestParams) => Promise<Transaction>;
|
|
2027
|
-
/**
|
|
2028
|
-
* No description
|
|
2029
|
-
*
|
|
2030
|
-
* @tags Transactions
|
|
2031
|
-
* @name GetTransactionsRichDetailsTxid
|
|
2032
|
-
* @summary Get transaction with enriched input information when node indexes are enabled.
|
|
2033
|
-
* @request GET:/transactions/rich-details/{txId}
|
|
2034
|
-
*/
|
|
2035
|
-
getTransactionsRichDetailsTxid: (txId: string, query?: {
|
|
2036
|
-
/** @format int32 */
|
|
2037
|
-
fromGroup?: number;
|
|
2038
|
-
/** @format int32 */
|
|
2039
|
-
toGroup?: number;
|
|
2040
|
-
}, params?: RequestParams) => Promise<RichTransaction>;
|
|
2041
|
-
/**
|
|
2042
|
-
* No description
|
|
2043
|
-
*
|
|
2044
|
-
* @tags Transactions
|
|
2045
|
-
* @name GetTransactionsRawTxid
|
|
2046
|
-
* @summary Get raw transaction in hex format
|
|
2047
|
-
* @request GET:/transactions/raw/{txId}
|
|
2048
|
-
*/
|
|
2049
|
-
getTransactionsRawTxid: (txId: string, query?: {
|
|
2050
|
-
/** @format int32 */
|
|
2051
|
-
fromGroup?: number;
|
|
2052
|
-
/** @format int32 */
|
|
2053
|
-
toGroup?: number;
|
|
2054
|
-
}, params?: RequestParams) => Promise<RawTransaction>;
|
|
2055
|
-
/**
|
|
2056
|
-
* No description
|
|
2057
|
-
*
|
|
2058
|
-
* @tags Transactions
|
|
2059
|
-
* @name GetTransactionsStatus
|
|
2060
|
-
* @summary Get tx status
|
|
2061
|
-
* @request GET:/transactions/status
|
|
2062
|
-
*/
|
|
2063
|
-
getTransactionsStatus: (query: {
|
|
2064
|
-
/** @format 32-byte-hash */
|
|
2065
|
-
txId: string;
|
|
2066
|
-
/** @format int32 */
|
|
2067
|
-
fromGroup?: number;
|
|
2068
|
-
/** @format int32 */
|
|
2069
|
-
toGroup?: number;
|
|
2070
|
-
}, params?: RequestParams) => Promise<Confirmed | Conflicted | MemPooled | TxNotFound>;
|
|
2071
|
-
/**
|
|
2072
|
-
* No description
|
|
2073
|
-
*
|
|
2074
|
-
* @tags Transactions
|
|
2075
|
-
* @name GetTransactionsTxIdFromOutputref
|
|
2076
|
-
* @summary Get transaction id from transaction output ref
|
|
2077
|
-
* @request GET:/transactions/tx-id-from-outputref
|
|
2078
|
-
*/
|
|
2079
|
-
getTransactionsTxIdFromOutputref: (query: {
|
|
2080
|
-
/** @format int32 */
|
|
2081
|
-
hint: number;
|
|
2082
|
-
/** @format 32-byte-hash */
|
|
2083
|
-
key: string;
|
|
2084
|
-
}, params?: RequestParams) => Promise<string>;
|
|
2085
|
-
/**
|
|
2086
|
-
* No description
|
|
2087
|
-
*
|
|
2088
|
-
* @tags Transactions
|
|
2089
|
-
* @name PostTransactionsBuildChained
|
|
2090
|
-
* @summary Build a chain of transactions
|
|
2091
|
-
* @request POST:/transactions/build-chained
|
|
2092
|
-
*/
|
|
2093
|
-
postTransactionsBuildChained: (data: BuildChainedTx[], params?: RequestParams) => Promise<BuildChainedTxResult[]>;
|
|
2094
|
-
};
|
|
2095
|
-
mempool: {
|
|
2096
|
-
/**
|
|
2097
|
-
* No description
|
|
2098
|
-
*
|
|
2099
|
-
* @tags Mempool
|
|
2100
|
-
* @name GetMempoolTransactions
|
|
2101
|
-
* @summary List mempool transactions
|
|
2102
|
-
* @request GET:/mempool/transactions
|
|
2103
|
-
*/
|
|
2104
|
-
getMempoolTransactions: (params?: RequestParams) => Promise<MempoolTransactions[]>;
|
|
2105
|
-
/**
|
|
2106
|
-
* No description
|
|
2107
|
-
*
|
|
2108
|
-
* @tags Mempool
|
|
2109
|
-
* @name DeleteMempoolTransactions
|
|
2110
|
-
* @summary Remove all transactions from mempool
|
|
2111
|
-
* @request DELETE:/mempool/transactions
|
|
2112
|
-
*/
|
|
2113
|
-
deleteMempoolTransactions: (params?: RequestParams) => Promise<void>;
|
|
2114
|
-
/**
|
|
2115
|
-
* No description
|
|
2116
|
-
*
|
|
2117
|
-
* @tags Mempool
|
|
2118
|
-
* @name PutMempoolTransactionsRebroadcast
|
|
2119
|
-
* @summary Rebroadcase a mempool transaction to the network
|
|
2120
|
-
* @request PUT:/mempool/transactions/rebroadcast
|
|
2121
|
-
*/
|
|
2122
|
-
putMempoolTransactionsRebroadcast: (query: {
|
|
2123
|
-
/** @format 32-byte-hash */
|
|
2124
|
-
txId: string;
|
|
2125
|
-
}, params?: RequestParams) => Promise<void>;
|
|
2126
|
-
/**
|
|
2127
|
-
* No description
|
|
2128
|
-
*
|
|
2129
|
-
* @tags Mempool
|
|
2130
|
-
* @name PutMempoolTransactionsValidate
|
|
2131
|
-
* @summary Validate all mempool transactions and remove invalid ones
|
|
2132
|
-
* @request PUT:/mempool/transactions/validate
|
|
2133
|
-
*/
|
|
2134
|
-
putMempoolTransactionsValidate: (params?: RequestParams) => Promise<void>;
|
|
2135
|
-
};
|
|
2136
|
-
contracts: {
|
|
2137
|
-
/**
|
|
2138
|
-
* No description
|
|
2139
|
-
*
|
|
2140
|
-
* @tags Contracts
|
|
2141
|
-
* @name PostContractsCompileScript
|
|
2142
|
-
* @summary Compile a script
|
|
2143
|
-
* @request POST:/contracts/compile-script
|
|
2144
|
-
*/
|
|
2145
|
-
postContractsCompileScript: (data: Script, params?: RequestParams) => Promise<CompileScriptResult>;
|
|
2146
|
-
/**
|
|
2147
|
-
* No description
|
|
2148
|
-
*
|
|
2149
|
-
* @tags Contracts
|
|
2150
|
-
* @name PostContractsUnsignedTxExecuteScript
|
|
2151
|
-
* @summary Build an unsigned script
|
|
2152
|
-
* @request POST:/contracts/unsigned-tx/execute-script
|
|
2153
|
-
*/
|
|
2154
|
-
postContractsUnsignedTxExecuteScript: (data: BuildExecuteScriptTx, params?: RequestParams) => Promise<BuildSimpleExecuteScriptTxResult | BuildGrouplessExecuteScriptTxResult>;
|
|
2155
|
-
/**
|
|
2156
|
-
* No description
|
|
2157
|
-
*
|
|
2158
|
-
* @tags Contracts
|
|
2159
|
-
* @name PostContractsCompileContract
|
|
2160
|
-
* @summary Compile a smart contract
|
|
2161
|
-
* @request POST:/contracts/compile-contract
|
|
2162
|
-
*/
|
|
2163
|
-
postContractsCompileContract: (data: Contract, params?: RequestParams) => Promise<CompileContractResult>;
|
|
2164
|
-
/**
|
|
2165
|
-
* No description
|
|
2166
|
-
*
|
|
2167
|
-
* @tags Contracts
|
|
2168
|
-
* @name PostContractsCompileProject
|
|
2169
|
-
* @summary Compile a project
|
|
2170
|
-
* @request POST:/contracts/compile-project
|
|
2171
|
-
*/
|
|
2172
|
-
postContractsCompileProject: (data: Project, params?: RequestParams) => Promise<CompileProjectResult>;
|
|
2173
|
-
/**
|
|
2174
|
-
* No description
|
|
2175
|
-
*
|
|
2176
|
-
* @tags Contracts
|
|
2177
|
-
* @name PostContractsUnsignedTxDeployContract
|
|
2178
|
-
* @summary Build an unsigned contract
|
|
2179
|
-
* @request POST:/contracts/unsigned-tx/deploy-contract
|
|
2180
|
-
*/
|
|
2181
|
-
postContractsUnsignedTxDeployContract: (data: BuildDeployContractTx, params?: RequestParams) => Promise<BuildSimpleDeployContractTxResult | BuildGrouplessDeployContractTxResult>;
|
|
2182
|
-
/**
|
|
2183
|
-
* No description
|
|
2184
|
-
*
|
|
2185
|
-
* @tags Contracts
|
|
2186
|
-
* @name GetContractsAddressState
|
|
2187
|
-
* @summary Get contract state
|
|
2188
|
-
* @request GET:/contracts/{address}/state
|
|
2189
|
-
*/
|
|
2190
|
-
getContractsAddressState: (address: string, params?: RequestParams) => Promise<ContractState>;
|
|
2191
|
-
/**
|
|
2192
|
-
* No description
|
|
2193
|
-
*
|
|
2194
|
-
* @tags Contracts
|
|
2195
|
-
* @name GetContractsCodehashCode
|
|
2196
|
-
* @summary Get contract code by code hash
|
|
2197
|
-
* @request GET:/contracts/{codeHash}/code
|
|
2198
|
-
*/
|
|
2199
|
-
getContractsCodehashCode: (codeHash: string, params?: RequestParams) => Promise<string>;
|
|
2200
|
-
/**
|
|
2201
|
-
* No description
|
|
2202
|
-
*
|
|
2203
|
-
* @tags Contracts
|
|
2204
|
-
* @name PostContractsTestContract
|
|
2205
|
-
* @summary Test contract
|
|
2206
|
-
* @request POST:/contracts/test-contract
|
|
2207
|
-
*/
|
|
2208
|
-
postContractsTestContract: (data: TestContract, params?: RequestParams) => Promise<TestContractResult>;
|
|
2209
|
-
/**
|
|
2210
|
-
* No description
|
|
2211
|
-
*
|
|
2212
|
-
* @tags Contracts
|
|
2213
|
-
* @name PostContractsCallContract
|
|
2214
|
-
* @summary Call contract
|
|
2215
|
-
* @request POST:/contracts/call-contract
|
|
2216
|
-
*/
|
|
2217
|
-
postContractsCallContract: (data: CallContract, params?: RequestParams) => Promise<CallContractFailed | CallContractSucceeded>;
|
|
2218
|
-
/**
|
|
2219
|
-
* No description
|
|
2220
|
-
*
|
|
2221
|
-
* @tags Contracts
|
|
2222
|
-
* @name PostContractsMulticallContract
|
|
2223
|
-
* @summary Multiple call contract
|
|
2224
|
-
* @request POST:/contracts/multicall-contract
|
|
2225
|
-
*/
|
|
2226
|
-
postContractsMulticallContract: (data: MultipleCallContract, params?: RequestParams) => Promise<MultipleCallContractResult>;
|
|
2227
|
-
/**
|
|
2228
|
-
* No description
|
|
2229
|
-
*
|
|
2230
|
-
* @tags Contracts
|
|
2231
|
-
* @name GetContractsAddressParent
|
|
2232
|
-
* @summary Get parent contract address
|
|
2233
|
-
* @request GET:/contracts/{address}/parent
|
|
2234
|
-
*/
|
|
2235
|
-
getContractsAddressParent: (address: string, params?: RequestParams) => Promise<string>;
|
|
2236
|
-
/**
|
|
2237
|
-
* No description
|
|
2238
|
-
*
|
|
2239
|
-
* @tags Contracts
|
|
2240
|
-
* @name GetContractsAddressSubContracts
|
|
2241
|
-
* @summary Get sub-contract addresses
|
|
2242
|
-
* @request GET:/contracts/{address}/sub-contracts
|
|
2243
|
-
*/
|
|
2244
|
-
getContractsAddressSubContracts: (address: string, query: {
|
|
2245
|
-
/** @format int32 */
|
|
2246
|
-
start: number;
|
|
2247
|
-
/** @format int32 */
|
|
2248
|
-
limit?: number;
|
|
2249
|
-
}, params?: RequestParams) => Promise<SubContracts>;
|
|
2250
|
-
/**
|
|
2251
|
-
* No description
|
|
2252
|
-
*
|
|
2253
|
-
* @tags Contracts
|
|
2254
|
-
* @name GetContractsAddressSubContractsCurrentCount
|
|
2255
|
-
* @summary Get current value of the sub-contracts counter for a contract
|
|
2256
|
-
* @request GET:/contracts/{address}/sub-contracts/current-count
|
|
2257
|
-
*/
|
|
2258
|
-
getContractsAddressSubContractsCurrentCount: (address: string, params?: RequestParams) => Promise<number>;
|
|
2259
|
-
/**
|
|
2260
|
-
* No description
|
|
2261
|
-
*
|
|
2262
|
-
* @tags Contracts
|
|
2263
|
-
* @name PostContractsCallTxScript
|
|
2264
|
-
* @summary Call TxScript
|
|
2265
|
-
* @request POST:/contracts/call-tx-script
|
|
2266
|
-
*/
|
|
2267
|
-
postContractsCallTxScript: (data: CallTxScript, params?: RequestParams) => Promise<CallTxScriptResult>;
|
|
2268
|
-
};
|
|
2269
|
-
multisig: {
|
|
2270
|
-
/**
|
|
2271
|
-
* No description
|
|
2272
|
-
*
|
|
2273
|
-
* @tags Multi-signature
|
|
2274
|
-
* @name PostMultisigAddress
|
|
2275
|
-
* @summary Create the multisig address and unlock script
|
|
2276
|
-
* @request POST:/multisig/address
|
|
2277
|
-
*/
|
|
2278
|
-
postMultisigAddress: (data: BuildMultisigAddress, params?: RequestParams) => Promise<BuildMultisigAddressResult>;
|
|
2279
|
-
/**
|
|
2280
|
-
* No description
|
|
2281
|
-
*
|
|
2282
|
-
* @tags Multi-signature
|
|
2283
|
-
* @name PostMultisigBuild
|
|
2284
|
-
* @summary Build a multisig unsigned transaction
|
|
2285
|
-
* @request POST:/multisig/build
|
|
2286
|
-
*/
|
|
2287
|
-
postMultisigBuild: (data: BuildMultisig, params?: RequestParams) => Promise<BuildSimpleTransferTxResult | BuildGrouplessTransferTxResult>;
|
|
2288
|
-
/**
|
|
2289
|
-
* No description
|
|
2290
|
-
*
|
|
2291
|
-
* @tags Multi-signature
|
|
2292
|
-
* @name PostMultisigSweep
|
|
2293
|
-
* @summary Sweep all unlocked ALPH and token balances of a multisig address to another address
|
|
2294
|
-
* @request POST:/multisig/sweep
|
|
2295
|
-
*/
|
|
2296
|
-
postMultisigSweep: (data: BuildSweepMultisig, params?: RequestParams) => Promise<BuildSweepAddressTransactionsResult>;
|
|
2297
|
-
/**
|
|
2298
|
-
* No description
|
|
2299
|
-
*
|
|
2300
|
-
* @tags Multi-signature
|
|
2301
|
-
* @name PostMultisigSubmit
|
|
2302
|
-
* @summary Submit a multi-signed transaction
|
|
2303
|
-
* @request POST:/multisig/submit
|
|
2304
|
-
*/
|
|
2305
|
-
postMultisigSubmit: (data: SubmitMultisig, params?: RequestParams) => Promise<SubmitTxResult>;
|
|
2306
|
-
};
|
|
2307
|
-
miners: {
|
|
2308
|
-
/**
|
|
2309
|
-
* No description
|
|
2310
|
-
*
|
|
2311
|
-
* @tags Miners
|
|
2312
|
-
* @name PostMinersCpuMining
|
|
2313
|
-
* @summary Execute an action on CPU miner. !!! for test only !!!
|
|
2314
|
-
* @request POST:/miners/cpu-mining
|
|
2315
|
-
*/
|
|
2316
|
-
postMinersCpuMining: (query: {
|
|
2317
|
-
action: string;
|
|
2318
|
-
}, params?: RequestParams) => Promise<boolean>;
|
|
2319
|
-
/**
|
|
2320
|
-
* No description
|
|
2321
|
-
*
|
|
2322
|
-
* @tags Miners
|
|
2323
|
-
* @name PostMinersCpuMiningMineOneBlock
|
|
2324
|
-
* @summary Mine a block on CPU miner. !!! for test only !!!
|
|
2325
|
-
* @request POST:/miners/cpu-mining/mine-one-block
|
|
2326
|
-
*/
|
|
2327
|
-
postMinersCpuMiningMineOneBlock: (query: {
|
|
2328
|
-
/** @format int32 */
|
|
2329
|
-
fromGroup: number;
|
|
2330
|
-
/** @format int32 */
|
|
2331
|
-
toGroup: number;
|
|
2332
|
-
}, params?: RequestParams) => Promise<boolean>;
|
|
2333
|
-
/**
|
|
2334
|
-
* No description
|
|
2335
|
-
*
|
|
2336
|
-
* @tags Miners
|
|
2337
|
-
* @name GetMinersAddresses
|
|
2338
|
-
* @summary List miner's addresses
|
|
2339
|
-
* @request GET:/miners/addresses
|
|
2340
|
-
*/
|
|
2341
|
-
getMinersAddresses: (params?: RequestParams) => Promise<MinerAddresses>;
|
|
2342
|
-
/**
|
|
2343
|
-
* No description
|
|
2344
|
-
*
|
|
2345
|
-
* @tags Miners
|
|
2346
|
-
* @name PutMinersAddresses
|
|
2347
|
-
* @summary Update miner's addresses, but better to use user.conf instead
|
|
2348
|
-
* @request PUT:/miners/addresses
|
|
2349
|
-
*/
|
|
2350
|
-
putMinersAddresses: (data: MinerAddresses, params?: RequestParams) => Promise<void>;
|
|
2351
|
-
};
|
|
2352
|
-
events: {
|
|
2353
|
-
/**
|
|
2354
|
-
* No description
|
|
2355
|
-
*
|
|
2356
|
-
* @tags Events
|
|
2357
|
-
* @name GetEventsContractContractaddress
|
|
2358
|
-
* @summary Get events for a contract within a counter range
|
|
2359
|
-
* @request GET:/events/contract/{contractAddress}
|
|
2360
|
-
*/
|
|
2361
|
-
getEventsContractContractaddress: (contractAddress: string, query: {
|
|
2362
|
-
/** @format int32 */
|
|
2363
|
-
start: number;
|
|
2364
|
-
/** @format int32 */
|
|
2365
|
-
limit?: number;
|
|
2366
|
-
/** @format int32 */
|
|
2367
|
-
group?: number;
|
|
2368
|
-
}, params?: RequestParams) => Promise<ContractEvents>;
|
|
2369
|
-
/**
|
|
2370
|
-
* No description
|
|
2371
|
-
*
|
|
2372
|
-
* @tags Events
|
|
2373
|
-
* @name GetEventsContractContractaddressCurrentCount
|
|
2374
|
-
* @summary Get current value of the events counter for a contract
|
|
2375
|
-
* @request GET:/events/contract/{contractAddress}/current-count
|
|
2376
|
-
*/
|
|
2377
|
-
getEventsContractContractaddressCurrentCount: (contractAddress: string, params?: RequestParams) => Promise<number>;
|
|
2378
|
-
/**
|
|
2379
|
-
* No description
|
|
2380
|
-
*
|
|
2381
|
-
* @tags Events
|
|
2382
|
-
* @name GetEventsTxIdTxid
|
|
2383
|
-
* @summary Get contract events for a transaction
|
|
2384
|
-
* @request GET:/events/tx-id/{txId}
|
|
2385
|
-
*/
|
|
2386
|
-
getEventsTxIdTxid: (txId: string, query?: {
|
|
2387
|
-
/** @format int32 */
|
|
2388
|
-
group?: number;
|
|
2389
|
-
}, params?: RequestParams) => Promise<ContractEventsByTxId>;
|
|
2390
|
-
/**
|
|
2391
|
-
* No description
|
|
2392
|
-
*
|
|
2393
|
-
* @tags Events
|
|
2394
|
-
* @name GetEventsBlockHashBlockhash
|
|
2395
|
-
* @summary Get contract events for a block
|
|
2396
|
-
* @request GET:/events/block-hash/{blockHash}
|
|
2397
|
-
*/
|
|
2398
|
-
getEventsBlockHashBlockhash: (blockHash: string, query?: {
|
|
2399
|
-
/** @format int32 */
|
|
2400
|
-
group?: number;
|
|
2401
|
-
}, params?: RequestParams) => Promise<ContractEventsByBlockHash>;
|
|
2402
|
-
};
|
|
2403
|
-
utils: {
|
|
2404
|
-
/**
|
|
2405
|
-
* No description
|
|
2406
|
-
*
|
|
2407
|
-
* @tags Utils
|
|
2408
|
-
* @name PostUtilsVerifySignature
|
|
2409
|
-
* @summary Verify the SecP256K1 signature of some data
|
|
2410
|
-
* @request POST:/utils/verify-signature
|
|
2411
|
-
*/
|
|
2412
|
-
postUtilsVerifySignature: (data: VerifySignature, params?: RequestParams) => Promise<boolean>;
|
|
2413
|
-
/**
|
|
2414
|
-
* No description
|
|
2415
|
-
*
|
|
2416
|
-
* @tags Utils
|
|
2417
|
-
* @name PostUtilsTargetToHashrate
|
|
2418
|
-
* @summary Convert a target to hashrate
|
|
2419
|
-
* @request POST:/utils/target-to-hashrate
|
|
2420
|
-
*/
|
|
2421
|
-
postUtilsTargetToHashrate: (data: TargetToHashrate, params?: RequestParams) => Promise<Result>;
|
|
2422
|
-
/**
|
|
2423
|
-
* No description
|
|
2424
|
-
*
|
|
2425
|
-
* @tags Utils
|
|
2426
|
-
* @name PutUtilsCheckHashIndexing
|
|
2427
|
-
* @summary Check and repair the indexing of block hashes
|
|
2428
|
-
* @request PUT:/utils/check-hash-indexing
|
|
2429
|
-
*/
|
|
2430
|
-
putUtilsCheckHashIndexing: (params?: RequestParams) => Promise<void>;
|
|
2431
|
-
};
|
|
2432
|
-
}
|
|
2433
|
-
export {};
|