@alephium/web3 1.8.2 → 1.8.3-rc.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/dist/{scripts → _cjs/scripts}/check-versions.js +1 -0
- package/dist/_cjs/scripts/check-versions.js.map +1 -0
- package/dist/{scripts → _cjs/scripts}/header.js +1 -0
- package/dist/_cjs/scripts/header.js.map +1 -0
- package/dist/{src → _cjs/src}/address/address.js +1 -0
- package/dist/_cjs/src/address/address.js.map +1 -0
- package/dist/{src → _cjs/src}/address/index.js +1 -0
- package/dist/_cjs/src/address/index.js.map +1 -0
- package/dist/{src → _cjs/src}/api/api-alephium.js +1 -0
- package/dist/_cjs/src/api/api-alephium.js.map +1 -0
- package/dist/{src → _cjs/src}/api/api-explorer.js +1 -0
- package/dist/_cjs/src/api/api-explorer.js.map +1 -0
- package/dist/{src → _cjs/src}/api/explorer-provider.js +1 -0
- package/dist/_cjs/src/api/explorer-provider.js.map +1 -0
- package/dist/{src → _cjs/src}/api/index.js +1 -0
- package/dist/_cjs/src/api/index.js.map +1 -0
- package/dist/{src → _cjs/src}/api/node-provider.js +1 -0
- package/dist/_cjs/src/api/node-provider.js.map +1 -0
- package/dist/{src → _cjs/src}/api/types.js +1 -0
- package/dist/_cjs/src/api/types.js.map +1 -0
- package/dist/{src → _cjs/src}/api/utils.js +1 -0
- package/dist/_cjs/src/api/utils.js.map +1 -0
- package/dist/{src → _cjs/src}/block/block.js +1 -0
- package/dist/_cjs/src/block/block.js.map +1 -0
- package/dist/{src → _cjs/src}/block/index.js +1 -0
- package/dist/_cjs/src/block/index.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/array-codec.js +1 -0
- package/dist/_cjs/src/codec/array-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/asset-output-codec.js +1 -0
- package/dist/_cjs/src/codec/asset-output-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/bigint-codec.js +1 -0
- package/dist/_cjs/src/codec/bigint-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/bytestring-codec.js +1 -0
- package/dist/_cjs/src/codec/bytestring-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/codec.js +1 -0
- package/dist/_cjs/src/codec/codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/compact-int-codec.js +1 -0
- package/dist/_cjs/src/codec/compact-int-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/contract-codec.js +1 -0
- package/dist/_cjs/src/codec/contract-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/contract-output-codec.js +1 -0
- package/dist/_cjs/src/codec/contract-output-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/contract-output-ref-codec.js +1 -0
- package/dist/_cjs/src/codec/contract-output-ref-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/either-codec.js +1 -0
- package/dist/_cjs/src/codec/either-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/hash.js +1 -0
- package/dist/_cjs/src/codec/hash.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/index.js +1 -0
- package/dist/_cjs/src/codec/index.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/input-codec.js +1 -0
- package/dist/_cjs/src/codec/input-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/instr-codec.js +1 -0
- package/dist/_cjs/src/codec/instr-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/int-as-4bytes-codec.js +1 -0
- package/dist/_cjs/src/codec/int-as-4bytes-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/lockup-script-codec.js +1 -0
- package/dist/_cjs/src/codec/lockup-script-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/method-codec.js +1 -0
- package/dist/_cjs/src/codec/method-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/option-codec.js +1 -0
- package/dist/_cjs/src/codec/option-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/output-codec.js +1 -0
- package/dist/_cjs/src/codec/output-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/reader.js +1 -0
- package/dist/_cjs/src/codec/reader.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/script-codec.js +1 -0
- package/dist/_cjs/src/codec/script-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/signature-codec.js +1 -0
- package/dist/_cjs/src/codec/signature-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/timestamp-codec.js +1 -0
- package/dist/_cjs/src/codec/timestamp-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/token-codec.js +1 -0
- package/dist/_cjs/src/codec/token-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/transaction-codec.js +1 -0
- package/dist/_cjs/src/codec/transaction-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/unlock-script-codec.js +1 -0
- package/dist/_cjs/src/codec/unlock-script-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/unsigned-tx-codec.js +1 -0
- package/dist/_cjs/src/codec/unsigned-tx-codec.js.map +1 -0
- package/dist/{src → _cjs/src}/codec/val.js +1 -0
- package/dist/_cjs/src/codec/val.js.map +1 -0
- package/dist/{src → _cjs/src}/constants.js +1 -0
- package/dist/_cjs/src/constants.js.map +1 -0
- package/dist/{src → _cjs/src}/contract/contract.js +1 -0
- package/dist/_cjs/src/contract/contract.js.map +1 -0
- package/dist/{src → _cjs/src}/contract/events.js +1 -0
- package/dist/_cjs/src/contract/events.js.map +1 -0
- package/dist/{src → _cjs/src}/contract/index.js +1 -0
- package/dist/_cjs/src/contract/index.js.map +1 -0
- package/dist/{src → _cjs/src}/contract/ralph.js +1 -0
- package/dist/_cjs/src/contract/ralph.js.map +1 -0
- package/dist/{src → _cjs/src}/contract/script-simulator.js +1 -0
- package/dist/_cjs/src/contract/script-simulator.js.map +1 -0
- package/dist/{src → _cjs/src}/debug.js +1 -0
- package/dist/_cjs/src/debug.js.map +1 -0
- package/dist/{src → _cjs/src}/error.js +1 -0
- package/dist/_cjs/src/error.js.map +1 -0
- package/dist/{src → _cjs/src}/exchange/exchange.js +1 -0
- package/dist/_cjs/src/exchange/exchange.js.map +1 -0
- package/dist/{src → _cjs/src}/exchange/index.js +1 -0
- package/dist/_cjs/src/exchange/index.js.map +1 -0
- package/dist/{src → _cjs/src}/global.js +1 -0
- package/dist/_cjs/src/global.js.map +1 -0
- package/dist/{src → _cjs/src}/index.js +1 -0
- package/dist/_cjs/src/index.js.map +1 -0
- package/dist/{src → _cjs/src}/signer/index.js +1 -0
- package/dist/_cjs/src/signer/index.js.map +1 -0
- package/dist/{src → _cjs/src}/signer/signer.js +1 -0
- package/dist/_cjs/src/signer/signer.js.map +1 -0
- package/dist/{src → _cjs/src}/signer/tx-builder.js +1 -0
- package/dist/_cjs/src/signer/tx-builder.js.map +1 -0
- package/dist/{src → _cjs/src}/signer/types.js +1 -0
- package/dist/_cjs/src/signer/types.js.map +1 -0
- package/dist/{src → _cjs/src}/token/index.js +1 -0
- package/dist/_cjs/src/token/index.js.map +1 -0
- package/dist/{src → _cjs/src}/token/nft.js +1 -0
- package/dist/_cjs/src/token/nft.js.map +1 -0
- package/dist/{src → _cjs/src}/transaction/index.js +1 -0
- package/dist/_cjs/src/transaction/index.js.map +1 -0
- package/dist/{src → _cjs/src}/transaction/sign-verify.js +1 -0
- package/dist/_cjs/src/transaction/sign-verify.js.map +1 -0
- package/dist/{src → _cjs/src}/transaction/status.js +1 -0
- package/dist/_cjs/src/transaction/status.js.map +1 -0
- package/dist/{src → _cjs/src}/transaction/utils.js +1 -0
- package/dist/_cjs/src/transaction/utils.js.map +1 -0
- package/dist/{src → _cjs/src}/utils/bs58.js +1 -0
- package/dist/_cjs/src/utils/bs58.js.map +1 -0
- package/dist/{src → _cjs/src}/utils/djb2.js +1 -0
- package/dist/_cjs/src/utils/djb2.js.map +1 -0
- package/dist/{src → _cjs/src}/utils/index.js +1 -0
- package/dist/_cjs/src/utils/index.js.map +1 -0
- package/dist/{src → _cjs/src}/utils/number.fixture.js +1 -0
- package/dist/_cjs/src/utils/number.fixture.js.map +1 -0
- package/dist/{src → _cjs/src}/utils/number.js +1 -0
- package/dist/_cjs/src/utils/number.js.map +1 -0
- package/dist/{src → _cjs/src}/utils/sign.js +1 -0
- package/dist/_cjs/src/utils/sign.js.map +1 -0
- package/dist/{src → _cjs/src}/utils/subscription.js +1 -0
- package/dist/_cjs/src/utils/subscription.js.map +1 -0
- package/dist/{src → _cjs/src}/utils/utils.js +1 -0
- package/dist/_cjs/src/utils/utils.js.map +1 -0
- package/dist/{src → _cjs/src}/utils/webcrypto.js +1 -0
- package/dist/_cjs/src/utils/webcrypto.js.map +1 -0
- package/dist/_esm/scripts/check-versions.js +40 -0
- package/dist/_esm/scripts/check-versions.js.map +1 -0
- package/dist/_esm/scripts/header.js +19 -0
- package/dist/_esm/scripts/header.js.map +1 -0
- package/dist/_esm/src/address/address.js +220 -0
- package/dist/_esm/src/address/address.js.map +1 -0
- package/dist/_esm/src/address/index.js +19 -0
- package/dist/_esm/src/address/index.js.map +1 -0
- package/dist/_esm/src/api/api-alephium.js +1519 -0
- package/dist/_esm/src/api/api-alephium.js.map +1 -0
- package/dist/_esm/src/api/api-explorer.js +964 -0
- package/dist/_esm/src/api/api-explorer.js.map +1 -0
- package/dist/_esm/src/api/explorer-provider.js +66 -0
- package/dist/_esm/src/api/explorer-provider.js.map +1 -0
- package/dist/_esm/src/api/index.js +24 -0
- package/dist/_esm/src/api/index.js.map +1 -0
- package/dist/_esm/src/api/node-provider.js +201 -0
- package/dist/_esm/src/api/node-provider.js.map +1 -0
- package/dist/_esm/src/api/types.js +211 -0
- package/dist/_esm/src/api/types.js.map +1 -0
- package/dist/_esm/src/api/utils.js +51 -0
- package/dist/_esm/src/api/utils.js.map +1 -0
- package/dist/_esm/src/block/block.js +145 -0
- package/dist/_esm/src/block/block.js.map +1 -0
- package/dist/_esm/src/block/index.js +19 -0
- package/dist/_esm/src/block/index.js.map +1 -0
- package/dist/_esm/src/codec/array-codec.js +42 -0
- package/dist/_esm/src/codec/array-codec.js.map +1 -0
- package/dist/_esm/src/codec/asset-output-codec.js +91 -0
- package/dist/_esm/src/codec/asset-output-codec.js.map +1 -0
- package/dist/_esm/src/codec/bigint-codec.js +94 -0
- package/dist/_esm/src/codec/bigint-codec.js.map +1 -0
- package/dist/_esm/src/codec/bytestring-codec.js +33 -0
- package/dist/_esm/src/codec/bytestring-codec.js.map +1 -0
- package/dist/_esm/src/codec/codec.js +131 -0
- package/dist/_esm/src/codec/codec.js.map +1 -0
- package/dist/_esm/src/codec/compact-int-codec.js +304 -0
- package/dist/_esm/src/codec/compact-int-codec.js.map +1 -0
- package/dist/_esm/src/codec/contract-codec.js +64 -0
- package/dist/_esm/src/codec/contract-codec.js.map +1 -0
- package/dist/_esm/src/codec/contract-output-codec.js +57 -0
- package/dist/_esm/src/codec/contract-output-codec.js.map +1 -0
- package/dist/_esm/src/codec/contract-output-ref-codec.js +26 -0
- package/dist/_esm/src/codec/contract-output-ref-codec.js.map +1 -0
- package/dist/_esm/src/codec/either-codec.js +22 -0
- package/dist/_esm/src/codec/either-codec.js.map +1 -0
- package/dist/_esm/src/codec/hash.js +32 -0
- package/dist/_esm/src/codec/hash.js.map +1 -0
- package/dist/_esm/src/codec/index.js +42 -0
- package/dist/_esm/src/codec/index.js.map +1 -0
- package/dist/_esm/src/codec/input-codec.js +33 -0
- package/dist/_esm/src/codec/input-codec.js.map +1 -0
- package/dist/_esm/src/codec/instr-codec.js +1067 -0
- package/dist/_esm/src/codec/instr-codec.js.map +1 -0
- package/dist/_esm/src/codec/int-as-4bytes-codec.js +29 -0
- package/dist/_esm/src/codec/int-as-4bytes-codec.js.map +1 -0
- package/dist/_esm/src/codec/lockup-script-codec.js +32 -0
- package/dist/_esm/src/codec/lockup-script-codec.js.map +1 -0
- package/dist/_esm/src/codec/method-codec.js +71 -0
- package/dist/_esm/src/codec/method-codec.js.map +1 -0
- package/dist/_esm/src/codec/option-codec.js +33 -0
- package/dist/_esm/src/codec/option-codec.js.map +1 -0
- package/dist/_esm/src/codec/output-codec.js +24 -0
- package/dist/_esm/src/codec/output-codec.js.map +1 -0
- package/dist/_esm/src/codec/reader.js +45 -0
- package/dist/_esm/src/codec/reader.js.map +1 -0
- package/dist/_esm/src/codec/script-codec.js +31 -0
- package/dist/_esm/src/codec/script-codec.js.map +1 -0
- package/dist/_esm/src/codec/signature-codec.js +22 -0
- package/dist/_esm/src/codec/signature-codec.js.map +1 -0
- package/dist/_esm/src/codec/timestamp-codec.js +36 -0
- package/dist/_esm/src/codec/timestamp-codec.js.map +1 -0
- package/dist/_esm/src/codec/token-codec.js +26 -0
- package/dist/_esm/src/codec/token-codec.js.map +1 -0
- package/dist/_esm/src/codec/transaction-codec.js +99 -0
- package/dist/_esm/src/codec/transaction-codec.js.map +1 -0
- package/dist/_esm/src/codec/unlock-script-codec.js +47 -0
- package/dist/_esm/src/codec/unlock-script-codec.js.map +1 -0
- package/dist/_esm/src/codec/unsigned-tx-codec.js +57 -0
- package/dist/_esm/src/codec/unsigned-tx-codec.js.map +1 -0
- package/dist/_esm/src/codec/val.js +31 -0
- package/dist/_esm/src/codec/val.js.map +1 -0
- package/dist/_esm/src/constants.js +31 -0
- package/dist/_esm/src/constants.js.map +1 -0
- package/dist/_esm/src/contract/contract.js +1361 -0
- package/dist/_esm/src/contract/contract.js.map +1 -0
- package/dist/_esm/src/contract/events.js +56 -0
- package/dist/_esm/src/contract/events.js.map +1 -0
- package/dist/_esm/src/contract/index.js +22 -0
- package/dist/_esm/src/contract/index.js.map +1 -0
- package/dist/_esm/src/contract/ralph.js +415 -0
- package/dist/_esm/src/contract/ralph.js.map +1 -0
- package/dist/_esm/src/contract/script-simulator.js +754 -0
- package/dist/_esm/src/contract/script-simulator.js.map +1 -0
- package/dist/_esm/src/debug.js +38 -0
- package/dist/_esm/src/debug.js.map +1 -0
- package/dist/_esm/src/error.js +33 -0
- package/dist/_esm/src/error.js.map +1 -0
- package/dist/_esm/src/exchange/exchange.js +119 -0
- package/dist/_esm/src/exchange/exchange.js.map +1 -0
- package/dist/_esm/src/exchange/index.js +19 -0
- package/dist/_esm/src/exchange/index.js.map +1 -0
- package/dist/_esm/src/global.js +48 -0
- package/dist/_esm/src/global.js.map +1 -0
- package/dist/_esm/src/index.js +36 -0
- package/dist/_esm/src/index.js.map +1 -0
- package/dist/_esm/src/signer/index.js +21 -0
- package/dist/_esm/src/signer/index.js.map +1 -0
- package/dist/_esm/src/signer/signer.js +206 -0
- package/dist/_esm/src/signer/signer.js.map +1 -0
- package/dist/_esm/src/signer/tx-builder.js +182 -0
- package/dist/_esm/src/signer/tx-builder.js.map +1 -0
- package/dist/_esm/src/signer/types.js +29 -0
- package/dist/_esm/src/signer/types.js.map +1 -0
- package/dist/_esm/src/token/index.js +19 -0
- package/dist/_esm/src/token/index.js.map +1 -0
- package/dist/_esm/src/token/nft.js +115 -0
- package/dist/_esm/src/token/nft.js.map +1 -0
- package/dist/_esm/src/transaction/index.js +21 -0
- package/dist/_esm/src/transaction/index.js.map +1 -0
- package/dist/_esm/src/transaction/sign-verify.js +25 -0
- package/dist/_esm/src/transaction/sign-verify.js.map +1 -0
- package/dist/_esm/src/transaction/status.js +50 -0
- package/dist/_esm/src/transaction/status.js.map +1 -0
- package/dist/_esm/src/transaction/utils.js +52 -0
- package/dist/_esm/src/transaction/utils.js.map +1 -0
- package/dist/_esm/src/utils/bs58.js +43 -0
- package/dist/_esm/src/utils/bs58.js.map +1 -0
- package/dist/_esm/src/utils/djb2.js +25 -0
- package/dist/_esm/src/utils/djb2.js.map +1 -0
- package/dist/_esm/src/utils/index.js +25 -0
- package/dist/_esm/src/utils/index.js.map +1 -0
- package/dist/_esm/src/utils/number.fixture.js +187 -0
- package/dist/_esm/src/utils/number.fixture.js.map +1 -0
- package/dist/_esm/src/utils/number.js +139 -0
- package/dist/_esm/src/utils/number.js.map +1 -0
- package/dist/_esm/src/utils/sign.js +62 -0
- package/dist/_esm/src/utils/sign.js.map +1 -0
- package/dist/_esm/src/utils/subscription.js +48 -0
- package/dist/_esm/src/utils/subscription.js.map +1 -0
- package/dist/_esm/src/utils/utils.js +144 -0
- package/dist/_esm/src/utils/utils.js.map +1 -0
- package/dist/_esm/src/utils/webcrypto.js +38 -0
- package/dist/_esm/src/utils/webcrypto.js.map +1 -0
- package/dist/_types/scripts/check-versions.d.ts +2 -0
- package/dist/_types/scripts/check-versions.d.ts.map +1 -0
- package/dist/_types/scripts/header.d.ts +1 -0
- package/dist/_types/scripts/header.d.ts.map +1 -0
- package/dist/{src → _types/src}/address/address.d.ts +1 -0
- package/dist/_types/src/address/address.d.ts.map +1 -0
- package/dist/_types/src/address/index.d.ts +2 -0
- package/dist/_types/src/address/index.d.ts.map +1 -0
- package/dist/{src → _types/src}/api/api-alephium.d.ts +1 -0
- package/dist/_types/src/api/api-alephium.d.ts.map +1 -0
- package/dist/{src → _types/src}/api/api-explorer.d.ts +1 -0
- package/dist/_types/src/api/api-explorer.d.ts.map +1 -0
- package/dist/{src → _types/src}/api/explorer-provider.d.ts +1 -0
- package/dist/_types/src/api/explorer-provider.d.ts.map +1 -0
- package/dist/{src → _types/src}/api/index.d.ts +1 -0
- package/dist/_types/src/api/index.d.ts.map +1 -0
- package/dist/{src → _types/src}/api/node-provider.d.ts +1 -0
- package/dist/_types/src/api/node-provider.d.ts.map +1 -0
- package/dist/{src → _types/src}/api/types.d.ts +1 -0
- package/dist/_types/src/api/types.d.ts.map +1 -0
- package/dist/{src → _types/src}/api/utils.d.ts +1 -0
- package/dist/_types/src/api/utils.d.ts.map +1 -0
- package/dist/{src → _types/src}/block/block.d.ts +1 -0
- package/dist/_types/src/block/block.d.ts.map +1 -0
- package/dist/{src → _types/src}/block/index.d.ts +1 -0
- package/dist/_types/src/block/index.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/array-codec.d.ts +1 -0
- package/dist/_types/src/codec/array-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/asset-output-codec.d.ts +1 -0
- package/dist/_types/src/codec/asset-output-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/bigint-codec.d.ts +1 -0
- package/dist/_types/src/codec/bigint-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/bytestring-codec.d.ts +1 -0
- package/dist/_types/src/codec/bytestring-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/codec.d.ts +1 -0
- package/dist/_types/src/codec/codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/compact-int-codec.d.ts +1 -0
- package/dist/_types/src/codec/compact-int-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/contract-codec.d.ts +1 -0
- package/dist/_types/src/codec/contract-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/contract-output-codec.d.ts +1 -0
- package/dist/_types/src/codec/contract-output-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/contract-output-ref-codec.d.ts +1 -0
- package/dist/_types/src/codec/contract-output-ref-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/either-codec.d.ts +1 -0
- package/dist/_types/src/codec/either-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/hash.d.ts +1 -0
- package/dist/_types/src/codec/hash.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/index.d.ts +1 -0
- package/dist/_types/src/codec/index.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/input-codec.d.ts +1 -0
- package/dist/_types/src/codec/input-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/instr-codec.d.ts +1 -0
- package/dist/_types/src/codec/instr-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/int-as-4bytes-codec.d.ts +1 -0
- package/dist/_types/src/codec/int-as-4bytes-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/lockup-script-codec.d.ts +1 -0
- package/dist/_types/src/codec/lockup-script-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/method-codec.d.ts +1 -0
- package/dist/_types/src/codec/method-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/option-codec.d.ts +1 -0
- package/dist/_types/src/codec/option-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/output-codec.d.ts +1 -0
- package/dist/_types/src/codec/output-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/reader.d.ts +1 -0
- package/dist/_types/src/codec/reader.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/script-codec.d.ts +1 -0
- package/dist/_types/src/codec/script-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/signature-codec.d.ts +1 -0
- package/dist/_types/src/codec/signature-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/timestamp-codec.d.ts +1 -0
- package/dist/_types/src/codec/timestamp-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/token-codec.d.ts +1 -0
- package/dist/_types/src/codec/token-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/transaction-codec.d.ts +1 -0
- package/dist/_types/src/codec/transaction-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/unlock-script-codec.d.ts +1 -0
- package/dist/_types/src/codec/unlock-script-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/unsigned-tx-codec.d.ts +1 -0
- package/dist/_types/src/codec/unsigned-tx-codec.d.ts.map +1 -0
- package/dist/{src → _types/src}/codec/val.d.ts +1 -0
- package/dist/_types/src/codec/val.d.ts.map +1 -0
- package/dist/{src → _types/src}/constants.d.ts +1 -0
- package/dist/_types/src/constants.d.ts.map +1 -0
- package/dist/{src → _types/src}/contract/contract.d.ts +1 -0
- package/dist/_types/src/contract/contract.d.ts.map +1 -0
- package/dist/{src → _types/src}/contract/events.d.ts +1 -0
- package/dist/_types/src/contract/events.d.ts.map +1 -0
- package/dist/{src → _types/src}/contract/index.d.ts +1 -0
- package/dist/_types/src/contract/index.d.ts.map +1 -0
- package/dist/{src → _types/src}/contract/ralph.d.ts +1 -0
- package/dist/_types/src/contract/ralph.d.ts.map +1 -0
- package/dist/{src → _types/src}/contract/script-simulator.d.ts +1 -0
- package/dist/_types/src/contract/script-simulator.d.ts.map +1 -0
- package/dist/{src → _types/src}/debug.d.ts +1 -0
- package/dist/_types/src/debug.d.ts.map +1 -0
- package/dist/{src → _types/src}/error.d.ts +1 -0
- package/dist/_types/src/error.d.ts.map +1 -0
- package/dist/{src → _types/src}/exchange/exchange.d.ts +1 -0
- package/dist/_types/src/exchange/exchange.d.ts.map +1 -0
- package/dist/{src → _types/src}/exchange/index.d.ts +1 -0
- package/dist/_types/src/exchange/index.d.ts.map +1 -0
- package/dist/{src → _types/src}/global.d.ts +1 -0
- package/dist/_types/src/global.d.ts.map +1 -0
- package/dist/{src → _types/src}/index.d.ts +1 -0
- package/dist/_types/src/index.d.ts.map +1 -0
- package/dist/{src → _types/src}/signer/index.d.ts +1 -0
- package/dist/_types/src/signer/index.d.ts.map +1 -0
- package/dist/{src → _types/src}/signer/signer.d.ts +1 -0
- package/dist/_types/src/signer/signer.d.ts.map +1 -0
- package/dist/{src → _types/src}/signer/tx-builder.d.ts +1 -0
- package/dist/_types/src/signer/tx-builder.d.ts.map +1 -0
- package/dist/{src → _types/src}/signer/types.d.ts +1 -0
- package/dist/_types/src/signer/types.d.ts.map +1 -0
- package/dist/_types/src/token/index.d.ts +2 -0
- package/dist/_types/src/token/index.d.ts.map +1 -0
- package/dist/{src → _types/src}/token/nft.d.ts +1 -0
- package/dist/_types/src/token/nft.d.ts.map +1 -0
- package/dist/{src → _types/src}/transaction/index.d.ts +1 -0
- package/dist/_types/src/transaction/index.d.ts.map +1 -0
- package/dist/{src → _types/src}/transaction/sign-verify.d.ts +1 -0
- package/dist/_types/src/transaction/sign-verify.d.ts.map +1 -0
- package/dist/{src → _types/src}/transaction/status.d.ts +1 -0
- package/dist/_types/src/transaction/status.d.ts.map +1 -0
- package/dist/{src → _types/src}/transaction/utils.d.ts +1 -0
- package/dist/_types/src/transaction/utils.d.ts.map +1 -0
- package/dist/{src → _types/src}/utils/bs58.d.ts +1 -0
- package/dist/_types/src/utils/bs58.d.ts.map +1 -0
- package/dist/{src → _types/src}/utils/djb2.d.ts +1 -0
- package/dist/_types/src/utils/djb2.d.ts.map +1 -0
- package/dist/{src → _types/src}/utils/index.d.ts +1 -0
- package/dist/_types/src/utils/index.d.ts.map +1 -0
- package/dist/{src → _types/src}/utils/number.d.ts +1 -0
- package/dist/_types/src/utils/number.d.ts.map +1 -0
- package/dist/{src → _types/src}/utils/number.fixture.d.ts +1 -0
- package/dist/_types/src/utils/number.fixture.d.ts.map +1 -0
- package/dist/{src → _types/src}/utils/sign.d.ts +1 -0
- package/dist/_types/src/utils/sign.d.ts.map +1 -0
- package/dist/{src → _types/src}/utils/subscription.d.ts +1 -0
- package/dist/_types/src/utils/subscription.d.ts.map +1 -0
- package/dist/{src → _types/src}/utils/utils.d.ts +1 -0
- package/dist/_types/src/utils/utils.d.ts.map +1 -0
- package/dist/{src → _types/src}/utils/webcrypto.d.ts +1 -0
- package/dist/_types/src/utils/webcrypto.d.ts.map +1 -0
- package/dist/_umd/alephium-web3.min.js +2 -0
- package/dist/_umd/alephium-web3.min.js.map +1 -0
- package/package.json +21 -23
- package/{webpack.config.js → webpack.config.cjs} +2 -2
- 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/header.d.ts +0 -0
- package/dist/src/address/index.d.ts +0 -1
- package/dist/src/token/index.d.ts +0 -1
|
@@ -0,0 +1,1519 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/*
|
|
4
|
+
* ---------------------------------------------------------------
|
|
5
|
+
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
6
|
+
* ## ##
|
|
7
|
+
* ## AUTHOR: acacode ##
|
|
8
|
+
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
9
|
+
* ---------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import 'cross-fetch/polyfill';
|
|
12
|
+
import { convertHttpResponse } from './utils';
|
|
13
|
+
export var ContentType;
|
|
14
|
+
(function (ContentType) {
|
|
15
|
+
ContentType["Json"] = "application/json";
|
|
16
|
+
ContentType["FormData"] = "multipart/form-data";
|
|
17
|
+
ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
|
|
18
|
+
ContentType["Text"] = "text/plain";
|
|
19
|
+
})(ContentType || (ContentType = {}));
|
|
20
|
+
export class HttpClient {
|
|
21
|
+
constructor(apiConfig = {}) {
|
|
22
|
+
this.baseUrl = '../';
|
|
23
|
+
this.securityData = null;
|
|
24
|
+
this.abortControllers = new Map();
|
|
25
|
+
this.customFetch = (...fetchParams) => fetch(...fetchParams);
|
|
26
|
+
this.baseApiParams = {
|
|
27
|
+
credentials: 'same-origin',
|
|
28
|
+
headers: {},
|
|
29
|
+
redirect: 'follow',
|
|
30
|
+
referrerPolicy: 'no-referrer'
|
|
31
|
+
};
|
|
32
|
+
this.setSecurityData = (data) => {
|
|
33
|
+
this.securityData = data;
|
|
34
|
+
};
|
|
35
|
+
this.contentFormatters = {
|
|
36
|
+
[ContentType.Json]: (input) => input !== null && (typeof input === 'object' || typeof input === 'string') ? JSON.stringify(input) : input,
|
|
37
|
+
[ContentType.Text]: (input) => (input !== null && typeof input !== 'string' ? JSON.stringify(input) : input),
|
|
38
|
+
[ContentType.FormData]: (input) => Object.keys(input || {}).reduce((formData, key) => {
|
|
39
|
+
const property = input[key];
|
|
40
|
+
formData.append(key, property instanceof Blob
|
|
41
|
+
? property
|
|
42
|
+
: typeof property === 'object' && property !== null
|
|
43
|
+
? JSON.stringify(property)
|
|
44
|
+
: `${property}`);
|
|
45
|
+
return formData;
|
|
46
|
+
}, new FormData()),
|
|
47
|
+
[ContentType.UrlEncoded]: (input) => this.toQueryString(input)
|
|
48
|
+
};
|
|
49
|
+
this.createAbortSignal = (cancelToken) => {
|
|
50
|
+
if (this.abortControllers.has(cancelToken)) {
|
|
51
|
+
const abortController = this.abortControllers.get(cancelToken);
|
|
52
|
+
if (abortController) {
|
|
53
|
+
return abortController.signal;
|
|
54
|
+
}
|
|
55
|
+
return void 0;
|
|
56
|
+
}
|
|
57
|
+
const abortController = new AbortController();
|
|
58
|
+
this.abortControllers.set(cancelToken, abortController);
|
|
59
|
+
return abortController.signal;
|
|
60
|
+
};
|
|
61
|
+
this.abortRequest = (cancelToken) => {
|
|
62
|
+
const abortController = this.abortControllers.get(cancelToken);
|
|
63
|
+
if (abortController) {
|
|
64
|
+
abortController.abort();
|
|
65
|
+
this.abortControllers.delete(cancelToken);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
this.request = async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }) => {
|
|
69
|
+
const secureParams = ((typeof secure === 'boolean' ? secure : this.baseApiParams.secure) &&
|
|
70
|
+
this.securityWorker &&
|
|
71
|
+
(await this.securityWorker(this.securityData))) ||
|
|
72
|
+
{};
|
|
73
|
+
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
74
|
+
const queryString = query && this.toQueryString(query);
|
|
75
|
+
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
|
|
76
|
+
const responseFormat = format || requestParams.format;
|
|
77
|
+
return this.customFetch(`${baseUrl || this.baseUrl || ''}${path}${queryString ? `?${queryString}` : ''}`, {
|
|
78
|
+
...requestParams,
|
|
79
|
+
headers: {
|
|
80
|
+
...(requestParams.headers || {}),
|
|
81
|
+
...(type && type !== ContentType.FormData ? { 'Content-Type': type } : {})
|
|
82
|
+
},
|
|
83
|
+
signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal,
|
|
84
|
+
body: typeof body === 'undefined' || body === null ? null : payloadFormatter(body)
|
|
85
|
+
}).then(async (response) => {
|
|
86
|
+
const r = response;
|
|
87
|
+
r.data = null;
|
|
88
|
+
r.error = null;
|
|
89
|
+
const data = !responseFormat
|
|
90
|
+
? r
|
|
91
|
+
: await response[responseFormat]()
|
|
92
|
+
.then((data) => {
|
|
93
|
+
if (r.ok) {
|
|
94
|
+
r.data = data;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
r.error = data;
|
|
98
|
+
}
|
|
99
|
+
return r;
|
|
100
|
+
})
|
|
101
|
+
.catch((e) => {
|
|
102
|
+
r.error = e;
|
|
103
|
+
return r;
|
|
104
|
+
});
|
|
105
|
+
if (cancelToken) {
|
|
106
|
+
this.abortControllers.delete(cancelToken);
|
|
107
|
+
}
|
|
108
|
+
return data;
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
Object.assign(this, apiConfig);
|
|
112
|
+
}
|
|
113
|
+
encodeQueryParam(key, value) {
|
|
114
|
+
const encodedKey = encodeURIComponent(key);
|
|
115
|
+
return `${encodedKey}=${encodeURIComponent(typeof value === 'number' ? value : `${value}`)}`;
|
|
116
|
+
}
|
|
117
|
+
addQueryParam(query, key) {
|
|
118
|
+
return this.encodeQueryParam(key, query[key]);
|
|
119
|
+
}
|
|
120
|
+
addArrayQueryParam(query, key) {
|
|
121
|
+
const value = query[key];
|
|
122
|
+
return value.map((v) => this.encodeQueryParam(key, v)).join('&');
|
|
123
|
+
}
|
|
124
|
+
toQueryString(rawQuery) {
|
|
125
|
+
const query = rawQuery || {};
|
|
126
|
+
const keys = Object.keys(query).filter((key) => 'undefined' !== typeof query[key]);
|
|
127
|
+
return keys
|
|
128
|
+
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
|
|
129
|
+
.join('&');
|
|
130
|
+
}
|
|
131
|
+
addQueryParams(rawQuery) {
|
|
132
|
+
const queryString = this.toQueryString(rawQuery);
|
|
133
|
+
return queryString ? `?${queryString}` : '';
|
|
134
|
+
}
|
|
135
|
+
mergeRequestParams(params1, params2) {
|
|
136
|
+
return {
|
|
137
|
+
...this.baseApiParams,
|
|
138
|
+
...params1,
|
|
139
|
+
...(params2 || {}),
|
|
140
|
+
headers: {
|
|
141
|
+
...(this.baseApiParams.headers || {}),
|
|
142
|
+
...(params1.headers || {}),
|
|
143
|
+
...((params2 && params2.headers) || {})
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* @title Alephium API
|
|
150
|
+
* @version 3.8.1
|
|
151
|
+
* @baseUrl ../
|
|
152
|
+
*/
|
|
153
|
+
export class Api extends HttpClient {
|
|
154
|
+
constructor() {
|
|
155
|
+
super(...arguments);
|
|
156
|
+
this.wallets = {
|
|
157
|
+
/**
|
|
158
|
+
* No description
|
|
159
|
+
*
|
|
160
|
+
* @tags Wallets
|
|
161
|
+
* @name GetWallets
|
|
162
|
+
* @summary List available wallets
|
|
163
|
+
* @request GET:/wallets
|
|
164
|
+
*/
|
|
165
|
+
getWallets: (params = {}) => this.request({
|
|
166
|
+
path: `/wallets`,
|
|
167
|
+
method: 'GET',
|
|
168
|
+
format: 'json',
|
|
169
|
+
...params
|
|
170
|
+
}).then(convertHttpResponse),
|
|
171
|
+
/**
|
|
172
|
+
* No description
|
|
173
|
+
*
|
|
174
|
+
* @tags Wallets
|
|
175
|
+
* @name PutWallets
|
|
176
|
+
* @summary Restore a wallet from your mnemonic
|
|
177
|
+
* @request PUT:/wallets
|
|
178
|
+
*/
|
|
179
|
+
putWallets: (data, params = {}) => this.request({
|
|
180
|
+
path: `/wallets`,
|
|
181
|
+
method: 'PUT',
|
|
182
|
+
body: data,
|
|
183
|
+
type: ContentType.Json,
|
|
184
|
+
format: 'json',
|
|
185
|
+
...params
|
|
186
|
+
}).then(convertHttpResponse),
|
|
187
|
+
/**
|
|
188
|
+
* @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).
|
|
189
|
+
*
|
|
190
|
+
* @tags Wallets
|
|
191
|
+
* @name PostWallets
|
|
192
|
+
* @summary Create a new wallet
|
|
193
|
+
* @request POST:/wallets
|
|
194
|
+
*/
|
|
195
|
+
postWallets: (data, params = {}) => this.request({
|
|
196
|
+
path: `/wallets`,
|
|
197
|
+
method: 'POST',
|
|
198
|
+
body: data,
|
|
199
|
+
type: ContentType.Json,
|
|
200
|
+
format: 'json',
|
|
201
|
+
...params
|
|
202
|
+
}).then(convertHttpResponse),
|
|
203
|
+
/**
|
|
204
|
+
* No description
|
|
205
|
+
*
|
|
206
|
+
* @tags Wallets
|
|
207
|
+
* @name GetWalletsWalletName
|
|
208
|
+
* @summary Get wallet's status
|
|
209
|
+
* @request GET:/wallets/{wallet_name}
|
|
210
|
+
*/
|
|
211
|
+
getWalletsWalletName: (walletName, params = {}) => this.request({
|
|
212
|
+
path: `/wallets/${walletName}`,
|
|
213
|
+
method: 'GET',
|
|
214
|
+
format: 'json',
|
|
215
|
+
...params
|
|
216
|
+
}).then(convertHttpResponse),
|
|
217
|
+
/**
|
|
218
|
+
* No description
|
|
219
|
+
*
|
|
220
|
+
* @tags Wallets
|
|
221
|
+
* @name DeleteWalletsWalletName
|
|
222
|
+
* @summary Delete your wallet file (can be recovered with your mnemonic)
|
|
223
|
+
* @request DELETE:/wallets/{wallet_name}
|
|
224
|
+
*/
|
|
225
|
+
deleteWalletsWalletName: (walletName, data, params = {}) => this.request({
|
|
226
|
+
path: `/wallets/${walletName}`,
|
|
227
|
+
method: 'DELETE',
|
|
228
|
+
body: data,
|
|
229
|
+
type: ContentType.Json,
|
|
230
|
+
...params
|
|
231
|
+
}).then(convertHttpResponse),
|
|
232
|
+
/**
|
|
233
|
+
* No description
|
|
234
|
+
*
|
|
235
|
+
* @tags Wallets
|
|
236
|
+
* @name PostWalletsWalletNameLock
|
|
237
|
+
* @summary Lock your wallet
|
|
238
|
+
* @request POST:/wallets/{wallet_name}/lock
|
|
239
|
+
*/
|
|
240
|
+
postWalletsWalletNameLock: (walletName, params = {}) => this.request({
|
|
241
|
+
path: `/wallets/${walletName}/lock`,
|
|
242
|
+
method: 'POST',
|
|
243
|
+
...params
|
|
244
|
+
}).then(convertHttpResponse),
|
|
245
|
+
/**
|
|
246
|
+
* No description
|
|
247
|
+
*
|
|
248
|
+
* @tags Wallets
|
|
249
|
+
* @name PostWalletsWalletNameUnlock
|
|
250
|
+
* @summary Unlock your wallet
|
|
251
|
+
* @request POST:/wallets/{wallet_name}/unlock
|
|
252
|
+
*/
|
|
253
|
+
postWalletsWalletNameUnlock: (walletName, data, params = {}) => this.request({
|
|
254
|
+
path: `/wallets/${walletName}/unlock`,
|
|
255
|
+
method: 'POST',
|
|
256
|
+
body: data,
|
|
257
|
+
type: ContentType.Json,
|
|
258
|
+
...params
|
|
259
|
+
}).then(convertHttpResponse),
|
|
260
|
+
/**
|
|
261
|
+
* No description
|
|
262
|
+
*
|
|
263
|
+
* @tags Wallets
|
|
264
|
+
* @name GetWalletsWalletNameBalances
|
|
265
|
+
* @summary Get your total balance
|
|
266
|
+
* @request GET:/wallets/{wallet_name}/balances
|
|
267
|
+
*/
|
|
268
|
+
getWalletsWalletNameBalances: (walletName, params = {}) => this.request({
|
|
269
|
+
path: `/wallets/${walletName}/balances`,
|
|
270
|
+
method: 'GET',
|
|
271
|
+
format: 'json',
|
|
272
|
+
...params
|
|
273
|
+
}).then(convertHttpResponse),
|
|
274
|
+
/**
|
|
275
|
+
* No description
|
|
276
|
+
*
|
|
277
|
+
* @tags Wallets
|
|
278
|
+
* @name PostWalletsWalletNameRevealMnemonic
|
|
279
|
+
* @summary Reveal your mnemonic. !!! use it with caution !!!
|
|
280
|
+
* @request POST:/wallets/{wallet_name}/reveal-mnemonic
|
|
281
|
+
*/
|
|
282
|
+
postWalletsWalletNameRevealMnemonic: (walletName, data, params = {}) => this.request({
|
|
283
|
+
path: `/wallets/${walletName}/reveal-mnemonic`,
|
|
284
|
+
method: 'POST',
|
|
285
|
+
body: data,
|
|
286
|
+
type: ContentType.Json,
|
|
287
|
+
format: 'json',
|
|
288
|
+
...params
|
|
289
|
+
}).then(convertHttpResponse),
|
|
290
|
+
/**
|
|
291
|
+
* No description
|
|
292
|
+
*
|
|
293
|
+
* @tags Wallets
|
|
294
|
+
* @name PostWalletsWalletNameTransfer
|
|
295
|
+
* @summary Transfer ALPH from the active address
|
|
296
|
+
* @request POST:/wallets/{wallet_name}/transfer
|
|
297
|
+
*/
|
|
298
|
+
postWalletsWalletNameTransfer: (walletName, data, params = {}) => this.request({
|
|
299
|
+
path: `/wallets/${walletName}/transfer`,
|
|
300
|
+
method: 'POST',
|
|
301
|
+
body: data,
|
|
302
|
+
type: ContentType.Json,
|
|
303
|
+
format: 'json',
|
|
304
|
+
...params
|
|
305
|
+
}).then(convertHttpResponse),
|
|
306
|
+
/**
|
|
307
|
+
* No description
|
|
308
|
+
*
|
|
309
|
+
* @tags Wallets
|
|
310
|
+
* @name PostWalletsWalletNameSweepActiveAddress
|
|
311
|
+
* @summary Transfer all unlocked ALPH from the active address to another address
|
|
312
|
+
* @request POST:/wallets/{wallet_name}/sweep-active-address
|
|
313
|
+
*/
|
|
314
|
+
postWalletsWalletNameSweepActiveAddress: (walletName, data, params = {}) => this.request({
|
|
315
|
+
path: `/wallets/${walletName}/sweep-active-address`,
|
|
316
|
+
method: 'POST',
|
|
317
|
+
body: data,
|
|
318
|
+
type: ContentType.Json,
|
|
319
|
+
format: 'json',
|
|
320
|
+
...params
|
|
321
|
+
}).then(convertHttpResponse),
|
|
322
|
+
/**
|
|
323
|
+
* No description
|
|
324
|
+
*
|
|
325
|
+
* @tags Wallets
|
|
326
|
+
* @name PostWalletsWalletNameSweepAllAddresses
|
|
327
|
+
* @summary Transfer unlocked ALPH from all addresses (including all mining addresses if applicable) to another address
|
|
328
|
+
* @request POST:/wallets/{wallet_name}/sweep-all-addresses
|
|
329
|
+
*/
|
|
330
|
+
postWalletsWalletNameSweepAllAddresses: (walletName, data, params = {}) => this.request({
|
|
331
|
+
path: `/wallets/${walletName}/sweep-all-addresses`,
|
|
332
|
+
method: 'POST',
|
|
333
|
+
body: data,
|
|
334
|
+
type: ContentType.Json,
|
|
335
|
+
format: 'json',
|
|
336
|
+
...params
|
|
337
|
+
}).then(convertHttpResponse),
|
|
338
|
+
/**
|
|
339
|
+
* No description
|
|
340
|
+
*
|
|
341
|
+
* @tags Wallets
|
|
342
|
+
* @name PostWalletsWalletNameSign
|
|
343
|
+
* @summary Sign the given data and return back the signature
|
|
344
|
+
* @request POST:/wallets/{wallet_name}/sign
|
|
345
|
+
*/
|
|
346
|
+
postWalletsWalletNameSign: (walletName, data, params = {}) => this.request({
|
|
347
|
+
path: `/wallets/${walletName}/sign`,
|
|
348
|
+
method: 'POST',
|
|
349
|
+
body: data,
|
|
350
|
+
type: ContentType.Json,
|
|
351
|
+
format: 'json',
|
|
352
|
+
...params
|
|
353
|
+
}).then(convertHttpResponse),
|
|
354
|
+
/**
|
|
355
|
+
* No description
|
|
356
|
+
*
|
|
357
|
+
* @tags Wallets
|
|
358
|
+
* @name GetWalletsWalletNameAddresses
|
|
359
|
+
* @summary List all your wallet's addresses
|
|
360
|
+
* @request GET:/wallets/{wallet_name}/addresses
|
|
361
|
+
*/
|
|
362
|
+
getWalletsWalletNameAddresses: (walletName, params = {}) => this.request({
|
|
363
|
+
path: `/wallets/${walletName}/addresses`,
|
|
364
|
+
method: 'GET',
|
|
365
|
+
format: 'json',
|
|
366
|
+
...params
|
|
367
|
+
}).then(convertHttpResponse),
|
|
368
|
+
/**
|
|
369
|
+
* No description
|
|
370
|
+
*
|
|
371
|
+
* @tags Wallets
|
|
372
|
+
* @name GetWalletsWalletNameAddressesAddress
|
|
373
|
+
* @summary Get address' info
|
|
374
|
+
* @request GET:/wallets/{wallet_name}/addresses/{address}
|
|
375
|
+
*/
|
|
376
|
+
getWalletsWalletNameAddressesAddress: (walletName, address, params = {}) => this.request({
|
|
377
|
+
path: `/wallets/${walletName}/addresses/${address}`,
|
|
378
|
+
method: 'GET',
|
|
379
|
+
format: 'json',
|
|
380
|
+
...params
|
|
381
|
+
}).then(convertHttpResponse),
|
|
382
|
+
/**
|
|
383
|
+
* @description This endpoint can only be called if the wallet was created with the `isMiner = true` flag
|
|
384
|
+
*
|
|
385
|
+
* @tags Miners
|
|
386
|
+
* @name GetWalletsWalletNameMinerAddresses
|
|
387
|
+
* @summary List all miner addresses per group
|
|
388
|
+
* @request GET:/wallets/{wallet_name}/miner-addresses
|
|
389
|
+
*/
|
|
390
|
+
getWalletsWalletNameMinerAddresses: (walletName, params = {}) => this.request({
|
|
391
|
+
path: `/wallets/${walletName}/miner-addresses`,
|
|
392
|
+
method: 'GET',
|
|
393
|
+
format: 'json',
|
|
394
|
+
...params
|
|
395
|
+
}).then(convertHttpResponse),
|
|
396
|
+
/**
|
|
397
|
+
* @description Cannot be called from a miner wallet
|
|
398
|
+
*
|
|
399
|
+
* @tags Wallets
|
|
400
|
+
* @name PostWalletsWalletNameDeriveNextAddress
|
|
401
|
+
* @summary Derive your next address
|
|
402
|
+
* @request POST:/wallets/{wallet_name}/derive-next-address
|
|
403
|
+
*/
|
|
404
|
+
postWalletsWalletNameDeriveNextAddress: (walletName, query, params = {}) => this.request({
|
|
405
|
+
path: `/wallets/${walletName}/derive-next-address`,
|
|
406
|
+
method: 'POST',
|
|
407
|
+
query: query,
|
|
408
|
+
format: 'json',
|
|
409
|
+
...params
|
|
410
|
+
}).then(convertHttpResponse),
|
|
411
|
+
/**
|
|
412
|
+
* @description Your wallet need to have been created with the miner flag set to true
|
|
413
|
+
*
|
|
414
|
+
* @tags Miners
|
|
415
|
+
* @name PostWalletsWalletNameDeriveNextMinerAddresses
|
|
416
|
+
* @summary Derive your next miner addresses for each group
|
|
417
|
+
* @request POST:/wallets/{wallet_name}/derive-next-miner-addresses
|
|
418
|
+
*/
|
|
419
|
+
postWalletsWalletNameDeriveNextMinerAddresses: (walletName, params = {}) => this.request({
|
|
420
|
+
path: `/wallets/${walletName}/derive-next-miner-addresses`,
|
|
421
|
+
method: 'POST',
|
|
422
|
+
format: 'json',
|
|
423
|
+
...params
|
|
424
|
+
}).then(convertHttpResponse),
|
|
425
|
+
/**
|
|
426
|
+
* No description
|
|
427
|
+
*
|
|
428
|
+
* @tags Wallets
|
|
429
|
+
* @name PostWalletsWalletNameChangeActiveAddress
|
|
430
|
+
* @summary Choose the active address
|
|
431
|
+
* @request POST:/wallets/{wallet_name}/change-active-address
|
|
432
|
+
*/
|
|
433
|
+
postWalletsWalletNameChangeActiveAddress: (walletName, data, params = {}) => this.request({
|
|
434
|
+
path: `/wallets/${walletName}/change-active-address`,
|
|
435
|
+
method: 'POST',
|
|
436
|
+
body: data,
|
|
437
|
+
type: ContentType.Json,
|
|
438
|
+
...params
|
|
439
|
+
}).then(convertHttpResponse)
|
|
440
|
+
};
|
|
441
|
+
this.infos = {
|
|
442
|
+
/**
|
|
443
|
+
* No description
|
|
444
|
+
*
|
|
445
|
+
* @tags Infos
|
|
446
|
+
* @name GetInfosNode
|
|
447
|
+
* @summary Get info about that node
|
|
448
|
+
* @request GET:/infos/node
|
|
449
|
+
*/
|
|
450
|
+
getInfosNode: (params = {}) => this.request({
|
|
451
|
+
path: `/infos/node`,
|
|
452
|
+
method: 'GET',
|
|
453
|
+
format: 'json',
|
|
454
|
+
...params
|
|
455
|
+
}).then(convertHttpResponse),
|
|
456
|
+
/**
|
|
457
|
+
* No description
|
|
458
|
+
*
|
|
459
|
+
* @tags Infos
|
|
460
|
+
* @name GetInfosVersion
|
|
461
|
+
* @summary Get version about that node
|
|
462
|
+
* @request GET:/infos/version
|
|
463
|
+
*/
|
|
464
|
+
getInfosVersion: (params = {}) => this.request({
|
|
465
|
+
path: `/infos/version`,
|
|
466
|
+
method: 'GET',
|
|
467
|
+
format: 'json',
|
|
468
|
+
...params
|
|
469
|
+
}).then(convertHttpResponse),
|
|
470
|
+
/**
|
|
471
|
+
* No description
|
|
472
|
+
*
|
|
473
|
+
* @tags Infos
|
|
474
|
+
* @name GetInfosChainParams
|
|
475
|
+
* @summary Get key params about your blockchain
|
|
476
|
+
* @request GET:/infos/chain-params
|
|
477
|
+
*/
|
|
478
|
+
getInfosChainParams: (params = {}) => this.request({
|
|
479
|
+
path: `/infos/chain-params`,
|
|
480
|
+
method: 'GET',
|
|
481
|
+
format: 'json',
|
|
482
|
+
...params
|
|
483
|
+
}).then(convertHttpResponse),
|
|
484
|
+
/**
|
|
485
|
+
* No description
|
|
486
|
+
*
|
|
487
|
+
* @tags Infos
|
|
488
|
+
* @name GetInfosSelfClique
|
|
489
|
+
* @summary Get info about your own clique
|
|
490
|
+
* @request GET:/infos/self-clique
|
|
491
|
+
*/
|
|
492
|
+
getInfosSelfClique: (params = {}) => this.request({
|
|
493
|
+
path: `/infos/self-clique`,
|
|
494
|
+
method: 'GET',
|
|
495
|
+
format: 'json',
|
|
496
|
+
...params
|
|
497
|
+
}).then(convertHttpResponse),
|
|
498
|
+
/**
|
|
499
|
+
* No description
|
|
500
|
+
*
|
|
501
|
+
* @tags Infos
|
|
502
|
+
* @name GetInfosInterCliquePeerInfo
|
|
503
|
+
* @summary Get infos about the inter cliques
|
|
504
|
+
* @request GET:/infos/inter-clique-peer-info
|
|
505
|
+
*/
|
|
506
|
+
getInfosInterCliquePeerInfo: (params = {}) => this.request({
|
|
507
|
+
path: `/infos/inter-clique-peer-info`,
|
|
508
|
+
method: 'GET',
|
|
509
|
+
format: 'json',
|
|
510
|
+
...params
|
|
511
|
+
}).then(convertHttpResponse),
|
|
512
|
+
/**
|
|
513
|
+
* No description
|
|
514
|
+
*
|
|
515
|
+
* @tags Infos
|
|
516
|
+
* @name GetInfosDiscoveredNeighbors
|
|
517
|
+
* @summary Get discovered neighbors
|
|
518
|
+
* @request GET:/infos/discovered-neighbors
|
|
519
|
+
*/
|
|
520
|
+
getInfosDiscoveredNeighbors: (params = {}) => this.request({
|
|
521
|
+
path: `/infos/discovered-neighbors`,
|
|
522
|
+
method: 'GET',
|
|
523
|
+
format: 'json',
|
|
524
|
+
...params
|
|
525
|
+
}).then(convertHttpResponse),
|
|
526
|
+
/**
|
|
527
|
+
* No description
|
|
528
|
+
*
|
|
529
|
+
* @tags Infos
|
|
530
|
+
* @name GetInfosMisbehaviors
|
|
531
|
+
* @summary Get the misbehaviors of peers
|
|
532
|
+
* @request GET:/infos/misbehaviors
|
|
533
|
+
*/
|
|
534
|
+
getInfosMisbehaviors: (params = {}) => this.request({
|
|
535
|
+
path: `/infos/misbehaviors`,
|
|
536
|
+
method: 'GET',
|
|
537
|
+
format: 'json',
|
|
538
|
+
...params
|
|
539
|
+
}).then(convertHttpResponse),
|
|
540
|
+
/**
|
|
541
|
+
* No description
|
|
542
|
+
*
|
|
543
|
+
* @tags Infos
|
|
544
|
+
* @name PostInfosMisbehaviors
|
|
545
|
+
* @summary Ban/Unban given peers
|
|
546
|
+
* @request POST:/infos/misbehaviors
|
|
547
|
+
*/
|
|
548
|
+
postInfosMisbehaviors: (data, params = {}) => this.request({
|
|
549
|
+
path: `/infos/misbehaviors`,
|
|
550
|
+
method: 'POST',
|
|
551
|
+
body: data,
|
|
552
|
+
type: ContentType.Json,
|
|
553
|
+
...params
|
|
554
|
+
}).then(convertHttpResponse),
|
|
555
|
+
/**
|
|
556
|
+
* No description
|
|
557
|
+
*
|
|
558
|
+
* @tags Infos
|
|
559
|
+
* @name GetInfosUnreachable
|
|
560
|
+
* @summary Get the unreachable brokers
|
|
561
|
+
* @request GET:/infos/unreachable
|
|
562
|
+
*/
|
|
563
|
+
getInfosUnreachable: (params = {}) => this.request({
|
|
564
|
+
path: `/infos/unreachable`,
|
|
565
|
+
method: 'GET',
|
|
566
|
+
format: 'json',
|
|
567
|
+
...params
|
|
568
|
+
}).then(convertHttpResponse),
|
|
569
|
+
/**
|
|
570
|
+
* No description
|
|
571
|
+
*
|
|
572
|
+
* @tags Infos
|
|
573
|
+
* @name PostInfosDiscovery
|
|
574
|
+
* @summary Set brokers to be unreachable/reachable
|
|
575
|
+
* @request POST:/infos/discovery
|
|
576
|
+
*/
|
|
577
|
+
postInfosDiscovery: (data, params = {}) => this.request({
|
|
578
|
+
path: `/infos/discovery`,
|
|
579
|
+
method: 'POST',
|
|
580
|
+
body: data,
|
|
581
|
+
type: ContentType.Json,
|
|
582
|
+
...params
|
|
583
|
+
}).then(convertHttpResponse),
|
|
584
|
+
/**
|
|
585
|
+
* No description
|
|
586
|
+
*
|
|
587
|
+
* @tags Infos
|
|
588
|
+
* @name GetInfosHistoryHashrate
|
|
589
|
+
* @summary Get history average hashrate on the given time interval
|
|
590
|
+
* @request GET:/infos/history-hashrate
|
|
591
|
+
*/
|
|
592
|
+
getInfosHistoryHashrate: (query, params = {}) => this.request({
|
|
593
|
+
path: `/infos/history-hashrate`,
|
|
594
|
+
method: 'GET',
|
|
595
|
+
query: query,
|
|
596
|
+
format: 'json',
|
|
597
|
+
...params
|
|
598
|
+
}).then(convertHttpResponse),
|
|
599
|
+
/**
|
|
600
|
+
* No description
|
|
601
|
+
*
|
|
602
|
+
* @tags Infos
|
|
603
|
+
* @name GetInfosCurrentHashrate
|
|
604
|
+
* @summary Get average hashrate from `now - timespan(millis)` to `now`
|
|
605
|
+
* @request GET:/infos/current-hashrate
|
|
606
|
+
*/
|
|
607
|
+
getInfosCurrentHashrate: (query, params = {}) => this.request({
|
|
608
|
+
path: `/infos/current-hashrate`,
|
|
609
|
+
method: 'GET',
|
|
610
|
+
query: query,
|
|
611
|
+
format: 'json',
|
|
612
|
+
...params
|
|
613
|
+
}).then(convertHttpResponse),
|
|
614
|
+
/**
|
|
615
|
+
* No description
|
|
616
|
+
*
|
|
617
|
+
* @tags Infos
|
|
618
|
+
* @name GetInfosCurrentDifficulty
|
|
619
|
+
* @summary Get the average difficulty of the latest blocks from all shards
|
|
620
|
+
* @request GET:/infos/current-difficulty
|
|
621
|
+
*/
|
|
622
|
+
getInfosCurrentDifficulty: (params = {}) => this.request({
|
|
623
|
+
path: `/infos/current-difficulty`,
|
|
624
|
+
method: 'GET',
|
|
625
|
+
format: 'json',
|
|
626
|
+
...params
|
|
627
|
+
}).then(convertHttpResponse)
|
|
628
|
+
};
|
|
629
|
+
this.blockflow = {
|
|
630
|
+
/**
|
|
631
|
+
* No description
|
|
632
|
+
*
|
|
633
|
+
* @tags Blockflow
|
|
634
|
+
* @name GetBlockflowBlocks
|
|
635
|
+
* @summary List blocks on the given time interval
|
|
636
|
+
* @request GET:/blockflow/blocks
|
|
637
|
+
*/
|
|
638
|
+
getBlockflowBlocks: (query, params = {}) => this.request({
|
|
639
|
+
path: `/blockflow/blocks`,
|
|
640
|
+
method: 'GET',
|
|
641
|
+
query: query,
|
|
642
|
+
format: 'json',
|
|
643
|
+
...params
|
|
644
|
+
}).then(convertHttpResponse),
|
|
645
|
+
/**
|
|
646
|
+
* No description
|
|
647
|
+
*
|
|
648
|
+
* @tags Blockflow
|
|
649
|
+
* @name GetBlockflowBlocksWithEvents
|
|
650
|
+
* @summary List blocks with events on the given time interval
|
|
651
|
+
* @request GET:/blockflow/blocks-with-events
|
|
652
|
+
*/
|
|
653
|
+
getBlockflowBlocksWithEvents: (query, params = {}) => this.request({
|
|
654
|
+
path: `/blockflow/blocks-with-events`,
|
|
655
|
+
method: 'GET',
|
|
656
|
+
query: query,
|
|
657
|
+
format: 'json',
|
|
658
|
+
...params
|
|
659
|
+
}).then(convertHttpResponse),
|
|
660
|
+
/**
|
|
661
|
+
* No description
|
|
662
|
+
*
|
|
663
|
+
* @tags Blockflow
|
|
664
|
+
* @name GetBlockflowRichBlocks
|
|
665
|
+
* @summary Given a time interval, list blocks containing events and transactions with enriched input information when node indexes are enabled.
|
|
666
|
+
* @request GET:/blockflow/rich-blocks
|
|
667
|
+
*/
|
|
668
|
+
getBlockflowRichBlocks: (query, params = {}) => this.request({
|
|
669
|
+
path: `/blockflow/rich-blocks`,
|
|
670
|
+
method: 'GET',
|
|
671
|
+
query: query,
|
|
672
|
+
format: 'json',
|
|
673
|
+
...params
|
|
674
|
+
}).then(convertHttpResponse),
|
|
675
|
+
/**
|
|
676
|
+
* No description
|
|
677
|
+
*
|
|
678
|
+
* @tags Blockflow
|
|
679
|
+
* @name GetBlockflowBlocksBlockHash
|
|
680
|
+
* @summary Get a block with hash
|
|
681
|
+
* @request GET:/blockflow/blocks/{block_hash}
|
|
682
|
+
*/
|
|
683
|
+
getBlockflowBlocksBlockHash: (blockHash, params = {}) => this.request({
|
|
684
|
+
path: `/blockflow/blocks/${blockHash}`,
|
|
685
|
+
method: 'GET',
|
|
686
|
+
format: 'json',
|
|
687
|
+
...params
|
|
688
|
+
}).then(convertHttpResponse),
|
|
689
|
+
/**
|
|
690
|
+
* No description
|
|
691
|
+
*
|
|
692
|
+
* @tags Blockflow
|
|
693
|
+
* @name GetBlockflowMainChainBlockByGhostUncleGhostUncleHash
|
|
694
|
+
* @summary Get a mainchain block by ghost uncle hash
|
|
695
|
+
* @request GET:/blockflow/main-chain-block-by-ghost-uncle/{ghost_uncle_hash}
|
|
696
|
+
*/
|
|
697
|
+
getBlockflowMainChainBlockByGhostUncleGhostUncleHash: (ghostUncleHash, params = {}) => this.request({
|
|
698
|
+
path: `/blockflow/main-chain-block-by-ghost-uncle/${ghostUncleHash}`,
|
|
699
|
+
method: 'GET',
|
|
700
|
+
format: 'json',
|
|
701
|
+
...params
|
|
702
|
+
}).then(convertHttpResponse),
|
|
703
|
+
/**
|
|
704
|
+
* No description
|
|
705
|
+
*
|
|
706
|
+
* @tags Blockflow
|
|
707
|
+
* @name GetBlockflowBlocksWithEventsBlockHash
|
|
708
|
+
* @summary Get a block and events with hash
|
|
709
|
+
* @request GET:/blockflow/blocks-with-events/{block_hash}
|
|
710
|
+
*/
|
|
711
|
+
getBlockflowBlocksWithEventsBlockHash: (blockHash, params = {}) => this.request({
|
|
712
|
+
path: `/blockflow/blocks-with-events/${blockHash}`,
|
|
713
|
+
method: 'GET',
|
|
714
|
+
format: 'json',
|
|
715
|
+
...params
|
|
716
|
+
}).then(convertHttpResponse),
|
|
717
|
+
/**
|
|
718
|
+
* No description
|
|
719
|
+
*
|
|
720
|
+
* @tags Blockflow
|
|
721
|
+
* @name GetBlockflowRichBlocksBlockHash
|
|
722
|
+
* @summary Get a block containing events and transactions with enriched input information when node indexes are enabled.
|
|
723
|
+
* @request GET:/blockflow/rich-blocks/{block_hash}
|
|
724
|
+
*/
|
|
725
|
+
getBlockflowRichBlocksBlockHash: (blockHash, params = {}) => this.request({
|
|
726
|
+
path: `/blockflow/rich-blocks/${blockHash}`,
|
|
727
|
+
method: 'GET',
|
|
728
|
+
format: 'json',
|
|
729
|
+
...params
|
|
730
|
+
}).then(convertHttpResponse),
|
|
731
|
+
/**
|
|
732
|
+
* No description
|
|
733
|
+
*
|
|
734
|
+
* @tags Blockflow
|
|
735
|
+
* @name GetBlockflowIsBlockInMainChain
|
|
736
|
+
* @summary Check if the block is in main chain
|
|
737
|
+
* @request GET:/blockflow/is-block-in-main-chain
|
|
738
|
+
*/
|
|
739
|
+
getBlockflowIsBlockInMainChain: (query, params = {}) => this.request({
|
|
740
|
+
path: `/blockflow/is-block-in-main-chain`,
|
|
741
|
+
method: 'GET',
|
|
742
|
+
query: query,
|
|
743
|
+
format: 'json',
|
|
744
|
+
...params
|
|
745
|
+
}).then(convertHttpResponse),
|
|
746
|
+
/**
|
|
747
|
+
* No description
|
|
748
|
+
*
|
|
749
|
+
* @tags Blockflow
|
|
750
|
+
* @name GetBlockflowHashes
|
|
751
|
+
* @summary Get all block's hashes at given height for given groups
|
|
752
|
+
* @request GET:/blockflow/hashes
|
|
753
|
+
*/
|
|
754
|
+
getBlockflowHashes: (query, params = {}) => this.request({
|
|
755
|
+
path: `/blockflow/hashes`,
|
|
756
|
+
method: 'GET',
|
|
757
|
+
query: query,
|
|
758
|
+
format: 'json',
|
|
759
|
+
...params
|
|
760
|
+
}).then(convertHttpResponse),
|
|
761
|
+
/**
|
|
762
|
+
* No description
|
|
763
|
+
*
|
|
764
|
+
* @tags Blockflow
|
|
765
|
+
* @name GetBlockflowChainInfo
|
|
766
|
+
* @summary Get infos about the chain from the given groups
|
|
767
|
+
* @request GET:/blockflow/chain-info
|
|
768
|
+
*/
|
|
769
|
+
getBlockflowChainInfo: (query, params = {}) => this.request({
|
|
770
|
+
path: `/blockflow/chain-info`,
|
|
771
|
+
method: 'GET',
|
|
772
|
+
query: query,
|
|
773
|
+
format: 'json',
|
|
774
|
+
...params
|
|
775
|
+
}).then(convertHttpResponse),
|
|
776
|
+
/**
|
|
777
|
+
* No description
|
|
778
|
+
*
|
|
779
|
+
* @tags Blockflow
|
|
780
|
+
* @name GetBlockflowHeadersBlockHash
|
|
781
|
+
* @summary Get block header
|
|
782
|
+
* @request GET:/blockflow/headers/{block_hash}
|
|
783
|
+
*/
|
|
784
|
+
getBlockflowHeadersBlockHash: (blockHash, params = {}) => this.request({
|
|
785
|
+
path: `/blockflow/headers/${blockHash}`,
|
|
786
|
+
method: 'GET',
|
|
787
|
+
format: 'json',
|
|
788
|
+
...params
|
|
789
|
+
}).then(convertHttpResponse),
|
|
790
|
+
/**
|
|
791
|
+
* No description
|
|
792
|
+
*
|
|
793
|
+
* @tags Blockflow
|
|
794
|
+
* @name GetBlockflowRawBlocksBlockHash
|
|
795
|
+
* @summary Get raw block in hex format
|
|
796
|
+
* @request GET:/blockflow/raw-blocks/{block_hash}
|
|
797
|
+
*/
|
|
798
|
+
getBlockflowRawBlocksBlockHash: (blockHash, params = {}) => this.request({
|
|
799
|
+
path: `/blockflow/raw-blocks/${blockHash}`,
|
|
800
|
+
method: 'GET',
|
|
801
|
+
format: 'json',
|
|
802
|
+
...params
|
|
803
|
+
}).then(convertHttpResponse)
|
|
804
|
+
};
|
|
805
|
+
this.addresses = {
|
|
806
|
+
/**
|
|
807
|
+
* No description
|
|
808
|
+
*
|
|
809
|
+
* @tags Addresses
|
|
810
|
+
* @name GetAddressesAddressBalance
|
|
811
|
+
* @summary Get the balance of an address
|
|
812
|
+
* @request GET:/addresses/{address}/balance
|
|
813
|
+
*/
|
|
814
|
+
getAddressesAddressBalance: (address, query, params = {}) => this.request({
|
|
815
|
+
path: `/addresses/${address}/balance`,
|
|
816
|
+
method: 'GET',
|
|
817
|
+
query: query,
|
|
818
|
+
format: 'json',
|
|
819
|
+
...params
|
|
820
|
+
}).then(convertHttpResponse),
|
|
821
|
+
/**
|
|
822
|
+
* No description
|
|
823
|
+
*
|
|
824
|
+
* @tags Addresses
|
|
825
|
+
* @name GetAddressesAddressUtxos
|
|
826
|
+
* @summary Get the UTXOs of an address
|
|
827
|
+
* @request GET:/addresses/{address}/utxos
|
|
828
|
+
*/
|
|
829
|
+
getAddressesAddressUtxos: (address, params = {}) => this.request({
|
|
830
|
+
path: `/addresses/${address}/utxos`,
|
|
831
|
+
method: 'GET',
|
|
832
|
+
format: 'json',
|
|
833
|
+
...params
|
|
834
|
+
}).then(convertHttpResponse),
|
|
835
|
+
/**
|
|
836
|
+
* No description
|
|
837
|
+
*
|
|
838
|
+
* @tags Addresses
|
|
839
|
+
* @name GetAddressesAddressGroup
|
|
840
|
+
* @summary Get the group of an address
|
|
841
|
+
* @request GET:/addresses/{address}/group
|
|
842
|
+
*/
|
|
843
|
+
getAddressesAddressGroup: (address, params = {}) => this.request({
|
|
844
|
+
path: `/addresses/${address}/group`,
|
|
845
|
+
method: 'GET',
|
|
846
|
+
format: 'json',
|
|
847
|
+
...params
|
|
848
|
+
}).then(convertHttpResponse)
|
|
849
|
+
};
|
|
850
|
+
this.transactions = {
|
|
851
|
+
/**
|
|
852
|
+
* No description
|
|
853
|
+
*
|
|
854
|
+
* @tags Transactions
|
|
855
|
+
* @name PostTransactionsBuild
|
|
856
|
+
* @summary Build an unsigned transfer transaction to a number of recipients
|
|
857
|
+
* @request POST:/transactions/build
|
|
858
|
+
*/
|
|
859
|
+
postTransactionsBuild: (data, params = {}) => this.request({
|
|
860
|
+
path: `/transactions/build`,
|
|
861
|
+
method: 'POST',
|
|
862
|
+
body: data,
|
|
863
|
+
type: ContentType.Json,
|
|
864
|
+
format: 'json',
|
|
865
|
+
...params
|
|
866
|
+
}).then(convertHttpResponse),
|
|
867
|
+
/**
|
|
868
|
+
* No description
|
|
869
|
+
*
|
|
870
|
+
* @tags Transactions
|
|
871
|
+
* @name PostTransactionsBuildMultiAddresses
|
|
872
|
+
* @summary Build an unsigned transaction with multiple addresses to a number of recipients
|
|
873
|
+
* @request POST:/transactions/build-multi-addresses
|
|
874
|
+
*/
|
|
875
|
+
postTransactionsBuildMultiAddresses: (data, params = {}) => this.request({
|
|
876
|
+
path: `/transactions/build-multi-addresses`,
|
|
877
|
+
method: 'POST',
|
|
878
|
+
body: data,
|
|
879
|
+
type: ContentType.Json,
|
|
880
|
+
format: 'json',
|
|
881
|
+
...params
|
|
882
|
+
}).then(convertHttpResponse),
|
|
883
|
+
/**
|
|
884
|
+
* No description
|
|
885
|
+
*
|
|
886
|
+
* @tags Transactions
|
|
887
|
+
* @name PostTransactionsSweepAddressBuild
|
|
888
|
+
* @summary Build unsigned transactions to send all unlocked ALPH and token balances of one address to another address
|
|
889
|
+
* @request POST:/transactions/sweep-address/build
|
|
890
|
+
*/
|
|
891
|
+
postTransactionsSweepAddressBuild: (data, params = {}) => this.request({
|
|
892
|
+
path: `/transactions/sweep-address/build`,
|
|
893
|
+
method: 'POST',
|
|
894
|
+
body: data,
|
|
895
|
+
type: ContentType.Json,
|
|
896
|
+
format: 'json',
|
|
897
|
+
...params
|
|
898
|
+
}).then(convertHttpResponse),
|
|
899
|
+
/**
|
|
900
|
+
* No description
|
|
901
|
+
*
|
|
902
|
+
* @tags Transactions
|
|
903
|
+
* @name PostTransactionsSubmit
|
|
904
|
+
* @summary Submit a signed transaction
|
|
905
|
+
* @request POST:/transactions/submit
|
|
906
|
+
*/
|
|
907
|
+
postTransactionsSubmit: (data, params = {}) => this.request({
|
|
908
|
+
path: `/transactions/submit`,
|
|
909
|
+
method: 'POST',
|
|
910
|
+
body: data,
|
|
911
|
+
type: ContentType.Json,
|
|
912
|
+
format: 'json',
|
|
913
|
+
...params
|
|
914
|
+
}).then(convertHttpResponse),
|
|
915
|
+
/**
|
|
916
|
+
* No description
|
|
917
|
+
*
|
|
918
|
+
* @tags Transactions
|
|
919
|
+
* @name PostTransactionsDecodeUnsignedTx
|
|
920
|
+
* @summary Decode an unsigned transaction
|
|
921
|
+
* @request POST:/transactions/decode-unsigned-tx
|
|
922
|
+
*/
|
|
923
|
+
postTransactionsDecodeUnsignedTx: (data, params = {}) => this.request({
|
|
924
|
+
path: `/transactions/decode-unsigned-tx`,
|
|
925
|
+
method: 'POST',
|
|
926
|
+
body: data,
|
|
927
|
+
type: ContentType.Json,
|
|
928
|
+
format: 'json',
|
|
929
|
+
...params
|
|
930
|
+
}).then(convertHttpResponse),
|
|
931
|
+
/**
|
|
932
|
+
* No description
|
|
933
|
+
*
|
|
934
|
+
* @tags Transactions
|
|
935
|
+
* @name GetTransactionsDetailsTxid
|
|
936
|
+
* @summary Get transaction details
|
|
937
|
+
* @request GET:/transactions/details/{txId}
|
|
938
|
+
*/
|
|
939
|
+
getTransactionsDetailsTxid: (txId, query, params = {}) => this.request({
|
|
940
|
+
path: `/transactions/details/${txId}`,
|
|
941
|
+
method: 'GET',
|
|
942
|
+
query: query,
|
|
943
|
+
format: 'json',
|
|
944
|
+
...params
|
|
945
|
+
}).then(convertHttpResponse),
|
|
946
|
+
/**
|
|
947
|
+
* No description
|
|
948
|
+
*
|
|
949
|
+
* @tags Transactions
|
|
950
|
+
* @name GetTransactionsRichDetailsTxid
|
|
951
|
+
* @summary Get transaction with enriched input information when node indexes are enabled.
|
|
952
|
+
* @request GET:/transactions/rich-details/{txId}
|
|
953
|
+
*/
|
|
954
|
+
getTransactionsRichDetailsTxid: (txId, query, params = {}) => this.request({
|
|
955
|
+
path: `/transactions/rich-details/${txId}`,
|
|
956
|
+
method: 'GET',
|
|
957
|
+
query: query,
|
|
958
|
+
format: 'json',
|
|
959
|
+
...params
|
|
960
|
+
}).then(convertHttpResponse),
|
|
961
|
+
/**
|
|
962
|
+
* No description
|
|
963
|
+
*
|
|
964
|
+
* @tags Transactions
|
|
965
|
+
* @name GetTransactionsRawTxid
|
|
966
|
+
* @summary Get raw transaction in hex format
|
|
967
|
+
* @request GET:/transactions/raw/{txId}
|
|
968
|
+
*/
|
|
969
|
+
getTransactionsRawTxid: (txId, query, params = {}) => this.request({
|
|
970
|
+
path: `/transactions/raw/${txId}`,
|
|
971
|
+
method: 'GET',
|
|
972
|
+
query: query,
|
|
973
|
+
format: 'json',
|
|
974
|
+
...params
|
|
975
|
+
}).then(convertHttpResponse),
|
|
976
|
+
/**
|
|
977
|
+
* No description
|
|
978
|
+
*
|
|
979
|
+
* @tags Transactions
|
|
980
|
+
* @name GetTransactionsStatus
|
|
981
|
+
* @summary Get tx status
|
|
982
|
+
* @request GET:/transactions/status
|
|
983
|
+
*/
|
|
984
|
+
getTransactionsStatus: (query, params = {}) => this.request({
|
|
985
|
+
path: `/transactions/status`,
|
|
986
|
+
method: 'GET',
|
|
987
|
+
query: query,
|
|
988
|
+
format: 'json',
|
|
989
|
+
...params
|
|
990
|
+
}).then(convertHttpResponse),
|
|
991
|
+
/**
|
|
992
|
+
* No description
|
|
993
|
+
*
|
|
994
|
+
* @tags Transactions
|
|
995
|
+
* @name GetTransactionsTxIdFromOutputref
|
|
996
|
+
* @summary Get transaction id from transaction output ref
|
|
997
|
+
* @request GET:/transactions/tx-id-from-outputref
|
|
998
|
+
*/
|
|
999
|
+
getTransactionsTxIdFromOutputref: (query, params = {}) => this.request({
|
|
1000
|
+
path: `/transactions/tx-id-from-outputref`,
|
|
1001
|
+
method: 'GET',
|
|
1002
|
+
query: query,
|
|
1003
|
+
format: 'json',
|
|
1004
|
+
...params
|
|
1005
|
+
}).then(convertHttpResponse),
|
|
1006
|
+
/**
|
|
1007
|
+
* No description
|
|
1008
|
+
*
|
|
1009
|
+
* @tags Transactions
|
|
1010
|
+
* @name PostTransactionsBuildChained
|
|
1011
|
+
* @summary Build a chain of transactions
|
|
1012
|
+
* @request POST:/transactions/build-chained
|
|
1013
|
+
*/
|
|
1014
|
+
postTransactionsBuildChained: (data, params = {}) => this.request({
|
|
1015
|
+
path: `/transactions/build-chained`,
|
|
1016
|
+
method: 'POST',
|
|
1017
|
+
body: data,
|
|
1018
|
+
type: ContentType.Json,
|
|
1019
|
+
format: 'json',
|
|
1020
|
+
...params
|
|
1021
|
+
}).then(convertHttpResponse)
|
|
1022
|
+
};
|
|
1023
|
+
this.mempool = {
|
|
1024
|
+
/**
|
|
1025
|
+
* No description
|
|
1026
|
+
*
|
|
1027
|
+
* @tags Mempool
|
|
1028
|
+
* @name GetMempoolTransactions
|
|
1029
|
+
* @summary List mempool transactions
|
|
1030
|
+
* @request GET:/mempool/transactions
|
|
1031
|
+
*/
|
|
1032
|
+
getMempoolTransactions: (params = {}) => this.request({
|
|
1033
|
+
path: `/mempool/transactions`,
|
|
1034
|
+
method: 'GET',
|
|
1035
|
+
format: 'json',
|
|
1036
|
+
...params
|
|
1037
|
+
}).then(convertHttpResponse),
|
|
1038
|
+
/**
|
|
1039
|
+
* No description
|
|
1040
|
+
*
|
|
1041
|
+
* @tags Mempool
|
|
1042
|
+
* @name DeleteMempoolTransactions
|
|
1043
|
+
* @summary Remove all transactions from mempool
|
|
1044
|
+
* @request DELETE:/mempool/transactions
|
|
1045
|
+
*/
|
|
1046
|
+
deleteMempoolTransactions: (params = {}) => this.request({
|
|
1047
|
+
path: `/mempool/transactions`,
|
|
1048
|
+
method: 'DELETE',
|
|
1049
|
+
...params
|
|
1050
|
+
}).then(convertHttpResponse),
|
|
1051
|
+
/**
|
|
1052
|
+
* No description
|
|
1053
|
+
*
|
|
1054
|
+
* @tags Mempool
|
|
1055
|
+
* @name PutMempoolTransactionsRebroadcast
|
|
1056
|
+
* @summary Rebroadcase a mempool transaction to the network
|
|
1057
|
+
* @request PUT:/mempool/transactions/rebroadcast
|
|
1058
|
+
*/
|
|
1059
|
+
putMempoolTransactionsRebroadcast: (query, params = {}) => this.request({
|
|
1060
|
+
path: `/mempool/transactions/rebroadcast`,
|
|
1061
|
+
method: 'PUT',
|
|
1062
|
+
query: query,
|
|
1063
|
+
...params
|
|
1064
|
+
}).then(convertHttpResponse),
|
|
1065
|
+
/**
|
|
1066
|
+
* No description
|
|
1067
|
+
*
|
|
1068
|
+
* @tags Mempool
|
|
1069
|
+
* @name PutMempoolTransactionsValidate
|
|
1070
|
+
* @summary Validate all mempool transactions and remove invalid ones
|
|
1071
|
+
* @request PUT:/mempool/transactions/validate
|
|
1072
|
+
*/
|
|
1073
|
+
putMempoolTransactionsValidate: (params = {}) => this.request({
|
|
1074
|
+
path: `/mempool/transactions/validate`,
|
|
1075
|
+
method: 'PUT',
|
|
1076
|
+
...params
|
|
1077
|
+
}).then(convertHttpResponse)
|
|
1078
|
+
};
|
|
1079
|
+
this.contracts = {
|
|
1080
|
+
/**
|
|
1081
|
+
* No description
|
|
1082
|
+
*
|
|
1083
|
+
* @tags Contracts
|
|
1084
|
+
* @name PostContractsCompileScript
|
|
1085
|
+
* @summary Compile a script
|
|
1086
|
+
* @request POST:/contracts/compile-script
|
|
1087
|
+
*/
|
|
1088
|
+
postContractsCompileScript: (data, params = {}) => this.request({
|
|
1089
|
+
path: `/contracts/compile-script`,
|
|
1090
|
+
method: 'POST',
|
|
1091
|
+
body: data,
|
|
1092
|
+
type: ContentType.Json,
|
|
1093
|
+
format: 'json',
|
|
1094
|
+
...params
|
|
1095
|
+
}).then(convertHttpResponse),
|
|
1096
|
+
/**
|
|
1097
|
+
* No description
|
|
1098
|
+
*
|
|
1099
|
+
* @tags Contracts
|
|
1100
|
+
* @name PostContractsUnsignedTxExecuteScript
|
|
1101
|
+
* @summary Build an unsigned script
|
|
1102
|
+
* @request POST:/contracts/unsigned-tx/execute-script
|
|
1103
|
+
*/
|
|
1104
|
+
postContractsUnsignedTxExecuteScript: (data, params = {}) => this.request({
|
|
1105
|
+
path: `/contracts/unsigned-tx/execute-script`,
|
|
1106
|
+
method: 'POST',
|
|
1107
|
+
body: data,
|
|
1108
|
+
type: ContentType.Json,
|
|
1109
|
+
format: 'json',
|
|
1110
|
+
...params
|
|
1111
|
+
}).then(convertHttpResponse),
|
|
1112
|
+
/**
|
|
1113
|
+
* No description
|
|
1114
|
+
*
|
|
1115
|
+
* @tags Contracts
|
|
1116
|
+
* @name PostContractsCompileContract
|
|
1117
|
+
* @summary Compile a smart contract
|
|
1118
|
+
* @request POST:/contracts/compile-contract
|
|
1119
|
+
*/
|
|
1120
|
+
postContractsCompileContract: (data, params = {}) => this.request({
|
|
1121
|
+
path: `/contracts/compile-contract`,
|
|
1122
|
+
method: 'POST',
|
|
1123
|
+
body: data,
|
|
1124
|
+
type: ContentType.Json,
|
|
1125
|
+
format: 'json',
|
|
1126
|
+
...params
|
|
1127
|
+
}).then(convertHttpResponse),
|
|
1128
|
+
/**
|
|
1129
|
+
* No description
|
|
1130
|
+
*
|
|
1131
|
+
* @tags Contracts
|
|
1132
|
+
* @name PostContractsCompileProject
|
|
1133
|
+
* @summary Compile a project
|
|
1134
|
+
* @request POST:/contracts/compile-project
|
|
1135
|
+
*/
|
|
1136
|
+
postContractsCompileProject: (data, params = {}) => this.request({
|
|
1137
|
+
path: `/contracts/compile-project`,
|
|
1138
|
+
method: 'POST',
|
|
1139
|
+
body: data,
|
|
1140
|
+
type: ContentType.Json,
|
|
1141
|
+
format: 'json',
|
|
1142
|
+
...params
|
|
1143
|
+
}).then(convertHttpResponse),
|
|
1144
|
+
/**
|
|
1145
|
+
* No description
|
|
1146
|
+
*
|
|
1147
|
+
* @tags Contracts
|
|
1148
|
+
* @name PostContractsUnsignedTxDeployContract
|
|
1149
|
+
* @summary Build an unsigned contract
|
|
1150
|
+
* @request POST:/contracts/unsigned-tx/deploy-contract
|
|
1151
|
+
*/
|
|
1152
|
+
postContractsUnsignedTxDeployContract: (data, params = {}) => this.request({
|
|
1153
|
+
path: `/contracts/unsigned-tx/deploy-contract`,
|
|
1154
|
+
method: 'POST',
|
|
1155
|
+
body: data,
|
|
1156
|
+
type: ContentType.Json,
|
|
1157
|
+
format: 'json',
|
|
1158
|
+
...params
|
|
1159
|
+
}).then(convertHttpResponse),
|
|
1160
|
+
/**
|
|
1161
|
+
* No description
|
|
1162
|
+
*
|
|
1163
|
+
* @tags Contracts
|
|
1164
|
+
* @name GetContractsAddressState
|
|
1165
|
+
* @summary Get contract state
|
|
1166
|
+
* @request GET:/contracts/{address}/state
|
|
1167
|
+
*/
|
|
1168
|
+
getContractsAddressState: (address, params = {}) => this.request({
|
|
1169
|
+
path: `/contracts/${address}/state`,
|
|
1170
|
+
method: 'GET',
|
|
1171
|
+
format: 'json',
|
|
1172
|
+
...params
|
|
1173
|
+
}).then(convertHttpResponse),
|
|
1174
|
+
/**
|
|
1175
|
+
* No description
|
|
1176
|
+
*
|
|
1177
|
+
* @tags Contracts
|
|
1178
|
+
* @name PostContractsTestContract
|
|
1179
|
+
* @summary Test contract
|
|
1180
|
+
* @request POST:/contracts/test-contract
|
|
1181
|
+
*/
|
|
1182
|
+
postContractsTestContract: (data, params = {}) => this.request({
|
|
1183
|
+
path: `/contracts/test-contract`,
|
|
1184
|
+
method: 'POST',
|
|
1185
|
+
body: data,
|
|
1186
|
+
type: ContentType.Json,
|
|
1187
|
+
format: 'json',
|
|
1188
|
+
...params
|
|
1189
|
+
}).then(convertHttpResponse),
|
|
1190
|
+
/**
|
|
1191
|
+
* No description
|
|
1192
|
+
*
|
|
1193
|
+
* @tags Contracts
|
|
1194
|
+
* @name PostContractsCallContract
|
|
1195
|
+
* @summary Call contract
|
|
1196
|
+
* @request POST:/contracts/call-contract
|
|
1197
|
+
*/
|
|
1198
|
+
postContractsCallContract: (data, params = {}) => this.request({
|
|
1199
|
+
path: `/contracts/call-contract`,
|
|
1200
|
+
method: 'POST',
|
|
1201
|
+
body: data,
|
|
1202
|
+
type: ContentType.Json,
|
|
1203
|
+
format: 'json',
|
|
1204
|
+
...params
|
|
1205
|
+
}).then(convertHttpResponse),
|
|
1206
|
+
/**
|
|
1207
|
+
* No description
|
|
1208
|
+
*
|
|
1209
|
+
* @tags Contracts
|
|
1210
|
+
* @name PostContractsMulticallContract
|
|
1211
|
+
* @summary Multiple call contract
|
|
1212
|
+
* @request POST:/contracts/multicall-contract
|
|
1213
|
+
*/
|
|
1214
|
+
postContractsMulticallContract: (data, params = {}) => this.request({
|
|
1215
|
+
path: `/contracts/multicall-contract`,
|
|
1216
|
+
method: 'POST',
|
|
1217
|
+
body: data,
|
|
1218
|
+
type: ContentType.Json,
|
|
1219
|
+
format: 'json',
|
|
1220
|
+
...params
|
|
1221
|
+
}).then(convertHttpResponse),
|
|
1222
|
+
/**
|
|
1223
|
+
* No description
|
|
1224
|
+
*
|
|
1225
|
+
* @tags Contracts
|
|
1226
|
+
* @name GetContractsAddressParent
|
|
1227
|
+
* @summary Get parent contract address
|
|
1228
|
+
* @request GET:/contracts/{address}/parent
|
|
1229
|
+
*/
|
|
1230
|
+
getContractsAddressParent: (address, params = {}) => this.request({
|
|
1231
|
+
path: `/contracts/${address}/parent`,
|
|
1232
|
+
method: 'GET',
|
|
1233
|
+
format: 'json',
|
|
1234
|
+
...params
|
|
1235
|
+
}).then(convertHttpResponse),
|
|
1236
|
+
/**
|
|
1237
|
+
* No description
|
|
1238
|
+
*
|
|
1239
|
+
* @tags Contracts
|
|
1240
|
+
* @name GetContractsAddressSubContracts
|
|
1241
|
+
* @summary Get sub-contract addresses
|
|
1242
|
+
* @request GET:/contracts/{address}/sub-contracts
|
|
1243
|
+
*/
|
|
1244
|
+
getContractsAddressSubContracts: (address, query, params = {}) => this.request({
|
|
1245
|
+
path: `/contracts/${address}/sub-contracts`,
|
|
1246
|
+
method: 'GET',
|
|
1247
|
+
query: query,
|
|
1248
|
+
format: 'json',
|
|
1249
|
+
...params
|
|
1250
|
+
}).then(convertHttpResponse),
|
|
1251
|
+
/**
|
|
1252
|
+
* No description
|
|
1253
|
+
*
|
|
1254
|
+
* @tags Contracts
|
|
1255
|
+
* @name GetContractsAddressSubContractsCurrentCount
|
|
1256
|
+
* @summary Get current value of the sub-contracts counter for a contract
|
|
1257
|
+
* @request GET:/contracts/{address}/sub-contracts/current-count
|
|
1258
|
+
*/
|
|
1259
|
+
getContractsAddressSubContractsCurrentCount: (address, params = {}) => this.request({
|
|
1260
|
+
path: `/contracts/${address}/sub-contracts/current-count`,
|
|
1261
|
+
method: 'GET',
|
|
1262
|
+
format: 'json',
|
|
1263
|
+
...params
|
|
1264
|
+
}).then(convertHttpResponse),
|
|
1265
|
+
/**
|
|
1266
|
+
* No description
|
|
1267
|
+
*
|
|
1268
|
+
* @tags Contracts
|
|
1269
|
+
* @name PostContractsCallTxScript
|
|
1270
|
+
* @summary Call TxScript
|
|
1271
|
+
* @request POST:/contracts/call-tx-script
|
|
1272
|
+
*/
|
|
1273
|
+
postContractsCallTxScript: (data, params = {}) => this.request({
|
|
1274
|
+
path: `/contracts/call-tx-script`,
|
|
1275
|
+
method: 'POST',
|
|
1276
|
+
body: data,
|
|
1277
|
+
type: ContentType.Json,
|
|
1278
|
+
format: 'json',
|
|
1279
|
+
...params
|
|
1280
|
+
}).then(convertHttpResponse)
|
|
1281
|
+
};
|
|
1282
|
+
this.multisig = {
|
|
1283
|
+
/**
|
|
1284
|
+
* No description
|
|
1285
|
+
*
|
|
1286
|
+
* @tags Multi-signature
|
|
1287
|
+
* @name PostMultisigAddress
|
|
1288
|
+
* @summary Create the multisig address and unlock script
|
|
1289
|
+
* @request POST:/multisig/address
|
|
1290
|
+
*/
|
|
1291
|
+
postMultisigAddress: (data, params = {}) => this.request({
|
|
1292
|
+
path: `/multisig/address`,
|
|
1293
|
+
method: 'POST',
|
|
1294
|
+
body: data,
|
|
1295
|
+
type: ContentType.Json,
|
|
1296
|
+
format: 'json',
|
|
1297
|
+
...params
|
|
1298
|
+
}).then(convertHttpResponse),
|
|
1299
|
+
/**
|
|
1300
|
+
* No description
|
|
1301
|
+
*
|
|
1302
|
+
* @tags Multi-signature
|
|
1303
|
+
* @name PostMultisigBuild
|
|
1304
|
+
* @summary Build a multisig unsigned transaction
|
|
1305
|
+
* @request POST:/multisig/build
|
|
1306
|
+
*/
|
|
1307
|
+
postMultisigBuild: (data, params = {}) => this.request({
|
|
1308
|
+
path: `/multisig/build`,
|
|
1309
|
+
method: 'POST',
|
|
1310
|
+
body: data,
|
|
1311
|
+
type: ContentType.Json,
|
|
1312
|
+
format: 'json',
|
|
1313
|
+
...params
|
|
1314
|
+
}).then(convertHttpResponse),
|
|
1315
|
+
/**
|
|
1316
|
+
* No description
|
|
1317
|
+
*
|
|
1318
|
+
* @tags Multi-signature
|
|
1319
|
+
* @name PostMultisigSweep
|
|
1320
|
+
* @summary Sweep all unlocked ALPH and token balances of a multisig address to another address
|
|
1321
|
+
* @request POST:/multisig/sweep
|
|
1322
|
+
*/
|
|
1323
|
+
postMultisigSweep: (data, params = {}) => this.request({
|
|
1324
|
+
path: `/multisig/sweep`,
|
|
1325
|
+
method: 'POST',
|
|
1326
|
+
body: data,
|
|
1327
|
+
type: ContentType.Json,
|
|
1328
|
+
format: 'json',
|
|
1329
|
+
...params
|
|
1330
|
+
}).then(convertHttpResponse),
|
|
1331
|
+
/**
|
|
1332
|
+
* No description
|
|
1333
|
+
*
|
|
1334
|
+
* @tags Multi-signature
|
|
1335
|
+
* @name PostMultisigSubmit
|
|
1336
|
+
* @summary Submit a multi-signed transaction
|
|
1337
|
+
* @request POST:/multisig/submit
|
|
1338
|
+
*/
|
|
1339
|
+
postMultisigSubmit: (data, params = {}) => this.request({
|
|
1340
|
+
path: `/multisig/submit`,
|
|
1341
|
+
method: 'POST',
|
|
1342
|
+
body: data,
|
|
1343
|
+
type: ContentType.Json,
|
|
1344
|
+
format: 'json',
|
|
1345
|
+
...params
|
|
1346
|
+
}).then(convertHttpResponse)
|
|
1347
|
+
};
|
|
1348
|
+
this.miners = {
|
|
1349
|
+
/**
|
|
1350
|
+
* No description
|
|
1351
|
+
*
|
|
1352
|
+
* @tags Miners
|
|
1353
|
+
* @name PostMinersCpuMining
|
|
1354
|
+
* @summary Execute an action on CPU miner. !!! for test only !!!
|
|
1355
|
+
* @request POST:/miners/cpu-mining
|
|
1356
|
+
*/
|
|
1357
|
+
postMinersCpuMining: (query, params = {}) => this.request({
|
|
1358
|
+
path: `/miners/cpu-mining`,
|
|
1359
|
+
method: 'POST',
|
|
1360
|
+
query: query,
|
|
1361
|
+
format: 'json',
|
|
1362
|
+
...params
|
|
1363
|
+
}).then(convertHttpResponse),
|
|
1364
|
+
/**
|
|
1365
|
+
* No description
|
|
1366
|
+
*
|
|
1367
|
+
* @tags Miners
|
|
1368
|
+
* @name PostMinersCpuMiningMineOneBlock
|
|
1369
|
+
* @summary Mine a block on CPU miner. !!! for test only !!!
|
|
1370
|
+
* @request POST:/miners/cpu-mining/mine-one-block
|
|
1371
|
+
*/
|
|
1372
|
+
postMinersCpuMiningMineOneBlock: (query, params = {}) => this.request({
|
|
1373
|
+
path: `/miners/cpu-mining/mine-one-block`,
|
|
1374
|
+
method: 'POST',
|
|
1375
|
+
query: query,
|
|
1376
|
+
format: 'json',
|
|
1377
|
+
...params
|
|
1378
|
+
}).then(convertHttpResponse),
|
|
1379
|
+
/**
|
|
1380
|
+
* No description
|
|
1381
|
+
*
|
|
1382
|
+
* @tags Miners
|
|
1383
|
+
* @name GetMinersAddresses
|
|
1384
|
+
* @summary List miner's addresses
|
|
1385
|
+
* @request GET:/miners/addresses
|
|
1386
|
+
*/
|
|
1387
|
+
getMinersAddresses: (params = {}) => this.request({
|
|
1388
|
+
path: `/miners/addresses`,
|
|
1389
|
+
method: 'GET',
|
|
1390
|
+
format: 'json',
|
|
1391
|
+
...params
|
|
1392
|
+
}).then(convertHttpResponse),
|
|
1393
|
+
/**
|
|
1394
|
+
* No description
|
|
1395
|
+
*
|
|
1396
|
+
* @tags Miners
|
|
1397
|
+
* @name PutMinersAddresses
|
|
1398
|
+
* @summary Update miner's addresses, but better to use user.conf instead
|
|
1399
|
+
* @request PUT:/miners/addresses
|
|
1400
|
+
*/
|
|
1401
|
+
putMinersAddresses: (data, params = {}) => this.request({
|
|
1402
|
+
path: `/miners/addresses`,
|
|
1403
|
+
method: 'PUT',
|
|
1404
|
+
body: data,
|
|
1405
|
+
type: ContentType.Json,
|
|
1406
|
+
...params
|
|
1407
|
+
}).then(convertHttpResponse)
|
|
1408
|
+
};
|
|
1409
|
+
this.events = {
|
|
1410
|
+
/**
|
|
1411
|
+
* No description
|
|
1412
|
+
*
|
|
1413
|
+
* @tags Events
|
|
1414
|
+
* @name GetEventsContractContractaddress
|
|
1415
|
+
* @summary Get events for a contract within a counter range
|
|
1416
|
+
* @request GET:/events/contract/{contractAddress}
|
|
1417
|
+
*/
|
|
1418
|
+
getEventsContractContractaddress: (contractAddress, query, params = {}) => this.request({
|
|
1419
|
+
path: `/events/contract/${contractAddress}`,
|
|
1420
|
+
method: 'GET',
|
|
1421
|
+
query: query,
|
|
1422
|
+
format: 'json',
|
|
1423
|
+
...params
|
|
1424
|
+
}).then(convertHttpResponse),
|
|
1425
|
+
/**
|
|
1426
|
+
* No description
|
|
1427
|
+
*
|
|
1428
|
+
* @tags Events
|
|
1429
|
+
* @name GetEventsContractContractaddressCurrentCount
|
|
1430
|
+
* @summary Get current value of the events counter for a contract
|
|
1431
|
+
* @request GET:/events/contract/{contractAddress}/current-count
|
|
1432
|
+
*/
|
|
1433
|
+
getEventsContractContractaddressCurrentCount: (contractAddress, params = {}) => this.request({
|
|
1434
|
+
path: `/events/contract/${contractAddress}/current-count`,
|
|
1435
|
+
method: 'GET',
|
|
1436
|
+
format: 'json',
|
|
1437
|
+
...params
|
|
1438
|
+
}).then(convertHttpResponse),
|
|
1439
|
+
/**
|
|
1440
|
+
* No description
|
|
1441
|
+
*
|
|
1442
|
+
* @tags Events
|
|
1443
|
+
* @name GetEventsTxIdTxid
|
|
1444
|
+
* @summary Get contract events for a transaction
|
|
1445
|
+
* @request GET:/events/tx-id/{txId}
|
|
1446
|
+
*/
|
|
1447
|
+
getEventsTxIdTxid: (txId, query, params = {}) => this.request({
|
|
1448
|
+
path: `/events/tx-id/${txId}`,
|
|
1449
|
+
method: 'GET',
|
|
1450
|
+
query: query,
|
|
1451
|
+
format: 'json',
|
|
1452
|
+
...params
|
|
1453
|
+
}).then(convertHttpResponse),
|
|
1454
|
+
/**
|
|
1455
|
+
* No description
|
|
1456
|
+
*
|
|
1457
|
+
* @tags Events
|
|
1458
|
+
* @name GetEventsBlockHashBlockhash
|
|
1459
|
+
* @summary Get contract events for a block
|
|
1460
|
+
* @request GET:/events/block-hash/{blockHash}
|
|
1461
|
+
*/
|
|
1462
|
+
getEventsBlockHashBlockhash: (blockHash, query, params = {}) => this.request({
|
|
1463
|
+
path: `/events/block-hash/${blockHash}`,
|
|
1464
|
+
method: 'GET',
|
|
1465
|
+
query: query,
|
|
1466
|
+
format: 'json',
|
|
1467
|
+
...params
|
|
1468
|
+
}).then(convertHttpResponse)
|
|
1469
|
+
};
|
|
1470
|
+
this.utils = {
|
|
1471
|
+
/**
|
|
1472
|
+
* No description
|
|
1473
|
+
*
|
|
1474
|
+
* @tags Utils
|
|
1475
|
+
* @name PostUtilsVerifySignature
|
|
1476
|
+
* @summary Verify the SecP256K1 signature of some data
|
|
1477
|
+
* @request POST:/utils/verify-signature
|
|
1478
|
+
*/
|
|
1479
|
+
postUtilsVerifySignature: (data, params = {}) => this.request({
|
|
1480
|
+
path: `/utils/verify-signature`,
|
|
1481
|
+
method: 'POST',
|
|
1482
|
+
body: data,
|
|
1483
|
+
type: ContentType.Json,
|
|
1484
|
+
format: 'json',
|
|
1485
|
+
...params
|
|
1486
|
+
}).then(convertHttpResponse),
|
|
1487
|
+
/**
|
|
1488
|
+
* No description
|
|
1489
|
+
*
|
|
1490
|
+
* @tags Utils
|
|
1491
|
+
* @name PostUtilsTargetToHashrate
|
|
1492
|
+
* @summary Convert a target to hashrate
|
|
1493
|
+
* @request POST:/utils/target-to-hashrate
|
|
1494
|
+
*/
|
|
1495
|
+
postUtilsTargetToHashrate: (data, params = {}) => this.request({
|
|
1496
|
+
path: `/utils/target-to-hashrate`,
|
|
1497
|
+
method: 'POST',
|
|
1498
|
+
body: data,
|
|
1499
|
+
type: ContentType.Json,
|
|
1500
|
+
format: 'json',
|
|
1501
|
+
...params
|
|
1502
|
+
}).then(convertHttpResponse),
|
|
1503
|
+
/**
|
|
1504
|
+
* No description
|
|
1505
|
+
*
|
|
1506
|
+
* @tags Utils
|
|
1507
|
+
* @name PutUtilsCheckHashIndexing
|
|
1508
|
+
* @summary Check and repair the indexing of block hashes
|
|
1509
|
+
* @request PUT:/utils/check-hash-indexing
|
|
1510
|
+
*/
|
|
1511
|
+
putUtilsCheckHashIndexing: (params = {}) => this.request({
|
|
1512
|
+
path: `/utils/check-hash-indexing`,
|
|
1513
|
+
method: 'PUT',
|
|
1514
|
+
...params
|
|
1515
|
+
}).then(convertHttpResponse)
|
|
1516
|
+
};
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
//# sourceMappingURL=api-alephium.js.map
|