@norionsoft/hd-derivations 1.0.0-beta.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 +21 -0
- package/NOTICE +3 -0
- package/README.md +263 -0
- package/build/browser/__vite-plugin-wasm-helper-C1xNeBGZ.js +43 -0
- package/build/browser/_commonjs-dynamic-modules-COweQ1RR.js +5 -0
- package/build/browser/_commonjsHelpers-BFTU3MAI.js +7 -0
- package/build/browser/_u64-C6ZvL3pZ.js +294 -0
- package/build/browser/asU8a-CLKx5k5t.js +368 -0
- package/build/browser/bchaddr-DGcVCvZc.js +2340 -0
- package/build/browser/bip32-CTos7K79.js +421 -0
- package/build/browser/bip39-BO8UvXuy.js +126 -0
- package/build/browser/bn-C5dpaNMj.js +5753 -0
- package/build/browser/bn-DgUofJEE.js +208 -0
- package/build/browser/browser-D9H9snNo.js +200 -0
- package/build/browser/bundle-DjgjuASd.js +1024 -0
- package/build/browser/cardano_serialization_lib-CUQYtJ2C.js +8176 -0
- package/build/browser/chunk-NP2IAUME-CAEfhdp2.js +3708 -0
- package/build/browser/concat-CTfq9e-u.js +50 -0
- package/build/browser/constructor-parameters.type-KUUHqGZo.js +7 -0
- package/build/browser/curve-BQUaAlAt.js +1015 -0
- package/build/browser/curve-to-key-pair-deriver.map-B3KvVk1f.js +361 -0
- package/build/browser/ecc-CVvMF8il.js +767 -0
- package/build/browser/ed25519-B6yJrRe1.js +2012 -0
- package/build/browser/ed25519-BcS7UiUJ.js +796 -0
- package/build/browser/fromSeed-DfhShSKz.js +34 -0
- package/build/browser/hmac-uNq7SSgZ.js +92 -0
- package/build/browser/index-B2kUtIg3.js +5 -0
- package/build/browser/index-B9eKIG8a.js +12529 -0
- package/build/browser/index-BHlS2yKt.js +54 -0
- package/build/browser/index-Bsx2kz1h.js +94 -0
- package/build/browser/index-C-AzWeCk.js +348 -0
- package/build/browser/index-CGhg1ff2.js +225 -0
- package/build/browser/index-CjeBPB5t.js +2351 -0
- package/build/browser/index-Ck3jGVpv.js +31973 -0
- package/build/browser/index-Cm6DbuGy.js +228 -0
- package/build/browser/index-DKwEqsef.js +25137 -0
- package/build/browser/index-DLh-Q5iN.js +27012 -0
- package/build/browser/index-DiZOBxXK.js +128 -0
- package/build/browser/index-DylAEDgY.js +275 -0
- package/build/browser/index-LPPD5rBo.js +5784 -0
- package/build/browser/index-wm134jHV.js +3 -0
- package/build/browser/index.d.ts +5 -0
- package/build/browser/index.d.ts.map +1 -0
- package/build/browser/index.js +3 -0
- package/build/browser/legacy-2kU1YJKP.js +122 -0
- package/build/browser/legacy-CeOtyvCs.js +122 -0
- package/build/browser/libs/constants/index.d.ts +7 -0
- package/build/browser/libs/constants/index.d.ts.map +1 -0
- package/build/browser/libs/constants/index.js +7 -0
- package/build/browser/libs/enums/curve.type.d.ts +11 -0
- package/build/browser/libs/enums/curve.type.d.ts.map +1 -0
- package/build/browser/libs/enums/curve.type.js +8 -0
- package/build/browser/libs/enums/derivation-path-symbol.enum.d.ts +9 -0
- package/build/browser/libs/enums/derivation-path-symbol.enum.d.ts.map +1 -0
- package/build/browser/libs/enums/derivation-path-symbol.enum.js +9 -0
- package/build/browser/libs/enums/enums.d.ts +6 -0
- package/build/browser/libs/enums/enums.d.ts.map +1 -0
- package/build/browser/libs/enums/enums.js +5 -0
- package/build/browser/libs/enums/exception-message.enum.d.ts +9 -0
- package/build/browser/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/browser/libs/enums/exception-message.enum.js +9 -0
- package/build/browser/libs/enums/splitted-derivation-path-item-index.enum.d.ts +8 -0
- package/build/browser/libs/enums/splitted-derivation-path-item-index.enum.d.ts.map +1 -0
- package/build/browser/libs/enums/splitted-derivation-path-item-index.enum.js +8 -0
- package/build/browser/libs/enums/thirty-two-byte-private-key-index.enum.d.ts +6 -0
- package/build/browser/libs/enums/thirty-two-byte-private-key-index.enum.d.ts.map +1 -0
- package/build/browser/libs/enums/thirty-two-byte-private-key-index.enum.js +6 -0
- package/build/browser/libs/exceptions/index.d.ts +2 -0
- package/build/browser/libs/exceptions/index.d.ts.map +1 -0
- package/build/browser/libs/exceptions/index.js +1 -0
- package/build/browser/libs/exceptions/validation-error.exception.d.ts +5 -0
- package/build/browser/libs/exceptions/validation-error.exception.d.ts.map +1 -0
- package/build/browser/libs/exceptions/validation-error.exception.js +9 -0
- package/build/browser/libs/helpers/append-address-to-derivation-path.helper.d.ts +10 -0
- package/build/browser/libs/helpers/append-address-to-derivation-path.helper.d.ts.map +1 -0
- package/build/browser/libs/helpers/append-address-to-derivation-path.helper.js +22 -0
- package/build/browser/libs/helpers/check-hardened-suffix-ending.helper.d.ts +3 -0
- package/build/browser/libs/helpers/check-hardened-suffix-ending.helper.d.ts.map +1 -0
- package/build/browser/libs/helpers/check-hardened-suffix-ending.helper.js +7 -0
- package/build/browser/libs/helpers/get-derivation-path-segments.helper.d.ts +3 -0
- package/build/browser/libs/helpers/get-derivation-path-segments.helper.d.ts.map +1 -0
- package/build/browser/libs/helpers/get-derivation-path-segments.helper.js +7 -0
- package/build/browser/libs/helpers/harden-derivation-path-value.helper.d.ts +3 -0
- package/build/browser/libs/helpers/harden-derivation-path-value.helper.d.ts.map +1 -0
- package/build/browser/libs/helpers/harden-derivation-path-value.helper.js +8 -0
- package/build/browser/libs/helpers/helpers.d.ts +5 -0
- package/build/browser/libs/helpers/helpers.d.ts.map +1 -0
- package/build/browser/libs/helpers/helpers.js +4 -0
- package/build/browser/libs/modules/address/address.d.ts +3 -0
- package/build/browser/libs/modules/address/address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/address.js +21 -0
- package/build/browser/libs/modules/address/libs/enums/enums.d.ts +2 -0
- package/build/browser/libs/modules/address/libs/enums/enums.d.ts.map +1 -0
- package/build/browser/libs/modules/address/libs/enums/enums.js +1 -0
- package/build/browser/libs/modules/address/libs/enums/exception-message.enum.d.ts +5 -0
- package/build/browser/libs/modules/address/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/browser/libs/modules/address/libs/enums/exception-message.enum.js +5 -0
- package/build/browser/libs/modules/address/libs/exceptions/address-error.exception.d.ts +5 -0
- package/build/browser/libs/modules/address/libs/exceptions/address-error.exception.d.ts.map +1 -0
- package/build/browser/libs/modules/address/libs/exceptions/address-error.exception.js +9 -0
- package/build/browser/libs/modules/address/libs/exceptions/index.d.ts +2 -0
- package/build/browser/libs/modules/address/libs/exceptions/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/libs/exceptions/index.js +1 -0
- package/build/browser/libs/modules/address/libs/helpers/get-evm-address-buffer.helper.d.ts +4 -0
- package/build/browser/libs/modules/address/libs/helpers/get-evm-address-buffer.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/address/libs/helpers/get-evm-address-buffer.helper.js +17 -0
- package/build/browser/libs/modules/address/libs/helpers/index.d.ts +2 -0
- package/build/browser/libs/modules/address/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/libs/helpers/index.js +1 -0
- package/build/browser/libs/modules/address/libs/types/address.type.d.ts +5 -0
- package/build/browser/libs/modules/address/libs/types/address.type.d.ts.map +1 -0
- package/build/browser/libs/modules/address/libs/types/address.type.js +1 -0
- package/build/browser/libs/modules/address/libs/types/index.d.ts +3 -0
- package/build/browser/libs/modules/address/libs/types/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/libs/types/index.js +1 -0
- package/build/browser/libs/modules/address/libs/types/ton-address-required-data.type.d.ts +14 -0
- package/build/browser/libs/modules/address/libs/types/ton-address-required-data.type.d.ts.map +1 -0
- package/build/browser/libs/modules/address/libs/types/ton-address-required-data.type.js +1 -0
- package/build/browser/libs/modules/address/networks/ada/get-ada-exodus-address.d.ts +3 -0
- package/build/browser/libs/modules/address/networks/ada/get-ada-exodus-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/ada/get-ada-exodus-address.js +10 -0
- package/build/browser/libs/modules/address/networks/ada/get-base-address.d.ts +5 -0
- package/build/browser/libs/modules/address/networks/ada/get-base-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/ada/get-base-address.js +11 -0
- package/build/browser/libs/modules/address/networks/ada/get-enterprise-address.d.ts +5 -0
- package/build/browser/libs/modules/address/networks/ada/get-enterprise-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/ada/get-enterprise-address.js +10 -0
- package/build/browser/libs/modules/address/networks/ada/get-reward-address.d.ts +5 -0
- package/build/browser/libs/modules/address/networks/ada/get-reward-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/ada/get-reward-address.js +10 -0
- package/build/browser/libs/modules/address/networks/ada/index.d.ts +5 -0
- package/build/browser/libs/modules/address/networks/ada/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/ada/index.js +4 -0
- package/build/browser/libs/modules/address/networks/ada/libs/helpers/get-credential.helper.d.ts +4 -0
- package/build/browser/libs/modules/address/networks/ada/libs/helpers/get-credential.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/ada/libs/helpers/get-credential.helper.js +8 -0
- package/build/browser/libs/modules/address/networks/ada/libs/helpers/helpers.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/ada/libs/helpers/helpers.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/ada/libs/helpers/helpers.js +1 -0
- package/build/browser/libs/modules/address/networks/apt/get-apt-address.d.ts +5 -0
- package/build/browser/libs/modules/address/networks/apt/get-apt-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/apt/get-apt-address.js +44 -0
- package/build/browser/libs/modules/address/networks/apt/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/apt/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/apt/index.js +1 -0
- package/build/browser/libs/modules/address/networks/avax/get-avax-address.d.ts +10 -0
- package/build/browser/libs/modules/address/networks/avax/get-avax-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/avax/get-avax-address.js +15 -0
- package/build/browser/libs/modules/address/networks/avax/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/avax/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/avax/index.js +1 -0
- package/build/browser/libs/modules/address/networks/bch/get-cash-addr-address.d.ts +11 -0
- package/build/browser/libs/modules/address/networks/bch/get-cash-addr-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/bch/get-cash-addr-address.js +38 -0
- package/build/browser/libs/modules/address/networks/bch/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/bch/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/bch/index.js +1 -0
- package/build/browser/libs/modules/address/networks/bnb/get-bnb-address.d.ts +5 -0
- package/build/browser/libs/modules/address/networks/bnb/get-bnb-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/bnb/get-bnb-address.js +8 -0
- package/build/browser/libs/modules/address/networks/bnb/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/bnb/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/bnb/index.js +1 -0
- package/build/browser/libs/modules/address/networks/btc/get-p2wsh-address.d.ts +6 -0
- package/build/browser/libs/modules/address/networks/btc/get-p2wsh-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/btc/get-p2wsh-address.js +26 -0
- package/build/browser/libs/modules/address/networks/btc/get-p2wsh-in-p2sh-address.d.ts +6 -0
- package/build/browser/libs/modules/address/networks/btc/get-p2wsh-in-p2sh-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/btc/get-p2wsh-in-p2sh-address.js +34 -0
- package/build/browser/libs/modules/address/networks/btc/get-taproot-address.d.ts +6 -0
- package/build/browser/libs/modules/address/networks/btc/get-taproot-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/btc/get-taproot-address.js +458 -0
- package/build/browser/libs/modules/address/networks/btc/index.d.ts +6 -0
- package/build/browser/libs/modules/address/networks/btc/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/btc/index.js +5 -0
- package/build/browser/libs/modules/address/networks/common/get-btc-legacy-address.d.ts +6 -0
- package/build/browser/libs/modules/address/networks/common/get-btc-legacy-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/common/get-btc-legacy-address.js +23 -0
- package/build/browser/libs/modules/address/networks/common/get-btc-native-seg-wit-address.d.ts +6 -0
- package/build/browser/libs/modules/address/networks/common/get-btc-native-seg-wit-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/common/get-btc-native-seg-wit-address.js +23 -0
- package/build/browser/libs/modules/address/networks/common/get-btc-seg-wit-address.d.ts +6 -0
- package/build/browser/libs/modules/address/networks/common/get-btc-seg-wit-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/common/get-btc-seg-wit-address.js +25 -0
- package/build/browser/libs/modules/address/networks/common/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/common/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/common/index.js +1 -0
- package/build/browser/libs/modules/address/networks/dot/get-dot-address.d.ts +4 -0
- package/build/browser/libs/modules/address/networks/dot/get-dot-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/dot/get-dot-address.js +2403 -0
- package/build/browser/libs/modules/address/networks/dot/index.d.ts +3 -0
- package/build/browser/libs/modules/address/networks/dot/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/dot/index.js +1 -0
- package/build/browser/libs/modules/address/networks/dot/libs/constants/index.d.ts +4 -0
- package/build/browser/libs/modules/address/networks/dot/libs/constants/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/dot/libs/constants/index.js +4 -0
- package/build/browser/libs/modules/address/networks/dot/libs/types/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/dot/libs/types/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/dot/libs/types/index.js +1 -0
- package/build/browser/libs/modules/address/networks/dot/libs/types/ss58-format.type.d.ts +5 -0
- package/build/browser/libs/modules/address/networks/dot/libs/types/ss58-format.type.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/dot/libs/types/ss58-format.type.js +1 -0
- package/build/browser/libs/modules/address/networks/evm/get-evm-address.d.ts +5 -0
- package/build/browser/libs/modules/address/networks/evm/get-evm-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/evm/get-evm-address.js +12 -0
- package/build/browser/libs/modules/address/networks/evm/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/evm/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/evm/index.js +1 -0
- package/build/browser/libs/modules/address/networks/index.d.ts +15 -0
- package/build/browser/libs/modules/address/networks/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/index.js +21 -0
- package/build/browser/libs/modules/address/networks/sui/get-sui-address.d.ts +6 -0
- package/build/browser/libs/modules/address/networks/sui/get-sui-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/sui/get-sui-address.js +13 -0
- package/build/browser/libs/modules/address/networks/sui/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/sui/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/sui/index.js +1 -0
- package/build/browser/libs/modules/address/networks/sui/libs/helpers/get-public-key-handler.helper.d.ts +5 -0
- package/build/browser/libs/modules/address/networks/sui/libs/helpers/get-public-key-handler.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/sui/libs/helpers/get-public-key-handler.helper.js +18 -0
- package/build/browser/libs/modules/address/networks/sui/libs/helpers/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/sui/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/sui/libs/helpers/index.js +1 -0
- package/build/browser/libs/modules/address/networks/sui/libs/types/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/sui/libs/types/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/sui/libs/types/index.js +1 -0
- package/build/browser/libs/modules/address/networks/sui/libs/types/public-key-handler-union.type.d.ts +6 -0
- package/build/browser/libs/modules/address/networks/sui/libs/types/public-key-handler-union.type.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/sui/libs/types/public-key-handler-union.type.js +1 -0
- package/build/browser/libs/modules/address/networks/ton/get-ton-address.d.ts +8 -0
- package/build/browser/libs/modules/address/networks/ton/get-ton-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/ton/get-ton-address.js +36 -0
- package/build/browser/libs/modules/address/networks/ton/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/ton/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/ton/index.js +1 -0
- package/build/browser/libs/modules/address/networks/ton/libs/types/contract-version-to-contract.type.d.ts +14 -0
- package/build/browser/libs/modules/address/networks/ton/libs/types/contract-version-to-contract.type.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/ton/libs/types/contract-version-to-contract.type.js +1 -0
- package/build/browser/libs/modules/address/networks/ton/libs/types/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/ton/libs/types/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/ton/libs/types/index.js +1 -0
- package/build/browser/libs/modules/address/networks/trx/get-trx-address.d.ts +5 -0
- package/build/browser/libs/modules/address/networks/trx/get-trx-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/trx/get-trx-address.js +12 -0
- package/build/browser/libs/modules/address/networks/trx/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/trx/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/trx/index.js +1 -0
- package/build/browser/libs/modules/address/networks/xrp/get-xrp-address.d.ts +12 -0
- package/build/browser/libs/modules/address/networks/xrp/get-xrp-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/xrp/get-xrp-address.js +15 -0
- package/build/browser/libs/modules/address/networks/xrp/index.d.ts +3 -0
- package/build/browser/libs/modules/address/networks/xrp/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/xrp/index.js +1 -0
- package/build/browser/libs/modules/address/networks/xrp/libs/types/destination-tag-property.type.d.ts +5 -0
- package/build/browser/libs/modules/address/networks/xrp/libs/types/destination-tag-property.type.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/xrp/libs/types/destination-tag-property.type.js +1 -0
- package/build/browser/libs/modules/address/networks/xrp/libs/types/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/xrp/libs/types/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/xrp/libs/types/index.js +1 -0
- package/build/browser/libs/modules/address/networks/zec/get-transparent-address.d.ts +6 -0
- package/build/browser/libs/modules/address/networks/zec/get-transparent-address.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/zec/get-transparent-address.js +32 -0
- package/build/browser/libs/modules/address/networks/zec/index.d.ts +2 -0
- package/build/browser/libs/modules/address/networks/zec/index.d.ts.map +1 -0
- package/build/browser/libs/modules/address/networks/zec/index.js +1 -0
- package/build/browser/libs/modules/curves/curves.d.ts +5 -0
- package/build/browser/libs/modules/curves/curves.d.ts.map +1 -0
- package/build/browser/libs/modules/curves/curves.js +3 -0
- package/build/browser/libs/modules/curves/ed25519-curve/ed25519.curve.d.ts +10 -0
- package/build/browser/libs/modules/curves/ed25519-curve/ed25519.curve.d.ts.map +1 -0
- package/build/browser/libs/modules/curves/ed25519-curve/ed25519.curve.js +17 -0
- package/build/browser/libs/modules/curves/ed25519-curve/libs/enums/ed25519-secret-key-byte-position.enum.d.ts +6 -0
- package/build/browser/libs/modules/curves/ed25519-curve/libs/enums/ed25519-secret-key-byte-position.enum.d.ts.map +1 -0
- package/build/browser/libs/modules/curves/ed25519-curve/libs/enums/ed25519-secret-key-byte-position.enum.js +6 -0
- package/build/browser/libs/modules/curves/ed25519-curve/libs/enums/enums.d.ts +2 -0
- package/build/browser/libs/modules/curves/ed25519-curve/libs/enums/enums.d.ts.map +1 -0
- package/build/browser/libs/modules/curves/ed25519-curve/libs/enums/enums.js +1 -0
- package/build/browser/libs/modules/curves/secp256k1-curve/libs/types/bip-32.type.d.ts +6 -0
- package/build/browser/libs/modules/curves/secp256k1-curve/libs/types/bip-32.type.d.ts.map +1 -0
- package/build/browser/libs/modules/curves/secp256k1-curve/libs/types/bip-32.type.js +1 -0
- package/build/browser/libs/modules/curves/secp256k1-curve/libs/types/prefix-config.type.d.ts +6 -0
- package/build/browser/libs/modules/curves/secp256k1-curve/libs/types/prefix-config.type.d.ts.map +1 -0
- package/build/browser/libs/modules/curves/secp256k1-curve/libs/types/prefix-config.type.js +3 -0
- package/build/browser/libs/modules/curves/secp256k1-curve/libs/types/types.d.ts +3 -0
- package/build/browser/libs/modules/curves/secp256k1-curve/libs/types/types.d.ts.map +1 -0
- package/build/browser/libs/modules/curves/secp256k1-curve/libs/types/types.js +1 -0
- package/build/browser/libs/modules/curves/secp256k1-curve/secp256k1.curve.d.ts +11 -0
- package/build/browser/libs/modules/curves/secp256k1-curve/secp256k1.curve.d.ts.map +1 -0
- package/build/browser/libs/modules/curves/secp256k1-curve/secp256k1.curve.js +23 -0
- package/build/browser/libs/modules/ecc/ecc.d.ts +6 -0
- package/build/browser/libs/modules/ecc/ecc.d.ts.map +1 -0
- package/build/browser/libs/modules/ecc/ecc.js +5 -0
- package/build/browser/libs/modules/ecc/libs/types/ec-pair-interface.type.d.ts +2 -0
- package/build/browser/libs/modules/ecc/libs/types/ec-pair-interface.type.d.ts.map +1 -0
- package/build/browser/libs/modules/ecc/libs/types/ec-pair-interface.type.js +1 -0
- package/build/browser/libs/modules/ecc/libs/types/types.d.ts +2 -0
- package/build/browser/libs/modules/ecc/libs/types/types.d.ts.map +1 -0
- package/build/browser/libs/modules/ecc/libs/types/types.js +1 -0
- package/build/browser/libs/modules/key-derivation/libs/enums/enums.d.ts +2 -0
- package/build/browser/libs/modules/key-derivation/libs/enums/enums.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/enums/enums.js +1 -0
- package/build/browser/libs/modules/key-derivation/libs/enums/exception-message.enum.d.ts +5 -0
- package/build/browser/libs/modules/key-derivation/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/enums/exception-message.enum.js +5 -0
- package/build/browser/libs/modules/key-derivation/libs/exceptions/exceptions.d.ts +2 -0
- package/build/browser/libs/modules/key-derivation/libs/exceptions/exceptions.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/exceptions/exceptions.js +1 -0
- package/build/browser/libs/modules/key-derivation/libs/exceptions/key-derivation-error.exception.d.ts +5 -0
- package/build/browser/libs/modules/key-derivation/libs/exceptions/key-derivation-error.exception.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/exceptions/key-derivation-error.exception.js +9 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-node.helper.d.ts +8 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-node.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-node.helper.js +17 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-root-key.helper.d.ts +12 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-root-key.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-root-key.helper.js +18 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-key-pair-from-bip32-interface.helper.d.ts +5 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-key-pair-from-bip32-interface.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-key-pair-from-bip32-interface.helper.js +18 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-key-pair-from-private-key-bytes.helper.d.ts +7 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-key-pair-from-private-key-bytes.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-key-pair-from-private-key-bytes.helper.js +26 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-key-pair-from.wif.helper.d.ts +7 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-key-pair-from.wif.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-key-pair-from.wif.helper.js +13 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-secp256k1-node-from-mnemonic.helper.d.ts +11 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-secp256k1-node-from-mnemonic.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/get-secp256k1-node-from-mnemonic.helper.js +25 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/index.d.ts +7 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/helpers/index.js +6 -0
- package/build/browser/libs/modules/key-derivation/libs/types/abstract-key-derivation.type.d.ts +9 -0
- package/build/browser/libs/modules/key-derivation/libs/types/abstract-key-derivation.type.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/types/abstract-key-derivation.type.js +1 -0
- package/build/browser/libs/modules/key-derivation/libs/types/common-bip-derivation-type-union.type.d.ts +4 -0
- package/build/browser/libs/modules/key-derivation/libs/types/common-bip-derivation-type-union.type.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/types/common-bip-derivation-type-union.type.js +1 -0
- package/build/browser/libs/modules/key-derivation/libs/types/common-ed25519-derivation-type-union.type.d.ts +4 -0
- package/build/browser/libs/modules/key-derivation/libs/types/common-ed25519-derivation-type-union.type.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/types/common-ed25519-derivation-type-union.type.js +1 -0
- package/build/browser/libs/modules/key-derivation/libs/types/derive-from-mnemonic.type.d.ts +15 -0
- package/build/browser/libs/modules/key-derivation/libs/types/derive-from-mnemonic.type.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/types/derive-from-mnemonic.type.js +1 -0
- package/build/browser/libs/modules/key-derivation/libs/types/handlers-common-parameters.type.d.ts +11 -0
- package/build/browser/libs/modules/key-derivation/libs/types/handlers-common-parameters.type.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/types/handlers-common-parameters.type.js +1 -0
- package/build/browser/libs/modules/key-derivation/libs/types/import-by-private-key.type.d.ts +11 -0
- package/build/browser/libs/modules/key-derivation/libs/types/import-by-private-key.type.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/types/import-by-private-key.type.js +1 -0
- package/build/browser/libs/modules/key-derivation/libs/types/index.d.ts +6 -0
- package/build/browser/libs/modules/key-derivation/libs/types/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/libs/types/index.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada-base-key-derivation.d.ts +11 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada-base-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada-base-key-derivation.js +39 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada-common-key-derivation.d.ts +11 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada-common-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada-common-key-derivation.js +37 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada-exodus-key-derivation.d.ts +24 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada-exodus-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada-exodus-key-derivation.js +102 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada-ledger-key-derivation.d.ts +14 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada-ledger-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada-ledger-key-derivation.js +219 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada.d.ts +5 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/ada.js +4 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/constants/constants.d.ts +15 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/constants/constants.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/constants/constants.js +15 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/enums/ed25519-private-key-clamp.enum.d.ts +7 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/enums/ed25519-private-key-clamp.enum.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/enums/ed25519-private-key-clamp.enum.js +7 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/enums/enums.d.ts +4 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/enums/enums.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/enums/enums.js +3 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/enums/exception-message.enum.d.ts +7 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/enums/exception-message.enum.js +7 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/enums/ledger-derivation-hmac-prefix.enum.d.ts +8 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/enums/ledger-derivation-hmac-prefix.enum.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/enums/ledger-derivation-hmac-prefix.enum.js +8 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/encode-ed25519-point-to-bytes.helper.d.ts +4 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/encode-ed25519-point-to-bytes.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/encode-ed25519-point-to-bytes.helper.js +13 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-ada-ledger-extended-private-key-from-node.helper.d.ts +10 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-ada-ledger-extended-private-key-from-node.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-ada-ledger-extended-private-key-from-node.helper.js +15 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-derivation-path-numeric-values.helper.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-derivation-path-numeric-values.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-derivation-path-numeric-values.helper.js +19 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-node-raw-keys.helper.d.ts +8 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-node-raw-keys.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-node-raw-keys.helper.js +9 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-node.helper.d.ts +4 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-node.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-node.helper.js +13 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-root-key.helper.d.ts +4 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-root-key.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/get-root-key.helper.js +11 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/helpers.d.ts +8 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/helpers.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/helpers.js +7 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/multiply-ed25519-base-point-by-scalar.util.d.ts +6 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/multiply-ed25519-base-point-by-scalar.util.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/helpers/multiply-ed25519-base-point-by-scalar.util.js +23 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/types/ledger-ed25519-private-node.type.d.ts +8 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/types/ledger-ed25519-private-node.type.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/types/ledger-ed25519-private-node.type.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/types/types.d.ts +2 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/types/types.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/types/types.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/are-uint8-arrays-equal.util.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/are-uint8-arrays-equal.util.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/are-uint8-arrays-equal.util.js +13 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/big-int-to-bytes-little-endian.helper.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/big-int-to-bytes-little-endian.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/big-int-to-bytes-little-endian.helper.js +16 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/bytes-to-big-int-little-endian.util.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/bytes-to-big-int-little-endian.util.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/bytes-to-big-int-little-endian.util.js +17 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/clear-bits.util.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/clear-bits.util.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/clear-bits.util.js +5 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha256.util.d.ts +2 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha256.util.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha256.util.js +8 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha512.util.d.ts +2 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha512.util.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha512.util.js +8 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/set-bits.util.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/set-bits.util.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/set-bits.util.js +5 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/to-uint32-little-endian-bytes.util.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/to-uint32-little-endian-bytes.util.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/to-uint32-little-endian-bytes.util.js +8 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/utils.d.ts +9 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/utils.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ada/libs/utils/utils.js +8 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/apt-key-derivation.d.ts +17 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/apt-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/apt-key-derivation.js +3614 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/index.d.ts +2 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/index.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/libs/constants/index.d.ts +5 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/libs/constants/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/libs/constants/index.js +5 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/libs/maps/index.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/libs/maps/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/libs/maps/index.js +2 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-private-key-variant.map.d.ts +5 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-private-key-variant.map.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-private-key-variant.map.js +9 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-scheme-id.map.d.ts +4 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-scheme-id.map.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-scheme-id.map.js +9 -0
- package/build/browser/libs/modules/key-derivation/networks/bnb/bnb-key-derivation.d.ts +15 -0
- package/build/browser/libs/modules/key-derivation/networks/bnb/bnb-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/bnb/bnb-key-derivation.js +47 -0
- package/build/browser/libs/modules/key-derivation/networks/bnb/index.d.ts +2 -0
- package/build/browser/libs/modules/key-derivation/networks/bnb/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/bnb/index.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/btc/index.d.ts +2 -0
- package/build/browser/libs/modules/key-derivation/networks/btc/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/btc/index.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/btc/libs/helpers/index.d.ts +2 -0
- package/build/browser/libs/modules/key-derivation/networks/btc/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/btc/libs/helpers/index.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/btc/libs/helpers/to-x-only-public-key.helper.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/btc/libs/helpers/to-x-only-public-key.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/btc/libs/helpers/to-x-only-public-key.helper.js +9 -0
- package/build/browser/libs/modules/key-derivation/networks/btc/taproot-key-derivation.d.ts +15 -0
- package/build/browser/libs/modules/key-derivation/networks/btc/taproot-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/btc/taproot-key-derivation.js +43 -0
- package/build/browser/libs/modules/key-derivation/networks/common/common-bip-key-derivation.d.ts +15 -0
- package/build/browser/libs/modules/key-derivation/networks/common/common-bip-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/common/common-bip-key-derivation.js +48 -0
- package/build/browser/libs/modules/key-derivation/networks/common/common-ed25519-key-derivation.d.ts +15 -0
- package/build/browser/libs/modules/key-derivation/networks/common/common-ed25519-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/common/common-ed25519-key-derivation.js +42 -0
- package/build/browser/libs/modules/key-derivation/networks/common/index.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/common/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/common/index.js +2 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/dot-base-key-derivation.d.ts +11 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/dot-base-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/dot-base-key-derivation.js +331 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/dot-ledger-key-derivation.d.ts +11 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/dot-ledger-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/dot-ledger-key-derivation.js +217 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/dot.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/dot.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/dot.js +2 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/constants/index.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/constants/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/constants/index.js +3 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/helpers/convert-bytes-key-pair-to-hex.helper.d.ts +4 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/helpers/convert-bytes-key-pair-to-hex.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/helpers/convert-bytes-key-pair-to-hex.helper.js +10 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/helpers/helpers.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/helpers/helpers.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/helpers/helpers.js +2 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/helpers/import-by-private-key.helper.d.ts +5 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/helpers/import-by-private-key.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/helpers/import-by-private-key.helper.js +13 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-deriver.map.d.ts +5 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-deriver.map.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-deriver.map.js +2 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-type.map.d.ts +5 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-type.map.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-type.map.js +7 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-public-key-deriver.map.d.ts +4 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-public-key-deriver.map.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-public-key-deriver.map.js +50 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/maps/maps.d.ts +4 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/maps/maps.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/dot/libs/maps/maps.js +3 -0
- package/build/browser/libs/modules/key-derivation/networks/evm/evm-key-derivation.d.ts +15 -0
- package/build/browser/libs/modules/key-derivation/networks/evm/evm-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/evm/evm-key-derivation.js +51 -0
- package/build/browser/libs/modules/key-derivation/networks/evm/index.d.ts +2 -0
- package/build/browser/libs/modules/key-derivation/networks/evm/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/evm/index.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/index.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/index.js +2 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-key-pair.helper.d.ts +4 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-key-pair.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-key-pair.helper.js +12 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-public-key.helper.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-public-key.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-public-key.helper.js +7 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/libs/helpers/helpers.d.ts +4 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/libs/helpers/helpers.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/libs/helpers/helpers.js +3 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/libs/helpers/import-by-private-key.helper.d.ts +5 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/libs/helpers/import-by-private-key.helper.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/libs/helpers/import-by-private-key.helper.js +15 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/sol-base-key-derivation.d.ts +13 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/sol-base-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/sol-base-key-derivation.js +31 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/sol-exodus-key-derivation.d.ts +14 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/sol-exodus-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sol/sol-exodus-key-derivation.js +37 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/index.d.ts +2 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/index.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/libs/types/index.d.ts +3 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/libs/types/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/libs/types/index.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/libs/types/key-pair-instance-union.type.d.ts +6 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/libs/types/key-pair-instance-union.type.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/libs/types/key-pair-instance-union.type.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/libs/types/key-pair-union.type.d.ts +6 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/libs/types/key-pair-union.type.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/libs/types/key-pair-union.type.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/sui-key-derivation.d.ts +13 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/sui-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/sui/sui-key-derivation.js +872 -0
- package/build/browser/libs/modules/key-derivation/networks/ton/ton-exodus-key-derivation.d.ts +14 -0
- package/build/browser/libs/modules/key-derivation/networks/ton/ton-exodus-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ton/ton-exodus-key-derivation.js +40 -0
- package/build/browser/libs/modules/key-derivation/networks/ton/ton.d.ts +2 -0
- package/build/browser/libs/modules/key-derivation/networks/ton/ton.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/ton/ton.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/zec/index.d.ts +2 -0
- package/build/browser/libs/modules/key-derivation/networks/zec/index.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/zec/index.js +1 -0
- package/build/browser/libs/modules/key-derivation/networks/zec/transparent-key-derivation.d.ts +14 -0
- package/build/browser/libs/modules/key-derivation/networks/zec/transparent-key-derivation.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks/zec/transparent-key-derivation.js +66 -0
- package/build/browser/libs/modules/key-derivation/networks.d.ts +12 -0
- package/build/browser/libs/modules/key-derivation/networks.d.ts.map +1 -0
- package/build/browser/libs/modules/key-derivation/networks.js +17 -0
- package/build/browser/libs/modules/mnemonic/dot-mnemonic.d.ts +9 -0
- package/build/browser/libs/modules/mnemonic/dot-mnemonic.d.ts.map +1 -0
- package/build/browser/libs/modules/mnemonic/dot-mnemonic.js +38 -0
- package/build/browser/libs/modules/mnemonic/index.d.ts +3 -0
- package/build/browser/libs/modules/mnemonic/index.d.ts.map +1 -0
- package/build/browser/libs/modules/mnemonic/index.js +2 -0
- package/build/browser/libs/modules/mnemonic/libs/constants/index.d.ts +4 -0
- package/build/browser/libs/modules/mnemonic/libs/constants/index.d.ts.map +1 -0
- package/build/browser/libs/modules/mnemonic/libs/constants/index.js +4 -0
- package/build/browser/libs/modules/mnemonic/libs/enums/exception-message.enum.d.ts +7 -0
- package/build/browser/libs/modules/mnemonic/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/browser/libs/modules/mnemonic/libs/enums/exception-message.enum.js +10 -0
- package/build/browser/libs/modules/mnemonic/libs/enums/index.d.ts +2 -0
- package/build/browser/libs/modules/mnemonic/libs/enums/index.d.ts.map +1 -0
- package/build/browser/libs/modules/mnemonic/libs/enums/index.js +1 -0
- package/build/browser/libs/modules/mnemonic/libs/exceptions/index.d.ts +2 -0
- package/build/browser/libs/modules/mnemonic/libs/exceptions/index.d.ts.map +1 -0
- package/build/browser/libs/modules/mnemonic/libs/exceptions/index.js +1 -0
- package/build/browser/libs/modules/mnemonic/libs/exceptions/mnemonic-error.exception.d.ts +5 -0
- package/build/browser/libs/modules/mnemonic/libs/exceptions/mnemonic-error.exception.d.ts.map +1 -0
- package/build/browser/libs/modules/mnemonic/libs/exceptions/mnemonic-error.exception.js +9 -0
- package/build/browser/libs/modules/mnemonic/mnemonic.d.ts +11 -0
- package/build/browser/libs/modules/mnemonic/mnemonic.d.ts.map +1 -0
- package/build/browser/libs/modules/mnemonic/mnemonic.js +38 -0
- package/build/browser/libs/types/auth-scheme-union.type.d.ts +3 -0
- package/build/browser/libs/types/auth-scheme-union.type.d.ts.map +1 -0
- package/build/browser/libs/types/auth-scheme-union.type.js +1 -0
- package/build/browser/libs/types/derivation/derivation-path.type.d.ts +11 -0
- package/build/browser/libs/types/derivation/derivation-path.type.d.ts.map +1 -0
- package/build/browser/libs/types/derivation/derivation-path.type.js +1 -0
- package/build/browser/libs/types/derivation/derivation-type-union.type.d.ts +32 -0
- package/build/browser/libs/types/derivation/derivation-type-union.type.d.ts.map +1 -0
- package/build/browser/libs/types/derivation/derivation-type-union.type.js +1 -0
- package/build/browser/libs/types/derivation/types.d.ts +3 -0
- package/build/browser/libs/types/derivation/types.d.ts.map +1 -0
- package/build/browser/libs/types/derivation/types.js +1 -0
- package/build/browser/libs/types/keys/index.d.ts +3 -0
- package/build/browser/libs/types/keys/index.d.ts.map +1 -0
- package/build/browser/libs/types/keys/index.js +1 -0
- package/build/browser/libs/types/keys/key-pair.type.d.ts +12 -0
- package/build/browser/libs/types/keys/key-pair.type.d.ts.map +1 -0
- package/build/browser/libs/types/keys/key-pair.type.js +1 -0
- package/build/browser/libs/types/keys/private-key.type.d.ts +11 -0
- package/build/browser/libs/types/keys/private-key.type.d.ts.map +1 -0
- package/build/browser/libs/types/keys/private-key.type.js +1 -0
- package/build/browser/libs/types/types.d.ts +5 -0
- package/build/browser/libs/types/types.d.ts.map +1 -0
- package/build/browser/libs/types/types.js +1 -0
- package/build/browser/libs/types/value-of.type.d.ts +6 -0
- package/build/browser/libs/types/value-of.type.d.ts.map +1 -0
- package/build/browser/libs/types/value-of.type.js +1 -0
- package/build/browser/libs/utils/add-hex-prefix.util.d.ts +3 -0
- package/build/browser/libs/utils/add-hex-prefix.util.d.ts.map +1 -0
- package/build/browser/libs/utils/add-hex-prefix.util.js +8 -0
- package/build/browser/libs/utils/check-and-remove-hex-prefix.util.d.ts +3 -0
- package/build/browser/libs/utils/check-and-remove-hex-prefix.util.d.ts.map +1 -0
- package/build/browser/libs/utils/check-and-remove-hex-prefix.util.js +8 -0
- package/build/browser/libs/utils/convert-bytes-to-hex.util.d.ts +3 -0
- package/build/browser/libs/utils/convert-bytes-to-hex.util.d.ts.map +1 -0
- package/build/browser/libs/utils/convert-bytes-to-hex.util.js +7 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/convert-hex-to-bytes.util.d.ts +3 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/convert-hex-to-bytes.util.d.ts.map +1 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/convert-hex-to-bytes.util.js +16 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/index.d.ts +2 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/index.d.ts.map +1 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/index.js +1 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/libs/constants/index.d.ts +4 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/libs/constants/index.d.ts.map +1 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/libs/constants/index.js +4 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/libs/enums/exception-message.enum.d.ts +5 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/libs/enums/exception-message.enum.js +5 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/libs/enums/index.d.ts +2 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/libs/enums/index.d.ts.map +1 -0
- package/build/browser/libs/utils/convert-hex-to-bytes/libs/enums/index.js +1 -0
- package/build/browser/libs/utils/index.d.ts +7 -0
- package/build/browser/libs/utils/index.d.ts.map +1 -0
- package/build/browser/libs/utils/index.js +6 -0
- package/build/browser/libs/utils/is-hex-prefixed.util.d.ts +3 -0
- package/build/browser/libs/utils/is-hex-prefixed.util.d.ts.map +1 -0
- package/build/browser/libs/utils/is-hex-prefixed.util.js +7 -0
- package/build/browser/libs/utils/remove-hex-prefix.util.d.ts +3 -0
- package/build/browser/libs/utils/remove-hex-prefix.util.d.ts.map +1 -0
- package/build/browser/libs/utils/remove-hex-prefix.util.js +8 -0
- package/build/browser/modules/network/ada/ada.network.d.ts +12 -0
- package/build/browser/modules/network/ada/ada.network.d.ts.map +1 -0
- package/build/browser/modules/network/ada/ada.network.js +69 -0
- package/build/browser/modules/network/ada/index.d.ts +2 -0
- package/build/browser/modules/network/ada/index.d.ts.map +1 -0
- package/build/browser/modules/network/ada/index.js +1 -0
- package/build/browser/modules/network/ada/libs/helpers/get-derivation-handlers.helper.d.ts +8 -0
- package/build/browser/modules/network/ada/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/ada/libs/helpers/get-derivation-handlers.helper.js +360 -0
- package/build/browser/modules/network/ada/libs/helpers/get-network-id.helper.d.ts +4 -0
- package/build/browser/modules/network/ada/libs/helpers/get-network-id.helper.d.ts.map +1 -0
- package/build/browser/modules/network/ada/libs/helpers/get-network-id.helper.js +17 -0
- package/build/browser/modules/network/ada/libs/helpers/helpers.d.ts +3 -0
- package/build/browser/modules/network/ada/libs/helpers/helpers.d.ts.map +1 -0
- package/build/browser/modules/network/ada/libs/helpers/helpers.js +2 -0
- package/build/browser/modules/network/apt/apt.network.d.ts +12 -0
- package/build/browser/modules/network/apt/apt.network.d.ts.map +1 -0
- package/build/browser/modules/network/apt/apt.network.js +44 -0
- package/build/browser/modules/network/apt/index.d.ts +2 -0
- package/build/browser/modules/network/apt/index.d.ts.map +1 -0
- package/build/browser/modules/network/apt/index.js +1 -0
- package/build/browser/modules/network/apt/libs/helpers/get-derivation-handlers.helper.d.ts +5 -0
- package/build/browser/modules/network/apt/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/apt/libs/helpers/get-derivation-handlers.helper.js +55 -0
- package/build/browser/modules/network/apt/libs/helpers/index.d.ts +2 -0
- package/build/browser/modules/network/apt/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/apt/libs/helpers/index.js +1 -0
- package/build/browser/modules/network/avax/avax.network.d.ts +12 -0
- package/build/browser/modules/network/avax/avax.network.d.ts.map +1 -0
- package/build/browser/modules/network/avax/avax.network.js +73 -0
- package/build/browser/modules/network/avax/index.d.ts +2 -0
- package/build/browser/modules/network/avax/index.d.ts.map +1 -0
- package/build/browser/modules/network/avax/index.js +1 -0
- package/build/browser/modules/network/avax/libs/helpers/get-derivation-handlers.helper.d.ts +5 -0
- package/build/browser/modules/network/avax/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/avax/libs/helpers/get-derivation-handlers.helper.js +62 -0
- package/build/browser/modules/network/avax/libs/helpers/index.d.ts +2 -0
- package/build/browser/modules/network/avax/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/avax/libs/helpers/index.js +1 -0
- package/build/browser/modules/network/bch/bch.network.d.ts +12 -0
- package/build/browser/modules/network/bch/bch.network.d.ts.map +1 -0
- package/build/browser/modules/network/bch/bch.network.js +69 -0
- package/build/browser/modules/network/bch/index.d.ts +2 -0
- package/build/browser/modules/network/bch/index.d.ts.map +1 -0
- package/build/browser/modules/network/bch/index.js +1 -0
- package/build/browser/modules/network/bch/libs/helpers/get-derivation-handlers.helper.d.ts +5 -0
- package/build/browser/modules/network/bch/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/bch/libs/helpers/get-derivation-handlers.helper.js +92 -0
- package/build/browser/modules/network/bch/libs/helpers/index.d.ts +2 -0
- package/build/browser/modules/network/bch/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/bch/libs/helpers/index.js +1 -0
- package/build/browser/modules/network/bnb/bnb.network.d.ts +11 -0
- package/build/browser/modules/network/bnb/bnb.network.d.ts.map +1 -0
- package/build/browser/modules/network/bnb/bnb.network.js +52 -0
- package/build/browser/modules/network/bnb/index.d.ts +2 -0
- package/build/browser/modules/network/bnb/index.d.ts.map +1 -0
- package/build/browser/modules/network/bnb/index.js +1 -0
- package/build/browser/modules/network/bnb/libs/helpers/get-derivation-handlers.helper.d.ts +4 -0
- package/build/browser/modules/network/bnb/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/bnb/libs/helpers/get-derivation-handlers.helper.js +51 -0
- package/build/browser/modules/network/bnb/libs/helpers/index.d.ts +2 -0
- package/build/browser/modules/network/bnb/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/bnb/libs/helpers/index.js +1 -0
- package/build/browser/modules/network/btc/btc.network.d.ts +12 -0
- package/build/browser/modules/network/btc/btc.network.d.ts.map +1 -0
- package/build/browser/modules/network/btc/btc.network.js +97 -0
- package/build/browser/modules/network/btc/index.d.ts +2 -0
- package/build/browser/modules/network/btc/index.d.ts.map +1 -0
- package/build/browser/modules/network/btc/index.js +1 -0
- package/build/browser/modules/network/btc/libs/helpers/get-derivation-handlers.helper.d.ts +9 -0
- package/build/browser/modules/network/btc/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/btc/libs/helpers/get-derivation-handlers.helper.js +245 -0
- package/build/browser/modules/network/btc/libs/helpers/index.d.ts +2 -0
- package/build/browser/modules/network/btc/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/btc/libs/helpers/index.js +1 -0
- package/build/browser/modules/network/doge/doge.network.d.ts +11 -0
- package/build/browser/modules/network/doge/doge.network.d.ts.map +1 -0
- package/build/browser/modules/network/doge/doge.network.js +55 -0
- package/build/browser/modules/network/doge/index.d.ts +2 -0
- package/build/browser/modules/network/doge/index.d.ts.map +1 -0
- package/build/browser/modules/network/doge/index.js +1 -0
- package/build/browser/modules/network/doge/libs/helpers/get-derivation-handlers.helper.d.ts +4 -0
- package/build/browser/modules/network/doge/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/doge/libs/helpers/get-derivation-handlers.helper.js +52 -0
- package/build/browser/modules/network/doge/libs/helpers/index.d.ts +2 -0
- package/build/browser/modules/network/doge/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/doge/libs/helpers/index.js +1 -0
- package/build/browser/modules/network/dot/dot.d.ts +2 -0
- package/build/browser/modules/network/dot/dot.d.ts.map +1 -0
- package/build/browser/modules/network/dot/dot.js +1 -0
- package/build/browser/modules/network/dot/dot.network.d.ts +12 -0
- package/build/browser/modules/network/dot/dot.network.d.ts.map +1 -0
- package/build/browser/modules/network/dot/dot.network.js +61 -0
- package/build/browser/modules/network/dot/libs/helpers/append-address-to-derivation-path.helper.d.ts +9 -0
- package/build/browser/modules/network/dot/libs/helpers/append-address-to-derivation-path.helper.d.ts.map +1 -0
- package/build/browser/modules/network/dot/libs/helpers/append-address-to-derivation-path.helper.js +12 -0
- package/build/browser/modules/network/dot/libs/helpers/get-derivation-handlers.helper.d.ts +6 -0
- package/build/browser/modules/network/dot/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/dot/libs/helpers/get-derivation-handlers.helper.js +131 -0
- package/build/browser/modules/network/dot/libs/helpers/helpers.d.ts +2 -0
- package/build/browser/modules/network/dot/libs/helpers/helpers.d.ts.map +1 -0
- package/build/browser/modules/network/dot/libs/helpers/helpers.js +1 -0
- package/build/browser/modules/network/dot/libs/helpers/validate-derivation-path.helper.d.ts +4 -0
- package/build/browser/modules/network/dot/libs/helpers/validate-derivation-path.helper.d.ts.map +1 -0
- package/build/browser/modules/network/dot/libs/helpers/validate-derivation-path.helper.js +11 -0
- package/build/browser/modules/network/evm/evm.network.d.ts +11 -0
- package/build/browser/modules/network/evm/evm.network.d.ts.map +1 -0
- package/build/browser/modules/network/evm/evm.network.js +52 -0
- package/build/browser/modules/network/evm/index.d.ts +2 -0
- package/build/browser/modules/network/evm/index.d.ts.map +1 -0
- package/build/browser/modules/network/evm/index.js +1 -0
- package/build/browser/modules/network/evm/libs/helpers/get-derivation-handlers.helper.d.ts +4 -0
- package/build/browser/modules/network/evm/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/evm/libs/helpers/get-derivation-handlers.helper.js +52 -0
- package/build/browser/modules/network/evm/libs/helpers/index.d.ts +2 -0
- package/build/browser/modules/network/evm/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/evm/libs/helpers/index.js +1 -0
- package/build/browser/modules/network/get-network/get-network.d.ts +5 -0
- package/build/browser/modules/network/get-network/get-network.d.ts.map +1 -0
- package/build/browser/modules/network/get-network/get-network.js +144 -0
- package/build/browser/modules/network/get-network/libs/types/get-network-parameters.type.d.ts +6 -0
- package/build/browser/modules/network/get-network/libs/types/get-network-parameters.type.d.ts.map +1 -0
- package/build/browser/modules/network/get-network/libs/types/get-network-parameters.type.js +1 -0
- package/build/browser/modules/network/get-network/libs/types/index.d.ts +3 -0
- package/build/browser/modules/network/get-network/libs/types/index.d.ts.map +1 -0
- package/build/browser/modules/network/get-network/libs/types/index.js +1 -0
- package/build/browser/modules/network/get-network/libs/types/network-name-to-network.type.d.ts +36 -0
- package/build/browser/modules/network/get-network/libs/types/network-name-to-network.type.d.ts.map +1 -0
- package/build/browser/modules/network/get-network/libs/types/network-name-to-network.type.js +26 -0
- package/build/browser/modules/network/index.d.ts +4 -0
- package/build/browser/modules/network/index.d.ts.map +1 -0
- package/build/browser/modules/network/index.js +2 -0
- package/build/browser/modules/network/libs/constants/__tests__/index.d.ts +6 -0
- package/build/browser/modules/network/libs/constants/__tests__/index.d.ts.map +1 -0
- package/build/browser/modules/network/libs/constants/__tests__/index.js +6 -0
- package/build/browser/modules/network/libs/constants/default-instance-parameters.constant.d.ts +100 -0
- package/build/browser/modules/network/libs/constants/default-instance-parameters.constant.d.ts.map +1 -0
- package/build/browser/modules/network/libs/constants/default-instance-parameters.constant.js +120 -0
- package/build/browser/modules/network/libs/constants/index.d.ts +5 -0
- package/build/browser/modules/network/libs/constants/index.d.ts.map +1 -0
- package/build/browser/modules/network/libs/constants/index.js +6 -0
- package/build/browser/modules/network/libs/enums/exception-message.enum.d.ts +7 -0
- package/build/browser/modules/network/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/browser/modules/network/libs/enums/exception-message.enum.js +7 -0
- package/build/browser/modules/network/libs/enums/index.d.ts +2 -0
- package/build/browser/modules/network/libs/enums/index.d.ts.map +1 -0
- package/build/browser/modules/network/libs/enums/index.js +1 -0
- package/build/browser/modules/network/libs/exceptions/index.d.ts +2 -0
- package/build/browser/modules/network/libs/exceptions/index.d.ts.map +1 -0
- package/build/browser/modules/network/libs/exceptions/index.js +1 -0
- package/build/browser/modules/network/libs/exceptions/network-error.exception.d.ts +5 -0
- package/build/browser/modules/network/libs/exceptions/network-error.exception.d.ts.map +1 -0
- package/build/browser/modules/network/libs/exceptions/network-error.exception.js +9 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/get-derivation-path-depth.helper.d.ts +4 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/get-derivation-path-depth.helper.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/get-derivation-path-depth.helper.js +7 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/harden-derivation-path.helper.d.ts +4 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/harden-derivation-path.helper.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/harden-derivation-path.helper.js +7 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/increase-derivation-path-depth.helper.d.ts +8 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/increase-derivation-path-depth.helper.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/increase-derivation-path-depth.helper.js +12 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/index.d.ts +2 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/index.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/index.js +1 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/exception-message.enum.d.ts +6 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/exception-message.enum.js +6 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/index.d.ts +2 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/index.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/index.js +1 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/index.d.ts +3 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/index.js +2 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-length.helper.d.ts +4 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-length.helper.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-length.helper.js +11 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-pattern.helper.d.ts +4 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-pattern.helper.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-pattern.helper.js +15 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/validate-derivation-path.helper.d.ts +4 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/validate-derivation-path.helper.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/derivation-path/validate-derivation-path/validate-derivation-path.helper.js +31 -0
- package/build/browser/modules/network/libs/helpers/derive-items-batch-from-mnemonic.helper.d.ts +9 -0
- package/build/browser/modules/network/libs/helpers/derive-items-batch-from-mnemonic.helper.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/derive-items-batch-from-mnemonic.helper.js +26 -0
- package/build/browser/modules/network/libs/helpers/does-p-k-belong-to-mnemonic.helper.d.ts +8 -0
- package/build/browser/modules/network/libs/helpers/does-p-k-belong-to-mnemonic.helper.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/does-p-k-belong-to-mnemonic.helper.js +57 -0
- package/build/browser/modules/network/libs/helpers/does-p-k-exist-in-batch.helper.d.ts +5 -0
- package/build/browser/modules/network/libs/helpers/does-p-k-exist-in-batch.helper.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/does-p-k-exist-in-batch.helper.js +19 -0
- package/build/browser/modules/network/libs/helpers/find-custom-prefix-config.helper.d.ts +7 -0
- package/build/browser/modules/network/libs/helpers/find-custom-prefix-config.helper.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/find-custom-prefix-config.helper.js +8 -0
- package/build/browser/modules/network/libs/helpers/helpers.d.ts +9 -0
- package/build/browser/modules/network/libs/helpers/helpers.d.ts.map +1 -0
- package/build/browser/modules/network/libs/helpers/helpers.js +8 -0
- package/build/browser/modules/network/libs/modules/config/ada-config.d.ts +43 -0
- package/build/browser/modules/network/libs/modules/config/ada-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/ada-config.js +22 -0
- package/build/browser/modules/network/libs/modules/config/avax-config.d.ts +9 -0
- package/build/browser/modules/network/libs/modules/config/avax-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/avax-config.js +33 -0
- package/build/browser/modules/network/libs/modules/config/bch-config.d.ts +6 -0
- package/build/browser/modules/network/libs/modules/config/bch-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/bch-config.js +40 -0
- package/build/browser/modules/network/libs/modules/config/bnb-config.d.ts +5 -0
- package/build/browser/modules/network/libs/modules/config/bnb-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/bnb-config.js +8 -0
- package/build/browser/modules/network/libs/modules/config/btc-config.d.ts +6 -0
- package/build/browser/modules/network/libs/modules/config/btc-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/btc-config.js +92 -0
- package/build/browser/modules/network/libs/modules/config/doge-config.d.ts +6 -0
- package/build/browser/modules/network/libs/modules/config/doge-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/doge-config.js +56 -0
- package/build/browser/modules/network/libs/modules/config/dot-config.d.ts +7 -0
- package/build/browser/modules/network/libs/modules/config/dot-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/dot-config.js +10 -0
- package/build/browser/modules/network/libs/modules/config/evm-config.d.ts +11 -0
- package/build/browser/modules/network/libs/modules/config/evm-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/evm-config.js +8 -0
- package/build/browser/modules/network/libs/modules/config/index.d.ts +16 -0
- package/build/browser/modules/network/libs/modules/config/index.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/index.js +15 -0
- package/build/browser/modules/network/libs/modules/config/libs/helpers/get-common-prefix-config.helper.d.ts +7 -0
- package/build/browser/modules/network/libs/modules/config/libs/helpers/get-common-prefix-config.helper.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/libs/helpers/get-common-prefix-config.helper.js +9 -0
- package/build/browser/modules/network/libs/modules/config/libs/helpers/index.d.ts +2 -0
- package/build/browser/modules/network/libs/modules/config/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/libs/helpers/index.js +1 -0
- package/build/browser/modules/network/libs/modules/config/libs/types/index.d.ts +3 -0
- package/build/browser/modules/network/libs/modules/config/libs/types/index.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/libs/types/index.js +1 -0
- package/build/browser/modules/network/libs/modules/config/libs/types/secp256k1-config.type.d.ts +8 -0
- package/build/browser/modules/network/libs/modules/config/libs/types/secp256k1-config.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/libs/types/secp256k1-config.type.js +1 -0
- package/build/browser/modules/network/libs/modules/config/libs/types/secp256k1-derivation-config.type.d.ts +8 -0
- package/build/browser/modules/network/libs/modules/config/libs/types/secp256k1-derivation-config.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/libs/types/secp256k1-derivation-config.type.js +1 -0
- package/build/browser/modules/network/libs/modules/config/ltc-config.d.ts +6 -0
- package/build/browser/modules/network/libs/modules/config/ltc-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/ltc-config.js +70 -0
- package/build/browser/modules/network/libs/modules/config/sol-config.d.ts +10 -0
- package/build/browser/modules/network/libs/modules/config/sol-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/sol-config.js +7 -0
- package/build/browser/modules/network/libs/modules/config/sui-config.d.ts +11 -0
- package/build/browser/modules/network/libs/modules/config/sui-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/sui-config.js +9 -0
- package/build/browser/modules/network/libs/modules/config/ton-config.d.ts +10 -0
- package/build/browser/modules/network/libs/modules/config/ton-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/ton-config.js +6 -0
- package/build/browser/modules/network/libs/modules/config/trx-config.d.ts +7 -0
- package/build/browser/modules/network/libs/modules/config/trx-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/trx-config.js +12 -0
- package/build/browser/modules/network/libs/modules/config/xrp-config.d.ts +5 -0
- package/build/browser/modules/network/libs/modules/config/xrp-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/xrp-config.js +8 -0
- package/build/browser/modules/network/libs/modules/config/zec-config.d.ts +6 -0
- package/build/browser/modules/network/libs/modules/config/zec-config.d.ts.map +1 -0
- package/build/browser/modules/network/libs/modules/config/zec-config.js +38 -0
- package/build/browser/modules/network/libs/types/abstract-network.type.d.ts +10 -0
- package/build/browser/modules/network/libs/types/abstract-network.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/abstract-network.type.js +1 -0
- package/build/browser/modules/network/libs/types/constructor-parameters.type.d.ts +15 -0
- package/build/browser/modules/network/libs/types/constructor-parameters.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/constructor-parameters.type.js +3 -0
- package/build/browser/modules/network/libs/types/derivation-config.type.d.ts +94 -0
- package/build/browser/modules/network/libs/types/derivation-config.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/derivation-config.type.js +1 -0
- package/build/browser/modules/network/libs/types/derived-credential.type.d.ts +5 -0
- package/build/browser/modules/network/libs/types/derived-credential.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/derived-credential.type.js +14 -0
- package/build/browser/modules/network/libs/types/derived-item.type.d.ts +5 -0
- package/build/browser/modules/network/libs/types/derived-item.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/derived-item.type.js +14 -0
- package/build/browser/modules/network/libs/types/handlers/derivation-path-prefix.type.d.ts +11 -0
- package/build/browser/modules/network/libs/types/handlers/derivation-path-prefix.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/handlers/derivation-path-prefix.type.js +1 -0
- package/build/browser/modules/network/libs/types/handlers/derivations-handlers.type.d.ts +7 -0
- package/build/browser/modules/network/libs/types/handlers/derivations-handlers.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/handlers/derivations-handlers.type.js +14 -0
- package/build/browser/modules/network/libs/types/handlers/derive-item-from-mnemonic.type.d.ts +7 -0
- package/build/browser/modules/network/libs/types/handlers/derive-item-from-mnemonic.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/handlers/derive-item-from-mnemonic.type.js +14 -0
- package/build/browser/modules/network/libs/types/handlers/derive-items-batch-from-mnemonic.type.d.ts +13 -0
- package/build/browser/modules/network/libs/types/handlers/derive-items-batch-from-mnemonic.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/handlers/derive-items-batch-from-mnemonic.type.js +14 -0
- package/build/browser/modules/network/libs/types/handlers/does-p-k-belong-to-mnemonic.type.d.ts +9 -0
- package/build/browser/modules/network/libs/types/handlers/does-p-k-belong-to-mnemonic.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/handlers/does-p-k-belong-to-mnemonic.type.js +1 -0
- package/build/browser/modules/network/libs/types/handlers/get-credential-from-p-k.type.d.ts +6 -0
- package/build/browser/modules/network/libs/types/handlers/get-credential-from-p-k.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/handlers/get-credential-from-p-k.type.js +14 -0
- package/build/browser/modules/network/libs/types/handlers/get-derivation-handlers.type.d.ts +99 -0
- package/build/browser/modules/network/libs/types/handlers/get-derivation-handlers.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/handlers/get-derivation-handlers.type.js +14 -0
- package/build/browser/modules/network/libs/types/handlers/handlers-common-parameters.type.d.ts +6 -0
- package/build/browser/modules/network/libs/types/handlers/handlers-common-parameters.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/handlers/handlers-common-parameters.type.js +1 -0
- package/build/browser/modules/network/libs/types/handlers/lookup-handlers-common-parameters.type.d.ts +9 -0
- package/build/browser/modules/network/libs/types/handlers/lookup-handlers-common-parameters.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/handlers/lookup-handlers-common-parameters.type.js +1 -0
- package/build/browser/modules/network/libs/types/handlers/types.d.ts +7 -0
- package/build/browser/modules/network/libs/types/handlers/types.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/handlers/types.js +14 -0
- package/build/browser/modules/network/libs/types/index.d.ts +11 -0
- package/build/browser/modules/network/libs/types/index.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/index.js +16 -0
- package/build/browser/modules/network/libs/types/instance-parameters.type.d.ts +90 -0
- package/build/browser/modules/network/libs/types/instance-parameters.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/instance-parameters.type.js +1 -0
- package/build/browser/modules/network/libs/types/network-purpose-union.type.d.ts +5 -0
- package/build/browser/modules/network/libs/types/network-purpose-union.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/network-purpose-union.type.js +1 -0
- package/build/browser/modules/network/libs/types/network-type-map.type.d.ts +20 -0
- package/build/browser/modules/network/libs/types/network-type-map.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/network-type-map.type.js +1 -0
- package/build/browser/modules/network/libs/types/network-type-union.type.d.ts +6 -0
- package/build/browser/modules/network/libs/types/network-type-union.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/network-type-union.type.js +1 -0
- package/build/browser/modules/network/libs/types/ton-address-derivation-config.type.d.ts +9 -0
- package/build/browser/modules/network/libs/types/ton-address-derivation-config.type.d.ts.map +1 -0
- package/build/browser/modules/network/libs/types/ton-address-derivation-config.type.js +1 -0
- package/build/browser/modules/network/ltc/index.d.ts +2 -0
- package/build/browser/modules/network/ltc/index.d.ts.map +1 -0
- package/build/browser/modules/network/ltc/index.js +1 -0
- package/build/browser/modules/network/ltc/libs/helpers/get-derivation-handlers.helper.d.ts +6 -0
- package/build/browser/modules/network/ltc/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/ltc/libs/helpers/get-derivation-handlers.helper.js +122 -0
- package/build/browser/modules/network/ltc/libs/helpers/index.d.ts +2 -0
- package/build/browser/modules/network/ltc/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/ltc/libs/helpers/index.js +1 -0
- package/build/browser/modules/network/ltc/ltc.network.d.ts +12 -0
- package/build/browser/modules/network/ltc/ltc.network.d.ts.map +1 -0
- package/build/browser/modules/network/ltc/ltc.network.js +76 -0
- package/build/browser/modules/network/sol/index.d.ts +2 -0
- package/build/browser/modules/network/sol/index.d.ts.map +1 -0
- package/build/browser/modules/network/sol/index.js +1 -0
- package/build/browser/modules/network/sol/libs/constants/index.d.ts +3 -0
- package/build/browser/modules/network/sol/libs/constants/index.d.ts.map +1 -0
- package/build/browser/modules/network/sol/libs/constants/index.js +3 -0
- package/build/browser/modules/network/sol/libs/helpers/get-derivation-handlers.helper.d.ts +5 -0
- package/build/browser/modules/network/sol/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/sol/libs/helpers/get-derivation-handlers.helper.js +64 -0
- package/build/browser/modules/network/sol/libs/helpers/helpers.d.ts +2 -0
- package/build/browser/modules/network/sol/libs/helpers/helpers.d.ts.map +1 -0
- package/build/browser/modules/network/sol/libs/helpers/helpers.js +1 -0
- package/build/browser/modules/network/sol/sol.network.d.ts +12 -0
- package/build/browser/modules/network/sol/sol.network.d.ts.map +1 -0
- package/build/browser/modules/network/sol/sol.network.js +53 -0
- package/build/browser/modules/network/sui/index.d.ts +2 -0
- package/build/browser/modules/network/sui/index.d.ts.map +1 -0
- package/build/browser/modules/network/sui/index.js +1 -0
- package/build/browser/modules/network/sui/libs/helpers/get-derivation-handlers.helper.d.ts +4 -0
- package/build/browser/modules/network/sui/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/sui/libs/helpers/get-derivation-handlers.helper.js +58 -0
- package/build/browser/modules/network/sui/libs/helpers/index.d.ts +2 -0
- package/build/browser/modules/network/sui/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/sui/libs/helpers/index.js +1 -0
- package/build/browser/modules/network/sui/sui.network.d.ts +11 -0
- package/build/browser/modules/network/sui/sui.network.d.ts.map +1 -0
- package/build/browser/modules/network/sui/sui.network.js +42 -0
- package/build/browser/modules/network/ton/index.d.ts +2 -0
- package/build/browser/modules/network/ton/index.d.ts.map +1 -0
- package/build/browser/modules/network/ton/index.js +1 -0
- package/build/browser/modules/network/ton/libs/helpers/get-derivation-handlers.helper.d.ts +5 -0
- package/build/browser/modules/network/ton/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/ton/libs/helpers/get-derivation-handlers.helper.js +114 -0
- package/build/browser/modules/network/ton/libs/helpers/helpers.d.ts +2 -0
- package/build/browser/modules/network/ton/libs/helpers/helpers.d.ts.map +1 -0
- package/build/browser/modules/network/ton/libs/helpers/helpers.js +1 -0
- package/build/browser/modules/network/ton/ton.network.d.ts +12 -0
- package/build/browser/modules/network/ton/ton.network.d.ts.map +1 -0
- package/build/browser/modules/network/ton/ton.network.js +56 -0
- package/build/browser/modules/network/trx/index.d.ts +2 -0
- package/build/browser/modules/network/trx/index.d.ts.map +1 -0
- package/build/browser/modules/network/trx/index.js +1 -0
- package/build/browser/modules/network/trx/libs/helpers/get-derivation-handlers.helper.d.ts +4 -0
- package/build/browser/modules/network/trx/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/trx/libs/helpers/get-derivation-handlers.helper.js +54 -0
- package/build/browser/modules/network/trx/libs/helpers/index.d.ts +2 -0
- package/build/browser/modules/network/trx/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/trx/libs/helpers/index.js +1 -0
- package/build/browser/modules/network/trx/trx.network.d.ts +11 -0
- package/build/browser/modules/network/trx/trx.network.d.ts.map +1 -0
- package/build/browser/modules/network/trx/trx.network.js +57 -0
- package/build/browser/modules/network/xrp/index.d.ts +2 -0
- package/build/browser/modules/network/xrp/index.d.ts.map +1 -0
- package/build/browser/modules/network/xrp/index.js +1 -0
- package/build/browser/modules/network/xrp/libs/helpers/get-derivation-handlers.helper.d.ts +5 -0
- package/build/browser/modules/network/xrp/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/xrp/libs/helpers/get-derivation-handlers.helper.js +52 -0
- package/build/browser/modules/network/xrp/libs/helpers/index.d.ts +2 -0
- package/build/browser/modules/network/xrp/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/xrp/libs/helpers/index.js +1 -0
- package/build/browser/modules/network/xrp/xrp.network.d.ts +12 -0
- package/build/browser/modules/network/xrp/xrp.network.d.ts.map +1 -0
- package/build/browser/modules/network/xrp/xrp.network.js +77 -0
- package/build/browser/modules/network/zec/index.d.ts +2 -0
- package/build/browser/modules/network/zec/index.d.ts.map +1 -0
- package/build/browser/modules/network/zec/index.js +1 -0
- package/build/browser/modules/network/zec/libs/helpers/get-derivation-handlers.helper.d.ts +4 -0
- package/build/browser/modules/network/zec/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/browser/modules/network/zec/libs/helpers/get-derivation-handlers.helper.js +52 -0
- package/build/browser/modules/network/zec/libs/helpers/index.d.ts +2 -0
- package/build/browser/modules/network/zec/libs/helpers/index.d.ts.map +1 -0
- package/build/browser/modules/network/zec/libs/helpers/index.js +1 -0
- package/build/browser/modules/network/zec/zec.network.d.ts +11 -0
- package/build/browser/modules/network/zec/zec.network.d.ts.map +1 -0
- package/build/browser/modules/network/zec/zec.network.js +57 -0
- package/build/browser/nacl-fast-TTSbCWMC.js +2406 -0
- package/build/browser/nist-Cie-30E0.js +40 -0
- package/build/browser/p2pkh-CQ-LA34f.js +136 -0
- package/build/browser/p2sh-DAS7N8JO.js +198 -0
- package/build/browser/p2wpkh-g2Ewuefe.js +135 -0
- package/build/browser/p2wsh-djkCg3sC.js +218 -0
- package/build/browser/pbkdf2-2nEOAG5y.js +69 -0
- package/build/browser/pbkdf2-CASYB-8e.js +69 -0
- package/build/browser/pbkdf2-DyGpx0-u.js +1284 -0
- package/build/browser/prefix-config.type-BP_PoMwo.js +2391 -0
- package/build/browser/publickey-DsLd2AKA.js +2940 -0
- package/build/browser/secp256k1-FNoOZ2h8.js +85 -0
- package/build/browser/sha2-BvR-y8Kq.js +442 -0
- package/build/browser/sha2-OXpLEvj4.js +474 -0
- package/build/browser/sha256-BFiHgz55.js +16 -0
- package/build/browser/sha3-3SpCb2s3.js +1601 -0
- package/build/browser/sha512-D-HY1fu1.js +100 -0
- package/build/browser/types-DRp_D8oF.js +1021 -0
- package/build/browser/utils-BDj4oeIm.js +220 -0
- package/build/browser/weierstrass-CDW51Eto.js +1098 -0
- package/build/node/index.d.ts +5 -0
- package/build/node/index.d.ts.map +1 -0
- package/build/node/index.js +3 -0
- package/build/node/index.js.map +1 -0
- package/build/node/libs/constants/index.d.ts +7 -0
- package/build/node/libs/constants/index.d.ts.map +1 -0
- package/build/node/libs/constants/index.js +7 -0
- package/build/node/libs/constants/index.js.map +1 -0
- package/build/node/libs/enums/curve.type.d.ts +11 -0
- package/build/node/libs/enums/curve.type.d.ts.map +1 -0
- package/build/node/libs/enums/curve.type.js +8 -0
- package/build/node/libs/enums/curve.type.js.map +1 -0
- package/build/node/libs/enums/derivation-path-symbol.enum.d.ts +9 -0
- package/build/node/libs/enums/derivation-path-symbol.enum.d.ts.map +1 -0
- package/build/node/libs/enums/derivation-path-symbol.enum.js +9 -0
- package/build/node/libs/enums/derivation-path-symbol.enum.js.map +1 -0
- package/build/node/libs/enums/enums.d.ts +6 -0
- package/build/node/libs/enums/enums.d.ts.map +1 -0
- package/build/node/libs/enums/enums.js +6 -0
- package/build/node/libs/enums/enums.js.map +1 -0
- package/build/node/libs/enums/exception-message.enum.d.ts +9 -0
- package/build/node/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/node/libs/enums/exception-message.enum.js +9 -0
- package/build/node/libs/enums/exception-message.enum.js.map +1 -0
- package/build/node/libs/enums/splitted-derivation-path-item-index.enum.d.ts +8 -0
- package/build/node/libs/enums/splitted-derivation-path-item-index.enum.d.ts.map +1 -0
- package/build/node/libs/enums/splitted-derivation-path-item-index.enum.js +8 -0
- package/build/node/libs/enums/splitted-derivation-path-item-index.enum.js.map +1 -0
- package/build/node/libs/enums/thirty-two-byte-private-key-index.enum.d.ts +6 -0
- package/build/node/libs/enums/thirty-two-byte-private-key-index.enum.d.ts.map +1 -0
- package/build/node/libs/enums/thirty-two-byte-private-key-index.enum.js +6 -0
- package/build/node/libs/enums/thirty-two-byte-private-key-index.enum.js.map +1 -0
- package/build/node/libs/exceptions/index.d.ts +2 -0
- package/build/node/libs/exceptions/index.d.ts.map +1 -0
- package/build/node/libs/exceptions/index.js +2 -0
- package/build/node/libs/exceptions/index.js.map +1 -0
- package/build/node/libs/exceptions/validation-error.exception.d.ts +5 -0
- package/build/node/libs/exceptions/validation-error.exception.d.ts.map +1 -0
- package/build/node/libs/exceptions/validation-error.exception.js +9 -0
- package/build/node/libs/exceptions/validation-error.exception.js.map +1 -0
- package/build/node/libs/helpers/append-address-to-derivation-path.helper.d.ts +10 -0
- package/build/node/libs/helpers/append-address-to-derivation-path.helper.d.ts.map +1 -0
- package/build/node/libs/helpers/append-address-to-derivation-path.helper.js +12 -0
- package/build/node/libs/helpers/append-address-to-derivation-path.helper.js.map +1 -0
- package/build/node/libs/helpers/check-hardened-suffix-ending.helper.d.ts +3 -0
- package/build/node/libs/helpers/check-hardened-suffix-ending.helper.d.ts.map +1 -0
- package/build/node/libs/helpers/check-hardened-suffix-ending.helper.js +6 -0
- package/build/node/libs/helpers/check-hardened-suffix-ending.helper.js.map +1 -0
- package/build/node/libs/helpers/get-derivation-path-segments.helper.d.ts +3 -0
- package/build/node/libs/helpers/get-derivation-path-segments.helper.d.ts.map +1 -0
- package/build/node/libs/helpers/get-derivation-path-segments.helper.js +6 -0
- package/build/node/libs/helpers/get-derivation-path-segments.helper.js.map +1 -0
- package/build/node/libs/helpers/harden-derivation-path-value.helper.d.ts +3 -0
- package/build/node/libs/helpers/harden-derivation-path-value.helper.d.ts.map +1 -0
- package/build/node/libs/helpers/harden-derivation-path-value.helper.js +7 -0
- package/build/node/libs/helpers/harden-derivation-path-value.helper.js.map +1 -0
- package/build/node/libs/helpers/helpers.d.ts +5 -0
- package/build/node/libs/helpers/helpers.d.ts.map +1 -0
- package/build/node/libs/helpers/helpers.js +5 -0
- package/build/node/libs/helpers/helpers.js.map +1 -0
- package/build/node/libs/modules/address/address.d.ts +3 -0
- package/build/node/libs/modules/address/address.d.ts.map +1 -0
- package/build/node/libs/modules/address/address.js +2 -0
- package/build/node/libs/modules/address/address.js.map +1 -0
- package/build/node/libs/modules/address/libs/enums/enums.d.ts +2 -0
- package/build/node/libs/modules/address/libs/enums/enums.d.ts.map +1 -0
- package/build/node/libs/modules/address/libs/enums/enums.js +2 -0
- package/build/node/libs/modules/address/libs/enums/enums.js.map +1 -0
- package/build/node/libs/modules/address/libs/enums/exception-message.enum.d.ts +5 -0
- package/build/node/libs/modules/address/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/node/libs/modules/address/libs/enums/exception-message.enum.js +5 -0
- package/build/node/libs/modules/address/libs/enums/exception-message.enum.js.map +1 -0
- package/build/node/libs/modules/address/libs/exceptions/address-error.exception.d.ts +5 -0
- package/build/node/libs/modules/address/libs/exceptions/address-error.exception.d.ts.map +1 -0
- package/build/node/libs/modules/address/libs/exceptions/address-error.exception.js +9 -0
- package/build/node/libs/modules/address/libs/exceptions/address-error.exception.js.map +1 -0
- package/build/node/libs/modules/address/libs/exceptions/index.d.ts +2 -0
- package/build/node/libs/modules/address/libs/exceptions/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/libs/exceptions/index.js +2 -0
- package/build/node/libs/modules/address/libs/exceptions/index.js.map +1 -0
- package/build/node/libs/modules/address/libs/helpers/get-evm-address-buffer.helper.d.ts +4 -0
- package/build/node/libs/modules/address/libs/helpers/get-evm-address-buffer.helper.d.ts.map +1 -0
- package/build/node/libs/modules/address/libs/helpers/get-evm-address-buffer.helper.js +15 -0
- package/build/node/libs/modules/address/libs/helpers/get-evm-address-buffer.helper.js.map +1 -0
- package/build/node/libs/modules/address/libs/helpers/index.d.ts +2 -0
- package/build/node/libs/modules/address/libs/helpers/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/libs/helpers/index.js +2 -0
- package/build/node/libs/modules/address/libs/helpers/index.js.map +1 -0
- package/build/node/libs/modules/address/libs/types/address.type.d.ts +5 -0
- package/build/node/libs/modules/address/libs/types/address.type.d.ts.map +1 -0
- package/build/node/libs/modules/address/libs/types/address.type.js +2 -0
- package/build/node/libs/modules/address/libs/types/address.type.js.map +1 -0
- package/build/node/libs/modules/address/libs/types/index.d.ts +3 -0
- package/build/node/libs/modules/address/libs/types/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/libs/types/index.js +2 -0
- package/build/node/libs/modules/address/libs/types/index.js.map +1 -0
- package/build/node/libs/modules/address/libs/types/ton-address-required-data.type.d.ts +14 -0
- package/build/node/libs/modules/address/libs/types/ton-address-required-data.type.d.ts.map +1 -0
- package/build/node/libs/modules/address/libs/types/ton-address-required-data.type.js +2 -0
- package/build/node/libs/modules/address/libs/types/ton-address-required-data.type.js.map +1 -0
- package/build/node/libs/modules/address/networks/ada/get-ada-exodus-address.d.ts +3 -0
- package/build/node/libs/modules/address/networks/ada/get-ada-exodus-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/ada/get-ada-exodus-address.js +9 -0
- package/build/node/libs/modules/address/networks/ada/get-ada-exodus-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/ada/get-base-address.d.ts +5 -0
- package/build/node/libs/modules/address/networks/ada/get-base-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/ada/get-base-address.js +12 -0
- package/build/node/libs/modules/address/networks/ada/get-base-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/ada/get-enterprise-address.d.ts +5 -0
- package/build/node/libs/modules/address/networks/ada/get-enterprise-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/ada/get-enterprise-address.js +11 -0
- package/build/node/libs/modules/address/networks/ada/get-enterprise-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/ada/get-reward-address.d.ts +5 -0
- package/build/node/libs/modules/address/networks/ada/get-reward-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/ada/get-reward-address.js +11 -0
- package/build/node/libs/modules/address/networks/ada/get-reward-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/ada/index.d.ts +5 -0
- package/build/node/libs/modules/address/networks/ada/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/ada/index.js +5 -0
- package/build/node/libs/modules/address/networks/ada/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/ada/libs/helpers/get-credential.helper.d.ts +4 -0
- package/build/node/libs/modules/address/networks/ada/libs/helpers/get-credential.helper.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/ada/libs/helpers/get-credential.helper.js +7 -0
- package/build/node/libs/modules/address/networks/ada/libs/helpers/get-credential.helper.js.map +1 -0
- package/build/node/libs/modules/address/networks/ada/libs/helpers/helpers.d.ts +2 -0
- package/build/node/libs/modules/address/networks/ada/libs/helpers/helpers.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/ada/libs/helpers/helpers.js +2 -0
- package/build/node/libs/modules/address/networks/ada/libs/helpers/helpers.js.map +1 -0
- package/build/node/libs/modules/address/networks/apt/get-apt-address.d.ts +5 -0
- package/build/node/libs/modules/address/networks/apt/get-apt-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/apt/get-apt-address.js +50 -0
- package/build/node/libs/modules/address/networks/apt/get-apt-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/apt/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/apt/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/apt/index.js +2 -0
- package/build/node/libs/modules/address/networks/apt/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/avax/get-avax-address.d.ts +10 -0
- package/build/node/libs/modules/address/networks/avax/get-avax-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/avax/get-avax-address.js +14 -0
- package/build/node/libs/modules/address/networks/avax/get-avax-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/avax/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/avax/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/avax/index.js +2 -0
- package/build/node/libs/modules/address/networks/avax/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/bch/get-cash-addr-address.d.ts +11 -0
- package/build/node/libs/modules/address/networks/bch/get-cash-addr-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/bch/get-cash-addr-address.js +26 -0
- package/build/node/libs/modules/address/networks/bch/get-cash-addr-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/bch/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/bch/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/bch/index.js +2 -0
- package/build/node/libs/modules/address/networks/bch/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/bnb/get-bnb-address.d.ts +5 -0
- package/build/node/libs/modules/address/networks/bnb/get-bnb-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/bnb/get-bnb-address.js +9 -0
- package/build/node/libs/modules/address/networks/bnb/get-bnb-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/bnb/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/bnb/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/bnb/index.js +2 -0
- package/build/node/libs/modules/address/networks/bnb/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/btc/get-p2wsh-address.d.ts +6 -0
- package/build/node/libs/modules/address/networks/btc/get-p2wsh-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/btc/get-p2wsh-address.js +22 -0
- package/build/node/libs/modules/address/networks/btc/get-p2wsh-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/btc/get-p2wsh-in-p2sh-address.d.ts +6 -0
- package/build/node/libs/modules/address/networks/btc/get-p2wsh-in-p2sh-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/btc/get-p2wsh-in-p2sh-address.js +29 -0
- package/build/node/libs/modules/address/networks/btc/get-p2wsh-in-p2sh-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/btc/get-taproot-address.d.ts +6 -0
- package/build/node/libs/modules/address/networks/btc/get-taproot-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/btc/get-taproot-address.js +17 -0
- package/build/node/libs/modules/address/networks/btc/get-taproot-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/btc/index.d.ts +6 -0
- package/build/node/libs/modules/address/networks/btc/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/btc/index.js +6 -0
- package/build/node/libs/modules/address/networks/btc/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/common/get-btc-legacy-address.d.ts +6 -0
- package/build/node/libs/modules/address/networks/common/get-btc-legacy-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/common/get-btc-legacy-address.js +19 -0
- package/build/node/libs/modules/address/networks/common/get-btc-legacy-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/common/get-btc-native-seg-wit-address.d.ts +6 -0
- package/build/node/libs/modules/address/networks/common/get-btc-native-seg-wit-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/common/get-btc-native-seg-wit-address.js +19 -0
- package/build/node/libs/modules/address/networks/common/get-btc-native-seg-wit-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/common/get-btc-seg-wit-address.d.ts +6 -0
- package/build/node/libs/modules/address/networks/common/get-btc-seg-wit-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/common/get-btc-seg-wit-address.js +20 -0
- package/build/node/libs/modules/address/networks/common/get-btc-seg-wit-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/common/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/common/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/common/index.js +2 -0
- package/build/node/libs/modules/address/networks/common/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/dot/get-dot-address.d.ts +4 -0
- package/build/node/libs/modules/address/networks/dot/get-dot-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/dot/get-dot-address.js +18 -0
- package/build/node/libs/modules/address/networks/dot/get-dot-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/dot/index.d.ts +3 -0
- package/build/node/libs/modules/address/networks/dot/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/dot/index.js +2 -0
- package/build/node/libs/modules/address/networks/dot/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/dot/libs/constants/index.d.ts +4 -0
- package/build/node/libs/modules/address/networks/dot/libs/constants/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/dot/libs/constants/index.js +4 -0
- package/build/node/libs/modules/address/networks/dot/libs/constants/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/dot/libs/types/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/dot/libs/types/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/dot/libs/types/index.js +2 -0
- package/build/node/libs/modules/address/networks/dot/libs/types/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/dot/libs/types/ss58-format.type.d.ts +5 -0
- package/build/node/libs/modules/address/networks/dot/libs/types/ss58-format.type.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/dot/libs/types/ss58-format.type.js +2 -0
- package/build/node/libs/modules/address/networks/dot/libs/types/ss58-format.type.js.map +1 -0
- package/build/node/libs/modules/address/networks/evm/get-evm-address.d.ts +5 -0
- package/build/node/libs/modules/address/networks/evm/get-evm-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/evm/get-evm-address.js +12 -0
- package/build/node/libs/modules/address/networks/evm/get-evm-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/evm/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/evm/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/evm/index.js +2 -0
- package/build/node/libs/modules/address/networks/evm/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/index.d.ts +15 -0
- package/build/node/libs/modules/address/networks/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/index.js +15 -0
- package/build/node/libs/modules/address/networks/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/sui/get-sui-address.d.ts +6 -0
- package/build/node/libs/modules/address/networks/sui/get-sui-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/sui/get-sui-address.js +12 -0
- package/build/node/libs/modules/address/networks/sui/get-sui-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/sui/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/sui/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/sui/index.js +2 -0
- package/build/node/libs/modules/address/networks/sui/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/sui/libs/helpers/get-public-key-handler.helper.d.ts +5 -0
- package/build/node/libs/modules/address/networks/sui/libs/helpers/get-public-key-handler.helper.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/sui/libs/helpers/get-public-key-handler.helper.js +19 -0
- package/build/node/libs/modules/address/networks/sui/libs/helpers/get-public-key-handler.helper.js.map +1 -0
- package/build/node/libs/modules/address/networks/sui/libs/helpers/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/sui/libs/helpers/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/sui/libs/helpers/index.js +2 -0
- package/build/node/libs/modules/address/networks/sui/libs/helpers/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/sui/libs/types/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/sui/libs/types/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/sui/libs/types/index.js +2 -0
- package/build/node/libs/modules/address/networks/sui/libs/types/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/sui/libs/types/public-key-handler-union.type.d.ts +6 -0
- package/build/node/libs/modules/address/networks/sui/libs/types/public-key-handler-union.type.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/sui/libs/types/public-key-handler-union.type.js +2 -0
- package/build/node/libs/modules/address/networks/sui/libs/types/public-key-handler-union.type.js.map +1 -0
- package/build/node/libs/modules/address/networks/ton/get-ton-address.d.ts +8 -0
- package/build/node/libs/modules/address/networks/ton/get-ton-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/ton/get-ton-address.js +32 -0
- package/build/node/libs/modules/address/networks/ton/get-ton-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/ton/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/ton/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/ton/index.js +2 -0
- package/build/node/libs/modules/address/networks/ton/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/ton/libs/types/contract-version-to-contract.type.d.ts +14 -0
- package/build/node/libs/modules/address/networks/ton/libs/types/contract-version-to-contract.type.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/ton/libs/types/contract-version-to-contract.type.js +3 -0
- package/build/node/libs/modules/address/networks/ton/libs/types/contract-version-to-contract.type.js.map +1 -0
- package/build/node/libs/modules/address/networks/ton/libs/types/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/ton/libs/types/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/ton/libs/types/index.js +2 -0
- package/build/node/libs/modules/address/networks/ton/libs/types/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/trx/get-trx-address.d.ts +5 -0
- package/build/node/libs/modules/address/networks/trx/get-trx-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/trx/get-trx-address.js +12 -0
- package/build/node/libs/modules/address/networks/trx/get-trx-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/trx/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/trx/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/trx/index.js +2 -0
- package/build/node/libs/modules/address/networks/trx/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/xrp/get-xrp-address.d.ts +12 -0
- package/build/node/libs/modules/address/networks/xrp/get-xrp-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/xrp/get-xrp-address.js +12 -0
- package/build/node/libs/modules/address/networks/xrp/get-xrp-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/xrp/index.d.ts +3 -0
- package/build/node/libs/modules/address/networks/xrp/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/xrp/index.js +2 -0
- package/build/node/libs/modules/address/networks/xrp/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/xrp/libs/types/destination-tag-property.type.d.ts +5 -0
- package/build/node/libs/modules/address/networks/xrp/libs/types/destination-tag-property.type.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/xrp/libs/types/destination-tag-property.type.js +2 -0
- package/build/node/libs/modules/address/networks/xrp/libs/types/destination-tag-property.type.js.map +1 -0
- package/build/node/libs/modules/address/networks/xrp/libs/types/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/xrp/libs/types/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/xrp/libs/types/index.js +2 -0
- package/build/node/libs/modules/address/networks/xrp/libs/types/index.js.map +1 -0
- package/build/node/libs/modules/address/networks/zec/get-transparent-address.d.ts +6 -0
- package/build/node/libs/modules/address/networks/zec/get-transparent-address.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/zec/get-transparent-address.js +24 -0
- package/build/node/libs/modules/address/networks/zec/get-transparent-address.js.map +1 -0
- package/build/node/libs/modules/address/networks/zec/index.d.ts +2 -0
- package/build/node/libs/modules/address/networks/zec/index.d.ts.map +1 -0
- package/build/node/libs/modules/address/networks/zec/index.js +2 -0
- package/build/node/libs/modules/address/networks/zec/index.js.map +1 -0
- package/build/node/libs/modules/curves/curves.d.ts +5 -0
- package/build/node/libs/modules/curves/curves.d.ts.map +1 -0
- package/build/node/libs/modules/curves/curves.js +4 -0
- package/build/node/libs/modules/curves/curves.js.map +1 -0
- package/build/node/libs/modules/curves/ed25519-curve/ed25519.curve.d.ts +10 -0
- package/build/node/libs/modules/curves/ed25519-curve/ed25519.curve.d.ts.map +1 -0
- package/build/node/libs/modules/curves/ed25519-curve/ed25519.curve.js +13 -0
- package/build/node/libs/modules/curves/ed25519-curve/ed25519.curve.js.map +1 -0
- package/build/node/libs/modules/curves/ed25519-curve/libs/enums/ed25519-secret-key-byte-position.enum.d.ts +6 -0
- package/build/node/libs/modules/curves/ed25519-curve/libs/enums/ed25519-secret-key-byte-position.enum.d.ts.map +1 -0
- package/build/node/libs/modules/curves/ed25519-curve/libs/enums/ed25519-secret-key-byte-position.enum.js +6 -0
- package/build/node/libs/modules/curves/ed25519-curve/libs/enums/ed25519-secret-key-byte-position.enum.js.map +1 -0
- package/build/node/libs/modules/curves/ed25519-curve/libs/enums/enums.d.ts +2 -0
- package/build/node/libs/modules/curves/ed25519-curve/libs/enums/enums.d.ts.map +1 -0
- package/build/node/libs/modules/curves/ed25519-curve/libs/enums/enums.js +2 -0
- package/build/node/libs/modules/curves/ed25519-curve/libs/enums/enums.js.map +1 -0
- package/build/node/libs/modules/curves/secp256k1-curve/libs/types/bip-32.type.d.ts +6 -0
- package/build/node/libs/modules/curves/secp256k1-curve/libs/types/bip-32.type.d.ts.map +1 -0
- package/build/node/libs/modules/curves/secp256k1-curve/libs/types/bip-32.type.js +2 -0
- package/build/node/libs/modules/curves/secp256k1-curve/libs/types/bip-32.type.js.map +1 -0
- package/build/node/libs/modules/curves/secp256k1-curve/libs/types/prefix-config.type.d.ts +6 -0
- package/build/node/libs/modules/curves/secp256k1-curve/libs/types/prefix-config.type.d.ts.map +1 -0
- package/build/node/libs/modules/curves/secp256k1-curve/libs/types/prefix-config.type.js +2 -0
- package/build/node/libs/modules/curves/secp256k1-curve/libs/types/prefix-config.type.js.map +1 -0
- package/build/node/libs/modules/curves/secp256k1-curve/libs/types/types.d.ts +3 -0
- package/build/node/libs/modules/curves/secp256k1-curve/libs/types/types.d.ts.map +1 -0
- package/build/node/libs/modules/curves/secp256k1-curve/libs/types/types.js +2 -0
- package/build/node/libs/modules/curves/secp256k1-curve/libs/types/types.js.map +1 -0
- package/build/node/libs/modules/curves/secp256k1-curve/secp256k1.curve.d.ts +12 -0
- package/build/node/libs/modules/curves/secp256k1-curve/secp256k1.curve.d.ts.map +1 -0
- package/build/node/libs/modules/curves/secp256k1-curve/secp256k1.curve.js +23 -0
- package/build/node/libs/modules/curves/secp256k1-curve/secp256k1.curve.js.map +1 -0
- package/build/node/libs/modules/ecc/ecc.d.ts +6 -0
- package/build/node/libs/modules/ecc/ecc.d.ts.map +1 -0
- package/build/node/libs/modules/ecc/ecc.js +7 -0
- package/build/node/libs/modules/ecc/ecc.js.map +1 -0
- package/build/node/libs/modules/ecc/libs/types/ec-pair-interface.type.d.ts +2 -0
- package/build/node/libs/modules/ecc/libs/types/ec-pair-interface.type.d.ts.map +1 -0
- package/build/node/libs/modules/ecc/libs/types/ec-pair-interface.type.js +2 -0
- package/build/node/libs/modules/ecc/libs/types/ec-pair-interface.type.js.map +1 -0
- package/build/node/libs/modules/ecc/libs/types/types.d.ts +2 -0
- package/build/node/libs/modules/ecc/libs/types/types.d.ts.map +1 -0
- package/build/node/libs/modules/ecc/libs/types/types.js +2 -0
- package/build/node/libs/modules/ecc/libs/types/types.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/enums/enums.d.ts +2 -0
- package/build/node/libs/modules/key-derivation/libs/enums/enums.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/enums/enums.js +2 -0
- package/build/node/libs/modules/key-derivation/libs/enums/enums.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/enums/exception-message.enum.d.ts +5 -0
- package/build/node/libs/modules/key-derivation/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/enums/exception-message.enum.js +5 -0
- package/build/node/libs/modules/key-derivation/libs/enums/exception-message.enum.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/exceptions/exceptions.d.ts +2 -0
- package/build/node/libs/modules/key-derivation/libs/exceptions/exceptions.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/exceptions/exceptions.js +2 -0
- package/build/node/libs/modules/key-derivation/libs/exceptions/exceptions.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/exceptions/key-derivation-error.exception.d.ts +5 -0
- package/build/node/libs/modules/key-derivation/libs/exceptions/key-derivation-error.exception.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/exceptions/key-derivation-error.exception.js +9 -0
- package/build/node/libs/modules/key-derivation/libs/exceptions/key-derivation-error.exception.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-node.helper.d.ts +8 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-node.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-node.helper.js +9 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-node.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-root-key.helper.d.ts +13 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-root-key.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-root-key.helper.js +12 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-ed25519-key-pair-from-secp256k1-root-key.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-key-pair-from-bip32-interface.helper.d.ts +5 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-key-pair-from-bip32-interface.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-key-pair-from-bip32-interface.helper.js +17 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-key-pair-from-bip32-interface.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-key-pair-from-private-key-bytes.helper.d.ts +7 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-key-pair-from-private-key-bytes.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-key-pair-from-private-key-bytes.helper.js +19 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-key-pair-from-private-key-bytes.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-key-pair-from.wif.helper.d.ts +7 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-key-pair-from.wif.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-key-pair-from.wif.helper.js +10 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-key-pair-from.wif.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-secp256k1-node-from-mnemonic.helper.d.ts +11 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-secp256k1-node-from-mnemonic.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-secp256k1-node-from-mnemonic.helper.js +19 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/get-secp256k1-node-from-mnemonic.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/index.d.ts +7 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/index.js +7 -0
- package/build/node/libs/modules/key-derivation/libs/helpers/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/abstract-key-derivation.type.d.ts +9 -0
- package/build/node/libs/modules/key-derivation/libs/types/abstract-key-derivation.type.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/abstract-key-derivation.type.js +5 -0
- package/build/node/libs/modules/key-derivation/libs/types/abstract-key-derivation.type.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/common-bip-derivation-type-union.type.d.ts +4 -0
- package/build/node/libs/modules/key-derivation/libs/types/common-bip-derivation-type-union.type.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/common-bip-derivation-type-union.type.js +2 -0
- package/build/node/libs/modules/key-derivation/libs/types/common-bip-derivation-type-union.type.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/common-ed25519-derivation-type-union.type.d.ts +4 -0
- package/build/node/libs/modules/key-derivation/libs/types/common-ed25519-derivation-type-union.type.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/common-ed25519-derivation-type-union.type.js +2 -0
- package/build/node/libs/modules/key-derivation/libs/types/common-ed25519-derivation-type-union.type.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/derive-from-mnemonic.type.d.ts +15 -0
- package/build/node/libs/modules/key-derivation/libs/types/derive-from-mnemonic.type.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/derive-from-mnemonic.type.js +2 -0
- package/build/node/libs/modules/key-derivation/libs/types/derive-from-mnemonic.type.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/handlers-common-parameters.type.d.ts +11 -0
- package/build/node/libs/modules/key-derivation/libs/types/handlers-common-parameters.type.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/handlers-common-parameters.type.js +2 -0
- package/build/node/libs/modules/key-derivation/libs/types/handlers-common-parameters.type.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/import-by-private-key.type.d.ts +11 -0
- package/build/node/libs/modules/key-derivation/libs/types/import-by-private-key.type.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/import-by-private-key.type.js +2 -0
- package/build/node/libs/modules/key-derivation/libs/types/import-by-private-key.type.js.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/index.d.ts +6 -0
- package/build/node/libs/modules/key-derivation/libs/types/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/libs/types/index.js +4 -0
- package/build/node/libs/modules/key-derivation/libs/types/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-base-key-derivation.d.ts +11 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-base-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-base-key-derivation.js +35 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-base-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-common-key-derivation.d.ts +11 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-common-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-common-key-derivation.js +28 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-common-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-exodus-key-derivation.d.ts +24 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-exodus-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-exodus-key-derivation.js +90 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-exodus-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-ledger-key-derivation.d.ts +14 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-ledger-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-ledger-key-derivation.js +153 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada-ledger-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada.d.ts +5 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada.js +5 -0
- package/build/node/libs/modules/key-derivation/networks/ada/ada.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/constants/constants.d.ts +15 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/constants/constants.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/constants/constants.js +15 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/constants/constants.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/ed25519-private-key-clamp.enum.d.ts +7 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/ed25519-private-key-clamp.enum.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/ed25519-private-key-clamp.enum.js +7 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/ed25519-private-key-clamp.enum.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/enums.d.ts +4 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/enums.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/enums.js +4 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/enums.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/exception-message.enum.d.ts +7 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/exception-message.enum.js +7 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/exception-message.enum.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/ledger-derivation-hmac-prefix.enum.d.ts +8 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/ledger-derivation-hmac-prefix.enum.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/ledger-derivation-hmac-prefix.enum.js +8 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/enums/ledger-derivation-hmac-prefix.enum.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/encode-ed25519-point-to-bytes.helper.d.ts +4 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/encode-ed25519-point-to-bytes.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/encode-ed25519-point-to-bytes.helper.js +12 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/encode-ed25519-point-to-bytes.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-ada-ledger-extended-private-key-from-node.helper.d.ts +10 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-ada-ledger-extended-private-key-from-node.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-ada-ledger-extended-private-key-from-node.helper.js +14 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-ada-ledger-extended-private-key-from-node.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-derivation-path-numeric-values.helper.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-derivation-path-numeric-values.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-derivation-path-numeric-values.helper.js +16 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-derivation-path-numeric-values.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-node-raw-keys.helper.d.ts +8 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-node-raw-keys.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-node-raw-keys.helper.js +8 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-node-raw-keys.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-node.helper.d.ts +4 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-node.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-node.helper.js +12 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-node.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-root-key.helper.d.ts +4 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-root-key.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-root-key.helper.js +9 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/get-root-key.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/helpers.d.ts +8 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/helpers.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/helpers.js +8 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/helpers.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/multiply-ed25519-base-point-by-scalar.util.d.ts +6 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/multiply-ed25519-base-point-by-scalar.util.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/multiply-ed25519-base-point-by-scalar.util.js +23 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/helpers/multiply-ed25519-base-point-by-scalar.util.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/types/ledger-ed25519-private-node.type.d.ts +8 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/types/ledger-ed25519-private-node.type.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/types/ledger-ed25519-private-node.type.js +2 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/types/ledger-ed25519-private-node.type.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/types/types.d.ts +2 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/types/types.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/types/types.js +2 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/types/types.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/are-uint8-arrays-equal.util.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/are-uint8-arrays-equal.util.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/are-uint8-arrays-equal.util.js +13 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/are-uint8-arrays-equal.util.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/big-int-to-bytes-little-endian.helper.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/big-int-to-bytes-little-endian.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/big-int-to-bytes-little-endian.helper.js +15 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/big-int-to-bytes-little-endian.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/bytes-to-big-int-little-endian.util.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/bytes-to-big-int-little-endian.util.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/bytes-to-big-int-little-endian.util.js +16 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/bytes-to-big-int-little-endian.util.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/clear-bits.util.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/clear-bits.util.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/clear-bits.util.js +5 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/clear-bits.util.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha256.util.d.ts +2 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha256.util.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha256.util.js +6 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha256.util.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha512.util.d.ts +2 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha512.util.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha512.util.js +6 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/hmac-sha512.util.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/set-bits.util.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/set-bits.util.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/set-bits.util.js +5 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/set-bits.util.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/to-uint32-little-endian-bytes.util.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/to-uint32-little-endian-bytes.util.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/to-uint32-little-endian-bytes.util.js +8 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/to-uint32-little-endian-bytes.util.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/utils.d.ts +9 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/utils.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/utils.js +9 -0
- package/build/node/libs/modules/key-derivation/networks/ada/libs/utils/utils.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/apt/apt-key-derivation.d.ts +17 -0
- package/build/node/libs/modules/key-derivation/networks/apt/apt-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/apt/apt-key-derivation.js +93 -0
- package/build/node/libs/modules/key-derivation/networks/apt/apt-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/apt/index.d.ts +2 -0
- package/build/node/libs/modules/key-derivation/networks/apt/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/apt/index.js +2 -0
- package/build/node/libs/modules/key-derivation/networks/apt/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/constants/index.d.ts +5 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/constants/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/constants/index.js +5 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/constants/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/maps/index.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/maps/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/maps/index.js +3 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/maps/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-private-key-variant.map.d.ts +5 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-private-key-variant.map.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-private-key-variant.map.js +7 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-private-key-variant.map.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-scheme-id.map.d.ts +4 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-scheme-id.map.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-scheme-id.map.js +7 -0
- package/build/node/libs/modules/key-derivation/networks/apt/libs/maps/signature-scheme-to-scheme-id.map.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/bnb/bnb-key-derivation.d.ts +15 -0
- package/build/node/libs/modules/key-derivation/networks/bnb/bnb-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/bnb/bnb-key-derivation.js +37 -0
- package/build/node/libs/modules/key-derivation/networks/bnb/bnb-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/bnb/index.d.ts +2 -0
- package/build/node/libs/modules/key-derivation/networks/bnb/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/bnb/index.js +2 -0
- package/build/node/libs/modules/key-derivation/networks/bnb/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/btc/index.d.ts +2 -0
- package/build/node/libs/modules/key-derivation/networks/btc/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/btc/index.js +2 -0
- package/build/node/libs/modules/key-derivation/networks/btc/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/btc/libs/helpers/index.d.ts +2 -0
- package/build/node/libs/modules/key-derivation/networks/btc/libs/helpers/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/btc/libs/helpers/index.js +2 -0
- package/build/node/libs/modules/key-derivation/networks/btc/libs/helpers/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/btc/libs/helpers/to-x-only-public-key.helper.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/btc/libs/helpers/to-x-only-public-key.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/btc/libs/helpers/to-x-only-public-key.helper.js +10 -0
- package/build/node/libs/modules/key-derivation/networks/btc/libs/helpers/to-x-only-public-key.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/btc/taproot-key-derivation.d.ts +15 -0
- package/build/node/libs/modules/key-derivation/networks/btc/taproot-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/btc/taproot-key-derivation.js +38 -0
- package/build/node/libs/modules/key-derivation/networks/btc/taproot-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/common/common-bip-key-derivation.d.ts +15 -0
- package/build/node/libs/modules/key-derivation/networks/common/common-bip-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/common/common-bip-key-derivation.js +37 -0
- package/build/node/libs/modules/key-derivation/networks/common/common-bip-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/common/common-ed25519-key-derivation.d.ts +15 -0
- package/build/node/libs/modules/key-derivation/networks/common/common-ed25519-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/common/common-ed25519-key-derivation.js +32 -0
- package/build/node/libs/modules/key-derivation/networks/common/common-ed25519-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/common/index.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/common/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/common/index.js +3 -0
- package/build/node/libs/modules/key-derivation/networks/common/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/dot-base-key-derivation.d.ts +11 -0
- package/build/node/libs/modules/key-derivation/networks/dot/dot-base-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/dot-base-key-derivation.js +28 -0
- package/build/node/libs/modules/key-derivation/networks/dot/dot-base-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/dot-ledger-key-derivation.d.ts +11 -0
- package/build/node/libs/modules/key-derivation/networks/dot/dot-ledger-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/dot-ledger-key-derivation.js +21 -0
- package/build/node/libs/modules/key-derivation/networks/dot/dot-ledger-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/dot.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/dot/dot.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/dot.js +3 -0
- package/build/node/libs/modules/key-derivation/networks/dot/dot.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/constants/index.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/constants/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/constants/index.js +3 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/constants/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/helpers/convert-bytes-key-pair-to-hex.helper.d.ts +4 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/helpers/convert-bytes-key-pair-to-hex.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/helpers/convert-bytes-key-pair-to-hex.helper.js +8 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/helpers/convert-bytes-key-pair-to-hex.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/helpers/helpers.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/helpers/helpers.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/helpers/helpers.js +3 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/helpers/helpers.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/helpers/import-by-private-key.helper.d.ts +5 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/helpers/import-by-private-key.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/helpers/import-by-private-key.helper.js +12 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/helpers/import-by-private-key.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-deriver.map.d.ts +5 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-deriver.map.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-deriver.map.js +8 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-deriver.map.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-type.map.d.ts +5 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-type.map.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-type.map.js +7 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-key-pair-type.map.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-public-key-deriver.map.d.ts +4 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-public-key-deriver.map.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-public-key-deriver.map.js +13 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/curve-to-public-key-deriver.map.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/maps.d.ts +4 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/maps.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/maps.js +4 -0
- package/build/node/libs/modules/key-derivation/networks/dot/libs/maps/maps.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/evm/evm-key-derivation.d.ts +15 -0
- package/build/node/libs/modules/key-derivation/networks/evm/evm-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/evm/evm-key-derivation.js +39 -0
- package/build/node/libs/modules/key-derivation/networks/evm/evm-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/evm/index.d.ts +2 -0
- package/build/node/libs/modules/key-derivation/networks/evm/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/evm/index.js +2 -0
- package/build/node/libs/modules/key-derivation/networks/evm/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/index.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/sol/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/index.js +3 -0
- package/build/node/libs/modules/key-derivation/networks/sol/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-key-pair.helper.d.ts +4 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-key-pair.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-key-pair.helper.js +11 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-key-pair.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-public-key.helper.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-public-key.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-public-key.helper.js +6 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/get-base58-encoded-public-key.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/helpers.d.ts +4 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/helpers.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/helpers.js +4 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/helpers.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/import-by-private-key.helper.d.ts +5 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/import-by-private-key.helper.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/import-by-private-key.helper.js +11 -0
- package/build/node/libs/modules/key-derivation/networks/sol/libs/helpers/import-by-private-key.helper.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/sol-base-key-derivation.d.ts +13 -0
- package/build/node/libs/modules/key-derivation/networks/sol/sol-base-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/sol-base-key-derivation.js +24 -0
- package/build/node/libs/modules/key-derivation/networks/sol/sol-base-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/sol-exodus-key-derivation.d.ts +14 -0
- package/build/node/libs/modules/key-derivation/networks/sol/sol-exodus-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sol/sol-exodus-key-derivation.js +30 -0
- package/build/node/libs/modules/key-derivation/networks/sol/sol-exodus-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sui/index.d.ts +2 -0
- package/build/node/libs/modules/key-derivation/networks/sui/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sui/index.js +2 -0
- package/build/node/libs/modules/key-derivation/networks/sui/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sui/libs/types/index.d.ts +3 -0
- package/build/node/libs/modules/key-derivation/networks/sui/libs/types/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sui/libs/types/index.js +2 -0
- package/build/node/libs/modules/key-derivation/networks/sui/libs/types/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sui/libs/types/key-pair-instance-union.type.d.ts +6 -0
- package/build/node/libs/modules/key-derivation/networks/sui/libs/types/key-pair-instance-union.type.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sui/libs/types/key-pair-instance-union.type.js +2 -0
- package/build/node/libs/modules/key-derivation/networks/sui/libs/types/key-pair-instance-union.type.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sui/libs/types/key-pair-union.type.d.ts +6 -0
- package/build/node/libs/modules/key-derivation/networks/sui/libs/types/key-pair-union.type.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sui/libs/types/key-pair-union.type.js +2 -0
- package/build/node/libs/modules/key-derivation/networks/sui/libs/types/key-pair-union.type.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sui/sui-key-derivation.d.ts +13 -0
- package/build/node/libs/modules/key-derivation/networks/sui/sui-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/sui/sui-key-derivation.js +42 -0
- package/build/node/libs/modules/key-derivation/networks/sui/sui-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ton/ton-exodus-key-derivation.d.ts +14 -0
- package/build/node/libs/modules/key-derivation/networks/ton/ton-exodus-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ton/ton-exodus-key-derivation.js +35 -0
- package/build/node/libs/modules/key-derivation/networks/ton/ton-exodus-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ton/ton.d.ts +2 -0
- package/build/node/libs/modules/key-derivation/networks/ton/ton.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/ton/ton.js +2 -0
- package/build/node/libs/modules/key-derivation/networks/ton/ton.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/zec/index.d.ts +2 -0
- package/build/node/libs/modules/key-derivation/networks/zec/index.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/zec/index.js +2 -0
- package/build/node/libs/modules/key-derivation/networks/zec/index.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/zec/transparent-key-derivation.d.ts +14 -0
- package/build/node/libs/modules/key-derivation/networks/zec/transparent-key-derivation.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks/zec/transparent-key-derivation.js +54 -0
- package/build/node/libs/modules/key-derivation/networks/zec/transparent-key-derivation.js.map +1 -0
- package/build/node/libs/modules/key-derivation/networks.d.ts +12 -0
- package/build/node/libs/modules/key-derivation/networks.d.ts.map +1 -0
- package/build/node/libs/modules/key-derivation/networks.js +12 -0
- package/build/node/libs/modules/key-derivation/networks.js.map +1 -0
- package/build/node/libs/modules/mnemonic/dot-mnemonic.d.ts +9 -0
- package/build/node/libs/modules/mnemonic/dot-mnemonic.d.ts.map +1 -0
- package/build/node/libs/modules/mnemonic/dot-mnemonic.js +29 -0
- package/build/node/libs/modules/mnemonic/dot-mnemonic.js.map +1 -0
- package/build/node/libs/modules/mnemonic/index.d.ts +3 -0
- package/build/node/libs/modules/mnemonic/index.d.ts.map +1 -0
- package/build/node/libs/modules/mnemonic/index.js +3 -0
- package/build/node/libs/modules/mnemonic/index.js.map +1 -0
- package/build/node/libs/modules/mnemonic/libs/constants/index.d.ts +4 -0
- package/build/node/libs/modules/mnemonic/libs/constants/index.d.ts.map +1 -0
- package/build/node/libs/modules/mnemonic/libs/constants/index.js +4 -0
- package/build/node/libs/modules/mnemonic/libs/constants/index.js.map +1 -0
- package/build/node/libs/modules/mnemonic/libs/enums/exception-message.enum.d.ts +7 -0
- package/build/node/libs/modules/mnemonic/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/node/libs/modules/mnemonic/libs/enums/exception-message.enum.js +9 -0
- package/build/node/libs/modules/mnemonic/libs/enums/exception-message.enum.js.map +1 -0
- package/build/node/libs/modules/mnemonic/libs/enums/index.d.ts +2 -0
- package/build/node/libs/modules/mnemonic/libs/enums/index.d.ts.map +1 -0
- package/build/node/libs/modules/mnemonic/libs/enums/index.js +2 -0
- package/build/node/libs/modules/mnemonic/libs/enums/index.js.map +1 -0
- package/build/node/libs/modules/mnemonic/libs/exceptions/index.d.ts +2 -0
- package/build/node/libs/modules/mnemonic/libs/exceptions/index.d.ts.map +1 -0
- package/build/node/libs/modules/mnemonic/libs/exceptions/index.js +2 -0
- package/build/node/libs/modules/mnemonic/libs/exceptions/index.js.map +1 -0
- package/build/node/libs/modules/mnemonic/libs/exceptions/mnemonic-error.exception.d.ts +5 -0
- package/build/node/libs/modules/mnemonic/libs/exceptions/mnemonic-error.exception.d.ts.map +1 -0
- package/build/node/libs/modules/mnemonic/libs/exceptions/mnemonic-error.exception.js +9 -0
- package/build/node/libs/modules/mnemonic/libs/exceptions/mnemonic-error.exception.js.map +1 -0
- package/build/node/libs/modules/mnemonic/mnemonic.d.ts +11 -0
- package/build/node/libs/modules/mnemonic/mnemonic.d.ts.map +1 -0
- package/build/node/libs/modules/mnemonic/mnemonic.js +37 -0
- package/build/node/libs/modules/mnemonic/mnemonic.js.map +1 -0
- package/build/node/libs/types/auth-scheme-union.type.d.ts +3 -0
- package/build/node/libs/types/auth-scheme-union.type.d.ts.map +1 -0
- package/build/node/libs/types/auth-scheme-union.type.js +2 -0
- package/build/node/libs/types/auth-scheme-union.type.js.map +1 -0
- package/build/node/libs/types/derivation/derivation-path.type.d.ts +11 -0
- package/build/node/libs/types/derivation/derivation-path.type.d.ts.map +1 -0
- package/build/node/libs/types/derivation/derivation-path.type.js +2 -0
- package/build/node/libs/types/derivation/derivation-path.type.js.map +1 -0
- package/build/node/libs/types/derivation/derivation-type-union.type.d.ts +32 -0
- package/build/node/libs/types/derivation/derivation-type-union.type.d.ts.map +1 -0
- package/build/node/libs/types/derivation/derivation-type-union.type.js +2 -0
- package/build/node/libs/types/derivation/derivation-type-union.type.js.map +1 -0
- package/build/node/libs/types/derivation/types.d.ts +3 -0
- package/build/node/libs/types/derivation/types.d.ts.map +1 -0
- package/build/node/libs/types/derivation/types.js +2 -0
- package/build/node/libs/types/derivation/types.js.map +1 -0
- package/build/node/libs/types/keys/index.d.ts +3 -0
- package/build/node/libs/types/keys/index.d.ts.map +1 -0
- package/build/node/libs/types/keys/index.js +3 -0
- package/build/node/libs/types/keys/index.js.map +1 -0
- package/build/node/libs/types/keys/key-pair.type.d.ts +12 -0
- package/build/node/libs/types/keys/key-pair.type.d.ts.map +1 -0
- package/build/node/libs/types/keys/key-pair.type.js +3 -0
- package/build/node/libs/types/keys/key-pair.type.js.map +1 -0
- package/build/node/libs/types/keys/private-key.type.d.ts +11 -0
- package/build/node/libs/types/keys/private-key.type.d.ts.map +1 -0
- package/build/node/libs/types/keys/private-key.type.js +2 -0
- package/build/node/libs/types/keys/private-key.type.js.map +1 -0
- package/build/node/libs/types/types.d.ts +5 -0
- package/build/node/libs/types/types.d.ts.map +1 -0
- package/build/node/libs/types/types.js +2 -0
- package/build/node/libs/types/types.js.map +1 -0
- package/build/node/libs/types/value-of.type.d.ts +6 -0
- package/build/node/libs/types/value-of.type.d.ts.map +1 -0
- package/build/node/libs/types/value-of.type.js +2 -0
- package/build/node/libs/types/value-of.type.js.map +1 -0
- package/build/node/libs/utils/add-hex-prefix.util.d.ts +3 -0
- package/build/node/libs/utils/add-hex-prefix.util.d.ts.map +1 -0
- package/build/node/libs/utils/add-hex-prefix.util.js +7 -0
- package/build/node/libs/utils/add-hex-prefix.util.js.map +1 -0
- package/build/node/libs/utils/check-and-remove-hex-prefix.util.d.ts +3 -0
- package/build/node/libs/utils/check-and-remove-hex-prefix.util.d.ts.map +1 -0
- package/build/node/libs/utils/check-and-remove-hex-prefix.util.js +7 -0
- package/build/node/libs/utils/check-and-remove-hex-prefix.util.js.map +1 -0
- package/build/node/libs/utils/convert-bytes-to-hex.util.d.ts +3 -0
- package/build/node/libs/utils/convert-bytes-to-hex.util.d.ts.map +1 -0
- package/build/node/libs/utils/convert-bytes-to-hex.util.js +5 -0
- package/build/node/libs/utils/convert-bytes-to-hex.util.js.map +1 -0
- package/build/node/libs/utils/convert-hex-to-bytes/convert-hex-to-bytes.util.d.ts +3 -0
- package/build/node/libs/utils/convert-hex-to-bytes/convert-hex-to-bytes.util.d.ts.map +1 -0
- package/build/node/libs/utils/convert-hex-to-bytes/convert-hex-to-bytes.util.js +14 -0
- package/build/node/libs/utils/convert-hex-to-bytes/convert-hex-to-bytes.util.js.map +1 -0
- package/build/node/libs/utils/convert-hex-to-bytes/index.d.ts +2 -0
- package/build/node/libs/utils/convert-hex-to-bytes/index.d.ts.map +1 -0
- package/build/node/libs/utils/convert-hex-to-bytes/index.js +2 -0
- package/build/node/libs/utils/convert-hex-to-bytes/index.js.map +1 -0
- package/build/node/libs/utils/convert-hex-to-bytes/libs/constants/index.d.ts +4 -0
- package/build/node/libs/utils/convert-hex-to-bytes/libs/constants/index.d.ts.map +1 -0
- package/build/node/libs/utils/convert-hex-to-bytes/libs/constants/index.js +4 -0
- package/build/node/libs/utils/convert-hex-to-bytes/libs/constants/index.js.map +1 -0
- package/build/node/libs/utils/convert-hex-to-bytes/libs/enums/exception-message.enum.d.ts +5 -0
- package/build/node/libs/utils/convert-hex-to-bytes/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/node/libs/utils/convert-hex-to-bytes/libs/enums/exception-message.enum.js +5 -0
- package/build/node/libs/utils/convert-hex-to-bytes/libs/enums/exception-message.enum.js.map +1 -0
- package/build/node/libs/utils/convert-hex-to-bytes/libs/enums/index.d.ts +2 -0
- package/build/node/libs/utils/convert-hex-to-bytes/libs/enums/index.d.ts.map +1 -0
- package/build/node/libs/utils/convert-hex-to-bytes/libs/enums/index.js +2 -0
- package/build/node/libs/utils/convert-hex-to-bytes/libs/enums/index.js.map +1 -0
- package/build/node/libs/utils/index.d.ts +7 -0
- package/build/node/libs/utils/index.d.ts.map +1 -0
- package/build/node/libs/utils/index.js +7 -0
- package/build/node/libs/utils/index.js.map +1 -0
- package/build/node/libs/utils/is-hex-prefixed.util.d.ts +3 -0
- package/build/node/libs/utils/is-hex-prefixed.util.d.ts.map +1 -0
- package/build/node/libs/utils/is-hex-prefixed.util.js +6 -0
- package/build/node/libs/utils/is-hex-prefixed.util.js.map +1 -0
- package/build/node/libs/utils/remove-hex-prefix.util.d.ts +3 -0
- package/build/node/libs/utils/remove-hex-prefix.util.d.ts.map +1 -0
- package/build/node/libs/utils/remove-hex-prefix.util.js +7 -0
- package/build/node/libs/utils/remove-hex-prefix.util.js.map +1 -0
- package/build/node/modules/network/ada/ada.network.d.ts +12 -0
- package/build/node/modules/network/ada/ada.network.d.ts.map +1 -0
- package/build/node/modules/network/ada/ada.network.js +49 -0
- package/build/node/modules/network/ada/ada.network.js.map +1 -0
- package/build/node/modules/network/ada/index.d.ts +2 -0
- package/build/node/modules/network/ada/index.d.ts.map +1 -0
- package/build/node/modules/network/ada/index.js +2 -0
- package/build/node/modules/network/ada/index.js.map +1 -0
- package/build/node/modules/network/ada/libs/helpers/get-derivation-handlers.helper.d.ts +8 -0
- package/build/node/modules/network/ada/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/ada/libs/helpers/get-derivation-handlers.helper.js +275 -0
- package/build/node/modules/network/ada/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/ada/libs/helpers/get-network-id.helper.d.ts +4 -0
- package/build/node/modules/network/ada/libs/helpers/get-network-id.helper.d.ts.map +1 -0
- package/build/node/modules/network/ada/libs/helpers/get-network-id.helper.js +16 -0
- package/build/node/modules/network/ada/libs/helpers/get-network-id.helper.js.map +1 -0
- package/build/node/modules/network/ada/libs/helpers/helpers.d.ts +3 -0
- package/build/node/modules/network/ada/libs/helpers/helpers.d.ts.map +1 -0
- package/build/node/modules/network/ada/libs/helpers/helpers.js +3 -0
- package/build/node/modules/network/ada/libs/helpers/helpers.js.map +1 -0
- package/build/node/modules/network/apt/apt.network.d.ts +12 -0
- package/build/node/modules/network/apt/apt.network.d.ts.map +1 -0
- package/build/node/modules/network/apt/apt.network.js +27 -0
- package/build/node/modules/network/apt/apt.network.js.map +1 -0
- package/build/node/modules/network/apt/index.d.ts +2 -0
- package/build/node/modules/network/apt/index.d.ts.map +1 -0
- package/build/node/modules/network/apt/index.js +2 -0
- package/build/node/modules/network/apt/index.js.map +1 -0
- package/build/node/modules/network/apt/libs/helpers/get-derivation-handlers.helper.d.ts +5 -0
- package/build/node/modules/network/apt/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/apt/libs/helpers/get-derivation-handlers.helper.js +30 -0
- package/build/node/modules/network/apt/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/apt/libs/helpers/index.d.ts +2 -0
- package/build/node/modules/network/apt/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/apt/libs/helpers/index.js +2 -0
- package/build/node/modules/network/apt/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/avax/avax.network.d.ts +12 -0
- package/build/node/modules/network/avax/avax.network.d.ts.map +1 -0
- package/build/node/modules/network/avax/avax.network.js +41 -0
- package/build/node/modules/network/avax/avax.network.js.map +1 -0
- package/build/node/modules/network/avax/index.d.ts +2 -0
- package/build/node/modules/network/avax/index.d.ts.map +1 -0
- package/build/node/modules/network/avax/index.js +2 -0
- package/build/node/modules/network/avax/index.js.map +1 -0
- package/build/node/modules/network/avax/libs/helpers/get-derivation-handlers.helper.d.ts +5 -0
- package/build/node/modules/network/avax/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/avax/libs/helpers/get-derivation-handlers.helper.js +32 -0
- package/build/node/modules/network/avax/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/avax/libs/helpers/index.d.ts +2 -0
- package/build/node/modules/network/avax/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/avax/libs/helpers/index.js +2 -0
- package/build/node/modules/network/avax/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/bch/bch.network.d.ts +12 -0
- package/build/node/modules/network/bch/bch.network.d.ts.map +1 -0
- package/build/node/modules/network/bch/bch.network.js +38 -0
- package/build/node/modules/network/bch/bch.network.js.map +1 -0
- package/build/node/modules/network/bch/index.d.ts +2 -0
- package/build/node/modules/network/bch/index.d.ts.map +1 -0
- package/build/node/modules/network/bch/index.js +2 -0
- package/build/node/modules/network/bch/index.js.map +1 -0
- package/build/node/modules/network/bch/libs/helpers/get-derivation-handlers.helper.d.ts +5 -0
- package/build/node/modules/network/bch/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/bch/libs/helpers/get-derivation-handlers.helper.js +50 -0
- package/build/node/modules/network/bch/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/bch/libs/helpers/index.d.ts +2 -0
- package/build/node/modules/network/bch/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/bch/libs/helpers/index.js +2 -0
- package/build/node/modules/network/bch/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/bnb/bnb.network.d.ts +11 -0
- package/build/node/modules/network/bnb/bnb.network.d.ts.map +1 -0
- package/build/node/modules/network/bnb/bnb.network.js +27 -0
- package/build/node/modules/network/bnb/bnb.network.js.map +1 -0
- package/build/node/modules/network/bnb/index.d.ts +2 -0
- package/build/node/modules/network/bnb/index.d.ts.map +1 -0
- package/build/node/modules/network/bnb/index.js +2 -0
- package/build/node/modules/network/bnb/index.js.map +1 -0
- package/build/node/modules/network/bnb/libs/helpers/get-derivation-handlers.helper.d.ts +4 -0
- package/build/node/modules/network/bnb/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/bnb/libs/helpers/get-derivation-handlers.helper.js +23 -0
- package/build/node/modules/network/bnb/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/bnb/libs/helpers/index.d.ts +2 -0
- package/build/node/modules/network/bnb/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/bnb/libs/helpers/index.js +2 -0
- package/build/node/modules/network/bnb/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/btc/btc.network.d.ts +12 -0
- package/build/node/modules/network/btc/btc.network.d.ts.map +1 -0
- package/build/node/modules/network/btc/btc.network.js +54 -0
- package/build/node/modules/network/btc/btc.network.js.map +1 -0
- package/build/node/modules/network/btc/index.d.ts +2 -0
- package/build/node/modules/network/btc/index.d.ts.map +1 -0
- package/build/node/modules/network/btc/index.js +2 -0
- package/build/node/modules/network/btc/index.js.map +1 -0
- package/build/node/modules/network/btc/libs/helpers/get-derivation-handlers.helper.d.ts +9 -0
- package/build/node/modules/network/btc/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/btc/libs/helpers/get-derivation-handlers.helper.js +140 -0
- package/build/node/modules/network/btc/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/btc/libs/helpers/index.d.ts +2 -0
- package/build/node/modules/network/btc/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/btc/libs/helpers/index.js +2 -0
- package/build/node/modules/network/btc/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/doge/doge.network.d.ts +11 -0
- package/build/node/modules/network/doge/doge.network.d.ts.map +1 -0
- package/build/node/modules/network/doge/doge.network.js +29 -0
- package/build/node/modules/network/doge/doge.network.js.map +1 -0
- package/build/node/modules/network/doge/index.d.ts +2 -0
- package/build/node/modules/network/doge/index.d.ts.map +1 -0
- package/build/node/modules/network/doge/index.js +2 -0
- package/build/node/modules/network/doge/index.js.map +1 -0
- package/build/node/modules/network/doge/libs/helpers/get-derivation-handlers.helper.d.ts +4 -0
- package/build/node/modules/network/doge/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/doge/libs/helpers/get-derivation-handlers.helper.js +24 -0
- package/build/node/modules/network/doge/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/doge/libs/helpers/index.d.ts +2 -0
- package/build/node/modules/network/doge/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/doge/libs/helpers/index.js +2 -0
- package/build/node/modules/network/doge/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/dot/dot.d.ts +2 -0
- package/build/node/modules/network/dot/dot.d.ts.map +1 -0
- package/build/node/modules/network/dot/dot.js +2 -0
- package/build/node/modules/network/dot/dot.js.map +1 -0
- package/build/node/modules/network/dot/dot.network.d.ts +12 -0
- package/build/node/modules/network/dot/dot.network.d.ts.map +1 -0
- package/build/node/modules/network/dot/dot.network.js +39 -0
- package/build/node/modules/network/dot/dot.network.js.map +1 -0
- package/build/node/modules/network/dot/libs/helpers/append-address-to-derivation-path.helper.d.ts +9 -0
- package/build/node/modules/network/dot/libs/helpers/append-address-to-derivation-path.helper.d.ts.map +1 -0
- package/build/node/modules/network/dot/libs/helpers/append-address-to-derivation-path.helper.js +7 -0
- package/build/node/modules/network/dot/libs/helpers/append-address-to-derivation-path.helper.js.map +1 -0
- package/build/node/modules/network/dot/libs/helpers/get-derivation-handlers.helper.d.ts +6 -0
- package/build/node/modules/network/dot/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/dot/libs/helpers/get-derivation-handlers.helper.js +85 -0
- package/build/node/modules/network/dot/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/dot/libs/helpers/helpers.d.ts +2 -0
- package/build/node/modules/network/dot/libs/helpers/helpers.d.ts.map +1 -0
- package/build/node/modules/network/dot/libs/helpers/helpers.js +2 -0
- package/build/node/modules/network/dot/libs/helpers/helpers.js.map +1 -0
- package/build/node/modules/network/dot/libs/helpers/validate-derivation-path.helper.d.ts +4 -0
- package/build/node/modules/network/dot/libs/helpers/validate-derivation-path.helper.d.ts.map +1 -0
- package/build/node/modules/network/dot/libs/helpers/validate-derivation-path.helper.js +10 -0
- package/build/node/modules/network/dot/libs/helpers/validate-derivation-path.helper.js.map +1 -0
- package/build/node/modules/network/evm/evm.network.d.ts +11 -0
- package/build/node/modules/network/evm/evm.network.d.ts.map +1 -0
- package/build/node/modules/network/evm/evm.network.js +27 -0
- package/build/node/modules/network/evm/evm.network.js.map +1 -0
- package/build/node/modules/network/evm/index.d.ts +2 -0
- package/build/node/modules/network/evm/index.d.ts.map +1 -0
- package/build/node/modules/network/evm/index.js +2 -0
- package/build/node/modules/network/evm/index.js.map +1 -0
- package/build/node/modules/network/evm/libs/helpers/get-derivation-handlers.helper.d.ts +4 -0
- package/build/node/modules/network/evm/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/evm/libs/helpers/get-derivation-handlers.helper.js +23 -0
- package/build/node/modules/network/evm/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/evm/libs/helpers/index.d.ts +2 -0
- package/build/node/modules/network/evm/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/evm/libs/helpers/index.js +2 -0
- package/build/node/modules/network/evm/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/get-network/get-network.d.ts +5 -0
- package/build/node/modules/network/get-network/get-network.d.ts.map +1 -0
- package/build/node/modules/network/get-network/get-network.js +132 -0
- package/build/node/modules/network/get-network/get-network.js.map +1 -0
- package/build/node/modules/network/get-network/libs/types/get-network-parameters.type.d.ts +6 -0
- package/build/node/modules/network/get-network/libs/types/get-network-parameters.type.d.ts.map +1 -0
- package/build/node/modules/network/get-network/libs/types/get-network-parameters.type.js +2 -0
- package/build/node/modules/network/get-network/libs/types/get-network-parameters.type.js.map +1 -0
- package/build/node/modules/network/get-network/libs/types/index.d.ts +3 -0
- package/build/node/modules/network/get-network/libs/types/index.d.ts.map +1 -0
- package/build/node/modules/network/get-network/libs/types/index.js +2 -0
- package/build/node/modules/network/get-network/libs/types/index.js.map +1 -0
- package/build/node/modules/network/get-network/libs/types/network-name-to-network.type.d.ts +36 -0
- package/build/node/modules/network/get-network/libs/types/network-name-to-network.type.d.ts.map +1 -0
- package/build/node/modules/network/get-network/libs/types/network-name-to-network.type.js +17 -0
- package/build/node/modules/network/get-network/libs/types/network-name-to-network.type.js.map +1 -0
- package/build/node/modules/network/index.d.ts +4 -0
- package/build/node/modules/network/index.d.ts.map +1 -0
- package/build/node/modules/network/index.js +3 -0
- package/build/node/modules/network/index.js.map +1 -0
- package/build/node/modules/network/libs/constants/__tests__/index.d.ts +6 -0
- package/build/node/modules/network/libs/constants/__tests__/index.d.ts.map +1 -0
- package/build/node/modules/network/libs/constants/__tests__/index.js +6 -0
- package/build/node/modules/network/libs/constants/__tests__/index.js.map +1 -0
- package/build/node/modules/network/libs/constants/default-instance-parameters.constant.d.ts +100 -0
- package/build/node/modules/network/libs/constants/default-instance-parameters.constant.d.ts.map +1 -0
- package/build/node/modules/network/libs/constants/default-instance-parameters.constant.js +120 -0
- package/build/node/modules/network/libs/constants/default-instance-parameters.constant.js.map +1 -0
- package/build/node/modules/network/libs/constants/index.d.ts +5 -0
- package/build/node/modules/network/libs/constants/index.d.ts.map +1 -0
- package/build/node/modules/network/libs/constants/index.js +5 -0
- package/build/node/modules/network/libs/constants/index.js.map +1 -0
- package/build/node/modules/network/libs/enums/exception-message.enum.d.ts +7 -0
- package/build/node/modules/network/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/node/modules/network/libs/enums/exception-message.enum.js +7 -0
- package/build/node/modules/network/libs/enums/exception-message.enum.js.map +1 -0
- package/build/node/modules/network/libs/enums/index.d.ts +2 -0
- package/build/node/modules/network/libs/enums/index.d.ts.map +1 -0
- package/build/node/modules/network/libs/enums/index.js +2 -0
- package/build/node/modules/network/libs/enums/index.js.map +1 -0
- package/build/node/modules/network/libs/exceptions/index.d.ts +2 -0
- package/build/node/modules/network/libs/exceptions/index.d.ts.map +1 -0
- package/build/node/modules/network/libs/exceptions/index.js +2 -0
- package/build/node/modules/network/libs/exceptions/index.js.map +1 -0
- package/build/node/modules/network/libs/exceptions/network-error.exception.d.ts +5 -0
- package/build/node/modules/network/libs/exceptions/network-error.exception.d.ts.map +1 -0
- package/build/node/modules/network/libs/exceptions/network-error.exception.js +9 -0
- package/build/node/modules/network/libs/exceptions/network-error.exception.js.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/get-derivation-path-depth.helper.d.ts +4 -0
- package/build/node/modules/network/libs/helpers/derivation-path/get-derivation-path-depth.helper.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/get-derivation-path-depth.helper.js +6 -0
- package/build/node/modules/network/libs/helpers/derivation-path/get-derivation-path-depth.helper.js.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/harden-derivation-path.helper.d.ts +4 -0
- package/build/node/modules/network/libs/helpers/derivation-path/harden-derivation-path.helper.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/harden-derivation-path.helper.js +6 -0
- package/build/node/modules/network/libs/helpers/derivation-path/harden-derivation-path.helper.js.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/increase-derivation-path-depth.helper.d.ts +8 -0
- package/build/node/modules/network/libs/helpers/derivation-path/increase-derivation-path-depth.helper.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/increase-derivation-path-depth.helper.js +8 -0
- package/build/node/modules/network/libs/helpers/derivation-path/increase-derivation-path-depth.helper.js.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/index.d.ts +2 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/index.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/index.js +2 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/index.js.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/exception-message.enum.d.ts +6 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/exception-message.enum.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/exception-message.enum.js +6 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/exception-message.enum.js.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/index.d.ts +2 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/index.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/index.js +2 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/enums/index.js.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/index.d.ts +3 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/index.js +3 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-length.helper.d.ts +4 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-length.helper.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-length.helper.js +10 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-length.helper.js.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-pattern.helper.d.ts +4 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-pattern.helper.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-pattern.helper.js +14 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/libs/helpers/validate-derivation-path-pattern.helper.js.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/validate-derivation-path.helper.d.ts +4 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/validate-derivation-path.helper.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/validate-derivation-path.helper.js +29 -0
- package/build/node/modules/network/libs/helpers/derivation-path/validate-derivation-path/validate-derivation-path.helper.js.map +1 -0
- package/build/node/modules/network/libs/helpers/derive-items-batch-from-mnemonic.helper.d.ts +9 -0
- package/build/node/modules/network/libs/helpers/derive-items-batch-from-mnemonic.helper.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/derive-items-batch-from-mnemonic.helper.js +23 -0
- package/build/node/modules/network/libs/helpers/derive-items-batch-from-mnemonic.helper.js.map +1 -0
- package/build/node/modules/network/libs/helpers/does-p-k-belong-to-mnemonic.helper.d.ts +8 -0
- package/build/node/modules/network/libs/helpers/does-p-k-belong-to-mnemonic.helper.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/does-p-k-belong-to-mnemonic.helper.js +57 -0
- package/build/node/modules/network/libs/helpers/does-p-k-belong-to-mnemonic.helper.js.map +1 -0
- package/build/node/modules/network/libs/helpers/does-p-k-exist-in-batch.helper.d.ts +5 -0
- package/build/node/modules/network/libs/helpers/does-p-k-exist-in-batch.helper.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/does-p-k-exist-in-batch.helper.js +19 -0
- package/build/node/modules/network/libs/helpers/does-p-k-exist-in-batch.helper.js.map +1 -0
- package/build/node/modules/network/libs/helpers/find-custom-prefix-config.helper.d.ts +7 -0
- package/build/node/modules/network/libs/helpers/find-custom-prefix-config.helper.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/find-custom-prefix-config.helper.js +9 -0
- package/build/node/modules/network/libs/helpers/find-custom-prefix-config.helper.js.map +1 -0
- package/build/node/modules/network/libs/helpers/helpers.d.ts +9 -0
- package/build/node/modules/network/libs/helpers/helpers.d.ts.map +1 -0
- package/build/node/modules/network/libs/helpers/helpers.js +9 -0
- package/build/node/modules/network/libs/helpers/helpers.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/ada-config.d.ts +43 -0
- package/build/node/modules/network/libs/modules/config/ada-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/ada-config.js +22 -0
- package/build/node/modules/network/libs/modules/config/ada-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/avax-config.d.ts +9 -0
- package/build/node/modules/network/libs/modules/config/avax-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/avax-config.js +30 -0
- package/build/node/modules/network/libs/modules/config/avax-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/bch-config.d.ts +6 -0
- package/build/node/modules/network/libs/modules/config/bch-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/bch-config.js +39 -0
- package/build/node/modules/network/libs/modules/config/bch-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/bnb-config.d.ts +5 -0
- package/build/node/modules/network/libs/modules/config/bnb-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/bnb-config.js +7 -0
- package/build/node/modules/network/libs/modules/config/bnb-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/btc-config.d.ts +6 -0
- package/build/node/modules/network/libs/modules/config/btc-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/btc-config.js +91 -0
- package/build/node/modules/network/libs/modules/config/btc-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/doge-config.d.ts +6 -0
- package/build/node/modules/network/libs/modules/config/doge-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/doge-config.js +56 -0
- package/build/node/modules/network/libs/modules/config/doge-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/dot-config.d.ts +7 -0
- package/build/node/modules/network/libs/modules/config/dot-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/dot-config.js +10 -0
- package/build/node/modules/network/libs/modules/config/dot-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/evm-config.d.ts +11 -0
- package/build/node/modules/network/libs/modules/config/evm-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/evm-config.js +7 -0
- package/build/node/modules/network/libs/modules/config/evm-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/index.d.ts +16 -0
- package/build/node/modules/network/libs/modules/config/index.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/index.js +16 -0
- package/build/node/modules/network/libs/modules/config/index.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/libs/helpers/get-common-prefix-config.helper.d.ts +7 -0
- package/build/node/modules/network/libs/modules/config/libs/helpers/get-common-prefix-config.helper.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/libs/helpers/get-common-prefix-config.helper.js +10 -0
- package/build/node/modules/network/libs/modules/config/libs/helpers/get-common-prefix-config.helper.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/libs/helpers/index.d.ts +2 -0
- package/build/node/modules/network/libs/modules/config/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/libs/helpers/index.js +2 -0
- package/build/node/modules/network/libs/modules/config/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/libs/types/index.d.ts +3 -0
- package/build/node/modules/network/libs/modules/config/libs/types/index.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/libs/types/index.js +2 -0
- package/build/node/modules/network/libs/modules/config/libs/types/index.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/libs/types/secp256k1-config.type.d.ts +8 -0
- package/build/node/modules/network/libs/modules/config/libs/types/secp256k1-config.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/libs/types/secp256k1-config.type.js +2 -0
- package/build/node/modules/network/libs/modules/config/libs/types/secp256k1-config.type.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/libs/types/secp256k1-derivation-config.type.d.ts +8 -0
- package/build/node/modules/network/libs/modules/config/libs/types/secp256k1-derivation-config.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/libs/types/secp256k1-derivation-config.type.js +2 -0
- package/build/node/modules/network/libs/modules/config/libs/types/secp256k1-derivation-config.type.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/ltc-config.d.ts +6 -0
- package/build/node/modules/network/libs/modules/config/ltc-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/ltc-config.js +70 -0
- package/build/node/modules/network/libs/modules/config/ltc-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/sol-config.d.ts +10 -0
- package/build/node/modules/network/libs/modules/config/sol-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/sol-config.js +7 -0
- package/build/node/modules/network/libs/modules/config/sol-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/sui-config.d.ts +11 -0
- package/build/node/modules/network/libs/modules/config/sui-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/sui-config.js +9 -0
- package/build/node/modules/network/libs/modules/config/sui-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/ton-config.d.ts +10 -0
- package/build/node/modules/network/libs/modules/config/ton-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/ton-config.js +6 -0
- package/build/node/modules/network/libs/modules/config/ton-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/trx-config.d.ts +7 -0
- package/build/node/modules/network/libs/modules/config/trx-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/trx-config.js +9 -0
- package/build/node/modules/network/libs/modules/config/trx-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/xrp-config.d.ts +5 -0
- package/build/node/modules/network/libs/modules/config/xrp-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/xrp-config.js +7 -0
- package/build/node/modules/network/libs/modules/config/xrp-config.js.map +1 -0
- package/build/node/modules/network/libs/modules/config/zec-config.d.ts +6 -0
- package/build/node/modules/network/libs/modules/config/zec-config.d.ts.map +1 -0
- package/build/node/modules/network/libs/modules/config/zec-config.js +38 -0
- package/build/node/modules/network/libs/modules/config/zec-config.js.map +1 -0
- package/build/node/modules/network/libs/types/abstract-network.type.d.ts +10 -0
- package/build/node/modules/network/libs/types/abstract-network.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/abstract-network.type.js +3 -0
- package/build/node/modules/network/libs/types/abstract-network.type.js.map +1 -0
- package/build/node/modules/network/libs/types/constructor-parameters.type.d.ts +15 -0
- package/build/node/modules/network/libs/types/constructor-parameters.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/constructor-parameters.type.js +3 -0
- package/build/node/modules/network/libs/types/constructor-parameters.type.js.map +1 -0
- package/build/node/modules/network/libs/types/derivation-config.type.d.ts +94 -0
- package/build/node/modules/network/libs/types/derivation-config.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/derivation-config.type.js +2 -0
- package/build/node/modules/network/libs/types/derivation-config.type.js.map +1 -0
- package/build/node/modules/network/libs/types/derived-credential.type.d.ts +5 -0
- package/build/node/modules/network/libs/types/derived-credential.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/derived-credential.type.js +3 -0
- package/build/node/modules/network/libs/types/derived-credential.type.js.map +1 -0
- package/build/node/modules/network/libs/types/derived-item.type.d.ts +5 -0
- package/build/node/modules/network/libs/types/derived-item.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/derived-item.type.js +4 -0
- package/build/node/modules/network/libs/types/derived-item.type.js.map +1 -0
- package/build/node/modules/network/libs/types/handlers/derivation-path-prefix.type.d.ts +11 -0
- package/build/node/modules/network/libs/types/handlers/derivation-path-prefix.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/handlers/derivation-path-prefix.type.js +2 -0
- package/build/node/modules/network/libs/types/handlers/derivation-path-prefix.type.js.map +1 -0
- package/build/node/modules/network/libs/types/handlers/derivations-handlers.type.d.ts +7 -0
- package/build/node/modules/network/libs/types/handlers/derivations-handlers.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/handlers/derivations-handlers.type.js +4 -0
- package/build/node/modules/network/libs/types/handlers/derivations-handlers.type.js.map +1 -0
- package/build/node/modules/network/libs/types/handlers/derive-item-from-mnemonic.type.d.ts +7 -0
- package/build/node/modules/network/libs/types/handlers/derive-item-from-mnemonic.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/handlers/derive-item-from-mnemonic.type.js +4 -0
- package/build/node/modules/network/libs/types/handlers/derive-item-from-mnemonic.type.js.map +1 -0
- package/build/node/modules/network/libs/types/handlers/derive-items-batch-from-mnemonic.type.d.ts +13 -0
- package/build/node/modules/network/libs/types/handlers/derive-items-batch-from-mnemonic.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/handlers/derive-items-batch-from-mnemonic.type.js +5 -0
- package/build/node/modules/network/libs/types/handlers/derive-items-batch-from-mnemonic.type.js.map +1 -0
- package/build/node/modules/network/libs/types/handlers/does-p-k-belong-to-mnemonic.type.d.ts +9 -0
- package/build/node/modules/network/libs/types/handlers/does-p-k-belong-to-mnemonic.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/handlers/does-p-k-belong-to-mnemonic.type.js +3 -0
- package/build/node/modules/network/libs/types/handlers/does-p-k-belong-to-mnemonic.type.js.map +1 -0
- package/build/node/modules/network/libs/types/handlers/get-credential-from-p-k.type.d.ts +6 -0
- package/build/node/modules/network/libs/types/handlers/get-credential-from-p-k.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/handlers/get-credential-from-p-k.type.js +3 -0
- package/build/node/modules/network/libs/types/handlers/get-credential-from-p-k.type.js.map +1 -0
- package/build/node/modules/network/libs/types/handlers/get-derivation-handlers.type.d.ts +99 -0
- package/build/node/modules/network/libs/types/handlers/get-derivation-handlers.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/handlers/get-derivation-handlers.type.js +6 -0
- package/build/node/modules/network/libs/types/handlers/get-derivation-handlers.type.js.map +1 -0
- package/build/node/modules/network/libs/types/handlers/handlers-common-parameters.type.d.ts +6 -0
- package/build/node/modules/network/libs/types/handlers/handlers-common-parameters.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/handlers/handlers-common-parameters.type.js +3 -0
- package/build/node/modules/network/libs/types/handlers/handlers-common-parameters.type.js.map +1 -0
- package/build/node/modules/network/libs/types/handlers/lookup-handlers-common-parameters.type.d.ts +9 -0
- package/build/node/modules/network/libs/types/handlers/lookup-handlers-common-parameters.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/handlers/lookup-handlers-common-parameters.type.js +3 -0
- package/build/node/modules/network/libs/types/handlers/lookup-handlers-common-parameters.type.js.map +1 -0
- package/build/node/modules/network/libs/types/handlers/types.d.ts +7 -0
- package/build/node/modules/network/libs/types/handlers/types.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/handlers/types.js +2 -0
- package/build/node/modules/network/libs/types/handlers/types.js.map +1 -0
- package/build/node/modules/network/libs/types/index.d.ts +11 -0
- package/build/node/modules/network/libs/types/index.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/index.js +6 -0
- package/build/node/modules/network/libs/types/index.js.map +1 -0
- package/build/node/modules/network/libs/types/instance-parameters.type.d.ts +90 -0
- package/build/node/modules/network/libs/types/instance-parameters.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/instance-parameters.type.js +2 -0
- package/build/node/modules/network/libs/types/instance-parameters.type.js.map +1 -0
- package/build/node/modules/network/libs/types/network-purpose-union.type.d.ts +5 -0
- package/build/node/modules/network/libs/types/network-purpose-union.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/network-purpose-union.type.js +2 -0
- package/build/node/modules/network/libs/types/network-purpose-union.type.js.map +1 -0
- package/build/node/modules/network/libs/types/network-type-map.type.d.ts +20 -0
- package/build/node/modules/network/libs/types/network-type-map.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/network-type-map.type.js +2 -0
- package/build/node/modules/network/libs/types/network-type-map.type.js.map +1 -0
- package/build/node/modules/network/libs/types/network-type-union.type.d.ts +6 -0
- package/build/node/modules/network/libs/types/network-type-union.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/network-type-union.type.js +3 -0
- package/build/node/modules/network/libs/types/network-type-union.type.js.map +1 -0
- package/build/node/modules/network/libs/types/ton-address-derivation-config.type.d.ts +9 -0
- package/build/node/modules/network/libs/types/ton-address-derivation-config.type.d.ts.map +1 -0
- package/build/node/modules/network/libs/types/ton-address-derivation-config.type.js +2 -0
- package/build/node/modules/network/libs/types/ton-address-derivation-config.type.js.map +1 -0
- package/build/node/modules/network/ltc/index.d.ts +2 -0
- package/build/node/modules/network/ltc/index.d.ts.map +1 -0
- package/build/node/modules/network/ltc/index.js +2 -0
- package/build/node/modules/network/ltc/index.js.map +1 -0
- package/build/node/modules/network/ltc/libs/helpers/get-derivation-handlers.helper.d.ts +6 -0
- package/build/node/modules/network/ltc/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/ltc/libs/helpers/get-derivation-handlers.helper.js +61 -0
- package/build/node/modules/network/ltc/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/ltc/libs/helpers/index.d.ts +2 -0
- package/build/node/modules/network/ltc/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/ltc/libs/helpers/index.js +2 -0
- package/build/node/modules/network/ltc/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/ltc/ltc.network.d.ts +12 -0
- package/build/node/modules/network/ltc/ltc.network.d.ts.map +1 -0
- package/build/node/modules/network/ltc/ltc.network.js +41 -0
- package/build/node/modules/network/ltc/ltc.network.js.map +1 -0
- package/build/node/modules/network/sol/index.d.ts +2 -0
- package/build/node/modules/network/sol/index.d.ts.map +1 -0
- package/build/node/modules/network/sol/index.js +2 -0
- package/build/node/modules/network/sol/index.js.map +1 -0
- package/build/node/modules/network/sol/libs/constants/index.d.ts +3 -0
- package/build/node/modules/network/sol/libs/constants/index.d.ts.map +1 -0
- package/build/node/modules/network/sol/libs/constants/index.js +3 -0
- package/build/node/modules/network/sol/libs/constants/index.js.map +1 -0
- package/build/node/modules/network/sol/libs/helpers/get-derivation-handlers.helper.d.ts +5 -0
- package/build/node/modules/network/sol/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/sol/libs/helpers/get-derivation-handlers.helper.js +42 -0
- package/build/node/modules/network/sol/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/sol/libs/helpers/helpers.d.ts +2 -0
- package/build/node/modules/network/sol/libs/helpers/helpers.d.ts.map +1 -0
- package/build/node/modules/network/sol/libs/helpers/helpers.js +2 -0
- package/build/node/modules/network/sol/libs/helpers/helpers.js.map +1 -0
- package/build/node/modules/network/sol/sol.network.d.ts +12 -0
- package/build/node/modules/network/sol/sol.network.d.ts.map +1 -0
- package/build/node/modules/network/sol/sol.network.js +34 -0
- package/build/node/modules/network/sol/sol.network.js.map +1 -0
- package/build/node/modules/network/sui/index.d.ts +2 -0
- package/build/node/modules/network/sui/index.d.ts.map +1 -0
- package/build/node/modules/network/sui/index.js +2 -0
- package/build/node/modules/network/sui/index.js.map +1 -0
- package/build/node/modules/network/sui/libs/helpers/get-derivation-handlers.helper.d.ts +4 -0
- package/build/node/modules/network/sui/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/sui/libs/helpers/get-derivation-handlers.helper.js +33 -0
- package/build/node/modules/network/sui/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/sui/libs/helpers/index.d.ts +2 -0
- package/build/node/modules/network/sui/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/sui/libs/helpers/index.js +2 -0
- package/build/node/modules/network/sui/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/sui/sui.network.d.ts +11 -0
- package/build/node/modules/network/sui/sui.network.d.ts.map +1 -0
- package/build/node/modules/network/sui/sui.network.js +25 -0
- package/build/node/modules/network/sui/sui.network.js.map +1 -0
- package/build/node/modules/network/ton/index.d.ts +2 -0
- package/build/node/modules/network/ton/index.d.ts.map +1 -0
- package/build/node/modules/network/ton/index.js +2 -0
- package/build/node/modules/network/ton/index.js.map +1 -0
- package/build/node/modules/network/ton/libs/helpers/get-derivation-handlers.helper.d.ts +5 -0
- package/build/node/modules/network/ton/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/ton/libs/helpers/get-derivation-handlers.helper.js +77 -0
- package/build/node/modules/network/ton/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/ton/libs/helpers/helpers.d.ts +2 -0
- package/build/node/modules/network/ton/libs/helpers/helpers.d.ts.map +1 -0
- package/build/node/modules/network/ton/libs/helpers/helpers.js +2 -0
- package/build/node/modules/network/ton/libs/helpers/helpers.js.map +1 -0
- package/build/node/modules/network/ton/ton.network.d.ts +12 -0
- package/build/node/modules/network/ton/ton.network.d.ts.map +1 -0
- package/build/node/modules/network/ton/ton.network.js +36 -0
- package/build/node/modules/network/ton/ton.network.js.map +1 -0
- package/build/node/modules/network/trx/index.d.ts +2 -0
- package/build/node/modules/network/trx/index.d.ts.map +1 -0
- package/build/node/modules/network/trx/index.js +2 -0
- package/build/node/modules/network/trx/index.js.map +1 -0
- package/build/node/modules/network/trx/libs/helpers/get-derivation-handlers.helper.d.ts +4 -0
- package/build/node/modules/network/trx/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/trx/libs/helpers/get-derivation-handlers.helper.js +24 -0
- package/build/node/modules/network/trx/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/trx/libs/helpers/index.d.ts +2 -0
- package/build/node/modules/network/trx/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/trx/libs/helpers/index.js +2 -0
- package/build/node/modules/network/trx/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/trx/trx.network.d.ts +11 -0
- package/build/node/modules/network/trx/trx.network.d.ts.map +1 -0
- package/build/node/modules/network/trx/trx.network.js +27 -0
- package/build/node/modules/network/trx/trx.network.js.map +1 -0
- package/build/node/modules/network/xrp/index.d.ts +2 -0
- package/build/node/modules/network/xrp/index.d.ts.map +1 -0
- package/build/node/modules/network/xrp/index.js +2 -0
- package/build/node/modules/network/xrp/index.js.map +1 -0
- package/build/node/modules/network/xrp/libs/helpers/get-derivation-handlers.helper.d.ts +5 -0
- package/build/node/modules/network/xrp/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/xrp/libs/helpers/get-derivation-handlers.helper.js +23 -0
- package/build/node/modules/network/xrp/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/xrp/libs/helpers/index.d.ts +2 -0
- package/build/node/modules/network/xrp/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/xrp/libs/helpers/index.js +2 -0
- package/build/node/modules/network/xrp/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/xrp/xrp.network.d.ts +12 -0
- package/build/node/modules/network/xrp/xrp.network.d.ts.map +1 -0
- package/build/node/modules/network/xrp/xrp.network.js +42 -0
- package/build/node/modules/network/xrp/xrp.network.js.map +1 -0
- package/build/node/modules/network/zec/index.d.ts +2 -0
- package/build/node/modules/network/zec/index.d.ts.map +1 -0
- package/build/node/modules/network/zec/index.js +2 -0
- package/build/node/modules/network/zec/index.js.map +1 -0
- package/build/node/modules/network/zec/libs/helpers/get-derivation-handlers.helper.d.ts +4 -0
- package/build/node/modules/network/zec/libs/helpers/get-derivation-handlers.helper.d.ts.map +1 -0
- package/build/node/modules/network/zec/libs/helpers/get-derivation-handlers.helper.js +23 -0
- package/build/node/modules/network/zec/libs/helpers/get-derivation-handlers.helper.js.map +1 -0
- package/build/node/modules/network/zec/libs/helpers/index.d.ts +2 -0
- package/build/node/modules/network/zec/libs/helpers/index.d.ts.map +1 -0
- package/build/node/modules/network/zec/libs/helpers/index.js +2 -0
- package/build/node/modules/network/zec/libs/helpers/index.js.map +1 -0
- package/build/node/modules/network/zec/zec.network.d.ts +11 -0
- package/build/node/modules/network/zec/zec.network.d.ts.map +1 -0
- package/build/node/modules/network/zec/zec.network.js +33 -0
- package/build/node/modules/network/zec/zec.network.js.map +1 -0
- package/package.json +116 -0
|
@@ -0,0 +1,2940 @@
|
|
|
1
|
+
import { e as ed25519 } from './ed25519-BcS7UiUJ.js';
|
|
2
|
+
import { s as secp256k1 } from './secp256k1-FNoOZ2h8.js';
|
|
3
|
+
import { f as fromBig, b as add3H, r as rotr32L, c as rotr32H, d as add, e as rotrSL, g as rotrSH, h as rotrBL, i as rotrBH, j as add3L, s as sha256 } from './sha2-OXpLEvj4.js';
|
|
4
|
+
import { j as createHasher, g as abytes, s as u32, t as swap8IfBE, f as clean, e as anumber$1, i as aexists, v as swap32IfBE, o as aoutput, m as bytesToHex, h as hexToBytes } from './utils-BDj4oeIm.js';
|
|
5
|
+
import { p as p256 } from './nist-Cie-30E0.js';
|
|
6
|
+
|
|
7
|
+
//#region src/uleb.ts
|
|
8
|
+
function ulebEncode(num) {
|
|
9
|
+
let bigNum = BigInt(num);
|
|
10
|
+
const arr = [];
|
|
11
|
+
let len = 0;
|
|
12
|
+
if (bigNum === 0n) return [0];
|
|
13
|
+
while (bigNum > 0) {
|
|
14
|
+
arr[len] = Number(bigNum & 127n);
|
|
15
|
+
bigNum >>= 7n;
|
|
16
|
+
if (bigNum > 0n) arr[len] |= 128;
|
|
17
|
+
len += 1;
|
|
18
|
+
}
|
|
19
|
+
return arr;
|
|
20
|
+
}
|
|
21
|
+
function ulebDecode(arr) {
|
|
22
|
+
let total = 0n;
|
|
23
|
+
let shift = 0n;
|
|
24
|
+
let len = 0;
|
|
25
|
+
while (true) {
|
|
26
|
+
if (len >= arr.length) throw new Error("ULEB decode error: buffer overflow");
|
|
27
|
+
const byte = arr[len];
|
|
28
|
+
len += 1;
|
|
29
|
+
total += BigInt(byte & 127) << shift;
|
|
30
|
+
if ((byte & 128) === 0) break;
|
|
31
|
+
shift += 7n;
|
|
32
|
+
}
|
|
33
|
+
if (total > BigInt(Number.MAX_SAFE_INTEGER)) throw new Error("ULEB decode error: value exceeds MAX_SAFE_INTEGER");
|
|
34
|
+
return {
|
|
35
|
+
value: Number(total),
|
|
36
|
+
length: len
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//#region src/reader.ts
|
|
41
|
+
/**
|
|
42
|
+
* Class used for reading BCS data chunk by chunk. Meant to be used
|
|
43
|
+
* by some wrapper, which will make sure that data is valid and is
|
|
44
|
+
* matching the desired format.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* // data for this example is:
|
|
48
|
+
* // { a: u8, b: u32, c: bool, d: u64 }
|
|
49
|
+
*
|
|
50
|
+
* let reader = new BcsReader("647f1a060001ffffe7890423c78a050102030405");
|
|
51
|
+
* let field1 = reader.read8();
|
|
52
|
+
* let field2 = reader.read32();
|
|
53
|
+
* let field3 = reader.read8() === '1'; // bool
|
|
54
|
+
* let field4 = reader.read64();
|
|
55
|
+
* // ....
|
|
56
|
+
*
|
|
57
|
+
* Reading vectors is another deal in bcs. To read a vector, you first need to read
|
|
58
|
+
* its length using {@link readULEB}. Here's an example:
|
|
59
|
+
* @example
|
|
60
|
+
* // data encoded: { field: [1, 2, 3, 4, 5] }
|
|
61
|
+
* let reader = new BcsReader("050102030405");
|
|
62
|
+
* let vec_length = reader.readULEB();
|
|
63
|
+
* let elements = [];
|
|
64
|
+
* for (let i = 0; i < vec_length; i++) {
|
|
65
|
+
* elements.push(reader.read8());
|
|
66
|
+
* }
|
|
67
|
+
* console.log(elements); // [1,2,3,4,5]
|
|
68
|
+
*
|
|
69
|
+
* @param {String} data HEX-encoded data (serialized BCS)
|
|
70
|
+
*/
|
|
71
|
+
var BcsReader = class {
|
|
72
|
+
/**
|
|
73
|
+
* @param {Uint8Array} data Data to use as a buffer.
|
|
74
|
+
*/
|
|
75
|
+
constructor(data) {
|
|
76
|
+
this.bytePosition = 0;
|
|
77
|
+
this.dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Shift current cursor position by `bytes`.
|
|
81
|
+
*
|
|
82
|
+
* @param {Number} bytes Number of bytes to
|
|
83
|
+
* @returns {this} Self for possible chaining.
|
|
84
|
+
*/
|
|
85
|
+
shift(bytes) {
|
|
86
|
+
this.bytePosition += bytes;
|
|
87
|
+
return this;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Read U8 value from the buffer and shift cursor by 1.
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
93
|
+
read8() {
|
|
94
|
+
const value = this.dataView.getUint8(this.bytePosition);
|
|
95
|
+
this.shift(1);
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Read U16 value from the buffer and shift cursor by 2.
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
102
|
+
read16() {
|
|
103
|
+
const value = this.dataView.getUint16(this.bytePosition, true);
|
|
104
|
+
this.shift(2);
|
|
105
|
+
return value;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Read U32 value from the buffer and shift cursor by 4.
|
|
109
|
+
* @returns
|
|
110
|
+
*/
|
|
111
|
+
read32() {
|
|
112
|
+
const value = this.dataView.getUint32(this.bytePosition, true);
|
|
113
|
+
this.shift(4);
|
|
114
|
+
return value;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Read U64 value from the buffer and shift cursor by 8.
|
|
118
|
+
* @returns
|
|
119
|
+
*/
|
|
120
|
+
read64() {
|
|
121
|
+
const value1 = this.read32();
|
|
122
|
+
const result = this.read32().toString(16) + value1.toString(16).padStart(8, "0");
|
|
123
|
+
return BigInt("0x" + result).toString(10);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Read U128 value from the buffer and shift cursor by 16.
|
|
127
|
+
*/
|
|
128
|
+
read128() {
|
|
129
|
+
const value1 = BigInt(this.read64());
|
|
130
|
+
const result = BigInt(this.read64()).toString(16) + value1.toString(16).padStart(16, "0");
|
|
131
|
+
return BigInt("0x" + result).toString(10);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Read U128 value from the buffer and shift cursor by 32.
|
|
135
|
+
* @returns
|
|
136
|
+
*/
|
|
137
|
+
read256() {
|
|
138
|
+
const value1 = BigInt(this.read128());
|
|
139
|
+
const result = BigInt(this.read128()).toString(16) + value1.toString(16).padStart(32, "0");
|
|
140
|
+
return BigInt("0x" + result).toString(10);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Read `num` number of bytes from the buffer and shift cursor by `num`.
|
|
144
|
+
* @param num Number of bytes to read.
|
|
145
|
+
*/
|
|
146
|
+
readBytes(num) {
|
|
147
|
+
const start = this.bytePosition + this.dataView.byteOffset;
|
|
148
|
+
const value = new Uint8Array(this.dataView.buffer, start, num);
|
|
149
|
+
this.shift(num);
|
|
150
|
+
return value;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Read ULEB value - an integer of varying size. Used for enum indexes and
|
|
154
|
+
* vector lengths.
|
|
155
|
+
* @returns {Number} The ULEB value.
|
|
156
|
+
*/
|
|
157
|
+
readULEB() {
|
|
158
|
+
const start = this.bytePosition + this.dataView.byteOffset;
|
|
159
|
+
const { value, length } = ulebDecode(new Uint8Array(this.dataView.buffer, start));
|
|
160
|
+
this.shift(length);
|
|
161
|
+
return value;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Read a BCS vector: read a length and then apply function `cb` X times
|
|
165
|
+
* where X is the length of the vector, defined as ULEB in BCS bytes.
|
|
166
|
+
* @param cb Callback to process elements of vector.
|
|
167
|
+
* @returns {Array<Any>} Array of the resulting values, returned by callback.
|
|
168
|
+
*/
|
|
169
|
+
readVec(cb) {
|
|
170
|
+
const length = this.readULEB();
|
|
171
|
+
const result = [];
|
|
172
|
+
for (let i = 0; i < length; i++) result.push(cb(this, i, length));
|
|
173
|
+
return result;
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
178
|
+
function isBytes(a) {
|
|
179
|
+
return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');
|
|
180
|
+
}
|
|
181
|
+
function isArrayOf(isString, arr) {
|
|
182
|
+
if (!Array.isArray(arr))
|
|
183
|
+
return false;
|
|
184
|
+
if (arr.length === 0)
|
|
185
|
+
return true;
|
|
186
|
+
if (isString) {
|
|
187
|
+
return arr.every((item) => typeof item === 'string');
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
return arr.every((item) => Number.isSafeInteger(item));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
function afn(input) {
|
|
194
|
+
if (typeof input !== 'function')
|
|
195
|
+
throw new Error('function expected');
|
|
196
|
+
return true;
|
|
197
|
+
}
|
|
198
|
+
function astr(label, input) {
|
|
199
|
+
if (typeof input !== 'string')
|
|
200
|
+
throw new Error(`${label}: string expected`);
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
function anumber(n) {
|
|
204
|
+
if (!Number.isSafeInteger(n))
|
|
205
|
+
throw new Error(`invalid integer: ${n}`);
|
|
206
|
+
}
|
|
207
|
+
function aArr(input) {
|
|
208
|
+
if (!Array.isArray(input))
|
|
209
|
+
throw new Error('array expected');
|
|
210
|
+
}
|
|
211
|
+
function astrArr(label, input) {
|
|
212
|
+
if (!isArrayOf(true, input))
|
|
213
|
+
throw new Error(`${label}: array of strings expected`);
|
|
214
|
+
}
|
|
215
|
+
function anumArr(label, input) {
|
|
216
|
+
if (!isArrayOf(false, input))
|
|
217
|
+
throw new Error(`${label}: array of numbers expected`);
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* @__NO_SIDE_EFFECTS__
|
|
221
|
+
*/
|
|
222
|
+
function chain(...args) {
|
|
223
|
+
const id = (a) => a;
|
|
224
|
+
// Wrap call in closure so JIT can inline calls
|
|
225
|
+
const wrap = (a, b) => (c) => a(b(c));
|
|
226
|
+
// Construct chain of args[-1].encode(args[-2].encode([...]))
|
|
227
|
+
const encode = args.map((x) => x.encode).reduceRight(wrap, id);
|
|
228
|
+
// Construct chain of args[0].decode(args[1].decode(...))
|
|
229
|
+
const decode = args.map((x) => x.decode).reduce(wrap, id);
|
|
230
|
+
return { encode, decode };
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Encodes integer radix representation to array of strings using alphabet and back.
|
|
234
|
+
* Could also be array of strings.
|
|
235
|
+
* @__NO_SIDE_EFFECTS__
|
|
236
|
+
*/
|
|
237
|
+
function alphabet(letters) {
|
|
238
|
+
// mapping 1 to "b"
|
|
239
|
+
const lettersA = typeof letters === 'string' ? letters.split('') : letters;
|
|
240
|
+
const len = lettersA.length;
|
|
241
|
+
astrArr('alphabet', lettersA);
|
|
242
|
+
// mapping "b" to 1
|
|
243
|
+
const indexes = new Map(lettersA.map((l, i) => [l, i]));
|
|
244
|
+
return {
|
|
245
|
+
encode: (digits) => {
|
|
246
|
+
aArr(digits);
|
|
247
|
+
return digits.map((i) => {
|
|
248
|
+
if (!Number.isSafeInteger(i) || i < 0 || i >= len)
|
|
249
|
+
throw new Error(`alphabet.encode: digit index outside alphabet "${i}". Allowed: ${letters}`);
|
|
250
|
+
return lettersA[i];
|
|
251
|
+
});
|
|
252
|
+
},
|
|
253
|
+
decode: (input) => {
|
|
254
|
+
aArr(input);
|
|
255
|
+
return input.map((letter) => {
|
|
256
|
+
astr('alphabet.decode', letter);
|
|
257
|
+
const i = indexes.get(letter);
|
|
258
|
+
if (i === undefined)
|
|
259
|
+
throw new Error(`Unknown letter: "${letter}". Allowed: ${letters}`);
|
|
260
|
+
return i;
|
|
261
|
+
});
|
|
262
|
+
},
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* @__NO_SIDE_EFFECTS__
|
|
267
|
+
*/
|
|
268
|
+
function join(separator = '') {
|
|
269
|
+
astr('join', separator);
|
|
270
|
+
return {
|
|
271
|
+
encode: (from) => {
|
|
272
|
+
astrArr('join.decode', from);
|
|
273
|
+
return from.join(separator);
|
|
274
|
+
},
|
|
275
|
+
decode: (to) => {
|
|
276
|
+
astr('join.decode', to);
|
|
277
|
+
return to.split(separator);
|
|
278
|
+
},
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Slow: O(n^2) time complexity
|
|
283
|
+
*/
|
|
284
|
+
function convertRadix(data, from, to) {
|
|
285
|
+
// base 1 is impossible
|
|
286
|
+
if (from < 2)
|
|
287
|
+
throw new Error(`convertRadix: invalid from=${from}, base cannot be less than 2`);
|
|
288
|
+
if (to < 2)
|
|
289
|
+
throw new Error(`convertRadix: invalid to=${to}, base cannot be less than 2`);
|
|
290
|
+
aArr(data);
|
|
291
|
+
if (!data.length)
|
|
292
|
+
return [];
|
|
293
|
+
let pos = 0;
|
|
294
|
+
const res = [];
|
|
295
|
+
const digits = Array.from(data, (d) => {
|
|
296
|
+
anumber(d);
|
|
297
|
+
if (d < 0 || d >= from)
|
|
298
|
+
throw new Error(`invalid integer: ${d}`);
|
|
299
|
+
return d;
|
|
300
|
+
});
|
|
301
|
+
const dlen = digits.length;
|
|
302
|
+
while (true) {
|
|
303
|
+
let carry = 0;
|
|
304
|
+
let done = true;
|
|
305
|
+
for (let i = pos; i < dlen; i++) {
|
|
306
|
+
const digit = digits[i];
|
|
307
|
+
const fromCarry = from * carry;
|
|
308
|
+
const digitBase = fromCarry + digit;
|
|
309
|
+
if (!Number.isSafeInteger(digitBase) ||
|
|
310
|
+
fromCarry / from !== carry ||
|
|
311
|
+
digitBase - digit !== fromCarry) {
|
|
312
|
+
throw new Error('convertRadix: carry overflow');
|
|
313
|
+
}
|
|
314
|
+
const div = digitBase / to;
|
|
315
|
+
carry = digitBase % to;
|
|
316
|
+
const rounded = Math.floor(div);
|
|
317
|
+
digits[i] = rounded;
|
|
318
|
+
if (!Number.isSafeInteger(rounded) || rounded * to + carry !== digitBase)
|
|
319
|
+
throw new Error('convertRadix: carry overflow');
|
|
320
|
+
if (!done)
|
|
321
|
+
continue;
|
|
322
|
+
else if (!rounded)
|
|
323
|
+
pos = i;
|
|
324
|
+
else
|
|
325
|
+
done = false;
|
|
326
|
+
}
|
|
327
|
+
res.push(carry);
|
|
328
|
+
if (done)
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
331
|
+
for (let i = 0; i < data.length - 1 && data[i] === 0; i++)
|
|
332
|
+
res.push(0);
|
|
333
|
+
return res.reverse();
|
|
334
|
+
}
|
|
335
|
+
const gcd = (a, b) => (b === 0 ? a : gcd(b, a % b));
|
|
336
|
+
const radix2carry = /* @__NO_SIDE_EFFECTS__ */ (from, to) => from + (to - gcd(from, to));
|
|
337
|
+
const powers = /* @__PURE__ */ (() => {
|
|
338
|
+
let res = [];
|
|
339
|
+
for (let i = 0; i < 40; i++)
|
|
340
|
+
res.push(2 ** i);
|
|
341
|
+
return res;
|
|
342
|
+
})();
|
|
343
|
+
/**
|
|
344
|
+
* Implemented with numbers, because BigInt is 5x slower
|
|
345
|
+
*/
|
|
346
|
+
function convertRadix2(data, from, to, padding) {
|
|
347
|
+
aArr(data);
|
|
348
|
+
if (from <= 0 || from > 32)
|
|
349
|
+
throw new Error(`convertRadix2: wrong from=${from}`);
|
|
350
|
+
if (to <= 0 || to > 32)
|
|
351
|
+
throw new Error(`convertRadix2: wrong to=${to}`);
|
|
352
|
+
if (radix2carry(from, to) > 32) {
|
|
353
|
+
throw new Error(`convertRadix2: carry overflow from=${from} to=${to} carryBits=${radix2carry(from, to)}`);
|
|
354
|
+
}
|
|
355
|
+
let carry = 0;
|
|
356
|
+
let pos = 0; // bitwise position in current element
|
|
357
|
+
const max = powers[from];
|
|
358
|
+
const mask = powers[to] - 1;
|
|
359
|
+
const res = [];
|
|
360
|
+
for (const n of data) {
|
|
361
|
+
anumber(n);
|
|
362
|
+
if (n >= max)
|
|
363
|
+
throw new Error(`convertRadix2: invalid data word=${n} from=${from}`);
|
|
364
|
+
carry = (carry << from) | n;
|
|
365
|
+
if (pos + from > 32)
|
|
366
|
+
throw new Error(`convertRadix2: carry overflow pos=${pos} from=${from}`);
|
|
367
|
+
pos += from;
|
|
368
|
+
for (; pos >= to; pos -= to)
|
|
369
|
+
res.push(((carry >> (pos - to)) & mask) >>> 0);
|
|
370
|
+
const pow = powers[pos];
|
|
371
|
+
if (pow === undefined)
|
|
372
|
+
throw new Error('invalid carry');
|
|
373
|
+
carry &= pow - 1; // clean carry, otherwise it will cause overflow
|
|
374
|
+
}
|
|
375
|
+
carry = (carry << (to - pos)) & mask;
|
|
376
|
+
if (!padding && pos >= from)
|
|
377
|
+
throw new Error('Excess padding');
|
|
378
|
+
if (!padding && carry > 0)
|
|
379
|
+
throw new Error(`Non-zero padding: ${carry}`);
|
|
380
|
+
if (padding && pos > 0)
|
|
381
|
+
res.push(carry >>> 0);
|
|
382
|
+
return res;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* @__NO_SIDE_EFFECTS__
|
|
386
|
+
*/
|
|
387
|
+
function radix(num) {
|
|
388
|
+
anumber(num);
|
|
389
|
+
const _256 = 2 ** 8;
|
|
390
|
+
return {
|
|
391
|
+
encode: (bytes) => {
|
|
392
|
+
if (!isBytes(bytes))
|
|
393
|
+
throw new Error('radix.encode input should be Uint8Array');
|
|
394
|
+
return convertRadix(Array.from(bytes), _256, num);
|
|
395
|
+
},
|
|
396
|
+
decode: (digits) => {
|
|
397
|
+
anumArr('radix.decode', digits);
|
|
398
|
+
return Uint8Array.from(convertRadix(digits, num, _256));
|
|
399
|
+
},
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* If both bases are power of same number (like `2**8 <-> 2**64`),
|
|
404
|
+
* there is a linear algorithm. For now we have implementation for power-of-two bases only.
|
|
405
|
+
* @__NO_SIDE_EFFECTS__
|
|
406
|
+
*/
|
|
407
|
+
function radix2(bits, revPadding = false) {
|
|
408
|
+
anumber(bits);
|
|
409
|
+
if (bits <= 0 || bits > 32)
|
|
410
|
+
throw new Error('radix2: bits should be in (0..32]');
|
|
411
|
+
if (radix2carry(8, bits) > 32 || radix2carry(bits, 8) > 32)
|
|
412
|
+
throw new Error('radix2: carry overflow');
|
|
413
|
+
return {
|
|
414
|
+
encode: (bytes) => {
|
|
415
|
+
if (!isBytes(bytes))
|
|
416
|
+
throw new Error('radix2.encode input should be Uint8Array');
|
|
417
|
+
return convertRadix2(Array.from(bytes), 8, bits, !revPadding);
|
|
418
|
+
},
|
|
419
|
+
decode: (digits) => {
|
|
420
|
+
anumArr('radix2.decode', digits);
|
|
421
|
+
return Uint8Array.from(convertRadix2(digits, bits, 8, revPadding));
|
|
422
|
+
},
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
function unsafeWrapper(fn) {
|
|
426
|
+
afn(fn);
|
|
427
|
+
return function (...args) {
|
|
428
|
+
try {
|
|
429
|
+
return fn.apply(null, args);
|
|
430
|
+
}
|
|
431
|
+
catch (e) { }
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
function checksum(len, fn) {
|
|
435
|
+
anumber(len);
|
|
436
|
+
afn(fn);
|
|
437
|
+
return {
|
|
438
|
+
encode(data) {
|
|
439
|
+
if (!isBytes(data))
|
|
440
|
+
throw new Error('checksum.encode: input should be Uint8Array');
|
|
441
|
+
const sum = fn(data).slice(0, len);
|
|
442
|
+
const res = new Uint8Array(data.length + len);
|
|
443
|
+
res.set(data);
|
|
444
|
+
res.set(sum, data.length);
|
|
445
|
+
return res;
|
|
446
|
+
},
|
|
447
|
+
decode(data) {
|
|
448
|
+
if (!isBytes(data))
|
|
449
|
+
throw new Error('checksum.decode: input should be Uint8Array');
|
|
450
|
+
const payload = data.slice(0, -len);
|
|
451
|
+
const oldChecksum = data.slice(-len);
|
|
452
|
+
const newChecksum = fn(payload).slice(0, len);
|
|
453
|
+
for (let i = 0; i < len; i++)
|
|
454
|
+
if (newChecksum[i] !== oldChecksum[i])
|
|
455
|
+
throw new Error('Invalid checksum');
|
|
456
|
+
return payload;
|
|
457
|
+
},
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
// base58 code
|
|
461
|
+
// -----------
|
|
462
|
+
const genBase58 = /* @__NO_SIDE_EFFECTS__ */ (abc) => chain(radix(58), alphabet(abc), join(''));
|
|
463
|
+
/**
|
|
464
|
+
* base58: base64 without ambigous characters +, /, 0, O, I, l.
|
|
465
|
+
* Quadratic (O(n^2)) - so, can't be used on large inputs.
|
|
466
|
+
* @example
|
|
467
|
+
* ```js
|
|
468
|
+
* base58.decode('01abcdef');
|
|
469
|
+
* // => '3UhJW'
|
|
470
|
+
* ```
|
|
471
|
+
*/
|
|
472
|
+
const base58 = genBase58('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz');
|
|
473
|
+
/**
|
|
474
|
+
* Method, which creates base58check encoder.
|
|
475
|
+
* Requires function, calculating sha256.
|
|
476
|
+
*/
|
|
477
|
+
const createBase58check = (sha256) => chain(checksum(4, (data) => sha256(sha256(data))), base58);
|
|
478
|
+
const BECH_ALPHABET = chain(alphabet('qpzry9x8gf2tvdw0s3jn54khce6mua7l'), join(''));
|
|
479
|
+
const POLYMOD_GENERATORS = [0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3];
|
|
480
|
+
function bech32Polymod(pre) {
|
|
481
|
+
const b = pre >> 25;
|
|
482
|
+
let chk = (pre & 0x1ffffff) << 5;
|
|
483
|
+
for (let i = 0; i < POLYMOD_GENERATORS.length; i++) {
|
|
484
|
+
if (((b >> i) & 1) === 1)
|
|
485
|
+
chk ^= POLYMOD_GENERATORS[i];
|
|
486
|
+
}
|
|
487
|
+
return chk;
|
|
488
|
+
}
|
|
489
|
+
function bechChecksum(prefix, words, encodingConst = 1) {
|
|
490
|
+
const len = prefix.length;
|
|
491
|
+
let chk = 1;
|
|
492
|
+
for (let i = 0; i < len; i++) {
|
|
493
|
+
const c = prefix.charCodeAt(i);
|
|
494
|
+
if (c < 33 || c > 126)
|
|
495
|
+
throw new Error(`Invalid prefix (${prefix})`);
|
|
496
|
+
chk = bech32Polymod(chk) ^ (c >> 5);
|
|
497
|
+
}
|
|
498
|
+
chk = bech32Polymod(chk);
|
|
499
|
+
for (let i = 0; i < len; i++)
|
|
500
|
+
chk = bech32Polymod(chk) ^ (prefix.charCodeAt(i) & 0x1f);
|
|
501
|
+
for (let v of words)
|
|
502
|
+
chk = bech32Polymod(chk) ^ v;
|
|
503
|
+
for (let i = 0; i < 6; i++)
|
|
504
|
+
chk = bech32Polymod(chk);
|
|
505
|
+
chk ^= encodingConst;
|
|
506
|
+
return BECH_ALPHABET.encode(convertRadix2([chk % powers[30]], 30, 5, false));
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* @__NO_SIDE_EFFECTS__
|
|
510
|
+
*/
|
|
511
|
+
function genBech32(encoding) {
|
|
512
|
+
const ENCODING_CONST = encoding === 'bech32' ? 1 : 0x2bc830a3;
|
|
513
|
+
const _words = radix2(5);
|
|
514
|
+
const fromWords = _words.decode;
|
|
515
|
+
const toWords = _words.encode;
|
|
516
|
+
const fromWordsUnsafe = unsafeWrapper(fromWords);
|
|
517
|
+
function encode(prefix, words, limit = 90) {
|
|
518
|
+
astr('bech32.encode prefix', prefix);
|
|
519
|
+
if (isBytes(words))
|
|
520
|
+
words = Array.from(words);
|
|
521
|
+
anumArr('bech32.encode', words);
|
|
522
|
+
const plen = prefix.length;
|
|
523
|
+
if (plen === 0)
|
|
524
|
+
throw new TypeError(`Invalid prefix length ${plen}`);
|
|
525
|
+
const actualLength = plen + 7 + words.length;
|
|
526
|
+
if (limit !== false && actualLength > limit)
|
|
527
|
+
throw new TypeError(`Length ${actualLength} exceeds limit ${limit}`);
|
|
528
|
+
const lowered = prefix.toLowerCase();
|
|
529
|
+
const sum = bechChecksum(lowered, words, ENCODING_CONST);
|
|
530
|
+
return `${lowered}1${BECH_ALPHABET.encode(words)}${sum}`;
|
|
531
|
+
}
|
|
532
|
+
function decode(str, limit = 90) {
|
|
533
|
+
astr('bech32.decode input', str);
|
|
534
|
+
const slen = str.length;
|
|
535
|
+
if (slen < 8 || (limit !== false && slen > limit))
|
|
536
|
+
throw new TypeError(`invalid string length: ${slen} (${str}). Expected (8..${limit})`);
|
|
537
|
+
// don't allow mixed case
|
|
538
|
+
const lowered = str.toLowerCase();
|
|
539
|
+
if (str !== lowered && str !== str.toUpperCase())
|
|
540
|
+
throw new Error(`String must be lowercase or uppercase`);
|
|
541
|
+
const sepIndex = lowered.lastIndexOf('1');
|
|
542
|
+
if (sepIndex === 0 || sepIndex === -1)
|
|
543
|
+
throw new Error(`Letter "1" must be present between prefix and data only`);
|
|
544
|
+
const prefix = lowered.slice(0, sepIndex);
|
|
545
|
+
const data = lowered.slice(sepIndex + 1);
|
|
546
|
+
if (data.length < 6)
|
|
547
|
+
throw new Error('Data must be at least 6 characters long');
|
|
548
|
+
const words = BECH_ALPHABET.decode(data).slice(0, -6);
|
|
549
|
+
const sum = bechChecksum(prefix, words, ENCODING_CONST);
|
|
550
|
+
if (!data.endsWith(sum))
|
|
551
|
+
throw new Error(`Invalid checksum in ${str}: expected "${sum}"`);
|
|
552
|
+
return { prefix, words };
|
|
553
|
+
}
|
|
554
|
+
const decodeUnsafe = unsafeWrapper(decode);
|
|
555
|
+
function decodeToBytes(str) {
|
|
556
|
+
const { prefix, words } = decode(str, false);
|
|
557
|
+
return { prefix, words, bytes: fromWords(words) };
|
|
558
|
+
}
|
|
559
|
+
function encodeFromBytes(prefix, bytes) {
|
|
560
|
+
return encode(prefix, toWords(bytes));
|
|
561
|
+
}
|
|
562
|
+
return {
|
|
563
|
+
encode,
|
|
564
|
+
decode,
|
|
565
|
+
encodeFromBytes,
|
|
566
|
+
decodeToBytes,
|
|
567
|
+
decodeUnsafe,
|
|
568
|
+
fromWords,
|
|
569
|
+
fromWordsUnsafe,
|
|
570
|
+
toWords,
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* bech32 from BIP 173. Operates on words.
|
|
575
|
+
* For high-level, check out scure-btc-signer:
|
|
576
|
+
* https://github.com/paulmillr/scure-btc-signer.
|
|
577
|
+
*/
|
|
578
|
+
const bech32 = genBech32('bech32');
|
|
579
|
+
|
|
580
|
+
//#region src/b58.ts
|
|
581
|
+
const toBase58 = (buffer) => base58.encode(buffer);
|
|
582
|
+
const fromBase58 = (str) => base58.decode(str);
|
|
583
|
+
|
|
584
|
+
//#region src/b64.ts
|
|
585
|
+
function fromBase64(base64String) {
|
|
586
|
+
return Uint8Array.from(atob(base64String), (char) => char.charCodeAt(0));
|
|
587
|
+
}
|
|
588
|
+
const CHUNK_SIZE = 8192;
|
|
589
|
+
function toBase64(bytes) {
|
|
590
|
+
if (bytes.length < CHUNK_SIZE) return btoa(String.fromCharCode(...bytes));
|
|
591
|
+
let output = "";
|
|
592
|
+
for (var i = 0; i < bytes.length; i += CHUNK_SIZE) {
|
|
593
|
+
const chunk = bytes.slice(i, i + CHUNK_SIZE);
|
|
594
|
+
output += String.fromCharCode(...chunk);
|
|
595
|
+
}
|
|
596
|
+
return btoa(output);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
//#region src/hex.ts
|
|
600
|
+
function fromHex(hexStr) {
|
|
601
|
+
const normalized = hexStr.startsWith("0x") ? hexStr.slice(2) : hexStr;
|
|
602
|
+
const padded = normalized.length % 2 === 0 ? normalized : `0${normalized}`;
|
|
603
|
+
const intArr = padded.match(/[0-9a-fA-F]{2}/g)?.map((byte) => parseInt(byte, 16)) ?? [];
|
|
604
|
+
if (intArr.length !== padded.length / 2) throw new Error(`Invalid hex string ${hexStr}`);
|
|
605
|
+
return Uint8Array.from(intArr);
|
|
606
|
+
}
|
|
607
|
+
function toHex(bytes) {
|
|
608
|
+
return bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, "0"), "");
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
//#region src/utils.ts
|
|
612
|
+
/**
|
|
613
|
+
* Encode data with either `hex` or `base64`.
|
|
614
|
+
*
|
|
615
|
+
* @param {Uint8Array} data Data to encode.
|
|
616
|
+
* @param {String} encoding Encoding to use: base64 or hex
|
|
617
|
+
* @returns {String} Encoded value.
|
|
618
|
+
*/
|
|
619
|
+
function encodeStr(data, encoding) {
|
|
620
|
+
switch (encoding) {
|
|
621
|
+
case "base58": return toBase58(data);
|
|
622
|
+
case "base64": return toBase64(data);
|
|
623
|
+
case "hex": return toHex(data);
|
|
624
|
+
default: throw new Error("Unsupported encoding, supported values are: base64, hex");
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
function splitGenericParameters(str, genericSeparators = ["<", ">"]) {
|
|
628
|
+
const [left, right] = genericSeparators;
|
|
629
|
+
const tok = [];
|
|
630
|
+
let word = "";
|
|
631
|
+
let nestedAngleBrackets = 0;
|
|
632
|
+
for (let i = 0; i < str.length; i++) {
|
|
633
|
+
const char = str[i];
|
|
634
|
+
if (char === left) nestedAngleBrackets++;
|
|
635
|
+
if (char === right) nestedAngleBrackets--;
|
|
636
|
+
if (nestedAngleBrackets === 0 && char === ",") {
|
|
637
|
+
tok.push(word.trim());
|
|
638
|
+
word = "";
|
|
639
|
+
continue;
|
|
640
|
+
}
|
|
641
|
+
word += char;
|
|
642
|
+
}
|
|
643
|
+
tok.push(word.trim());
|
|
644
|
+
return tok;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
//#region src/writer.ts
|
|
648
|
+
/**
|
|
649
|
+
* Class used to write BCS data into a buffer. Initializer requires
|
|
650
|
+
* some size of a buffer to init; default value for this buffer is 1KB.
|
|
651
|
+
*
|
|
652
|
+
* Most methods are chainable, so it is possible to write them in one go.
|
|
653
|
+
*
|
|
654
|
+
* @example
|
|
655
|
+
* let serialized = new BcsWriter()
|
|
656
|
+
* .write8(10)
|
|
657
|
+
* .write32(1000000)
|
|
658
|
+
* .write64(10000001000000)
|
|
659
|
+
* .hex();
|
|
660
|
+
*/
|
|
661
|
+
/**
|
|
662
|
+
* Set of methods that allows data encoding/decoding as standalone
|
|
663
|
+
* BCS value or a part of a composed structure/vector.
|
|
664
|
+
*/
|
|
665
|
+
var BcsWriter = class {
|
|
666
|
+
constructor({ initialSize = 1024, maxSize = Infinity, allocateSize = 1024 } = {}) {
|
|
667
|
+
this.bytePosition = 0;
|
|
668
|
+
this.size = initialSize;
|
|
669
|
+
this.maxSize = maxSize;
|
|
670
|
+
this.allocateSize = allocateSize;
|
|
671
|
+
this.dataView = new DataView(new ArrayBuffer(initialSize));
|
|
672
|
+
}
|
|
673
|
+
ensureSizeOrGrow(bytes) {
|
|
674
|
+
const requiredSize = this.bytePosition + bytes;
|
|
675
|
+
if (requiredSize > this.size) {
|
|
676
|
+
const nextSize = Math.min(this.maxSize, Math.max(this.size + requiredSize, this.size + this.allocateSize));
|
|
677
|
+
if (requiredSize > nextSize) throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${requiredSize}`);
|
|
678
|
+
this.size = nextSize;
|
|
679
|
+
const nextBuffer = new ArrayBuffer(this.size);
|
|
680
|
+
new Uint8Array(nextBuffer).set(new Uint8Array(this.dataView.buffer));
|
|
681
|
+
this.dataView = new DataView(nextBuffer);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* Shift current cursor position by `bytes`.
|
|
686
|
+
*
|
|
687
|
+
* @param {Number} bytes Number of bytes to
|
|
688
|
+
* @returns {this} Self for possible chaining.
|
|
689
|
+
*/
|
|
690
|
+
shift(bytes) {
|
|
691
|
+
this.bytePosition += bytes;
|
|
692
|
+
return this;
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* Write a U8 value into a buffer and shift cursor position by 1.
|
|
696
|
+
* @param {Number} value Value to write.
|
|
697
|
+
* @returns {this}
|
|
698
|
+
*/
|
|
699
|
+
write8(value) {
|
|
700
|
+
this.ensureSizeOrGrow(1);
|
|
701
|
+
this.dataView.setUint8(this.bytePosition, Number(value));
|
|
702
|
+
return this.shift(1);
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Write a U8 value into a buffer and shift cursor position by 1.
|
|
706
|
+
* @param {Number} value Value to write.
|
|
707
|
+
* @returns {this}
|
|
708
|
+
*/
|
|
709
|
+
writeBytes(bytes) {
|
|
710
|
+
this.ensureSizeOrGrow(bytes.length);
|
|
711
|
+
for (let i = 0; i < bytes.length; i++) this.dataView.setUint8(this.bytePosition + i, bytes[i]);
|
|
712
|
+
return this.shift(bytes.length);
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Write a U16 value into a buffer and shift cursor position by 2.
|
|
716
|
+
* @param {Number} value Value to write.
|
|
717
|
+
* @returns {this}
|
|
718
|
+
*/
|
|
719
|
+
write16(value) {
|
|
720
|
+
this.ensureSizeOrGrow(2);
|
|
721
|
+
this.dataView.setUint16(this.bytePosition, Number(value), true);
|
|
722
|
+
return this.shift(2);
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Write a U32 value into a buffer and shift cursor position by 4.
|
|
726
|
+
* @param {Number} value Value to write.
|
|
727
|
+
* @returns {this}
|
|
728
|
+
*/
|
|
729
|
+
write32(value) {
|
|
730
|
+
this.ensureSizeOrGrow(4);
|
|
731
|
+
this.dataView.setUint32(this.bytePosition, Number(value), true);
|
|
732
|
+
return this.shift(4);
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Write a U64 value into a buffer and shift cursor position by 8.
|
|
736
|
+
* @param {bigint} value Value to write.
|
|
737
|
+
* @returns {this}
|
|
738
|
+
*/
|
|
739
|
+
write64(value) {
|
|
740
|
+
toLittleEndian(BigInt(value), 8).forEach((el) => this.write8(el));
|
|
741
|
+
return this;
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* Write a U128 value into a buffer and shift cursor position by 16.
|
|
745
|
+
*
|
|
746
|
+
* @param {bigint} value Value to write.
|
|
747
|
+
* @returns {this}
|
|
748
|
+
*/
|
|
749
|
+
write128(value) {
|
|
750
|
+
toLittleEndian(BigInt(value), 16).forEach((el) => this.write8(el));
|
|
751
|
+
return this;
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* Write a U256 value into a buffer and shift cursor position by 16.
|
|
755
|
+
*
|
|
756
|
+
* @param {bigint} value Value to write.
|
|
757
|
+
* @returns {this}
|
|
758
|
+
*/
|
|
759
|
+
write256(value) {
|
|
760
|
+
toLittleEndian(BigInt(value), 32).forEach((el) => this.write8(el));
|
|
761
|
+
return this;
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Write a ULEB value into a buffer and shift cursor position by number of bytes
|
|
765
|
+
* written.
|
|
766
|
+
* @param {Number} value Value to write.
|
|
767
|
+
* @returns {this}
|
|
768
|
+
*/
|
|
769
|
+
writeULEB(value) {
|
|
770
|
+
ulebEncode(value).forEach((el) => this.write8(el));
|
|
771
|
+
return this;
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* Write a vector into a buffer by first writing the vector length and then calling
|
|
775
|
+
* a callback on each passed value.
|
|
776
|
+
*
|
|
777
|
+
* @param {Array<Any>} vector Array of elements to write.
|
|
778
|
+
* @param {WriteVecCb} cb Callback to call on each element of the vector.
|
|
779
|
+
* @returns {this}
|
|
780
|
+
*/
|
|
781
|
+
writeVec(vector, cb) {
|
|
782
|
+
this.writeULEB(vector.length);
|
|
783
|
+
Array.from(vector).forEach((el, i) => cb(this, el, i, vector.length));
|
|
784
|
+
return this;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* Adds support for iterations over the object.
|
|
788
|
+
* @returns {Uint8Array}
|
|
789
|
+
*/
|
|
790
|
+
*[Symbol.iterator]() {
|
|
791
|
+
for (let i = 0; i < this.bytePosition; i++) yield this.dataView.getUint8(i);
|
|
792
|
+
return this.toBytes();
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Get underlying buffer taking only value bytes (in case initial buffer size was bigger).
|
|
796
|
+
* @returns {Uint8Array} Resulting bcs.
|
|
797
|
+
*/
|
|
798
|
+
toBytes() {
|
|
799
|
+
return new Uint8Array(this.dataView.buffer.slice(0, this.bytePosition));
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Represent data as 'hex' or 'base64'
|
|
803
|
+
* @param encoding Encoding to use: 'base64' or 'hex'
|
|
804
|
+
*/
|
|
805
|
+
toString(encoding) {
|
|
806
|
+
return encodeStr(this.toBytes(), encoding);
|
|
807
|
+
}
|
|
808
|
+
};
|
|
809
|
+
function toLittleEndian(bigint, size) {
|
|
810
|
+
const result = new Uint8Array(size);
|
|
811
|
+
let i = 0;
|
|
812
|
+
while (bigint > 0) {
|
|
813
|
+
result[i] = Number(bigint % BigInt(256));
|
|
814
|
+
bigint = bigint / BigInt(256);
|
|
815
|
+
i += 1;
|
|
816
|
+
}
|
|
817
|
+
return result;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
//#region src/bcs-type.ts
|
|
821
|
+
var BcsType = class BcsType {
|
|
822
|
+
#write;
|
|
823
|
+
#serialize;
|
|
824
|
+
constructor(options) {
|
|
825
|
+
this.name = options.name;
|
|
826
|
+
this.read = options.read;
|
|
827
|
+
this.serializedSize = options.serializedSize ?? (() => null);
|
|
828
|
+
this.#write = options.write;
|
|
829
|
+
this.#serialize = options.serialize ?? ((value, options$1) => {
|
|
830
|
+
const writer = new BcsWriter({
|
|
831
|
+
initialSize: this.serializedSize(value) ?? void 0,
|
|
832
|
+
...options$1
|
|
833
|
+
});
|
|
834
|
+
this.#write(value, writer);
|
|
835
|
+
return writer.toBytes();
|
|
836
|
+
});
|
|
837
|
+
this.validate = options.validate ?? (() => {});
|
|
838
|
+
}
|
|
839
|
+
write(value, writer) {
|
|
840
|
+
this.validate(value);
|
|
841
|
+
this.#write(value, writer);
|
|
842
|
+
}
|
|
843
|
+
serialize(value, options) {
|
|
844
|
+
this.validate(value);
|
|
845
|
+
return new SerializedBcs(this, this.#serialize(value, options));
|
|
846
|
+
}
|
|
847
|
+
parse(bytes) {
|
|
848
|
+
const reader = new BcsReader(bytes);
|
|
849
|
+
return this.read(reader);
|
|
850
|
+
}
|
|
851
|
+
fromHex(hex) {
|
|
852
|
+
return this.parse(fromHex(hex));
|
|
853
|
+
}
|
|
854
|
+
fromBase58(b64) {
|
|
855
|
+
return this.parse(fromBase58(b64));
|
|
856
|
+
}
|
|
857
|
+
fromBase64(b64) {
|
|
858
|
+
return this.parse(fromBase64(b64));
|
|
859
|
+
}
|
|
860
|
+
transform({ name, input, output, validate }) {
|
|
861
|
+
return new BcsType({
|
|
862
|
+
name: name ?? this.name,
|
|
863
|
+
read: (reader) => output ? output(this.read(reader)) : this.read(reader),
|
|
864
|
+
write: (value, writer) => this.#write(input ? input(value) : value, writer),
|
|
865
|
+
serializedSize: (value) => this.serializedSize(input ? input(value) : value),
|
|
866
|
+
serialize: (value, options) => this.#serialize(input ? input(value) : value, options),
|
|
867
|
+
validate: (value) => {
|
|
868
|
+
validate?.(value);
|
|
869
|
+
this.validate(input ? input(value) : value);
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
};
|
|
874
|
+
const SERIALIZED_BCS_BRAND = Symbol.for("@mysten/serialized-bcs");
|
|
875
|
+
var SerializedBcs = class {
|
|
876
|
+
#schema;
|
|
877
|
+
#bytes;
|
|
878
|
+
get [SERIALIZED_BCS_BRAND]() {
|
|
879
|
+
return true;
|
|
880
|
+
}
|
|
881
|
+
constructor(schema, bytes) {
|
|
882
|
+
this.#schema = schema;
|
|
883
|
+
this.#bytes = bytes;
|
|
884
|
+
}
|
|
885
|
+
toBytes() {
|
|
886
|
+
return this.#bytes;
|
|
887
|
+
}
|
|
888
|
+
toHex() {
|
|
889
|
+
return toHex(this.#bytes);
|
|
890
|
+
}
|
|
891
|
+
toBase64() {
|
|
892
|
+
return toBase64(this.#bytes);
|
|
893
|
+
}
|
|
894
|
+
toBase58() {
|
|
895
|
+
return toBase58(this.#bytes);
|
|
896
|
+
}
|
|
897
|
+
parse() {
|
|
898
|
+
return this.#schema.parse(this.#bytes);
|
|
899
|
+
}
|
|
900
|
+
};
|
|
901
|
+
function fixedSizeBcsType({ size, ...options }) {
|
|
902
|
+
return new BcsType({
|
|
903
|
+
...options,
|
|
904
|
+
serializedSize: () => size
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
function uIntBcsType({ readMethod, writeMethod, ...options }) {
|
|
908
|
+
return fixedSizeBcsType({
|
|
909
|
+
...options,
|
|
910
|
+
read: (reader) => reader[readMethod](),
|
|
911
|
+
write: (value, writer) => writer[writeMethod](value),
|
|
912
|
+
validate: (value) => {
|
|
913
|
+
if (value < 0 || value > options.maxValue) throw new TypeError(`Invalid ${options.name} value: ${value}. Expected value in range 0-${options.maxValue}`);
|
|
914
|
+
options.validate?.(value);
|
|
915
|
+
}
|
|
916
|
+
});
|
|
917
|
+
}
|
|
918
|
+
function bigUIntBcsType({ readMethod, writeMethod, ...options }) {
|
|
919
|
+
return fixedSizeBcsType({
|
|
920
|
+
...options,
|
|
921
|
+
read: (reader) => reader[readMethod](),
|
|
922
|
+
write: (value, writer) => writer[writeMethod](BigInt(value)),
|
|
923
|
+
validate: (val) => {
|
|
924
|
+
const value = BigInt(val);
|
|
925
|
+
if (value < 0 || value > options.maxValue) throw new TypeError(`Invalid ${options.name} value: ${value}. Expected value in range 0-${options.maxValue}`);
|
|
926
|
+
options.validate?.(value);
|
|
927
|
+
}
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
function dynamicSizeBcsType({ serialize, ...options }) {
|
|
931
|
+
const type = new BcsType({
|
|
932
|
+
...options,
|
|
933
|
+
serialize,
|
|
934
|
+
write: (value, writer) => {
|
|
935
|
+
for (const byte of type.serialize(value).toBytes()) writer.write8(byte);
|
|
936
|
+
}
|
|
937
|
+
});
|
|
938
|
+
return type;
|
|
939
|
+
}
|
|
940
|
+
function stringLikeBcsType({ toBytes, fromBytes, ...options }) {
|
|
941
|
+
return new BcsType({
|
|
942
|
+
...options,
|
|
943
|
+
read: (reader) => {
|
|
944
|
+
const length = reader.readULEB();
|
|
945
|
+
return fromBytes(reader.readBytes(length));
|
|
946
|
+
},
|
|
947
|
+
write: (hex, writer) => {
|
|
948
|
+
const bytes = toBytes(hex);
|
|
949
|
+
writer.writeULEB(bytes.length);
|
|
950
|
+
for (let i = 0; i < bytes.length; i++) writer.write8(bytes[i]);
|
|
951
|
+
},
|
|
952
|
+
serialize: (value) => {
|
|
953
|
+
const bytes = toBytes(value);
|
|
954
|
+
const size = ulebEncode(bytes.length);
|
|
955
|
+
const result = new Uint8Array(size.length + bytes.length);
|
|
956
|
+
result.set(size, 0);
|
|
957
|
+
result.set(bytes, size.length);
|
|
958
|
+
return result;
|
|
959
|
+
},
|
|
960
|
+
validate: (value) => {
|
|
961
|
+
if (typeof value !== "string") throw new TypeError(`Invalid ${options.name} value: ${value}. Expected string`);
|
|
962
|
+
options.validate?.(value);
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
function lazyBcsType(cb) {
|
|
967
|
+
let lazyType = null;
|
|
968
|
+
function getType() {
|
|
969
|
+
if (!lazyType) lazyType = cb();
|
|
970
|
+
return lazyType;
|
|
971
|
+
}
|
|
972
|
+
return new BcsType({
|
|
973
|
+
name: "lazy",
|
|
974
|
+
read: (data) => getType().read(data),
|
|
975
|
+
serializedSize: (value) => getType().serializedSize(value),
|
|
976
|
+
write: (value, writer) => getType().write(value, writer),
|
|
977
|
+
serialize: (value, options) => getType().serialize(value, options).toBytes()
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
var BcsStruct = class extends BcsType {
|
|
981
|
+
constructor({ name, fields, ...options }) {
|
|
982
|
+
const canonicalOrder = Object.entries(fields);
|
|
983
|
+
super({
|
|
984
|
+
name,
|
|
985
|
+
serializedSize: (values) => {
|
|
986
|
+
let total = 0;
|
|
987
|
+
for (const [field, type] of canonicalOrder) {
|
|
988
|
+
const size = type.serializedSize(values[field]);
|
|
989
|
+
if (size == null) return null;
|
|
990
|
+
total += size;
|
|
991
|
+
}
|
|
992
|
+
return total;
|
|
993
|
+
},
|
|
994
|
+
read: (reader) => {
|
|
995
|
+
const result = {};
|
|
996
|
+
for (const [field, type] of canonicalOrder) result[field] = type.read(reader);
|
|
997
|
+
return result;
|
|
998
|
+
},
|
|
999
|
+
write: (value, writer) => {
|
|
1000
|
+
for (const [field, type] of canonicalOrder) type.write(value[field], writer);
|
|
1001
|
+
},
|
|
1002
|
+
...options,
|
|
1003
|
+
validate: (value) => {
|
|
1004
|
+
options?.validate?.(value);
|
|
1005
|
+
if (typeof value !== "object" || value == null) throw new TypeError(`Expected object, found ${typeof value}`);
|
|
1006
|
+
}
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
};
|
|
1010
|
+
var BcsEnum = class extends BcsType {
|
|
1011
|
+
constructor({ fields, ...options }) {
|
|
1012
|
+
const canonicalOrder = Object.entries(fields);
|
|
1013
|
+
super({
|
|
1014
|
+
read: (reader) => {
|
|
1015
|
+
const index = reader.readULEB();
|
|
1016
|
+
const enumEntry = canonicalOrder[index];
|
|
1017
|
+
if (!enumEntry) throw new TypeError(`Unknown value ${index} for enum ${options.name}`);
|
|
1018
|
+
const [kind, type] = enumEntry;
|
|
1019
|
+
return {
|
|
1020
|
+
[kind]: type?.read(reader) ?? true,
|
|
1021
|
+
$kind: kind
|
|
1022
|
+
};
|
|
1023
|
+
},
|
|
1024
|
+
write: (value, writer) => {
|
|
1025
|
+
const [name, val] = Object.entries(value).filter(([name$1]) => Object.hasOwn(fields, name$1))[0];
|
|
1026
|
+
for (let i = 0; i < canonicalOrder.length; i++) {
|
|
1027
|
+
const [optionName, optionType] = canonicalOrder[i];
|
|
1028
|
+
if (optionName === name) {
|
|
1029
|
+
writer.writeULEB(i);
|
|
1030
|
+
optionType?.write(val, writer);
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
1035
|
+
...options,
|
|
1036
|
+
validate: (value) => {
|
|
1037
|
+
options?.validate?.(value);
|
|
1038
|
+
if (typeof value !== "object" || value == null) throw new TypeError(`Expected object, found ${typeof value}`);
|
|
1039
|
+
const keys = Object.keys(value).filter((k) => value[k] !== void 0 && Object.hasOwn(fields, k));
|
|
1040
|
+
if (keys.length !== 1) throw new TypeError(`Expected object with one key, but found ${keys.length} for type ${options.name}}`);
|
|
1041
|
+
const [variant] = keys;
|
|
1042
|
+
if (!Object.hasOwn(fields, variant)) throw new TypeError(`Invalid enum variant ${variant}`);
|
|
1043
|
+
}
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
};
|
|
1047
|
+
var BcsTuple = class extends BcsType {
|
|
1048
|
+
constructor({ fields, name, ...options }) {
|
|
1049
|
+
super({
|
|
1050
|
+
name: name ?? `(${fields.map((t) => t.name).join(", ")})`,
|
|
1051
|
+
serializedSize: (values) => {
|
|
1052
|
+
let total = 0;
|
|
1053
|
+
for (let i = 0; i < fields.length; i++) {
|
|
1054
|
+
const size = fields[i].serializedSize(values[i]);
|
|
1055
|
+
if (size == null) return null;
|
|
1056
|
+
total += size;
|
|
1057
|
+
}
|
|
1058
|
+
return total;
|
|
1059
|
+
},
|
|
1060
|
+
read: (reader) => {
|
|
1061
|
+
const result = [];
|
|
1062
|
+
for (const field of fields) result.push(field.read(reader));
|
|
1063
|
+
return result;
|
|
1064
|
+
},
|
|
1065
|
+
write: (value, writer) => {
|
|
1066
|
+
for (let i = 0; i < fields.length; i++) fields[i].write(value[i], writer);
|
|
1067
|
+
},
|
|
1068
|
+
...options,
|
|
1069
|
+
validate: (value) => {
|
|
1070
|
+
options?.validate?.(value);
|
|
1071
|
+
if (!Array.isArray(value)) throw new TypeError(`Expected array, found ${typeof value}`);
|
|
1072
|
+
if (value.length !== fields.length) throw new TypeError(`Expected array of length ${fields.length}, found ${value.length}`);
|
|
1073
|
+
}
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
1076
|
+
};
|
|
1077
|
+
|
|
1078
|
+
//#region src/bcs.ts
|
|
1079
|
+
function fixedArray(size, type, options) {
|
|
1080
|
+
return new BcsType({
|
|
1081
|
+
read: (reader) => {
|
|
1082
|
+
const result = new Array(size);
|
|
1083
|
+
for (let i = 0; i < size; i++) result[i] = type.read(reader);
|
|
1084
|
+
return result;
|
|
1085
|
+
},
|
|
1086
|
+
write: (value, writer) => {
|
|
1087
|
+
for (const item of value) type.write(item, writer);
|
|
1088
|
+
},
|
|
1089
|
+
...options,
|
|
1090
|
+
name: options?.name ?? `${type.name}[${size}]`,
|
|
1091
|
+
validate: (value) => {
|
|
1092
|
+
options?.validate?.(value);
|
|
1093
|
+
if (!value || typeof value !== "object" || !("length" in value)) throw new TypeError(`Expected array, found ${typeof value}`);
|
|
1094
|
+
if (value.length !== size) throw new TypeError(`Expected array of length ${size}, found ${value.length}`);
|
|
1095
|
+
}
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
function option(type) {
|
|
1099
|
+
return bcs.enum(`Option<${type.name}>`, {
|
|
1100
|
+
None: null,
|
|
1101
|
+
Some: type
|
|
1102
|
+
}).transform({
|
|
1103
|
+
input: (value) => {
|
|
1104
|
+
if (value == null) return { None: true };
|
|
1105
|
+
return { Some: value };
|
|
1106
|
+
},
|
|
1107
|
+
output: (value) => {
|
|
1108
|
+
if (value.$kind === "Some") return value.Some;
|
|
1109
|
+
return null;
|
|
1110
|
+
}
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
function vector(type, options) {
|
|
1114
|
+
return new BcsType({
|
|
1115
|
+
read: (reader) => {
|
|
1116
|
+
const length = reader.readULEB();
|
|
1117
|
+
const result = new Array(length);
|
|
1118
|
+
for (let i = 0; i < length; i++) result[i] = type.read(reader);
|
|
1119
|
+
return result;
|
|
1120
|
+
},
|
|
1121
|
+
write: (value, writer) => {
|
|
1122
|
+
writer.writeULEB(value.length);
|
|
1123
|
+
for (const item of value) type.write(item, writer);
|
|
1124
|
+
},
|
|
1125
|
+
...options,
|
|
1126
|
+
name: options?.name ?? `vector<${type.name}>`,
|
|
1127
|
+
validate: (value) => {
|
|
1128
|
+
options?.validate?.(value);
|
|
1129
|
+
if (!value || typeof value !== "object" || !("length" in value)) throw new TypeError(`Expected array, found ${typeof value}`);
|
|
1130
|
+
}
|
|
1131
|
+
});
|
|
1132
|
+
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Compares two byte arrays using lexicographic ordering.
|
|
1135
|
+
* This matches Rust's Ord implementation for Vec<u8>/[u8] which is used for BTreeMap key ordering.
|
|
1136
|
+
* Comparison is done byte-by-byte first, then by length if all compared bytes are equal.
|
|
1137
|
+
*/
|
|
1138
|
+
function compareBcsBytes(a, b) {
|
|
1139
|
+
for (let i = 0; i < Math.min(a.length, b.length); i++) if (a[i] !== b[i]) return a[i] - b[i];
|
|
1140
|
+
return a.length - b.length;
|
|
1141
|
+
}
|
|
1142
|
+
function map(keyType, valueType) {
|
|
1143
|
+
return new BcsType({
|
|
1144
|
+
name: `Map<${keyType.name}, ${valueType.name}>`,
|
|
1145
|
+
read: (reader) => {
|
|
1146
|
+
const length = reader.readULEB();
|
|
1147
|
+
const result = /* @__PURE__ */ new Map();
|
|
1148
|
+
for (let i = 0; i < length; i++) result.set(keyType.read(reader), valueType.read(reader));
|
|
1149
|
+
return result;
|
|
1150
|
+
},
|
|
1151
|
+
write: (value, writer) => {
|
|
1152
|
+
const entries = [...value.entries()].map(([key, val]) => [keyType.serialize(key).toBytes(), val]);
|
|
1153
|
+
entries.sort(([a], [b]) => compareBcsBytes(a, b));
|
|
1154
|
+
writer.writeULEB(entries.length);
|
|
1155
|
+
for (const [keyBytes, val] of entries) {
|
|
1156
|
+
writer.writeBytes(keyBytes);
|
|
1157
|
+
valueType.write(val, writer);
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
const bcs = {
|
|
1163
|
+
u8(options) {
|
|
1164
|
+
return uIntBcsType({
|
|
1165
|
+
readMethod: "read8",
|
|
1166
|
+
writeMethod: "write8",
|
|
1167
|
+
size: 1,
|
|
1168
|
+
maxValue: 2 ** 8 - 1,
|
|
1169
|
+
...options,
|
|
1170
|
+
name: options?.name ?? "u8"
|
|
1171
|
+
});
|
|
1172
|
+
},
|
|
1173
|
+
u16(options) {
|
|
1174
|
+
return uIntBcsType({
|
|
1175
|
+
readMethod: "read16",
|
|
1176
|
+
writeMethod: "write16",
|
|
1177
|
+
size: 2,
|
|
1178
|
+
maxValue: 2 ** 16 - 1,
|
|
1179
|
+
...options,
|
|
1180
|
+
name: options?.name ?? "u16"
|
|
1181
|
+
});
|
|
1182
|
+
},
|
|
1183
|
+
u32(options) {
|
|
1184
|
+
return uIntBcsType({
|
|
1185
|
+
readMethod: "read32",
|
|
1186
|
+
writeMethod: "write32",
|
|
1187
|
+
size: 4,
|
|
1188
|
+
maxValue: 2 ** 32 - 1,
|
|
1189
|
+
...options,
|
|
1190
|
+
name: options?.name ?? "u32"
|
|
1191
|
+
});
|
|
1192
|
+
},
|
|
1193
|
+
u64(options) {
|
|
1194
|
+
return bigUIntBcsType({
|
|
1195
|
+
readMethod: "read64",
|
|
1196
|
+
writeMethod: "write64",
|
|
1197
|
+
size: 8,
|
|
1198
|
+
maxValue: 2n ** 64n - 1n,
|
|
1199
|
+
...options,
|
|
1200
|
+
name: options?.name ?? "u64"
|
|
1201
|
+
});
|
|
1202
|
+
},
|
|
1203
|
+
u128(options) {
|
|
1204
|
+
return bigUIntBcsType({
|
|
1205
|
+
readMethod: "read128",
|
|
1206
|
+
writeMethod: "write128",
|
|
1207
|
+
size: 16,
|
|
1208
|
+
maxValue: 2n ** 128n - 1n,
|
|
1209
|
+
...options,
|
|
1210
|
+
name: options?.name ?? "u128"
|
|
1211
|
+
});
|
|
1212
|
+
},
|
|
1213
|
+
u256(options) {
|
|
1214
|
+
return bigUIntBcsType({
|
|
1215
|
+
readMethod: "read256",
|
|
1216
|
+
writeMethod: "write256",
|
|
1217
|
+
size: 32,
|
|
1218
|
+
maxValue: 2n ** 256n - 1n,
|
|
1219
|
+
...options,
|
|
1220
|
+
name: options?.name ?? "u256"
|
|
1221
|
+
});
|
|
1222
|
+
},
|
|
1223
|
+
bool(options) {
|
|
1224
|
+
return fixedSizeBcsType({
|
|
1225
|
+
size: 1,
|
|
1226
|
+
read: (reader) => reader.read8() === 1,
|
|
1227
|
+
write: (value, writer) => writer.write8(value ? 1 : 0),
|
|
1228
|
+
...options,
|
|
1229
|
+
name: options?.name ?? "bool",
|
|
1230
|
+
validate: (value) => {
|
|
1231
|
+
options?.validate?.(value);
|
|
1232
|
+
if (typeof value !== "boolean") throw new TypeError(`Expected boolean, found ${typeof value}`);
|
|
1233
|
+
}
|
|
1234
|
+
});
|
|
1235
|
+
},
|
|
1236
|
+
uleb128(options) {
|
|
1237
|
+
return dynamicSizeBcsType({
|
|
1238
|
+
read: (reader) => reader.readULEB(),
|
|
1239
|
+
serialize: (value) => {
|
|
1240
|
+
return Uint8Array.from(ulebEncode(value));
|
|
1241
|
+
},
|
|
1242
|
+
...options,
|
|
1243
|
+
name: options?.name ?? "uleb128"
|
|
1244
|
+
});
|
|
1245
|
+
},
|
|
1246
|
+
bytes(size, options) {
|
|
1247
|
+
return fixedSizeBcsType({
|
|
1248
|
+
size,
|
|
1249
|
+
read: (reader) => reader.readBytes(size),
|
|
1250
|
+
write: (value, writer) => {
|
|
1251
|
+
writer.writeBytes(new Uint8Array(value));
|
|
1252
|
+
},
|
|
1253
|
+
...options,
|
|
1254
|
+
name: options?.name ?? `bytes[${size}]`,
|
|
1255
|
+
validate: (value) => {
|
|
1256
|
+
options?.validate?.(value);
|
|
1257
|
+
if (!value || typeof value !== "object" || !("length" in value)) throw new TypeError(`Expected array, found ${typeof value}`);
|
|
1258
|
+
if (value.length !== size) throw new TypeError(`Expected array of length ${size}, found ${value.length}`);
|
|
1259
|
+
}
|
|
1260
|
+
});
|
|
1261
|
+
},
|
|
1262
|
+
byteVector(options) {
|
|
1263
|
+
return new BcsType({
|
|
1264
|
+
read: (reader) => {
|
|
1265
|
+
const length = reader.readULEB();
|
|
1266
|
+
return reader.readBytes(length);
|
|
1267
|
+
},
|
|
1268
|
+
write: (value, writer) => {
|
|
1269
|
+
const array = new Uint8Array(value);
|
|
1270
|
+
writer.writeULEB(array.length);
|
|
1271
|
+
writer.writeBytes(array);
|
|
1272
|
+
},
|
|
1273
|
+
...options,
|
|
1274
|
+
name: options?.name ?? "vector<u8>",
|
|
1275
|
+
serializedSize: (value) => {
|
|
1276
|
+
const length = "length" in value ? value.length : null;
|
|
1277
|
+
return length == null ? null : ulebEncode(length).length + length;
|
|
1278
|
+
},
|
|
1279
|
+
validate: (value) => {
|
|
1280
|
+
options?.validate?.(value);
|
|
1281
|
+
if (!value || typeof value !== "object" || !("length" in value)) throw new TypeError(`Expected array, found ${typeof value}`);
|
|
1282
|
+
}
|
|
1283
|
+
});
|
|
1284
|
+
},
|
|
1285
|
+
string(options) {
|
|
1286
|
+
return stringLikeBcsType({
|
|
1287
|
+
toBytes: (value) => new TextEncoder().encode(value),
|
|
1288
|
+
fromBytes: (bytes) => new TextDecoder().decode(bytes),
|
|
1289
|
+
...options,
|
|
1290
|
+
name: options?.name ?? "string"
|
|
1291
|
+
});
|
|
1292
|
+
},
|
|
1293
|
+
fixedArray,
|
|
1294
|
+
option,
|
|
1295
|
+
vector,
|
|
1296
|
+
tuple(fields, options) {
|
|
1297
|
+
return new BcsTuple({
|
|
1298
|
+
fields,
|
|
1299
|
+
...options
|
|
1300
|
+
});
|
|
1301
|
+
},
|
|
1302
|
+
struct(name, fields, options) {
|
|
1303
|
+
return new BcsStruct({
|
|
1304
|
+
name,
|
|
1305
|
+
fields,
|
|
1306
|
+
...options
|
|
1307
|
+
});
|
|
1308
|
+
},
|
|
1309
|
+
enum(name, fields, options) {
|
|
1310
|
+
return new BcsEnum({
|
|
1311
|
+
name,
|
|
1312
|
+
fields,
|
|
1313
|
+
...options
|
|
1314
|
+
});
|
|
1315
|
+
},
|
|
1316
|
+
map,
|
|
1317
|
+
lazy(cb) {
|
|
1318
|
+
return lazyBcsType(cb);
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
|
|
1322
|
+
const SUI_ADDRESS_LENGTH = 32;
|
|
1323
|
+
function isValidSuiAddress(value) {
|
|
1324
|
+
return isHex(value) && getHexByteLength(value) === SUI_ADDRESS_LENGTH;
|
|
1325
|
+
}
|
|
1326
|
+
/**
|
|
1327
|
+
* Perform the following operations:
|
|
1328
|
+
* 1. Make the address lower case
|
|
1329
|
+
* 2. Prepend `0x` if the string does not start with `0x`.
|
|
1330
|
+
* 3. Add more zeros if the length of the address(excluding `0x`) is less than `SUI_ADDRESS_LENGTH`
|
|
1331
|
+
*
|
|
1332
|
+
* WARNING: if the address value itself starts with `0x`, e.g., `0x0x`, the default behavior
|
|
1333
|
+
* is to treat the first `0x` not as part of the address. The default behavior can be overridden by
|
|
1334
|
+
* setting `forceAdd0x` to true
|
|
1335
|
+
*
|
|
1336
|
+
*/
|
|
1337
|
+
function normalizeSuiAddress(value, forceAdd0x = false) {
|
|
1338
|
+
let address = value.toLowerCase();
|
|
1339
|
+
if (!forceAdd0x && address.startsWith("0x")) address = address.slice(2);
|
|
1340
|
+
return `0x${address.padStart(SUI_ADDRESS_LENGTH * 2, "0")}`;
|
|
1341
|
+
}
|
|
1342
|
+
function isHex(value) {
|
|
1343
|
+
return /^(0x|0X)?[a-fA-F0-9]+$/.test(value) && value.length % 2 === 0;
|
|
1344
|
+
}
|
|
1345
|
+
function getHexByteLength(value) {
|
|
1346
|
+
return /^(0x|0X)/.test(value) ? (value.length - 2) / 2 : value.length / 2;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
//#region src/bcs/type-tag-serializer.ts
|
|
1350
|
+
const VECTOR_REGEX = /^vector<(.+)>$/;
|
|
1351
|
+
const STRUCT_REGEX = /^([^:]+)::([^:]+)::([^<]+)(<(.+)>)?/;
|
|
1352
|
+
var TypeTagSerializer = class TypeTagSerializer {
|
|
1353
|
+
static parseFromStr(str, normalizeAddress = false) {
|
|
1354
|
+
if (str === "address") return { address: null };
|
|
1355
|
+
else if (str === "bool") return { bool: null };
|
|
1356
|
+
else if (str === "u8") return { u8: null };
|
|
1357
|
+
else if (str === "u16") return { u16: null };
|
|
1358
|
+
else if (str === "u32") return { u32: null };
|
|
1359
|
+
else if (str === "u64") return { u64: null };
|
|
1360
|
+
else if (str === "u128") return { u128: null };
|
|
1361
|
+
else if (str === "u256") return { u256: null };
|
|
1362
|
+
else if (str === "signer") return { signer: null };
|
|
1363
|
+
const vectorMatch = str.match(VECTOR_REGEX);
|
|
1364
|
+
if (vectorMatch) return { vector: TypeTagSerializer.parseFromStr(vectorMatch[1], normalizeAddress) };
|
|
1365
|
+
const structMatch = str.match(STRUCT_REGEX);
|
|
1366
|
+
if (structMatch) return { struct: {
|
|
1367
|
+
address: normalizeAddress ? normalizeSuiAddress(structMatch[1]) : structMatch[1],
|
|
1368
|
+
module: structMatch[2],
|
|
1369
|
+
name: structMatch[3],
|
|
1370
|
+
typeParams: structMatch[5] === void 0 ? [] : TypeTagSerializer.parseStructTypeArgs(structMatch[5], normalizeAddress)
|
|
1371
|
+
} };
|
|
1372
|
+
throw new Error(`Encountered unexpected token when parsing type args for ${str}`);
|
|
1373
|
+
}
|
|
1374
|
+
static parseStructTypeArgs(str, normalizeAddress = false) {
|
|
1375
|
+
return splitGenericParameters(str).map((tok) => TypeTagSerializer.parseFromStr(tok, normalizeAddress));
|
|
1376
|
+
}
|
|
1377
|
+
static tagToString(tag) {
|
|
1378
|
+
if ("bool" in tag) return "bool";
|
|
1379
|
+
if ("u8" in tag) return "u8";
|
|
1380
|
+
if ("u16" in tag) return "u16";
|
|
1381
|
+
if ("u32" in tag) return "u32";
|
|
1382
|
+
if ("u64" in tag) return "u64";
|
|
1383
|
+
if ("u128" in tag) return "u128";
|
|
1384
|
+
if ("u256" in tag) return "u256";
|
|
1385
|
+
if ("address" in tag) return "address";
|
|
1386
|
+
if ("signer" in tag) return "signer";
|
|
1387
|
+
if ("vector" in tag) return `vector<${TypeTagSerializer.tagToString(tag.vector)}>`;
|
|
1388
|
+
if ("struct" in tag) {
|
|
1389
|
+
const struct = tag.struct;
|
|
1390
|
+
const typeParams = struct.typeParams.map(TypeTagSerializer.tagToString).join(", ");
|
|
1391
|
+
return `${struct.address}::${struct.module}::${struct.name}${typeParams ? `<${typeParams}>` : ""}`;
|
|
1392
|
+
}
|
|
1393
|
+
throw new Error("Invalid TypeTag");
|
|
1394
|
+
}
|
|
1395
|
+
};
|
|
1396
|
+
|
|
1397
|
+
//#region src/bcs/bcs.ts
|
|
1398
|
+
function unsafe_u64(options) {
|
|
1399
|
+
return bcs.u64({
|
|
1400
|
+
name: "unsafe_u64",
|
|
1401
|
+
...options
|
|
1402
|
+
}).transform({
|
|
1403
|
+
input: (val) => val,
|
|
1404
|
+
output: (val) => Number(val)
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
function optionEnum(type) {
|
|
1408
|
+
return bcs.enum("Option", {
|
|
1409
|
+
None: null,
|
|
1410
|
+
Some: type
|
|
1411
|
+
});
|
|
1412
|
+
}
|
|
1413
|
+
const Address = bcs.bytes(SUI_ADDRESS_LENGTH).transform({
|
|
1414
|
+
validate: (val) => {
|
|
1415
|
+
const address = typeof val === "string" ? val : toHex(val);
|
|
1416
|
+
if (!address || !isValidSuiAddress(normalizeSuiAddress(address))) throw new Error(`Invalid Sui address ${address}`);
|
|
1417
|
+
},
|
|
1418
|
+
input: (val) => typeof val === "string" ? fromHex(normalizeSuiAddress(val)) : val,
|
|
1419
|
+
output: (val) => normalizeSuiAddress(toHex(val))
|
|
1420
|
+
});
|
|
1421
|
+
const ObjectDigest = bcs.byteVector().transform({
|
|
1422
|
+
name: "ObjectDigest",
|
|
1423
|
+
input: (value) => fromBase58(value),
|
|
1424
|
+
output: (value) => toBase58(new Uint8Array(value)),
|
|
1425
|
+
validate: (value) => {
|
|
1426
|
+
if (fromBase58(value).length !== 32) throw new Error("ObjectDigest must be 32 bytes");
|
|
1427
|
+
}
|
|
1428
|
+
});
|
|
1429
|
+
const SuiObjectRef = bcs.struct("SuiObjectRef", {
|
|
1430
|
+
objectId: Address,
|
|
1431
|
+
version: bcs.u64(),
|
|
1432
|
+
digest: ObjectDigest
|
|
1433
|
+
});
|
|
1434
|
+
const SharedObjectRef = bcs.struct("SharedObjectRef", {
|
|
1435
|
+
objectId: Address,
|
|
1436
|
+
initialSharedVersion: bcs.u64(),
|
|
1437
|
+
mutable: bcs.bool()
|
|
1438
|
+
});
|
|
1439
|
+
const ObjectArg = bcs.enum("ObjectArg", {
|
|
1440
|
+
ImmOrOwnedObject: SuiObjectRef,
|
|
1441
|
+
SharedObject: SharedObjectRef,
|
|
1442
|
+
Receiving: SuiObjectRef
|
|
1443
|
+
});
|
|
1444
|
+
const Owner = bcs.enum("Owner", {
|
|
1445
|
+
AddressOwner: Address,
|
|
1446
|
+
ObjectOwner: Address,
|
|
1447
|
+
Shared: bcs.struct("Shared", { initialSharedVersion: bcs.u64() }),
|
|
1448
|
+
Immutable: null,
|
|
1449
|
+
ConsensusAddressOwner: bcs.struct("ConsensusAddressOwner", {
|
|
1450
|
+
startVersion: bcs.u64(),
|
|
1451
|
+
owner: Address
|
|
1452
|
+
})
|
|
1453
|
+
});
|
|
1454
|
+
const Reservation = bcs.enum("Reservation", { MaxAmountU64: bcs.u64() });
|
|
1455
|
+
const WithdrawalType = bcs.enum("WithdrawalType", { Balance: bcs.lazy(() => TypeTag) });
|
|
1456
|
+
const WithdrawFrom = bcs.enum("WithdrawFrom", {
|
|
1457
|
+
Sender: null,
|
|
1458
|
+
Sponsor: null
|
|
1459
|
+
});
|
|
1460
|
+
const FundsWithdrawal = bcs.struct("FundsWithdrawal", {
|
|
1461
|
+
reservation: Reservation,
|
|
1462
|
+
typeArg: WithdrawalType,
|
|
1463
|
+
withdrawFrom: WithdrawFrom
|
|
1464
|
+
});
|
|
1465
|
+
const CallArg = bcs.enum("CallArg", {
|
|
1466
|
+
Pure: bcs.struct("Pure", { bytes: bcs.byteVector().transform({
|
|
1467
|
+
input: (val) => typeof val === "string" ? fromBase64(val) : val,
|
|
1468
|
+
output: (val) => toBase64(new Uint8Array(val))
|
|
1469
|
+
}) }),
|
|
1470
|
+
Object: ObjectArg,
|
|
1471
|
+
FundsWithdrawal
|
|
1472
|
+
});
|
|
1473
|
+
const InnerTypeTag = bcs.enum("TypeTag", {
|
|
1474
|
+
bool: null,
|
|
1475
|
+
u8: null,
|
|
1476
|
+
u64: null,
|
|
1477
|
+
u128: null,
|
|
1478
|
+
address: null,
|
|
1479
|
+
signer: null,
|
|
1480
|
+
vector: bcs.lazy(() => InnerTypeTag),
|
|
1481
|
+
struct: bcs.lazy(() => StructTag),
|
|
1482
|
+
u16: null,
|
|
1483
|
+
u32: null,
|
|
1484
|
+
u256: null
|
|
1485
|
+
});
|
|
1486
|
+
const TypeTag = InnerTypeTag.transform({
|
|
1487
|
+
input: (typeTag) => typeof typeTag === "string" ? TypeTagSerializer.parseFromStr(typeTag, true) : typeTag,
|
|
1488
|
+
output: (typeTag) => TypeTagSerializer.tagToString(typeTag)
|
|
1489
|
+
});
|
|
1490
|
+
const Argument = bcs.enum("Argument", {
|
|
1491
|
+
GasCoin: null,
|
|
1492
|
+
Input: bcs.u16(),
|
|
1493
|
+
Result: bcs.u16(),
|
|
1494
|
+
NestedResult: bcs.tuple([bcs.u16(), bcs.u16()])
|
|
1495
|
+
});
|
|
1496
|
+
const ProgrammableMoveCall = bcs.struct("ProgrammableMoveCall", {
|
|
1497
|
+
package: Address,
|
|
1498
|
+
module: bcs.string(),
|
|
1499
|
+
function: bcs.string(),
|
|
1500
|
+
typeArguments: bcs.vector(TypeTag),
|
|
1501
|
+
arguments: bcs.vector(Argument)
|
|
1502
|
+
});
|
|
1503
|
+
const Command = bcs.enum("Command", {
|
|
1504
|
+
MoveCall: ProgrammableMoveCall,
|
|
1505
|
+
TransferObjects: bcs.struct("TransferObjects", {
|
|
1506
|
+
objects: bcs.vector(Argument),
|
|
1507
|
+
address: Argument
|
|
1508
|
+
}),
|
|
1509
|
+
SplitCoins: bcs.struct("SplitCoins", {
|
|
1510
|
+
coin: Argument,
|
|
1511
|
+
amounts: bcs.vector(Argument)
|
|
1512
|
+
}),
|
|
1513
|
+
MergeCoins: bcs.struct("MergeCoins", {
|
|
1514
|
+
destination: Argument,
|
|
1515
|
+
sources: bcs.vector(Argument)
|
|
1516
|
+
}),
|
|
1517
|
+
Publish: bcs.struct("Publish", {
|
|
1518
|
+
modules: bcs.vector(bcs.byteVector().transform({
|
|
1519
|
+
input: (val) => typeof val === "string" ? fromBase64(val) : val,
|
|
1520
|
+
output: (val) => toBase64(new Uint8Array(val))
|
|
1521
|
+
})),
|
|
1522
|
+
dependencies: bcs.vector(Address)
|
|
1523
|
+
}),
|
|
1524
|
+
MakeMoveVec: bcs.struct("MakeMoveVec", {
|
|
1525
|
+
type: optionEnum(TypeTag).transform({
|
|
1526
|
+
input: (val) => val === null ? { None: true } : { Some: val },
|
|
1527
|
+
output: (val) => val.Some ?? null
|
|
1528
|
+
}),
|
|
1529
|
+
elements: bcs.vector(Argument)
|
|
1530
|
+
}),
|
|
1531
|
+
Upgrade: bcs.struct("Upgrade", {
|
|
1532
|
+
modules: bcs.vector(bcs.byteVector().transform({
|
|
1533
|
+
input: (val) => typeof val === "string" ? fromBase64(val) : val,
|
|
1534
|
+
output: (val) => toBase64(new Uint8Array(val))
|
|
1535
|
+
})),
|
|
1536
|
+
dependencies: bcs.vector(Address),
|
|
1537
|
+
package: Address,
|
|
1538
|
+
ticket: Argument
|
|
1539
|
+
})
|
|
1540
|
+
});
|
|
1541
|
+
const ProgrammableTransaction = bcs.struct("ProgrammableTransaction", {
|
|
1542
|
+
inputs: bcs.vector(CallArg),
|
|
1543
|
+
commands: bcs.vector(Command)
|
|
1544
|
+
});
|
|
1545
|
+
const TransactionKind = bcs.enum("TransactionKind", {
|
|
1546
|
+
ProgrammableTransaction,
|
|
1547
|
+
ChangeEpoch: null,
|
|
1548
|
+
Genesis: null,
|
|
1549
|
+
ConsensusCommitPrologue: null
|
|
1550
|
+
});
|
|
1551
|
+
const ValidDuring = bcs.struct("ValidDuring", {
|
|
1552
|
+
minEpoch: bcs.option(bcs.u64()),
|
|
1553
|
+
maxEpoch: bcs.option(bcs.u64()),
|
|
1554
|
+
minTimestamp: bcs.option(bcs.u64()),
|
|
1555
|
+
maxTimestamp: bcs.option(bcs.u64()),
|
|
1556
|
+
chain: ObjectDigest,
|
|
1557
|
+
nonce: bcs.u32()
|
|
1558
|
+
});
|
|
1559
|
+
const TransactionExpiration = bcs.enum("TransactionExpiration", {
|
|
1560
|
+
None: null,
|
|
1561
|
+
Epoch: unsafe_u64(),
|
|
1562
|
+
ValidDuring
|
|
1563
|
+
});
|
|
1564
|
+
const StructTag = bcs.struct("StructTag", {
|
|
1565
|
+
address: Address,
|
|
1566
|
+
module: bcs.string(),
|
|
1567
|
+
name: bcs.string(),
|
|
1568
|
+
typeParams: bcs.vector(InnerTypeTag)
|
|
1569
|
+
});
|
|
1570
|
+
const GasData = bcs.struct("GasData", {
|
|
1571
|
+
payment: bcs.vector(SuiObjectRef),
|
|
1572
|
+
owner: Address,
|
|
1573
|
+
price: bcs.u64(),
|
|
1574
|
+
budget: bcs.u64()
|
|
1575
|
+
});
|
|
1576
|
+
const TransactionDataV1 = bcs.struct("TransactionDataV1", {
|
|
1577
|
+
kind: TransactionKind,
|
|
1578
|
+
sender: Address,
|
|
1579
|
+
gasData: GasData,
|
|
1580
|
+
expiration: TransactionExpiration
|
|
1581
|
+
});
|
|
1582
|
+
const TransactionData = bcs.enum("TransactionData", { V1: TransactionDataV1 });
|
|
1583
|
+
const IntentScope = bcs.enum("IntentScope", {
|
|
1584
|
+
TransactionData: null,
|
|
1585
|
+
TransactionEffects: null,
|
|
1586
|
+
CheckpointSummary: null,
|
|
1587
|
+
PersonalMessage: null
|
|
1588
|
+
});
|
|
1589
|
+
const IntentVersion = bcs.enum("IntentVersion", { V0: null });
|
|
1590
|
+
const AppId = bcs.enum("AppId", { Sui: null });
|
|
1591
|
+
const Intent = bcs.struct("Intent", {
|
|
1592
|
+
scope: IntentScope,
|
|
1593
|
+
version: IntentVersion,
|
|
1594
|
+
appId: AppId
|
|
1595
|
+
});
|
|
1596
|
+
function IntentMessage(T) {
|
|
1597
|
+
return bcs.struct(`IntentMessage<${T.name}>`, {
|
|
1598
|
+
intent: Intent,
|
|
1599
|
+
value: T
|
|
1600
|
+
});
|
|
1601
|
+
}
|
|
1602
|
+
const CompressedSignature = bcs.enum("CompressedSignature", {
|
|
1603
|
+
ED25519: bcs.bytes(64),
|
|
1604
|
+
Secp256k1: bcs.bytes(64),
|
|
1605
|
+
Secp256r1: bcs.bytes(64),
|
|
1606
|
+
ZkLogin: bcs.byteVector(),
|
|
1607
|
+
Passkey: bcs.byteVector()
|
|
1608
|
+
});
|
|
1609
|
+
const PublicKey$1 = bcs.enum("PublicKey", {
|
|
1610
|
+
ED25519: bcs.bytes(32),
|
|
1611
|
+
Secp256k1: bcs.bytes(33),
|
|
1612
|
+
Secp256r1: bcs.bytes(33),
|
|
1613
|
+
ZkLogin: bcs.byteVector(),
|
|
1614
|
+
Passkey: bcs.bytes(33)
|
|
1615
|
+
});
|
|
1616
|
+
const MultiSigPkMap = bcs.struct("MultiSigPkMap", {
|
|
1617
|
+
pubKey: PublicKey$1,
|
|
1618
|
+
weight: bcs.u8()
|
|
1619
|
+
});
|
|
1620
|
+
const MultiSigPublicKey = bcs.struct("MultiSigPublicKey", {
|
|
1621
|
+
pk_map: bcs.vector(MultiSigPkMap),
|
|
1622
|
+
threshold: bcs.u16()
|
|
1623
|
+
});
|
|
1624
|
+
const MultiSig = bcs.struct("MultiSig", {
|
|
1625
|
+
sigs: bcs.vector(CompressedSignature),
|
|
1626
|
+
bitmap: bcs.u16(),
|
|
1627
|
+
multisig_pk: MultiSigPublicKey
|
|
1628
|
+
});
|
|
1629
|
+
const base64String = bcs.byteVector().transform({
|
|
1630
|
+
input: (val) => typeof val === "string" ? fromBase64(val) : val,
|
|
1631
|
+
output: (val) => toBase64(new Uint8Array(val))
|
|
1632
|
+
});
|
|
1633
|
+
const SenderSignedTransaction = bcs.struct("SenderSignedTransaction", {
|
|
1634
|
+
intentMessage: IntentMessage(TransactionData),
|
|
1635
|
+
txSignatures: bcs.vector(base64String)
|
|
1636
|
+
});
|
|
1637
|
+
const SenderSignedData = bcs.vector(SenderSignedTransaction, { name: "SenderSignedData" });
|
|
1638
|
+
const PasskeyAuthenticator = bcs.struct("PasskeyAuthenticator", {
|
|
1639
|
+
authenticatorData: bcs.byteVector(),
|
|
1640
|
+
clientDataJson: bcs.string(),
|
|
1641
|
+
userSignature: bcs.byteVector()
|
|
1642
|
+
});
|
|
1643
|
+
const MoveObjectType = bcs.enum("MoveObjectType", {
|
|
1644
|
+
Other: StructTag,
|
|
1645
|
+
GasCoin: null,
|
|
1646
|
+
StakedSui: null,
|
|
1647
|
+
Coin: TypeTag,
|
|
1648
|
+
AccumulatorBalanceWrapper: null
|
|
1649
|
+
});
|
|
1650
|
+
const TypeOrigin = bcs.struct("TypeOrigin", {
|
|
1651
|
+
moduleName: bcs.string(),
|
|
1652
|
+
datatypeName: bcs.string(),
|
|
1653
|
+
package: Address
|
|
1654
|
+
});
|
|
1655
|
+
const UpgradeInfo = bcs.struct("UpgradeInfo", {
|
|
1656
|
+
upgradedId: Address,
|
|
1657
|
+
upgradedVersion: bcs.u64()
|
|
1658
|
+
});
|
|
1659
|
+
const MovePackage = bcs.struct("MovePackage", {
|
|
1660
|
+
id: Address,
|
|
1661
|
+
version: bcs.u64(),
|
|
1662
|
+
moduleMap: bcs.map(bcs.string(), bcs.byteVector()),
|
|
1663
|
+
typeOriginTable: bcs.vector(TypeOrigin),
|
|
1664
|
+
linkageTable: bcs.map(Address, UpgradeInfo)
|
|
1665
|
+
});
|
|
1666
|
+
const MoveObject = bcs.struct("MoveObject", {
|
|
1667
|
+
type: MoveObjectType,
|
|
1668
|
+
hasPublicTransfer: bcs.bool(),
|
|
1669
|
+
version: bcs.u64(),
|
|
1670
|
+
contents: bcs.byteVector()
|
|
1671
|
+
});
|
|
1672
|
+
const Data = bcs.enum("Data", {
|
|
1673
|
+
Move: MoveObject,
|
|
1674
|
+
Package: MovePackage
|
|
1675
|
+
});
|
|
1676
|
+
const ObjectInner = bcs.struct("ObjectInner", {
|
|
1677
|
+
data: Data,
|
|
1678
|
+
owner: Owner,
|
|
1679
|
+
previousTransaction: ObjectDigest,
|
|
1680
|
+
storageRebate: bcs.u64()
|
|
1681
|
+
});
|
|
1682
|
+
|
|
1683
|
+
//#region src/bcs/effects.ts
|
|
1684
|
+
const PackageUpgradeError = bcs.enum("PackageUpgradeError", {
|
|
1685
|
+
UnableToFetchPackage: bcs.struct("UnableToFetchPackage", { packageId: Address }),
|
|
1686
|
+
NotAPackage: bcs.struct("NotAPackage", { objectId: Address }),
|
|
1687
|
+
IncompatibleUpgrade: null,
|
|
1688
|
+
DigestDoesNotMatch: bcs.struct("DigestDoesNotMatch", { digest: bcs.byteVector() }),
|
|
1689
|
+
UnknownUpgradePolicy: bcs.struct("UnknownUpgradePolicy", { policy: bcs.u8() }),
|
|
1690
|
+
PackageIDDoesNotMatch: bcs.struct("PackageIDDoesNotMatch", {
|
|
1691
|
+
packageId: Address,
|
|
1692
|
+
ticketId: Address
|
|
1693
|
+
})
|
|
1694
|
+
});
|
|
1695
|
+
const ModuleId = bcs.struct("ModuleId", {
|
|
1696
|
+
address: Address,
|
|
1697
|
+
name: bcs.string()
|
|
1698
|
+
});
|
|
1699
|
+
const MoveLocation = bcs.struct("MoveLocation", {
|
|
1700
|
+
module: ModuleId,
|
|
1701
|
+
function: bcs.u16(),
|
|
1702
|
+
instruction: bcs.u16(),
|
|
1703
|
+
functionName: bcs.option(bcs.string())
|
|
1704
|
+
});
|
|
1705
|
+
const CommandArgumentError = bcs.enum("CommandArgumentError", {
|
|
1706
|
+
TypeMismatch: null,
|
|
1707
|
+
InvalidBCSBytes: null,
|
|
1708
|
+
InvalidUsageOfPureArg: null,
|
|
1709
|
+
InvalidArgumentToPrivateEntryFunction: null,
|
|
1710
|
+
IndexOutOfBounds: bcs.struct("IndexOutOfBounds", { idx: bcs.u16() }),
|
|
1711
|
+
SecondaryIndexOutOfBounds: bcs.struct("SecondaryIndexOutOfBounds", {
|
|
1712
|
+
resultIdx: bcs.u16(),
|
|
1713
|
+
secondaryIdx: bcs.u16()
|
|
1714
|
+
}),
|
|
1715
|
+
InvalidResultArity: bcs.struct("InvalidResultArity", { resultIdx: bcs.u16() }),
|
|
1716
|
+
InvalidGasCoinUsage: null,
|
|
1717
|
+
InvalidValueUsage: null,
|
|
1718
|
+
InvalidObjectByValue: null,
|
|
1719
|
+
InvalidObjectByMutRef: null,
|
|
1720
|
+
SharedObjectOperationNotAllowed: null,
|
|
1721
|
+
InvalidArgumentArity: null,
|
|
1722
|
+
InvalidTransferObject: null,
|
|
1723
|
+
InvalidMakeMoveVecNonObjectArgument: null,
|
|
1724
|
+
ArgumentWithoutValue: null,
|
|
1725
|
+
CannotMoveBorrowedValue: null,
|
|
1726
|
+
CannotWriteToExtendedReference: null,
|
|
1727
|
+
InvalidReferenceArgument: null
|
|
1728
|
+
});
|
|
1729
|
+
const TypeArgumentError = bcs.enum("TypeArgumentError", {
|
|
1730
|
+
TypeNotFound: null,
|
|
1731
|
+
ConstraintNotSatisfied: null
|
|
1732
|
+
});
|
|
1733
|
+
const ExecutionFailureStatus = bcs.enum("ExecutionFailureStatus", {
|
|
1734
|
+
InsufficientGas: null,
|
|
1735
|
+
InvalidGasObject: null,
|
|
1736
|
+
InvariantViolation: null,
|
|
1737
|
+
FeatureNotYetSupported: null,
|
|
1738
|
+
MoveObjectTooBig: bcs.struct("MoveObjectTooBig", {
|
|
1739
|
+
objectSize: bcs.u64(),
|
|
1740
|
+
maxObjectSize: bcs.u64()
|
|
1741
|
+
}),
|
|
1742
|
+
MovePackageTooBig: bcs.struct("MovePackageTooBig", {
|
|
1743
|
+
objectSize: bcs.u64(),
|
|
1744
|
+
maxObjectSize: bcs.u64()
|
|
1745
|
+
}),
|
|
1746
|
+
CircularObjectOwnership: bcs.struct("CircularObjectOwnership", { object: Address }),
|
|
1747
|
+
InsufficientCoinBalance: null,
|
|
1748
|
+
CoinBalanceOverflow: null,
|
|
1749
|
+
PublishErrorNonZeroAddress: null,
|
|
1750
|
+
SuiMoveVerificationError: null,
|
|
1751
|
+
MovePrimitiveRuntimeError: bcs.option(MoveLocation),
|
|
1752
|
+
MoveAbort: bcs.tuple([MoveLocation, bcs.u64()]),
|
|
1753
|
+
VMVerificationOrDeserializationError: null,
|
|
1754
|
+
VMInvariantViolation: null,
|
|
1755
|
+
FunctionNotFound: null,
|
|
1756
|
+
ArityMismatch: null,
|
|
1757
|
+
TypeArityMismatch: null,
|
|
1758
|
+
NonEntryFunctionInvoked: null,
|
|
1759
|
+
CommandArgumentError: bcs.struct("CommandArgumentError", {
|
|
1760
|
+
argIdx: bcs.u16(),
|
|
1761
|
+
kind: CommandArgumentError
|
|
1762
|
+
}),
|
|
1763
|
+
TypeArgumentError: bcs.struct("TypeArgumentError", {
|
|
1764
|
+
argumentIdx: bcs.u16(),
|
|
1765
|
+
kind: TypeArgumentError
|
|
1766
|
+
}),
|
|
1767
|
+
UnusedValueWithoutDrop: bcs.struct("UnusedValueWithoutDrop", {
|
|
1768
|
+
resultIdx: bcs.u16(),
|
|
1769
|
+
secondaryIdx: bcs.u16()
|
|
1770
|
+
}),
|
|
1771
|
+
InvalidPublicFunctionReturnType: bcs.struct("InvalidPublicFunctionReturnType", { idx: bcs.u16() }),
|
|
1772
|
+
InvalidTransferObject: null,
|
|
1773
|
+
EffectsTooLarge: bcs.struct("EffectsTooLarge", {
|
|
1774
|
+
currentSize: bcs.u64(),
|
|
1775
|
+
maxSize: bcs.u64()
|
|
1776
|
+
}),
|
|
1777
|
+
PublishUpgradeMissingDependency: null,
|
|
1778
|
+
PublishUpgradeDependencyDowngrade: null,
|
|
1779
|
+
PackageUpgradeError: bcs.struct("PackageUpgradeError", { upgradeError: PackageUpgradeError }),
|
|
1780
|
+
WrittenObjectsTooLarge: bcs.struct("WrittenObjectsTooLarge", {
|
|
1781
|
+
currentSize: bcs.u64(),
|
|
1782
|
+
maxSize: bcs.u64()
|
|
1783
|
+
}),
|
|
1784
|
+
CertificateDenied: null,
|
|
1785
|
+
SuiMoveVerificationTimedout: null,
|
|
1786
|
+
SharedObjectOperationNotAllowed: null,
|
|
1787
|
+
InputObjectDeleted: null,
|
|
1788
|
+
ExecutionCancelledDueToSharedObjectCongestion: bcs.struct("ExecutionCancelledDueToSharedObjectCongestion", { congested_objects: bcs.vector(Address) }),
|
|
1789
|
+
AddressDeniedForCoin: bcs.struct("AddressDeniedForCoin", {
|
|
1790
|
+
address: Address,
|
|
1791
|
+
coinType: bcs.string()
|
|
1792
|
+
}),
|
|
1793
|
+
CoinTypeGlobalPause: bcs.struct("CoinTypeGlobalPause", { coinType: bcs.string() }),
|
|
1794
|
+
ExecutionCancelledDueToRandomnessUnavailable: null,
|
|
1795
|
+
MoveVectorElemTooBig: bcs.struct("MoveVectorElemTooBig", {
|
|
1796
|
+
valueSize: bcs.u64(),
|
|
1797
|
+
maxScaledSize: bcs.u64()
|
|
1798
|
+
}),
|
|
1799
|
+
MoveRawValueTooBig: bcs.struct("MoveRawValueTooBig", {
|
|
1800
|
+
valueSize: bcs.u64(),
|
|
1801
|
+
maxScaledSize: bcs.u64()
|
|
1802
|
+
}),
|
|
1803
|
+
InvalidLinkage: null,
|
|
1804
|
+
InsufficientBalanceForWithdraw: null,
|
|
1805
|
+
NonExclusiveWriteInputObjectModified: bcs.struct("NonExclusiveWriteInputObjectModified", { id: Address })
|
|
1806
|
+
});
|
|
1807
|
+
const ExecutionStatus = bcs.enum("ExecutionStatus", {
|
|
1808
|
+
Success: null,
|
|
1809
|
+
Failure: bcs.struct("Failure", {
|
|
1810
|
+
error: ExecutionFailureStatus,
|
|
1811
|
+
command: bcs.option(bcs.u64())
|
|
1812
|
+
})
|
|
1813
|
+
});
|
|
1814
|
+
const GasCostSummary = bcs.struct("GasCostSummary", {
|
|
1815
|
+
computationCost: bcs.u64(),
|
|
1816
|
+
storageCost: bcs.u64(),
|
|
1817
|
+
storageRebate: bcs.u64(),
|
|
1818
|
+
nonRefundableStorageFee: bcs.u64()
|
|
1819
|
+
});
|
|
1820
|
+
const TransactionEffectsV1 = bcs.struct("TransactionEffectsV1", {
|
|
1821
|
+
status: ExecutionStatus,
|
|
1822
|
+
executedEpoch: bcs.u64(),
|
|
1823
|
+
gasUsed: GasCostSummary,
|
|
1824
|
+
modifiedAtVersions: bcs.vector(bcs.tuple([Address, bcs.u64()])),
|
|
1825
|
+
sharedObjects: bcs.vector(SuiObjectRef),
|
|
1826
|
+
transactionDigest: ObjectDigest,
|
|
1827
|
+
created: bcs.vector(bcs.tuple([SuiObjectRef, Owner])),
|
|
1828
|
+
mutated: bcs.vector(bcs.tuple([SuiObjectRef, Owner])),
|
|
1829
|
+
unwrapped: bcs.vector(bcs.tuple([SuiObjectRef, Owner])),
|
|
1830
|
+
deleted: bcs.vector(SuiObjectRef),
|
|
1831
|
+
unwrappedThenDeleted: bcs.vector(SuiObjectRef),
|
|
1832
|
+
wrapped: bcs.vector(SuiObjectRef),
|
|
1833
|
+
gasObject: bcs.tuple([SuiObjectRef, Owner]),
|
|
1834
|
+
eventsDigest: bcs.option(ObjectDigest),
|
|
1835
|
+
dependencies: bcs.vector(ObjectDigest)
|
|
1836
|
+
});
|
|
1837
|
+
const VersionDigest = bcs.tuple([bcs.u64(), ObjectDigest]);
|
|
1838
|
+
const ObjectIn = bcs.enum("ObjectIn", {
|
|
1839
|
+
NotExist: null,
|
|
1840
|
+
Exist: bcs.tuple([VersionDigest, Owner])
|
|
1841
|
+
});
|
|
1842
|
+
const AccumulatorAddress = bcs.struct("AccumulatorAddress", {
|
|
1843
|
+
address: Address,
|
|
1844
|
+
ty: TypeTag
|
|
1845
|
+
});
|
|
1846
|
+
const AccumulatorOperation = bcs.enum("AccumulatorOperation", {
|
|
1847
|
+
Merge: null,
|
|
1848
|
+
Split: null
|
|
1849
|
+
});
|
|
1850
|
+
const AccumulatorValue = bcs.enum("AccumulatorValue", {
|
|
1851
|
+
Integer: bcs.u64(),
|
|
1852
|
+
IntegerTuple: bcs.tuple([bcs.u64(), bcs.u64()]),
|
|
1853
|
+
EventDigest: bcs.vector(bcs.tuple([bcs.u64(), ObjectDigest]))
|
|
1854
|
+
});
|
|
1855
|
+
const AccumulatorWriteV1 = bcs.struct("AccumulatorWriteV1", {
|
|
1856
|
+
address: AccumulatorAddress,
|
|
1857
|
+
operation: AccumulatorOperation,
|
|
1858
|
+
value: AccumulatorValue
|
|
1859
|
+
});
|
|
1860
|
+
const ObjectOut = bcs.enum("ObjectOut", {
|
|
1861
|
+
NotExist: null,
|
|
1862
|
+
ObjectWrite: bcs.tuple([ObjectDigest, Owner]),
|
|
1863
|
+
PackageWrite: VersionDigest,
|
|
1864
|
+
AccumulatorWriteV1
|
|
1865
|
+
});
|
|
1866
|
+
const IDOperation = bcs.enum("IDOperation", {
|
|
1867
|
+
None: null,
|
|
1868
|
+
Created: null,
|
|
1869
|
+
Deleted: null
|
|
1870
|
+
});
|
|
1871
|
+
const EffectsObjectChange = bcs.struct("EffectsObjectChange", {
|
|
1872
|
+
inputState: ObjectIn,
|
|
1873
|
+
outputState: ObjectOut,
|
|
1874
|
+
idOperation: IDOperation
|
|
1875
|
+
});
|
|
1876
|
+
const UnchangedConsensusKind = bcs.enum("UnchangedConsensusKind", {
|
|
1877
|
+
ReadOnlyRoot: VersionDigest,
|
|
1878
|
+
MutateConsensusStreamEnded: bcs.u64(),
|
|
1879
|
+
ReadConsensusStreamEnded: bcs.u64(),
|
|
1880
|
+
Cancelled: bcs.u64(),
|
|
1881
|
+
PerEpochConfig: null
|
|
1882
|
+
});
|
|
1883
|
+
const TransactionEffectsV2 = bcs.struct("TransactionEffectsV2", {
|
|
1884
|
+
status: ExecutionStatus,
|
|
1885
|
+
executedEpoch: bcs.u64(),
|
|
1886
|
+
gasUsed: GasCostSummary,
|
|
1887
|
+
transactionDigest: ObjectDigest,
|
|
1888
|
+
gasObjectIndex: bcs.option(bcs.u32()),
|
|
1889
|
+
eventsDigest: bcs.option(ObjectDigest),
|
|
1890
|
+
dependencies: bcs.vector(ObjectDigest),
|
|
1891
|
+
lamportVersion: bcs.u64(),
|
|
1892
|
+
changedObjects: bcs.vector(bcs.tuple([Address, EffectsObjectChange])),
|
|
1893
|
+
unchangedConsensusObjects: bcs.vector(bcs.tuple([Address, UnchangedConsensusKind])),
|
|
1894
|
+
auxDataDigest: bcs.option(ObjectDigest)
|
|
1895
|
+
});
|
|
1896
|
+
const TransactionEffects = bcs.enum("TransactionEffects", {
|
|
1897
|
+
V1: TransactionEffectsV1,
|
|
1898
|
+
V2: TransactionEffectsV2
|
|
1899
|
+
});
|
|
1900
|
+
|
|
1901
|
+
//#region src/bcs/index.ts
|
|
1902
|
+
const suiBcs = {
|
|
1903
|
+
...bcs,
|
|
1904
|
+
U8: bcs.u8(),
|
|
1905
|
+
U16: bcs.u16(),
|
|
1906
|
+
U32: bcs.u32(),
|
|
1907
|
+
U64: bcs.u64(),
|
|
1908
|
+
U128: bcs.u128(),
|
|
1909
|
+
U256: bcs.u256(),
|
|
1910
|
+
ULEB128: bcs.uleb128(),
|
|
1911
|
+
Bool: bcs.bool(),
|
|
1912
|
+
String: bcs.string(),
|
|
1913
|
+
Address,
|
|
1914
|
+
AppId,
|
|
1915
|
+
Argument,
|
|
1916
|
+
CallArg,
|
|
1917
|
+
Command,
|
|
1918
|
+
CompressedSignature,
|
|
1919
|
+
Data,
|
|
1920
|
+
GasData,
|
|
1921
|
+
Intent,
|
|
1922
|
+
IntentMessage,
|
|
1923
|
+
IntentScope,
|
|
1924
|
+
IntentVersion,
|
|
1925
|
+
MoveObject,
|
|
1926
|
+
MoveObjectType,
|
|
1927
|
+
MovePackage,
|
|
1928
|
+
MultiSig,
|
|
1929
|
+
MultiSigPkMap,
|
|
1930
|
+
MultiSigPublicKey,
|
|
1931
|
+
Object: ObjectInner,
|
|
1932
|
+
ObjectArg,
|
|
1933
|
+
ObjectDigest,
|
|
1934
|
+
Owner,
|
|
1935
|
+
PasskeyAuthenticator,
|
|
1936
|
+
ProgrammableMoveCall,
|
|
1937
|
+
ProgrammableTransaction,
|
|
1938
|
+
PublicKey: PublicKey$1,
|
|
1939
|
+
SenderSignedData,
|
|
1940
|
+
SenderSignedTransaction,
|
|
1941
|
+
SharedObjectRef,
|
|
1942
|
+
StructTag,
|
|
1943
|
+
SuiObjectRef,
|
|
1944
|
+
TransactionData,
|
|
1945
|
+
TransactionDataV1,
|
|
1946
|
+
TransactionEffects,
|
|
1947
|
+
TransactionExpiration,
|
|
1948
|
+
TransactionKind,
|
|
1949
|
+
TypeOrigin,
|
|
1950
|
+
TypeTag,
|
|
1951
|
+
UpgradeInfo
|
|
1952
|
+
};
|
|
1953
|
+
|
|
1954
|
+
/**
|
|
1955
|
+
* Internal helpers for blake hash.
|
|
1956
|
+
* @module
|
|
1957
|
+
*/
|
|
1958
|
+
/**
|
|
1959
|
+
* Internal blake variable.
|
|
1960
|
+
* For BLAKE2b, the two extra permutations for rounds 10 and 11 are SIGMA[10..11] = SIGMA[0..1].
|
|
1961
|
+
*/
|
|
1962
|
+
// prettier-ignore
|
|
1963
|
+
const BSIGMA = /* @__PURE__ */ Uint8Array.from([
|
|
1964
|
+
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
|
1965
|
+
14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3,
|
|
1966
|
+
11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4,
|
|
1967
|
+
7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8,
|
|
1968
|
+
9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13,
|
|
1969
|
+
2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9,
|
|
1970
|
+
12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11,
|
|
1971
|
+
13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10,
|
|
1972
|
+
6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5,
|
|
1973
|
+
10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0,
|
|
1974
|
+
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
|
1975
|
+
14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3,
|
|
1976
|
+
// Blake1, unused in others
|
|
1977
|
+
11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4,
|
|
1978
|
+
7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8,
|
|
1979
|
+
9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13,
|
|
1980
|
+
2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9,
|
|
1981
|
+
]);
|
|
1982
|
+
|
|
1983
|
+
/**
|
|
1984
|
+
* blake2b (64-bit) & blake2s (8 to 32-bit) hash functions.
|
|
1985
|
+
* b could have been faster, but there is no fast u64 in js, so s is 1.5x faster.
|
|
1986
|
+
* @module
|
|
1987
|
+
*/
|
|
1988
|
+
// Same as SHA512_IV, but swapped endianness: LE instead of BE. iv[1] is iv[0], etc.
|
|
1989
|
+
const B2B_IV = /* @__PURE__ */ Uint32Array.from([
|
|
1990
|
+
0xf3bcc908, 0x6a09e667, 0x84caa73b, 0xbb67ae85, 0xfe94f82b, 0x3c6ef372, 0x5f1d36f1, 0xa54ff53a,
|
|
1991
|
+
0xade682d1, 0x510e527f, 0x2b3e6c1f, 0x9b05688c, 0xfb41bd6b, 0x1f83d9ab, 0x137e2179, 0x5be0cd19,
|
|
1992
|
+
]);
|
|
1993
|
+
// Temporary buffer
|
|
1994
|
+
const BBUF = /* @__PURE__ */ new Uint32Array(32);
|
|
1995
|
+
// Mixing function G splitted in two halfs
|
|
1996
|
+
function G1b(a, b, c, d, msg, x) {
|
|
1997
|
+
// NOTE: V is LE here
|
|
1998
|
+
const Xl = msg[x], Xh = msg[x + 1]; // prettier-ignore
|
|
1999
|
+
let Al = BBUF[2 * a], Ah = BBUF[2 * a + 1]; // prettier-ignore
|
|
2000
|
+
let Bl = BBUF[2 * b], Bh = BBUF[2 * b + 1]; // prettier-ignore
|
|
2001
|
+
let Cl = BBUF[2 * c], Ch = BBUF[2 * c + 1]; // prettier-ignore
|
|
2002
|
+
let Dl = BBUF[2 * d], Dh = BBUF[2 * d + 1]; // prettier-ignore
|
|
2003
|
+
// v[a] = (v[a] + v[b] + x) | 0;
|
|
2004
|
+
let ll = add3L(Al, Bl, Xl);
|
|
2005
|
+
Ah = add3H(ll, Ah, Bh, Xh);
|
|
2006
|
+
Al = ll | 0;
|
|
2007
|
+
// v[d] = rotr(v[d] ^ v[a], 32)
|
|
2008
|
+
({ Dh, Dl } = { Dh: Dh ^ Ah, Dl: Dl ^ Al });
|
|
2009
|
+
({ Dh, Dl } = { Dh: rotr32H(Dh, Dl), Dl: rotr32L(Dh) });
|
|
2010
|
+
// v[c] = (v[c] + v[d]) | 0;
|
|
2011
|
+
({ h: Ch, l: Cl } = add(Ch, Cl, Dh, Dl));
|
|
2012
|
+
// v[b] = rotr(v[b] ^ v[c], 24)
|
|
2013
|
+
({ Bh, Bl } = { Bh: Bh ^ Ch, Bl: Bl ^ Cl });
|
|
2014
|
+
({ Bh, Bl } = { Bh: rotrSH(Bh, Bl, 24), Bl: rotrSL(Bh, Bl, 24) });
|
|
2015
|
+
((BBUF[2 * a] = Al), (BBUF[2 * a + 1] = Ah));
|
|
2016
|
+
((BBUF[2 * b] = Bl), (BBUF[2 * b + 1] = Bh));
|
|
2017
|
+
((BBUF[2 * c] = Cl), (BBUF[2 * c + 1] = Ch));
|
|
2018
|
+
((BBUF[2 * d] = Dl), (BBUF[2 * d + 1] = Dh));
|
|
2019
|
+
}
|
|
2020
|
+
function G2b(a, b, c, d, msg, x) {
|
|
2021
|
+
// NOTE: V is LE here
|
|
2022
|
+
const Xl = msg[x], Xh = msg[x + 1]; // prettier-ignore
|
|
2023
|
+
let Al = BBUF[2 * a], Ah = BBUF[2 * a + 1]; // prettier-ignore
|
|
2024
|
+
let Bl = BBUF[2 * b], Bh = BBUF[2 * b + 1]; // prettier-ignore
|
|
2025
|
+
let Cl = BBUF[2 * c], Ch = BBUF[2 * c + 1]; // prettier-ignore
|
|
2026
|
+
let Dl = BBUF[2 * d], Dh = BBUF[2 * d + 1]; // prettier-ignore
|
|
2027
|
+
// v[a] = (v[a] + v[b] + x) | 0;
|
|
2028
|
+
let ll = add3L(Al, Bl, Xl);
|
|
2029
|
+
Ah = add3H(ll, Ah, Bh, Xh);
|
|
2030
|
+
Al = ll | 0;
|
|
2031
|
+
// v[d] = rotr(v[d] ^ v[a], 16)
|
|
2032
|
+
({ Dh, Dl } = { Dh: Dh ^ Ah, Dl: Dl ^ Al });
|
|
2033
|
+
({ Dh, Dl } = { Dh: rotrSH(Dh, Dl, 16), Dl: rotrSL(Dh, Dl, 16) });
|
|
2034
|
+
// v[c] = (v[c] + v[d]) | 0;
|
|
2035
|
+
({ h: Ch, l: Cl } = add(Ch, Cl, Dh, Dl));
|
|
2036
|
+
// v[b] = rotr(v[b] ^ v[c], 63)
|
|
2037
|
+
({ Bh, Bl } = { Bh: Bh ^ Ch, Bl: Bl ^ Cl });
|
|
2038
|
+
({ Bh, Bl } = { Bh: rotrBH(Bh, Bl, 63), Bl: rotrBL(Bh, Bl, 63) });
|
|
2039
|
+
((BBUF[2 * a] = Al), (BBUF[2 * a + 1] = Ah));
|
|
2040
|
+
((BBUF[2 * b] = Bl), (BBUF[2 * b + 1] = Bh));
|
|
2041
|
+
((BBUF[2 * c] = Cl), (BBUF[2 * c + 1] = Ch));
|
|
2042
|
+
((BBUF[2 * d] = Dl), (BBUF[2 * d + 1] = Dh));
|
|
2043
|
+
}
|
|
2044
|
+
function checkBlake2Opts(outputLen, opts = {}, keyLen, saltLen, persLen) {
|
|
2045
|
+
anumber$1(keyLen);
|
|
2046
|
+
if (outputLen < 0 || outputLen > keyLen)
|
|
2047
|
+
throw new Error('outputLen bigger than keyLen');
|
|
2048
|
+
const { key, salt, personalization } = opts;
|
|
2049
|
+
if (key !== undefined && (key.length < 1 || key.length > keyLen))
|
|
2050
|
+
throw new Error('"key" expected to be undefined or of length=1..' + keyLen);
|
|
2051
|
+
if (salt !== undefined)
|
|
2052
|
+
abytes(salt, saltLen, 'salt');
|
|
2053
|
+
if (personalization !== undefined)
|
|
2054
|
+
abytes(personalization, persLen, 'personalization');
|
|
2055
|
+
}
|
|
2056
|
+
/** Internal base class for BLAKE2. */
|
|
2057
|
+
class _BLAKE2 {
|
|
2058
|
+
buffer;
|
|
2059
|
+
buffer32;
|
|
2060
|
+
finished = false;
|
|
2061
|
+
destroyed = false;
|
|
2062
|
+
length = 0;
|
|
2063
|
+
pos = 0;
|
|
2064
|
+
blockLen;
|
|
2065
|
+
outputLen;
|
|
2066
|
+
constructor(blockLen, outputLen) {
|
|
2067
|
+
anumber$1(blockLen);
|
|
2068
|
+
anumber$1(outputLen);
|
|
2069
|
+
this.blockLen = blockLen;
|
|
2070
|
+
this.outputLen = outputLen;
|
|
2071
|
+
this.buffer = new Uint8Array(blockLen);
|
|
2072
|
+
this.buffer32 = u32(this.buffer);
|
|
2073
|
+
}
|
|
2074
|
+
update(data) {
|
|
2075
|
+
aexists(this);
|
|
2076
|
+
abytes(data);
|
|
2077
|
+
// Main difference with other hashes: there is flag for last block,
|
|
2078
|
+
// so we cannot process current block before we know that there
|
|
2079
|
+
// is the next one. This significantly complicates logic and reduces ability
|
|
2080
|
+
// to do zero-copy processing
|
|
2081
|
+
const { blockLen, buffer, buffer32 } = this;
|
|
2082
|
+
const len = data.length;
|
|
2083
|
+
const offset = data.byteOffset;
|
|
2084
|
+
const buf = data.buffer;
|
|
2085
|
+
for (let pos = 0; pos < len;) {
|
|
2086
|
+
// If buffer is full and we still have input (don't process last block, same as blake2s)
|
|
2087
|
+
if (this.pos === blockLen) {
|
|
2088
|
+
swap32IfBE(buffer32);
|
|
2089
|
+
this.compress(buffer32, 0, false);
|
|
2090
|
+
swap32IfBE(buffer32);
|
|
2091
|
+
this.pos = 0;
|
|
2092
|
+
}
|
|
2093
|
+
const take = Math.min(blockLen - this.pos, len - pos);
|
|
2094
|
+
const dataOffset = offset + pos;
|
|
2095
|
+
// full block && aligned to 4 bytes && not last in input
|
|
2096
|
+
if (take === blockLen && !(dataOffset % 4) && pos + take < len) {
|
|
2097
|
+
const data32 = new Uint32Array(buf, dataOffset, Math.floor((len - pos) / 4));
|
|
2098
|
+
swap32IfBE(data32);
|
|
2099
|
+
for (let pos32 = 0; pos + blockLen < len; pos32 += buffer32.length, pos += blockLen) {
|
|
2100
|
+
this.length += blockLen;
|
|
2101
|
+
this.compress(data32, pos32, false);
|
|
2102
|
+
}
|
|
2103
|
+
swap32IfBE(data32);
|
|
2104
|
+
continue;
|
|
2105
|
+
}
|
|
2106
|
+
buffer.set(data.subarray(pos, pos + take), this.pos);
|
|
2107
|
+
this.pos += take;
|
|
2108
|
+
this.length += take;
|
|
2109
|
+
pos += take;
|
|
2110
|
+
}
|
|
2111
|
+
return this;
|
|
2112
|
+
}
|
|
2113
|
+
digestInto(out) {
|
|
2114
|
+
aexists(this);
|
|
2115
|
+
aoutput(out, this);
|
|
2116
|
+
const { pos, buffer32 } = this;
|
|
2117
|
+
this.finished = true;
|
|
2118
|
+
// Padding
|
|
2119
|
+
clean(this.buffer.subarray(pos));
|
|
2120
|
+
swap32IfBE(buffer32);
|
|
2121
|
+
this.compress(buffer32, 0, true);
|
|
2122
|
+
swap32IfBE(buffer32);
|
|
2123
|
+
const out32 = u32(out);
|
|
2124
|
+
this.get().forEach((v, i) => (out32[i] = swap8IfBE(v)));
|
|
2125
|
+
}
|
|
2126
|
+
digest() {
|
|
2127
|
+
const { buffer, outputLen } = this;
|
|
2128
|
+
this.digestInto(buffer);
|
|
2129
|
+
const res = buffer.slice(0, outputLen);
|
|
2130
|
+
this.destroy();
|
|
2131
|
+
return res;
|
|
2132
|
+
}
|
|
2133
|
+
_cloneInto(to) {
|
|
2134
|
+
const { buffer, length, finished, destroyed, outputLen, pos } = this;
|
|
2135
|
+
to ||= new this.constructor({ dkLen: outputLen });
|
|
2136
|
+
to.set(...this.get());
|
|
2137
|
+
to.buffer.set(buffer);
|
|
2138
|
+
to.destroyed = destroyed;
|
|
2139
|
+
to.finished = finished;
|
|
2140
|
+
to.length = length;
|
|
2141
|
+
to.pos = pos;
|
|
2142
|
+
// @ts-ignore
|
|
2143
|
+
to.outputLen = outputLen;
|
|
2144
|
+
return to;
|
|
2145
|
+
}
|
|
2146
|
+
clone() {
|
|
2147
|
+
return this._cloneInto();
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
/** Internal blake2b hash class. */
|
|
2151
|
+
class _BLAKE2b extends _BLAKE2 {
|
|
2152
|
+
// Same as SHA-512, but LE
|
|
2153
|
+
v0l = B2B_IV[0] | 0;
|
|
2154
|
+
v0h = B2B_IV[1] | 0;
|
|
2155
|
+
v1l = B2B_IV[2] | 0;
|
|
2156
|
+
v1h = B2B_IV[3] | 0;
|
|
2157
|
+
v2l = B2B_IV[4] | 0;
|
|
2158
|
+
v2h = B2B_IV[5] | 0;
|
|
2159
|
+
v3l = B2B_IV[6] | 0;
|
|
2160
|
+
v3h = B2B_IV[7] | 0;
|
|
2161
|
+
v4l = B2B_IV[8] | 0;
|
|
2162
|
+
v4h = B2B_IV[9] | 0;
|
|
2163
|
+
v5l = B2B_IV[10] | 0;
|
|
2164
|
+
v5h = B2B_IV[11] | 0;
|
|
2165
|
+
v6l = B2B_IV[12] | 0;
|
|
2166
|
+
v6h = B2B_IV[13] | 0;
|
|
2167
|
+
v7l = B2B_IV[14] | 0;
|
|
2168
|
+
v7h = B2B_IV[15] | 0;
|
|
2169
|
+
constructor(opts = {}) {
|
|
2170
|
+
const olen = opts.dkLen === undefined ? 64 : opts.dkLen;
|
|
2171
|
+
super(128, olen);
|
|
2172
|
+
checkBlake2Opts(olen, opts, 64, 16, 16);
|
|
2173
|
+
let { key, personalization, salt } = opts;
|
|
2174
|
+
let keyLength = 0;
|
|
2175
|
+
if (key !== undefined) {
|
|
2176
|
+
abytes(key, undefined, 'key');
|
|
2177
|
+
keyLength = key.length;
|
|
2178
|
+
}
|
|
2179
|
+
this.v0l ^= this.outputLen | (keyLength << 8) | (0x01 << 16) | (0x01 << 24);
|
|
2180
|
+
if (salt !== undefined) {
|
|
2181
|
+
abytes(salt, undefined, 'salt');
|
|
2182
|
+
const slt = u32(salt);
|
|
2183
|
+
this.v4l ^= swap8IfBE(slt[0]);
|
|
2184
|
+
this.v4h ^= swap8IfBE(slt[1]);
|
|
2185
|
+
this.v5l ^= swap8IfBE(slt[2]);
|
|
2186
|
+
this.v5h ^= swap8IfBE(slt[3]);
|
|
2187
|
+
}
|
|
2188
|
+
if (personalization !== undefined) {
|
|
2189
|
+
abytes(personalization, undefined, 'personalization');
|
|
2190
|
+
const pers = u32(personalization);
|
|
2191
|
+
this.v6l ^= swap8IfBE(pers[0]);
|
|
2192
|
+
this.v6h ^= swap8IfBE(pers[1]);
|
|
2193
|
+
this.v7l ^= swap8IfBE(pers[2]);
|
|
2194
|
+
this.v7h ^= swap8IfBE(pers[3]);
|
|
2195
|
+
}
|
|
2196
|
+
if (key !== undefined) {
|
|
2197
|
+
// Pad to blockLen and update
|
|
2198
|
+
const tmp = new Uint8Array(this.blockLen);
|
|
2199
|
+
tmp.set(key);
|
|
2200
|
+
this.update(tmp);
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
// prettier-ignore
|
|
2204
|
+
get() {
|
|
2205
|
+
let { v0l, v0h, v1l, v1h, v2l, v2h, v3l, v3h, v4l, v4h, v5l, v5h, v6l, v6h, v7l, v7h } = this;
|
|
2206
|
+
return [v0l, v0h, v1l, v1h, v2l, v2h, v3l, v3h, v4l, v4h, v5l, v5h, v6l, v6h, v7l, v7h];
|
|
2207
|
+
}
|
|
2208
|
+
// prettier-ignore
|
|
2209
|
+
set(v0l, v0h, v1l, v1h, v2l, v2h, v3l, v3h, v4l, v4h, v5l, v5h, v6l, v6h, v7l, v7h) {
|
|
2210
|
+
this.v0l = v0l | 0;
|
|
2211
|
+
this.v0h = v0h | 0;
|
|
2212
|
+
this.v1l = v1l | 0;
|
|
2213
|
+
this.v1h = v1h | 0;
|
|
2214
|
+
this.v2l = v2l | 0;
|
|
2215
|
+
this.v2h = v2h | 0;
|
|
2216
|
+
this.v3l = v3l | 0;
|
|
2217
|
+
this.v3h = v3h | 0;
|
|
2218
|
+
this.v4l = v4l | 0;
|
|
2219
|
+
this.v4h = v4h | 0;
|
|
2220
|
+
this.v5l = v5l | 0;
|
|
2221
|
+
this.v5h = v5h | 0;
|
|
2222
|
+
this.v6l = v6l | 0;
|
|
2223
|
+
this.v6h = v6h | 0;
|
|
2224
|
+
this.v7l = v7l | 0;
|
|
2225
|
+
this.v7h = v7h | 0;
|
|
2226
|
+
}
|
|
2227
|
+
compress(msg, offset, isLast) {
|
|
2228
|
+
this.get().forEach((v, i) => (BBUF[i] = v)); // First half from state.
|
|
2229
|
+
BBUF.set(B2B_IV, 16); // Second half from IV.
|
|
2230
|
+
let { h, l } = fromBig(BigInt(this.length));
|
|
2231
|
+
BBUF[24] = B2B_IV[8] ^ l; // Low word of the offset.
|
|
2232
|
+
BBUF[25] = B2B_IV[9] ^ h; // High word.
|
|
2233
|
+
// Invert all bits for last block
|
|
2234
|
+
if (isLast) {
|
|
2235
|
+
BBUF[28] = ~BBUF[28];
|
|
2236
|
+
BBUF[29] = ~BBUF[29];
|
|
2237
|
+
}
|
|
2238
|
+
let j = 0;
|
|
2239
|
+
const s = BSIGMA;
|
|
2240
|
+
for (let i = 0; i < 12; i++) {
|
|
2241
|
+
G1b(0, 4, 8, 12, msg, offset + 2 * s[j++]);
|
|
2242
|
+
G2b(0, 4, 8, 12, msg, offset + 2 * s[j++]);
|
|
2243
|
+
G1b(1, 5, 9, 13, msg, offset + 2 * s[j++]);
|
|
2244
|
+
G2b(1, 5, 9, 13, msg, offset + 2 * s[j++]);
|
|
2245
|
+
G1b(2, 6, 10, 14, msg, offset + 2 * s[j++]);
|
|
2246
|
+
G2b(2, 6, 10, 14, msg, offset + 2 * s[j++]);
|
|
2247
|
+
G1b(3, 7, 11, 15, msg, offset + 2 * s[j++]);
|
|
2248
|
+
G2b(3, 7, 11, 15, msg, offset + 2 * s[j++]);
|
|
2249
|
+
G1b(0, 5, 10, 15, msg, offset + 2 * s[j++]);
|
|
2250
|
+
G2b(0, 5, 10, 15, msg, offset + 2 * s[j++]);
|
|
2251
|
+
G1b(1, 6, 11, 12, msg, offset + 2 * s[j++]);
|
|
2252
|
+
G2b(1, 6, 11, 12, msg, offset + 2 * s[j++]);
|
|
2253
|
+
G1b(2, 7, 8, 13, msg, offset + 2 * s[j++]);
|
|
2254
|
+
G2b(2, 7, 8, 13, msg, offset + 2 * s[j++]);
|
|
2255
|
+
G1b(3, 4, 9, 14, msg, offset + 2 * s[j++]);
|
|
2256
|
+
G2b(3, 4, 9, 14, msg, offset + 2 * s[j++]);
|
|
2257
|
+
}
|
|
2258
|
+
this.v0l ^= BBUF[0] ^ BBUF[16];
|
|
2259
|
+
this.v0h ^= BBUF[1] ^ BBUF[17];
|
|
2260
|
+
this.v1l ^= BBUF[2] ^ BBUF[18];
|
|
2261
|
+
this.v1h ^= BBUF[3] ^ BBUF[19];
|
|
2262
|
+
this.v2l ^= BBUF[4] ^ BBUF[20];
|
|
2263
|
+
this.v2h ^= BBUF[5] ^ BBUF[21];
|
|
2264
|
+
this.v3l ^= BBUF[6] ^ BBUF[22];
|
|
2265
|
+
this.v3h ^= BBUF[7] ^ BBUF[23];
|
|
2266
|
+
this.v4l ^= BBUF[8] ^ BBUF[24];
|
|
2267
|
+
this.v4h ^= BBUF[9] ^ BBUF[25];
|
|
2268
|
+
this.v5l ^= BBUF[10] ^ BBUF[26];
|
|
2269
|
+
this.v5h ^= BBUF[11] ^ BBUF[27];
|
|
2270
|
+
this.v6l ^= BBUF[12] ^ BBUF[28];
|
|
2271
|
+
this.v6h ^= BBUF[13] ^ BBUF[29];
|
|
2272
|
+
this.v7l ^= BBUF[14] ^ BBUF[30];
|
|
2273
|
+
this.v7h ^= BBUF[15] ^ BBUF[31];
|
|
2274
|
+
clean(BBUF);
|
|
2275
|
+
}
|
|
2276
|
+
destroy() {
|
|
2277
|
+
this.destroyed = true;
|
|
2278
|
+
clean(this.buffer32);
|
|
2279
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
/**
|
|
2283
|
+
* Blake2b hash function. 64-bit. 1.5x slower than blake2s in JS.
|
|
2284
|
+
* @param msg - message that would be hashed
|
|
2285
|
+
* @param opts - dkLen output length, key for MAC mode, salt, personalization
|
|
2286
|
+
*/
|
|
2287
|
+
const blake2b = /* @__PURE__ */ createHasher((opts) => new _BLAKE2b(opts));
|
|
2288
|
+
|
|
2289
|
+
//#region src/cryptography/signature-scheme.ts
|
|
2290
|
+
const SIGNATURE_SCHEME_TO_FLAG = {
|
|
2291
|
+
ED25519: 0,
|
|
2292
|
+
Secp256k1: 1,
|
|
2293
|
+
Secp256r1: 2,
|
|
2294
|
+
MultiSig: 3,
|
|
2295
|
+
ZkLogin: 5,
|
|
2296
|
+
Passkey: 6
|
|
2297
|
+
};
|
|
2298
|
+
const SIGNATURE_SCHEME_TO_SIZE = {
|
|
2299
|
+
ED25519: 32,
|
|
2300
|
+
Secp256k1: 33,
|
|
2301
|
+
Secp256r1: 33,
|
|
2302
|
+
Passkey: 33
|
|
2303
|
+
};
|
|
2304
|
+
const SIGNATURE_FLAG_TO_SCHEME = {
|
|
2305
|
+
0: "ED25519",
|
|
2306
|
+
1: "Secp256k1",
|
|
2307
|
+
2: "Secp256r1",
|
|
2308
|
+
3: "MultiSig",
|
|
2309
|
+
5: "ZkLogin",
|
|
2310
|
+
6: "Passkey"
|
|
2311
|
+
};
|
|
2312
|
+
|
|
2313
|
+
//#region src/cryptography/intent.ts
|
|
2314
|
+
/**
|
|
2315
|
+
* Inserts a domain separator for a message that is being signed
|
|
2316
|
+
*/
|
|
2317
|
+
function messageWithIntent(scope, message) {
|
|
2318
|
+
return suiBcs.IntentMessage(suiBcs.bytes(message.length)).serialize({
|
|
2319
|
+
intent: {
|
|
2320
|
+
scope: { [scope]: true },
|
|
2321
|
+
version: { V0: true },
|
|
2322
|
+
appId: { Sui: true }
|
|
2323
|
+
},
|
|
2324
|
+
value: message
|
|
2325
|
+
}).toBytes();
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
//#region src/cryptography/publickey.ts
|
|
2329
|
+
function bytesEqual(a, b) {
|
|
2330
|
+
if (a === b) return true;
|
|
2331
|
+
if (a.length !== b.length) return false;
|
|
2332
|
+
for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;
|
|
2333
|
+
return true;
|
|
2334
|
+
}
|
|
2335
|
+
/**
|
|
2336
|
+
* A public key
|
|
2337
|
+
*/
|
|
2338
|
+
var PublicKey = class {
|
|
2339
|
+
/**
|
|
2340
|
+
* Checks if two public keys are equal
|
|
2341
|
+
*/
|
|
2342
|
+
equals(publicKey) {
|
|
2343
|
+
return bytesEqual(this.toRawBytes(), publicKey.toRawBytes());
|
|
2344
|
+
}
|
|
2345
|
+
/**
|
|
2346
|
+
* Return the base-64 representation of the public key
|
|
2347
|
+
*/
|
|
2348
|
+
toBase64() {
|
|
2349
|
+
return toBase64(this.toRawBytes());
|
|
2350
|
+
}
|
|
2351
|
+
toString() {
|
|
2352
|
+
throw new Error("`toString` is not implemented on public keys. Use `toBase64()` or `toRawBytes()` instead.");
|
|
2353
|
+
}
|
|
2354
|
+
/**
|
|
2355
|
+
* Return the Sui representation of the public key encoded in
|
|
2356
|
+
* base-64. A Sui public key is formed by the concatenation
|
|
2357
|
+
* of the scheme flag with the raw bytes of the public key
|
|
2358
|
+
*/
|
|
2359
|
+
toSuiPublicKey() {
|
|
2360
|
+
return toBase64(this.toSuiBytes());
|
|
2361
|
+
}
|
|
2362
|
+
verifyWithIntent(bytes, signature, intent) {
|
|
2363
|
+
const digest = blake2b(messageWithIntent(intent, bytes), { dkLen: 32 });
|
|
2364
|
+
return this.verify(digest, signature);
|
|
2365
|
+
}
|
|
2366
|
+
/**
|
|
2367
|
+
* Verifies that the signature is valid for for the provided PersonalMessage
|
|
2368
|
+
*/
|
|
2369
|
+
verifyPersonalMessage(message, signature) {
|
|
2370
|
+
return this.verifyWithIntent(suiBcs.byteVector().serialize(message).toBytes(), signature, "PersonalMessage");
|
|
2371
|
+
}
|
|
2372
|
+
/**
|
|
2373
|
+
* Verifies that the signature is valid for for the provided Transaction
|
|
2374
|
+
*/
|
|
2375
|
+
verifyTransaction(transaction, signature) {
|
|
2376
|
+
return this.verifyWithIntent(transaction, signature, "TransactionData");
|
|
2377
|
+
}
|
|
2378
|
+
/**
|
|
2379
|
+
* Verifies that the public key is associated with the provided address
|
|
2380
|
+
*/
|
|
2381
|
+
verifyAddress(address) {
|
|
2382
|
+
return this.toSuiAddress() === address;
|
|
2383
|
+
}
|
|
2384
|
+
/**
|
|
2385
|
+
* Returns the bytes representation of the public key
|
|
2386
|
+
* prefixed with the signature scheme flag
|
|
2387
|
+
*/
|
|
2388
|
+
toSuiBytes() {
|
|
2389
|
+
const rawBytes = this.toRawBytes();
|
|
2390
|
+
const suiBytes = new Uint8Array(rawBytes.length + 1);
|
|
2391
|
+
suiBytes.set([this.flag()]);
|
|
2392
|
+
suiBytes.set(rawBytes, 1);
|
|
2393
|
+
return suiBytes;
|
|
2394
|
+
}
|
|
2395
|
+
/**
|
|
2396
|
+
* Return the Sui address associated with this Ed25519 public key
|
|
2397
|
+
*/
|
|
2398
|
+
toSuiAddress() {
|
|
2399
|
+
return normalizeSuiAddress(bytesToHex(blake2b(this.toSuiBytes(), { dkLen: 32 })).slice(0, SUI_ADDRESS_LENGTH * 2));
|
|
2400
|
+
}
|
|
2401
|
+
};
|
|
2402
|
+
function parseSerializedKeypairSignature(serializedSignature) {
|
|
2403
|
+
const bytes = fromBase64(serializedSignature);
|
|
2404
|
+
const signatureScheme = SIGNATURE_FLAG_TO_SCHEME[bytes[0]];
|
|
2405
|
+
switch (signatureScheme) {
|
|
2406
|
+
case "ED25519":
|
|
2407
|
+
case "Secp256k1":
|
|
2408
|
+
case "Secp256r1":
|
|
2409
|
+
const size = SIGNATURE_SCHEME_TO_SIZE[signatureScheme];
|
|
2410
|
+
const signature = bytes.slice(1, bytes.length - size);
|
|
2411
|
+
return {
|
|
2412
|
+
serializedSignature,
|
|
2413
|
+
signatureScheme,
|
|
2414
|
+
signature,
|
|
2415
|
+
publicKey: bytes.slice(1 + signature.length),
|
|
2416
|
+
bytes
|
|
2417
|
+
};
|
|
2418
|
+
default: throw new Error("Unsupported signature scheme");
|
|
2419
|
+
}
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2422
|
+
//#region src/keypairs/ed25519/publickey.ts
|
|
2423
|
+
const PUBLIC_KEY_SIZE = 32;
|
|
2424
|
+
/**
|
|
2425
|
+
* An Ed25519 public key
|
|
2426
|
+
*/
|
|
2427
|
+
var Ed25519PublicKey = class extends PublicKey {
|
|
2428
|
+
static {
|
|
2429
|
+
this.SIZE = PUBLIC_KEY_SIZE;
|
|
2430
|
+
}
|
|
2431
|
+
/**
|
|
2432
|
+
* Create a new Ed25519PublicKey object
|
|
2433
|
+
* @param value ed25519 public key as buffer or base-64 encoded string
|
|
2434
|
+
*/
|
|
2435
|
+
constructor(value) {
|
|
2436
|
+
super();
|
|
2437
|
+
if (typeof value === "string") this.data = fromBase64(value);
|
|
2438
|
+
else if (value instanceof Uint8Array) this.data = value;
|
|
2439
|
+
else this.data = Uint8Array.from(value);
|
|
2440
|
+
if (this.data.length !== PUBLIC_KEY_SIZE) throw new Error(`Invalid public key input. Expected ${PUBLIC_KEY_SIZE} bytes, got ${this.data.length}`);
|
|
2441
|
+
}
|
|
2442
|
+
/**
|
|
2443
|
+
* Checks if two Ed25519 public keys are equal
|
|
2444
|
+
*/
|
|
2445
|
+
equals(publicKey) {
|
|
2446
|
+
return super.equals(publicKey);
|
|
2447
|
+
}
|
|
2448
|
+
/**
|
|
2449
|
+
* Return the byte array representation of the Ed25519 public key
|
|
2450
|
+
*/
|
|
2451
|
+
toRawBytes() {
|
|
2452
|
+
return this.data;
|
|
2453
|
+
}
|
|
2454
|
+
/**
|
|
2455
|
+
* Return the Sui address associated with this Ed25519 public key
|
|
2456
|
+
*/
|
|
2457
|
+
flag() {
|
|
2458
|
+
return SIGNATURE_SCHEME_TO_FLAG["ED25519"];
|
|
2459
|
+
}
|
|
2460
|
+
/**
|
|
2461
|
+
* Verifies that the signature is valid for for the provided message
|
|
2462
|
+
*/
|
|
2463
|
+
async verify(message, signature) {
|
|
2464
|
+
let bytes;
|
|
2465
|
+
if (typeof signature === "string") {
|
|
2466
|
+
const parsed = parseSerializedKeypairSignature(signature);
|
|
2467
|
+
if (parsed.signatureScheme !== "ED25519") throw new Error("Invalid signature scheme");
|
|
2468
|
+
if (!bytesEqual(this.toRawBytes(), parsed.publicKey)) throw new Error("Signature does not match public key");
|
|
2469
|
+
bytes = parsed.signature;
|
|
2470
|
+
} else bytes = signature;
|
|
2471
|
+
return ed25519.verify(bytes, message, this.toRawBytes());
|
|
2472
|
+
}
|
|
2473
|
+
};
|
|
2474
|
+
|
|
2475
|
+
//#region src/keypairs/passkey/publickey.ts
|
|
2476
|
+
const PASSKEY_PUBLIC_KEY_SIZE = 33;
|
|
2477
|
+
const PASSKEY_SIGNATURE_SIZE = 64;
|
|
2478
|
+
/**
|
|
2479
|
+
* A passkey public key
|
|
2480
|
+
*/
|
|
2481
|
+
(class extends PublicKey {
|
|
2482
|
+
static {
|
|
2483
|
+
this.SIZE = PASSKEY_PUBLIC_KEY_SIZE;
|
|
2484
|
+
}
|
|
2485
|
+
/**
|
|
2486
|
+
* Create a new PasskeyPublicKey object
|
|
2487
|
+
* @param value passkey public key as buffer or base-64 encoded string
|
|
2488
|
+
*/
|
|
2489
|
+
constructor(value) {
|
|
2490
|
+
super();
|
|
2491
|
+
if (typeof value === "string") this.data = fromBase64(value);
|
|
2492
|
+
else if (value instanceof Uint8Array) this.data = value;
|
|
2493
|
+
else this.data = Uint8Array.from(value);
|
|
2494
|
+
if (this.data.length !== PASSKEY_PUBLIC_KEY_SIZE) throw new Error(`Invalid public key input. Expected ${PASSKEY_PUBLIC_KEY_SIZE} bytes, got ${this.data.length}`);
|
|
2495
|
+
}
|
|
2496
|
+
/**
|
|
2497
|
+
* Checks if two passkey public keys are equal
|
|
2498
|
+
*/
|
|
2499
|
+
equals(publicKey) {
|
|
2500
|
+
return super.equals(publicKey);
|
|
2501
|
+
}
|
|
2502
|
+
/**
|
|
2503
|
+
* Return the byte array representation of the Secp256r1 public key
|
|
2504
|
+
*/
|
|
2505
|
+
toRawBytes() {
|
|
2506
|
+
return this.data;
|
|
2507
|
+
}
|
|
2508
|
+
/**
|
|
2509
|
+
* Return the Sui address associated with this Secp256r1 public key
|
|
2510
|
+
*/
|
|
2511
|
+
flag() {
|
|
2512
|
+
return SIGNATURE_SCHEME_TO_FLAG["Passkey"];
|
|
2513
|
+
}
|
|
2514
|
+
/**
|
|
2515
|
+
* Verifies that the signature is valid for for the provided message
|
|
2516
|
+
*/
|
|
2517
|
+
async verify(message, signature) {
|
|
2518
|
+
const parsed = parseSerializedPasskeySignature(signature);
|
|
2519
|
+
const clientDataJSON = JSON.parse(parsed.clientDataJson);
|
|
2520
|
+
if (clientDataJSON.type !== "webauthn.get") return false;
|
|
2521
|
+
if (!bytesEqual(message, fromBase64(clientDataJSON.challenge.replace(/-/g, "+").replace(/_/g, "/")))) return false;
|
|
2522
|
+
const pk = parsed.userSignature.slice(1 + PASSKEY_SIGNATURE_SIZE);
|
|
2523
|
+
if (!bytesEqual(this.toRawBytes(), pk)) return false;
|
|
2524
|
+
const payload = new Uint8Array([...parsed.authenticatorData, ...sha256(new TextEncoder().encode(parsed.clientDataJson))]);
|
|
2525
|
+
const sig = parsed.userSignature.slice(1, PASSKEY_SIGNATURE_SIZE + 1);
|
|
2526
|
+
return p256.verify(sig, payload, pk);
|
|
2527
|
+
}
|
|
2528
|
+
});
|
|
2529
|
+
/**
|
|
2530
|
+
* Parse signature from bytes or base64 string into the following fields.
|
|
2531
|
+
*/
|
|
2532
|
+
function parseSerializedPasskeySignature(signature) {
|
|
2533
|
+
const bytes = typeof signature === "string" ? fromBase64(signature) : signature;
|
|
2534
|
+
if (bytes[0] !== SIGNATURE_SCHEME_TO_FLAG.Passkey) throw new Error("Invalid signature scheme");
|
|
2535
|
+
const dec = PasskeyAuthenticator.parse(bytes.slice(1));
|
|
2536
|
+
return {
|
|
2537
|
+
signatureScheme: "Passkey",
|
|
2538
|
+
serializedSignature: toBase64(bytes),
|
|
2539
|
+
signature: bytes,
|
|
2540
|
+
authenticatorData: dec.authenticatorData,
|
|
2541
|
+
clientDataJson: dec.clientDataJson,
|
|
2542
|
+
userSignature: new Uint8Array(dec.userSignature),
|
|
2543
|
+
publicKey: new Uint8Array(dec.userSignature.slice(1 + PASSKEY_SIGNATURE_SIZE))
|
|
2544
|
+
};
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
function findFirstNonZeroIndex(bytes) {
|
|
2548
|
+
for (let i = 0; i < bytes.length; i++) if (bytes[i] !== 0) return i;
|
|
2549
|
+
return -1;
|
|
2550
|
+
}
|
|
2551
|
+
function toPaddedBigEndianBytes(num, width) {
|
|
2552
|
+
return hexToBytes(num.toString(16).padStart(width * 2, "0").slice(-width * 2));
|
|
2553
|
+
}
|
|
2554
|
+
function toBigEndianBytes(num, width) {
|
|
2555
|
+
const bytes = toPaddedBigEndianBytes(num, width);
|
|
2556
|
+
const firstNonZeroIndex = findFirstNonZeroIndex(bytes);
|
|
2557
|
+
if (firstNonZeroIndex === -1) return new Uint8Array([0]);
|
|
2558
|
+
return bytes.slice(firstNonZeroIndex);
|
|
2559
|
+
}
|
|
2560
|
+
function normalizeZkLoginIssuer(iss) {
|
|
2561
|
+
if (iss === "accounts.google.com") return "https://accounts.google.com";
|
|
2562
|
+
return iss;
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
//#region src/zklogin/jwt-utils.ts
|
|
2566
|
+
function base64UrlCharTo6Bits(base64UrlChar) {
|
|
2567
|
+
if (base64UrlChar.length !== 1) throw new Error("Invalid base64Url character: " + base64UrlChar);
|
|
2568
|
+
const index = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".indexOf(base64UrlChar);
|
|
2569
|
+
if (index === -1) throw new Error("Invalid base64Url character: " + base64UrlChar);
|
|
2570
|
+
const binaryString = index.toString(2).padStart(6, "0");
|
|
2571
|
+
return Array.from(binaryString).map(Number);
|
|
2572
|
+
}
|
|
2573
|
+
function base64UrlStringToBitVector(base64UrlString) {
|
|
2574
|
+
let bitVector = [];
|
|
2575
|
+
for (let i = 0; i < base64UrlString.length; i++) {
|
|
2576
|
+
const bits = base64UrlCharTo6Bits(base64UrlString.charAt(i));
|
|
2577
|
+
bitVector = bitVector.concat(bits);
|
|
2578
|
+
}
|
|
2579
|
+
return bitVector;
|
|
2580
|
+
}
|
|
2581
|
+
function decodeBase64URL(s, i) {
|
|
2582
|
+
if (s.length < 2) throw new Error(`Input (s = ${s}) is not tightly packed because s.length < 2`);
|
|
2583
|
+
let bits = base64UrlStringToBitVector(s);
|
|
2584
|
+
const firstCharOffset = i % 4;
|
|
2585
|
+
if (firstCharOffset === 0) ; else if (firstCharOffset === 1) bits = bits.slice(2);
|
|
2586
|
+
else if (firstCharOffset === 2) bits = bits.slice(4);
|
|
2587
|
+
else throw new Error(`Input (s = ${s}) is not tightly packed because i%4 = 3 (i = ${i}))`);
|
|
2588
|
+
const lastCharOffset = (i + s.length - 1) % 4;
|
|
2589
|
+
if (lastCharOffset === 3) ; else if (lastCharOffset === 2) bits = bits.slice(0, bits.length - 2);
|
|
2590
|
+
else if (lastCharOffset === 1) bits = bits.slice(0, bits.length - 4);
|
|
2591
|
+
else throw new Error(`Input (s = ${s}) is not tightly packed because (i + s.length - 1)%4 = 0 (i = ${i}))`);
|
|
2592
|
+
if (bits.length % 8 !== 0) throw new Error(`We should never reach here...`);
|
|
2593
|
+
const bytes = new Uint8Array(Math.floor(bits.length / 8));
|
|
2594
|
+
let currentByteIndex = 0;
|
|
2595
|
+
for (let i$1 = 0; i$1 < bits.length; i$1 += 8) {
|
|
2596
|
+
const bitChunk = bits.slice(i$1, i$1 + 8);
|
|
2597
|
+
const byte = parseInt(bitChunk.join(""), 2);
|
|
2598
|
+
bytes[currentByteIndex++] = byte;
|
|
2599
|
+
}
|
|
2600
|
+
return new TextDecoder().decode(bytes);
|
|
2601
|
+
}
|
|
2602
|
+
function verifyExtendedClaim(claim) {
|
|
2603
|
+
if (!(claim.slice(-1) === "}" || claim.slice(-1) === ",")) throw new Error("Invalid claim");
|
|
2604
|
+
const json = JSON.parse("{" + claim.slice(0, -1) + "}");
|
|
2605
|
+
if (Object.keys(json).length !== 1) throw new Error("Invalid claim");
|
|
2606
|
+
const key = Object.keys(json)[0];
|
|
2607
|
+
return [key, json[key]];
|
|
2608
|
+
}
|
|
2609
|
+
function extractClaimValue(claim, claimName) {
|
|
2610
|
+
const [name, value] = verifyExtendedClaim(decodeBase64URL(claim.value, claim.indexMod4));
|
|
2611
|
+
if (name !== claimName) throw new Error(`Invalid field name: found ${name} expected ${claimName}`);
|
|
2612
|
+
return value;
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
//#region src/zklogin/bcs.ts
|
|
2616
|
+
const zkLoginSignature = bcs.struct("ZkLoginSignature", {
|
|
2617
|
+
inputs: bcs.struct("ZkLoginSignatureInputs", {
|
|
2618
|
+
proofPoints: bcs.struct("ZkLoginSignatureInputsProofPoints", {
|
|
2619
|
+
a: bcs.vector(bcs.string()),
|
|
2620
|
+
b: bcs.vector(bcs.vector(bcs.string())),
|
|
2621
|
+
c: bcs.vector(bcs.string())
|
|
2622
|
+
}),
|
|
2623
|
+
issBase64Details: bcs.struct("ZkLoginSignatureInputsClaim", {
|
|
2624
|
+
value: bcs.string(),
|
|
2625
|
+
indexMod4: bcs.u8()
|
|
2626
|
+
}),
|
|
2627
|
+
headerBase64: bcs.string(),
|
|
2628
|
+
addressSeed: bcs.string()
|
|
2629
|
+
}),
|
|
2630
|
+
maxEpoch: bcs.u64(),
|
|
2631
|
+
userSignature: bcs.byteVector()
|
|
2632
|
+
});
|
|
2633
|
+
|
|
2634
|
+
function parseZkLoginSignature(signature) {
|
|
2635
|
+
return zkLoginSignature.parse(typeof signature === "string" ? fromBase64(signature) : signature);
|
|
2636
|
+
}
|
|
2637
|
+
|
|
2638
|
+
//#region src/zklogin/publickey.ts
|
|
2639
|
+
/**
|
|
2640
|
+
* A zkLogin public identifier
|
|
2641
|
+
*/
|
|
2642
|
+
var ZkLoginPublicIdentifier = class ZkLoginPublicIdentifier extends PublicKey {
|
|
2643
|
+
#data;
|
|
2644
|
+
#client;
|
|
2645
|
+
#legacyAddress;
|
|
2646
|
+
/**
|
|
2647
|
+
* Create a new ZkLoginPublicIdentifier object
|
|
2648
|
+
* @param value zkLogin public identifier as buffer or base-64 encoded string
|
|
2649
|
+
*/
|
|
2650
|
+
constructor(value, { client } = {}) {
|
|
2651
|
+
super();
|
|
2652
|
+
this.#client = client;
|
|
2653
|
+
if (typeof value === "string") this.#data = fromBase64(value);
|
|
2654
|
+
else if (value instanceof Uint8Array) this.#data = value;
|
|
2655
|
+
else this.#data = Uint8Array.from(value);
|
|
2656
|
+
this.#legacyAddress = this.#data.length !== this.#data[0] + 1 + 32;
|
|
2657
|
+
if (this.#legacyAddress) this.#data = normalizeZkLoginPublicKeyBytes(this.#data, false);
|
|
2658
|
+
}
|
|
2659
|
+
static fromBytes(bytes, { client, address, legacyAddress } = {}) {
|
|
2660
|
+
let publicKey;
|
|
2661
|
+
if (legacyAddress === true) publicKey = new ZkLoginPublicIdentifier(normalizeZkLoginPublicKeyBytes(bytes, true), { client });
|
|
2662
|
+
else if (legacyAddress === false) publicKey = new ZkLoginPublicIdentifier(normalizeZkLoginPublicKeyBytes(bytes, false), { client });
|
|
2663
|
+
else if (address) {
|
|
2664
|
+
publicKey = new ZkLoginPublicIdentifier(normalizeZkLoginPublicKeyBytes(bytes, false), { client });
|
|
2665
|
+
if (publicKey.toSuiAddress() !== address) publicKey = new ZkLoginPublicIdentifier(normalizeZkLoginPublicKeyBytes(bytes, true), { client });
|
|
2666
|
+
} else publicKey = new ZkLoginPublicIdentifier(bytes, { client });
|
|
2667
|
+
if (address && publicKey.toSuiAddress() !== address) throw new Error("Public key bytes do not match the provided address");
|
|
2668
|
+
return publicKey;
|
|
2669
|
+
}
|
|
2670
|
+
static fromProof(address, proof) {
|
|
2671
|
+
const { issBase64Details, addressSeed } = proof;
|
|
2672
|
+
const iss = extractClaimValue(issBase64Details, "iss");
|
|
2673
|
+
const legacyPublicKey = toZkLoginPublicIdentifier(BigInt(addressSeed), iss, { legacyAddress: true });
|
|
2674
|
+
if (legacyPublicKey.toSuiAddress() === address) return legacyPublicKey;
|
|
2675
|
+
const publicKey = toZkLoginPublicIdentifier(BigInt(addressSeed), iss, { legacyAddress: false });
|
|
2676
|
+
if (publicKey.toSuiAddress() !== address) throw new Error("Proof does not match address");
|
|
2677
|
+
return publicKey;
|
|
2678
|
+
}
|
|
2679
|
+
/**
|
|
2680
|
+
* Checks if two zkLogin public identifiers are equal
|
|
2681
|
+
*/
|
|
2682
|
+
equals(publicKey) {
|
|
2683
|
+
return super.equals(publicKey);
|
|
2684
|
+
}
|
|
2685
|
+
toSuiAddress() {
|
|
2686
|
+
if (this.#legacyAddress) return this.#toLegacyAddress();
|
|
2687
|
+
return super.toSuiAddress();
|
|
2688
|
+
}
|
|
2689
|
+
#toLegacyAddress() {
|
|
2690
|
+
const legacyBytes = normalizeZkLoginPublicKeyBytes(this.#data, true);
|
|
2691
|
+
const addressBytes = new Uint8Array(legacyBytes.length + 1);
|
|
2692
|
+
addressBytes[0] = this.flag();
|
|
2693
|
+
addressBytes.set(legacyBytes, 1);
|
|
2694
|
+
return normalizeSuiAddress(bytesToHex(blake2b(addressBytes, { dkLen: 32 })).slice(0, SUI_ADDRESS_LENGTH * 2));
|
|
2695
|
+
}
|
|
2696
|
+
/**
|
|
2697
|
+
* Return the byte array representation of the zkLogin public identifier
|
|
2698
|
+
*/
|
|
2699
|
+
toRawBytes() {
|
|
2700
|
+
return this.#data;
|
|
2701
|
+
}
|
|
2702
|
+
/**
|
|
2703
|
+
* Return the Sui address associated with this ZkLogin public identifier
|
|
2704
|
+
*/
|
|
2705
|
+
flag() {
|
|
2706
|
+
return SIGNATURE_SCHEME_TO_FLAG["ZkLogin"];
|
|
2707
|
+
}
|
|
2708
|
+
/**
|
|
2709
|
+
* Verifies that the signature is valid for for the provided message
|
|
2710
|
+
*/
|
|
2711
|
+
async verify(_message, _signature) {
|
|
2712
|
+
throw Error("does not support");
|
|
2713
|
+
}
|
|
2714
|
+
/**
|
|
2715
|
+
* Verifies that the signature is valid for for the provided PersonalMessage
|
|
2716
|
+
*/
|
|
2717
|
+
verifyPersonalMessage(message, signature) {
|
|
2718
|
+
const parsedSignature = parseSerializedZkLoginSignature(signature);
|
|
2719
|
+
return graphqlVerifyZkLoginSignature({
|
|
2720
|
+
address: new ZkLoginPublicIdentifier(parsedSignature.publicKey).toSuiAddress(),
|
|
2721
|
+
bytes: toBase64(message),
|
|
2722
|
+
signature: parsedSignature.serializedSignature,
|
|
2723
|
+
intentScope: "PersonalMessage",
|
|
2724
|
+
client: this.#client
|
|
2725
|
+
});
|
|
2726
|
+
}
|
|
2727
|
+
/**
|
|
2728
|
+
* Verifies that the signature is valid for for the provided Transaction
|
|
2729
|
+
*/
|
|
2730
|
+
verifyTransaction(transaction, signature) {
|
|
2731
|
+
const parsedSignature = parseSerializedZkLoginSignature(signature);
|
|
2732
|
+
return graphqlVerifyZkLoginSignature({
|
|
2733
|
+
address: new ZkLoginPublicIdentifier(parsedSignature.publicKey).toSuiAddress(),
|
|
2734
|
+
bytes: toBase64(transaction),
|
|
2735
|
+
signature: parsedSignature.serializedSignature,
|
|
2736
|
+
intentScope: "TransactionData",
|
|
2737
|
+
client: this.#client
|
|
2738
|
+
});
|
|
2739
|
+
}
|
|
2740
|
+
/**
|
|
2741
|
+
* Verifies that the public key is associated with the provided address
|
|
2742
|
+
*/
|
|
2743
|
+
verifyAddress(address) {
|
|
2744
|
+
return address === super.toSuiAddress() || address === this.#toLegacyAddress();
|
|
2745
|
+
}
|
|
2746
|
+
};
|
|
2747
|
+
function toZkLoginPublicIdentifier(addressSeed, iss, options) {
|
|
2748
|
+
if (options.legacyAddress === void 0) throw new Error("legacyAddress parameter must be specified");
|
|
2749
|
+
const addressSeedBytesBigEndian = options.legacyAddress ? toBigEndianBytes(addressSeed, 32) : toPaddedBigEndianBytes(addressSeed, 32);
|
|
2750
|
+
const issBytes = new TextEncoder().encode(normalizeZkLoginIssuer(iss));
|
|
2751
|
+
const tmp = new Uint8Array(1 + issBytes.length + addressSeedBytesBigEndian.length);
|
|
2752
|
+
tmp.set([issBytes.length], 0);
|
|
2753
|
+
tmp.set(issBytes, 1);
|
|
2754
|
+
tmp.set(addressSeedBytesBigEndian, 1 + issBytes.length);
|
|
2755
|
+
return new ZkLoginPublicIdentifier(tmp, options);
|
|
2756
|
+
}
|
|
2757
|
+
function normalizeZkLoginPublicKeyBytes(bytes, legacyAddress) {
|
|
2758
|
+
const issByteLength = bytes[0] + 1;
|
|
2759
|
+
const addressSeed = BigInt(`0x${toHex(bytes.slice(issByteLength))}`);
|
|
2760
|
+
const seedBytes = legacyAddress ? toBigEndianBytes(addressSeed, 32) : toPaddedBigEndianBytes(addressSeed, 32);
|
|
2761
|
+
const data = new Uint8Array(issByteLength + seedBytes.length);
|
|
2762
|
+
data.set(bytes.slice(0, issByteLength), 0);
|
|
2763
|
+
data.set(seedBytes, issByteLength);
|
|
2764
|
+
return data;
|
|
2765
|
+
}
|
|
2766
|
+
async function graphqlVerifyZkLoginSignature({ address, bytes, signature, intentScope, client }) {
|
|
2767
|
+
if (!client) throw new Error("A Sui Client (GRPC, GraphQL, or JSON RPC) is required to verify zkLogin signatures");
|
|
2768
|
+
const resp = await client.core.verifyZkLoginSignature({
|
|
2769
|
+
bytes,
|
|
2770
|
+
signature,
|
|
2771
|
+
intentScope,
|
|
2772
|
+
address
|
|
2773
|
+
});
|
|
2774
|
+
return resp.success === true && resp.errors.length === 0;
|
|
2775
|
+
}
|
|
2776
|
+
function parseSerializedZkLoginSignature(signature) {
|
|
2777
|
+
const bytes = typeof signature === "string" ? fromBase64(signature) : signature;
|
|
2778
|
+
if (bytes[0] !== SIGNATURE_SCHEME_TO_FLAG.ZkLogin) throw new Error("Invalid signature scheme");
|
|
2779
|
+
const { inputs, maxEpoch, userSignature } = parseZkLoginSignature(bytes.slice(1));
|
|
2780
|
+
const { issBase64Details, addressSeed } = inputs;
|
|
2781
|
+
const iss = extractClaimValue(issBase64Details, "iss");
|
|
2782
|
+
const publicIdentifier = toZkLoginPublicIdentifier(BigInt(addressSeed), iss, { legacyAddress: false });
|
|
2783
|
+
return {
|
|
2784
|
+
serializedSignature: toBase64(bytes),
|
|
2785
|
+
signatureScheme: "ZkLogin",
|
|
2786
|
+
zkLogin: {
|
|
2787
|
+
inputs,
|
|
2788
|
+
maxEpoch,
|
|
2789
|
+
userSignature,
|
|
2790
|
+
iss,
|
|
2791
|
+
addressSeed: BigInt(addressSeed)
|
|
2792
|
+
},
|
|
2793
|
+
signature: bytes,
|
|
2794
|
+
publicKey: publicIdentifier.toRawBytes()
|
|
2795
|
+
};
|
|
2796
|
+
}
|
|
2797
|
+
|
|
2798
|
+
//#region src/cryptography/signature.ts
|
|
2799
|
+
/**
|
|
2800
|
+
* Takes in a signature, its associated signing scheme and a public key, then serializes this data
|
|
2801
|
+
*/
|
|
2802
|
+
function toSerializedSignature({ signature, signatureScheme, publicKey }) {
|
|
2803
|
+
if (!publicKey) throw new Error("`publicKey` is required");
|
|
2804
|
+
const pubKeyBytes = publicKey.toRawBytes();
|
|
2805
|
+
const serializedSignature = new Uint8Array(1 + signature.length + pubKeyBytes.length);
|
|
2806
|
+
serializedSignature.set([SIGNATURE_SCHEME_TO_FLAG[signatureScheme]]);
|
|
2807
|
+
serializedSignature.set(signature, 1);
|
|
2808
|
+
serializedSignature.set(pubKeyBytes, 1 + signature.length);
|
|
2809
|
+
return toBase64(serializedSignature);
|
|
2810
|
+
}
|
|
2811
|
+
/**
|
|
2812
|
+
* Decodes a serialized signature into its constituent components: the signature scheme, the actual signature, and the public key
|
|
2813
|
+
*/
|
|
2814
|
+
function parseSerializedSignature(serializedSignature) {
|
|
2815
|
+
const bytes = fromBase64(serializedSignature);
|
|
2816
|
+
const signatureScheme = SIGNATURE_FLAG_TO_SCHEME[bytes[0]];
|
|
2817
|
+
switch (signatureScheme) {
|
|
2818
|
+
case "Passkey": return parseSerializedPasskeySignature(serializedSignature);
|
|
2819
|
+
case "MultiSig": return {
|
|
2820
|
+
serializedSignature,
|
|
2821
|
+
signatureScheme,
|
|
2822
|
+
multisig: suiBcs.MultiSig.parse(bytes.slice(1)),
|
|
2823
|
+
bytes,
|
|
2824
|
+
signature: void 0
|
|
2825
|
+
};
|
|
2826
|
+
case "ZkLogin": return parseSerializedZkLoginSignature(serializedSignature);
|
|
2827
|
+
case "ED25519":
|
|
2828
|
+
case "Secp256k1":
|
|
2829
|
+
case "Secp256r1": return parseSerializedKeypairSignature(serializedSignature);
|
|
2830
|
+
default: throw new Error("Unsupported signature scheme");
|
|
2831
|
+
}
|
|
2832
|
+
}
|
|
2833
|
+
|
|
2834
|
+
//#region src/keypairs/secp256k1/publickey.ts
|
|
2835
|
+
const SECP256K1_PUBLIC_KEY_SIZE = 33;
|
|
2836
|
+
/**
|
|
2837
|
+
* A Secp256k1 public key
|
|
2838
|
+
*/
|
|
2839
|
+
var Secp256k1PublicKey = class extends PublicKey {
|
|
2840
|
+
static {
|
|
2841
|
+
this.SIZE = SECP256K1_PUBLIC_KEY_SIZE;
|
|
2842
|
+
}
|
|
2843
|
+
/**
|
|
2844
|
+
* Create a new Secp256k1PublicKey object
|
|
2845
|
+
* @param value secp256k1 public key as buffer or base-64 encoded string
|
|
2846
|
+
*/
|
|
2847
|
+
constructor(value) {
|
|
2848
|
+
super();
|
|
2849
|
+
if (typeof value === "string") this.data = fromBase64(value);
|
|
2850
|
+
else if (value instanceof Uint8Array) this.data = value;
|
|
2851
|
+
else this.data = Uint8Array.from(value);
|
|
2852
|
+
if (this.data.length !== SECP256K1_PUBLIC_KEY_SIZE) throw new Error(`Invalid public key input. Expected ${SECP256K1_PUBLIC_KEY_SIZE} bytes, got ${this.data.length}`);
|
|
2853
|
+
}
|
|
2854
|
+
/**
|
|
2855
|
+
* Checks if two Secp256k1 public keys are equal
|
|
2856
|
+
*/
|
|
2857
|
+
equals(publicKey) {
|
|
2858
|
+
return super.equals(publicKey);
|
|
2859
|
+
}
|
|
2860
|
+
/**
|
|
2861
|
+
* Return the byte array representation of the Secp256k1 public key
|
|
2862
|
+
*/
|
|
2863
|
+
toRawBytes() {
|
|
2864
|
+
return this.data;
|
|
2865
|
+
}
|
|
2866
|
+
/**
|
|
2867
|
+
* Return the Sui address associated with this Secp256k1 public key
|
|
2868
|
+
*/
|
|
2869
|
+
flag() {
|
|
2870
|
+
return SIGNATURE_SCHEME_TO_FLAG["Secp256k1"];
|
|
2871
|
+
}
|
|
2872
|
+
/**
|
|
2873
|
+
* Verifies that the signature is valid for for the provided message
|
|
2874
|
+
*/
|
|
2875
|
+
async verify(message, signature) {
|
|
2876
|
+
let bytes;
|
|
2877
|
+
if (typeof signature === "string") {
|
|
2878
|
+
const parsed = parseSerializedKeypairSignature(signature);
|
|
2879
|
+
if (parsed.signatureScheme !== "Secp256k1") throw new Error("Invalid signature scheme");
|
|
2880
|
+
if (!bytesEqual(this.toRawBytes(), parsed.publicKey)) throw new Error("Signature does not match public key");
|
|
2881
|
+
bytes = parsed.signature;
|
|
2882
|
+
} else bytes = signature;
|
|
2883
|
+
return secp256k1.verify(bytes, message, this.toRawBytes());
|
|
2884
|
+
}
|
|
2885
|
+
};
|
|
2886
|
+
|
|
2887
|
+
//#region src/keypairs/secp256r1/publickey.ts
|
|
2888
|
+
const SECP256R1_PUBLIC_KEY_SIZE = 33;
|
|
2889
|
+
/**
|
|
2890
|
+
* A Secp256r1 public key
|
|
2891
|
+
*/
|
|
2892
|
+
var Secp256r1PublicKey = class extends PublicKey {
|
|
2893
|
+
static {
|
|
2894
|
+
this.SIZE = SECP256R1_PUBLIC_KEY_SIZE;
|
|
2895
|
+
}
|
|
2896
|
+
/**
|
|
2897
|
+
* Create a new Secp256r1PublicKey object
|
|
2898
|
+
* @param value secp256r1 public key as buffer or base-64 encoded string
|
|
2899
|
+
*/
|
|
2900
|
+
constructor(value) {
|
|
2901
|
+
super();
|
|
2902
|
+
if (typeof value === "string") this.data = fromBase64(value);
|
|
2903
|
+
else if (value instanceof Uint8Array) this.data = value;
|
|
2904
|
+
else this.data = Uint8Array.from(value);
|
|
2905
|
+
if (this.data.length !== SECP256R1_PUBLIC_KEY_SIZE) throw new Error(`Invalid public key input. Expected ${SECP256R1_PUBLIC_KEY_SIZE} bytes, got ${this.data.length}`);
|
|
2906
|
+
}
|
|
2907
|
+
/**
|
|
2908
|
+
* Checks if two Secp256r1 public keys are equal
|
|
2909
|
+
*/
|
|
2910
|
+
equals(publicKey) {
|
|
2911
|
+
return super.equals(publicKey);
|
|
2912
|
+
}
|
|
2913
|
+
/**
|
|
2914
|
+
* Return the byte array representation of the Secp256r1 public key
|
|
2915
|
+
*/
|
|
2916
|
+
toRawBytes() {
|
|
2917
|
+
return this.data;
|
|
2918
|
+
}
|
|
2919
|
+
/**
|
|
2920
|
+
* Return the Sui address associated with this Secp256r1 public key
|
|
2921
|
+
*/
|
|
2922
|
+
flag() {
|
|
2923
|
+
return SIGNATURE_SCHEME_TO_FLAG["Secp256r1"];
|
|
2924
|
+
}
|
|
2925
|
+
/**
|
|
2926
|
+
* Verifies that the signature is valid for for the provided message
|
|
2927
|
+
*/
|
|
2928
|
+
async verify(message, signature) {
|
|
2929
|
+
let bytes;
|
|
2930
|
+
if (typeof signature === "string") {
|
|
2931
|
+
const parsed = parseSerializedSignature(signature);
|
|
2932
|
+
if (parsed.signatureScheme !== "Secp256r1") throw new Error("Invalid signature scheme");
|
|
2933
|
+
if (!bytesEqual(this.toRawBytes(), parsed.publicKey)) throw new Error("Signature does not match public key");
|
|
2934
|
+
bytes = parsed.signature;
|
|
2935
|
+
} else bytes = signature;
|
|
2936
|
+
return p256.verify(bytes, message, this.toRawBytes());
|
|
2937
|
+
}
|
|
2938
|
+
};
|
|
2939
|
+
|
|
2940
|
+
export { Ed25519PublicKey as E, SIGNATURE_FLAG_TO_SCHEME as S, SIGNATURE_SCHEME_TO_FLAG as a, bech32 as b, blake2b as c, toBase64 as d, toSerializedSignature as e, bcs as f, fromHex as g, createBase58check as h, Secp256k1PublicKey as i, Secp256r1PublicKey as j, fromBase64 as k, messageWithIntent as m, toHex as t };
|