quantumcoin 7.0.11 → 7.0.13
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/README-SDK.md +828 -807
- package/README.md +17 -0
- package/config.d.ts +50 -50
- package/examples/example-generated-sdk-js/README.md +65 -0
- package/examples/example-generated-sdk-js/examples/_test-wallet.js +17 -0
- package/examples/example-generated-sdk-js/examples/deploy.js +41 -0
- package/examples/example-generated-sdk-js/examples/events.js +36 -0
- package/examples/example-generated-sdk-js/examples/read-operations.js +46 -0
- package/examples/example-generated-sdk-js/examples/write-operations.js +44 -0
- package/examples/example-generated-sdk-js/index.d.ts +1 -0
- package/examples/example-generated-sdk-js/index.js +15 -0
- package/examples/example-generated-sdk-js/package-lock.json +59 -0
- package/examples/example-generated-sdk-js/package.json +22 -0
- package/examples/example-generated-sdk-js/src/SimpleERC20.d.ts +19 -0
- package/examples/example-generated-sdk-js/src/SimpleERC20.js +353 -0
- package/examples/example-generated-sdk-js/src/SimpleERC20__factory.d.ts +10 -0
- package/examples/example-generated-sdk-js/src/SimpleERC20__factory.js +29 -0
- package/examples/example-generated-sdk-js/src/index.d.ts +4 -0
- package/examples/example-generated-sdk-js/src/index.js +5 -0
- package/examples/example-generated-sdk-js/src/quantumcoin-shims.d.ts +23 -0
- package/examples/example-generated-sdk-js/src/types.d.ts +3 -0
- package/examples/example-generated-sdk-js/src/types.js +3 -0
- package/examples/example-generated-sdk-js/test/e2e/SimpleERC20.e2e.test.js +78 -0
- package/examples/example-generated-sdk-ts/README.md +65 -0
- package/examples/example-generated-sdk-ts/examples/_test-wallet.js +17 -0
- package/examples/example-generated-sdk-ts/examples/deploy.js +41 -0
- package/examples/example-generated-sdk-ts/examples/events.js +36 -0
- package/examples/example-generated-sdk-ts/examples/read-operations.js +46 -0
- package/examples/example-generated-sdk-ts/examples/write-operations.js +44 -0
- package/examples/example-generated-sdk-ts/index.d.ts +1 -0
- package/examples/example-generated-sdk-ts/index.js +15 -0
- package/examples/example-generated-sdk-ts/package-lock.json +59 -0
- package/examples/example-generated-sdk-ts/package.json +23 -0
- package/examples/example-generated-sdk-ts/src/SimpleERC20.ts +334 -0
- package/examples/example-generated-sdk-ts/src/SimpleERC20__factory.ts +28 -0
- package/examples/example-generated-sdk-ts/src/index.ts +4 -0
- package/examples/example-generated-sdk-ts/src/quantumcoin-shims.d.ts +23 -0
- package/examples/example-generated-sdk-ts/src/types.ts +4 -0
- package/examples/example-generated-sdk-ts/test/e2e/SimpleERC20.e2e.test.js +78 -0
- package/examples/example-generated-sdk-ts/tsconfig.json +14 -0
- package/examples/package-lock.json +1 -1
- package/examples/sdk-generator-erc20.inline.json +251 -251
- package/generate-sdk.js +1825 -1823
- package/package.json +1 -1
- package/src/abi/fragments.d.ts +42 -42
- package/src/abi/index.d.ts +13 -13
- package/src/contract/index.d.ts +9 -9
- package/src/errors/index.d.ts +92 -92
- package/src/generator/index.d.ts +11 -4
- package/src/generator/index.js +33 -5
- package/src/internal/hex.d.ts +68 -61
- package/src/internal/hex.js +36 -0
- package/src/providers/json-rpc-provider.d.ts +12 -12
- package/src/providers/provider.js +3 -3
- package/src/utils/address.d.ts +58 -58
- package/src/utils/encoding.d.ts +120 -120
- package/src/utils/hashing.js +298 -298
- package/src/utils/index.d.ts +63 -63
- package/src/utils/index.js +14 -14
- package/src/utils/result.d.ts +57 -57
- package/src/utils/rlp.d.ts +12 -12
- package/src/utils/units.d.ts +29 -29
- package/src/wallet/index.d.ts +10 -10
- package/src/wallet/wallet.d.ts +192 -187
- package/src/wallet/wallet.js +630 -610
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/README.md +83 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/artifacts/AllSolidityTypes.abi.json +12544 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/artifacts/AllSolidityTypes.bin +1 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/_test-wallet.js +17 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/_test-wallet.ts +10 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/deploy.js +41 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/deploy.ts +41 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/events.js +36 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/events.ts +36 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/offline-signing.js +82 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/offline-signing.ts +80 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/read-operations.js +46 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/read-operations.ts +44 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/write-operations.js +44 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/examples/write-operations.ts +44 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/index.d.ts +1 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/index.js +21 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/package-lock.json +597 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/package.json +25 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/AllSolidityTypes.d.ts +1280 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/AllSolidityTypes.js +14021 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/AllSolidityTypes__factory.d.ts +11 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/AllSolidityTypes__factory.js +29 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/index.d.ts +4 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/index.js +5 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/quantumcoin-shims.d.ts +25 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/types.d.ts +3 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/src/types.js +3 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/test/e2e/AllSolidityTypes.e2e.test.js +77 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-js/test/e2e/AllSolidityTypes.extra.test.js +195 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/README.md +83 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/artifacts/AllSolidityTypes.abi.json +12544 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/artifacts/AllSolidityTypes.bin +1 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/_test-wallet.js +17 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/_test-wallet.ts +10 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/deploy.js +41 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/deploy.ts +41 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/events.js +36 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/events.ts +36 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/offline-signing.js +82 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/offline-signing.ts +80 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/read-operations.js +46 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/read-operations.ts +44 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/write-operations.js +44 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/examples/write-operations.ts +44 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/index.d.ts +1 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/index.js +21 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/package-lock.json +597 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/package.json +26 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/src/AllSolidityTypes.ts +13940 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/src/AllSolidityTypes__factory.ts +29 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/src/index.ts +4 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/src/quantumcoin-shims.d.ts +25 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/src/types.ts +4 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/test/e2e/AllSolidityTypes.e2e.test.js +77 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/test/e2e/AllSolidityTypes.extra.test.js +195 -0
- package/test/e2e/generated-sdks/all-solidity-types/all-solidity-types-ts/tsconfig.json +18 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/README.md +74 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/artifacts/SimpleERC20.abi.json +245 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/artifacts/SimpleERC20.bin +1 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/_test-wallet.js +17 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/_test-wallet.ts +10 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/deploy.js +41 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/deploy.ts +41 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/events.js +36 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/events.ts +36 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/offline-signing.js +82 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/offline-signing.ts +80 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/read-operations.js +46 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/read-operations.ts +44 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/write-operations.js +44 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/examples/write-operations.ts +44 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/index.d.ts +1 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/index.js +16 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/package-lock.json +597 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/package.json +25 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/SimpleERC20.d.ts +24 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/SimpleERC20.js +372 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/SimpleERC20__factory.d.ts +10 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/SimpleERC20__factory.js +29 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/index.d.ts +4 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/index.js +5 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/quantumcoin-shims.d.ts +25 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/types.d.ts +3 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/src/types.js +3 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-js/test/e2e/SimpleERC20.e2e.test.js +90 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/README.md +74 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/artifacts/SimpleERC20.abi.json +245 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/artifacts/SimpleERC20.bin +1 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/_test-wallet.js +17 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/_test-wallet.ts +10 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/deploy.js +41 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/deploy.ts +41 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/events.js +36 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/events.ts +36 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/offline-signing.js +82 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/offline-signing.ts +80 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/read-operations.js +46 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/read-operations.ts +44 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/write-operations.js +44 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/examples/write-operations.ts +44 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/index.d.ts +1 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/index.js +16 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/package-lock.json +597 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/package.json +26 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/src/SimpleERC20.ts +355 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/src/SimpleERC20__factory.ts +28 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/src/index.ts +4 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/src/quantumcoin-shims.d.ts +25 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/src/types.ts +4 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/test/e2e/SimpleERC20.e2e.test.js +90 -0
- package/test/e2e/generated-sdks/simple-erc20/simple-erc20-ts/tsconfig.json +18 -0
- package/test/e2e/generator-interface.e2e.test.js +163 -0
- package/test/e2e/generator-interface.e2e.test.ts +158 -0
- package/test/e2e/signing-context-and-fee.e2e.test.js +141 -141
- package/test/e2e/signing-context-and-fee.e2e.test.ts +128 -128
- package/test/integration/provider.test.js +88 -88
- package/test/unit/address-wallet.test.js +892 -751
- package/test/unit/address-wallet.test.ts +877 -736
- package/test/unit/generator.test.js +48 -1
- package/test/unit/generator.test.ts +48 -1
- package/test/unit/hashing.test.js +64 -64
- package/test/unit/hashing.test.ts +63 -63
- package/test/unit/internal-hex.test.js +32 -1
- package/test/unit/internal-hex.test.ts +32 -1
- package/test/unit/providers.test.js +51 -1
- package/test/unit/providers.test.ts +53 -0
- package/SPEC.md +0 -3784
- package/examples/node_modules/.bin/esbuild +0 -16
- package/examples/node_modules/.bin/esbuild.cmd +0 -17
- package/examples/node_modules/.bin/esbuild.ps1 +0 -28
- package/examples/node_modules/.bin/sdkgen +0 -16
- package/examples/node_modules/.bin/sdkgen.cmd +0 -17
- package/examples/node_modules/.bin/sdkgen.ps1 +0 -28
- package/examples/node_modules/.bin/tsx +0 -16
- package/examples/node_modules/.bin/tsx.cmd +0 -17
- package/examples/node_modules/.bin/tsx.ps1 +0 -28
- package/examples/node_modules/.package-lock.json +0 -235
- package/examples/node_modules/@esbuild/win32-x64/README.md +0 -3
- package/examples/node_modules/@esbuild/win32-x64/esbuild.exe +0 -0
- package/examples/node_modules/@esbuild/win32-x64/package.json +0 -20
- package/examples/node_modules/esbuild/LICENSE.md +0 -21
- package/examples/node_modules/esbuild/README.md +0 -3
- package/examples/node_modules/esbuild/bin/esbuild +0 -223
- package/examples/node_modules/esbuild/install.js +0 -289
- package/examples/node_modules/esbuild/lib/main.d.ts +0 -716
- package/examples/node_modules/esbuild/lib/main.js +0 -2532
- package/examples/node_modules/esbuild/package.json +0 -49
- package/examples/node_modules/get-tsconfig/LICENSE +0 -21
- package/examples/node_modules/get-tsconfig/README.md +0 -235
- package/examples/node_modules/get-tsconfig/dist/index.cjs +0 -7
- package/examples/node_modules/get-tsconfig/dist/index.d.cts +0 -2088
- package/examples/node_modules/get-tsconfig/dist/index.d.mts +0 -2088
- package/examples/node_modules/get-tsconfig/dist/index.mjs +0 -7
- package/examples/node_modules/get-tsconfig/package.json +0 -46
- package/examples/node_modules/quantum-coin-js-sdk/.github/workflows/publish-npmjs.yaml +0 -22
- package/examples/node_modules/quantum-coin-js-sdk/LICENSE +0 -21
- package/examples/node_modules/quantum-coin-js-sdk/LICENSE-wasm_exec.js.txt +0 -30
- package/examples/node_modules/quantum-coin-js-sdk/README.md +0 -1665
- package/examples/node_modules/quantum-coin-js-sdk/example/README.md +0 -14
- package/examples/node_modules/quantum-coin-js-sdk/example/conversion-example.js +0 -19
- package/examples/node_modules/quantum-coin-js-sdk/example/example-create-contract.js +0 -396
- package/examples/node_modules/quantum-coin-js-sdk/example/example-encode-decode-rlp.js +0 -225
- package/examples/node_modules/quantum-coin-js-sdk/example/example-event-pack-unpack.js +0 -391
- package/examples/node_modules/quantum-coin-js-sdk/example/example-misc.js +0 -101
- package/examples/node_modules/quantum-coin-js-sdk/example/example-rpc-send-signRawTransaction.js +0 -318
- package/examples/node_modules/quantum-coin-js-sdk/example/example-rpc-send.js +0 -116
- package/examples/node_modules/quantum-coin-js-sdk/example/example-send.js +0 -70
- package/examples/node_modules/quantum-coin-js-sdk/example/example-token-pack-unpack.js +0 -961
- package/examples/node_modules/quantum-coin-js-sdk/example/example-wallet-version4.js +0 -35
- package/examples/node_modules/quantum-coin-js-sdk/example/example-wallet.js +0 -43
- package/examples/node_modules/quantum-coin-js-sdk/example/example.js +0 -405
- package/examples/node_modules/quantum-coin-js-sdk/example/package-lock.json +0 -134
- package/examples/node_modules/quantum-coin-js-sdk/example/package.json +0 -15
- package/examples/node_modules/quantum-coin-js-sdk/index.d.ts +0 -1024
- package/examples/node_modules/quantum-coin-js-sdk/index.js +0 -3062
- package/examples/node_modules/quantum-coin-js-sdk/package.json +0 -34
- package/examples/node_modules/quantum-coin-js-sdk/tests/encrypted-32.json +0 -1
- package/examples/node_modules/quantum-coin-js-sdk/tests/encrypted-36.json +0 -1
- package/examples/node_modules/quantum-coin-js-sdk/tests/encrypted-48.json +0 -1
- package/examples/node_modules/quantum-coin-js-sdk/tests/generate-verify-vectors.js +0 -91
- package/examples/node_modules/quantum-coin-js-sdk/tests/non-transactional.preinit.test.js +0 -41
- package/examples/node_modules/quantum-coin-js-sdk/tests/non-transactional.test.js +0 -686
- package/examples/node_modules/quantum-coin-js-sdk/tests/sign-raw-keytype5-context-null.test.js +0 -107
- package/examples/node_modules/quantum-coin-js-sdk/tests/sign-raw-transaction.test.js +0 -196
- package/examples/node_modules/quantum-coin-js-sdk/tests/sign-verify.test.js +0 -311
- package/examples/node_modules/quantum-coin-js-sdk/tests/transactional.relay.test.js +0 -131
- package/examples/node_modules/quantum-coin-js-sdk/tests/transactional.rpc.test.js +0 -103
- package/examples/node_modules/quantum-coin-js-sdk/tests/verify-vectors.json +0 -95035
- package/examples/node_modules/quantum-coin-js-sdk/wasmBase64.d.ts +0 -9
- package/examples/node_modules/quantum-coin-js-sdk/wasmBase64.js +0 -16
- package/examples/node_modules/quantum-coin-js-sdk/wasm_exec.d.ts +0 -0
- package/examples/node_modules/quantum-coin-js-sdk/wasm_exec.js +0 -587
- package/examples/node_modules/resolve-pkg-maps/LICENSE +0 -21
- package/examples/node_modules/resolve-pkg-maps/README.md +0 -216
- package/examples/node_modules/resolve-pkg-maps/dist/index.cjs +0 -1
- package/examples/node_modules/resolve-pkg-maps/dist/index.d.cts +0 -11
- package/examples/node_modules/resolve-pkg-maps/dist/index.d.mts +0 -11
- package/examples/node_modules/resolve-pkg-maps/dist/index.mjs +0 -1
- package/examples/node_modules/resolve-pkg-maps/package.json +0 -42
- package/examples/node_modules/seed-words/.github/workflows/publish-npmjs.yaml +0 -22
- package/examples/node_modules/seed-words/BUILD.md +0 -7
- package/examples/node_modules/seed-words/LICENSE +0 -121
- package/examples/node_modules/seed-words/README.md +0 -67
- package/examples/node_modules/seed-words/dist/seedwords.d.ts +0 -39
- package/examples/node_modules/seed-words/package.json +0 -27
- package/examples/node_modules/seed-words/seedwords.js +0 -315
- package/examples/node_modules/seed-words/seedwords.txt +0 -65536
- package/examples/node_modules/seed-words/tsconfig.json +0 -21
- package/examples/node_modules/tsx/LICENSE +0 -21
- package/examples/node_modules/tsx/README.md +0 -32
- package/examples/node_modules/tsx/dist/cjs/api/index.cjs +0 -1
- package/examples/node_modules/tsx/dist/cjs/api/index.d.cts +0 -35
- package/examples/node_modules/tsx/dist/cjs/api/index.d.mts +0 -35
- package/examples/node_modules/tsx/dist/cjs/api/index.mjs +0 -1
- package/examples/node_modules/tsx/dist/cjs/index.cjs +0 -1
- package/examples/node_modules/tsx/dist/cjs/index.mjs +0 -1
- package/examples/node_modules/tsx/dist/cli.cjs +0 -54
- package/examples/node_modules/tsx/dist/cli.mjs +0 -55
- package/examples/node_modules/tsx/dist/client-BQVF1NaW.mjs +0 -1
- package/examples/node_modules/tsx/dist/client-D6NvIMSC.cjs +0 -1
- package/examples/node_modules/tsx/dist/esm/api/index.cjs +0 -1
- package/examples/node_modules/tsx/dist/esm/api/index.d.cts +0 -35
- package/examples/node_modules/tsx/dist/esm/api/index.d.mts +0 -35
- package/examples/node_modules/tsx/dist/esm/api/index.mjs +0 -1
- package/examples/node_modules/tsx/dist/esm/index.cjs +0 -2
- package/examples/node_modules/tsx/dist/esm/index.mjs +0 -2
- package/examples/node_modules/tsx/dist/get-pipe-path-BHW2eJdv.mjs +0 -1
- package/examples/node_modules/tsx/dist/get-pipe-path-BoR10qr8.cjs +0 -1
- package/examples/node_modules/tsx/dist/index-7AaEi15b.mjs +0 -14
- package/examples/node_modules/tsx/dist/index-BWFBUo6r.cjs +0 -1
- package/examples/node_modules/tsx/dist/index-gbaejti9.mjs +0 -1
- package/examples/node_modules/tsx/dist/index-gckBtVBf.cjs +0 -14
- package/examples/node_modules/tsx/dist/lexer-DQCqS3nf.mjs +0 -3
- package/examples/node_modules/tsx/dist/lexer-DgIbo0BU.cjs +0 -3
- package/examples/node_modules/tsx/dist/loader.cjs +0 -1
- package/examples/node_modules/tsx/dist/loader.mjs +0 -1
- package/examples/node_modules/tsx/dist/node-features-_8ZFwP_x.mjs +0 -1
- package/examples/node_modules/tsx/dist/node-features-roYmp9jK.cjs +0 -1
- package/examples/node_modules/tsx/dist/package-CeBgXWuR.mjs +0 -1
- package/examples/node_modules/tsx/dist/package-Dxt5kIHw.cjs +0 -1
- package/examples/node_modules/tsx/dist/patch-repl.cjs +0 -1
- package/examples/node_modules/tsx/dist/patch-repl.mjs +0 -1
- package/examples/node_modules/tsx/dist/preflight.cjs +0 -1
- package/examples/node_modules/tsx/dist/preflight.mjs +0 -1
- package/examples/node_modules/tsx/dist/register-2sWVXuRQ.cjs +0 -1
- package/examples/node_modules/tsx/dist/register-B7jrtLTO.mjs +0 -1
- package/examples/node_modules/tsx/dist/register-CFH5oNdT.mjs +0 -4
- package/examples/node_modules/tsx/dist/register-D46fvsV_.cjs +0 -4
- package/examples/node_modules/tsx/dist/repl.cjs +0 -3
- package/examples/node_modules/tsx/dist/repl.mjs +0 -3
- package/examples/node_modules/tsx/dist/require-D4F1Lv60.cjs +0 -1
- package/examples/node_modules/tsx/dist/require-DQxpCAr4.mjs +0 -1
- package/examples/node_modules/tsx/dist/suppress-warnings.cjs +0 -1
- package/examples/node_modules/tsx/dist/suppress-warnings.mjs +0 -1
- package/examples/node_modules/tsx/dist/temporary-directory-B83uKxJF.cjs +0 -1
- package/examples/node_modules/tsx/dist/temporary-directory-CwHp0_NW.mjs +0 -1
- package/examples/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +0 -5
- package/examples/node_modules/tsx/package.json +0 -68
package/src/utils/address.d.ts
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks if string is a valid address (32 bytes, 66 hex characters).
|
|
3
|
-
* @param {string} address
|
|
4
|
-
* @returns {boolean}
|
|
5
|
-
*/
|
|
6
|
-
export function isAddress(address: string): boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Returns normalized address.
|
|
9
|
-
* Note: QuantumCoin checksumming uses QuantumCoin conventions; currently this normalizes to lowercase.
|
|
10
|
-
* @param {string} address
|
|
11
|
-
* @returns {string}
|
|
12
|
-
*/
|
|
13
|
-
export function getAddress(address: string): string;
|
|
14
|
-
/**
|
|
15
|
-
* Returns true if value is an object implementing Addressable (has getAddress()).
|
|
16
|
-
* @param {any} value
|
|
17
|
-
* @returns {boolean}
|
|
18
|
-
*/
|
|
19
|
-
export function isAddressable(value: any): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Resolve an AddressLike into a string address.
|
|
22
|
-
* For QuantumCoin, ENS is not supported.
|
|
23
|
-
* @param {any} target
|
|
24
|
-
* @returns {string|Promise<string>}
|
|
25
|
-
*/
|
|
26
|
-
export function resolveAddress(target: any): string | Promise<string>;
|
|
27
|
-
/**
|
|
28
|
-
* Calculates contract address from deployer and nonce.
|
|
29
|
-
* @param {{ from: string, nonce: number }} tx
|
|
30
|
-
* @returns {string}
|
|
31
|
-
*/
|
|
32
|
-
export function getContractAddress(tx: {
|
|
33
|
-
from: string;
|
|
34
|
-
nonce: number;
|
|
35
|
-
}): string;
|
|
36
|
-
/**
|
|
37
|
-
* Alias for getContractAddress.
|
|
38
|
-
* @param {{ from: string, nonce: number }} tx
|
|
39
|
-
* @returns {string}
|
|
40
|
-
*/
|
|
41
|
-
export function getCreateAddress(tx: {
|
|
42
|
-
from: string;
|
|
43
|
-
nonce: number;
|
|
44
|
-
}): string;
|
|
45
|
-
/**
|
|
46
|
-
* Calculates CREATE2 contract address.
|
|
47
|
-
* @param {string} from
|
|
48
|
-
* @param {string} salt
|
|
49
|
-
* @param {string} initCodeHash
|
|
50
|
-
* @returns {string}
|
|
51
|
-
*/
|
|
52
|
-
export function getCreate2Address(from: string, salt: string, initCodeHash: string): string;
|
|
53
|
-
/**
|
|
54
|
-
* Computes address from a public key.
|
|
55
|
-
* @param {string|Uint8Array} key
|
|
56
|
-
* @returns {string}
|
|
57
|
-
*/
|
|
58
|
-
export function computeAddress(key: string | Uint8Array): string;
|
|
1
|
+
/**
|
|
2
|
+
* Checks if string is a valid address (32 bytes, 66 hex characters).
|
|
3
|
+
* @param {string} address
|
|
4
|
+
* @returns {boolean}
|
|
5
|
+
*/
|
|
6
|
+
export function isAddress(address: string): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Returns normalized address.
|
|
9
|
+
* Note: QuantumCoin checksumming uses QuantumCoin conventions; currently this normalizes to lowercase.
|
|
10
|
+
* @param {string} address
|
|
11
|
+
* @returns {string}
|
|
12
|
+
*/
|
|
13
|
+
export function getAddress(address: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Returns true if value is an object implementing Addressable (has getAddress()).
|
|
16
|
+
* @param {any} value
|
|
17
|
+
* @returns {boolean}
|
|
18
|
+
*/
|
|
19
|
+
export function isAddressable(value: any): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve an AddressLike into a string address.
|
|
22
|
+
* For QuantumCoin, ENS is not supported.
|
|
23
|
+
* @param {any} target
|
|
24
|
+
* @returns {string|Promise<string>}
|
|
25
|
+
*/
|
|
26
|
+
export function resolveAddress(target: any): string | Promise<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Calculates contract address from deployer and nonce.
|
|
29
|
+
* @param {{ from: string, nonce: number }} tx
|
|
30
|
+
* @returns {string}
|
|
31
|
+
*/
|
|
32
|
+
export function getContractAddress(tx: {
|
|
33
|
+
from: string;
|
|
34
|
+
nonce: number;
|
|
35
|
+
}): string;
|
|
36
|
+
/**
|
|
37
|
+
* Alias for getContractAddress.
|
|
38
|
+
* @param {{ from: string, nonce: number }} tx
|
|
39
|
+
* @returns {string}
|
|
40
|
+
*/
|
|
41
|
+
export function getCreateAddress(tx: {
|
|
42
|
+
from: string;
|
|
43
|
+
nonce: number;
|
|
44
|
+
}): string;
|
|
45
|
+
/**
|
|
46
|
+
* Calculates CREATE2 contract address.
|
|
47
|
+
* @param {string} from
|
|
48
|
+
* @param {string} salt
|
|
49
|
+
* @param {string} initCodeHash
|
|
50
|
+
* @returns {string}
|
|
51
|
+
*/
|
|
52
|
+
export function getCreate2Address(from: string, salt: string, initCodeHash: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Computes address from a public key.
|
|
55
|
+
* @param {string|Uint8Array} key
|
|
56
|
+
* @returns {string}
|
|
57
|
+
*/
|
|
58
|
+
export function computeAddress(key: string | Uint8Array): string;
|
package/src/utils/encoding.d.ts
CHANGED
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
export type BytesLike = string | Uint8Array;
|
|
2
|
-
/**
|
|
3
|
-
* @typedef {string | Uint8Array} BytesLike
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Converts bytes to UTF-8 string.
|
|
7
|
-
* @param {BytesLike} data
|
|
8
|
-
* @returns {string}
|
|
9
|
-
*/
|
|
10
|
-
export function toUtf8String(data: BytesLike): string;
|
|
11
|
-
/**
|
|
12
|
-
* Converts string to UTF-8 bytes.
|
|
13
|
-
* @param {string} str
|
|
14
|
-
* @returns {Uint8Array}
|
|
15
|
-
*/
|
|
16
|
-
export function toUtf8Bytes(str: string): Uint8Array;
|
|
17
|
-
/**
|
|
18
|
-
* Converts data to hex string.
|
|
19
|
-
* @param {BytesLike} data
|
|
20
|
-
* @returns {string}
|
|
21
|
-
*/
|
|
22
|
-
export function toHex(data: BytesLike): string;
|
|
23
|
-
/**
|
|
24
|
-
* Alias for toHex.
|
|
25
|
-
* @param {BytesLike} data
|
|
26
|
-
* @returns {string}
|
|
27
|
-
*/
|
|
28
|
-
export function hexlify(data: BytesLike): string;
|
|
29
|
-
/**
|
|
30
|
-
* Converts data to byte array.
|
|
31
|
-
* @param {BytesLike} data
|
|
32
|
-
* @returns {Uint8Array}
|
|
33
|
-
*/
|
|
34
|
-
export function arrayify(data: BytesLike): Uint8Array;
|
|
35
|
-
/**
|
|
36
|
-
* Concatenates byte arrays and returns a hex string.
|
|
37
|
-
* @param {BytesLike[]} items
|
|
38
|
-
* @returns {string}
|
|
39
|
-
*/
|
|
40
|
-
export function concat(items: BytesLike[]): string;
|
|
41
|
-
/**
|
|
42
|
-
* Strips leading zeros from a hex string.
|
|
43
|
-
* @param {BytesLike} data
|
|
44
|
-
* @returns {string}
|
|
45
|
-
*/
|
|
46
|
-
export function stripZerosLeft(data: BytesLike): string;
|
|
47
|
-
/**
|
|
48
|
-
* Encodes a short UTF-8 string into a bytes32 hex string.
|
|
49
|
-
* @param {string} text
|
|
50
|
-
* @returns {string}
|
|
51
|
-
*/
|
|
52
|
-
export function encodeBytes32String(text: string): string;
|
|
53
|
-
/**
|
|
54
|
-
* Decodes a bytes32 hex string into a UTF-8 string (trailing zeros stripped).
|
|
55
|
-
* @param {BytesLike} bytes
|
|
56
|
-
* @returns {string}
|
|
57
|
-
*/
|
|
58
|
-
export function decodeBytes32String(bytes: BytesLike): string;
|
|
59
|
-
/**
|
|
60
|
-
* Decode Base58 string to bytes.
|
|
61
|
-
* @param {string} data
|
|
62
|
-
* @returns {Uint8Array}
|
|
63
|
-
*/
|
|
64
|
-
export function decodeBase58(data: string): Uint8Array;
|
|
65
|
-
/**
|
|
66
|
-
* Base64 decode to bytes.
|
|
67
|
-
* @param {string} data
|
|
68
|
-
* @returns {Uint8Array}
|
|
69
|
-
*/
|
|
70
|
-
export function decodeBase64(data: string): Uint8Array;
|
|
71
|
-
/**
|
|
72
|
-
* Encode BytesLike as Base58.
|
|
73
|
-
* @param {BytesLike} data
|
|
74
|
-
* @returns {string}
|
|
75
|
-
*/
|
|
76
|
-
export function encodeBase58(data: BytesLike): string;
|
|
77
|
-
/**
|
|
78
|
-
* Base64 encode BytesLike.
|
|
79
|
-
* @param {BytesLike} data
|
|
80
|
-
* @returns {string}
|
|
81
|
-
*/
|
|
82
|
-
export function encodeBase64(data: BytesLike): string;
|
|
83
|
-
/**
|
|
84
|
-
* Returns UTF-8 code points for a string.
|
|
85
|
-
* @param {string} str
|
|
86
|
-
* @returns {number[]}
|
|
87
|
-
*/
|
|
88
|
-
export function toUtf8CodePoints(str: string): number[];
|
|
89
|
-
import { isHexString } from "../internal/hex";
|
|
90
|
-
/**
|
|
91
|
-
* Returns true if value is BytesLike.
|
|
92
|
-
* @param {any} value
|
|
93
|
-
* @returns {boolean}
|
|
94
|
-
*/
|
|
95
|
-
export function isBytesLike(value: any): boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Pads a BytesLike value to the left with zeros (byte length).
|
|
98
|
-
* @param {BytesLike} value
|
|
99
|
-
* @param {number} length
|
|
100
|
-
* @returns {string}
|
|
101
|
-
*/
|
|
102
|
-
export function zeroPad(value: BytesLike, length: number): string;
|
|
103
|
-
/**
|
|
104
|
-
* Pads a hex value (interpreted as bytes) to the left with zeros (byte length).
|
|
105
|
-
* @param {BytesLike} value
|
|
106
|
-
* @param {number} length
|
|
107
|
-
* @returns {string}
|
|
108
|
-
*/
|
|
109
|
-
export function zeroPadValue(value: BytesLike, length: number): string;
|
|
110
|
-
/**
|
|
111
|
-
* Solidity packed encoding.
|
|
112
|
-
* This is a complex helper in ethers.js; in QuantumCoin.js it is currently not implemented.
|
|
113
|
-
* @throws
|
|
114
|
-
*/
|
|
115
|
-
export function solidityPacked(): void;
|
|
116
|
-
export function solidityPackedKeccak256(): void;
|
|
117
|
-
export function solidityPackedSha256(): void;
|
|
118
|
-
import { bytesToHex } from "../internal/hex";
|
|
119
|
-
import { hexToBytes } from "../internal/hex";
|
|
120
|
-
export { isHexString, bytesToHex, hexToBytes };
|
|
1
|
+
export type BytesLike = string | Uint8Array;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef {string | Uint8Array} BytesLike
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Converts bytes to UTF-8 string.
|
|
7
|
+
* @param {BytesLike} data
|
|
8
|
+
* @returns {string}
|
|
9
|
+
*/
|
|
10
|
+
export function toUtf8String(data: BytesLike): string;
|
|
11
|
+
/**
|
|
12
|
+
* Converts string to UTF-8 bytes.
|
|
13
|
+
* @param {string} str
|
|
14
|
+
* @returns {Uint8Array}
|
|
15
|
+
*/
|
|
16
|
+
export function toUtf8Bytes(str: string): Uint8Array;
|
|
17
|
+
/**
|
|
18
|
+
* Converts data to hex string.
|
|
19
|
+
* @param {BytesLike} data
|
|
20
|
+
* @returns {string}
|
|
21
|
+
*/
|
|
22
|
+
export function toHex(data: BytesLike): string;
|
|
23
|
+
/**
|
|
24
|
+
* Alias for toHex.
|
|
25
|
+
* @param {BytesLike} data
|
|
26
|
+
* @returns {string}
|
|
27
|
+
*/
|
|
28
|
+
export function hexlify(data: BytesLike): string;
|
|
29
|
+
/**
|
|
30
|
+
* Converts data to byte array.
|
|
31
|
+
* @param {BytesLike} data
|
|
32
|
+
* @returns {Uint8Array}
|
|
33
|
+
*/
|
|
34
|
+
export function arrayify(data: BytesLike): Uint8Array;
|
|
35
|
+
/**
|
|
36
|
+
* Concatenates byte arrays and returns a hex string.
|
|
37
|
+
* @param {BytesLike[]} items
|
|
38
|
+
* @returns {string}
|
|
39
|
+
*/
|
|
40
|
+
export function concat(items: BytesLike[]): string;
|
|
41
|
+
/**
|
|
42
|
+
* Strips leading zeros from a hex string.
|
|
43
|
+
* @param {BytesLike} data
|
|
44
|
+
* @returns {string}
|
|
45
|
+
*/
|
|
46
|
+
export function stripZerosLeft(data: BytesLike): string;
|
|
47
|
+
/**
|
|
48
|
+
* Encodes a short UTF-8 string into a bytes32 hex string.
|
|
49
|
+
* @param {string} text
|
|
50
|
+
* @returns {string}
|
|
51
|
+
*/
|
|
52
|
+
export function encodeBytes32String(text: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Decodes a bytes32 hex string into a UTF-8 string (trailing zeros stripped).
|
|
55
|
+
* @param {BytesLike} bytes
|
|
56
|
+
* @returns {string}
|
|
57
|
+
*/
|
|
58
|
+
export function decodeBytes32String(bytes: BytesLike): string;
|
|
59
|
+
/**
|
|
60
|
+
* Decode Base58 string to bytes.
|
|
61
|
+
* @param {string} data
|
|
62
|
+
* @returns {Uint8Array}
|
|
63
|
+
*/
|
|
64
|
+
export function decodeBase58(data: string): Uint8Array;
|
|
65
|
+
/**
|
|
66
|
+
* Base64 decode to bytes.
|
|
67
|
+
* @param {string} data
|
|
68
|
+
* @returns {Uint8Array}
|
|
69
|
+
*/
|
|
70
|
+
export function decodeBase64(data: string): Uint8Array;
|
|
71
|
+
/**
|
|
72
|
+
* Encode BytesLike as Base58.
|
|
73
|
+
* @param {BytesLike} data
|
|
74
|
+
* @returns {string}
|
|
75
|
+
*/
|
|
76
|
+
export function encodeBase58(data: BytesLike): string;
|
|
77
|
+
/**
|
|
78
|
+
* Base64 encode BytesLike.
|
|
79
|
+
* @param {BytesLike} data
|
|
80
|
+
* @returns {string}
|
|
81
|
+
*/
|
|
82
|
+
export function encodeBase64(data: BytesLike): string;
|
|
83
|
+
/**
|
|
84
|
+
* Returns UTF-8 code points for a string.
|
|
85
|
+
* @param {string} str
|
|
86
|
+
* @returns {number[]}
|
|
87
|
+
*/
|
|
88
|
+
export function toUtf8CodePoints(str: string): number[];
|
|
89
|
+
import { isHexString } from "../internal/hex";
|
|
90
|
+
/**
|
|
91
|
+
* Returns true if value is BytesLike.
|
|
92
|
+
* @param {any} value
|
|
93
|
+
* @returns {boolean}
|
|
94
|
+
*/
|
|
95
|
+
export function isBytesLike(value: any): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Pads a BytesLike value to the left with zeros (byte length).
|
|
98
|
+
* @param {BytesLike} value
|
|
99
|
+
* @param {number} length
|
|
100
|
+
* @returns {string}
|
|
101
|
+
*/
|
|
102
|
+
export function zeroPad(value: BytesLike, length: number): string;
|
|
103
|
+
/**
|
|
104
|
+
* Pads a hex value (interpreted as bytes) to the left with zeros (byte length).
|
|
105
|
+
* @param {BytesLike} value
|
|
106
|
+
* @param {number} length
|
|
107
|
+
* @returns {string}
|
|
108
|
+
*/
|
|
109
|
+
export function zeroPadValue(value: BytesLike, length: number): string;
|
|
110
|
+
/**
|
|
111
|
+
* Solidity packed encoding.
|
|
112
|
+
* This is a complex helper in ethers.js; in QuantumCoin.js it is currently not implemented.
|
|
113
|
+
* @throws
|
|
114
|
+
*/
|
|
115
|
+
export function solidityPacked(): void;
|
|
116
|
+
export function solidityPackedKeccak256(): void;
|
|
117
|
+
export function solidityPackedSha256(): void;
|
|
118
|
+
import { bytesToHex } from "../internal/hex";
|
|
119
|
+
import { hexToBytes } from "../internal/hex";
|
|
120
|
+
export { isHexString, bytesToHex, hexToBytes };
|