mainnet-js 2.7.27 → 2.7.29

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.
@@ -92,9 +92,9 @@ eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harm
92
92
  /*!***********************!*\
93
93
  !*** ./src/config.ts ***!
94
94
  \***********************/
95
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
95
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
96
96
 
97
- eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Config\": () => (/* binding */ Config)\n/* harmony export */ });\n/* harmony import */ var _scure_bip39_wordlists_english__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @scure/bip39/wordlists/english */ \"../../node_modules/@scure/bip39/esm/wordlists/english.js\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant.js */ \"./src/constant.ts\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/crypto/default-crypto-instances.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/utf8.js\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_bitauth_libauth__WEBPACK_IMPORTED_MODULE_2__]);\n_bitauth_libauth__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];\n\n\n\nclass Config {\n // enforces all token-related methods to specify tokenaddr as recepient and change cashaddr\n static { this.EnforceCashTokenReceiptAddresses = false; }\n static { this.DefaultParentDerivationPath = \"m/44'/0'/0'\"; }\n static { this.DefaultIpfsGateway = \"https://dweb.link/ipfs/\"; }\n // default currency for balance and rate conversions\n static { this.DefaultCurrency = \"usd\"; }\n // caches the raw transactions in browser's local storage instead of memory\n static { this.UseLocalStorageCache = false; }\n // caches the raw transactions in browser's indexedDB instead of memory\n static { this.UseIndexedDBCache = false; }\n // caches the raw transactions in browser's memory\n static { this.UseMemoryCache = false; }\n static { this.DefaultWordlist = _scure_bip39_wordlists_english__WEBPACK_IMPORTED_MODULE_0__.wordlist; }\n static setIpfsGateway(ipfsGateway) {\n this.DefaultIpfsGateway = ipfsGateway;\n }\n static setWordlist(wordlist) {\n let checksum = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_1__.binToHex)(_bitauth_libauth__WEBPACK_IMPORTED_MODULE_2__.sha256.hash((0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.utf8ToBin)(wordlist.join(\" \"))));\n if (!Object.values(_constant_js__WEBPACK_IMPORTED_MODULE_4__.WORDLIST_CHECKSUMS).includes(checksum))\n throw Error(\"Error matching provided wordlist to a known list, see @scure/bip39/wordlists\");\n Config.DefaultWordlist = wordlist;\n }\n static getWordlist() {\n return [...Config.DefaultWordlist];\n }\n // custom exchange rate function\n static { this.GetExchangeRateFn = undefined; }\n}\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/config.ts?");
97
+ eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Config\": () => (/* binding */ Config)\n/* harmony export */ });\nclass Config {\n // enforces all token-related methods to specify tokenaddr as recepient and change cashaddr\n static { this.EnforceCashTokenReceiptAddresses = false; }\n static { this.DefaultParentDerivationPath = \"m/44'/0'/0'\"; }\n static { this.DefaultIpfsGateway = \"https://dweb.link/ipfs/\"; }\n // default currency for balance and rate conversions\n static { this.DefaultCurrency = \"usd\"; }\n // caches the raw transactions in browser's local storage instead of memory\n static { this.UseLocalStorageCache = false; }\n // caches the raw transactions in browser's indexedDB instead of memory\n static { this.UseIndexedDBCache = false; }\n // caches the raw transactions in browser's memory\n static { this.UseMemoryCache = false; }\n static setIpfsGateway(ipfsGateway) {\n this.DefaultIpfsGateway = ipfsGateway;\n }\n // custom exchange rate function\n static { this.GetExchangeRateFn = undefined; }\n}\n\n\n//# sourceURL=webpack://mainnet-js/./src/config.ts?");
98
98
 
99
99
  /***/ }),
100
100
 
@@ -104,7 +104,7 @@ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__
104
104
  \*************************/
105
105
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
106
106
 
107
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DELIMITER\": () => (/* binding */ DELIMITER),\n/* harmony export */ \"DERIVATION_PATHS\": () => (/* binding */ DERIVATION_PATHS),\n/* harmony export */ \"DUST_UTXO_THRESHOLD\": () => (/* binding */ DUST_UTXO_THRESHOLD),\n/* harmony export */ \"EXCHANGE_RATE_TTL\": () => (/* binding */ EXCHANGE_RATE_TTL),\n/* harmony export */ \"MEMPOOL_CHAIN_LIMIT\": () => (/* binding */ MEMPOOL_CHAIN_LIMIT),\n/* harmony export */ \"WORDLIST_CHECKSUMS\": () => (/* binding */ WORDLIST_CHECKSUMS)\n/* harmony export */ });\nconst DELIMITER = \":\";\n// Min amount utxo can be to be accepted by the network\nconst DUST_UTXO_THRESHOLD = 546;\n// Current chained tx limit\nconst MEMPOOL_CHAIN_LIMIT = 50;\n// time in milliseconds to cache the usd exchange rate\nconst EXCHANGE_RATE_TTL = 250000;\n// list of common derivation paths\n// a la: https://github.com/Electron-Cash/Electron-Cash/blob/1de24c509992cfebc22217a2a77c862c2b02bc54/electroncash_gui/qt/installwizard.py#L624\nconst DERIVATION_PATHS = [\n \"m/0\",\n \"m/0'\",\n \"m/0'/0\",\n \"m/0'/0'\",\n \"m/0'/0'/0'\",\n \"m/44'/0'/0'\",\n \"m/44'/0'/0'/0\",\n \"m/44'/145'/0'\",\n \"m/44'/145'/0'/0\",\n \"m/44'/245'/0\",\n \"m/44'/245'/0'\",\n \"m/44'/245'/0'/0\",\n];\nconst WORDLIST_CHECKSUMS = {\n czech: \"92e035ca0e3680fab85fa18b9e5c7e7582b3bd9caeb6d4bc8a2ecc8e492100c9\",\n english: \"f18b9a84c83e38e98eceb0102b275e26438af83ab08f080cdb780a2caa9f3a6d\",\n french: \"fd4cd57c8e86a99ac53cd0f21a6b89af366769b0143ac0d268ac7d7a39200145\",\n italian: \"d9664953fe4c49e0b40eb6f6378c421f5f01dc9360aaac6d2a3c294f046ef520\",\n japanese: \"e641781d89213031233ebc5130020c3de297cad96065ecc688d1c00e010ea71c\",\n korean: \"0c26059ed7ede977d7fa1c40443e71793e7850aa6a3d8aabf0cbcec91c1f95ec\",\n portuguese: \"85fea658f90c42c182823807a1d30db587abb72c14a3098e1a65f8b78d1ffcf4\",\n simplifiedChinese: \"a86e2bd870e228d19a887c9faae8c1374b4e624e85d2b245b59e36583cba4afc\",\n spanish: \"27e99ad4328299108663c19eb611310bd3b77260af852169108713019831d07d\",\n traditionalChinese: \"11ef479f2f44b6d4f7fb6239dff06e3cd7a1473b83df6cf91adcbbbee598acf6\",\n};\n\n\n//# sourceURL=webpack://mainnet-js/./src/constant.ts?");
107
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DELIMITER\": () => (/* binding */ DELIMITER),\n/* harmony export */ \"DERIVATION_PATHS\": () => (/* binding */ DERIVATION_PATHS),\n/* harmony export */ \"DUST_UTXO_THRESHOLD\": () => (/* binding */ DUST_UTXO_THRESHOLD),\n/* harmony export */ \"EXCHANGE_RATE_TTL\": () => (/* binding */ EXCHANGE_RATE_TTL),\n/* harmony export */ \"MEMPOOL_CHAIN_LIMIT\": () => (/* binding */ MEMPOOL_CHAIN_LIMIT)\n/* harmony export */ });\nconst DELIMITER = \":\";\n// Min amount utxo can be to be accepted by the network\nconst DUST_UTXO_THRESHOLD = 546;\n// Current chained tx limit\nconst MEMPOOL_CHAIN_LIMIT = 50;\n// time in milliseconds to cache the usd exchange rate\nconst EXCHANGE_RATE_TTL = 250000;\n// list of common derivation paths\n// a la: https://github.com/Electron-Cash/Electron-Cash/blob/1de24c509992cfebc22217a2a77c862c2b02bc54/electroncash_gui/qt/installwizard.py#L624\nconst DERIVATION_PATHS = [\n \"m/0\",\n \"m/0'\",\n \"m/0'/0\",\n \"m/0'/0'\",\n \"m/0'/0'/0'\",\n \"m/44'/0'/0'\",\n \"m/44'/0'/0'/0\",\n \"m/44'/145'/0'\",\n \"m/44'/145'/0'/0\",\n \"m/44'/245'/0\",\n \"m/44'/245'/0'\",\n \"m/44'/245'/0'/0\",\n];\n\n\n//# sourceURL=webpack://mainnet-js/./src/constant.ts?");
108
108
 
109
109
  /***/ }),
110
110
 
@@ -164,7 +164,7 @@ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__
164
164
  \**********************/
165
165
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
166
166
 
167
- eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BaseWallet\": () => (/* reexport safe */ _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__.BaseWallet),\n/* harmony export */ \"CONST\": () => (/* reexport module object */ _constant_js__WEBPACK_IMPORTED_MODULE_17__),\n/* harmony export */ \"Config\": () => (/* reexport safe */ _config_js__WEBPACK_IMPORTED_MODULE_10__.Config),\n/* harmony export */ \"Connection\": () => (/* reexport safe */ _network_index_js__WEBPACK_IMPORTED_MODULE_4__.Connection),\n/* harmony export */ \"DefaultProvider\": () => (/* reexport safe */ _network_configuration_js__WEBPACK_IMPORTED_MODULE_9__.DefaultProvider),\n/* harmony export */ \"ElectrumNetworkProvider\": () => (/* reexport safe */ _network_index_js__WEBPACK_IMPORTED_MODULE_4__.ElectrumNetworkProvider),\n/* harmony export */ \"ExchangeRate\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.ExchangeRate),\n/* harmony export */ \"FeePaidByEnum\": () => (/* reexport safe */ _wallet_enum_js__WEBPACK_IMPORTED_MODULE_12__.FeePaidByEnum),\n/* harmony export */ \"Mainnet\": () => (/* reexport module object */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__),\n/* harmony export */ \"NFTCapability\": () => (/* reexport safe */ _interface_js__WEBPACK_IMPORTED_MODULE_18__.NFTCapability),\n/* harmony export */ \"Network\": () => (/* reexport safe */ _interface_js__WEBPACK_IMPORTED_MODULE_18__.Network),\n/* harmony export */ \"NetworkType\": () => (/* reexport safe */ _enum_js__WEBPACK_IMPORTED_MODULE_11__.NetworkType),\n/* harmony export */ \"OpReturnData\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.OpReturnData),\n/* harmony export */ \"RegTestWallet\": () => (/* reexport safe */ _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__.RegTestWallet),\n/* harmony export */ \"RegTestWatchWallet\": () => (/* reexport safe */ _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__.RegTestWatchWallet),\n/* harmony export */ \"RegTestWifWallet\": () => (/* reexport safe */ _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__.RegTestWifWallet),\n/* harmony export */ \"RuntimePlatform\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.RuntimePlatform),\n/* harmony export */ \"SendRequest\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.SendRequest),\n/* harmony export */ \"SendResponse\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.SendResponse),\n/* harmony export */ \"SignedMessage\": () => (/* reexport safe */ _message_signed_js__WEBPACK_IMPORTED_MODULE_5__.SignedMessage),\n/* harmony export */ \"StorageProvider\": () => (/* reexport safe */ _db_index_js__WEBPACK_IMPORTED_MODULE_2__.StorageProvider),\n/* harmony export */ \"TestNetWallet\": () => (/* reexport safe */ _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__.TestNetWallet),\n/* harmony export */ \"TestNetWatchWallet\": () => (/* reexport safe */ _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__.TestNetWatchWallet),\n/* harmony export */ \"TestNetWifWallet\": () => (/* reexport safe */ _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__.TestNetWifWallet),\n/* harmony export */ \"TokenBurnRequest\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.TokenBurnRequest),\n/* harmony export */ \"TokenGenesisRequest\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.TokenGenesisRequest),\n/* harmony export */ \"TokenMintRequest\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.TokenMintRequest),\n/* harmony export */ \"TokenSendRequest\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.TokenSendRequest),\n/* harmony export */ \"UnitEnum\": () => (/* reexport safe */ _enum_js__WEBPACK_IMPORTED_MODULE_11__.UnitEnum),\n/* harmony export */ \"Wallet\": () => (/* reexport safe */ _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__.Wallet),\n/* harmony export */ \"WalletTypeEnum\": () => (/* reexport safe */ _wallet_enum_js__WEBPACK_IMPORTED_MODULE_12__.WalletTypeEnum),\n/* harmony export */ \"WatchWallet\": () => (/* reexport safe */ _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__.WatchWallet),\n/* harmony export */ \"WifWallet\": () => (/* reexport safe */ _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__.WifWallet),\n/* harmony export */ \"XPubKey\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.XPubKey),\n/* harmony export */ \"amountInSatoshi\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.amountInSatoshi),\n/* harmony export */ \"asSendRequestObject\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.asSendRequestObject),\n/* harmony export */ \"atob\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.atob),\n/* harmony export */ \"balanceFromSatoshi\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.balanceFromSatoshi),\n/* harmony export */ \"balanceResponseFromSatoshi\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.balanceResponseFromSatoshi),\n/* harmony export */ \"binToBase64\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.binToBase64),\n/* harmony export */ \"binToHex\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.binToHex),\n/* harmony export */ \"btoa\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.btoa),\n/* harmony export */ \"checkTokenaddr\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.checkTokenaddr),\n/* harmony export */ \"convert\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.convert),\n/* harmony export */ \"convertAddress\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.convertAddress),\n/* harmony export */ \"convertObject\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.convertObject),\n/* harmony export */ \"createWallet\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.createWallet),\n/* harmony export */ \"createWalletResponse\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.createWalletResponse),\n/* harmony export */ \"decodeHeader\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.decodeHeader),\n/* harmony export */ \"delay\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.delay),\n/* harmony export */ \"deriveCashaddr\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.deriveCashaddr),\n/* harmony export */ \"derivePublicKeyHash\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.derivePublicKeyHash),\n/* harmony export */ \"deriveTokenaddr\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.deriveTokenaddr),\n/* harmony export */ \"derivedNetwork\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.derivedNetwork),\n/* harmony export */ \"disconnectProviders\": () => (/* reexport safe */ _network_index_js__WEBPACK_IMPORTED_MODULE_4__.disconnectProviders),\n/* harmony export */ \"expect\": () => (/* reexport safe */ _test_expect_js__WEBPACK_IMPORTED_MODULE_1__.expect),\n/* harmony export */ \"fromUtxoId\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.fromUtxoId),\n/* harmony export */ \"getAddressHistory\": () => (/* reexport safe */ _history_electrumTransformer_js__WEBPACK_IMPORTED_MODULE_15__.getAddressHistory),\n/* harmony export */ \"getAddrsByXpubKey\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getAddrsByXpubKey),\n/* harmony export */ \"getAddrsByXpubKeyObject\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getAddrsByXpubKeyObject),\n/* harmony export */ \"getNamedWalletId\": () => (/* reexport safe */ _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__.getNamedWalletId),\n/* harmony export */ \"getNetworkProvider\": () => (/* reexport safe */ _network_index_js__WEBPACK_IMPORTED_MODULE_4__.getNetworkProvider),\n/* harmony export */ \"getRuntimePlatform\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getRuntimePlatform),\n/* harmony export */ \"getUsdRate\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getUsdRate),\n/* harmony export */ \"getWeakRandomInt\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getWeakRandomInt),\n/* harmony export */ \"getXPubKey\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getXPubKey),\n/* harmony export */ \"getXpubKeyInfo\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getXpubKeyInfo),\n/* harmony export */ \"getXpubKeyInfoObject\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getXpubKeyInfoObject),\n/* harmony export */ \"hash160\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.hash160),\n/* harmony export */ \"hexToBin\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.hexToBin),\n/* harmony export */ \"initProvider\": () => (/* reexport safe */ _network_index_js__WEBPACK_IMPORTED_MODULE_4__.initProvider),\n/* harmony export */ \"initProviders\": () => (/* reexport safe */ _network_index_js__WEBPACK_IMPORTED_MODULE_4__.initProviders),\n/* harmony export */ \"isTokenaddr\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.isTokenaddr),\n/* harmony export */ \"isValidAddress\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.isValidAddress),\n/* harmony export */ \"libauth\": () => (/* reexport module object */ _libauth_js__WEBPACK_IMPORTED_MODULE_16__),\n/* harmony export */ \"mine\": () => (/* reexport safe */ _mine_index_js__WEBPACK_IMPORTED_MODULE_3__.mine),\n/* harmony export */ \"namedWallet\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.namedWallet),\n/* harmony export */ \"namedWalletExists\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.namedWalletExists),\n/* harmony export */ \"removeFetchMock\": () => (/* reexport safe */ _test_fetch_js__WEBPACK_IMPORTED_MODULE_0__.removeFetchMock),\n/* harmony export */ \"replaceNamedWallet\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.replaceNamedWallet),\n/* harmony export */ \"sanitizeAddress\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.sanitizeAddress),\n/* harmony export */ \"sanitizeUnit\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.sanitizeUnit),\n/* harmony export */ \"setupFetchMock\": () => (/* reexport safe */ _test_fetch_js__WEBPACK_IMPORTED_MODULE_0__.setupFetchMock),\n/* harmony export */ \"sha256\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.sha256),\n/* harmony export */ \"sumTokenAmounts\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.sumTokenAmounts),\n/* harmony export */ \"sumUtxoValue\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.sumUtxoValue),\n/* harmony export */ \"toCashaddr\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.toCashaddr),\n/* harmony export */ \"toTokenaddr\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.toTokenaddr),\n/* harmony export */ \"toUtxoId\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.toUtxoId),\n/* harmony export */ \"utf8ToBin\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.utf8ToBin),\n/* harmony export */ \"walletClassMap\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.walletClassMap),\n/* harmony export */ \"walletFromId\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.walletFromId)\n/* harmony export */ });\n/* harmony import */ var _test_fetch_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./test/fetch.js */ \"./src/test/fetch.ts\");\n/* harmony import */ var _test_expect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./test/expect.js */ \"./src/test/expect.ts\");\n/* harmony import */ var _db_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./db/index.js */ \"./src/db/index.ts\");\n/* harmony import */ var _mine_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mine/index.js */ \"./src/mine/index.ts\");\n/* harmony import */ var _network_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./network/index.js */ \"./src/network/index.ts\");\n/* harmony import */ var _message_signed_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./message/signed.js */ \"./src/message/signed.ts\");\n/* harmony import */ var _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./wallet/Base.js */ \"./src/wallet/Base.ts\");\n/* harmony import */ var _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./wallet/Wif.js */ \"./src/wallet/Wif.ts\");\n/* harmony import */ var _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./wallet/createWallet.js */ \"./src/wallet/createWallet.ts\");\n/* harmony import */ var _network_configuration_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./network/configuration.js */ \"./src/network/configuration.ts\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./config.js */ \"./src/config.ts\");\n/* harmony import */ var _enum_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./enum.js */ \"./src/enum.ts\");\n/* harmony import */ var _wallet_enum_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./wallet/enum.js */ \"./src/wallet/enum.ts\");\n/* harmony import */ var _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./wallet/model.js */ \"./src/wallet/model.ts\");\n/* harmony import */ var _util_index_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./util/index.js */ \"./src/util/index.ts\");\n/* harmony import */ var _history_electrumTransformer_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./history/electrumTransformer.js */ \"./src/history/electrumTransformer.ts\");\n/* harmony import */ var _libauth_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./libauth.js */ \"./src/libauth.ts\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./constant.js */ \"./src/constant.ts\");\n/* harmony import */ var _interface_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./interface.js */ \"./src/interface.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_mine_index_js__WEBPACK_IMPORTED_MODULE_3__, _network_index_js__WEBPACK_IMPORTED_MODULE_4__, _message_signed_js__WEBPACK_IMPORTED_MODULE_5__, _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__, _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__, _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__, _network_configuration_js__WEBPACK_IMPORTED_MODULE_9__, _config_js__WEBPACK_IMPORTED_MODULE_10__, _enum_js__WEBPACK_IMPORTED_MODULE_11__, _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__, _util_index_js__WEBPACK_IMPORTED_MODULE_14__, _history_electrumTransformer_js__WEBPACK_IMPORTED_MODULE_15__, _libauth_js__WEBPACK_IMPORTED_MODULE_16__]);\n([_mine_index_js__WEBPACK_IMPORTED_MODULE_3__, _network_index_js__WEBPACK_IMPORTED_MODULE_4__, _message_signed_js__WEBPACK_IMPORTED_MODULE_5__, _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__, _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__, _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__, _network_configuration_js__WEBPACK_IMPORTED_MODULE_9__, _config_js__WEBPACK_IMPORTED_MODULE_10__, _enum_js__WEBPACK_IMPORTED_MODULE_11__, _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__, _util_index_js__WEBPACK_IMPORTED_MODULE_14__, _history_electrumTransformer_js__WEBPACK_IMPORTED_MODULE_15__, _libauth_js__WEBPACK_IMPORTED_MODULE_16__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n\n\n\n\n\n\n\n\n\n// provider\n\n// config\n\n// Enum\n\n\n// models\n\n// utils\n\n\n\n\n// libauth\n\n// constants\n\n\n// interfaces\n\n\n\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/index.ts?");
167
+ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BaseWallet\": () => (/* reexport safe */ _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__.BaseWallet),\n/* harmony export */ \"CONST\": () => (/* reexport module object */ _constant_js__WEBPACK_IMPORTED_MODULE_17__),\n/* harmony export */ \"Config\": () => (/* reexport safe */ _config_js__WEBPACK_IMPORTED_MODULE_10__.Config),\n/* harmony export */ \"Connection\": () => (/* reexport safe */ _network_index_js__WEBPACK_IMPORTED_MODULE_4__.Connection),\n/* harmony export */ \"DefaultProvider\": () => (/* reexport safe */ _network_configuration_js__WEBPACK_IMPORTED_MODULE_9__.DefaultProvider),\n/* harmony export */ \"ElectrumNetworkProvider\": () => (/* reexport safe */ _network_index_js__WEBPACK_IMPORTED_MODULE_4__.ElectrumNetworkProvider),\n/* harmony export */ \"ExchangeRate\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.ExchangeRate),\n/* harmony export */ \"FeePaidByEnum\": () => (/* reexport safe */ _wallet_enum_js__WEBPACK_IMPORTED_MODULE_12__.FeePaidByEnum),\n/* harmony export */ \"Mainnet\": () => (/* reexport module object */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__),\n/* harmony export */ \"NFTCapability\": () => (/* reexport safe */ _interface_js__WEBPACK_IMPORTED_MODULE_18__.NFTCapability),\n/* harmony export */ \"Network\": () => (/* reexport safe */ _interface_js__WEBPACK_IMPORTED_MODULE_18__.Network),\n/* harmony export */ \"NetworkType\": () => (/* reexport safe */ _enum_js__WEBPACK_IMPORTED_MODULE_11__.NetworkType),\n/* harmony export */ \"OpReturnData\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.OpReturnData),\n/* harmony export */ \"RegTestWallet\": () => (/* reexport safe */ _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__.RegTestWallet),\n/* harmony export */ \"RegTestWatchWallet\": () => (/* reexport safe */ _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__.RegTestWatchWallet),\n/* harmony export */ \"RegTestWifWallet\": () => (/* reexport safe */ _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__.RegTestWifWallet),\n/* harmony export */ \"RuntimePlatform\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.RuntimePlatform),\n/* harmony export */ \"SendRequest\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.SendRequest),\n/* harmony export */ \"SendResponse\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.SendResponse),\n/* harmony export */ \"SignedMessage\": () => (/* reexport safe */ _message_signed_js__WEBPACK_IMPORTED_MODULE_5__.SignedMessage),\n/* harmony export */ \"StorageProvider\": () => (/* reexport safe */ _db_index_js__WEBPACK_IMPORTED_MODULE_2__.StorageProvider),\n/* harmony export */ \"TestNetWallet\": () => (/* reexport safe */ _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__.TestNetWallet),\n/* harmony export */ \"TestNetWatchWallet\": () => (/* reexport safe */ _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__.TestNetWatchWallet),\n/* harmony export */ \"TestNetWifWallet\": () => (/* reexport safe */ _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__.TestNetWifWallet),\n/* harmony export */ \"TokenBurnRequest\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.TokenBurnRequest),\n/* harmony export */ \"TokenGenesisRequest\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.TokenGenesisRequest),\n/* harmony export */ \"TokenMintRequest\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.TokenMintRequest),\n/* harmony export */ \"TokenSendRequest\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.TokenSendRequest),\n/* harmony export */ \"UnitEnum\": () => (/* reexport safe */ _enum_js__WEBPACK_IMPORTED_MODULE_11__.UnitEnum),\n/* harmony export */ \"Wallet\": () => (/* reexport safe */ _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__.Wallet),\n/* harmony export */ \"WalletTypeEnum\": () => (/* reexport safe */ _wallet_enum_js__WEBPACK_IMPORTED_MODULE_12__.WalletTypeEnum),\n/* harmony export */ \"WatchWallet\": () => (/* reexport safe */ _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__.WatchWallet),\n/* harmony export */ \"WifWallet\": () => (/* reexport safe */ _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__.WifWallet),\n/* harmony export */ \"XPubKey\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.XPubKey),\n/* harmony export */ \"amountInSatoshi\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.amountInSatoshi),\n/* harmony export */ \"asSendRequestObject\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.asSendRequestObject),\n/* harmony export */ \"atob\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.atob),\n/* harmony export */ \"balanceFromSatoshi\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.balanceFromSatoshi),\n/* harmony export */ \"balanceResponseFromSatoshi\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.balanceResponseFromSatoshi),\n/* harmony export */ \"binToBase64\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.binToBase64),\n/* harmony export */ \"binToHex\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.binToHex),\n/* harmony export */ \"btoa\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.btoa),\n/* harmony export */ \"checkTokenaddr\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.checkTokenaddr),\n/* harmony export */ \"convert\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.convert),\n/* harmony export */ \"convertAddress\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.convertAddress),\n/* harmony export */ \"convertObject\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.convertObject),\n/* harmony export */ \"createWallet\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.createWallet),\n/* harmony export */ \"createWalletResponse\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.createWalletResponse),\n/* harmony export */ \"decodeHeader\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.decodeHeader),\n/* harmony export */ \"delay\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.delay),\n/* harmony export */ \"deriveCashaddr\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.deriveCashaddr),\n/* harmony export */ \"derivePublicKeyHash\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.derivePublicKeyHash),\n/* harmony export */ \"deriveTokenaddr\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.deriveTokenaddr),\n/* harmony export */ \"derivedNetwork\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.derivedNetwork),\n/* harmony export */ \"disconnectProviders\": () => (/* reexport safe */ _network_index_js__WEBPACK_IMPORTED_MODULE_4__.disconnectProviders),\n/* harmony export */ \"expect\": () => (/* reexport safe */ _test_expect_js__WEBPACK_IMPORTED_MODULE_1__.expect),\n/* harmony export */ \"fromUtxoId\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.fromUtxoId),\n/* harmony export */ \"getAddressHistory\": () => (/* reexport safe */ _history_electrumTransformer_js__WEBPACK_IMPORTED_MODULE_15__.getAddressHistory),\n/* harmony export */ \"getAddrsByXpubKey\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getAddrsByXpubKey),\n/* harmony export */ \"getAddrsByXpubKeyObject\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getAddrsByXpubKeyObject),\n/* harmony export */ \"getNamedWalletId\": () => (/* reexport safe */ _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__.getNamedWalletId),\n/* harmony export */ \"getNetworkProvider\": () => (/* reexport safe */ _network_index_js__WEBPACK_IMPORTED_MODULE_4__.getNetworkProvider),\n/* harmony export */ \"getRuntimePlatform\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getRuntimePlatform),\n/* harmony export */ \"getUsdRate\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getUsdRate),\n/* harmony export */ \"getWeakRandomInt\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getWeakRandomInt),\n/* harmony export */ \"getXPubKey\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getXPubKey),\n/* harmony export */ \"getXpubKeyInfo\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getXpubKeyInfo),\n/* harmony export */ \"getXpubKeyInfoObject\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.getXpubKeyInfoObject),\n/* harmony export */ \"hash160\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.hash160),\n/* harmony export */ \"hexToBin\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.hexToBin),\n/* harmony export */ \"initProvider\": () => (/* reexport safe */ _network_index_js__WEBPACK_IMPORTED_MODULE_4__.initProvider),\n/* harmony export */ \"initProviders\": () => (/* reexport safe */ _network_index_js__WEBPACK_IMPORTED_MODULE_4__.initProviders),\n/* harmony export */ \"isTokenaddr\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.isTokenaddr),\n/* harmony export */ \"isValidAddress\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.isValidAddress),\n/* harmony export */ \"libauth\": () => (/* reexport module object */ _libauth_js__WEBPACK_IMPORTED_MODULE_16__),\n/* harmony export */ \"mine\": () => (/* reexport safe */ _mine_index_js__WEBPACK_IMPORTED_MODULE_3__.mine),\n/* harmony export */ \"namedWallet\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.namedWallet),\n/* harmony export */ \"namedWalletExists\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.namedWalletExists),\n/* harmony export */ \"removeFetchMock\": () => (/* reexport safe */ _test_fetch_js__WEBPACK_IMPORTED_MODULE_0__.removeFetchMock),\n/* harmony export */ \"replaceNamedWallet\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.replaceNamedWallet),\n/* harmony export */ \"sanitizeAddress\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.sanitizeAddress),\n/* harmony export */ \"sanitizeUnit\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.sanitizeUnit),\n/* harmony export */ \"setupFetchMock\": () => (/* reexport safe */ _test_fetch_js__WEBPACK_IMPORTED_MODULE_0__.setupFetchMock),\n/* harmony export */ \"sha256\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.sha256),\n/* harmony export */ \"sumTokenAmounts\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.sumTokenAmounts),\n/* harmony export */ \"sumUtxoValue\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.sumUtxoValue),\n/* harmony export */ \"toCashaddr\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.toCashaddr),\n/* harmony export */ \"toTokenaddr\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.toTokenaddr),\n/* harmony export */ \"toUtxoId\": () => (/* reexport safe */ _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__.toUtxoId),\n/* harmony export */ \"utf8ToBin\": () => (/* reexport safe */ _util_index_js__WEBPACK_IMPORTED_MODULE_14__.utf8ToBin),\n/* harmony export */ \"walletClassMap\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.walletClassMap),\n/* harmony export */ \"walletFromId\": () => (/* reexport safe */ _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__.walletFromId)\n/* harmony export */ });\n/* harmony import */ var _test_fetch_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./test/fetch.js */ \"./src/test/fetch.ts\");\n/* harmony import */ var _test_expect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./test/expect.js */ \"./src/test/expect.ts\");\n/* harmony import */ var _db_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./db/index.js */ \"./src/db/index.ts\");\n/* harmony import */ var _mine_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mine/index.js */ \"./src/mine/index.ts\");\n/* harmony import */ var _network_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./network/index.js */ \"./src/network/index.ts\");\n/* harmony import */ var _message_signed_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./message/signed.js */ \"./src/message/signed.ts\");\n/* harmony import */ var _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./wallet/Base.js */ \"./src/wallet/Base.ts\");\n/* harmony import */ var _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./wallet/Wif.js */ \"./src/wallet/Wif.ts\");\n/* harmony import */ var _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./wallet/createWallet.js */ \"./src/wallet/createWallet.ts\");\n/* harmony import */ var _network_configuration_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./network/configuration.js */ \"./src/network/configuration.ts\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./config.js */ \"./src/config.ts\");\n/* harmony import */ var _enum_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./enum.js */ \"./src/enum.ts\");\n/* harmony import */ var _wallet_enum_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./wallet/enum.js */ \"./src/wallet/enum.ts\");\n/* harmony import */ var _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./wallet/model.js */ \"./src/wallet/model.ts\");\n/* harmony import */ var _util_index_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./util/index.js */ \"./src/util/index.ts\");\n/* harmony import */ var _history_electrumTransformer_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./history/electrumTransformer.js */ \"./src/history/electrumTransformer.ts\");\n/* harmony import */ var _libauth_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./libauth.js */ \"./src/libauth.ts\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./constant.js */ \"./src/constant.ts\");\n/* harmony import */ var _interface_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./interface.js */ \"./src/interface.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_mine_index_js__WEBPACK_IMPORTED_MODULE_3__, _network_index_js__WEBPACK_IMPORTED_MODULE_4__, _message_signed_js__WEBPACK_IMPORTED_MODULE_5__, _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__, _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__, _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__, _network_configuration_js__WEBPACK_IMPORTED_MODULE_9__, _enum_js__WEBPACK_IMPORTED_MODULE_11__, _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__, _util_index_js__WEBPACK_IMPORTED_MODULE_14__, _history_electrumTransformer_js__WEBPACK_IMPORTED_MODULE_15__, _libauth_js__WEBPACK_IMPORTED_MODULE_16__]);\n([_mine_index_js__WEBPACK_IMPORTED_MODULE_3__, _network_index_js__WEBPACK_IMPORTED_MODULE_4__, _message_signed_js__WEBPACK_IMPORTED_MODULE_5__, _wallet_Base_js__WEBPACK_IMPORTED_MODULE_6__, _wallet_Wif_js__WEBPACK_IMPORTED_MODULE_7__, _wallet_createWallet_js__WEBPACK_IMPORTED_MODULE_8__, _network_configuration_js__WEBPACK_IMPORTED_MODULE_9__, _enum_js__WEBPACK_IMPORTED_MODULE_11__, _wallet_model_js__WEBPACK_IMPORTED_MODULE_13__, _util_index_js__WEBPACK_IMPORTED_MODULE_14__, _history_electrumTransformer_js__WEBPACK_IMPORTED_MODULE_15__, _libauth_js__WEBPACK_IMPORTED_MODULE_16__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n\n\n\n\n\n\n\n\n\n// provider\n\n// config\n\n// Enum\n\n\n// models\n\n// utils\n\n\n\n\n// libauth\n\n// constants\n\n\n// interfaces\n\n\n\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/index.ts?");
168
168
 
169
169
  /***/ }),
170
170
 
@@ -234,7 +234,7 @@ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__
234
234
  \************************************************/
235
235
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
236
236
 
237
- eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ElectrumNetworkProvider)\n/* harmony export */ });\n/* harmony import */ var _electrum_cash_network__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @electrum-cash/network */ \"../../node_modules/@electrum-cash/network/dist/index.mjs\");\n/* harmony import */ var _interface_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../interface.js */ \"./src/interface.ts\");\n/* harmony import */ var _util_transaction_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../util/transaction.js */ \"./src/util/transaction.ts\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config.js */ \"./src/config.ts\");\n/* harmony import */ var _util_header_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/header.js */ \"./src/util/header.ts\");\n/* harmony import */ var _cache_IndexedDbCache_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../cache/IndexedDbCache.js */ \"./src/cache/IndexedDbCache.ts\");\n/* harmony import */ var _cache_WebStorageCache_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../cache/WebStorageCache.js */ \"./src/cache/WebStorageCache.ts\");\n/* harmony import */ var _cache_MemoryCache_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cache/MemoryCache.js */ \"./src/cache/MemoryCache.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_config_js__WEBPACK_IMPORTED_MODULE_1__, _util_header_js__WEBPACK_IMPORTED_MODULE_6__, _util_transaction_js__WEBPACK_IMPORTED_MODULE_7__]);\n([_config_js__WEBPACK_IMPORTED_MODULE_1__, _util_header_js__WEBPACK_IMPORTED_MODULE_6__, _util_transaction_js__WEBPACK_IMPORTED_MODULE_7__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n\n\n\n\n\n\n\n\nclass ElectrumNetworkProvider {\n get cache() {\n if (!_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.UseMemoryCache &&\n !_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.UseLocalStorageCache &&\n !_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.UseIndexedDBCache) {\n this._cache = undefined;\n return this._cache;\n }\n if (_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.UseMemoryCache && !(this._cache instanceof _cache_MemoryCache_js__WEBPACK_IMPORTED_MODULE_2__.MemoryCache)) {\n this._cache = new _cache_IndexedDbCache_js__WEBPACK_IMPORTED_MODULE_3__.IndexedDbCache();\n return this._cache;\n }\n if (_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.UseLocalStorageCache &&\n !(this._cache instanceof _cache_WebStorageCache_js__WEBPACK_IMPORTED_MODULE_4__.WebStorageCache)) {\n this._cache = new _cache_WebStorageCache_js__WEBPACK_IMPORTED_MODULE_4__.WebStorageCache();\n return this._cache;\n }\n if (_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.UseIndexedDBCache && !(this._cache instanceof _cache_IndexedDbCache_js__WEBPACK_IMPORTED_MODULE_3__.IndexedDbCache)) {\n this._cache = new _cache_IndexedDbCache_js__WEBPACK_IMPORTED_MODULE_3__.IndexedDbCache();\n return this._cache;\n }\n return this._cache;\n }\n constructor(electrum, network = _interface_js__WEBPACK_IMPORTED_MODULE_5__.Network.MAINNET, manualConnectionManagement) {\n this.network = network;\n this.manualConnectionManagement = manualConnectionManagement;\n this.subscriptions = 0;\n this.subscribedToHeaders = false;\n this.subscriptionMap = {};\n if (electrum) {\n this.electrum = electrum;\n }\n else {\n throw new Error(`A electrum-cash client is required.`);\n }\n }\n async getUtxos(cashaddr) {\n const result = await this.performRequest(\"blockchain.address.listunspent\", cashaddr, \"include_tokens\");\n return result.map((utxo) => ({\n txid: utxo.tx_hash,\n vout: utxo.tx_pos,\n satoshis: utxo.value,\n height: utxo.height,\n token: utxo.token_data\n ? {\n amount: BigInt(utxo.token_data.amount),\n tokenId: utxo.token_data.category,\n capability: utxo.token_data.nft?.capability,\n commitment: utxo.token_data.nft?.commitment,\n }\n : undefined,\n }));\n }\n async getBalance(cashaddr) {\n const result = await this.performRequest(\"blockchain.address.get_balance\", cashaddr);\n return result.confirmed + result.unconfirmed;\n }\n async getHeader(height, verbose = false) {\n const key = `header-${this.network}-${height}-${verbose}`;\n if (this.cache) {\n const cached = await this.cache.getItem(key);\n if (cached) {\n return verbose ? (0,_util_header_js__WEBPACK_IMPORTED_MODULE_6__.decodeHeader)(JSON.parse(cached)) : JSON.parse(cached);\n }\n }\n const result = await this.performRequest(\"blockchain.header.get\", height);\n if (this.cache) {\n await this.cache.setItem(key, JSON.stringify(result));\n }\n return verbose ? (0,_util_header_js__WEBPACK_IMPORTED_MODULE_6__.decodeHeader)(result) : result;\n }\n async getBlockHeight() {\n return (await this.performRequest(\"blockchain.headers.get_tip\"))\n .height;\n }\n async getRawTransaction(txHash, verbose = false, loadInputValues = false) {\n const key = `tx-${this.network}-${txHash}-${verbose}-${loadInputValues}`;\n if (this.cache) {\n const cached = await this.cache.getItem(key);\n if (cached) {\n return verbose ? JSON.parse(cached) : cached;\n }\n }\n try {\n const transaction = (await this.performRequest(\"blockchain.transaction.get\", txHash, verbose));\n if (this.cache) {\n await this.cache.setItem(key, verbose\n ? JSON.stringify(transaction)\n : transaction);\n }\n if (verbose && loadInputValues) {\n // get unique transaction hashes\n const hashes = [...new Set(transaction.vin.map((val) => val.txid))];\n const transactions = await Promise.all(hashes.map((hash) => this.getRawTransactionObject(hash, false)));\n const transactionMap = new Map();\n transactions.forEach((val) => transactionMap.set(val.hash, val));\n transaction.vin.forEach((input) => {\n const output = transactionMap\n .get(input.txid)\n .vout.find((val) => val.n === input.vout);\n input.address = output.scriptPubKey.addresses[0];\n input.value = output.value;\n input.tokenData = output.tokenData;\n });\n }\n return transaction;\n }\n catch (error) {\n if (error.message.indexOf(\"No such mempool or blockchain transaction.\") > -1)\n throw Error(`Could not decode transaction ${txHash}. It might not exist on the current blockchain (${this.network}).`);\n else\n throw error;\n }\n }\n // gets the decoded transaction in human readable form\n async getRawTransactionObject(txHash, loadInputValues = false) {\n return (await this.getRawTransaction(txHash, true, loadInputValues));\n }\n async sendRawTransaction(txHex, awaitPropagation = true) {\n return new Promise(async (resolve, reject) => {\n let txHash = await (0,_util_transaction_js__WEBPACK_IMPORTED_MODULE_7__.getTransactionHash)(txHex);\n if (!awaitPropagation) {\n this.performRequest(\"blockchain.transaction.broadcast\", txHex);\n resolve(txHash);\n }\n else {\n let cancel;\n const waitForTransactionCallback = async (data) => {\n if (data && data[0] === txHash && data[1] !== null) {\n await cancel?.();\n resolve(txHash);\n }\n };\n cancel = await this.subscribeToTransaction(txHash, waitForTransactionCallback);\n this.performRequest(\"blockchain.transaction.broadcast\", txHex).catch(async (error) => {\n await cancel?.();\n reject(error);\n });\n }\n });\n }\n // Get transaction history of a given cashaddr\n async getHistory(cashaddr, fromHeight = 0, toHeight = -1) {\n const result = await this.performRequest(\"blockchain.address.get_history\", cashaddr, fromHeight, toHeight);\n return result;\n }\n // Get the minimum fee a low-priority transaction must pay in order to be accepted to the daemon's memory pool.\n async getRelayFee() {\n const result = (await this.performRequest(\"blockchain.relayfee\"));\n return result;\n }\n async watchAddressStatus(cashaddr, callback) {\n const watchAddressStatusCallback = async (data) => {\n // subscription acknowledgement is the latest known status or null if no status is known\n // status is an array: [ cashaddr, statusHash ]\n if (data instanceof Array) {\n const addr = data[0];\n if (addr !== cashaddr) {\n return;\n }\n const status = data[1];\n callback(status);\n }\n };\n return this.subscribeToAddress(cashaddr, watchAddressStatusCallback);\n }\n async watchAddress(cashaddr, callback) {\n const historyMap = {};\n this.getHistory(cashaddr).then((history) => history.forEach((val) => (historyMap[val.tx_hash] = true)));\n const watchAddressStatusCallback = async () => {\n const newHistory = await this.getHistory(cashaddr);\n // sort history to put unconfirmed transactions in the beginning, then transactions in block height descenting order\n const txHashes = newHistory\n .sort((a, b) => a.height <= 0 || b.height <= 0 ? -1 : b.height - a.height)\n .map((val) => val.tx_hash);\n for (const hash of txHashes) {\n if (!(hash in historyMap)) {\n historyMap[hash] = true;\n callback(hash);\n // exit early to prevent further map lookups\n break;\n }\n }\n };\n return this.watchAddressStatus(cashaddr, watchAddressStatusCallback);\n }\n async watchAddressTransactions(cashaddr, callback) {\n return this.watchAddress(cashaddr, async (txHash) => {\n const tx = await this.getRawTransactionObject(txHash);\n callback(tx);\n });\n }\n async watchAddressTokenTransactions(cashaddr, callback) {\n return this.watchAddress(cashaddr, async (txHash) => {\n const tx = await this.getRawTransactionObject(txHash, true);\n if (tx.vin.some((val) => val.tokenData) ||\n tx.vout.some((val) => val.tokenData)) {\n callback(tx);\n }\n });\n }\n // watch for block headers and block height, if `skipCurrentHeight` is set, the notification about current block will not arrive\n async watchBlocks(callback, skipCurrentHeight = true) {\n let acknowledged = !skipCurrentHeight;\n const waitForBlockCallback = (_header) => {\n if (!acknowledged) {\n acknowledged = true;\n return;\n }\n _header = _header instanceof Array ? _header[0] : _header;\n callback(_header);\n };\n return this.subscribeToHeaders(waitForBlockCallback);\n }\n // Wait for the next block or a block at given blockchain height.\n async waitForBlock(height) {\n return new Promise(async (resolve) => {\n let cancelWatch;\n if (this.electrum.chainHeight && !height) {\n height = this.electrum.chainHeight + 1;\n }\n cancelWatch = await this.watchBlocks(async (header) => {\n if (!height) {\n height = header.height + 1;\n return;\n }\n if (header.height >= height) {\n await cancelWatch?.();\n resolve(header);\n return;\n }\n });\n });\n }\n // subscribe to notifications sent when new block is found, the block header is sent to callback\n async subscribeToHeaders(callback) {\n return this.subscribeRequest(\"blockchain.headers.subscribe\", callback);\n }\n async subscribeToAddress(cashaddr, callback) {\n return this.subscribeRequest(\"blockchain.address.subscribe\", callback, cashaddr);\n }\n async subscribeToTransaction(txHash, callback) {\n return this.subscribeRequest(\"blockchain.transaction.subscribe\", callback, txHash);\n }\n async performRequest(name, ...parameters) {\n await this.ready();\n const requestTimeout = new Promise(function (_resolve, reject) {\n setTimeout(function () {\n reject(\"electrum-cash request timed out, retrying\");\n }, 30000);\n }).catch(function (e) {\n throw e;\n });\n const request = this.electrum.request(name, ...parameters);\n return await Promise.race([request, requestTimeout])\n .then((value) => {\n if (value instanceof Error)\n throw value;\n let result = value;\n return result;\n })\n .catch(async () => {\n return await Promise.race([request, requestTimeout])\n .then((value) => {\n if (value instanceof Error)\n throw value;\n let result = value;\n return result;\n })\n .catch(function (e) {\n throw e;\n });\n });\n }\n async trackSubscription(methodName, ...parameters) {\n const key = `${methodName}-${this.network}-${JSON.stringify(parameters)}`;\n if (this.subscriptionMap[key]) {\n this.subscriptionMap[key]++;\n }\n else {\n this.subscriptionMap[key] = 1;\n }\n await this.electrum.subscribe(methodName, ...parameters);\n }\n async untrackSubscription(methodName, ...parameters) {\n const key = `${methodName}-${this.network}-${JSON.stringify(parameters)}`;\n if (this.subscriptionMap[key]) {\n this.subscriptionMap[key]--;\n if (this.subscriptionMap[key] <= 0) {\n // only really unsubscribe if there are no more subscriptions for this `key`\n delete this.subscriptionMap[key];\n try {\n await this.electrum.unsubscribe(methodName, ...parameters);\n }\n catch { }\n }\n }\n }\n async subscribeRequest(methodName, callback, ...parameters) {\n await this.ready();\n const handler = (data) => {\n if (data.method === methodName) {\n callback(data.params);\n }\n };\n this.electrum.on(\"notification\", handler);\n // safeguard against multiple subscriptions to headers\n if (methodName === \"blockhain.headers.subscribe\") {\n if (!this.subscribedToHeaders) {\n this.subscribedToHeaders = true;\n await this.trackSubscription(methodName, ...parameters);\n }\n }\n else {\n await this.trackSubscription(methodName, ...parameters);\n }\n this.subscriptions++;\n return async () => {\n this.electrum.off(\"notification\", handler);\n this.subscriptions--;\n // there are no blockchain.headers.unsubscribe method, so let's safeguard against it\n if (methodName !== \"blockchain.headers.subscribe\") {\n await this.untrackSubscription(methodName, ...parameters);\n }\n };\n }\n async ready() {\n return this.connect();\n }\n async connect() {\n await this.cache?.init();\n if (this.electrum.status !== _electrum_cash_network__WEBPACK_IMPORTED_MODULE_0__.ConnectionStatus.CONNECTED) {\n await this.electrum.connect();\n }\n }\n disconnect() {\n if (this.subscriptions > 0) {\n // console.warn(\n // `Trying to disconnect a network provider with ${this.subscriptions} active subscriptions. This is in most cases a bad idea.`\n // );\n }\n return this.electrum.disconnect(true, false);\n }\n}\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/network/ElectrumNetworkProvider.ts?");
237
+ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ ElectrumNetworkProvider)\n/* harmony export */ });\n/* harmony import */ var _electrum_cash_network__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @electrum-cash/network */ \"../../node_modules/@electrum-cash/network/dist/index.mjs\");\n/* harmony import */ var _interface_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../interface.js */ \"./src/interface.ts\");\n/* harmony import */ var _util_transaction_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../util/transaction.js */ \"./src/util/transaction.ts\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config.js */ \"./src/config.ts\");\n/* harmony import */ var _util_header_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/header.js */ \"./src/util/header.ts\");\n/* harmony import */ var _cache_IndexedDbCache_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../cache/IndexedDbCache.js */ \"./src/cache/IndexedDbCache.ts\");\n/* harmony import */ var _cache_WebStorageCache_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../cache/WebStorageCache.js */ \"./src/cache/WebStorageCache.ts\");\n/* harmony import */ var _cache_MemoryCache_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cache/MemoryCache.js */ \"./src/cache/MemoryCache.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_util_header_js__WEBPACK_IMPORTED_MODULE_6__, _util_transaction_js__WEBPACK_IMPORTED_MODULE_7__]);\n([_util_header_js__WEBPACK_IMPORTED_MODULE_6__, _util_transaction_js__WEBPACK_IMPORTED_MODULE_7__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n\n\n\n\n\n\n\n\nclass ElectrumNetworkProvider {\n get cache() {\n if (!_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.UseMemoryCache &&\n !_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.UseLocalStorageCache &&\n !_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.UseIndexedDBCache) {\n this._cache = undefined;\n return this._cache;\n }\n if (_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.UseMemoryCache && !(this._cache instanceof _cache_MemoryCache_js__WEBPACK_IMPORTED_MODULE_2__.MemoryCache)) {\n this._cache = new _cache_IndexedDbCache_js__WEBPACK_IMPORTED_MODULE_3__.IndexedDbCache();\n return this._cache;\n }\n if (_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.UseLocalStorageCache &&\n !(this._cache instanceof _cache_WebStorageCache_js__WEBPACK_IMPORTED_MODULE_4__.WebStorageCache)) {\n this._cache = new _cache_WebStorageCache_js__WEBPACK_IMPORTED_MODULE_4__.WebStorageCache();\n return this._cache;\n }\n if (_config_js__WEBPACK_IMPORTED_MODULE_1__.Config.UseIndexedDBCache && !(this._cache instanceof _cache_IndexedDbCache_js__WEBPACK_IMPORTED_MODULE_3__.IndexedDbCache)) {\n this._cache = new _cache_IndexedDbCache_js__WEBPACK_IMPORTED_MODULE_3__.IndexedDbCache();\n return this._cache;\n }\n return this._cache;\n }\n constructor(electrum, network = _interface_js__WEBPACK_IMPORTED_MODULE_5__.Network.MAINNET, manualConnectionManagement) {\n this.network = network;\n this.manualConnectionManagement = manualConnectionManagement;\n this.subscriptions = 0;\n this.subscribedToHeaders = false;\n this.subscriptionMap = {};\n if (electrum) {\n this.electrum = electrum;\n }\n else {\n throw new Error(`A electrum-cash client is required.`);\n }\n }\n async getUtxos(cashaddr) {\n const result = await this.performRequest(\"blockchain.address.listunspent\", cashaddr, \"include_tokens\");\n return result.map((utxo) => ({\n txid: utxo.tx_hash,\n vout: utxo.tx_pos,\n satoshis: utxo.value,\n height: utxo.height,\n token: utxo.token_data\n ? {\n amount: BigInt(utxo.token_data.amount),\n tokenId: utxo.token_data.category,\n capability: utxo.token_data.nft?.capability,\n commitment: utxo.token_data.nft?.commitment,\n }\n : undefined,\n }));\n }\n async getBalance(cashaddr) {\n const result = await this.performRequest(\"blockchain.address.get_balance\", cashaddr);\n return result.confirmed + result.unconfirmed;\n }\n async getHeader(height, verbose = false) {\n const key = `header-${this.network}-${height}-${verbose}`;\n if (this.cache) {\n const cached = await this.cache.getItem(key);\n if (cached) {\n return verbose ? (0,_util_header_js__WEBPACK_IMPORTED_MODULE_6__.decodeHeader)(JSON.parse(cached)) : JSON.parse(cached);\n }\n }\n const result = await this.performRequest(\"blockchain.header.get\", height);\n if (this.cache) {\n await this.cache.setItem(key, JSON.stringify(result));\n }\n return verbose ? (0,_util_header_js__WEBPACK_IMPORTED_MODULE_6__.decodeHeader)(result) : result;\n }\n async getBlockHeight() {\n return (await this.performRequest(\"blockchain.headers.get_tip\"))\n .height;\n }\n async getRawTransaction(txHash, verbose = false, loadInputValues = false) {\n const key = `tx-${this.network}-${txHash}-${verbose}-${loadInputValues}`;\n if (this.cache) {\n const cached = await this.cache.getItem(key);\n if (cached) {\n return verbose ? JSON.parse(cached) : cached;\n }\n }\n try {\n const transaction = (await this.performRequest(\"blockchain.transaction.get\", txHash, verbose));\n if (this.cache) {\n await this.cache.setItem(key, verbose\n ? JSON.stringify(transaction)\n : transaction);\n }\n if (verbose && loadInputValues) {\n // get unique transaction hashes\n const hashes = [...new Set(transaction.vin.map((val) => val.txid))];\n const transactions = await Promise.all(hashes.map((hash) => this.getRawTransactionObject(hash, false)));\n const transactionMap = new Map();\n transactions.forEach((val) => transactionMap.set(val.hash, val));\n transaction.vin.forEach((input) => {\n const output = transactionMap\n .get(input.txid)\n .vout.find((val) => val.n === input.vout);\n input.address = output.scriptPubKey.addresses[0];\n input.value = output.value;\n input.tokenData = output.tokenData;\n });\n }\n return transaction;\n }\n catch (error) {\n if (error.message.indexOf(\"No such mempool or blockchain transaction.\") > -1)\n throw Error(`Could not decode transaction ${txHash}. It might not exist on the current blockchain (${this.network}).`);\n else\n throw error;\n }\n }\n // gets the decoded transaction in human readable form\n async getRawTransactionObject(txHash, loadInputValues = false) {\n return (await this.getRawTransaction(txHash, true, loadInputValues));\n }\n async sendRawTransaction(txHex, awaitPropagation = true) {\n return new Promise(async (resolve, reject) => {\n let txHash = await (0,_util_transaction_js__WEBPACK_IMPORTED_MODULE_7__.getTransactionHash)(txHex);\n if (!awaitPropagation) {\n this.performRequest(\"blockchain.transaction.broadcast\", txHex);\n resolve(txHash);\n }\n else {\n let cancel;\n const waitForTransactionCallback = async (data) => {\n if (data && data[0] === txHash && data[1] !== null) {\n await cancel?.();\n resolve(txHash);\n }\n };\n cancel = await this.subscribeToTransaction(txHash, waitForTransactionCallback);\n this.performRequest(\"blockchain.transaction.broadcast\", txHex).catch(async (error) => {\n await cancel?.();\n reject(error);\n });\n }\n });\n }\n // Get transaction history of a given cashaddr\n async getHistory(cashaddr, fromHeight = 0, toHeight = -1) {\n const result = await this.performRequest(\"blockchain.address.get_history\", cashaddr, fromHeight, toHeight);\n return result;\n }\n // Get the minimum fee a low-priority transaction must pay in order to be accepted to the daemon's memory pool.\n async getRelayFee() {\n const result = (await this.performRequest(\"blockchain.relayfee\"));\n return result;\n }\n async watchAddressStatus(cashaddr, callback) {\n const watchAddressStatusCallback = async (data) => {\n // subscription acknowledgement is the latest known status or null if no status is known\n // status is an array: [ cashaddr, statusHash ]\n if (data instanceof Array) {\n const addr = data[0];\n if (addr !== cashaddr) {\n return;\n }\n const status = data[1];\n callback(status);\n }\n };\n return this.subscribeToAddress(cashaddr, watchAddressStatusCallback);\n }\n async watchAddress(cashaddr, callback) {\n const historyMap = {};\n this.getHistory(cashaddr).then((history) => history.forEach((val) => (historyMap[val.tx_hash] = true)));\n const watchAddressStatusCallback = async () => {\n const newHistory = await this.getHistory(cashaddr);\n // sort history to put unconfirmed transactions in the beginning, then transactions in block height descenting order\n const txHashes = newHistory\n .sort((a, b) => a.height <= 0 || b.height <= 0 ? -1 : b.height - a.height)\n .map((val) => val.tx_hash);\n for (const hash of txHashes) {\n if (!(hash in historyMap)) {\n historyMap[hash] = true;\n callback(hash);\n // exit early to prevent further map lookups\n break;\n }\n }\n };\n return this.watchAddressStatus(cashaddr, watchAddressStatusCallback);\n }\n async watchAddressTransactions(cashaddr, callback) {\n return this.watchAddress(cashaddr, async (txHash) => {\n const tx = await this.getRawTransactionObject(txHash);\n callback(tx);\n });\n }\n async watchAddressTokenTransactions(cashaddr, callback) {\n return this.watchAddress(cashaddr, async (txHash) => {\n const tx = await this.getRawTransactionObject(txHash, true);\n if (tx.vin.some((val) => val.tokenData) ||\n tx.vout.some((val) => val.tokenData)) {\n callback(tx);\n }\n });\n }\n // watch for block headers and block height, if `skipCurrentHeight` is set, the notification about current block will not arrive\n async watchBlocks(callback, skipCurrentHeight = true) {\n let acknowledged = !skipCurrentHeight;\n const waitForBlockCallback = (_header) => {\n if (!acknowledged) {\n acknowledged = true;\n return;\n }\n _header = _header instanceof Array ? _header[0] : _header;\n callback(_header);\n };\n return this.subscribeToHeaders(waitForBlockCallback);\n }\n // Wait for the next block or a block at given blockchain height.\n async waitForBlock(height) {\n return new Promise(async (resolve) => {\n let cancelWatch;\n if (this.electrum.chainHeight && !height) {\n height = this.electrum.chainHeight + 1;\n }\n cancelWatch = await this.watchBlocks(async (header) => {\n if (!height) {\n height = header.height + 1;\n return;\n }\n if (header.height >= height) {\n await cancelWatch?.();\n resolve(header);\n return;\n }\n });\n });\n }\n // subscribe to notifications sent when new block is found, the block header is sent to callback\n async subscribeToHeaders(callback) {\n return this.subscribeRequest(\"blockchain.headers.subscribe\", callback);\n }\n async subscribeToAddress(cashaddr, callback) {\n return this.subscribeRequest(\"blockchain.address.subscribe\", callback, cashaddr);\n }\n async subscribeToTransaction(txHash, callback) {\n return this.subscribeRequest(\"blockchain.transaction.subscribe\", callback, txHash);\n }\n async performRequest(name, ...parameters) {\n await this.ready();\n const requestTimeout = new Promise(function (_resolve, reject) {\n setTimeout(function () {\n reject(\"electrum-cash request timed out, retrying\");\n }, 30000);\n }).catch(function (e) {\n throw e;\n });\n const request = this.electrum.request(name, ...parameters);\n return await Promise.race([request, requestTimeout])\n .then((value) => {\n if (value instanceof Error)\n throw value;\n let result = value;\n return result;\n })\n .catch(async () => {\n return await Promise.race([request, requestTimeout])\n .then((value) => {\n if (value instanceof Error)\n throw value;\n let result = value;\n return result;\n })\n .catch(function (e) {\n throw e;\n });\n });\n }\n async trackSubscription(methodName, ...parameters) {\n const key = `${methodName}-${this.network}-${JSON.stringify(parameters)}`;\n if (this.subscriptionMap[key]) {\n this.subscriptionMap[key]++;\n }\n else {\n this.subscriptionMap[key] = 1;\n }\n await this.electrum.subscribe(methodName, ...parameters);\n }\n async untrackSubscription(methodName, ...parameters) {\n const key = `${methodName}-${this.network}-${JSON.stringify(parameters)}`;\n if (this.subscriptionMap[key]) {\n this.subscriptionMap[key]--;\n if (this.subscriptionMap[key] <= 0) {\n // only really unsubscribe if there are no more subscriptions for this `key`\n delete this.subscriptionMap[key];\n try {\n await this.electrum.unsubscribe(methodName, ...parameters);\n }\n catch { }\n }\n }\n }\n async subscribeRequest(methodName, callback, ...parameters) {\n await this.ready();\n const handler = (data) => {\n if (data.method === methodName) {\n callback(data.params);\n }\n };\n this.electrum.on(\"notification\", handler);\n // safeguard against multiple subscriptions to headers\n if (methodName === \"blockhain.headers.subscribe\") {\n if (!this.subscribedToHeaders) {\n this.subscribedToHeaders = true;\n await this.trackSubscription(methodName, ...parameters);\n }\n }\n else {\n await this.trackSubscription(methodName, ...parameters);\n }\n this.subscriptions++;\n return async () => {\n this.electrum.off(\"notification\", handler);\n this.subscriptions--;\n // there are no blockchain.headers.unsubscribe method, so let's safeguard against it\n if (methodName !== \"blockchain.headers.subscribe\") {\n await this.untrackSubscription(methodName, ...parameters);\n }\n };\n }\n async ready() {\n return this.connect();\n }\n async connect() {\n await this.cache?.init();\n if (this.electrum.status !== _electrum_cash_network__WEBPACK_IMPORTED_MODULE_0__.ConnectionStatus.CONNECTED) {\n await this.electrum.connect();\n }\n }\n disconnect() {\n if (this.subscriptions > 0) {\n // console.warn(\n // `Trying to disconnect a network provider with ${this.subscriptions} active subscriptions. This is in most cases a bad idea.`\n // );\n }\n return this.electrum.disconnect(true, false);\n }\n}\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/network/ElectrumNetworkProvider.ts?");
238
238
 
239
239
  /***/ }),
240
240
 
@@ -302,9 +302,9 @@ eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harm
302
302
  /*!**********************************!*\
303
303
  !*** ./src/rate/ExchangeRate.ts ***!
304
304
  \**********************************/
305
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
305
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
306
306
 
307
- eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExchangeRate\": () => (/* binding */ ExchangeRate)\n/* harmony export */ });\n/* unused harmony exports getTtl, getRateFromExchange */\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ \"./src/constant.ts\");\n/* harmony import */ var _util_getRuntimePlatform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/getRuntimePlatform.js */ \"./src/util/getRuntimePlatform.ts\");\n/* harmony import */ var _db_ExchangeRateProvider_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../db/ExchangeRateProvider.js */ \"./src/db/ExchangeRateProvider.ts\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config.js */ \"./src/config.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_config_js__WEBPACK_IMPORTED_MODULE_3__]);\n_config_js__WEBPACK_IMPORTED_MODULE_3__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];\n\n\n\n\nclass ExchangeRate {\n constructor({ symbol, rate, ttl, }) {\n this.symbol = symbol;\n this.rate = rate;\n this.ttl = ttl;\n }\n toString() {\n this.rate.toFixed(2);\n }\n static async get(symbol, useCache = true) {\n const platform = (0,_util_getRuntimePlatform_js__WEBPACK_IMPORTED_MODULE_0__.getRuntimePlatform)();\n if (platform === _util_getRuntimePlatform_js__WEBPACK_IMPORTED_MODULE_0__.RuntimePlatform.browser) {\n try {\n return await this.getRateFromLocalStorage(symbol, useCache);\n }\n catch {\n return await this.getRateFromGlobalScope(symbol, useCache);\n }\n }\n else {\n return await this.getRateFromGlobalScope(symbol, useCache);\n }\n }\n static async getRateFromLocalStorage(symbol, useCache = true) {\n if (!useCache) {\n return await getRateFromExchange(symbol);\n }\n let cache = new _db_ExchangeRateProvider_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]();\n let cacheRate = await cache.getRate(symbol);\n if (cacheRate) {\n // if the cache is still good, return it\n if (cacheRate.ttl > Date.now()) {\n return cacheRate.rate;\n }\n // else fall through\n }\n let freshRate = await getRateFromExchange(symbol);\n cache.setRate(symbol, freshRate, getTtl());\n return freshRate;\n }\n static async getRateFromGlobalScope(symbol, useCache = true) {\n if (!useCache) {\n return await getRateFromExchange(symbol);\n }\n if (globalThis.RATE) {\n let rateObject = globalThis.RATE;\n if (symbol in rateObject) {\n let cachedRate = rateObject[symbol];\n // If the cache is still good return ie\n if (cachedRate.ttl > Date.now()) {\n return cachedRate.rate;\n }\n }\n }\n let freshRate = await getRateFromExchange(symbol);\n this.cacheRateInGlobalScope(symbol, freshRate);\n return freshRate;\n }\n static cacheRateInGlobalScope(symbol, rate) {\n if (!globalThis.RATE) {\n globalThis.RATE = {};\n }\n else {\n globalThis.RATE[symbol] = {\n symbol: symbol,\n rate: rate,\n ttl: getTtl(),\n };\n }\n }\n}\nfunction getTtl() {\n return Math.trunc(Date.now() + _constant_js__WEBPACK_IMPORTED_MODULE_2__.EXCHANGE_RATE_TTL);\n}\n// Attempt to get the usd rate from some web app\nasync function getRateFromExchange(symbol) {\n if (_config_js__WEBPACK_IMPORTED_MODULE_3__.Config.GetExchangeRateFn) {\n return await _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.GetExchangeRateFn(symbol);\n }\n if (symbol.length > 0) {\n symbol = symbol.toLocaleLowerCase();\n }\n if (symbol === \"usd\") {\n try {\n const response = await fetch(\"https://markets.api.bitcoin.com/live/bitcoin\");\n const data = await response.json();\n return data[\"data\"][\"BCH\"];\n }\n catch { }\n }\n const response = await fetch(\"https://bitpay.com/rates/BCH\");\n const data = (await response.json());\n const rates = data.data.reduce((acc, rate) => ({ ...acc, [rate.code.toLocaleLowerCase()]: rate.rate }), {});\n if (symbol in rates) {\n return rates[symbol];\n }\n throw Error(`Currency '${symbol}' is not supported.`);\n}\n// do not await and do not throw in case we are offline\nExchangeRate.get(\"usd\").catch(() => { });\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/rate/ExchangeRate.ts?");
307
+ eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExchangeRate\": () => (/* binding */ ExchangeRate)\n/* harmony export */ });\n/* unused harmony exports getTtl, getRateFromExchange */\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ \"./src/constant.ts\");\n/* harmony import */ var _util_getRuntimePlatform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/getRuntimePlatform.js */ \"./src/util/getRuntimePlatform.ts\");\n/* harmony import */ var _db_ExchangeRateProvider_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../db/ExchangeRateProvider.js */ \"./src/db/ExchangeRateProvider.ts\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config.js */ \"./src/config.ts\");\n\n\n\n\nclass ExchangeRate {\n constructor({ symbol, rate, ttl, }) {\n this.symbol = symbol;\n this.rate = rate;\n this.ttl = ttl;\n }\n toString() {\n this.rate.toFixed(2);\n }\n static async get(symbol, useCache = true) {\n const platform = (0,_util_getRuntimePlatform_js__WEBPACK_IMPORTED_MODULE_0__.getRuntimePlatform)();\n if (platform === _util_getRuntimePlatform_js__WEBPACK_IMPORTED_MODULE_0__.RuntimePlatform.browser) {\n try {\n return await this.getRateFromLocalStorage(symbol, useCache);\n }\n catch {\n return await this.getRateFromGlobalScope(symbol, useCache);\n }\n }\n else {\n return await this.getRateFromGlobalScope(symbol, useCache);\n }\n }\n static async getRateFromLocalStorage(symbol, useCache = true) {\n if (!useCache) {\n return await getRateFromExchange(symbol);\n }\n let cache = new _db_ExchangeRateProvider_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]();\n let cacheRate = await cache.getRate(symbol);\n if (cacheRate) {\n // if the cache is still good, return it\n if (cacheRate.ttl > Date.now()) {\n return cacheRate.rate;\n }\n // else fall through\n }\n let freshRate = await getRateFromExchange(symbol);\n cache.setRate(symbol, freshRate, getTtl());\n return freshRate;\n }\n static async getRateFromGlobalScope(symbol, useCache = true) {\n if (!useCache) {\n return await getRateFromExchange(symbol);\n }\n if (globalThis.RATE) {\n let rateObject = globalThis.RATE;\n if (symbol in rateObject) {\n let cachedRate = rateObject[symbol];\n // If the cache is still good return ie\n if (cachedRate.ttl > Date.now()) {\n return cachedRate.rate;\n }\n }\n }\n let freshRate = await getRateFromExchange(symbol);\n this.cacheRateInGlobalScope(symbol, freshRate);\n return freshRate;\n }\n static cacheRateInGlobalScope(symbol, rate) {\n if (!globalThis.RATE) {\n globalThis.RATE = {};\n }\n else {\n globalThis.RATE[symbol] = {\n symbol: symbol,\n rate: rate,\n ttl: getTtl(),\n };\n }\n }\n}\nfunction getTtl() {\n return Math.trunc(Date.now() + _constant_js__WEBPACK_IMPORTED_MODULE_2__.EXCHANGE_RATE_TTL);\n}\n// Attempt to get the usd rate from some web app\nasync function getRateFromExchange(symbol) {\n if (_config_js__WEBPACK_IMPORTED_MODULE_3__.Config.GetExchangeRateFn) {\n return await _config_js__WEBPACK_IMPORTED_MODULE_3__.Config.GetExchangeRateFn(symbol);\n }\n if (symbol.length > 0) {\n symbol = symbol.toLocaleLowerCase();\n }\n if (symbol === \"usd\") {\n try {\n const response = await fetch(\"https://markets.api.bitcoin.com/live/bitcoin\");\n const data = await response.json();\n return data[\"data\"][\"BCH\"];\n }\n catch { }\n }\n const response = await fetch(\"https://bitpay.com/rates/BCH\");\n const data = (await response.json());\n const rates = data.data.reduce((acc, rate) => ({ ...acc, [rate.code.toLocaleLowerCase()]: rate.rate }), {});\n if (symbol in rates) {\n return rates[symbol];\n }\n throw Error(`Currency '${symbol}' is not supported.`);\n}\n// do not await and do not throw in case we are offline\nExchangeRate.get(\"usd\").catch(() => { });\n\n\n//# sourceURL=webpack://mainnet-js/./src/rate/ExchangeRate.ts?");
308
308
 
309
309
  /***/ }),
310
310
 
@@ -354,7 +354,7 @@ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__
354
354
  \*************************************/
355
355
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
356
356
 
357
- eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"amountInSatoshi\": () => (/* binding */ amountInSatoshi)\n/* harmony export */ });\n/* harmony import */ var _chain_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../chain.js */ \"./src/chain.ts\");\n/* harmony import */ var _enum_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enum.js */ \"./src/enum.ts\");\n/* harmony import */ var _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rate/ExchangeRate.js */ \"./src/rate/ExchangeRate.ts\");\n/* harmony import */ var _util_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/sanitizeUnit.js */ \"./src/util/sanitizeUnit.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__, _enum_js__WEBPACK_IMPORTED_MODULE_2__]);\n([_rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__, _enum_js__WEBPACK_IMPORTED_MODULE_2__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n\n\n\n\n/**\n * converts given value and unit into satoshi\n *\n * @param {value} number some value\n * @param {rawUnit} any the unit of value\n *\n * @returns a promise to the value in satoshi\n */\nasync function amountInSatoshi(value, rawUnit) {\n const unit = (0,_util_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_1__.sanitizeUnit)(rawUnit);\n switch (unit) {\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.BCH:\n return Math.round(value * _chain_js__WEBPACK_IMPORTED_MODULE_3__.bchParam.subUnits);\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SATOSHI:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SAT:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SATS:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SATOSHIS:\n return value;\n default:\n const Currency_over_BCH = await _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__.ExchangeRate.get(rawUnit);\n const SAT_over_BCH = _chain_js__WEBPACK_IMPORTED_MODULE_3__.bchParam.subUnits;\n return Math.round(Number(value * (SAT_over_BCH / Currency_over_BCH)));\n }\n}\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/util/amountInSatoshi.ts?");
357
+ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"amountInSatoshi\": () => (/* binding */ amountInSatoshi)\n/* harmony export */ });\n/* harmony import */ var _chain_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../chain.js */ \"./src/chain.ts\");\n/* harmony import */ var _enum_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enum.js */ \"./src/enum.ts\");\n/* harmony import */ var _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rate/ExchangeRate.js */ \"./src/rate/ExchangeRate.ts\");\n/* harmony import */ var _util_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/sanitizeUnit.js */ \"./src/util/sanitizeUnit.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_enum_js__WEBPACK_IMPORTED_MODULE_2__]);\n_enum_js__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];\n\n\n\n\n/**\n * converts given value and unit into satoshi\n *\n * @param {value} number some value\n * @param {rawUnit} any the unit of value\n *\n * @returns a promise to the value in satoshi\n */\nasync function amountInSatoshi(value, rawUnit) {\n const unit = (0,_util_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_1__.sanitizeUnit)(rawUnit);\n switch (unit) {\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.BCH:\n return Math.round(value * _chain_js__WEBPACK_IMPORTED_MODULE_3__.bchParam.subUnits);\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SATOSHI:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SAT:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SATS:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SATOSHIS:\n return value;\n default:\n const Currency_over_BCH = await _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__.ExchangeRate.get(rawUnit);\n const SAT_over_BCH = _chain_js__WEBPACK_IMPORTED_MODULE_3__.bchParam.subUnits;\n return Math.round(Number(value * (SAT_over_BCH / Currency_over_BCH)));\n }\n}\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/util/amountInSatoshi.ts?");
358
358
 
359
359
  /***/ }),
360
360
 
@@ -374,7 +374,7 @@ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__
374
374
  \**********************************************/
375
375
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
376
376
 
377
- eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"balanceFromSatoshi\": () => (/* binding */ balanceFromSatoshi),\n/* harmony export */ \"balanceResponseFromSatoshi\": () => (/* binding */ balanceResponseFromSatoshi)\n/* harmony export */ });\n/* harmony import */ var _chain_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../chain.js */ \"./src/chain.ts\");\n/* harmony import */ var _enum_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../enum.js */ \"./src/enum.ts\");\n/* harmony import */ var _floor_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./floor.js */ \"./src/util/floor.ts\");\n/* harmony import */ var _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rate/ExchangeRate.js */ \"./src/rate/ExchangeRate.ts\");\n/* harmony import */ var _sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sanitizeUnit.js */ \"./src/util/sanitizeUnit.ts\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config.js */ \"./src/config.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__, _config_js__WEBPACK_IMPORTED_MODULE_2__, _enum_js__WEBPACK_IMPORTED_MODULE_5__]);\n([_rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__, _config_js__WEBPACK_IMPORTED_MODULE_2__, _enum_js__WEBPACK_IMPORTED_MODULE_5__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n\n\n\n\n\n\nasync function balanceResponseFromSatoshi(value, priceCache = true) {\n const response = {};\n response.bch = value / _chain_js__WEBPACK_IMPORTED_MODULE_1__.bchParam.subUnits;\n response.sat = value;\n const currencyValue = (value / _chain_js__WEBPACK_IMPORTED_MODULE_1__.bchParam.subUnits) *\n (await _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__.ExchangeRate.get(_config_js__WEBPACK_IMPORTED_MODULE_2__.Config.DefaultCurrency, priceCache));\n response[_config_js__WEBPACK_IMPORTED_MODULE_2__.Config.DefaultCurrency] = (0,_floor_js__WEBPACK_IMPORTED_MODULE_3__.floor)(currencyValue, 2);\n return response;\n}\nasync function balanceFromSatoshi(value, rawUnit, priceCache = true) {\n const unit = (0,_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_4__.sanitizeUnit)(rawUnit);\n switch (unit) {\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.UnitEnum.BCH:\n return value / _chain_js__WEBPACK_IMPORTED_MODULE_1__.bchParam.subUnits;\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.UnitEnum.SAT:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.UnitEnum.SATS:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.UnitEnum.SATOSHI:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.UnitEnum.SATOSHIS:\n return value;\n default:\n const currencyValue = (value / _chain_js__WEBPACK_IMPORTED_MODULE_1__.bchParam.subUnits) *\n (await _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__.ExchangeRate.get(_config_js__WEBPACK_IMPORTED_MODULE_2__.Config.DefaultCurrency, priceCache));\n return Number(currencyValue.toFixed(2));\n }\n}\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/util/balanceObjectFromSatoshi.ts?");
377
+ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"balanceFromSatoshi\": () => (/* binding */ balanceFromSatoshi),\n/* harmony export */ \"balanceResponseFromSatoshi\": () => (/* binding */ balanceResponseFromSatoshi)\n/* harmony export */ });\n/* harmony import */ var _chain_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../chain.js */ \"./src/chain.ts\");\n/* harmony import */ var _enum_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../enum.js */ \"./src/enum.ts\");\n/* harmony import */ var _floor_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./floor.js */ \"./src/util/floor.ts\");\n/* harmony import */ var _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rate/ExchangeRate.js */ \"./src/rate/ExchangeRate.ts\");\n/* harmony import */ var _sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sanitizeUnit.js */ \"./src/util/sanitizeUnit.ts\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config.js */ \"./src/config.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_enum_js__WEBPACK_IMPORTED_MODULE_5__]);\n_enum_js__WEBPACK_IMPORTED_MODULE_5__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];\n\n\n\n\n\n\nasync function balanceResponseFromSatoshi(value, priceCache = true) {\n const response = {};\n response.bch = value / _chain_js__WEBPACK_IMPORTED_MODULE_1__.bchParam.subUnits;\n response.sat = value;\n const currencyValue = (value / _chain_js__WEBPACK_IMPORTED_MODULE_1__.bchParam.subUnits) *\n (await _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__.ExchangeRate.get(_config_js__WEBPACK_IMPORTED_MODULE_2__.Config.DefaultCurrency, priceCache));\n response[_config_js__WEBPACK_IMPORTED_MODULE_2__.Config.DefaultCurrency] = (0,_floor_js__WEBPACK_IMPORTED_MODULE_3__.floor)(currencyValue, 2);\n return response;\n}\nasync function balanceFromSatoshi(value, rawUnit, priceCache = true) {\n const unit = (0,_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_4__.sanitizeUnit)(rawUnit);\n switch (unit) {\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.UnitEnum.BCH:\n return value / _chain_js__WEBPACK_IMPORTED_MODULE_1__.bchParam.subUnits;\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.UnitEnum.SAT:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.UnitEnum.SATS:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.UnitEnum.SATOSHI:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.UnitEnum.SATOSHIS:\n return value;\n default:\n const currencyValue = (value / _chain_js__WEBPACK_IMPORTED_MODULE_1__.bchParam.subUnits) *\n (await _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__.ExchangeRate.get(_config_js__WEBPACK_IMPORTED_MODULE_2__.Config.DefaultCurrency, priceCache));\n return Number(currencyValue.toFixed(2));\n }\n}\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/util/balanceObjectFromSatoshi.ts?");
378
378
 
379
379
  /***/ }),
380
380
 
@@ -502,9 +502,9 @@ eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harm
502
502
  /*!********************************!*\
503
503
  !*** ./src/util/getUsdRate.ts ***!
504
504
  \********************************/
505
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
505
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
506
506
 
507
- eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getUsdRate\": () => (/* binding */ getUsdRate)\n/* harmony export */ });\n/* harmony import */ var _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rate/ExchangeRate.js */ \"./src/rate/ExchangeRate.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__]);\n_rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];\n\nfunction getUsdRate() {\n return _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__.ExchangeRate.get(\"usd\");\n}\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/util/getUsdRate.ts?");
507
+ eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getUsdRate\": () => (/* binding */ getUsdRate)\n/* harmony export */ });\n/* harmony import */ var _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rate/ExchangeRate.js */ \"./src/rate/ExchangeRate.ts\");\n\nfunction getUsdRate() {\n return _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__.ExchangeRate.get(\"usd\");\n}\n\n\n//# sourceURL=webpack://mainnet-js/./src/util/getUsdRate.ts?");
508
508
 
509
509
  /***/ }),
510
510
 
@@ -544,7 +544,7 @@ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__
544
544
  \***************************/
545
545
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
546
546
 
547
- eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExchangeRate\": () => (/* reexport safe */ _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_16__.ExchangeRate),\n/* harmony export */ \"RuntimePlatform\": () => (/* reexport safe */ _getRuntimePlatform_js__WEBPACK_IMPORTED_MODULE_13__.RuntimePlatform),\n/* harmony export */ \"amountInSatoshi\": () => (/* reexport safe */ _amountInSatoshi_js__WEBPACK_IMPORTED_MODULE_0__.amountInSatoshi),\n/* harmony export */ \"asSendRequestObject\": () => (/* reexport safe */ _asSendRequestObject_js__WEBPACK_IMPORTED_MODULE_1__.asSendRequestObject),\n/* harmony export */ \"atob\": () => (/* reexport safe */ _base64_js__WEBPACK_IMPORTED_MODULE_2__.atob),\n/* harmony export */ \"balanceFromSatoshi\": () => (/* reexport safe */ _balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_22__.balanceFromSatoshi),\n/* harmony export */ \"balanceResponseFromSatoshi\": () => (/* reexport safe */ _balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_22__.balanceResponseFromSatoshi),\n/* harmony export */ \"binToBase64\": () => (/* reexport safe */ _bitauth_libauth__WEBPACK_IMPORTED_MODULE_5__.binToBase64),\n/* harmony export */ \"binToHex\": () => (/* reexport safe */ _bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.binToHex),\n/* harmony export */ \"btoa\": () => (/* reexport safe */ _base64_js__WEBPACK_IMPORTED_MODULE_2__.btoa),\n/* harmony export */ \"checkTokenaddr\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.checkTokenaddr),\n/* harmony export */ \"convert\": () => (/* reexport safe */ _convert_js__WEBPACK_IMPORTED_MODULE_7__.convert),\n/* harmony export */ \"convertAddress\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.convertAddress),\n/* harmony export */ \"convertObject\": () => (/* reexport safe */ _convert_js__WEBPACK_IMPORTED_MODULE_7__.convertObject),\n/* harmony export */ \"decodeHeader\": () => (/* reexport safe */ _header_js__WEBPACK_IMPORTED_MODULE_23__.decodeHeader),\n/* harmony export */ \"delay\": () => (/* reexport safe */ _delay_js__WEBPACK_IMPORTED_MODULE_8__.delay),\n/* harmony export */ \"deriveCashaddr\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.deriveCashaddr),\n/* harmony export */ \"derivePublicKeyHash\": () => (/* reexport safe */ _derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_10__.derivePublicKeyHash),\n/* harmony export */ \"deriveTokenaddr\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.deriveTokenaddr),\n/* harmony export */ \"derivedNetwork\": () => (/* reexport safe */ _deriveNetwork_js__WEBPACK_IMPORTED_MODULE_9__.derivedNetwork),\n/* harmony export */ \"getAddrsByXpubKey\": () => (/* reexport safe */ _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__.getAddrsByXpubKey),\n/* harmony export */ \"getAddrsByXpubKeyObject\": () => (/* reexport safe */ _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__.getAddrsByXpubKeyObject),\n/* harmony export */ \"getRuntimePlatform\": () => (/* reexport safe */ _getRuntimePlatform_js__WEBPACK_IMPORTED_MODULE_13__.getRuntimePlatform),\n/* harmony export */ \"getUsdRate\": () => (/* reexport safe */ _getUsdRate_js__WEBPACK_IMPORTED_MODULE_14__.getUsdRate),\n/* harmony export */ \"getWeakRandomInt\": () => (/* reexport safe */ _randomInt_js__WEBPACK_IMPORTED_MODULE_19__.getWeakRandomInt),\n/* harmony export */ \"getXPubKey\": () => (/* reexport safe */ _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_20__.getXPubKey),\n/* harmony export */ \"getXpubKeyInfo\": () => (/* reexport safe */ _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__.getXpubKeyInfo),\n/* harmony export */ \"getXpubKeyInfoObject\": () => (/* reexport safe */ _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__.getXpubKeyInfoObject),\n/* harmony export */ \"hash160\": () => (/* reexport safe */ _hash160_js__WEBPACK_IMPORTED_MODULE_15__.hash160),\n/* harmony export */ \"hexToBin\": () => (/* reexport safe */ _bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.hexToBin),\n/* harmony export */ \"isTokenaddr\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.isTokenaddr),\n/* harmony export */ \"isValidAddress\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.isValidAddress),\n/* harmony export */ \"sanitizeAddress\": () => (/* reexport safe */ _sanitizeAddress_js__WEBPACK_IMPORTED_MODULE_17__.sanitizeAddress),\n/* harmony export */ \"sanitizeUnit\": () => (/* reexport safe */ _sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_18__.sanitizeUnit),\n/* harmony export */ \"sha256\": () => (/* reexport safe */ _bitauth_libauth__WEBPACK_IMPORTED_MODULE_6__.sha256),\n/* harmony export */ \"sumTokenAmounts\": () => (/* reexport safe */ _sumUtxoValue_js__WEBPACK_IMPORTED_MODULE_21__.sumTokenAmounts),\n/* harmony export */ \"sumUtxoValue\": () => (/* reexport safe */ _sumUtxoValue_js__WEBPACK_IMPORTED_MODULE_21__.sumUtxoValue),\n/* harmony export */ \"toCashaddr\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.toCashaddr),\n/* harmony export */ \"toTokenaddr\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.toTokenaddr),\n/* harmony export */ \"utf8ToBin\": () => (/* reexport safe */ _bitauth_libauth__WEBPACK_IMPORTED_MODULE_4__.utf8ToBin)\n/* harmony export */ });\n/* harmony import */ var _amountInSatoshi_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./amountInSatoshi.js */ \"./src/util/amountInSatoshi.ts\");\n/* harmony import */ var _asSendRequestObject_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./asSendRequestObject.js */ \"./src/util/asSendRequestObject.ts\");\n/* harmony import */ var _base64_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base64.js */ \"./src/util/base64.ts\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/utf8.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/base64.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/crypto/default-crypto-instances.js\");\n/* harmony import */ var _convert_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./convert.js */ \"./src/util/convert.ts\");\n/* harmony import */ var _delay_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./delay.js */ \"./src/util/delay.ts\");\n/* harmony import */ var _deriveNetwork_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./deriveNetwork.js */ \"./src/util/deriveNetwork.ts\");\n/* harmony import */ var _derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./derivePublicKeyHash.js */ \"./src/util/derivePublicKeyHash.ts\");\n/* harmony import */ var _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./deriveCashaddr.js */ \"./src/util/deriveCashaddr.ts\");\n/* harmony import */ var _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../util/getAddrsByXpubKey.js */ \"./src/util/getAddrsByXpubKey.ts\");\n/* harmony import */ var _getRuntimePlatform_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./getRuntimePlatform.js */ \"./src/util/getRuntimePlatform.ts\");\n/* harmony import */ var _getUsdRate_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./getUsdRate.js */ \"./src/util/getUsdRate.ts\");\n/* harmony import */ var _hash160_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hash160.js */ \"./src/util/hash160.ts\");\n/* harmony import */ var _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../rate/ExchangeRate.js */ \"./src/rate/ExchangeRate.ts\");\n/* harmony import */ var _sanitizeAddress_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./sanitizeAddress.js */ \"./src/util/sanitizeAddress.ts\");\n/* harmony import */ var _sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./sanitizeUnit.js */ \"./src/util/sanitizeUnit.ts\");\n/* harmony import */ var _randomInt_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./randomInt.js */ \"./src/util/randomInt.ts\");\n/* harmony import */ var _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../util/getXPubKey.js */ \"./src/util/getXPubKey.ts\");\n/* harmony import */ var _sumUtxoValue_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./sumUtxoValue.js */ \"./src/util/sumUtxoValue.ts\");\n/* harmony import */ var _balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./balanceObjectFromSatoshi.js */ \"./src/util/balanceObjectFromSatoshi.ts\");\n/* harmony import */ var _header_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./header.js */ \"./src/util/header.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_amountInSatoshi_js__WEBPACK_IMPORTED_MODULE_0__, _asSendRequestObject_js__WEBPACK_IMPORTED_MODULE_1__, _base64_js__WEBPACK_IMPORTED_MODULE_2__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_6__, _convert_js__WEBPACK_IMPORTED_MODULE_7__, _deriveNetwork_js__WEBPACK_IMPORTED_MODULE_9__, _derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_10__, _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__, _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__, _getUsdRate_js__WEBPACK_IMPORTED_MODULE_14__, _hash160_js__WEBPACK_IMPORTED_MODULE_15__, _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_16__, _sanitizeAddress_js__WEBPACK_IMPORTED_MODULE_17__, _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_20__, _balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_22__, _header_js__WEBPACK_IMPORTED_MODULE_23__]);\n([_amountInSatoshi_js__WEBPACK_IMPORTED_MODULE_0__, _asSendRequestObject_js__WEBPACK_IMPORTED_MODULE_1__, _base64_js__WEBPACK_IMPORTED_MODULE_2__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_6__, _convert_js__WEBPACK_IMPORTED_MODULE_7__, _deriveNetwork_js__WEBPACK_IMPORTED_MODULE_9__, _derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_10__, _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__, _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__, _getUsdRate_js__WEBPACK_IMPORTED_MODULE_14__, _hash160_js__WEBPACK_IMPORTED_MODULE_15__, _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_16__, _sanitizeAddress_js__WEBPACK_IMPORTED_MODULE_17__, _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_20__, _balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_22__, _header_js__WEBPACK_IMPORTED_MODULE_23__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/util/index.ts?");
547
+ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExchangeRate\": () => (/* reexport safe */ _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_16__.ExchangeRate),\n/* harmony export */ \"RuntimePlatform\": () => (/* reexport safe */ _getRuntimePlatform_js__WEBPACK_IMPORTED_MODULE_13__.RuntimePlatform),\n/* harmony export */ \"amountInSatoshi\": () => (/* reexport safe */ _amountInSatoshi_js__WEBPACK_IMPORTED_MODULE_0__.amountInSatoshi),\n/* harmony export */ \"asSendRequestObject\": () => (/* reexport safe */ _asSendRequestObject_js__WEBPACK_IMPORTED_MODULE_1__.asSendRequestObject),\n/* harmony export */ \"atob\": () => (/* reexport safe */ _base64_js__WEBPACK_IMPORTED_MODULE_2__.atob),\n/* harmony export */ \"balanceFromSatoshi\": () => (/* reexport safe */ _balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_22__.balanceFromSatoshi),\n/* harmony export */ \"balanceResponseFromSatoshi\": () => (/* reexport safe */ _balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_22__.balanceResponseFromSatoshi),\n/* harmony export */ \"binToBase64\": () => (/* reexport safe */ _bitauth_libauth__WEBPACK_IMPORTED_MODULE_5__.binToBase64),\n/* harmony export */ \"binToHex\": () => (/* reexport safe */ _bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.binToHex),\n/* harmony export */ \"btoa\": () => (/* reexport safe */ _base64_js__WEBPACK_IMPORTED_MODULE_2__.btoa),\n/* harmony export */ \"checkTokenaddr\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.checkTokenaddr),\n/* harmony export */ \"convert\": () => (/* reexport safe */ _convert_js__WEBPACK_IMPORTED_MODULE_7__.convert),\n/* harmony export */ \"convertAddress\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.convertAddress),\n/* harmony export */ \"convertObject\": () => (/* reexport safe */ _convert_js__WEBPACK_IMPORTED_MODULE_7__.convertObject),\n/* harmony export */ \"decodeHeader\": () => (/* reexport safe */ _header_js__WEBPACK_IMPORTED_MODULE_23__.decodeHeader),\n/* harmony export */ \"delay\": () => (/* reexport safe */ _delay_js__WEBPACK_IMPORTED_MODULE_8__.delay),\n/* harmony export */ \"deriveCashaddr\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.deriveCashaddr),\n/* harmony export */ \"derivePublicKeyHash\": () => (/* reexport safe */ _derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_10__.derivePublicKeyHash),\n/* harmony export */ \"deriveTokenaddr\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.deriveTokenaddr),\n/* harmony export */ \"derivedNetwork\": () => (/* reexport safe */ _deriveNetwork_js__WEBPACK_IMPORTED_MODULE_9__.derivedNetwork),\n/* harmony export */ \"getAddrsByXpubKey\": () => (/* reexport safe */ _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__.getAddrsByXpubKey),\n/* harmony export */ \"getAddrsByXpubKeyObject\": () => (/* reexport safe */ _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__.getAddrsByXpubKeyObject),\n/* harmony export */ \"getRuntimePlatform\": () => (/* reexport safe */ _getRuntimePlatform_js__WEBPACK_IMPORTED_MODULE_13__.getRuntimePlatform),\n/* harmony export */ \"getUsdRate\": () => (/* reexport safe */ _getUsdRate_js__WEBPACK_IMPORTED_MODULE_14__.getUsdRate),\n/* harmony export */ \"getWeakRandomInt\": () => (/* reexport safe */ _randomInt_js__WEBPACK_IMPORTED_MODULE_19__.getWeakRandomInt),\n/* harmony export */ \"getXPubKey\": () => (/* reexport safe */ _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_20__.getXPubKey),\n/* harmony export */ \"getXpubKeyInfo\": () => (/* reexport safe */ _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__.getXpubKeyInfo),\n/* harmony export */ \"getXpubKeyInfoObject\": () => (/* reexport safe */ _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__.getXpubKeyInfoObject),\n/* harmony export */ \"hash160\": () => (/* reexport safe */ _hash160_js__WEBPACK_IMPORTED_MODULE_15__.hash160),\n/* harmony export */ \"hexToBin\": () => (/* reexport safe */ _bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.hexToBin),\n/* harmony export */ \"isTokenaddr\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.isTokenaddr),\n/* harmony export */ \"isValidAddress\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.isValidAddress),\n/* harmony export */ \"sanitizeAddress\": () => (/* reexport safe */ _sanitizeAddress_js__WEBPACK_IMPORTED_MODULE_17__.sanitizeAddress),\n/* harmony export */ \"sanitizeUnit\": () => (/* reexport safe */ _sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_18__.sanitizeUnit),\n/* harmony export */ \"sha256\": () => (/* reexport safe */ _bitauth_libauth__WEBPACK_IMPORTED_MODULE_6__.sha256),\n/* harmony export */ \"sumTokenAmounts\": () => (/* reexport safe */ _sumUtxoValue_js__WEBPACK_IMPORTED_MODULE_21__.sumTokenAmounts),\n/* harmony export */ \"sumUtxoValue\": () => (/* reexport safe */ _sumUtxoValue_js__WEBPACK_IMPORTED_MODULE_21__.sumUtxoValue),\n/* harmony export */ \"toCashaddr\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.toCashaddr),\n/* harmony export */ \"toTokenaddr\": () => (/* reexport safe */ _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__.toTokenaddr),\n/* harmony export */ \"utf8ToBin\": () => (/* reexport safe */ _bitauth_libauth__WEBPACK_IMPORTED_MODULE_4__.utf8ToBin)\n/* harmony export */ });\n/* harmony import */ var _amountInSatoshi_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./amountInSatoshi.js */ \"./src/util/amountInSatoshi.ts\");\n/* harmony import */ var _asSendRequestObject_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./asSendRequestObject.js */ \"./src/util/asSendRequestObject.ts\");\n/* harmony import */ var _base64_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base64.js */ \"./src/util/base64.ts\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/utf8.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/base64.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/crypto/default-crypto-instances.js\");\n/* harmony import */ var _convert_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./convert.js */ \"./src/util/convert.ts\");\n/* harmony import */ var _delay_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./delay.js */ \"./src/util/delay.ts\");\n/* harmony import */ var _deriveNetwork_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./deriveNetwork.js */ \"./src/util/deriveNetwork.ts\");\n/* harmony import */ var _derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./derivePublicKeyHash.js */ \"./src/util/derivePublicKeyHash.ts\");\n/* harmony import */ var _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./deriveCashaddr.js */ \"./src/util/deriveCashaddr.ts\");\n/* harmony import */ var _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../util/getAddrsByXpubKey.js */ \"./src/util/getAddrsByXpubKey.ts\");\n/* harmony import */ var _getRuntimePlatform_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./getRuntimePlatform.js */ \"./src/util/getRuntimePlatform.ts\");\n/* harmony import */ var _getUsdRate_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./getUsdRate.js */ \"./src/util/getUsdRate.ts\");\n/* harmony import */ var _hash160_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hash160.js */ \"./src/util/hash160.ts\");\n/* harmony import */ var _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../rate/ExchangeRate.js */ \"./src/rate/ExchangeRate.ts\");\n/* harmony import */ var _sanitizeAddress_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./sanitizeAddress.js */ \"./src/util/sanitizeAddress.ts\");\n/* harmony import */ var _sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./sanitizeUnit.js */ \"./src/util/sanitizeUnit.ts\");\n/* harmony import */ var _randomInt_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./randomInt.js */ \"./src/util/randomInt.ts\");\n/* harmony import */ var _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../util/getXPubKey.js */ \"./src/util/getXPubKey.ts\");\n/* harmony import */ var _sumUtxoValue_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./sumUtxoValue.js */ \"./src/util/sumUtxoValue.ts\");\n/* harmony import */ var _balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./balanceObjectFromSatoshi.js */ \"./src/util/balanceObjectFromSatoshi.ts\");\n/* harmony import */ var _header_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./header.js */ \"./src/util/header.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_amountInSatoshi_js__WEBPACK_IMPORTED_MODULE_0__, _asSendRequestObject_js__WEBPACK_IMPORTED_MODULE_1__, _base64_js__WEBPACK_IMPORTED_MODULE_2__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_6__, _convert_js__WEBPACK_IMPORTED_MODULE_7__, _deriveNetwork_js__WEBPACK_IMPORTED_MODULE_9__, _derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_10__, _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__, _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__, _hash160_js__WEBPACK_IMPORTED_MODULE_15__, _sanitizeAddress_js__WEBPACK_IMPORTED_MODULE_17__, _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_20__, _balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_22__, _header_js__WEBPACK_IMPORTED_MODULE_23__]);\n([_amountInSatoshi_js__WEBPACK_IMPORTED_MODULE_0__, _asSendRequestObject_js__WEBPACK_IMPORTED_MODULE_1__, _base64_js__WEBPACK_IMPORTED_MODULE_2__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_6__, _convert_js__WEBPACK_IMPORTED_MODULE_7__, _deriveNetwork_js__WEBPACK_IMPORTED_MODULE_9__, _derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_10__, _deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_11__, _util_getAddrsByXpubKey_js__WEBPACK_IMPORTED_MODULE_12__, _hash160_js__WEBPACK_IMPORTED_MODULE_15__, _sanitizeAddress_js__WEBPACK_IMPORTED_MODULE_17__, _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_20__, _balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_22__, _header_js__WEBPACK_IMPORTED_MODULE_23__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/util/index.ts?");
548
548
 
549
549
  /***/ }),
550
550
 
@@ -594,7 +594,7 @@ eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harm
594
594
  \*************************************/
595
595
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
596
596
 
597
- eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"satoshiToAmount\": () => (/* binding */ satoshiToAmount)\n/* harmony export */ });\n/* harmony import */ var _chain_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../chain.js */ \"./src/chain.ts\");\n/* harmony import */ var _enum_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enum.js */ \"./src/enum.ts\");\n/* harmony import */ var _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rate/ExchangeRate.js */ \"./src/rate/ExchangeRate.ts\");\n/* harmony import */ var _util_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/sanitizeUnit.js */ \"./src/util/sanitizeUnit.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__, _enum_js__WEBPACK_IMPORTED_MODULE_2__]);\n([_rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__, _enum_js__WEBPACK_IMPORTED_MODULE_2__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n\n\n\n\n/**\n * converts given value and unit from satoshi\n *\n * @param {value} number some value in satoshi\n * @param {rawUnit} any the target unit\n *\n * @returns a promise to the value in the unit of account given by rawUnit\n */\nasync function satoshiToAmount(value, rawUnit) {\n const unit = (0,_util_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_1__.sanitizeUnit)(rawUnit);\n switch (unit) {\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.BCH:\n return value / _chain_js__WEBPACK_IMPORTED_MODULE_3__.bchParam.subUnits;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SATOSHI:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SAT:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SATS:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SATOSHIS:\n return value;\n default:\n const Currency_over_BCH = await _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__.ExchangeRate.get(rawUnit);\n // truncate currency amounts to fixed precision (2),\n // then return the fixed value string as a float.\n const currencyValue = Number(value * (Currency_over_BCH / _chain_js__WEBPACK_IMPORTED_MODULE_3__.bchParam.subUnits)).toFixed(2);\n return Number.parseFloat(currencyValue);\n }\n}\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/util/satoshiToAmount.ts?");
597
+ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"satoshiToAmount\": () => (/* binding */ satoshiToAmount)\n/* harmony export */ });\n/* harmony import */ var _chain_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../chain.js */ \"./src/chain.ts\");\n/* harmony import */ var _enum_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../enum.js */ \"./src/enum.ts\");\n/* harmony import */ var _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rate/ExchangeRate.js */ \"./src/rate/ExchangeRate.ts\");\n/* harmony import */ var _util_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/sanitizeUnit.js */ \"./src/util/sanitizeUnit.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_enum_js__WEBPACK_IMPORTED_MODULE_2__]);\n_enum_js__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];\n\n\n\n\n/**\n * converts given value and unit from satoshi\n *\n * @param {value} number some value in satoshi\n * @param {rawUnit} any the target unit\n *\n * @returns a promise to the value in the unit of account given by rawUnit\n */\nasync function satoshiToAmount(value, rawUnit) {\n const unit = (0,_util_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_1__.sanitizeUnit)(rawUnit);\n switch (unit) {\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.BCH:\n return value / _chain_js__WEBPACK_IMPORTED_MODULE_3__.bchParam.subUnits;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SATOSHI:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SAT:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SATS:\n return value;\n case _enum_js__WEBPACK_IMPORTED_MODULE_2__.UnitEnum.SATOSHIS:\n return value;\n default:\n const Currency_over_BCH = await _rate_ExchangeRate_js__WEBPACK_IMPORTED_MODULE_0__.ExchangeRate.get(rawUnit);\n // truncate currency amounts to fixed precision (2),\n // then return the fixed value string as a float.\n const currencyValue = Number(value * (Currency_over_BCH / _chain_js__WEBPACK_IMPORTED_MODULE_3__.bchParam.subUnits)).toFixed(2);\n return Number.parseFloat(currencyValue);\n }\n}\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/util/satoshiToAmount.ts?");
598
598
 
599
599
  /***/ }),
600
600
 
@@ -654,7 +654,7 @@ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__
654
654
  \***************************/
655
655
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
656
656
 
657
- eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RegTestWallet\": () => (/* binding */ RegTestWallet),\n/* harmony export */ \"RegTestWifWallet\": () => (/* binding */ RegTestWifWallet),\n/* harmony export */ \"TestNetWallet\": () => (/* binding */ TestNetWallet),\n/* harmony export */ \"TestNetWifWallet\": () => (/* binding */ TestNetWifWallet),\n/* harmony export */ \"Wallet\": () => (/* binding */ Wallet),\n/* harmony export */ \"WifWallet\": () => (/* binding */ WifWallet)\n/* harmony export */ });\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/key/hd-key.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/crypto/default-crypto-instances.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/key/key-utils.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/key/wallet-import-format.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/address/cash-address.js\");\n/* harmony import */ var _scure_bip39__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @scure/bip39 */ \"../../node_modules/@scure/bip39/esm/index.js\");\n/* harmony import */ var _enum_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../enum.js */ \"./src/enum.ts\");\n/* harmony import */ var _enum_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./enum.js */ \"./src/wallet/enum.ts\");\n/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./model.js */ \"./src/wallet/model.ts\");\n/* harmony import */ var _transaction_Wif_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../transaction/Wif.js */ \"./src/transaction/Wif.ts\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../constant.js */ \"./src/constant.ts\");\n/* harmony import */ var _message_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../message/index.js */ \"./src/message/signed.ts\");\n/* harmony import */ var _util_checkForEmptySeed_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../util/checkForEmptySeed.js */ \"./src/util/checkForEmptySeed.ts\");\n/* harmony import */ var _util_checkWifNetwork_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../util/checkWifNetwork.js */ \"./src/util/checkWifNetwork.ts\");\n/* harmony import */ var _util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../util/deriveCashaddr.js */ \"./src/util/deriveCashaddr.ts\");\n/* harmony import */ var _util_derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../util/derivePublicKeyHash.js */ \"./src/util/derivePublicKeyHash.ts\");\n/* harmony import */ var _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../util/getXPubKey.js */ \"./src/util/getXPubKey.ts\");\n/* harmony import */ var _util_randomBytes_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../util/randomBytes.js */ \"./src/util/randomBytes.ts\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config.js */ \"./src/config.ts\");\n/* harmony import */ var _util_balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../util/balanceObjectFromSatoshi.js */ \"./src/util/balanceObjectFromSatoshi.ts\");\n/* harmony import */ var _Base_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Base.js */ \"./src/wallet/Base.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_Base_js__WEBPACK_IMPORTED_MODULE_1__, _message_index_js__WEBPACK_IMPORTED_MODULE_2__, _enum_js__WEBPACK_IMPORTED_MODULE_4__, _config_js__WEBPACK_IMPORTED_MODULE_6__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_7__, _util_checkForEmptySeed_js__WEBPACK_IMPORTED_MODULE_9__, _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_10__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__, _model_js__WEBPACK_IMPORTED_MODULE_13__, _util_checkWifNetwork_js__WEBPACK_IMPORTED_MODULE_14__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_15__, _util_balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_16__, _transaction_Wif_js__WEBPACK_IMPORTED_MODULE_17__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_18__, _util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_19__, _util_derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_20__]);\n([_Base_js__WEBPACK_IMPORTED_MODULE_1__, _message_index_js__WEBPACK_IMPORTED_MODULE_2__, _enum_js__WEBPACK_IMPORTED_MODULE_4__, _config_js__WEBPACK_IMPORTED_MODULE_6__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_7__, _util_checkForEmptySeed_js__WEBPACK_IMPORTED_MODULE_9__, _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_10__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__, _model_js__WEBPACK_IMPORTED_MODULE_13__, _util_checkWifNetwork_js__WEBPACK_IMPORTED_MODULE_14__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_15__, _util_balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_16__, _transaction_Wif_js__WEBPACK_IMPORTED_MODULE_17__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_18__, _util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_19__, _util_derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_20__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n//#region Imports\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//#endregion Imports\n/**\n * Class to manage a bitcoin cash wallet.\n */\nclass Wallet extends _Base_js__WEBPACK_IMPORTED_MODULE_1__.BaseWallet {\n static { this.signedMessage = new _message_index_js__WEBPACK_IMPORTED_MODULE_2__.SignedMessage(); }\n //#region Accessors\n // Get mnemonic and derivation path for wallet\n getSeed() {\n if (!this.mnemonic) {\n throw Error(\"Wallet mnemonic seed phrase not set\");\n }\n if (!this.derivationPath) {\n throw Error(\"Wallet derivation path not set\");\n }\n return {\n seed: this.mnemonic,\n derivationPath: this.derivationPath,\n parentDerivationPath: this.parentDerivationPath,\n };\n }\n // Return wallet info\n getInfo() {\n return {\n cashaddr: this.cashaddr,\n tokenaddr: this.tokenaddr,\n isTestnet: this.isTestnet,\n name: this.name,\n network: this.network,\n seed: this.mnemonic ? this.getSeed().seed : undefined,\n derivationPath: this.mnemonic ? this.getSeed().derivationPath : undefined,\n parentDerivationPath: this.mnemonic\n ? this.getSeed().parentDerivationPath\n : undefined,\n parentXPubKey: this.parentXPubKey ? this.parentXPubKey : undefined,\n publicKey: this.publicKey ? (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.binToHex)(this.publicKey) : undefined,\n publicKeyHash: (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.binToHex)(this.publicKeyHash),\n privateKey: this.privateKey ? (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.binToHex)(this.privateKey) : undefined,\n privateKeyWif: this.privateKeyWif,\n walletId: this.toString(),\n walletDbEntry: this.toDbString(),\n };\n }\n // returns the public key hash for an address\n getPublicKey(hex = false) {\n if (this.publicKey) {\n return hex ? (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.binToHex)(this.publicKey) : this.publicKey;\n }\n else {\n throw Error(\"The public key for this wallet is not known, perhaps the wallet was created to watch the *hash* of a public key? i.e. a cashaddress.\");\n }\n }\n // returns the public key hash for an address\n getPublicKeyCompressed(hex = false) {\n if (this.publicKeyCompressed) {\n return hex\n ? (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.binToHex)(this.publicKeyCompressed)\n : this.publicKeyCompressed;\n }\n else {\n throw Error(\"The compressed public key for this wallet is not known, perhaps the wallet was created to watch the *hash* of a public key? i.e. a cashaddress.\");\n }\n }\n //#endregion\n //#region Constructors and Statics\n constructor(name = \"\", network = _enum_js__WEBPACK_IMPORTED_MODULE_4__.NetworkType.Mainnet, walletType = _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Seed) {\n super(network);\n this.derivationPath = _config_js__WEBPACK_IMPORTED_MODULE_6__.Config.DefaultParentDerivationPath + \"/0/0\";\n this.parentDerivationPath = _config_js__WEBPACK_IMPORTED_MODULE_6__.Config.DefaultParentDerivationPath;\n this.fromId = async (walletId) => {\n const [walletType, networkGiven, arg1, arg2] = walletId.split(\":\");\n if (this.network !== networkGiven) {\n throw Error(`Network prefix ${networkGiven} to a ${this.network} wallet`);\n }\n // \"wif:regtest:cNfsPtqN2bMRS7vH5qd8tR8GMvgXyL5BjnGAKgZ8DYEiCrCCQcP6\"\n switch (walletType) {\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.PrivateKey:\n return this.fromPrivateKey(arg1);\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Wif:\n return this.fromWIF(arg1);\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Watch:\n if (arg2) {\n // watch:testnet:bchtest:qq1234567\n return this.watchOnly(`${arg1}:${arg2}`);\n }\n // watch:testnet:qq1234567\n return this.watchOnly(`${arg1}`);\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Named:\n if (arg2) {\n // named:testnet:wallet_1:my_database\n return this.named(arg1, arg2);\n }\n else {\n // named:testnet:wallet_1\n return this.named(arg1);\n }\n case _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Seed:\n if (arg2) {\n // seed:testnet:table later ... stove kitten pluck:m/44'/0'/0'/0/0\n return this.fromSeed(arg1, arg2);\n }\n // seed:testnet:table later ... stove kitten pluck\n return this.fromSeed(arg1);\n default:\n throw Error(`Unknown wallet type '${walletType}'`);\n }\n };\n this.name = name;\n // @ts-ignore\n this.walletType = walletType;\n }\n //#region Statics\n /**\n * fromId - create a wallet from encoded walletId string\n *\n * @param walletId walletId options to steer the creation process\n *\n * @returns wallet instantiated accordingly to the walletId rules\n */\n static async fromId(walletId) {\n return new this().fromId(walletId);\n }\n /**\n * fromPrivateKey - create a wallet using the private key supplied in hex or Uint8Array\n *\n * @param wif WIF encoded private key string\n *\n * @returns instantiated wallet\n */\n static async fromPrivateKey(privateKey) {\n return new this().fromPrivateKey(privateKey);\n }\n /**\n * fromWIF - create a wallet using the private key supplied in `Wallet Import Format`\n *\n * @param wif WIF encoded private key string\n *\n * @returns instantiated wallet\n */\n static async fromWIF(wif) {\n return new this().fromWIF(wif);\n }\n /**\n * fromSeed - create a wallet using the seed phrase and derivation path\n *\n * unless specified the derivation path m/44'/245'/0'/0/0 will be userd\n * this derivation path is standard for Electron Cash SLP and other SLP enabled wallets\n *\n * @param seed BIP39 12 word seed phrase\n * @param derivationPath BIP44 HD wallet derivation path to get a single the private key from hierarchy\n *\n * @returns instantiated wallet\n */\n static async fromSeed(seed, derivationPath) {\n return new this().fromSeed(seed, derivationPath);\n }\n /**\n * newRandom - create a random wallet\n *\n * if `name` parameter is specified, the wallet will also be persisted to DB\n *\n * @param name user friendly wallet alias\n * @param dbName name under which the wallet will be stored in the database\n *\n * @returns instantiated wallet\n */\n static async newRandom(name = \"\", dbName) {\n return new this().newRandom(name, dbName);\n }\n //#endregion Constructors\n //#region Protected implementations\n async generate() {\n if (this.walletType === _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Wif) {\n return await this._generateWif();\n }\n else if (this.walletType === _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Watch) {\n return this;\n }\n else if (this.walletType === _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Hd) {\n throw Error(\"Not implemented\");\n }\n else if (this.walletType === _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Seed) {\n return await this._generateMnemonic();\n }\n else {\n console.log(this.walletType);\n throw Error(`Could not determine walletType: ${this.walletType}`);\n }\n }\n async _generateWif() {\n if (!this.privateKey) {\n // @ts-ignore\n this.privateKey = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_7__.generatePrivateKey)(() => (0,_util_randomBytes_js__WEBPACK_IMPORTED_MODULE_8__.generateRandomBytes)(32));\n }\n return this.deriveInfo();\n }\n async _generateMnemonic() {\n // @ts-ignore\n this.mnemonic = (0,_scure_bip39__WEBPACK_IMPORTED_MODULE_0__.generateMnemonic)(_config_js__WEBPACK_IMPORTED_MODULE_6__.Config.getWordlist());\n if (this.mnemonic.length == 0)\n throw Error(\"refusing to create wallet from empty mnemonic\");\n const seed = (0,_scure_bip39__WEBPACK_IMPORTED_MODULE_0__.mnemonicToSeedSync)(this.mnemonic);\n (0,_util_checkForEmptySeed_js__WEBPACK_IMPORTED_MODULE_9__.checkForEmptySeed)(seed);\n const network = this.isTestnet ? \"testnet\" : \"mainnet\";\n // @ts-ignore\n this.parentXPubKey = (0,_util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_10__.getXPubKey)(seed, this.parentDerivationPath, network);\n const hdNode = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPrivateNodeFromSeed)(seed, {\n assumeValidity: true, // TODO: we should switch to libauth's BIP39 implementation and set this to false\n throwErrors: true,\n });\n const zerothChild = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPath)(hdNode, this.derivationPath);\n if (typeof zerothChild === \"string\") {\n throw Error(zerothChild);\n }\n // @ts-ignore\n this.privateKey = zerothChild.privateKey;\n // @ts-ignore\n this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Seed;\n return await this.deriveInfo();\n }\n async getXPubKeys(paths) {\n if (this.mnemonic) {\n if (paths) {\n let xPubKeys = await this.deriveHdPaths(paths);\n return [xPubKeys];\n }\n else {\n return await this.deriveHdPaths(_constant_js__WEBPACK_IMPORTED_MODULE_12__.DERIVATION_PATHS);\n }\n }\n else {\n throw Error(\"xpubkeys can only be derived from seed type wallets.\");\n }\n }\n // Initialize wallet from a mnemonic phrase\n async fromSeed(mnemonic, derivationPath) {\n // @ts-ignore\n this.mnemonic = mnemonic.trim().toLowerCase();\n if (this.mnemonic.length == 0)\n throw Error(\"refusing to create wallet from empty mnemonic\");\n const seed = (0,_scure_bip39__WEBPACK_IMPORTED_MODULE_0__.mnemonicToSeedSync)(this.mnemonic);\n (0,_util_checkForEmptySeed_js__WEBPACK_IMPORTED_MODULE_9__.checkForEmptySeed)(seed);\n const hdNode = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPrivateNodeFromSeed)(seed, {\n assumeValidity: true, // TODO: we should switch to libauth's BIP39 implementation and set this to false\n throwErrors: true,\n });\n if (derivationPath) {\n // @ts-ignore\n this.derivationPath = derivationPath;\n // If the derivation path is for the first account child, set the parent derivation path\n const path = derivationPath.split(\"/\");\n if (path.slice(-2).join(\"/\") == \"0/0\") {\n // @ts-ignore\n this.parentDerivationPath = path.slice(0, -2).join(\"/\");\n }\n }\n const zerothChild = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPath)(hdNode, this.derivationPath);\n if (typeof zerothChild === \"string\") {\n throw Error(zerothChild);\n }\n // @ts-ignore\n this.privateKey = zerothChild.privateKey;\n const network = this.isTestnet ? \"testnet\" : \"mainnet\";\n // @ts-ignore\n this.parentXPubKey = await (0,_util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_10__.getXPubKey)(seed, this.parentDerivationPath, network);\n // @ts-ignore\n this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Seed;\n await this.deriveInfo();\n return this;\n }\n // Get common xpub paths from zerothChild privateKey\n async deriveHdPaths(hdPaths) {\n if (!this.mnemonic)\n throw Error(\"refusing to create wallet from empty mnemonic\");\n const seed = (0,_scure_bip39__WEBPACK_IMPORTED_MODULE_0__.mnemonicToSeedSync)(this.mnemonic);\n (0,_util_checkForEmptySeed_js__WEBPACK_IMPORTED_MODULE_9__.checkForEmptySeed)(seed);\n const hdNode = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPrivateNodeFromSeed)(seed, {\n assumeValidity: true, // TODO: we should switch to libauth's BIP39 implementation and set this to false\n throwErrors: true,\n });\n const result = [];\n for (const path of hdPaths) {\n if (path === \"m\") {\n throw Error(\"Storing or sharing of parent public key may lead to loss of funds. Storing or sharing *root* parent public keys is strongly discouraged, although all parent keys have risk. See: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#implications\");\n }\n const childNode = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPath)(hdNode, path);\n if (typeof childNode === \"string\") {\n throw Error(childNode);\n }\n const node = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPublicNode)(childNode);\n if (typeof node === \"string\") {\n throw Error(node);\n }\n const xPubKey = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.encodeHdPublicKey)({\n network: this.network,\n node: node,\n }, {\n throwErrors: true,\n }).hdPublicKey;\n const key = new _model_js__WEBPACK_IMPORTED_MODULE_13__.XPubKey({\n path: path,\n xPubKey: xPubKey,\n });\n result.push(await key.ready());\n }\n return await Promise.all(result).then((result) => {\n return result;\n });\n }\n // Initialize wallet from private key in hex or Uint8Array\n async fromPrivateKey(privateKey) {\n if (typeof privateKey === \"string\") {\n privateKey = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.hexToBin)(privateKey);\n }\n // @ts-ignore\n this.privateKey = privateKey;\n // @ts-ignore\n this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.PrivateKey;\n await this.deriveInfo();\n return this;\n }\n // Initialize wallet from Wallet Import Format\n async fromWIF(secret) {\n (0,_util_checkWifNetwork_js__WEBPACK_IMPORTED_MODULE_14__.checkWifNetwork)(secret, this.network);\n let wifResult = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_15__.decodePrivateKeyWif)(secret);\n if (typeof wifResult === \"string\") {\n throw Error(wifResult);\n }\n let resultData = wifResult;\n // @ts-ignore\n this.privateKey = resultData.privateKey;\n // @ts-ignore\n this.privateKeyWif = secret;\n // @ts-ignore\n this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Wif;\n await this.deriveInfo();\n return this;\n }\n /**\n * newRandom (internal) if the wallet is named, get or create it; otherwise create a random\n * unnamed wallet\n * @param {string} name name of the wallet\n * @param {string} dbName database name the wallet is stored in\n */\n async newRandom(name, dbName) {\n dbName = dbName ? dbName : this.networkPrefix;\n if (name.length > 0) {\n return this.named(name, dbName);\n }\n else {\n return this.generate();\n }\n }\n //#endregion Protected Implementations\n //#region Serialization\n // Returns the serialized wallet as a string\n // If storing in a database, set asNamed to false to store secrets\n // In all other cases, the a named wallet is deserialized from the database\n // by the name key\n toString() {\n if (this.name) {\n return `named:${this.network}:${this.name}`;\n }\n else if (this.walletType == _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.PrivateKey) {\n return `${this.walletType}:${this.network}:${(0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.binToHex)(this.privateKey)}`;\n }\n else if (this.walletType == _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Seed) {\n return `${this.walletType}:${this.network}:${this.mnemonic}:${this.derivationPath}`;\n }\n else if (this.walletType === _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Wif) {\n return `${this.walletType}:${this.network}:${this.privateKeyWif}`;\n }\n else if (this.walletType == _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Watch) {\n return super.toString();\n }\n throw Error(\"toString unsupported wallet type\");\n }\n /**\n * toDbString - store the serialized version of the wallet in the database, not just the name\n *\n * @throws {Error} if called on BaseWallet\n */\n toDbString() {\n if (this.walletType == _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Seed) {\n return `${this.walletType}:${this.network}:${this.mnemonic}:${this.derivationPath}`;\n }\n else if (this.walletType == _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.PrivateKey) {\n return `${this.walletType}:${this.network}:${(0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.binToHex)(this.privateKey)}`;\n }\n else if (this.walletType === _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Wif) {\n return `${this.walletType}:${this.network}:${this.privateKeyWif}`;\n }\n else if (this.walletType == _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Watch) {\n return super.toDbString();\n }\n throw Error(\"toDbString unsupported wallet type\");\n }\n //#endregion Serialization\n //#region Funds\n async getMaxAmountToSend(params = {\n outputCount: 1,\n options: {},\n }) {\n const { value: result } = await this._getMaxAmountToSend({\n options: params.options,\n outputCount: params.outputCount,\n privateKey: this.privateKey,\n });\n return await (0,_util_balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_16__.balanceResponseFromSatoshi)(result);\n }\n /**\n * sendMax Send all available funds to a destination cash address\n *\n * @param {string} cashaddr destination cash address\n * @param {SendRequestOptionsI} options Options of the send requests\n *\n * @returns (depending on the options parameter) the transaction id, new address balance and a link to the transaction on the blockchain explorer\n */\n async sendMax(cashaddr, options) {\n return this.sendMaxRaw(cashaddr, options, this.privateKey);\n }\n /**\n * encodeTransaction Encode and sign a transaction given a list of sendRequests, options and estimate fees.\n * @param {SendRequest[]} sendRequests SendRequests\n * @param {boolean} discardChange=false\n * @param {SendRequestOptionsI} options Options of the send requests\n */\n async encodeTransaction(requests, discardChange = false, options, privateKey) {\n return super.encodeTransaction(requests, discardChange, options, this.privateKey);\n }\n async signUnsignedTransaction(transaction, sourceOutputs) {\n if (!this.privateKey) {\n throw Error(\"Can not sign a transaction with watch-only wallet.\");\n }\n return (0,_transaction_Wif_js__WEBPACK_IMPORTED_MODULE_17__.signUnsignedTransaction)(transaction, sourceOutputs, this.privateKey);\n }\n //#endregion Funds\n //#region Private implementation details\n async deriveInfo() {\n const publicKey = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_18__.secp256k1.derivePublicKeyUncompressed(this.privateKey);\n if (typeof publicKey === \"string\") {\n throw new Error(publicKey);\n }\n // @ts-ignore\n this.publicKey = publicKey;\n const publicKeyCompressed = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_18__.secp256k1.derivePublicKeyCompressed(this.privateKey);\n if (typeof publicKeyCompressed === \"string\") {\n throw new Error(publicKeyCompressed);\n }\n // @ts-ignore\n this.publicKeyCompressed = publicKeyCompressed;\n const networkType = this.network === _enum_js__WEBPACK_IMPORTED_MODULE_4__.NetworkType.Regtest ? _enum_js__WEBPACK_IMPORTED_MODULE_4__.NetworkType.Testnet : this.network;\n // @ts-ignore\n this.privateKeyWif = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_15__.encodePrivateKeyWif)(this.privateKey, networkType);\n (0,_util_checkWifNetwork_js__WEBPACK_IMPORTED_MODULE_14__.checkWifNetwork)(this.privateKeyWif, this.network);\n // @ts-ignore\n this.cashaddr = (0,_util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_19__.deriveCashaddr)(this.privateKey, this.networkPrefix);\n // @ts-ignore\n this.tokenaddr = (0,_util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_19__.deriveTokenaddr)(this.privateKey, this.networkPrefix);\n // @ts-ignore\n this.publicKeyHash = (0,_util_derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_20__.derivePublicKeyHash)(this.cashaddr);\n return this;\n }\n //#endregion Private implementation details\n //#region Signing\n // Convenience wrapper to sign interface\n async sign(message) {\n return await Wallet.signedMessage.sign(message, this.privateKey);\n }\n}\n/**\n * Class to manage a testnet wallet.\n */\nclass TestNetWallet extends Wallet {\n static { this.networkPrefix = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_21__.CashAddressNetworkPrefix.testnet; }\n static { this.faucetServer = \"https://rest-unstable.mainnet.cash\"; }\n constructor(name = \"\") {\n super(name, _enum_js__WEBPACK_IMPORTED_MODULE_4__.NetworkType.Testnet);\n }\n}\n/**\n * Class to manage a regtest wallet.\n */\nclass RegTestWallet extends Wallet {\n static { this.networkPrefix = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_21__.CashAddressNetworkPrefix.regtest; }\n constructor(name = \"\") {\n super(name, _enum_js__WEBPACK_IMPORTED_MODULE_4__.NetworkType.Regtest);\n }\n}\n/**\n * Class to manage a bitcoin cash wif wallet.\n */\nclass WifWallet extends Wallet {\n static { this.networkPrefix = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_21__.CashAddressNetworkPrefix.mainnet; }\n static { this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Wif; }\n constructor(name = \"\") {\n super(name, _enum_js__WEBPACK_IMPORTED_MODULE_4__.NetworkType.Mainnet, _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Wif);\n }\n}\n/**\n * Class to manage a testnet wif wallet.\n */\nclass TestNetWifWallet extends Wallet {\n static { this.networkPrefix = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_21__.CashAddressNetworkPrefix.testnet; }\n static { this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Wif; }\n constructor(name = \"\") {\n super(name, _enum_js__WEBPACK_IMPORTED_MODULE_4__.NetworkType.Testnet, _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Wif);\n }\n}\n/**\n * Class to manage a regtest wif wallet.\n */\nclass RegTestWifWallet extends Wallet {\n static { this.networkPrefix = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_21__.CashAddressNetworkPrefix.regtest; }\n static { this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Wif; }\n constructor(name = \"\") {\n super(name, _enum_js__WEBPACK_IMPORTED_MODULE_4__.NetworkType.Regtest, _enum_js__WEBPACK_IMPORTED_MODULE_5__.WalletTypeEnum.Wif);\n }\n}\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/wallet/Wif.ts?");
657
+ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"RegTestWallet\": () => (/* binding */ RegTestWallet),\n/* harmony export */ \"RegTestWifWallet\": () => (/* binding */ RegTestWifWallet),\n/* harmony export */ \"TestNetWallet\": () => (/* binding */ TestNetWallet),\n/* harmony export */ \"TestNetWifWallet\": () => (/* binding */ TestNetWifWallet),\n/* harmony export */ \"Wallet\": () => (/* binding */ Wallet),\n/* harmony export */ \"WifWallet\": () => (/* binding */ WifWallet)\n/* harmony export */ });\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/key/bip39.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/key/hd-key.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/crypto/default-crypto-instances.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/key/key-utils.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/key/wallet-import-format.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/address/cash-address.js\");\n/* harmony import */ var _enum_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../enum.js */ \"./src/enum.ts\");\n/* harmony import */ var _enum_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./enum.js */ \"./src/wallet/enum.ts\");\n/* harmony import */ var _model_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./model.js */ \"./src/wallet/model.ts\");\n/* harmony import */ var _transaction_Wif_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../transaction/Wif.js */ \"./src/transaction/Wif.ts\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../constant.js */ \"./src/constant.ts\");\n/* harmony import */ var _message_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../message/index.js */ \"./src/message/signed.ts\");\n/* harmony import */ var _util_checkForEmptySeed_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../util/checkForEmptySeed.js */ \"./src/util/checkForEmptySeed.ts\");\n/* harmony import */ var _util_checkWifNetwork_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../util/checkWifNetwork.js */ \"./src/util/checkWifNetwork.ts\");\n/* harmony import */ var _util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../util/deriveCashaddr.js */ \"./src/util/deriveCashaddr.ts\");\n/* harmony import */ var _util_derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../util/derivePublicKeyHash.js */ \"./src/util/derivePublicKeyHash.ts\");\n/* harmony import */ var _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../util/getXPubKey.js */ \"./src/util/getXPubKey.ts\");\n/* harmony import */ var _util_randomBytes_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../util/randomBytes.js */ \"./src/util/randomBytes.ts\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config.js */ \"./src/config.ts\");\n/* harmony import */ var _util_balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../util/balanceObjectFromSatoshi.js */ \"./src/util/balanceObjectFromSatoshi.ts\");\n/* harmony import */ var _Base_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Base.js */ \"./src/wallet/Base.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_Base_js__WEBPACK_IMPORTED_MODULE_0__, _message_index_js__WEBPACK_IMPORTED_MODULE_1__, _enum_js__WEBPACK_IMPORTED_MODULE_3__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_6__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_8__, _util_checkForEmptySeed_js__WEBPACK_IMPORTED_MODULE_9__, _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_10__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__, _model_js__WEBPACK_IMPORTED_MODULE_13__, _util_checkWifNetwork_js__WEBPACK_IMPORTED_MODULE_14__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_15__, _util_balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_16__, _transaction_Wif_js__WEBPACK_IMPORTED_MODULE_17__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_18__, _util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_19__, _util_derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_20__]);\n([_Base_js__WEBPACK_IMPORTED_MODULE_0__, _message_index_js__WEBPACK_IMPORTED_MODULE_1__, _enum_js__WEBPACK_IMPORTED_MODULE_3__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_6__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_8__, _util_checkForEmptySeed_js__WEBPACK_IMPORTED_MODULE_9__, _util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_10__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__, _model_js__WEBPACK_IMPORTED_MODULE_13__, _util_checkWifNetwork_js__WEBPACK_IMPORTED_MODULE_14__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_15__, _util_balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_16__, _transaction_Wif_js__WEBPACK_IMPORTED_MODULE_17__, _bitauth_libauth__WEBPACK_IMPORTED_MODULE_18__, _util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_19__, _util_derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_20__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n//#region Imports\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//#endregion Imports\n/**\n * Class to manage a bitcoin cash wallet.\n */\nclass Wallet extends _Base_js__WEBPACK_IMPORTED_MODULE_0__.BaseWallet {\n static { this.signedMessage = new _message_index_js__WEBPACK_IMPORTED_MODULE_1__.SignedMessage(); }\n //#region Accessors\n // Get mnemonic and derivation path for wallet\n getSeed() {\n if (!this.mnemonic) {\n throw Error(\"Wallet mnemonic seed phrase not set\");\n }\n if (!this.derivationPath) {\n throw Error(\"Wallet derivation path not set\");\n }\n return {\n seed: this.mnemonic,\n derivationPath: this.derivationPath,\n parentDerivationPath: this.parentDerivationPath,\n };\n }\n // Return wallet info\n getInfo() {\n return {\n cashaddr: this.cashaddr,\n tokenaddr: this.tokenaddr,\n isTestnet: this.isTestnet,\n name: this.name,\n network: this.network,\n seed: this.mnemonic ? this.getSeed().seed : undefined,\n derivationPath: this.mnemonic ? this.getSeed().derivationPath : undefined,\n parentDerivationPath: this.mnemonic\n ? this.getSeed().parentDerivationPath\n : undefined,\n parentXPubKey: this.parentXPubKey ? this.parentXPubKey : undefined,\n publicKey: this.publicKey ? (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_2__.binToHex)(this.publicKey) : undefined,\n publicKeyHash: (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_2__.binToHex)(this.publicKeyHash),\n privateKey: this.privateKey ? (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_2__.binToHex)(this.privateKey) : undefined,\n privateKeyWif: this.privateKeyWif,\n walletId: this.toString(),\n walletDbEntry: this.toDbString(),\n };\n }\n // returns the public key hash for an address\n getPublicKey(hex = false) {\n if (this.publicKey) {\n return hex ? (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_2__.binToHex)(this.publicKey) : this.publicKey;\n }\n else {\n throw Error(\"The public key for this wallet is not known, perhaps the wallet was created to watch the *hash* of a public key? i.e. a cashaddress.\");\n }\n }\n // returns the public key hash for an address\n getPublicKeyCompressed(hex = false) {\n if (this.publicKeyCompressed) {\n return hex\n ? (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_2__.binToHex)(this.publicKeyCompressed)\n : this.publicKeyCompressed;\n }\n else {\n throw Error(\"The compressed public key for this wallet is not known, perhaps the wallet was created to watch the *hash* of a public key? i.e. a cashaddress.\");\n }\n }\n //#endregion\n //#region Constructors and Statics\n constructor(name = \"\", network = _enum_js__WEBPACK_IMPORTED_MODULE_3__.NetworkType.Mainnet, walletType = _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Seed) {\n super(network);\n this.derivationPath = _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.DefaultParentDerivationPath + \"/0/0\";\n this.parentDerivationPath = _config_js__WEBPACK_IMPORTED_MODULE_5__.Config.DefaultParentDerivationPath;\n this.fromId = async (walletId) => {\n const [walletType, networkGiven, arg1, arg2] = walletId.split(\":\");\n if (this.network !== networkGiven) {\n throw Error(`Network prefix ${networkGiven} to a ${this.network} wallet`);\n }\n // \"wif:regtest:cNfsPtqN2bMRS7vH5qd8tR8GMvgXyL5BjnGAKgZ8DYEiCrCCQcP6\"\n switch (walletType) {\n case _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.PrivateKey:\n return this.fromPrivateKey(arg1);\n case _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Wif:\n return this.fromWIF(arg1);\n case _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Watch:\n if (arg2) {\n // watch:testnet:bchtest:qq1234567\n return this.watchOnly(`${arg1}:${arg2}`);\n }\n // watch:testnet:qq1234567\n return this.watchOnly(`${arg1}`);\n case _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Named:\n if (arg2) {\n // named:testnet:wallet_1:my_database\n return this.named(arg1, arg2);\n }\n else {\n // named:testnet:wallet_1\n return this.named(arg1);\n }\n case _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Seed:\n if (arg2) {\n // seed:testnet:table later ... stove kitten pluck:m/44'/0'/0'/0/0\n return this.fromSeed(arg1, arg2);\n }\n // seed:testnet:table later ... stove kitten pluck\n return this.fromSeed(arg1);\n default:\n throw Error(`Unknown wallet type '${walletType}'`);\n }\n };\n this.name = name;\n // @ts-ignore\n this.walletType = walletType;\n }\n //#region Statics\n /**\n * fromId - create a wallet from encoded walletId string\n *\n * @param walletId walletId options to steer the creation process\n *\n * @returns wallet instantiated accordingly to the walletId rules\n */\n static async fromId(walletId) {\n return new this().fromId(walletId);\n }\n /**\n * fromPrivateKey - create a wallet using the private key supplied in hex or Uint8Array\n *\n * @param wif WIF encoded private key string\n *\n * @returns instantiated wallet\n */\n static async fromPrivateKey(privateKey) {\n return new this().fromPrivateKey(privateKey);\n }\n /**\n * fromWIF - create a wallet using the private key supplied in `Wallet Import Format`\n *\n * @param wif WIF encoded private key string\n *\n * @returns instantiated wallet\n */\n static async fromWIF(wif) {\n return new this().fromWIF(wif);\n }\n /**\n * fromSeed - create a wallet using the seed phrase and derivation path\n *\n * unless specified the derivation path m/44'/245'/0'/0/0 will be userd\n * this derivation path is standard for Electron Cash SLP and other SLP enabled wallets\n *\n * @param seed BIP39 12 word seed phrase\n * @param derivationPath BIP44 HD wallet derivation path to get a single the private key from hierarchy\n *\n * @returns instantiated wallet\n */\n static async fromSeed(seed, derivationPath) {\n return new this().fromSeed(seed, derivationPath);\n }\n /**\n * newRandom - create a random wallet\n *\n * if `name` parameter is specified, the wallet will also be persisted to DB\n *\n * @param name user friendly wallet alias\n * @param dbName name under which the wallet will be stored in the database\n *\n * @returns instantiated wallet\n */\n static async newRandom(name = \"\", dbName) {\n return new this().newRandom(name, dbName);\n }\n //#endregion Constructors\n //#region Protected implementations\n async generate() {\n if (this.walletType === _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Wif) {\n return await this._generateWif();\n }\n else if (this.walletType === _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Watch) {\n return this;\n }\n else if (this.walletType === _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Hd) {\n throw Error(\"Not implemented\");\n }\n else if (this.walletType === _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Seed) {\n return await this._generateMnemonic();\n }\n else {\n console.log(this.walletType);\n throw Error(`Could not determine walletType: ${this.walletType}`);\n }\n }\n async _generateWif() {\n if (!this.privateKey) {\n // @ts-ignore\n this.privateKey = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_6__.generatePrivateKey)(() => (0,_util_randomBytes_js__WEBPACK_IMPORTED_MODULE_7__.generateRandomBytes)(32));\n }\n return this.deriveInfo();\n }\n async _generateMnemonic() {\n // @ts-ignore\n this.mnemonic = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_8__.generateBip39Mnemonic)();\n if (this.mnemonic.length == 0)\n throw Error(\"refusing to create wallet from empty mnemonic\");\n const seed = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_8__.deriveSeedFromBip39Mnemonic)(this.mnemonic);\n (0,_util_checkForEmptySeed_js__WEBPACK_IMPORTED_MODULE_9__.checkForEmptySeed)(seed);\n const network = this.isTestnet ? \"testnet\" : \"mainnet\";\n // @ts-ignore\n this.parentXPubKey = (0,_util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_10__.getXPubKey)(seed, this.parentDerivationPath, network);\n const hdNode = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPrivateNodeFromSeed)(seed, {\n assumeValidity: true, // TODO: we should switch to libauth's BIP39 implementation and set this to false\n throwErrors: true,\n });\n const zerothChild = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPath)(hdNode, this.derivationPath);\n if (typeof zerothChild === \"string\") {\n throw Error(zerothChild);\n }\n // @ts-ignore\n this.privateKey = zerothChild.privateKey;\n // @ts-ignore\n this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Seed;\n return await this.deriveInfo();\n }\n async getXPubKeys(paths) {\n if (this.mnemonic) {\n if (paths) {\n let xPubKeys = await this.deriveHdPaths(paths);\n return [xPubKeys];\n }\n else {\n return await this.deriveHdPaths(_constant_js__WEBPACK_IMPORTED_MODULE_12__.DERIVATION_PATHS);\n }\n }\n else {\n throw Error(\"xpubkeys can only be derived from seed type wallets.\");\n }\n }\n // Initialize wallet from a mnemonic phrase\n async fromSeed(mnemonic, derivationPath) {\n // @ts-ignore\n this.mnemonic = mnemonic.trim().toLowerCase();\n if (this.mnemonic.length == 0)\n throw Error(\"refusing to create wallet from empty mnemonic\");\n const seed = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_8__.deriveSeedFromBip39Mnemonic)(this.mnemonic);\n (0,_util_checkForEmptySeed_js__WEBPACK_IMPORTED_MODULE_9__.checkForEmptySeed)(seed);\n const hdNode = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPrivateNodeFromSeed)(seed, {\n assumeValidity: true, // TODO: we should switch to libauth's BIP39 implementation and set this to false\n throwErrors: true,\n });\n if (derivationPath) {\n // @ts-ignore\n this.derivationPath = derivationPath;\n // If the derivation path is for the first account child, set the parent derivation path\n const path = derivationPath.split(\"/\");\n if (path.slice(-2).join(\"/\") == \"0/0\") {\n // @ts-ignore\n this.parentDerivationPath = path.slice(0, -2).join(\"/\");\n }\n }\n const zerothChild = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPath)(hdNode, this.derivationPath);\n if (typeof zerothChild === \"string\") {\n throw Error(zerothChild);\n }\n // @ts-ignore\n this.privateKey = zerothChild.privateKey;\n const network = this.isTestnet ? \"testnet\" : \"mainnet\";\n // @ts-ignore\n this.parentXPubKey = await (0,_util_getXPubKey_js__WEBPACK_IMPORTED_MODULE_10__.getXPubKey)(seed, this.parentDerivationPath, network);\n // @ts-ignore\n this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Seed;\n await this.deriveInfo();\n return this;\n }\n // Get common xpub paths from zerothChild privateKey\n async deriveHdPaths(hdPaths) {\n if (!this.mnemonic)\n throw Error(\"refusing to create wallet from empty mnemonic\");\n const seed = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_8__.deriveSeedFromBip39Mnemonic)(this.mnemonic);\n (0,_util_checkForEmptySeed_js__WEBPACK_IMPORTED_MODULE_9__.checkForEmptySeed)(seed);\n const hdNode = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPrivateNodeFromSeed)(seed, {\n assumeValidity: true, // TODO: we should switch to libauth's BIP39 implementation and set this to false\n throwErrors: true,\n });\n const result = [];\n for (const path of hdPaths) {\n if (path === \"m\") {\n throw Error(\"Storing or sharing of parent public key may lead to loss of funds. Storing or sharing *root* parent public keys is strongly discouraged, although all parent keys have risk. See: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#implications\");\n }\n const childNode = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPath)(hdNode, path);\n if (typeof childNode === \"string\") {\n throw Error(childNode);\n }\n const node = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.deriveHdPublicNode)(childNode);\n if (typeof node === \"string\") {\n throw Error(node);\n }\n const xPubKey = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_11__.encodeHdPublicKey)({\n network: this.network,\n node: node,\n }, {\n throwErrors: true,\n }).hdPublicKey;\n const key = new _model_js__WEBPACK_IMPORTED_MODULE_13__.XPubKey({\n path: path,\n xPubKey: xPubKey,\n });\n result.push(await key.ready());\n }\n return await Promise.all(result).then((result) => {\n return result;\n });\n }\n // Initialize wallet from private key in hex or Uint8Array\n async fromPrivateKey(privateKey) {\n if (typeof privateKey === \"string\") {\n privateKey = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_2__.hexToBin)(privateKey);\n }\n // @ts-ignore\n this.privateKey = privateKey;\n // @ts-ignore\n this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.PrivateKey;\n await this.deriveInfo();\n return this;\n }\n // Initialize wallet from Wallet Import Format\n async fromWIF(secret) {\n (0,_util_checkWifNetwork_js__WEBPACK_IMPORTED_MODULE_14__.checkWifNetwork)(secret, this.network);\n let wifResult = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_15__.decodePrivateKeyWif)(secret);\n if (typeof wifResult === \"string\") {\n throw Error(wifResult);\n }\n let resultData = wifResult;\n // @ts-ignore\n this.privateKey = resultData.privateKey;\n // @ts-ignore\n this.privateKeyWif = secret;\n // @ts-ignore\n this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Wif;\n await this.deriveInfo();\n return this;\n }\n /**\n * newRandom (internal) if the wallet is named, get or create it; otherwise create a random\n * unnamed wallet\n * @param {string} name name of the wallet\n * @param {string} dbName database name the wallet is stored in\n */\n async newRandom(name, dbName) {\n dbName = dbName ? dbName : this.networkPrefix;\n if (name.length > 0) {\n return this.named(name, dbName);\n }\n else {\n return this.generate();\n }\n }\n //#endregion Protected Implementations\n //#region Serialization\n // Returns the serialized wallet as a string\n // If storing in a database, set asNamed to false to store secrets\n // In all other cases, the a named wallet is deserialized from the database\n // by the name key\n toString() {\n if (this.name) {\n return `named:${this.network}:${this.name}`;\n }\n else if (this.walletType == _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.PrivateKey) {\n return `${this.walletType}:${this.network}:${(0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_2__.binToHex)(this.privateKey)}`;\n }\n else if (this.walletType == _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Seed) {\n return `${this.walletType}:${this.network}:${this.mnemonic}:${this.derivationPath}`;\n }\n else if (this.walletType === _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Wif) {\n return `${this.walletType}:${this.network}:${this.privateKeyWif}`;\n }\n else if (this.walletType == _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Watch) {\n return super.toString();\n }\n throw Error(\"toString unsupported wallet type\");\n }\n /**\n * toDbString - store the serialized version of the wallet in the database, not just the name\n *\n * @throws {Error} if called on BaseWallet\n */\n toDbString() {\n if (this.walletType == _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Seed) {\n return `${this.walletType}:${this.network}:${this.mnemonic}:${this.derivationPath}`;\n }\n else if (this.walletType == _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.PrivateKey) {\n return `${this.walletType}:${this.network}:${(0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_2__.binToHex)(this.privateKey)}`;\n }\n else if (this.walletType === _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Wif) {\n return `${this.walletType}:${this.network}:${this.privateKeyWif}`;\n }\n else if (this.walletType == _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Watch) {\n return super.toDbString();\n }\n throw Error(\"toDbString unsupported wallet type\");\n }\n //#endregion Serialization\n //#region Funds\n async getMaxAmountToSend(params = {\n outputCount: 1,\n options: {},\n }) {\n const { value: result } = await this._getMaxAmountToSend({\n options: params.options,\n outputCount: params.outputCount,\n privateKey: this.privateKey,\n });\n return await (0,_util_balanceObjectFromSatoshi_js__WEBPACK_IMPORTED_MODULE_16__.balanceResponseFromSatoshi)(result);\n }\n /**\n * sendMax Send all available funds to a destination cash address\n *\n * @param {string} cashaddr destination cash address\n * @param {SendRequestOptionsI} options Options of the send requests\n *\n * @returns (depending on the options parameter) the transaction id, new address balance and a link to the transaction on the blockchain explorer\n */\n async sendMax(cashaddr, options) {\n return this.sendMaxRaw(cashaddr, options, this.privateKey);\n }\n /**\n * encodeTransaction Encode and sign a transaction given a list of sendRequests, options and estimate fees.\n * @param {SendRequest[]} sendRequests SendRequests\n * @param {boolean} discardChange=false\n * @param {SendRequestOptionsI} options Options of the send requests\n */\n async encodeTransaction(requests, discardChange = false, options, privateKey) {\n return super.encodeTransaction(requests, discardChange, options, this.privateKey);\n }\n async signUnsignedTransaction(transaction, sourceOutputs) {\n if (!this.privateKey) {\n throw Error(\"Can not sign a transaction with watch-only wallet.\");\n }\n return (0,_transaction_Wif_js__WEBPACK_IMPORTED_MODULE_17__.signUnsignedTransaction)(transaction, sourceOutputs, this.privateKey);\n }\n //#endregion Funds\n //#region Private implementation details\n async deriveInfo() {\n const publicKey = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_18__.secp256k1.derivePublicKeyUncompressed(this.privateKey);\n if (typeof publicKey === \"string\") {\n throw new Error(publicKey);\n }\n // @ts-ignore\n this.publicKey = publicKey;\n const publicKeyCompressed = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_18__.secp256k1.derivePublicKeyCompressed(this.privateKey);\n if (typeof publicKeyCompressed === \"string\") {\n throw new Error(publicKeyCompressed);\n }\n // @ts-ignore\n this.publicKeyCompressed = publicKeyCompressed;\n const networkType = this.network === _enum_js__WEBPACK_IMPORTED_MODULE_3__.NetworkType.Regtest ? _enum_js__WEBPACK_IMPORTED_MODULE_3__.NetworkType.Testnet : this.network;\n // @ts-ignore\n this.privateKeyWif = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_15__.encodePrivateKeyWif)(this.privateKey, networkType);\n (0,_util_checkWifNetwork_js__WEBPACK_IMPORTED_MODULE_14__.checkWifNetwork)(this.privateKeyWif, this.network);\n // @ts-ignore\n this.cashaddr = (0,_util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_19__.deriveCashaddr)(this.privateKey, this.networkPrefix);\n // @ts-ignore\n this.tokenaddr = (0,_util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_19__.deriveTokenaddr)(this.privateKey, this.networkPrefix);\n // @ts-ignore\n this.publicKeyHash = (0,_util_derivePublicKeyHash_js__WEBPACK_IMPORTED_MODULE_20__.derivePublicKeyHash)(this.cashaddr);\n return this;\n }\n //#endregion Private implementation details\n //#region Signing\n // Convenience wrapper to sign interface\n async sign(message) {\n return await Wallet.signedMessage.sign(message, this.privateKey);\n }\n}\n/**\n * Class to manage a testnet wallet.\n */\nclass TestNetWallet extends Wallet {\n static { this.networkPrefix = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_21__.CashAddressNetworkPrefix.testnet; }\n static { this.faucetServer = \"https://rest-unstable.mainnet.cash\"; }\n constructor(name = \"\") {\n super(name, _enum_js__WEBPACK_IMPORTED_MODULE_3__.NetworkType.Testnet);\n }\n}\n/**\n * Class to manage a regtest wallet.\n */\nclass RegTestWallet extends Wallet {\n static { this.networkPrefix = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_21__.CashAddressNetworkPrefix.regtest; }\n constructor(name = \"\") {\n super(name, _enum_js__WEBPACK_IMPORTED_MODULE_3__.NetworkType.Regtest);\n }\n}\n/**\n * Class to manage a bitcoin cash wif wallet.\n */\nclass WifWallet extends Wallet {\n static { this.networkPrefix = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_21__.CashAddressNetworkPrefix.mainnet; }\n static { this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Wif; }\n constructor(name = \"\") {\n super(name, _enum_js__WEBPACK_IMPORTED_MODULE_3__.NetworkType.Mainnet, _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Wif);\n }\n}\n/**\n * Class to manage a testnet wif wallet.\n */\nclass TestNetWifWallet extends Wallet {\n static { this.networkPrefix = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_21__.CashAddressNetworkPrefix.testnet; }\n static { this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Wif; }\n constructor(name = \"\") {\n super(name, _enum_js__WEBPACK_IMPORTED_MODULE_3__.NetworkType.Testnet, _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Wif);\n }\n}\n/**\n * Class to manage a regtest wif wallet.\n */\nclass RegTestWifWallet extends Wallet {\n static { this.networkPrefix = _bitauth_libauth__WEBPACK_IMPORTED_MODULE_21__.CashAddressNetworkPrefix.regtest; }\n static { this.walletType = _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Wif; }\n constructor(name = \"\") {\n super(name, _enum_js__WEBPACK_IMPORTED_MODULE_3__.NetworkType.Regtest, _enum_js__WEBPACK_IMPORTED_MODULE_4__.WalletTypeEnum.Wif);\n }\n}\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/wallet/Wif.ts?");
658
658
 
659
659
  /***/ }),
660
660
 
@@ -684,7 +684,7 @@ eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harm
684
684
  \*****************************/
685
685
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
686
686
 
687
- eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"OpReturnData\": () => (/* binding */ OpReturnData),\n/* harmony export */ \"SendRequest\": () => (/* binding */ SendRequest),\n/* harmony export */ \"SendResponse\": () => (/* binding */ SendResponse),\n/* harmony export */ \"TokenBurnRequest\": () => (/* binding */ TokenBurnRequest),\n/* harmony export */ \"TokenGenesisRequest\": () => (/* binding */ TokenGenesisRequest),\n/* harmony export */ \"TokenMintRequest\": () => (/* binding */ TokenMintRequest),\n/* harmony export */ \"TokenSendRequest\": () => (/* binding */ TokenSendRequest),\n/* harmony export */ \"XPubKey\": () => (/* binding */ XPubKey),\n/* harmony export */ \"fromUtxoId\": () => (/* binding */ fromUtxoId),\n/* harmony export */ \"toUtxoId\": () => (/* binding */ toUtxoId)\n/* harmony export */ });\n/* harmony import */ var _util_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/sanitizeUnit.js */ \"./src/util/sanitizeUnit.ts\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../constant.js */ \"./src/constant.ts\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/utf8.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/number.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config.js */ \"./src/config.ts\");\n/* harmony import */ var _util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/deriveCashaddr.js */ \"./src/util/deriveCashaddr.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_1__, _config_js__WEBPACK_IMPORTED_MODULE_2__]);\n([_util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_1__, _config_js__WEBPACK_IMPORTED_MODULE_2__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n\n\n\n\n\nclass SendRequest {\n constructor({ cashaddr, value, unit, }) {\n this.cashaddr = cashaddr;\n this.value = value;\n this.unit = (0,_util_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeUnit)(unit);\n }\n}\nclass TokenGenesisRequest {\n constructor({ amount, capability, commitment, cashaddr, value, }) {\n this.amount = amount;\n this.capability = capability;\n this.commitment = commitment;\n this.cashaddr = cashaddr;\n this.value = value;\n }\n}\nclass TokenBurnRequest {\n constructor({ tokenId, capability, commitment, amount, cashaddr, }) {\n this.tokenId = tokenId;\n this.capability = capability;\n this.commitment = commitment;\n this.amount = amount ? BigInt(amount) : 0n;\n this.cashaddr = cashaddr;\n }\n}\nclass TokenSendRequest {\n constructor({ cashaddr, value, amount, tokenId, capability, commitment, }) {\n (0,_util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_1__.checkTokenaddr)(cashaddr, _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.EnforceCashTokenReceiptAddresses);\n this.cashaddr = cashaddr;\n this.value = value;\n this.amount = amount ? BigInt(amount) : 0n;\n this.tokenId = tokenId;\n this.capability = capability;\n this.commitment = commitment;\n }\n}\nclass TokenMintRequest {\n constructor({ capability, commitment, cashaddr, value, }) {\n this.capability = capability;\n this.commitment = commitment;\n this.cashaddr = cashaddr;\n this.value = value;\n }\n}\nclass OpReturnData {\n constructor(buffer) {\n this.buffer = Uint8Array.from(buffer);\n }\n /**\n * from - Construct OP_RETURN data from arbitrary data type\n *\n * @param string UTF-8 encoded string message to be converted to OP_RETURN data\n *\n * @returns class instance\n */\n static from(data) {\n return this.fromArray([data]);\n }\n /**\n * fromString - Accept data as a simple UTF-8 string message and append an OP_RETURN and PUSH_DATA1 opcodes to it\n *\n * @param string UTF-8 encoded string message to be converted to OP_RETURN data\n *\n * @returns class instance\n */\n static fromString(string) {\n return this.fromArray([string]);\n }\n /**\n * buffer - Accept OP_RETURN data as a binary buffer.\n * If buffer lacks the OP_RETURN and OP_PUSHDATA opcodes, they will be prepended.\n *\n * @param buffer Data buffer to be assigned to the OP_RETURN outpit\n *\n * @returns class instance\n */\n static fromUint8Array(uint8Array) {\n if (uint8Array[0] !== 0x6a) {\n return this.fromArray([uint8Array]);\n }\n return new this(Uint8Array.from(uint8Array));\n }\n /**\n * fromArray - Accept array of data\n *\n * @param array Array of Uint8Array or UTF-8 encoded string messages to be converted to OP_RETURN data\n *\n * @returns class instance\n */\n static fromArray(array) {\n let data = Uint8Array.from([0x6a]); // OP_RETURN\n for (const element of array) {\n let length;\n let elementData;\n let lengthData;\n if (typeof element === \"string\") {\n elementData = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.utf8ToBin)(element);\n length = elementData.length;\n }\n else if (element instanceof Uint8Array) {\n elementData = element;\n length = elementData.length;\n }\n else {\n throw new Error(\"Wrong data array element\");\n }\n if (length < 76) {\n // OP_PUSHDATA_1\n lengthData = [length];\n }\n else if (length < 223) {\n // default max `-datacarriersize`\n lengthData = [0x4c, length];\n }\n else {\n throw new Error(\"OP_RETURN data can not exceed 220 bytes in size\");\n }\n data = Uint8Array.from([...data, ...lengthData, ...elementData]);\n }\n if (data.length > 220) {\n throw new Error(\"OP_RETURN data can not exceed 220 bytes in size\");\n }\n return new this(data);\n }\n /**\n * parseBinary - parse OP_RETURN data and return pushed chunks of binary data\n *\n * @param opReturn Raw OP_RETURN data\n *\n * @returns array of binary data chunks pushed\n */\n static parseBinary(opReturn) {\n const chunks = [];\n let position = 1;\n // handle direct push, OP_PUSHDATA1, OP_PUSHDATA2;\n // OP_PUSHDATA4 is not supported in OP_RETURNs by consensus\n while (opReturn[position]) {\n let length = 0;\n if (opReturn[position] === 0x4c) {\n length = opReturn[position + 1];\n position += 2;\n }\n else if (opReturn[position] === 0x4d) {\n length = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_4__.binToNumberUint16LE)(opReturn.slice(position + 1, position + 3));\n position += 3;\n }\n else {\n length = opReturn[position];\n position += 1;\n }\n chunks.push(opReturn.slice(position, position + length));\n position += length;\n }\n return chunks;\n }\n /**\n * parse - parse OP_RETURN hex data and return pushed chunks of binary data, converted to utf8 strings\n *\n * @param opReturn Raw OP_RETURN hex data\n *\n * @returns array of binary data chunks pushed, converted to utf8 strings\n */\n static parse(opReturnHex) {\n return this.parseBinary((0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_5__.hexToBin)(opReturnHex)).map((val) => (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.binToUtf8)(val));\n }\n}\nclass SendResponse {\n constructor({ txId, balance, explorerUrl, }) {\n this.txId = txId;\n this.balance = balance;\n this.explorerUrl = explorerUrl;\n }\n}\nclass XPubKey {\n constructor({ path, xPubKey }) {\n this.path = path;\n this.xPubKey = xPubKey;\n }\n async ready() {\n await this.xPubKey;\n return this.asObject();\n }\n asObject() {\n return {\n path: this.path,\n xPubKey: this.xPubKey,\n };\n }\n}\nconst fromUtxoId = (utxoId) => {\n const [txid, vout, satoshis, tokenId, amount, capability, commitment] = utxoId.split(_constant_js__WEBPACK_IMPORTED_MODULE_6__.DELIMITER);\n return {\n satoshis: satoshis ? parseInt(satoshis) : 0,\n vout: parseInt(vout),\n txid,\n token: tokenId\n ? {\n tokenId,\n amount: BigInt(amount),\n capability: capability || undefined,\n commitment: commitment || undefined,\n }\n : undefined,\n };\n};\nconst toUtxoId = (utxo) => {\n return [\n utxo.txid,\n utxo.vout,\n utxo.satoshis,\n utxo.token?.tokenId,\n utxo.token?.amount,\n utxo.token?.capability,\n utxo.token?.commitment,\n ]\n .join(_constant_js__WEBPACK_IMPORTED_MODULE_6__.DELIMITER)\n .replace(/:+$/, \"\");\n};\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/wallet/model.ts?");
687
+ eval("__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"OpReturnData\": () => (/* binding */ OpReturnData),\n/* harmony export */ \"SendRequest\": () => (/* binding */ SendRequest),\n/* harmony export */ \"SendResponse\": () => (/* binding */ SendResponse),\n/* harmony export */ \"TokenBurnRequest\": () => (/* binding */ TokenBurnRequest),\n/* harmony export */ \"TokenGenesisRequest\": () => (/* binding */ TokenGenesisRequest),\n/* harmony export */ \"TokenMintRequest\": () => (/* binding */ TokenMintRequest),\n/* harmony export */ \"TokenSendRequest\": () => (/* binding */ TokenSendRequest),\n/* harmony export */ \"XPubKey\": () => (/* binding */ XPubKey),\n/* harmony export */ \"fromUtxoId\": () => (/* binding */ fromUtxoId),\n/* harmony export */ \"toUtxoId\": () => (/* binding */ toUtxoId)\n/* harmony export */ });\n/* harmony import */ var _util_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/sanitizeUnit.js */ \"./src/util/sanitizeUnit.ts\");\n/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../constant.js */ \"./src/constant.ts\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/utf8.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/number.js\");\n/* harmony import */ var _bitauth_libauth__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @bitauth/libauth */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config.js */ \"./src/config.ts\");\n/* harmony import */ var _util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/deriveCashaddr.js */ \"./src/util/deriveCashaddr.ts\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_1__]);\n_util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];\n\n\n\n\n\nclass SendRequest {\n constructor({ cashaddr, value, unit, }) {\n this.cashaddr = cashaddr;\n this.value = value;\n this.unit = (0,_util_sanitizeUnit_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeUnit)(unit);\n }\n}\nclass TokenGenesisRequest {\n constructor({ amount, capability, commitment, cashaddr, value, }) {\n this.amount = amount;\n this.capability = capability;\n this.commitment = commitment;\n this.cashaddr = cashaddr;\n this.value = value;\n }\n}\nclass TokenBurnRequest {\n constructor({ tokenId, capability, commitment, amount, cashaddr, }) {\n this.tokenId = tokenId;\n this.capability = capability;\n this.commitment = commitment;\n this.amount = amount ? BigInt(amount) : 0n;\n this.cashaddr = cashaddr;\n }\n}\nclass TokenSendRequest {\n constructor({ cashaddr, value, amount, tokenId, capability, commitment, }) {\n (0,_util_deriveCashaddr_js__WEBPACK_IMPORTED_MODULE_1__.checkTokenaddr)(cashaddr, _config_js__WEBPACK_IMPORTED_MODULE_2__.Config.EnforceCashTokenReceiptAddresses);\n this.cashaddr = cashaddr;\n this.value = value;\n this.amount = amount ? BigInt(amount) : 0n;\n this.tokenId = tokenId;\n this.capability = capability;\n this.commitment = commitment;\n }\n}\nclass TokenMintRequest {\n constructor({ capability, commitment, cashaddr, value, }) {\n this.capability = capability;\n this.commitment = commitment;\n this.cashaddr = cashaddr;\n this.value = value;\n }\n}\nclass OpReturnData {\n constructor(buffer) {\n this.buffer = Uint8Array.from(buffer);\n }\n /**\n * from - Construct OP_RETURN data from arbitrary data type\n *\n * @param string UTF-8 encoded string message to be converted to OP_RETURN data\n *\n * @returns class instance\n */\n static from(data) {\n return this.fromArray([data]);\n }\n /**\n * fromString - Accept data as a simple UTF-8 string message and append an OP_RETURN and PUSH_DATA1 opcodes to it\n *\n * @param string UTF-8 encoded string message to be converted to OP_RETURN data\n *\n * @returns class instance\n */\n static fromString(string) {\n return this.fromArray([string]);\n }\n /**\n * buffer - Accept OP_RETURN data as a binary buffer.\n * If buffer lacks the OP_RETURN and OP_PUSHDATA opcodes, they will be prepended.\n *\n * @param buffer Data buffer to be assigned to the OP_RETURN outpit\n *\n * @returns class instance\n */\n static fromUint8Array(uint8Array) {\n if (uint8Array[0] !== 0x6a) {\n return this.fromArray([uint8Array]);\n }\n return new this(Uint8Array.from(uint8Array));\n }\n /**\n * fromArray - Accept array of data\n *\n * @param array Array of Uint8Array or UTF-8 encoded string messages to be converted to OP_RETURN data\n *\n * @returns class instance\n */\n static fromArray(array) {\n let data = Uint8Array.from([0x6a]); // OP_RETURN\n for (const element of array) {\n let length;\n let elementData;\n let lengthData;\n if (typeof element === \"string\") {\n elementData = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.utf8ToBin)(element);\n length = elementData.length;\n }\n else if (element instanceof Uint8Array) {\n elementData = element;\n length = elementData.length;\n }\n else {\n throw new Error(\"Wrong data array element\");\n }\n if (length < 76) {\n // OP_PUSHDATA_1\n lengthData = [length];\n }\n else if (length < 223) {\n // default max `-datacarriersize`\n lengthData = [0x4c, length];\n }\n else {\n throw new Error(\"OP_RETURN data can not exceed 220 bytes in size\");\n }\n data = Uint8Array.from([...data, ...lengthData, ...elementData]);\n }\n if (data.length > 220) {\n throw new Error(\"OP_RETURN data can not exceed 220 bytes in size\");\n }\n return new this(data);\n }\n /**\n * parseBinary - parse OP_RETURN data and return pushed chunks of binary data\n *\n * @param opReturn Raw OP_RETURN data\n *\n * @returns array of binary data chunks pushed\n */\n static parseBinary(opReturn) {\n const chunks = [];\n let position = 1;\n // handle direct push, OP_PUSHDATA1, OP_PUSHDATA2;\n // OP_PUSHDATA4 is not supported in OP_RETURNs by consensus\n while (opReturn[position]) {\n let length = 0;\n if (opReturn[position] === 0x4c) {\n length = opReturn[position + 1];\n position += 2;\n }\n else if (opReturn[position] === 0x4d) {\n length = (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_4__.binToNumberUint16LE)(opReturn.slice(position + 1, position + 3));\n position += 3;\n }\n else {\n length = opReturn[position];\n position += 1;\n }\n chunks.push(opReturn.slice(position, position + length));\n position += length;\n }\n return chunks;\n }\n /**\n * parse - parse OP_RETURN hex data and return pushed chunks of binary data, converted to utf8 strings\n *\n * @param opReturn Raw OP_RETURN hex data\n *\n * @returns array of binary data chunks pushed, converted to utf8 strings\n */\n static parse(opReturnHex) {\n return this.parseBinary((0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_5__.hexToBin)(opReturnHex)).map((val) => (0,_bitauth_libauth__WEBPACK_IMPORTED_MODULE_3__.binToUtf8)(val));\n }\n}\nclass SendResponse {\n constructor({ txId, balance, explorerUrl, }) {\n this.txId = txId;\n this.balance = balance;\n this.explorerUrl = explorerUrl;\n }\n}\nclass XPubKey {\n constructor({ path, xPubKey }) {\n this.path = path;\n this.xPubKey = xPubKey;\n }\n async ready() {\n await this.xPubKey;\n return this.asObject();\n }\n asObject() {\n return {\n path: this.path,\n xPubKey: this.xPubKey,\n };\n }\n}\nconst fromUtxoId = (utxoId) => {\n const [txid, vout, satoshis, tokenId, amount, capability, commitment] = utxoId.split(_constant_js__WEBPACK_IMPORTED_MODULE_6__.DELIMITER);\n return {\n satoshis: satoshis ? parseInt(satoshis) : 0,\n vout: parseInt(vout),\n txid,\n token: tokenId\n ? {\n tokenId,\n amount: BigInt(amount),\n capability: capability || undefined,\n commitment: commitment || undefined,\n }\n : undefined,\n };\n};\nconst toUtxoId = (utxo) => {\n return [\n utxo.txid,\n utxo.vout,\n utxo.satoshis,\n utxo.token?.tokenId,\n utxo.token?.amount,\n utxo.token?.capability,\n utxo.token?.commitment,\n ]\n .join(_constant_js__WEBPACK_IMPORTED_MODULE_6__.DELIMITER)\n .replace(/:+$/, \"\");\n};\n\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./src/wallet/model.ts?");
688
688
 
689
689
  /***/ }),
690
690
 
@@ -738,126 +738,6 @@ eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harm
738
738
 
739
739
  /***/ }),
740
740
 
741
- /***/ "../../node_modules/@noble/hashes/esm/_assert.js":
742
- /*!*******************************************************!*\
743
- !*** ../../node_modules/@noble/hashes/esm/_assert.js ***!
744
- \*******************************************************/
745
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
746
-
747
- eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"bytes\": () => (/* binding */ bytes),\n/* harmony export */ \"exists\": () => (/* binding */ exists),\n/* harmony export */ \"hash\": () => (/* binding */ hash),\n/* harmony export */ \"number\": () => (/* binding */ number),\n/* harmony export */ \"output\": () => (/* binding */ output)\n/* harmony export */ });\n/* unused harmony export bool */\nfunction number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\n// copied from utils\nfunction isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\nfunction bytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\n\nconst assert = { number, bool, bytes, hash, exists, output };\n/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (assert);\n//# sourceMappingURL=_assert.js.map\n\n//# sourceURL=webpack://mainnet-js/../../node_modules/@noble/hashes/esm/_assert.js?");
748
-
749
- /***/ }),
750
-
751
- /***/ "../../node_modules/@noble/hashes/esm/_sha2.js":
752
- /*!*****************************************************!*\
753
- !*** ../../node_modules/@noble/hashes/esm/_sha2.js ***!
754
- \*****************************************************/
755
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
756
-
757
- eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"SHA2\": () => (/* binding */ SHA2)\n/* harmony export */ });\n/* harmony import */ var _assert_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_assert.js */ \"../../node_modules/@noble/hashes/esm/_assert.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"../../node_modules/@noble/hashes/esm/utils.js\");\n\n\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nclass SHA2 extends _utils_js__WEBPACK_IMPORTED_MODULE_0__.Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.createView)(this.buffer);\n }\n update(data) {\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_1__.exists)(this);\n const { view, buffer, blockLen } = this;\n data = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.toBytes)(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.createView)(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_1__.exists)(this);\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_1__.output)(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.createView)(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map\n\n//# sourceURL=webpack://mainnet-js/../../node_modules/@noble/hashes/esm/_sha2.js?");
758
-
759
- /***/ }),
760
-
761
- /***/ "../../node_modules/@noble/hashes/esm/_u64.js":
762
- /*!****************************************************!*\
763
- !*** ../../node_modules/@noble/hashes/esm/_u64.js ***!
764
- \****************************************************/
765
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
766
-
767
- eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* unused harmony exports fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L */\nconst U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\n\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (u64);\n//# sourceMappingURL=_u64.js.map\n\n//# sourceURL=webpack://mainnet-js/../../node_modules/@noble/hashes/esm/_u64.js?");
768
-
769
- /***/ }),
770
-
771
- /***/ "../../node_modules/@noble/hashes/esm/crypto.js":
772
- /*!******************************************************!*\
773
- !*** ../../node_modules/@noble/hashes/esm/crypto.js ***!
774
- \******************************************************/
775
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
776
-
777
- eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"crypto\": () => (/* binding */ crypto)\n/* harmony export */ });\nconst crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map\n\n//# sourceURL=webpack://mainnet-js/../../node_modules/@noble/hashes/esm/crypto.js?");
778
-
779
- /***/ }),
780
-
781
- /***/ "../../node_modules/@noble/hashes/esm/hmac.js":
782
- /*!****************************************************!*\
783
- !*** ../../node_modules/@noble/hashes/esm/hmac.js ***!
784
- \****************************************************/
785
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
786
-
787
- eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"hmac\": () => (/* binding */ hmac)\n/* harmony export */ });\n/* unused harmony export HMAC */\n/* harmony import */ var _assert_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_assert.js */ \"../../node_modules/@noble/hashes/esm/_assert.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ \"../../node_modules/@noble/hashes/esm/utils.js\");\n\n\n// HMAC (RFC 2104)\nclass HMAC extends _utils_js__WEBPACK_IMPORTED_MODULE_0__.Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_1__.hash)(hash);\n const key = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.toBytes)(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new Error('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_1__.exists)(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_1__.exists)(this);\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_1__.bytes)(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nconst hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map\n\n//# sourceURL=webpack://mainnet-js/../../node_modules/@noble/hashes/esm/hmac.js?");
788
-
789
- /***/ }),
790
-
791
- /***/ "../../node_modules/@noble/hashes/esm/pbkdf2.js":
792
- /*!******************************************************!*\
793
- !*** ../../node_modules/@noble/hashes/esm/pbkdf2.js ***!
794
- \******************************************************/
795
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
796
-
797
- eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"pbkdf2\": () => (/* binding */ pbkdf2),\n/* harmony export */ \"pbkdf2Async\": () => (/* binding */ pbkdf2Async)\n/* harmony export */ });\n/* harmony import */ var _assert_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_assert.js */ \"../../node_modules/@noble/hashes/esm/_assert.js\");\n/* harmony import */ var _hmac_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hmac.js */ \"../../node_modules/@noble/hashes/esm/hmac.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"../../node_modules/@noble/hashes/esm/utils.js\");\n\n\n\n// Common prologue and epilogue for sync/async functions\nfunction pbkdf2Init(hash, _password, _salt, _opts) {\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_0__.hash)(hash);\n const opts = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.checkOpts)({ dkLen: 32, asyncTick: 10 }, _opts);\n const { c, dkLen, asyncTick } = opts;\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_0__.number)(c);\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_0__.number)(dkLen);\n (0,_assert_js__WEBPACK_IMPORTED_MODULE_0__.number)(asyncTick);\n if (c < 1)\n throw new Error('PBKDF2: iterations (c) should be >= 1');\n const password = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.toBytes)(_password);\n const salt = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.toBytes)(_salt);\n // DK = PBKDF2(PRF, Password, Salt, c, dkLen);\n const DK = new Uint8Array(dkLen);\n // U1 = PRF(Password, Salt + INT_32_BE(i))\n const PRF = _hmac_js__WEBPACK_IMPORTED_MODULE_2__.hmac.create(hash, password);\n const PRFSalt = PRF._cloneInto().update(salt);\n return { c, dkLen, asyncTick, DK, PRF, PRFSalt };\n}\nfunction pbkdf2Output(PRF, PRFSalt, DK, prfW, u) {\n PRF.destroy();\n PRFSalt.destroy();\n if (prfW)\n prfW.destroy();\n u.fill(0);\n return DK;\n}\n/**\n * PBKDF2-HMAC: RFC 2898 key derivation function\n * @param hash - hash function that would be used e.g. sha256\n * @param password - password from which a derived key is generated\n * @param salt - cryptographic salt\n * @param opts - {c, dkLen} where c is work factor and dkLen is output message size\n */\nfunction pbkdf2(hash, password, salt, opts) {\n const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);\n let prfW; // Working copy\n const arr = new Uint8Array(4);\n const view = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.createView)(arr);\n const u = new Uint8Array(PRF.outputLen);\n // DK = T1 + T2 + ⋯ + Tdklen/hlen\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n // Ti = F(Password, Salt, c, i)\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n // F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc\n // U1 = PRF(Password, Salt + INT_32_BE(i))\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);\n Ti.set(u.subarray(0, Ti.length));\n for (let ui = 1; ui < c; ui++) {\n // Uc = PRF(Password, Uc−1)\n PRF._cloneInto(prfW).update(u).digestInto(u);\n for (let i = 0; i < Ti.length; i++)\n Ti[i] ^= u[i];\n }\n }\n return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);\n}\nasync function pbkdf2Async(hash, password, salt, opts) {\n const { c, dkLen, asyncTick, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);\n let prfW; // Working copy\n const arr = new Uint8Array(4);\n const view = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.createView)(arr);\n const u = new Uint8Array(PRF.outputLen);\n // DK = T1 + T2 + ⋯ + Tdklen/hlen\n for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {\n // Ti = F(Password, Salt, c, i)\n const Ti = DK.subarray(pos, pos + PRF.outputLen);\n view.setInt32(0, ti, false);\n // F(Password, Salt, c, i) = U1 ^ U2 ^ ⋯ ^ Uc\n // U1 = PRF(Password, Salt + INT_32_BE(i))\n (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);\n Ti.set(u.subarray(0, Ti.length));\n await (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.asyncLoop)(c - 1, asyncTick, () => {\n // Uc = PRF(Password, Uc−1)\n PRF._cloneInto(prfW).update(u).digestInto(u);\n for (let i = 0; i < Ti.length; i++)\n Ti[i] ^= u[i];\n });\n }\n return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);\n}\n//# sourceMappingURL=pbkdf2.js.map\n\n//# sourceURL=webpack://mainnet-js/../../node_modules/@noble/hashes/esm/pbkdf2.js?");
798
-
799
- /***/ }),
800
-
801
- /***/ "../../node_modules/@noble/hashes/esm/sha256.js":
802
- /*!******************************************************!*\
803
- !*** ../../node_modules/@noble/hashes/esm/sha256.js ***!
804
- \******************************************************/
805
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
806
-
807
- eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"sha256\": () => (/* binding */ sha256)\n/* harmony export */ });\n/* unused harmony export sha224 */\n/* harmony import */ var _sha2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_sha2.js */ \"../../node_modules/@noble/hashes/esm/_sha2.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ \"../../node_modules/@noble/hashes/esm/utils.js\");\n\n\n// SHA2-256 need to try 2^128 hashes to execute birthday attack.\n// BTC network is doing 2^67 hashes/sec as per early 2023.\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = /* @__PURE__ */ new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nclass SHA256 extends _sha2_js__WEBPACK_IMPORTED_MODULE_0__.SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(W15, 7) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(W15, 18) ^ (W15 >>> 3);\n const s1 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(W2, 17) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(E, 6) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(E, 11) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(A, 2) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(A, 13) ^ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.rotr)(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nconst sha256 = /* @__PURE__ */ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.wrapConstructor)(() => new SHA256());\nconst sha224 = /* @__PURE__ */ (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.wrapConstructor)(() => new SHA224());\n//# sourceMappingURL=sha256.js.map\n\n//# sourceURL=webpack://mainnet-js/../../node_modules/@noble/hashes/esm/sha256.js?");
808
-
809
- /***/ }),
810
-
811
- /***/ "../../node_modules/@noble/hashes/esm/sha512.js":
812
- /*!******************************************************!*\
813
- !*** ../../node_modules/@noble/hashes/esm/sha512.js ***!
814
- \******************************************************/
815
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
816
-
817
- eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"sha512\": () => (/* binding */ sha512)\n/* harmony export */ });\n/* unused harmony exports SHA512, sha512_224, sha512_256, sha384 */\n/* harmony import */ var _sha2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_sha2.js */ \"../../node_modules/@noble/hashes/esm/_sha2.js\");\n/* harmony import */ var _u64_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_u64.js */ \"../../node_modules/@noble/hashes/esm/_u64.js\");\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ \"../../node_modules/@noble/hashes/esm/utils.js\");\n\n\n\n// Round contants (first 32 bits of the fractional parts of the cube roots of the first 80 primes 2..409):\n// prettier-ignore\nconst [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].split([\n '0x428a2f98d728ae22', '0x7137449123ef65cd', '0xb5c0fbcfec4d3b2f', '0xe9b5dba58189dbbc',\n '0x3956c25bf348b538', '0x59f111f1b605d019', '0x923f82a4af194f9b', '0xab1c5ed5da6d8118',\n '0xd807aa98a3030242', '0x12835b0145706fbe', '0x243185be4ee4b28c', '0x550c7dc3d5ffb4e2',\n '0x72be5d74f27b896f', '0x80deb1fe3b1696b1', '0x9bdc06a725c71235', '0xc19bf174cf692694',\n '0xe49b69c19ef14ad2', '0xefbe4786384f25e3', '0x0fc19dc68b8cd5b5', '0x240ca1cc77ac9c65',\n '0x2de92c6f592b0275', '0x4a7484aa6ea6e483', '0x5cb0a9dcbd41fbd4', '0x76f988da831153b5',\n '0x983e5152ee66dfab', '0xa831c66d2db43210', '0xb00327c898fb213f', '0xbf597fc7beef0ee4',\n '0xc6e00bf33da88fc2', '0xd5a79147930aa725', '0x06ca6351e003826f', '0x142929670a0e6e70',\n '0x27b70a8546d22ffc', '0x2e1b21385c26c926', '0x4d2c6dfc5ac42aed', '0x53380d139d95b3df',\n '0x650a73548baf63de', '0x766a0abb3c77b2a8', '0x81c2c92e47edaee6', '0x92722c851482353b',\n '0xa2bfe8a14cf10364', '0xa81a664bbc423001', '0xc24b8b70d0f89791', '0xc76c51a30654be30',\n '0xd192e819d6ef5218', '0xd69906245565a910', '0xf40e35855771202a', '0x106aa07032bbd1b8',\n '0x19a4c116b8d2d0c8', '0x1e376c085141ab53', '0x2748774cdf8eeb99', '0x34b0bcb5e19b48a8',\n '0x391c0cb3c5c95a63', '0x4ed8aa4ae3418acb', '0x5b9cca4f7763e373', '0x682e6ff3d6b2b8a3',\n '0x748f82ee5defb2fc', '0x78a5636f43172f60', '0x84c87814a1f0ab72', '0x8cc702081a6439ec',\n '0x90befffa23631e28', '0xa4506cebde82bde9', '0xbef9a3f7b2c67915', '0xc67178f2e372532b',\n '0xca273eceea26619c', '0xd186b8c721c0c207', '0xeada7dd6cde0eb1e', '0xf57d4f7fee6ed178',\n '0x06f067aa72176fba', '0x0a637dc5a2c898a6', '0x113f9804bef90dae', '0x1b710b35131c471b',\n '0x28db77f523047d84', '0x32caab7b40c72493', '0x3c9ebe0a15c9bebc', '0x431d67c49c100d4c',\n '0x4cc5d4becb3e42b6', '0x597f299cfc657e2a', '0x5fcb6fab3ad6faec', '0x6c44198c4a475817'\n].map(n => BigInt(n))))();\n// Temporary buffer, not used to store anything between runs\nconst SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);\nconst SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);\nclass SHA512 extends _sha2_js__WEBPACK_IMPORTED_MODULE_1__.SHA2 {\n constructor() {\n super(128, 64, 16, false);\n // We cannot use array here since array allows indexing by variable which means optimizer/compiler cannot use registers.\n // Also looks cleaner and easier to verify with spec.\n // Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x6a09e667 | 0;\n this.Al = 0xf3bcc908 | 0;\n this.Bh = 0xbb67ae85 | 0;\n this.Bl = 0x84caa73b | 0;\n this.Ch = 0x3c6ef372 | 0;\n this.Cl = 0xfe94f82b | 0;\n this.Dh = 0xa54ff53a | 0;\n this.Dl = 0x5f1d36f1 | 0;\n this.Eh = 0x510e527f | 0;\n this.El = 0xade682d1 | 0;\n this.Fh = 0x9b05688c | 0;\n this.Fl = 0x2b3e6c1f | 0;\n this.Gh = 0x1f83d9ab | 0;\n this.Gl = 0xfb41bd6b | 0;\n this.Hh = 0x5be0cd19 | 0;\n this.Hl = 0x137e2179 | 0;\n }\n // prettier-ignore\n get() {\n const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n return [Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl];\n }\n // prettier-ignore\n set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {\n this.Ah = Ah | 0;\n this.Al = Al | 0;\n this.Bh = Bh | 0;\n this.Bl = Bl | 0;\n this.Ch = Ch | 0;\n this.Cl = Cl | 0;\n this.Dh = Dh | 0;\n this.Dl = Dl | 0;\n this.Eh = Eh | 0;\n this.El = El | 0;\n this.Fh = Fh | 0;\n this.Fl = Fl | 0;\n this.Gh = Gh | 0;\n this.Gl = Gl | 0;\n this.Hh = Hh | 0;\n this.Hl = Hl | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 64 words w[16..79] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4) {\n SHA512_W_H[i] = view.getUint32(offset);\n SHA512_W_L[i] = view.getUint32((offset += 4));\n }\n for (let i = 16; i < 80; i++) {\n // s0 := (w[i-15] rightrotate 1) xor (w[i-15] rightrotate 8) xor (w[i-15] rightshift 7)\n const W15h = SHA512_W_H[i - 15] | 0;\n const W15l = SHA512_W_L[i - 15] | 0;\n const s0h = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrSH(W15h, W15l, 1) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrSH(W15h, W15l, 8) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].shrSH(W15h, W15l, 7);\n const s0l = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrSL(W15h, W15l, 1) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrSL(W15h, W15l, 8) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].shrSL(W15h, W15l, 7);\n // s1 := (w[i-2] rightrotate 19) xor (w[i-2] rightrotate 61) xor (w[i-2] rightshift 6)\n const W2h = SHA512_W_H[i - 2] | 0;\n const W2l = SHA512_W_L[i - 2] | 0;\n const s1h = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrSH(W2h, W2l, 19) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrBH(W2h, W2l, 61) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].shrSH(W2h, W2l, 6);\n const s1l = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrSL(W2h, W2l, 19) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrBL(W2h, W2l, 61) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].shrSL(W2h, W2l, 6);\n // SHA256_W[i] = s0 + s1 + SHA256_W[i - 7] + SHA256_W[i - 16];\n const SUMl = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);\n const SUMh = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);\n SHA512_W_H[i] = SUMh | 0;\n SHA512_W_L[i] = SUMl | 0;\n }\n let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;\n // Compression function main loop, 80 rounds\n for (let i = 0; i < 80; i++) {\n // S1 := (e rightrotate 14) xor (e rightrotate 18) xor (e rightrotate 41)\n const sigma1h = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrSH(Eh, El, 14) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrSH(Eh, El, 18) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrBH(Eh, El, 41);\n const sigma1l = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrSL(Eh, El, 14) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrSL(Eh, El, 18) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrBL(Eh, El, 41);\n //const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const CHIh = (Eh & Fh) ^ (~Eh & Gh);\n const CHIl = (El & Fl) ^ (~El & Gl);\n // T1 = H + sigma1 + Chi(E, F, G) + SHA512_K[i] + SHA512_W[i]\n // prettier-ignore\n const T1ll = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);\n const T1h = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);\n const T1l = T1ll | 0;\n // S0 := (a rightrotate 28) xor (a rightrotate 34) xor (a rightrotate 39)\n const sigma0h = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrSH(Ah, Al, 28) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrBH(Ah, Al, 34) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrBH(Ah, Al, 39);\n const sigma0l = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrSL(Ah, Al, 28) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrBL(Ah, Al, 34) ^ _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rotrBL(Ah, Al, 39);\n const MAJh = (Ah & Bh) ^ (Ah & Ch) ^ (Bh & Ch);\n const MAJl = (Al & Bl) ^ (Al & Cl) ^ (Bl & Cl);\n Hh = Gh | 0;\n Hl = Gl | 0;\n Gh = Fh | 0;\n Gl = Fl | 0;\n Fh = Eh | 0;\n Fl = El | 0;\n ({ h: Eh, l: El } = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));\n Dh = Ch | 0;\n Dl = Cl | 0;\n Ch = Bh | 0;\n Cl = Bl | 0;\n Bh = Ah | 0;\n Bl = Al | 0;\n const All = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add3L(T1l, sigma0l, MAJl);\n Ah = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add3H(All, T1h, sigma0h, MAJh);\n Al = All | 0;\n }\n // Add the compressed chunk to the current hash value\n ({ h: Ah, l: Al } = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));\n ({ h: Bh, l: Bl } = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));\n ({ h: Ch, l: Cl } = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));\n ({ h: Dh, l: Dl } = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));\n ({ h: Eh, l: El } = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));\n ({ h: Fh, l: Fl } = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));\n ({ h: Gh, l: Gl } = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));\n ({ h: Hh, l: Hl } = _u64_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));\n this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);\n }\n roundClean() {\n SHA512_W_H.fill(0);\n SHA512_W_L.fill(0);\n }\n destroy() {\n this.buffer.fill(0);\n this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n }\n}\nclass SHA512_224 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x8c3d37c8 | 0;\n this.Al = 0x19544da2 | 0;\n this.Bh = 0x73e19966 | 0;\n this.Bl = 0x89dcd4d6 | 0;\n this.Ch = 0x1dfab7ae | 0;\n this.Cl = 0x32ff9c82 | 0;\n this.Dh = 0x679dd514 | 0;\n this.Dl = 0x582f9fcf | 0;\n this.Eh = 0x0f6d2b69 | 0;\n this.El = 0x7bd44da8 | 0;\n this.Fh = 0x77e36f73 | 0;\n this.Fl = 0x04c48942 | 0;\n this.Gh = 0x3f9d85a8 | 0;\n this.Gl = 0x6a1d36c8 | 0;\n this.Hh = 0x1112e6ad | 0;\n this.Hl = 0x91d692a1 | 0;\n this.outputLen = 28;\n }\n}\nclass SHA512_256 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0x22312194 | 0;\n this.Al = 0xfc2bf72c | 0;\n this.Bh = 0x9f555fa3 | 0;\n this.Bl = 0xc84c64c2 | 0;\n this.Ch = 0x2393b86b | 0;\n this.Cl = 0x6f53b151 | 0;\n this.Dh = 0x96387719 | 0;\n this.Dl = 0x5940eabd | 0;\n this.Eh = 0x96283ee2 | 0;\n this.El = 0xa88effe3 | 0;\n this.Fh = 0xbe5e1e25 | 0;\n this.Fl = 0x53863992 | 0;\n this.Gh = 0x2b0199fc | 0;\n this.Gl = 0x2c85b8aa | 0;\n this.Hh = 0x0eb72ddc | 0;\n this.Hl = 0x81c52ca2 | 0;\n this.outputLen = 32;\n }\n}\nclass SHA384 extends SHA512 {\n constructor() {\n super();\n // h -- high 32 bits, l -- low 32 bits\n this.Ah = 0xcbbb9d5d | 0;\n this.Al = 0xc1059ed8 | 0;\n this.Bh = 0x629a292a | 0;\n this.Bl = 0x367cd507 | 0;\n this.Ch = 0x9159015a | 0;\n this.Cl = 0x3070dd17 | 0;\n this.Dh = 0x152fecd8 | 0;\n this.Dl = 0xf70e5939 | 0;\n this.Eh = 0x67332667 | 0;\n this.El = 0xffc00b31 | 0;\n this.Fh = 0x8eb44a87 | 0;\n this.Fl = 0x68581511 | 0;\n this.Gh = 0xdb0c2e0d | 0;\n this.Gl = 0x64f98fa7 | 0;\n this.Hh = 0x47b5481d | 0;\n this.Hl = 0xbefa4fa4 | 0;\n this.outputLen = 48;\n }\n}\nconst sha512 = /* @__PURE__ */ (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.wrapConstructor)(() => new SHA512());\nconst sha512_224 = /* @__PURE__ */ (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.wrapConstructor)(() => new SHA512_224());\nconst sha512_256 = /* @__PURE__ */ (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.wrapConstructor)(() => new SHA512_256());\nconst sha384 = /* @__PURE__ */ (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.wrapConstructor)(() => new SHA384());\n//# sourceMappingURL=sha512.js.map\n\n//# sourceURL=webpack://mainnet-js/../../node_modules/@noble/hashes/esm/sha512.js?");
818
-
819
- /***/ }),
820
-
821
- /***/ "../../node_modules/@noble/hashes/esm/utils.js":
822
- /*!*****************************************************!*\
823
- !*** ../../node_modules/@noble/hashes/esm/utils.js ***!
824
- \*****************************************************/
825
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
826
-
827
- eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Hash\": () => (/* binding */ Hash),\n/* harmony export */ \"asyncLoop\": () => (/* binding */ asyncLoop),\n/* harmony export */ \"checkOpts\": () => (/* binding */ checkOpts),\n/* harmony export */ \"createView\": () => (/* binding */ createView),\n/* harmony export */ \"randomBytes\": () => (/* binding */ randomBytes),\n/* harmony export */ \"rotr\": () => (/* binding */ rotr),\n/* harmony export */ \"toBytes\": () => (/* binding */ toBytes),\n/* harmony export */ \"wrapConstructor\": () => (/* binding */ wrapConstructor)\n/* harmony export */ });\n/* unused harmony exports u8, u32, isLE, bytesToHex, hexToBytes, nextTick, utf8ToBytes, concatBytes, wrapConstructorWithOpts, wrapXOFConstructorWithOpts */\n/* harmony import */ var _noble_hashes_crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @noble/hashes/crypto */ \"../../node_modules/@noble/hashes/esm/crypto.js\");\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\n\n// Cast array to different type\nconst u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nconst u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\nfunction isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\n// Cast array to view\nconst createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nconst rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\n// Other libraries would silently corrupt the data instead of throwing an error,\n// when they don't support it.\nconst isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nfunction bytesToHex(bytes) {\n if (!isBytes(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 };\nfunction asciiToBase16(char) {\n if (char >= asciis._0 && char <= asciis._9)\n return char - asciis._0;\n if (char >= asciis._A && char <= asciis._F)\n return char - (asciis._A - 10);\n if (char >= asciis._a && char <= asciis._f)\n return char - (asciis._a - 10);\n return;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nfunction hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nconst nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nasync function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nfunction utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nfunction toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!isBytes(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nfunction concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n if (!isBytes(a))\n throw new Error('Uint8Array expected');\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// For runtime check if class implements interface\nclass Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nconst toStr = {}.toString;\nfunction checkOpts(defaults, opts) {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nfunction wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nfunction wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nfunction wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nfunction randomBytes(bytesLength = 32) {\n if (_noble_hashes_crypto__WEBPACK_IMPORTED_MODULE_0__.crypto && typeof _noble_hashes_crypto__WEBPACK_IMPORTED_MODULE_0__.crypto.getRandomValues === 'function') {\n return _noble_hashes_crypto__WEBPACK_IMPORTED_MODULE_0__.crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://mainnet-js/../../node_modules/@noble/hashes/esm/utils.js?");
828
-
829
- /***/ }),
830
-
831
- /***/ "../../node_modules/@scure/base/lib/esm/index.js":
832
- /*!*******************************************************!*\
833
- !*** ../../node_modules/@scure/base/lib/esm/index.js ***!
834
- \*******************************************************/
835
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
836
-
837
- eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"utils\": () => (/* binding */ utils)\n/* harmony export */ });\n/* unused harmony exports assertNumber, base16, base32, base32hex, base32crockford, base64, base64url, base64urlnopad, base58, base58flickr, base58xrp, base58xmr, createBase58check, base58check, bech32, bech32m, utf8, hex, bytesToString, str, stringToBytes, bytes */\n/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities\n/**\n * @__NO_SIDE_EFFECTS__\n */\nfunction assertNumber(n) {\n if (!Number.isSafeInteger(n))\n throw new Error(`Wrong integer: ${n}`);\n}\nfunction isBytes(a) {\n return (a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array'));\n}\n/**\n * @__NO_SIDE_EFFECTS__\n */\nfunction chain(...args) {\n const id = (a) => a;\n // Wrap call in closure so JIT can inline calls\n const wrap = (a, b) => (c) => a(b(c));\n // Construct chain of args[-1].encode(args[-2].encode([...]))\n const encode = args.map((x) => x.encode).reduceRight(wrap, id);\n // Construct chain of args[0].decode(args[1].decode(...))\n const decode = args.map((x) => x.decode).reduce(wrap, id);\n return { encode, decode };\n}\n/**\n * Encodes integer radix representation to array of strings using alphabet and back\n * @__NO_SIDE_EFFECTS__\n */\nfunction alphabet(alphabet) {\n return {\n encode: (digits) => {\n if (!Array.isArray(digits) || (digits.length && typeof digits[0] !== 'number'))\n throw new Error('alphabet.encode input should be an array of numbers');\n return digits.map((i) => {\n assertNumber(i);\n if (i < 0 || i >= alphabet.length)\n throw new Error(`Digit index outside alphabet: ${i} (alphabet: ${alphabet.length})`);\n return alphabet[i];\n });\n },\n decode: (input) => {\n if (!Array.isArray(input) || (input.length && typeof input[0] !== 'string'))\n throw new Error('alphabet.decode input should be array of strings');\n return input.map((letter) => {\n if (typeof letter !== 'string')\n throw new Error(`alphabet.decode: not string element=${letter}`);\n const index = alphabet.indexOf(letter);\n if (index === -1)\n throw new Error(`Unknown letter: \"${letter}\". Allowed: ${alphabet}`);\n return index;\n });\n },\n };\n}\n/**\n * @__NO_SIDE_EFFECTS__\n */\nfunction join(separator = '') {\n if (typeof separator !== 'string')\n throw new Error('join separator should be string');\n return {\n encode: (from) => {\n if (!Array.isArray(from) || (from.length && typeof from[0] !== 'string'))\n throw new Error('join.encode input should be array of strings');\n for (let i of from)\n if (typeof i !== 'string')\n throw new Error(`join.encode: non-string input=${i}`);\n return from.join(separator);\n },\n decode: (to) => {\n if (typeof to !== 'string')\n throw new Error('join.decode input should be string');\n return to.split(separator);\n },\n };\n}\n/**\n * Pad strings array so it has integer number of bits\n * @__NO_SIDE_EFFECTS__\n */\nfunction padding(bits, chr = '=') {\n assertNumber(bits);\n if (typeof chr !== 'string')\n throw new Error('padding chr should be string');\n return {\n encode(data) {\n if (!Array.isArray(data) || (data.length && typeof data[0] !== 'string'))\n throw new Error('padding.encode input should be array of strings');\n for (let i of data)\n if (typeof i !== 'string')\n throw new Error(`padding.encode: non-string input=${i}`);\n while ((data.length * bits) % 8)\n data.push(chr);\n return data;\n },\n decode(input) {\n if (!Array.isArray(input) || (input.length && typeof input[0] !== 'string'))\n throw new Error('padding.encode input should be array of strings');\n for (let i of input)\n if (typeof i !== 'string')\n throw new Error(`padding.decode: non-string input=${i}`);\n let end = input.length;\n if ((end * bits) % 8)\n throw new Error('Invalid padding: string should have whole number of bytes');\n for (; end > 0 && input[end - 1] === chr; end--) {\n if (!(((end - 1) * bits) % 8))\n throw new Error('Invalid padding: string has too much padding');\n }\n return input.slice(0, end);\n },\n };\n}\n/**\n * @__NO_SIDE_EFFECTS__\n */\nfunction normalize(fn) {\n if (typeof fn !== 'function')\n throw new Error('normalize fn should be function');\n return { encode: (from) => from, decode: (to) => fn(to) };\n}\n/**\n * Slow: O(n^2) time complexity\n * @__NO_SIDE_EFFECTS__\n */\nfunction convertRadix(data, from, to) {\n // base 1 is impossible\n if (from < 2)\n throw new Error(`convertRadix: wrong from=${from}, base cannot be less than 2`);\n if (to < 2)\n throw new Error(`convertRadix: wrong to=${to}, base cannot be less than 2`);\n if (!Array.isArray(data))\n throw new Error('convertRadix: data should be array');\n if (!data.length)\n return [];\n let pos = 0;\n const res = [];\n const digits = Array.from(data);\n digits.forEach((d) => {\n assertNumber(d);\n if (d < 0 || d >= from)\n throw new Error(`Wrong integer: ${d}`);\n });\n while (true) {\n let carry = 0;\n let done = true;\n for (let i = pos; i < digits.length; i++) {\n const digit = digits[i];\n const digitBase = from * carry + digit;\n if (!Number.isSafeInteger(digitBase) ||\n (from * carry) / from !== carry ||\n digitBase - digit !== from * carry) {\n throw new Error('convertRadix: carry overflow');\n }\n carry = digitBase % to;\n const rounded = Math.floor(digitBase / to);\n digits[i] = rounded;\n if (!Number.isSafeInteger(rounded) || rounded * to + carry !== digitBase)\n throw new Error('convertRadix: carry overflow');\n if (!done)\n continue;\n else if (!rounded)\n pos = i;\n else\n done = false;\n }\n res.push(carry);\n if (done)\n break;\n }\n for (let i = 0; i < data.length - 1 && data[i] === 0; i++)\n res.push(0);\n return res.reverse();\n}\nconst gcd = /* @__NO_SIDE_EFFECTS__ */ (a, b) => (!b ? a : gcd(b, a % b));\nconst radix2carry = /*@__NO_SIDE_EFFECTS__ */ (from, to) => from + (to - gcd(from, to));\n/**\n * Implemented with numbers, because BigInt is 5x slower\n * @__NO_SIDE_EFFECTS__\n */\nfunction convertRadix2(data, from, to, padding) {\n if (!Array.isArray(data))\n throw new Error('convertRadix2: data should be array');\n if (from <= 0 || from > 32)\n throw new Error(`convertRadix2: wrong from=${from}`);\n if (to <= 0 || to > 32)\n throw new Error(`convertRadix2: wrong to=${to}`);\n if (radix2carry(from, to) > 32) {\n throw new Error(`convertRadix2: carry overflow from=${from} to=${to} carryBits=${radix2carry(from, to)}`);\n }\n let carry = 0;\n let pos = 0; // bitwise position in current element\n const mask = 2 ** to - 1;\n const res = [];\n for (const n of data) {\n assertNumber(n);\n if (n >= 2 ** from)\n throw new Error(`convertRadix2: invalid data word=${n} from=${from}`);\n carry = (carry << from) | n;\n if (pos + from > 32)\n throw new Error(`convertRadix2: carry overflow pos=${pos} from=${from}`);\n pos += from;\n for (; pos >= to; pos -= to)\n res.push(((carry >> (pos - to)) & mask) >>> 0);\n carry &= 2 ** pos - 1; // clean carry, otherwise it will cause overflow\n }\n carry = (carry << (to - pos)) & mask;\n if (!padding && pos >= from)\n throw new Error('Excess padding');\n if (!padding && carry)\n throw new Error(`Non-zero padding: ${carry}`);\n if (padding && pos > 0)\n res.push(carry >>> 0);\n return res;\n}\n/**\n * @__NO_SIDE_EFFECTS__\n */\nfunction radix(num) {\n assertNumber(num);\n return {\n encode: (bytes) => {\n if (!isBytes(bytes))\n throw new Error('radix.encode input should be Uint8Array');\n return convertRadix(Array.from(bytes), 2 ** 8, num);\n },\n decode: (digits) => {\n if (!Array.isArray(digits) || (digits.length && typeof digits[0] !== 'number'))\n throw new Error('radix.decode input should be array of numbers');\n return Uint8Array.from(convertRadix(digits, num, 2 ** 8));\n },\n };\n}\n/**\n * If both bases are power of same number (like `2**8 <-> 2**64`),\n * there is a linear algorithm. For now we have implementation for power-of-two bases only.\n * @__NO_SIDE_EFFECTS__\n */\nfunction radix2(bits, revPadding = false) {\n assertNumber(bits);\n if (bits <= 0 || bits > 32)\n throw new Error('radix2: bits should be in (0..32]');\n if (radix2carry(8, bits) > 32 || radix2carry(bits, 8) > 32)\n throw new Error('radix2: carry overflow');\n return {\n encode: (bytes) => {\n if (!isBytes(bytes))\n throw new Error('radix2.encode input should be Uint8Array');\n return convertRadix2(Array.from(bytes), 8, bits, !revPadding);\n },\n decode: (digits) => {\n if (!Array.isArray(digits) || (digits.length && typeof digits[0] !== 'number'))\n throw new Error('radix2.decode input should be array of numbers');\n return Uint8Array.from(convertRadix2(digits, bits, 8, revPadding));\n },\n };\n}\n/**\n * @__NO_SIDE_EFFECTS__\n */\nfunction unsafeWrapper(fn) {\n if (typeof fn !== 'function')\n throw new Error('unsafeWrapper fn should be function');\n return function (...args) {\n try {\n return fn.apply(null, args);\n }\n catch (e) { }\n };\n}\n/**\n * @__NO_SIDE_EFFECTS__\n */\nfunction checksum(len, fn) {\n assertNumber(len);\n if (typeof fn !== 'function')\n throw new Error('checksum fn should be function');\n return {\n encode(data) {\n if (!isBytes(data))\n throw new Error('checksum.encode: input should be Uint8Array');\n const checksum = fn(data).slice(0, len);\n const res = new Uint8Array(data.length + len);\n res.set(data);\n res.set(checksum, data.length);\n return res;\n },\n decode(data) {\n if (!isBytes(data))\n throw new Error('checksum.decode: input should be Uint8Array');\n const payload = data.slice(0, -len);\n const newChecksum = fn(payload).slice(0, len);\n const oldChecksum = data.slice(-len);\n for (let i = 0; i < len; i++)\n if (newChecksum[i] !== oldChecksum[i])\n throw new Error('Invalid checksum');\n return payload;\n },\n };\n}\n// prettier-ignore\nconst utils = {\n alphabet, chain, checksum, convertRadix, convertRadix2, radix, radix2, join, padding,\n};\n// RFC 4648 aka RFC 3548\n// ---------------------\nconst base16 = /* @__PURE__ */ chain(radix2(4), alphabet('0123456789ABCDEF'), join(''));\nconst base32 = /* @__PURE__ */ chain(radix2(5), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'), padding(5), join(''));\nconst base32hex = /* @__PURE__ */ chain(radix2(5), alphabet('0123456789ABCDEFGHIJKLMNOPQRSTUV'), padding(5), join(''));\nconst base32crockford = /* @__PURE__ */ chain(radix2(5), alphabet('0123456789ABCDEFGHJKMNPQRSTVWXYZ'), join(''), normalize((s) => s.toUpperCase().replace(/O/g, '0').replace(/[IL]/g, '1')));\nconst base64 = /* @__PURE__ */ chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'), padding(6), join(''));\nconst base64url = /* @__PURE__ */ chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'), padding(6), join(''));\nconst base64urlnopad = /* @__PURE__ */ chain(radix2(6), alphabet('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'), join(''));\n// base58 code\n// -----------\nconst genBase58 = (abc) => chain(radix(58), alphabet(abc), join(''));\nconst base58 = /* @__PURE__ */ genBase58('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz');\nconst base58flickr = /* @__PURE__ */ genBase58('123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ');\nconst base58xrp = /* @__PURE__ */ genBase58('rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz');\n// xmr ver is done in 8-byte blocks (which equals 11 chars in decoding). Last (non-full) block padded with '1' to size in XMR_BLOCK_LEN.\n// Block encoding significantly reduces quadratic complexity of base58.\n// Data len (index) -> encoded block len\nconst XMR_BLOCK_LEN = [0, 2, 3, 5, 6, 7, 9, 10, 11];\nconst base58xmr = {\n encode(data) {\n let res = '';\n for (let i = 0; i < data.length; i += 8) {\n const block = data.subarray(i, i + 8);\n res += base58.encode(block).padStart(XMR_BLOCK_LEN[block.length], '1');\n }\n return res;\n },\n decode(str) {\n let res = [];\n for (let i = 0; i < str.length; i += 11) {\n const slice = str.slice(i, i + 11);\n const blockLen = XMR_BLOCK_LEN.indexOf(slice.length);\n const block = base58.decode(slice);\n for (let j = 0; j < block.length - blockLen; j++) {\n if (block[j] !== 0)\n throw new Error('base58xmr: wrong padding');\n }\n res = res.concat(Array.from(block.slice(block.length - blockLen)));\n }\n return Uint8Array.from(res);\n },\n};\nconst createBase58check = /* @__PURE__ */ (sha256) => chain(checksum(4, (data) => sha256(sha256(data))), base58);\n// legacy export, bad name\nconst base58check = createBase58check;\nconst BECH_ALPHABET = /* @__PURE__ */ chain(alphabet('qpzry9x8gf2tvdw0s3jn54khce6mua7l'), join(''));\nconst POLYMOD_GENERATORS = [0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3];\n/**\n * @__NO_SIDE_EFFECTS__\n */\nfunction bech32Polymod(pre) {\n const b = pre >> 25;\n let chk = (pre & 0x1ffffff) << 5;\n for (let i = 0; i < POLYMOD_GENERATORS.length; i++) {\n if (((b >> i) & 1) === 1)\n chk ^= POLYMOD_GENERATORS[i];\n }\n return chk;\n}\n/**\n * @__NO_SIDE_EFFECTS__\n */\nfunction bechChecksum(prefix, words, encodingConst = 1) {\n const len = prefix.length;\n let chk = 1;\n for (let i = 0; i < len; i++) {\n const c = prefix.charCodeAt(i);\n if (c < 33 || c > 126)\n throw new Error(`Invalid prefix (${prefix})`);\n chk = bech32Polymod(chk) ^ (c >> 5);\n }\n chk = bech32Polymod(chk);\n for (let i = 0; i < len; i++)\n chk = bech32Polymod(chk) ^ (prefix.charCodeAt(i) & 0x1f);\n for (let v of words)\n chk = bech32Polymod(chk) ^ v;\n for (let i = 0; i < 6; i++)\n chk = bech32Polymod(chk);\n chk ^= encodingConst;\n return BECH_ALPHABET.encode(convertRadix2([chk % 2 ** 30], 30, 5, false));\n}\n/**\n * @__NO_SIDE_EFFECTS__\n */\nfunction genBech32(encoding) {\n const ENCODING_CONST = encoding === 'bech32' ? 1 : 0x2bc830a3;\n const _words = radix2(5);\n const fromWords = _words.decode;\n const toWords = _words.encode;\n const fromWordsUnsafe = unsafeWrapper(fromWords);\n function encode(prefix, words, limit = 90) {\n if (typeof prefix !== 'string')\n throw new Error(`bech32.encode prefix should be string, not ${typeof prefix}`);\n if (!Array.isArray(words) || (words.length && typeof words[0] !== 'number'))\n throw new Error(`bech32.encode words should be array of numbers, not ${typeof words}`);\n const actualLength = prefix.length + 7 + words.length;\n if (limit !== false && actualLength > limit)\n throw new TypeError(`Length ${actualLength} exceeds limit ${limit}`);\n const lowered = prefix.toLowerCase();\n const sum = bechChecksum(lowered, words, ENCODING_CONST);\n return `${lowered}1${BECH_ALPHABET.encode(words)}${sum}`;\n }\n function decode(str, limit = 90) {\n if (typeof str !== 'string')\n throw new Error(`bech32.decode input should be string, not ${typeof str}`);\n if (str.length < 8 || (limit !== false && str.length > limit))\n throw new TypeError(`Wrong string length: ${str.length} (${str}). Expected (8..${limit})`);\n // don't allow mixed case\n const lowered = str.toLowerCase();\n if (str !== lowered && str !== str.toUpperCase())\n throw new Error(`String must be lowercase or uppercase`);\n str = lowered;\n const sepIndex = str.lastIndexOf('1');\n if (sepIndex === 0 || sepIndex === -1)\n throw new Error(`Letter \"1\" must be present between prefix and data only`);\n const prefix = str.slice(0, sepIndex);\n const _words = str.slice(sepIndex + 1);\n if (_words.length < 6)\n throw new Error('Data must be at least 6 characters long');\n const words = BECH_ALPHABET.decode(_words).slice(0, -6);\n const sum = bechChecksum(prefix, words, ENCODING_CONST);\n if (!_words.endsWith(sum))\n throw new Error(`Invalid checksum in ${str}: expected \"${sum}\"`);\n return { prefix, words };\n }\n const decodeUnsafe = unsafeWrapper(decode);\n function decodeToBytes(str) {\n const { prefix, words } = decode(str, false);\n return { prefix, words, bytes: fromWords(words) };\n }\n return { encode, decode, decodeToBytes, decodeUnsafe, fromWords, fromWordsUnsafe, toWords };\n}\nconst bech32 = /* @__PURE__ */ genBech32('bech32');\nconst bech32m = /* @__PURE__ */ genBech32('bech32m');\nconst utf8 = {\n encode: (data) => new TextDecoder().decode(data),\n decode: (str) => new TextEncoder().encode(str),\n};\nconst hex = /* @__PURE__ */ chain(radix2(4), alphabet('0123456789abcdef'), join(''), normalize((s) => {\n if (typeof s !== 'string' || s.length % 2)\n throw new TypeError(`hex.decode: expected string, got ${typeof s} with length ${s.length}`);\n return s.toLowerCase();\n}));\n// prettier-ignore\nconst CODERS = {\n utf8, hex, base16, base32, base64, base64url, base58, base58xmr\n};\nconst coderTypeError = 'Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr';\nconst bytesToString = (type, bytes) => {\n if (typeof type !== 'string' || !CODERS.hasOwnProperty(type))\n throw new TypeError(coderTypeError);\n if (!isBytes(bytes))\n throw new TypeError('bytesToString() expects Uint8Array');\n return CODERS[type].encode(bytes);\n};\nconst str = bytesToString; // as in python, but for bytes only\nconst stringToBytes = (type, str) => {\n if (!CODERS.hasOwnProperty(type))\n throw new TypeError(coderTypeError);\n if (typeof str !== 'string')\n throw new TypeError('stringToBytes() expects string');\n return CODERS[type].decode(str);\n};\nconst bytes = stringToBytes;\n\n\n//# sourceURL=webpack://mainnet-js/../../node_modules/@scure/base/lib/esm/index.js?");
838
-
839
- /***/ }),
840
-
841
- /***/ "../../node_modules/@scure/bip39/esm/index.js":
842
- /*!****************************************************!*\
843
- !*** ../../node_modules/@scure/bip39/esm/index.js ***!
844
- \****************************************************/
845
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
846
-
847
- eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"generateMnemonic\": () => (/* binding */ generateMnemonic),\n/* harmony export */ \"mnemonicToSeedSync\": () => (/* binding */ mnemonicToSeedSync)\n/* harmony export */ });\n/* unused harmony exports mnemonicToEntropy, entropyToMnemonic, validateMnemonic, mnemonicToSeed */\n/* harmony import */ var _noble_hashes_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @noble/hashes/_assert */ \"../../node_modules/@noble/hashes/esm/_assert.js\");\n/* harmony import */ var _noble_hashes_pbkdf2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @noble/hashes/pbkdf2 */ \"../../node_modules/@noble/hashes/esm/pbkdf2.js\");\n/* harmony import */ var _noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @noble/hashes/sha256 */ \"../../node_modules/@noble/hashes/esm/sha256.js\");\n/* harmony import */ var _noble_hashes_sha512__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @noble/hashes/sha512 */ \"../../node_modules/@noble/hashes/esm/sha512.js\");\n/* harmony import */ var _noble_hashes_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @noble/hashes/utils */ \"../../node_modules/@noble/hashes/esm/utils.js\");\n/* harmony import */ var _scure_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @scure/base */ \"../../node_modules/@scure/base/lib/esm/index.js\");\n/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */\n\n\n\n\n\n\n// Japanese wordlist\nconst isJapanese = (wordlist) => wordlist[0] === '\\u3042\\u3044\\u3053\\u304f\\u3057\\u3093';\n// Normalization replaces equivalent sequences of characters\n// so that any two texts that are equivalent will be reduced\n// to the same sequence of code points, called the normal form of the original text.\n// https://tonsky.me/blog/unicode/#why-is-a----\nfunction nfkd(str) {\n if (typeof str !== 'string')\n throw new TypeError(`Invalid mnemonic type: ${typeof str}`);\n return str.normalize('NFKD');\n}\nfunction normalize(str) {\n const norm = nfkd(str);\n const words = norm.split(' ');\n if (![12, 15, 18, 21, 24].includes(words.length))\n throw new Error('Invalid mnemonic');\n return { nfkd: norm, words };\n}\nfunction assertEntropy(entropy) {\n (0,_noble_hashes_assert__WEBPACK_IMPORTED_MODULE_0__.bytes)(entropy, 16, 20, 24, 28, 32);\n}\n/**\n * Generate x random words. Uses Cryptographically-Secure Random Number Generator.\n * @param wordlist imported wordlist for specific language\n * @param strength mnemonic strength 128-256 bits\n * @example\n * generateMnemonic(wordlist, 128)\n * // 'legal winner thank year wave sausage worth useful legal winner thank yellow'\n */\nfunction generateMnemonic(wordlist, strength = 128) {\n (0,_noble_hashes_assert__WEBPACK_IMPORTED_MODULE_0__.number)(strength);\n if (strength % 32 !== 0 || strength > 256)\n throw new TypeError('Invalid entropy');\n return entropyToMnemonic((0,_noble_hashes_utils__WEBPACK_IMPORTED_MODULE_1__.randomBytes)(strength / 8), wordlist);\n}\nconst calcChecksum = (entropy) => {\n // Checksum is ent.length/4 bits long\n const bitsLeft = 8 - entropy.length / 4;\n // Zero rightmost \"bitsLeft\" bits in byte\n // For example: bitsLeft=4 val=10111101 -> 10110000\n return new Uint8Array([((0,_noble_hashes_sha256__WEBPACK_IMPORTED_MODULE_2__.sha256)(entropy)[0] >> bitsLeft) << bitsLeft]);\n};\nfunction getCoder(wordlist) {\n if (!Array.isArray(wordlist) || wordlist.length !== 2048 || typeof wordlist[0] !== 'string')\n throw new Error('Wordlist: expected array of 2048 strings');\n wordlist.forEach((i) => {\n if (typeof i !== 'string')\n throw new Error(`Wordlist: non-string element: ${i}`);\n });\n return _scure_base__WEBPACK_IMPORTED_MODULE_3__.utils.chain(_scure_base__WEBPACK_IMPORTED_MODULE_3__.utils.checksum(1, calcChecksum), _scure_base__WEBPACK_IMPORTED_MODULE_3__.utils.radix2(11, true), _scure_base__WEBPACK_IMPORTED_MODULE_3__.utils.alphabet(wordlist));\n}\n/**\n * Reversible: Converts mnemonic string to raw entropy in form of byte array.\n * @param mnemonic 12-24 words\n * @param wordlist imported wordlist for specific language\n * @example\n * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';\n * mnemonicToEntropy(mnem, wordlist)\n * // Produces\n * new Uint8Array([\n * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,\n * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f\n * ])\n */\nfunction mnemonicToEntropy(mnemonic, wordlist) {\n const { words } = normalize(mnemonic);\n const entropy = getCoder(wordlist).decode(words);\n assertEntropy(entropy);\n return entropy;\n}\n/**\n * Reversible: Converts raw entropy in form of byte array to mnemonic string.\n * @param entropy byte array\n * @param wordlist imported wordlist for specific language\n * @returns 12-24 words\n * @example\n * const ent = new Uint8Array([\n * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,\n * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f\n * ]);\n * entropyToMnemonic(ent, wordlist);\n * // 'legal winner thank year wave sausage worth useful legal winner thank yellow'\n */\nfunction entropyToMnemonic(entropy, wordlist) {\n assertEntropy(entropy);\n const words = getCoder(wordlist).encode(entropy);\n return words.join(isJapanese(wordlist) ? '\\u3000' : ' ');\n}\n/**\n * Validates mnemonic for being 12-24 words contained in `wordlist`.\n */\nfunction validateMnemonic(mnemonic, wordlist) {\n try {\n mnemonicToEntropy(mnemonic, wordlist);\n }\n catch (e) {\n return false;\n }\n return true;\n}\nconst salt = (passphrase) => nfkd(`mnemonic${passphrase}`);\n/**\n * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.\n * @param mnemonic 12-24 words\n * @param passphrase string that will additionally protect the key\n * @returns 64 bytes of key data\n * @example\n * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';\n * await mnemonicToSeed(mnem, 'password');\n * // new Uint8Array([...64 bytes])\n */\nfunction mnemonicToSeed(mnemonic, passphrase = '') {\n return (0,_noble_hashes_pbkdf2__WEBPACK_IMPORTED_MODULE_4__.pbkdf2Async)(_noble_hashes_sha512__WEBPACK_IMPORTED_MODULE_5__.sha512, normalize(mnemonic).nfkd, salt(passphrase), { c: 2048, dkLen: 64 });\n}\n/**\n * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.\n * @param mnemonic 12-24 words\n * @param passphrase string that will additionally protect the key\n * @returns 64 bytes of key data\n * @example\n * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';\n * mnemonicToSeedSync(mnem, 'password');\n * // new Uint8Array([...64 bytes])\n */\nfunction mnemonicToSeedSync(mnemonic, passphrase = '') {\n return (0,_noble_hashes_pbkdf2__WEBPACK_IMPORTED_MODULE_4__.pbkdf2)(_noble_hashes_sha512__WEBPACK_IMPORTED_MODULE_5__.sha512, normalize(mnemonic).nfkd, salt(passphrase), { c: 2048, dkLen: 64 });\n}\n\n\n//# sourceURL=webpack://mainnet-js/../../node_modules/@scure/bip39/esm/index.js?");
848
-
849
- /***/ }),
850
-
851
- /***/ "../../node_modules/@scure/bip39/esm/wordlists/english.js":
852
- /*!****************************************************************!*\
853
- !*** ../../node_modules/@scure/bip39/esm/wordlists/english.js ***!
854
- \****************************************************************/
855
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
856
-
857
- eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"wordlist\": () => (/* binding */ wordlist)\n/* harmony export */ });\nconst wordlist = `abandon\nability\nable\nabout\nabove\nabsent\nabsorb\nabstract\nabsurd\nabuse\naccess\naccident\naccount\naccuse\nachieve\nacid\nacoustic\nacquire\nacross\nact\naction\nactor\nactress\nactual\nadapt\nadd\naddict\naddress\nadjust\nadmit\nadult\nadvance\nadvice\naerobic\naffair\nafford\nafraid\nagain\nage\nagent\nagree\nahead\naim\nair\nairport\naisle\nalarm\nalbum\nalcohol\nalert\nalien\nall\nalley\nallow\nalmost\nalone\nalpha\nalready\nalso\nalter\nalways\namateur\namazing\namong\namount\namused\nanalyst\nanchor\nancient\nanger\nangle\nangry\nanimal\nankle\nannounce\nannual\nanother\nanswer\nantenna\nantique\nanxiety\nany\napart\napology\nappear\napple\napprove\napril\narch\narctic\narea\narena\nargue\narm\narmed\narmor\narmy\naround\narrange\narrest\narrive\narrow\nart\nartefact\nartist\nartwork\nask\naspect\nassault\nasset\nassist\nassume\nasthma\nathlete\natom\nattack\nattend\nattitude\nattract\nauction\naudit\naugust\naunt\nauthor\nauto\nautumn\naverage\navocado\navoid\nawake\naware\naway\nawesome\nawful\nawkward\naxis\nbaby\nbachelor\nbacon\nbadge\nbag\nbalance\nbalcony\nball\nbamboo\nbanana\nbanner\nbar\nbarely\nbargain\nbarrel\nbase\nbasic\nbasket\nbattle\nbeach\nbean\nbeauty\nbecause\nbecome\nbeef\nbefore\nbegin\nbehave\nbehind\nbelieve\nbelow\nbelt\nbench\nbenefit\nbest\nbetray\nbetter\nbetween\nbeyond\nbicycle\nbid\nbike\nbind\nbiology\nbird\nbirth\nbitter\nblack\nblade\nblame\nblanket\nblast\nbleak\nbless\nblind\nblood\nblossom\nblouse\nblue\nblur\nblush\nboard\nboat\nbody\nboil\nbomb\nbone\nbonus\nbook\nboost\nborder\nboring\nborrow\nboss\nbottom\nbounce\nbox\nboy\nbracket\nbrain\nbrand\nbrass\nbrave\nbread\nbreeze\nbrick\nbridge\nbrief\nbright\nbring\nbrisk\nbroccoli\nbroken\nbronze\nbroom\nbrother\nbrown\nbrush\nbubble\nbuddy\nbudget\nbuffalo\nbuild\nbulb\nbulk\nbullet\nbundle\nbunker\nburden\nburger\nburst\nbus\nbusiness\nbusy\nbutter\nbuyer\nbuzz\ncabbage\ncabin\ncable\ncactus\ncage\ncake\ncall\ncalm\ncamera\ncamp\ncan\ncanal\ncancel\ncandy\ncannon\ncanoe\ncanvas\ncanyon\ncapable\ncapital\ncaptain\ncar\ncarbon\ncard\ncargo\ncarpet\ncarry\ncart\ncase\ncash\ncasino\ncastle\ncasual\ncat\ncatalog\ncatch\ncategory\ncattle\ncaught\ncause\ncaution\ncave\nceiling\ncelery\ncement\ncensus\ncentury\ncereal\ncertain\nchair\nchalk\nchampion\nchange\nchaos\nchapter\ncharge\nchase\nchat\ncheap\ncheck\ncheese\nchef\ncherry\nchest\nchicken\nchief\nchild\nchimney\nchoice\nchoose\nchronic\nchuckle\nchunk\nchurn\ncigar\ncinnamon\ncircle\ncitizen\ncity\ncivil\nclaim\nclap\nclarify\nclaw\nclay\nclean\nclerk\nclever\nclick\nclient\ncliff\nclimb\nclinic\nclip\nclock\nclog\nclose\ncloth\ncloud\nclown\nclub\nclump\ncluster\nclutch\ncoach\ncoast\ncoconut\ncode\ncoffee\ncoil\ncoin\ncollect\ncolor\ncolumn\ncombine\ncome\ncomfort\ncomic\ncommon\ncompany\nconcert\nconduct\nconfirm\ncongress\nconnect\nconsider\ncontrol\nconvince\ncook\ncool\ncopper\ncopy\ncoral\ncore\ncorn\ncorrect\ncost\ncotton\ncouch\ncountry\ncouple\ncourse\ncousin\ncover\ncoyote\ncrack\ncradle\ncraft\ncram\ncrane\ncrash\ncrater\ncrawl\ncrazy\ncream\ncredit\ncreek\ncrew\ncricket\ncrime\ncrisp\ncritic\ncrop\ncross\ncrouch\ncrowd\ncrucial\ncruel\ncruise\ncrumble\ncrunch\ncrush\ncry\ncrystal\ncube\nculture\ncup\ncupboard\ncurious\ncurrent\ncurtain\ncurve\ncushion\ncustom\ncute\ncycle\ndad\ndamage\ndamp\ndance\ndanger\ndaring\ndash\ndaughter\ndawn\nday\ndeal\ndebate\ndebris\ndecade\ndecember\ndecide\ndecline\ndecorate\ndecrease\ndeer\ndefense\ndefine\ndefy\ndegree\ndelay\ndeliver\ndemand\ndemise\ndenial\ndentist\ndeny\ndepart\ndepend\ndeposit\ndepth\ndeputy\nderive\ndescribe\ndesert\ndesign\ndesk\ndespair\ndestroy\ndetail\ndetect\ndevelop\ndevice\ndevote\ndiagram\ndial\ndiamond\ndiary\ndice\ndiesel\ndiet\ndiffer\ndigital\ndignity\ndilemma\ndinner\ndinosaur\ndirect\ndirt\ndisagree\ndiscover\ndisease\ndish\ndismiss\ndisorder\ndisplay\ndistance\ndivert\ndivide\ndivorce\ndizzy\ndoctor\ndocument\ndog\ndoll\ndolphin\ndomain\ndonate\ndonkey\ndonor\ndoor\ndose\ndouble\ndove\ndraft\ndragon\ndrama\ndrastic\ndraw\ndream\ndress\ndrift\ndrill\ndrink\ndrip\ndrive\ndrop\ndrum\ndry\nduck\ndumb\ndune\nduring\ndust\ndutch\nduty\ndwarf\ndynamic\neager\neagle\nearly\nearn\nearth\neasily\neast\neasy\necho\necology\neconomy\nedge\nedit\neducate\neffort\negg\neight\neither\nelbow\nelder\nelectric\nelegant\nelement\nelephant\nelevator\nelite\nelse\nembark\nembody\nembrace\nemerge\nemotion\nemploy\nempower\nempty\nenable\nenact\nend\nendless\nendorse\nenemy\nenergy\nenforce\nengage\nengine\nenhance\nenjoy\nenlist\nenough\nenrich\nenroll\nensure\nenter\nentire\nentry\nenvelope\nepisode\nequal\nequip\nera\nerase\nerode\nerosion\nerror\nerupt\nescape\nessay\nessence\nestate\neternal\nethics\nevidence\nevil\nevoke\nevolve\nexact\nexample\nexcess\nexchange\nexcite\nexclude\nexcuse\nexecute\nexercise\nexhaust\nexhibit\nexile\nexist\nexit\nexotic\nexpand\nexpect\nexpire\nexplain\nexpose\nexpress\nextend\nextra\neye\neyebrow\nfabric\nface\nfaculty\nfade\nfaint\nfaith\nfall\nfalse\nfame\nfamily\nfamous\nfan\nfancy\nfantasy\nfarm\nfashion\nfat\nfatal\nfather\nfatigue\nfault\nfavorite\nfeature\nfebruary\nfederal\nfee\nfeed\nfeel\nfemale\nfence\nfestival\nfetch\nfever\nfew\nfiber\nfiction\nfield\nfigure\nfile\nfilm\nfilter\nfinal\nfind\nfine\nfinger\nfinish\nfire\nfirm\nfirst\nfiscal\nfish\nfit\nfitness\nfix\nflag\nflame\nflash\nflat\nflavor\nflee\nflight\nflip\nfloat\nflock\nfloor\nflower\nfluid\nflush\nfly\nfoam\nfocus\nfog\nfoil\nfold\nfollow\nfood\nfoot\nforce\nforest\nforget\nfork\nfortune\nforum\nforward\nfossil\nfoster\nfound\nfox\nfragile\nframe\nfrequent\nfresh\nfriend\nfringe\nfrog\nfront\nfrost\nfrown\nfrozen\nfruit\nfuel\nfun\nfunny\nfurnace\nfury\nfuture\ngadget\ngain\ngalaxy\ngallery\ngame\ngap\ngarage\ngarbage\ngarden\ngarlic\ngarment\ngas\ngasp\ngate\ngather\ngauge\ngaze\ngeneral\ngenius\ngenre\ngentle\ngenuine\ngesture\nghost\ngiant\ngift\ngiggle\nginger\ngiraffe\ngirl\ngive\nglad\nglance\nglare\nglass\nglide\nglimpse\nglobe\ngloom\nglory\nglove\nglow\nglue\ngoat\ngoddess\ngold\ngood\ngoose\ngorilla\ngospel\ngossip\ngovern\ngown\ngrab\ngrace\ngrain\ngrant\ngrape\ngrass\ngravity\ngreat\ngreen\ngrid\ngrief\ngrit\ngrocery\ngroup\ngrow\ngrunt\nguard\nguess\nguide\nguilt\nguitar\ngun\ngym\nhabit\nhair\nhalf\nhammer\nhamster\nhand\nhappy\nharbor\nhard\nharsh\nharvest\nhat\nhave\nhawk\nhazard\nhead\nhealth\nheart\nheavy\nhedgehog\nheight\nhello\nhelmet\nhelp\nhen\nhero\nhidden\nhigh\nhill\nhint\nhip\nhire\nhistory\nhobby\nhockey\nhold\nhole\nholiday\nhollow\nhome\nhoney\nhood\nhope\nhorn\nhorror\nhorse\nhospital\nhost\nhotel\nhour\nhover\nhub\nhuge\nhuman\nhumble\nhumor\nhundred\nhungry\nhunt\nhurdle\nhurry\nhurt\nhusband\nhybrid\nice\nicon\nidea\nidentify\nidle\nignore\nill\nillegal\nillness\nimage\nimitate\nimmense\nimmune\nimpact\nimpose\nimprove\nimpulse\ninch\ninclude\nincome\nincrease\nindex\nindicate\nindoor\nindustry\ninfant\ninflict\ninform\ninhale\ninherit\ninitial\ninject\ninjury\ninmate\ninner\ninnocent\ninput\ninquiry\ninsane\ninsect\ninside\ninspire\ninstall\nintact\ninterest\ninto\ninvest\ninvite\ninvolve\niron\nisland\nisolate\nissue\nitem\nivory\njacket\njaguar\njar\njazz\njealous\njeans\njelly\njewel\njob\njoin\njoke\njourney\njoy\njudge\njuice\njump\njungle\njunior\njunk\njust\nkangaroo\nkeen\nkeep\nketchup\nkey\nkick\nkid\nkidney\nkind\nkingdom\nkiss\nkit\nkitchen\nkite\nkitten\nkiwi\nknee\nknife\nknock\nknow\nlab\nlabel\nlabor\nladder\nlady\nlake\nlamp\nlanguage\nlaptop\nlarge\nlater\nlatin\nlaugh\nlaundry\nlava\nlaw\nlawn\nlawsuit\nlayer\nlazy\nleader\nleaf\nlearn\nleave\nlecture\nleft\nleg\nlegal\nlegend\nleisure\nlemon\nlend\nlength\nlens\nleopard\nlesson\nletter\nlevel\nliar\nliberty\nlibrary\nlicense\nlife\nlift\nlight\nlike\nlimb\nlimit\nlink\nlion\nliquid\nlist\nlittle\nlive\nlizard\nload\nloan\nlobster\nlocal\nlock\nlogic\nlonely\nlong\nloop\nlottery\nloud\nlounge\nlove\nloyal\nlucky\nluggage\nlumber\nlunar\nlunch\nluxury\nlyrics\nmachine\nmad\nmagic\nmagnet\nmaid\nmail\nmain\nmajor\nmake\nmammal\nman\nmanage\nmandate\nmango\nmansion\nmanual\nmaple\nmarble\nmarch\nmargin\nmarine\nmarket\nmarriage\nmask\nmass\nmaster\nmatch\nmaterial\nmath\nmatrix\nmatter\nmaximum\nmaze\nmeadow\nmean\nmeasure\nmeat\nmechanic\nmedal\nmedia\nmelody\nmelt\nmember\nmemory\nmention\nmenu\nmercy\nmerge\nmerit\nmerry\nmesh\nmessage\nmetal\nmethod\nmiddle\nmidnight\nmilk\nmillion\nmimic\nmind\nminimum\nminor\nminute\nmiracle\nmirror\nmisery\nmiss\nmistake\nmix\nmixed\nmixture\nmobile\nmodel\nmodify\nmom\nmoment\nmonitor\nmonkey\nmonster\nmonth\nmoon\nmoral\nmore\nmorning\nmosquito\nmother\nmotion\nmotor\nmountain\nmouse\nmove\nmovie\nmuch\nmuffin\nmule\nmultiply\nmuscle\nmuseum\nmushroom\nmusic\nmust\nmutual\nmyself\nmystery\nmyth\nnaive\nname\nnapkin\nnarrow\nnasty\nnation\nnature\nnear\nneck\nneed\nnegative\nneglect\nneither\nnephew\nnerve\nnest\nnet\nnetwork\nneutral\nnever\nnews\nnext\nnice\nnight\nnoble\nnoise\nnominee\nnoodle\nnormal\nnorth\nnose\nnotable\nnote\nnothing\nnotice\nnovel\nnow\nnuclear\nnumber\nnurse\nnut\noak\nobey\nobject\noblige\nobscure\nobserve\nobtain\nobvious\noccur\nocean\noctober\nodor\noff\noffer\noffice\noften\noil\nokay\nold\nolive\nolympic\nomit\nonce\none\nonion\nonline\nonly\nopen\nopera\nopinion\noppose\noption\norange\norbit\norchard\norder\nordinary\norgan\norient\noriginal\norphan\nostrich\nother\noutdoor\nouter\noutput\noutside\noval\noven\nover\nown\nowner\noxygen\noyster\nozone\npact\npaddle\npage\npair\npalace\npalm\npanda\npanel\npanic\npanther\npaper\nparade\nparent\npark\nparrot\nparty\npass\npatch\npath\npatient\npatrol\npattern\npause\npave\npayment\npeace\npeanut\npear\npeasant\npelican\npen\npenalty\npencil\npeople\npepper\nperfect\npermit\nperson\npet\nphone\nphoto\nphrase\nphysical\npiano\npicnic\npicture\npiece\npig\npigeon\npill\npilot\npink\npioneer\npipe\npistol\npitch\npizza\nplace\nplanet\nplastic\nplate\nplay\nplease\npledge\npluck\nplug\nplunge\npoem\npoet\npoint\npolar\npole\npolice\npond\npony\npool\npopular\nportion\nposition\npossible\npost\npotato\npottery\npoverty\npowder\npower\npractice\npraise\npredict\nprefer\nprepare\npresent\npretty\nprevent\nprice\npride\nprimary\nprint\npriority\nprison\nprivate\nprize\nproblem\nprocess\nproduce\nprofit\nprogram\nproject\npromote\nproof\nproperty\nprosper\nprotect\nproud\nprovide\npublic\npudding\npull\npulp\npulse\npumpkin\npunch\npupil\npuppy\npurchase\npurity\npurpose\npurse\npush\nput\npuzzle\npyramid\nquality\nquantum\nquarter\nquestion\nquick\nquit\nquiz\nquote\nrabbit\nraccoon\nrace\nrack\nradar\nradio\nrail\nrain\nraise\nrally\nramp\nranch\nrandom\nrange\nrapid\nrare\nrate\nrather\nraven\nraw\nrazor\nready\nreal\nreason\nrebel\nrebuild\nrecall\nreceive\nrecipe\nrecord\nrecycle\nreduce\nreflect\nreform\nrefuse\nregion\nregret\nregular\nreject\nrelax\nrelease\nrelief\nrely\nremain\nremember\nremind\nremove\nrender\nrenew\nrent\nreopen\nrepair\nrepeat\nreplace\nreport\nrequire\nrescue\nresemble\nresist\nresource\nresponse\nresult\nretire\nretreat\nreturn\nreunion\nreveal\nreview\nreward\nrhythm\nrib\nribbon\nrice\nrich\nride\nridge\nrifle\nright\nrigid\nring\nriot\nripple\nrisk\nritual\nrival\nriver\nroad\nroast\nrobot\nrobust\nrocket\nromance\nroof\nrookie\nroom\nrose\nrotate\nrough\nround\nroute\nroyal\nrubber\nrude\nrug\nrule\nrun\nrunway\nrural\nsad\nsaddle\nsadness\nsafe\nsail\nsalad\nsalmon\nsalon\nsalt\nsalute\nsame\nsample\nsand\nsatisfy\nsatoshi\nsauce\nsausage\nsave\nsay\nscale\nscan\nscare\nscatter\nscene\nscheme\nschool\nscience\nscissors\nscorpion\nscout\nscrap\nscreen\nscript\nscrub\nsea\nsearch\nseason\nseat\nsecond\nsecret\nsection\nsecurity\nseed\nseek\nsegment\nselect\nsell\nseminar\nsenior\nsense\nsentence\nseries\nservice\nsession\nsettle\nsetup\nseven\nshadow\nshaft\nshallow\nshare\nshed\nshell\nsheriff\nshield\nshift\nshine\nship\nshiver\nshock\nshoe\nshoot\nshop\nshort\nshoulder\nshove\nshrimp\nshrug\nshuffle\nshy\nsibling\nsick\nside\nsiege\nsight\nsign\nsilent\nsilk\nsilly\nsilver\nsimilar\nsimple\nsince\nsing\nsiren\nsister\nsituate\nsix\nsize\nskate\nsketch\nski\nskill\nskin\nskirt\nskull\nslab\nslam\nsleep\nslender\nslice\nslide\nslight\nslim\nslogan\nslot\nslow\nslush\nsmall\nsmart\nsmile\nsmoke\nsmooth\nsnack\nsnake\nsnap\nsniff\nsnow\nsoap\nsoccer\nsocial\nsock\nsoda\nsoft\nsolar\nsoldier\nsolid\nsolution\nsolve\nsomeone\nsong\nsoon\nsorry\nsort\nsoul\nsound\nsoup\nsource\nsouth\nspace\nspare\nspatial\nspawn\nspeak\nspecial\nspeed\nspell\nspend\nsphere\nspice\nspider\nspike\nspin\nspirit\nsplit\nspoil\nsponsor\nspoon\nsport\nspot\nspray\nspread\nspring\nspy\nsquare\nsqueeze\nsquirrel\nstable\nstadium\nstaff\nstage\nstairs\nstamp\nstand\nstart\nstate\nstay\nsteak\nsteel\nstem\nstep\nstereo\nstick\nstill\nsting\nstock\nstomach\nstone\nstool\nstory\nstove\nstrategy\nstreet\nstrike\nstrong\nstruggle\nstudent\nstuff\nstumble\nstyle\nsubject\nsubmit\nsubway\nsuccess\nsuch\nsudden\nsuffer\nsugar\nsuggest\nsuit\nsummer\nsun\nsunny\nsunset\nsuper\nsupply\nsupreme\nsure\nsurface\nsurge\nsurprise\nsurround\nsurvey\nsuspect\nsustain\nswallow\nswamp\nswap\nswarm\nswear\nsweet\nswift\nswim\nswing\nswitch\nsword\nsymbol\nsymptom\nsyrup\nsystem\ntable\ntackle\ntag\ntail\ntalent\ntalk\ntank\ntape\ntarget\ntask\ntaste\ntattoo\ntaxi\nteach\nteam\ntell\nten\ntenant\ntennis\ntent\nterm\ntest\ntext\nthank\nthat\ntheme\nthen\ntheory\nthere\nthey\nthing\nthis\nthought\nthree\nthrive\nthrow\nthumb\nthunder\nticket\ntide\ntiger\ntilt\ntimber\ntime\ntiny\ntip\ntired\ntissue\ntitle\ntoast\ntobacco\ntoday\ntoddler\ntoe\ntogether\ntoilet\ntoken\ntomato\ntomorrow\ntone\ntongue\ntonight\ntool\ntooth\ntop\ntopic\ntopple\ntorch\ntornado\ntortoise\ntoss\ntotal\ntourist\ntoward\ntower\ntown\ntoy\ntrack\ntrade\ntraffic\ntragic\ntrain\ntransfer\ntrap\ntrash\ntravel\ntray\ntreat\ntree\ntrend\ntrial\ntribe\ntrick\ntrigger\ntrim\ntrip\ntrophy\ntrouble\ntruck\ntrue\ntruly\ntrumpet\ntrust\ntruth\ntry\ntube\ntuition\ntumble\ntuna\ntunnel\nturkey\nturn\nturtle\ntwelve\ntwenty\ntwice\ntwin\ntwist\ntwo\ntype\ntypical\nugly\numbrella\nunable\nunaware\nuncle\nuncover\nunder\nundo\nunfair\nunfold\nunhappy\nuniform\nunique\nunit\nuniverse\nunknown\nunlock\nuntil\nunusual\nunveil\nupdate\nupgrade\nuphold\nupon\nupper\nupset\nurban\nurge\nusage\nuse\nused\nuseful\nuseless\nusual\nutility\nvacant\nvacuum\nvague\nvalid\nvalley\nvalve\nvan\nvanish\nvapor\nvarious\nvast\nvault\nvehicle\nvelvet\nvendor\nventure\nvenue\nverb\nverify\nversion\nvery\nvessel\nveteran\nviable\nvibrant\nvicious\nvictory\nvideo\nview\nvillage\nvintage\nviolin\nvirtual\nvirus\nvisa\nvisit\nvisual\nvital\nvivid\nvocal\nvoice\nvoid\nvolcano\nvolume\nvote\nvoyage\nwage\nwagon\nwait\nwalk\nwall\nwalnut\nwant\nwarfare\nwarm\nwarrior\nwash\nwasp\nwaste\nwater\nwave\nway\nwealth\nweapon\nwear\nweasel\nweather\nweb\nwedding\nweekend\nweird\nwelcome\nwest\nwet\nwhale\nwhat\nwheat\nwheel\nwhen\nwhere\nwhip\nwhisper\nwide\nwidth\nwife\nwild\nwill\nwin\nwindow\nwine\nwing\nwink\nwinner\nwinter\nwire\nwisdom\nwise\nwish\nwitness\nwolf\nwoman\nwonder\nwood\nwool\nword\nwork\nworld\nworry\nworth\nwrap\nwreck\nwrestle\nwrist\nwrite\nwrong\nyard\nyear\nyellow\nyou\nyoung\nyouth\nzebra\nzero\nzone\nzoo`.split('\\n');\n\n\n//# sourceURL=webpack://mainnet-js/../../node_modules/@scure/bip39/esm/wordlists/english.js?");
858
-
859
- /***/ }),
860
-
861
741
  /***/ "../../node_modules/async-mutex/index.mjs":
862
742
  /*!************************************************!*\
863
743
  !*** ../../node_modules/async-mutex/index.mjs ***!
@@ -1204,7 +1084,17 @@ eval("__webpack_require__.a(__webpack_module__, async (__webpack_handle_async_de
1204
1084
  \****************************************************************/
1205
1085
  /***/ ((__webpack_module__, __webpack_exports__, __webpack_require__) => {
1206
1086
 
1207
- eval("__webpack_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"hmacSha512\": () => (/* binding */ hmacSha512)\n/* harmony export */ });\n/* unused harmony exports instantiateHmacFunction, hmacSha256 */\n/* harmony import */ var _crypto_default_crypto_instances_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../crypto/default-crypto-instances.js */ \"./node_modules/@bitauth/libauth/build/lib/crypto/default-crypto-instances.js\");\n/* harmony import */ var _format_format_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../format/format.js */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_crypto_default_crypto_instances_js__WEBPACK_IMPORTED_MODULE_1__]);\n_crypto_default_crypto_instances_js__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];\n\n\n/**\n * Instantiate a hash-based message authentication code (HMAC) function as\n * specified by RFC 2104.\n *\n * @param hashFunction - a cryptographic hash function that iterates a basic\n * compression function over blocks of data\n * @param blockByteLength - the byte-length of blocks used in `hashFunction`\n */\nconst instantiateHmacFunction = (hashFunction, blockByteLength) => (secret, message) => {\n const key = new Uint8Array(blockByteLength).fill(0);\n // eslint-disable-next-line functional/no-expression-statements\n key.set(secret.length > blockByteLength ? hashFunction(secret) : secret, 0);\n const innerPaddingFill = 0x36;\n const innerPadding = new Uint8Array(blockByteLength).fill(innerPaddingFill);\n // eslint-disable-next-line no-bitwise, @typescript-eslint/no-non-null-assertion\n const innerPrefix = innerPadding.map((pad, index) => pad ^ key[index]);\n const innerContent = (0,_format_format_js__WEBPACK_IMPORTED_MODULE_0__.flattenBinArray)([innerPrefix, message]);\n const innerResult = hashFunction(innerContent);\n const outerPaddingFill = 0x5c;\n const outerPadding = new Uint8Array(blockByteLength).fill(outerPaddingFill);\n // eslint-disable-next-line no-bitwise, @typescript-eslint/no-non-null-assertion\n const outerPrefix = outerPadding.map((pad, index) => pad ^ key[index]);\n return hashFunction((0,_format_format_js__WEBPACK_IMPORTED_MODULE_0__.flattenBinArray)([outerPrefix, innerResult]));\n};\nconst sha256BlockByteLength = 64;\n/**\n * Create a hash-based message authentication code using HMAC-SHA256 as\n * specified in `RFC 4231`. Returns a 32-byte Uint8Array.\n *\n * Secrets longer than the block byte-length (64 bytes) are hashed before\n * use, shortening their length to the minimum recommended length (32 bytes).\n * See `RFC 2104` for details.\n *\n * @param secret - the secret key (recommended length: 32-64 bytes)\n * @param message - the message to authenticate\n * @param sha256 - an implementation of Sha256 (defaults to the\n * internal WASM implementation)\n */\nconst hmacSha256 = (secret, message, sha256 = _crypto_default_crypto_instances_js__WEBPACK_IMPORTED_MODULE_1__.sha256) => instantiateHmacFunction(sha256.hash, sha256BlockByteLength)(secret, message);\nconst sha512BlockByteLength = 128;\n/**\n * Create a hash-based message authentication code using HMAC-SHA512 as\n * specified in `RFC 4231`. Returns a 64-byte Uint8Array.\n *\n * Secrets longer than the block byte-length (128 bytes) are hashed before\n * use, shortening their length to the minimum recommended length (64 bytes).\n * See `RFC 2104` for details.\n *\n * @param secret - the secret key (recommended length: 64-128 bytes)\n * @param message - the message to authenticate\n * @param sha512 - an implementation of Sha512 (defaults to the\n * internal WASM implementation)\n */\nconst hmacSha512 = (secret, message, sha512 = _crypto_default_crypto_instances_js__WEBPACK_IMPORTED_MODULE_1__.sha512) => instantiateHmacFunction(sha512.hash, sha512BlockByteLength)(secret, message);\n//# sourceMappingURL=hmac.js.map\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./node_modules/@bitauth/libauth/build/lib/crypto/hmac.js?");
1087
+ eval("__webpack_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"hmacSha256\": () => (/* binding */ hmacSha256),\n/* harmony export */ \"hmacSha512\": () => (/* binding */ hmacSha512)\n/* harmony export */ });\n/* unused harmony export instantiateHmacFunction */\n/* harmony import */ var _crypto_default_crypto_instances_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../crypto/default-crypto-instances.js */ \"./node_modules/@bitauth/libauth/build/lib/crypto/default-crypto-instances.js\");\n/* harmony import */ var _format_format_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../format/format.js */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_crypto_default_crypto_instances_js__WEBPACK_IMPORTED_MODULE_1__]);\n_crypto_default_crypto_instances_js__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];\n\n\n/**\n * Instantiate a hash-based message authentication code (HMAC) function as\n * specified by RFC 2104.\n *\n * @param hashFunction - a cryptographic hash function that iterates a basic\n * compression function over blocks of data\n * @param blockByteLength - the byte-length of blocks used in `hashFunction`\n */\nconst instantiateHmacFunction = (hashFunction, blockByteLength) => (secret, message) => {\n const key = new Uint8Array(blockByteLength).fill(0);\n // eslint-disable-next-line functional/no-expression-statements\n key.set(secret.length > blockByteLength ? hashFunction(secret) : secret, 0);\n const innerPaddingFill = 0x36;\n const innerPadding = new Uint8Array(blockByteLength).fill(innerPaddingFill);\n // eslint-disable-next-line no-bitwise, @typescript-eslint/no-non-null-assertion\n const innerPrefix = innerPadding.map((pad, index) => pad ^ key[index]);\n const innerContent = (0,_format_format_js__WEBPACK_IMPORTED_MODULE_0__.flattenBinArray)([innerPrefix, message]);\n const innerResult = hashFunction(innerContent);\n const outerPaddingFill = 0x5c;\n const outerPadding = new Uint8Array(blockByteLength).fill(outerPaddingFill);\n // eslint-disable-next-line no-bitwise, @typescript-eslint/no-non-null-assertion\n const outerPrefix = outerPadding.map((pad, index) => pad ^ key[index]);\n return hashFunction((0,_format_format_js__WEBPACK_IMPORTED_MODULE_0__.flattenBinArray)([outerPrefix, innerResult]));\n};\nconst sha256BlockByteLength = 64;\n/**\n * Create a hash-based message authentication code using HMAC-SHA256 as\n * specified in `RFC 4231`. Returns a 32-byte Uint8Array.\n *\n * Secrets longer than the block byte-length (64 bytes) are hashed before\n * use, shortening their length to the minimum recommended length (32 bytes).\n * See `RFC 2104` for details.\n *\n * @param secret - the secret key (recommended length: 32-64 bytes)\n * @param message - the message to authenticate\n * @param sha256 - an implementation of Sha256 (defaults to the\n * internal WASM implementation)\n */\nconst hmacSha256 = (secret, message, sha256 = _crypto_default_crypto_instances_js__WEBPACK_IMPORTED_MODULE_1__.sha256) => instantiateHmacFunction(sha256.hash, sha256BlockByteLength)(secret, message);\nconst sha512BlockByteLength = 128;\n/**\n * Create a hash-based message authentication code using HMAC-SHA512 as\n * specified in `RFC 4231`. Returns a 64-byte Uint8Array.\n *\n * Secrets longer than the block byte-length (128 bytes) are hashed before\n * use, shortening their length to the minimum recommended length (64 bytes).\n * See `RFC 2104` for details.\n *\n * @param secret - the secret key (recommended length: 64-128 bytes)\n * @param message - the message to authenticate\n * @param sha512 - an implementation of Sha512 (defaults to the\n * internal WASM implementation)\n */\nconst hmacSha512 = (secret, message, sha512 = _crypto_default_crypto_instances_js__WEBPACK_IMPORTED_MODULE_1__.sha512) => instantiateHmacFunction(sha512.hash, sha512BlockByteLength)(secret, message);\n//# sourceMappingURL=hmac.js.map\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./node_modules/@bitauth/libauth/build/lib/crypto/hmac.js?");
1088
+
1089
+ /***/ }),
1090
+
1091
+ /***/ "./node_modules/@bitauth/libauth/build/lib/crypto/pbkdf2.js":
1092
+ /*!******************************************************************!*\
1093
+ !*** ./node_modules/@bitauth/libauth/build/lib/crypto/pbkdf2.js ***!
1094
+ \******************************************************************/
1095
+ /***/ ((__webpack_module__, __webpack_exports__, __webpack_require__) => {
1096
+
1097
+ eval("__webpack_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"pbkdf2HmacSha512\": () => (/* binding */ pbkdf2HmacSha512)\n/* harmony export */ });\n/* unused harmony exports Pbkdf2Error, instantiatePbkdf2Function, pbkdf2HmacSha256 */\n/* harmony import */ var _format_format_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../format/format.js */ \"./node_modules/@bitauth/libauth/build/lib/format/error.js\");\n/* harmony import */ var _format_format_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../format/format.js */ \"./node_modules/@bitauth/libauth/build/lib/format/number.js\");\n/* harmony import */ var _hmac_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hmac.js */ \"./node_modules/@bitauth/libauth/build/lib/crypto/hmac.js\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_hmac_js__WEBPACK_IMPORTED_MODULE_2__]);\n_hmac_js__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];\n\n\nvar Pbkdf2Error;\n(function (Pbkdf2Error) {\n Pbkdf2Error[\"invalidIterations\"] = \"Invalid PBKDF2 parameters: iterations must be a positive integer.\";\n Pbkdf2Error[\"invalidDerivedKeyLength\"] = \"Invalid PBKDF2 parameters: derived key length must be a positive integer.\";\n Pbkdf2Error[\"invalidHmacLength\"] = \"Invalid HMAC length: HMAC length must be a positive integer.\";\n})(Pbkdf2Error || (Pbkdf2Error = {}));\n/**\n * Instantiate a PBKDF2 function as specified by RFC 2898.\n *\n * @param hmacFunction - the HMAC function to use\n * @param hmacByteLength - the byte-length of the HMAC function\n */\nconst instantiatePbkdf2Function = (hmacFunction, hmacByteLength) => \n// eslint-disable-next-line complexity\n(parameters) => {\n /* eslint-disable functional/no-let, functional/no-loop-statements, functional/no-expression-statements, no-bitwise, no-plusplus */\n const { password, salt, iterations, derivedKeyLength } = parameters;\n if (!Number.isInteger(iterations) || iterations <= 0) {\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_0__.formatError)(Pbkdf2Error.invalidIterations, `Iterations parameter: ${iterations}.`);\n }\n if (!Number.isInteger(derivedKeyLength) || derivedKeyLength <= 0) {\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_0__.formatError)(Pbkdf2Error.invalidDerivedKeyLength, `Derived key length: ${derivedKeyLength}.`);\n }\n if (!Number.isInteger(hmacByteLength) || hmacByteLength <= 0) {\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_0__.formatError)(Pbkdf2Error.invalidHmacLength, `HMAC length: ${hmacByteLength}.`);\n }\n const iterationCountByteLength = 4;\n const derivedKey = new Uint8Array(derivedKeyLength);\n const block = new Uint8Array(salt.length + iterationCountByteLength);\n block.set(salt, 0);\n let writePosition = 0;\n const length = Math.ceil(derivedKeyLength / hmacByteLength);\n for (let i = 1; i <= length; i++) {\n const iterationUint32BEEncoded = (0,_format_format_js__WEBPACK_IMPORTED_MODULE_1__.numberToBinUint32BE)(i);\n block.set(iterationUint32BEEncoded, salt.length);\n const accumulatedMac = hmacFunction(password, block);\n let intermediateMac = accumulatedMac;\n for (let j = 1; j < iterations; j++) {\n intermediateMac = hmacFunction(password, intermediateMac);\n for (let k = 0; k < hmacByteLength; k++) {\n accumulatedMac[k] ^= intermediateMac[k]; // eslint-disable-line @typescript-eslint/no-non-null-assertion\n }\n }\n const truncatedResult = accumulatedMac.subarray(0, derivedKeyLength);\n derivedKey.set(truncatedResult, writePosition);\n writePosition += hmacByteLength;\n }\n return derivedKey;\n /* eslint-enable functional/no-let, functional/no-loop-statements, functional/no-expression-statements, no-bitwise, no-plusplus */\n};\nconst hmacSha256ByteLength = 32;\n/**\n * Derive a key using PBKDF2 and the HMAC SHA256 function as specified in RFC 2898.\n *\n * Note, if the provided `parameters` are valid, this method will never error.\n *\n * @param parameters - the PBKDF2 parameters to use\n * @param sha256Hmac - the SHA256 HMAC implementation to use (defaults to the\n * internal WASM implementation)\n */\nconst pbkdf2HmacSha256 = (parameters, sha256Hmac = _hmac_js__WEBPACK_IMPORTED_MODULE_2__.hmacSha256) => instantiatePbkdf2Function(sha256Hmac, hmacSha256ByteLength)(parameters);\nconst hmacSha512ByteLength = 64;\n/**\n * Derive a key using PBKDF2 and the HMAC SHA512 function as specified in RFC 2898.\n *\n * Note, if the provided `parameters` are valid, this method will never error.\n *\n * @param parameters - the PBKDF2 parameters to use\n * @param sha512Hmac - the SHA512 HMAC implementation to use (defaults to the\n * internal WASM implementation)\n */\nconst pbkdf2HmacSha512 = (parameters, sha512Hmac = _hmac_js__WEBPACK_IMPORTED_MODULE_2__.hmacSha512) => instantiatePbkdf2Function(sha512Hmac, hmacSha512ByteLength)(parameters);\n//# sourceMappingURL=pbkdf2.js.map\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./node_modules/@bitauth/libauth/build/lib/crypto/pbkdf2.js?");
1208
1098
 
1209
1099
  /***/ }),
1210
1100
 
@@ -1284,7 +1174,7 @@ eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harm
1284
1174
  \**********************************************************************/
1285
1175
  /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1286
1176
 
1287
- eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"binStringToBin\": () => (/* binding */ binStringToBin)\n/* harmony export */ });\n/* unused harmony exports binToBinString, isBinString */\n/* harmony import */ var _hex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hex.js */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\n\nconst binaryByteWidth = 8;\nconst binary = 2;\n/**\n * Decode a binary-encoded string into a Uint8Array.\n *\n * E.g.: `binStringToBin('0010101001100100')` → `new Uint8Array([42, 100])`\n *\n * Note, this method always completes. If `binaryDigits` is not divisible by 8,\n * the final byte will be parsed as if it were prepended with `0`s (e.g. `1`\n * is interpreted as `00000001`). If `binaryDigits` is potentially malformed,\n * check it with `isBinString` before calling this method.\n *\n * For the reverse, see {@link binToBinString}.\n *\n * @param binaryDigits - a string of `0`s and `1`s with a length divisible by 8\n */\nconst binStringToBin = (binaryDigits) => Uint8Array.from((0,_hex_js__WEBPACK_IMPORTED_MODULE_0__.splitEvery)(binaryDigits, binaryByteWidth).map((byteString) => parseInt(byteString, binary)));\n/**\n * Encode a Uint8Array into a binary-encoded string.\n *\n * E.g.: `binToBinString(Uint8Array.from([42, 100]))` → `'0010101001100100'`\n *\n * For the reverse, see {@link binStringToBin}.\n *\n * @param bytes - a Uint8Array to encode\n */\nconst binToBinString = (bytes) => bytes.reduce((str, byte) => str + byte.toString(binary).padStart(binaryByteWidth, '0'), '');\n/**\n * For use before {@link binStringToBin}. Returns true if the provided string is\n * a valid binary string (length is divisible by 8 and only uses the characters\n * `0` and `1`).\n * @param maybeBinString - a string to test\n */\nconst isBinString = (maybeBinString) => maybeBinString.length % binaryByteWidth === 0 &&\n !/[^01]/u.test(maybeBinString);\n//# sourceMappingURL=bin-string.js.map\n\n//# sourceURL=webpack://mainnet-js/./node_modules/@bitauth/libauth/build/lib/format/bin-string.js?");
1177
+ eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"binStringToBin\": () => (/* binding */ binStringToBin),\n/* harmony export */ \"binToBinString\": () => (/* binding */ binToBinString)\n/* harmony export */ });\n/* unused harmony export isBinString */\n/* harmony import */ var _hex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hex.js */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\n\nconst binaryByteWidth = 8;\nconst binary = 2;\n/**\n * Decode a binary-encoded string into a Uint8Array.\n *\n * E.g.: `binStringToBin('0010101001100100')` → `new Uint8Array([42, 100])`\n *\n * Note, this method always completes. If `binaryDigits` is not divisible by 8,\n * the final byte will be parsed as if it were prepended with `0`s (e.g. `1`\n * is interpreted as `00000001`). If `binaryDigits` is potentially malformed,\n * check it with `isBinString` before calling this method.\n *\n * For the reverse, see {@link binToBinString}.\n *\n * @param binaryDigits - a string of `0`s and `1`s with a length divisible by 8\n */\nconst binStringToBin = (binaryDigits) => Uint8Array.from((0,_hex_js__WEBPACK_IMPORTED_MODULE_0__.splitEvery)(binaryDigits, binaryByteWidth).map((byteString) => parseInt(byteString, binary)));\n/**\n * Encode a Uint8Array into a binary-encoded string.\n *\n * E.g.: `binToBinString(Uint8Array.from([42, 100]))` → `'0010101001100100'`\n *\n * For the reverse, see {@link binStringToBin}.\n *\n * @param bytes - a Uint8Array to encode\n */\nconst binToBinString = (bytes) => bytes.reduce((str, byte) => str + byte.toString(binary).padStart(binaryByteWidth, '0'), '');\n/**\n * For use before {@link binStringToBin}. Returns true if the provided string is\n * a valid binary string (length is divisible by 8 and only uses the characters\n * `0` and `1`).\n * @param maybeBinString - a string to test\n */\nconst isBinString = (maybeBinString) => maybeBinString.length % binaryByteWidth === 0 &&\n !/[^01]/u.test(maybeBinString);\n//# sourceMappingURL=bin-string.js.map\n\n//# sourceURL=webpack://mainnet-js/./node_modules/@bitauth/libauth/build/lib/format/bin-string.js?");
1288
1178
 
1289
1179
  /***/ }),
1290
1180
 
@@ -1338,6 +1228,16 @@ eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harm
1338
1228
 
1339
1229
  /***/ }),
1340
1230
 
1231
+ /***/ "./node_modules/@bitauth/libauth/build/lib/key/bip39.js":
1232
+ /*!**************************************************************!*\
1233
+ !*** ./node_modules/@bitauth/libauth/build/lib/key/bip39.js ***!
1234
+ \**************************************************************/
1235
+ /***/ ((__webpack_module__, __webpack_exports__, __webpack_require__) => {
1236
+
1237
+ eval("__webpack_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"deriveSeedFromBip39Mnemonic\": () => (/* binding */ deriveSeedFromBip39Mnemonic),\n/* harmony export */ \"generateBip39Mnemonic\": () => (/* binding */ generateBip39Mnemonic)\n/* harmony export */ });\n/* unused harmony exports Bip39Error, isValidBip39WordList, isValidBip39EntropyLength, deriveBip39ChecksumBits, decodeBip39MnemonicNonStandard, decodeBip39Mnemonic, encodeBip39MnemonicNonStandard, encodeBip39Mnemonic, deriveHdPrivateNodeFromBip39Mnemonic, generateBip39MnemonicNonStandard, attemptBip39MnemonicErrorCorrection */\n/* harmony import */ var _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../crypto/crypto.js */ \"./node_modules/@bitauth/libauth/build/lib/crypto/default-crypto-instances.js\");\n/* harmony import */ var _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../crypto/crypto.js */ \"./node_modules/@bitauth/libauth/build/lib/crypto/pbkdf2.js\");\n/* harmony import */ var _format_format_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../format/format.js */ \"./node_modules/@bitauth/libauth/build/lib/format/bin-string.js\");\n/* harmony import */ var _format_format_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../format/format.js */ \"./node_modules/@bitauth/libauth/build/lib/format/error.js\");\n/* harmony import */ var _format_format_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../format/format.js */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\n/* harmony import */ var _format_format_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../format/format.js */ \"./node_modules/@bitauth/libauth/build/lib/format/utf8.js\");\n/* harmony import */ var _hd_key_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./hd-key.js */ \"./node_modules/@bitauth/libauth/build/lib/key/hd-key.js\");\n/* harmony import */ var _key_utils_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./key-utils.js */ \"./node_modules/@bitauth/libauth/build/lib/key/key-utils.js\");\n/* harmony import */ var _word_lists_bip39_english_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./word-lists/bip39.english.js */ \"./node_modules/@bitauth/libauth/build/lib/key/word-lists/bip39.english.js\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_crypto_crypto_js__WEBPACK_IMPORTED_MODULE_0__, _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_5__, _hd_key_js__WEBPACK_IMPORTED_MODULE_7__, _key_utils_js__WEBPACK_IMPORTED_MODULE_8__]);\n([_crypto_crypto_js__WEBPACK_IMPORTED_MODULE_0__, _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_5__, _hd_key_js__WEBPACK_IMPORTED_MODULE_7__, _key_utils_js__WEBPACK_IMPORTED_MODULE_8__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Bip39Error;\n(function (Bip39Error) {\n Bip39Error[\"invalidEntropyLength\"] = \"BIP39 Error: invalid entropy length. Entropy length must be 16, 20, 24, 28, or 32 bytes.\";\n Bip39Error[\"invalidMnemonicLength\"] = \"BIP39 Error: invalid mnemonic length. Word count must be 12, 15, 18, 21, or 24.\";\n Bip39Error[\"invalidWordListLength\"] = \"BIP39 Error: invalid word list length. BIP39 word lists must contain exactly 2048 words.\";\n Bip39Error[\"invalidChecksum\"] = \"BIP39 Error: invalid checksum for the given mnemonic phrase.\";\n Bip39Error[\"unknownWord\"] = \"BIP39 Error: unknown word(s). The mnemonic phrase contains one or more words that do not exist in the word list.\";\n})(Bip39Error || (Bip39Error = {}));\n/**\n * Verify that the provided BIP39 word list contains exactly 2048 words.\n *\n * @param wordList - the word list\n */\nconst isValidBip39WordList = (wordList) => wordList.length === 2048 /* Bip39.validWordListLength */;\n/**\n * Verify that the length of the provided entropy is valid for BIP39: 16, 20,\n * 24, 28, or 32 bytes.\n *\n * @param entropy - the entropy bytes\n */\nconst isValidBip39EntropyLength = (entropy) => entropy.length >= 16 /* Bip39.minEntropyBytes */ &&\n entropy.length <= 32 /* Bip39.maxEntropyBytes */ &&\n entropy.length % 4 /* Bip39.entropyLengthStepSize */ === 0;\n/**\n * Derive BIP39 checksum bits for the given entropy bytes.\n *\n * Note, this method always completes. For a valid result, `entropy` must\n * satisfy {@link isValidBip39EntropyLength}.\n *\n * @param entropy - the entropy bytes\n */\nconst deriveBip39ChecksumBits = (entropy) => {\n const ENT = entropy.length * 8 /* Bip39.bitsPerByte */;\n const CS = ENT / 32 /* Bip39.checksumRatio */;\n const hash = _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_0__.sha256.hash(entropy);\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_1__.binToBinString)(hash).slice(0, CS);\n};\n/**\n * Decode the provided BIP39 mnemonic phrase using the provided word list.\n * Reverses {@link encodeBip39MnemonicNonStandard}.\n *\n * See {@link decodeBip39Mnemonic} to decode using the English word list.\n *\n * @param mnemonic - the BIP39 mnemonic phrase\n * @param wordList - the word list to use\n */\n// eslint-disable-next-line complexity\nconst decodeBip39MnemonicNonStandard = (mnemonic, wordList) => {\n if (!isValidBip39WordList(wordList)) {\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_2__.formatError)(Bip39Error.invalidWordListLength, `Word list length: ${wordList.length}.`);\n }\n const words = mnemonic.normalize('NFKD').split(' ');\n if (words.length % 3 /* Bip39.wordCountStepSize */ !== 0 ||\n words.length < 12 /* Bip39.minWordCount */ ||\n words.length > 24 /* Bip39.maxWordCount */) {\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_2__.formatError)(Bip39Error.invalidMnemonicLength, `Word count: ${words.length}.`);\n }\n const unknownWords = words.filter((word) => !wordList.includes(word));\n if (unknownWords.length !== 0) {\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_2__.formatError)(Bip39Error.unknownWord, `Unknown word(s): ${unknownWords.join(', ')}.`);\n }\n const binString = words\n .map((word) => {\n const index = wordList.indexOf(word);\n return index.toString(2 /* Bip39.base2 */).padStart(11 /* Bip39.bitsPerWord */, '0');\n })\n .join('');\n const splitIndex = (words.length / 3 /* Bip39.wordCountStepSize */) * 32 /* Bip39.checksumRatio */;\n const entropyBits = binString.slice(0, splitIndex);\n const checksumBits = binString.slice(splitIndex);\n const entropy = (0,_format_format_js__WEBPACK_IMPORTED_MODULE_1__.binStringToBin)(entropyBits);\n const newChecksum = deriveBip39ChecksumBits(entropy);\n if (newChecksum !== checksumBits) {\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_2__.formatError)(Bip39Error.invalidChecksum, `Encoded: ${checksumBits}; computed: ${newChecksum}.`);\n }\n return entropy;\n};\n/**\n * Decode the provided BIP39 mnemonic phrase using the English word list.\n * Reverses {@link encodeBip39Mnemonic}.\n *\n * See {@link decodeBip39MnemonicNonStandard} for other word lists.\n *\n * @param mnemonic - the BIP39 mnemonic phrase\n */\nconst decodeBip39Mnemonic = (mnemonic) => decodeBip39MnemonicNonStandard(mnemonic, _word_lists_bip39_english_js__WEBPACK_IMPORTED_MODULE_3__.bip39WordListEnglish);\n/**\n * Encode the provided entropy in a BIP39 mnemonic phrase using a custom word\n * list. Reverses {@link decodeBip39MnemonicNonStandard}.\n *\n * See {@link encodeBip39Mnemonic} to encode using the English word list.\n *\n * If the provided `entropy` and `wordList` each has a valid length, this method\n * will never error.\n *\n * @param entropy - the entropy (length must be 16, 20, 24, 28, or 32 bytes)\n * @param wordList - the word list to use\n */\nconst encodeBip39MnemonicNonStandard = (entropy, wordList) => {\n if (!isValidBip39EntropyLength(entropy)) {\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_2__.formatError)(Bip39Error.invalidEntropyLength, `Entropy length: ${entropy.length}.`);\n }\n if (!isValidBip39WordList(wordList)) {\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_2__.formatError)(Bip39Error.invalidWordListLength, `Word list length: ${wordList.length}.`);\n }\n const entropyBits = (0,_format_format_js__WEBPACK_IMPORTED_MODULE_1__.binToBinString)(entropy);\n const checksumBits = deriveBip39ChecksumBits(entropy);\n const bits = entropyBits + checksumBits;\n const chunks = (0,_format_format_js__WEBPACK_IMPORTED_MODULE_4__.splitEvery)(bits, 11 /* Bip39.bitsPerWord */);\n const words = chunks.map((binary) => {\n const index = parseInt(binary, 2);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const word = wordList[index];\n return word;\n });\n /*\n * Japanese phrases use an ideographic space separator; if the first word is\n * Japanese, join using `\\u3000`.\n */\n const phrase = wordList[0] === '\\u3042\\u3044\\u3053\\u304f\\u3057\\u3093'\n ? words.join('\\u3000')\n : words.join(' ');\n return { phrase };\n};\n/**\n * Encode the provided entropy in an English BIP39 mnemonic phrase.\n * Reverses {@link decodeBip39Mnemonic}.\n *\n * Even for localized applications, English is the safest choice for BIP39\n * mnemonic phrase encoding. English mnemonic phrases are the most widely used\n * and supported by ecosystem tooling, meaning they can be more reliably error\n * corrected than phrases using other word lists, and they are more likely to be\n * recognized as valuable by humans and generalized automation, e.g.\n * organizational secret scanning and anti-exfiltration software. Note also that\n * specialized exfiltration efforts are unlikely to be thwarted by obscuring\n * mnemonic phrases with localized or custom word lists; instead, consider using\n * a passphrase during seed derivation.\n *\n * If the provided `entropy` is a valid length, this method will never error.\n *\n * To use other word lists, see {@link encodeBip39MnemonicNonStandard}.\n *\n * @param entropy - the entropy (length must be 16, 20, 24, 28, or 32 bytes)\n */\nconst encodeBip39Mnemonic = (entropy) => encodeBip39MnemonicNonStandard(entropy, _word_lists_bip39_english_js__WEBPACK_IMPORTED_MODULE_3__.bip39WordListEnglish);\n/**\n * Derive a seed from the provided BIP39 mnemonic phrase.\n *\n * Note that by design, **BIP39 seed derivation is one-way**: seeds derived from\n * a mnemonic phrase cannot be used to recover the source phrase. Additionally,\n * BIP39 seed derivation does not perform any validation on the provided\n * mnemonic phrase, **allowing derivation from any string**.\n *\n * For use cases in which a particular mnemonic phrase is expected to be\n * correctly formed (with a valid checksum), first verify that it can be decoded\n * with {@link decodeBip39Mnemonic}.\n *\n * @param mnemonic - the BIP39 mnemonic phrase\n * @param passphrase - an optional passphrase (defaults to `undefined`)\n * @param crypto - an optional object containing an implementation of PBKDF2\n * using HMAC SHA512 (defaults to the internal WASM implementations)\n */\nconst deriveSeedFromBip39Mnemonic = (mnemonic, { crypto = { pbkdf2HmacSha512: _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_5__.pbkdf2HmacSha512 }, passphrase = '', } = {}) => {\n const mnemonicNormalized = mnemonic.normalize('NFKD');\n const salt = `mnemonic${passphrase}`;\n const saltNormalized = salt.normalize('NFKD');\n const mnemonicBin = (0,_format_format_js__WEBPACK_IMPORTED_MODULE_6__.utf8ToBin)(mnemonicNormalized);\n const saltBin = (0,_format_format_js__WEBPACK_IMPORTED_MODULE_6__.utf8ToBin)(saltNormalized);\n return crypto.pbkdf2HmacSha512({\n derivedKeyLength: 64 /* Bip39.derivedKeyLength */,\n iterations: 2048 /* Bip39.pbkdf2Iterations */,\n password: mnemonicBin,\n salt: saltBin,\n });\n};\n/**\n * Derive an {@link HdPrivateNode} from the provided BIP39 mnemonic phrase\n * following the BIP32 and BIP39 specifications.\n *\n * Note that by design, **BIP39 seed derivation is one-way**: seeds derived from\n * a mnemonic phrase cannot be used to recover the source phrase. Additionally,\n * BIP39 seed derivation does not perform any validation on the provided\n * mnemonic phrase, **allowing derivation from any string**.\n *\n * For use cases in which a particular mnemonic phrase is expected to be\n * correctly formed (with a valid checksum), first verify that it can be decoded\n * with {@link decodeBip39Mnemonic}.\n *\n * @param mnemonic - the BIP39 mnemonic phrase\n * @param passphrase - an optional passphrase (defaults to `undefined`)\n * @param crypto - an optional object containing an implementation of SHA-512\n * and PBKDF2 using HMAC SHA-512 (defaults to the internal WASM implementations)\n * @param hmacSha512Key - the HMAC SHA-512 key to use (defaults the HMAC SHA-512\n * key used by BIP32, `utf8ToBin('Bitcoin seed')`\n */\nconst deriveHdPrivateNodeFromBip39Mnemonic = (mnemonic, { crypto = {\n pbkdf2HmacSha512: _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_5__.pbkdf2HmacSha512,\n sha512: _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_0__.sha512,\n}, hmacSha512Key, passphrase, } = {}) => (0,_hd_key_js__WEBPACK_IMPORTED_MODULE_7__.deriveHdPrivateNodeFromSeed)(deriveSeedFromBip39Mnemonic(mnemonic, { crypto, passphrase }), { crypto, hmacSha512Key });\n/**\n * Generate a new, cryptographically secure, BIP39 mnemonic phrase using a\n * localized or custom word list.\n *\n * See {@link generateBip39Mnemonic} to generate a standard, 12-word English\n * mnemonic phrase.\n *\n * See {@link encodeBip39Mnemonic} to encode existing entropy as a BIP39\n * mnemonic phrase.\n *\n * **Usage**\n * ```ts\n * import {\n * assertSuccess,\n * bip39WordListSpanish,\n * generateBip39Mnemonic\n * } from '@bitauth/libauth';\n *\n * const { phrase } = assertSuccess(generateBip39Mnemonic(bip39WordListSpanish, 32));\n * ```\n *\n * @param wordList - a 2048-word array to use as the BIP39 word list\n * @param entropyLength - the entropy length to generate – 16, 20, 24, 28, or 32\n * bytes (defaults to 16).\n */\nconst generateBip39MnemonicNonStandard = (wordList, entropyLength = 16 /* Bip39.minEntropyBytes */, { generateRandomBytes = _key_utils_js__WEBPACK_IMPORTED_MODULE_8__.generateRandomBytes, } = {}) => {\n if (!isValidBip39WordList(wordList)) {\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_2__.formatError)(Bip39Error.invalidWordListLength, `Word list length: ${wordList.length}.`);\n }\n const entropy = generateRandomBytes(entropyLength);\n if (!isValidBip39EntropyLength(entropy)) {\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_2__.formatError)(Bip39Error.invalidEntropyLength, `Entropy length: ${entropy.length}.`);\n }\n return encodeBip39MnemonicNonStandard(entropy, wordList);\n};\n/**\n * Generate a new, cryptographically secure, 12-word English BIP39\n * mnemonic phrase.\n *\n * See {@link generateBip39MnemonicNonStandard} to use a localized or custom\n * word list.\n *\n * See {@link encodeBip39Mnemonic} to encode existing entropy as a BIP39\n * mnemonic phrase.\n *\n * **Usage**\n * ```ts\n * import { generateBip39Mnemonic } from '@bitauth/libauth';\n *\n * const phrase = generateBip39Mnemonic();\n * ```\n */\nconst generateBip39Mnemonic = () => generateBip39MnemonicNonStandard(_word_lists_bip39_english_js__WEBPACK_IMPORTED_MODULE_3__.bip39WordListEnglish, 16 /* Bip39.minEntropyBytes */).phrase;\n// cSpell:ignore aban\n/**\n * TODO: not yet implemented; see also: {@link attemptCashAddressFormatErrorCorrection}\n *\n * Attempt to automatically correct any typographical errors in a BIP39 mnemonic\n * phrase, returning correction information for the closest matching valid\n * mnemonic phrase.\n *\n * Note that by design, BIP39 allows seed derivation from any NFKD-normalized\n * string, including phrases containing an incorrect or unrecognized checksum.\n *\n * **Indiscriminate use of this function during BIP39 mnemonic phrase import\n * would prevent the use of seeds derived from such nonstandard phrases.**\n *\n * Instead, this function should be used to offer an end user the best possible\n * correction for the provided mnemonic phrase, e.g.:\n *\n * ```\n * Warning: the BIP39 mnemonic phrase you entered appears to have typographical\n * errors. The phrase could be corrected to:\n *\n * [Render the corrected phrase, emphasizing all correction ranges.]\n *\n * Correction description: [render Bip39MnemonicCorrection.description]\n *\n * Would you like to use this corrected phrase?\n *\n * [Button: \"Use corrected phrase\"] [Button: \"Use phrase with errors\"]\n * ```\n *\n * This function attempts the following corrections, returning a\n * {@link Bip39MnemonicCorrection} as soon as a BIP39 mnemonic phrase with a\n * valid checksum is produced:\n *\n * - Trim whitespace from the beginning and end of the phrase\n * - Convert the phrase to lowercase characters\n * - Identify the best candidate word list from `possibleWordLists` with which\n * to correct errors by counting exact prefix matches, e.g. `aban` is a prefix\n * match for both English and French. If two word lists share the same number of\n * matches, the earlier index in `possibleWordLists` is prioritized. (Note that\n * `100` words are shared between the French and English word lists, and `1275`\n * words are shared between the Chinese Traditional and Chinese Simplified word\n * lists. Because this function is intended to correct standard BIP39 mnemonic\n * phrases, we assume that all correct words are found in a single word list.\n * - Deduplicate spaces between words, ensuring the expected space separator is\n * used (for the Japanese word list, an ideographic space separator: `\\u3000`).\n * - Attempt to verify the checksum for all valid subsets of the phrase by\n * slicing the phrase at 24, 21, 18, 15, and 12 words. In these cases, the\n * additional words may have been entered in error, or they may be part of a\n * passphrase recorded in the same location as the phrase. The returned\n * {@link Bip39MnemonicCorrection.description} indicates that the user should\n * review the source material to see if the deleted word(s) are a passphrase.\n * - For every word where an exact match is not found, develop a ranked list of\n * possible matches:\n * - Attempt to extend the word by finding all word(s) in the selected word\n * list with a matching prefix (i.e. only the first few characters of the\n * correct word were included in the incorrect phrase). If multiple prefix\n * matches are found, rank them in word list order (in later steps, all of these\n * matches are considered to have a similarity of `1`).\n * - If no prefix matches were found, compute the Jaro similarity between\n * the unknown word and every word in the candidate word list, adding all\n * words to the ranked list in descending-similarity, then word list order.\n * - Attempt to find a corrected phrase with the minimum possible correction by\n * validating the checksum for each candidate combination in ranked order:\n * - Beginning with a similarity target of 1, create candidate combinations\n * by replacing unknown words with all possible matches having a similarity\n * equal to or greater than the target.\n * - If any unknown words have no matches meeting the similarity target, lower\n * the similarity target to the value of the next-most-similar match for that\n * word, using only that match in this correction iteration.\n * - If no phrases with a valid checksum are found, repeat these steps with\n * the lowered similarity target, excluding previously-tried combinations.\n *\n * If no plausible matches are found, or if the provided phrase has an invalid\n * word count (after attempting to correct whitespace errors), an error (string)\n * is returned.\n *\n * Note, this method does not attempt to correct mnemonic phrases with an\n * incorrect word count; in these cases, the user should be asked to either\n * identify and provide the missing words or use a dedicated brute-forcing tool\n * (if words have been lost).\n *\n * @param mnemonic - the BIP39 mnemonic phrase to error-correct\n * @param possibleWordLists - an array of BIP39 word lists that may be in use by\n * the BIP39 mnemonic\n */\nconst attemptBip39MnemonicErrorCorrection = /* c8 ignore next */ (\n/* c8 ignore next 3 */\n_mnemonic, _possibleWordLists) => 'TODO: not yet implemented';\n// export enum Bip39MnemonicCorrectionError {}\n//# sourceMappingURL=bip39.js.map\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./node_modules/@bitauth/libauth/build/lib/key/bip39.js?");
1238
+
1239
+ /***/ }),
1240
+
1341
1241
  /***/ "./node_modules/@bitauth/libauth/build/lib/key/hd-key.js":
1342
1242
  /*!***************************************************************!*\
1343
1243
  !*** ./node_modules/@bitauth/libauth/build/lib/key/hd-key.js ***!
@@ -1354,7 +1254,7 @@ eval("__webpack_require__.a(__webpack_module__, async (__webpack_handle_async_de
1354
1254
  \******************************************************************/
1355
1255
  /***/ ((__webpack_module__, __webpack_exports__, __webpack_require__) => {
1356
1256
 
1357
- eval("__webpack_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"generatePrivateKey\": () => (/* binding */ generatePrivateKey)\n/* harmony export */ });\n/* unused harmony exports EntropyGenerationError, generateRandomBytesUnchecked, generateRandomBytes, generateRandomSeed, generateHdPrivateNode, shannonEntropyPerEvent, minimumEventsPerEntropyBits, generateDeterministicEntropy */\n/* harmony import */ var _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../crypto/crypto.js */ \"./node_modules/@bitauth/libauth/build/lib/crypto/default-crypto-instances.js\");\n/* harmony import */ var _format_format_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../format/format.js */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\n/* harmony import */ var _format_format_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../format/format.js */ \"./node_modules/@bitauth/libauth/build/lib/format/error.js\");\n/* harmony import */ var _hd_key_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hd-key.js */ \"./node_modules/@bitauth/libauth/build/lib/key/hd-key.js\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_hd_key_js__WEBPACK_IMPORTED_MODULE_2__, _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_3__]);\n([_hd_key_js__WEBPACK_IMPORTED_MODULE_2__, _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_3__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n\n\n\nvar EntropyGenerationError;\n(function (EntropyGenerationError) {\n EntropyGenerationError[\"duplicateResults\"] = \"Entropy generation error: the \\\"getRandomValues\\\" function provided by this JavaScript environment returned duplicate results across two evaluations; entropy generation was halted for safety.\";\n EntropyGenerationError[\"insufficientEntropy\"] = \"Entropy generation error: the provided list of events contains insufficient entropy.\";\n})(EntropyGenerationError || (EntropyGenerationError = {}));\n/**\n * Generate a Uint8Array of the specified length containing a\n * cryptographically-random series of bytes. See {@link generateRandomBytes} for\n * a safer alternative.\n *\n * @param length - the length of the Uint8Array to generate\n * @param cryptoInstance - an instance of the `Crypto` object with the\n * `getRandomValues` function (defaults to the `crypto` global property).\n */\nconst generateRandomBytesUnchecked = (length, cryptoInstance = crypto) => cryptoInstance.getRandomValues(new Uint8Array(length));\n/**\n * Generate a Uint8Array of the specified length containing a\n * cryptographically-random series of bytes.\n *\n * For safety, this function first verifies that the provided `generate`\n * function produces unique results across two evaluations; by default, this\n * verifies that the `crypto.getRandomValues` function provided by the\n * JavaScript environment appears to be producing random values.\n *\n * While this validation can't prevent a compromised environment from producing\n * attacker-known entropy, it may help to prevent software defects in unusual\n * environments (e.g. React Native) from impacting end-user security.\n *\n * An `Error` is thrown if this validation fails, otherwise, the `Uint8Array`\n * produced by the first evaluation is returned.\n *\n * @param length - the length of the Uint8Array to generate\n * @param generate - a function used to generate the random bytes, defaults\n * to {@link generateRandomBytesUnchecked}.\n */\nconst generateRandomBytes = (length, generate = generateRandomBytesUnchecked) => {\n const firstRun = generate(length);\n const secondRun = generate(length);\n if (firstRun === secondRun || (0,_format_format_js__WEBPACK_IMPORTED_MODULE_0__.binsAreEqual)(firstRun, secondRun))\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_1__.formatError)(EntropyGenerationError.duplicateResults, `First result: [${String(firstRun)}]; second result: [${String(secondRun)}].`, true);\n return firstRun;\n};\n/**\n * Securely generate a 32-byte, cryptographically random seed (Uint8Array) for\n * use in Hierarchical Deterministic (HD) Key derivation\n * (see {@link deriveHdPrivateNodeFromSeed}).\n *\n * To generate a single Secp256k1 private key, use {@link generatePrivateKey}.\n */\nconst generateRandomSeed = () => generateRandomBytes(32 /* KeyUtilConstants.privateKeyLength */);\n/**\n * Securely generate a valid Secp256k1 private key.\n *\n * By default, this function uses `crypto.getRandomValues` to produce\n * sufficiently-random key material, but another source of randomness may also\n * be provided.\n *\n * To generate an HD Key, use {@link generateHdPrivateKey}.\n *\n * @param secureRandom - a method that returns a securely-random 32-byte\n * Uint8Array\n */\nconst generatePrivateKey = (secureRandom = generateRandomSeed) => {\n // eslint-disable-next-line functional/no-let, @typescript-eslint/init-declarations\n let maybeKey;\n // eslint-disable-next-line functional/no-loop-statements\n do {\n // eslint-disable-next-line functional/no-expression-statements\n maybeKey = secureRandom();\n } while (!(0,_hd_key_js__WEBPACK_IMPORTED_MODULE_2__.validateSecp256k1PrivateKey)(maybeKey));\n return maybeKey;\n};\n/**\n * Securely generate a valid {@link HdPrivateNode}, returning both the source\n * seed and the {@link HdPrivateNodeValid}.\n *\n * By default, this function uses `crypto.getRandomValues` to produce\n * sufficiently-random key material, but another source of randomness may also\n * be provided.\n *\n * To generate a single Secp256k1 private key, use {@link generatePrivateKey}.\n */\nconst generateHdPrivateNode = (secureRandom = generateRandomSeed) => {\n // eslint-disable-next-line functional/no-let, @typescript-eslint/init-declarations\n let seed;\n // eslint-disable-next-line functional/no-let, @typescript-eslint/init-declarations\n let hdPrivateNode;\n // eslint-disable-next-line functional/no-loop-statements\n do {\n // eslint-disable-next-line functional/no-expression-statements\n seed = secureRandom();\n // eslint-disable-next-line functional/no-expression-statements\n hdPrivateNode = (0,_hd_key_js__WEBPACK_IMPORTED_MODULE_2__.deriveHdPrivateNodeFromSeed)(seed);\n } while ('invalidMaterial' in hdPrivateNode);\n return {\n hdPrivateNode,\n seed,\n };\n};\n/*\n * TODO: export const generateLibauthSecretKey = (secureRandom = generateRandomSeed) => {\n * const { seed } = generateHdPrivateNode(secureRandom);\n * return encodeLibauthSecretKey({ seed });\n * };\n */\n/**\n * Given the number of equally-likely results per event, return the Shannon\n * entropy of the event in bits.\n *\n * @param possibleResults - the number of equally-likely results per event;\n * e.g. for a coin, `2`, for dice, the number of faces (for a standard die, `6`)\n */\nconst shannonEntropyPerEvent = (possibleResults) => Math.log2(possibleResults);\n/**\n * Given the number of equally-likely results per event, return the number of\n * events required to achieve the required bits of Shannon entropy.\n * entropy of the event in bits.\n *\n * For example, to compute the number of standard, 6-sided dice rolls required\n * to generate a private key (with the recommended 128-bit entropy minimum),\n * `minimumEventsPerEntropyBits(6)`.\n *\n * @param possibleResults - the number of equally-likely results per event;\n * e.g. for a coin, `2`, for dice, the number of faces (for a standard die, `6`)\n * @param requiredEntropyBits - the number of bits of entropy required. Defaults\n * to `128`, the recommended value for all private key generation.\n */\nconst minimumEventsPerEntropyBits = (possibleResults, requiredEntropyBits = 128 /* KeyUtilConstants.privateKeyRequiredEntropyBits */) => Math.ceil(requiredEntropyBits / shannonEntropyPerEvent(possibleResults));\n/**\n * Generate deterministic entropy by seeding SHA-256 with a list of random\n * events like coin flips or dice rolls. For coin flips, use `0` (\"heads\") and\n * `1` (\"tails\"); for dice, use the visible number.\n *\n * **Warning: this function's validation assumes that the provided events\n * are truly random (\"unbiased\").** If the events are biased, e.g. by a weighted\n * dice or a human attempting to type random numbers, the entropy of this\n * function's result will be degraded. Using insufficiently random results will\n * compromise the security of systems relying on the result, making it possible\n * for an attacker to, e.g. guess secret keys and steal funds.\n *\n * This method of entropy generation is designed to be easily auditable: the\n * list of results are simply concatenated (without any spaces or separating\n * characters), and the UTF8 encoding of the resulting string of digits is\n * hashed with SHA-256.\n *\n * For example, if a 20-sided dice (D20) is rolled 3 times with results 13, 4,\n * and 10, the UTF8 encoding of `13410` (`0x3133343130`) is hashed with SHA-256,\n * producing a result of\n * `6dd4f2758287be9f38e0e93c71146c76e90f83f0b8c9b49760fc0b594494607b`. This can\n * be verified in most command line environments with the command:\n * `echo -n 13410 | sha256sum`.\n *\n * Note that this function is compatible with Coldcard's deterministic key\n * generation workflow when used with six-sided dice (D6).\n *\n * @param possibleResults - the number of equally-likely results per event;\n * e.g. for a coin, `2`, for dice, the number of faces (for a standard die, `6`)\n * @param events - an array of numbers encoding the random events; for coin\n * flips, use `0` (\"heads\") and `1` (\"tails\"); for dice, use the exposed number\n * (e.g. `1` through `6` for 6-sided dice)\n * @param requiredEntropyBits - the number of bits of entropy required. Defaults\n * to `128`, the recommended value for all private key generation.\n * @param crypto - an optional object containing an implementation of sha256\n * to use\n */\nconst generateDeterministicEntropy = (possibleResults, events, { crypto = { sha256: _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_3__.sha256 }, requiredEntropyBits = 128 /* KeyUtilConstants.privateKeyRequiredEntropyBits */, } = {}) => {\n const minimumEventCount = minimumEventsPerEntropyBits(possibleResults, requiredEntropyBits);\n if (possibleResults === 0 || events.length < minimumEventCount) {\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_1__.formatError)(EntropyGenerationError.insufficientEntropy, `With ${possibleResults} possible results per event, a minimum of ${minimumEventCount} events are required to obtain sufficient entropy. Events provided: ${events.length}.`);\n }\n const concatenatedDigits = [...events.join('')].map((digit) => Number(digit) + 48 /* KeyUtilConstants.utf8NumbersOffset */);\n const source = Uint8Array.from(concatenatedDigits);\n return crypto.sha256.hash(source);\n};\n// TODO: export const generateLibauthSecretKeyFromCoinFlips = () => {}\n// TODO: export const generateLibauthSecretKeyFromDiceRolls = () => {}\n//# sourceMappingURL=key-utils.js.map\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./node_modules/@bitauth/libauth/build/lib/key/key-utils.js?");
1257
+ eval("__webpack_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"generatePrivateKey\": () => (/* binding */ generatePrivateKey),\n/* harmony export */ \"generateRandomBytes\": () => (/* binding */ generateRandomBytes)\n/* harmony export */ });\n/* unused harmony exports EntropyGenerationError, generateRandomBytesUnchecked, generateRandomSeed, generateHdPrivateNode, shannonEntropyPerEvent, minimumEventsPerEntropyBits, generateDeterministicEntropy */\n/* harmony import */ var _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../crypto/crypto.js */ \"./node_modules/@bitauth/libauth/build/lib/crypto/default-crypto-instances.js\");\n/* harmony import */ var _format_format_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../format/format.js */ \"./node_modules/@bitauth/libauth/build/lib/format/hex.js\");\n/* harmony import */ var _format_format_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../format/format.js */ \"./node_modules/@bitauth/libauth/build/lib/format/error.js\");\n/* harmony import */ var _hd_key_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hd-key.js */ \"./node_modules/@bitauth/libauth/build/lib/key/hd-key.js\");\nvar __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_hd_key_js__WEBPACK_IMPORTED_MODULE_2__, _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_3__]);\n([_hd_key_js__WEBPACK_IMPORTED_MODULE_2__, _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_3__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);\n\n\n\nvar EntropyGenerationError;\n(function (EntropyGenerationError) {\n EntropyGenerationError[\"duplicateResults\"] = \"Entropy generation error: the \\\"getRandomValues\\\" function provided by this JavaScript environment returned duplicate results across two evaluations; entropy generation was halted for safety.\";\n EntropyGenerationError[\"insufficientEntropy\"] = \"Entropy generation error: the provided list of events contains insufficient entropy.\";\n})(EntropyGenerationError || (EntropyGenerationError = {}));\n/**\n * Generate a Uint8Array of the specified length containing a\n * cryptographically-random series of bytes. See {@link generateRandomBytes} for\n * a safer alternative.\n *\n * @param length - the length of the Uint8Array to generate\n * @param cryptoInstance - an instance of the `Crypto` object with the\n * `getRandomValues` function (defaults to the `crypto` global property).\n */\nconst generateRandomBytesUnchecked = (length, cryptoInstance = crypto) => cryptoInstance.getRandomValues(new Uint8Array(length));\n/**\n * Generate a Uint8Array of the specified length containing a\n * cryptographically-random series of bytes.\n *\n * For safety, this function first verifies that the provided `generate`\n * function produces unique results across two evaluations; by default, this\n * verifies that the `crypto.getRandomValues` function provided by the\n * JavaScript environment appears to be producing random values.\n *\n * While this validation can't prevent a compromised environment from producing\n * attacker-known entropy, it may help to prevent software defects in unusual\n * environments (e.g. React Native) from impacting end-user security.\n *\n * An `Error` is thrown if this validation fails, otherwise, the `Uint8Array`\n * produced by the first evaluation is returned.\n *\n * @param length - the length of the Uint8Array to generate\n * @param generate - a function used to generate the random bytes, defaults\n * to {@link generateRandomBytesUnchecked}.\n */\nconst generateRandomBytes = (length, generate = generateRandomBytesUnchecked) => {\n const firstRun = generate(length);\n const secondRun = generate(length);\n if (firstRun === secondRun || (0,_format_format_js__WEBPACK_IMPORTED_MODULE_0__.binsAreEqual)(firstRun, secondRun))\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_1__.formatError)(EntropyGenerationError.duplicateResults, `First result: [${String(firstRun)}]; second result: [${String(secondRun)}].`, true);\n return firstRun;\n};\n/**\n * Securely generate a 32-byte, cryptographically random seed (Uint8Array) for\n * use in Hierarchical Deterministic (HD) Key derivation\n * (see {@link deriveHdPrivateNodeFromSeed}).\n *\n * To generate a single Secp256k1 private key, use {@link generatePrivateKey}.\n */\nconst generateRandomSeed = () => generateRandomBytes(32 /* KeyUtilConstants.privateKeyLength */);\n/**\n * Securely generate a valid Secp256k1 private key.\n *\n * By default, this function uses `crypto.getRandomValues` to produce\n * sufficiently-random key material, but another source of randomness may also\n * be provided.\n *\n * To generate an HD Key, use {@link generateHdPrivateKey}.\n *\n * @param secureRandom - a method that returns a securely-random 32-byte\n * Uint8Array\n */\nconst generatePrivateKey = (secureRandom = generateRandomSeed) => {\n // eslint-disable-next-line functional/no-let, @typescript-eslint/init-declarations\n let maybeKey;\n // eslint-disable-next-line functional/no-loop-statements\n do {\n // eslint-disable-next-line functional/no-expression-statements\n maybeKey = secureRandom();\n } while (!(0,_hd_key_js__WEBPACK_IMPORTED_MODULE_2__.validateSecp256k1PrivateKey)(maybeKey));\n return maybeKey;\n};\n/**\n * Securely generate a valid {@link HdPrivateNode}, returning both the source\n * seed and the {@link HdPrivateNodeValid}.\n *\n * By default, this function uses `crypto.getRandomValues` to produce\n * sufficiently-random key material, but another source of randomness may also\n * be provided.\n *\n * To generate a single Secp256k1 private key, use {@link generatePrivateKey}.\n */\nconst generateHdPrivateNode = (secureRandom = generateRandomSeed) => {\n // eslint-disable-next-line functional/no-let, @typescript-eslint/init-declarations\n let seed;\n // eslint-disable-next-line functional/no-let, @typescript-eslint/init-declarations\n let hdPrivateNode;\n // eslint-disable-next-line functional/no-loop-statements\n do {\n // eslint-disable-next-line functional/no-expression-statements\n seed = secureRandom();\n // eslint-disable-next-line functional/no-expression-statements\n hdPrivateNode = (0,_hd_key_js__WEBPACK_IMPORTED_MODULE_2__.deriveHdPrivateNodeFromSeed)(seed);\n } while ('invalidMaterial' in hdPrivateNode);\n return {\n hdPrivateNode,\n seed,\n };\n};\n/*\n * TODO: export const generateLibauthSecretKey = (secureRandom = generateRandomSeed) => {\n * const { seed } = generateHdPrivateNode(secureRandom);\n * return encodeLibauthSecretKey({ seed });\n * };\n */\n/**\n * Given the number of equally-likely results per event, return the Shannon\n * entropy of the event in bits.\n *\n * @param possibleResults - the number of equally-likely results per event;\n * e.g. for a coin, `2`, for dice, the number of faces (for a standard die, `6`)\n */\nconst shannonEntropyPerEvent = (possibleResults) => Math.log2(possibleResults);\n/**\n * Given the number of equally-likely results per event, return the number of\n * events required to achieve the required bits of Shannon entropy.\n * entropy of the event in bits.\n *\n * For example, to compute the number of standard, 6-sided dice rolls required\n * to generate a private key (with the recommended 128-bit entropy minimum),\n * `minimumEventsPerEntropyBits(6)`.\n *\n * @param possibleResults - the number of equally-likely results per event;\n * e.g. for a coin, `2`, for dice, the number of faces (for a standard die, `6`)\n * @param requiredEntropyBits - the number of bits of entropy required. Defaults\n * to `128`, the recommended value for all private key generation.\n */\nconst minimumEventsPerEntropyBits = (possibleResults, requiredEntropyBits = 128 /* KeyUtilConstants.privateKeyRequiredEntropyBits */) => Math.ceil(requiredEntropyBits / shannonEntropyPerEvent(possibleResults));\n/**\n * Generate deterministic entropy by seeding SHA-256 with a list of random\n * events like coin flips or dice rolls. For coin flips, use `0` (\"heads\") and\n * `1` (\"tails\"); for dice, use the visible number.\n *\n * **Warning: this function's validation assumes that the provided events\n * are truly random (\"unbiased\").** If the events are biased, e.g. by a weighted\n * dice or a human attempting to type random numbers, the entropy of this\n * function's result will be degraded. Using insufficiently random results will\n * compromise the security of systems relying on the result, making it possible\n * for an attacker to, e.g. guess secret keys and steal funds.\n *\n * This method of entropy generation is designed to be easily auditable: the\n * list of results are simply concatenated (without any spaces or separating\n * characters), and the UTF8 encoding of the resulting string of digits is\n * hashed with SHA-256.\n *\n * For example, if a 20-sided dice (D20) is rolled 3 times with results 13, 4,\n * and 10, the UTF8 encoding of `13410` (`0x3133343130`) is hashed with SHA-256,\n * producing a result of\n * `6dd4f2758287be9f38e0e93c71146c76e90f83f0b8c9b49760fc0b594494607b`. This can\n * be verified in most command line environments with the command:\n * `echo -n 13410 | sha256sum`.\n *\n * Note that this function is compatible with Coldcard's deterministic key\n * generation workflow when used with six-sided dice (D6).\n *\n * @param possibleResults - the number of equally-likely results per event;\n * e.g. for a coin, `2`, for dice, the number of faces (for a standard die, `6`)\n * @param events - an array of numbers encoding the random events; for coin\n * flips, use `0` (\"heads\") and `1` (\"tails\"); for dice, use the exposed number\n * (e.g. `1` through `6` for 6-sided dice)\n * @param requiredEntropyBits - the number of bits of entropy required. Defaults\n * to `128`, the recommended value for all private key generation.\n * @param crypto - an optional object containing an implementation of sha256\n * to use\n */\nconst generateDeterministicEntropy = (possibleResults, events, { crypto = { sha256: _crypto_crypto_js__WEBPACK_IMPORTED_MODULE_3__.sha256 }, requiredEntropyBits = 128 /* KeyUtilConstants.privateKeyRequiredEntropyBits */, } = {}) => {\n const minimumEventCount = minimumEventsPerEntropyBits(possibleResults, requiredEntropyBits);\n if (possibleResults === 0 || events.length < minimumEventCount) {\n return (0,_format_format_js__WEBPACK_IMPORTED_MODULE_1__.formatError)(EntropyGenerationError.insufficientEntropy, `With ${possibleResults} possible results per event, a minimum of ${minimumEventCount} events are required to obtain sufficient entropy. Events provided: ${events.length}.`);\n }\n const concatenatedDigits = [...events.join('')].map((digit) => Number(digit) + 48 /* KeyUtilConstants.utf8NumbersOffset */);\n const source = Uint8Array.from(concatenatedDigits);\n return crypto.sha256.hash(source);\n};\n// TODO: export const generateLibauthSecretKeyFromCoinFlips = () => {}\n// TODO: export const generateLibauthSecretKeyFromDiceRolls = () => {}\n//# sourceMappingURL=key-utils.js.map\n__webpack_async_result__();\n} catch(e) { __webpack_async_result__(e); } });\n\n//# sourceURL=webpack://mainnet-js/./node_modules/@bitauth/libauth/build/lib/key/key-utils.js?");
1358
1258
 
1359
1259
  /***/ }),
1360
1260
 
@@ -1368,6 +1268,16 @@ eval("__webpack_require__.a(__webpack_module__, async (__webpack_handle_async_de
1368
1268
 
1369
1269
  /***/ }),
1370
1270
 
1271
+ /***/ "./node_modules/@bitauth/libauth/build/lib/key/word-lists/bip39.english.js":
1272
+ /*!*********************************************************************************!*\
1273
+ !*** ./node_modules/@bitauth/libauth/build/lib/key/word-lists/bip39.english.js ***!
1274
+ \*********************************************************************************/
1275
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1276
+
1277
+ eval("/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"bip39WordListEnglish\": () => (/* binding */ bip39WordListEnglish)\n/* harmony export */ });\n/* eslint-disable max-lines */ const raw = `abandon\nability\nable\nabout\nabove\nabsent\nabsorb\nabstract\nabsurd\nabuse\naccess\naccident\naccount\naccuse\nachieve\nacid\nacoustic\nacquire\nacross\nact\naction\nactor\nactress\nactual\nadapt\nadd\naddict\naddress\nadjust\nadmit\nadult\nadvance\nadvice\naerobic\naffair\nafford\nafraid\nagain\nage\nagent\nagree\nahead\naim\nair\nairport\naisle\nalarm\nalbum\nalcohol\nalert\nalien\nall\nalley\nallow\nalmost\nalone\nalpha\nalready\nalso\nalter\nalways\namateur\namazing\namong\namount\namused\nanalyst\nanchor\nancient\nanger\nangle\nangry\nanimal\nankle\nannounce\nannual\nanother\nanswer\nantenna\nantique\nanxiety\nany\napart\napology\nappear\napple\napprove\napril\narch\narctic\narea\narena\nargue\narm\narmed\narmor\narmy\naround\narrange\narrest\narrive\narrow\nart\nartefact\nartist\nartwork\nask\naspect\nassault\nasset\nassist\nassume\nasthma\nathlete\natom\nattack\nattend\nattitude\nattract\nauction\naudit\naugust\naunt\nauthor\nauto\nautumn\naverage\navocado\navoid\nawake\naware\naway\nawesome\nawful\nawkward\naxis\nbaby\nbachelor\nbacon\nbadge\nbag\nbalance\nbalcony\nball\nbamboo\nbanana\nbanner\nbar\nbarely\nbargain\nbarrel\nbase\nbasic\nbasket\nbattle\nbeach\nbean\nbeauty\nbecause\nbecome\nbeef\nbefore\nbegin\nbehave\nbehind\nbelieve\nbelow\nbelt\nbench\nbenefit\nbest\nbetray\nbetter\nbetween\nbeyond\nbicycle\nbid\nbike\nbind\nbiology\nbird\nbirth\nbitter\nblack\nblade\nblame\nblanket\nblast\nbleak\nbless\nblind\nblood\nblossom\nblouse\nblue\nblur\nblush\nboard\nboat\nbody\nboil\nbomb\nbone\nbonus\nbook\nboost\nborder\nboring\nborrow\nboss\nbottom\nbounce\nbox\nboy\nbracket\nbrain\nbrand\nbrass\nbrave\nbread\nbreeze\nbrick\nbridge\nbrief\nbright\nbring\nbrisk\nbroccoli\nbroken\nbronze\nbroom\nbrother\nbrown\nbrush\nbubble\nbuddy\nbudget\nbuffalo\nbuild\nbulb\nbulk\nbullet\nbundle\nbunker\nburden\nburger\nburst\nbus\nbusiness\nbusy\nbutter\nbuyer\nbuzz\ncabbage\ncabin\ncable\ncactus\ncage\ncake\ncall\ncalm\ncamera\ncamp\ncan\ncanal\ncancel\ncandy\ncannon\ncanoe\ncanvas\ncanyon\ncapable\ncapital\ncaptain\ncar\ncarbon\ncard\ncargo\ncarpet\ncarry\ncart\ncase\ncash\ncasino\ncastle\ncasual\ncat\ncatalog\ncatch\ncategory\ncattle\ncaught\ncause\ncaution\ncave\nceiling\ncelery\ncement\ncensus\ncentury\ncereal\ncertain\nchair\nchalk\nchampion\nchange\nchaos\nchapter\ncharge\nchase\nchat\ncheap\ncheck\ncheese\nchef\ncherry\nchest\nchicken\nchief\nchild\nchimney\nchoice\nchoose\nchronic\nchuckle\nchunk\nchurn\ncigar\ncinnamon\ncircle\ncitizen\ncity\ncivil\nclaim\nclap\nclarify\nclaw\nclay\nclean\nclerk\nclever\nclick\nclient\ncliff\nclimb\nclinic\nclip\nclock\nclog\nclose\ncloth\ncloud\nclown\nclub\nclump\ncluster\nclutch\ncoach\ncoast\ncoconut\ncode\ncoffee\ncoil\ncoin\ncollect\ncolor\ncolumn\ncombine\ncome\ncomfort\ncomic\ncommon\ncompany\nconcert\nconduct\nconfirm\ncongress\nconnect\nconsider\ncontrol\nconvince\ncook\ncool\ncopper\ncopy\ncoral\ncore\ncorn\ncorrect\ncost\ncotton\ncouch\ncountry\ncouple\ncourse\ncousin\ncover\ncoyote\ncrack\ncradle\ncraft\ncram\ncrane\ncrash\ncrater\ncrawl\ncrazy\ncream\ncredit\ncreek\ncrew\ncricket\ncrime\ncrisp\ncritic\ncrop\ncross\ncrouch\ncrowd\ncrucial\ncruel\ncruise\ncrumble\ncrunch\ncrush\ncry\ncrystal\ncube\nculture\ncup\ncupboard\ncurious\ncurrent\ncurtain\ncurve\ncushion\ncustom\ncute\ncycle\ndad\ndamage\ndamp\ndance\ndanger\ndaring\ndash\ndaughter\ndawn\nday\ndeal\ndebate\ndebris\ndecade\ndecember\ndecide\ndecline\ndecorate\ndecrease\ndeer\ndefense\ndefine\ndefy\ndegree\ndelay\ndeliver\ndemand\ndemise\ndenial\ndentist\ndeny\ndepart\ndepend\ndeposit\ndepth\ndeputy\nderive\ndescribe\ndesert\ndesign\ndesk\ndespair\ndestroy\ndetail\ndetect\ndevelop\ndevice\ndevote\ndiagram\ndial\ndiamond\ndiary\ndice\ndiesel\ndiet\ndiffer\ndigital\ndignity\ndilemma\ndinner\ndinosaur\ndirect\ndirt\ndisagree\ndiscover\ndisease\ndish\ndismiss\ndisorder\ndisplay\ndistance\ndivert\ndivide\ndivorce\ndizzy\ndoctor\ndocument\ndog\ndoll\ndolphin\ndomain\ndonate\ndonkey\ndonor\ndoor\ndose\ndouble\ndove\ndraft\ndragon\ndrama\ndrastic\ndraw\ndream\ndress\ndrift\ndrill\ndrink\ndrip\ndrive\ndrop\ndrum\ndry\nduck\ndumb\ndune\nduring\ndust\ndutch\nduty\ndwarf\ndynamic\neager\neagle\nearly\nearn\nearth\neasily\neast\neasy\necho\necology\neconomy\nedge\nedit\neducate\neffort\negg\neight\neither\nelbow\nelder\nelectric\nelegant\nelement\nelephant\nelevator\nelite\nelse\nembark\nembody\nembrace\nemerge\nemotion\nemploy\nempower\nempty\nenable\nenact\nend\nendless\nendorse\nenemy\nenergy\nenforce\nengage\nengine\nenhance\nenjoy\nenlist\nenough\nenrich\nenroll\nensure\nenter\nentire\nentry\nenvelope\nepisode\nequal\nequip\nera\nerase\nerode\nerosion\nerror\nerupt\nescape\nessay\nessence\nestate\neternal\nethics\nevidence\nevil\nevoke\nevolve\nexact\nexample\nexcess\nexchange\nexcite\nexclude\nexcuse\nexecute\nexercise\nexhaust\nexhibit\nexile\nexist\nexit\nexotic\nexpand\nexpect\nexpire\nexplain\nexpose\nexpress\nextend\nextra\neye\neyebrow\nfabric\nface\nfaculty\nfade\nfaint\nfaith\nfall\nfalse\nfame\nfamily\nfamous\nfan\nfancy\nfantasy\nfarm\nfashion\nfat\nfatal\nfather\nfatigue\nfault\nfavorite\nfeature\nfebruary\nfederal\nfee\nfeed\nfeel\nfemale\nfence\nfestival\nfetch\nfever\nfew\nfiber\nfiction\nfield\nfigure\nfile\nfilm\nfilter\nfinal\nfind\nfine\nfinger\nfinish\nfire\nfirm\nfirst\nfiscal\nfish\nfit\nfitness\nfix\nflag\nflame\nflash\nflat\nflavor\nflee\nflight\nflip\nfloat\nflock\nfloor\nflower\nfluid\nflush\nfly\nfoam\nfocus\nfog\nfoil\nfold\nfollow\nfood\nfoot\nforce\nforest\nforget\nfork\nfortune\nforum\nforward\nfossil\nfoster\nfound\nfox\nfragile\nframe\nfrequent\nfresh\nfriend\nfringe\nfrog\nfront\nfrost\nfrown\nfrozen\nfruit\nfuel\nfun\nfunny\nfurnace\nfury\nfuture\ngadget\ngain\ngalaxy\ngallery\ngame\ngap\ngarage\ngarbage\ngarden\ngarlic\ngarment\ngas\ngasp\ngate\ngather\ngauge\ngaze\ngeneral\ngenius\ngenre\ngentle\ngenuine\ngesture\nghost\ngiant\ngift\ngiggle\nginger\ngiraffe\ngirl\ngive\nglad\nglance\nglare\nglass\nglide\nglimpse\nglobe\ngloom\nglory\nglove\nglow\nglue\ngoat\ngoddess\ngold\ngood\ngoose\ngorilla\ngospel\ngossip\ngovern\ngown\ngrab\ngrace\ngrain\ngrant\ngrape\ngrass\ngravity\ngreat\ngreen\ngrid\ngrief\ngrit\ngrocery\ngroup\ngrow\ngrunt\nguard\nguess\nguide\nguilt\nguitar\ngun\ngym\nhabit\nhair\nhalf\nhammer\nhamster\nhand\nhappy\nharbor\nhard\nharsh\nharvest\nhat\nhave\nhawk\nhazard\nhead\nhealth\nheart\nheavy\nhedgehog\nheight\nhello\nhelmet\nhelp\nhen\nhero\nhidden\nhigh\nhill\nhint\nhip\nhire\nhistory\nhobby\nhockey\nhold\nhole\nholiday\nhollow\nhome\nhoney\nhood\nhope\nhorn\nhorror\nhorse\nhospital\nhost\nhotel\nhour\nhover\nhub\nhuge\nhuman\nhumble\nhumor\nhundred\nhungry\nhunt\nhurdle\nhurry\nhurt\nhusband\nhybrid\nice\nicon\nidea\nidentify\nidle\nignore\nill\nillegal\nillness\nimage\nimitate\nimmense\nimmune\nimpact\nimpose\nimprove\nimpulse\ninch\ninclude\nincome\nincrease\nindex\nindicate\nindoor\nindustry\ninfant\ninflict\ninform\ninhale\ninherit\ninitial\ninject\ninjury\ninmate\ninner\ninnocent\ninput\ninquiry\ninsane\ninsect\ninside\ninspire\ninstall\nintact\ninterest\ninto\ninvest\ninvite\ninvolve\niron\nisland\nisolate\nissue\nitem\nivory\njacket\njaguar\njar\njazz\njealous\njeans\njelly\njewel\njob\njoin\njoke\njourney\njoy\njudge\njuice\njump\njungle\njunior\njunk\njust\nkangaroo\nkeen\nkeep\nketchup\nkey\nkick\nkid\nkidney\nkind\nkingdom\nkiss\nkit\nkitchen\nkite\nkitten\nkiwi\nknee\nknife\nknock\nknow\nlab\nlabel\nlabor\nladder\nlady\nlake\nlamp\nlanguage\nlaptop\nlarge\nlater\nlatin\nlaugh\nlaundry\nlava\nlaw\nlawn\nlawsuit\nlayer\nlazy\nleader\nleaf\nlearn\nleave\nlecture\nleft\nleg\nlegal\nlegend\nleisure\nlemon\nlend\nlength\nlens\nleopard\nlesson\nletter\nlevel\nliar\nliberty\nlibrary\nlicense\nlife\nlift\nlight\nlike\nlimb\nlimit\nlink\nlion\nliquid\nlist\nlittle\nlive\nlizard\nload\nloan\nlobster\nlocal\nlock\nlogic\nlonely\nlong\nloop\nlottery\nloud\nlounge\nlove\nloyal\nlucky\nluggage\nlumber\nlunar\nlunch\nluxury\nlyrics\nmachine\nmad\nmagic\nmagnet\nmaid\nmail\nmain\nmajor\nmake\nmammal\nman\nmanage\nmandate\nmango\nmansion\nmanual\nmaple\nmarble\nmarch\nmargin\nmarine\nmarket\nmarriage\nmask\nmass\nmaster\nmatch\nmaterial\nmath\nmatrix\nmatter\nmaximum\nmaze\nmeadow\nmean\nmeasure\nmeat\nmechanic\nmedal\nmedia\nmelody\nmelt\nmember\nmemory\nmention\nmenu\nmercy\nmerge\nmerit\nmerry\nmesh\nmessage\nmetal\nmethod\nmiddle\nmidnight\nmilk\nmillion\nmimic\nmind\nminimum\nminor\nminute\nmiracle\nmirror\nmisery\nmiss\nmistake\nmix\nmixed\nmixture\nmobile\nmodel\nmodify\nmom\nmoment\nmonitor\nmonkey\nmonster\nmonth\nmoon\nmoral\nmore\nmorning\nmosquito\nmother\nmotion\nmotor\nmountain\nmouse\nmove\nmovie\nmuch\nmuffin\nmule\nmultiply\nmuscle\nmuseum\nmushroom\nmusic\nmust\nmutual\nmyself\nmystery\nmyth\nnaive\nname\nnapkin\nnarrow\nnasty\nnation\nnature\nnear\nneck\nneed\nnegative\nneglect\nneither\nnephew\nnerve\nnest\nnet\nnetwork\nneutral\nnever\nnews\nnext\nnice\nnight\nnoble\nnoise\nnominee\nnoodle\nnormal\nnorth\nnose\nnotable\nnote\nnothing\nnotice\nnovel\nnow\nnuclear\nnumber\nnurse\nnut\noak\nobey\nobject\noblige\nobscure\nobserve\nobtain\nobvious\noccur\nocean\noctober\nodor\noff\noffer\noffice\noften\noil\nokay\nold\nolive\nolympic\nomit\nonce\none\nonion\nonline\nonly\nopen\nopera\nopinion\noppose\noption\norange\norbit\norchard\norder\nordinary\norgan\norient\noriginal\norphan\nostrich\nother\noutdoor\nouter\noutput\noutside\noval\noven\nover\nown\nowner\noxygen\noyster\nozone\npact\npaddle\npage\npair\npalace\npalm\npanda\npanel\npanic\npanther\npaper\nparade\nparent\npark\nparrot\nparty\npass\npatch\npath\npatient\npatrol\npattern\npause\npave\npayment\npeace\npeanut\npear\npeasant\npelican\npen\npenalty\npencil\npeople\npepper\nperfect\npermit\nperson\npet\nphone\nphoto\nphrase\nphysical\npiano\npicnic\npicture\npiece\npig\npigeon\npill\npilot\npink\npioneer\npipe\npistol\npitch\npizza\nplace\nplanet\nplastic\nplate\nplay\nplease\npledge\npluck\nplug\nplunge\npoem\npoet\npoint\npolar\npole\npolice\npond\npony\npool\npopular\nportion\nposition\npossible\npost\npotato\npottery\npoverty\npowder\npower\npractice\npraise\npredict\nprefer\nprepare\npresent\npretty\nprevent\nprice\npride\nprimary\nprint\npriority\nprison\nprivate\nprize\nproblem\nprocess\nproduce\nprofit\nprogram\nproject\npromote\nproof\nproperty\nprosper\nprotect\nproud\nprovide\npublic\npudding\npull\npulp\npulse\npumpkin\npunch\npupil\npuppy\npurchase\npurity\npurpose\npurse\npush\nput\npuzzle\npyramid\nquality\nquantum\nquarter\nquestion\nquick\nquit\nquiz\nquote\nrabbit\nraccoon\nrace\nrack\nradar\nradio\nrail\nrain\nraise\nrally\nramp\nranch\nrandom\nrange\nrapid\nrare\nrate\nrather\nraven\nraw\nrazor\nready\nreal\nreason\nrebel\nrebuild\nrecall\nreceive\nrecipe\nrecord\nrecycle\nreduce\nreflect\nreform\nrefuse\nregion\nregret\nregular\nreject\nrelax\nrelease\nrelief\nrely\nremain\nremember\nremind\nremove\nrender\nrenew\nrent\nreopen\nrepair\nrepeat\nreplace\nreport\nrequire\nrescue\nresemble\nresist\nresource\nresponse\nresult\nretire\nretreat\nreturn\nreunion\nreveal\nreview\nreward\nrhythm\nrib\nribbon\nrice\nrich\nride\nridge\nrifle\nright\nrigid\nring\nriot\nripple\nrisk\nritual\nrival\nriver\nroad\nroast\nrobot\nrobust\nrocket\nromance\nroof\nrookie\nroom\nrose\nrotate\nrough\nround\nroute\nroyal\nrubber\nrude\nrug\nrule\nrun\nrunway\nrural\nsad\nsaddle\nsadness\nsafe\nsail\nsalad\nsalmon\nsalon\nsalt\nsalute\nsame\nsample\nsand\nsatisfy\nsatoshi\nsauce\nsausage\nsave\nsay\nscale\nscan\nscare\nscatter\nscene\nscheme\nschool\nscience\nscissors\nscorpion\nscout\nscrap\nscreen\nscript\nscrub\nsea\nsearch\nseason\nseat\nsecond\nsecret\nsection\nsecurity\nseed\nseek\nsegment\nselect\nsell\nseminar\nsenior\nsense\nsentence\nseries\nservice\nsession\nsettle\nsetup\nseven\nshadow\nshaft\nshallow\nshare\nshed\nshell\nsheriff\nshield\nshift\nshine\nship\nshiver\nshock\nshoe\nshoot\nshop\nshort\nshoulder\nshove\nshrimp\nshrug\nshuffle\nshy\nsibling\nsick\nside\nsiege\nsight\nsign\nsilent\nsilk\nsilly\nsilver\nsimilar\nsimple\nsince\nsing\nsiren\nsister\nsituate\nsix\nsize\nskate\nsketch\nski\nskill\nskin\nskirt\nskull\nslab\nslam\nsleep\nslender\nslice\nslide\nslight\nslim\nslogan\nslot\nslow\nslush\nsmall\nsmart\nsmile\nsmoke\nsmooth\nsnack\nsnake\nsnap\nsniff\nsnow\nsoap\nsoccer\nsocial\nsock\nsoda\nsoft\nsolar\nsoldier\nsolid\nsolution\nsolve\nsomeone\nsong\nsoon\nsorry\nsort\nsoul\nsound\nsoup\nsource\nsouth\nspace\nspare\nspatial\nspawn\nspeak\nspecial\nspeed\nspell\nspend\nsphere\nspice\nspider\nspike\nspin\nspirit\nsplit\nspoil\nsponsor\nspoon\nsport\nspot\nspray\nspread\nspring\nspy\nsquare\nsqueeze\nsquirrel\nstable\nstadium\nstaff\nstage\nstairs\nstamp\nstand\nstart\nstate\nstay\nsteak\nsteel\nstem\nstep\nstereo\nstick\nstill\nsting\nstock\nstomach\nstone\nstool\nstory\nstove\nstrategy\nstreet\nstrike\nstrong\nstruggle\nstudent\nstuff\nstumble\nstyle\nsubject\nsubmit\nsubway\nsuccess\nsuch\nsudden\nsuffer\nsugar\nsuggest\nsuit\nsummer\nsun\nsunny\nsunset\nsuper\nsupply\nsupreme\nsure\nsurface\nsurge\nsurprise\nsurround\nsurvey\nsuspect\nsustain\nswallow\nswamp\nswap\nswarm\nswear\nsweet\nswift\nswim\nswing\nswitch\nsword\nsymbol\nsymptom\nsyrup\nsystem\ntable\ntackle\ntag\ntail\ntalent\ntalk\ntank\ntape\ntarget\ntask\ntaste\ntattoo\ntaxi\nteach\nteam\ntell\nten\ntenant\ntennis\ntent\nterm\ntest\ntext\nthank\nthat\ntheme\nthen\ntheory\nthere\nthey\nthing\nthis\nthought\nthree\nthrive\nthrow\nthumb\nthunder\nticket\ntide\ntiger\ntilt\ntimber\ntime\ntiny\ntip\ntired\ntissue\ntitle\ntoast\ntobacco\ntoday\ntoddler\ntoe\ntogether\ntoilet\ntoken\ntomato\ntomorrow\ntone\ntongue\ntonight\ntool\ntooth\ntop\ntopic\ntopple\ntorch\ntornado\ntortoise\ntoss\ntotal\ntourist\ntoward\ntower\ntown\ntoy\ntrack\ntrade\ntraffic\ntragic\ntrain\ntransfer\ntrap\ntrash\ntravel\ntray\ntreat\ntree\ntrend\ntrial\ntribe\ntrick\ntrigger\ntrim\ntrip\ntrophy\ntrouble\ntruck\ntrue\ntruly\ntrumpet\ntrust\ntruth\ntry\ntube\ntuition\ntumble\ntuna\ntunnel\nturkey\nturn\nturtle\ntwelve\ntwenty\ntwice\ntwin\ntwist\ntwo\ntype\ntypical\nugly\numbrella\nunable\nunaware\nuncle\nuncover\nunder\nundo\nunfair\nunfold\nunhappy\nuniform\nunique\nunit\nuniverse\nunknown\nunlock\nuntil\nunusual\nunveil\nupdate\nupgrade\nuphold\nupon\nupper\nupset\nurban\nurge\nusage\nuse\nused\nuseful\nuseless\nusual\nutility\nvacant\nvacuum\nvague\nvalid\nvalley\nvalve\nvan\nvanish\nvapor\nvarious\nvast\nvault\nvehicle\nvelvet\nvendor\nventure\nvenue\nverb\nverify\nversion\nvery\nvessel\nveteran\nviable\nvibrant\nvicious\nvictory\nvideo\nview\nvillage\nvintage\nviolin\nvirtual\nvirus\nvisa\nvisit\nvisual\nvital\nvivid\nvocal\nvoice\nvoid\nvolcano\nvolume\nvote\nvoyage\nwage\nwagon\nwait\nwalk\nwall\nwalnut\nwant\nwarfare\nwarm\nwarrior\nwash\nwasp\nwaste\nwater\nwave\nway\nwealth\nweapon\nwear\nweasel\nweather\nweb\nwedding\nweekend\nweird\nwelcome\nwest\nwet\nwhale\nwhat\nwheat\nwheel\nwhen\nwhere\nwhip\nwhisper\nwide\nwidth\nwife\nwild\nwill\nwin\nwindow\nwine\nwing\nwink\nwinner\nwinter\nwire\nwisdom\nwise\nwish\nwitness\nwolf\nwoman\nwonder\nwood\nwool\nword\nwork\nworld\nworry\nworth\nwrap\nwreck\nwrestle\nwrist\nwrite\nwrong\nyard\nyear\nyellow\nyou\nyoung\nyouth\nzebra\nzero\nzone\nzoo`;\nconst bip39WordListEnglish = raw.split('\\n');\n//# sourceMappingURL=bip39.english.js.map\n\n//# sourceURL=webpack://mainnet-js/./node_modules/@bitauth/libauth/build/lib/key/word-lists/bip39.english.js?");
1278
+
1279
+ /***/ }),
1280
+
1371
1281
  /***/ "./node_modules/@bitauth/libauth/build/lib/language/compile.js":
1372
1282
  /*!*********************************************************************!*\
1373
1283
  !*** ./node_modules/@bitauth/libauth/build/lib/language/compile.js ***!