@dcl/governance-site 2.5.1 → 2.5.2-35861583677.commit-9185f43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{ConstantsUtil-c3a75781.js → ConstantsUtil-0186a343.js} +1 -1
- package/assets/{ExchangeController-de6066de.js → ExchangeController-58cfc61e.js} +1 -1
- package/assets/{HelpersUtil-47bce835.js → HelpersUtil-026d751f.js} +1 -1
- package/assets/{NetworkUtil-cfdab321.js → NetworkUtil-9d775636.js} +1 -1
- package/assets/{ReownAuthentication-c1098727.js → ReownAuthentication-e9d543a6.js} +1 -1
- package/assets/{SwapController-6f3f28da.js → SwapController-1e7ac90d.js} +1 -1
- package/assets/{UserAvatar-4217a7be.js → UserAvatar-9b8de83c.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-316899f0.js → W3MFrameProviderSingleton-967a5251.js} +2 -2
- package/assets/{basic-d9c0f288.js → basic-8129beff.js} +1 -1
- package/assets/{biconomy-bc04f7cc.js → biconomy-341f7abf.js} +1 -1
- package/assets/{ccip-d88eddf3.js → ccip-522e35c5.js} +1 -1
- package/assets/{ccip-e509a2bd.js → ccip-9be4c874.js} +1 -1
- package/assets/{chains-12910e1f.js → chains-3d11688e.js} +1 -1
- package/assets/{common-583dfda9.js → common-ac3a84bf.js} +1 -1
- package/assets/{compat-000e5801.js → compat-80bca490.js} +1 -1
- package/assets/{controller-5a843a75.js → controller-06b1d4a6.js} +1 -1
- package/assets/{core-1a166f08.js → core-701e3000.js} +3 -3
- package/assets/{custom-3c5e7814.js → custom-05656959.js} +1 -1
- package/assets/{data-capture-a27f6e5c.js → data-capture-4c4bff8c.js} +1 -1
- package/assets/{decimals-bddbc743.js → decimals-7a8f2808.js} +1 -1
- package/assets/decimals-ae1efeb6.js +1 -0
- package/assets/{email-0c5024d9.js → email-83340241.js} +1 -1
- package/assets/{embedded-wallet-d5992bd8.js → embedded-wallet-5f601961.js} +1 -1
- package/assets/{engine-9b39863f.js → engine-a3c58826.js} +1 -1
- package/assets/{estimate-l1-fee-69110584.js → estimate-l1-fee-e22e70df.js} +1 -1
- package/assets/eth_estimateGas-4bda2940.js +1 -0
- package/assets/{eth_getStorageAt-125a2bc1.js → eth_getStorageAt-fece51db.js} +1 -1
- package/assets/{eth_getTransactionCount-6240f912.js → eth_getTransactionCount-b3bc696d.js} +1 -1
- package/assets/{ethereum-0d579241.js → ethereum-dfcdc726.js} +1 -1
- package/assets/{execute-264a98ed.js → execute-ddc9aba5.js} +1 -1
- package/assets/{extractIPFS-d48a2b7b.js → extractIPFS-f2fa1c0d.js} +1 -1
- package/assets/features-e6abfb3d.js +1 -0
- package/assets/{fetchTokenMetadata-f32fb87e.js → fetchTokenMetadata-9aa0579f.js} +1 -1
- package/assets/{fortmatic-5f1bb82e.js → fortmatic-b2c3dfe2.js} +1 -1
- package/assets/{get-bytecode-7a8c6215.js → get-bytecode-3e525016.js} +1 -1
- package/assets/{get-ecosystem-wallet-info-0a9d1fa7.js → get-ecosystem-wallet-info-af73bf8f.js} +1 -1
- package/assets/{getBalance-e2e6d859.js → getBalance-5553b762.js} +1 -1
- package/assets/{getInstalledModules-4e23fa8a.js → getInstalledModules-8c794f3f.js} +1 -1
- package/assets/{getNFT-5486b2f7.js → getNFT-e012001d.js} +1 -1
- package/assets/{getNFT-74f5ae81.js → getNFT-e357df62.js} +1 -1
- package/assets/{hashBytecode-7a0e56f5.js → hashBytecode-f2cbe7cf.js} +1 -1
- package/assets/{hashTypedData-cc1589a7.js → hashTypedData-6c569030.js} +1 -1
- package/assets/{hashTypedData-03b693eb.js → hashTypedData-80d0736a.js} +1 -1
- package/assets/{in-app-1d212717.js → in-app-98ae0a96.js} +1 -1
- package/assets/{in-app-wallet-calls-7fdb5823.js → in-app-wallet-calls-6bbf9789.js} +1 -1
- package/assets/{index-fe892b11.js → index-0388e212.js} +1 -1
- package/assets/{index-877ffe4a.js → index-08f74686.js} +1 -1
- package/assets/{index-8aeaab91.js → index-164d622a.js} +1 -1
- package/assets/{index-06d7a58c.js → index-1735c2dc.js} +1 -1
- package/assets/{index-59db4a58.css → index-19c63dfb.css} +4 -4
- package/assets/{index-10c73e9d.js → index-1a84fe52.js} +215 -215
- package/assets/{index-d44b19e2.js → index-1ebd6ac9.js} +1 -1
- package/assets/{index-20b33848.js → index-1f941621.js} +1 -1
- package/assets/{index-93724bad.js → index-2151fb57.js} +2 -2
- package/assets/{index-e583ff4e.js → index-2158aa04.js} +1 -1
- package/assets/{index-a6a44c61.js → index-258eaeba.js} +1 -1
- package/assets/{index-5d7b6c51.js → index-25b31062.js} +1 -1
- package/assets/{index-a151f6d7.js → index-27604e48.js} +1 -1
- package/assets/{index-31022e63.js → index-2dea5e5e.js} +1 -1
- package/assets/{index-3d19d06c.js → index-2fd9095a.js} +1 -1
- package/assets/{index-30a8f53e.js → index-319df612.js} +1 -1
- package/assets/{index-b3691f6b.js → index-38eb3ccf.js} +1 -1
- package/assets/{index-a22875e4.js → index-3b0c0492.js} +2 -2
- package/assets/{index-8fa35f13.js → index-45e821a2.js} +1 -1
- package/assets/{index-2f82abe0.js → index-46384ac4.js} +1 -1
- package/assets/{index-3bc5c9df.js → index-49378015.js} +1 -1
- package/assets/{index-206ffe7d.js → index-56215787.js} +1 -1
- package/assets/{index-9bee2cc7.js → index-59fc9a5d.js} +1 -1
- package/assets/{index-b3889ac8.js → index-5ad2a852.js} +1 -1
- package/assets/{index-e332040b.js → index-63c89e55.js} +1 -1
- package/assets/{index-69a0492a.js → index-6780e2be.js} +1 -1
- package/assets/{index-6ec6d7c7.js → index-745ac19e.js} +1 -1
- package/assets/{index-9d37fa54.js → index-758bf1f0.js} +1 -1
- package/assets/{index-3b678484.js → index-7a6898a2.js} +1 -1
- package/assets/{index-7ad05b06.js → index-82528685.js} +1 -1
- package/assets/{index-2cab452e.js → index-83245c25.js} +1 -1
- package/assets/{index-401eba13.js → index-85bdd658.js} +1 -1
- package/assets/{index-8d81098b.js → index-88a218ce.js} +1 -1
- package/assets/{index-cafc0996.js → index-8b08acb1.js} +1 -1
- package/assets/{index-f49c89c1.js → index-8bdaeaf2.js} +1 -1
- package/assets/{index-780a2232.js → index-9294dcd7.js} +1 -1
- package/assets/{index-d2f37bee.js → index-979a21b1.js} +1 -1
- package/assets/{index-bcedc0e6.js → index-9a10118e.js} +1 -1
- package/assets/{index-610c7efb.js → index-9b3e03a6.js} +1 -1
- package/assets/{index-19891b89.js → index-9d6a41bc.js} +1 -1
- package/assets/{index-ad63abcf.js → index-9dbf9a6d.js} +1 -1
- package/assets/{index-d77a63d3.js → index-a46e95e9.js} +1 -1
- package/assets/{index-8cbb4ff7.js → index-b881deee.js} +2 -2
- package/assets/{index-bb13bbcd.js → index-b93c6430.js} +1 -1
- package/assets/{index-5071722a.js → index-c4b46d38.js} +1 -1
- package/assets/{index-e9ab8876.js → index-c9395bda.js} +1 -1
- package/assets/{index-6d8da0b7.js → index-d410c519.js} +1 -1
- package/assets/{index-a69ba1cc.js → index-dbe55de2.js} +1 -1
- package/assets/{index-5ece9033.js → index-dd7935fc.js} +1 -1
- package/assets/{index-23dd6251.js → index-e4a08cd9.js} +2 -2
- package/assets/{index-aae2726c.js → index-e706d2dd.js} +1 -1
- package/assets/{index-d22cfc35.js → index-e7a5e177.js} +1 -1
- package/assets/{index-7f01a27a.js → index-edac5298.js} +1 -1
- package/assets/{index-c49dee70.js → index-fabddcdf.js} +1 -1
- package/assets/{index-32a45902.js → index-ff52fd4e.js} +1 -1
- package/assets/{index.es-30a0ec70.js → index.es-a3dba62d.js} +3 -3
- package/assets/{index.es-4520fb10.js → index.es-d75c71a0.js} +1 -1
- package/assets/{index.es-0f7943d8.js → index.es-f33fd942.js} +1 -1
- package/assets/{index.web-e2526e19.js → index.web-480572c8.js} +1 -1
- package/assets/{localBatchGatewayRequest-ff5d42f6.js → localBatchGatewayRequest-efd5ac4a.js} +1 -1
- package/assets/{native-3e8a86bb.js → native-a05bab03.js} +1 -1
- package/assets/{networks-fc1b1902.js → networks-2b2a76a9.js} +1 -1
- package/assets/{onramp-cf41485f.js → onramp-19c3d49b.js} +1 -1
- package/assets/{openzeppelin-e72c7daa.js → openzeppelin-b027e042.js} +1 -1
- package/assets/{ownerOf-c09a8f45.js → ownerOf-aaa7f15d.js} +1 -1
- package/assets/parseNft-50788d83.js +1 -0
- package/assets/{parseSignature-b975d9a6.js → parseSignature-2a8160cd.js} +1 -1
- package/assets/{parseSignature-6b0b4698.js → parseSignature-993a1f6b.js} +2 -2
- package/assets/{passkeys-bb25d43e.js → passkeys-5985ac24.js} +1 -1
- package/assets/{pay-with-exchange-cd96ece6.js → pay-with-exchange-be950970.js} +1 -1
- package/assets/{prepare-contract-call-4be4cc68.js → prepare-contract-call-8aa69ada.js} +1 -1
- package/assets/{qr-overlay-fd67e1ca.js → qr-overlay-af51f28c.js} +1 -1
- package/assets/{receive-9ddd4e2d.js → receive-0381a78f.js} +1 -1
- package/assets/{redirect-state-301cb22c.js → redirect-state-defbbf42.js} +1 -1
- package/assets/{resolveImplementation-6b55308f.js → resolveImplementation-62075124.js} +1 -1
- package/assets/{rpc-83ca4b71.js → rpc-238b416b.js} +1 -1
- package/assets/{secp256k1-4ab38443.js → secp256k1-1b67b0f3.js} +1 -1
- package/assets/{secp256k1-44255658.js → secp256k1-52a3953d.js} +1 -1
- package/assets/{secp256k1-ac683ebc.js → secp256k1-cda45740.js} +1 -1
- package/assets/{send-7e34f1e6.js → send-1d9bf8b0.js} +1 -1
- package/assets/{send-batch-transaction-429c82ee.js → send-batch-transaction-37dfd3aa.js} +1 -1
- package/assets/{send-eip712-transaction-20a9b9ed.js → send-eip712-transaction-549d9c5e.js} +1 -1
- package/assets/send-gasless-transaction-2889f57e.js +1 -0
- package/assets/{send-transaction-c3053b90.js → send-transaction-be048c3f.js} +1 -1
- package/assets/{session-proposal-d1473b74.js → session-proposal-bf723dfb.js} +1 -1
- package/assets/{session-request-f0a8f695.js → session-request-adcff7df.js} +1 -1
- package/assets/{sha256-937f482f.js → sha256-20325278.js} +1 -1
- package/assets/{signing-6d6682ec.js → signing-3a53acbe.js} +2 -2
- package/assets/{socials-d1713bee.js → socials-f7529d78.js} +1 -1
- package/assets/{swaps-8bad12fe.js → swaps-17bc96cf.js} +1 -1
- package/assets/{thirdweb-73096eef.js → thirdweb-88164bcf.js} +2 -2
- package/assets/{to-serializable-transaction-9e540f8c.js → to-serializable-transaction-b9665f26.js} +2 -2
- package/assets/{totalSupply-7e83596b.js → totalSupply-1da49819.js} +1 -1
- package/assets/{transaction-ea614a5a.js → transaction-c89d76c9.js} +1 -1
- package/assets/{transactionReceipt-1e425ab1.js → transactionReceipt-e9fe9529.js} +1 -1
- package/assets/{transactions-a47e2cb5.js → transactions-6a2c06c6.js} +1 -1
- package/assets/{tslib.es6-24024d67.js → tslib.es6-627b8828.js} +1 -1
- package/assets/{utils-dddc86ba.js → utils-b0786619.js} +1 -1
- package/assets/{verifyHash-b21b75c2.js → verifyHash-1c30e3f1.js} +1 -1
- package/assets/{w3m-modal-e914d462.js → w3m-modal-35482de7.js} +1 -1
- package/assets/{w3m-modal-ff2f112d.js → w3m-modal-c7ed658d.js} +1 -1
- package/assets/{wait-for-tx-receipt-50389b4e.js → wait-for-tx-receipt-997fc5db.js} +1 -1
- package/assets/{wallets-4e23dd0f.js → wallets-608f085e.js} +4 -4
- package/assets/{web-connector-351693f5.js → web-connector-44f067c5.js} +2 -2
- package/assets/{writeContract-03e44e49.js → writeContract-8e997358.js} +2 -2
- package/assets/{zora-sepolia-72e60034.js → zora-sepolia-da0294c7.js} +1 -1
- package/assets/{zoraTestnet-1485f0af.js → zoraTestnet-83f44c9a.js} +1 -1
- package/index.html +4 -4
- package/package.json +3 -3
- package/assets/decimals-50f9fee1.js +0 -1
- package/assets/eth_estimateGas-945ce595.js +0 -1
- package/assets/features-7c8dc530.js +0 -1
- package/assets/parseNft-147a451f.js +0 -1
- package/assets/send-gasless-transaction-0435da18.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as U,w as R}from"./execute-264a98ed.js";import{b as O,a as P}from"./uint8-array-63adf023.js";import"./prepare-contract-call-4be4cc68.js";import"./utils-dddc86ba.js";import"./index-10c73e9d.js";var V=Object.defineProperty,h=(e,a)=>{for(var t in a)V(e,t,{get:a[t],enumerable:!0})},u={};h(u,{authenticate:()=>W,isAutocompleteAvailable:()=>E,isAvailable:()=>x,isLocalAuthenticator:()=>L,register:()=>M});var k={};h(k,{bufferToHex:()=>w,concatenateBuffers:()=>K,isBase64url:()=>p,parseBase64url:()=>o,parseBuffer:()=>C,sha256:()=>F,toBase64url:()=>d,toBuffer:()=>y});function y(e){return Uint8Array.from(e,a=>a.charCodeAt(0)).buffer}function C(e){return String.fromCharCode(...new Uint8Array(e))}function p(e){return e.match(/^[a-zA-Z0-9\-_]+=*$/)!==null}function d(e){return btoa(C(e)).replaceAll("+","-").replaceAll("/","_")}function o(e){return e=e.replaceAll("-","+").replaceAll("_","/"),y(atob(e))}async function F(e){return await crypto.subtle.digest("SHA-256",e)}function w(e){return[...new Uint8Array(e)].map(a=>a.toString(16).padStart(2,"0")).join("")}function K(e,a){var t=new Uint8Array(e.byteLength+a.byteLength);return t.set(new Uint8Array(e),0),t.set(new Uint8Array(a),e.byteLength),t}function x(){return!!window.PublicKeyCredential}async function L(){return await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()}function H(e){if(!(!e||e.length===0))return e.includes("client-device")?e.includes("security-key")||e.includes("hybrid")?void 0:"platform":"cross-platform"}var n=null;async function M(e){if(!e.challenge)throw new Error('"challenge" required');if(!e.user)throw new Error('"user" required');if(!p(e.challenge))throw new Error("Provided challenge is not properly encoded in Base64url");let a=typeof e.user=="string"?{name:e.user}:e.user;a.id||(a.id=crypto.randomUUID());let t={challenge:o(e.challenge),rp:{id:e.domain??window.location.hostname,name:e.domain??window.location.hostname},user:{id:y(a.id),name:a.name,displayName:a.displayName??a.name},hints:e.hints,pubKeyCredParams:[{alg:-7,type:"public-key"},{alg:-257,type:"public-key"}],timeout:e.timeout,authenticatorSelection:{userVerification:e.userVerification,authenticatorAttachment:H(e.hints),residentKey:e.discoverable??"preferred",requireResidentKey:e.discoverable==="required"},attestation:"direct",...e.customProperties};console.debug(t),n==null||n.abort("Cancel ongoing authentication"),n=new AbortController;let i=await navigator.credentials.create({publicKey:t,signal:n==null?void 0:n.signal}),c=i.response;if(n=null,console.debug(i),i.type!="public-key")throw"Unexpected credential type!";let r=c.getPublicKey();if(!r)throw"Non-compliant browser or authenticator!";return{type:i.type,id:i.id,rawId:d(i.rawId),authenticatorAttachment:i.authenticatorAttachment,clientExtensionResults:i.getClientExtensionResults(),response:{attestationObject:d(c.attestationObject),authenticatorData:d(c.getAuthenticatorData()),clientDataJSON:d(c.clientDataJSON),publicKey:d(r),publicKeyAlgorithm:c.getPublicKeyAlgorithm(),transports:c.getTransports()},user:a}}async function E(){return PublicKeyCredential.isConditionalMediationAvailable&&PublicKeyCredential.isConditionalMediationAvailable()}async function W(e){var c;if(!p(e.challenge))throw new Error("Provided challenge is not properly encoded in Base64url");if(e.autocomplete&&!await E())throw new Error("Passkeys autocomplete with conditional mediation is not available in this browser.");let a={challenge:o(e.challenge),rpId:e.domain??window.location.hostname,allowCredentials:(c=e.allowCredentials)==null?void 0:c.map($),hints:e.hints,userVerification:e.userVerification,timeout:e.timeout,...e.customProperties};console.debug(a),n==null||n.abort("Cancel ongoing authentication"),n=new AbortController;let t=await navigator.credentials.get({publicKey:a,mediation:e.autocomplete?"conditional":void 0,signal:n==null?void 0:n.signal});if(t.type!="public-key")throw"Unexpected credential type!";n=null,console.debug(t);let i=t.response;return{clientExtensionResults:t.getClientExtensionResults(),id:t.id,rawId:d(t.rawId),type:t.type,authenticatorAttachment:t.authenticatorAttachment,response:{authenticatorData:d(i.authenticatorData),clientDataJSON:d(i.clientDataJSON),signature:d(i.signature),userHandle:i.userHandle?d(i.userHandle):void 0}}}function $(e){return typeof e=="string"?{id:o(e),type:"public-key"}:{id:o(e.id),type:"public-key",transports:e.transports}}var J={};h(J,{parseCryptoKey:()=>Y,randomChallenge:()=>j,verifyAuthentication:()=>ae,verifyRegistration:()=>ee,verifySignature:()=>v});var I={};h(I,{getAlgoName:()=>m,parseAuthentication:()=>_,parseAuthenticator:()=>s,parseClient:()=>D,parseRegistration:()=>Z,toAuthenticationInfo:()=>g,toRegistrationInfo:()=>T});var G={"00000000-0000-0000-0000-000000000000":"Unknown authenticator","0076631b-d4a0-427f-5773-0ec71c9e0279":"HYPR FIDO2 Authenticator","01020304-0506-0708-0102-030405060708":"Chromium Virtual Authenticator (browser dev tools)","050dd0bc-ff20-4265-8d5d-305c4b215192":"eToken Fusion FIPS","07a9f89c-6407-4594-9d56-621d5f1e358b":"NXP Semiconductros FIDO2 Conformance Testing CTAP2 Authenticator","08987058-cadc-4b81-b6e1-30de50dcbe96":"Windows Hello","092277e5-8437-46b5-b911-ea64b294acb7":"Taglio CTAP2.1 CS","09591fc6-9811-48f7-8f57-b9f23df6413f":"Pone Biometrics OFFPAD Authenticator","0acf3011-bc60-f375-fb53-6f05f43154e0":"Nymi FIDO2 Authenticator","0bb43545-fd2c-4185-87dd-feb0b2916ace":"Security Key NFC by Yubico - Enterprise Edition","0d9b2e56-566b-c393-2940-f821b7f15d6d":"Excelsecu eSecu FIDO2 Pro Security Key","0db01cd6-5618-455b-bb46-1ec203d3213e":"GoldKey Security Token","0ea242b4-43c4-4a1b-8b17-dd6d0b6baec6":"Keeper","10c70715-2a9a-4de1-b0aa-3cff6d496d39":"eToken Fusion NFC FIPS","1105e4ed-af1d-02ff-ffff-ffffffffffff":"Egomet FIDO2 Authenticator for Android","12755c32-8ad1-46eb-881c-e0b38d848b09":"Feitian ePass FIDO Authenticator (CTAP2.1, CTAP2.0, U2F)","12ded745-4bed-47d4-abaa-e713f51d6393":"Feitian AllinOne FIDO2 Authenticator","146e77ef-11eb-4423-b847-ce77864e9411":"eToken Fusion NFC PIV","149a2021-8ef6-4133-96b8-81f8d5b7f1f5":"Security Key by Yubico with NFC","17290f1e-c212-34d0-1423-365d729f09d9":"Thales PIN iOS SDK","175cd298-83d2-4a26-b637-313c07a6434e":"Chunghwa Telecom FIDO2 Smart Card Authenticator","19083c3d-8383-4b18-bc03-8f1c9ab2fd1b":"YubiKey 5 Series","1ac71f64-468d-4fe0-bef1-0e5f2f551f18":"YubiKey 5 Series with NFC (Enterprise Profile)","1c086528-58d5-f211-823c-356786e36140":"Atos CardOS FIDO2","1d1b4e33-76a1-47fb-97a0-14b10d0933f1":"Cryptnox FIDO2.1","1d8cac46-47a1-3386-af50-e88ae46fe802":"Ledger Flex FIDO2 Authenticator","1e906e14-77af-46bc-ae9f-fe6ef18257e4":"VeridiumID Passkey iOS SDK","20ac7a17-c814-4833-93fe-539f0d5e3389":"YubiKey 5 Series (Enterprise Profile)","20f0be98-9af9-986a-4b42-8eca4acb28e4":"Excelsecu eSecu FIDO2 Fingerprint Security Key","2194b428-9397-4046-8f39-007a1605a482":"IDPrime 931 Fido","22248c4c-7a12-46e2-9a41-44291b373a4d":"LogMeOnce","234cd403-35a2-4cc2-8015-77ea280c77f5":"Feitian ePass FIDO2-NFC Series (CTAP2.1, CTAP2.0, U2F)","23786452-f02d-4344-87ed-aaf703726881":"SafeNet eToken Fusion CC","24673149-6c86-42e7-98d9-433fb5b73296":"YubiKey 5 Series with Lightning","260e3021-482d-442d-838c-7edfbe153b7e":"Feitian ePass FIDO2-NFC Plus Authenticator","2772ce93-eb4b-4090-8b73-330f48477d73":"Security Key NFC by Yubico - Enterprise Edition Preview","2a55aee6-27cb-42c0-bc6e-04efe999e88a":"HID Crescendo 4000","2bff89f2-323a-48fc-b7c8-9ff7fe87c07e":"Feitian BioPass FIDO2 Pro (Enterprise Profile)","2c0df832-92de-4be1-8412-88a8f074df4a":"Feitian FIDO Smart Card","2c2aeed8-8174-4159-814b-486e92a261d0":"NEOWAVE WINKEO V2.0","2cd2f727-f6ca-44da-8f48-5c2e5da000a2":"Nitrokey 3 AM","2d3bec26-15ee-4f5d-88b2-53622490270b":"HID Crescendo Key V2","2fc0579f-8113-47ea-b116-bb5a8db9202a":"YubiKey 5 Series with NFC","2ffd6452-01da-471f-821b-ea4bf6c8676a":"IDPrime 941 Fido","30b5035e-d297-4fc1-b00b-addc96ba6a97":"OneSpan FIDO Touch","30b5035e-d297-4ff1-010b-addc96ba6a98":"OneSpan DIGIPASS FX1a","30b5035e-d297-4ff1-b00b-addc96ba6a98":"OneSpan DIGIPASS FX1 BIO","30b5035e-d297-4ff7-b00b-addc96ba6a98":"OneSpan DIGIPASS FX7","3124e301-f14e-4e38-876d-fbeeb090e7bf":"YubiKey 5 Series with Lightning Preview","31c3f7ff-bf15-4327-83ec-9336abcbcd34":"WinMagic FIDO Eazy - Software","341e4da9-3c2e-8103-5a9f-aad887135200":"Ledger Nano S FIDO2 Authenticator","34744913-4f57-4e6e-a527-e9ec3c4b94e6":"YubiKey Bio Series - Multi-protocol Edition","34f5766d-1536-4a24-9033-0e294e510fb0":"YubiKey 5 Series with NFC Preview","361a3082-0278-4583-a16f-72a527f973e4":"eWBM eFA500 FIDO2 Authenticator","3789da91-f943-46bc-95c3-50ea2012f03a":"NEOWAVE Winkeo FIDO2","39589099-9a75-49fc-afaa-801ca211c62a":"Feitian ePass FIDO-NFC (Enterprise Profile) (CTAP2.1, CTAP2.0, U2F)","39a5647e-1853-446c-a1f6-a79bae9f5bc7":"IDmelon","3a662962-c6d4-4023-bebb-98ae92e78e20":"YubiKey 5 FIPS Series with Lightning (Enterprise Profile)","3b1adb99-0dfe-46fd-90b8-7f7614a4de2a":"GoTrust Idem Key FIDO2 Authenticator","3b24bf49-1d45-4484-a917-13175df0867b":"YubiKey 5 Series with Lightning (Enterprise Profile)","3e078ffd-4c54-4586-8baa-a77da113aec5":"Hideez Key 3 FIDO2","3e22415d-7fdf-4ea4-8a0c-dd60c4249b9d":"Feitian iePass FIDO Authenticator","3f59672f-20aa-4afe-b6f4-7e5e916b6d98":"Arculus FIDO 2.1 Key Card [P71]","3fd410dc-8ab7-4b86-a1cb-c7174620b2dc":"IDEMIA SOLVO Fly 80 R1 FIDO Card Draft","42b4fb4a-2866-43b2-9bf7-6c6669c2e5d3":"Google Titan Security Key v2","42df17de-06ba-4177-a2bb-6701be1380d6":"Feitian BioPass FIDO2 Plus Authenticator","454e5346-4944-4ffd-6c93-8e9267193e9a":"Ensurity ThinC","454e5346-4944-4ffd-6c93-8e9267193e9b":"Ensurity AUTH BioPro","4599062e-6926-4fe7-9566-9e8fb1aedaa0":"YubiKey 5 Series (Enterprise Profile)","46544d5d-8f5d-4db4-89ac-ea8977073fff":"Foongtone FIDO Authenticator","47ab2fb4-66ac-4184-9ae1-86be814012d5":"Security Key NFC by Yubico - Enterprise Edition","4b3f8944-d4f2-4d21-bb19-764a986ec160":"KeyXentic FIDO2 Secp256R1 FIDO2 CTAP2 Authenticator","4b89f401-464e-4745-a520-486ddfc5d80e":"IIST FIDO2 Authenticator","4c0cf95d-2f40-43b5-ba42-4c83a11c04ba":"Feitian BioPass FIDO2 Pro Authenticator","4c50ff10-1057-4fc6-b8ed-43a529530c3c":"ImproveID Authenticator","4d41190c-7beb-4a84-8018-adf265a6352d":"Thales IDPrime FIDO Bio","4e768f2c-5fab-48b3-b300-220eb487752b":"Hideez Key 4 FIDO2 SDK","504d7149-4e4c-3841-4555-55445a677357":"WiSECURE AuthTron USB FIDO2 Authenticator","50726f74-6f6e-5061-7373-50726f746f6e":"Proton Pass","50a45b0c-80e7-f944-bf29-f552bfa2e048":"ACS FIDO Authenticator","516d3969-5a57-5651-5958-4e7a49434167":"SmartDisplayer BobeePass FIDO2 Authenticator","531126d6-e717-415c-9320-3d9aa6981239":"Dashlane","53414d53-554e-4700-0000-000000000000":"Samsung Pass","5343502d-5343-5343-6172-644649444f32":"ESS Smart Card Inc. Authenticator","54d9fee8-e621-4291-8b18-7157b99c5bec":"HID Crescendo Enabled","5626bed4-e756-430b-a7ff-ca78c8b12738":"VALMIDO PRO FIDO","57235694-51a5-4a4d-a81a-f42185df6502":"SHALO AUTH","5753362b-4e6b-6345-7b2f-255438404c75":"WiSECURE Blentity FIDO2 Authenticator","57f7de54-c807-4eab-b1c6-1c9be7984e92":"YubiKey 5 FIPS Series","58276709-bb4b-4bb3-baf1-60eea99282a7":"YubiKey Bio Series - Multi-protocol Edition 1VDJSN","58b44d0b-0a7c-f33a-fd48-f7153c871352":"Ledger Nano S Plus FIDO2 Authenticator","59f85fe7-faa5-4c92-9f52-697b9d4d5473":"RSA Authenticator 4 for Android","5b0e46ba-db02-44ac-b979-ca9b84f5e335":"YubiKey 5 FIPS Series with Lightning Preview","5ca1ab1e-1337-fa57-f1d0-a117e71ca702":"Allthenticator iOS App: roaming BLE FIDO2 Allthenticator for Windows, Mac, Linux, and Allthenticate door readers","5ca1ab1e-fa57-1337-f1d0-a117371ca702":"Allthenticator Android App: roaming BLE FIDO2 Allthenticator for Windows, Mac, Linux, and Allthenticate door readers","5d629218-d3a5-11ed-afa1-0242ac120002":"Swissbit iShield Key Pro","5e264d9d-28ef-4d34-95b4-5941e7a4faa8":"Ideem ZSM FIDO2 Authenticator","5ea308b2-7ac7-48b9-ac09-7e2da9015f8c":"Veridium Android SDK","5eaff75a-dd43-451f-af9f-87c9eeae293e":"Swissbit iShield Key 2 FIPS Enterprise","5fdb81b8-53f0-4967-a881-f5ec26fe4d18":"VinCSS FIDO2 Authenticator","6002f033-3c07-ce3e-d0f7-0ffe5ed42543":"Excelsecu eSecu FIDO2 Fingerprint Key","6028b017-b1d4-4c02-b4b3-afcdafc96bb2":"Windows Hello","61250591-b2bc-4456-b719-0b17be90bb30":"eWBM eFPA FIDO2 Authenticator","62e54e98-c209-4df3-b692-de71bb6a8528":"YubiKey 5 FIPS Series with NFC Preview","662ef48a-95e2-4aaa-a6c1-5b9c40375824":"YubiKey 5 Series with NFC - Enhanced PIN","664d9f67-84a2-412a-9ff7-b4f7d8ee6d05":"OpenSK authenticator","66a0ccb3-bd6a-191f-ee06-e375c50b9846":"Thales Bio iOS SDK","692db549-7ae5-44d5-a1e5-dd20a493b723":"HID Crescendo Key","69700f79-d1fb-472e-bd9b-a3a3b9a9eda0":"Pone Biometrics OFFPAD Authenticator","69e7c36f-f2f6-9e0d-07a6-bcc243262e6b":"OneKey FIDO2 Authenticator","6ab56fad-881f-4a43-acb2-0be065924522":"YubiKey 5 Series with NFC (Enterprise Profile)","6d44ba9b-f6ec-2e49-b930-0c8fe920cb73":"Security Key by Yubico with NFC","6dae43be-af9c-417b-8b9f-1b611168ec60":"Dapple Authenticator from Dapple Security Inc.","6e24d385-004a-16a0-7bfe-efd963845b34":"Ledger Stax FIDO2 Authenticator","6e8d1eae-8d40-4c25-bcf8-4633959afc71":"Veridium iOS SDK","6ec5cff2-a0f9-4169-945b-f33b563f7b99":"YubiKey Bio Series - Multi-protocol Edition (Enterprise Profile)","70e7c36f-f2f6-9e0d-07a6-bcc243262e6b":"OneKey FIDO2 Bluetooth Authenticator","72c6b72d-8512-4c66-8359-9d3d10d9222f":"Security Key NFC by Yubico - Enterprise Edition (Enterprise Profile)","73402251-f2a8-4f03-873e-3cb6db604b03":"uTrust FIDO2 Security Key","73bb0cd4-e502-49b8-9c6f-b59445bf720b":"YubiKey 5 FIPS Series","7409272d-1ff9-4e10-9fc9-ac0019c124fd":"YubiKey Bio Series - FIDO Edition","74820b05-a6c9-40f9-8fb0-9f86aca93998":"SafeNet eToken Fusion","760eda36-00aa-4d29-855b-4012a182cdeb":"Security Key NFC by Yubico Preview","77010bd7-212a-4fc9-b236-d2ca5e9d4084":"Feitian BioPass FIDO2 Authenticator","771b48fd-d3d4-4f74-9232-fc157ab0507a":"Edge on Mac","773c30d9-5919-4e96-a4f5-db65e95cf890":"GSTAG OAK FIDO2 Authenticator","7787a482-13e8-4784-8a06-c7ed49a7aaf4":"Swissbit iShield Key 2","78ba3993-d784-4f44-8d6e-cc0a8ad5230e":"Feitian ePass FIDO-NFC(CTAP2.1, CTAP2.0, U2F)","7991798a-a7f3-487f-98c0-3faf7a458a04":"HID Crescendo Key V3","79f3c8ba-9e35-484b-8f47-53a5a0f5c630":"YubiKey 5 FIPS Series with NFC (Enterprise Profile)","7b96457d-e3cd-432b-9ceb-c9fdd7ef7432":"YubiKey 5 FIPS Series with Lightning","7d1351a6-e097-4852-b8bf-c9ac5c9ce4a3":"YubiKey Bio Series - Multi-protocol Edition","7d2afadd-bf6b-44a2-a66b-e831fceb8eff":"Taglio CTAP2.1 EP","7e3f3d30-3557-4442-bdae-139312178b39":"RSA DS100","817cdab8-0d51-4de1-a821-e25b88519cf3":"Swissbit iShield Key 2 FIPS","820d89ed-d65a-409e-85cb-f73f0578f82a":"IDmelon iOS Authenticator","82b0a720-127a-4788-b56d-d1d4b2d82eac":"ID-One Key","833b721a-ff5f-4d00-bb2e-bdda3ec01e29":"Feitian ePass FIDO2 Authenticator","83c47309-aabb-4108-8470-8be838b573cb":"YubiKey Bio Series - FIDO Edition (Enterprise Profile)","85203421-48f9-4355-9bc8-8a53846e5083":"YubiKey 5 FIPS Series with Lightning","8681a073-5f50-4d52-bce4-e21658d207b3":"RSA Authenticator 4 for iOS","87dbc5a1-4c94-4dc8-8a47-97d800fd1f3c":"eWBM eFA320 FIDO2 Authenticator","882adaf5-3aa9-4708-8e7d-3957103775b4":"T-Shield TrustSec FIDO2 Bio and client PIN version","8836336a-f590-0921-301d-46427531eee6":"Thales Bio Android SDK","8876631b-d4a0-427f-5773-0ec71c9e0279":"Solo Secp256R1 FIDO2 CTAP2 Authenticator","88bbd2f0-342a-42e7-9729-dd158be5407a":"Precision InnaIT Key FIDO 2 Level 2 certified","891494da-2c90-4d31-a9cd-4eab0aed1309":"Sésame","8976631b-d4a0-427f-5773-0ec71c9e0279":"Solo Tap Secp256R1 FIDO2 CTAP2 Authenticator","89b19028-256b-4025-8872-255358d950e4":"Sentry Enterprises CTAP2 Authenticator","8c39ee86-7f9a-4a95-9ba3-f6b097e5c2ee":"YubiKey Bio Series - FIDO Edition (Enterprise Profile)","8c97a730-3f7b-41a6-87d6-1e9b62bda6f0":"FT-JCOS FIDO Fingerprint Card","8d1b1fcb-3c76-49a9-9129-5515b346aa02":"IDEMIA ID-ONE Card","8d4378b0-725d-4432-b3c2-01fcdaf46286":"VeridiumID Passkey Android SDK","8da0e4dc-164b-454e-972e-88f362b23d59":"CardOS FIDO2 Token","905b4cb4-ed6f-4da9-92fc-45e0d4e9b5c7":"YubiKey 5 FIPS Series (Enterprise Profile)","90636e1f-ef82-43bf-bdcf-5255f139d12f":"YubiKey Bio Series - Multi-protocol Edition","912435d9-4a88-42f3-972d-1244b0d51420":"SI0X FIDO CL WRIST v1.0","91ad6b93-264b-4987-8737-3a690cad6917":"Token Ring FIDO2 Authenticator","931327dd-c89b-406c-a81e-ed7058ef36c6":"Swissbit iShield Key FIDO2","95442b2e-f15e-4def-b270-efb106facb4e":"eWBM eFA310 FIDO2 Authenticator","95e4d58c-056e-4a65-866d-f5a69659e880":"TruU Windows Authenticator","970c8d9c-19d2-46af-aa32-3f448db49e35":"WinMagic FIDO Eazy - TPM","973446ca-e21c-9a9b-99f5-9b985a67af0f":"ACS FIDO Authenticator Card","97e6a830-c952-4740-95fc-7c78dc97ce47":"YubiKey Bio Series - Multi-protocol Edition (Enterprise Profile)","9876631b-d4a0-427f-5773-0ec71c9e0279":"Somu Secp256R1 FIDO2 CTAP2 Authenticator","998f358b-2dd2-4cbe-a43a-e8107438dfb3":"OnlyKey Secp256R1 FIDO2 CTAP2 Authenticator","99bf4610-ec26-4252-b31f-7380ccd59db5":"ZTPass SmartAuth","99ed6c29-4573-4847-816d-78ad8f1c75ef":"VeroCard FIDO2 Authenticator","9c835346-796b-4c27-8898-d6032f515cc5":"Cryptnox FIDO2","9d3df6ba-282f-11ed-a261-0242ac120002":"Arculus FIDO2/U2F Key Card","9ddd1817-af5a-4672-a2b9-3e3dd95000a9":"Windows Hello","9e66c661-e428-452a-a8fb-51f7ed088acf":"YubiKey 5 FIPS Series with Lightning (RC Preview)","9eb7eabc-9db5-49a1-b6c3-555a802093f4":"YubiKey 5 Series with NFC KVZR57","9f0d8150-baa5-4c00-9299-ad62c8bb4e87":"GoTrust Idem Card FIDO2 Authenticator","9f77e279-a6e2-4d58-b700-31e5943c6a98":"Hyper FIDO Pro","9ff4cc65-6154-4fff-ba09-9e2af7882ad2":"Security Key NFC by Yubico - Enterprise Edition (Enterprise Profile)","a02140b7-0cbd-42e1-a9b5-a39da2545114":"Feitian BioPass FIDO2 Plus (Enterprise Profile)","a02167b9-ae71-4ac7-9a07-06432ebb6f1c":"YubiKey 5 Series with Lightning","a10c6dd9-465e-4226-8198-c7c44b91c555":"Kaspersky Password Manager","a1f52be5-dfab-4364-b51c-2bd496b14a56":"OCTATCO EzFinger2 FIDO2 AUTHENTICATOR","a25342c0-3cdc-4414-8e46-f4807fca511c":"YubiKey 5 Series with NFC","a3975549-b191-fd67-b8fb-017e2917fdb3":"Excelsecu eSecu FIDO2 NFC Security Key","a4e9fc6d-4cbe-4758-b8ba-37598bb5bbaa":"Security Key NFC by Yubico","a7fc3f84-86a3-4da4-a3d7-eb6485a066d8":"NEOWAVE Badgeo FIDO2 (CTAP 2.1)","ab32f0c6-2239-afbb-c470-d2ef4e254db6":"TEST (DUMMY RECORD)","ab32f0c6-2239-afbb-c470-d2ef4e254db7":"TOKEN2 FIDO2 Security Key","ad08c78a-4e41-49b9-86a2-ac15b06899e2":"YubiKey Bio Series - FIDO Edition (Enterprise Profile)","adce0002-35bc-c60a-648b-0b25f1f05503":"Chrome on Mac","aeb6569c-f8fb-4950-ac60-24ca2bbe2e52":"HID Crescendo C2300","b12eac35-586c-4809-a4b1-d81af6c305cf":"Deepnet SafeKey/Classic (NFC)","b267239b-954f-4041-a01b-ee4f33c145b6":"authenton1 - CTAP2.1","b2c1a50b-dad8-4dc7-ba4d-0ce9597904bc":"YubiKey 5 Series with NFC - Enhanced PIN (Enterprise Profile)","b35a26b2-8f6e-4697-ab1d-d44db4da28c6":"Zoho Vault","b415094c-49d3-4c8b-b3fe-7d0ad28a6bc4":"ZTPass SmartAuth","b50d5e0a-7f81-4959-9b12-f45407407503":"IDPrime 3940 FIDO","b5397666-4885-aa6b-cebf-e52262a439a2":"Chromium Browser","b6ede29c-3772-412c-8a78-539c1f4c62d2":"Feitian BioPass FIDO2 Plus Authenticator","b78a0a55-6ef8-d246-a042-ba0f6d55050c":"LastPass","b7d3f68e-88a6-471e-9ecf-2df26d041ede":"Security Key NFC by Yubico","b84e4048-15dc-4dd0-8640-f4f60813c8af":"NordPass","b90e7dc1-316e-4fee-a25a-56a666a670fe":"YubiKey 5 Series with Lightning (Enterprise Profile)","b92c3f9a-c014-4056-887f-140a2501163b":"Security Key by Yubico","b93fd961-f2e6-462f-b122-82002247de78":"Android Authenticator","b9f6b7b6-f929-4189-bca9-dd951240c132":"Deepnet SafeKey/Classic (USB)","ba76a271-6eb6-4171-874d-b6428dbe3437":"ATKey.ProS","ba86dc56-635f-4141-aef6-00227b1b9af6":"TruU Windows Authenticator","bada5566-a7aa-401f-bd96-45619a55120d":"1Password","bb405265-40cf-4115-93e5-a332c1968d8c":"ID-One Card","bbf4b6a7-679d-f6fc-c4f2-8ac0ddf9015a":"Excelsecu eSecu FIDO2 PRO Security Key","bc2fe499-0d8e-4ffe-96f3-94a82840cf8c":"OCTATCO EzQuant FIDO2 AUTHENTICATOR","be727034-574a-f799-5c76-0929e0430973":"Crayonic KeyVault K1 (USB-NFC-BLE FIDO2 Authenticator)","bfc748bb-3429-4faa-b9f9-7cfa9f3b76d0":"iPasswords","c1f9a0bc-1dd2-404a-b27f-8e29047a43fd":"YubiKey 5 FIPS Series with NFC","c3f47802-de73-4dfc-ba22-671fe3304f90":"eToken Fusion NFC PIV Enterprise","c4ddaf11-3032-4e77-b3b9-3a340369b9ad":"HID Crescendo Fusion","c5703116-972b-4851-a3e7-ae1259843399":"NEOWAVE Badgeo FIDO2","c5ef55ff-ad9a-4b9f-b580-adebafe026d0":"YubiKey 5 Series with Lightning","c62100de-759b-4bf8-b22b-63b3e3a80401":"Token Ring 3 FIDO2 Authenticator","c80dbd9a-533f-4a17-b941-1a2f1c7cedff":"HID Crescendo C3000","c89674e3-a765-4b07-888a-7c086fbdf04b":"StarSign FIDO Card","c89e6a38-6c00-5426-5aa5-c9cbf48f0382":"ACS FIDO Authenticator NFC","ca4cff1b-5a81-4404-8194-59aabcf1660b":"IDPrime 3930 FIDO","ca87cb70-4c1b-4579-a8e8-4efdd7c007e0":"FIDO Alliance TruU Sample FIDO2 Authenticator","cb69481e-8ff7-4039-93ec-0a2729a154a8":"YubiKey 5 Series","cc45f64e-52a2-451b-831a-4edd8022a202":"ToothPic Passkey Provider","cd69adb5-3c7a-deb9-3177-6800ea6cb72a":"Thales PIN Android SDK","cdbdaea2-c415-5073-50f7-c04e968640b6":"Excelsecu eSecu FIDO2 Security Key","ce6bf97f-9f69-4ba7-9032-97adc6ca5cf1":"YubiKey 5 FIPS Series with NFC (RC Preview)","cfcb13a2-244f-4b36-9077-82b79d6a7de7":"USB/NFC Passcode Authenticator","d2fbd093-ee62-488d-9dad-1e36389f8826":"YubiKey 5 FIPS Series (RC Preview)","d350af52-0351-4ba2-acd3-dfeeadc3f764":"pwSafe","d384db22-4d50-ebde-2eac-5765cf1e2a44":"Excelsecu eSecu FIDO2 Fingerprint Security Key","d41f5a69-b817-4144-a13c-9ebd6d9254d6":"ATKey.Card CTAP2.0","d548826e-79b4-db40-a3d8-11116f7e8349":"Bitwarden","d61d3b87-3e7c-4aea-9c50-441c371903ad":"KeyVault Secp256R1 FIDO2 CTAP2 Authenticator","d7781e5d-e353-46aa-afe2-3ca49f13332a":"YubiKey 5 Series with NFC","d7a423ad-3e19-4492-9200-78137dccc136":"VivoKey Apex FIDO2","d821a7d4-e97c-4cb6-bd82-4237731fd4be":"Hyper FIDO Bio Security Key","d8522d9f-575b-4866-88a9-ba99fa02f35b":"YubiKey Bio Series - FIDO Edition","d91c5288-0ef0-49b7-b8ae-21ca0aa6b3f3":"KEY-ID FIDO2 Authenticator","d94a29d9-52dd-4247-9c2d-8b818b610389":"VeriMark Guard Fingerprint Key","da1fa263-8b25-42b6-a820-c0036f21ba7f":"ATKey.Card NFC","dd4ec289-e01d-41c9-bb89-70fa845d4bf2":"iCloud Keychain (Managed)","dd86a2da-86a0-4cbe-b462-4bd31f57bc6f":"YubiKey Bio Series - FIDO Edition","de503f9c-21a4-4f76-b4b7-558eb55c6f89":"Devolutions","e1a96183-5016-4f24-b55b-e3ae23614cc6":"ATKey.Pro CTAP2.0","e400ef8c-711d-4692-af46-7f2cf7da23ad":"Swissbit iShield Key 2 Enterprise","e416201b-afeb-41ca-a03d-2281c28322aa":"ATKey.Pro CTAP2.1","e41b42a3-60ac-4afb-8757-a98f2d7f6c9f":"Deepnet SafeKey/Classic (FP)","e77e3c64-05e3-428b-8824-0cbeb04b829d":"Security Key NFC by Yubico","e86addcd-7711-47e5-b42a-c18257b0bf61":"IDCore 3121 Fido","ea9b8d66-4d01-1d21-3ce4-b6b48cb575d4":"Google Password Manager","eabb46cc-e241-80bf-ae9e-96fa6d2975cf":"TOKEN2 PIN Plus Security Key Series ","eb3b131e-59dc-536a-d176-cb7306da10f5":"ellipticSecure MIRkey USB Authenticator","ec31b4cc-2acc-4b8e-9c01-bade00ccbe26":"KeyXentic FIDO2 Secp256R1 FIDO2 CTAP2 Authenticator","ed042a3a-4b22-4455-bb69-a267b652ae7e":"Security Key NFC by Yubico - Enterprise Edition","ee041bce-25e5-4cdb-8f86-897fd6418464":"Feitian ePass FIDO2-NFC Authenticator","ee882879-721c-4913-9775-3dfcce97072a":"YubiKey 5 Series","efb96b10-a9ee-4b6c-a4a9-d32125ccd4a4":"Safenet eToken FIDO","f2145e86-211e-4931-b874-e22bba7d01cc":"ID-One Key","f3809540-7f14-49c1-a8b3-8f813b225541":"Enpass","f4c63eff-d26c-4248-801c-3736c7eaa93a":"FIDO KeyPass S3","f56f58b3-d711-4afc-ba7d-6ac05f88cb19":"WinMagic FIDO Eazy - Phone","f7c558a0-f465-11e8-b568-0800200c9a66":"KONAI Secp256R1 FIDO2 Conformance Testing CTAP2 Authenticator","f8a011f3-8c0a-4d15-8006-17111f9edc7d":"Security Key by Yubico","f8d5c4e9-e539-4c06-8662-ec2a4155a555":"StarSign Key Fob","fa2b99dc-9e39-4257-8f92-4a30d23c4118":"YubiKey 5 Series with NFC","fbefdf68-fe86-0106-213e-4d5fa24cbe2e":"Excelsecu eSecu FIDO2 NFC Security Key","fbfc3007-154e-4ecc-8c0b-6e020557d7bd":"iCloud Keychain","fcb1bcb4-f370-078c-6993-bc24d0ae3fbe":"Ledger Nano X FIDO2 Authenticator","fcc0118f-cd45-435b-8da1-9782b2da0715":"YubiKey 5 FIPS Series with NFC","fdb141b2-5d84-443e-8a35-4698c205a502":"KeePassXC","fec067a1-f1d0-4c5e-b4c0-cc3237475461":"KX701 SmartToken FIDO","ff4dac45-ede8-4ec2-aced-cf66103f4335":"YubiKey 5 Series"},X=new TextDecoder("utf-8");function D(e){return typeof e=="string"&&(e=o(e)),JSON.parse(X.decode(e))}function s(e){typeof e=="string"&&(e=o(e));let a=new DataView(e.slice(32,33)).getUint8(0);return{rpIdHash:z(e),flags:{userPresent:!!(a&1),userVerified:!!(a&4),backupEligibility:!!(a&8),backupState:!!(a&16),attestedData:!!(a&64),extensionsIncluded:!!(a&128)},signCount:new DataView(e.slice(33,37)).getUint32(0,!1),aaguid:q(e)}}function z(e){return d(e.slice(0,32))}function q(e){if(e.byteLength<53)return"00000000-0000-0000-0000-000000000000";let a=e.slice(37,53),t=w(a);return`${t.substring(0,8)}-${t.substring(8,12)}-${t.substring(12,16)}-${t.substring(16,20)}-${t.substring(20,32)}`}function m(e){switch(e){case-7:return"ES256";case-8:return"EdDSA";case-257:return"RS256";default:throw new Error(`Unknown algorithm code: ${e}`)}}function Z(e){let a=s(e.response.authenticatorData);return T(e,a)}function T(e,a){let t=a.aaguid;return{authenticator:{aaguid:t,counter:a.signCount,icon_light:"https://webauthn.passwordless.id/authenticators/"+t+"-light.png",icon_dark:"https://webauthn.passwordless.id/authenticators/"+t+"-dark.png",name:G[t]??"Unknown"},credential:{id:e.id,publicKey:e.response.publicKey,algorithm:m(e.response.publicKeyAlgorithm),transports:e.response.transports},synced:a.flags.backupEligibility,user:e.user,userVerified:a.flags.userVerified}}function g(e,a){return{credentialId:e.id,userId:e.response.userHandle,counter:a.signCount,userVerified:a.flags.userVerified,authenticatorAttachment:e.authenticatorAttachment}}function _(e){let a=s(e.response.authenticatorData);return g(e,a)}function j(){let e=crypto.getRandomValues(new Uint8Array(18));return d(e)}async function Q(e,a){if(typeof e=="function"){let t=e(a);return t instanceof Promise?await t:t}return e===a}async function l(e,a){return!await Q(e,a)}async function ee(e,a){let t=D(e.response.clientDataJSON),i=s(e.response.authenticatorData);if(!i.aaguid)throw new Error("Unexpected error, no AAGUID.");if(t.type!=="webauthn.create")throw new Error(`Unexpected ClientData type: ${t.type}`);if(await l(a.origin,t.origin))throw new Error(`Unexpected ClientData origin: ${t.origin}`);if(await l(a.challenge,t.challenge))throw new Error(`Unexpected ClientData challenge: ${t.challenge}`);return I.toRegistrationInfo(e,i)}async function ae(e,a,t){if(e.id!==a.id)throw new Error(`Credential ID mismatch: ${e.id} vs ${a.id}`);if(!await v({algorithm:a.algorithm,publicKey:a.publicKey,authenticatorData:e.response.authenticatorData,clientData:e.response.clientDataJSON,signature:e.response.signature,verbose:t.verbose}))throw new Error(`Invalid signature: ${e.response.signature}`);let i=D(e.response.clientDataJSON),c=s(e.response.authenticatorData);if(t.verbose&&(console.debug(i),console.debug(c)),i.type!=="webauthn.get")throw new Error(`Unexpected clientData type: ${i.type}`);if(await l(t.origin,i.origin))throw new Error(`Unexpected ClientData origin: ${i.origin}`);if(await l(t.challenge,i.challenge))throw new Error(`Unexpected ClientData challenge: ${i.challenge}`);let r=t.domain??new URL(i.origin).hostname,b=d(await F(y(r)));if(c.rpIdHash!==b)throw new Error(`Unexpected RpIdHash: ${c.rpIdHash} vs ${b}`);if(!c.flags.userPresent)throw new Error("Unexpected authenticator flags: missing userPresent");if(!c.flags.userVerified&&t.userVerified)throw new Error("Unexpected authenticator flags: missing userVerified");if(t.counter&&c.signCount<=t.counter)throw new Error(`Unexpected authenticator counter: ${c.signCount} (should be > ${t.counter})`);return g(e,c)}function N(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:"SHA-256"};default:throw new Error(`Unknown or unsupported crypto algorithm: ${e}. Only 'RS256' and 'ES256' are supported.`)}}async function Y(e,a){let t=N(e),i=o(a);return crypto.subtle.importKey("spki",i,t,!1,["verify"])}async function v({algorithm:e,publicKey:a,authenticatorData:t,clientData:i,signature:c,verbose:r}){let b=await Y(e,a);r&&console.debug(b);let f=await F(o(i)),A=K(o(t),f);r&&(console.debug("Algorithm: "+e),console.debug("Public key: "+a),console.debug("Data: "+d(A)),console.debug("Signature: "+c));let S=o(c);e=="ES256"&&(S=te(S));let B=N(e);return await crypto.subtle.verify(B,b,S,A)}function te(e){let a=new Uint8Array(e),t=a[4]===0?5:4,i=t+32,c=a[i+2]===0?i+3:i+2,r=a.slice(t,i),b=a.slice(c);return new Uint8Array([...r,...b])}class be{isAvailable(){return u.isAvailable()}async register(a){const{name:t,challenge:i,rp:c}=a,r=await u.register({attestation:!0,challenge:i,domain:c.id,user:t,userVerification:"required"}),b=O(r.response.clientDataJSON),f=JSON.parse(P(b));return{authenticatorData:r.response.authenticatorData,clientData:r.response.clientDataJSON,credential:{algorithm:I.getAlgoName(r.response.publicKeyAlgorithm),publicKey:r.response.publicKey},credentialId:r.id,origin:f.origin}}async authenticate(a){const{credentialId:t,challenge:i,rp:c}=a,r=await u.authenticate({allowCredentials:t?[t]:[],challenge:i,domain:c.id,userVerification:"required"}),b=O(r.response.clientDataJSON),f=JSON.parse(P(b));return{authenticatorData:r.response.authenticatorData,clientData:r.response.clientDataJSON,credentialId:r.id,origin:f.origin,signature:r.response.signature}}}async function oe(e,a,t){return!!await new U({clientId:e.clientId,ecosystem:a?{id:a}:void 0,storage:t??R}).getPasskeyCredentialId()}export{be as PasskeyWebClient,oe as hasStoredPasskey};
|
|
1
|
+
import{C as U,w as R}from"./execute-ddc9aba5.js";import{b as O,a as P}from"./uint8-array-63adf023.js";import"./prepare-contract-call-8aa69ada.js";import"./utils-b0786619.js";import"./index-1a84fe52.js";var V=Object.defineProperty,h=(e,a)=>{for(var t in a)V(e,t,{get:a[t],enumerable:!0})},u={};h(u,{authenticate:()=>W,isAutocompleteAvailable:()=>E,isAvailable:()=>x,isLocalAuthenticator:()=>L,register:()=>M});var k={};h(k,{bufferToHex:()=>w,concatenateBuffers:()=>K,isBase64url:()=>p,parseBase64url:()=>o,parseBuffer:()=>C,sha256:()=>F,toBase64url:()=>d,toBuffer:()=>y});function y(e){return Uint8Array.from(e,a=>a.charCodeAt(0)).buffer}function C(e){return String.fromCharCode(...new Uint8Array(e))}function p(e){return e.match(/^[a-zA-Z0-9\-_]+=*$/)!==null}function d(e){return btoa(C(e)).replaceAll("+","-").replaceAll("/","_")}function o(e){return e=e.replaceAll("-","+").replaceAll("_","/"),y(atob(e))}async function F(e){return await crypto.subtle.digest("SHA-256",e)}function w(e){return[...new Uint8Array(e)].map(a=>a.toString(16).padStart(2,"0")).join("")}function K(e,a){var t=new Uint8Array(e.byteLength+a.byteLength);return t.set(new Uint8Array(e),0),t.set(new Uint8Array(a),e.byteLength),t}function x(){return!!window.PublicKeyCredential}async function L(){return await PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()}function H(e){if(!(!e||e.length===0))return e.includes("client-device")?e.includes("security-key")||e.includes("hybrid")?void 0:"platform":"cross-platform"}var n=null;async function M(e){if(!e.challenge)throw new Error('"challenge" required');if(!e.user)throw new Error('"user" required');if(!p(e.challenge))throw new Error("Provided challenge is not properly encoded in Base64url");let a=typeof e.user=="string"?{name:e.user}:e.user;a.id||(a.id=crypto.randomUUID());let t={challenge:o(e.challenge),rp:{id:e.domain??window.location.hostname,name:e.domain??window.location.hostname},user:{id:y(a.id),name:a.name,displayName:a.displayName??a.name},hints:e.hints,pubKeyCredParams:[{alg:-7,type:"public-key"},{alg:-257,type:"public-key"}],timeout:e.timeout,authenticatorSelection:{userVerification:e.userVerification,authenticatorAttachment:H(e.hints),residentKey:e.discoverable??"preferred",requireResidentKey:e.discoverable==="required"},attestation:"direct",...e.customProperties};console.debug(t),n==null||n.abort("Cancel ongoing authentication"),n=new AbortController;let i=await navigator.credentials.create({publicKey:t,signal:n==null?void 0:n.signal}),c=i.response;if(n=null,console.debug(i),i.type!="public-key")throw"Unexpected credential type!";let r=c.getPublicKey();if(!r)throw"Non-compliant browser or authenticator!";return{type:i.type,id:i.id,rawId:d(i.rawId),authenticatorAttachment:i.authenticatorAttachment,clientExtensionResults:i.getClientExtensionResults(),response:{attestationObject:d(c.attestationObject),authenticatorData:d(c.getAuthenticatorData()),clientDataJSON:d(c.clientDataJSON),publicKey:d(r),publicKeyAlgorithm:c.getPublicKeyAlgorithm(),transports:c.getTransports()},user:a}}async function E(){return PublicKeyCredential.isConditionalMediationAvailable&&PublicKeyCredential.isConditionalMediationAvailable()}async function W(e){var c;if(!p(e.challenge))throw new Error("Provided challenge is not properly encoded in Base64url");if(e.autocomplete&&!await E())throw new Error("Passkeys autocomplete with conditional mediation is not available in this browser.");let a={challenge:o(e.challenge),rpId:e.domain??window.location.hostname,allowCredentials:(c=e.allowCredentials)==null?void 0:c.map($),hints:e.hints,userVerification:e.userVerification,timeout:e.timeout,...e.customProperties};console.debug(a),n==null||n.abort("Cancel ongoing authentication"),n=new AbortController;let t=await navigator.credentials.get({publicKey:a,mediation:e.autocomplete?"conditional":void 0,signal:n==null?void 0:n.signal});if(t.type!="public-key")throw"Unexpected credential type!";n=null,console.debug(t);let i=t.response;return{clientExtensionResults:t.getClientExtensionResults(),id:t.id,rawId:d(t.rawId),type:t.type,authenticatorAttachment:t.authenticatorAttachment,response:{authenticatorData:d(i.authenticatorData),clientDataJSON:d(i.clientDataJSON),signature:d(i.signature),userHandle:i.userHandle?d(i.userHandle):void 0}}}function $(e){return typeof e=="string"?{id:o(e),type:"public-key"}:{id:o(e.id),type:"public-key",transports:e.transports}}var J={};h(J,{parseCryptoKey:()=>Y,randomChallenge:()=>j,verifyAuthentication:()=>ae,verifyRegistration:()=>ee,verifySignature:()=>v});var I={};h(I,{getAlgoName:()=>m,parseAuthentication:()=>_,parseAuthenticator:()=>s,parseClient:()=>D,parseRegistration:()=>Z,toAuthenticationInfo:()=>g,toRegistrationInfo:()=>T});var G={"00000000-0000-0000-0000-000000000000":"Unknown authenticator","0076631b-d4a0-427f-5773-0ec71c9e0279":"HYPR FIDO2 Authenticator","01020304-0506-0708-0102-030405060708":"Chromium Virtual Authenticator (browser dev tools)","050dd0bc-ff20-4265-8d5d-305c4b215192":"eToken Fusion FIPS","07a9f89c-6407-4594-9d56-621d5f1e358b":"NXP Semiconductros FIDO2 Conformance Testing CTAP2 Authenticator","08987058-cadc-4b81-b6e1-30de50dcbe96":"Windows Hello","092277e5-8437-46b5-b911-ea64b294acb7":"Taglio CTAP2.1 CS","09591fc6-9811-48f7-8f57-b9f23df6413f":"Pone Biometrics OFFPAD Authenticator","0acf3011-bc60-f375-fb53-6f05f43154e0":"Nymi FIDO2 Authenticator","0bb43545-fd2c-4185-87dd-feb0b2916ace":"Security Key NFC by Yubico - Enterprise Edition","0d9b2e56-566b-c393-2940-f821b7f15d6d":"Excelsecu eSecu FIDO2 Pro Security Key","0db01cd6-5618-455b-bb46-1ec203d3213e":"GoldKey Security Token","0ea242b4-43c4-4a1b-8b17-dd6d0b6baec6":"Keeper","10c70715-2a9a-4de1-b0aa-3cff6d496d39":"eToken Fusion NFC FIPS","1105e4ed-af1d-02ff-ffff-ffffffffffff":"Egomet FIDO2 Authenticator for Android","12755c32-8ad1-46eb-881c-e0b38d848b09":"Feitian ePass FIDO Authenticator (CTAP2.1, CTAP2.0, U2F)","12ded745-4bed-47d4-abaa-e713f51d6393":"Feitian AllinOne FIDO2 Authenticator","146e77ef-11eb-4423-b847-ce77864e9411":"eToken Fusion NFC PIV","149a2021-8ef6-4133-96b8-81f8d5b7f1f5":"Security Key by Yubico with NFC","17290f1e-c212-34d0-1423-365d729f09d9":"Thales PIN iOS SDK","175cd298-83d2-4a26-b637-313c07a6434e":"Chunghwa Telecom FIDO2 Smart Card Authenticator","19083c3d-8383-4b18-bc03-8f1c9ab2fd1b":"YubiKey 5 Series","1ac71f64-468d-4fe0-bef1-0e5f2f551f18":"YubiKey 5 Series with NFC (Enterprise Profile)","1c086528-58d5-f211-823c-356786e36140":"Atos CardOS FIDO2","1d1b4e33-76a1-47fb-97a0-14b10d0933f1":"Cryptnox FIDO2.1","1d8cac46-47a1-3386-af50-e88ae46fe802":"Ledger Flex FIDO2 Authenticator","1e906e14-77af-46bc-ae9f-fe6ef18257e4":"VeridiumID Passkey iOS SDK","20ac7a17-c814-4833-93fe-539f0d5e3389":"YubiKey 5 Series (Enterprise Profile)","20f0be98-9af9-986a-4b42-8eca4acb28e4":"Excelsecu eSecu FIDO2 Fingerprint Security Key","2194b428-9397-4046-8f39-007a1605a482":"IDPrime 931 Fido","22248c4c-7a12-46e2-9a41-44291b373a4d":"LogMeOnce","234cd403-35a2-4cc2-8015-77ea280c77f5":"Feitian ePass FIDO2-NFC Series (CTAP2.1, CTAP2.0, U2F)","23786452-f02d-4344-87ed-aaf703726881":"SafeNet eToken Fusion CC","24673149-6c86-42e7-98d9-433fb5b73296":"YubiKey 5 Series with Lightning","260e3021-482d-442d-838c-7edfbe153b7e":"Feitian ePass FIDO2-NFC Plus Authenticator","2772ce93-eb4b-4090-8b73-330f48477d73":"Security Key NFC by Yubico - Enterprise Edition Preview","2a55aee6-27cb-42c0-bc6e-04efe999e88a":"HID Crescendo 4000","2bff89f2-323a-48fc-b7c8-9ff7fe87c07e":"Feitian BioPass FIDO2 Pro (Enterprise Profile)","2c0df832-92de-4be1-8412-88a8f074df4a":"Feitian FIDO Smart Card","2c2aeed8-8174-4159-814b-486e92a261d0":"NEOWAVE WINKEO V2.0","2cd2f727-f6ca-44da-8f48-5c2e5da000a2":"Nitrokey 3 AM","2d3bec26-15ee-4f5d-88b2-53622490270b":"HID Crescendo Key V2","2fc0579f-8113-47ea-b116-bb5a8db9202a":"YubiKey 5 Series with NFC","2ffd6452-01da-471f-821b-ea4bf6c8676a":"IDPrime 941 Fido","30b5035e-d297-4fc1-b00b-addc96ba6a97":"OneSpan FIDO Touch","30b5035e-d297-4ff1-010b-addc96ba6a98":"OneSpan DIGIPASS FX1a","30b5035e-d297-4ff1-b00b-addc96ba6a98":"OneSpan DIGIPASS FX1 BIO","30b5035e-d297-4ff7-b00b-addc96ba6a98":"OneSpan DIGIPASS FX7","3124e301-f14e-4e38-876d-fbeeb090e7bf":"YubiKey 5 Series with Lightning Preview","31c3f7ff-bf15-4327-83ec-9336abcbcd34":"WinMagic FIDO Eazy - Software","341e4da9-3c2e-8103-5a9f-aad887135200":"Ledger Nano S FIDO2 Authenticator","34744913-4f57-4e6e-a527-e9ec3c4b94e6":"YubiKey Bio Series - Multi-protocol Edition","34f5766d-1536-4a24-9033-0e294e510fb0":"YubiKey 5 Series with NFC Preview","361a3082-0278-4583-a16f-72a527f973e4":"eWBM eFA500 FIDO2 Authenticator","3789da91-f943-46bc-95c3-50ea2012f03a":"NEOWAVE Winkeo FIDO2","39589099-9a75-49fc-afaa-801ca211c62a":"Feitian ePass FIDO-NFC (Enterprise Profile) (CTAP2.1, CTAP2.0, U2F)","39a5647e-1853-446c-a1f6-a79bae9f5bc7":"IDmelon","3a662962-c6d4-4023-bebb-98ae92e78e20":"YubiKey 5 FIPS Series with Lightning (Enterprise Profile)","3b1adb99-0dfe-46fd-90b8-7f7614a4de2a":"GoTrust Idem Key FIDO2 Authenticator","3b24bf49-1d45-4484-a917-13175df0867b":"YubiKey 5 Series with Lightning (Enterprise Profile)","3e078ffd-4c54-4586-8baa-a77da113aec5":"Hideez Key 3 FIDO2","3e22415d-7fdf-4ea4-8a0c-dd60c4249b9d":"Feitian iePass FIDO Authenticator","3f59672f-20aa-4afe-b6f4-7e5e916b6d98":"Arculus FIDO 2.1 Key Card [P71]","3fd410dc-8ab7-4b86-a1cb-c7174620b2dc":"IDEMIA SOLVO Fly 80 R1 FIDO Card Draft","42b4fb4a-2866-43b2-9bf7-6c6669c2e5d3":"Google Titan Security Key v2","42df17de-06ba-4177-a2bb-6701be1380d6":"Feitian BioPass FIDO2 Plus Authenticator","454e5346-4944-4ffd-6c93-8e9267193e9a":"Ensurity ThinC","454e5346-4944-4ffd-6c93-8e9267193e9b":"Ensurity AUTH BioPro","4599062e-6926-4fe7-9566-9e8fb1aedaa0":"YubiKey 5 Series (Enterprise Profile)","46544d5d-8f5d-4db4-89ac-ea8977073fff":"Foongtone FIDO Authenticator","47ab2fb4-66ac-4184-9ae1-86be814012d5":"Security Key NFC by Yubico - Enterprise Edition","4b3f8944-d4f2-4d21-bb19-764a986ec160":"KeyXentic FIDO2 Secp256R1 FIDO2 CTAP2 Authenticator","4b89f401-464e-4745-a520-486ddfc5d80e":"IIST FIDO2 Authenticator","4c0cf95d-2f40-43b5-ba42-4c83a11c04ba":"Feitian BioPass FIDO2 Pro Authenticator","4c50ff10-1057-4fc6-b8ed-43a529530c3c":"ImproveID Authenticator","4d41190c-7beb-4a84-8018-adf265a6352d":"Thales IDPrime FIDO Bio","4e768f2c-5fab-48b3-b300-220eb487752b":"Hideez Key 4 FIDO2 SDK","504d7149-4e4c-3841-4555-55445a677357":"WiSECURE AuthTron USB FIDO2 Authenticator","50726f74-6f6e-5061-7373-50726f746f6e":"Proton Pass","50a45b0c-80e7-f944-bf29-f552bfa2e048":"ACS FIDO Authenticator","516d3969-5a57-5651-5958-4e7a49434167":"SmartDisplayer BobeePass FIDO2 Authenticator","531126d6-e717-415c-9320-3d9aa6981239":"Dashlane","53414d53-554e-4700-0000-000000000000":"Samsung Pass","5343502d-5343-5343-6172-644649444f32":"ESS Smart Card Inc. Authenticator","54d9fee8-e621-4291-8b18-7157b99c5bec":"HID Crescendo Enabled","5626bed4-e756-430b-a7ff-ca78c8b12738":"VALMIDO PRO FIDO","57235694-51a5-4a4d-a81a-f42185df6502":"SHALO AUTH","5753362b-4e6b-6345-7b2f-255438404c75":"WiSECURE Blentity FIDO2 Authenticator","57f7de54-c807-4eab-b1c6-1c9be7984e92":"YubiKey 5 FIPS Series","58276709-bb4b-4bb3-baf1-60eea99282a7":"YubiKey Bio Series - Multi-protocol Edition 1VDJSN","58b44d0b-0a7c-f33a-fd48-f7153c871352":"Ledger Nano S Plus FIDO2 Authenticator","59f85fe7-faa5-4c92-9f52-697b9d4d5473":"RSA Authenticator 4 for Android","5b0e46ba-db02-44ac-b979-ca9b84f5e335":"YubiKey 5 FIPS Series with Lightning Preview","5ca1ab1e-1337-fa57-f1d0-a117e71ca702":"Allthenticator iOS App: roaming BLE FIDO2 Allthenticator for Windows, Mac, Linux, and Allthenticate door readers","5ca1ab1e-fa57-1337-f1d0-a117371ca702":"Allthenticator Android App: roaming BLE FIDO2 Allthenticator for Windows, Mac, Linux, and Allthenticate door readers","5d629218-d3a5-11ed-afa1-0242ac120002":"Swissbit iShield Key Pro","5e264d9d-28ef-4d34-95b4-5941e7a4faa8":"Ideem ZSM FIDO2 Authenticator","5ea308b2-7ac7-48b9-ac09-7e2da9015f8c":"Veridium Android SDK","5eaff75a-dd43-451f-af9f-87c9eeae293e":"Swissbit iShield Key 2 FIPS Enterprise","5fdb81b8-53f0-4967-a881-f5ec26fe4d18":"VinCSS FIDO2 Authenticator","6002f033-3c07-ce3e-d0f7-0ffe5ed42543":"Excelsecu eSecu FIDO2 Fingerprint Key","6028b017-b1d4-4c02-b4b3-afcdafc96bb2":"Windows Hello","61250591-b2bc-4456-b719-0b17be90bb30":"eWBM eFPA FIDO2 Authenticator","62e54e98-c209-4df3-b692-de71bb6a8528":"YubiKey 5 FIPS Series with NFC Preview","662ef48a-95e2-4aaa-a6c1-5b9c40375824":"YubiKey 5 Series with NFC - Enhanced PIN","664d9f67-84a2-412a-9ff7-b4f7d8ee6d05":"OpenSK authenticator","66a0ccb3-bd6a-191f-ee06-e375c50b9846":"Thales Bio iOS SDK","692db549-7ae5-44d5-a1e5-dd20a493b723":"HID Crescendo Key","69700f79-d1fb-472e-bd9b-a3a3b9a9eda0":"Pone Biometrics OFFPAD Authenticator","69e7c36f-f2f6-9e0d-07a6-bcc243262e6b":"OneKey FIDO2 Authenticator","6ab56fad-881f-4a43-acb2-0be065924522":"YubiKey 5 Series with NFC (Enterprise Profile)","6d44ba9b-f6ec-2e49-b930-0c8fe920cb73":"Security Key by Yubico with NFC","6dae43be-af9c-417b-8b9f-1b611168ec60":"Dapple Authenticator from Dapple Security Inc.","6e24d385-004a-16a0-7bfe-efd963845b34":"Ledger Stax FIDO2 Authenticator","6e8d1eae-8d40-4c25-bcf8-4633959afc71":"Veridium iOS SDK","6ec5cff2-a0f9-4169-945b-f33b563f7b99":"YubiKey Bio Series - Multi-protocol Edition (Enterprise Profile)","70e7c36f-f2f6-9e0d-07a6-bcc243262e6b":"OneKey FIDO2 Bluetooth Authenticator","72c6b72d-8512-4c66-8359-9d3d10d9222f":"Security Key NFC by Yubico - Enterprise Edition (Enterprise Profile)","73402251-f2a8-4f03-873e-3cb6db604b03":"uTrust FIDO2 Security Key","73bb0cd4-e502-49b8-9c6f-b59445bf720b":"YubiKey 5 FIPS Series","7409272d-1ff9-4e10-9fc9-ac0019c124fd":"YubiKey Bio Series - FIDO Edition","74820b05-a6c9-40f9-8fb0-9f86aca93998":"SafeNet eToken Fusion","760eda36-00aa-4d29-855b-4012a182cdeb":"Security Key NFC by Yubico Preview","77010bd7-212a-4fc9-b236-d2ca5e9d4084":"Feitian BioPass FIDO2 Authenticator","771b48fd-d3d4-4f74-9232-fc157ab0507a":"Edge on Mac","773c30d9-5919-4e96-a4f5-db65e95cf890":"GSTAG OAK FIDO2 Authenticator","7787a482-13e8-4784-8a06-c7ed49a7aaf4":"Swissbit iShield Key 2","78ba3993-d784-4f44-8d6e-cc0a8ad5230e":"Feitian ePass FIDO-NFC(CTAP2.1, CTAP2.0, U2F)","7991798a-a7f3-487f-98c0-3faf7a458a04":"HID Crescendo Key V3","79f3c8ba-9e35-484b-8f47-53a5a0f5c630":"YubiKey 5 FIPS Series with NFC (Enterprise Profile)","7b96457d-e3cd-432b-9ceb-c9fdd7ef7432":"YubiKey 5 FIPS Series with Lightning","7d1351a6-e097-4852-b8bf-c9ac5c9ce4a3":"YubiKey Bio Series - Multi-protocol Edition","7d2afadd-bf6b-44a2-a66b-e831fceb8eff":"Taglio CTAP2.1 EP","7e3f3d30-3557-4442-bdae-139312178b39":"RSA DS100","817cdab8-0d51-4de1-a821-e25b88519cf3":"Swissbit iShield Key 2 FIPS","820d89ed-d65a-409e-85cb-f73f0578f82a":"IDmelon iOS Authenticator","82b0a720-127a-4788-b56d-d1d4b2d82eac":"ID-One Key","833b721a-ff5f-4d00-bb2e-bdda3ec01e29":"Feitian ePass FIDO2 Authenticator","83c47309-aabb-4108-8470-8be838b573cb":"YubiKey Bio Series - FIDO Edition (Enterprise Profile)","85203421-48f9-4355-9bc8-8a53846e5083":"YubiKey 5 FIPS Series with Lightning","8681a073-5f50-4d52-bce4-e21658d207b3":"RSA Authenticator 4 for iOS","87dbc5a1-4c94-4dc8-8a47-97d800fd1f3c":"eWBM eFA320 FIDO2 Authenticator","882adaf5-3aa9-4708-8e7d-3957103775b4":"T-Shield TrustSec FIDO2 Bio and client PIN version","8836336a-f590-0921-301d-46427531eee6":"Thales Bio Android SDK","8876631b-d4a0-427f-5773-0ec71c9e0279":"Solo Secp256R1 FIDO2 CTAP2 Authenticator","88bbd2f0-342a-42e7-9729-dd158be5407a":"Precision InnaIT Key FIDO 2 Level 2 certified","891494da-2c90-4d31-a9cd-4eab0aed1309":"Sésame","8976631b-d4a0-427f-5773-0ec71c9e0279":"Solo Tap Secp256R1 FIDO2 CTAP2 Authenticator","89b19028-256b-4025-8872-255358d950e4":"Sentry Enterprises CTAP2 Authenticator","8c39ee86-7f9a-4a95-9ba3-f6b097e5c2ee":"YubiKey Bio Series - FIDO Edition (Enterprise Profile)","8c97a730-3f7b-41a6-87d6-1e9b62bda6f0":"FT-JCOS FIDO Fingerprint Card","8d1b1fcb-3c76-49a9-9129-5515b346aa02":"IDEMIA ID-ONE Card","8d4378b0-725d-4432-b3c2-01fcdaf46286":"VeridiumID Passkey Android SDK","8da0e4dc-164b-454e-972e-88f362b23d59":"CardOS FIDO2 Token","905b4cb4-ed6f-4da9-92fc-45e0d4e9b5c7":"YubiKey 5 FIPS Series (Enterprise Profile)","90636e1f-ef82-43bf-bdcf-5255f139d12f":"YubiKey Bio Series - Multi-protocol Edition","912435d9-4a88-42f3-972d-1244b0d51420":"SI0X FIDO CL WRIST v1.0","91ad6b93-264b-4987-8737-3a690cad6917":"Token Ring FIDO2 Authenticator","931327dd-c89b-406c-a81e-ed7058ef36c6":"Swissbit iShield Key FIDO2","95442b2e-f15e-4def-b270-efb106facb4e":"eWBM eFA310 FIDO2 Authenticator","95e4d58c-056e-4a65-866d-f5a69659e880":"TruU Windows Authenticator","970c8d9c-19d2-46af-aa32-3f448db49e35":"WinMagic FIDO Eazy - TPM","973446ca-e21c-9a9b-99f5-9b985a67af0f":"ACS FIDO Authenticator Card","97e6a830-c952-4740-95fc-7c78dc97ce47":"YubiKey Bio Series - Multi-protocol Edition (Enterprise Profile)","9876631b-d4a0-427f-5773-0ec71c9e0279":"Somu Secp256R1 FIDO2 CTAP2 Authenticator","998f358b-2dd2-4cbe-a43a-e8107438dfb3":"OnlyKey Secp256R1 FIDO2 CTAP2 Authenticator","99bf4610-ec26-4252-b31f-7380ccd59db5":"ZTPass SmartAuth","99ed6c29-4573-4847-816d-78ad8f1c75ef":"VeroCard FIDO2 Authenticator","9c835346-796b-4c27-8898-d6032f515cc5":"Cryptnox FIDO2","9d3df6ba-282f-11ed-a261-0242ac120002":"Arculus FIDO2/U2F Key Card","9ddd1817-af5a-4672-a2b9-3e3dd95000a9":"Windows Hello","9e66c661-e428-452a-a8fb-51f7ed088acf":"YubiKey 5 FIPS Series with Lightning (RC Preview)","9eb7eabc-9db5-49a1-b6c3-555a802093f4":"YubiKey 5 Series with NFC KVZR57","9f0d8150-baa5-4c00-9299-ad62c8bb4e87":"GoTrust Idem Card FIDO2 Authenticator","9f77e279-a6e2-4d58-b700-31e5943c6a98":"Hyper FIDO Pro","9ff4cc65-6154-4fff-ba09-9e2af7882ad2":"Security Key NFC by Yubico - Enterprise Edition (Enterprise Profile)","a02140b7-0cbd-42e1-a9b5-a39da2545114":"Feitian BioPass FIDO2 Plus (Enterprise Profile)","a02167b9-ae71-4ac7-9a07-06432ebb6f1c":"YubiKey 5 Series with Lightning","a10c6dd9-465e-4226-8198-c7c44b91c555":"Kaspersky Password Manager","a1f52be5-dfab-4364-b51c-2bd496b14a56":"OCTATCO EzFinger2 FIDO2 AUTHENTICATOR","a25342c0-3cdc-4414-8e46-f4807fca511c":"YubiKey 5 Series with NFC","a3975549-b191-fd67-b8fb-017e2917fdb3":"Excelsecu eSecu FIDO2 NFC Security Key","a4e9fc6d-4cbe-4758-b8ba-37598bb5bbaa":"Security Key NFC by Yubico","a7fc3f84-86a3-4da4-a3d7-eb6485a066d8":"NEOWAVE Badgeo FIDO2 (CTAP 2.1)","ab32f0c6-2239-afbb-c470-d2ef4e254db6":"TEST (DUMMY RECORD)","ab32f0c6-2239-afbb-c470-d2ef4e254db7":"TOKEN2 FIDO2 Security Key","ad08c78a-4e41-49b9-86a2-ac15b06899e2":"YubiKey Bio Series - FIDO Edition (Enterprise Profile)","adce0002-35bc-c60a-648b-0b25f1f05503":"Chrome on Mac","aeb6569c-f8fb-4950-ac60-24ca2bbe2e52":"HID Crescendo C2300","b12eac35-586c-4809-a4b1-d81af6c305cf":"Deepnet SafeKey/Classic (NFC)","b267239b-954f-4041-a01b-ee4f33c145b6":"authenton1 - CTAP2.1","b2c1a50b-dad8-4dc7-ba4d-0ce9597904bc":"YubiKey 5 Series with NFC - Enhanced PIN (Enterprise Profile)","b35a26b2-8f6e-4697-ab1d-d44db4da28c6":"Zoho Vault","b415094c-49d3-4c8b-b3fe-7d0ad28a6bc4":"ZTPass SmartAuth","b50d5e0a-7f81-4959-9b12-f45407407503":"IDPrime 3940 FIDO","b5397666-4885-aa6b-cebf-e52262a439a2":"Chromium Browser","b6ede29c-3772-412c-8a78-539c1f4c62d2":"Feitian BioPass FIDO2 Plus Authenticator","b78a0a55-6ef8-d246-a042-ba0f6d55050c":"LastPass","b7d3f68e-88a6-471e-9ecf-2df26d041ede":"Security Key NFC by Yubico","b84e4048-15dc-4dd0-8640-f4f60813c8af":"NordPass","b90e7dc1-316e-4fee-a25a-56a666a670fe":"YubiKey 5 Series with Lightning (Enterprise Profile)","b92c3f9a-c014-4056-887f-140a2501163b":"Security Key by Yubico","b93fd961-f2e6-462f-b122-82002247de78":"Android Authenticator","b9f6b7b6-f929-4189-bca9-dd951240c132":"Deepnet SafeKey/Classic (USB)","ba76a271-6eb6-4171-874d-b6428dbe3437":"ATKey.ProS","ba86dc56-635f-4141-aef6-00227b1b9af6":"TruU Windows Authenticator","bada5566-a7aa-401f-bd96-45619a55120d":"1Password","bb405265-40cf-4115-93e5-a332c1968d8c":"ID-One Card","bbf4b6a7-679d-f6fc-c4f2-8ac0ddf9015a":"Excelsecu eSecu FIDO2 PRO Security Key","bc2fe499-0d8e-4ffe-96f3-94a82840cf8c":"OCTATCO EzQuant FIDO2 AUTHENTICATOR","be727034-574a-f799-5c76-0929e0430973":"Crayonic KeyVault K1 (USB-NFC-BLE FIDO2 Authenticator)","bfc748bb-3429-4faa-b9f9-7cfa9f3b76d0":"iPasswords","c1f9a0bc-1dd2-404a-b27f-8e29047a43fd":"YubiKey 5 FIPS Series with NFC","c3f47802-de73-4dfc-ba22-671fe3304f90":"eToken Fusion NFC PIV Enterprise","c4ddaf11-3032-4e77-b3b9-3a340369b9ad":"HID Crescendo Fusion","c5703116-972b-4851-a3e7-ae1259843399":"NEOWAVE Badgeo FIDO2","c5ef55ff-ad9a-4b9f-b580-adebafe026d0":"YubiKey 5 Series with Lightning","c62100de-759b-4bf8-b22b-63b3e3a80401":"Token Ring 3 FIDO2 Authenticator","c80dbd9a-533f-4a17-b941-1a2f1c7cedff":"HID Crescendo C3000","c89674e3-a765-4b07-888a-7c086fbdf04b":"StarSign FIDO Card","c89e6a38-6c00-5426-5aa5-c9cbf48f0382":"ACS FIDO Authenticator NFC","ca4cff1b-5a81-4404-8194-59aabcf1660b":"IDPrime 3930 FIDO","ca87cb70-4c1b-4579-a8e8-4efdd7c007e0":"FIDO Alliance TruU Sample FIDO2 Authenticator","cb69481e-8ff7-4039-93ec-0a2729a154a8":"YubiKey 5 Series","cc45f64e-52a2-451b-831a-4edd8022a202":"ToothPic Passkey Provider","cd69adb5-3c7a-deb9-3177-6800ea6cb72a":"Thales PIN Android SDK","cdbdaea2-c415-5073-50f7-c04e968640b6":"Excelsecu eSecu FIDO2 Security Key","ce6bf97f-9f69-4ba7-9032-97adc6ca5cf1":"YubiKey 5 FIPS Series with NFC (RC Preview)","cfcb13a2-244f-4b36-9077-82b79d6a7de7":"USB/NFC Passcode Authenticator","d2fbd093-ee62-488d-9dad-1e36389f8826":"YubiKey 5 FIPS Series (RC Preview)","d350af52-0351-4ba2-acd3-dfeeadc3f764":"pwSafe","d384db22-4d50-ebde-2eac-5765cf1e2a44":"Excelsecu eSecu FIDO2 Fingerprint Security Key","d41f5a69-b817-4144-a13c-9ebd6d9254d6":"ATKey.Card CTAP2.0","d548826e-79b4-db40-a3d8-11116f7e8349":"Bitwarden","d61d3b87-3e7c-4aea-9c50-441c371903ad":"KeyVault Secp256R1 FIDO2 CTAP2 Authenticator","d7781e5d-e353-46aa-afe2-3ca49f13332a":"YubiKey 5 Series with NFC","d7a423ad-3e19-4492-9200-78137dccc136":"VivoKey Apex FIDO2","d821a7d4-e97c-4cb6-bd82-4237731fd4be":"Hyper FIDO Bio Security Key","d8522d9f-575b-4866-88a9-ba99fa02f35b":"YubiKey Bio Series - FIDO Edition","d91c5288-0ef0-49b7-b8ae-21ca0aa6b3f3":"KEY-ID FIDO2 Authenticator","d94a29d9-52dd-4247-9c2d-8b818b610389":"VeriMark Guard Fingerprint Key","da1fa263-8b25-42b6-a820-c0036f21ba7f":"ATKey.Card NFC","dd4ec289-e01d-41c9-bb89-70fa845d4bf2":"iCloud Keychain (Managed)","dd86a2da-86a0-4cbe-b462-4bd31f57bc6f":"YubiKey Bio Series - FIDO Edition","de503f9c-21a4-4f76-b4b7-558eb55c6f89":"Devolutions","e1a96183-5016-4f24-b55b-e3ae23614cc6":"ATKey.Pro CTAP2.0","e400ef8c-711d-4692-af46-7f2cf7da23ad":"Swissbit iShield Key 2 Enterprise","e416201b-afeb-41ca-a03d-2281c28322aa":"ATKey.Pro CTAP2.1","e41b42a3-60ac-4afb-8757-a98f2d7f6c9f":"Deepnet SafeKey/Classic (FP)","e77e3c64-05e3-428b-8824-0cbeb04b829d":"Security Key NFC by Yubico","e86addcd-7711-47e5-b42a-c18257b0bf61":"IDCore 3121 Fido","ea9b8d66-4d01-1d21-3ce4-b6b48cb575d4":"Google Password Manager","eabb46cc-e241-80bf-ae9e-96fa6d2975cf":"TOKEN2 PIN Plus Security Key Series ","eb3b131e-59dc-536a-d176-cb7306da10f5":"ellipticSecure MIRkey USB Authenticator","ec31b4cc-2acc-4b8e-9c01-bade00ccbe26":"KeyXentic FIDO2 Secp256R1 FIDO2 CTAP2 Authenticator","ed042a3a-4b22-4455-bb69-a267b652ae7e":"Security Key NFC by Yubico - Enterprise Edition","ee041bce-25e5-4cdb-8f86-897fd6418464":"Feitian ePass FIDO2-NFC Authenticator","ee882879-721c-4913-9775-3dfcce97072a":"YubiKey 5 Series","efb96b10-a9ee-4b6c-a4a9-d32125ccd4a4":"Safenet eToken FIDO","f2145e86-211e-4931-b874-e22bba7d01cc":"ID-One Key","f3809540-7f14-49c1-a8b3-8f813b225541":"Enpass","f4c63eff-d26c-4248-801c-3736c7eaa93a":"FIDO KeyPass S3","f56f58b3-d711-4afc-ba7d-6ac05f88cb19":"WinMagic FIDO Eazy - Phone","f7c558a0-f465-11e8-b568-0800200c9a66":"KONAI Secp256R1 FIDO2 Conformance Testing CTAP2 Authenticator","f8a011f3-8c0a-4d15-8006-17111f9edc7d":"Security Key by Yubico","f8d5c4e9-e539-4c06-8662-ec2a4155a555":"StarSign Key Fob","fa2b99dc-9e39-4257-8f92-4a30d23c4118":"YubiKey 5 Series with NFC","fbefdf68-fe86-0106-213e-4d5fa24cbe2e":"Excelsecu eSecu FIDO2 NFC Security Key","fbfc3007-154e-4ecc-8c0b-6e020557d7bd":"iCloud Keychain","fcb1bcb4-f370-078c-6993-bc24d0ae3fbe":"Ledger Nano X FIDO2 Authenticator","fcc0118f-cd45-435b-8da1-9782b2da0715":"YubiKey 5 FIPS Series with NFC","fdb141b2-5d84-443e-8a35-4698c205a502":"KeePassXC","fec067a1-f1d0-4c5e-b4c0-cc3237475461":"KX701 SmartToken FIDO","ff4dac45-ede8-4ec2-aced-cf66103f4335":"YubiKey 5 Series"},X=new TextDecoder("utf-8");function D(e){return typeof e=="string"&&(e=o(e)),JSON.parse(X.decode(e))}function s(e){typeof e=="string"&&(e=o(e));let a=new DataView(e.slice(32,33)).getUint8(0);return{rpIdHash:z(e),flags:{userPresent:!!(a&1),userVerified:!!(a&4),backupEligibility:!!(a&8),backupState:!!(a&16),attestedData:!!(a&64),extensionsIncluded:!!(a&128)},signCount:new DataView(e.slice(33,37)).getUint32(0,!1),aaguid:q(e)}}function z(e){return d(e.slice(0,32))}function q(e){if(e.byteLength<53)return"00000000-0000-0000-0000-000000000000";let a=e.slice(37,53),t=w(a);return`${t.substring(0,8)}-${t.substring(8,12)}-${t.substring(12,16)}-${t.substring(16,20)}-${t.substring(20,32)}`}function m(e){switch(e){case-7:return"ES256";case-8:return"EdDSA";case-257:return"RS256";default:throw new Error(`Unknown algorithm code: ${e}`)}}function Z(e){let a=s(e.response.authenticatorData);return T(e,a)}function T(e,a){let t=a.aaguid;return{authenticator:{aaguid:t,counter:a.signCount,icon_light:"https://webauthn.passwordless.id/authenticators/"+t+"-light.png",icon_dark:"https://webauthn.passwordless.id/authenticators/"+t+"-dark.png",name:G[t]??"Unknown"},credential:{id:e.id,publicKey:e.response.publicKey,algorithm:m(e.response.publicKeyAlgorithm),transports:e.response.transports},synced:a.flags.backupEligibility,user:e.user,userVerified:a.flags.userVerified}}function g(e,a){return{credentialId:e.id,userId:e.response.userHandle,counter:a.signCount,userVerified:a.flags.userVerified,authenticatorAttachment:e.authenticatorAttachment}}function _(e){let a=s(e.response.authenticatorData);return g(e,a)}function j(){let e=crypto.getRandomValues(new Uint8Array(18));return d(e)}async function Q(e,a){if(typeof e=="function"){let t=e(a);return t instanceof Promise?await t:t}return e===a}async function l(e,a){return!await Q(e,a)}async function ee(e,a){let t=D(e.response.clientDataJSON),i=s(e.response.authenticatorData);if(!i.aaguid)throw new Error("Unexpected error, no AAGUID.");if(t.type!=="webauthn.create")throw new Error(`Unexpected ClientData type: ${t.type}`);if(await l(a.origin,t.origin))throw new Error(`Unexpected ClientData origin: ${t.origin}`);if(await l(a.challenge,t.challenge))throw new Error(`Unexpected ClientData challenge: ${t.challenge}`);return I.toRegistrationInfo(e,i)}async function ae(e,a,t){if(e.id!==a.id)throw new Error(`Credential ID mismatch: ${e.id} vs ${a.id}`);if(!await v({algorithm:a.algorithm,publicKey:a.publicKey,authenticatorData:e.response.authenticatorData,clientData:e.response.clientDataJSON,signature:e.response.signature,verbose:t.verbose}))throw new Error(`Invalid signature: ${e.response.signature}`);let i=D(e.response.clientDataJSON),c=s(e.response.authenticatorData);if(t.verbose&&(console.debug(i),console.debug(c)),i.type!=="webauthn.get")throw new Error(`Unexpected clientData type: ${i.type}`);if(await l(t.origin,i.origin))throw new Error(`Unexpected ClientData origin: ${i.origin}`);if(await l(t.challenge,i.challenge))throw new Error(`Unexpected ClientData challenge: ${i.challenge}`);let r=t.domain??new URL(i.origin).hostname,b=d(await F(y(r)));if(c.rpIdHash!==b)throw new Error(`Unexpected RpIdHash: ${c.rpIdHash} vs ${b}`);if(!c.flags.userPresent)throw new Error("Unexpected authenticator flags: missing userPresent");if(!c.flags.userVerified&&t.userVerified)throw new Error("Unexpected authenticator flags: missing userVerified");if(t.counter&&c.signCount<=t.counter)throw new Error(`Unexpected authenticator counter: ${c.signCount} (should be > ${t.counter})`);return g(e,c)}function N(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:"SHA-256"};default:throw new Error(`Unknown or unsupported crypto algorithm: ${e}. Only 'RS256' and 'ES256' are supported.`)}}async function Y(e,a){let t=N(e),i=o(a);return crypto.subtle.importKey("spki",i,t,!1,["verify"])}async function v({algorithm:e,publicKey:a,authenticatorData:t,clientData:i,signature:c,verbose:r}){let b=await Y(e,a);r&&console.debug(b);let f=await F(o(i)),A=K(o(t),f);r&&(console.debug("Algorithm: "+e),console.debug("Public key: "+a),console.debug("Data: "+d(A)),console.debug("Signature: "+c));let S=o(c);e=="ES256"&&(S=te(S));let B=N(e);return await crypto.subtle.verify(B,b,S,A)}function te(e){let a=new Uint8Array(e),t=a[4]===0?5:4,i=t+32,c=a[i+2]===0?i+3:i+2,r=a.slice(t,i),b=a.slice(c);return new Uint8Array([...r,...b])}class be{isAvailable(){return u.isAvailable()}async register(a){const{name:t,challenge:i,rp:c}=a,r=await u.register({attestation:!0,challenge:i,domain:c.id,user:t,userVerification:"required"}),b=O(r.response.clientDataJSON),f=JSON.parse(P(b));return{authenticatorData:r.response.authenticatorData,clientData:r.response.clientDataJSON,credential:{algorithm:I.getAlgoName(r.response.publicKeyAlgorithm),publicKey:r.response.publicKey},credentialId:r.id,origin:f.origin}}async authenticate(a){const{credentialId:t,challenge:i,rp:c}=a,r=await u.authenticate({allowCredentials:t?[t]:[],challenge:i,domain:c.id,userVerification:"required"}),b=O(r.response.clientDataJSON),f=JSON.parse(P(b));return{authenticatorData:r.response.authenticatorData,clientData:r.response.clientDataJSON,credentialId:r.id,origin:f.origin,signature:r.response.signature}}}async function oe(e,a,t){return!!await new U({clientId:e.clientId,ecosystem:a?{id:a}:void 0,storage:t??R}).getPasskeyCredentialId()}export{be as PasskeyWebClient,oe as hasStoredPasskey};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as $,b as u}from"./lit-element-0711c853.js";import{n as h,o as P,r as m}from"./class-map-d7835e88.js";import{d as A,r as D,e as T}from"./index-
|
|
1
|
+
import{i as $,b as u}from"./lit-element-0711c853.js";import{n as h,o as P,r as m}from"./class-map-d7835e88.js";import{d as A,r as D,e as T}from"./index-e4a08cd9.js";import{c as v}from"./index-dd7935fc.js";import"./index-c9395bda.js";import"./index-63c89e55.js";import"./index-85bdd658.js";import"./index-258eaeba.js";import"./index-1ebd6ac9.js";import"./index-1f941621.js";import"./index-164d622a.js";import{C as y,R as w,n as E,S as b,h as z,c as S}from"./W3MFrameProviderSingleton-967a5251.js";import{E as r}from"./ExchangeController-58cfc61e.js";import"./index-d410c519.js";import"./index-27604e48.js";import"./index-2dea5e5e.js";import"./index-9dbf9a6d.js";import"./index-1a84fe52.js";import"./index-5ad2a852.js";import"./index-accd8060.js";import"./index-83245c25.js";import"./index-08f74686.js";import"./index.es-d75c71a0.js";import"./NetworkUtil-9d775636.js";import"./createBatchScheduler-7c9ada66.js";import"./index-979a21b1.js";import"./ref-8c2954ee.js";import"./async-directive-ff05e1a6.js";import"./http-a4cf4808.js";const _=A`
|
|
2
2
|
button {
|
|
3
3
|
border: none;
|
|
4
4
|
border-radius: ${({borderRadius:e})=>e[20]};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{L as xt,e as _e,b as jn,c as Ln}from"./utils-
|
|
1
|
+
import{L as xt,e as _e,b as jn,c as Ln}from"./utils-b0786619.js";function j(e,t,n){return JSON.stringify(e,(s,o)=>{const i=typeof o=="bigint"?o.toString():o;return typeof t=="function"?t(s,i):i},n)}const Wo=Object.freeze(Object.defineProperty({__proto__:null,stringify:j},Symbol.toStringTag,{value:"Module"})),Un="0.1.1";function Rn(){return Un}let $=class Ie extends Error{constructor(t,n={}){const r=(()=>{var c;if(n.cause instanceof Ie){if(n.cause.details)return n.cause.details;if(n.cause.shortMessage)return n.cause.shortMessage}return n.cause&&"details"in n.cause&&typeof n.cause.details=="string"?n.cause.details:(c=n.cause)!=null&&c.message?n.cause.message:n.details})(),s=(()=>n.cause instanceof Ie&&n.cause.docsPath||n.docsPath)(),i=`https://oxlib.sh${s??""}`,a=[t||"An error occurred.",...n.metaMessages?["",...n.metaMessages]:[],...r||s?["",r?`Details: ${r}`:void 0,s?`See: ${i}`:void 0]:[]].filter(c=>typeof c=="string").join(`
|
|
2
2
|
`);super(a,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${Rn()}`}),this.cause=n.cause,this.details=r,this.docs=i,this.docsPath=s,this.shortMessage=t}walk(t){return At(this,t)}};function At(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?At(e.cause,t):t?null:e}const Cn="#__bigint";function Et(e,t,n){return JSON.stringify(e,(r,s)=>typeof t=="function"?t(r,s):typeof s=="bigint"?s.toString()+Cn:s,n)}function N(e,t){if(Y(e)>t)throw new gr({givenSize:Y(e),maxSize:t})}function Hn(e,t){if(typeof t=="number"&&t>0&&t>Y(e)-1)throw new Ot({offset:t,position:"start",size:Y(e)})}function Nn(e,t,n){if(typeof t=="number"&&typeof n=="number"&&Y(e)!==n-t)throw new Ot({offset:n,position:"end",size:Y(e)})}const z={zero:48,nine:57,A:65,F:70,a:97,f:102};function Qe(e){if(e>=z.zero&&e<=z.nine)return e-z.zero;if(e>=z.A&&e<=z.F)return e-(z.A-10);if(e>=z.a&&e<=z.f)return e-(z.a-10)}function St(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;if(e.length>r)throw new mr({size:e.length,targetSize:r,type:"Bytes"});const s=new Uint8Array(r);for(let o=0;o<r;o++){const i=n==="right";s[i?o:r-o-1]=e[i?o:e.length-o-1]}return s}function vt(e,t={}){const{dir:n="left"}=t;let r=e,s=0;for(let o=0;o<r.length-1&&r[n==="left"?o:r.length-o-1].toString()==="0";o++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),r}function ce(e,t){if(G(e)>t)throw new sr({givenSize:G(e),maxSize:t})}function Fn(e,t){if(typeof t=="number"&&t>0&&t>G(e)-1)throw new Pt({offset:t,position:"start",size:G(e)})}function Dn(e,t,n){if(typeof t=="number"&&typeof n=="number"&&G(e)!==n-t)throw new Pt({offset:n,position:"end",size:G(e)})}function Bt(e,t={}){const{dir:n,size:r=32}=t;if(r===0)return e;const s=e.replace("0x","");if(s.length>r*2)throw new ir({size:Math.ceil(s.length/2),targetSize:r,type:"Hex"});return`0x${s[n==="right"?"padEnd":"padStart"](r*2,"0")}`}function Vn(e,t={}){const{dir:n="left"}=t;let r=e.replace("0x",""),s=0;for(let o=0;o<r.length-1&&r[n==="left"?o:r.length-o-1].toString()==="0";o++)s++;return r=n==="left"?r.slice(s):r.slice(0,r.length-s),r==="0"?"0x":n==="right"&&r.length%2===1?`0x${r}0`:`0x${r}`}const qn=new TextEncoder,Wn=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Zn(e,t={}){const{strict:n=!1}=t;if(!e)throw new et(e);if(typeof e!="string")throw new et(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e))throw new tt(e);if(!e.startsWith("0x"))throw new tt(e)}function K(...e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}function Zo(e){return e instanceof Uint8Array?X(e):Array.isArray(e)?X(new Uint8Array(e)):e}function Kn(e,t={}){const n=`0x${Number(e)}`;return typeof t.size=="number"?(ce(n,t.size),je(n,t.size)):n}function X(e,t={}){let n="";for(let s=0;s<e.length;s++)n+=Wn[e[s]];const r=`0x${n}`;return typeof t.size=="number"?(ce(r,t.size),Le(r,t.size)):r}function zt(e,t={}){const{signed:n,size:r}=t,s=BigInt(e);let o;r?n?o=(1n<<BigInt(r)*8n-1n)-1n:o=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(o=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof o=="bigint"&&n?-o-1n:0;if(o&&s>o||s<i){const u=typeof e=="bigint"?"n":"";throw new nr({max:o?`${o}${u}`:void 0,min:`${i}${u}`,signed:n,size:r,value:`${e}${u}`})}const c=`0x${(n&&s<0?(1n<<BigInt(r*8))+BigInt(s):s).toString(16)}`;return r?je(c,r):c}function Xn(e,t={}){return X(qn.encode(e),t)}function je(e,t){return Bt(e,{dir:"left",size:t})}function Le(e,t){return Bt(e,{dir:"right",size:t})}function Gn(e,t,n,r={}){const{strict:s}=r;Fn(e,t);const o=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return s&&Dn(o,t,n),o}function G(e){return Math.ceil((e.length-2)/2)}function Yn(e){return Vn(e,{dir:"left"})}function Ue(e,t={}){const{signed:n}=t;t.size&&ce(e,t.size);const r=BigInt(e);if(!n)return r;const s=(e.length-2)/2,o=(1n<<BigInt(s)*8n)-1n,i=o>>1n;return r<=i?r:r-o-1n}function Jn(e,t={}){t.size&&ce(e,t.size);const n=Yn(e);if(n==="0x")return!1;if(n==="0x1")return!0;throw new rr(e)}function Qn(e,t={}){return ue(e,t)}function It(e,t={}){const{signed:n,size:r}=t;return Number(!n&&!r?e:Ue(e,t))}function er(e,t={}){const{size:n}=t;let r=ue(e);return n&&(N(r,n),r=Tt(r)),new TextDecoder().decode(r)}function tr(e,t={}){const{strict:n=!1}=t;try{return Zn(e,{strict:n}),!0}catch{return!1}}let nr=class extends ${constructor({max:t,min:n,signed:r,size:s,value:o}){super(`Number \`${o}\` is not in safe${s?` ${s*8}-bit`:""}${r?" signed":" unsigned"} integer range ${t?`(\`${n}\` to \`${t}\`)`:`(above \`${n}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}},rr=class extends ${constructor(t){super(`Hex value \`"${t}"\` is not a valid boolean.`,{metaMessages:['The hex value must be `"0x0"` (false) or `"0x1"` (true).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexBooleanError"})}};class et extends ${constructor(t){super(`Value \`${typeof t=="object"?Et(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}let tt=class extends ${constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}},sr=class extends ${constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}},Pt=class extends ${constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}},ir=class extends ${constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}};const or=new TextDecoder,ar=new TextEncoder;function cr(e){if(!(e instanceof Uint8Array)){if(!e)throw new he(e);if(typeof e!="object")throw new he(e);if(!("BYTES_PER_ELEMENT"in e))throw new he(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new he(e)}}function ea(...e){let t=0;for(const r of e)t+=r.length;const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const o=e[r];n.set(o,s),s+=o.length}return n}function ta(e){return e instanceof Uint8Array?e:typeof e=="string"?ue(e):ur(e)}function ur(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function fr(e,t={}){const{size:n}=t,r=new Uint8Array(1);return r[0]=Number(e),typeof n=="number"?(N(r,n),hr(r,n)):r}function ue(e,t={}){const{size:n}=t;let r=e;n&&(ce(e,n),r=Le(e,n));let s=r.slice(2);s.length%2&&(s=`0${s}`);const o=s.length/2,i=new Uint8Array(o);for(let a=0,c=0;a<o;a++){const u=Qe(s.charCodeAt(c++)),f=Qe(s.charCodeAt(c++));if(u===void 0||f===void 0)throw new $(`Invalid byte sequence ("${s[c-2]}${s[c-1]}" in "${s}").`);i[a]=u*16+f}return i}function lr(e,t){const n=zt(e,t);return ue(n)}function dr(e,t={}){const{size:n}=t,r=ar.encode(e);return typeof n=="number"?(N(r,n),pr(r,n)):r}function hr(e,t){return St(e,{dir:"left",size:t})}function pr(e,t){return St(e,{dir:"right",size:t})}function Y(e){return e.length}function na(e,t,n,r={}){const{strict:s}=r;Hn(e,t);const o=e.slice(t,n);return s&&Nn(o,t,n),o}function ra(e,t={}){const{size:n}=t;typeof n<"u"&&N(e,n);const r=X(e,t);return Ue(r,t)}function sa(e,t={}){const{size:n}=t;let r=e;if(typeof n<"u"&&(N(r,n),r=yr(r)),r.length>1||r[0]>1)throw new br(r);return!!r[0]}function ia(e,t={}){const{size:n}=t;typeof n<"u"&&N(e,n);const r=X(e,t);return It(r,t)}function oa(e,t={}){const{size:n}=t;let r=e;return typeof n<"u"&&(N(r,n),r=Tt(r)),or.decode(r)}function yr(e){return vt(e,{dir:"left"})}function Tt(e){return vt(e,{dir:"right"})}function aa(e){try{return cr(e),!0}catch{return!1}}let br=class extends ${constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesBooleanError"})}};class he extends ${constructor(t){super(`Value \`${typeof t=="object"?Et(t):t}\` of type \`${typeof t}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}let gr=class extends ${constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed \`${n}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},Ot=class extends ${constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}},mr=class extends ${constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};function Re(e,t={}){return tr(e,t)}function da(e,t={}){switch(typeof e){case"number":case"bigint":return xr(e,t);case"boolean":return $r(e,t);default:return Re(e)?wr(e,t):kt(e,t)}}function $r(e,t={}){return fr(e,t)}function wr(e,t={}){return ue(e,t)}function xr(e,t){return lr(e,t)}function kt(e,t={}){return dr(e,t)}function be(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Ar(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function fe(e,...t){if(!Ar(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function ha(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");be(e.outputLen),be(e.blockLen)}function nt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Er(e,t){fe(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}const pe=BigInt(2**32-1),rt=BigInt(32);function Sr(e,t=!1){return t?{h:Number(e&pe),l:Number(e>>rt&pe)}:{h:Number(e>>rt&pe)|0,l:Number(e&pe)|0}}function vr(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let s=0;s<e.length;s++){const{h:o,l:i}=Sr(e[s],t);[n[s],r[s]]=[o,i]}return[n,r]}const Br=(e,t,n)=>e<<n|t>>>32-n,zr=(e,t,n)=>t<<n|e>>>32-n,Ir=(e,t,n)=>t<<n-32|e>>>64-n,Pr=(e,t,n)=>e<<n-32|t>>>64-n,V=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Tr(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function pa(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ya(e,t){return e<<32-t|e>>>t}const st=(()=>new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68)();function Or(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function it(e){for(let t=0;t<e.length;t++)e[t]=Or(e[t])}const kr=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Mr=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ba(e){if(fe(e),kr)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=Mr[e[n]];return t}function _r(e){if(typeof e!="string")throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}function Ce(e){return typeof e=="string"&&(e=_r(e)),fe(e),e}function ga(...e){let t=0;for(let r=0;r<e.length;r++){const s=e[r];fe(s),t+=s.length}const n=new Uint8Array(t);for(let r=0,s=0;r<e.length;r++){const o=e[r];n.set(o,s),s+=o.length}return n}let jr=class{clone(){return this._cloneInto()}};function Lr(e){const t=r=>e().update(Ce(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Ur(e){const t=(r,s)=>e(s).update(Ce(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}function $a(e=32){if(V&&typeof V.getRandomValues=="function")return V.getRandomValues(new Uint8Array(e));if(V&&typeof V.randomBytes=="function")return Uint8Array.from(V.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}const Mt=[],_t=[],jt=[],Rr=BigInt(0),te=BigInt(1),Cr=BigInt(2),Hr=BigInt(7),Nr=BigInt(256),Fr=BigInt(113);for(let e=0,t=te,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],Mt.push(2*(5*r+n)),_t.push((e+1)*(e+2)/2%64);let s=Rr;for(let o=0;o<7;o++)t=(t<<te^(t>>Hr)*Fr)%Nr,t&Cr&&(s^=te<<(te<<BigInt(o))-te);jt.push(s)}const[Dr,Vr]=vr(jt,!0),ot=(e,t,n)=>n>32?Ir(e,t,n):Br(e,t,n),at=(e,t,n)=>n>32?Pr(e,t,n):zr(e,t,n);function Lt(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const a=(i+8)%10,c=(i+2)%10,u=n[c],f=n[c+1],d=ot(u,f,1)^n[a],h=at(u,f,1)^n[a+1];for(let p=0;p<50;p+=10)e[i+p]^=d,e[i+p+1]^=h}let s=e[2],o=e[3];for(let i=0;i<24;i++){const a=_t[i],c=ot(s,o,a),u=at(s,o,a),f=Mt[i];s=e[f],o=e[f+1],e[f]=c,e[f+1]=u}for(let i=0;i<50;i+=10){for(let a=0;a<10;a++)n[a]=e[i+a];for(let a=0;a<10;a++)e[i+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=Dr[r],e[1]^=Vr[r]}n.fill(0)}let He=class Ut extends jr{constructor(t,n,r,s=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=s,this.rounds=o,be(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Tr(this.state)}keccak(){st||it(this.state32),Lt(this.state32,this.rounds),st||it(this.state32),this.posOut=0,this.pos=0}update(t){nt(this);const{blockLen:n,state:r}=this;t=Ce(t);const s=t.length;for(let o=0;o<s;){const i=Math.min(n-this.pos,s-o);for(let a=0;a<i;a++)r[this.pos++]^=t[o++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:r,blockLen:s}=this;t[r]^=n,n&128&&r===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){nt(this,!1),fe(t),this.finish();const n=this.state,{blockLen:r}=this;for(let s=0,o=t.length;s<o;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,o-s);t.set(n.subarray(this.posOut,this.posOut+i),s),this.posOut+=i,s+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return be(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Er(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:s,rounds:o,enableXOF:i}=this;return t||(t=new Ut(n,r,s,i,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=s,t.enableXOF=i,t.destroyed=this.destroyed,t}};const L=(e,t,n)=>Lr(()=>new He(t,e,n)),qr=L(6,144,224/8),Wr=L(6,136,256/8),Zr=L(6,104,384/8),Kr=L(6,72,512/8),Xr=L(1,144,224/8),Rt=L(1,136,256/8),Gr=L(1,104,384/8),Yr=L(1,72,512/8),Ct=(e,t,n)=>Ur((r={})=>new He(t,e,r.dkLen===void 0?n:r.dkLen,!0)),Jr=Ct(31,168,128/8),Qr=Ct(31,136,256/8),wa=Object.freeze(Object.defineProperty({__proto__:null,Keccak:He,keccakP:Lt,keccak_224:Xr,keccak_256:Rt,keccak_384:Gr,keccak_512:Yr,sha3_224:qr,sha3_256:Wr,sha3_384:Zr,sha3_512:Kr,shake128:Jr,shake256:Qr},Symbol.toStringTag,{value:"Module"}));function R(e,t={}){const{dir:n,size:r=32}=t;return r===null?e:n==="right"?Le(e,r):je(e,r)}function es(e,t={}){return er(e,t)}function ts(e,t={}){return Ue(e,t)}function ns(e,t={}){return It(e,t)}function rs(e,t={}){return Jn(e,t)}function Ht(e,t={}){return Qn(e,t)}function xa(e,t){const n=typeof t=="string"?{to:t}:t;switch(n.to){case"number":return ns(e,n);case"bigint":return ts(e,n);case"string":return es(e,n);case"boolean":return rs(e,n);default:return Ht(e,n)}}function Nt(e,t={}){return Kn(e,t)}function Ft(e,t={}){return X(e,t)}function P(e,t={}){return zt(e,t)}function Dt(e,t={}){return Xn(e,t)}function Aa(e,t={}){switch(typeof e){case"number":case"bigint":return P(e,t);case"string":return Dt(e,t);case"boolean":return Nt(e,t);default:return Ft(e,t)}}function ss(e,t){const n=Rt(Re(e,{strict:!1})?Ht(e):e);return t==="bytes"?n:Ft(n)}const is=/^0x[a-fA-F0-9]{40}$/,Ae=new xt(4096);function Vt(e){if(Ae.has(e))return Ae.get(e);const t=is.test(e)&&(e.toLowerCase()===e||qt(e)===e);return Ae.set(e,t),t}function qt(e){const t=e.substring(2).toLowerCase(),n=ss(kt(t),"bytes"),r=t.split("");for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&e[s]&&(r[s]=r[s].toUpperCase()),(n[s>>1]&15)>=8&&e[s+1]&&(r[s+1]=r[s+1].toUpperCase());return`0x${r.join("")}`}function os(e){if(!Vt(e))throw new Error(`Invalid address: ${e}`);return qt(e)}function as(e,t){const n=e.exec(t);return n==null?void 0:n.groups}const Ea=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Sa=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,va=/^\(.+?\).*?$/,ct=/^tuple(?<array>(\[(\d*)\])*)$/;function Pe(e){let t=e.type;if(ct.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let s=0;s<n;s++){const o=e.components[s];t+=Pe(o),s<n-1&&(t+=", ")}const r=as(ct,e.type);return t+=`)${(r==null?void 0:r.array)??""}`,Pe({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function ne(e){let t="";const n=e.length;for(let r=0;r<n;r++){const s=e[r];t+=Pe(s),r!==n-1&&(t+=", ")}return t}function cs(e){var t;return e.type==="function"?`function ${e.name}(${ne(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${(t=e.outputs)!=null&&t.length?` returns (${ne(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${ne(e.inputs)})`:e.type==="error"?`error ${e.name}(${ne(e.inputs)})`:e.type==="constructor"?`constructor(${ne(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}function ge(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new $s(e.type);return`${e.name}(${$e(e.inputs,{includeName:t})})`}function $e(e,{includeName:t=!1}={}){return e?e.map(n=>us(n,{includeName:t})).join(t?", ":","):""}function us(e,{includeName:t}){return e.type.startsWith("tuple")?`(${$e(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function le(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function y(e){return le(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const Wt="2.39.0";let W={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${Wt}`};function Ba(e){W=e}let l=class Te extends Error{constructor(t,n={}){var a;const r=(()=>{var c;return n.cause instanceof Te?n.cause.details:(c=n.cause)!=null&&c.message?n.cause.message:n.details})(),s=(()=>n.cause instanceof Te&&n.cause.docsPath||n.docsPath)(),o=(a=W.getDocsUrl)==null?void 0:a.call(W,{...n,docsPath:s}),i=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...r?[`Details: ${r}`]:[],...W.version?[`Version: ${W.version}`]:[]].join(`
|
|
3
3
|
`);super(i,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=s,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=Wt}walk(t){return Zt(this,t)}};function Zt(e,t){return t!=null&&t(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?Zt(e.cause,t):t?null:e}class za extends l{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
4
4
|
`),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class Ia extends l{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as C}from"./index-
|
|
1
|
+
import{_ as C}from"./index-1a84fe52.js";function T(l,o={}){const{qrSize:s=280,showCloseButton:u=!0,closeButtonText:p="×",theme:n="light",container:v=document.body,onCancel:y}=o,t=document.createElement("div");t.style.cssText=`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
background-color: ${n==="dark"?"rgba(0, 0, 0, 0.8)":"rgba(0, 0, 0, 0.5)"};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as k,b as u}from"./lit-element-0711c853.js";import{n as x,o as v,r as b}from"./class-map-d7835e88.js";import{d as $,r as N,e as R}from"./index-
|
|
1
|
+
import{i as k,b as u}from"./lit-element-0711c853.js";import{n as x,o as v,r as b}from"./class-map-d7835e88.js";import{d as $,r as N,e as R}from"./index-e4a08cd9.js";import{c as C,U as T}from"./index-dd7935fc.js";import"./index-c9395bda.js";import"./index-edac5298.js";import{C as c,S as w,n as h,T as f,i as A,W as S,R as I,c as O}from"./W3MFrameProviderSingleton-967a5251.js";import"./index-1a84fe52.js";import"./index-5ad2a852.js";import"./index-accd8060.js";import"./index-83245c25.js";import"./index-08f74686.js";import"./index.es-d75c71a0.js";import"./NetworkUtil-9d775636.js";import"./createBatchScheduler-7c9ada66.js";import"./browser-54fcd4f6.js";import"./http-a4cf4808.js";const _=$`
|
|
2
2
|
button {
|
|
3
3
|
width: 100%;
|
|
4
4
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as m,w as g,s as f}from"./prepare-contract-call-
|
|
1
|
+
import{v as m,w as g,s as f}from"./prepare-contract-call-8aa69ada.js";import{c as l,e as w}from"./utils-b0786619.js";import{r as A}from"./execute-ddc9aba5.js";function R(t){const n=t.domain;return(n==null?void 0:n.chainId)!==void 0&&m(n.chainId)&&(t.domain={...t.domain,chainId:g(t.domain.chainId)}),t}async function b({client:t,ecosystem:n,tokenToLink:e,storage:o}){const i=w(t,n),c=l("inAppWallet"),u=await o.getAuthCookie();if(!u)throw new Error("Failed to link account, no user logged in");const a={Authorization:`Bearer iaw-auth-token:${u}`,"Content-Type":"application/json"},s=await i(`${c}/api/2024-05-05/account/connect`,{body:f({accountAuthTokenToConnect:e}),headers:a,method:"POST"});if(!s.ok){const d=await s.json();throw new Error(d.message||"Failed to link account.")}const{linkedAccounts:r}=await s.json();return r??[]}async function _({client:t,ecosystem:n,profileToUnlink:e,allowAccountDeletion:o=!1,storage:i}){const c=w(t,n),u=l("inAppWallet"),a=await i.getAuthCookie();if(!a)throw new Error("Failed to unlink account, no user logged in");const s={Authorization:`Bearer iaw-auth-token:${a}`,"Content-Type":"application/json"},r=await c(`${u}/api/2024-05-05/account/disconnect`,{body:f({allowAccountDeletion:o,details:e.details,type:e.type}),headers:s,method:"POST"});if(!r.ok){const k=await r.json();throw new Error(k.message||"Failed to unlink account.")}const{linkedAccounts:d}=await r.json();return d??[]}async function S({client:t,ecosystem:n,storage:e}){const o=w(t,n),i=l("inAppWallet"),c=await e.getAuthCookie();if(!c)throw new Error("Failed to get linked accounts, no user logged in");const u={Authorization:`Bearer iaw-auth-token:${c}`,"Content-Type":"application/json"},a=await o(`${i}/api/2024-05-05/accounts`,{headers:u,method:"GET"});if(!a.ok){const r=await a.json();throw new Error(r.message||"Failed to get linked accounts.")}const{linkedAccounts:s}=await a.json();return s??[]}const h="thirdweb:auth-redirect-state:",T=10*60*1e3;function p(){try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{}}function y(t,n){const e=[];for(let o=0;o<t.length;o++){const i=t.key(o);if(i!=null&&i.startsWith(h)){const c=Number(t.getItem(i));(!Number.isFinite(c)||c<=n)&&e.push(i)}}for(const o of e)t.removeItem(o)}async function C(){const t=A(16),n=p();if(n){const e=Date.now();y(n,e),n.setItem(`${h}${t}`,String(e+T))}return t}async function P(t){if(!t)return!1;const n=p();if(!n)return!1;const e=`${h}${t}`,o=Number(n.getItem(e));return n.removeItem(e),Number.isFinite(o)&&o>Date.now()}export{P as c,S as g,b as l,R as p,C as s,_ as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as d}from"./get-bytecode-
|
|
1
|
+
import{g as d}from"./get-bytecode-3e525016.js";import{g as f}from"./to-serializable-transaction-b9665f26.js";import{e as a}from"./eth_getStorageAt-fece51db.js";import{i as p,f as l,r as c}from"./prepare-contract-call-8aa69ada.js";import"./index-1a84fe52.js";import"./transaction-c89d76c9.js";import"./utils-b0786619.js";function u(e){if(e.startsWith("0x")||(e=`0x${e}`),e.startsWith("0x363d3d373d3d3d363d73"))return`0x${e.slice(22,62)}`;if(e.startsWith("0x36603057343d5230"))return`0x${e.slice(122,162)}`;if(e.startsWith("0x3d3d3d3d363d3d37363d73"))return`0x${e.slice(24,64)}`;if(e.startsWith("0x366000600037611000600036600073"))return`0x${e.slice(32,72)}`;if(e.startsWith("0x36600080376020600036600073"))return`0x${e.slice(28,68)}`;if(e.startsWith("0x365f5f375f5f365f73"))return`0x${e.slice(20,60)}`;if(e.length===48&&e.startsWith("0xef0100"))return`0x${e.slice(8,48)}`}const o="0x0000000000000000000000000000000000000000",x="0x0000000000000000000000000000000000000000000000000000000000000000";async function R(e){const[s,t]=await Promise.all([d(e),A(e)]),n=u(s);if(n)return{address:n,bytecode:await d(f({...e,address:n}))};t&&t!==o&&(e=f({...e,address:t}));const r=await Promise.all([g(e),S(e)]);for(const i of r)if(i&&p(i)&&i!==o){const m=await d({...e,address:i});return m==="0x"?{address:e.address,bytecode:s}:{address:i,bytecode:m}}return{address:e.address,bytecode:s}}async function A(e){const s=l({chain:e.chain,client:e.client});try{const t=await a(s,{address:e.address,position:"0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50"});return t.length>=40?`0x${t.slice(-40)}`:void 0}catch{return}}async function g(e){const s=l({chain:e.chain,client:e.client});try{const t=[a(s,{address:e.address,position:"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"}),a(s,{address:e.address,position:"0xbaab7dbf64751104133af04abc7d9979f0fda3b059a322a8333f533d3f32bf7f"}),a(s,{address:e.address,position:"0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3"})],r=(await Promise.all(t)).find(i=>i!==x);return r?`0x${r.slice(-40)}`:o}catch{return}}const h={inputs:[],name:"implementation",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"};async function S(e){try{return await c({contract:e,method:h})}catch{return}}export{R as resolveImplementation};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{B as c}from"./prepare-contract-call-
|
|
1
|
+
import{B as c}from"./prepare-contract-call-8aa69ada.js";import{s as i}from"./to-serializable-transaction-b9665f26.js";const L=s=>s,d=s=>s;class J extends c{constructor({body:e,cause:r,details:a,headers:n,status:u,url:l}){super("HTTP request failed.",{cause:r,details:a,metaMessages:[u&&`Status: ${u}`,`URL: ${d(l)}`,e&&`Request body: ${i(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=u,this.url=l}}class H extends c{constructor({body:e,cause:r,details:a,url:n}){super("WebSocket request failed.",{cause:r,details:a,metaMessages:[`URL: ${d(n)}`,e&&`Request body: ${i(e)}`].filter(Boolean),name:"WebSocketRequestError"})}}class W extends c{constructor({body:e,error:r,url:a}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${d(a)}`,`Request body: ${i(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code,this.data=r.data}}class F extends c{constructor({url:e}={}){super("The socket has been closed.",{metaMessages:[e&&`URL: ${d(e)}`].filter(Boolean),name:"SocketClosedError"})}}class z extends c{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${d(r)}`,`Request body: ${i(e)}`],name:"TimeoutError"})}}const A=-1;class t extends c{constructor(e,{code:r,docsPath:a,metaMessages:n,name:u,shortMessage:l}){super(l,{cause:e,docsPath:a,metaMessages:n||(e==null?void 0:e.metaMessages),name:u||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=u||e.name,this.code=e instanceof W?e.code:r??A}}class o extends t{constructor(e,r){super(e,r),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class b extends t{constructor(e){super(e,{code:b.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class p extends t{constructor(e){super(e,{code:p.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class h extends t{constructor(e,{method:r}={}){super(e,{code:h.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class m extends t{constructor(e){super(e,{code:m.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
2
2
|
`)})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class f extends t{constructor(e){super(e,{code:f.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class g extends t{constructor(e){super(e,{code:g.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
3
3
|
`)})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class v extends t{constructor(e){super(e,{code:v.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class R extends t{constructor(e){super(e,{code:R.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(R,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class w extends t{constructor(e){super(e,{code:w.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class P extends t{constructor(e,{method:r}={}){super(e,{code:P.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class y extends t{constructor(e){super(e,{code:y.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class E extends t{constructor(e){super(e,{code:E.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class j extends o{constructor(e){super(e,{code:j.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(j,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class x extends o{constructor(e){super(e,{code:x.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class M extends o{constructor(e,{method:r}={}){super(e,{code:M.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`})}}Object.defineProperty(M,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class O extends o{constructor(e){super(e,{code:O.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(O,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class q extends o{constructor(e){super(e,{code:q.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(q,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class T extends o{constructor(e){super(e,{code:T.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class U extends o{constructor(e){super(e,{code:U.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(U,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class k extends o{constructor(e){super(e,{code:k.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(k,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class $ extends o{constructor(e){super(e,{code:$.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty($,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class S extends o{constructor(e){super(e,{code:S.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class C extends o{constructor(e){super(e,{code:C.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class I extends o{constructor(e){super(e,{code:I.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class N extends o{constructor(e){super(e,{code:N.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(N,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class V extends t{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}export{N as A,C as B,q as C,$ as D,J as H,f as I,E as J,y as L,h as M,b as P,W as R,T as S,z as T,j as U,H as W,F as a,w as b,I as c,g as d,m as e,p as f,d as g,P as h,O as i,o as j,v as k,R as l,t as m,x as n,S as o,V as p,k as q,U as r,M as s,L as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as pe,v as Mt,w as Nt,x as xe,y as Ee,z as Ye,A as Rt,C as De,E as $,G as Ge,I as We,J as $e,L as ve}from"./wallets-4e23dd0f.js";import"./signing-6d6682ec.js";import"./prepare-contract-call-4be4cc68.js";import"./utils-dddc86ba.js";import"./index-10c73e9d.js";import"./to-serializable-transaction-9e540f8c.js";import"./transaction-ea614a5a.js";import"./get-bytecode-7a8c6215.js";import"./execute-264a98ed.js";import"./redirect-state-301cb22c.js";import"./index-93724bad.js";import"./ethereum-0d579241.js";import"./types-ba990c1e.js";import"./store-af6293b2.js";import"./hashTypedData-cc1589a7.js";import"./send-transaction-c3053b90.js";import"./eth_sendRawTransaction-5ae15b91.js";import"./index-b3889ac8.js";import"./index-accd8060.js";import"./index-2cab452e.js";import"./index-6ab757a5.js";import"./index-877ffe4a.js";function Xe(t,n,e,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(n,e,r);const s=BigInt(32),o=BigInt(4294967295),c=Number(e>>s&o),f=Number(e&o),i=r?4:0,a=r?0:4;t.setUint32(n+i,c,r),t.setUint32(n+a,f,r)}function Qe(t,n,e){return t&n^~t&e}function Je(t,n,e){return t&n^t&e^n&e}class Fe extends pe{constructor(n,e,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=n,this.outputLen=e,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(n),this.view=Mt(this.buffer)}update(n){Nt(this),n=xe(n),Ee(n);const{view:e,buffer:r,blockLen:s}=this,o=n.length;for(let c=0;c<o;){const f=Math.min(s-this.pos,o-c);if(f===s){const i=Mt(n);for(;s<=o-c;c+=s)this.process(i,c);continue}r.set(n.subarray(c,c+f),this.pos),this.pos+=f,c+=f,this.pos===s&&(this.process(e,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){Nt(this),Ye(n,this),this.finished=!0;const{buffer:e,view:r,blockLen:s,isLE:o}=this;let{pos:c}=this;e[c++]=128,Rt(this.buffer.subarray(c)),this.padOffset>s-c&&(this.process(r,0),c=0);for(let l=c;l<s;l++)e[l]=0;Xe(r,s-8,BigInt(this.length*8),o),this.process(r,0);const f=Mt(n),i=this.outputLen;if(i%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const a=i/4,d=this.get();if(a>d.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<a;l++)f.setUint32(4*l,d[l],o)}digest(){const{buffer:n,outputLen:e}=this;this.digestInto(n);const r=n.slice(0,e);return this.destroy(),r}_cloneInto(n){n||(n=new this.constructor),n.set(...this.get());const{blockLen:e,buffer:r,length:s,finished:o,destroyed:c,pos:f}=this;return n.destroyed=c,n.finished=o,n.length=s,n.pos=f,s%e&&n.buffer.set(r),n}clone(){return this._cloneInto()}}const et=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),tn=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),nt=new Uint32Array(64);class en extends Fe{constructor(n=32){super(64,n,8,!1),this.A=et[0]|0,this.B=et[1]|0,this.C=et[2]|0,this.D=et[3]|0,this.E=et[4]|0,this.F=et[5]|0,this.G=et[6]|0,this.H=et[7]|0}get(){const{A:n,B:e,C:r,D:s,E:o,F:c,G:f,H:i}=this;return[n,e,r,s,o,c,f,i]}set(n,e,r,s,o,c,f,i){this.A=n|0,this.B=e|0,this.C=r|0,this.D=s|0,this.E=o|0,this.F=c|0,this.G=f|0,this.H=i|0}process(n,e){for(let l=0;l<16;l++,e+=4)nt[l]=n.getUint32(e,!1);for(let l=16;l<64;l++){const p=nt[l-15],b=nt[l-2],_=$(p,7)^$(p,18)^p>>>3,g=$(b,17)^$(b,19)^b>>>10;nt[l]=g+nt[l-7]+_+nt[l-16]|0}let{A:r,B:s,C:o,D:c,E:f,F:i,G:a,H:d}=this;for(let l=0;l<64;l++){const p=$(f,6)^$(f,11)^$(f,25),b=d+p+Qe(f,i,a)+tn[l]+nt[l]|0,g=($(r,2)^$(r,13)^$(r,22))+Je(r,s,o)|0;d=a,a=i,i=f,f=c+b|0,c=o,o=s,s=r,r=b+g|0}r=r+this.A|0,s=s+this.B|0,o=o+this.C|0,c=c+this.D|0,f=f+this.E|0,i=i+this.F|0,a=a+this.G|0,d=d+this.H|0,this.set(r,s,o,c,f,i,a,d)}roundClean(){Rt(nt)}destroy(){this.set(0,0,0,0,0,0,0,0),Rt(this.buffer)}}const Ht=De(()=>new en);class Be extends pe{constructor(n,e){super(),this.finished=!1,this.destroyed=!1,Ge(n);const r=xe(e);if(this.iHash=n.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(r.length>s?n.create().update(r).digest():r);for(let c=0;c<o.length;c++)o[c]^=54;this.iHash.update(o),this.oHash=n.create();for(let c=0;c<o.length;c++)o[c]^=106;this.oHash.update(o),Rt(o)}update(n){return Nt(this),this.iHash.update(n),this}digestInto(n){Nt(this),Ee(n,this.outputLen),this.finished=!0,this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){const n=new Uint8Array(this.oHash.outputLen);return this.digestInto(n),n}_cloneInto(n){n||(n=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:s,destroyed:o,blockLen:c,outputLen:f}=this;return n=n,n.finished=s,n.destroyed=o,n.blockLen=c,n.outputLen=f,n.oHash=e._cloneInto(n.oHash),n.iHash=r._cloneInto(n.iHash),n}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Se=(t,n,e)=>new Be(t,n).update(e).digest();Se.create=(t,n)=>new Be(t,n);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const re=BigInt(0),Qt=BigInt(1);function _t(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function it(t){if(!_t(t))throw new Error("Uint8Array expected")}function xt(t,n){if(typeof n!="boolean")throw new Error(t+" boolean expected, got "+n)}function qt(t){const n=t.toString(16);return n.length&1?"0"+n:n}function Ae(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?re:BigInt("0x"+t)}const _e=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",nn=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function Et(t){if(it(t),_e)return t.toHex();let n="";for(let e=0;e<t.length;e++)n+=nn[t[e]];return n}const J={_0:48,_9:57,A:65,F:70,a:97,f:102};function ae(t){if(t>=J._0&&t<=J._9)return t-J._0;if(t>=J.A&&t<=J.F)return t-(J.A-10);if(t>=J.a&&t<=J.f)return t-(J.a-10)}function Ut(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(_e)return Uint8Array.fromHex(t);const n=t.length,e=n/2;if(n%2)throw new Error("hex string expected, got unpadded hex of length "+n);const r=new Uint8Array(e);for(let s=0,o=0;s<e;s++,o+=2){const c=ae(t.charCodeAt(o)),f=ae(t.charCodeAt(o+1));if(c===void 0||f===void 0){const i=t[o]+t[o+1];throw new Error('hex string expected, got non-hex character "'+i+'" at index '+o)}r[s]=c*16+f}return r}function X(t){return Ae(Et(t))}function Ie(t){return it(t),Ae(Et(Uint8Array.from(t).reverse()))}function lt(t,n){return Ut(t.toString(16).padStart(n*2,"0"))}function Oe(t,n){return lt(t,n).reverse()}function z(t,n,e){let r;if(typeof n=="string")try{r=Ut(n)}catch(o){throw new Error(t+" must be hex string or Uint8Array, cause: "+o)}else if(_t(n))r=Uint8Array.from(n);else throw new Error(t+" must be hex string or Uint8Array");const s=r.length;if(typeof e=="number"&&s!==e)throw new Error(t+" of length "+e+" expected, got "+s);return r}function D(...t){let n=0;for(let r=0;r<t.length;r++){const s=t[r];it(s),n+=s.length}const e=new Uint8Array(n);for(let r=0,s=0;r<t.length;r++){const o=t[r];e.set(o,s),s+=o.length}return e}function oe(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}const jt=t=>typeof t=="bigint"&&re<=t;function vt(t,n,e){return jt(t)&&jt(n)&&jt(e)&&n<=t&&t<e}function ut(t,n,e,r){if(!vt(n,e,r))throw new Error("expected valid "+t+": "+e+" <= n < "+r+", got "+n)}function rn(t){let n;for(n=0;t>re;t>>=Qt,n+=1);return n}const Ct=t=>(Qt<<BigInt(t))-Qt,Kt=t=>new Uint8Array(t),ue=t=>Uint8Array.from(t);function on(t,n,e){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof n!="number"||n<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let r=Kt(t),s=Kt(t),o=0;const c=()=>{r.fill(1),s.fill(0),o=0},f=(...l)=>e(s,r,...l),i=(l=Kt(0))=>{s=f(ue([0]),l),r=f(),l.length!==0&&(s=f(ue([1]),l),r=f())},a=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let l=0;const p=[];for(;l<n;){r=f();const b=r.slice();p.push(b),l+=r.length}return D(...p)};return(l,p)=>{c(),i(l);let b;for(;!(b=p(a()));)i();return c(),b}}const sn={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||_t(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,n)=>n.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function It(t,n,e={}){const r=(s,o,c)=>{const f=sn[o];if(typeof f!="function")throw new Error("invalid validator function");const i=t[s];if(!(c&&i===void 0)&&!f(i,t))throw new Error("param "+String(s)+" is invalid. Expected "+o+", got "+i)};for(const[s,o]of Object.entries(n))r(s,o,!1);for(const[s,o]of Object.entries(e))r(s,o,!0);return t}function le(t){const n=new WeakMap;return(e,...r)=>{const s=n.get(e);if(s!==void 0)return s;const o=t(e,...r);return n.set(e,o),o}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const K=BigInt(0),M=BigInt(1),at=BigInt(2),cn=BigInt(3),qe=BigInt(4),Ne=BigInt(5),Re=BigInt(8);function Z(t,n){const e=t%n;return e>=K?e:n+e}function Y(t,n,e){let r=t;for(;n-- >K;)r*=r,r%=e;return r}function Jt(t,n){if(t===K)throw new Error("invert: expected non-zero number");if(n<=K)throw new Error("invert: expected positive modulus, got "+n);let e=Z(t,n),r=n,s=K,o=M;for(;e!==K;){const f=r/e,i=r%e,a=s-o*f;r=e,e=i,s=o,o=a}if(r!==M)throw new Error("invert: does not exist");return Z(s,n)}function He(t,n){const e=(t.ORDER+M)/qe,r=t.pow(n,e);if(!t.eql(t.sqr(r),n))throw new Error("Cannot find square root");return r}function fn(t,n){const e=(t.ORDER-Ne)/Re,r=t.mul(n,at),s=t.pow(r,e),o=t.mul(n,s),c=t.mul(t.mul(o,at),s),f=t.mul(o,t.sub(c,t.ONE));if(!t.eql(t.sqr(f),n))throw new Error("Cannot find square root");return f}function an(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let n=t-M,e=0;for(;n%at===K;)n/=at,e++;let r=at;const s=ie(t);for(;de(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(e===1)return He;let o=s.pow(r,n);const c=(n+M)/at;return function(i,a){if(i.is0(a))return a;if(de(i,a)!==1)throw new Error("Cannot find square root");let d=e,l=i.mul(i.ONE,o),p=i.pow(a,n),b=i.pow(a,c);for(;!i.eql(p,i.ONE);){if(i.is0(p))return i.ZERO;let _=1,g=i.sqr(p);for(;!i.eql(g,i.ONE);)if(_++,g=i.sqr(g),_===d)throw new Error("Cannot find square root");const T=M<<BigInt(d-_-1),I=i.pow(l,T);d=_,l=i.sqr(I),p=i.mul(p,l),b=i.mul(b,I)}return b}}function un(t){return t%qe===cn?He:t%Re===Ne?fn:an(t)}const ln=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Ue(t){const n={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=ln.reduce((r,s)=>(r[s]="function",r),n);return It(t,e)}function dn(t,n,e){if(e<K)throw new Error("invalid exponent, negatives unsupported");if(e===K)return t.ONE;if(e===M)return n;let r=t.ONE,s=n;for(;e>K;)e&M&&(r=t.mul(r,s)),s=t.sqr(s),e>>=M;return r}function Zt(t,n,e=!1){const r=new Array(n.length).fill(e?t.ZERO:void 0),s=n.reduce((c,f,i)=>t.is0(f)?c:(r[i]=c,t.mul(c,f)),t.ONE),o=t.inv(s);return n.reduceRight((c,f,i)=>t.is0(f)?c:(r[i]=t.mul(c,r[i]),t.mul(c,f)),o),r}function de(t,n){const e=(t.ORDER-M)/at,r=t.pow(n,e),s=t.eql(r,t.ONE),o=t.eql(r,t.ZERO),c=t.eql(r,t.neg(t.ONE));if(!s&&!o&&!c)throw new Error("invalid Legendre symbol result");return s?1:o?0:-1}function Le(t,n){n!==void 0&&We(n);const e=n!==void 0?n:t.toString(2).length,r=Math.ceil(e/8);return{nBitLength:e,nByteLength:r}}function ie(t,n,e=!1,r={}){if(t<=K)throw new Error("invalid field: expected ORDER > 0, got "+t);const{nBitLength:s,nByteLength:o}=Le(t,n);if(o>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let c;const f=Object.freeze({ORDER:t,isLE:e,BITS:s,BYTES:o,MASK:Ct(s),ZERO:K,ONE:M,create:i=>Z(i,t),isValid:i=>{if(typeof i!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof i);return K<=i&&i<t},is0:i=>i===K,isOdd:i=>(i&M)===M,neg:i=>Z(-i,t),eql:(i,a)=>i===a,sqr:i=>Z(i*i,t),add:(i,a)=>Z(i+a,t),sub:(i,a)=>Z(i-a,t),mul:(i,a)=>Z(i*a,t),pow:(i,a)=>dn(f,i,a),div:(i,a)=>Z(i*Jt(a,t),t),sqrN:i=>i*i,addN:(i,a)=>i+a,subN:(i,a)=>i-a,mulN:(i,a)=>i*a,inv:i=>Jt(i,t),sqrt:r.sqrt||(i=>(c||(c=un(t)),c(f,i))),toBytes:i=>e?Oe(i,o):lt(i,o),fromBytes:i=>{if(i.length!==o)throw new Error("Field.fromBytes: expected "+o+" bytes, got "+i.length);return e?Ie(i):X(i)},invertBatch:i=>Zt(f,i),cmov:(i,a,d)=>d?a:i});return Object.freeze(f)}function Te(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const n=t.toString(2).length;return Math.ceil(n/8)}function ke(t){const n=Te(t);return n+Math.ceil(n/2)}function hn(t,n,e=!1){const r=t.length,s=Te(n),o=ke(n);if(r<16||r<o||r>1024)throw new Error("expected "+o+"-1024 bytes of input, got "+r);const c=e?Ie(t):X(t),f=Z(c,n-M)+M;return e?Oe(f,s):lt(f,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const he=BigInt(0),Ft=BigInt(1);function Yt(t,n){const e=n.negate();return t?e:n}function Ce(t,n){if(!Number.isSafeInteger(t)||t<=0||t>n)throw new Error("invalid window size, expected [1.."+n+"], got W="+t)}function Dt(t,n){Ce(t,n);const e=Math.ceil(n/t)+1,r=2**(t-1),s=2**t,o=Ct(t),c=BigInt(t);return{windows:e,windowSize:r,mask:o,maxNumber:s,shiftBy:c}}function we(t,n,e){const{windowSize:r,mask:s,maxNumber:o,shiftBy:c}=e;let f=Number(t&s),i=t>>c;f>r&&(f-=o,i+=Ft);const a=n*r,d=a+Math.abs(f)-1,l=f===0,p=f<0,b=n%2!==0;return{nextN:i,offset:d,isZero:l,isNeg:p,isNegF:b,offsetF:a}}function wn(t,n){if(!Array.isArray(t))throw new Error("array expected");t.forEach((e,r)=>{if(!(e instanceof n))throw new Error("invalid point at index "+r)})}function gn(t,n){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((e,r)=>{if(!n.isValid(e))throw new Error("invalid scalar at index "+r)})}const Gt=new WeakMap,Ze=new WeakMap;function Wt(t){return Ze.get(t)||1}function mn(t,n){return{constTimeNegate:Yt,hasPrecomputes(e){return Wt(e)!==1},unsafeLadder(e,r,s=t.ZERO){let o=e;for(;r>he;)r&Ft&&(s=s.add(o)),o=o.double(),r>>=Ft;return s},precomputeWindow(e,r){const{windows:s,windowSize:o}=Dt(r,n),c=[];let f=e,i=f;for(let a=0;a<s;a++){i=f,c.push(i);for(let d=1;d<o;d++)i=i.add(f),c.push(i);f=i.double()}return c},wNAF(e,r,s){let o=t.ZERO,c=t.BASE;const f=Dt(e,n);for(let i=0;i<f.windows;i++){const{nextN:a,offset:d,isZero:l,isNeg:p,isNegF:b,offsetF:_}=we(s,i,f);s=a,l?c=c.add(Yt(b,r[_])):o=o.add(Yt(p,r[d]))}return{p:o,f:c}},wNAFUnsafe(e,r,s,o=t.ZERO){const c=Dt(e,n);for(let f=0;f<c.windows&&s!==he;f++){const{nextN:i,offset:a,isZero:d,isNeg:l}=we(s,f,c);if(s=i,!d){const p=r[a];o=o.add(l?p.negate():p)}}return o},getPrecomputes(e,r,s){let o=Gt.get(r);return o||(o=this.precomputeWindow(r,e),e!==1&&Gt.set(r,s(o))),o},wNAFCached(e,r,s){const o=Wt(e);return this.wNAF(o,this.getPrecomputes(o,e,s),r)},wNAFCachedUnsafe(e,r,s,o){const c=Wt(e);return c===1?this.unsafeLadder(e,r,o):this.wNAFUnsafe(c,this.getPrecomputes(c,e,s),r,o)},setWindowSize(e,r){Ce(r,n),Ze.set(e,r),Gt.delete(e)}}}function bn(t,n,e,r){wn(e,t),gn(r,n);const s=e.length,o=r.length;if(s!==o)throw new Error("arrays of points and scalars must have equal length");const c=t.ZERO,f=rn(BigInt(s));let i=1;f>12?i=f-3:f>4?i=f-2:f>0&&(i=2);const a=Ct(i),d=new Array(Number(a)+1).fill(c),l=Math.floor((n.BITS-1)/i)*i;let p=c;for(let b=l;b>=0;b-=i){d.fill(c);for(let g=0;g<o;g++){const T=r[g],I=Number(T>>BigInt(b)&a);d[I]=d[I].add(e[g])}let _=c;for(let g=d.length-1,T=c;g>0;g--)T=T.add(d[g]),_=_.add(T);if(p=p.add(_),b!==0)for(let g=0;g<i;g++)p=p.double()}return p}function ze(t){return Ue(t.Fp),It(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Le(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function ge(t){t.lowS!==void 0&&xt("lowS",t.lowS),t.prehash!==void 0&&xt("prehash",t.prehash)}function yn(t){const n=ze(t);It(n,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:e,Fp:r,a:s}=n;if(e){if(!r.eql(s,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...n})}class pn extends Error{constructor(n=""){super(n)}}const F={Err:pn,_tlv:{encode:(t,n)=>{const{Err:e}=F;if(t<0||t>256)throw new e("tlv.encode: wrong tag");if(n.length&1)throw new e("tlv.encode: unpadded data");const r=n.length/2,s=qt(r);if(s.length/2&128)throw new e("tlv.encode: long form length too big");const o=r>127?qt(s.length/2|128):"";return qt(t)+o+s+n},decode(t,n){const{Err:e}=F;let r=0;if(t<0||t>256)throw new e("tlv.encode: wrong tag");if(n.length<2||n[r++]!==t)throw new e("tlv.decode: wrong tlv");const s=n[r++],o=!!(s&128);let c=0;if(!o)c=s;else{const i=s&127;if(!i)throw new e("tlv.decode(long): indefinite length not supported");if(i>4)throw new e("tlv.decode(long): byte length is too big");const a=n.subarray(r,r+i);if(a.length!==i)throw new e("tlv.decode: length bytes not complete");if(a[0]===0)throw new e("tlv.decode(long): zero leftmost byte");for(const d of a)c=c<<8|d;if(r+=i,c<128)throw new e("tlv.decode(long): not minimal encoding")}const f=n.subarray(r,r+c);if(f.length!==c)throw new e("tlv.decode: wrong value length");return{v:f,l:n.subarray(r+c)}}},_int:{encode(t){const{Err:n}=F;if(t<W)throw new n("integer: negative integers are not allowed");let e=qt(t);if(Number.parseInt(e[0],16)&8&&(e="00"+e),e.length&1)throw new n("unexpected DER parsing assertion: unpadded hex");return e},decode(t){const{Err:n}=F;if(t[0]&128)throw new n("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new n("invalid signature integer: unnecessary leading zero");return X(t)}},toSig(t){const{Err:n,_int:e,_tlv:r}=F,s=z("signature",t),{v:o,l:c}=r.decode(48,s);if(c.length)throw new n("invalid signature: left bytes after parsing");const{v:f,l:i}=r.decode(2,o),{v:a,l:d}=r.decode(2,i);if(d.length)throw new n("invalid signature: left bytes after parsing");return{r:e.decode(f),s:e.decode(a)}},hexFromSig(t){const{_tlv:n,_int:e}=F,r=n.encode(2,e.encode(t.r)),s=n.encode(2,e.encode(t.s)),o=r+s;return n.encode(48,o)}};function $t(t,n){return Et(lt(t,n))}const W=BigInt(0),k=BigInt(1),rt=BigInt(2),pt=BigInt(3),te=BigInt(4);function xn(t){const n=yn(t),{Fp:e}=n,r=ie(n.n,n.nBitLength),s=n.toBytes||((y,u,m)=>{const x=u.toAffine();return D(Uint8Array.from([4]),e.toBytes(x.x),e.toBytes(x.y))}),o=n.fromBytes||(y=>{const u=y.subarray(1),m=e.fromBytes(u.subarray(0,e.BYTES)),x=e.fromBytes(u.subarray(e.BYTES,2*e.BYTES));return{x:m,y:x}});function c(y){const{a:u,b:m}=n,x=e.sqr(y),v=e.mul(x,y);return e.add(e.add(v,e.mul(y,u)),m)}function f(y,u){const m=e.sqr(u),x=c(y);return e.eql(m,x)}if(!f(n.Gx,n.Gy))throw new Error("bad curve params: generator point");const i=e.mul(e.pow(n.a,pt),te),a=e.mul(e.sqr(n.b),BigInt(27));if(e.is0(e.add(i,a)))throw new Error("bad curve params: a or b");function d(y){return vt(y,k,n.n)}function l(y){const{allowedPrivateKeyLengths:u,nByteLength:m,wrapPrivateKey:x,n:v}=n;if(u&&typeof y!="bigint"){if(_t(y)&&(y=Et(y)),typeof y!="string"||!u.includes(y.length))throw new Error("invalid private key");y=y.padStart(m*2,"0")}let O;try{O=typeof y=="bigint"?y:X(z("private key",y,m))}catch{throw new Error("invalid private key, expected hex or "+m+" bytes, got "+typeof y)}return x&&(O=Z(O,v)),ut("private key",O,k,v),O}function p(y){if(!(y instanceof g))throw new Error("ProjectivePoint expected")}const b=le((y,u)=>{const{px:m,py:x,pz:v}=y;if(e.eql(v,e.ONE))return{x:m,y:x};const O=y.is0();u==null&&(u=O?e.ONE:e.inv(v));const U=e.mul(m,u),L=e.mul(x,u),B=e.mul(v,u);if(O)return{x:e.ZERO,y:e.ZERO};if(!e.eql(B,e.ONE))throw new Error("invZ was invalid");return{x:U,y:L}}),_=le(y=>{if(y.is0()){if(n.allowInfinityPoint&&!e.is0(y.py))return;throw new Error("bad point: ZERO")}const{x:u,y:m}=y.toAffine();if(!e.isValid(u)||!e.isValid(m))throw new Error("bad point: x or y not FE");if(!f(u,m))throw new Error("bad point: equation left != right");if(!y.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class g{constructor(u,m,x){if(u==null||!e.isValid(u))throw new Error("x required");if(m==null||!e.isValid(m)||e.is0(m))throw new Error("y required");if(x==null||!e.isValid(x))throw new Error("z required");this.px=u,this.py=m,this.pz=x,Object.freeze(this)}static fromAffine(u){const{x:m,y:x}=u||{};if(!u||!e.isValid(m)||!e.isValid(x))throw new Error("invalid affine point");if(u instanceof g)throw new Error("projective point not allowed");const v=O=>e.eql(O,e.ZERO);return v(m)&&v(x)?g.ZERO:new g(m,x,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(u){const m=Zt(e,u.map(x=>x.pz));return u.map((x,v)=>x.toAffine(m[v])).map(g.fromAffine)}static fromHex(u){const m=g.fromAffine(o(z("pointHex",u)));return m.assertValidity(),m}static fromPrivateKey(u){return g.BASE.multiply(l(u))}static msm(u,m){return bn(g,r,u,m)}_setWindowSize(u){H.setWindowSize(this,u)}assertValidity(){_(this)}hasEvenY(){const{y:u}=this.toAffine();if(e.isOdd)return!e.isOdd(u);throw new Error("Field doesn't support isOdd")}equals(u){p(u);const{px:m,py:x,pz:v}=this,{px:O,py:U,pz:L}=u,B=e.eql(e.mul(m,L),e.mul(O,v)),R=e.eql(e.mul(x,L),e.mul(U,v));return B&&R}negate(){return new g(this.px,e.neg(this.py),this.pz)}double(){const{a:u,b:m}=n,x=e.mul(m,pt),{px:v,py:O,pz:U}=this;let L=e.ZERO,B=e.ZERO,R=e.ZERO,S=e.mul(v,v),V=e.mul(O,O),w=e.mul(U,U),h=e.mul(v,O);return h=e.add(h,h),R=e.mul(v,U),R=e.add(R,R),L=e.mul(u,R),B=e.mul(x,w),B=e.add(L,B),L=e.sub(V,B),B=e.add(V,B),B=e.mul(L,B),L=e.mul(h,L),R=e.mul(x,R),w=e.mul(u,w),h=e.sub(S,w),h=e.mul(u,h),h=e.add(h,R),R=e.add(S,S),S=e.add(R,S),S=e.add(S,w),S=e.mul(S,h),B=e.add(B,S),w=e.mul(O,U),w=e.add(w,w),S=e.mul(w,h),L=e.sub(L,S),R=e.mul(w,V),R=e.add(R,R),R=e.add(R,R),new g(L,B,R)}add(u){p(u);const{px:m,py:x,pz:v}=this,{px:O,py:U,pz:L}=u;let B=e.ZERO,R=e.ZERO,S=e.ZERO;const V=n.a,w=e.mul(n.b,pt);let h=e.mul(m,O),E=e.mul(x,U),N=e.mul(v,L),A=e.add(m,x),q=e.add(O,U);A=e.mul(A,q),q=e.add(h,E),A=e.sub(A,q),q=e.add(m,v);let C=e.add(O,L);return q=e.mul(q,C),C=e.add(h,N),q=e.sub(q,C),C=e.add(x,v),B=e.add(U,L),C=e.mul(C,B),B=e.add(E,N),C=e.sub(C,B),S=e.mul(V,q),B=e.mul(w,N),S=e.add(B,S),B=e.sub(E,S),S=e.add(E,S),R=e.mul(B,S),E=e.add(h,h),E=e.add(E,h),N=e.mul(V,N),q=e.mul(w,q),E=e.add(E,N),N=e.sub(h,N),N=e.mul(V,N),q=e.add(q,N),h=e.mul(E,q),R=e.add(R,h),h=e.mul(C,q),B=e.mul(A,B),B=e.sub(B,h),h=e.mul(A,E),S=e.mul(C,S),S=e.add(S,h),new g(B,R,S)}subtract(u){return this.add(u.negate())}is0(){return this.equals(g.ZERO)}wNAF(u){return H.wNAFCached(this,u,g.normalizeZ)}multiplyUnsafe(u){const{endo:m,n:x}=n;ut("scalar",u,W,x);const v=g.ZERO;if(u===W)return v;if(this.is0()||u===k)return this;if(!m||H.hasPrecomputes(this))return H.wNAFCachedUnsafe(this,u,g.normalizeZ);let{k1neg:O,k1:U,k2neg:L,k2:B}=m.splitScalar(u),R=v,S=v,V=this;for(;U>W||B>W;)U&k&&(R=R.add(V)),B&k&&(S=S.add(V)),V=V.double(),U>>=k,B>>=k;return O&&(R=R.negate()),L&&(S=S.negate()),S=new g(e.mul(S.px,m.beta),S.py,S.pz),R.add(S)}multiply(u){const{endo:m,n:x}=n;ut("scalar",u,k,x);let v,O;if(m){const{k1neg:U,k1:L,k2neg:B,k2:R}=m.splitScalar(u);let{p:S,f:V}=this.wNAF(L),{p:w,f:h}=this.wNAF(R);S=H.constTimeNegate(U,S),w=H.constTimeNegate(B,w),w=new g(e.mul(w.px,m.beta),w.py,w.pz),v=S.add(w),O=V.add(h)}else{const{p:U,f:L}=this.wNAF(u);v=U,O=L}return g.normalizeZ([v,O])[0]}multiplyAndAddUnsafe(u,m,x){const v=g.BASE,O=(L,B)=>B===W||B===k||!L.equals(v)?L.multiplyUnsafe(B):L.multiply(B),U=O(this,m).add(O(u,x));return U.is0()?void 0:U}toAffine(u){return b(this,u)}isTorsionFree(){const{h:u,isTorsionFree:m}=n;if(u===k)return!0;if(m)return m(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:u,clearCofactor:m}=n;return u===k?this:m?m(g,this):this.multiplyUnsafe(n.h)}toRawBytes(u=!0){return xt("isCompressed",u),this.assertValidity(),s(g,this,u)}toHex(u=!0){return xt("isCompressed",u),Et(this.toRawBytes(u))}}g.BASE=new g(n.Gx,n.Gy,e.ONE),g.ZERO=new g(e.ZERO,e.ONE,e.ZERO);const{endo:T,nBitLength:I}=n,H=mn(g,T?Math.ceil(I/2):I);return{CURVE:n,ProjectivePoint:g,normPrivateKeyToScalar:l,weierstrassEquation:c,isWithinCurveOrder:d}}function En(t){const n=ze(t);return It(n,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...n})}function vn(t){const n=En(t),{Fp:e,n:r,nByteLength:s,nBitLength:o}=n,c=e.BYTES+1,f=2*e.BYTES+1;function i(w){return Z(w,r)}function a(w){return Jt(w,r)}const{ProjectivePoint:d,normPrivateKeyToScalar:l,weierstrassEquation:p,isWithinCurveOrder:b}=xn({...n,toBytes(w,h,E){const N=h.toAffine(),A=e.toBytes(N.x),q=D;return xt("isCompressed",E),E?q(Uint8Array.from([h.hasEvenY()?2:3]),A):q(Uint8Array.from([4]),A,e.toBytes(N.y))},fromBytes(w){const h=w.length,E=w[0],N=w.subarray(1);if(h===c&&(E===2||E===3)){const A=X(N);if(!vt(A,k,e.ORDER))throw new Error("Point is not on curve");const q=p(A);let C;try{C=e.sqrt(q)}catch(G){const j=G instanceof Error?": "+G.message:"";throw new Error("Point is not on curve"+j)}const P=(C&k)===k;return(E&1)===1!==P&&(C=e.neg(C)),{x:A,y:C}}else if(h===f&&E===4){const A=e.fromBytes(N.subarray(0,e.BYTES)),q=e.fromBytes(N.subarray(e.BYTES,2*e.BYTES));return{x:A,y:q}}else{const A=c,q=f;throw new Error("invalid Point, expected length of "+A+", or uncompressed "+q+", got "+h)}}});function _(w){const h=r>>k;return w>h}function g(w){return _(w)?i(-w):w}const T=(w,h,E)=>X(w.slice(h,E));class I{constructor(h,E,N){ut("r",h,k,r),ut("s",E,k,r),this.r=h,this.s=E,N!=null&&(this.recovery=N),Object.freeze(this)}static fromCompact(h){const E=s;return h=z("compactSignature",h,E*2),new I(T(h,0,E),T(h,E,2*E))}static fromDER(h){const{r:E,s:N}=F.toSig(z("DER",h));return new I(E,N)}assertValidity(){}addRecoveryBit(h){return new I(this.r,this.s,h)}recoverPublicKey(h){const{r:E,s:N,recovery:A}=this,q=v(z("msgHash",h));if(A==null||![0,1,2,3].includes(A))throw new Error("recovery id invalid");const C=A===2||A===3?E+n.n:E;if(C>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const P=A&1?"03":"02",Q=d.fromHex(P+$t(C,e.BYTES)),G=a(C),j=i(-q*G),dt=i(N*G),tt=d.BASE.multiplyAndAddUnsafe(Q,j,dt);if(!tt)throw new Error("point at infinify");return tt.assertValidity(),tt}hasHighS(){return _(this.s)}normalizeS(){return this.hasHighS()?new I(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return Ut(this.toDERHex())}toDERHex(){return F.hexFromSig(this)}toCompactRawBytes(){return Ut(this.toCompactHex())}toCompactHex(){const h=s;return $t(this.r,h)+$t(this.s,h)}}const H={isValidPrivateKey(w){try{return l(w),!0}catch{return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{const w=ke(n.n);return hn(n.randomBytes(w),n.n)},precompute(w=8,h=d.BASE){return h._setWindowSize(w),h.multiply(BigInt(3)),h}};function y(w,h=!0){return d.fromPrivateKey(w).toRawBytes(h)}function u(w){if(typeof w=="bigint")return!1;if(w instanceof d)return!0;const E=z("key",w).length,N=e.BYTES,A=N+1,q=2*N+1;if(!(n.allowedPrivateKeyLengths||s===A))return E===A||E===q}function m(w,h,E=!0){if(u(w)===!0)throw new Error("first arg must be private key");if(u(h)===!1)throw new Error("second arg must be public key");return d.fromHex(h).multiply(l(w)).toRawBytes(E)}const x=n.bits2int||function(w){if(w.length>8192)throw new Error("input is too large");const h=X(w),E=w.length*8-o;return E>0?h>>BigInt(E):h},v=n.bits2int_modN||function(w){return i(x(w))},O=Ct(o);function U(w){return ut("num < 2^"+o,w,W,O),lt(w,s)}function L(w,h,E=B){if(["recovered","canonical"].some(ct=>ct in E))throw new Error("sign() legacy options not supported");const{hash:N,randomBytes:A}=n;let{lowS:q,prehash:C,extraEntropy:P}=E;q==null&&(q=!0),w=z("msgHash",w),ge(E),C&&(w=z("prehashed msgHash",N(w)));const Q=v(w),G=l(h),j=[U(G),U(Q)];if(P!=null&&P!==!1){const ct=P===!0?A(e.BYTES):P;j.push(z("extraEntropy",ct))}const dt=D(...j),tt=Q;function Vt(ct){const ht=x(ct);if(!b(ht))return;const Pt=a(ht),mt=d.BASE.multiply(ht).toAffine(),ft=i(mt.x);if(ft===W)return;const bt=i(Pt*i(tt+ft*G));if(bt===W)return;let yt=(mt.x===ft?0:2)|Number(mt.y&k),wt=bt;return q&&_(bt)&&(wt=g(bt),yt^=1),new I(ft,wt,yt)}return{seed:dt,k2sig:Vt}}const B={lowS:n.lowS,prehash:!1},R={lowS:n.lowS,prehash:!1};function S(w,h,E=B){const{seed:N,k2sig:A}=L(w,h,E),q=n;return on(q.hash.outputLen,q.nByteLength,q.hmac)(N,A)}d.BASE._setWindowSize(8);function V(w,h,E,N=R){var yt;const A=w;h=z("msgHash",h),E=z("publicKey",E);const{lowS:q,prehash:C,format:P}=N;if(ge(N),"strict"in N)throw new Error("options.strict was renamed to lowS");if(P!==void 0&&P!=="compact"&&P!=="der")throw new Error("format must be compact or der");const Q=typeof A=="string"||_t(A),G=!Q&&!P&&typeof A=="object"&&A!==null&&typeof A.r=="bigint"&&typeof A.s=="bigint";if(!Q&&!G)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let j,dt;try{if(G&&(j=new I(A.r,A.s)),Q){try{P!=="compact"&&(j=I.fromDER(A))}catch(wt){if(!(wt instanceof F.Err))throw wt}!j&&P!=="der"&&(j=I.fromCompact(A))}dt=d.fromHex(E)}catch{return!1}if(!j||q&&j.hasHighS())return!1;C&&(h=n.hash(h));const{r:tt,s:Vt}=j,ct=v(h),ht=a(Vt),Pt=i(ct*ht),mt=i(tt*ht),ft=(yt=d.BASE.multiplyAndAddUnsafe(dt,Pt,mt))==null?void 0:yt.toAffine();return ft?i(ft.x)===tt:!1}return{CURVE:n,getPublicKey:y,getSharedSecret:m,sign:S,verify:V,ProjectivePoint:d,Signature:I,utils:H}}function Bn(t,n){const e=t.ORDER;let r=W;for(let _=e-k;_%rt===W;_/=rt)r+=k;const s=r,o=rt<<s-k-k,c=o*rt,f=(e-k)/c,i=(f-k)/rt,a=c-k,d=o,l=t.pow(n,f),p=t.pow(n,(f+k)/rt);let b=(_,g)=>{let T=l,I=t.pow(g,a),H=t.sqr(I);H=t.mul(H,g);let y=t.mul(_,H);y=t.pow(y,i),y=t.mul(y,I),I=t.mul(y,g),H=t.mul(y,_);let u=t.mul(H,I);y=t.pow(u,d);let m=t.eql(y,t.ONE);I=t.mul(H,p),y=t.mul(u,T),H=t.cmov(I,H,m),u=t.cmov(y,u,m);for(let x=s;x>k;x--){let v=x-rt;v=rt<<v-k;let O=t.pow(u,v);const U=t.eql(O,t.ONE);I=t.mul(H,T),T=t.mul(T,T),O=t.mul(u,T),H=t.cmov(I,H,U),u=t.cmov(O,u,U)}return{isValid:m,value:H}};if(t.ORDER%te===pt){const _=(t.ORDER-pt)/te,g=t.sqrt(t.neg(n));b=(T,I)=>{let H=t.sqr(I);const y=t.mul(T,I);H=t.mul(H,y);let u=t.pow(H,_);u=t.mul(u,y);const m=t.mul(u,g),x=t.mul(t.sqr(u),I),v=t.eql(x,T);let O=t.cmov(m,u,v);return{isValid:v,value:O}}}return b}function Sn(t,n){if(Ue(t),!t.isValid(n.A)||!t.isValid(n.B)||!t.isValid(n.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const e=Bn(t,n.Z);if(!t.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let s,o,c,f,i,a,d,l;s=t.sqr(r),s=t.mul(s,n.Z),o=t.sqr(s),o=t.add(o,s),c=t.add(o,t.ONE),c=t.mul(c,n.B),f=t.cmov(n.Z,t.neg(o),!t.eql(o,t.ZERO)),f=t.mul(f,n.A),o=t.sqr(c),a=t.sqr(f),i=t.mul(a,n.A),o=t.add(o,i),o=t.mul(o,c),a=t.mul(a,f),i=t.mul(a,n.B),o=t.add(o,i),d=t.mul(s,c);const{isValid:p,value:b}=e(o,a);l=t.mul(s,r),l=t.mul(l,b),d=t.cmov(d,c,p),l=t.cmov(l,b,p);const _=t.isOdd(r)===t.isOdd(l);l=t.cmov(t.neg(l),l,_);const g=Zt(t,[f],!0)[0];return d=t.mul(d,g),{x:d,y:l}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function An(t){return{hash:t,hmac:(n,...e)=>Se(t,n,$e(...e)),randomBytes:ve}}function _n(t,n){const e=r=>vn({...t,...An(r)});return{...e(n),create:e}}const In=X;function ot(t,n){if(Bt(t),Bt(n),t<0||t>=1<<8*n)throw new Error("invalid I2OSP input: "+t);const e=Array.from({length:n}).fill(0);for(let r=n-1;r>=0;r--)e[r]=t&255,t>>>=8;return new Uint8Array(e)}function On(t,n){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t[r]^n[r];return e}function Bt(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function qn(t,n,e,r){it(t),it(n),Bt(e),n.length>255&&(n=r(D(oe("H2C-OVERSIZE-DST-"),n)));const{outputLen:s,blockLen:o}=r,c=Math.ceil(e/s);if(e>65535||c>255)throw new Error("expand_message_xmd: invalid lenInBytes");const f=D(n,ot(n.length,1)),i=ot(0,o),a=ot(e,2),d=new Array(c),l=r(D(i,t,a,ot(0,1),f));d[0]=r(D(l,ot(1,1),f));for(let b=1;b<=c;b++){const _=[On(l,d[b-1]),ot(b+1,1),f];d[b]=r(D(..._))}return D(...d).slice(0,e)}function Nn(t,n,e,r,s){if(it(t),it(n),Bt(e),n.length>255){const o=Math.ceil(2*r/8);n=s.create({dkLen:o}).update(oe("H2C-OVERSIZE-DST-")).update(n).digest()}if(e>65535||n.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return s.create({dkLen:e}).update(t).update(ot(e,2)).update(n).update(ot(n.length,1)).digest()}function me(t,n,e){It(e,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:r,k:s,m:o,hash:c,expand:f,DST:i}=e;it(t),Bt(n);const a=typeof i=="string"?oe(i):i,d=r.toString(2).length,l=Math.ceil((d+s)/8),p=n*o*l;let b;if(f==="xmd")b=qn(t,a,p,c);else if(f==="xof")b=Nn(t,a,p,s,c);else if(f==="_internal_pass")b=t;else throw new Error('expand must be "xmd" or "xof"');const _=new Array(n);for(let g=0;g<n;g++){const T=new Array(o);for(let I=0;I<o;I++){const H=l*(I+g*o),y=b.subarray(H,H+l);T[I]=Z(In(y),r)}_[g]=T}return _}function Rn(t,n){const e=n.map(r=>Array.from(r).reverse());return(r,s)=>{const[o,c,f,i]=e.map(l=>l.reduce((p,b)=>t.add(t.mul(p,r),b))),[a,d]=Zt(t,[c,i],!0);return r=t.mul(o,a),s=t.mul(s,t.mul(f,d)),{x:r,y:s}}}function Hn(t,n,e){if(typeof n!="function")throw new Error("mapToCurve() must be defined");function r(o){return t.fromAffine(n(o))}function s(o){const c=o.clearCofactor();return c.equals(t.ZERO)?t.ZERO:(c.assertValidity(),c)}return{defaults:e,hashToCurve(o,c){const f=me(o,2,{...e,DST:e.DST,...c}),i=r(f[0]),a=r(f[1]);return s(i.add(a))},encodeToCurve(o,c){const f=me(o,1,{...e,DST:e.encodeDST,...c});return s(r(f[0]))},mapToCurve(o){if(!Array.isArray(o))throw new Error("expected array of bigints");for(const c of o)if(typeof c!="bigint")throw new Error("expected array of bigints");return s(r(o))}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ot=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Lt=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),se=BigInt(0),St=BigInt(1),Tt=BigInt(2),be=(t,n)=>(t+n/Tt)/n;function Ve(t){const n=Ot,e=BigInt(3),r=BigInt(6),s=BigInt(11),o=BigInt(22),c=BigInt(23),f=BigInt(44),i=BigInt(88),a=t*t*t%n,d=a*a*t%n,l=Y(d,e,n)*d%n,p=Y(l,e,n)*d%n,b=Y(p,Tt,n)*a%n,_=Y(b,s,n)*b%n,g=Y(_,o,n)*_%n,T=Y(g,f,n)*g%n,I=Y(T,i,n)*T%n,H=Y(I,f,n)*g%n,y=Y(H,e,n)*d%n,u=Y(y,c,n)*_%n,m=Y(u,r,n)*a%n,x=Y(m,Tt,n);if(!st.eql(st.sqr(x),t))throw new Error("Cannot find square root");return x}const st=ie(Ot,void 0,void 0,{sqrt:Ve}),zt=_n({a:se,b:BigInt(7),Fp:st,n:Lt,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const n=Lt,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-St*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=e,c=BigInt("0x100000000000000000000000000000000"),f=be(o*t,n),i=be(-r*t,n);let a=Z(t-f*e-i*s,n),d=Z(-f*r-i*o,n);const l=a>c,p=d>c;if(l&&(a=n-a),p&&(d=n-d),a>c||d>c)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:l,k1:a,k2neg:p,k2:d}}}},Ht),ye={};function kt(t,...n){let e=ye[t];if(e===void 0){const r=Ht(Uint8Array.from(t,s=>s.charCodeAt(0)));e=D(r,r),ye[t]=e}return Ht(D(e,...n))}const ce=t=>t.toRawBytes(!0).slice(1),ee=t=>lt(t,32),Xt=t=>Z(t,Ot),At=t=>Z(t,Lt),fe=(()=>zt.ProjectivePoint)(),Un=(t,n,e)=>fe.BASE.multiplyAndAddUnsafe(t,n,e);function ne(t){let n=zt.utils.normPrivateKeyToScalar(t),e=fe.fromPrivateKey(n);return{scalar:e.hasEvenY()?n:At(-n),bytes:ce(e)}}function Pe(t){ut("x",t,St,Ot);const n=Xt(t*t),e=Xt(n*t+BigInt(7));let r=Ve(e);r%Tt!==se&&(r=Xt(-r));const s=new fe(t,r,St);return s.assertValidity(),s}const gt=X;function Me(...t){return At(gt(kt("BIP0340/challenge",...t)))}function Ln(t){return ne(t).bytes}function Tn(t,n,e=ve(32)){const r=z("message",t),{bytes:s,scalar:o}=ne(n),c=z("auxRand",e,32),f=ee(o^gt(kt("BIP0340/aux",c))),i=kt("BIP0340/nonce",f,s,r),a=At(gt(i));if(a===se)throw new Error("sign failed: k is zero");const{bytes:d,scalar:l}=ne(a),p=Me(d,s,r),b=new Uint8Array(64);if(b.set(d,0),b.set(ee(At(l+p*o)),32),!je(b,r,s))throw new Error("sign: Invalid signature produced");return b}function je(t,n,e){const r=z("signature",t,64),s=z("message",n),o=z("publicKey",e,32);try{const c=Pe(gt(o)),f=gt(r.subarray(0,32));if(!vt(f,St,Ot))return!1;const i=gt(r.subarray(32,64));if(!vt(i,St,Lt))return!1;const a=Me(ee(f),ce(c),s),d=Un(c,i,At(-a));return!(!d||!d.hasEvenY()||d.toAffine().x!==f)}catch{return!1}}const sr=(()=>({getPublicKey:Ln,sign:Tn,verify:je,utils:{randomPrivateKey:zt.utils.randomPrivateKey,lift_x:Pe,pointToBytes:ce,numberToBytesBE:lt,bytesToNumberBE:X,taggedHash:kt,mod:Z}}))(),kn=(()=>Rn(st,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(t=>t.map(n=>BigInt(n)))))(),Cn=(()=>Sn(st,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:st.create(BigInt("-11"))}))(),Ke=(()=>Hn(zt.ProjectivePoint,t=>{const{x:n,y:e}=Cn(st.create(t[0]));return kn(n,e)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:st.ORDER,m:1,k:128,expand:"xmd",hash:Ht}))(),cr=(()=>Ke.hashToCurve)(),fr=(()=>Ke.encodeToCurve)();export{fr as encodeToCurve,cr as hashToCurve,sr as schnorr,zt as secp256k1,Ke as secp256k1_hasher};
|
|
1
|
+
import{H as pe,v as Mt,w as Nt,x as xe,y as Ee,z as Ye,A as Rt,C as De,E as $,G as Ge,I as We,J as $e,L as ve}from"./wallets-608f085e.js";import"./signing-3a53acbe.js";import"./prepare-contract-call-8aa69ada.js";import"./utils-b0786619.js";import"./index-1a84fe52.js";import"./to-serializable-transaction-b9665f26.js";import"./transaction-c89d76c9.js";import"./get-bytecode-3e525016.js";import"./execute-ddc9aba5.js";import"./redirect-state-defbbf42.js";import"./index-2151fb57.js";import"./ethereum-dfcdc726.js";import"./types-ba990c1e.js";import"./store-af6293b2.js";import"./hashTypedData-6c569030.js";import"./send-transaction-be048c3f.js";import"./eth_sendRawTransaction-5ae15b91.js";import"./index-5ad2a852.js";import"./index-accd8060.js";import"./index-83245c25.js";import"./index-6ab757a5.js";import"./index-08f74686.js";function Xe(t,n,e,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(n,e,r);const s=BigInt(32),o=BigInt(4294967295),c=Number(e>>s&o),f=Number(e&o),i=r?4:0,a=r?0:4;t.setUint32(n+i,c,r),t.setUint32(n+a,f,r)}function Qe(t,n,e){return t&n^~t&e}function Je(t,n,e){return t&n^t&e^n&e}class Fe extends pe{constructor(n,e,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=n,this.outputLen=e,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(n),this.view=Mt(this.buffer)}update(n){Nt(this),n=xe(n),Ee(n);const{view:e,buffer:r,blockLen:s}=this,o=n.length;for(let c=0;c<o;){const f=Math.min(s-this.pos,o-c);if(f===s){const i=Mt(n);for(;s<=o-c;c+=s)this.process(i,c);continue}r.set(n.subarray(c,c+f),this.pos),this.pos+=f,c+=f,this.pos===s&&(this.process(e,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){Nt(this),Ye(n,this),this.finished=!0;const{buffer:e,view:r,blockLen:s,isLE:o}=this;let{pos:c}=this;e[c++]=128,Rt(this.buffer.subarray(c)),this.padOffset>s-c&&(this.process(r,0),c=0);for(let l=c;l<s;l++)e[l]=0;Xe(r,s-8,BigInt(this.length*8),o),this.process(r,0);const f=Mt(n),i=this.outputLen;if(i%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const a=i/4,d=this.get();if(a>d.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<a;l++)f.setUint32(4*l,d[l],o)}digest(){const{buffer:n,outputLen:e}=this;this.digestInto(n);const r=n.slice(0,e);return this.destroy(),r}_cloneInto(n){n||(n=new this.constructor),n.set(...this.get());const{blockLen:e,buffer:r,length:s,finished:o,destroyed:c,pos:f}=this;return n.destroyed=c,n.finished=o,n.length=s,n.pos=f,s%e&&n.buffer.set(r),n}clone(){return this._cloneInto()}}const et=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),tn=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),nt=new Uint32Array(64);class en extends Fe{constructor(n=32){super(64,n,8,!1),this.A=et[0]|0,this.B=et[1]|0,this.C=et[2]|0,this.D=et[3]|0,this.E=et[4]|0,this.F=et[5]|0,this.G=et[6]|0,this.H=et[7]|0}get(){const{A:n,B:e,C:r,D:s,E:o,F:c,G:f,H:i}=this;return[n,e,r,s,o,c,f,i]}set(n,e,r,s,o,c,f,i){this.A=n|0,this.B=e|0,this.C=r|0,this.D=s|0,this.E=o|0,this.F=c|0,this.G=f|0,this.H=i|0}process(n,e){for(let l=0;l<16;l++,e+=4)nt[l]=n.getUint32(e,!1);for(let l=16;l<64;l++){const p=nt[l-15],b=nt[l-2],_=$(p,7)^$(p,18)^p>>>3,g=$(b,17)^$(b,19)^b>>>10;nt[l]=g+nt[l-7]+_+nt[l-16]|0}let{A:r,B:s,C:o,D:c,E:f,F:i,G:a,H:d}=this;for(let l=0;l<64;l++){const p=$(f,6)^$(f,11)^$(f,25),b=d+p+Qe(f,i,a)+tn[l]+nt[l]|0,g=($(r,2)^$(r,13)^$(r,22))+Je(r,s,o)|0;d=a,a=i,i=f,f=c+b|0,c=o,o=s,s=r,r=b+g|0}r=r+this.A|0,s=s+this.B|0,o=o+this.C|0,c=c+this.D|0,f=f+this.E|0,i=i+this.F|0,a=a+this.G|0,d=d+this.H|0,this.set(r,s,o,c,f,i,a,d)}roundClean(){Rt(nt)}destroy(){this.set(0,0,0,0,0,0,0,0),Rt(this.buffer)}}const Ht=De(()=>new en);class Be extends pe{constructor(n,e){super(),this.finished=!1,this.destroyed=!1,Ge(n);const r=xe(e);if(this.iHash=n.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(r.length>s?n.create().update(r).digest():r);for(let c=0;c<o.length;c++)o[c]^=54;this.iHash.update(o),this.oHash=n.create();for(let c=0;c<o.length;c++)o[c]^=106;this.oHash.update(o),Rt(o)}update(n){return Nt(this),this.iHash.update(n),this}digestInto(n){Nt(this),Ee(n,this.outputLen),this.finished=!0,this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){const n=new Uint8Array(this.oHash.outputLen);return this.digestInto(n),n}_cloneInto(n){n||(n=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:s,destroyed:o,blockLen:c,outputLen:f}=this;return n=n,n.finished=s,n.destroyed=o,n.blockLen=c,n.outputLen=f,n.oHash=e._cloneInto(n.oHash),n.iHash=r._cloneInto(n.iHash),n}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Se=(t,n,e)=>new Be(t,n).update(e).digest();Se.create=(t,n)=>new Be(t,n);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const re=BigInt(0),Qt=BigInt(1);function _t(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function it(t){if(!_t(t))throw new Error("Uint8Array expected")}function xt(t,n){if(typeof n!="boolean")throw new Error(t+" boolean expected, got "+n)}function qt(t){const n=t.toString(16);return n.length&1?"0"+n:n}function Ae(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?re:BigInt("0x"+t)}const _e=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",nn=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function Et(t){if(it(t),_e)return t.toHex();let n="";for(let e=0;e<t.length;e++)n+=nn[t[e]];return n}const J={_0:48,_9:57,A:65,F:70,a:97,f:102};function ae(t){if(t>=J._0&&t<=J._9)return t-J._0;if(t>=J.A&&t<=J.F)return t-(J.A-10);if(t>=J.a&&t<=J.f)return t-(J.a-10)}function Ut(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(_e)return Uint8Array.fromHex(t);const n=t.length,e=n/2;if(n%2)throw new Error("hex string expected, got unpadded hex of length "+n);const r=new Uint8Array(e);for(let s=0,o=0;s<e;s++,o+=2){const c=ae(t.charCodeAt(o)),f=ae(t.charCodeAt(o+1));if(c===void 0||f===void 0){const i=t[o]+t[o+1];throw new Error('hex string expected, got non-hex character "'+i+'" at index '+o)}r[s]=c*16+f}return r}function X(t){return Ae(Et(t))}function Ie(t){return it(t),Ae(Et(Uint8Array.from(t).reverse()))}function lt(t,n){return Ut(t.toString(16).padStart(n*2,"0"))}function Oe(t,n){return lt(t,n).reverse()}function z(t,n,e){let r;if(typeof n=="string")try{r=Ut(n)}catch(o){throw new Error(t+" must be hex string or Uint8Array, cause: "+o)}else if(_t(n))r=Uint8Array.from(n);else throw new Error(t+" must be hex string or Uint8Array");const s=r.length;if(typeof e=="number"&&s!==e)throw new Error(t+" of length "+e+" expected, got "+s);return r}function D(...t){let n=0;for(let r=0;r<t.length;r++){const s=t[r];it(s),n+=s.length}const e=new Uint8Array(n);for(let r=0,s=0;r<t.length;r++){const o=t[r];e.set(o,s),s+=o.length}return e}function oe(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}const jt=t=>typeof t=="bigint"&&re<=t;function vt(t,n,e){return jt(t)&&jt(n)&&jt(e)&&n<=t&&t<e}function ut(t,n,e,r){if(!vt(n,e,r))throw new Error("expected valid "+t+": "+e+" <= n < "+r+", got "+n)}function rn(t){let n;for(n=0;t>re;t>>=Qt,n+=1);return n}const Ct=t=>(Qt<<BigInt(t))-Qt,Kt=t=>new Uint8Array(t),ue=t=>Uint8Array.from(t);function on(t,n,e){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof n!="number"||n<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let r=Kt(t),s=Kt(t),o=0;const c=()=>{r.fill(1),s.fill(0),o=0},f=(...l)=>e(s,r,...l),i=(l=Kt(0))=>{s=f(ue([0]),l),r=f(),l.length!==0&&(s=f(ue([1]),l),r=f())},a=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let l=0;const p=[];for(;l<n;){r=f();const b=r.slice();p.push(b),l+=r.length}return D(...p)};return(l,p)=>{c(),i(l);let b;for(;!(b=p(a()));)i();return c(),b}}const sn={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||_t(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,n)=>n.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function It(t,n,e={}){const r=(s,o,c)=>{const f=sn[o];if(typeof f!="function")throw new Error("invalid validator function");const i=t[s];if(!(c&&i===void 0)&&!f(i,t))throw new Error("param "+String(s)+" is invalid. Expected "+o+", got "+i)};for(const[s,o]of Object.entries(n))r(s,o,!1);for(const[s,o]of Object.entries(e))r(s,o,!0);return t}function le(t){const n=new WeakMap;return(e,...r)=>{const s=n.get(e);if(s!==void 0)return s;const o=t(e,...r);return n.set(e,o),o}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const K=BigInt(0),M=BigInt(1),at=BigInt(2),cn=BigInt(3),qe=BigInt(4),Ne=BigInt(5),Re=BigInt(8);function Z(t,n){const e=t%n;return e>=K?e:n+e}function Y(t,n,e){let r=t;for(;n-- >K;)r*=r,r%=e;return r}function Jt(t,n){if(t===K)throw new Error("invert: expected non-zero number");if(n<=K)throw new Error("invert: expected positive modulus, got "+n);let e=Z(t,n),r=n,s=K,o=M;for(;e!==K;){const f=r/e,i=r%e,a=s-o*f;r=e,e=i,s=o,o=a}if(r!==M)throw new Error("invert: does not exist");return Z(s,n)}function He(t,n){const e=(t.ORDER+M)/qe,r=t.pow(n,e);if(!t.eql(t.sqr(r),n))throw new Error("Cannot find square root");return r}function fn(t,n){const e=(t.ORDER-Ne)/Re,r=t.mul(n,at),s=t.pow(r,e),o=t.mul(n,s),c=t.mul(t.mul(o,at),s),f=t.mul(o,t.sub(c,t.ONE));if(!t.eql(t.sqr(f),n))throw new Error("Cannot find square root");return f}function an(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let n=t-M,e=0;for(;n%at===K;)n/=at,e++;let r=at;const s=ie(t);for(;de(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(e===1)return He;let o=s.pow(r,n);const c=(n+M)/at;return function(i,a){if(i.is0(a))return a;if(de(i,a)!==1)throw new Error("Cannot find square root");let d=e,l=i.mul(i.ONE,o),p=i.pow(a,n),b=i.pow(a,c);for(;!i.eql(p,i.ONE);){if(i.is0(p))return i.ZERO;let _=1,g=i.sqr(p);for(;!i.eql(g,i.ONE);)if(_++,g=i.sqr(g),_===d)throw new Error("Cannot find square root");const T=M<<BigInt(d-_-1),I=i.pow(l,T);d=_,l=i.sqr(I),p=i.mul(p,l),b=i.mul(b,I)}return b}}function un(t){return t%qe===cn?He:t%Re===Ne?fn:an(t)}const ln=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Ue(t){const n={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=ln.reduce((r,s)=>(r[s]="function",r),n);return It(t,e)}function dn(t,n,e){if(e<K)throw new Error("invalid exponent, negatives unsupported");if(e===K)return t.ONE;if(e===M)return n;let r=t.ONE,s=n;for(;e>K;)e&M&&(r=t.mul(r,s)),s=t.sqr(s),e>>=M;return r}function Zt(t,n,e=!1){const r=new Array(n.length).fill(e?t.ZERO:void 0),s=n.reduce((c,f,i)=>t.is0(f)?c:(r[i]=c,t.mul(c,f)),t.ONE),o=t.inv(s);return n.reduceRight((c,f,i)=>t.is0(f)?c:(r[i]=t.mul(c,r[i]),t.mul(c,f)),o),r}function de(t,n){const e=(t.ORDER-M)/at,r=t.pow(n,e),s=t.eql(r,t.ONE),o=t.eql(r,t.ZERO),c=t.eql(r,t.neg(t.ONE));if(!s&&!o&&!c)throw new Error("invalid Legendre symbol result");return s?1:o?0:-1}function Le(t,n){n!==void 0&&We(n);const e=n!==void 0?n:t.toString(2).length,r=Math.ceil(e/8);return{nBitLength:e,nByteLength:r}}function ie(t,n,e=!1,r={}){if(t<=K)throw new Error("invalid field: expected ORDER > 0, got "+t);const{nBitLength:s,nByteLength:o}=Le(t,n);if(o>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let c;const f=Object.freeze({ORDER:t,isLE:e,BITS:s,BYTES:o,MASK:Ct(s),ZERO:K,ONE:M,create:i=>Z(i,t),isValid:i=>{if(typeof i!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof i);return K<=i&&i<t},is0:i=>i===K,isOdd:i=>(i&M)===M,neg:i=>Z(-i,t),eql:(i,a)=>i===a,sqr:i=>Z(i*i,t),add:(i,a)=>Z(i+a,t),sub:(i,a)=>Z(i-a,t),mul:(i,a)=>Z(i*a,t),pow:(i,a)=>dn(f,i,a),div:(i,a)=>Z(i*Jt(a,t),t),sqrN:i=>i*i,addN:(i,a)=>i+a,subN:(i,a)=>i-a,mulN:(i,a)=>i*a,inv:i=>Jt(i,t),sqrt:r.sqrt||(i=>(c||(c=un(t)),c(f,i))),toBytes:i=>e?Oe(i,o):lt(i,o),fromBytes:i=>{if(i.length!==o)throw new Error("Field.fromBytes: expected "+o+" bytes, got "+i.length);return e?Ie(i):X(i)},invertBatch:i=>Zt(f,i),cmov:(i,a,d)=>d?a:i});return Object.freeze(f)}function Te(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const n=t.toString(2).length;return Math.ceil(n/8)}function ke(t){const n=Te(t);return n+Math.ceil(n/2)}function hn(t,n,e=!1){const r=t.length,s=Te(n),o=ke(n);if(r<16||r<o||r>1024)throw new Error("expected "+o+"-1024 bytes of input, got "+r);const c=e?Ie(t):X(t),f=Z(c,n-M)+M;return e?Oe(f,s):lt(f,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const he=BigInt(0),Ft=BigInt(1);function Yt(t,n){const e=n.negate();return t?e:n}function Ce(t,n){if(!Number.isSafeInteger(t)||t<=0||t>n)throw new Error("invalid window size, expected [1.."+n+"], got W="+t)}function Dt(t,n){Ce(t,n);const e=Math.ceil(n/t)+1,r=2**(t-1),s=2**t,o=Ct(t),c=BigInt(t);return{windows:e,windowSize:r,mask:o,maxNumber:s,shiftBy:c}}function we(t,n,e){const{windowSize:r,mask:s,maxNumber:o,shiftBy:c}=e;let f=Number(t&s),i=t>>c;f>r&&(f-=o,i+=Ft);const a=n*r,d=a+Math.abs(f)-1,l=f===0,p=f<0,b=n%2!==0;return{nextN:i,offset:d,isZero:l,isNeg:p,isNegF:b,offsetF:a}}function wn(t,n){if(!Array.isArray(t))throw new Error("array expected");t.forEach((e,r)=>{if(!(e instanceof n))throw new Error("invalid point at index "+r)})}function gn(t,n){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((e,r)=>{if(!n.isValid(e))throw new Error("invalid scalar at index "+r)})}const Gt=new WeakMap,Ze=new WeakMap;function Wt(t){return Ze.get(t)||1}function mn(t,n){return{constTimeNegate:Yt,hasPrecomputes(e){return Wt(e)!==1},unsafeLadder(e,r,s=t.ZERO){let o=e;for(;r>he;)r&Ft&&(s=s.add(o)),o=o.double(),r>>=Ft;return s},precomputeWindow(e,r){const{windows:s,windowSize:o}=Dt(r,n),c=[];let f=e,i=f;for(let a=0;a<s;a++){i=f,c.push(i);for(let d=1;d<o;d++)i=i.add(f),c.push(i);f=i.double()}return c},wNAF(e,r,s){let o=t.ZERO,c=t.BASE;const f=Dt(e,n);for(let i=0;i<f.windows;i++){const{nextN:a,offset:d,isZero:l,isNeg:p,isNegF:b,offsetF:_}=we(s,i,f);s=a,l?c=c.add(Yt(b,r[_])):o=o.add(Yt(p,r[d]))}return{p:o,f:c}},wNAFUnsafe(e,r,s,o=t.ZERO){const c=Dt(e,n);for(let f=0;f<c.windows&&s!==he;f++){const{nextN:i,offset:a,isZero:d,isNeg:l}=we(s,f,c);if(s=i,!d){const p=r[a];o=o.add(l?p.negate():p)}}return o},getPrecomputes(e,r,s){let o=Gt.get(r);return o||(o=this.precomputeWindow(r,e),e!==1&&Gt.set(r,s(o))),o},wNAFCached(e,r,s){const o=Wt(e);return this.wNAF(o,this.getPrecomputes(o,e,s),r)},wNAFCachedUnsafe(e,r,s,o){const c=Wt(e);return c===1?this.unsafeLadder(e,r,o):this.wNAFUnsafe(c,this.getPrecomputes(c,e,s),r,o)},setWindowSize(e,r){Ce(r,n),Ze.set(e,r),Gt.delete(e)}}}function bn(t,n,e,r){wn(e,t),gn(r,n);const s=e.length,o=r.length;if(s!==o)throw new Error("arrays of points and scalars must have equal length");const c=t.ZERO,f=rn(BigInt(s));let i=1;f>12?i=f-3:f>4?i=f-2:f>0&&(i=2);const a=Ct(i),d=new Array(Number(a)+1).fill(c),l=Math.floor((n.BITS-1)/i)*i;let p=c;for(let b=l;b>=0;b-=i){d.fill(c);for(let g=0;g<o;g++){const T=r[g],I=Number(T>>BigInt(b)&a);d[I]=d[I].add(e[g])}let _=c;for(let g=d.length-1,T=c;g>0;g--)T=T.add(d[g]),_=_.add(T);if(p=p.add(_),b!==0)for(let g=0;g<i;g++)p=p.double()}return p}function ze(t){return Ue(t.Fp),It(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Le(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function ge(t){t.lowS!==void 0&&xt("lowS",t.lowS),t.prehash!==void 0&&xt("prehash",t.prehash)}function yn(t){const n=ze(t);It(n,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:e,Fp:r,a:s}=n;if(e){if(!r.eql(s,r.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...n})}class pn extends Error{constructor(n=""){super(n)}}const F={Err:pn,_tlv:{encode:(t,n)=>{const{Err:e}=F;if(t<0||t>256)throw new e("tlv.encode: wrong tag");if(n.length&1)throw new e("tlv.encode: unpadded data");const r=n.length/2,s=qt(r);if(s.length/2&128)throw new e("tlv.encode: long form length too big");const o=r>127?qt(s.length/2|128):"";return qt(t)+o+s+n},decode(t,n){const{Err:e}=F;let r=0;if(t<0||t>256)throw new e("tlv.encode: wrong tag");if(n.length<2||n[r++]!==t)throw new e("tlv.decode: wrong tlv");const s=n[r++],o=!!(s&128);let c=0;if(!o)c=s;else{const i=s&127;if(!i)throw new e("tlv.decode(long): indefinite length not supported");if(i>4)throw new e("tlv.decode(long): byte length is too big");const a=n.subarray(r,r+i);if(a.length!==i)throw new e("tlv.decode: length bytes not complete");if(a[0]===0)throw new e("tlv.decode(long): zero leftmost byte");for(const d of a)c=c<<8|d;if(r+=i,c<128)throw new e("tlv.decode(long): not minimal encoding")}const f=n.subarray(r,r+c);if(f.length!==c)throw new e("tlv.decode: wrong value length");return{v:f,l:n.subarray(r+c)}}},_int:{encode(t){const{Err:n}=F;if(t<W)throw new n("integer: negative integers are not allowed");let e=qt(t);if(Number.parseInt(e[0],16)&8&&(e="00"+e),e.length&1)throw new n("unexpected DER parsing assertion: unpadded hex");return e},decode(t){const{Err:n}=F;if(t[0]&128)throw new n("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new n("invalid signature integer: unnecessary leading zero");return X(t)}},toSig(t){const{Err:n,_int:e,_tlv:r}=F,s=z("signature",t),{v:o,l:c}=r.decode(48,s);if(c.length)throw new n("invalid signature: left bytes after parsing");const{v:f,l:i}=r.decode(2,o),{v:a,l:d}=r.decode(2,i);if(d.length)throw new n("invalid signature: left bytes after parsing");return{r:e.decode(f),s:e.decode(a)}},hexFromSig(t){const{_tlv:n,_int:e}=F,r=n.encode(2,e.encode(t.r)),s=n.encode(2,e.encode(t.s)),o=r+s;return n.encode(48,o)}};function $t(t,n){return Et(lt(t,n))}const W=BigInt(0),k=BigInt(1),rt=BigInt(2),pt=BigInt(3),te=BigInt(4);function xn(t){const n=yn(t),{Fp:e}=n,r=ie(n.n,n.nBitLength),s=n.toBytes||((y,u,m)=>{const x=u.toAffine();return D(Uint8Array.from([4]),e.toBytes(x.x),e.toBytes(x.y))}),o=n.fromBytes||(y=>{const u=y.subarray(1),m=e.fromBytes(u.subarray(0,e.BYTES)),x=e.fromBytes(u.subarray(e.BYTES,2*e.BYTES));return{x:m,y:x}});function c(y){const{a:u,b:m}=n,x=e.sqr(y),v=e.mul(x,y);return e.add(e.add(v,e.mul(y,u)),m)}function f(y,u){const m=e.sqr(u),x=c(y);return e.eql(m,x)}if(!f(n.Gx,n.Gy))throw new Error("bad curve params: generator point");const i=e.mul(e.pow(n.a,pt),te),a=e.mul(e.sqr(n.b),BigInt(27));if(e.is0(e.add(i,a)))throw new Error("bad curve params: a or b");function d(y){return vt(y,k,n.n)}function l(y){const{allowedPrivateKeyLengths:u,nByteLength:m,wrapPrivateKey:x,n:v}=n;if(u&&typeof y!="bigint"){if(_t(y)&&(y=Et(y)),typeof y!="string"||!u.includes(y.length))throw new Error("invalid private key");y=y.padStart(m*2,"0")}let O;try{O=typeof y=="bigint"?y:X(z("private key",y,m))}catch{throw new Error("invalid private key, expected hex or "+m+" bytes, got "+typeof y)}return x&&(O=Z(O,v)),ut("private key",O,k,v),O}function p(y){if(!(y instanceof g))throw new Error("ProjectivePoint expected")}const b=le((y,u)=>{const{px:m,py:x,pz:v}=y;if(e.eql(v,e.ONE))return{x:m,y:x};const O=y.is0();u==null&&(u=O?e.ONE:e.inv(v));const U=e.mul(m,u),L=e.mul(x,u),B=e.mul(v,u);if(O)return{x:e.ZERO,y:e.ZERO};if(!e.eql(B,e.ONE))throw new Error("invZ was invalid");return{x:U,y:L}}),_=le(y=>{if(y.is0()){if(n.allowInfinityPoint&&!e.is0(y.py))return;throw new Error("bad point: ZERO")}const{x:u,y:m}=y.toAffine();if(!e.isValid(u)||!e.isValid(m))throw new Error("bad point: x or y not FE");if(!f(u,m))throw new Error("bad point: equation left != right");if(!y.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class g{constructor(u,m,x){if(u==null||!e.isValid(u))throw new Error("x required");if(m==null||!e.isValid(m)||e.is0(m))throw new Error("y required");if(x==null||!e.isValid(x))throw new Error("z required");this.px=u,this.py=m,this.pz=x,Object.freeze(this)}static fromAffine(u){const{x:m,y:x}=u||{};if(!u||!e.isValid(m)||!e.isValid(x))throw new Error("invalid affine point");if(u instanceof g)throw new Error("projective point not allowed");const v=O=>e.eql(O,e.ZERO);return v(m)&&v(x)?g.ZERO:new g(m,x,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(u){const m=Zt(e,u.map(x=>x.pz));return u.map((x,v)=>x.toAffine(m[v])).map(g.fromAffine)}static fromHex(u){const m=g.fromAffine(o(z("pointHex",u)));return m.assertValidity(),m}static fromPrivateKey(u){return g.BASE.multiply(l(u))}static msm(u,m){return bn(g,r,u,m)}_setWindowSize(u){H.setWindowSize(this,u)}assertValidity(){_(this)}hasEvenY(){const{y:u}=this.toAffine();if(e.isOdd)return!e.isOdd(u);throw new Error("Field doesn't support isOdd")}equals(u){p(u);const{px:m,py:x,pz:v}=this,{px:O,py:U,pz:L}=u,B=e.eql(e.mul(m,L),e.mul(O,v)),R=e.eql(e.mul(x,L),e.mul(U,v));return B&&R}negate(){return new g(this.px,e.neg(this.py),this.pz)}double(){const{a:u,b:m}=n,x=e.mul(m,pt),{px:v,py:O,pz:U}=this;let L=e.ZERO,B=e.ZERO,R=e.ZERO,S=e.mul(v,v),V=e.mul(O,O),w=e.mul(U,U),h=e.mul(v,O);return h=e.add(h,h),R=e.mul(v,U),R=e.add(R,R),L=e.mul(u,R),B=e.mul(x,w),B=e.add(L,B),L=e.sub(V,B),B=e.add(V,B),B=e.mul(L,B),L=e.mul(h,L),R=e.mul(x,R),w=e.mul(u,w),h=e.sub(S,w),h=e.mul(u,h),h=e.add(h,R),R=e.add(S,S),S=e.add(R,S),S=e.add(S,w),S=e.mul(S,h),B=e.add(B,S),w=e.mul(O,U),w=e.add(w,w),S=e.mul(w,h),L=e.sub(L,S),R=e.mul(w,V),R=e.add(R,R),R=e.add(R,R),new g(L,B,R)}add(u){p(u);const{px:m,py:x,pz:v}=this,{px:O,py:U,pz:L}=u;let B=e.ZERO,R=e.ZERO,S=e.ZERO;const V=n.a,w=e.mul(n.b,pt);let h=e.mul(m,O),E=e.mul(x,U),N=e.mul(v,L),A=e.add(m,x),q=e.add(O,U);A=e.mul(A,q),q=e.add(h,E),A=e.sub(A,q),q=e.add(m,v);let C=e.add(O,L);return q=e.mul(q,C),C=e.add(h,N),q=e.sub(q,C),C=e.add(x,v),B=e.add(U,L),C=e.mul(C,B),B=e.add(E,N),C=e.sub(C,B),S=e.mul(V,q),B=e.mul(w,N),S=e.add(B,S),B=e.sub(E,S),S=e.add(E,S),R=e.mul(B,S),E=e.add(h,h),E=e.add(E,h),N=e.mul(V,N),q=e.mul(w,q),E=e.add(E,N),N=e.sub(h,N),N=e.mul(V,N),q=e.add(q,N),h=e.mul(E,q),R=e.add(R,h),h=e.mul(C,q),B=e.mul(A,B),B=e.sub(B,h),h=e.mul(A,E),S=e.mul(C,S),S=e.add(S,h),new g(B,R,S)}subtract(u){return this.add(u.negate())}is0(){return this.equals(g.ZERO)}wNAF(u){return H.wNAFCached(this,u,g.normalizeZ)}multiplyUnsafe(u){const{endo:m,n:x}=n;ut("scalar",u,W,x);const v=g.ZERO;if(u===W)return v;if(this.is0()||u===k)return this;if(!m||H.hasPrecomputes(this))return H.wNAFCachedUnsafe(this,u,g.normalizeZ);let{k1neg:O,k1:U,k2neg:L,k2:B}=m.splitScalar(u),R=v,S=v,V=this;for(;U>W||B>W;)U&k&&(R=R.add(V)),B&k&&(S=S.add(V)),V=V.double(),U>>=k,B>>=k;return O&&(R=R.negate()),L&&(S=S.negate()),S=new g(e.mul(S.px,m.beta),S.py,S.pz),R.add(S)}multiply(u){const{endo:m,n:x}=n;ut("scalar",u,k,x);let v,O;if(m){const{k1neg:U,k1:L,k2neg:B,k2:R}=m.splitScalar(u);let{p:S,f:V}=this.wNAF(L),{p:w,f:h}=this.wNAF(R);S=H.constTimeNegate(U,S),w=H.constTimeNegate(B,w),w=new g(e.mul(w.px,m.beta),w.py,w.pz),v=S.add(w),O=V.add(h)}else{const{p:U,f:L}=this.wNAF(u);v=U,O=L}return g.normalizeZ([v,O])[0]}multiplyAndAddUnsafe(u,m,x){const v=g.BASE,O=(L,B)=>B===W||B===k||!L.equals(v)?L.multiplyUnsafe(B):L.multiply(B),U=O(this,m).add(O(u,x));return U.is0()?void 0:U}toAffine(u){return b(this,u)}isTorsionFree(){const{h:u,isTorsionFree:m}=n;if(u===k)return!0;if(m)return m(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:u,clearCofactor:m}=n;return u===k?this:m?m(g,this):this.multiplyUnsafe(n.h)}toRawBytes(u=!0){return xt("isCompressed",u),this.assertValidity(),s(g,this,u)}toHex(u=!0){return xt("isCompressed",u),Et(this.toRawBytes(u))}}g.BASE=new g(n.Gx,n.Gy,e.ONE),g.ZERO=new g(e.ZERO,e.ONE,e.ZERO);const{endo:T,nBitLength:I}=n,H=mn(g,T?Math.ceil(I/2):I);return{CURVE:n,ProjectivePoint:g,normPrivateKeyToScalar:l,weierstrassEquation:c,isWithinCurveOrder:d}}function En(t){const n=ze(t);return It(n,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...n})}function vn(t){const n=En(t),{Fp:e,n:r,nByteLength:s,nBitLength:o}=n,c=e.BYTES+1,f=2*e.BYTES+1;function i(w){return Z(w,r)}function a(w){return Jt(w,r)}const{ProjectivePoint:d,normPrivateKeyToScalar:l,weierstrassEquation:p,isWithinCurveOrder:b}=xn({...n,toBytes(w,h,E){const N=h.toAffine(),A=e.toBytes(N.x),q=D;return xt("isCompressed",E),E?q(Uint8Array.from([h.hasEvenY()?2:3]),A):q(Uint8Array.from([4]),A,e.toBytes(N.y))},fromBytes(w){const h=w.length,E=w[0],N=w.subarray(1);if(h===c&&(E===2||E===3)){const A=X(N);if(!vt(A,k,e.ORDER))throw new Error("Point is not on curve");const q=p(A);let C;try{C=e.sqrt(q)}catch(G){const j=G instanceof Error?": "+G.message:"";throw new Error("Point is not on curve"+j)}const P=(C&k)===k;return(E&1)===1!==P&&(C=e.neg(C)),{x:A,y:C}}else if(h===f&&E===4){const A=e.fromBytes(N.subarray(0,e.BYTES)),q=e.fromBytes(N.subarray(e.BYTES,2*e.BYTES));return{x:A,y:q}}else{const A=c,q=f;throw new Error("invalid Point, expected length of "+A+", or uncompressed "+q+", got "+h)}}});function _(w){const h=r>>k;return w>h}function g(w){return _(w)?i(-w):w}const T=(w,h,E)=>X(w.slice(h,E));class I{constructor(h,E,N){ut("r",h,k,r),ut("s",E,k,r),this.r=h,this.s=E,N!=null&&(this.recovery=N),Object.freeze(this)}static fromCompact(h){const E=s;return h=z("compactSignature",h,E*2),new I(T(h,0,E),T(h,E,2*E))}static fromDER(h){const{r:E,s:N}=F.toSig(z("DER",h));return new I(E,N)}assertValidity(){}addRecoveryBit(h){return new I(this.r,this.s,h)}recoverPublicKey(h){const{r:E,s:N,recovery:A}=this,q=v(z("msgHash",h));if(A==null||![0,1,2,3].includes(A))throw new Error("recovery id invalid");const C=A===2||A===3?E+n.n:E;if(C>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const P=A&1?"03":"02",Q=d.fromHex(P+$t(C,e.BYTES)),G=a(C),j=i(-q*G),dt=i(N*G),tt=d.BASE.multiplyAndAddUnsafe(Q,j,dt);if(!tt)throw new Error("point at infinify");return tt.assertValidity(),tt}hasHighS(){return _(this.s)}normalizeS(){return this.hasHighS()?new I(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return Ut(this.toDERHex())}toDERHex(){return F.hexFromSig(this)}toCompactRawBytes(){return Ut(this.toCompactHex())}toCompactHex(){const h=s;return $t(this.r,h)+$t(this.s,h)}}const H={isValidPrivateKey(w){try{return l(w),!0}catch{return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{const w=ke(n.n);return hn(n.randomBytes(w),n.n)},precompute(w=8,h=d.BASE){return h._setWindowSize(w),h.multiply(BigInt(3)),h}};function y(w,h=!0){return d.fromPrivateKey(w).toRawBytes(h)}function u(w){if(typeof w=="bigint")return!1;if(w instanceof d)return!0;const E=z("key",w).length,N=e.BYTES,A=N+1,q=2*N+1;if(!(n.allowedPrivateKeyLengths||s===A))return E===A||E===q}function m(w,h,E=!0){if(u(w)===!0)throw new Error("first arg must be private key");if(u(h)===!1)throw new Error("second arg must be public key");return d.fromHex(h).multiply(l(w)).toRawBytes(E)}const x=n.bits2int||function(w){if(w.length>8192)throw new Error("input is too large");const h=X(w),E=w.length*8-o;return E>0?h>>BigInt(E):h},v=n.bits2int_modN||function(w){return i(x(w))},O=Ct(o);function U(w){return ut("num < 2^"+o,w,W,O),lt(w,s)}function L(w,h,E=B){if(["recovered","canonical"].some(ct=>ct in E))throw new Error("sign() legacy options not supported");const{hash:N,randomBytes:A}=n;let{lowS:q,prehash:C,extraEntropy:P}=E;q==null&&(q=!0),w=z("msgHash",w),ge(E),C&&(w=z("prehashed msgHash",N(w)));const Q=v(w),G=l(h),j=[U(G),U(Q)];if(P!=null&&P!==!1){const ct=P===!0?A(e.BYTES):P;j.push(z("extraEntropy",ct))}const dt=D(...j),tt=Q;function Vt(ct){const ht=x(ct);if(!b(ht))return;const Pt=a(ht),mt=d.BASE.multiply(ht).toAffine(),ft=i(mt.x);if(ft===W)return;const bt=i(Pt*i(tt+ft*G));if(bt===W)return;let yt=(mt.x===ft?0:2)|Number(mt.y&k),wt=bt;return q&&_(bt)&&(wt=g(bt),yt^=1),new I(ft,wt,yt)}return{seed:dt,k2sig:Vt}}const B={lowS:n.lowS,prehash:!1},R={lowS:n.lowS,prehash:!1};function S(w,h,E=B){const{seed:N,k2sig:A}=L(w,h,E),q=n;return on(q.hash.outputLen,q.nByteLength,q.hmac)(N,A)}d.BASE._setWindowSize(8);function V(w,h,E,N=R){var yt;const A=w;h=z("msgHash",h),E=z("publicKey",E);const{lowS:q,prehash:C,format:P}=N;if(ge(N),"strict"in N)throw new Error("options.strict was renamed to lowS");if(P!==void 0&&P!=="compact"&&P!=="der")throw new Error("format must be compact or der");const Q=typeof A=="string"||_t(A),G=!Q&&!P&&typeof A=="object"&&A!==null&&typeof A.r=="bigint"&&typeof A.s=="bigint";if(!Q&&!G)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let j,dt;try{if(G&&(j=new I(A.r,A.s)),Q){try{P!=="compact"&&(j=I.fromDER(A))}catch(wt){if(!(wt instanceof F.Err))throw wt}!j&&P!=="der"&&(j=I.fromCompact(A))}dt=d.fromHex(E)}catch{return!1}if(!j||q&&j.hasHighS())return!1;C&&(h=n.hash(h));const{r:tt,s:Vt}=j,ct=v(h),ht=a(Vt),Pt=i(ct*ht),mt=i(tt*ht),ft=(yt=d.BASE.multiplyAndAddUnsafe(dt,Pt,mt))==null?void 0:yt.toAffine();return ft?i(ft.x)===tt:!1}return{CURVE:n,getPublicKey:y,getSharedSecret:m,sign:S,verify:V,ProjectivePoint:d,Signature:I,utils:H}}function Bn(t,n){const e=t.ORDER;let r=W;for(let _=e-k;_%rt===W;_/=rt)r+=k;const s=r,o=rt<<s-k-k,c=o*rt,f=(e-k)/c,i=(f-k)/rt,a=c-k,d=o,l=t.pow(n,f),p=t.pow(n,(f+k)/rt);let b=(_,g)=>{let T=l,I=t.pow(g,a),H=t.sqr(I);H=t.mul(H,g);let y=t.mul(_,H);y=t.pow(y,i),y=t.mul(y,I),I=t.mul(y,g),H=t.mul(y,_);let u=t.mul(H,I);y=t.pow(u,d);let m=t.eql(y,t.ONE);I=t.mul(H,p),y=t.mul(u,T),H=t.cmov(I,H,m),u=t.cmov(y,u,m);for(let x=s;x>k;x--){let v=x-rt;v=rt<<v-k;let O=t.pow(u,v);const U=t.eql(O,t.ONE);I=t.mul(H,T),T=t.mul(T,T),O=t.mul(u,T),H=t.cmov(I,H,U),u=t.cmov(O,u,U)}return{isValid:m,value:H}};if(t.ORDER%te===pt){const _=(t.ORDER-pt)/te,g=t.sqrt(t.neg(n));b=(T,I)=>{let H=t.sqr(I);const y=t.mul(T,I);H=t.mul(H,y);let u=t.pow(H,_);u=t.mul(u,y);const m=t.mul(u,g),x=t.mul(t.sqr(u),I),v=t.eql(x,T);let O=t.cmov(m,u,v);return{isValid:v,value:O}}}return b}function Sn(t,n){if(Ue(t),!t.isValid(n.A)||!t.isValid(n.B)||!t.isValid(n.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const e=Bn(t,n.Z);if(!t.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let s,o,c,f,i,a,d,l;s=t.sqr(r),s=t.mul(s,n.Z),o=t.sqr(s),o=t.add(o,s),c=t.add(o,t.ONE),c=t.mul(c,n.B),f=t.cmov(n.Z,t.neg(o),!t.eql(o,t.ZERO)),f=t.mul(f,n.A),o=t.sqr(c),a=t.sqr(f),i=t.mul(a,n.A),o=t.add(o,i),o=t.mul(o,c),a=t.mul(a,f),i=t.mul(a,n.B),o=t.add(o,i),d=t.mul(s,c);const{isValid:p,value:b}=e(o,a);l=t.mul(s,r),l=t.mul(l,b),d=t.cmov(d,c,p),l=t.cmov(l,b,p);const _=t.isOdd(r)===t.isOdd(l);l=t.cmov(t.neg(l),l,_);const g=Zt(t,[f],!0)[0];return d=t.mul(d,g),{x:d,y:l}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function An(t){return{hash:t,hmac:(n,...e)=>Se(t,n,$e(...e)),randomBytes:ve}}function _n(t,n){const e=r=>vn({...t,...An(r)});return{...e(n),create:e}}const In=X;function ot(t,n){if(Bt(t),Bt(n),t<0||t>=1<<8*n)throw new Error("invalid I2OSP input: "+t);const e=Array.from({length:n}).fill(0);for(let r=n-1;r>=0;r--)e[r]=t&255,t>>>=8;return new Uint8Array(e)}function On(t,n){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t[r]^n[r];return e}function Bt(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function qn(t,n,e,r){it(t),it(n),Bt(e),n.length>255&&(n=r(D(oe("H2C-OVERSIZE-DST-"),n)));const{outputLen:s,blockLen:o}=r,c=Math.ceil(e/s);if(e>65535||c>255)throw new Error("expand_message_xmd: invalid lenInBytes");const f=D(n,ot(n.length,1)),i=ot(0,o),a=ot(e,2),d=new Array(c),l=r(D(i,t,a,ot(0,1),f));d[0]=r(D(l,ot(1,1),f));for(let b=1;b<=c;b++){const _=[On(l,d[b-1]),ot(b+1,1),f];d[b]=r(D(..._))}return D(...d).slice(0,e)}function Nn(t,n,e,r,s){if(it(t),it(n),Bt(e),n.length>255){const o=Math.ceil(2*r/8);n=s.create({dkLen:o}).update(oe("H2C-OVERSIZE-DST-")).update(n).digest()}if(e>65535||n.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return s.create({dkLen:e}).update(t).update(ot(e,2)).update(n).update(ot(n.length,1)).digest()}function me(t,n,e){It(e,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:r,k:s,m:o,hash:c,expand:f,DST:i}=e;it(t),Bt(n);const a=typeof i=="string"?oe(i):i,d=r.toString(2).length,l=Math.ceil((d+s)/8),p=n*o*l;let b;if(f==="xmd")b=qn(t,a,p,c);else if(f==="xof")b=Nn(t,a,p,s,c);else if(f==="_internal_pass")b=t;else throw new Error('expand must be "xmd" or "xof"');const _=new Array(n);for(let g=0;g<n;g++){const T=new Array(o);for(let I=0;I<o;I++){const H=l*(I+g*o),y=b.subarray(H,H+l);T[I]=Z(In(y),r)}_[g]=T}return _}function Rn(t,n){const e=n.map(r=>Array.from(r).reverse());return(r,s)=>{const[o,c,f,i]=e.map(l=>l.reduce((p,b)=>t.add(t.mul(p,r),b))),[a,d]=Zt(t,[c,i],!0);return r=t.mul(o,a),s=t.mul(s,t.mul(f,d)),{x:r,y:s}}}function Hn(t,n,e){if(typeof n!="function")throw new Error("mapToCurve() must be defined");function r(o){return t.fromAffine(n(o))}function s(o){const c=o.clearCofactor();return c.equals(t.ZERO)?t.ZERO:(c.assertValidity(),c)}return{defaults:e,hashToCurve(o,c){const f=me(o,2,{...e,DST:e.DST,...c}),i=r(f[0]),a=r(f[1]);return s(i.add(a))},encodeToCurve(o,c){const f=me(o,1,{...e,DST:e.encodeDST,...c});return s(r(f[0]))},mapToCurve(o){if(!Array.isArray(o))throw new Error("expected array of bigints");for(const c of o)if(typeof c!="bigint")throw new Error("expected array of bigints");return s(r(o))}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ot=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Lt=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),se=BigInt(0),St=BigInt(1),Tt=BigInt(2),be=(t,n)=>(t+n/Tt)/n;function Ve(t){const n=Ot,e=BigInt(3),r=BigInt(6),s=BigInt(11),o=BigInt(22),c=BigInt(23),f=BigInt(44),i=BigInt(88),a=t*t*t%n,d=a*a*t%n,l=Y(d,e,n)*d%n,p=Y(l,e,n)*d%n,b=Y(p,Tt,n)*a%n,_=Y(b,s,n)*b%n,g=Y(_,o,n)*_%n,T=Y(g,f,n)*g%n,I=Y(T,i,n)*T%n,H=Y(I,f,n)*g%n,y=Y(H,e,n)*d%n,u=Y(y,c,n)*_%n,m=Y(u,r,n)*a%n,x=Y(m,Tt,n);if(!st.eql(st.sqr(x),t))throw new Error("Cannot find square root");return x}const st=ie(Ot,void 0,void 0,{sqrt:Ve}),zt=_n({a:se,b:BigInt(7),Fp:st,n:Lt,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const n=Lt,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-St*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=e,c=BigInt("0x100000000000000000000000000000000"),f=be(o*t,n),i=be(-r*t,n);let a=Z(t-f*e-i*s,n),d=Z(-f*r-i*o,n);const l=a>c,p=d>c;if(l&&(a=n-a),p&&(d=n-d),a>c||d>c)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:l,k1:a,k2neg:p,k2:d}}}},Ht),ye={};function kt(t,...n){let e=ye[t];if(e===void 0){const r=Ht(Uint8Array.from(t,s=>s.charCodeAt(0)));e=D(r,r),ye[t]=e}return Ht(D(e,...n))}const ce=t=>t.toRawBytes(!0).slice(1),ee=t=>lt(t,32),Xt=t=>Z(t,Ot),At=t=>Z(t,Lt),fe=(()=>zt.ProjectivePoint)(),Un=(t,n,e)=>fe.BASE.multiplyAndAddUnsafe(t,n,e);function ne(t){let n=zt.utils.normPrivateKeyToScalar(t),e=fe.fromPrivateKey(n);return{scalar:e.hasEvenY()?n:At(-n),bytes:ce(e)}}function Pe(t){ut("x",t,St,Ot);const n=Xt(t*t),e=Xt(n*t+BigInt(7));let r=Ve(e);r%Tt!==se&&(r=Xt(-r));const s=new fe(t,r,St);return s.assertValidity(),s}const gt=X;function Me(...t){return At(gt(kt("BIP0340/challenge",...t)))}function Ln(t){return ne(t).bytes}function Tn(t,n,e=ve(32)){const r=z("message",t),{bytes:s,scalar:o}=ne(n),c=z("auxRand",e,32),f=ee(o^gt(kt("BIP0340/aux",c))),i=kt("BIP0340/nonce",f,s,r),a=At(gt(i));if(a===se)throw new Error("sign failed: k is zero");const{bytes:d,scalar:l}=ne(a),p=Me(d,s,r),b=new Uint8Array(64);if(b.set(d,0),b.set(ee(At(l+p*o)),32),!je(b,r,s))throw new Error("sign: Invalid signature produced");return b}function je(t,n,e){const r=z("signature",t,64),s=z("message",n),o=z("publicKey",e,32);try{const c=Pe(gt(o)),f=gt(r.subarray(0,32));if(!vt(f,St,Ot))return!1;const i=gt(r.subarray(32,64));if(!vt(i,St,Lt))return!1;const a=Me(ee(f),ce(c),s),d=Un(c,i,At(-a));return!(!d||!d.hasEvenY()||d.toAffine().x!==f)}catch{return!1}}const sr=(()=>({getPublicKey:Ln,sign:Tn,verify:je,utils:{randomPrivateKey:zt.utils.randomPrivateKey,lift_x:Pe,pointToBytes:ce,numberToBytesBE:lt,bytesToNumberBE:X,taggedHash:kt,mod:Z}}))(),kn=(()=>Rn(st,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(t=>t.map(n=>BigInt(n)))))(),Cn=(()=>Sn(st,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:st.create(BigInt("-11"))}))(),Ke=(()=>Hn(zt.ProjectivePoint,t=>{const{x:n,y:e}=Cn(st.create(t[0]));return kn(n,e)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:st.ORDER,m:1,k:128,expand:"xmd",hash:Ht}))(),cr=(()=>Ke.hashToCurve)(),fr=(()=>Ke.encodeToCurve)();export{fr as encodeToCurve,cr as hashToCurve,sr as schnorr,zt as secp256k1,Ke as secp256k1_hasher};
|