@dcl/governance-site 2.5.0 → 2.5.1-33082581209.commit-22bd878
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-689989f0.js → ConstantsUtil-59b2cd86.js} +1 -1
- package/assets/{ExchangeController-88f78111.js → ExchangeController-fa484fd0.js} +1 -1
- package/assets/{HelpersUtil-40f31189.js → HelpersUtil-770828c8.js} +1 -1
- package/assets/{NetworkUtil-2fb81493.js → NetworkUtil-3fb1c3fe.js} +1 -1
- package/assets/{ReownAuthentication-e5d1d4cc.js → ReownAuthentication-f940c538.js} +1 -1
- package/assets/{SwapController-f47e6f17.js → SwapController-4c01709b.js} +1 -1
- package/assets/{UserAvatar-0c19fd64.js → UserAvatar-f3b95af9.js} +1 -1
- package/assets/{W3MFrameProviderSingleton-33e9645e.js → W3MFrameProviderSingleton-7fcb402e.js} +2 -2
- package/assets/{basic-509eb412.js → basic-8ed25007.js} +1 -1
- package/assets/{biconomy-6fa3eb98.js → biconomy-0556809e.js} +1 -1
- package/assets/{ccip-040f274b.js → ccip-57e7e084.js} +1 -1
- package/assets/{ccip-6d1e4a15.js → ccip-68ca0fd0.js} +1 -1
- package/assets/{chains-bae55e5f.js → chains-1a5f4ed2.js} +1 -1
- package/assets/{common-f2e88a7e.js → common-01677528.js} +1 -1
- package/assets/{compat-b432550d.js → compat-cd8c4091.js} +1 -1
- package/assets/{controller-83cf739b.js → controller-7e89d43c.js} +1 -1
- package/assets/{core-71a03396.js → core-622edb4b.js} +3 -3
- package/assets/{custom-7ae31f11.js → custom-6c3adaba.js} +1 -1
- package/assets/{data-capture-f1f485c2.js → data-capture-cba69814.js} +1 -1
- package/assets/{decimals-9d5fec14.js → decimals-87f73bc8.js} +1 -1
- package/assets/decimals-9f72f7a7.js +1 -0
- package/assets/{email-be31d86e.js → email-80e0bbfe.js} +1 -1
- package/assets/{embedded-wallet-41341ab4.js → embedded-wallet-a9db005f.js} +1 -1
- package/assets/{engine-8d2b111b.js → engine-d00cb92f.js} +1 -1
- package/assets/{estimate-l1-fee-8acb8860.js → estimate-l1-fee-b18b1add.js} +1 -1
- package/assets/eth_estimateGas-f72c796d.js +1 -0
- package/assets/{eth_getStorageAt-2d8a4700.js → eth_getStorageAt-94d435fd.js} +1 -1
- package/assets/{eth_getTransactionCount-273004ec.js → eth_getTransactionCount-f65a6014.js} +1 -1
- package/assets/{ethereum-667be7dc.js → ethereum-a70fe449.js} +1 -1
- package/assets/{execute-6c88dd5f.js → execute-cfc083c5.js} +1 -1
- package/assets/{extractIPFS-640303a3.js → extractIPFS-f36e345a.js} +1 -1
- package/assets/features-806a397a.js +1 -0
- package/assets/{fetchTokenMetadata-1e138f21.js → fetchTokenMetadata-a4be56d3.js} +1 -1
- package/assets/{fortmatic-d34f42c3.js → fortmatic-1337bcf5.js} +1 -1
- package/assets/{get-bytecode-8cb4e224.js → get-bytecode-a32ec435.js} +1 -1
- package/assets/{get-ecosystem-wallet-info-ec712acc.js → get-ecosystem-wallet-info-2915d4f0.js} +1 -1
- package/assets/{getBalance-0308f38f.js → getBalance-efeee2c5.js} +1 -1
- package/assets/{getInstalledModules-17fa1a09.js → getInstalledModules-00081c9b.js} +1 -1
- package/assets/{getNFT-30795fe1.js → getNFT-280473b8.js} +1 -1
- package/assets/{getNFT-06eb1406.js → getNFT-4e9b31bb.js} +1 -1
- package/assets/{hashBytecode-a29db705.js → hashBytecode-ffe0c51d.js} +1 -1
- package/assets/{hashTypedData-23a00dc9.js → hashTypedData-6a1d5c90.js} +1 -1
- package/assets/{hashTypedData-ba8e399b.js → hashTypedData-f2ac0c46.js} +1 -1
- package/assets/{in-app-9acc158b.js → in-app-bb81af0c.js} +1 -1
- package/assets/{in-app-wallet-calls-48ca2694.js → in-app-wallet-calls-f8da82cd.js} +1 -1
- package/assets/{index-d7bf28d3.js → index-05fb92b4.js} +1 -1
- package/assets/{index-9c119afb.js → index-0814e813.js} +1 -1
- package/assets/{index-05f3c18a.js → index-0d43d9ed.js} +1 -1
- package/assets/{index-8b5a06dd.js → index-132215e1.js} +1 -1
- package/assets/{index-9c2f8893.js → index-1573dd52.js} +1 -1
- package/assets/{index-2124b7cd.js → index-1b1eb822.js} +1 -1
- package/assets/{index-b40ed19e.js → index-1ffbaae5.js} +1 -1
- package/assets/{index-3c50ab3b.js → index-23121972.js} +1 -1
- package/assets/{index-3cdab001.js → index-23d1f93a.js} +1 -1
- package/assets/{index-a5c29e80.js → index-26191a1a.js} +1 -1
- package/assets/{index-f4401a12.js → index-283fc9a2.js} +1 -1
- package/assets/{index-863b5c53.js → index-29e826f8.js} +1 -1
- package/assets/{index-69ac8519.js → index-2dd08e94.js} +1 -1
- package/assets/{index-c7839713.js → index-2f8dfd91.js} +1 -1
- package/assets/{index-9ecf773e.js → index-36edc093.js} +1 -1
- package/assets/{index-e7f3149f.css → index-393d8500.css} +4 -4
- package/assets/{index-ffdeacb2.js → index-39b708b0.js} +1 -1
- package/assets/{index-5b4e7208.js → index-484e428c.js} +1 -1
- package/assets/{index-a5876580.js → index-4a42880b.js} +1 -1
- package/assets/{index-78689969.js → index-4ef2b1cb.js} +1 -1
- package/assets/index-5fc895c4.js +77 -0
- package/assets/{index-f4841b7d.js → index-61225d13.js} +1 -1
- package/assets/{index-ec8cf158.js → index-613ebb4e.js} +1 -1
- package/assets/{index-d7ed4af8.js → index-6192741c.js} +1 -1
- package/assets/{index-2e071cd2.js → index-64d202b1.js} +1 -1
- package/assets/{index-1368749b.js → index-667c419c.js} +1 -1
- package/assets/{index-a91bb597.js → index-6a124ae5.js} +1 -1
- package/assets/{index-6c8c5091.js → index-77bf3df8.js} +1 -1
- package/assets/{index-355751ab.js → index-7ad60780.js} +245 -245
- package/assets/{index-4bc8eee8.js → index-80010c3a.js} +1 -1
- package/assets/{index-375e28ad.js → index-817cf9cd.js} +1 -1
- package/assets/{index-8bdd54b7.js → index-86fd2679.js} +1 -1
- package/assets/{index-276c1c99.js → index-88f8dc1a.js} +1 -1
- package/assets/{index-6e64d31e.js → index-8d4c6be6.js} +2 -2
- package/assets/{index-9e3730d4.js → index-8f227749.js} +1 -1
- package/assets/{index-e2d1a06e.js → index-905b390f.js} +1 -1
- package/assets/{index-33bd3c33.js → index-939f5c5f.js} +1 -1
- package/assets/{index-e332724b.js → index-9afdd2b9.js} +1 -1
- package/assets/{index-2ebd7a81.js → index-a06134e9.js} +1 -1
- package/assets/{index-2537319c.js → index-adb46e7f.js} +1 -1
- package/assets/{index-54323fc3.js → index-b5c8b407.js} +2 -2
- package/assets/{index-89cbc69d.js → index-b70b01d5.js} +1 -1
- package/assets/{index-ab687c6f.js → index-b9ce3e4d.js} +1 -1
- package/assets/{index-5947dd15.js → index-c9c1d671.js} +1 -1
- package/assets/{index-b7605561.js → index-cb7a576f.js} +1 -1
- package/assets/{index-1c9749d2.js → index-cc7dbce8.js} +1 -1
- package/assets/{index-e6d2ed90.js → index-cf42fef2.js} +1 -1
- package/assets/{index-3d2bada3.js → index-d15dcb4c.js} +1 -1
- package/assets/{index-3ad96675.js → index-d79af667.js} +1 -1
- package/assets/{index-66d53073.js → index-e5717874.js} +2 -2
- package/assets/{index-b41b719c.js → index-e638cea0.js} +1 -1
- package/assets/{index-5f847edd.js → index-e7a8f28b.js} +2 -2
- package/assets/{index-76dbec48.js → index-ec6cdadb.js} +1 -1
- package/assets/{index-57dbcd5d.js → index-f2a7f7f0.js} +1 -1
- package/assets/{index-e6ba4bbe.js → index-f347a362.js} +1 -1
- package/assets/{index.es-2aacf970.js → index.es-26bc13d1.js} +1 -1
- package/assets/{index.es-ce0aa5fd.js → index.es-2fd56c76.js} +3 -3
- package/assets/{index.es-ac60fff2.js → index.es-f2ff8299.js} +1 -1
- package/assets/{index.web-1837e57d.js → index.web-447bc5a9.js} +1 -1
- package/assets/{localBatchGatewayRequest-b2e2be89.js → localBatchGatewayRequest-69468f9d.js} +1 -1
- package/assets/{native-8dd45a06.js → native-8d26fb1e.js} +1 -1
- package/assets/{networks-2b49f856.js → networks-c9098993.js} +1 -1
- package/assets/{onramp-7ba26b97.js → onramp-265ce080.js} +1 -1
- package/assets/{openzeppelin-56d83a0f.js → openzeppelin-ec0a06b4.js} +1 -1
- package/assets/{ownerOf-558180d2.js → ownerOf-c26ccb7e.js} +1 -1
- package/assets/parseNft-d17ba5d1.js +1 -0
- package/assets/{parseSignature-7a759338.js → parseSignature-6109cfb8.js} +1 -1
- package/assets/{parseSignature-16c7c561.js → parseSignature-6692cf8f.js} +2 -2
- package/assets/{passkeys-fd92f407.js → passkeys-88fbcf43.js} +1 -1
- package/assets/{pay-with-exchange-542b5282.js → pay-with-exchange-4f9213da.js} +1 -1
- package/assets/{prepare-contract-call-ac31a985.js → prepare-contract-call-61ed7f10.js} +1 -1
- package/assets/{qr-overlay-548b2074.js → qr-overlay-ff429bf0.js} +1 -1
- package/assets/{receive-9119a0fc.js → receive-654e1011.js} +1 -1
- package/assets/{redirect-state-202ec690.js → redirect-state-0eb003cc.js} +1 -1
- package/assets/{resolveImplementation-ffd32467.js → resolveImplementation-19e165be.js} +1 -1
- package/assets/{rpc-4fa5fbde.js → rpc-270b3a16.js} +1 -1
- package/assets/{secp256k1-2e39eaab.js → secp256k1-4235faa9.js} +1 -1
- package/assets/{secp256k1-61174a68.js → secp256k1-c4549fdf.js} +1 -1
- package/assets/{secp256k1-587b447b.js → secp256k1-ca23cefd.js} +1 -1
- package/assets/{send-5e9549ca.js → send-51c750ac.js} +1 -1
- package/assets/{send-batch-transaction-16b5b747.js → send-batch-transaction-26ad8017.js} +1 -1
- package/assets/{send-eip712-transaction-67b51817.js → send-eip712-transaction-7428d14b.js} +1 -1
- package/assets/send-gasless-transaction-629c6301.js +1 -0
- package/assets/{send-transaction-5984dc09.js → send-transaction-d88f260d.js} +1 -1
- package/assets/{session-proposal-548687be.js → session-proposal-478c6c90.js} +1 -1
- package/assets/{session-request-543a34de.js → session-request-763e482a.js} +1 -1
- package/assets/{sha256-865a5e2e.js → sha256-912f9e4c.js} +1 -1
- package/assets/{signing-67cb53a5.js → signing-8c84a26e.js} +2 -2
- package/assets/{socials-1c5f45aa.js → socials-0fe1c43f.js} +1 -1
- package/assets/{swaps-a0b58cae.js → swaps-8fca8430.js} +1 -1
- package/assets/{thirdweb-d54893e0.js → thirdweb-93346565.js} +2 -2
- package/assets/{to-serializable-transaction-2ea802ff.js → to-serializable-transaction-f4f170dd.js} +2 -2
- package/assets/{totalSupply-f714505e.js → totalSupply-f4e2ebc4.js} +1 -1
- package/assets/{transaction-e500e7c4.js → transaction-de6aa420.js} +1 -1
- package/assets/{transactionReceipt-c6fe2381.js → transactionReceipt-048e59e4.js} +1 -1
- package/assets/{transactions-9a79e8f9.js → transactions-5d81f4ca.js} +1 -1
- package/assets/{tslib.es6-b444c8f1.js → tslib.es6-dfcb9aaf.js} +1 -1
- package/assets/{utils-74c631d9.js → utils-13a7e3ab.js} +1 -1
- package/assets/{verifyHash-34edded7.js → verifyHash-ae676cbd.js} +1 -1
- package/assets/{w3m-modal-0795c078.js → w3m-modal-24af9160.js} +1 -1
- package/assets/{w3m-modal-906aa735.js → w3m-modal-b6bcdae1.js} +1 -1
- package/assets/{wait-for-tx-receipt-dbf6b521.js → wait-for-tx-receipt-1106c895.js} +1 -1
- package/assets/{wallets-331c410d.js → wallets-95ac61f8.js} +4 -4
- package/assets/{web-connector-3a1204fd.js → web-connector-856f3af1.js} +2 -2
- package/assets/{writeContract-f6b81199.js → writeContract-f029805e.js} +2 -2
- package/assets/{zora-sepolia-eaf59a0b.js → zora-sepolia-b68fb504.js} +1 -1
- package/assets/{zoraTestnet-55836178.js → zoraTestnet-9a287ef8.js} +1 -1
- package/index.html +4 -4
- package/package.json +3 -3
- package/assets/decimals-37678a25.js +0 -1
- package/assets/eth_estimateGas-79dc1763.js +0 -1
- package/assets/features-0025dc16.js +0 -1
- package/assets/index-7ee82e4f.js +0 -77
- package/assets/parseNft-93d99682.js +0 -1
- package/assets/send-gasless-transaction-8bdf3649.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as U,w as R}from"./execute-6c88dd5f.js";import{b as O,a as P}from"./uint8-array-63adf023.js";import"./prepare-contract-call-ac31a985.js";import"./utils-74c631d9.js";import"./index-355751ab.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-cfc083c5.js";import{b as O,a as P}from"./uint8-array-63adf023.js";import"./prepare-contract-call-61ed7f10.js";import"./utils-13a7e3ab.js";import"./index-7ad60780.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-8d4c6be6.js";import{c as v}from"./index-4ef2b1cb.js";import"./index-c9c1d671.js";import"./index-b9ce3e4d.js";import"./index-667c419c.js";import"./index-77bf3df8.js";import"./index-39b708b0.js";import"./index-283fc9a2.js";import"./index-cf42fef2.js";import{C as y,R as w,n as E,S as b,h as z,c as S}from"./W3MFrameProviderSingleton-7fcb402e.js";import{E as r}from"./ExchangeController-fa484fd0.js";import"./index-ec6cdadb.js";import"./index-f2a7f7f0.js";import"./index-80010c3a.js";import"./index-86fd2679.js";import"./index-7ad60780.js";import"./index-88f8dc1a.js";import"./index-accd8060.js";import"./index-1b1eb822.js";import"./index-2dd08e94.js";import"./index.es-f2ff8299.js";import"./NetworkUtil-3fb1c3fe.js";import"./createBatchScheduler-7c9ada66.js";import"./index-0814e813.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-13a7e3ab.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-7ad60780.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-8d4c6be6.js";import{c as C,U as T}from"./index-4ef2b1cb.js";import"./index-c9c1d671.js";import"./index-9afdd2b9.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-7fcb402e.js";import"./index-7ad60780.js";import"./index-88f8dc1a.js";import"./index-accd8060.js";import"./index-1b1eb822.js";import"./index-2dd08e94.js";import"./index.es-f2ff8299.js";import"./NetworkUtil-3fb1c3fe.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-61ed7f10.js";import{c as l,e as w}from"./utils-13a7e3ab.js";import{r as A}from"./execute-cfc083c5.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-a32ec435.js";import{g as f}from"./to-serializable-transaction-f4f170dd.js";import{e as a}from"./eth_getStorageAt-94d435fd.js";import{i as p,f as l,r as c}from"./prepare-contract-call-61ed7f10.js";import"./index-7ad60780.js";import"./transaction-de6aa420.js";import"./utils-13a7e3ab.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-61ed7f10.js";import{s as i}from"./to-serializable-transaction-f4f170dd.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 be,c as Pt,a as Nt,t as ye,b as Ze,w as Ve,r as W,d as ze,e as Me,f as Pe,g as pe}from"./index.es-ce0aa5fd.js";import"./index-355751ab.js";import"./index-276c1c99.js";import"./index-accd8060.js";import"./index-2124b7cd.js";import"./index-6ab757a5.js";import"./index.es-ac60fff2.js";function je(t,n,e,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(n,e,r);const o=BigInt(32),i=BigInt(4294967295),c=Number(e>>o&i),f=Number(e&i),s=r?4:0,u=r?0:4;t.setUint32(n+s,c,r),t.setUint32(n+u,f,r)}function Ke(t,n,e){return t&n^~t&e}function De(t,n,e){return t&n^t&e^n&e}class Ye extends be{constructor(n,e,r,o){super(),this.blockLen=n,this.outputLen=e,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(n),this.view=Pt(this.buffer)}update(n){Nt(this);const{view:e,buffer:r,blockLen:o}=this;n=ye(n);const i=n.length;for(let c=0;c<i;){const f=Math.min(o-this.pos,i-c);if(f===o){const s=Pt(n);for(;o<=i-c;c+=o)this.process(s,c);continue}r.set(n.subarray(c,c+f),this.pos),this.pos+=f,c+=f,this.pos===o&&(this.process(e,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){Nt(this),Ze(n,this),this.finished=!0;const{buffer:e,view:r,blockLen:o,isLE:i}=this;let{pos:c}=this;e[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>o-c&&(this.process(r,0),c=0);for(let l=c;l<o;l++)e[l]=0;je(r,o-8,BigInt(this.length*8),i),this.process(r,0);const f=Pt(n),s=this.outputLen;if(s%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=s/4,g=this.get();if(u>g.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<u;l++)f.setUint32(4*l,g[l],i)}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:o,finished:i,destroyed:c,pos:f}=this;return n.length=o,n.pos=f,n.finished=i,n.destroyed=c,o%e&&n.buffer.set(r),n}}const Ge=new Uint32Array([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]),et=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),nt=new Uint32Array(64);class We extends Ye{constructor(){super(64,32,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:o,E:i,F:c,G:f,H:s}=this;return[n,e,r,o,i,c,f,s]}set(n,e,r,o,i,c,f,s){this.A=n|0,this.B=e|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=c|0,this.G=f|0,this.H=s|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 d=nt[l-15],w=nt[l-2],B=W(d,7)^W(d,18)^d>>>3,y=W(w,17)^W(w,19)^w>>>10;nt[l]=y+nt[l-7]+B+nt[l-16]|0}let{A:r,B:o,C:i,D:c,E:f,F:s,G:u,H:g}=this;for(let l=0;l<64;l++){const d=W(f,6)^W(f,11)^W(f,25),w=g+d+Ke(f,s,u)+Ge[l]+nt[l]|0,y=(W(r,2)^W(r,13)^W(r,22))+De(r,o,i)|0;g=u,u=s,s=f,f=c+w|0,c=i,i=o,o=r,r=w+y|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,c=c+this.D|0,f=f+this.E|0,s=s+this.F|0,u=u+this.G|0,g=g+this.H|0,this.set(r,o,i,c,f,s,u,g)}roundClean(){nt.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Ut=Ve(()=>new We);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ct=BigInt(0),kt=BigInt(1),$e=BigInt(2);function lt(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function X(t){if(!lt(t))throw new Error("Uint8Array expected")}function bt(t,n){if(typeof n!="boolean")throw new Error(t+" boolean expected, got "+n)}const Xe=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function yt(t){X(t);let n="";for(let e=0;e<t.length;e++)n+=Xe[t[e]];return n}function wt(t){const n=t.toString(16);return n.length&1?"0"+n:n}function ee(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?Ct:BigInt("0x"+t)}const J={_0:48,_9:57,A:65,F:70,a:97,f:102};function ce(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 pt(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof 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 o=0,i=0;o<e;o++,i+=2){const c=ce(t.charCodeAt(i)),f=ce(t.charCodeAt(i+1));if(c===void 0||f===void 0){const s=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+s+'" at index '+i)}r[o]=c*16+f}return r}function $(t){return ee(yt(t))}function ne(t){return X(t),ee(yt(Uint8Array.from(t).reverse()))}function st(t,n){return pt(t.toString(16).padStart(n*2,"0"))}function re(t,n){return st(t,n).reverse()}function Qe(t){return pt(wt(t))}function V(t,n,e){let r;if(typeof n=="string")try{r=pt(n)}catch(i){throw new Error(t+" must be hex string or Uint8Array, cause: "+i)}else if(lt(n))r=Uint8Array.from(n);else throw new Error(t+" must be hex string or Uint8Array");const o=r.length;if(typeof e=="number"&&o!==e)throw new Error(t+" of length "+e+" expected, got "+o);return r}function K(...t){let n=0;for(let r=0;r<t.length;r++){const o=t[r];X(o),n+=o.length}const e=new Uint8Array(n);for(let r=0,o=0;r<t.length;r++){const i=t[r];e.set(i,o),o+=i.length}return e}function Je(t,n){if(t.length!==n.length)return!1;let e=0;for(let r=0;r<t.length;r++)e|=t[r]^n[r];return e===0}function Zt(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}const jt=t=>typeof t=="bigint"&&Ct<=t;function xt(t,n,e){return jt(t)&&jt(n)&&jt(e)&&n<=t&&t<e}function it(t,n,e,r){if(!xt(n,e,r))throw new Error("expected valid "+t+": "+e+" <= n < "+r+", got "+n)}function xe(t){let n;for(n=0;t>Ct;t>>=kt,n+=1);return n}function Fe(t,n){return t>>BigInt(n)&kt}function tn(t,n,e){return t|(e?kt:Ct)<<BigInt(n)}const oe=t=>($e<<BigInt(t-1))-kt,Kt=t=>new Uint8Array(t),fe=t=>Uint8Array.from(t);function Ee(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),o=Kt(t),i=0;const c=()=>{r.fill(1),o.fill(0),i=0},f=(...l)=>e(o,r,...l),s=(l=Kt())=>{o=f(fe([0]),l),r=f(),l.length!==0&&(o=f(fe([1]),l),r=f())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let l=0;const d=[];for(;l<n;){r=f();const w=r.slice();d.push(w),l+=r.length}return K(...d)};return(l,d)=>{c(),s(l);let w;for(;!(w=d(u()));)s();return c(),w}}const en={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"||lt(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 Et(t,n,e={}){const r=(o,i,c)=>{const f=en[i];if(typeof f!="function")throw new Error("invalid validator function");const s=t[o];if(!(c&&s===void 0)&&!f(s,t))throw new Error("param "+String(o)+" is invalid. Expected "+i+", got "+s)};for(const[o,i]of Object.entries(n))r(o,i,!1);for(const[o,i]of Object.entries(e))r(o,i,!0);return t}const nn=()=>{throw new Error("not implemented")};function Xt(t){const n=new WeakMap;return(e,...r)=>{const o=n.get(e);if(o!==void 0)return o;const i=t(e,...r);return n.set(e,i),i}}const rn=Object.freeze(Object.defineProperty({__proto__:null,aInRange:it,abool:bt,abytes:X,bitGet:Fe,bitLen:xe,bitMask:oe,bitSet:tn,bytesToHex:yt,bytesToNumberBE:$,bytesToNumberLE:ne,concatBytes:K,createHmacDrbg:Ee,ensureBytes:V,equalBytes:Je,hexToBytes:pt,hexToNumber:ee,inRange:xt,isBytes:lt,memoized:Xt,notImplemented:nn,numberToBytesBE:st,numberToBytesLE:re,numberToHexUnpadded:wt,numberToVarBytesBE:Qe,utf8ToBytes:Zt,validateObject:Et},Symbol.toStringTag,{value:"Module"}));class Be extends be{constructor(n,e){super(),this.finished=!1,this.destroyed=!1,ze(n);const r=ye(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 o=this.blockLen,i=new Uint8Array(o);i.set(r.length>o?n.create().update(r).digest():r);for(let c=0;c<i.length;c++)i[c]^=54;this.iHash.update(i),this.oHash=n.create();for(let c=0;c<i.length;c++)i[c]^=106;this.oHash.update(i),i.fill(0)}update(n){return Nt(this),this.iHash.update(n),this}digestInto(n){Nt(this),Me(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:o,destroyed:i,blockLen:c,outputLen:f}=this;return n=n,n.finished=o,n.destroyed=i,n.blockLen=c,n.outputLen=f,n.oHash=e._cloneInto(n.oHash),n.iHash=r._cloneInto(n.iHash),n}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const ve=(t,n,e)=>new Be(t,n).update(e).digest();ve.create=(t,n)=>new Be(t,n);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const k=BigInt(0),H=BigInt(1),ut=BigInt(2),on=BigInt(3),Qt=BigInt(4),ae=BigInt(5),ue=BigInt(8);function C(t,n){const e=t%n;return e>=k?e:n+e}function sn(t,n,e){if(n<k)throw new Error("invalid exponent, negatives unsupported");if(e<=k)throw new Error("invalid modulus");if(e===H)return k;let r=H;for(;n>k;)n&H&&(r=r*t%e),t=t*t%e,n>>=H;return r}function D(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=C(t,n),r=n,o=k,i=H;for(;e!==k;){const f=r/e,s=r%e,u=o-i*f;r=e,e=s,o=i,i=u}if(r!==H)throw new Error("invert: does not exist");return C(o,n)}function cn(t){const n=(t-H)/ut;let e,r,o;for(e=t-H,r=0;e%ut===k;e/=ut,r++);for(o=ut;o<t&&sn(o,n,t)!==t-H;o++)if(o>1e3)throw new Error("Cannot find square root: likely non-prime P");if(r===1){const c=(t+H)/Qt;return function(s,u){const g=s.pow(u,c);if(!s.eql(s.sqr(g),u))throw new Error("Cannot find square root");return g}}const i=(e+H)/ut;return function(f,s){if(f.pow(s,n)===f.neg(f.ONE))throw new Error("Cannot find square root");let u=r,g=f.pow(f.mul(f.ONE,o),e),l=f.pow(s,i),d=f.pow(s,e);for(;!f.eql(d,f.ONE);){if(f.eql(d,f.ZERO))return f.ZERO;let w=1;for(let y=f.sqr(d);w<u&&!f.eql(y,f.ONE);w++)y=f.sqr(y);const B=f.pow(g,H<<BigInt(u-w-1));g=f.sqr(B),l=f.mul(l,B),d=f.mul(d,g),u=w}return l}}function fn(t){if(t%Qt===on){const n=(t+H)/Qt;return function(r,o){const i=r.pow(o,n);if(!r.eql(r.sqr(i),o))throw new Error("Cannot find square root");return i}}if(t%ue===ae){const n=(t-ae)/ue;return function(r,o){const i=r.mul(o,ut),c=r.pow(i,n),f=r.mul(o,c),s=r.mul(r.mul(f,ut),c),u=r.mul(f,r.sub(s,r.ONE));if(!r.eql(r.sqr(u),o))throw new Error("Cannot find square root");return u}}return cn(t)}const an=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Se(t){const n={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=an.reduce((r,o)=>(r[o]="function",r),n);return Et(t,e)}function un(t,n,e){if(e<k)throw new Error("invalid exponent, negatives unsupported");if(e===k)return t.ONE;if(e===H)return n;let r=t.ONE,o=n;for(;e>k;)e&H&&(r=t.mul(r,o)),o=t.sqr(o),e>>=H;return r}function ln(t,n){const e=new Array(n.length),r=n.reduce((i,c,f)=>t.is0(c)?i:(e[f]=i,t.mul(i,c)),t.ONE),o=t.inv(r);return n.reduceRight((i,c,f)=>t.is0(c)?i:(e[f]=t.mul(i,e[f]),t.mul(i,c)),o),e}function Ae(t,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:o,nByteLength:i}=Ae(t,n);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let c;const f=Object.freeze({ORDER:t,isLE:e,BITS:o,BYTES:i,MASK:oe(o),ZERO:k,ONE:H,create:s=>C(s,t),isValid:s=>{if(typeof s!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof s);return k<=s&&s<t},is0:s=>s===k,isOdd:s=>(s&H)===H,neg:s=>C(-s,t),eql:(s,u)=>s===u,sqr:s=>C(s*s,t),add:(s,u)=>C(s+u,t),sub:(s,u)=>C(s-u,t),mul:(s,u)=>C(s*u,t),pow:(s,u)=>un(f,s,u),div:(s,u)=>C(s*Jt(u,t),t),sqrN:s=>s*s,addN:(s,u)=>s+u,subN:(s,u)=>s-u,mulN:(s,u)=>s*u,inv:s=>Jt(s,t),sqrt:r.sqrt||(s=>(c||(c=fn(t)),c(f,s))),invertBatch:s=>ln(f,s),cmov:(s,u,g)=>g?u:s,toBytes:s=>e?re(s,i):st(s,i),fromBytes:s=>{if(s.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+s.length);return e?ne(s):$(s)}});return Object.freeze(f)}function _e(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 qe(t){const n=_e(t);return n+Math.ceil(n/2)}function dn(t,n,e=!1){const r=t.length,o=_e(n),i=qe(n);if(r<16||r<i||r>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+r);const c=e?ne(t):$(t),f=C(c,n-H)+H;return e?re(f,o):st(f,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const le=BigInt(0),Ot=BigInt(1);function Dt(t,n){const e=n.negate();return t?e:n}function Oe(t,n){if(!Number.isSafeInteger(t)||t<=0||t>n)throw new Error("invalid window size, expected [1.."+n+"], got W="+t)}function Yt(t,n){Oe(t,n);const e=Math.ceil(n/t)+1,r=2**(t-1);return{windows:e,windowSize:r}}function hn(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,Ne=new WeakMap;function Wt(t){return Ne.get(t)||1}function wn(t,n){return{constTimeNegate:Dt,hasPrecomputes(e){return Wt(e)!==1},unsafeLadder(e,r,o=t.ZERO){let i=e;for(;r>le;)r&Ot&&(o=o.add(i)),i=i.double(),r>>=Ot;return o},precomputeWindow(e,r){const{windows:o,windowSize:i}=Yt(r,n),c=[];let f=e,s=f;for(let u=0;u<o;u++){s=f,c.push(s);for(let g=1;g<i;g++)s=s.add(f),c.push(s);f=s.double()}return c},wNAF(e,r,o){const{windows:i,windowSize:c}=Yt(e,n);let f=t.ZERO,s=t.BASE;const u=BigInt(2**e-1),g=2**e,l=BigInt(e);for(let d=0;d<i;d++){const w=d*c;let B=Number(o&u);o>>=l,B>c&&(B-=g,o+=Ot);const y=w,a=w+Math.abs(B)-1,h=d%2!==0,m=B<0;B===0?s=s.add(Dt(h,r[y])):f=f.add(Dt(m,r[a]))}return{p:f,f:s}},wNAFUnsafe(e,r,o,i=t.ZERO){const{windows:c,windowSize:f}=Yt(e,n),s=BigInt(2**e-1),u=2**e,g=BigInt(e);for(let l=0;l<c;l++){const d=l*f;if(o===le)break;let w=Number(o&s);if(o>>=g,w>f&&(w-=u,o+=Ot),w===0)continue;let B=r[d+Math.abs(w)-1];w<0&&(B=B.negate()),i=i.add(B)}return i},getPrecomputes(e,r,o){let i=Gt.get(r);return i||(i=this.precomputeWindow(r,e),e!==1&&Gt.set(r,o(i))),i},wNAFCached(e,r,o){const i=Wt(e);return this.wNAF(i,this.getPrecomputes(i,e,o),r)},wNAFCachedUnsafe(e,r,o,i){const c=Wt(e);return c===1?this.unsafeLadder(e,r,i):this.wNAFUnsafe(c,this.getPrecomputes(c,e,o),r,i)},setWindowSize(e,r){Oe(r,n),Ne.set(e,r),Gt.delete(e)}}}function mn(t,n,e,r){if(hn(e,t),gn(r,n),e.length!==r.length)throw new Error("arrays of points and scalars must have equal length");const o=t.ZERO,i=xe(BigInt(e.length)),c=i>12?i-3:i>4?i-2:i?2:1,f=(1<<c)-1,s=new Array(f+1).fill(o),u=Math.floor((n.BITS-1)/c)*c;let g=o;for(let l=u;l>=0;l-=c){s.fill(o);for(let w=0;w<r.length;w++){const B=r[w],y=Number(B>>BigInt(l)&BigInt(f));s[y]=s[y].add(e[w])}let d=o;for(let w=s.length-1,B=o;w>0;w--)B=B.add(s[w]),d=d.add(B);if(g=g.add(d),l!==0)for(let w=0;w<c;w++)g=g.double()}return g}function Ue(t){return Se(t.Fp),Et(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Ae(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function de(t){t.lowS!==void 0&&bt("lowS",t.lowS),t.prehash!==void 0&&bt("prehash",t.prehash)}function bn(t){const n=Ue(t);Et(n,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:e,Fp:r,a:o}=n;if(e){if(!r.eql(o,r.ZERO))throw new Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...n})}const{bytesToNumberBE:yn,hexToBytes:pn}=rn;class xn extends Error{constructor(n=""){super(n)}}const F={Err:xn,_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,o=wt(r);if(o.length/2&128)throw new e("tlv.encode: long form length too big");const i=r>127?wt(o.length/2|128):"";return wt(t)+i+o+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 o=n[r++],i=!!(o&128);let c=0;if(!i)c=o;else{const s=o&127;if(!s)throw new e("tlv.decode(long): indefinite length not supported");if(s>4)throw new e("tlv.decode(long): byte length is too big");const u=n.subarray(r,r+s);if(u.length!==s)throw new e("tlv.decode: length bytes not complete");if(u[0]===0)throw new e("tlv.decode(long): zero leftmost byte");for(const g of u)c=c<<8|g;if(r+=s,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<G)throw new n("integer: negative integers are not allowed");let e=wt(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 yn(t)}},toSig(t){const{Err:n,_int:e,_tlv:r}=F,o=typeof t=="string"?pn(t):t;X(o);const{v:i,l:c}=r.decode(48,o);if(c.length)throw new n("invalid signature: left bytes after parsing");const{v:f,l:s}=r.decode(2,i),{v:u,l:g}=r.decode(2,s);if(g.length)throw new n("invalid signature: left bytes after parsing");return{r:e.decode(f),s:e.decode(u)}},hexFromSig(t){const{_tlv:n,_int:e}=F,r=n.encode(2,e.encode(t.r)),o=n.encode(2,e.encode(t.s)),i=r+o;return n.encode(48,i)}},G=BigInt(0),L=BigInt(1),rt=BigInt(2),Lt=BigInt(3),he=BigInt(4);function En(t){const n=bn(t),{Fp:e}=n,r=Ie(n.n,n.nBitLength),o=n.toBytes||((y,a,h)=>{const m=a.toAffine();return K(Uint8Array.from([4]),e.toBytes(m.x),e.toBytes(m.y))}),i=n.fromBytes||(y=>{const a=y.subarray(1),h=e.fromBytes(a.subarray(0,e.BYTES)),m=e.fromBytes(a.subarray(e.BYTES,2*e.BYTES));return{x:h,y:m}});function c(y){const{a,b:h}=n,m=e.sqr(y),p=e.mul(m,y);return e.add(e.add(p,e.mul(y,a)),h)}if(!e.eql(e.sqr(n.Gy),c(n.Gx)))throw new Error("bad generator point: equation left != right");function f(y){return xt(y,L,n.n)}function s(y){const{allowedPrivateKeyLengths:a,nByteLength:h,wrapPrivateKey:m,n:p}=n;if(a&&typeof y!="bigint"){if(lt(y)&&(y=yt(y)),typeof y!="string"||!a.includes(y.length))throw new Error("invalid private key");y=y.padStart(h*2,"0")}let v;try{v=typeof y=="bigint"?y:$(V("private key",y,h))}catch{throw new Error("invalid private key, expected hex or "+h+" bytes, got "+typeof y)}return m&&(v=C(v,p)),it("private key",v,L,p),v}function u(y){if(!(y instanceof d))throw new Error("ProjectivePoint expected")}const g=Xt((y,a)=>{const{px:h,py:m,pz:p}=y;if(e.eql(p,e.ONE))return{x:h,y:m};const v=y.is0();a==null&&(a=v?e.ONE:e.inv(p));const O=e.mul(h,a),_=e.mul(m,a),S=e.mul(p,a);if(v)return{x:e.ZERO,y:e.ZERO};if(!e.eql(S,e.ONE))throw new Error("invZ was invalid");return{x:O,y:_}}),l=Xt(y=>{if(y.is0()){if(n.allowInfinityPoint&&!e.is0(y.py))return;throw new Error("bad point: ZERO")}const{x:a,y:h}=y.toAffine();if(!e.isValid(a)||!e.isValid(h))throw new Error("bad point: x or y not FE");const m=e.sqr(h),p=c(a);if(!e.eql(m,p))throw new Error("bad point: equation left != right");if(!y.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class d{constructor(a,h,m){if(this.px=a,this.py=h,this.pz=m,a==null||!e.isValid(a))throw new Error("x required");if(h==null||!e.isValid(h))throw new Error("y required");if(m==null||!e.isValid(m))throw new Error("z required");Object.freeze(this)}static fromAffine(a){const{x:h,y:m}=a||{};if(!a||!e.isValid(h)||!e.isValid(m))throw new Error("invalid affine point");if(a instanceof d)throw new Error("projective point not allowed");const p=v=>e.eql(v,e.ZERO);return p(h)&&p(m)?d.ZERO:new d(h,m,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(a){const h=e.invertBatch(a.map(m=>m.pz));return a.map((m,p)=>m.toAffine(h[p])).map(d.fromAffine)}static fromHex(a){const h=d.fromAffine(i(V("pointHex",a)));return h.assertValidity(),h}static fromPrivateKey(a){return d.BASE.multiply(s(a))}static msm(a,h){return mn(d,r,a,h)}_setWindowSize(a){B.setWindowSize(this,a)}assertValidity(){l(this)}hasEvenY(){const{y:a}=this.toAffine();if(e.isOdd)return!e.isOdd(a);throw new Error("Field doesn't support isOdd")}equals(a){u(a);const{px:h,py:m,pz:p}=this,{px:v,py:O,pz:_}=a,S=e.eql(e.mul(h,_),e.mul(v,p)),I=e.eql(e.mul(m,_),e.mul(O,p));return S&&I}negate(){return new d(this.px,e.neg(this.py),this.pz)}double(){const{a,b:h}=n,m=e.mul(h,Lt),{px:p,py:v,pz:O}=this;let _=e.ZERO,S=e.ZERO,I=e.ZERO,A=e.mul(p,p),Z=e.mul(v,v),T=e.mul(O,O),U=e.mul(p,v);return U=e.add(U,U),I=e.mul(p,O),I=e.add(I,I),_=e.mul(a,I),S=e.mul(m,T),S=e.add(_,S),_=e.sub(Z,S),S=e.add(Z,S),S=e.mul(_,S),_=e.mul(U,_),I=e.mul(m,I),T=e.mul(a,T),U=e.sub(A,T),U=e.mul(a,U),U=e.add(U,I),I=e.add(A,A),A=e.add(I,A),A=e.add(A,T),A=e.mul(A,U),S=e.add(S,A),T=e.mul(v,O),T=e.add(T,T),A=e.mul(T,U),_=e.sub(_,A),I=e.mul(T,Z),I=e.add(I,I),I=e.add(I,I),new d(_,S,I)}add(a){u(a);const{px:h,py:m,pz:p}=this,{px:v,py:O,pz:_}=a;let S=e.ZERO,I=e.ZERO,A=e.ZERO;const Z=n.a,T=e.mul(n.b,Lt);let U=e.mul(h,v),j=e.mul(m,O),b=e.mul(p,_),x=e.add(h,m),E=e.add(v,O);x=e.mul(x,E),E=e.add(U,j),x=e.sub(x,E),E=e.add(h,p);let q=e.add(v,_);return E=e.mul(E,q),q=e.add(U,b),E=e.sub(E,q),q=e.add(m,p),S=e.add(O,_),q=e.mul(q,S),S=e.add(j,b),q=e.sub(q,S),A=e.mul(Z,E),S=e.mul(T,b),A=e.add(S,A),S=e.sub(j,A),A=e.add(j,A),I=e.mul(S,A),j=e.add(U,U),j=e.add(j,U),b=e.mul(Z,b),E=e.mul(T,E),j=e.add(j,b),b=e.sub(U,b),b=e.mul(Z,b),E=e.add(E,b),U=e.mul(j,E),I=e.add(I,U),U=e.mul(q,E),S=e.mul(x,S),S=e.sub(S,U),U=e.mul(x,j),A=e.mul(q,A),A=e.add(A,U),new d(S,I,A)}subtract(a){return this.add(a.negate())}is0(){return this.equals(d.ZERO)}wNAF(a){return B.wNAFCached(this,a,d.normalizeZ)}multiplyUnsafe(a){const{endo:h,n:m}=n;it("scalar",a,G,m);const p=d.ZERO;if(a===G)return p;if(this.is0()||a===L)return this;if(!h||B.hasPrecomputes(this))return B.wNAFCachedUnsafe(this,a,d.normalizeZ);let{k1neg:v,k1:O,k2neg:_,k2:S}=h.splitScalar(a),I=p,A=p,Z=this;for(;O>G||S>G;)O&L&&(I=I.add(Z)),S&L&&(A=A.add(Z)),Z=Z.double(),O>>=L,S>>=L;return v&&(I=I.negate()),_&&(A=A.negate()),A=new d(e.mul(A.px,h.beta),A.py,A.pz),I.add(A)}multiply(a){const{endo:h,n:m}=n;it("scalar",a,L,m);let p,v;if(h){const{k1neg:O,k1:_,k2neg:S,k2:I}=h.splitScalar(a);let{p:A,f:Z}=this.wNAF(_),{p:T,f:U}=this.wNAF(I);A=B.constTimeNegate(O,A),T=B.constTimeNegate(S,T),T=new d(e.mul(T.px,h.beta),T.py,T.pz),p=A.add(T),v=Z.add(U)}else{const{p:O,f:_}=this.wNAF(a);p=O,v=_}return d.normalizeZ([p,v])[0]}multiplyAndAddUnsafe(a,h,m){const p=d.BASE,v=(_,S)=>S===G||S===L||!_.equals(p)?_.multiplyUnsafe(S):_.multiply(S),O=v(this,h).add(v(a,m));return O.is0()?void 0:O}toAffine(a){return g(this,a)}isTorsionFree(){const{h:a,isTorsionFree:h}=n;if(a===L)return!0;if(h)return h(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:a,clearCofactor:h}=n;return a===L?this:h?h(d,this):this.multiplyUnsafe(n.h)}toRawBytes(a=!0){return bt("isCompressed",a),this.assertValidity(),o(d,this,a)}toHex(a=!0){return bt("isCompressed",a),yt(this.toRawBytes(a))}}d.BASE=new d(n.Gx,n.Gy,e.ONE),d.ZERO=new d(e.ZERO,e.ONE,e.ZERO);const w=n.nBitLength,B=wn(d,n.endo?Math.ceil(w/2):w);return{CURVE:n,ProjectivePoint:d,normPrivateKeyToScalar:s,weierstrassEquation:c,isWithinCurveOrder:f}}function Bn(t){const n=Ue(t);return Et(n,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...n})}function vn(t){const n=Bn(t),{Fp:e,n:r}=n,o=e.BYTES+1,i=2*e.BYTES+1;function c(b){return C(b,r)}function f(b){return Jt(b,r)}const{ProjectivePoint:s,normPrivateKeyToScalar:u,weierstrassEquation:g,isWithinCurveOrder:l}=En({...n,toBytes(b,x,E){const q=x.toAffine(),N=e.toBytes(q.x),R=K;return bt("isCompressed",E),E?R(Uint8Array.from([x.hasEvenY()?2:3]),N):R(Uint8Array.from([4]),N,e.toBytes(q.y))},fromBytes(b){const x=b.length,E=b[0],q=b.subarray(1);if(x===o&&(E===2||E===3)){const N=$(q);if(!xt(N,L,e.ORDER))throw new Error("Point is not on curve");const R=g(N);let M;try{M=e.sqrt(R)}catch(Y){const P=Y instanceof Error?": "+Y.message:"";throw new Error("Point is not on curve"+P)}const z=(M&L)===L;return(E&1)===1!==z&&(M=e.neg(M)),{x:N,y:M}}else if(x===i&&E===4){const N=e.fromBytes(q.subarray(0,e.BYTES)),R=e.fromBytes(q.subarray(e.BYTES,2*e.BYTES));return{x:N,y:R}}else{const N=o,R=i;throw new Error("invalid Point, expected length of "+N+", or uncompressed "+R+", got "+x)}}}),d=b=>yt(st(b,n.nByteLength));function w(b){const x=r>>L;return b>x}function B(b){return w(b)?c(-b):b}const y=(b,x,E)=>$(b.slice(x,E));class a{constructor(x,E,q){this.r=x,this.s=E,this.recovery=q,this.assertValidity()}static fromCompact(x){const E=n.nByteLength;return x=V("compactSignature",x,E*2),new a(y(x,0,E),y(x,E,2*E))}static fromDER(x){const{r:E,s:q}=F.toSig(V("DER",x));return new a(E,q)}assertValidity(){it("r",this.r,L,r),it("s",this.s,L,r)}addRecoveryBit(x){return new a(this.r,this.s,x)}recoverPublicKey(x){const{r:E,s:q,recovery:N}=this,R=_(V("msgHash",x));if(N==null||![0,1,2,3].includes(N))throw new Error("recovery id invalid");const M=N===2||N===3?E+n.n:E;if(M>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const z=N&1?"03":"02",Q=s.fromHex(z+d(M)),Y=f(M),P=c(-R*Y),dt=c(q*Y),tt=s.BASE.multiplyAndAddUnsafe(Q,P,dt);if(!tt)throw new Error("point at infinify");return tt.assertValidity(),tt}hasHighS(){return w(this.s)}normalizeS(){return this.hasHighS()?new a(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return pt(this.toDERHex())}toDERHex(){return F.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return pt(this.toCompactHex())}toCompactHex(){return d(this.r)+d(this.s)}}const h={isValidPrivateKey(b){try{return u(b),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const b=qe(n.n);return dn(n.randomBytes(b),n.n)},precompute(b=8,x=s.BASE){return x._setWindowSize(b),x.multiply(BigInt(3)),x}};function m(b,x=!0){return s.fromPrivateKey(b).toRawBytes(x)}function p(b){const x=lt(b),E=typeof b=="string",q=(x||E)&&b.length;return x?q===o||q===i:E?q===2*o||q===2*i:b instanceof s}function v(b,x,E=!0){if(p(b))throw new Error("first arg must be private key");if(!p(x))throw new Error("second arg must be public key");return s.fromHex(x).multiply(u(b)).toRawBytes(E)}const O=n.bits2int||function(b){if(b.length>8192)throw new Error("input is too large");const x=$(b),E=b.length*8-n.nBitLength;return E>0?x>>BigInt(E):x},_=n.bits2int_modN||function(b){return c(O(b))},S=oe(n.nBitLength);function I(b){return it("num < 2^"+n.nBitLength,b,G,S),st(b,n.nByteLength)}function A(b,x,E=Z){if(["recovered","canonical"].some(ft=>ft in E))throw new Error("sign() legacy options not supported");const{hash:q,randomBytes:N}=n;let{lowS:R,prehash:M,extraEntropy:z}=E;R==null&&(R=!0),b=V("msgHash",b),de(E),M&&(b=V("prehashed msgHash",q(b)));const Q=_(b),Y=u(x),P=[I(Y),I(Q)];if(z!=null&&z!==!1){const ft=z===!0?N(e.BYTES):z;P.push(V("extraEntropy",ft))}const dt=K(...P),tt=Q;function zt(ft){const ht=O(ft);if(!l(ht))return;const Mt=f(ht),Bt=s.BASE.multiply(ht).toAffine(),at=c(Bt.x);if(at===G)return;const vt=c(Mt*c(tt+at*Y));if(vt===G)return;let St=(Bt.x===at?0:2)|Number(Bt.y&L),gt=vt;return R&&w(vt)&&(gt=B(vt),St^=1),new a(at,gt,St)}return{seed:dt,k2sig:zt}}const Z={lowS:n.lowS,prehash:!1},T={lowS:n.lowS,prehash:!1};function U(b,x,E=Z){const{seed:q,k2sig:N}=A(b,x,E),R=n;return Ee(R.hash.outputLen,R.nByteLength,R.hmac)(q,N)}s.BASE._setWindowSize(8);function j(b,x,E,q=T){var St;const N=b;x=V("msgHash",x),E=V("publicKey",E);const{lowS:R,prehash:M,format:z}=q;if(de(q),"strict"in q)throw new Error("options.strict was renamed to lowS");if(z!==void 0&&z!=="compact"&&z!=="der")throw new Error("format must be compact or der");const Q=typeof N=="string"||lt(N),Y=!Q&&!z&&typeof N=="object"&&N!==null&&typeof N.r=="bigint"&&typeof N.s=="bigint";if(!Q&&!Y)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let P,dt;try{if(Y&&(P=new a(N.r,N.s)),Q){try{z!=="compact"&&(P=a.fromDER(N))}catch(gt){if(!(gt instanceof F.Err))throw gt}!P&&z!=="der"&&(P=a.fromCompact(N))}dt=s.fromHex(E)}catch{return!1}if(!P||R&&P.hasHighS())return!1;M&&(x=n.hash(x));const{r:tt,s:zt}=P,ft=_(x),ht=f(zt),Mt=c(ft*ht),Bt=c(tt*ht),at=(St=s.BASE.multiplyAndAddUnsafe(dt,Mt,Bt))==null?void 0:St.toAffine();return at?c(at.x)===tt:!1}return{CURVE:n,getPublicKey:m,getSharedSecret:v,sign:U,verify:j,ProjectivePoint:s,Signature:a,utils:h}}function Sn(t,n){const e=t.ORDER;let r=G;for(let B=e-L;B%rt===G;B/=rt)r+=L;const o=r,i=rt<<o-L-L,c=i*rt,f=(e-L)/c,s=(f-L)/rt,u=c-L,g=i,l=t.pow(n,f),d=t.pow(n,(f+L)/rt);let w=(B,y)=>{let a=l,h=t.pow(y,u),m=t.sqr(h);m=t.mul(m,y);let p=t.mul(B,m);p=t.pow(p,s),p=t.mul(p,h),h=t.mul(p,y),m=t.mul(p,B);let v=t.mul(m,h);p=t.pow(v,g);let O=t.eql(p,t.ONE);h=t.mul(m,d),p=t.mul(v,a),m=t.cmov(h,m,O),v=t.cmov(p,v,O);for(let _=o;_>L;_--){let S=_-rt;S=rt<<S-L;let I=t.pow(v,S);const A=t.eql(I,t.ONE);h=t.mul(m,a),a=t.mul(a,a),I=t.mul(v,a),m=t.cmov(h,m,A),v=t.cmov(I,v,A)}return{isValid:O,value:m}};if(t.ORDER%he===Lt){const B=(t.ORDER-Lt)/he,y=t.sqrt(t.neg(n));w=(a,h)=>{let m=t.sqr(h);const p=t.mul(a,h);m=t.mul(m,p);let v=t.pow(m,B);v=t.mul(v,p);const O=t.mul(v,y),_=t.mul(t.sqr(v),h),S=t.eql(_,a);let I=t.cmov(O,v,S);return{isValid:S,value:I}}}return w}function An(t,n){if(Se(t),!t.isValid(n.A)||!t.isValid(n.B)||!t.isValid(n.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const e=Sn(t,n.Z);if(!t.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let o,i,c,f,s,u,g,l;o=t.sqr(r),o=t.mul(o,n.Z),i=t.sqr(o),i=t.add(i,o),c=t.add(i,t.ONE),c=t.mul(c,n.B),f=t.cmov(n.Z,t.neg(i),!t.eql(i,t.ZERO)),f=t.mul(f,n.A),i=t.sqr(c),u=t.sqr(f),s=t.mul(u,n.A),i=t.add(i,s),i=t.mul(i,c),u=t.mul(u,f),s=t.mul(u,n.B),i=t.add(i,s),g=t.mul(o,c);const{isValid:d,value:w}=e(i,u);l=t.mul(o,r),l=t.mul(l,w),g=t.cmov(g,c,d),l=t.cmov(l,w,d);const B=t.isOdd(r)===t.isOdd(l);return l=t.cmov(t.neg(l),l,B),g=t.div(g,f),{x:g,y:l}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function In(t){return{hash:t,hmac:(n,...e)=>ve(t,n,Pe(...e)),randomBytes:pe}}function _n(t,n){const e=r=>vn({...t,...In(r)});return{...e(n),create:e}}const qn=$;function ot(t,n){if(At(t),At(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 At(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function Nn(t,n,e,r){X(t),X(n),At(e),n.length>255&&(n=r(K(Zt("H2C-OVERSIZE-DST-"),n)));const{outputLen:o,blockLen:i}=r,c=Math.ceil(e/o);if(e>65535||c>255)throw new Error("expand_message_xmd: invalid lenInBytes");const f=K(n,ot(n.length,1)),s=ot(0,i),u=ot(e,2),g=new Array(c),l=r(K(s,t,u,ot(0,1),f));g[0]=r(K(l,ot(1,1),f));for(let w=1;w<=c;w++){const B=[On(l,g[w-1]),ot(w+1,1),f];g[w]=r(K(...B))}return K(...g).slice(0,e)}function Un(t,n,e,r,o){if(X(t),X(n),At(e),n.length>255){const i=Math.ceil(2*r/8);n=o.create({dkLen:i}).update(Zt("H2C-OVERSIZE-DST-")).update(n).digest()}if(e>65535||n.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:e}).update(t).update(ot(e,2)).update(n).update(ot(n.length,1)).digest()}function ge(t,n,e){Et(e,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:r,k:o,m:i,hash:c,expand:f,DST:s}=e;X(t),At(n);const u=typeof s=="string"?Zt(s):s,g=r.toString(2).length,l=Math.ceil((g+o)/8),d=n*i*l;let w;if(f==="xmd")w=Nn(t,u,d,c);else if(f==="xof")w=Un(t,u,d,o,c);else if(f==="_internal_pass")w=t;else throw new Error('expand must be "xmd" or "xof"');const B=new Array(n);for(let y=0;y<n;y++){const a=new Array(i);for(let h=0;h<i;h++){const m=l*(h+y*i),p=w.subarray(m,m+l);a[h]=C(qn(p),r)}B[y]=a}return B}function Ln(t,n){const e=n.map(r=>Array.from(r).reverse());return(r,o)=>{const[i,c,f,s]=e.map(u=>u.reduce((g,l)=>t.add(t.mul(g,r),l)));return r=t.div(i,c),o=t.mul(o,t.div(f,s)),{x:r,y:o}}}function Tn(t,n,e){if(typeof n!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(r,o){const i=ge(r,2,{...e,DST:e.DST,...o}),c=t.fromAffine(n(i[0])),f=t.fromAffine(n(i[1])),s=c.add(f).clearCofactor();return s.assertValidity(),s},encodeToCurve(r,o){const i=ge(r,1,{...e,DST:e.encodeDST,...o}),c=t.fromAffine(n(i[0])).clearCofactor();return c.assertValidity(),c},mapToCurve(r){if(!Array.isArray(r))throw new Error("mapToCurve: expected array of bigints");for(const i of r)if(typeof i!="bigint")throw new Error("mapToCurve: expected array of bigints");const o=t.fromAffine(n(r)).clearCofactor();return o.assertValidity(),o}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const qt=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Tt=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),It=BigInt(1),Ht=BigInt(2),we=(t,n)=>(t+n/Ht)/n;function Le(t){const n=qt,e=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),c=BigInt(23),f=BigInt(44),s=BigInt(88),u=t*t*t%n,g=u*u*t%n,l=D(g,e,n)*g%n,d=D(l,e,n)*g%n,w=D(d,Ht,n)*u%n,B=D(w,o,n)*w%n,y=D(B,i,n)*B%n,a=D(y,f,n)*y%n,h=D(a,s,n)*a%n,m=D(h,f,n)*y%n,p=D(m,e,n)*g%n,v=D(p,c,n)*B%n,O=D(v,r,n)*u%n,_=D(O,Ht,n);if(!ct.eql(ct.sqr(_),t))throw new Error("Cannot find square root");return _}const ct=Ie(qt,void 0,void 0,{sqrt:Le}),Vt=_n({a:BigInt(0),b:BigInt(7),Fp:ct,n:Tt,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const n=Tt,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-It*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=e,c=BigInt("0x100000000000000000000000000000000"),f=we(i*t,n),s=we(-r*t,n);let u=C(t-f*e-s*o,n),g=C(-f*r-s*i,n);const l=u>c,d=g>c;if(l&&(u=n-u),d&&(g=n-g),u>c||g>c)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:l,k1:u,k2neg:d,k2:g}}}},Ut),Te=BigInt(0),me={};function Rt(t,...n){let e=me[t];if(e===void 0){const r=Ut(Uint8Array.from(t,o=>o.charCodeAt(0)));e=K(r,r),me[t]=e}return Ut(K(e,...n))}const ie=t=>t.toRawBytes(!0).slice(1),Ft=t=>st(t,32),$t=t=>C(t,qt),_t=t=>C(t,Tt),se=Vt.ProjectivePoint,Hn=(t,n,e)=>se.BASE.multiplyAndAddUnsafe(t,n,e);function te(t){let n=Vt.utils.normPrivateKeyToScalar(t),e=se.fromPrivateKey(n);return{scalar:e.hasEvenY()?n:_t(-n),bytes:ie(e)}}function He(t){it("x",t,It,qt);const n=$t(t*t),e=$t(n*t+BigInt(7));let r=Le(e);r%Ht!==Te&&(r=$t(-r));const o=new se(t,r,It);return o.assertValidity(),o}const mt=$;function Re(...t){return _t(mt(Rt("BIP0340/challenge",...t)))}function Rn(t){return te(t).bytes}function Cn(t,n,e=pe(32)){const r=V("message",t),{bytes:o,scalar:i}=te(n),c=V("auxRand",e,32),f=Ft(i^mt(Rt("BIP0340/aux",c))),s=Rt("BIP0340/nonce",f,o,r),u=_t(mt(s));if(u===Te)throw new Error("sign failed: k is zero");const{bytes:g,scalar:l}=te(u),d=Re(g,o,r),w=new Uint8Array(64);if(w.set(g,0),w.set(Ft(_t(l+d*i)),32),!Ce(w,r,o))throw new Error("sign: Invalid signature produced");return w}function Ce(t,n,e){const r=V("signature",t,64),o=V("message",n),i=V("publicKey",e,32);try{const c=He(mt(i)),f=mt(r.subarray(0,32));if(!xt(f,It,qt))return!1;const s=mt(r.subarray(32,64));if(!xt(s,It,Tt))return!1;const u=Re(Ft(f),ie(c),o),g=Hn(c,s,_t(-u));return!(!g||!g.hasEvenY()||g.toAffine().x!==f)}catch{return!1}}const Yn=(()=>({getPublicKey:Rn,sign:Cn,verify:Ce,utils:{randomPrivateKey:Vt.utils.randomPrivateKey,lift_x:He,pointToBytes:ie,numberToBytesBE:st,bytesToNumberBE:$,taggedHash:Rt,mod:C}}))(),kn=(()=>Ln(ct,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(t=>t.map(n=>BigInt(n)))))(),Zn=(()=>An(ct,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:ct.create(BigInt("-11"))}))(),ke=(()=>Tn(Vt.ProjectivePoint,t=>{const{x:n,y:e}=Zn(ct.create(t[0]));return kn(n,e)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:ct.ORDER,m:1,k:128,expand:"xmd",hash:Ut}))(),Gn=(()=>ke.hashToCurve)(),Wn=(()=>ke.encodeToCurve)();export{Wn as encodeToCurve,Gn as hashToCurve,Yn as schnorr,Vt as secp256k1};
|
|
1
|
+
import{H as be,c as Pt,a as Nt,t as ye,b as Ze,w as Ve,r as W,d as ze,e as Me,f as Pe,g as pe}from"./index.es-2fd56c76.js";import"./index-7ad60780.js";import"./index-88f8dc1a.js";import"./index-accd8060.js";import"./index-1b1eb822.js";import"./index-6ab757a5.js";import"./index.es-f2ff8299.js";function je(t,n,e,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(n,e,r);const o=BigInt(32),i=BigInt(4294967295),c=Number(e>>o&i),f=Number(e&i),s=r?4:0,u=r?0:4;t.setUint32(n+s,c,r),t.setUint32(n+u,f,r)}function Ke(t,n,e){return t&n^~t&e}function De(t,n,e){return t&n^t&e^n&e}class Ye extends be{constructor(n,e,r,o){super(),this.blockLen=n,this.outputLen=e,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(n),this.view=Pt(this.buffer)}update(n){Nt(this);const{view:e,buffer:r,blockLen:o}=this;n=ye(n);const i=n.length;for(let c=0;c<i;){const f=Math.min(o-this.pos,i-c);if(f===o){const s=Pt(n);for(;o<=i-c;c+=o)this.process(s,c);continue}r.set(n.subarray(c,c+f),this.pos),this.pos+=f,c+=f,this.pos===o&&(this.process(e,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){Nt(this),Ze(n,this),this.finished=!0;const{buffer:e,view:r,blockLen:o,isLE:i}=this;let{pos:c}=this;e[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>o-c&&(this.process(r,0),c=0);for(let l=c;l<o;l++)e[l]=0;je(r,o-8,BigInt(this.length*8),i),this.process(r,0);const f=Pt(n),s=this.outputLen;if(s%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=s/4,g=this.get();if(u>g.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<u;l++)f.setUint32(4*l,g[l],i)}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:o,finished:i,destroyed:c,pos:f}=this;return n.length=o,n.pos=f,n.finished=i,n.destroyed=c,o%e&&n.buffer.set(r),n}}const Ge=new Uint32Array([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]),et=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),nt=new Uint32Array(64);class We extends Ye{constructor(){super(64,32,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:o,E:i,F:c,G:f,H:s}=this;return[n,e,r,o,i,c,f,s]}set(n,e,r,o,i,c,f,s){this.A=n|0,this.B=e|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=c|0,this.G=f|0,this.H=s|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 d=nt[l-15],w=nt[l-2],B=W(d,7)^W(d,18)^d>>>3,y=W(w,17)^W(w,19)^w>>>10;nt[l]=y+nt[l-7]+B+nt[l-16]|0}let{A:r,B:o,C:i,D:c,E:f,F:s,G:u,H:g}=this;for(let l=0;l<64;l++){const d=W(f,6)^W(f,11)^W(f,25),w=g+d+Ke(f,s,u)+Ge[l]+nt[l]|0,y=(W(r,2)^W(r,13)^W(r,22))+De(r,o,i)|0;g=u,u=s,s=f,f=c+w|0,c=i,i=o,o=r,r=w+y|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,c=c+this.D|0,f=f+this.E|0,s=s+this.F|0,u=u+this.G|0,g=g+this.H|0,this.set(r,o,i,c,f,s,u,g)}roundClean(){nt.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Ut=Ve(()=>new We);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ct=BigInt(0),kt=BigInt(1),$e=BigInt(2);function lt(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function X(t){if(!lt(t))throw new Error("Uint8Array expected")}function bt(t,n){if(typeof n!="boolean")throw new Error(t+" boolean expected, got "+n)}const Xe=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function yt(t){X(t);let n="";for(let e=0;e<t.length;e++)n+=Xe[t[e]];return n}function wt(t){const n=t.toString(16);return n.length&1?"0"+n:n}function ee(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?Ct:BigInt("0x"+t)}const J={_0:48,_9:57,A:65,F:70,a:97,f:102};function ce(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 pt(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof 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 o=0,i=0;o<e;o++,i+=2){const c=ce(t.charCodeAt(i)),f=ce(t.charCodeAt(i+1));if(c===void 0||f===void 0){const s=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+s+'" at index '+i)}r[o]=c*16+f}return r}function $(t){return ee(yt(t))}function ne(t){return X(t),ee(yt(Uint8Array.from(t).reverse()))}function st(t,n){return pt(t.toString(16).padStart(n*2,"0"))}function re(t,n){return st(t,n).reverse()}function Qe(t){return pt(wt(t))}function V(t,n,e){let r;if(typeof n=="string")try{r=pt(n)}catch(i){throw new Error(t+" must be hex string or Uint8Array, cause: "+i)}else if(lt(n))r=Uint8Array.from(n);else throw new Error(t+" must be hex string or Uint8Array");const o=r.length;if(typeof e=="number"&&o!==e)throw new Error(t+" of length "+e+" expected, got "+o);return r}function K(...t){let n=0;for(let r=0;r<t.length;r++){const o=t[r];X(o),n+=o.length}const e=new Uint8Array(n);for(let r=0,o=0;r<t.length;r++){const i=t[r];e.set(i,o),o+=i.length}return e}function Je(t,n){if(t.length!==n.length)return!1;let e=0;for(let r=0;r<t.length;r++)e|=t[r]^n[r];return e===0}function Zt(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}const jt=t=>typeof t=="bigint"&&Ct<=t;function xt(t,n,e){return jt(t)&&jt(n)&&jt(e)&&n<=t&&t<e}function it(t,n,e,r){if(!xt(n,e,r))throw new Error("expected valid "+t+": "+e+" <= n < "+r+", got "+n)}function xe(t){let n;for(n=0;t>Ct;t>>=kt,n+=1);return n}function Fe(t,n){return t>>BigInt(n)&kt}function tn(t,n,e){return t|(e?kt:Ct)<<BigInt(n)}const oe=t=>($e<<BigInt(t-1))-kt,Kt=t=>new Uint8Array(t),fe=t=>Uint8Array.from(t);function Ee(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),o=Kt(t),i=0;const c=()=>{r.fill(1),o.fill(0),i=0},f=(...l)=>e(o,r,...l),s=(l=Kt())=>{o=f(fe([0]),l),r=f(),l.length!==0&&(o=f(fe([1]),l),r=f())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let l=0;const d=[];for(;l<n;){r=f();const w=r.slice();d.push(w),l+=r.length}return K(...d)};return(l,d)=>{c(),s(l);let w;for(;!(w=d(u()));)s();return c(),w}}const en={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"||lt(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 Et(t,n,e={}){const r=(o,i,c)=>{const f=en[i];if(typeof f!="function")throw new Error("invalid validator function");const s=t[o];if(!(c&&s===void 0)&&!f(s,t))throw new Error("param "+String(o)+" is invalid. Expected "+i+", got "+s)};for(const[o,i]of Object.entries(n))r(o,i,!1);for(const[o,i]of Object.entries(e))r(o,i,!0);return t}const nn=()=>{throw new Error("not implemented")};function Xt(t){const n=new WeakMap;return(e,...r)=>{const o=n.get(e);if(o!==void 0)return o;const i=t(e,...r);return n.set(e,i),i}}const rn=Object.freeze(Object.defineProperty({__proto__:null,aInRange:it,abool:bt,abytes:X,bitGet:Fe,bitLen:xe,bitMask:oe,bitSet:tn,bytesToHex:yt,bytesToNumberBE:$,bytesToNumberLE:ne,concatBytes:K,createHmacDrbg:Ee,ensureBytes:V,equalBytes:Je,hexToBytes:pt,hexToNumber:ee,inRange:xt,isBytes:lt,memoized:Xt,notImplemented:nn,numberToBytesBE:st,numberToBytesLE:re,numberToHexUnpadded:wt,numberToVarBytesBE:Qe,utf8ToBytes:Zt,validateObject:Et},Symbol.toStringTag,{value:"Module"}));class Be extends be{constructor(n,e){super(),this.finished=!1,this.destroyed=!1,ze(n);const r=ye(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 o=this.blockLen,i=new Uint8Array(o);i.set(r.length>o?n.create().update(r).digest():r);for(let c=0;c<i.length;c++)i[c]^=54;this.iHash.update(i),this.oHash=n.create();for(let c=0;c<i.length;c++)i[c]^=106;this.oHash.update(i),i.fill(0)}update(n){return Nt(this),this.iHash.update(n),this}digestInto(n){Nt(this),Me(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:o,destroyed:i,blockLen:c,outputLen:f}=this;return n=n,n.finished=o,n.destroyed=i,n.blockLen=c,n.outputLen=f,n.oHash=e._cloneInto(n.oHash),n.iHash=r._cloneInto(n.iHash),n}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const ve=(t,n,e)=>new Be(t,n).update(e).digest();ve.create=(t,n)=>new Be(t,n);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const k=BigInt(0),H=BigInt(1),ut=BigInt(2),on=BigInt(3),Qt=BigInt(4),ae=BigInt(5),ue=BigInt(8);function C(t,n){const e=t%n;return e>=k?e:n+e}function sn(t,n,e){if(n<k)throw new Error("invalid exponent, negatives unsupported");if(e<=k)throw new Error("invalid modulus");if(e===H)return k;let r=H;for(;n>k;)n&H&&(r=r*t%e),t=t*t%e,n>>=H;return r}function D(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=C(t,n),r=n,o=k,i=H;for(;e!==k;){const f=r/e,s=r%e,u=o-i*f;r=e,e=s,o=i,i=u}if(r!==H)throw new Error("invert: does not exist");return C(o,n)}function cn(t){const n=(t-H)/ut;let e,r,o;for(e=t-H,r=0;e%ut===k;e/=ut,r++);for(o=ut;o<t&&sn(o,n,t)!==t-H;o++)if(o>1e3)throw new Error("Cannot find square root: likely non-prime P");if(r===1){const c=(t+H)/Qt;return function(s,u){const g=s.pow(u,c);if(!s.eql(s.sqr(g),u))throw new Error("Cannot find square root");return g}}const i=(e+H)/ut;return function(f,s){if(f.pow(s,n)===f.neg(f.ONE))throw new Error("Cannot find square root");let u=r,g=f.pow(f.mul(f.ONE,o),e),l=f.pow(s,i),d=f.pow(s,e);for(;!f.eql(d,f.ONE);){if(f.eql(d,f.ZERO))return f.ZERO;let w=1;for(let y=f.sqr(d);w<u&&!f.eql(y,f.ONE);w++)y=f.sqr(y);const B=f.pow(g,H<<BigInt(u-w-1));g=f.sqr(B),l=f.mul(l,B),d=f.mul(d,g),u=w}return l}}function fn(t){if(t%Qt===on){const n=(t+H)/Qt;return function(r,o){const i=r.pow(o,n);if(!r.eql(r.sqr(i),o))throw new Error("Cannot find square root");return i}}if(t%ue===ae){const n=(t-ae)/ue;return function(r,o){const i=r.mul(o,ut),c=r.pow(i,n),f=r.mul(o,c),s=r.mul(r.mul(f,ut),c),u=r.mul(f,r.sub(s,r.ONE));if(!r.eql(r.sqr(u),o))throw new Error("Cannot find square root");return u}}return cn(t)}const an=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Se(t){const n={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=an.reduce((r,o)=>(r[o]="function",r),n);return Et(t,e)}function un(t,n,e){if(e<k)throw new Error("invalid exponent, negatives unsupported");if(e===k)return t.ONE;if(e===H)return n;let r=t.ONE,o=n;for(;e>k;)e&H&&(r=t.mul(r,o)),o=t.sqr(o),e>>=H;return r}function ln(t,n){const e=new Array(n.length),r=n.reduce((i,c,f)=>t.is0(c)?i:(e[f]=i,t.mul(i,c)),t.ONE),o=t.inv(r);return n.reduceRight((i,c,f)=>t.is0(c)?i:(e[f]=t.mul(i,e[f]),t.mul(i,c)),o),e}function Ae(t,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:o,nByteLength:i}=Ae(t,n);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let c;const f=Object.freeze({ORDER:t,isLE:e,BITS:o,BYTES:i,MASK:oe(o),ZERO:k,ONE:H,create:s=>C(s,t),isValid:s=>{if(typeof s!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof s);return k<=s&&s<t},is0:s=>s===k,isOdd:s=>(s&H)===H,neg:s=>C(-s,t),eql:(s,u)=>s===u,sqr:s=>C(s*s,t),add:(s,u)=>C(s+u,t),sub:(s,u)=>C(s-u,t),mul:(s,u)=>C(s*u,t),pow:(s,u)=>un(f,s,u),div:(s,u)=>C(s*Jt(u,t),t),sqrN:s=>s*s,addN:(s,u)=>s+u,subN:(s,u)=>s-u,mulN:(s,u)=>s*u,inv:s=>Jt(s,t),sqrt:r.sqrt||(s=>(c||(c=fn(t)),c(f,s))),invertBatch:s=>ln(f,s),cmov:(s,u,g)=>g?u:s,toBytes:s=>e?re(s,i):st(s,i),fromBytes:s=>{if(s.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+s.length);return e?ne(s):$(s)}});return Object.freeze(f)}function _e(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 qe(t){const n=_e(t);return n+Math.ceil(n/2)}function dn(t,n,e=!1){const r=t.length,o=_e(n),i=qe(n);if(r<16||r<i||r>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+r);const c=e?ne(t):$(t),f=C(c,n-H)+H;return e?re(f,o):st(f,o)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const le=BigInt(0),Ot=BigInt(1);function Dt(t,n){const e=n.negate();return t?e:n}function Oe(t,n){if(!Number.isSafeInteger(t)||t<=0||t>n)throw new Error("invalid window size, expected [1.."+n+"], got W="+t)}function Yt(t,n){Oe(t,n);const e=Math.ceil(n/t)+1,r=2**(t-1);return{windows:e,windowSize:r}}function hn(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,Ne=new WeakMap;function Wt(t){return Ne.get(t)||1}function wn(t,n){return{constTimeNegate:Dt,hasPrecomputes(e){return Wt(e)!==1},unsafeLadder(e,r,o=t.ZERO){let i=e;for(;r>le;)r&Ot&&(o=o.add(i)),i=i.double(),r>>=Ot;return o},precomputeWindow(e,r){const{windows:o,windowSize:i}=Yt(r,n),c=[];let f=e,s=f;for(let u=0;u<o;u++){s=f,c.push(s);for(let g=1;g<i;g++)s=s.add(f),c.push(s);f=s.double()}return c},wNAF(e,r,o){const{windows:i,windowSize:c}=Yt(e,n);let f=t.ZERO,s=t.BASE;const u=BigInt(2**e-1),g=2**e,l=BigInt(e);for(let d=0;d<i;d++){const w=d*c;let B=Number(o&u);o>>=l,B>c&&(B-=g,o+=Ot);const y=w,a=w+Math.abs(B)-1,h=d%2!==0,m=B<0;B===0?s=s.add(Dt(h,r[y])):f=f.add(Dt(m,r[a]))}return{p:f,f:s}},wNAFUnsafe(e,r,o,i=t.ZERO){const{windows:c,windowSize:f}=Yt(e,n),s=BigInt(2**e-1),u=2**e,g=BigInt(e);for(let l=0;l<c;l++){const d=l*f;if(o===le)break;let w=Number(o&s);if(o>>=g,w>f&&(w-=u,o+=Ot),w===0)continue;let B=r[d+Math.abs(w)-1];w<0&&(B=B.negate()),i=i.add(B)}return i},getPrecomputes(e,r,o){let i=Gt.get(r);return i||(i=this.precomputeWindow(r,e),e!==1&&Gt.set(r,o(i))),i},wNAFCached(e,r,o){const i=Wt(e);return this.wNAF(i,this.getPrecomputes(i,e,o),r)},wNAFCachedUnsafe(e,r,o,i){const c=Wt(e);return c===1?this.unsafeLadder(e,r,i):this.wNAFUnsafe(c,this.getPrecomputes(c,e,o),r,i)},setWindowSize(e,r){Oe(r,n),Ne.set(e,r),Gt.delete(e)}}}function mn(t,n,e,r){if(hn(e,t),gn(r,n),e.length!==r.length)throw new Error("arrays of points and scalars must have equal length");const o=t.ZERO,i=xe(BigInt(e.length)),c=i>12?i-3:i>4?i-2:i?2:1,f=(1<<c)-1,s=new Array(f+1).fill(o),u=Math.floor((n.BITS-1)/c)*c;let g=o;for(let l=u;l>=0;l-=c){s.fill(o);for(let w=0;w<r.length;w++){const B=r[w],y=Number(B>>BigInt(l)&BigInt(f));s[y]=s[y].add(e[w])}let d=o;for(let w=s.length-1,B=o;w>0;w--)B=B.add(s[w]),d=d.add(B);if(g=g.add(d),l!==0)for(let w=0;w<c;w++)g=g.double()}return g}function Ue(t){return Se(t.Fp),Et(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Ae(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function de(t){t.lowS!==void 0&&bt("lowS",t.lowS),t.prehash!==void 0&&bt("prehash",t.prehash)}function bn(t){const n=Ue(t);Et(n,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:e,Fp:r,a:o}=n;if(e){if(!r.eql(o,r.ZERO))throw new Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...n})}const{bytesToNumberBE:yn,hexToBytes:pn}=rn;class xn extends Error{constructor(n=""){super(n)}}const F={Err:xn,_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,o=wt(r);if(o.length/2&128)throw new e("tlv.encode: long form length too big");const i=r>127?wt(o.length/2|128):"";return wt(t)+i+o+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 o=n[r++],i=!!(o&128);let c=0;if(!i)c=o;else{const s=o&127;if(!s)throw new e("tlv.decode(long): indefinite length not supported");if(s>4)throw new e("tlv.decode(long): byte length is too big");const u=n.subarray(r,r+s);if(u.length!==s)throw new e("tlv.decode: length bytes not complete");if(u[0]===0)throw new e("tlv.decode(long): zero leftmost byte");for(const g of u)c=c<<8|g;if(r+=s,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<G)throw new n("integer: negative integers are not allowed");let e=wt(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 yn(t)}},toSig(t){const{Err:n,_int:e,_tlv:r}=F,o=typeof t=="string"?pn(t):t;X(o);const{v:i,l:c}=r.decode(48,o);if(c.length)throw new n("invalid signature: left bytes after parsing");const{v:f,l:s}=r.decode(2,i),{v:u,l:g}=r.decode(2,s);if(g.length)throw new n("invalid signature: left bytes after parsing");return{r:e.decode(f),s:e.decode(u)}},hexFromSig(t){const{_tlv:n,_int:e}=F,r=n.encode(2,e.encode(t.r)),o=n.encode(2,e.encode(t.s)),i=r+o;return n.encode(48,i)}},G=BigInt(0),L=BigInt(1),rt=BigInt(2),Lt=BigInt(3),he=BigInt(4);function En(t){const n=bn(t),{Fp:e}=n,r=Ie(n.n,n.nBitLength),o=n.toBytes||((y,a,h)=>{const m=a.toAffine();return K(Uint8Array.from([4]),e.toBytes(m.x),e.toBytes(m.y))}),i=n.fromBytes||(y=>{const a=y.subarray(1),h=e.fromBytes(a.subarray(0,e.BYTES)),m=e.fromBytes(a.subarray(e.BYTES,2*e.BYTES));return{x:h,y:m}});function c(y){const{a,b:h}=n,m=e.sqr(y),p=e.mul(m,y);return e.add(e.add(p,e.mul(y,a)),h)}if(!e.eql(e.sqr(n.Gy),c(n.Gx)))throw new Error("bad generator point: equation left != right");function f(y){return xt(y,L,n.n)}function s(y){const{allowedPrivateKeyLengths:a,nByteLength:h,wrapPrivateKey:m,n:p}=n;if(a&&typeof y!="bigint"){if(lt(y)&&(y=yt(y)),typeof y!="string"||!a.includes(y.length))throw new Error("invalid private key");y=y.padStart(h*2,"0")}let v;try{v=typeof y=="bigint"?y:$(V("private key",y,h))}catch{throw new Error("invalid private key, expected hex or "+h+" bytes, got "+typeof y)}return m&&(v=C(v,p)),it("private key",v,L,p),v}function u(y){if(!(y instanceof d))throw new Error("ProjectivePoint expected")}const g=Xt((y,a)=>{const{px:h,py:m,pz:p}=y;if(e.eql(p,e.ONE))return{x:h,y:m};const v=y.is0();a==null&&(a=v?e.ONE:e.inv(p));const O=e.mul(h,a),_=e.mul(m,a),S=e.mul(p,a);if(v)return{x:e.ZERO,y:e.ZERO};if(!e.eql(S,e.ONE))throw new Error("invZ was invalid");return{x:O,y:_}}),l=Xt(y=>{if(y.is0()){if(n.allowInfinityPoint&&!e.is0(y.py))return;throw new Error("bad point: ZERO")}const{x:a,y:h}=y.toAffine();if(!e.isValid(a)||!e.isValid(h))throw new Error("bad point: x or y not FE");const m=e.sqr(h),p=c(a);if(!e.eql(m,p))throw new Error("bad point: equation left != right");if(!y.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class d{constructor(a,h,m){if(this.px=a,this.py=h,this.pz=m,a==null||!e.isValid(a))throw new Error("x required");if(h==null||!e.isValid(h))throw new Error("y required");if(m==null||!e.isValid(m))throw new Error("z required");Object.freeze(this)}static fromAffine(a){const{x:h,y:m}=a||{};if(!a||!e.isValid(h)||!e.isValid(m))throw new Error("invalid affine point");if(a instanceof d)throw new Error("projective point not allowed");const p=v=>e.eql(v,e.ZERO);return p(h)&&p(m)?d.ZERO:new d(h,m,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(a){const h=e.invertBatch(a.map(m=>m.pz));return a.map((m,p)=>m.toAffine(h[p])).map(d.fromAffine)}static fromHex(a){const h=d.fromAffine(i(V("pointHex",a)));return h.assertValidity(),h}static fromPrivateKey(a){return d.BASE.multiply(s(a))}static msm(a,h){return mn(d,r,a,h)}_setWindowSize(a){B.setWindowSize(this,a)}assertValidity(){l(this)}hasEvenY(){const{y:a}=this.toAffine();if(e.isOdd)return!e.isOdd(a);throw new Error("Field doesn't support isOdd")}equals(a){u(a);const{px:h,py:m,pz:p}=this,{px:v,py:O,pz:_}=a,S=e.eql(e.mul(h,_),e.mul(v,p)),I=e.eql(e.mul(m,_),e.mul(O,p));return S&&I}negate(){return new d(this.px,e.neg(this.py),this.pz)}double(){const{a,b:h}=n,m=e.mul(h,Lt),{px:p,py:v,pz:O}=this;let _=e.ZERO,S=e.ZERO,I=e.ZERO,A=e.mul(p,p),Z=e.mul(v,v),T=e.mul(O,O),U=e.mul(p,v);return U=e.add(U,U),I=e.mul(p,O),I=e.add(I,I),_=e.mul(a,I),S=e.mul(m,T),S=e.add(_,S),_=e.sub(Z,S),S=e.add(Z,S),S=e.mul(_,S),_=e.mul(U,_),I=e.mul(m,I),T=e.mul(a,T),U=e.sub(A,T),U=e.mul(a,U),U=e.add(U,I),I=e.add(A,A),A=e.add(I,A),A=e.add(A,T),A=e.mul(A,U),S=e.add(S,A),T=e.mul(v,O),T=e.add(T,T),A=e.mul(T,U),_=e.sub(_,A),I=e.mul(T,Z),I=e.add(I,I),I=e.add(I,I),new d(_,S,I)}add(a){u(a);const{px:h,py:m,pz:p}=this,{px:v,py:O,pz:_}=a;let S=e.ZERO,I=e.ZERO,A=e.ZERO;const Z=n.a,T=e.mul(n.b,Lt);let U=e.mul(h,v),j=e.mul(m,O),b=e.mul(p,_),x=e.add(h,m),E=e.add(v,O);x=e.mul(x,E),E=e.add(U,j),x=e.sub(x,E),E=e.add(h,p);let q=e.add(v,_);return E=e.mul(E,q),q=e.add(U,b),E=e.sub(E,q),q=e.add(m,p),S=e.add(O,_),q=e.mul(q,S),S=e.add(j,b),q=e.sub(q,S),A=e.mul(Z,E),S=e.mul(T,b),A=e.add(S,A),S=e.sub(j,A),A=e.add(j,A),I=e.mul(S,A),j=e.add(U,U),j=e.add(j,U),b=e.mul(Z,b),E=e.mul(T,E),j=e.add(j,b),b=e.sub(U,b),b=e.mul(Z,b),E=e.add(E,b),U=e.mul(j,E),I=e.add(I,U),U=e.mul(q,E),S=e.mul(x,S),S=e.sub(S,U),U=e.mul(x,j),A=e.mul(q,A),A=e.add(A,U),new d(S,I,A)}subtract(a){return this.add(a.negate())}is0(){return this.equals(d.ZERO)}wNAF(a){return B.wNAFCached(this,a,d.normalizeZ)}multiplyUnsafe(a){const{endo:h,n:m}=n;it("scalar",a,G,m);const p=d.ZERO;if(a===G)return p;if(this.is0()||a===L)return this;if(!h||B.hasPrecomputes(this))return B.wNAFCachedUnsafe(this,a,d.normalizeZ);let{k1neg:v,k1:O,k2neg:_,k2:S}=h.splitScalar(a),I=p,A=p,Z=this;for(;O>G||S>G;)O&L&&(I=I.add(Z)),S&L&&(A=A.add(Z)),Z=Z.double(),O>>=L,S>>=L;return v&&(I=I.negate()),_&&(A=A.negate()),A=new d(e.mul(A.px,h.beta),A.py,A.pz),I.add(A)}multiply(a){const{endo:h,n:m}=n;it("scalar",a,L,m);let p,v;if(h){const{k1neg:O,k1:_,k2neg:S,k2:I}=h.splitScalar(a);let{p:A,f:Z}=this.wNAF(_),{p:T,f:U}=this.wNAF(I);A=B.constTimeNegate(O,A),T=B.constTimeNegate(S,T),T=new d(e.mul(T.px,h.beta),T.py,T.pz),p=A.add(T),v=Z.add(U)}else{const{p:O,f:_}=this.wNAF(a);p=O,v=_}return d.normalizeZ([p,v])[0]}multiplyAndAddUnsafe(a,h,m){const p=d.BASE,v=(_,S)=>S===G||S===L||!_.equals(p)?_.multiplyUnsafe(S):_.multiply(S),O=v(this,h).add(v(a,m));return O.is0()?void 0:O}toAffine(a){return g(this,a)}isTorsionFree(){const{h:a,isTorsionFree:h}=n;if(a===L)return!0;if(h)return h(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:a,clearCofactor:h}=n;return a===L?this:h?h(d,this):this.multiplyUnsafe(n.h)}toRawBytes(a=!0){return bt("isCompressed",a),this.assertValidity(),o(d,this,a)}toHex(a=!0){return bt("isCompressed",a),yt(this.toRawBytes(a))}}d.BASE=new d(n.Gx,n.Gy,e.ONE),d.ZERO=new d(e.ZERO,e.ONE,e.ZERO);const w=n.nBitLength,B=wn(d,n.endo?Math.ceil(w/2):w);return{CURVE:n,ProjectivePoint:d,normPrivateKeyToScalar:s,weierstrassEquation:c,isWithinCurveOrder:f}}function Bn(t){const n=Ue(t);return Et(n,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...n})}function vn(t){const n=Bn(t),{Fp:e,n:r}=n,o=e.BYTES+1,i=2*e.BYTES+1;function c(b){return C(b,r)}function f(b){return Jt(b,r)}const{ProjectivePoint:s,normPrivateKeyToScalar:u,weierstrassEquation:g,isWithinCurveOrder:l}=En({...n,toBytes(b,x,E){const q=x.toAffine(),N=e.toBytes(q.x),R=K;return bt("isCompressed",E),E?R(Uint8Array.from([x.hasEvenY()?2:3]),N):R(Uint8Array.from([4]),N,e.toBytes(q.y))},fromBytes(b){const x=b.length,E=b[0],q=b.subarray(1);if(x===o&&(E===2||E===3)){const N=$(q);if(!xt(N,L,e.ORDER))throw new Error("Point is not on curve");const R=g(N);let M;try{M=e.sqrt(R)}catch(Y){const P=Y instanceof Error?": "+Y.message:"";throw new Error("Point is not on curve"+P)}const z=(M&L)===L;return(E&1)===1!==z&&(M=e.neg(M)),{x:N,y:M}}else if(x===i&&E===4){const N=e.fromBytes(q.subarray(0,e.BYTES)),R=e.fromBytes(q.subarray(e.BYTES,2*e.BYTES));return{x:N,y:R}}else{const N=o,R=i;throw new Error("invalid Point, expected length of "+N+", or uncompressed "+R+", got "+x)}}}),d=b=>yt(st(b,n.nByteLength));function w(b){const x=r>>L;return b>x}function B(b){return w(b)?c(-b):b}const y=(b,x,E)=>$(b.slice(x,E));class a{constructor(x,E,q){this.r=x,this.s=E,this.recovery=q,this.assertValidity()}static fromCompact(x){const E=n.nByteLength;return x=V("compactSignature",x,E*2),new a(y(x,0,E),y(x,E,2*E))}static fromDER(x){const{r:E,s:q}=F.toSig(V("DER",x));return new a(E,q)}assertValidity(){it("r",this.r,L,r),it("s",this.s,L,r)}addRecoveryBit(x){return new a(this.r,this.s,x)}recoverPublicKey(x){const{r:E,s:q,recovery:N}=this,R=_(V("msgHash",x));if(N==null||![0,1,2,3].includes(N))throw new Error("recovery id invalid");const M=N===2||N===3?E+n.n:E;if(M>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const z=N&1?"03":"02",Q=s.fromHex(z+d(M)),Y=f(M),P=c(-R*Y),dt=c(q*Y),tt=s.BASE.multiplyAndAddUnsafe(Q,P,dt);if(!tt)throw new Error("point at infinify");return tt.assertValidity(),tt}hasHighS(){return w(this.s)}normalizeS(){return this.hasHighS()?new a(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return pt(this.toDERHex())}toDERHex(){return F.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return pt(this.toCompactHex())}toCompactHex(){return d(this.r)+d(this.s)}}const h={isValidPrivateKey(b){try{return u(b),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const b=qe(n.n);return dn(n.randomBytes(b),n.n)},precompute(b=8,x=s.BASE){return x._setWindowSize(b),x.multiply(BigInt(3)),x}};function m(b,x=!0){return s.fromPrivateKey(b).toRawBytes(x)}function p(b){const x=lt(b),E=typeof b=="string",q=(x||E)&&b.length;return x?q===o||q===i:E?q===2*o||q===2*i:b instanceof s}function v(b,x,E=!0){if(p(b))throw new Error("first arg must be private key");if(!p(x))throw new Error("second arg must be public key");return s.fromHex(x).multiply(u(b)).toRawBytes(E)}const O=n.bits2int||function(b){if(b.length>8192)throw new Error("input is too large");const x=$(b),E=b.length*8-n.nBitLength;return E>0?x>>BigInt(E):x},_=n.bits2int_modN||function(b){return c(O(b))},S=oe(n.nBitLength);function I(b){return it("num < 2^"+n.nBitLength,b,G,S),st(b,n.nByteLength)}function A(b,x,E=Z){if(["recovered","canonical"].some(ft=>ft in E))throw new Error("sign() legacy options not supported");const{hash:q,randomBytes:N}=n;let{lowS:R,prehash:M,extraEntropy:z}=E;R==null&&(R=!0),b=V("msgHash",b),de(E),M&&(b=V("prehashed msgHash",q(b)));const Q=_(b),Y=u(x),P=[I(Y),I(Q)];if(z!=null&&z!==!1){const ft=z===!0?N(e.BYTES):z;P.push(V("extraEntropy",ft))}const dt=K(...P),tt=Q;function zt(ft){const ht=O(ft);if(!l(ht))return;const Mt=f(ht),Bt=s.BASE.multiply(ht).toAffine(),at=c(Bt.x);if(at===G)return;const vt=c(Mt*c(tt+at*Y));if(vt===G)return;let St=(Bt.x===at?0:2)|Number(Bt.y&L),gt=vt;return R&&w(vt)&&(gt=B(vt),St^=1),new a(at,gt,St)}return{seed:dt,k2sig:zt}}const Z={lowS:n.lowS,prehash:!1},T={lowS:n.lowS,prehash:!1};function U(b,x,E=Z){const{seed:q,k2sig:N}=A(b,x,E),R=n;return Ee(R.hash.outputLen,R.nByteLength,R.hmac)(q,N)}s.BASE._setWindowSize(8);function j(b,x,E,q=T){var St;const N=b;x=V("msgHash",x),E=V("publicKey",E);const{lowS:R,prehash:M,format:z}=q;if(de(q),"strict"in q)throw new Error("options.strict was renamed to lowS");if(z!==void 0&&z!=="compact"&&z!=="der")throw new Error("format must be compact or der");const Q=typeof N=="string"||lt(N),Y=!Q&&!z&&typeof N=="object"&&N!==null&&typeof N.r=="bigint"&&typeof N.s=="bigint";if(!Q&&!Y)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let P,dt;try{if(Y&&(P=new a(N.r,N.s)),Q){try{z!=="compact"&&(P=a.fromDER(N))}catch(gt){if(!(gt instanceof F.Err))throw gt}!P&&z!=="der"&&(P=a.fromCompact(N))}dt=s.fromHex(E)}catch{return!1}if(!P||R&&P.hasHighS())return!1;M&&(x=n.hash(x));const{r:tt,s:zt}=P,ft=_(x),ht=f(zt),Mt=c(ft*ht),Bt=c(tt*ht),at=(St=s.BASE.multiplyAndAddUnsafe(dt,Mt,Bt))==null?void 0:St.toAffine();return at?c(at.x)===tt:!1}return{CURVE:n,getPublicKey:m,getSharedSecret:v,sign:U,verify:j,ProjectivePoint:s,Signature:a,utils:h}}function Sn(t,n){const e=t.ORDER;let r=G;for(let B=e-L;B%rt===G;B/=rt)r+=L;const o=r,i=rt<<o-L-L,c=i*rt,f=(e-L)/c,s=(f-L)/rt,u=c-L,g=i,l=t.pow(n,f),d=t.pow(n,(f+L)/rt);let w=(B,y)=>{let a=l,h=t.pow(y,u),m=t.sqr(h);m=t.mul(m,y);let p=t.mul(B,m);p=t.pow(p,s),p=t.mul(p,h),h=t.mul(p,y),m=t.mul(p,B);let v=t.mul(m,h);p=t.pow(v,g);let O=t.eql(p,t.ONE);h=t.mul(m,d),p=t.mul(v,a),m=t.cmov(h,m,O),v=t.cmov(p,v,O);for(let _=o;_>L;_--){let S=_-rt;S=rt<<S-L;let I=t.pow(v,S);const A=t.eql(I,t.ONE);h=t.mul(m,a),a=t.mul(a,a),I=t.mul(v,a),m=t.cmov(h,m,A),v=t.cmov(I,v,A)}return{isValid:O,value:m}};if(t.ORDER%he===Lt){const B=(t.ORDER-Lt)/he,y=t.sqrt(t.neg(n));w=(a,h)=>{let m=t.sqr(h);const p=t.mul(a,h);m=t.mul(m,p);let v=t.pow(m,B);v=t.mul(v,p);const O=t.mul(v,y),_=t.mul(t.sqr(v),h),S=t.eql(_,a);let I=t.cmov(O,v,S);return{isValid:S,value:I}}}return w}function An(t,n){if(Se(t),!t.isValid(n.A)||!t.isValid(n.B)||!t.isValid(n.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const e=Sn(t,n.Z);if(!t.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let o,i,c,f,s,u,g,l;o=t.sqr(r),o=t.mul(o,n.Z),i=t.sqr(o),i=t.add(i,o),c=t.add(i,t.ONE),c=t.mul(c,n.B),f=t.cmov(n.Z,t.neg(i),!t.eql(i,t.ZERO)),f=t.mul(f,n.A),i=t.sqr(c),u=t.sqr(f),s=t.mul(u,n.A),i=t.add(i,s),i=t.mul(i,c),u=t.mul(u,f),s=t.mul(u,n.B),i=t.add(i,s),g=t.mul(o,c);const{isValid:d,value:w}=e(i,u);l=t.mul(o,r),l=t.mul(l,w),g=t.cmov(g,c,d),l=t.cmov(l,w,d);const B=t.isOdd(r)===t.isOdd(l);return l=t.cmov(t.neg(l),l,B),g=t.div(g,f),{x:g,y:l}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function In(t){return{hash:t,hmac:(n,...e)=>ve(t,n,Pe(...e)),randomBytes:pe}}function _n(t,n){const e=r=>vn({...t,...In(r)});return{...e(n),create:e}}const qn=$;function ot(t,n){if(At(t),At(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 At(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function Nn(t,n,e,r){X(t),X(n),At(e),n.length>255&&(n=r(K(Zt("H2C-OVERSIZE-DST-"),n)));const{outputLen:o,blockLen:i}=r,c=Math.ceil(e/o);if(e>65535||c>255)throw new Error("expand_message_xmd: invalid lenInBytes");const f=K(n,ot(n.length,1)),s=ot(0,i),u=ot(e,2),g=new Array(c),l=r(K(s,t,u,ot(0,1),f));g[0]=r(K(l,ot(1,1),f));for(let w=1;w<=c;w++){const B=[On(l,g[w-1]),ot(w+1,1),f];g[w]=r(K(...B))}return K(...g).slice(0,e)}function Un(t,n,e,r,o){if(X(t),X(n),At(e),n.length>255){const i=Math.ceil(2*r/8);n=o.create({dkLen:i}).update(Zt("H2C-OVERSIZE-DST-")).update(n).digest()}if(e>65535||n.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:e}).update(t).update(ot(e,2)).update(n).update(ot(n.length,1)).digest()}function ge(t,n,e){Et(e,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:r,k:o,m:i,hash:c,expand:f,DST:s}=e;X(t),At(n);const u=typeof s=="string"?Zt(s):s,g=r.toString(2).length,l=Math.ceil((g+o)/8),d=n*i*l;let w;if(f==="xmd")w=Nn(t,u,d,c);else if(f==="xof")w=Un(t,u,d,o,c);else if(f==="_internal_pass")w=t;else throw new Error('expand must be "xmd" or "xof"');const B=new Array(n);for(let y=0;y<n;y++){const a=new Array(i);for(let h=0;h<i;h++){const m=l*(h+y*i),p=w.subarray(m,m+l);a[h]=C(qn(p),r)}B[y]=a}return B}function Ln(t,n){const e=n.map(r=>Array.from(r).reverse());return(r,o)=>{const[i,c,f,s]=e.map(u=>u.reduce((g,l)=>t.add(t.mul(g,r),l)));return r=t.div(i,c),o=t.mul(o,t.div(f,s)),{x:r,y:o}}}function Tn(t,n,e){if(typeof n!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(r,o){const i=ge(r,2,{...e,DST:e.DST,...o}),c=t.fromAffine(n(i[0])),f=t.fromAffine(n(i[1])),s=c.add(f).clearCofactor();return s.assertValidity(),s},encodeToCurve(r,o){const i=ge(r,1,{...e,DST:e.encodeDST,...o}),c=t.fromAffine(n(i[0])).clearCofactor();return c.assertValidity(),c},mapToCurve(r){if(!Array.isArray(r))throw new Error("mapToCurve: expected array of bigints");for(const i of r)if(typeof i!="bigint")throw new Error("mapToCurve: expected array of bigints");const o=t.fromAffine(n(r)).clearCofactor();return o.assertValidity(),o}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const qt=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Tt=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),It=BigInt(1),Ht=BigInt(2),we=(t,n)=>(t+n/Ht)/n;function Le(t){const n=qt,e=BigInt(3),r=BigInt(6),o=BigInt(11),i=BigInt(22),c=BigInt(23),f=BigInt(44),s=BigInt(88),u=t*t*t%n,g=u*u*t%n,l=D(g,e,n)*g%n,d=D(l,e,n)*g%n,w=D(d,Ht,n)*u%n,B=D(w,o,n)*w%n,y=D(B,i,n)*B%n,a=D(y,f,n)*y%n,h=D(a,s,n)*a%n,m=D(h,f,n)*y%n,p=D(m,e,n)*g%n,v=D(p,c,n)*B%n,O=D(v,r,n)*u%n,_=D(O,Ht,n);if(!ct.eql(ct.sqr(_),t))throw new Error("Cannot find square root");return _}const ct=Ie(qt,void 0,void 0,{sqrt:Le}),Vt=_n({a:BigInt(0),b:BigInt(7),Fp:ct,n:Tt,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const n=Tt,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-It*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=e,c=BigInt("0x100000000000000000000000000000000"),f=we(i*t,n),s=we(-r*t,n);let u=C(t-f*e-s*o,n),g=C(-f*r-s*i,n);const l=u>c,d=g>c;if(l&&(u=n-u),d&&(g=n-g),u>c||g>c)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:l,k1:u,k2neg:d,k2:g}}}},Ut),Te=BigInt(0),me={};function Rt(t,...n){let e=me[t];if(e===void 0){const r=Ut(Uint8Array.from(t,o=>o.charCodeAt(0)));e=K(r,r),me[t]=e}return Ut(K(e,...n))}const ie=t=>t.toRawBytes(!0).slice(1),Ft=t=>st(t,32),$t=t=>C(t,qt),_t=t=>C(t,Tt),se=Vt.ProjectivePoint,Hn=(t,n,e)=>se.BASE.multiplyAndAddUnsafe(t,n,e);function te(t){let n=Vt.utils.normPrivateKeyToScalar(t),e=se.fromPrivateKey(n);return{scalar:e.hasEvenY()?n:_t(-n),bytes:ie(e)}}function He(t){it("x",t,It,qt);const n=$t(t*t),e=$t(n*t+BigInt(7));let r=Le(e);r%Ht!==Te&&(r=$t(-r));const o=new se(t,r,It);return o.assertValidity(),o}const mt=$;function Re(...t){return _t(mt(Rt("BIP0340/challenge",...t)))}function Rn(t){return te(t).bytes}function Cn(t,n,e=pe(32)){const r=V("message",t),{bytes:o,scalar:i}=te(n),c=V("auxRand",e,32),f=Ft(i^mt(Rt("BIP0340/aux",c))),s=Rt("BIP0340/nonce",f,o,r),u=_t(mt(s));if(u===Te)throw new Error("sign failed: k is zero");const{bytes:g,scalar:l}=te(u),d=Re(g,o,r),w=new Uint8Array(64);if(w.set(g,0),w.set(Ft(_t(l+d*i)),32),!Ce(w,r,o))throw new Error("sign: Invalid signature produced");return w}function Ce(t,n,e){const r=V("signature",t,64),o=V("message",n),i=V("publicKey",e,32);try{const c=He(mt(i)),f=mt(r.subarray(0,32));if(!xt(f,It,qt))return!1;const s=mt(r.subarray(32,64));if(!xt(s,It,Tt))return!1;const u=Re(Ft(f),ie(c),o),g=Hn(c,s,_t(-u));return!(!g||!g.hasEvenY()||g.toAffine().x!==f)}catch{return!1}}const Yn=(()=>({getPublicKey:Rn,sign:Cn,verify:Ce,utils:{randomPrivateKey:Vt.utils.randomPrivateKey,lift_x:He,pointToBytes:ie,numberToBytesBE:st,bytesToNumberBE:$,taggedHash:Rt,mod:C}}))(),kn=(()=>Ln(ct,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(t=>t.map(n=>BigInt(n)))))(),Zn=(()=>An(ct,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:ct.create(BigInt("-11"))}))(),ke=(()=>Tn(Vt.ProjectivePoint,t=>{const{x:n,y:e}=Zn(ct.create(t[0]));return kn(n,e)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:ct.ORDER,m:1,k:128,expand:"xmd",hash:Ut}))(),Gn=(()=>ke.hashToCurve)(),Wn=(()=>ke.encodeToCurve)();export{Wn as encodeToCurve,Gn as hashToCurve,Yn as schnorr,Vt as secp256k1};
|