@lydianpay/sdk-web 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lydian.iife.js +896 -0
- package/package.json +42 -0
|
@@ -0,0 +1,896 @@
|
|
|
1
|
+
(function(){"use strict";const $g='@import"https://fonts.googleapis.com/css2?family=Antic&family=Antic+Didone&display=swap";*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.col-start-1{grid-column-start:1}.row-start-1{grid-row-start:1}.m-4{margin:1rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-12{margin-top:3rem;margin-bottom:3rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-8{margin-top:2rem;margin-bottom:2rem}.-mr-px{margin-right:-1px}.-mt-px{margin-top:-1px}.mb-1\\.5{margin-bottom:.375rem}.mb-4{margin-bottom:1rem}.me-1{margin-inline-end:.25rem}.me-4{margin-inline-end:1rem}.mr-2{margin-right:.5rem}.ms-2{margin-inline-start:.5rem}.ms-3{margin-inline-start:.75rem}.mt-1{margin-top:.25rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.size-5{width:1.25rem;height:1.25rem}.h-12{height:3rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-72{height:18rem}.min-h-\\[200px\\]{min-height:200px}.w-1\\/2{width:50%}.w-1\\/4{width:25%}.w-12{width:3rem}.w-64{width:16rem}.w-\\[320px\\]{width:320px}.w-full{width:100%}.max-w-xs{max-width:20rem}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.table-fixed{table-layout:fixed}.border-separate{border-collapse:separate}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.self-center{align-self:center}.justify-self-end{justify-self:end}.break-all{word-break:break-all}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-md{border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.rounded-bl-md{border-bottom-left-radius:.375rem}.rounded-br-md{border-bottom-right-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-solid{border-style:solid}.border-dotted{border-style:dotted}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity,1))}.border-neutral-400{--tw-border-opacity:1;border-color:rgb(163 163 163/var(--tw-border-opacity,1))}.border-red-800{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity,1))}.border-transparent{border-color:transparent}.border-t-blue-600{--tw-border-opacity:1;border-top-color:rgb(37 99 235/var(--tw-border-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-12{padding-left:3rem;padding-right:3rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pl-3{padding-left:.75rem}.pr-8{padding-right:2rem}.ps-1{padding-inline-start:.25rem}.text-center{text-align:center}.text-right{text-align:right}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-sm\\/6{font-size:.875rem;line-height:1.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-5{line-height:1.25rem}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-1{outline-width:1px}.-outline-offset-1{outline-offset:-1px}.outline-gray-300{outline-color:#d1d5db}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-gray-200{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity,1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.text-lydian-green{color:#044d57}.bg-lydian-green{background:#044d57}.bg-lydian-green:hover{background:#033c46}.bg-lydian-light-green{background:#009393}.bg-lydian-light-green:hover{background:#008282}dialog{border:none;border-radius:12px;padding:1.25rem 1.25rem 1rem;box-shadow:0 10px 30px #0003;max-width:640px}dialog::backdrop{background:#00000080}.modal-header{display:flex;align-items:center;justify-content:start;gap:.5rem;margin-bottom:.5rem}.close-btn{border:0;background:transparent;font-size:1.25rem;line-height:1;padding:.5rem;cursor:pointer;border-radius:8px;width:40px;height:40px}.close-btn:hover{background:color-mix(in oklab,Canvas 92%,#000 8%)}.modal-body{line-height:1.5}.placeholder\\:text-gray-400::-moz-placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.placeholder\\:text-gray-400::placeholder{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.focus-within\\:relative:focus-within{position:relative}.hover\\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\\:bg-neutral-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.hover\\:bg-neutral-900:hover{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.hover\\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}@media(min-width:640px){.sm\\:size-4{width:1rem;height:1rem}.sm\\:flex-row{flex-direction:row}.sm\\:text-sm\\/6{font-size:.875rem;line-height:1.5rem}.sm\\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media(min-width:768px){.md\\:w-\\[600px\\]{width:600px}}@media(min-width:1024px){.lg\\:w-2\\/3{width:66.666667%}}',Mg=`<div class="font-antic">
|
|
2
|
+
<div id="testCanvas"></div>
|
|
3
|
+
<div id="containerPaymentSuccess" class="hidden flex flex-col items-center justify-center min-h-[200px]">
|
|
4
|
+
<p class="text-gray-600 text-lg font-medium">Payment Success!</p>
|
|
5
|
+
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6
|
+
<path
|
|
7
|
+
d="M50.0002 91.6666C73.0127 91.6666 91.6668 73.0124 91.6668 49.9999C91.6668 26.9874 73.0127 8.33325 50.0002 8.33325C26.9877 8.33325 8.3335 26.9874 8.3335 49.9999C8.3335 73.0124 26.9877 91.6666 50.0002 91.6666Z"
|
|
8
|
+
stroke="black" stroke-width="5" stroke-linecap="round" stroke-linejoin="round" />
|
|
9
|
+
<path d="M37.5 50.0001L45.8333 58.3334L62.5 41.6667" stroke="black" stroke-width="5" stroke-linecap="round"
|
|
10
|
+
stroke-linejoin="round" />
|
|
11
|
+
</svg>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div id="containerPaymentFailure" class="hidden flex flex-col items-center justify-center">
|
|
15
|
+
<p class="text-red-500 text-lg font-medium">Transaction Timed Out / Failed!</p>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div id="containerQRCode" class="hidden flex flex-col items-center justify-center">
|
|
19
|
+
<div class="m-4 text-center">
|
|
20
|
+
<span id="displayScanText"></span>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="border p-2 border-gray-500 h-64 w-64 rounded-xl">
|
|
23
|
+
<div id="canvasQRCode"></div>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="m-4 text-center">
|
|
27
|
+
Approval will be shown above when complete
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<table class="table-fixed w-full bg-gray-50 p-2 rounded-xl border-separate mt-5">
|
|
31
|
+
<tbody>
|
|
32
|
+
<tr>
|
|
33
|
+
<td>Total</td>
|
|
34
|
+
<td id="displayTotalAmount" class="text-right"></td>
|
|
35
|
+
</tr>
|
|
36
|
+
<tr>
|
|
37
|
+
<td>Payment Fee</td>
|
|
38
|
+
<td id="displayAdditionalCustomerFee" class="text-right"></td>
|
|
39
|
+
</tr>
|
|
40
|
+
<tr>
|
|
41
|
+
<td>Transaction ID</td>
|
|
42
|
+
<td id="displayTransactionID" class="text-right"></td>
|
|
43
|
+
</tr>
|
|
44
|
+
<tr>
|
|
45
|
+
<td>Total In Selected Asset</td>
|
|
46
|
+
<td id="displayAssetTotal" class="text-right"></td>
|
|
47
|
+
</tr>
|
|
48
|
+
<tr>
|
|
49
|
+
<td>QR Code Expires In</td>
|
|
50
|
+
<td id="displayExpirationLeft" class="text-right">15:00</td>
|
|
51
|
+
</tr>
|
|
52
|
+
</tbody>
|
|
53
|
+
</table>
|
|
54
|
+
|
|
55
|
+
<p id="qrCodeAmount" class="text-lg text-gray-900 sm:text-xl text-center mt-4"></p>
|
|
56
|
+
<button id="lydianBtnCancelCryptoPayment" class="text-sm text-gray-500 underline hover:text-gray-700">
|
|
57
|
+
Cancel and return
|
|
58
|
+
</button>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="lydianProcessingContainer" class="hidden flex flex-col items-center justify-center min-h-[200px]">
|
|
63
|
+
<div class="w-12 h-12 border-4 border-gray-300 border-t-blue-600 rounded-full animate-spin"></div>
|
|
64
|
+
<p id="lydianProcessingText" class="mt-4 text-gray-600 text-lg font-medium text-center"></p>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<button type="button" id="btnAppPayment"
|
|
68
|
+
class="hidden w-full rounded-md border border-transparent bg-lydian-green px-4 py-3 text-base font-medium mb-4 text-white shadow-md">
|
|
69
|
+
Pay with Lydian
|
|
70
|
+
</button>
|
|
71
|
+
<button type="button" id="btnCryptoPayment"
|
|
72
|
+
class="hidden w-full rounded-md border border-transparent bg-lydian-light-green px-4 py-3 text-base font-medium mb-4 text-white shadow-md">
|
|
73
|
+
Pay With Crypto
|
|
74
|
+
</button>
|
|
75
|
+
|
|
76
|
+
<div id="containerCryptoPayment" class="w-full bg-white rounded-xl shadow p-6 space-y-4 text-gray-800 hidden">
|
|
77
|
+
<div class="flex items-center space-x-2">
|
|
78
|
+
<div class="text-lg font-medium">Select An Asset</div>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<div class="space-y-2">
|
|
82
|
+
<div id="containerAssets" class="space-y-2">
|
|
83
|
+
</div>
|
|
84
|
+
<button id="btnMoreAssets" class="text-sm text-gray-500 underline hover:text-gray-700">
|
|
85
|
+
More Assets
|
|
86
|
+
</button>
|
|
87
|
+
<div id="containerAssetsMore" class="space-y-2 hidden">
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<p class="text-xs text-red-500">
|
|
92
|
+
Please ensure to select the correct network. Sending funds on the wrong
|
|
93
|
+
network will result in a loss of your funds.
|
|
94
|
+
</p>
|
|
95
|
+
|
|
96
|
+
<button id="btnCancelCryptoPayment" class="text-sm text-gray-500 underline hover:text-gray-700">
|
|
97
|
+
Cancel and return
|
|
98
|
+
</button>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<div id="containerNetworks" class="w-full bg-white rounded-xl shadow p-6 space-y-4 text-gray-800 hidden">
|
|
102
|
+
<div class="flex items-center space-x-2">
|
|
103
|
+
<img id="assetImg" src="" class="h-6" />
|
|
104
|
+
<div id="assetTitle" class="text-lg font-medium">USDT (Tether)</div>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<div class="text-sm font-medium">Select A Network</div>
|
|
108
|
+
|
|
109
|
+
<div class="space-y-2">
|
|
110
|
+
<div id="containerNetworkList" class="space-y-2">
|
|
111
|
+
</div>
|
|
112
|
+
<button id="btnMoreNetworks" class="text-sm text-gray-500 underline hover:text-gray-700">
|
|
113
|
+
More Networks
|
|
114
|
+
</button>
|
|
115
|
+
<div id="containerMoreNetworks" class="space-y-2 hidden">
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<p class="text-xs text-red-500">
|
|
120
|
+
Please ensure to select the correct network. Sending funds on the wrong
|
|
121
|
+
network will result in a loss of your funds.
|
|
122
|
+
</p>
|
|
123
|
+
|
|
124
|
+
<button id="lydianBtnCancelUsdtPayment" class="text-sm text-gray-500 underline hover:text-gray-700">
|
|
125
|
+
Cancel and return
|
|
126
|
+
</button>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
<div id="containerKYCAndTravelRules" class="w-full bg-white rounded-xl shadow p-6 space-y-4 text-gray-800 hidden">
|
|
130
|
+
<div class="flex items-center space-x-2">
|
|
131
|
+
<div class="text-lg font-medium">Submit Your Information</div>
|
|
132
|
+
</div>
|
|
133
|
+
<div>
|
|
134
|
+
<label for="email" class="block text-sm/6 font-medium">
|
|
135
|
+
Email
|
|
136
|
+
</label>
|
|
137
|
+
<div class="mt-2">
|
|
138
|
+
<input
|
|
139
|
+
id="email"
|
|
140
|
+
name="email"
|
|
141
|
+
type="email"
|
|
142
|
+
aria-label="Email"
|
|
143
|
+
placeholder="you@example.com"
|
|
144
|
+
class="border border-gray-400 block w-full rounded-md px-3 py-1.5 text-base outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
145
|
+
/>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
<div class="mt-4">
|
|
149
|
+
<fieldset>
|
|
150
|
+
<legend class="block text-sm/6 font-medium text-gray-900">Name</legend>
|
|
151
|
+
<div class="mt-2 grid grid-cols-2">
|
|
152
|
+
<div class="-mt-px -mr-px">
|
|
153
|
+
<input
|
|
154
|
+
id="firstName"
|
|
155
|
+
name="firstName"
|
|
156
|
+
type="text"
|
|
157
|
+
placeholder="First Name"
|
|
158
|
+
aria-label="First Name"
|
|
159
|
+
class="border border-gray-400 block w-full rounded-bl-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
160
|
+
/>
|
|
161
|
+
</div>
|
|
162
|
+
<div class="-mt-px">
|
|
163
|
+
<input
|
|
164
|
+
id="lastName"
|
|
165
|
+
name="lastName"
|
|
166
|
+
type="text"
|
|
167
|
+
placeholder="Last Name"
|
|
168
|
+
aria-label="Last Name"
|
|
169
|
+
class="border border-gray-400 block w-full rounded-br-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
170
|
+
/>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</fieldset>
|
|
174
|
+
</div>
|
|
175
|
+
<div class="mt-4">
|
|
176
|
+
<fieldset class="mt-6">
|
|
177
|
+
<legend class="block text-sm/6 font-medium text-gray-900">Address</legend>
|
|
178
|
+
<div class="mt-2">
|
|
179
|
+
<input
|
|
180
|
+
id="street"
|
|
181
|
+
name="street"
|
|
182
|
+
aria-label="Street Address"
|
|
183
|
+
type="text"
|
|
184
|
+
placeholder="Street Address"
|
|
185
|
+
class="border border-gray-400 block w-full rounded-md px-3 py-1.5 text-base outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
186
|
+
/>
|
|
187
|
+
</div>
|
|
188
|
+
<div class="mt-2 grid grid-cols-2">
|
|
189
|
+
<div class="-mt-px">
|
|
190
|
+
<input
|
|
191
|
+
id="city"
|
|
192
|
+
name="city"
|
|
193
|
+
type="text"
|
|
194
|
+
placeholder="City"
|
|
195
|
+
aria-label="City"
|
|
196
|
+
class="border border-gray-400 block w-full rounded-b-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
197
|
+
/>
|
|
198
|
+
</div>
|
|
199
|
+
<div class="-mt-px">
|
|
200
|
+
<input
|
|
201
|
+
id="region"
|
|
202
|
+
name="region"
|
|
203
|
+
type="text"
|
|
204
|
+
placeholder="State / Region"
|
|
205
|
+
aria-label="State / Region"
|
|
206
|
+
class="border border-gray-400 block w-full rounded-b-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
207
|
+
/>
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
<div class="mt-2 grid grid-cols-2">
|
|
211
|
+
<div class="-mt-px">
|
|
212
|
+
<input
|
|
213
|
+
id="postalCode"
|
|
214
|
+
name="postalCode"
|
|
215
|
+
type="text"
|
|
216
|
+
placeholder="ZIP / Postal code"
|
|
217
|
+
autoComplete="postal-code"
|
|
218
|
+
aria-label="ZIP / Postal code"
|
|
219
|
+
class="border border-gray-400 block w-full rounded-b-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
220
|
+
/>
|
|
221
|
+
</div>
|
|
222
|
+
<div class="grid grid-cols-1 focus-within:relative">
|
|
223
|
+
<select
|
|
224
|
+
id="country"
|
|
225
|
+
name="country"
|
|
226
|
+
autoComplete="country-name"
|
|
227
|
+
aria-label="Country"
|
|
228
|
+
class="border border-gray-400 col-start-1 row-start-1 w-full appearance-none rounded-t-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
229
|
+
>
|
|
230
|
+
<option value="US">United States</option>
|
|
231
|
+
</select>
|
|
232
|
+
<svg
|
|
233
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
234
|
+
viewBox="0 -960 960 960"
|
|
235
|
+
fill="currentColor"
|
|
236
|
+
aria-hidden="true"
|
|
237
|
+
class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4"
|
|
238
|
+
>
|
|
239
|
+
<path d="M480-380L276-584l20-20 184 184 184-184 20 20-204 204z" />
|
|
240
|
+
</svg>
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
</fieldset>
|
|
244
|
+
</div>
|
|
245
|
+
<div id="containerKYCAndTravelRulesDocument" class="mt-4 hidden">
|
|
246
|
+
<fieldset class="mt-6">
|
|
247
|
+
<legend class="block text-sm/6 font-medium text-gray-900">Verification Document</legend>
|
|
248
|
+
<p class="mt-1 text-sm ">PNG, JPG or PDF</p>
|
|
249
|
+
<div class="mt-2 grid grid-cols-1 focus-within:relative">
|
|
250
|
+
<select
|
|
251
|
+
id="documentType"
|
|
252
|
+
name="documentType"
|
|
253
|
+
aria-label="Document Type"
|
|
254
|
+
class="border border-gray-400 col-start-1 row-start-1 w-full appearance-none rounded-t-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
255
|
+
>
|
|
256
|
+
<option value="ID_CARD">Identity (ID) Card</option>
|
|
257
|
+
<option value="PASSPORT">Passport</option>
|
|
258
|
+
<option value="RESIDENCE_PERMIT">Residence Permit</option>
|
|
259
|
+
<option value="DRIVERS">Drivers License</option>
|
|
260
|
+
</select>
|
|
261
|
+
<svg
|
|
262
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
263
|
+
viewBox="0 -960 960 960"
|
|
264
|
+
fill="currentColor"
|
|
265
|
+
aria-hidden="true"
|
|
266
|
+
class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4"
|
|
267
|
+
>
|
|
268
|
+
<path d="M480-380L276-584l20-20 184 184 184-184 20 20-204 204z" />
|
|
269
|
+
</svg>
|
|
270
|
+
</div>
|
|
271
|
+
<div class="mt-2">
|
|
272
|
+
<div class="flex">
|
|
273
|
+
<p class="w-1/4 text-right">Front Page</p>
|
|
274
|
+
<input
|
|
275
|
+
class="ms-3 grow-1 block text-sm border border-gray-300 rounded-lg cursor-pointer bg-gray-50 p-1"
|
|
276
|
+
id="documentFileFront" type="file" />
|
|
277
|
+
</div>
|
|
278
|
+
<div class="flex mt-2" id="documentFileBackContainer">
|
|
279
|
+
<p class="w-1/4 text-right">Back Page</p>
|
|
280
|
+
<input
|
|
281
|
+
class="ms-3 grow-1 block text-sm border border-gray-300 rounded-lg cursor-pointer bg-gray-50 p-1"
|
|
282
|
+
id="documentFileBack" type="file" />
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
</fieldset>
|
|
286
|
+
</div>
|
|
287
|
+
<div class="flex justify-center items-center gap-3 my-8">
|
|
288
|
+
<button id="buttonKYCVerificationAndTravelRules"
|
|
289
|
+
class="w-1/2 max-w-75 items-center rounded-md bg-neutral-800 px-12 py-2 text-sm font-semibold text-white shadow-sm hover:bg-neutral-900">
|
|
290
|
+
Submit
|
|
291
|
+
</button>
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
|
|
295
|
+
<!-- TODO: clear this container when going back or using loadInitialState -->
|
|
296
|
+
<div id="connectWalletContainer" class="w-full bg-white rounded-xl shadow p-6 space-y-4 text-gray-800 hidden">
|
|
297
|
+
<div class="flex items-center space-x-2">
|
|
298
|
+
<div class="text-lg font-medium">Connect A Wallet</div>
|
|
299
|
+
</div>
|
|
300
|
+
|
|
301
|
+
<div class="space-y-2">
|
|
302
|
+
<div id="containerWalletList" class="space-y-2">
|
|
303
|
+
</div>
|
|
304
|
+
<button id="btnMoreWallets" class="text-sm text-gray-500 underline hover:text-gray-700">
|
|
305
|
+
More Wallets
|
|
306
|
+
</button>
|
|
307
|
+
<div id="containerMoreWallets" class="space-y-2 hidden">
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
|
|
311
|
+
<div class="flex items-center justify-center space-x-2">
|
|
312
|
+
<div class="text-lg font-medium text-center text">Or</div>
|
|
313
|
+
</div>
|
|
314
|
+
|
|
315
|
+
<div class="space-y-2">
|
|
316
|
+
<div id="containerWalletManual" class="space-y-2"></div>
|
|
317
|
+
</div>
|
|
318
|
+
|
|
319
|
+
<p class="text-xs text-red-500">
|
|
320
|
+
Please ensure to select the correct network. Sending funds on the wrong
|
|
321
|
+
network will result in a loss of your funds.
|
|
322
|
+
</p>
|
|
323
|
+
|
|
324
|
+
<button id="lydianBtnCancelWalletConnect" class="text-sm text-gray-500 underline hover:text-gray-700">
|
|
325
|
+
Cancel and return
|
|
326
|
+
</button>
|
|
327
|
+
</div>
|
|
328
|
+
|
|
329
|
+
<!-- Modal for popup flow -->
|
|
330
|
+
<dialog class="lg:w-2/3 w-full" id="modal" aria-labelledby="modalTitle" aria-modal="true">
|
|
331
|
+
<div class="modal-header">
|
|
332
|
+
<div class="w-full flex justify-between space-x-2">
|
|
333
|
+
<div class="flex flex-row items-center gap-2">
|
|
334
|
+
<button class="close-btn" id="modalBtnBack" type="button" aria-label="Back">←</button>
|
|
335
|
+
<div class="text-lg font-medium" id="modalTitle">Select an Asset</div>
|
|
336
|
+
</div>
|
|
337
|
+
<a id="modalHeaderButtonNeedHelp" class="hidden text-gray-500" href="#" target="_blank">Need Help?</a>
|
|
338
|
+
</div>
|
|
339
|
+
</div>
|
|
340
|
+
<div class="modal-body">
|
|
341
|
+
<div id="modalContainerPaymentSuccess"
|
|
342
|
+
class="flex flex-col items-center justify-center min-h-[200px]">
|
|
343
|
+
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
344
|
+
<path
|
|
345
|
+
d="M50.0002 91.6666C73.0127 91.6666 91.6668 73.0124 91.6668 49.9999C91.6668 26.9874 73.0127 8.33325 50.0002 8.33325C26.9877 8.33325 8.3335 26.9874 8.3335 49.9999C8.3335 73.0124 26.9877 91.6666 50.0002 91.6666Z"
|
|
346
|
+
stroke="black" stroke-width="5" stroke-linecap="round" stroke-linejoin="round" />
|
|
347
|
+
<path d="M37.5 50.0001L45.8333 58.3334L62.5 41.6667" stroke="black" stroke-width="5" stroke-linecap="round"
|
|
348
|
+
stroke-linejoin="round" />
|
|
349
|
+
</svg>
|
|
350
|
+
<p class="text-lg mt-4 font-bold">Transaction Complete</p>
|
|
351
|
+
<p class="text-gray-500 text-sm mt-1 font-medium">Lydian ID: <span
|
|
352
|
+
id="modalLydianID">JJLKLJ34NKL3</span></p>
|
|
353
|
+
<div id="modalOverpaidWarning" class="mt-4 mx-auto bg-red-100 rounded-xl p-2 md:w-[600px] w-full hidden">
|
|
354
|
+
<div class="flex items-start gap-2">
|
|
355
|
+
<svg width="42" height="38" viewBox="0 0 21 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
356
|
+
<path
|
|
357
|
+
d="M10.5 2.23152L18.7952 16.7657H2.20476L10.5 2.23152ZM0.298949 15.6485C-0.549302 17.1344 0.508258 19 2.20476 19H18.7952C20.4917 19 21.5493 17.1344 20.7011 15.6485L12.4058 1.11436C11.5576 -0.371454 9.44244 -0.371454 8.59419 1.11436L0.298949 15.6485ZM9.39837 7.82846V10.0628C9.39837 10.6772 9.89411 11.1799 10.5 11.1799C11.1059 11.1799 11.6016 10.6772 11.6016 10.0628V7.82846C11.6016 7.21402 11.1059 6.7113 10.5 6.7113C9.89411 6.7113 9.39837 7.21402 9.39837 7.82846ZM9.39837 13.4142H11.6016V15.6485H9.39837V13.4142Z"
|
|
358
|
+
fill="#8B162B" />
|
|
359
|
+
</svg>
|
|
360
|
+
<p class="text-red-900">You transferred more USDt than required for this
|
|
361
|
+
purchase. The excess amount will be returned to you within 24 hours, minus any applicable gas fees. <a
|
|
362
|
+
id="modalTransactionCompleteButtonNeedHelp" class="hidden" href="#" target="_blank">Need help?</a>
|
|
363
|
+
</p>
|
|
364
|
+
</div>
|
|
365
|
+
</div>
|
|
366
|
+
<div id="modalOverpaidLessThanGasFeesWarning"
|
|
367
|
+
class="mt-4 mx-auto bg-red-100 rounded-xl p-2 md:w-[600px] w-full hidden">
|
|
368
|
+
<div class="flex items-start gap-2">
|
|
369
|
+
<svg width="42" height="38" viewBox="0 0 21 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
370
|
+
<path
|
|
371
|
+
d="M10.5 2.23152L18.7952 16.7657H2.20476L10.5 2.23152ZM0.298949 15.6485C-0.549302 17.1344 0.508258 19 2.20476 19H18.7952C20.4917 19 21.5493 17.1344 20.7011 15.6485L12.4058 1.11436C11.5576 -0.371454 9.44244 -0.371454 8.59419 1.11436L0.298949 15.6485ZM9.39837 7.82846V10.0628C9.39837 10.6772 9.89411 11.1799 10.5 11.1799C11.1059 11.1799 11.6016 10.6772 11.6016 10.0628V7.82846C11.6016 7.21402 11.1059 6.7113 10.5 6.7113C9.89411 6.7113 9.39837 7.21402 9.39837 7.82846ZM9.39837 13.4142H11.6016V15.6485H9.39837V13.4142Z"
|
|
372
|
+
fill="#8B162B" />
|
|
373
|
+
</svg>
|
|
374
|
+
<p class="text-red-900">You transferred more USDT than required for this purchase. However, the excess
|
|
375
|
+
amount is less than the gas fee, so we are unable to return it. <a
|
|
376
|
+
id="modalOverpaidButtonNeedHelp" class="hidden" href="#" target="_blank">Need help?</a>
|
|
377
|
+
</p>
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
<div class="flex flex-col justify-center items-center w-full">
|
|
381
|
+
<div class="flex flex-row justify-between w-full mt-8">
|
|
382
|
+
<p class="font-bold">Transaction Amount</p>
|
|
383
|
+
<p><span id="modalTransactionAmount">9.50</span></p>
|
|
384
|
+
</div>
|
|
385
|
+
<div class="flex flex-row justify-between w-full mt-2">
|
|
386
|
+
<p class="font-bold">Transaction Amount (USDt)</p>
|
|
387
|
+
<p><span id="modalTransactionAmountUSDT">9.9885</span> USDt</p>
|
|
388
|
+
</div>
|
|
389
|
+
<div class="flex flex-row justify-between w-full mt-2">
|
|
390
|
+
<p class="font-bold">Amount Paid (USDt)</p>
|
|
391
|
+
<p><span id="modalTransactionTotalAmountUSDT">19.9885</span> USDt</p>
|
|
392
|
+
</div>
|
|
393
|
+
<div id="modalTransactionOverpaidAmountUSDTContainer"
|
|
394
|
+
class="flex flex-row justify-between w-full mt-2 hidden">
|
|
395
|
+
<p class="font-bold">Over Payment Amount</p>
|
|
396
|
+
<p><span id="modalTransactionOverpaidAmountUSDT">10</span> USDt</p>
|
|
397
|
+
</div>
|
|
398
|
+
<div id="modalTransactionReturnAmountUSDTContainer" class="flex flex-row justify-between w-full mt-2 hidden">
|
|
399
|
+
<p class="text-green-600 font-bold">Amount to be Returned</p>
|
|
400
|
+
<p class="text-green-600 font-bold"><span id="modalTransactionReturnAmountUSDT">9.50</span> USDt</p>
|
|
401
|
+
</div>
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
|
|
405
|
+
<div id="modalContainerPaymentFailure" class="hidden flex flex-col items-center justify-center">
|
|
406
|
+
<p class="text-red-500 text-lg font-medium">Transaction Timed Out / Failed!</p>
|
|
407
|
+
</div>
|
|
408
|
+
|
|
409
|
+
<div id="modalContainerQRCode">
|
|
410
|
+
<div id="modalUnderpaidWarning"
|
|
411
|
+
class="mt-4 mx-auto bg-red-100 rounded-xl p-2 md:w-[600px] w-full hidden">
|
|
412
|
+
<div class="flex items-start gap-2">
|
|
413
|
+
<svg width="42" height="38" viewBox="0 0 21 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
414
|
+
<path
|
|
415
|
+
d="M10.5 2.23152L18.7952 16.7657H2.20476L10.5 2.23152ZM0.298949 15.6485C-0.549302 17.1344 0.508258 19 2.20476 19H18.7952C20.4917 19 21.5493 17.1344 20.7011 15.6485L12.4058 1.11436C11.5576 -0.371454 9.44244 -0.371454 8.59419 1.11436L0.298949 15.6485ZM9.39837 7.82846V10.0628C9.39837 10.6772 9.89411 11.1799 10.5 11.1799C11.1059 11.1799 11.6016 10.6772 11.6016 10.0628V7.82846C11.6016 7.21402 11.1059 6.7113 10.5 6.7113C9.89411 6.7113 9.39837 7.21402 9.39837 7.82846ZM9.39837 13.4142H11.6016V15.6485H9.39837V13.4142Z"
|
|
416
|
+
fill="#8B162B" />
|
|
417
|
+
</svg>
|
|
418
|
+
<p class="text-red-900">You haven’t transferred enough USDt to complete this <span
|
|
419
|
+
id="modalTransactionAmountForUnderpaidWarning">$9</span> purchase. Please scan the new QR code
|
|
420
|
+
below to send the remaining balance.<a href="#" id="modalUnderpaidButtonNeedHelp" class="hidden"
|
|
421
|
+
target="_blank">Need help?</a>
|
|
422
|
+
</p>
|
|
423
|
+
</div>
|
|
424
|
+
</div>
|
|
425
|
+
<div id="modalUnderpaidAmountsBlock"
|
|
426
|
+
class="mt-4 p-4 mx-auto border-solid border-gray-200 border-2 rounded-xl p-2 md:w-[600px] w-full flex flex-col hidden">
|
|
427
|
+
<div class="flex items-center justify-between gap-2">
|
|
428
|
+
<div class="flex flex-col">
|
|
429
|
+
<p class="font-bold">Transaction Amount: </p>
|
|
430
|
+
<p><span id="modalTransactionAmountForUnderpaid">$9</span></p>
|
|
431
|
+
</div>
|
|
432
|
+
<div class="flex flex-col text-right">
|
|
433
|
+
<p class="font-bold">Amount Already Paid: </p>
|
|
434
|
+
<p>
|
|
435
|
+
<span id="modalTransactionPaidAmountForUnderpaid">$8</span>
|
|
436
|
+
<button id="modalButtonTransactionDetails"
|
|
437
|
+
class="rounded-md text-gray-400 hover:text-gray-700 hover:bg-gray-100"
|
|
438
|
+
aria-label="Transaction Details">
|
|
439
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
440
|
+
<g clip-path="url(#clip0_12225_39810)">
|
|
441
|
+
<path
|
|
442
|
+
d="M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z"
|
|
443
|
+
stroke="#757575" stroke-linecap="round" stroke-linejoin="round" />
|
|
444
|
+
<path d="M6 8V6" stroke="#757575" stroke-linecap="round" stroke-linejoin="round" />
|
|
445
|
+
<path d="M6 4H6.005" stroke="#757575" stroke-linecap="round" stroke-linejoin="round" />
|
|
446
|
+
</g>
|
|
447
|
+
<defs>
|
|
448
|
+
<clipPath id="clip0_12225_39810">
|
|
449
|
+
<rect width="12" height="12" fill="white" />
|
|
450
|
+
</clipPath>
|
|
451
|
+
</defs>
|
|
452
|
+
</svg>
|
|
453
|
+
<span class="sr-only">Transaction Details</span>
|
|
454
|
+
</button>
|
|
455
|
+
</p>
|
|
456
|
+
</div>
|
|
457
|
+
</div>
|
|
458
|
+
<div id="modalTransactionDetailsContainer" class="hidden">
|
|
459
|
+
<hr class="text-gray-200 my-2" />
|
|
460
|
+
<div id="modalTransactionDetailItemsContainer" class="mt-6"></div>
|
|
461
|
+
</div>
|
|
462
|
+
</div>
|
|
463
|
+
<div class="m-4 text-center">
|
|
464
|
+
<span id="modalDisplayScanText"></span>
|
|
465
|
+
</div>
|
|
466
|
+
<div class="flex flex-col sm:flex-row justify-center items-center">
|
|
467
|
+
<div class="border p-2 border-gray-500 h-72 w-64 rounded-xl me-4">
|
|
468
|
+
<div id="modalCanvasQRCode"><img src="./qrcode.png" /></div>
|
|
469
|
+
<div class="text-center mt-2 flex items-center justify-center">
|
|
470
|
+
<svg class="me-1" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
471
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
472
|
+
<g clipPath="url(#clip0_12056_34118)">
|
|
473
|
+
<path
|
|
474
|
+
d="M15.87 15.25L12.5 13.25V8.71999C12.5 8.31999 12.18 7.99999 11.78 7.99999H11.72C11.32 7.99999 11 8.31999 11 8.71999V13.44C11 13.79 11.18 14.12 11.49 14.3L15.14 16.49C15.48 16.69 15.92 16.59 16.12 16.25C16.33 15.9 16.22 15.45 15.87 15.25ZM21.18 5.00999L18.1 2.44999C17.68 2.09999 17.05 2.14999 16.69 2.57999C16.34 2.99999 16.4 3.62999 16.82 3.98999L19.89 6.54999C20.31 6.89999 20.94 6.84999 21.3 6.41999C21.66 5.99999 21.6 5.36999 21.18 5.00999ZM4.1 6.54999L7.17 3.98999C7.6 3.62999 7.66 2.99999 7.3 2.57999C6.95 2.14999 6.32 2.09999 5.9 2.44999L2.82 5.00999C2.4 5.36999 2.34 5.99999 2.7 6.41999C3.05 6.84999 3.68 6.89999 4.1 6.54999ZM12 3.99999C7.03 3.99999 3 8.02999 3 13C3 17.97 7.03 22 12 22C16.97 22 21 17.97 21 13C21 8.02999 16.97 3.99999 12 3.99999ZM12 20C8.14 20 5 16.86 5 13C5 9.13999 8.14 5.99999 12 5.99999C15.86 5.99999 19 9.13999 19 13C19 16.86 15.86 20 12 20Z"
|
|
475
|
+
fill="#212126" />
|
|
476
|
+
</g>
|
|
477
|
+
<defs>
|
|
478
|
+
<clipPath id="clip0_12056_34118">
|
|
479
|
+
<rect width="24" height="24" fill="white" />
|
|
480
|
+
</clipPath>
|
|
481
|
+
</defs>
|
|
482
|
+
</svg>
|
|
483
|
+
Expires In
|
|
484
|
+
<span class="ps-1" id="modalDisplayExpirationLeft">15:00</span>
|
|
485
|
+
</div>
|
|
486
|
+
</div>
|
|
487
|
+
<div>
|
|
488
|
+
<div>
|
|
489
|
+
<p class="mt-4 text-xl font-bold">Amount</p>
|
|
490
|
+
<p class="text-4xl font-bold"><span id="modalDisplayAssetTotal">9.9885 USDt</span>
|
|
491
|
+
<button id="modalButtonCopyAssetTotal"
|
|
492
|
+
data-copy=""
|
|
493
|
+
class="ms-2 p-1.5 rounded-md text-gray-400 hover:text-gray-700 hover:bg-gray-100"
|
|
494
|
+
aria-label="Copy">
|
|
495
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
496
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
497
|
+
<g clipPath="url(#clip0_12056_32426)">
|
|
498
|
+
<path
|
|
499
|
+
d="M15 1H4C2.9 1 2 1.9 2 3V16C2 16.55 2.45 17 3 17C3.55 17 4 16.55 4 16V4C4 3.45 4.45 3 5 3H15C15.55 3 16 2.55 16 2C16 1.45 15.55 1 15 1ZM19 5H8C6.9 5 6 5.9 6 7V21C6 22.1 6.9 23 8 23H19C20.1 23 21 22.1 21 21V7C21 5.9 20.1 5 19 5ZM18 21H9C8.45 21 8 20.55 8 20V8C8 7.45 8.45 7 9 7H18C18.55 7 19 7.45 19 8V20C19 20.55 18.55 21 18 21Z"
|
|
500
|
+
fill="#101014" />
|
|
501
|
+
</g>
|
|
502
|
+
<defs>
|
|
503
|
+
<clipPath id="clip0_12056_32426">
|
|
504
|
+
<rect width="24" height="24" fill="white" />
|
|
505
|
+
</clipPath>
|
|
506
|
+
</defs>
|
|
507
|
+
</svg>
|
|
508
|
+
<span class="sr-only">Copy amount</span>
|
|
509
|
+
</button>
|
|
510
|
+
</p>
|
|
511
|
+
<p>on <span id="modalDisplayNetwork"></span> Network</p>
|
|
512
|
+
</div>
|
|
513
|
+
<div>
|
|
514
|
+
<p class="mt-4 text-xl font-bold">Address</p>
|
|
515
|
+
<div class="w-[320px] mt-2">
|
|
516
|
+
<div
|
|
517
|
+
class="flex items-start justify-between gap-2 rounded-xl bg-gray-50 ring-1 ring-gray-200 px-3 py-2">
|
|
518
|
+
<p id="modalDisplayWalletAddress"
|
|
519
|
+
class="text-sm text-gray-600 leading-5 break-all select-text"></p>
|
|
520
|
+
<button
|
|
521
|
+
id="modalButtonCopyWalletAddress"
|
|
522
|
+
data-copy=""
|
|
523
|
+
class="shrink-0 p-1.5 rounded-md text-gray-400 hover:text-gray-700 hover:bg-gray-100"
|
|
524
|
+
aria-label="Copy">
|
|
525
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
526
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
527
|
+
<g clipPath="url(#clip0_12056_34117)">
|
|
528
|
+
<path
|
|
529
|
+
d="M15 1H4C2.9 1 2 1.9 2 3V16C2 16.55 2.45 17 3 17C3.55 17 4 16.55 4 16V4C4 3.45 4.45 3 5 3H15C15.55 3 16 2.55 16 2C16 1.45 15.55 1 15 1ZM19 5H8C6.9 5 6 5.9 6 7V21C6 22.1 6.9 23 8 23H19C20.1 23 21 22.1 21 21V7C21 5.9 20.1 5 19 5ZM18 21H9C8.45 21 8 20.55 8 20V8C8 7.45 8.45 7 9 7H18C18.55 7 19 7.45 19 8V20C19 20.55 18.55 21 18 21Z"
|
|
530
|
+
fill="#8F8F8F" />
|
|
531
|
+
</g>
|
|
532
|
+
<defs>
|
|
533
|
+
<clipPath id="clip0_12056_34117">
|
|
534
|
+
<rect width="24" height="24" fill="white" />
|
|
535
|
+
</clipPath>
|
|
536
|
+
</defs>
|
|
537
|
+
</svg>
|
|
538
|
+
</button>
|
|
539
|
+
</div>
|
|
540
|
+
</div>
|
|
541
|
+
</div>
|
|
542
|
+
</div>
|
|
543
|
+
</div>
|
|
544
|
+
<div id="modalUnderpaidButtonsContainer" class="flex justify-center items-center gap-3 my-8 hidden">
|
|
545
|
+
<button id="modalButtonCancelTransaction"
|
|
546
|
+
class="w-1/2 max-w-75 items-center rounded-md border border-neutral-400 bg-gray-100 px-12 py-2 text-sm font-semibold text-neutral-900 shadow-sm hover:bg-neutral-50 hidden">
|
|
547
|
+
Cancel Transaction
|
|
548
|
+
</button>
|
|
549
|
+
<button id="modalButtonChooseDifferentAsset"
|
|
550
|
+
class="w-1/2 max-w-75 items-center rounded-md bg-neutral-800 px-12 py-2 text-sm font-semibold text-white shadow-sm hover:bg-neutral-900">
|
|
551
|
+
Choose Different Asset
|
|
552
|
+
</button>
|
|
553
|
+
</div>
|
|
554
|
+
<div class="mt-4 mx-auto bg-red-200 rounded-xl p-2 md:w-[600px] w-full">
|
|
555
|
+
<div class="flex items-start gap-2">
|
|
556
|
+
<svg width="21" height="19" viewBox="0 0 21 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
557
|
+
<path
|
|
558
|
+
d="M10.5 2.23152L18.7952 16.7657H2.20476L10.5 2.23152ZM0.298949 15.6485C-0.549302 17.1344 0.508258 19 2.20476 19H18.7952C20.4917 19 21.5493 17.1344 20.7011 15.6485L12.4058 1.11436C11.5576 -0.371454 9.44244 -0.371454 8.59419 1.11436L0.298949 15.6485ZM9.39837 7.82846V10.0628C9.39837 10.6772 9.89411 11.1799 10.5 11.1799C11.1059 11.1799 11.6016 10.6772 11.6016 10.0628V7.82846C11.6016 7.21402 11.1059 6.7113 10.5 6.7113C9.89411 6.7113 9.39837 7.21402 9.39837 7.82846ZM9.39837 13.4142H11.6016V15.6485H9.39837V13.4142Z"
|
|
559
|
+
fill="#8B162B" />
|
|
560
|
+
</svg>
|
|
561
|
+
<p class="text-red-900">Please double-check these details. Crypto withdrawals are irreversible.</p>
|
|
562
|
+
</div>
|
|
563
|
+
</div>
|
|
564
|
+
</div>
|
|
565
|
+
|
|
566
|
+
<div id="modalLydianProcessingContainer" class="hidden flex flex-col items-center justify-center min-h-[200px]">
|
|
567
|
+
<div class="w-12 h-12 border-4 border-gray-300 border-t-blue-600 rounded-full animate-spin"></div>
|
|
568
|
+
<p id="modallydianProcessingText" class="mt-4 text-gray-600 text-lg font-medium text-center"></p>
|
|
569
|
+
</div>
|
|
570
|
+
|
|
571
|
+
<div id="modalContainerCryptoPayment"
|
|
572
|
+
class="w-full space-y-4 hidden">
|
|
573
|
+
<div class="flex items-center space-x-2">
|
|
574
|
+
<div class="text-lg font-medium">Select from Popular</div>
|
|
575
|
+
</div>
|
|
576
|
+
|
|
577
|
+
<div class="space-y-2">
|
|
578
|
+
<div id="modalContainerAssets" class="space-y-2">
|
|
579
|
+
</div>
|
|
580
|
+
</div>
|
|
581
|
+
</div>
|
|
582
|
+
|
|
583
|
+
<div id="modalContainerNetworks" class="w-full bg-white rounded-xl shadow p-6 space-y-4 text-gray-800 hidden">
|
|
584
|
+
<div class="flex items-center space-x-2">
|
|
585
|
+
<img id="modalAssetImg" src="" class="h-6" />
|
|
586
|
+
<div id="modalAssetTitle" class="text-lg font-medium">USDT (Tether)</div>
|
|
587
|
+
</div>
|
|
588
|
+
|
|
589
|
+
<div class="text-sm font-medium">Select A Network</div>
|
|
590
|
+
|
|
591
|
+
<div class="space-y-2">
|
|
592
|
+
<div id="modalContainerNetworkList" class="space-y-2">
|
|
593
|
+
</div>
|
|
594
|
+
<button id="modalBtnMoreNetworks" class="text-sm text-gray-500 underline hover:text-gray-700">
|
|
595
|
+
More Networks
|
|
596
|
+
</button>
|
|
597
|
+
<div id="modalContainerMoreNetworks" class="space-y-2 hidden">
|
|
598
|
+
</div>
|
|
599
|
+
</div>
|
|
600
|
+
|
|
601
|
+
<p class="text-xs text-red-500">
|
|
602
|
+
Please ensure to select the correct network. Sending funds on the wrong
|
|
603
|
+
network will result in a loss of your funds.
|
|
604
|
+
</p>
|
|
605
|
+
</div>
|
|
606
|
+
|
|
607
|
+
<div id="modalContainerKYCAndTravelRulesContainer">
|
|
608
|
+
<div>
|
|
609
|
+
<label for="modalEmail" class="block text-sm/6 font-medium">
|
|
610
|
+
Email
|
|
611
|
+
</label>
|
|
612
|
+
<div class="mt-2">
|
|
613
|
+
<input
|
|
614
|
+
id="modalEmail"
|
|
615
|
+
name="modalEmail"
|
|
616
|
+
type="email"
|
|
617
|
+
aria-label="Email"
|
|
618
|
+
placeholder="you@example.com"
|
|
619
|
+
class="border border-gray-400 block w-full rounded-md px-3 py-1.5 text-base outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
620
|
+
/>
|
|
621
|
+
</div>
|
|
622
|
+
</div>
|
|
623
|
+
<div class="mt-4">
|
|
624
|
+
<fieldset>
|
|
625
|
+
<legend class="block text-sm/6 font-medium text-gray-900">Name</legend>
|
|
626
|
+
<div class="mt-2 grid grid-cols-2">
|
|
627
|
+
<div class="-mt-px -mr-px">
|
|
628
|
+
<input
|
|
629
|
+
id="modalFirstName"
|
|
630
|
+
name="modalFirstName"
|
|
631
|
+
type="text"
|
|
632
|
+
placeholder="First Name"
|
|
633
|
+
aria-label="First Name"
|
|
634
|
+
class="border border-gray-400 block w-full rounded-bl-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
635
|
+
/>
|
|
636
|
+
</div>
|
|
637
|
+
<div class="-mt-px">
|
|
638
|
+
<input
|
|
639
|
+
id="modalLastName"
|
|
640
|
+
name="modalLastName"
|
|
641
|
+
type="text"
|
|
642
|
+
placeholder="Last Name"
|
|
643
|
+
aria-label="Last Name"
|
|
644
|
+
class="border border-gray-400 block w-full rounded-br-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
645
|
+
/>
|
|
646
|
+
</div>
|
|
647
|
+
</div>
|
|
648
|
+
</fieldset>
|
|
649
|
+
</div>
|
|
650
|
+
<div class="mt-4">
|
|
651
|
+
<fieldset class="mt-6">
|
|
652
|
+
<legend class="block text-sm/6 font-medium text-gray-900">Address</legend>
|
|
653
|
+
<div class="mt-2">
|
|
654
|
+
<input
|
|
655
|
+
id="modalStreet"
|
|
656
|
+
name="modalStreet"
|
|
657
|
+
aria-label="Street Address"
|
|
658
|
+
type="text"
|
|
659
|
+
placeholder="Street Address"
|
|
660
|
+
class="border border-gray-400 block w-full rounded-md px-3 py-1.5 text-base outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
661
|
+
/>
|
|
662
|
+
</div>
|
|
663
|
+
<div class="mt-2 grid grid-cols-2">
|
|
664
|
+
<div class="-mt-px">
|
|
665
|
+
<input
|
|
666
|
+
id="modalCity"
|
|
667
|
+
name="modalCity"
|
|
668
|
+
type="text"
|
|
669
|
+
placeholder="City"
|
|
670
|
+
aria-label="City"
|
|
671
|
+
class="border border-gray-400 block w-full rounded-b-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
672
|
+
/>
|
|
673
|
+
</div>
|
|
674
|
+
<div class="-mt-px">
|
|
675
|
+
<input
|
|
676
|
+
id="modalRegion"
|
|
677
|
+
name="modalRegion"
|
|
678
|
+
type="text"
|
|
679
|
+
placeholder="State / Region"
|
|
680
|
+
aria-label="State / Region"
|
|
681
|
+
class="border border-gray-400 block w-full rounded-b-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
682
|
+
/>
|
|
683
|
+
</div>
|
|
684
|
+
</div>
|
|
685
|
+
<div class="mt-2 grid grid-cols-2">
|
|
686
|
+
<div class="-mt-px">
|
|
687
|
+
<input
|
|
688
|
+
id="modalPostalCode"
|
|
689
|
+
name="modalPostalCode"
|
|
690
|
+
type="text"
|
|
691
|
+
placeholder="ZIP / Postal code"
|
|
692
|
+
autoComplete="postal-code"
|
|
693
|
+
aria-label="ZIP / Postal code"
|
|
694
|
+
class="border border-gray-400 block w-full rounded-b-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
695
|
+
/>
|
|
696
|
+
</div>
|
|
697
|
+
<div class="grid grid-cols-1 focus-within:relative">
|
|
698
|
+
<select
|
|
699
|
+
id="modalCountry"
|
|
700
|
+
name="modalCountry"
|
|
701
|
+
autoComplete="country-name"
|
|
702
|
+
aria-label="Country"
|
|
703
|
+
class="border border-gray-400 col-start-1 row-start-1 w-full appearance-none rounded-t-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
704
|
+
>
|
|
705
|
+
<option value="US">United States</option>
|
|
706
|
+
</select>
|
|
707
|
+
<svg
|
|
708
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
709
|
+
viewBox="0 -960 960 960"
|
|
710
|
+
fill="currentColor"
|
|
711
|
+
aria-hidden="true"
|
|
712
|
+
class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4"
|
|
713
|
+
>
|
|
714
|
+
<path d="M480-380L276-584l20-20 184 184 184-184 20 20-204 204z" />
|
|
715
|
+
</svg>
|
|
716
|
+
</div>
|
|
717
|
+
</div>
|
|
718
|
+
</fieldset>
|
|
719
|
+
</div>
|
|
720
|
+
<div id="modalContainerKYCAndTravelRulesDocument" class="mt-4 hidden">
|
|
721
|
+
<fieldset class="mt-6">
|
|
722
|
+
<legend class="block text-sm/6 font-medium text-gray-900">Verification Document</legend>
|
|
723
|
+
<p class="mt-1 text-sm ">PNG, JPG or PDF</p>
|
|
724
|
+
<div class="mt-2 grid grid-cols-1 focus-within:relative">
|
|
725
|
+
<select
|
|
726
|
+
id="modalDocumentType"
|
|
727
|
+
name="modalDocumentType"
|
|
728
|
+
aria-label="Document Type"
|
|
729
|
+
class="border border-gray-400 col-start-1 row-start-1 w-full appearance-none rounded-t-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 sm:text-sm/6"
|
|
730
|
+
>
|
|
731
|
+
<option value="ID_CARD">Identity (ID) Card</option>
|
|
732
|
+
<option value="PASSPORT">Passport</option>
|
|
733
|
+
<option value="RESIDENCE_PERMIT">Residence Permit</option>
|
|
734
|
+
<option value="DRIVERS">Drivers License</option>
|
|
735
|
+
</select>
|
|
736
|
+
<svg
|
|
737
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
738
|
+
viewBox="0 -960 960 960"
|
|
739
|
+
fill="currentColor"
|
|
740
|
+
aria-hidden="true"
|
|
741
|
+
class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4"
|
|
742
|
+
>
|
|
743
|
+
<path d="M480-380L276-584l20-20 184 184 184-184 20 20-204 204z" />
|
|
744
|
+
</svg>
|
|
745
|
+
</div>
|
|
746
|
+
<div class="mt-2">
|
|
747
|
+
<div class="flex">
|
|
748
|
+
<p class="w-1/4 text-right">Front Page</p>
|
|
749
|
+
<input
|
|
750
|
+
class="ms-3 grow-1 block text-sm border border-gray-300 rounded-lg cursor-pointer bg-gray-50 p-1"
|
|
751
|
+
id="modalDocumentFileFront" type="file" />
|
|
752
|
+
</div>
|
|
753
|
+
<div class="flex mt-2" id="modalDocumentFileBackContainer">
|
|
754
|
+
<p class="w-1/4 text-right">Back Page</p>
|
|
755
|
+
<input
|
|
756
|
+
class="ms-3 grow-1 block text-sm border border-gray-300 rounded-lg cursor-pointer bg-gray-50 p-1"
|
|
757
|
+
id="modalDocumentFileBack" type="file" />
|
|
758
|
+
</div>
|
|
759
|
+
</div>
|
|
760
|
+
</fieldset>
|
|
761
|
+
</div>
|
|
762
|
+
<div class="flex justify-center items-center gap-3 my-8">
|
|
763
|
+
<button id="modelButtonKYCVerificationAndTravelRules"
|
|
764
|
+
class="w-1/2 max-w-75 items-center rounded-md bg-neutral-800 px-12 py-2 text-sm font-semibold text-white shadow-sm hover:bg-neutral-900">
|
|
765
|
+
Submit
|
|
766
|
+
</button>
|
|
767
|
+
</div>
|
|
768
|
+
</div>
|
|
769
|
+
</div>
|
|
770
|
+
</dialog>
|
|
771
|
+
|
|
772
|
+
<!-- Modal for cancel transaction -->
|
|
773
|
+
<dialog class="lg:w-2/3 w-full" id="modalCancelTransaction"
|
|
774
|
+
aria-labelledby="modalCancelTransactionTitle"
|
|
775
|
+
aria-modal="true">
|
|
776
|
+
<div class="modal-body w-full">
|
|
777
|
+
<svg class="mx-auto mt-12 block" width="92" height="92" viewBox="0 0 92 92" fill="none"
|
|
778
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
779
|
+
<path
|
|
780
|
+
d="M83.2983 69.0001L52.6316 15.3334C51.963 14.1535 50.9933 13.1721 49.8215 12.4893C48.6497 11.8065 47.3178 11.4468 45.9616 11.4468C44.6055 11.4468 43.2735 11.8065 42.1018 12.4893C40.93 13.1721 39.9603 14.1535 39.2916 15.3334L8.62497 69.0001C7.94909 70.1706 7.59468 71.499 7.59768 72.8507C7.60067 74.2023 7.96096 75.5292 8.64202 76.6967C9.32308 77.8642 10.3007 78.831 11.4758 79.4989C12.6509 80.1668 13.9817 80.5122 15.3333 80.5001H76.6666C78.0118 80.4987 79.3328 80.1434 80.4972 79.47C81.6616 78.7965 82.6283 77.8286 83.3003 76.6633C83.9722 75.4981 84.3258 74.1765 84.3254 72.8314C84.3251 71.4863 83.9709 70.165 83.2983 69.0001Z"
|
|
781
|
+
stroke="black" stroke-width="5" stroke-linecap="round" stroke-linejoin="round" />
|
|
782
|
+
<path d="M46 34.5V49.8333" stroke="black" stroke-width="5" stroke-linecap="round"
|
|
783
|
+
stroke-linejoin="round" />
|
|
784
|
+
<path d="M46 65.1666H46.0383" stroke="black" stroke-width="5" stroke-linecap="round"
|
|
785
|
+
stroke-linejoin="round" />
|
|
786
|
+
</svg>
|
|
787
|
+
<div class="text-lg font-bold mt-4 text-center" id="modalCancelTransactionTitle">Cancel Transaction</div>
|
|
788
|
+
<div class="flex items-center justify-center w-full">
|
|
789
|
+
<p class="text-gray-500 max-w-xs text-center mt-6">Are you sure you would like to receive a
|
|
790
|
+
refund for the amount paid less gas fees?</p>
|
|
791
|
+
</div>
|
|
792
|
+
<div class="flex justify-center items-center gap-3 my-12">
|
|
793
|
+
<button id="modalButtonRejectCancelTransaction"
|
|
794
|
+
class="w-1/2 max-w-75 items-center rounded-md border border-neutral-400 bg-gray-100 px-12 py-2 text-sm font-semibold text-neutral-900 shadow-sm hover:bg-neutral-50">
|
|
795
|
+
No, Go Back
|
|
796
|
+
</button>
|
|
797
|
+
<button id="modalButtonAcceptCancelTransaction"
|
|
798
|
+
class="w-1/2 max-w-75 items-center rounded-md bg-neutral-800 px-12 py-2 text-sm font-semibold text-white shadow-sm hover:bg-neutral-900">
|
|
799
|
+
Yes, Cancel
|
|
800
|
+
</button>
|
|
801
|
+
</div>
|
|
802
|
+
</div>
|
|
803
|
+
</dialog>
|
|
804
|
+
|
|
805
|
+
<!-- Modal for close transaction modal -->
|
|
806
|
+
<dialog class="lg:w-2/3 w-full" id="modalCloseTransactionModal"
|
|
807
|
+
aria-labelledby="modalCloseTransactionModalTitle"
|
|
808
|
+
aria-modal="true">
|
|
809
|
+
<div class="modal-body w-full">
|
|
810
|
+
<svg class="mx-auto mt-12 block" width="92" height="92" viewBox="0 0 92 92" fill="none"
|
|
811
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
812
|
+
<path
|
|
813
|
+
d="M83.2983 69.0001L52.6316 15.3334C51.963 14.1535 50.9933 13.1721 49.8215 12.4893C48.6497 11.8065 47.3178 11.4468 45.9616 11.4468C44.6055 11.4468 43.2735 11.8065 42.1018 12.4893C40.93 13.1721 39.9603 14.1535 39.2916 15.3334L8.62497 69.0001C7.94909 70.1706 7.59468 71.499 7.59768 72.8507C7.60067 74.2023 7.96096 75.5292 8.64202 76.6967C9.32308 77.8642 10.3007 78.831 11.4758 79.4989C12.6509 80.1668 13.9817 80.5122 15.3333 80.5001H76.6666C78.0118 80.4987 79.3328 80.1434 80.4972 79.47C81.6616 78.7965 82.6283 77.8286 83.3003 76.6633C83.9722 75.4981 84.3258 74.1765 84.3254 72.8314C84.3251 71.4863 83.9709 70.165 83.2983 69.0001Z"
|
|
814
|
+
stroke="black" stroke-width="5" stroke-linecap="round" stroke-linejoin="round" />
|
|
815
|
+
<path d="M46 34.5V49.8333" stroke="black" stroke-width="5" stroke-linecap="round"
|
|
816
|
+
stroke-linejoin="round" />
|
|
817
|
+
<path d="M46 65.1666H46.0383" stroke="black" stroke-width="5" stroke-linecap="round"
|
|
818
|
+
stroke-linejoin="round" />
|
|
819
|
+
</svg>
|
|
820
|
+
<div class="text-lg font-bold mt-4 text-center" id="modalCloseTransactionModalTitle">Are you sure?</div>
|
|
821
|
+
<div class="flex items-center justify-center w-full">
|
|
822
|
+
<p id="modalCloseTransactionModalDescription" class="text-gray-500 max-w-xs text-center mt-6">Are you sure you
|
|
823
|
+
want to close this modal? If you continue, you will loose any progress you have made.</p>
|
|
824
|
+
</div>
|
|
825
|
+
<div class="flex justify-center items-center gap-3 my-12">
|
|
826
|
+
<button id="modalButtonAcceptTransactionModalClose"
|
|
827
|
+
class="w-1/2 max-w-75 items-center rounded-md border text-red-800 border-red-800 bg-gray-100 px-12 py-2 text-sm font-semibold shadow-sm hover:bg-neutral-50">
|
|
828
|
+
Close
|
|
829
|
+
</button>
|
|
830
|
+
<button id="modalButtonRejectTransactionModalClose"
|
|
831
|
+
class="w-1/2 max-w-75 items-center rounded-md bg-neutral-800 px-12 py-2 text-sm font-semibold text-white shadow-sm hover:bg-neutral-900">
|
|
832
|
+
Go Back to Transaction
|
|
833
|
+
</button>
|
|
834
|
+
</div>
|
|
835
|
+
</div>
|
|
836
|
+
</dialog>
|
|
837
|
+
</div>`,_a=["USD","TRY"];function Dl(t){return _a.includes(t)}const zg="cbc90b58aec5c9ab2085a2d691461868",jg=0,Sl=1,qg=-3,Hg="https://api.lydian.dev",Vg="https://api.sandbox.lydian.com",Kg="https://api.lydian.com",Wg="ARB",Gg="BASE",Bl="BTC",Yg="CELO",Tl="DAI",Fl="ETH",Zg="LINEA",Xg="OPMAINNET",Qg="POLY",Il="PYUSD",_l="RLUSD",Jg="SOL",eb="SONIC",tb="UNICHAIN",Ol="USDC",Pl="USDe",Rl="USDP",Ul="USDS",Nl="USDT",sb="ZKSYNC",Ll={code:"USDT",title:"USDT (Tether)",img:"https://tetherpay.com/images/7065960c-8ebd-4d80-f352-8027ff2bb600/public",type:"token",networks:[]},$l={code:"USDC",title:"USDC",img:"https://tetherpay.com/images/1a664446-0855-4d6d-256e-ad886acba300/public",type:"token",networks:[]},Ml={code:"ETH",title:"Ethereum",img:"https://tetherpay.com/images/327ef8ac-bc72-46ea-2362-878e91c49300/public",type:"coin",networks:[]},nb={code:"SOL",title:"Solana",img:"https://tetherpay.com/images/5850fc57-4451-4f45-b053-3857b1d54e00/public"},zl={code:"BTC",title:"Bitcoin",img:"https://tetherpay.com/images/7f89f493-190a-41da-2410-a19b46a68900/public",type:"coin",networks:[]},ib={code:"ARB",title:"Arbitrum",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/64d896c2-6ac6-4837-e6bf-e05c53a5f500/public",type:"coin",networks:[]},ob={code:"BASE",title:"Base",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/3fc7c8ef-6863-43e6-967d-de68e14d4600/public",type:"coin",networks:[]},ab={code:"CELO",title:"Celo ",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/7373a7f6-b5dd-4d16-0b98-cbaf9e666300/public",type:"coin",networks:[]},rb={code:"linea",title:"Linea",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/410a3ea8-d59b-4e88-1c1a-ffa77c157600/public",type:"coin",networks:[]},cb={code:"opmainnet",title:"OP Mainnet",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/cd28b090-e932-478e-2a40-7b7d61672d00/public",type:"coin",networks:[]},lb={code:"polygon",title:"Polygon",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/386bebc7-3782-4358-978d-ae2b2d4fbf00/public",type:"coin",networks:[]},db={code:"sonic",title:"Sonic",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/e9eaf9b0-3093-4239-d20b-a0c5934ec200/public",type:"coin",networks:[]},hb={code:"unichain",title:"Unichain",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/f4c4d2e6-d9a4-4910-febc-ed6de61bd400/public",type:"coin",networks:[]},ub={code:"zksync",title:"ZKsync",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/540fbd94-e1d0-4dda-c6d1-426181f37e00/public",type:"coin",networks:[]},jl={code:"RLUSD",title:"RLUSD (Ripple USD)",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/b71545a6-eab8-4fa2-5888-f26c22ce7f00/public",type:"token",networks:[]},ql={code:"PYUSD",title:"PYUSD (PayPal USD)",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/3897aafa-0fd9-4914-ef54-e6312aea9a00/public",type:"token",networks:[]},Hl={code:"USDe",title:"USDe (Ethena USDe)",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/76760e01-ce5a-482b-88e0-842f18370d00/public",type:"token",networks:[]},Vl={code:"USDS",title:"USDS (Sky Dollar)",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/ee62374d-99a1-46c7-9fc6-eb5907a32600/public",type:"token",networks:[]},Kl={code:"DAI",title:"DAI",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/970875a7-3ae3-4171-4afe-cc1340bf9500/public",type:"token",networks:[]},Wl={code:"USDP",title:"USDP (Pax Dollar)",img:"https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/970875a7-3ae3-4171-4afe-cc1340bf9500/public",type:"token",networks:[]};class Oa{constructor(e,s){if(this.baseUri=e,this.publishableKey=s,!this.baseUri)throw new Error("baseUri is required");if(!this.publishableKey)throw new Error("publishableKey is required")}async request(e,s){const n=`${this.baseUri}${e}`,i={"Content-Type":"application/json","X-Publishable-Key":`${this.publishableKey}`},o=Object.assign({},s,{headers:i}),a=await fetch(n,o);if(a.ok)return await a.json();throw new Error(a.statusText)}async requestWithFormData(e,s){const n=`${this.baseUri}${e}`,i={"X-Publishable-Key":`${this.publishableKey}`},o=Object.assign({},s,{headers:i}),a=await fetch(n,o);if(a.ok)return await a.json();throw new Error(a.statusText)}}const hi="transaction";class fb extends Oa{async createCryptoTransaction(e){return await this.request(`/${hi}`,{method:"POST",body:JSON.stringify(e)})}async getCryptoTransaction(e){return await this.request(`/${hi}/${e}`)}async collectCryptoTransaction(e,s){return await this.request(`/${hi}/${e}/collect`,{method:"POST",body:JSON.stringify(s)})}async cancelCryptoTransaction(e,s){return await this.request(`/${hi}/${e}/cancel`,{method:"PATCH",body:JSON.stringify(s)})}async kycVerification(e,s){const n=new FormData;n.append("asset",s.asset),n.append("network",s.network),n.append("firstName",s.firstName),n.append("lastName",s.lastName),n.append("email",s.email),n.append("street",s.street),n.append("city",s.city),n.append("region",s.region),n.append("postalCode",s.postalCode),n.append("country",s.country),s.documentType&&n.append("documentType",s.documentType);for(const i of s.documentFiles)n.append("documentFiles",i);return await this.requestWithFormData(`/${hi}/${e}/verification`,{method:"POST",body:n})}}function pb(t,e){e.forEach(s=>{Object.getOwnPropertyNames(s.prototype).forEach(n=>{const i=Object.getOwnPropertyDescriptor(s.prototype,n);i&&Object.defineProperty(t.prototype,n,i)})})}const mb="config";class gb extends Oa{async getSDKConfig(){return await this.request(`/${mb}`)}}class Gl extends Oa{}pb(Gl,[gb,fb]);var _n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ho(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Yl(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var s=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};s.prototype=e.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(s,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),s}var ui={exports:{}},Zl;function bb(){if(Zl)return ui.exports;Zl=1,ui.exports=n,ui.exports.isMobile=n,ui.exports.default=n;const t=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,e=/CrOS/,s=/android|ipad|playbook|silk/i;function n(i){i||(i={});let o=i.ua;if(!o&&typeof navigator<"u"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;let a=t.test(o)&&!e.test(o)||!!i.tablet&&s.test(o);return!a&&i.tablet&&i.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(a=!0),a}return ui.exports}var yb=bb();const wb=ho(yb);var an={},Ps={},uo={},rn={},Pa={},Xl;function vb(){return Xl||(Xl=1,Object.defineProperty(Pa,"__esModule",{value:!0})),Pa}var Ra={},Ql;function xb(){return Ql||(Ql=1,Object.defineProperty(Ra,"__esModule",{value:!0})),Ra}var Ua={},Jl;function Eb(){return Jl||(Jl=1,Object.defineProperty(Ua,"__esModule",{value:!0})),Ua}var Na={},ed;function kb(){return ed||(ed=1,Object.defineProperty(Na,"__esModule",{value:!0})),Na}var La={},td;function Cb(){return td||(td=1,Object.defineProperty(La,"__esModule",{value:!0})),La}var fo={},sd;function Ab(){if(sd)return fo;sd=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.classnames=o;const t=a=>Object.entries(a).map(([r,c])=>c&&r),e=a=>!!a,s=(a,r,c)=>c.indexOf(a)===r,n=[];function i(a){return a?typeof a=="string"?[a]:Array.isArray(a)?a.flatMap(i).filter(e):t(a).filter(e):n}function o(a){const r=i(a).filter(s);return r.length>0?r.join(" "):void 0}return fo}var nd;function Db(){return nd||(nd=1,(function(t){var e=rn&&rn.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var r=Object.getOwnPropertyDescriptor(i,o);(!r||("get"in r?!i.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,r)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),s=rn&&rn.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),s(vb(),t),s(xb(),t),s(Eb(),t),s(kb(),t),s(Cb(),t),s(Ab(),t)})(rn)),rn}var id;function od(){if(id)return uo;id=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.setAttributes=n;const t=Db();function e(i,o){for(const a of Object.keys(i))a in o&&(o[a]=i[a])}const s=new RegExp("^on\\p{Lu}","u");function n(i,o){for(const a of Object.keys(o)){if(a==="__source"||a==="__self"||a==="tsxTag")continue;const r=o[a];if(a==="class"){const c=(0,t.classnames)(r);c&&i.setAttribute(a,c)}else if(a==="ref")r.current=i;else if(s.test(a)){const c=a.replace(/Capture$/,""),l=a!==c,d=c.toLowerCase().substring(2);i.addEventListener(d,r,l)}else a==="style"&&typeof r!="string"?e(r,i.style):a==="dangerouslySetInnerHTML"?i.innerHTML=r:r===!0?i.setAttribute(a,a):(r||r===0||r==="")&&i.setAttribute(a,r.toString())}}return uo}var On={},ad;function rd(){if(ad)return On;ad=1,Object.defineProperty(On,"__esModule",{value:!0}),On.applyChildren=e,On.createDomElement=s,On.applyTsxTag=n;function t(i,o){o instanceof Element?i.appendChild(o):typeof o=="string"||typeof o=="number"?i.appendChild(document.createTextNode(o.toString())):console.warn("Unknown type to append: ",o)}function e(i,o){for(const a of o)!a&&a!==0||(Array.isArray(a)?e(i,a):t(i,a))}function s(i,o){const a=o!=null&&o.is?{is:o.is}:void 0;return o!=null&&o.xmlns?document.createElementNS(o.xmlns,i,a):document.createElement(i,a)}function n(i,o){let a=i,r=o;return r&&"tsxTag"in r&&(a=r.tsxTag,!r.is&&i.includes("-")&&(r={...r,is:i})),{finalTag:a,finalAttrs:r}}return On}var cd;function Sb(){if(cd)return Ps;cd=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.createRef=Ps.h=void 0,Ps.createElement=s;const t=od(),e=rd();function s(i,o,...a){if(typeof i=="function")return i({...o,children:a});const{finalTag:r,finalAttrs:c}=(0,e.applyTsxTag)(i,o),l=(0,e.createDomElement)(r,c);return c&&(0,t.setAttributes)(l,c),(0,e.applyChildren)(l,a),l}Ps.h=s;const n=()=>({current:null});return Ps.createRef=n,Ps}var po={},Pn={},ld;function dd(){if(ld)return Pn;ld=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.jsx=s,Pn.jsxs=s,Pn.jsxDEV=s;const t=od(),e=rd();function s(n,i){if(typeof n=="function")return n(i);const{children:o,...a}=i,{finalTag:r,finalAttrs:c}=(0,e.applyTsxTag)(n,a),l=(0,e.createDomElement)(r,c);return(0,t.setAttributes)(l,c),(0,e.applyChildren)(l,[o]),l}return Pn}var hd;function Bb(){if(hd)return po;hd=1,Object.defineProperty(po,"__esModule",{value:!0}),po.defineCustomElement=e;const t=dd();function e(s,n,i){return customElements.define(s,n,i),o=>(0,t.jsx)(s,o)}return po}var $a={},ud;function Tb(){return ud||(ud=1,Object.defineProperty($a,"__esModule",{value:!0})),$a}var fd;function Fb(){return fd||(fd=1,(function(t){var e=an&&an.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var r=Object.getOwnPropertyDescriptor(i,o);(!r||("get"in r?!i.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,r)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),s=an&&an.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),s(Sb(),t),s(Bb(),t),s(dd(),t),s(Tb(),t)})(an)),an}var _t=Fb();function Vt(t){const e=`btnAsset${t.code}`;return _t.h("button",{id:e,class:"w-full flex items-center space-x-2 border border-gray-300 rounded-lg px-4 py-2 hover:bg-gray-50"},_t.h("img",{src:t.img,alt:t.title,style:"height: 34px; width: 44px;"}),_t.h("span",null,t.title)).outerHTML}function Ib(t){const e=`btnNetwork${t.code}`;return _t.h("button",{id:e,class:"w-full flex items-center space-x-2 border border-gray-300 rounded-lg px-4 py-2 hover:bg-gray-50"},_t.h("img",{src:t.img,alt:t.name,style:"height: 34px; width: 34px;"}),_t.h("span",null,t.name)).outerHTML}var mo={exports:{}},pd;function _b(){if(pd)return mo.exports;pd=1;var t=typeof Reflect=="object"?Reflect:null,e=t&&typeof t.apply=="function"?t.apply:function(B,P,M){return Function.prototype.apply.call(B,P,M)},s;t&&typeof t.ownKeys=="function"?s=t.ownKeys:Object.getOwnPropertySymbols?s=function(B){return Object.getOwnPropertyNames(B).concat(Object.getOwnPropertySymbols(B))}:s=function(B){return Object.getOwnPropertyNames(B)};function n(E){console&&console.warn&&console.warn(E)}var i=Number.isNaN||function(B){return B!==B};function o(){o.init.call(this)}mo.exports=o,mo.exports.once=_,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function r(E){if(typeof E!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof E)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(E){if(typeof E!="number"||E<0||i(E))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");a=E}}),o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(B){if(typeof B!="number"||B<0||i(B))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+B+".");return this._maxListeners=B,this};function c(E){return E._maxListeners===void 0?o.defaultMaxListeners:E._maxListeners}o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(B){for(var P=[],M=1;M<arguments.length;M++)P.push(arguments[M]);var R=B==="error",L=this._events;if(L!==void 0)R=R&&L.error===void 0;else if(!R)return!1;if(R){var q;if(P.length>0&&(q=P[0]),q instanceof Error)throw q;var K=new Error("Unhandled error."+(q?" ("+q.message+")":""));throw K.context=q,K}var j=L[B];if(j===void 0)return!1;if(typeof j=="function")e(j,this,P);else for(var D=j.length,F=f(j,D),M=0;M<D;++M)e(F[M],this,P);return!0};function l(E,B,P,M){var R,L,q;if(r(P),L=E._events,L===void 0?(L=E._events=Object.create(null),E._eventsCount=0):(L.newListener!==void 0&&(E.emit("newListener",B,P.listener?P.listener:P),L=E._events),q=L[B]),q===void 0)q=L[B]=P,++E._eventsCount;else if(typeof q=="function"?q=L[B]=M?[P,q]:[q,P]:M?q.unshift(P):q.push(P),R=c(E),R>0&&q.length>R&&!q.warned){q.warned=!0;var K=new Error("Possible EventEmitter memory leak detected. "+q.length+" "+String(B)+" listeners added. Use emitter.setMaxListeners() to increase limit");K.name="MaxListenersExceededWarning",K.emitter=E,K.type=B,K.count=q.length,n(K)}return E}o.prototype.addListener=function(B,P){return l(this,B,P,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(B,P){return l(this,B,P,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(E,B,P){var M={fired:!1,wrapFn:void 0,target:E,type:B,listener:P},R=d.bind(M);return R.listener=P,M.wrapFn=R,R}o.prototype.once=function(B,P){return r(P),this.on(B,h(this,B,P)),this},o.prototype.prependOnceListener=function(B,P){return r(P),this.prependListener(B,h(this,B,P)),this},o.prototype.removeListener=function(B,P){var M,R,L,q,K;if(r(P),R=this._events,R===void 0)return this;if(M=R[B],M===void 0)return this;if(M===P||M.listener===P)--this._eventsCount===0?this._events=Object.create(null):(delete R[B],R.removeListener&&this.emit("removeListener",B,M.listener||P));else if(typeof M!="function"){for(L=-1,q=M.length-1;q>=0;q--)if(M[q]===P||M[q].listener===P){K=M[q].listener,L=q;break}if(L<0)return this;L===0?M.shift():y(M,L),M.length===1&&(R[B]=M[0]),R.removeListener!==void 0&&this.emit("removeListener",B,K||P)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(B){var P,M,R;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[B]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[B]),this;if(arguments.length===0){var L=Object.keys(M),q;for(R=0;R<L.length;++R)q=L[R],q!=="removeListener"&&this.removeAllListeners(q);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(P=M[B],typeof P=="function")this.removeListener(B,P);else if(P!==void 0)for(R=P.length-1;R>=0;R--)this.removeListener(B,P[R]);return this};function u(E,B,P){var M=E._events;if(M===void 0)return[];var R=M[B];return R===void 0?[]:typeof R=="function"?P?[R.listener||R]:[R]:P?C(R):f(R,R.length)}o.prototype.listeners=function(B){return u(this,B,!0)},o.prototype.rawListeners=function(B){return u(this,B,!1)},o.listenerCount=function(E,B){return typeof E.listenerCount=="function"?E.listenerCount(B):b.call(E,B)},o.prototype.listenerCount=b;function b(E){var B=this._events;if(B!==void 0){var P=B[E];if(typeof P=="function")return 1;if(P!==void 0)return P.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?s(this._events):[]};function f(E,B){for(var P=new Array(B),M=0;M<B;++M)P[M]=E[M];return P}function y(E,B){for(;B+1<E.length;B++)E[B]=E[B+1];E.pop()}function C(E){for(var B=new Array(E.length),P=0;P<B.length;++P)B[P]=E[P].listener||E[P];return B}function _(E,B){return new Promise(function(P,M){function R(q){E.removeListener(B,L),M(q)}function L(){typeof E.removeListener=="function"&&E.removeListener("error",R),P([].slice.call(arguments))}A(E,B,L,{once:!0}),B!=="error"&&N(E,R,{once:!0})})}function N(E,B,P){typeof E.on=="function"&&A(E,"error",B,P)}function A(E,B,P,M){if(typeof E.on=="function")M.once?E.once(B,P):E.on(B,P);else if(typeof E.addEventListener=="function")E.addEventListener(B,function R(L){M.once&&E.removeEventListener(B,R),P(L)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof E)}return mo.exports}var Kt=_b();const md=ho(Kt);var Ma={};/*! *****************************************************************************
|
|
838
|
+
Copyright (c) Microsoft Corporation.
|
|
839
|
+
|
|
840
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
841
|
+
purpose with or without fee is hereby granted.
|
|
842
|
+
|
|
843
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
844
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
845
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
846
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
847
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
848
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
849
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
850
|
+
***************************************************************************** */var za=function(t,e){return za=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,n){s.__proto__=n}||function(s,n){for(var i in n)n.hasOwnProperty(i)&&(s[i]=n[i])},za(t,e)};function Ob(t,e){za(t,e);function s(){this.constructor=t}t.prototype=e===null?Object.create(e):(s.prototype=e.prototype,new s)}var ja=function(){return ja=Object.assign||function(e){for(var s,n=1,i=arguments.length;n<i;n++){s=arguments[n];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},ja.apply(this,arguments)};function Pb(t,e){var s={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(s[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(s[n[i]]=t[n[i]]);return s}function Rb(t,e,s,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,s):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,s,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(i<3?a(o):i>3?a(e,s,o):a(e,s))||o);return i>3&&o&&Object.defineProperty(e,s,o),o}function Ub(t,e){return function(s,n){e(s,n,t)}}function Nb(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Lb(t,e,s,n){function i(o){return o instanceof s?o:new s(function(a){a(o)})}return new(s||(s=Promise))(function(o,a){function r(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(r,c)}l((n=n.apply(t,e||[])).next())})}function $b(t,e){var s={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(l){return function(d){return c([l,d])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,i=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){s=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){s.label=l[1];break}if(l[0]===6&&s.label<o[1]){s.label=o[1],o=l;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(l);break}o[2]&&s.ops.pop(),s.trys.pop();continue}l=e.call(t,s)}catch(d){l=[6,d],i=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Mb(t,e,s,n){n===void 0&&(n=s),t[n]=e[s]}function zb(t,e){for(var s in t)s!=="default"&&!e.hasOwnProperty(s)&&(e[s]=t[s])}function qa(t){var e=typeof Symbol=="function"&&Symbol.iterator,s=e&&t[e],n=0;if(s)return s.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function gd(t,e){var s=typeof Symbol=="function"&&t[Symbol.iterator];if(!s)return t;var n=s.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(r){a={error:r}}finally{try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}}return o}function jb(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(gd(arguments[e]));return t}function qb(){for(var t=0,e=0,s=arguments.length;e<s;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<s;e++)for(var o=arguments[e],a=0,r=o.length;a<r;a++,i++)n[i]=o[a];return n}function fi(t){return this instanceof fi?(this.v=t,this):new fi(t)}function Hb(t,e,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=s.apply(t,e||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(u){n[u]&&(i[u]=function(b){return new Promise(function(f,y){o.push([u,b,f,y])>1||r(u,b)})})}function r(u,b){try{c(n[u](b))}catch(f){h(o[0][3],f)}}function c(u){u.value instanceof fi?Promise.resolve(u.value.v).then(l,d):h(o[0][2],u)}function l(u){r("next",u)}function d(u){r("throw",u)}function h(u,b){u(b),o.shift(),o.length&&r(o[0][0],o[0][1])}}function Vb(t){var e,s;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=t[i]?function(a){return(s=!s)?{value:fi(t[i](a)),done:i==="return"}:o?o(a):a}:o}}function Kb(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],s;return e?e.call(t):(t=typeof qa=="function"?qa(t):t[Symbol.iterator](),s={},n("next"),n("throw"),n("return"),s[Symbol.asyncIterator]=function(){return this},s);function n(o){s[o]=t[o]&&function(a){return new Promise(function(r,c){a=t[o](a),i(r,c,a.done,a.value)})}}function i(o,a,r,c){Promise.resolve(c).then(function(l){o({value:l,done:r})},a)}}function Wb(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Gb(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)Object.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e.default=t,e}function Yb(t){return t&&t.__esModule?t:{default:t}}function Zb(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Xb(t,e,s){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,s),s}const go=Yl(Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return ja},__asyncDelegator:Vb,__asyncGenerator:Hb,__asyncValues:Kb,__await:fi,__awaiter:Lb,__classPrivateFieldGet:Zb,__classPrivateFieldSet:Xb,__createBinding:Mb,__decorate:Rb,__exportStar:zb,__extends:Ob,__generator:$b,__importDefault:Yb,__importStar:Gb,__makeTemplateObject:Wb,__metadata:Nb,__param:Ub,__read:gd,__rest:Pb,__spread:jb,__spreadArrays:qb,__values:qa},Symbol.toStringTag,{value:"Module"})));var Ha={},pi={},bd;function Qb(){if(bd)return pi;bd=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.delay=void 0;function t(e){return new Promise(s=>{setTimeout(()=>{s(!0)},e)})}return pi.delay=t,pi}var cn={},Va={},ln={},yd;function Jb(){return yd||(yd=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.ONE_THOUSAND=ln.ONE_HUNDRED=void 0,ln.ONE_HUNDRED=100,ln.ONE_THOUSAND=1e3),ln}var Ka={},wd;function e1(){return wd||(wd=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=t.ONE_MINUTE*5,t.TEN_MINUTES=t.ONE_MINUTE*10,t.THIRTY_MINUTES=t.ONE_MINUTE*30,t.SIXTY_MINUTES=t.ONE_MINUTE*60,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=t.ONE_HOUR*3,t.SIX_HOURS=t.ONE_HOUR*6,t.TWELVE_HOURS=t.ONE_HOUR*12,t.TWENTY_FOUR_HOURS=t.ONE_HOUR*24,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=t.ONE_DAY*3,t.FIVE_DAYS=t.ONE_DAY*5,t.SEVEN_DAYS=t.ONE_DAY*7,t.THIRTY_DAYS=t.ONE_DAY*30,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=t.ONE_WEEK*2,t.THREE_WEEKS=t.ONE_WEEK*3,t.FOUR_WEEKS=t.ONE_WEEK*4,t.ONE_YEAR=t.ONE_DAY*365})(Ka)),Ka}var vd;function xd(){return vd||(vd=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=go;e.__exportStar(Jb(),t),e.__exportStar(e1(),t)})(Va)),Va}var Ed;function t1(){if(Ed)return cn;Ed=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.fromMiliseconds=cn.toMiliseconds=void 0;const t=xd();function e(n){return n*t.ONE_THOUSAND}cn.toMiliseconds=e;function s(n){return Math.floor(n/t.ONE_THOUSAND)}return cn.fromMiliseconds=s,cn}var kd;function s1(){return kd||(kd=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=go;e.__exportStar(Qb(),t),e.__exportStar(t1(),t)})(Ha)),Ha}var Rn={},Cd;function n1(){if(Cd)return Rn;Cd=1,Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.Watch=void 0;class t{constructor(){this.timestamps=new Map}start(s){if(this.timestamps.has(s))throw new Error(`Watch already started for label: ${s}`);this.timestamps.set(s,{started:Date.now()})}stop(s){const n=this.get(s);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${s}`);const i=Date.now()-n.started;this.timestamps.set(s,{started:n.started,elapsed:i})}get(s){const n=this.timestamps.get(s);if(typeof n>"u")throw new Error(`No timestamp found for label: ${s}`);return n}elapsed(s){const n=this.get(s);return n.elapsed||Date.now()-n.started}}return Rn.Watch=t,Rn.default=t,Rn}var Wa={},mi={},Ad;function i1(){if(Ad)return mi;Ad=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.IWatch=void 0;class t{}return mi.IWatch=t,mi}var Dd;function o1(){return Dd||(Dd=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),go.__exportStar(i1(),t)})(Wa)),Wa}var Sd;function a1(){return Sd||(Sd=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=go;e.__exportStar(s1(),t),e.__exportStar(n1(),t),e.__exportStar(o1(),t),e.__exportStar(xd(),t)})(Ma)),Ma}var re=a1();class dn{}let r1=class extends dn{constructor(e){super()}};const Bd=re.FIVE_SECONDS,hn={pulse:"heartbeat_pulse"};let c1=class Pg extends r1{constructor(e){super(e),this.events=new Kt.EventEmitter,this.interval=Bd,this.interval=(e==null?void 0:e.interval)||Bd}static async init(e){const s=new Pg(e);return await s.init(),s}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,s){this.events.on(e,s)}once(e,s){this.events.once(e,s)}off(e,s){this.events.off(e,s)}removeListener(e,s){this.events.removeListener(e,s)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),re.toMiliseconds(this.interval))}pulse(){this.events.emit(hn.pulse)}};const l1=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,d1=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,h1=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function u1(t,e){if(t==="__proto__"||t==="constructor"&&e&&typeof e=="object"&&"prototype"in e){f1(t);return}return e}function f1(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function bo(t,e={}){if(typeof t!="string")return t;if(t[0]==='"'&&t[t.length-1]==='"'&&t.indexOf("\\")===-1)return t.slice(1,-1);const s=t.trim();if(s.length<=9)switch(s.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!h1.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(l1.test(t)||d1.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,u1)}return JSON.parse(t)}catch(n){if(e.strict)throw n;return t}}function p1(t){return!t||typeof t.then!="function"?Promise.resolve(t):t}function Ve(t,...e){try{return p1(t(...e))}catch(s){return Promise.reject(s)}}function m1(t){const e=typeof t;return t===null||e!=="object"&&e!=="function"}function g1(t){const e=Object.getPrototypeOf(t);return!e||e.isPrototypeOf(Object)}function yo(t){if(m1(t))return String(t);if(g1(t)||Array.isArray(t))return JSON.stringify(t);if(typeof t.toJSON=="function")return yo(t.toJSON());throw new Error("[unstorage] Cannot stringify value!")}const Ga="base64:";function b1(t){return typeof t=="string"?t:Ga+v1(t)}function y1(t){return typeof t!="string"||!t.startsWith(Ga)?t:w1(t.slice(Ga.length))}function w1(t){return globalThis.Buffer?Buffer.from(t,"base64"):Uint8Array.from(globalThis.atob(t),e=>e.codePointAt(0))}function v1(t){return globalThis.Buffer?Buffer.from(t).toString("base64"):globalThis.btoa(String.fromCodePoint(...t))}function mt(t){var e;return t&&((e=t.split("?")[0])==null?void 0:e.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""))||""}function x1(...t){return mt(t.join(":"))}function wo(t){return t=mt(t),t?t+":":""}function E1(t,e){if(e===void 0)return!0;let s=0,n=t.indexOf(":");for(;n>-1;)s++,n=t.indexOf(":",n+1);return s<=e}function k1(t,e){return e?t.startsWith(e)&&t[t.length-1]!=="$":t[t.length-1]!=="$"}function FB(t){return t}const C1="memory",A1=()=>{const t=new Map;return{name:C1,getInstance:()=>t,hasItem(e){return t.has(e)},getItem(e){return t.get(e)??null},getItemRaw(e){return t.get(e)??null},setItem(e,s){t.set(e,s)},setItemRaw(e,s){t.set(e,s)},removeItem(e){t.delete(e)},getKeys(){return[...t.keys()]},clear(){t.clear()},dispose(){t.clear()}}};function D1(t={}){const e={mounts:{"":t.driver||A1()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},s=l=>{for(const d of e.mountpoints)if(l.startsWith(d))return{base:d,relativeKey:l.slice(d.length),driver:e.mounts[d]};return{base:"",relativeKey:l,driver:e.mounts[""]}},n=(l,d)=>e.mountpoints.filter(h=>h.startsWith(l)||d&&l.startsWith(h)).map(h=>({relativeBase:l.length>h.length?l.slice(h.length):void 0,mountpoint:h,driver:e.mounts[h]})),i=(l,d)=>{if(e.watching){d=mt(d);for(const h of e.watchListeners)h(l,d)}},o=async()=>{if(!e.watching){e.watching=!0;for(const l in e.mounts)e.unwatch[l]=await Td(e.mounts[l],i,l)}},a=async()=>{if(e.watching){for(const l in e.unwatch)await e.unwatch[l]();e.unwatch={},e.watching=!1}},r=(l,d,h)=>{const u=new Map,b=f=>{let y=u.get(f.base);return y||(y={driver:f.driver,base:f.base,items:[]},u.set(f.base,y)),y};for(const f of l){const y=typeof f=="string",C=mt(y?f:f.key),_=y?void 0:f.value,N=y||!f.options?d:{...d,...f.options},A=s(C);b(A).items.push({key:C,value:_,relativeKey:A.relativeKey,options:N})}return Promise.all([...u.values()].map(f=>h(f))).then(f=>f.flat())},c={hasItem(l,d={}){l=mt(l);const{relativeKey:h,driver:u}=s(l);return Ve(u.hasItem,h,d)},getItem(l,d={}){l=mt(l);const{relativeKey:h,driver:u}=s(l);return Ve(u.getItem,h,d).then(b=>bo(b))},getItems(l,d={}){return r(l,d,h=>h.driver.getItems?Ve(h.driver.getItems,h.items.map(u=>({key:u.relativeKey,options:u.options})),d).then(u=>u.map(b=>({key:x1(h.base,b.key),value:bo(b.value)}))):Promise.all(h.items.map(u=>Ve(h.driver.getItem,u.relativeKey,u.options).then(b=>({key:u.key,value:bo(b)})))))},getItemRaw(l,d={}){l=mt(l);const{relativeKey:h,driver:u}=s(l);return u.getItemRaw?Ve(u.getItemRaw,h,d):Ve(u.getItem,h,d).then(b=>y1(b))},async setItem(l,d,h={}){if(d===void 0)return c.removeItem(l);l=mt(l);const{relativeKey:u,driver:b}=s(l);b.setItem&&(await Ve(b.setItem,u,yo(d),h),b.watch||i("update",l))},async setItems(l,d){await r(l,d,async h=>{if(h.driver.setItems)return Ve(h.driver.setItems,h.items.map(u=>({key:u.relativeKey,value:yo(u.value),options:u.options})),d);h.driver.setItem&&await Promise.all(h.items.map(u=>Ve(h.driver.setItem,u.relativeKey,yo(u.value),u.options)))})},async setItemRaw(l,d,h={}){if(d===void 0)return c.removeItem(l,h);l=mt(l);const{relativeKey:u,driver:b}=s(l);if(b.setItemRaw)await Ve(b.setItemRaw,u,d,h);else if(b.setItem)await Ve(b.setItem,u,b1(d),h);else return;b.watch||i("update",l)},async removeItem(l,d={}){typeof d=="boolean"&&(d={removeMeta:d}),l=mt(l);const{relativeKey:h,driver:u}=s(l);u.removeItem&&(await Ve(u.removeItem,h,d),(d.removeMeta||d.removeMata)&&await Ve(u.removeItem,h+"$",d),u.watch||i("remove",l))},async getMeta(l,d={}){typeof d=="boolean"&&(d={nativeOnly:d}),l=mt(l);const{relativeKey:h,driver:u}=s(l),b=Object.create(null);if(u.getMeta&&Object.assign(b,await Ve(u.getMeta,h,d)),!d.nativeOnly){const f=await Ve(u.getItem,h+"$",d).then(y=>bo(y));f&&typeof f=="object"&&(typeof f.atime=="string"&&(f.atime=new Date(f.atime)),typeof f.mtime=="string"&&(f.mtime=new Date(f.mtime)),Object.assign(b,f))}return b},setMeta(l,d,h={}){return this.setItem(l+"$",d,h)},removeMeta(l,d={}){return this.removeItem(l+"$",d)},async getKeys(l,d={}){var C;l=wo(l);const h=n(l,!0);let u=[];const b=[];let f=!0;for(const _ of h){(C=_.driver.flags)!=null&&C.maxDepth||(f=!1);const N=await Ve(_.driver.getKeys,_.relativeBase,d);for(const A of N){const E=_.mountpoint+mt(A);u.some(B=>E.startsWith(B))||b.push(E)}u=[_.mountpoint,...u.filter(A=>!A.startsWith(_.mountpoint))]}const y=d.maxDepth!==void 0&&!f;return b.filter(_=>(!y||E1(_,d.maxDepth))&&k1(_,l))},async clear(l,d={}){l=wo(l),await Promise.all(n(l,!1).map(async h=>{if(h.driver.clear)return Ve(h.driver.clear,h.relativeBase,d);if(h.driver.removeItem){const u=await h.driver.getKeys(h.relativeBase||"",d);return Promise.all(u.map(b=>h.driver.removeItem(b,d)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(l=>Fd(l)))},async watch(l){return await o(),e.watchListeners.push(l),async()=>{e.watchListeners=e.watchListeners.filter(d=>d!==l),e.watchListeners.length===0&&await a()}},async unwatch(){e.watchListeners=[],await a()},mount(l,d){if(l=wo(l),l&&e.mounts[l])throw new Error(`already mounted at ${l}`);return l&&(e.mountpoints.push(l),e.mountpoints.sort((h,u)=>u.length-h.length)),e.mounts[l]=d,e.watching&&Promise.resolve(Td(d,i,l)).then(h=>{e.unwatch[l]=h}).catch(console.error),c},async unmount(l,d=!0){var h,u;l=wo(l),!(!l||!e.mounts[l])&&(e.watching&&l in e.unwatch&&((u=(h=e.unwatch)[l])==null||u.call(h),delete e.unwatch[l]),d&&await Fd(e.mounts[l]),e.mountpoints=e.mountpoints.filter(b=>b!==l),delete e.mounts[l])},getMount(l=""){l=mt(l)+":";const d=s(l);return{driver:d.driver,base:d.base}},getMounts(l="",d={}){return l=mt(l),n(l,d.parents).map(u=>({driver:u.driver,base:u.mountpoint}))},keys:(l,d={})=>c.getKeys(l,d),get:(l,d={})=>c.getItem(l,d),set:(l,d,h={})=>c.setItem(l,d,h),has:(l,d={})=>c.hasItem(l,d),del:(l,d={})=>c.removeItem(l,d),remove:(l,d={})=>c.removeItem(l,d)};return c}function Td(t,e,s){return t.watch?t.watch((n,i)=>e(n,s+i)):()=>{}}async function Fd(t){typeof t.dispose=="function"&&await Ve(t.dispose)}function un(t){return new Promise((e,s)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>s(t.error)})}function Id(t,e){const s=indexedDB.open(t);s.onupgradeneeded=()=>s.result.createObjectStore(e);const n=un(s);return(i,o)=>n.then(a=>o(a.transaction(e,i).objectStore(e)))}let Ya;function gi(){return Ya||(Ya=Id("keyval-store","keyval")),Ya}function _d(t,e=gi()){return e("readonly",s=>un(s.get(t)))}function S1(t,e,s=gi()){return s("readwrite",n=>(n.put(e,t),un(n.transaction)))}function B1(t,e=gi()){return e("readwrite",s=>(s.delete(t),un(s.transaction)))}function T1(t=gi()){return t("readwrite",e=>(e.clear(),un(e.transaction)))}function F1(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},un(t.transaction)}function I1(t=gi()){return t("readonly",e=>{if(e.getAllKeys)return un(e.getAllKeys());const s=[];return F1(e,n=>s.push(n.key)).then(()=>s)})}const _1=t=>JSON.stringify(t,(e,s)=>typeof s=="bigint"?s.toString()+"n":s),O1=t=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,s=t.replace(e,'$1"$2n"$3');return JSON.parse(s,(n,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function Un(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return O1(t)}catch{return t}}function fn(t){return typeof t=="string"?t:_1(t)||""}const P1="idb-keyval";var R1=(t={})=>{const e=t.base&&t.base.length>0?`${t.base}:`:"",s=i=>e+i;let n;return t.dbName&&t.storeName&&(n=Id(t.dbName,t.storeName)),{name:P1,options:t,async hasItem(i){return!(typeof await _d(s(i),n)>"u")},async getItem(i){return await _d(s(i),n)??null},setItem(i,o){return S1(s(i),o,n)},removeItem(i){return B1(s(i),n)},getKeys(){return I1(n)},clear(){return T1(n)}}};const U1="WALLET_CONNECT_V2_INDEXED_DB",N1="keyvaluestorage";let L1=class{constructor(){this.indexedDb=D1({driver:R1({dbName:U1,storeName:N1})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const s=await this.indexedDb.getItem(e);if(s!==null)return s}async setItem(e,s){await this.indexedDb.setItem(e,fn(s))}async removeItem(e){await this.indexedDb.removeItem(e)}};var Za=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vo={exports:{}};(function(){let t;function e(){}t=e,t.prototype.getItem=function(s){return this.hasOwnProperty(s)?String(this[s]):null},t.prototype.setItem=function(s,n){this[s]=String(n)},t.prototype.removeItem=function(s){delete this[s]},t.prototype.clear=function(){const s=this;Object.keys(s).forEach(function(n){s[n]=void 0,delete s[n]})},t.prototype.key=function(s){return s=s||0,Object.keys(this)[s]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Za<"u"&&Za.localStorage?vo.exports=Za.localStorage:typeof window<"u"&&window.localStorage?vo.exports=window.localStorage:vo.exports=new e})();function $1(t){var e;return[t[0],Un((e=t[1])!=null?e:"")]}let M1=class{constructor(){this.localStorage=vo.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map($1)}async getItem(e){const s=this.localStorage.getItem(e);if(s!==null)return Un(s)}async setItem(e,s){this.localStorage.setItem(e,fn(s))}async removeItem(e){this.localStorage.removeItem(e)}};const z1="wc_storage_version",Od=1,j1=async(t,e,s)=>{const n=z1,i=await e.getItem(n);if(i&&i>=Od){s(e);return}const o=await t.getKeys();if(!o.length){s(e);return}const a=[];for(;o.length;){const r=o.shift();if(!r)continue;const c=r.toLowerCase();if(c.includes("wc@")||c.includes("walletconnect")||c.includes("wc_")||c.includes("wallet_connect")){const l=await t.getItem(r);await e.setItem(r,l),a.push(r)}}await e.setItem(n,Od),s(e),q1(t,a)},q1=async(t,e)=>{e.length&&e.forEach(async s=>{await t.removeItem(s)})};let H1=class{constructor(){this.initialized=!1,this.setInitialized=s=>{this.storage=s,this.initialized=!0};const e=new M1;this.storage=e;try{const s=new L1;j1(e,s,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,s){return await this.initialize(),this.storage.setItem(e,s)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const s=setInterval(()=>{this.initialized&&(clearInterval(s),e())},20)})}};var bi={exports:{}},Xa,Pd;function V1(){if(Pd)return Xa;Pd=1;function t(s){try{return JSON.stringify(s)}catch{return'"[Circular]"'}}Xa=e;function e(s,n,i){var o=i&&i.stringify||t,a=1;if(typeof s=="object"&&s!==null){var r=n.length+a;if(r===1)return s;var c=new Array(r);c[0]=o(s);for(var l=1;l<r;l++)c[l]=o(n[l]);return c.join(" ")}if(typeof s!="string")return s;var d=n.length;if(d===0)return s;for(var h="",u=1-a,b=-1,f=s&&s.length||0,y=0;y<f;){if(s.charCodeAt(y)===37&&y+1<f){switch(b=b>-1?b:0,s.charCodeAt(y+1)){case 100:case 102:if(u>=d||n[u]==null)break;b<y&&(h+=s.slice(b,y)),h+=Number(n[u]),b=y+2,y++;break;case 105:if(u>=d||n[u]==null)break;b<y&&(h+=s.slice(b,y)),h+=Math.floor(Number(n[u])),b=y+2,y++;break;case 79:case 111:case 106:if(u>=d||n[u]===void 0)break;b<y&&(h+=s.slice(b,y));var C=typeof n[u];if(C==="string"){h+="'"+n[u]+"'",b=y+2,y++;break}if(C==="function"){h+=n[u].name||"<anonymous>",b=y+2,y++;break}h+=o(n[u]),b=y+2,y++;break;case 115:if(u>=d)break;b<y&&(h+=s.slice(b,y)),h+=String(n[u]),b=y+2,y++;break;case 37:b<y&&(h+=s.slice(b,y)),h+="%",b=y+2,y++,u--;break}++u}++y}return b===-1?s:(b<f&&(h+=s.slice(b)),h)}return Xa}var Rd;function K1(){if(Rd)return bi.exports;Rd=1;const t=V1();bi.exports=d;const e=F().console||{},s={mapHttpRequest:M,mapHttpResponse:M,wrapRequestSerializer:R,wrapResponseSerializer:R,wrapErrorSerializer:R,req:M,res:M,err:B,errWithCause:B};function n(p,g){return p==="silent"?1/0:g.levels.values[p]}const i=Symbol("pino.logFuncs"),o=Symbol("pino.hierarchy"),a={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function r(p,g){const w={logger:g,parent:p[o]};g[o]=w}function c(p,g,w){const T={};g.forEach(S=>{T[S]=w[S]?w[S]:e[S]||e[a[S]||"log"]||L}),p[i]=T}function l(p,g){return Array.isArray(p)?p.filter(function(T){return T!=="!stdSerializers.err"}):p===!0?Object.keys(g):!1}function d(p){p=p||{},p.browser=p.browser||{};const g=p.browser.transmit;if(g&&typeof g.send!="function")throw Error("pino: transmit option must have a send function");const w=p.browser.write||e;p.browser.write&&(p.browser.asObject=!0);const T=p.serializers||{},S=l(p.browser.serialize,T);let O=p.browser.serialize;Array.isArray(p.browser.serialize)&&p.browser.serialize.indexOf("!stdSerializers.err")>-1&&(O=!1);const z=Object.keys(p.customLevels||{}),H=["error","fatal","warn","info","debug","trace"].concat(z);typeof w=="function"&&H.forEach(function(se){w[se]=w}),(p.enabled===!1||p.browser.disabled)&&(p.level="silent");const Y=p.level||"info",W=Object.create(w);W.log||(W.log=L),c(W,H,w),r({},W),Object.defineProperty(W,"levelVal",{get:ee}),Object.defineProperty(W,"level",{get:ie,set:he});const X={transmit:g,serialize:S,asObject:p.browser.asObject,asObjectBindingsOnly:p.browser.asObjectBindingsOnly,formatters:p.browser.formatters,levels:H,timestamp:P(p),messageKey:p.messageKey||"msg",onChild:p.onChild||L};W.levels=h(p),W.level=Y,W.isLevelEnabled=function(se){return this.levels.values[se]?this.levels.values[se]>=this.levels.values[this.level]:!1},W.setMaxListeners=W.getMaxListeners=W.emit=W.addListener=W.on=W.prependListener=W.once=W.prependOnceListener=W.removeListener=W.removeAllListeners=W.listeners=W.listenerCount=W.eventNames=W.write=W.flush=L,W.serializers=T,W._serialize=S,W._stdErrSerialize=O,W.child=function(...se){return ce.call(this,X,...se)},g&&(W._logEvent=E());function ee(){return n(this.level,this)}function ie(){return this._level}function he(se){if(se!=="silent"&&!this.levels.values[se])throw Error("unknown level "+se);this._level=se,f(this,X,W,"error"),f(this,X,W,"fatal"),f(this,X,W,"warn"),f(this,X,W,"info"),f(this,X,W,"debug"),f(this,X,W,"trace"),z.forEach(I=>{f(this,X,W,I)})}function ce(se,I,m){if(!I)throw new Error("missing bindings for child Pino");m=m||{},S&&I.serializers&&(m.serializers=I.serializers);const v=m.serializers;if(S&&v){var x=Object.assign({},T,v),k=p.browser.serialize===!0?Object.keys(x):S;delete I.serializers,N([I],k,x,this._stdErrSerialize)}function $(G){this._childLevel=(G._childLevel|0)+1,this.bindings=I,x&&(this.serializers=x,this._serialize=k),g&&(this._logEvent=E([].concat(G._logEvent.bindings,I)))}$.prototype=this;const U=new $(this);return r(this,U),U.child=function(...G){return ce.call(this,se,...G)},U.level=m.level||this.level,se.onChild(U),U}return W}function h(p){const g=p.customLevels||{},w=Object.assign({},d.levels.values,g),T=Object.assign({},d.levels.labels,u(g));return{values:w,labels:T}}function u(p){const g={};return Object.keys(p).forEach(function(w){g[p[w]]=w}),g}d.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},d.stdSerializers=s,d.stdTimeFunctions=Object.assign({},{nullTime:q,epochTime:K,unixTime:j,isoTime:D});function b(p){const g=[];p.bindings&&g.push(p.bindings);let w=p[o];for(;w.parent;)w=w.parent,w.logger.bindings&&g.push(w.logger.bindings);return g.reverse()}function f(p,g,w,T){if(Object.defineProperty(p,T,{value:n(p.level,w)>n(T,w)?L:w[i][T],writable:!0,enumerable:!0,configurable:!0}),p[T]===L){if(!g.transmit)return;const O=g.transmit.level||p.level,z=n(O,w);if(n(T,w)<z)return}p[T]=C(p,g,w,T);const S=b(p);S.length!==0&&(p[T]=y(S,p[T]))}function y(p,g){return function(){return g.apply(this,[...p,...arguments])}}function C(p,g,w,T){return(function(S){return function(){const z=g.timestamp(),H=new Array(arguments.length),Y=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var W=0;W<H.length;W++)H[W]=arguments[W];var X=!1;if(g.serialize&&(N(H,this._serialize,this.serializers,this._stdErrSerialize),X=!0),g.asObject||g.formatters?S.call(Y,..._(this,T,H,z,g)):S.apply(Y,H),g.transmit){const ee=g.transmit.level||p._level,ie=n(ee,w),he=n(T,w);if(he<ie)return;A(this,{ts:z,methodLevel:T,methodValue:he,transmitValue:w.levels.values[g.transmit.level||p._level],send:g.transmit.send,val:n(p._level,w)},H,X)}}})(p[i][T])}function _(p,g,w,T,S){const{level:O,log:z=ee=>ee}=S.formatters||{},H=w.slice();let Y=H[0];const W={};let X=(p._childLevel|0)+1;if(X<1&&(X=1),T&&(W.time=T),O){const ee=O(g,p.levels.values[g]);Object.assign(W,ee)}else W.level=p.levels.values[g];if(S.asObjectBindingsOnly){if(Y!==null&&typeof Y=="object")for(;X--&&typeof H[0]=="object";)Object.assign(W,H.shift());return[z(W),...H]}else{if(Y!==null&&typeof Y=="object"){for(;X--&&typeof H[0]=="object";)Object.assign(W,H.shift());Y=H.length?t(H.shift(),H):void 0}else typeof Y=="string"&&(Y=t(H.shift(),H));return Y!==void 0&&(W[S.messageKey]=Y),[z(W)]}}function N(p,g,w,T){for(const S in p)if(T&&p[S]instanceof Error)p[S]=d.stdSerializers.err(p[S]);else if(typeof p[S]=="object"&&!Array.isArray(p[S])&&g)for(const O in p[S])g.indexOf(O)>-1&&O in w&&(p[S][O]=w[O](p[S][O]))}function A(p,g,w,T=!1){const S=g.send,O=g.ts,z=g.methodLevel,H=g.methodValue,Y=g.val,W=p._logEvent.bindings;T||N(w,p._serialize||Object.keys(p.serializers),p.serializers,p._stdErrSerialize===void 0?!0:p._stdErrSerialize),p._logEvent.ts=O,p._logEvent.messages=w.filter(function(X){return W.indexOf(X)===-1}),p._logEvent.level.label=z,p._logEvent.level.value=H,S(z,p._logEvent,Y),p._logEvent=E(W)}function E(p){return{ts:0,messages:[],bindings:p||[],level:{label:"",value:0}}}function B(p){const g={type:p.constructor.name,msg:p.message,stack:p.stack};for(const w in p)g[w]===void 0&&(g[w]=p[w]);return g}function P(p){return typeof p.timestamp=="function"?p.timestamp:p.timestamp===!1?q:K}function M(){return{}}function R(p){return p}function L(){}function q(){return!1}function K(){return Date.now()}function j(){return Math.round(Date.now()/1e3)}function D(){return new Date(Date.now()).toISOString()}function F(){function p(g){return typeof g<"u"&&g}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return p(self)||p(window)||p(this)||{}}}return bi.exports.default=d,bi.exports.pino=d,bi.exports}var Nn=K1();const Ud=ho(Nn),W1={level:"info"},xo="custom_context",Qa=1e3*1024;var G1=Object.defineProperty,Y1=(t,e,s)=>e in t?G1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Rs=(t,e,s)=>Y1(t,typeof e!="symbol"?e+"":e,s);let Z1=class{constructor(e){Rs(this,"nodeValue"),Rs(this,"sizeInBytes"),Rs(this,"next"),this.nodeValue=e,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}},Nd=class{constructor(e){Rs(this,"lengthInNodes"),Rs(this,"sizeInBytes"),Rs(this,"head"),Rs(this,"tail"),Rs(this,"maxSizeInBytes"),this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){const s=new Z1(e);if(s.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${s.size}`);for(;this.size+s.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=s),this.tail=s):(this.head=s,this.tail=s),this.lengthInNodes++,this.sizeInBytes+=s.size}shift(){if(!this.head)return;const e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){const e=[];let s=this.head;for(;s!==null;)e.push(s.value),s=s.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};const s=e.value;return e=e.next,{done:!1,value:s}}}}};var X1=Object.defineProperty,Q1=(t,e,s)=>e in t?X1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Eo=(t,e,s)=>Q1(t,typeof e!="symbol"?e+"":e,s);class Ld{constructor(e,s=Qa){Eo(this,"logs"),Eo(this,"level"),Eo(this,"levelValue"),Eo(this,"MAX_LOG_SIZE_IN_BYTES"),this.level=e??"error",this.levelValue=Nn.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=s,this.logs=new Nd(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,s){s===Nn.levels.values.error?console.error(e):s===Nn.levels.values.warn?console.warn(e):s===Nn.levels.values.debug?console.debug(e):s===Nn.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append(fn({timestamp:new Date().toISOString(),log:e}));const s=typeof e=="string"?JSON.parse(e).level:e.level;s>=this.levelValue&&this.forwardToConsole(e,s)}getLogs(){return this.logs}clearLogs(){this.logs=new Nd(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){const s=this.getLogArray();return s.push(fn({extraMetadata:e})),new Blob(s,{type:"application/json"})}}var J1=Object.defineProperty,ey=(t,e,s)=>e in t?J1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,ty=(t,e,s)=>ey(t,e+"",s);class sy{constructor(e,s=Qa){ty(this,"baseChunkLogger"),this.baseChunkLogger=new Ld(e,s)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){const s=URL.createObjectURL(this.logsToBlob(e)),n=document.createElement("a");n.href=s,n.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(s)}}var ny=Object.defineProperty,iy=(t,e,s)=>e in t?ny(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,oy=(t,e,s)=>iy(t,e+"",s);let ay=class{constructor(e,s=Qa){oy(this,"baseChunkLogger"),this.baseChunkLogger=new Ld(e,s)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}};var ry=Object.defineProperty,cy=Object.defineProperties,ly=Object.getOwnPropertyDescriptors,$d=Object.getOwnPropertySymbols,dy=Object.prototype.hasOwnProperty,hy=Object.prototype.propertyIsEnumerable,Md=(t,e,s)=>e in t?ry(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,ko=(t,e)=>{for(var s in e||(e={}))dy.call(e,s)&&Md(t,s,e[s]);if($d)for(var s of $d(e))hy.call(e,s)&&Md(t,s,e[s]);return t},Co=(t,e)=>cy(t,ly(e));function uy(t){return Co(ko({},t),{level:(t==null?void 0:t.level)||W1.level})}function fy(t,e,s=xo){return t[s]=e,t}function gt(t,e=xo){return t[e]||""}function py(t,e,s=xo){const n=gt(t,s);return n.trim()?`${n}/${e}`:e}function Dt(t,e,s=xo){const n=py(t,e,s),i=t.child({context:n});return fy(i,n,s)}function my(t){var e,s;const n=new sy((e=t.opts)==null?void 0:e.level,t.maxSizeInBytes);return{logger:Ud(Co(ko({},t.opts),{level:"trace",browser:Co(ko({},(s=t.opts)==null?void 0:s.browser),{write:i=>n.write(i)})})),chunkLoggerController:n}}function gy(t){var e;const s=new ay((e=t.opts)==null?void 0:e.level,t.maxSizeInBytes);return{logger:Ud(Co(ko({},t.opts),{level:"trace"}),s),chunkLoggerController:s}}function zd(t){return typeof t.loggerOverride<"u"&&typeof t.loggerOverride!="string"?{logger:t.loggerOverride,chunkLoggerController:null}:typeof window<"u"?my(t):gy(t)}var by=Object.defineProperty,yy=(t,e,s)=>e in t?by(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,jd=(t,e,s)=>yy(t,typeof e!="symbol"?e+"":e,s);let wy=class extends dn{constructor(e){super(),this.opts=e,jd(this,"protocol","wc"),jd(this,"version",2)}};var vy=Object.defineProperty,xy=(t,e,s)=>e in t?vy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Ey=(t,e,s)=>xy(t,e+"",s);class ky extends dn{constructor(e,s){super(),this.core=e,this.logger=s,Ey(this,"records",new Map)}}class Cy{constructor(e,s){this.logger=e,this.core=s}}class Ay extends dn{constructor(e,s){super(),this.relayer=e,this.logger=s}}let Dy=class extends dn{constructor(e){super()}},Sy=class{constructor(e,s,n,i){this.core=e,this.logger=s,this.name=n}},By=class extends dn{constructor(e,s){super(),this.relayer=e,this.logger=s}},Ty=class extends dn{constructor(e,s){super(),this.core=e,this.logger=s}},Fy=class{constructor(e,s,n){this.core=e,this.logger=s,this.store=n}},Iy=class{constructor(e,s){this.projectId=e,this.logger=s}},_y=class{constructor(e,s,n){this.core=e,this.logger=s,this.telemetryEnabled=n}};var Oy=Object.defineProperty,Py=(t,e,s)=>e in t?Oy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,qd=(t,e,s)=>Py(t,typeof e!="symbol"?e+"":e,s);let Ry=class{constructor(e){this.opts=e,qd(this,"protocol","wc"),qd(this,"version",2)}},Uy=class{constructor(e){this.client=e}};function Ny(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function Hd(t,...e){if(!Ny(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function Vd(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Ly(t,e){Hd(t);const s=e.outputLen;if(t.length<s)throw new Error("digestInto() expects output buffer of length at least "+s)}const Ln=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ja=t=>new DataView(t.buffer,t.byteOffset,t.byteLength);function $y(t){if(typeof t!="string")throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function Kd(t){return typeof t=="string"&&(t=$y(t)),Hd(t),t}let My=class{clone(){return this._cloneInto()}};function zy(t){const e=n=>t().update(Kd(n)).digest(),s=t();return e.outputLen=s.outputLen,e.blockLen=s.blockLen,e.create=()=>t(),e}function Wd(t=32){if(Ln&&typeof Ln.getRandomValues=="function")return Ln.getRandomValues(new Uint8Array(t));if(Ln&&typeof Ln.randomBytes=="function")return Ln.randomBytes(t);throw new Error("crypto.getRandomValues must be defined")}function jy(t,e,s,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,s,n);const i=BigInt(32),o=BigInt(4294967295),a=Number(s>>i&o),r=Number(s&o),c=n?4:0,l=n?0:4;t.setUint32(e+c,a,n),t.setUint32(e+l,r,n)}let qy=class extends My{constructor(e,s,n,i){super(),this.blockLen=e,this.outputLen=s,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Ja(this.buffer)}update(e){Vd(this);const{view:s,buffer:n,blockLen:i}=this;e=Kd(e);const o=e.length;for(let a=0;a<o;){const r=Math.min(i-this.pos,o-a);if(r===i){const c=Ja(e);for(;i<=o-a;a+=i)this.process(c,a);continue}n.set(e.subarray(a,a+r),this.pos),this.pos+=r,a+=r,this.pos===i&&(this.process(s,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Vd(this),Ly(e,this),this.finished=!0;const{buffer:s,view:n,blockLen:i,isLE:o}=this;let{pos:a}=this;s[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>i-a&&(this.process(n,0),a=0);for(let h=a;h<i;h++)s[h]=0;jy(n,i-8,BigInt(this.length*8),o),this.process(n,0);const r=Ja(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<l;h++)r.setUint32(4*h,d[h],o)}digest(){const{buffer:e,outputLen:s}=this;this.digestInto(e);const n=e.slice(0,s);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:s,buffer:n,length:i,finished:o,destroyed:a,pos:r}=this;return e.length=i,e.pos=r,e.finished=o,e.destroyed=a,i%s&&e.buffer.set(n),e}};const Ao=BigInt(2**32-1),er=BigInt(32);function Gd(t,e=!1){return e?{h:Number(t&Ao),l:Number(t>>er&Ao)}:{h:Number(t>>er&Ao)|0,l:Number(t&Ao)|0}}function Hy(t,e=!1){let s=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:o,l:a}=Gd(t[i],e);[s[i],n[i]]=[o,a]}return[s,n]}const Vy=(t,e)=>BigInt(t>>>0)<<er|BigInt(e>>>0),Ky=(t,e,s)=>t>>>s,Wy=(t,e,s)=>t<<32-s|e>>>s,Gy=(t,e,s)=>t>>>s|e<<32-s,Yy=(t,e,s)=>t<<32-s|e>>>s,Zy=(t,e,s)=>t<<64-s|e>>>s-32,Xy=(t,e,s)=>t>>>s-32|e<<64-s,Qy=(t,e)=>e,Jy=(t,e)=>t,e2=(t,e,s)=>t<<s|e>>>32-s,t2=(t,e,s)=>e<<s|t>>>32-s,s2=(t,e,s)=>e<<s-32|t>>>64-s,n2=(t,e,s)=>t<<s-32|e>>>64-s;function i2(t,e,s,n){const i=(e>>>0)+(n>>>0);return{h:t+s+(i/2**32|0)|0,l:i|0}}const o2=(t,e,s)=>(t>>>0)+(e>>>0)+(s>>>0),a2=(t,e,s,n)=>e+s+n+(t/2**32|0)|0,r2=(t,e,s,n)=>(t>>>0)+(e>>>0)+(s>>>0)+(n>>>0),c2=(t,e,s,n,i)=>e+s+n+i+(t/2**32|0)|0,l2=(t,e,s,n,i)=>(t>>>0)+(e>>>0)+(s>>>0)+(n>>>0)+(i>>>0),d2=(t,e,s,n,i,o)=>e+s+n+i+o+(t/2**32|0)|0,ye={fromBig:Gd,split:Hy,toBig:Vy,shrSH:Ky,shrSL:Wy,rotrSH:Gy,rotrSL:Yy,rotrBH:Zy,rotrBL:Xy,rotr32H:Qy,rotr32L:Jy,rotlSH:e2,rotlSL:t2,rotlBH:s2,rotlBL:n2,add:i2,add3L:o2,add3H:a2,add4L:r2,add4H:c2,add5H:d2,add5L:l2},[h2,u2]=ye.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),Us=new Uint32Array(80),Ns=new Uint32Array(80);let f2=class extends qy{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:s,Bh:n,Bl:i,Ch:o,Cl:a,Dh:r,Dl:c,Eh:l,El:d,Fh:h,Fl:u,Gh:b,Gl:f,Hh:y,Hl:C}=this;return[e,s,n,i,o,a,r,c,l,d,h,u,b,f,y,C]}set(e,s,n,i,o,a,r,c,l,d,h,u,b,f,y,C){this.Ah=e|0,this.Al=s|0,this.Bh=n|0,this.Bl=i|0,this.Ch=o|0,this.Cl=a|0,this.Dh=r|0,this.Dl=c|0,this.Eh=l|0,this.El=d|0,this.Fh=h|0,this.Fl=u|0,this.Gh=b|0,this.Gl=f|0,this.Hh=y|0,this.Hl=C|0}process(e,s){for(let A=0;A<16;A++,s+=4)Us[A]=e.getUint32(s),Ns[A]=e.getUint32(s+=4);for(let A=16;A<80;A++){const E=Us[A-15]|0,B=Ns[A-15]|0,P=ye.rotrSH(E,B,1)^ye.rotrSH(E,B,8)^ye.shrSH(E,B,7),M=ye.rotrSL(E,B,1)^ye.rotrSL(E,B,8)^ye.shrSL(E,B,7),R=Us[A-2]|0,L=Ns[A-2]|0,q=ye.rotrSH(R,L,19)^ye.rotrBH(R,L,61)^ye.shrSH(R,L,6),K=ye.rotrSL(R,L,19)^ye.rotrBL(R,L,61)^ye.shrSL(R,L,6),j=ye.add4L(M,K,Ns[A-7],Ns[A-16]),D=ye.add4H(j,P,q,Us[A-7],Us[A-16]);Us[A]=D|0,Ns[A]=j|0}let{Ah:n,Al:i,Bh:o,Bl:a,Ch:r,Cl:c,Dh:l,Dl:d,Eh:h,El:u,Fh:b,Fl:f,Gh:y,Gl:C,Hh:_,Hl:N}=this;for(let A=0;A<80;A++){const E=ye.rotrSH(h,u,14)^ye.rotrSH(h,u,18)^ye.rotrBH(h,u,41),B=ye.rotrSL(h,u,14)^ye.rotrSL(h,u,18)^ye.rotrBL(h,u,41),P=h&b^~h&y,M=u&f^~u&C,R=ye.add5L(N,B,M,u2[A],Ns[A]),L=ye.add5H(R,_,E,P,h2[A],Us[A]),q=R|0,K=ye.rotrSH(n,i,28)^ye.rotrBH(n,i,34)^ye.rotrBH(n,i,39),j=ye.rotrSL(n,i,28)^ye.rotrBL(n,i,34)^ye.rotrBL(n,i,39),D=n&o^n&r^o&r,F=i&a^i&c^a&c;_=y|0,N=C|0,y=b|0,C=f|0,b=h|0,f=u|0,{h,l:u}=ye.add(l|0,d|0,L|0,q|0),l=r|0,d=c|0,r=o|0,c=a|0,o=n|0,a=i|0;const p=ye.add3L(q,j,F);n=ye.add3H(p,L,K,D),i=p|0}({h:n,l:i}=ye.add(this.Ah|0,this.Al|0,n|0,i|0)),{h:o,l:a}=ye.add(this.Bh|0,this.Bl|0,o|0,a|0),{h:r,l:c}=ye.add(this.Ch|0,this.Cl|0,r|0,c|0),{h:l,l:d}=ye.add(this.Dh|0,this.Dl|0,l|0,d|0),{h,l:u}=ye.add(this.Eh|0,this.El|0,h|0,u|0),{h:b,l:f}=ye.add(this.Fh|0,this.Fl|0,b|0,f|0),{h:y,l:C}=ye.add(this.Gh|0,this.Gl|0,y|0,C|0),{h:_,l:N}=ye.add(this.Hh|0,this.Hl|0,_|0,N|0),this.set(n,i,o,a,r,c,l,d,h,u,b,f,y,C,_,N)}roundClean(){Us.fill(0),Ns.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const p2=zy(()=>new f2);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const tr=BigInt(0),Yd=BigInt(1),m2=BigInt(2);function sr(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function nr(t){if(!sr(t))throw new Error("Uint8Array expected")}function ir(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}const g2=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function or(t){nr(t);let e="";for(let s=0;s<t.length;s++)e+=g2[t[s]];return e}function Zd(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?tr:BigInt("0x"+t)}const ms={_0:48,_9:57,A:65,F:70,a:97,f:102};function Xd(t){if(t>=ms._0&&t<=ms._9)return t-ms._0;if(t>=ms.A&&t<=ms.F)return t-(ms.A-10);if(t>=ms.a&&t<=ms.f)return t-(ms.a-10)}function Qd(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length,s=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(s);for(let i=0,o=0;i<s;i++,o+=2){const a=Xd(t.charCodeAt(o)),r=Xd(t.charCodeAt(o+1));if(a===void 0||r===void 0){const c=t[o]+t[o+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+o)}n[i]=a*16+r}return n}function b2(t){return Zd(or(t))}function Do(t){return nr(t),Zd(or(Uint8Array.from(t).reverse()))}function Jd(t,e){return Qd(t.toString(16).padStart(e*2,"0"))}function ar(t,e){return Jd(t,e).reverse()}function gs(t,e,s){let n;if(typeof e=="string")try{n=Qd(e)}catch(o){throw new Error(t+" must be hex string or Uint8Array, cause: "+o)}else if(sr(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const i=n.length;if(typeof s=="number"&&i!==s)throw new Error(t+" of length "+s+" expected, got "+i);return n}function eh(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];nr(i),e+=i.length}const s=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const o=t[n];s.set(o,i),i+=o.length}return s}const rr=t=>typeof t=="bigint"&&tr<=t;function y2(t,e,s){return rr(t)&&rr(e)&&rr(s)&&e<=t&&t<s}function yi(t,e,s,n){if(!y2(e,s,n))throw new Error("expected valid "+t+": "+s+" <= n < "+n+", got "+e)}function w2(t){let e;for(e=0;t>tr;t>>=Yd,e+=1);return e}const v2=t=>(m2<<BigInt(t-1))-Yd,x2={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"||sr(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function cr(t,e,s={}){const n=(i,o,a)=>{const r=x2[o];if(typeof r!="function")throw new Error("invalid validator function");const c=t[i];if(!(a&&c===void 0)&&!r(c,t))throw new Error("param "+String(i)+" is invalid. Expected "+o+", got "+c)};for(const[i,o]of Object.entries(e))n(i,o,!1);for(const[i,o]of Object.entries(s))n(i,o,!0);return t}function th(t){const e=new WeakMap;return(s,...n)=>{const i=e.get(s);if(i!==void 0)return i;const o=t(s,...n);return e.set(s,o),o}}const Ke=BigInt(0),Oe=BigInt(1),pn=BigInt(2),E2=BigInt(3),lr=BigInt(4),sh=BigInt(5),nh=BigInt(8);function $e(t,e){const s=t%e;return s>=Ke?s:e+s}function k2(t,e,s){if(e<Ke)throw new Error("invalid exponent, negatives unsupported");if(s<=Ke)throw new Error("invalid modulus");if(s===Oe)return Ke;let n=Oe;for(;e>Ke;)e&Oe&&(n=n*t%s),t=t*t%s,e>>=Oe;return n}function es(t,e,s){let n=t;for(;e-- >Ke;)n*=n,n%=s;return n}function ih(t,e){if(t===Ke)throw new Error("invert: expected non-zero number");if(e<=Ke)throw new Error("invert: expected positive modulus, got "+e);let s=$e(t,e),n=e,i=Ke,o=Oe;for(;s!==Ke;){const a=n/s,r=n%s,c=i-o*a;n=s,s=r,i=o,o=c}if(n!==Oe)throw new Error("invert: does not exist");return $e(i,e)}function C2(t){const e=(t-Oe)/pn;let s,n,i;for(s=t-Oe,n=0;s%pn===Ke;s/=pn,n++);for(i=pn;i<t&&k2(i,e,t)!==t-Oe;i++)if(i>1e3)throw new Error("Cannot find square root: likely non-prime P");if(n===1){const a=(t+Oe)/lr;return function(r,c){const l=r.pow(c,a);if(!r.eql(r.sqr(l),c))throw new Error("Cannot find square root");return l}}const o=(s+Oe)/pn;return function(a,r){if(a.pow(r,e)===a.neg(a.ONE))throw new Error("Cannot find square root");let c=n,l=a.pow(a.mul(a.ONE,i),s),d=a.pow(r,o),h=a.pow(r,s);for(;!a.eql(h,a.ONE);){if(a.eql(h,a.ZERO))return a.ZERO;let u=1;for(let f=a.sqr(h);u<c&&!a.eql(f,a.ONE);u++)f=a.sqr(f);const b=a.pow(l,Oe<<BigInt(c-u-1));l=a.sqr(b),d=a.mul(d,b),h=a.mul(h,l),c=u}return d}}function A2(t){if(t%lr===E2){const e=(t+Oe)/lr;return function(s,n){const i=s.pow(n,e);if(!s.eql(s.sqr(i),n))throw new Error("Cannot find square root");return i}}if(t%nh===sh){const e=(t-sh)/nh;return function(s,n){const i=s.mul(n,pn),o=s.pow(i,e),a=s.mul(n,o),r=s.mul(s.mul(a,pn),o),c=s.mul(a,s.sub(r,s.ONE));if(!s.eql(s.sqr(c),n))throw new Error("Cannot find square root");return c}}return C2(t)}const D2=(t,e)=>($e(t,e)&Oe)===Oe,S2=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function B2(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},s=S2.reduce((n,i)=>(n[i]="function",n),e);return cr(t,s)}function T2(t,e,s){if(s<Ke)throw new Error("invalid exponent, negatives unsupported");if(s===Ke)return t.ONE;if(s===Oe)return e;let n=t.ONE,i=e;for(;s>Ke;)s&Oe&&(n=t.mul(n,i)),i=t.sqr(i),s>>=Oe;return n}function F2(t,e){const s=new Array(e.length),n=e.reduce((o,a,r)=>t.is0(a)?o:(s[r]=o,t.mul(o,a)),t.ONE),i=t.inv(n);return e.reduceRight((o,a,r)=>t.is0(a)?o:(s[r]=t.mul(o,s[r]),t.mul(o,a)),i),s}function oh(t,e){const s=e!==void 0?e:t.toString(2).length,n=Math.ceil(s/8);return{nBitLength:s,nByteLength:n}}function ah(t,e,s=!1,n={}){if(t<=Ke)throw new Error("invalid field: expected ORDER > 0, got "+t);const{nBitLength:i,nByteLength:o}=oh(t,e);if(o>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let a;const r=Object.freeze({ORDER:t,isLE:s,BITS:i,BYTES:o,MASK:v2(i),ZERO:Ke,ONE:Oe,create:c=>$e(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Ke<=c&&c<t},is0:c=>c===Ke,isOdd:c=>(c&Oe)===Oe,neg:c=>$e(-c,t),eql:(c,l)=>c===l,sqr:c=>$e(c*c,t),add:(c,l)=>$e(c+l,t),sub:(c,l)=>$e(c-l,t),mul:(c,l)=>$e(c*l,t),pow:(c,l)=>T2(r,c,l),div:(c,l)=>$e(c*ih(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>ih(c,t),sqrt:n.sqrt||(c=>(a||(a=A2(t)),a(r,c))),invertBatch:c=>F2(r,c),cmov:(c,l,d)=>d?l:c,toBytes:c=>s?ar(c,o):Jd(c,o),fromBytes:c=>{if(c.length!==o)throw new Error("Field.fromBytes: expected "+o+" bytes, got "+c.length);return s?Do(c):b2(c)}});return Object.freeze(r)}const rh=BigInt(0),So=BigInt(1);function dr(t,e){const s=e.negate();return t?s:e}function ch(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function hr(t,e){ch(t,e);const s=Math.ceil(e/t)+1,n=2**(t-1);return{windows:s,windowSize:n}}function I2(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((s,n)=>{if(!(s instanceof e))throw new Error("invalid point at index "+n)})}function _2(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((s,n)=>{if(!e.isValid(s))throw new Error("invalid scalar at index "+n)})}const ur=new WeakMap,lh=new WeakMap;function fr(t){return lh.get(t)||1}function O2(t,e){return{constTimeNegate:dr,hasPrecomputes(s){return fr(s)!==1},unsafeLadder(s,n,i=t.ZERO){let o=s;for(;n>rh;)n&So&&(i=i.add(o)),o=o.double(),n>>=So;return i},precomputeWindow(s,n){const{windows:i,windowSize:o}=hr(n,e),a=[];let r=s,c=r;for(let l=0;l<i;l++){c=r,a.push(c);for(let d=1;d<o;d++)c=c.add(r),a.push(c);r=c.double()}return a},wNAF(s,n,i){const{windows:o,windowSize:a}=hr(s,e);let r=t.ZERO,c=t.BASE;const l=BigInt(2**s-1),d=2**s,h=BigInt(s);for(let u=0;u<o;u++){const b=u*a;let f=Number(i&l);i>>=h,f>a&&(f-=d,i+=So);const y=b,C=b+Math.abs(f)-1,_=u%2!==0,N=f<0;f===0?c=c.add(dr(_,n[y])):r=r.add(dr(N,n[C]))}return{p:r,f:c}},wNAFUnsafe(s,n,i,o=t.ZERO){const{windows:a,windowSize:r}=hr(s,e),c=BigInt(2**s-1),l=2**s,d=BigInt(s);for(let h=0;h<a;h++){const u=h*r;if(i===rh)break;let b=Number(i&c);if(i>>=d,b>r&&(b-=l,i+=So),b===0)continue;let f=n[u+Math.abs(b)-1];b<0&&(f=f.negate()),o=o.add(f)}return o},getPrecomputes(s,n,i){let o=ur.get(n);return o||(o=this.precomputeWindow(n,s),s!==1&&ur.set(n,i(o))),o},wNAFCached(s,n,i){const o=fr(s);return this.wNAF(o,this.getPrecomputes(o,s,i),n)},wNAFCachedUnsafe(s,n,i,o){const a=fr(s);return a===1?this.unsafeLadder(s,n,o):this.wNAFUnsafe(a,this.getPrecomputes(a,s,i),n,o)},setWindowSize(s,n){ch(n,e),lh.set(s,n),ur.delete(s)}}}function P2(t,e,s,n){if(I2(s,t),_2(n,e),s.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const i=t.ZERO,o=w2(BigInt(s.length)),a=o>12?o-3:o>4?o-2:o?2:1,r=(1<<a)-1,c=new Array(r+1).fill(i),l=Math.floor((e.BITS-1)/a)*a;let d=i;for(let h=l;h>=0;h-=a){c.fill(i);for(let b=0;b<n.length;b++){const f=n[b],y=Number(f>>BigInt(h)&BigInt(r));c[y]=c[y].add(s[b])}let u=i;for(let b=c.length-1,f=i;b>0;b--)f=f.add(c[b]),u=u.add(f);if(d=d.add(u),h!==0)for(let b=0;b<a;b++)d=d.double()}return d}function R2(t){return B2(t.Fp),cr(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...oh(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}const Wt=BigInt(0),bt=BigInt(1),Bo=BigInt(2),U2=BigInt(8),N2={zip215:!0};function L2(t){const e=R2(t);return cr(t,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...e})}function $2(t){const e=L2(t),{Fp:s,n,prehash:i,hash:o,randomBytes:a,nByteLength:r,h:c}=e,l=Bo<<BigInt(r*8)-bt,d=s.create,h=ah(e.n,e.nBitLength),u=e.uvRatio||((p,g)=>{try{return{isValid:!0,value:s.sqrt(p*s.inv(g))}}catch{return{isValid:!1,value:Wt}}}),b=e.adjustScalarBytes||(p=>p),f=e.domain||((p,g,w)=>{if(ir("phflag",w),g.length||w)throw new Error("Contexts/pre-hash are not supported");return p});function y(p,g){yi("coordinate "+p,g,Wt,l)}function C(p){if(!(p instanceof A))throw new Error("ExtendedPoint expected")}const _=th((p,g)=>{const{ex:w,ey:T,ez:S}=p,O=p.is0();g==null&&(g=O?U2:s.inv(S));const z=d(w*g),H=d(T*g),Y=d(S*g);if(O)return{x:Wt,y:bt};if(Y!==bt)throw new Error("invZ was invalid");return{x:z,y:H}}),N=th(p=>{const{a:g,d:w}=e;if(p.is0())throw new Error("bad point: ZERO");const{ex:T,ey:S,ez:O,et:z}=p,H=d(T*T),Y=d(S*S),W=d(O*O),X=d(W*W),ee=d(H*g),ie=d(W*d(ee+Y)),he=d(X+d(w*d(H*Y)));if(ie!==he)throw new Error("bad point: equation left != right (1)");const ce=d(T*S),se=d(O*z);if(ce!==se)throw new Error("bad point: equation left != right (2)");return!0});class A{constructor(g,w,T,S){this.ex=g,this.ey=w,this.ez=T,this.et=S,y("x",g),y("y",w),y("z",T),y("t",S),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(g){if(g instanceof A)throw new Error("extended point not allowed");const{x:w,y:T}=g||{};return y("x",w),y("y",T),new A(w,T,bt,d(w*T))}static normalizeZ(g){const w=s.invertBatch(g.map(T=>T.ez));return g.map((T,S)=>T.toAffine(w[S])).map(A.fromAffine)}static msm(g,w){return P2(A,h,g,w)}_setWindowSize(g){P.setWindowSize(this,g)}assertValidity(){N(this)}equals(g){C(g);const{ex:w,ey:T,ez:S}=this,{ex:O,ey:z,ez:H}=g,Y=d(w*H),W=d(O*S),X=d(T*H),ee=d(z*S);return Y===W&&X===ee}is0(){return this.equals(A.ZERO)}negate(){return new A(d(-this.ex),this.ey,this.ez,d(-this.et))}double(){const{a:g}=e,{ex:w,ey:T,ez:S}=this,O=d(w*w),z=d(T*T),H=d(Bo*d(S*S)),Y=d(g*O),W=w+T,X=d(d(W*W)-O-z),ee=Y+z,ie=ee-H,he=Y-z,ce=d(X*ie),se=d(ee*he),I=d(X*he),m=d(ie*ee);return new A(ce,se,m,I)}add(g){C(g);const{a:w,d:T}=e,{ex:S,ey:O,ez:z,et:H}=this,{ex:Y,ey:W,ez:X,et:ee}=g;if(w===BigInt(-1)){const Z=d((O-S)*(W+Y)),Q=d((O+S)*(W-Y)),V=d(Q-Z);if(V===Wt)return this.double();const ae=d(z*Bo*ee),pe=d(H*Bo*X),ue=pe+ae,te=Q+Z,ne=pe-ae,ge=d(ue*V),we=d(te*ne),de=d(ue*ne),be=d(V*te);return new A(ge,we,be,de)}const ie=d(S*Y),he=d(O*W),ce=d(H*T*ee),se=d(z*X),I=d((S+O)*(Y+W)-ie-he),m=se-ce,v=se+ce,x=d(he-w*ie),k=d(I*m),$=d(v*x),U=d(I*x),G=d(m*v);return new A(k,$,G,U)}subtract(g){return this.add(g.negate())}wNAF(g){return P.wNAFCached(this,g,A.normalizeZ)}multiply(g){const w=g;yi("scalar",w,bt,n);const{p:T,f:S}=this.wNAF(w);return A.normalizeZ([T,S])[0]}multiplyUnsafe(g,w=A.ZERO){const T=g;return yi("scalar",T,Wt,n),T===Wt?B:this.is0()||T===bt?this:P.wNAFCachedUnsafe(this,T,A.normalizeZ,w)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return P.unsafeLadder(this,n).is0()}toAffine(g){return _(this,g)}clearCofactor(){const{h:g}=e;return g===bt?this:this.multiplyUnsafe(g)}static fromHex(g,w=!1){const{d:T,a:S}=e,O=s.BYTES;g=gs("pointHex",g,O),ir("zip215",w);const z=g.slice(),H=g[O-1];z[O-1]=H&-129;const Y=Do(z),W=w?l:s.ORDER;yi("pointHex.y",Y,Wt,W);const X=d(Y*Y),ee=d(X-bt),ie=d(T*X-S);let{isValid:he,value:ce}=u(ee,ie);if(!he)throw new Error("Point.fromHex: invalid y coordinate");const se=(ce&bt)===bt,I=(H&128)!==0;if(!w&&ce===Wt&&I)throw new Error("Point.fromHex: x=0 and x_0=1");return I!==se&&(ce=d(-ce)),A.fromAffine({x:ce,y:Y})}static fromPrivateKey(g){return L(g).point}toRawBytes(){const{x:g,y:w}=this.toAffine(),T=ar(w,s.BYTES);return T[T.length-1]|=g&bt?128:0,T}toHex(){return or(this.toRawBytes())}}A.BASE=new A(e.Gx,e.Gy,bt,d(e.Gx*e.Gy)),A.ZERO=new A(Wt,bt,bt,Wt);const{BASE:E,ZERO:B}=A,P=O2(A,r*8);function M(p){return $e(p,n)}function R(p){return M(Do(p))}function L(p){const g=s.BYTES;p=gs("private key",p,g);const w=gs("hashed private key",o(p),2*g),T=b(w.slice(0,g)),S=w.slice(g,2*g),O=R(T),z=E.multiply(O),H=z.toRawBytes();return{head:T,prefix:S,scalar:O,point:z,pointBytes:H}}function q(p){return L(p).pointBytes}function K(p=new Uint8Array,...g){const w=eh(...g);return R(o(f(w,gs("context",p),!!i)))}function j(p,g,w={}){p=gs("message",p),i&&(p=i(p));const{prefix:T,scalar:S,pointBytes:O}=L(g),z=K(w.context,T,p),H=E.multiply(z).toRawBytes(),Y=K(w.context,H,O,p),W=M(z+Y*S);yi("signature.s",W,Wt,n);const X=eh(H,ar(W,s.BYTES));return gs("result",X,s.BYTES*2)}const D=N2;function F(p,g,w,T=D){const{context:S,zip215:O}=T,z=s.BYTES;p=gs("signature",p,2*z),g=gs("message",g),w=gs("publicKey",w,z),O!==void 0&&ir("zip215",O),i&&(g=i(g));const H=Do(p.slice(z,2*z));let Y,W,X;try{Y=A.fromHex(w,O),W=A.fromHex(p.slice(0,z),O),X=E.multiplyUnsafe(H)}catch{return!1}if(!O&&Y.isSmallOrder())return!1;const ee=K(S,W.toRawBytes(),Y.toRawBytes(),g);return W.add(Y.multiplyUnsafe(ee)).subtract(X).clearCofactor().equals(A.ZERO)}return E._setWindowSize(8),{CURVE:e,getPublicKey:q,sign:j,verify:F,ExtendedPoint:A,utils:{getExtendedPublicKey:L,randomPrivateKey:()=>a(s.BYTES),precompute(p=8,g=A.BASE){return g._setWindowSize(p),g.multiply(BigInt(3)),g}}}}BigInt(0),BigInt(1);const pr=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),dh=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);const M2=BigInt(1),hh=BigInt(2);BigInt(3);const z2=BigInt(5),j2=BigInt(8);function q2(t){const e=BigInt(10),s=BigInt(20),n=BigInt(40),i=BigInt(80),o=pr,a=t*t%o*t%o,r=es(a,hh,o)*a%o,c=es(r,M2,o)*t%o,l=es(c,z2,o)*c%o,d=es(l,e,o)*l%o,h=es(d,s,o)*d%o,u=es(h,n,o)*h%o,b=es(u,i,o)*u%o,f=es(b,i,o)*u%o,y=es(f,e,o)*l%o;return{pow_p_5_8:es(y,hh,o)*t%o,b2:a}}function H2(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function V2(t,e){const s=pr,n=$e(e*e*e,s),i=$e(n*n*e,s),o=q2(t*i).pow_p_5_8;let a=$e(t*n*o,s);const r=$e(e*a*a,s),c=a,l=$e(a*dh,s),d=r===t,h=r===$e(-t,s),u=r===$e(-t*dh,s);return d&&(a=c),(h||u)&&(a=l),D2(a,s)&&(a=$e(-a,s)),{isValid:d||h,value:a}}const K2=ah(pr,void 0,!0),W2={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:K2,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:j2,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:p2,randomBytes:Wd,adjustScalarBytes:H2,uvRatio:V2},uh=$2(W2),G2="EdDSA",Y2="JWT",To=".",Fo="base64url",fh="utf8",ph="utf8",Z2=":",X2="did",Q2="key",mh="base58btc",J2="z",ew="K36",tw=32;function mr(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function gh(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?mr(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function bh(t,e){e||(e=t.reduce((i,o)=>i+o.length,0));const s=gh(e);let n=0;for(const i of t)s.set(i,n),n+=i.length;return mr(s)}function sw(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var s=new Uint8Array(256),n=0;n<s.length;n++)s[n]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),a=o.charCodeAt(0);if(s[a]!==255)throw new TypeError(o+" is ambiguous");s[a]=i}var r=t.length,c=t.charAt(0),l=Math.log(r)/Math.log(256),d=Math.log(256)/Math.log(r);function h(f){if(f instanceof Uint8Array||(ArrayBuffer.isView(f)?f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength):Array.isArray(f)&&(f=Uint8Array.from(f))),!(f instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(f.length===0)return"";for(var y=0,C=0,_=0,N=f.length;_!==N&&f[_]===0;)_++,y++;for(var A=(N-_)*d+1>>>0,E=new Uint8Array(A);_!==N;){for(var B=f[_],P=0,M=A-1;(B!==0||P<C)&&M!==-1;M--,P++)B+=256*E[M]>>>0,E[M]=B%r>>>0,B=B/r>>>0;if(B!==0)throw new Error("Non-zero carry");C=P,_++}for(var R=A-C;R!==A&&E[R]===0;)R++;for(var L=c.repeat(y);R<A;++R)L+=t.charAt(E[R]);return L}function u(f){if(typeof f!="string")throw new TypeError("Expected String");if(f.length===0)return new Uint8Array;var y=0;if(f[y]!==" "){for(var C=0,_=0;f[y]===c;)C++,y++;for(var N=(f.length-y)*l+1>>>0,A=new Uint8Array(N);f[y];){var E=s[f.charCodeAt(y)];if(E===255)return;for(var B=0,P=N-1;(E!==0||B<_)&&P!==-1;P--,B++)E+=r*A[P]>>>0,A[P]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");_=B,y++}if(f[y]!==" "){for(var M=N-_;M!==N&&A[M]===0;)M++;for(var R=new Uint8Array(C+(N-M)),L=C;M!==N;)R[L++]=A[M++];return R}}}function b(f){var y=u(f);if(y)return y;throw new Error(`Non-${e} character`)}return{encode:h,decodeUnsafe:u,decode:b}}var nw=sw,iw=nw;const yh=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},ow=t=>new TextEncoder().encode(t),aw=t=>new TextDecoder().decode(t);let rw=class{constructor(e,s,n){this.name=e,this.prefix=s,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},cw=class{constructor(e,s,n){if(this.name=e,this.prefix=s,s.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=s.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return wh(this,e)}},lw=class{constructor(e){this.decoders=e}or(e){return wh(this,e)}decode(e){const s=e[0],n=this.decoders[s];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};const wh=(t,e)=>new lw({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});let dw=class{constructor(e,s,n,i){this.name=e,this.prefix=s,this.baseEncode=n,this.baseDecode=i,this.encoder=new rw(e,s,n),this.decoder=new cw(e,s,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const Io=({name:t,prefix:e,encode:s,decode:n})=>new dw(t,e,s,n),wi=({prefix:t,name:e,alphabet:s})=>{const{encode:n,decode:i}=iw(s,e);return Io({prefix:t,name:e,encode:n,decode:o=>yh(i(o))})},hw=(t,e,s,n)=>{const i={};for(let d=0;d<e.length;++d)i[e[d]]=d;let o=t.length;for(;t[o-1]==="=";)--o;const a=new Uint8Array(o*s/8|0);let r=0,c=0,l=0;for(let d=0;d<o;++d){const h=i[t[d]];if(h===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<s|h,r+=s,r>=8&&(r-=8,a[l++]=255&c>>r)}if(r>=s||255&c<<8-r)throw new SyntaxError("Unexpected end of data");return a},uw=(t,e,s)=>{const n=e[e.length-1]==="=",i=(1<<s)-1;let o="",a=0,r=0;for(let c=0;c<t.length;++c)for(r=r<<8|t[c],a+=8;a>s;)a-=s,o+=e[i&r>>a];if(a&&(o+=e[i&r<<s-a]),n)for(;o.length*s&7;)o+="=";return o},Ze=({name:t,prefix:e,bitsPerChar:s,alphabet:n})=>Io({prefix:e,name:t,encode(i){return uw(i,n,s)},decode(i){return hw(i,n,s,t)}}),fw=Io({prefix:"\0",name:"identity",encode:t=>aw(t),decode:t=>ow(t)});var pw=Object.freeze({__proto__:null,identity:fw});const mw=Ze({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var gw=Object.freeze({__proto__:null,base2:mw});const bw=Ze({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var yw=Object.freeze({__proto__:null,base8:bw});const ww=wi({prefix:"9",name:"base10",alphabet:"0123456789"});var vw=Object.freeze({__proto__:null,base10:ww});const xw=Ze({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Ew=Ze({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var kw=Object.freeze({__proto__:null,base16:xw,base16upper:Ew});const Cw=Ze({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Aw=Ze({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Dw=Ze({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Sw=Ze({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Bw=Ze({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Tw=Ze({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Fw=Ze({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Iw=Ze({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),_w=Ze({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Ow=Object.freeze({__proto__:null,base32:Cw,base32upper:Aw,base32pad:Dw,base32padupper:Sw,base32hex:Bw,base32hexupper:Tw,base32hexpad:Fw,base32hexpadupper:Iw,base32z:_w});const Pw=wi({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Rw=wi({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Uw=Object.freeze({__proto__:null,base36:Pw,base36upper:Rw});const Nw=wi({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Lw=wi({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var $w=Object.freeze({__proto__:null,base58btc:Nw,base58flickr:Lw});const Mw=Ze({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),zw=Ze({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),jw=Ze({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),qw=Ze({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Hw=Object.freeze({__proto__:null,base64:Mw,base64pad:zw,base64url:jw,base64urlpad:qw});const vh=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Vw=vh.reduce((t,e,s)=>(t[s]=e,t),[]),Kw=vh.reduce((t,e,s)=>(t[e.codePointAt(0)]=s,t),[]);function Ww(t){return t.reduce((e,s)=>(e+=Vw[s],e),"")}function Gw(t){const e=[];for(const s of t){const n=Kw[s.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${s}`);e.push(n)}return new Uint8Array(e)}const Yw=Io({prefix:"🚀",name:"base256emoji",encode:Ww,decode:Gw});var Zw=Object.freeze({__proto__:null,base256emoji:Yw}),Xw=Eh,xh=128,Qw=-128,Jw=Math.pow(2,31);function Eh(t,e,s){e=e||[],s=s||0;for(var n=s;t>=Jw;)e[s++]=t&255|xh,t/=128;for(;t&Qw;)e[s++]=t&255|xh,t>>>=7;return e[s]=t|0,Eh.bytes=s-n+1,e}var e6=gr,t6=128,kh=127;function gr(t,n){var s=0,n=n||0,i=0,o=n,a,r=t.length;do{if(o>=r)throw gr.bytes=0,new RangeError("Could not decode varint");a=t[o++],s+=i<28?(a&kh)<<i:(a&kh)*Math.pow(2,i),i+=7}while(a>=t6);return gr.bytes=o-n,s}var s6=Math.pow(2,7),n6=Math.pow(2,14),i6=Math.pow(2,21),o6=Math.pow(2,28),a6=Math.pow(2,35),r6=Math.pow(2,42),c6=Math.pow(2,49),l6=Math.pow(2,56),d6=Math.pow(2,63),h6=function(t){return t<s6?1:t<n6?2:t<i6?3:t<o6?4:t<a6?5:t<r6?6:t<c6?7:t<l6?8:t<d6?9:10},u6={encode:Xw,decode:e6,encodingLength:h6},Ch=u6;const Ah=(t,e,s=0)=>(Ch.encode(t,e,s),e),Dh=t=>Ch.encodingLength(t),br=(t,e)=>{const s=e.byteLength,n=Dh(t),i=n+Dh(s),o=new Uint8Array(i+s);return Ah(t,o,0),Ah(s,o,n),o.set(e,i),new f6(t,s,e,o)};let f6=class{constructor(e,s,n,i){this.code=e,this.size=s,this.digest=n,this.bytes=i}};const Sh=({name:t,code:e,encode:s})=>new p6(t,e,s);let p6=class{constructor(e,s,n){this.name=e,this.code=s,this.encode=n}digest(e){if(e instanceof Uint8Array){const s=this.encode(e);return s instanceof Uint8Array?br(this.code,s):s.then(n=>br(this.code,n))}else throw Error("Unknown type, must be binary type")}};const Bh=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),m6=Sh({name:"sha2-256",code:18,encode:Bh("SHA-256")}),g6=Sh({name:"sha2-512",code:19,encode:Bh("SHA-512")});var b6=Object.freeze({__proto__:null,sha256:m6,sha512:g6});const Th=0,y6="identity",Fh=yh;var w6=Object.freeze({__proto__:null,identity:{code:Th,name:y6,encode:Fh,digest:t=>br(Th,Fh(t))}});new TextEncoder,new TextDecoder;const Ih={...pw,...gw,...yw,...vw,...kw,...Ow,...Uw,...$w,...Hw,...Zw};({...b6,...w6});function _h(t,e,s,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:s},decoder:{decode:n}}}const Oh=_h("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),yr=_h("ascii","a",t=>{let e="a";for(let s=0;s<t.length;s++)e+=String.fromCharCode(t[s]);return e},t=>{t=t.substring(1);const e=gh(t.length);for(let s=0;s<t.length;s++)e[s]=t.charCodeAt(s);return e}),Ph={utf8:Oh,"utf-8":Oh,hex:Ih.base16,latin1:yr,ascii:yr,binary:yr,...Ih};function _o(t,e="utf8"){const s=Ph[e];if(!s)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):s.encoder.encode(t).substring(1)}function $n(t,e="utf8"){const s=Ph[e];if(!s)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?mr(globalThis.Buffer.from(t,"utf-8")):s.decoder.decode(`${s.prefix}${t}`)}function Rh(t){return Un(_o($n(t,Fo),fh))}function Oo(t){return _o($n(fn(t),fh),Fo)}function Uh(t){const e=$n(ew,mh),s=J2+_o(bh([e,t]),mh);return[X2,Q2,s].join(Z2)}function v6(t){return _o(t,Fo)}function x6(t){return $n(t,Fo)}function E6(t){return $n([Oo(t.header),Oo(t.payload)].join(To),ph)}function k6(t){return[Oo(t.header),Oo(t.payload),v6(t.signature)].join(To)}function wr(t){const e=t.split(To),s=Rh(e[0]),n=Rh(e[1]),i=x6(e[2]),o=$n(e.slice(0,2).join(To),ph);return{header:s,payload:n,signature:i,data:o}}function Nh(t=Wd(tw)){const e=uh.getPublicKey(t);return{secretKey:bh([t,e]),publicKey:e}}async function C6(t,e,s,n,i=re.fromMiliseconds(Date.now())){const o={alg:G2,typ:Y2},a=Uh(n.publicKey),r=i+s,c={iss:a,sub:t,aud:e,iat:i,exp:r},l=E6({header:o,payload:c}),d=uh.sign(l,n.secretKey.slice(0,32));return k6({header:o,payload:c,signature:d})}var Lh=function(t,e,s){if(s||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))},A6=(function(){function t(e,s,n){this.name=e,this.version=s,this.os=n,this.type="browser"}return t})(),D6=(function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return t})(),S6=(function(){function t(e,s,n,i){this.name=e,this.version=s,this.os=n,this.bot=i,this.type="bot-device"}return t})(),B6=(function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t})(),T6=(function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t})(),F6=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,I6=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,$h=3,_6=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",F6]],Mh=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function O6(t){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new T6:typeof navigator<"u"?R6(navigator.userAgent):N6()}function P6(t){return t!==""&&_6.reduce(function(e,s){var n=s[0],i=s[1];if(e)return e;var o=i.exec(t);return!!o&&[n,o]},!1)}function R6(t){var e=P6(t);if(!e)return null;var s=e[0],n=e[1];if(s==="searchbot")return new B6;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length<$h&&(i=Lh(Lh([],i,!0),L6($h-i.length),!0)):i=[];var o=i.join("."),a=U6(t),r=I6.exec(t);return r&&r[1]?new S6(s,o,a,r[1]):new A6(s,o,a)}function U6(t){for(var e=0,s=Mh.length;e<s;e++){var n=Mh[e],i=n[0],o=n[1],a=o.exec(t);if(a)return i}return null}function N6(){var t=typeof process<"u"&&process.version;return t?new D6(process.version.slice(1)):null}function L6(t){for(var e=[],s=0;s<t;s++)e.push("0");return e}var Se={},zh;function jh(){if(zh)return Se;zh=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.getLocalStorage=Se.getLocalStorageOrThrow=Se.getCrypto=Se.getCryptoOrThrow=Se.getLocation=Se.getLocationOrThrow=Se.getNavigator=Se.getNavigatorOrThrow=Se.getDocument=Se.getDocumentOrThrow=Se.getFromWindowOrThrow=Se.getFromWindow=void 0;function t(u){let b;return typeof window<"u"&&typeof window[u]<"u"&&(b=window[u]),b}Se.getFromWindow=t;function e(u){const b=t(u);if(!b)throw new Error(`${u} is not defined in Window`);return b}Se.getFromWindowOrThrow=e;function s(){return e("document")}Se.getDocumentOrThrow=s;function n(){return t("document")}Se.getDocument=n;function i(){return e("navigator")}Se.getNavigatorOrThrow=i;function o(){return t("navigator")}Se.getNavigator=o;function a(){return e("location")}Se.getLocationOrThrow=a;function r(){return t("location")}Se.getLocation=r;function c(){return e("crypto")}Se.getCryptoOrThrow=c;function l(){return t("crypto")}Se.getCrypto=l;function d(){return e("localStorage")}Se.getLocalStorageOrThrow=d;function h(){return t("localStorage")}return Se.getLocalStorage=h,Se}var bs=jh(),vi={},qh;function $6(){if(qh)return vi;qh=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.getWindowMetadata=void 0;const t=jh();function e(){let s,n;try{s=t.getDocumentOrThrow(),n=t.getLocationOrThrow()}catch{return null}function i(){const b=s.getElementsByTagName("link"),f=[];for(let y=0;y<b.length;y++){const C=b[y],_=C.getAttribute("rel");if(_&&_.toLowerCase().indexOf("icon")>-1){const N=C.getAttribute("href");if(N)if(N.toLowerCase().indexOf("https:")===-1&&N.toLowerCase().indexOf("http:")===-1&&N.indexOf("//")!==0){let A=n.protocol+"//"+n.host;if(N.indexOf("/")===0)A+=N;else{const E=n.pathname.split("/");E.pop();const B=E.join("/");A+=B+"/"+N}f.push(A)}else if(N.indexOf("//")===0){const A=n.protocol+N;f.push(A)}else f.push(N)}}return f}function o(...b){const f=s.getElementsByTagName("meta");for(let y=0;y<f.length;y++){const C=f[y],_=["itemprop","property","name"].map(N=>C.getAttribute(N)).filter(N=>N?b.includes(N):!1);if(_.length&&_){const N=C.getAttribute("content");if(N)return N}}return""}function a(){let b=o("name","og:site_name","og:title","twitter:title");return b||(b=s.title),b}function r(){return o("description","og:description","twitter:description","keywords")}const c=a(),l=r(),d=n.origin,h=i();return{description:l,url:d,icons:h,name:c}}return vi.getWindowMetadata=e,vi}var M6=$6();const z6="0.1.1";function j6(){return z6}let Pe=class Al extends Error{constructor(e,s={}){const n=(()=>{var c;if(s.cause instanceof Al){if(s.cause.details)return s.cause.details;if(s.cause.shortMessage)return s.cause.shortMessage}return s.cause&&"details"in s.cause&&typeof s.cause.details=="string"?s.cause.details:(c=s.cause)!=null&&c.message?s.cause.message:s.details})(),i=s.cause instanceof Al&&s.cause.docsPath||s.docsPath,a=`https://oxlib.sh${i??""}`,r=[e||"An error occurred.",...s.metaMessages?["",...s.metaMessages]:[],...n||i?["",n?`Details: ${n}`:void 0,i?`See: ${a}`:void 0]:[]].filter(c=>typeof c=="string").join(`
|
|
851
|
+
`);super(r,s.cause?{cause:s.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@${j6()}`}),this.cause=s.cause,this.details=n,this.docs=a,this.docsPath=i,this.shortMessage=e}walk(e){return Hh(this,e)}};function Hh(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause?Hh(t.cause,e):e?null:t}const Mn=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function q6(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function xi(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function mn(t,...e){if(!q6(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function H6(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");xi(t.outputLen),xi(t.blockLen)}function zn(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Vh(t,e){mn(t);const s=e.outputLen;if(t.length<s)throw new Error("digestInto() expects output buffer of length at least "+s)}function V6(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function jn(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function vr(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function ts(t,e){return t<<32-e|t>>>e}const K6=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function W6(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function G6(t){for(let e=0;e<t.length;e++)t[e]=W6(t[e]);return t}const Kh=K6?t=>t:G6;function Y6(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function Po(t){return typeof t=="string"&&(t=Y6(t)),mn(t),t}function Z6(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];mn(i),e+=i.length}const s=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const o=t[n];s.set(o,i),i+=o.length}return s}let xr=class{};function Wh(t){const e=n=>t().update(Po(n)).digest(),s=t();return e.outputLen=s.outputLen,e.blockLen=s.blockLen,e.create=()=>t(),e}function X6(t=32){if(Mn&&typeof Mn.getRandomValues=="function")return Mn.getRandomValues(new Uint8Array(t));if(Mn&&typeof Mn.randomBytes=="function")return Uint8Array.from(Mn.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}function Q6(t,e,s,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,s,n);const i=BigInt(32),o=BigInt(4294967295),a=Number(s>>i&o),r=Number(s&o),c=n?4:0,l=n?0:4;t.setUint32(e+c,a,n),t.setUint32(e+l,r,n)}function J6(t,e,s){return t&e^~t&s}function e8(t,e,s){return t&e^t&s^e&s}class t8 extends xr{constructor(e,s,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=s,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=vr(this.buffer)}update(e){zn(this),e=Po(e),mn(e);const{view:s,buffer:n,blockLen:i}=this,o=e.length;for(let a=0;a<o;){const r=Math.min(i-this.pos,o-a);if(r===i){const c=vr(e);for(;i<=o-a;a+=i)this.process(c,a);continue}n.set(e.subarray(a,a+r),this.pos),this.pos+=r,a+=r,this.pos===i&&(this.process(s,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){zn(this),Vh(e,this),this.finished=!0;const{buffer:s,view:n,blockLen:i,isLE:o}=this;let{pos:a}=this;s[a++]=128,jn(this.buffer.subarray(a)),this.padOffset>i-a&&(this.process(n,0),a=0);for(let h=a;h<i;h++)s[h]=0;Q6(n,i-8,BigInt(this.length*8),o),this.process(n,0);const r=vr(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<l;h++)r.setUint32(4*h,d[h],o)}digest(){const{buffer:e,outputLen:s}=this;this.digestInto(e);const n=e.slice(0,s);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:s,buffer:n,length:i,finished:o,destroyed:a,pos:r}=this;return e.destroyed=a,e.finished=o,e.length=i,e.pos=r,i%s&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const Ls=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ro=BigInt(2**32-1),Gh=BigInt(32);function s8(t,e=!1){return e?{h:Number(t&Ro),l:Number(t>>Gh&Ro)}:{h:Number(t>>Gh&Ro)|0,l:Number(t&Ro)|0}}function n8(t,e=!1){const s=t.length;let n=new Uint32Array(s),i=new Uint32Array(s);for(let o=0;o<s;o++){const{h:a,l:r}=s8(t[o],e);[n[o],i[o]]=[a,r]}return[n,i]}const i8=(t,e,s)=>t<<s|e>>>32-s,o8=(t,e,s)=>e<<s|t>>>32-s,a8=(t,e,s)=>e<<s-32|t>>>64-s,r8=(t,e,s)=>t<<s-32|e>>>64-s,c8=BigInt(0),Ei=BigInt(1),l8=BigInt(2),d8=BigInt(7),h8=BigInt(256),u8=BigInt(113),Yh=[],Zh=[],Xh=[];for(let t=0,e=Ei,s=1,n=0;t<24;t++){[s,n]=[n,(2*s+3*n)%5],Yh.push(2*(5*n+s)),Zh.push((t+1)*(t+2)/2%64);let i=c8;for(let o=0;o<7;o++)e=(e<<Ei^(e>>d8)*u8)%h8,e&l8&&(i^=Ei<<(Ei<<BigInt(o))-Ei);Xh.push(i)}const Qh=n8(Xh,!0),f8=Qh[0],p8=Qh[1],Jh=(t,e,s)=>s>32?a8(t,e,s):i8(t,e,s),eu=(t,e,s)=>s>32?r8(t,e,s):o8(t,e,s);function m8(t,e=24){const s=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let a=0;a<10;a++)s[a]=t[a]^t[a+10]^t[a+20]^t[a+30]^t[a+40];for(let a=0;a<10;a+=2){const r=(a+8)%10,c=(a+2)%10,l=s[c],d=s[c+1],h=Jh(l,d,1)^s[r],u=eu(l,d,1)^s[r+1];for(let b=0;b<50;b+=10)t[a+b]^=h,t[a+b+1]^=u}let i=t[2],o=t[3];for(let a=0;a<24;a++){const r=Zh[a],c=Jh(i,o,r),l=eu(i,o,r),d=Yh[a];i=t[d],o=t[d+1],t[d]=c,t[d+1]=l}for(let a=0;a<50;a+=10){for(let r=0;r<10;r++)s[r]=t[a+r];for(let r=0;r<10;r++)t[a+r]^=~s[(r+2)%10]&s[(r+4)%10]}t[0]^=f8[n],t[1]^=p8[n]}jn(s)}let g8=class Rg extends xr{constructor(e,s,n,i=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=s,this.outputLen=n,this.enableXOF=i,this.rounds=o,xi(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=V6(this.state)}clone(){return this._cloneInto()}keccak(){Kh(this.state32),m8(this.state32,this.rounds),Kh(this.state32),this.posOut=0,this.pos=0}update(e){zn(this),e=Po(e),mn(e);const{blockLen:s,state:n}=this,i=e.length;for(let o=0;o<i;){const a=Math.min(s-this.pos,i-o);for(let r=0;r<a;r++)n[this.pos++]^=e[o++];this.pos===s&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:s,pos:n,blockLen:i}=this;e[n]^=s,(s&128)!==0&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){zn(this,!1),mn(e),this.finish();const s=this.state,{blockLen:n}=this;for(let i=0,o=e.length;i<o;){this.posOut>=n&&this.keccak();const a=Math.min(n-this.posOut,o-i);e.set(s.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return xi(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Vh(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,jn(this.state)}_cloneInto(e){const{blockLen:s,suffix:n,outputLen:i,rounds:o,enableXOF:a}=this;return e||(e=new Rg(s,n,i,a,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=i,e.enableXOF=a,e.destroyed=this.destroyed,e}};const b8=(t,e,s)=>Wh(()=>new g8(e,t,s)),y8=b8(1,136,256/8),w8=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),$s=new Uint32Array(64);class v8 extends t8{constructor(e=32){super(64,e,8,!1),this.A=Ls[0]|0,this.B=Ls[1]|0,this.C=Ls[2]|0,this.D=Ls[3]|0,this.E=Ls[4]|0,this.F=Ls[5]|0,this.G=Ls[6]|0,this.H=Ls[7]|0}get(){const{A:e,B:s,C:n,D:i,E:o,F:a,G:r,H:c}=this;return[e,s,n,i,o,a,r,c]}set(e,s,n,i,o,a,r,c){this.A=e|0,this.B=s|0,this.C=n|0,this.D=i|0,this.E=o|0,this.F=a|0,this.G=r|0,this.H=c|0}process(e,s){for(let h=0;h<16;h++,s+=4)$s[h]=e.getUint32(s,!1);for(let h=16;h<64;h++){const u=$s[h-15],b=$s[h-2],f=ts(u,7)^ts(u,18)^u>>>3,y=ts(b,17)^ts(b,19)^b>>>10;$s[h]=y+$s[h-7]+f+$s[h-16]|0}let{A:n,B:i,C:o,D:a,E:r,F:c,G:l,H:d}=this;for(let h=0;h<64;h++){const u=ts(r,6)^ts(r,11)^ts(r,25),b=d+u+J6(r,c,l)+w8[h]+$s[h]|0,y=(ts(n,2)^ts(n,13)^ts(n,22))+e8(n,i,o)|0;d=l,l=c,c=r,r=a+b|0,a=o,o=i,i=n,n=b+y|0}n=n+this.A|0,i=i+this.B|0,o=o+this.C|0,a=a+this.D|0,r=r+this.E|0,c=c+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(n,i,o,a,r,c,l,d)}roundClean(){jn($s)}destroy(){this.set(0,0,0,0,0,0,0,0),jn(this.buffer)}}const x8=Wh(()=>new v8);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Er=BigInt(0),kr=BigInt(1);function ki(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function Cr(t){if(!ki(t))throw new Error("Uint8Array expected")}function Ci(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function Uo(t){const e=t.toString(16);return e.length&1?"0"+e:e}function tu(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?Er:BigInt("0x"+t)}const su=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",E8=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Ai(t){if(Cr(t),su)return t.toHex();let e="";for(let s=0;s<t.length;s++)e+=E8[t[s]];return e}const ys={_0:48,_9:57,A:65,F:70,a:97,f:102};function nu(t){if(t>=ys._0&&t<=ys._9)return t-ys._0;if(t>=ys.A&&t<=ys.F)return t-(ys.A-10);if(t>=ys.a&&t<=ys.f)return t-(ys.a-10)}function No(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(su)return Uint8Array.fromHex(t);const e=t.length,s=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(s);for(let i=0,o=0;i<s;i++,o+=2){const a=nu(t.charCodeAt(o)),r=nu(t.charCodeAt(o+1));if(a===void 0||r===void 0){const c=t[o]+t[o+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+o)}n[i]=a*16+r}return n}function gn(t){return tu(Ai(t))}function iu(t){return Cr(t),tu(Ai(Uint8Array.from(t).reverse()))}function Di(t,e){return No(t.toString(16).padStart(e*2,"0"))}function ou(t,e){return Di(t,e).reverse()}function Ot(t,e,s){let n;if(typeof e=="string")try{n=No(e)}catch(o){throw new Error(t+" must be hex string or Uint8Array, cause: "+o)}else if(ki(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const i=n.length;if(typeof s=="number"&&i!==s)throw new Error(t+" of length "+s+" expected, got "+i);return n}function Lo(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];Cr(i),e+=i.length}const s=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const o=t[n];s.set(o,i),i+=o.length}return s}const Ar=t=>typeof t=="bigint"&&Er<=t;function Dr(t,e,s){return Ar(t)&&Ar(e)&&Ar(s)&&e<=t&&t<s}function qn(t,e,s,n){if(!Dr(e,s,n))throw new Error("expected valid "+t+": "+s+" <= n < "+n+", got "+e)}function k8(t){let e;for(e=0;t>Er;t>>=kr,e+=1);return e}const $o=t=>(kr<<BigInt(t))-kr,Sr=t=>new Uint8Array(t),au=t=>Uint8Array.from(t);function C8(t,e,s){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof s!="function")throw new Error("hmacFn must be a function");let n=Sr(t),i=Sr(t),o=0;const a=()=>{n.fill(1),i.fill(0),o=0},r=(...h)=>s(i,n,...h),c=(h=Sr(0))=>{i=r(au([0]),h),n=r(),h.length!==0&&(i=r(au([1]),h),n=r())},l=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let h=0;const u=[];for(;h<e;){n=r();const b=n.slice();u.push(b),h+=n.length}return Lo(...u)};return(h,u)=>{a(),c(h);let b;for(;!(b=u(l()));)c();return a(),b}}const A8={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"||ki(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Mo(t,e,s={}){const n=(i,o,a)=>{const r=A8[o];if(typeof r!="function")throw new Error("invalid validator function");const c=t[i];if(!(a&&c===void 0)&&!r(c,t))throw new Error("param "+String(i)+" is invalid. Expected "+o+", got "+c)};for(const[i,o]of Object.entries(e))n(i,o,!1);for(const[i,o]of Object.entries(s))n(i,o,!0);return t}function ru(t){const e=new WeakMap;return(s,...n)=>{const i=e.get(s);if(i!==void 0)return i;const o=t(s,...n);return e.set(s,o),o}}function D8(t,e){if(mu(t)>e)throw new W8({givenSize:mu(t),maxSize:e})}const ws={zero:48,nine:57,A:65,F:70,a:97,f:102};function cu(t){if(t>=ws.zero&&t<=ws.nine)return t-ws.zero;if(t>=ws.A&&t<=ws.F)return t-(ws.A-10);if(t>=ws.a&&t<=ws.f)return t-(ws.a-10)}function S8(t,e={}){const{dir:s,size:n=32}=e;if(n===0)return t;if(t.length>n)throw new G8({size:t.length,targetSize:n,type:"Bytes"});const i=new Uint8Array(n);for(let o=0;o<n;o++){const a=s==="right";i[a?o:n-o-1]=t[a?o:t.length-o-1]}return i}function lu(t,e){if(Ms(t)>e)throw new N8({givenSize:Ms(t),maxSize:e})}function B8(t,e){if(typeof e=="number"&&e>0&&e>Ms(t)-1)throw new pu({offset:e,position:"start",size:Ms(t)})}function T8(t,e,s){if(typeof e=="number"&&typeof s=="number"&&Ms(t)!==s-e)throw new pu({offset:s,position:"end",size:Ms(t)})}function du(t,e={}){const{dir:s,size:n=32}=e;if(n===0)return t;const i=t.replace("0x","");if(i.length>n*2)throw new L8({size:Math.ceil(i.length/2),targetSize:n,type:"Hex"});return`0x${i[s==="right"?"padEnd":"padStart"](n*2,"0")}`}const F8="#__bigint";function Br(t,e,s){return JSON.stringify(t,(n,i)=>typeof i=="bigint"?i.toString()+F8:i,s)}const I8=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function _8(t,e={}){const{strict:s=!1}=e;if(!t)throw new uu(t);if(typeof t!="string")throw new uu(t);if(s&&!/^0x[0-9a-fA-F]*$/.test(t))throw new fu(t);if(!t.startsWith("0x"))throw new fu(t)}function O8(...t){return`0x${t.reduce((e,s)=>e+s.replace("0x",""),"")}`}function Tr(t){return t instanceof Uint8Array?zo(t):Array.isArray(t)?zo(new Uint8Array(t)):t}function zo(t,e={}){let s="";for(let i=0;i<t.length;i++)s+=I8[t[i]];const n=`0x${s}`;return typeof e.size=="number"?(lu(n,e.size),hu(n,e.size)):n}function Fr(t,e={}){const{signed:s,size:n}=e,i=BigInt(t);let o;n?s?o=(1n<<BigInt(n)*8n-1n)-1n:o=2n**(BigInt(n)*8n)-1n:typeof t=="number"&&(o=BigInt(Number.MAX_SAFE_INTEGER));const a=typeof o=="bigint"&&s?-o-1n:0;if(o&&i>o||i<a){const l=typeof t=="bigint"?"n":"";throw new U8({max:o?`${o}${l}`:void 0,min:`${a}${l}`,signed:s,size:n,value:`${t}${l}`})}const c=`0x${(s&&i<0?(1n<<BigInt(n*8))+BigInt(i):i).toString(16)}`;return n?P8(c,n):c}function P8(t,e){return du(t,{dir:"left",size:e})}function hu(t,e){return du(t,{dir:"right",size:e})}function vs(t,e,s,n={}){const{strict:i}=n;B8(t,e);const o=`0x${t.replace("0x","").slice((e??0)*2,(s??t.length)*2)}`;return i&&T8(o,e,s),o}function Ms(t){return Math.ceil((t.length-2)/2)}function R8(t,e={}){const{strict:s=!1}=e;try{return _8(t,{strict:s}),!0}catch{return!1}}let U8=class extends Pe{constructor({max:e,min:s,signed:n,size:i,value:o}){super(`Number \`${o}\` is not in safe${i?` ${i*8}-bit`:""}${n?" signed":" unsigned"} integer range ${e?`(\`${s}\` to \`${e}\`)`:`(above \`${s}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}};class uu extends Pe{constructor(e){super(`Value \`${typeof e=="object"?Br(e):e}\` of type \`${typeof e}\` 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"})}}class fu extends Pe{constructor(e){super(`Value \`${e}\` 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"})}}let N8=class extends Pe{constructor({givenSize:e,maxSize:s}){super(`Size cannot exceed \`${s}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}},pu=class extends Pe{constructor({offset:e,position:s,size:n}){super(`Slice ${s==="start"?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}},L8=class extends Pe{constructor({size:e,targetSize:s,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${s}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}};const $8=new TextEncoder;function M8(t){if(!(t instanceof Uint8Array)){if(!t)throw new jo(t);if(typeof t!="object")throw new jo(t);if(!("BYTES_PER_ELEMENT"in t))throw new jo(t);if(t.BYTES_PER_ELEMENT!==1||t.constructor.name!=="Uint8Array")throw new jo(t)}}function z8(t){return t instanceof Uint8Array?t:typeof t=="string"?q8(t):j8(t)}function j8(t){return t instanceof Uint8Array?t:new Uint8Array(t)}function q8(t,e={}){const{size:s}=e;let n=t;s&&(lu(t,s),n=hu(t,s));let i=n.slice(2);i.length%2&&(i=`0${i}`);const o=i.length/2,a=new Uint8Array(o);for(let r=0,c=0;r<o;r++){const l=cu(i.charCodeAt(c++)),d=cu(i.charCodeAt(c++));if(l===void 0||d===void 0)throw new Pe(`Invalid byte sequence ("${i[c-2]}${i[c-1]}" in "${i}").`);a[r]=l*16+d}return a}function H8(t,e={}){const{size:s}=e,n=$8.encode(t);return typeof s=="number"?(D8(n,s),V8(n,s)):n}function V8(t,e){return S8(t,{dir:"right",size:e})}function mu(t){return t.length}function K8(t){try{return M8(t),!0}catch{return!1}}class jo extends Pe{constructor(e){super(`Value \`${typeof e=="object"?Br(e):e}\` of type \`${typeof e}\` 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 W8=class extends Pe{constructor({givenSize:e,maxSize:s}){super(`Size cannot exceed \`${s}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}},G8=class extends Pe{constructor({size:e,targetSize:s,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${s}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}};function gu(t,e={}){const{as:s=typeof t=="string"?"Hex":"Bytes"}=e,n=y8(z8(t));return s==="Bytes"?n:zo(n)}let Y8=class extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const s=super.get(e);return super.has(e)&&s!==void 0&&(this.delete(e),super.set(e,s)),s}set(e,s){if(super.set(e,s),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}};const Ir={checksum:new Y8(8192)}.checksum;function bu(t,e={}){const{compressed:s}=e,{prefix:n,x:i,y:o}=t;if(s===!1||typeof i=="bigint"&&typeof o=="bigint"){if(n!==4)throw new wu({prefix:n,cause:new t3});return}if(s===!0||typeof i=="bigint"&&typeof o>"u"){if(n!==3&&n!==2)throw new wu({prefix:n,cause:new e3});return}throw new J8({publicKey:t})}function Z8(t){const e=(()=>{if(R8(t))return yu(t);if(K8(t))return X8(t);const{prefix:s,x:n,y:i}=t;return typeof n=="bigint"&&typeof i=="bigint"?{prefix:s??4,x:n,y:i}:{prefix:s,x:n}})();return bu(e),e}function X8(t){return yu(zo(t))}function yu(t){if(t.length!==132&&t.length!==130&&t.length!==68)throw new s3({publicKey:t});if(t.length===130){const n=BigInt(vs(t,0,32)),i=BigInt(vs(t,32,64));return{prefix:4,x:n,y:i}}if(t.length===132){const n=Number(vs(t,0,1)),i=BigInt(vs(t,1,33)),o=BigInt(vs(t,33,65));return{prefix:n,x:i,y:o}}const e=Number(vs(t,0,1)),s=BigInt(vs(t,1,33));return{prefix:e,x:s}}function Q8(t,e={}){bu(t);const{prefix:s,x:n,y:i}=t,{includePrefix:o=!0}=e;return O8(o?Fr(s,{size:1}):"0x",Fr(n,{size:32}),typeof i=="bigint"?Fr(i,{size:32}):"0x")}class J8 extends Pe{constructor({publicKey:e}){super(`Value \`${Br(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class wu extends Pe{constructor({prefix:e,cause:s}){super(`Prefix "${e}" is invalid.`,{cause:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class e3 extends Pe{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class t3 extends Pe{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}let s3=class extends Pe{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${Ms(Tr(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}};const n3=/^0x[a-fA-F0-9]{40}$/;function vu(t,e={}){const{strict:s=!0}=e;if(!n3.test(t))throw new Eu({address:t,cause:new a3});if(s){if(t.toLowerCase()===t)return;if(xu(t)!==t)throw new Eu({address:t,cause:new r3})}}function xu(t){if(Ir.has(t))return Ir.get(t);vu(t,{strict:!1});const e=t.substring(2).toLowerCase(),s=gu(H8(e),{as:"Bytes"}),n=e.split("");for(let o=0;o<40;o+=2)s[o>>1]>>4>=8&&n[o]&&(n[o]=n[o].toUpperCase()),(s[o>>1]&15)>=8&&n[o+1]&&(n[o+1]=n[o+1].toUpperCase());const i=`0x${n.join("")}`;return Ir.set(t,i),i}function i3(t,e={}){const{checksum:s=!1}=e;return vu(t),s?xu(t):t}function o3(t,e={}){const s=gu(`0x${Q8(t).slice(4)}`).substring(26);return i3(`0x${s}`,e)}let Eu=class extends Pe{constructor({address:e,cause:s}){super(`Address "${e}" is invalid.`,{cause:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}};class a3 extends Pe{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class r3 extends Pe{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}class ku extends xr{constructor(e,s){super(),this.finished=!1,this.destroyed=!1,H6(e);const n=Po(s);if(this.iHash=e.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 i=this.blockLen,o=new Uint8Array(i);o.set(n.length>i?e.create().update(n).digest():n);for(let a=0;a<o.length;a++)o[a]^=54;this.iHash.update(o),this.oHash=e.create();for(let a=0;a<o.length;a++)o[a]^=106;this.oHash.update(o),jn(o)}update(e){return zn(this),this.iHash.update(e),this}digestInto(e){zn(this),mn(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:s,iHash:n,finished:i,destroyed:o,blockLen:a,outputLen:r}=this;return e=e,e.finished=i,e.destroyed=o,e.blockLen=a,e.outputLen=r,e.oHash=s._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Cu=(t,e,s)=>new ku(t,e).update(s).digest();Cu.create=(t,e)=>new ku(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const yt=BigInt(0),dt=BigInt(1),bn=BigInt(2),c3=BigInt(3),Au=BigInt(4),Du=BigInt(5),Su=BigInt(8);function wt(t,e){const s=t%e;return s>=yt?s:e+s}function Pt(t,e,s){let n=t;for(;e-- >yt;)n*=n,n%=s;return n}function _r(t,e){if(t===yt)throw new Error("invert: expected non-zero number");if(e<=yt)throw new Error("invert: expected positive modulus, got "+e);let s=wt(t,e),n=e,i=yt,o=dt;for(;s!==yt;){const r=n/s,c=n%s,l=i-o*r;n=s,s=c,i=o,o=l}if(n!==dt)throw new Error("invert: does not exist");return wt(i,e)}function Bu(t,e){const s=(t.ORDER+dt)/Au,n=t.pow(e,s);if(!t.eql(t.sqr(n),e))throw new Error("Cannot find square root");return n}function l3(t,e){const s=(t.ORDER-Du)/Su,n=t.mul(e,bn),i=t.pow(n,s),o=t.mul(e,i),a=t.mul(t.mul(o,bn),i),r=t.mul(o,t.sub(a,t.ONE));if(!t.eql(t.sqr(r),e))throw new Error("Cannot find square root");return r}function d3(t){if(t<BigInt(3))throw new Error("sqrt is not defined for small field");let e=t-dt,s=0;for(;e%bn===yt;)e/=bn,s++;let n=bn;const i=Or(t);for(;Fu(i,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(s===1)return Bu;let o=i.pow(n,e);const a=(e+dt)/bn;return function(c,l){if(c.is0(l))return l;if(Fu(c,l)!==1)throw new Error("Cannot find square root");let d=s,h=c.mul(c.ONE,o),u=c.pow(l,e),b=c.pow(l,a);for(;!c.eql(u,c.ONE);){if(c.is0(u))return c.ZERO;let f=1,y=c.sqr(u);for(;!c.eql(y,c.ONE);)if(f++,y=c.sqr(y),f===d)throw new Error("Cannot find square root");const C=dt<<BigInt(d-f-1),_=c.pow(h,C);d=f,h=c.sqr(_),u=c.mul(u,h),b=c.mul(b,_)}return b}}function h3(t){return t%Au===c3?Bu:t%Su===Du?l3:d3(t)}const u3=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function f3(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},s=u3.reduce((n,i)=>(n[i]="function",n),e);return Mo(t,s)}function p3(t,e,s){if(s<yt)throw new Error("invalid exponent, negatives unsupported");if(s===yt)return t.ONE;if(s===dt)return e;let n=t.ONE,i=e;for(;s>yt;)s&dt&&(n=t.mul(n,i)),i=t.sqr(i),s>>=dt;return n}function Tu(t,e,s=!1){const n=new Array(e.length).fill(s?t.ZERO:void 0),i=e.reduce((a,r,c)=>t.is0(r)?a:(n[c]=a,t.mul(a,r)),t.ONE),o=t.inv(i);return e.reduceRight((a,r,c)=>t.is0(r)?a:(n[c]=t.mul(a,n[c]),t.mul(a,r)),o),n}function Fu(t,e){const s=(t.ORDER-dt)/bn,n=t.pow(e,s),i=t.eql(n,t.ONE),o=t.eql(n,t.ZERO),a=t.eql(n,t.neg(t.ONE));if(!i&&!o&&!a)throw new Error("invalid Legendre symbol result");return i?1:o?0:-1}function Iu(t,e){e!==void 0&&xi(e);const s=e!==void 0?e:t.toString(2).length,n=Math.ceil(s/8);return{nBitLength:s,nByteLength:n}}function Or(t,e,s=!1,n={}){if(t<=yt)throw new Error("invalid field: expected ORDER > 0, got "+t);const{nBitLength:i,nByteLength:o}=Iu(t,e);if(o>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let a;const r=Object.freeze({ORDER:t,isLE:s,BITS:i,BYTES:o,MASK:$o(i),ZERO:yt,ONE:dt,create:c=>wt(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return yt<=c&&c<t},is0:c=>c===yt,isOdd:c=>(c&dt)===dt,neg:c=>wt(-c,t),eql:(c,l)=>c===l,sqr:c=>wt(c*c,t),add:(c,l)=>wt(c+l,t),sub:(c,l)=>wt(c-l,t),mul:(c,l)=>wt(c*l,t),pow:(c,l)=>p3(r,c,l),div:(c,l)=>wt(c*_r(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>_r(c,t),sqrt:n.sqrt||(c=>(a||(a=h3(t)),a(r,c))),toBytes:c=>s?ou(c,o):Di(c,o),fromBytes:c=>{if(c.length!==o)throw new Error("Field.fromBytes: expected "+o+" bytes, got "+c.length);return s?iu(c):gn(c)},invertBatch:c=>Tu(r,c),cmov:(c,l,d)=>d?l:c});return Object.freeze(r)}function _u(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function Ou(t){const e=_u(t);return e+Math.ceil(e/2)}function m3(t,e,s=!1){const n=t.length,i=_u(e),o=Ou(e);if(n<16||n<o||n>1024)throw new Error("expected "+o+"-1024 bytes of input, got "+n);const a=s?iu(t):gn(t),r=wt(a,e-dt)+dt;return s?ou(r,i):Di(r,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Pu=BigInt(0),Pr=BigInt(1);function Rr(t,e){const s=e.negate();return t?s:e}function Ru(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function Ur(t,e){Ru(t,e);const s=Math.ceil(e/t)+1,n=2**(t-1),i=2**t,o=$o(t),a=BigInt(t);return{windows:s,windowSize:n,mask:o,maxNumber:i,shiftBy:a}}function Uu(t,e,s){const{windowSize:n,mask:i,maxNumber:o,shiftBy:a}=s;let r=Number(t&i),c=t>>a;r>n&&(r-=o,c+=Pr);const l=e*n,d=l+Math.abs(r)-1,h=r===0,u=r<0,b=e%2!==0;return{nextN:c,offset:d,isZero:h,isNeg:u,isNegF:b,offsetF:l}}function g3(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((s,n)=>{if(!(s instanceof e))throw new Error("invalid point at index "+n)})}function b3(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((s,n)=>{if(!e.isValid(s))throw new Error("invalid scalar at index "+n)})}const Nr=new WeakMap,Nu=new WeakMap;function Lr(t){return Nu.get(t)||1}function y3(t,e){return{constTimeNegate:Rr,hasPrecomputes(s){return Lr(s)!==1},unsafeLadder(s,n,i=t.ZERO){let o=s;for(;n>Pu;)n&Pr&&(i=i.add(o)),o=o.double(),n>>=Pr;return i},precomputeWindow(s,n){const{windows:i,windowSize:o}=Ur(n,e),a=[];let r=s,c=r;for(let l=0;l<i;l++){c=r,a.push(c);for(let d=1;d<o;d++)c=c.add(r),a.push(c);r=c.double()}return a},wNAF(s,n,i){let o=t.ZERO,a=t.BASE;const r=Ur(s,e);for(let c=0;c<r.windows;c++){const{nextN:l,offset:d,isZero:h,isNeg:u,isNegF:b,offsetF:f}=Uu(i,c,r);i=l,h?a=a.add(Rr(b,n[f])):o=o.add(Rr(u,n[d]))}return{p:o,f:a}},wNAFUnsafe(s,n,i,o=t.ZERO){const a=Ur(s,e);for(let r=0;r<a.windows&&i!==Pu;r++){const{nextN:c,offset:l,isZero:d,isNeg:h}=Uu(i,r,a);if(i=c,!d){const u=n[l];o=o.add(h?u.negate():u)}}return o},getPrecomputes(s,n,i){let o=Nr.get(n);return o||(o=this.precomputeWindow(n,s),s!==1&&Nr.set(n,i(o))),o},wNAFCached(s,n,i){const o=Lr(s);return this.wNAF(o,this.getPrecomputes(o,s,i),n)},wNAFCachedUnsafe(s,n,i,o){const a=Lr(s);return a===1?this.unsafeLadder(s,n,o):this.wNAFUnsafe(a,this.getPrecomputes(a,s,i),n,o)},setWindowSize(s,n){Ru(n,e),Nu.set(s,n),Nr.delete(s)}}}function w3(t,e,s,n){g3(s,t),b3(n,e);const i=s.length,o=n.length;if(i!==o)throw new Error("arrays of points and scalars must have equal length");const a=t.ZERO,r=k8(BigInt(i));let c=1;r>12?c=r-3:r>4?c=r-2:r>0&&(c=2);const l=$o(c),d=new Array(Number(l)+1).fill(a),h=Math.floor((e.BITS-1)/c)*c;let u=a;for(let b=h;b>=0;b-=c){d.fill(a);for(let y=0;y<o;y++){const C=n[y],_=Number(C>>BigInt(b)&l);d[_]=d[_].add(s[y])}let f=a;for(let y=d.length-1,C=a;y>0;y--)C=C.add(d[y]),f=f.add(C);if(u=u.add(f),b!==0)for(let y=0;y<c;y++)u=u.double()}return u}function Lu(t){return f3(t.Fp),Mo(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Iu(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function $u(t){t.lowS!==void 0&&Ci("lowS",t.lowS),t.prehash!==void 0&&Ci("prehash",t.prehash)}function v3(t){const e=Lu(t);Mo(e,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});const{endo:s,Fp:n,a:i}=e;if(s){if(!n.eql(i,n.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof s!="object"||typeof s.beta!="bigint"||typeof s.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...e})}class x3 extends Error{constructor(e=""){super(e)}}const xs={Err:x3,_tlv:{encode:(t,e)=>{const{Err:s}=xs;if(t<0||t>256)throw new s("tlv.encode: wrong tag");if(e.length&1)throw new s("tlv.encode: unpadded data");const n=e.length/2,i=Uo(n);if(i.length/2&128)throw new s("tlv.encode: long form length too big");const o=n>127?Uo(i.length/2|128):"";return Uo(t)+o+i+e},decode(t,e){const{Err:s}=xs;let n=0;if(t<0||t>256)throw new s("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new s("tlv.decode: wrong tlv");const i=e[n++],o=!!(i&128);let a=0;if(!o)a=i;else{const c=i&127;if(!c)throw new s("tlv.decode(long): indefinite length not supported");if(c>4)throw new s("tlv.decode(long): byte length is too big");const l=e.subarray(n,n+c);if(l.length!==c)throw new s("tlv.decode: length bytes not complete");if(l[0]===0)throw new s("tlv.decode(long): zero leftmost byte");for(const d of l)a=a<<8|d;if(n+=c,a<128)throw new s("tlv.decode(long): not minimal encoding")}const r=e.subarray(n,n+a);if(r.length!==a)throw new s("tlv.decode: wrong value length");return{v:r,l:e.subarray(n+a)}}},_int:{encode(t){const{Err:e}=xs;if(t<Es)throw new e("integer: negative integers are not allowed");let s=Uo(t);if(Number.parseInt(s[0],16)&8&&(s="00"+s),s.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return s},decode(t){const{Err:e}=xs;if(t[0]&128)throw new e("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return gn(t)}},toSig(t){const{Err:e,_int:s,_tlv:n}=xs,i=Ot("signature",t),{v:o,l:a}=n.decode(48,i);if(a.length)throw new e("invalid signature: left bytes after parsing");const{v:r,l:c}=n.decode(2,o),{v:l,l:d}=n.decode(2,c);if(d.length)throw new e("invalid signature: left bytes after parsing");return{r:s.decode(r),s:s.decode(l)}},hexFromSig(t){const{_tlv:e,_int:s}=xs,n=e.encode(2,s.encode(t.r)),i=e.encode(2,s.encode(t.s)),o=n+i;return e.encode(48,o)}};function $r(t,e){return Ai(Di(t,e))}const Es=BigInt(0),We=BigInt(1);BigInt(2);const Mr=BigInt(3),E3=BigInt(4);function k3(t){const e=v3(t),{Fp:s}=e,n=Or(e.n,e.nBitLength),i=e.toBytes||((A,E,B)=>{const P=E.toAffine();return Lo(Uint8Array.from([4]),s.toBytes(P.x),s.toBytes(P.y))}),o=e.fromBytes||(A=>{const E=A.subarray(1),B=s.fromBytes(E.subarray(0,s.BYTES)),P=s.fromBytes(E.subarray(s.BYTES,2*s.BYTES));return{x:B,y:P}});function a(A){const{a:E,b:B}=e,P=s.sqr(A),M=s.mul(P,A);return s.add(s.add(M,s.mul(A,E)),B)}function r(A,E){const B=s.sqr(E),P=a(A);return s.eql(B,P)}if(!r(e.Gx,e.Gy))throw new Error("bad curve params: generator point");const c=s.mul(s.pow(e.a,Mr),E3),l=s.mul(s.sqr(e.b),BigInt(27));if(s.is0(s.add(c,l)))throw new Error("bad curve params: a or b");function d(A){return Dr(A,We,e.n)}function h(A){const{allowedPrivateKeyLengths:E,nByteLength:B,wrapPrivateKey:P,n:M}=e;if(E&&typeof A!="bigint"){if(ki(A)&&(A=Ai(A)),typeof A!="string"||!E.includes(A.length))throw new Error("invalid private key");A=A.padStart(B*2,"0")}let R;try{R=typeof A=="bigint"?A:gn(Ot("private key",A,B))}catch{throw new Error("invalid private key, expected hex or "+B+" bytes, got "+typeof A)}return P&&(R=wt(R,M)),qn("private key",R,We,M),R}function u(A){if(!(A instanceof y))throw new Error("ProjectivePoint expected")}const b=ru((A,E)=>{const{px:B,py:P,pz:M}=A;if(s.eql(M,s.ONE))return{x:B,y:P};const R=A.is0();E==null&&(E=R?s.ONE:s.inv(M));const L=s.mul(B,E),q=s.mul(P,E),K=s.mul(M,E);if(R)return{x:s.ZERO,y:s.ZERO};if(!s.eql(K,s.ONE))throw new Error("invZ was invalid");return{x:L,y:q}}),f=ru(A=>{if(A.is0()){if(e.allowInfinityPoint&&!s.is0(A.py))return;throw new Error("bad point: ZERO")}const{x:E,y:B}=A.toAffine();if(!s.isValid(E)||!s.isValid(B))throw new Error("bad point: x or y not FE");if(!r(E,B))throw new Error("bad point: equation left != right");if(!A.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class y{constructor(E,B,P){if(E==null||!s.isValid(E))throw new Error("x required");if(B==null||!s.isValid(B)||s.is0(B))throw new Error("y required");if(P==null||!s.isValid(P))throw new Error("z required");this.px=E,this.py=B,this.pz=P,Object.freeze(this)}static fromAffine(E){const{x:B,y:P}=E||{};if(!E||!s.isValid(B)||!s.isValid(P))throw new Error("invalid affine point");if(E instanceof y)throw new Error("projective point not allowed");const M=R=>s.eql(R,s.ZERO);return M(B)&&M(P)?y.ZERO:new y(B,P,s.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(E){const B=Tu(s,E.map(P=>P.pz));return E.map((P,M)=>P.toAffine(B[M])).map(y.fromAffine)}static fromHex(E){const B=y.fromAffine(o(Ot("pointHex",E)));return B.assertValidity(),B}static fromPrivateKey(E){return y.BASE.multiply(h(E))}static msm(E,B){return w3(y,n,E,B)}_setWindowSize(E){N.setWindowSize(this,E)}assertValidity(){f(this)}hasEvenY(){const{y:E}=this.toAffine();if(s.isOdd)return!s.isOdd(E);throw new Error("Field doesn't support isOdd")}equals(E){u(E);const{px:B,py:P,pz:M}=this,{px:R,py:L,pz:q}=E,K=s.eql(s.mul(B,q),s.mul(R,M)),j=s.eql(s.mul(P,q),s.mul(L,M));return K&&j}negate(){return new y(this.px,s.neg(this.py),this.pz)}double(){const{a:E,b:B}=e,P=s.mul(B,Mr),{px:M,py:R,pz:L}=this;let q=s.ZERO,K=s.ZERO,j=s.ZERO,D=s.mul(M,M),F=s.mul(R,R),p=s.mul(L,L),g=s.mul(M,R);return g=s.add(g,g),j=s.mul(M,L),j=s.add(j,j),q=s.mul(E,j),K=s.mul(P,p),K=s.add(q,K),q=s.sub(F,K),K=s.add(F,K),K=s.mul(q,K),q=s.mul(g,q),j=s.mul(P,j),p=s.mul(E,p),g=s.sub(D,p),g=s.mul(E,g),g=s.add(g,j),j=s.add(D,D),D=s.add(j,D),D=s.add(D,p),D=s.mul(D,g),K=s.add(K,D),p=s.mul(R,L),p=s.add(p,p),D=s.mul(p,g),q=s.sub(q,D),j=s.mul(p,F),j=s.add(j,j),j=s.add(j,j),new y(q,K,j)}add(E){u(E);const{px:B,py:P,pz:M}=this,{px:R,py:L,pz:q}=E;let K=s.ZERO,j=s.ZERO,D=s.ZERO;const F=e.a,p=s.mul(e.b,Mr);let g=s.mul(B,R),w=s.mul(P,L),T=s.mul(M,q),S=s.add(B,P),O=s.add(R,L);S=s.mul(S,O),O=s.add(g,w),S=s.sub(S,O),O=s.add(B,M);let z=s.add(R,q);return O=s.mul(O,z),z=s.add(g,T),O=s.sub(O,z),z=s.add(P,M),K=s.add(L,q),z=s.mul(z,K),K=s.add(w,T),z=s.sub(z,K),D=s.mul(F,O),K=s.mul(p,T),D=s.add(K,D),K=s.sub(w,D),D=s.add(w,D),j=s.mul(K,D),w=s.add(g,g),w=s.add(w,g),T=s.mul(F,T),O=s.mul(p,O),w=s.add(w,T),T=s.sub(g,T),T=s.mul(F,T),O=s.add(O,T),g=s.mul(w,O),j=s.add(j,g),g=s.mul(z,O),K=s.mul(S,K),K=s.sub(K,g),g=s.mul(S,w),D=s.mul(z,D),D=s.add(D,g),new y(K,j,D)}subtract(E){return this.add(E.negate())}is0(){return this.equals(y.ZERO)}wNAF(E){return N.wNAFCached(this,E,y.normalizeZ)}multiplyUnsafe(E){const{endo:B,n:P}=e;qn("scalar",E,Es,P);const M=y.ZERO;if(E===Es)return M;if(this.is0()||E===We)return this;if(!B||N.hasPrecomputes(this))return N.wNAFCachedUnsafe(this,E,y.normalizeZ);let{k1neg:R,k1:L,k2neg:q,k2:K}=B.splitScalar(E),j=M,D=M,F=this;for(;L>Es||K>Es;)L&We&&(j=j.add(F)),K&We&&(D=D.add(F)),F=F.double(),L>>=We,K>>=We;return R&&(j=j.negate()),q&&(D=D.negate()),D=new y(s.mul(D.px,B.beta),D.py,D.pz),j.add(D)}multiply(E){const{endo:B,n:P}=e;qn("scalar",E,We,P);let M,R;if(B){const{k1neg:L,k1:q,k2neg:K,k2:j}=B.splitScalar(E);let{p:D,f:F}=this.wNAF(q),{p,f:g}=this.wNAF(j);D=N.constTimeNegate(L,D),p=N.constTimeNegate(K,p),p=new y(s.mul(p.px,B.beta),p.py,p.pz),M=D.add(p),R=F.add(g)}else{const{p:L,f:q}=this.wNAF(E);M=L,R=q}return y.normalizeZ([M,R])[0]}multiplyAndAddUnsafe(E,B,P){const M=y.BASE,R=(q,K)=>K===Es||K===We||!q.equals(M)?q.multiplyUnsafe(K):q.multiply(K),L=R(this,B).add(R(E,P));return L.is0()?void 0:L}toAffine(E){return b(this,E)}isTorsionFree(){const{h:E,isTorsionFree:B}=e;if(E===We)return!0;if(B)return B(y,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:E,clearCofactor:B}=e;return E===We?this:B?B(y,this):this.multiplyUnsafe(e.h)}toRawBytes(E=!0){return Ci("isCompressed",E),this.assertValidity(),i(y,this,E)}toHex(E=!0){return Ci("isCompressed",E),Ai(this.toRawBytes(E))}}y.BASE=new y(e.Gx,e.Gy,s.ONE),y.ZERO=new y(s.ZERO,s.ONE,s.ZERO);const{endo:C,nBitLength:_}=e,N=y3(y,C?Math.ceil(_/2):_);return{CURVE:e,ProjectivePoint:y,normPrivateKeyToScalar:h,weierstrassEquation:a,isWithinCurveOrder:d}}function C3(t){const e=Lu(t);return Mo(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function A3(t){const e=C3(t),{Fp:s,n,nByteLength:i,nBitLength:o}=e,a=s.BYTES+1,r=2*s.BYTES+1;function c(p){return wt(p,n)}function l(p){return _r(p,n)}const{ProjectivePoint:d,normPrivateKeyToScalar:h,weierstrassEquation:u,isWithinCurveOrder:b}=k3({...e,toBytes(p,g,w){const T=g.toAffine(),S=s.toBytes(T.x),O=Lo;return Ci("isCompressed",w),w?O(Uint8Array.from([g.hasEvenY()?2:3]),S):O(Uint8Array.from([4]),S,s.toBytes(T.y))},fromBytes(p){const g=p.length,w=p[0],T=p.subarray(1);if(g===a&&(w===2||w===3)){const S=gn(T);if(!Dr(S,We,s.ORDER))throw new Error("Point is not on curve");const O=u(S);let z;try{z=s.sqrt(O)}catch(W){const X=W instanceof Error?": "+W.message:"";throw new Error("Point is not on curve"+X)}const H=(z&We)===We;return(w&1)===1!==H&&(z=s.neg(z)),{x:S,y:z}}else if(g===r&&w===4){const S=s.fromBytes(T.subarray(0,s.BYTES)),O=s.fromBytes(T.subarray(s.BYTES,2*s.BYTES));return{x:S,y:O}}else{const S=a,O=r;throw new Error("invalid Point, expected length of "+S+", or uncompressed "+O+", got "+g)}}});function f(p){const g=n>>We;return p>g}function y(p){return f(p)?c(-p):p}const C=(p,g,w)=>gn(p.slice(g,w));class _{constructor(g,w,T){qn("r",g,We,n),qn("s",w,We,n),this.r=g,this.s=w,T!=null&&(this.recovery=T),Object.freeze(this)}static fromCompact(g){const w=i;return g=Ot("compactSignature",g,w*2),new _(C(g,0,w),C(g,w,2*w))}static fromDER(g){const{r:w,s:T}=xs.toSig(Ot("DER",g));return new _(w,T)}assertValidity(){}addRecoveryBit(g){return new _(this.r,this.s,g)}recoverPublicKey(g){const{r:w,s:T,recovery:S}=this,O=M(Ot("msgHash",g));if(S==null||![0,1,2,3].includes(S))throw new Error("recovery id invalid");const z=S===2||S===3?w+e.n:w;if(z>=s.ORDER)throw new Error("recovery id 2 or 3 invalid");const H=(S&1)===0?"02":"03",Y=d.fromHex(H+$r(z,s.BYTES)),W=l(z),X=c(-O*W),ee=c(T*W),ie=d.BASE.multiplyAndAddUnsafe(Y,X,ee);if(!ie)throw new Error("point at infinify");return ie.assertValidity(),ie}hasHighS(){return f(this.s)}normalizeS(){return this.hasHighS()?new _(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return No(this.toDERHex())}toDERHex(){return xs.hexFromSig(this)}toCompactRawBytes(){return No(this.toCompactHex())}toCompactHex(){const g=i;return $r(this.r,g)+$r(this.s,g)}}const N={isValidPrivateKey(p){try{return h(p),!0}catch{return!1}},normPrivateKeyToScalar:h,randomPrivateKey:()=>{const p=Ou(e.n);return m3(e.randomBytes(p),e.n)},precompute(p=8,g=d.BASE){return g._setWindowSize(p),g.multiply(BigInt(3)),g}};function A(p,g=!0){return d.fromPrivateKey(p).toRawBytes(g)}function E(p){if(typeof p=="bigint")return!1;if(p instanceof d)return!0;const w=Ot("key",p).length,T=s.BYTES,S=T+1,O=2*T+1;if(!(e.allowedPrivateKeyLengths||i===S))return w===S||w===O}function B(p,g,w=!0){if(E(p)===!0)throw new Error("first arg must be private key");if(E(g)===!1)throw new Error("second arg must be public key");return d.fromHex(g).multiply(h(p)).toRawBytes(w)}const P=e.bits2int||function(p){if(p.length>8192)throw new Error("input is too large");const g=gn(p),w=p.length*8-o;return w>0?g>>BigInt(w):g},M=e.bits2int_modN||function(p){return c(P(p))},R=$o(o);function L(p){return qn("num < 2^"+o,p,Es,R),Di(p,i)}function q(p,g,w=K){if(["recovered","canonical"].some(ce=>ce in w))throw new Error("sign() legacy options not supported");const{hash:T,randomBytes:S}=e;let{lowS:O,prehash:z,extraEntropy:H}=w;O==null&&(O=!0),p=Ot("msgHash",p),$u(w),z&&(p=Ot("prehashed msgHash",T(p)));const Y=M(p),W=h(g),X=[L(W),L(Y)];if(H!=null&&H!==!1){const ce=H===!0?S(s.BYTES):H;X.push(Ot("extraEntropy",ce))}const ee=Lo(...X),ie=Y;function he(ce){const se=P(ce);if(!b(se))return;const I=l(se),m=d.BASE.multiply(se).toAffine(),v=c(m.x);if(v===Es)return;const x=c(I*c(ie+v*W));if(x===Es)return;let k=(m.x===v?0:2)|Number(m.y&We),$=x;return O&&f(x)&&($=y(x),k^=1),new _(v,$,k)}return{seed:ee,k2sig:he}}const K={lowS:e.lowS,prehash:!1},j={lowS:e.lowS,prehash:!1};function D(p,g,w=K){const{seed:T,k2sig:S}=q(p,g,w),O=e;return C8(O.hash.outputLen,O.nByteLength,O.hmac)(T,S)}d.BASE._setWindowSize(8);function F(p,g,w,T=j){var k;const S=p;g=Ot("msgHash",g),w=Ot("publicKey",w);const{lowS:O,prehash:z,format:H}=T;if($u(T),"strict"in T)throw new Error("options.strict was renamed to lowS");if(H!==void 0&&H!=="compact"&&H!=="der")throw new Error("format must be compact or der");const Y=typeof S=="string"||ki(S),W=!Y&&!H&&typeof S=="object"&&S!==null&&typeof S.r=="bigint"&&typeof S.s=="bigint";if(!Y&&!W)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let X,ee;try{if(W&&(X=new _(S.r,S.s)),Y){try{H!=="compact"&&(X=_.fromDER(S))}catch($){if(!($ instanceof xs.Err))throw $}!X&&H!=="der"&&(X=_.fromCompact(S))}ee=d.fromHex(w)}catch{return!1}if(!X||O&&X.hasHighS())return!1;z&&(g=e.hash(g));const{r:ie,s:he}=X,ce=M(g),se=l(he),I=c(ce*se),m=c(ie*se),v=(k=d.BASE.multiplyAndAddUnsafe(ee,I,m))==null?void 0:k.toAffine();return v?c(v.x)===ie:!1}return{CURVE:e,getPublicKey:A,getSharedSecret:B,sign:D,verify:F,ProjectivePoint:d,Signature:_,utils:N}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function D3(t){return{hash:t,hmac:(e,...s)=>Cu(t,e,Z6(...s)),randomBytes:X6}}function S3(t,e){const s=n=>A3({...t,...D3(n)});return{...s(e),create:s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Mu=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),zu=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),B3=BigInt(0),T3=BigInt(1),zr=BigInt(2),ju=(t,e)=>(t+e/zr)/e;function F3(t){const e=Mu,s=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),a=BigInt(23),r=BigInt(44),c=BigInt(88),l=t*t*t%e,d=l*l*t%e,h=Pt(d,s,e)*d%e,u=Pt(h,s,e)*d%e,b=Pt(u,zr,e)*l%e,f=Pt(b,i,e)*b%e,y=Pt(f,o,e)*f%e,C=Pt(y,r,e)*y%e,_=Pt(C,c,e)*C%e,N=Pt(_,r,e)*y%e,A=Pt(N,s,e)*d%e,E=Pt(A,a,e)*f%e,B=Pt(E,n,e)*l%e,P=Pt(B,zr,e);if(!jr.eql(jr.sqr(P),t))throw new Error("Cannot find square root");return P}const jr=Or(Mu,void 0,void 0,{sqrt:F3}),I3=S3({a:B3,b:BigInt(7),Fp:jr,n:zu,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=zu,s=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-T3*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=s,a=BigInt("0x100000000000000000000000000000000"),r=ju(o*t,e),c=ju(-n*t,e);let l=wt(t-r*s-c*i,e),d=wt(-r*n-c*o,e);const h=l>a,u=d>a;if(h&&(l=e-l),u&&(d=e-d),l>a||d>a)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:h,k1:l,k2neg:u,k2:d}}}},x8);function _3(t){if(t.length!==130&&t.length!==132)throw new P3({signature:t});const e=BigInt(vs(t,0,32)),s=BigInt(vs(t,32,64)),n=(()=>{const i=+`0x${t.slice(130)}`;if(!Number.isNaN(i))try{return O3(i)}catch{throw new R3({value:i})}})();return typeof n>"u"?{r:e,s}:{r:e,s,yParity:n}}function O3(t){if(t===0||t===27)return 0;if(t===1||t===28)return 1;if(t>=35)return t%2===0?1:0;throw new U3({value:t})}class P3 extends Pe{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${Ms(Tr(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class R3 extends Pe{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class U3 extends Pe{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function N3(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function qu(t,e){return Array.isArray(e)?e.length===0?!0:t?e.every(s=>typeof s=="string"):e.every(s=>Number.isSafeInteger(s)):!1}function qo(t,e){if(typeof e!="string")throw new Error(`${t}: string expected`);return!0}function qr(t){if(!Number.isSafeInteger(t))throw new Error(`invalid integer: ${t}`)}function Hr(t){if(!Array.isArray(t))throw new Error("array expected")}function Ho(t,e){if(!qu(!0,e))throw new Error(`${t}: array of strings expected`)}function L3(t,e){if(!qu(!1,e))throw new Error(`${t}: array of numbers expected`)}function $3(...t){const e=o=>o,s=(o,a)=>r=>o(a(r)),n=t.map(o=>o.encode).reduceRight(s,e),i=t.map(o=>o.decode).reduce(s,e);return{encode:n,decode:i}}function M3(t){const e=typeof t=="string"?t.split(""):t,s=e.length;Ho("alphabet",e);const n=new Map(e.map((i,o)=>[i,o]));return{encode:i=>(Hr(i),i.map(o=>{if(!Number.isSafeInteger(o)||o<0||o>=s)throw new Error(`alphabet.encode: digit index outside alphabet "${o}". Allowed: ${t}`);return e[o]})),decode:i=>(Hr(i),i.map(o=>{qo("alphabet.decode",o);const a=n.get(o);if(a===void 0)throw new Error(`Unknown letter: "${o}". Allowed: ${t}`);return a}))}}function z3(t=""){return qo("join",t),{encode:e=>(Ho("join.decode",e),e.join(t)),decode:e=>(qo("join.decode",e),e.split(t))}}function j3(t,e="="){return qr(t),qo("padding",e),{encode(s){for(Ho("padding.encode",s);s.length*t%8;)s.push(e);return s},decode(s){Ho("padding.decode",s);let n=s.length;if(n*t%8)throw new Error("padding: invalid, string should have whole number of bytes");for(;n>0&&s[n-1]===e;n--)if((n-1)*t%8===0)throw new Error("padding: invalid, string has too much padding");return s.slice(0,n)}}}const Hu=(t,e)=>e===0?t:Hu(e,t%e),Vo=(t,e)=>t+(e-Hu(t,e)),Vr=(()=>{let t=[];for(let e=0;e<40;e++)t.push(2**e);return t})();function Vu(t,e,s,n){if(Hr(t),e<=0||e>32)throw new Error(`convertRadix2: wrong from=${e}`);if(s<=0||s>32)throw new Error(`convertRadix2: wrong to=${s}`);if(Vo(e,s)>32)throw new Error(`convertRadix2: carry overflow from=${e} to=${s} carryBits=${Vo(e,s)}`);let i=0,o=0;const a=Vr[e],r=Vr[s]-1,c=[];for(const l of t){if(qr(l),l>=a)throw new Error(`convertRadix2: invalid data word=${l} from=${e}`);if(i=i<<e|l,o+e>32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${e}`);for(o+=e;o>=s;o-=s)c.push((i>>o-s&r)>>>0);const d=Vr[o];if(d===void 0)throw new Error("invalid carry");i&=d-1}if(i=i<<s-o&r,!n&&o>=e)throw new Error("Excess padding");if(!n&&i>0)throw new Error(`Non-zero padding: ${i}`);return n&&o>0&&c.push(i>>>0),c}function q3(t,e=!1){if(qr(t),t<=0||t>32)throw new Error("radix2: bits should be in (0..32]");if(Vo(8,t)>32||Vo(t,8)>32)throw new Error("radix2: carry overflow");return{encode:s=>{if(!N3(s))throw new Error("radix2.encode input should be Uint8Array");return Vu(Array.from(s),8,t,!e)},decode:s=>(L3("radix2.decode",s),Uint8Array.from(Vu(s,t,8,e)))}}const H3=$3(q3(5),M3("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),j3(5),z3(""));function V3(t){return o3(K3(t))}function K3(t){const{payload:e,signature:s}=t,{r:n,s:i,yParity:o}=s,r=new I3.Signature(BigInt(n),BigInt(i)).addRecoveryBit(o).recoverPublicKey(Tr(e).substring(2));return Z8(r)}function W3(t){if(t.length>=255)throw new TypeError("Alphabet too long");const e=new Uint8Array(256);for(let l=0;l<e.length;l++)e[l]=255;for(let l=0;l<t.length;l++){const d=t.charAt(l),h=d.charCodeAt(0);if(e[h]!==255)throw new TypeError(d+" is ambiguous");e[h]=l}const s=t.length,n=t.charAt(0),i=Math.log(s)/Math.log(256),o=Math.log(256)/Math.log(s);function a(l){if(l instanceof Uint8Array||(ArrayBuffer.isView(l)?l=new Uint8Array(l.buffer,l.byteOffset,l.byteLength):Array.isArray(l)&&(l=Uint8Array.from(l))),!(l instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(l.length===0)return"";let d=0,h=0,u=0;const b=l.length;for(;u!==b&&l[u]===0;)u++,d++;const f=(b-u)*o+1>>>0,y=new Uint8Array(f);for(;u!==b;){let N=l[u],A=0;for(let E=f-1;(N!==0||A<h)&&E!==-1;E--,A++)N+=256*y[E]>>>0,y[E]=N%s>>>0,N=N/s>>>0;if(N!==0)throw new Error("Non-zero carry");h=A,u++}let C=f-h;for(;C!==f&&y[C]===0;)C++;let _=n.repeat(d);for(;C<f;++C)_+=t.charAt(y[C]);return _}function r(l){if(typeof l!="string")throw new TypeError("Expected String");if(l.length===0)return new Uint8Array;let d=0,h=0,u=0;for(;l[d]===n;)h++,d++;const b=(l.length-d)*i+1>>>0,f=new Uint8Array(b);for(;d<l.length;){const N=l.charCodeAt(d);if(N>255)return;let A=e[N];if(A===255)return;let E=0;for(let B=b-1;(A!==0||E<u)&&B!==-1;B--,E++)A+=s*f[B]>>>0,f[B]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");u=E,d++}let y=b-u;for(;y!==b&&f[y]===0;)y++;const C=new Uint8Array(h+(b-y));let _=h;for(;y!==b;)C[_++]=f[y++];return C}function c(l){const d=r(l);if(d)return d;throw new Error("Non-base"+s+" character")}return{encode:a,decodeUnsafe:r,decode:c}}var G3="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";const Si=W3(G3);function Y3(t){const e=t.length;let s=0,n=0;for(;n<e;){let i=t.charCodeAt(n++);if((i&4294967168)===0){s++;continue}else if((i&4294965248)===0)s+=2;else{if(i>=55296&&i<=56319&&n<e){const o=t.charCodeAt(n);(o&64512)===56320&&(++n,i=((i&1023)<<10)+(o&1023)+65536)}(i&4294901760)===0?s+=3:s+=4}}return s}function Z3(t,e,s){const n=t.length;let i=s,o=0;for(;o<n;){let a=t.charCodeAt(o++);if((a&4294967168)===0){e[i++]=a;continue}else if((a&4294965248)===0)e[i++]=a>>6&31|192;else{if(a>=55296&&a<=56319&&o<n){const r=t.charCodeAt(o);(r&64512)===56320&&(++o,a=((a&1023)<<10)+(r&1023)+65536)}(a&4294901760)===0?(e[i++]=a>>12&15|224,e[i++]=a>>6&63|128):(e[i++]=a>>18&7|240,e[i++]=a>>12&63|128,e[i++]=a>>6&63|128)}e[i++]=a&63|128}}const X3=new TextEncoder,Q3=50;function J3(t,e,s){X3.encodeInto(t,e.subarray(s))}function e5(t,e,s){t.length>Q3?J3(t,e,s):Z3(t,e,s)}const t5=4096;function Ku(t,e,s){let n=e;const i=n+s,o=[];let a="";for(;n<i;){const r=t[n++];if((r&128)===0)o.push(r);else if((r&224)===192){const c=t[n++]&63;o.push((r&31)<<6|c)}else if((r&240)===224){const c=t[n++]&63,l=t[n++]&63;o.push((r&31)<<12|c<<6|l)}else if((r&248)===240){const c=t[n++]&63,l=t[n++]&63,d=t[n++]&63;let h=(r&7)<<18|c<<12|l<<6|d;h>65535&&(h-=65536,o.push(h>>>10&1023|55296),h=56320|h&1023),o.push(h)}else o.push(r);o.length>=t5&&(a+=String.fromCharCode(...o),o.length=0)}return o.length>0&&(a+=String.fromCharCode(...o)),a}const s5=new TextDecoder,n5=200;function i5(t,e,s){const n=t.subarray(e,e+s);return s5.decode(n)}function o5(t,e,s){return s>n5?i5(t,e,s):Ku(t,e,s)}class Ko{constructor(e,s){this.type=e,this.data=s}}class St extends Error{constructor(e){super(e);const s=Object.create(St.prototype);Object.setPrototypeOf(this,s),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:St.name})}}const Bi=4294967295;function a5(t,e,s){const n=s/4294967296,i=s;t.setUint32(e,n),t.setUint32(e+4,i)}function Wu(t,e,s){const n=Math.floor(s/4294967296),i=s;t.setUint32(e,n),t.setUint32(e+4,i)}function Gu(t,e){const s=t.getInt32(e),n=t.getUint32(e+4);return s*4294967296+n}function r5(t,e){const s=t.getUint32(e),n=t.getUint32(e+4);return s*4294967296+n}const c5=-1,l5=4294967296-1,d5=17179869184-1;function h5({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=d5)if(e===0&&t<=l5){const s=new Uint8Array(4);return new DataView(s.buffer).setUint32(0,t),s}else{const s=t/4294967296,n=t&4294967295,i=new Uint8Array(8),o=new DataView(i.buffer);return o.setUint32(0,e<<2|s&3),o.setUint32(4,n),i}else{const s=new Uint8Array(12),n=new DataView(s.buffer);return n.setUint32(0,e),Wu(n,4,t),s}}function u5(t){const e=t.getTime(),s=Math.floor(e/1e3),n=(e-s*1e3)*1e6,i=Math.floor(n/1e9);return{sec:s+i,nsec:n-i*1e9}}function f5(t){if(t instanceof Date){const e=u5(t);return h5(e)}else return null}function p5(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{const s=e.getUint32(0),n=e.getUint32(4),i=(s&3)*4294967296+n,o=s>>>2;return{sec:i,nsec:o}}case 12:{const s=Gu(e,4),n=e.getUint32(0);return{sec:s,nsec:n}}default:throw new St(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function m5(t){const e=p5(t);return new Date(e.sec*1e3+e.nsec/1e6)}const g5={type:c5,encode:f5,decode:m5};class Wo{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(g5)}register({type:e,encode:s,decode:n}){if(e>=0)this.encoders[e]=s,this.decoders[e]=n;else{const i=-1-e;this.builtInEncoders[i]=s,this.builtInDecoders[i]=n}}tryToEncode(e,s){for(let n=0;n<this.builtInEncoders.length;n++){const i=this.builtInEncoders[n];if(i!=null){const o=i(e,s);if(o!=null){const a=-1-n;return new Ko(a,o)}}}for(let n=0;n<this.encoders.length;n++){const i=this.encoders[n];if(i!=null){const o=i(e,s);if(o!=null){const a=n;return new Ko(a,o)}}}return e instanceof Ko?e:null}decode(e,s,n){const i=s<0?this.builtInDecoders[-1-s]:this.decoders[s];return i?i(e,s,n):new Ko(s,e)}}Wo.defaultCodec=new Wo;function b5(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function Kr(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):b5(t)?new Uint8Array(t):Uint8Array.from(t)}const y5=100,w5=2048;let v5=class Ug{constructor(e){this.entered=!1,this.extensionCodec=(e==null?void 0:e.extensionCodec)??Wo.defaultCodec,this.context=e==null?void 0:e.context,this.useBigInt64=(e==null?void 0:e.useBigInt64)??!1,this.maxDepth=(e==null?void 0:e.maxDepth)??y5,this.initialBufferSize=(e==null?void 0:e.initialBufferSize)??w5,this.sortKeys=(e==null?void 0:e.sortKeys)??!1,this.forceFloat32=(e==null?void 0:e.forceFloat32)??!1,this.ignoreUndefined=(e==null?void 0:e.ignoreUndefined)??!1,this.forceIntegerToFloat=(e==null?void 0:e.forceIntegerToFloat)??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new Ug({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,s){if(s>this.maxDepth)throw new Error(`Too deep objects in depth ${s}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,s)}ensureBufferSizeToWrite(e){const s=this.pos+e;this.view.byteLength<s&&this.resizeBuffer(s*2)}resizeBuffer(e){const s=new ArrayBuffer(e),n=new Uint8Array(s),i=new DataView(s);n.set(this.bytes),this.view=i,this.bytes=n}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){const n=Y3(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),e5(e,this.bytes,this.pos),this.pos+=n}encodeObject(e,s){const n=this.extensionCodec.tryToEncode(e,this.context);if(n!=null)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,s);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,s);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){const s=e.byteLength;if(s<256)this.writeU8(196),this.writeU8(s);else if(s<65536)this.writeU8(197),this.writeU16(s);else if(s<4294967296)this.writeU8(198),this.writeU32(s);else throw new Error(`Too large binary: ${s}`);const n=Kr(e);this.writeU8a(n)}encodeArray(e,s){const n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else if(n<4294967296)this.writeU8(221),this.writeU32(n);else throw new Error(`Too large array: ${n}`);for(const i of e)this.doEncode(i,s+1)}countWithoutUndefined(e,s){let n=0;for(const i of s)e[i]!==void 0&&n++;return n}encodeMap(e,s){const n=Object.keys(e);this.sortKeys&&n.sort();const i=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else if(i<4294967296)this.writeU8(223),this.writeU32(i);else throw new Error(`Too large map object: ${i}`);for(const o of n){const a=e[o];this.ignoreUndefined&&a===void 0||(this.encodeString(o),this.doEncode(a,s+1))}}encodeExtension(e){if(typeof e.data=="function"){const n=e.data(this.pos+6),i=n.length;if(i>=4294967296)throw new Error(`Too large extension object: ${i}`);this.writeU8(201),this.writeU32(i),this.writeI8(e.type),this.writeU8a(n);return}const s=e.data.length;if(s===1)this.writeU8(212);else if(s===2)this.writeU8(213);else if(s===4)this.writeU8(214);else if(s===8)this.writeU8(215);else if(s===16)this.writeU8(216);else if(s<256)this.writeU8(199),this.writeU8(s);else if(s<65536)this.writeU8(200),this.writeU16(s);else if(s<4294967296)this.writeU8(201),this.writeU32(s);else throw new Error(`Too large extension object: ${s}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){const s=e.length;this.ensureBufferSizeToWrite(s),this.bytes.set(e,this.pos),this.pos+=s}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),a5(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),Wu(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}};function x5(t,e){return new v5(e).encodeSharedRef(t)}function Wr(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}const E5=16,k5=16;class C5{constructor(e=E5,s=k5){this.hit=0,this.miss=0,this.maxKeyLength=e,this.maxLengthPerKey=s,this.caches=[];for(let n=0;n<this.maxKeyLength;n++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,s,n){const i=this.caches[n-1];e:for(const o of i){const a=o.bytes;for(let r=0;r<n;r++)if(a[r]!==e[s+r])continue e;return o.str}return null}store(e,s){const n=this.caches[e.length-1],i={bytes:e,str:s};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=i:n.push(i)}decode(e,s,n){const i=this.find(e,s,n);if(i!=null)return this.hit++,i;this.miss++;const o=Ku(e,s,n),a=Uint8Array.prototype.slice.call(e,s,s+n);return this.store(a,o),o}}const Gr="array",Ti="map_key",Yu="map_value",A5=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new St("The type of key must be string or number but "+typeof t)};class D5{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){const s=this.getUninitializedStateFromPool();s.type=Gr,s.position=0,s.size=e,s.array=new Array(e)}pushMapState(e){const s=this.getUninitializedStateFromPool();s.type=Ti,s.readCount=0,s.size=e,s.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){const e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===Gr){const n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===Ti||e.type===Yu){const n=e;n.size=0,n.map=void 0,n.readCount=0,n.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}const Fi=-1,Yr=new DataView(new ArrayBuffer(0)),S5=new Uint8Array(Yr.buffer);try{Yr.getInt8(0)}catch(t){if(!(t instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}const Zu=new RangeError("Insufficient data"),B5=new C5;let T5=class Ng{constructor(e){this.totalPos=0,this.pos=0,this.view=Yr,this.bytes=S5,this.headByte=Fi,this.stack=new D5,this.entered=!1,this.extensionCodec=(e==null?void 0:e.extensionCodec)??Wo.defaultCodec,this.context=e==null?void 0:e.context,this.useBigInt64=(e==null?void 0:e.useBigInt64)??!1,this.rawStrings=(e==null?void 0:e.rawStrings)??!1,this.maxStrLength=(e==null?void 0:e.maxStrLength)??Bi,this.maxBinLength=(e==null?void 0:e.maxBinLength)??Bi,this.maxArrayLength=(e==null?void 0:e.maxArrayLength)??Bi,this.maxMapLength=(e==null?void 0:e.maxMapLength)??Bi,this.maxExtLength=(e==null?void 0:e.maxExtLength)??Bi,this.keyDecoder=(e==null?void 0:e.keyDecoder)!==void 0?e.keyDecoder:B5,this.mapKeyConverter=(e==null?void 0:e.mapKeyConverter)??A5}clone(){return new Ng({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=Fi,this.stack.reset()}setBuffer(e){const s=Kr(e);this.bytes=s,this.view=new DataView(s.buffer,s.byteOffset,s.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===Fi&&!this.hasRemaining(1))this.setBuffer(e);else{const s=this.bytes.subarray(this.pos),n=Kr(e),i=new Uint8Array(s.length+n.length);i.set(s),i.set(n,s.length),this.setBuffer(i)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){const{view:s,pos:n}=this;return new RangeError(`Extra ${s.byteLength-n} of ${s.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);const s=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return s}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let s=!1,n;for await(const r of e){if(s)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(r);try{n=this.doDecodeSync(),s=!0}catch(c){if(!(c instanceof RangeError))throw c}this.totalPos+=this.pos}if(s){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}const{headByte:i,pos:o,totalPos:a}=this;throw new RangeError(`Insufficient data in parsing ${Wr(i)} at ${a} (${o} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,s){if(this.entered){yield*this.clone().decodeMultiAsync(e,s);return}try{this.entered=!0;let n=s,i=-1;for await(const o of e){if(s&&i===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(o),n&&(i=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--i!==0;);}catch(a){if(!(a instanceof RangeError))throw a}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){const e=this.readHeadByte();let s;if(e>=224)s=e-256;else if(e<192)if(e<128)s=e;else if(e<144){const i=e-128;if(i!==0){this.pushMapState(i),this.complete();continue e}else s={}}else if(e<160){const i=e-144;if(i!==0){this.pushArrayState(i),this.complete();continue e}else s=[]}else{const i=e-160;s=this.decodeString(i,0)}else if(e===192)s=null;else if(e===194)s=!1;else if(e===195)s=!0;else if(e===202)s=this.readF32();else if(e===203)s=this.readF64();else if(e===204)s=this.readU8();else if(e===205)s=this.readU16();else if(e===206)s=this.readU32();else if(e===207)this.useBigInt64?s=this.readU64AsBigInt():s=this.readU64();else if(e===208)s=this.readI8();else if(e===209)s=this.readI16();else if(e===210)s=this.readI32();else if(e===211)this.useBigInt64?s=this.readI64AsBigInt():s=this.readI64();else if(e===217){const i=this.lookU8();s=this.decodeString(i,1)}else if(e===218){const i=this.lookU16();s=this.decodeString(i,2)}else if(e===219){const i=this.lookU32();s=this.decodeString(i,4)}else if(e===220){const i=this.readU16();if(i!==0){this.pushArrayState(i),this.complete();continue e}else s=[]}else if(e===221){const i=this.readU32();if(i!==0){this.pushArrayState(i),this.complete();continue e}else s=[]}else if(e===222){const i=this.readU16();if(i!==0){this.pushMapState(i),this.complete();continue e}else s={}}else if(e===223){const i=this.readU32();if(i!==0){this.pushMapState(i),this.complete();continue e}else s={}}else if(e===196){const i=this.lookU8();s=this.decodeBinary(i,1)}else if(e===197){const i=this.lookU16();s=this.decodeBinary(i,2)}else if(e===198){const i=this.lookU32();s=this.decodeBinary(i,4)}else if(e===212)s=this.decodeExtension(1,0);else if(e===213)s=this.decodeExtension(2,0);else if(e===214)s=this.decodeExtension(4,0);else if(e===215)s=this.decodeExtension(8,0);else if(e===216)s=this.decodeExtension(16,0);else if(e===199){const i=this.lookU8();s=this.decodeExtension(i,1)}else if(e===200){const i=this.lookU16();s=this.decodeExtension(i,2)}else if(e===201){const i=this.lookU32();s=this.decodeExtension(i,4)}else throw new St(`Unrecognized type byte: ${Wr(e)}`);this.complete();const n=this.stack;for(;n.length>0;){const i=n.top();if(i.type===Gr)if(i.array[i.position]=s,i.position++,i.position===i.size)s=i.array,n.release(i);else continue e;else if(i.type===Ti){if(s==="__proto__")throw new St("The key __proto__ is not allowed");i.key=this.mapKeyConverter(s),i.type=Yu;continue e}else if(i.map[i.key]=s,i.readCount++,i.readCount===i.size)s=i.map,n.release(i);else{i.key=null,i.type=Ti;continue e}}return s}}readHeadByte(){return this.headByte===Fi&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=Fi}readArraySize(){const e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new St(`Unrecognized array type byte: ${Wr(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new St(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new St(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,s){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,s):this.decodeBinary(e,s)}decodeUtf8String(e,s){var o;if(e>this.maxStrLength)throw new St(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+s+e)throw Zu;const n=this.pos+s;let i;return this.stateIsMapKey()&&((o=this.keyDecoder)!=null&&o.canBeCached(e))?i=this.keyDecoder.decode(this.bytes,n,e):i=o5(this.bytes,n,e),this.pos+=s+e,i}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===Ti:!1}decodeBinary(e,s){if(e>this.maxBinLength)throw new St(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+s))throw Zu;const n=this.pos+s,i=this.bytes.subarray(n,n+e);return this.pos+=s+e,i}decodeExtension(e,s){if(e>this.maxExtLength)throw new St(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);const n=this.view.getInt8(this.pos+s),i=this.decodeBinary(e,s+1);return this.extensionCodec.decode(i,n,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){const e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){const e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){const e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){const e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){const e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){const e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){const e=r5(this.view,this.pos);return this.pos+=8,e}readI64(){const e=Gu(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){const e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){const e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){const e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){const e=this.view.getFloat64(this.pos);return this.pos+=8,e}};function F5(t,e){return new T5(e).decode(t)}function Zr(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function Xu(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Zr(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function Ii(t,e){e||(e=t.reduce((i,o)=>i+o.length,0));const s=Xu(e);let n=0;for(const i of t)s.set(i,n),n+=i.length;return Zr(s)}function I5(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var s=new Uint8Array(256),n=0;n<s.length;n++)s[n]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),a=o.charCodeAt(0);if(s[a]!==255)throw new TypeError(o+" is ambiguous");s[a]=i}var r=t.length,c=t.charAt(0),l=Math.log(r)/Math.log(256),d=Math.log(256)/Math.log(r);function h(f){if(f instanceof Uint8Array||(ArrayBuffer.isView(f)?f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength):Array.isArray(f)&&(f=Uint8Array.from(f))),!(f instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(f.length===0)return"";for(var y=0,C=0,_=0,N=f.length;_!==N&&f[_]===0;)_++,y++;for(var A=(N-_)*d+1>>>0,E=new Uint8Array(A);_!==N;){for(var B=f[_],P=0,M=A-1;(B!==0||P<C)&&M!==-1;M--,P++)B+=256*E[M]>>>0,E[M]=B%r>>>0,B=B/r>>>0;if(B!==0)throw new Error("Non-zero carry");C=P,_++}for(var R=A-C;R!==A&&E[R]===0;)R++;for(var L=c.repeat(y);R<A;++R)L+=t.charAt(E[R]);return L}function u(f){if(typeof f!="string")throw new TypeError("Expected String");if(f.length===0)return new Uint8Array;var y=0;if(f[y]!==" "){for(var C=0,_=0;f[y]===c;)C++,y++;for(var N=(f.length-y)*l+1>>>0,A=new Uint8Array(N);f[y];){var E=s[f.charCodeAt(y)];if(E===255)return;for(var B=0,P=N-1;(E!==0||B<_)&&P!==-1;P--,B++)E+=r*A[P]>>>0,A[P]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");_=B,y++}if(f[y]!==" "){for(var M=N-_;M!==N&&A[M]===0;)M++;for(var R=new Uint8Array(C+(N-M)),L=C;M!==N;)R[L++]=A[M++];return R}}}function b(f){var y=u(f);if(y)return y;throw new Error(`Non-${e} character`)}return{encode:h,decodeUnsafe:u,decode:b}}var _5=I5,O5=_5;const P5=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},R5=t=>new TextEncoder().encode(t),U5=t=>new TextDecoder().decode(t);class N5{constructor(e,s,n){this.name=e,this.prefix=s,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class L5{constructor(e,s,n){if(this.name=e,this.prefix=s,s.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=s.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return Qu(this,e)}}class $5{constructor(e){this.decoders=e}or(e){return Qu(this,e)}decode(e){const s=e[0],n=this.decoders[s];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Qu=(t,e)=>new $5({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class M5{constructor(e,s,n,i){this.name=e,this.prefix=s,this.baseEncode=n,this.baseDecode=i,this.encoder=new N5(e,s,n),this.decoder=new L5(e,s,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Go=({name:t,prefix:e,encode:s,decode:n})=>new M5(t,e,s,n),_i=({prefix:t,name:e,alphabet:s})=>{const{encode:n,decode:i}=O5(s,e);return Go({prefix:t,name:e,encode:n,decode:o=>P5(i(o))})},z5=(t,e,s,n)=>{const i={};for(let d=0;d<e.length;++d)i[e[d]]=d;let o=t.length;for(;t[o-1]==="=";)--o;const a=new Uint8Array(o*s/8|0);let r=0,c=0,l=0;for(let d=0;d<o;++d){const h=i[t[d]];if(h===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<s|h,r+=s,r>=8&&(r-=8,a[l++]=255&c>>r)}if(r>=s||255&c<<8-r)throw new SyntaxError("Unexpected end of data");return a},j5=(t,e,s)=>{const n=e[e.length-1]==="=",i=(1<<s)-1;let o="",a=0,r=0;for(let c=0;c<t.length;++c)for(r=r<<8|t[c],a+=8;a>s;)a-=s,o+=e[i&r>>a];if(a&&(o+=e[i&r<<s-a]),n)for(;o.length*s&7;)o+="=";return o},Xe=({name:t,prefix:e,bitsPerChar:s,alphabet:n})=>Go({prefix:e,name:t,encode(i){return j5(i,n,s)},decode(i){return z5(i,n,s,t)}}),q5=Go({prefix:"\0",name:"identity",encode:t=>U5(t),decode:t=>R5(t)}),H5=Object.freeze(Object.defineProperty({__proto__:null,identity:q5},Symbol.toStringTag,{value:"Module"})),V5=Xe({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),K5=Object.freeze(Object.defineProperty({__proto__:null,base2:V5},Symbol.toStringTag,{value:"Module"})),W5=Xe({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),G5=Object.freeze(Object.defineProperty({__proto__:null,base8:W5},Symbol.toStringTag,{value:"Module"})),Y5=_i({prefix:"9",name:"base10",alphabet:"0123456789"}),Z5=Object.freeze(Object.defineProperty({__proto__:null,base10:Y5},Symbol.toStringTag,{value:"Module"})),X5=Xe({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Q5=Xe({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),J5=Object.freeze(Object.defineProperty({__proto__:null,base16:X5,base16upper:Q5},Symbol.toStringTag,{value:"Module"})),e4=Xe({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),t4=Xe({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),s4=Xe({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),n4=Xe({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),i4=Xe({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),o4=Xe({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),a4=Xe({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),r4=Xe({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),c4=Xe({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),l4=Object.freeze(Object.defineProperty({__proto__:null,base32:e4,base32hex:i4,base32hexpad:a4,base32hexpadupper:r4,base32hexupper:o4,base32pad:s4,base32padupper:n4,base32upper:t4,base32z:c4},Symbol.toStringTag,{value:"Module"})),d4=_i({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),h4=_i({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),u4=Object.freeze(Object.defineProperty({__proto__:null,base36:d4,base36upper:h4},Symbol.toStringTag,{value:"Module"})),f4=_i({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),p4=_i({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),m4=Object.freeze(Object.defineProperty({__proto__:null,base58btc:f4,base58flickr:p4},Symbol.toStringTag,{value:"Module"})),g4=Xe({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),b4=Xe({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),y4=Xe({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),w4=Xe({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),v4=Object.freeze(Object.defineProperty({__proto__:null,base64:g4,base64pad:b4,base64url:y4,base64urlpad:w4},Symbol.toStringTag,{value:"Module"})),Ju=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),x4=Ju.reduce((t,e,s)=>(t[s]=e,t),[]),E4=Ju.reduce((t,e,s)=>(t[e.codePointAt(0)]=s,t),[]);function k4(t){return t.reduce((e,s)=>(e+=x4[s],e),"")}function C4(t){const e=[];for(const s of t){const n=E4[s.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${s}`);e.push(n)}return new Uint8Array(e)}const A4=Go({prefix:"🚀",name:"base256emoji",encode:k4,decode:C4}),D4=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:A4},Symbol.toStringTag,{value:"Module"}));new TextEncoder,new TextDecoder;const ef={...H5,...K5,...G5,...Z5,...J5,...l4,...u4,...m4,...v4,...D4};function tf(t,e,s,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:s},decoder:{decode:n}}}const sf=tf("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),Xr=tf("ascii","a",t=>{let e="a";for(let s=0;s<t.length;s++)e+=String.fromCharCode(t[s]);return e},t=>{t=t.substring(1);const e=Xu(t.length);for(let s=0;s<t.length;s++)e[s]=t.charCodeAt(s);return e}),nf={utf8:sf,"utf-8":sf,hex:ef.base16,latin1:Xr,ascii:Xr,binary:Xr,...ef};function Rt(t,e="utf8"){const s=nf[e];if(!s)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Zr(globalThis.Buffer.from(t,"utf-8")):s.decoder.decode(`${s.prefix}${t}`)}function vt(t,e="utf8"){const s=nf[e];if(!s)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):s.encoder.encode(t).substring(1)}const S4={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}};var Qr,of;function af(){if(of)return Qr;of=1;const t="Input must be an string, Buffer or Uint8Array";function e(a){let r;if(a instanceof Uint8Array)r=a;else if(typeof a=="string")r=new TextEncoder().encode(a);else throw new Error(t);return r}function s(a){return Array.prototype.map.call(a,function(r){return(r<16?"0":"")+r.toString(16)}).join("")}function n(a){return(4294967296+a).toString(16).substring(1)}function i(a,r,c){let l=`
|
|
852
|
+
`+a+" = ";for(let d=0;d<r.length;d+=2){if(c===32)l+=n(r[d]).toUpperCase(),l+=" ",l+=n(r[d+1]).toUpperCase();else if(c===64)l+=n(r[d+1]).toUpperCase(),l+=n(r[d]).toUpperCase();else throw new Error("Invalid size "+c);d%6===4?l+=`
|
|
853
|
+
`+new Array(a.length+4).join(" "):d<r.length-2&&(l+=" ")}console.log(l)}function o(a,r,c){let l=new Date().getTime();const d=new Uint8Array(r);for(let u=0;u<r;u++)d[u]=u%256;const h=new Date().getTime();console.log("Generated random input in "+(h-l)+"ms"),l=h;for(let u=0;u<c;u++){const b=a(d),f=new Date().getTime(),y=f-l;l=f,console.log("Hashed in "+y+"ms: "+b.substring(0,20)+"..."),console.log(Math.round(r/(1<<20)/(y/1e3)*100)/100+" MB PER SECOND")}}return Qr={normalizeInput:e,toHex:s,debugPrint:i,testSpeed:o},Qr}var Jr,rf;function B4(){if(rf)return Jr;rf=1;const t=af();function e(_,N,A){const E=_[N]+_[A];let B=_[N+1]+_[A+1];E>=4294967296&&B++,_[N]=E,_[N+1]=B}function s(_,N,A,E){let B=_[N]+A;A<0&&(B+=4294967296);let P=_[N+1]+E;B>=4294967296&&P++,_[N]=B,_[N+1]=P}function n(_,N){return _[N]^_[N+1]<<8^_[N+2]<<16^_[N+3]<<24}function i(_,N,A,E,B,P){const M=l[B],R=l[B+1],L=l[P],q=l[P+1];e(c,_,N),s(c,_,M,R);let K=c[E]^c[_],j=c[E+1]^c[_+1];c[E]=j,c[E+1]=K,e(c,A,E),K=c[N]^c[A],j=c[N+1]^c[A+1],c[N]=K>>>24^j<<8,c[N+1]=j>>>24^K<<8,e(c,_,N),s(c,_,L,q),K=c[E]^c[_],j=c[E+1]^c[_+1],c[E]=K>>>16^j<<16,c[E+1]=j>>>16^K<<16,e(c,A,E),K=c[N]^c[A],j=c[N+1]^c[A+1],c[N]=j>>>31^K<<1,c[N+1]=K>>>31^j<<1}const o=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],r=new Uint8Array(a.map(function(_){return _*2})),c=new Uint32Array(32),l=new Uint32Array(32);function d(_,N){let A=0;for(A=0;A<16;A++)c[A]=_.h[A],c[A+16]=o[A];for(c[24]=c[24]^_.t,c[25]=c[25]^_.t/4294967296,N&&(c[28]=~c[28],c[29]=~c[29]),A=0;A<32;A++)l[A]=n(_.b,4*A);for(A=0;A<12;A++)i(0,8,16,24,r[A*16+0],r[A*16+1]),i(2,10,18,26,r[A*16+2],r[A*16+3]),i(4,12,20,28,r[A*16+4],r[A*16+5]),i(6,14,22,30,r[A*16+6],r[A*16+7]),i(0,10,20,30,r[A*16+8],r[A*16+9]),i(2,12,22,24,r[A*16+10],r[A*16+11]),i(4,14,16,26,r[A*16+12],r[A*16+13]),i(6,8,18,28,r[A*16+14],r[A*16+15]);for(A=0;A<16;A++)_.h[A]=_.h[A]^c[A]^c[A+16]}const h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function u(_,N,A,E){if(_===0||_>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(N&&N.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(A&&A.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(E&&E.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const B={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:_};h.fill(0),h[0]=_,N&&(h[1]=N.length),h[2]=1,h[3]=1,A&&h.set(A,32),E&&h.set(E,48);for(let P=0;P<16;P++)B.h[P]=o[P]^n(h,P*4);return N&&(b(B,N),B.c=128),B}function b(_,N){for(let A=0;A<N.length;A++)_.c===128&&(_.t+=_.c,d(_,!1),_.c=0),_.b[_.c++]=N[A]}function f(_){for(_.t+=_.c;_.c<128;)_.b[_.c++]=0;d(_,!0);const N=new Uint8Array(_.outlen);for(let A=0;A<_.outlen;A++)N[A]=_.h[A>>2]>>8*(A&3);return N}function y(_,N,A,E,B){A=A||64,_=t.normalizeInput(_),E&&(E=t.normalizeInput(E)),B&&(B=t.normalizeInput(B));const P=u(A,N,E,B);return b(P,_),f(P)}function C(_,N,A,E,B){const P=y(_,N,A,E,B);return t.toHex(P)}return Jr={blake2b:y,blake2bHex:C,blake2bInit:u,blake2bUpdate:b,blake2bFinal:f},Jr}var ec,cf;function T4(){if(cf)return ec;cf=1;const t=af();function e(f,y){return f[y]^f[y+1]<<8^f[y+2]<<16^f[y+3]<<24}function s(f,y,C,_,N,A){a[f]=a[f]+a[y]+N,a[_]=n(a[_]^a[f],16),a[C]=a[C]+a[_],a[y]=n(a[y]^a[C],12),a[f]=a[f]+a[y]+A,a[_]=n(a[_]^a[f],8),a[C]=a[C]+a[_],a[y]=n(a[y]^a[C],7)}function n(f,y){return f>>>y^f<<32-y}const i=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),o=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),a=new Uint32Array(16),r=new Uint32Array(16);function c(f,y){let C=0;for(C=0;C<8;C++)a[C]=f.h[C],a[C+8]=i[C];for(a[12]^=f.t,a[13]^=f.t/4294967296,y&&(a[14]=~a[14]),C=0;C<16;C++)r[C]=e(f.b,4*C);for(C=0;C<10;C++)s(0,4,8,12,r[o[C*16+0]],r[o[C*16+1]]),s(1,5,9,13,r[o[C*16+2]],r[o[C*16+3]]),s(2,6,10,14,r[o[C*16+4]],r[o[C*16+5]]),s(3,7,11,15,r[o[C*16+6]],r[o[C*16+7]]),s(0,5,10,15,r[o[C*16+8]],r[o[C*16+9]]),s(1,6,11,12,r[o[C*16+10]],r[o[C*16+11]]),s(2,7,8,13,r[o[C*16+12]],r[o[C*16+13]]),s(3,4,9,14,r[o[C*16+14]],r[o[C*16+15]]);for(C=0;C<8;C++)f.h[C]^=a[C]^a[C+8]}function l(f,y){if(!(f>0&&f<=32))throw new Error("Incorrect output length, should be in [1, 32]");const C=y?y.length:0;if(y&&!(C>0&&C<=32))throw new Error("Incorrect key length, should be in [1, 32]");const _={h:new Uint32Array(i),b:new Uint8Array(64),c:0,t:0,outlen:f};return _.h[0]^=16842752^C<<8^f,C>0&&(d(_,y),_.c=64),_}function d(f,y){for(let C=0;C<y.length;C++)f.c===64&&(f.t+=f.c,c(f,!1),f.c=0),f.b[f.c++]=y[C]}function h(f){for(f.t+=f.c;f.c<64;)f.b[f.c++]=0;c(f,!0);const y=new Uint8Array(f.outlen);for(let C=0;C<f.outlen;C++)y[C]=f.h[C>>2]>>8*(C&3)&255;return y}function u(f,y,C){C=C||32,f=t.normalizeInput(f);const _=l(C,y);return d(_,f),h(_)}function b(f,y,C){const _=u(f,y,C);return t.toHex(_)}return ec={blake2s:u,blake2sHex:b,blake2sInit:l,blake2sUpdate:d,blake2sFinal:h},ec}var tc,lf;function F4(){if(lf)return tc;lf=1;const t=B4(),e=T4();return tc={blake2b:t.blake2b,blake2bHex:t.blake2bHex,blake2bInit:t.blake2bInit,blake2bUpdate:t.blake2bUpdate,blake2bFinal:t.blake2bFinal,blake2s:e.blake2s,blake2sHex:e.blake2sHex,blake2sInit:e.blake2sInit,blake2sUpdate:e.blake2sUpdate,blake2sFinal:e.blake2sFinal},tc}var I4=F4();const _4=":";function Yo(t){const[e,s]=t.split(_4);return{namespace:e,reference:s}}function df(t,e){return t.includes(":")?[t]:e.chains||[]}var O4=Object.defineProperty,P4=Object.defineProperties,R4=Object.getOwnPropertyDescriptors,hf=Object.getOwnPropertySymbols,U4=Object.prototype.hasOwnProperty,N4=Object.prototype.propertyIsEnumerable,sc=(t,e,s)=>e in t?O4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,uf=(t,e)=>{for(var s in e||(e={}))U4.call(e,s)&&sc(t,s,e[s]);if(hf)for(var s of hf(e))N4.call(e,s)&&sc(t,s,e[s]);return t},L4=(t,e)=>P4(t,R4(e)),ff=(t,e,s)=>sc(t,typeof e!="symbol"?e+"":e,s);const $4="ReactNative",Bt={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},M4="js";function Zo(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function zs(){return!bs.getDocument()&&!!bs.getNavigator()&&navigator.product===$4}function z4(){return zs()&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"&&(global==null?void 0:global.Platform.OS)==="android"}function j4(){return zs()&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"&&(global==null?void 0:global.Platform.OS)==="ios"}function Hn(){return!Zo()&&!!bs.getNavigator()&&!!bs.getDocument()}function Oi(){return zs()?Bt.reactNative:Zo()?Bt.node:Hn()?Bt.browser:Bt.unknown}function pf(){var t;try{return zs()&&typeof global<"u"&&typeof(global==null?void 0:global.Application)<"u"?(t=global.Application)==null?void 0:t.applicationId:void 0}catch{return}}function q4(t,e){const s=new URLSearchParams(t);return Object.entries(e).sort(([n],[i])=>n.localeCompare(i)).forEach(([n,i])=>{i!=null&&s.set(n,String(i))}),s.toString()}function H4(t){var e,s;const n=mf();try{return t!=null&&t.url&&n.url&&new URL(t.url).host!==new URL(n.url).host&&(console.warn(`The configured WalletConnect 'metadata.url':${t.url} differs from the actual page url:${n.url}. This is probably unintended and can lead to issues.`),t.url=n.url),(e=t==null?void 0:t.icons)!=null&&e.length&&t.icons.length>0&&(t.icons=t.icons.filter(i=>i!=="")),L4(uf(uf({},n),t),{url:(t==null?void 0:t.url)||n.url,name:(t==null?void 0:t.name)||n.name,description:(t==null?void 0:t.description)||n.description,icons:(s=t==null?void 0:t.icons)!=null&&s.length&&t.icons.length>0?t.icons:n.icons})}catch(i){return console.warn("Error populating app metadata",i),t||n}}function mf(){return M6.getWindowMetadata()||{name:"",description:"",url:"",icons:[""]}}function V4(){if(Oi()===Bt.reactNative&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"){const{OS:s,Version:n}=global.Platform;return[s,n].join("-")}const t=O6();if(t===null)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return t.type==="browser"?[e,t.name,t.version].join("-"):[e,t.version].join("-")}function K4(){var t;const e=Oi();return e===Bt.browser?[e,((t=bs.getLocation())==null?void 0:t.host)||"unknown"].join(":"):e}function gf(t,e,s){const n=V4(),i=K4();return[[t,e].join("-"),[M4,s].join("-"),n,i].join("/")}function W4({protocol:t,version:e,relayUrl:s,sdkVersion:n,auth:i,projectId:o,useOnCloseEvent:a,bundleId:r,packageName:c}){const l=s.split("?"),d=gf(t,e,n),h={auth:i,ua:d,projectId:o,useOnCloseEvent:a,packageName:c||void 0,bundleId:r||void 0},u=q4(l[1]||"",h);return l[0]+"?"+u}function yn(t,e){return t.filter(s=>e.includes(s)).length===t.length}function nc(t){return Object.fromEntries(t.entries())}function ic(t){return new Map(Object.entries(t))}function wn(t=re.FIVE_MINUTES,e){const s=re.toMiliseconds(t||re.FIVE_MINUTES);let n,i,o,a;return{resolve:r=>{o&&n&&(clearTimeout(o),n(r),a=Promise.resolve(r))},reject:r=>{o&&i&&(clearTimeout(o),i(r))},done:()=>new Promise((r,c)=>{if(a)return r(a);o=setTimeout(()=>{const l=new Error(e);a=Promise.reject(l),c(l)},s),n=r,i=c})}}function ss(t,e,s){return new Promise(async(n,i)=>{const o=setTimeout(()=>i(new Error(s)),e);try{const a=await t;n(a)}catch(a){i(a)}clearTimeout(o)})}function bf(t,e){if(typeof e=="string"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function G4(t){return bf("topic",t)}function Y4(t){return bf("id",t)}function yf(t){const[e,s]=t.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof s=="string")n.topic=s;else if(e==="id"&&Number.isInteger(Number(s)))n.id=Number(s);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${s}`);return n}function Me(t,e){return re.fromMiliseconds(Date.now()+re.toMiliseconds(t))}function js(t){return Date.now()>=re.toMiliseconds(t)}function Ae(t,e){return`${t}${e?`:${e}`:""}`}function vn(t=[],e=[]){return[...new Set([...t,...e])]}async function Z4({id:t,topic:e,wcDeepLink:s}){var n;try{if(!s)return;const i=typeof s=="string"?JSON.parse(s):s,o=i==null?void 0:i.href;if(typeof o!="string")return;const a=X4(o,t,e),r=Oi();if(r===Bt.browser){if(!((n=bs.getDocument())!=null&&n.hasFocus())){console.warn("Document does not have focus, skipping deeplink.");return}Q4(a)}else r===Bt.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(a)}catch(i){console.error(i)}}function X4(t,e,s){const n=`requestId=${e}&sessionTopic=${s}`;t.endsWith("/")&&(t=t.slice(0,-1));let i=`${t}`;if(t.startsWith("https://t.me")){const o=t.includes("?")?"&startapp=":"?startapp=";i=`${i}${o}${sv(n,!0)}`}else i=`${i}/wc?${n}`;return i}function Q4(t){let e="_self";tv()?e="_top":(ev()||t.startsWith("https://")||t.startsWith("http://"))&&(e="_blank"),window.open(t,e,"noreferrer noopener")}async function J4(t,e){let s="";try{if(Hn()&&(s=localStorage.getItem(e),s))return s;s=await t.getItem(e)}catch(n){console.error(n)}return s}function wf(t,e){if(!t.includes(e))return null;const s=t.split(/([&,?,=])/),n=s.indexOf(e);return s[n+2]}function vf(){return typeof crypto<"u"&&crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function oc(){return typeof process<"u"&&process.env.IS_VITEST==="true"}function ev(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)}function tv(){try{return window.self!==window.top}catch{return!1}}function sv(t,e=!1){const s=Buffer.from(t).toString("base64");return e?s.replace(/[=]/g,""):s}function xf(t){return Buffer.from(t,"base64").toString("utf-8")}function nv(t){return new Promise(e=>setTimeout(e,t))}let iv=class{constructor({limit:e}){ff(this,"limit"),ff(this,"set"),this.limit=e,this.set=new Set}add(e){if(!this.set.has(e)){if(this.set.size>=this.limit){const s=this.set.values().next().value;s&&this.set.delete(s)}this.set.add(e)}}has(e){return this.set.has(e)}};const Xo=BigInt(2**32-1),Ef=BigInt(32);function kf(t,e=!1){return e?{h:Number(t&Xo),l:Number(t>>Ef&Xo)}:{h:Number(t>>Ef&Xo)|0,l:Number(t&Xo)|0}}function Cf(t,e=!1){const s=t.length;let n=new Uint32Array(s),i=new Uint32Array(s);for(let o=0;o<s;o++){const{h:a,l:r}=kf(t[o],e);[n[o],i[o]]=[a,r]}return[n,i]}const Af=(t,e,s)=>t>>>s,Df=(t,e,s)=>t<<32-s|e>>>s,qs=(t,e,s)=>t>>>s|e<<32-s,Hs=(t,e,s)=>t<<32-s|e>>>s,Pi=(t,e,s)=>t<<64-s|e>>>s-32,Ri=(t,e,s)=>t>>>s-32|e<<64-s,ov=(t,e)=>e,av=(t,e)=>t,rv=(t,e,s)=>t<<s|e>>>32-s,cv=(t,e,s)=>e<<s|t>>>32-s,lv=(t,e,s)=>e<<s-32|t>>>64-s,dv=(t,e,s)=>t<<s-32|e>>>64-s;function Gt(t,e,s,n){const i=(e>>>0)+(n>>>0);return{h:t+s+(i/2**32|0)|0,l:i|0}}const ac=(t,e,s)=>(t>>>0)+(e>>>0)+(s>>>0),rc=(t,e,s,n)=>e+s+n+(t/2**32|0)|0,hv=(t,e,s,n)=>(t>>>0)+(e>>>0)+(s>>>0)+(n>>>0),uv=(t,e,s,n,i)=>e+s+n+i+(t/2**32|0)|0,fv=(t,e,s,n,i)=>(t>>>0)+(e>>>0)+(s>>>0)+(n>>>0)+(i>>>0),pv=(t,e,s,n,i,o)=>e+s+n+i+o+(t/2**32|0)|0,Vn=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function Qo(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function ks(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function Yt(t,...e){if(!Qo(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function Jo(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");ks(t.outputLen),ks(t.blockLen)}function Vs(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function cc(t,e){Yt(t);const s=e.outputLen;if(t.length<s)throw new Error("digestInto() expects output buffer of length at least "+s)}function Ui(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Ut(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function lc(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function ns(t,e){return t<<32-e|t>>>e}const Sf=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Bf(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}const Cs=Sf?t=>t:t=>Bf(t);function mv(t){for(let e=0;e<t.length;e++)t[e]=Bf(t[e]);return t}const Ks=Sf?t=>t:mv,Tf=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",gv=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Kn(t){if(Yt(t),Tf)return t.toHex();let e="";for(let s=0;s<t.length;s++)e+=gv[t[s]];return e}const As={_0:48,_9:57,A:65,F:70,a:97,f:102};function Ff(t){if(t>=As._0&&t<=As._9)return t-As._0;if(t>=As.A&&t<=As.F)return t-(As.A-10);if(t>=As.a&&t<=As.f)return t-(As.a-10)}function ea(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(Tf)return Uint8Array.fromHex(t);const e=t.length,s=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(s);for(let i=0,o=0;i<s;i++,o+=2){const a=Ff(t.charCodeAt(o)),r=Ff(t.charCodeAt(o+1));if(a===void 0||r===void 0){const c=t[o]+t[o+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+o)}n[i]=a*16+r}return n}function If(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function Zt(t){return typeof t=="string"&&(t=If(t)),Yt(t),t}function Ws(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];Yt(i),e+=i.length}const s=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const o=t[n];s.set(o,i),i+=o.length}return s}class ta{}function Ni(t){const e=n=>t().update(Zt(n)).digest(),s=t();return e.outputLen=s.outputLen,e.blockLen=s.blockLen,e.create=()=>t(),e}function bv(t){const e=(n,i)=>t(i).update(Zt(n)).digest(),s=t({});return e.outputLen=s.outputLen,e.blockLen=s.blockLen,e.create=n=>t(n),e}function xn(t=32){if(Vn&&typeof Vn.getRandomValues=="function")return Vn.getRandomValues(new Uint8Array(t));if(Vn&&typeof Vn.randomBytes=="function")return Uint8Array.from(Vn.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}const yv=BigInt(0),Li=BigInt(1),wv=BigInt(2),vv=BigInt(7),xv=BigInt(256),Ev=BigInt(113),_f=[],Of=[],Pf=[];for(let t=0,e=Li,s=1,n=0;t<24;t++){[s,n]=[n,(2*s+3*n)%5],_f.push(2*(5*n+s)),Of.push((t+1)*(t+2)/2%64);let i=yv;for(let o=0;o<7;o++)e=(e<<Li^(e>>vv)*Ev)%xv,e&wv&&(i^=Li<<(Li<<BigInt(o))-Li);Pf.push(i)}const Rf=Cf(Pf,!0),kv=Rf[0],Cv=Rf[1],Uf=(t,e,s)=>s>32?lv(t,e,s):rv(t,e,s),Nf=(t,e,s)=>s>32?dv(t,e,s):cv(t,e,s);function Av(t,e=24){const s=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let a=0;a<10;a++)s[a]=t[a]^t[a+10]^t[a+20]^t[a+30]^t[a+40];for(let a=0;a<10;a+=2){const r=(a+8)%10,c=(a+2)%10,l=s[c],d=s[c+1],h=Uf(l,d,1)^s[r],u=Nf(l,d,1)^s[r+1];for(let b=0;b<50;b+=10)t[a+b]^=h,t[a+b+1]^=u}let i=t[2],o=t[3];for(let a=0;a<24;a++){const r=Of[a],c=Uf(i,o,r),l=Nf(i,o,r),d=_f[a];i=t[d],o=t[d+1],t[d]=c,t[d+1]=l}for(let a=0;a<50;a+=10){for(let r=0;r<10;r++)s[r]=t[a+r];for(let r=0;r<10;r++)t[a+r]^=~s[(r+2)%10]&s[(r+4)%10]}t[0]^=kv[n],t[1]^=Cv[n]}Ut(s)}let Dv=class Lg extends ta{constructor(e,s,n,i=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=s,this.outputLen=n,this.enableXOF=i,this.rounds=o,ks(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=Ui(this.state)}clone(){return this._cloneInto()}keccak(){Ks(this.state32),Av(this.state32,this.rounds),Ks(this.state32),this.posOut=0,this.pos=0}update(e){Vs(this),e=Zt(e),Yt(e);const{blockLen:s,state:n}=this,i=e.length;for(let o=0;o<i;){const a=Math.min(s-this.pos,i-o);for(let r=0;r<a;r++)n[this.pos++]^=e[o++];this.pos===s&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:s,pos:n,blockLen:i}=this;e[n]^=s,(s&128)!==0&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){Vs(this,!1),Yt(e),this.finish();const s=this.state,{blockLen:n}=this;for(let i=0,o=e.length;i<o;){this.posOut>=n&&this.keccak();const a=Math.min(n-this.posOut,o-i);e.set(s.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return ks(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(cc(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,Ut(this.state)}_cloneInto(e){const{blockLen:s,suffix:n,outputLen:i,rounds:o,enableXOF:a}=this;return e||(e=new Lg(s,n,i,a,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=i,e.enableXOF=a,e.destroyed=this.destroyed,e}};const Sv=(t,e,s)=>Ni(()=>new Dv(e,t,s)),Bv=Sv(1,136,256/8);function Tv(t,e,s,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,s,n);const i=BigInt(32),o=BigInt(4294967295),a=Number(s>>i&o),r=Number(s&o),c=n?4:0,l=n?0:4;t.setUint32(e+c,a,n),t.setUint32(e+l,r,n)}function Fv(t,e,s){return t&e^~t&s}function Iv(t,e,s){return t&e^t&s^e&s}let Lf=class extends ta{constructor(e,s,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=s,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=lc(this.buffer)}update(e){Vs(this),e=Zt(e),Yt(e);const{view:s,buffer:n,blockLen:i}=this,o=e.length;for(let a=0;a<o;){const r=Math.min(i-this.pos,o-a);if(r===i){const c=lc(e);for(;i<=o-a;a+=i)this.process(c,a);continue}n.set(e.subarray(a,a+r),this.pos),this.pos+=r,a+=r,this.pos===i&&(this.process(s,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Vs(this),cc(e,this),this.finished=!0;const{buffer:s,view:n,blockLen:i,isLE:o}=this;let{pos:a}=this;s[a++]=128,Ut(this.buffer.subarray(a)),this.padOffset>i-a&&(this.process(n,0),a=0);for(let h=a;h<i;h++)s[h]=0;Tv(n,i-8,BigInt(this.length*8),o),this.process(n,0);const r=lc(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<l;h++)r.setUint32(4*h,d[h],o)}digest(){const{buffer:e,outputLen:s}=this;this.digestInto(e);const n=e.slice(0,s);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:s,buffer:n,length:i,finished:o,destroyed:a,pos:r}=this;return e.destroyed=a,e.finished=o,e.length=i,e.pos=r,i%s&&e.buffer.set(n),e}clone(){return this._cloneInto()}};const Gs=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),nt=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),it=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),_v=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ys=new Uint32Array(64);class Ov extends Lf{constructor(e=32){super(64,e,8,!1),this.A=Gs[0]|0,this.B=Gs[1]|0,this.C=Gs[2]|0,this.D=Gs[3]|0,this.E=Gs[4]|0,this.F=Gs[5]|0,this.G=Gs[6]|0,this.H=Gs[7]|0}get(){const{A:e,B:s,C:n,D:i,E:o,F:a,G:r,H:c}=this;return[e,s,n,i,o,a,r,c]}set(e,s,n,i,o,a,r,c){this.A=e|0,this.B=s|0,this.C=n|0,this.D=i|0,this.E=o|0,this.F=a|0,this.G=r|0,this.H=c|0}process(e,s){for(let h=0;h<16;h++,s+=4)Ys[h]=e.getUint32(s,!1);for(let h=16;h<64;h++){const u=Ys[h-15],b=Ys[h-2],f=ns(u,7)^ns(u,18)^u>>>3,y=ns(b,17)^ns(b,19)^b>>>10;Ys[h]=y+Ys[h-7]+f+Ys[h-16]|0}let{A:n,B:i,C:o,D:a,E:r,F:c,G:l,H:d}=this;for(let h=0;h<64;h++){const u=ns(r,6)^ns(r,11)^ns(r,25),b=d+u+Fv(r,c,l)+_v[h]+Ys[h]|0,f=(ns(n,2)^ns(n,13)^ns(n,22))+Iv(n,i,o)|0;d=l,l=c,c=r,r=a+b|0,a=o,o=i,i=n,n=b+f|0}n=n+this.A|0,i=i+this.B|0,o=o+this.C|0,a=a+this.D|0,r=r+this.E|0,c=c+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(n,i,o,a,r,c,l,d)}roundClean(){Ut(Ys)}destroy(){this.set(0,0,0,0,0,0,0,0),Ut(this.buffer)}}const $f=Cf(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),Pv=$f[0],Rv=$f[1],Zs=new Uint32Array(80),Xs=new Uint32Array(80);let dc=class extends Lf{constructor(e=64){super(128,e,16,!1),this.Ah=it[0]|0,this.Al=it[1]|0,this.Bh=it[2]|0,this.Bl=it[3]|0,this.Ch=it[4]|0,this.Cl=it[5]|0,this.Dh=it[6]|0,this.Dl=it[7]|0,this.Eh=it[8]|0,this.El=it[9]|0,this.Fh=it[10]|0,this.Fl=it[11]|0,this.Gh=it[12]|0,this.Gl=it[13]|0,this.Hh=it[14]|0,this.Hl=it[15]|0}get(){const{Ah:e,Al:s,Bh:n,Bl:i,Ch:o,Cl:a,Dh:r,Dl:c,Eh:l,El:d,Fh:h,Fl:u,Gh:b,Gl:f,Hh:y,Hl:C}=this;return[e,s,n,i,o,a,r,c,l,d,h,u,b,f,y,C]}set(e,s,n,i,o,a,r,c,l,d,h,u,b,f,y,C){this.Ah=e|0,this.Al=s|0,this.Bh=n|0,this.Bl=i|0,this.Ch=o|0,this.Cl=a|0,this.Dh=r|0,this.Dl=c|0,this.Eh=l|0,this.El=d|0,this.Fh=h|0,this.Fl=u|0,this.Gh=b|0,this.Gl=f|0,this.Hh=y|0,this.Hl=C|0}process(e,s){for(let A=0;A<16;A++,s+=4)Zs[A]=e.getUint32(s),Xs[A]=e.getUint32(s+=4);for(let A=16;A<80;A++){const E=Zs[A-15]|0,B=Xs[A-15]|0,P=qs(E,B,1)^qs(E,B,8)^Af(E,B,7),M=Hs(E,B,1)^Hs(E,B,8)^Df(E,B,7),R=Zs[A-2]|0,L=Xs[A-2]|0,q=qs(R,L,19)^Pi(R,L,61)^Af(R,L,6),K=Hs(R,L,19)^Ri(R,L,61)^Df(R,L,6),j=hv(M,K,Xs[A-7],Xs[A-16]),D=uv(j,P,q,Zs[A-7],Zs[A-16]);Zs[A]=D|0,Xs[A]=j|0}let{Ah:n,Al:i,Bh:o,Bl:a,Ch:r,Cl:c,Dh:l,Dl:d,Eh:h,El:u,Fh:b,Fl:f,Gh:y,Gl:C,Hh:_,Hl:N}=this;for(let A=0;A<80;A++){const E=qs(h,u,14)^qs(h,u,18)^Pi(h,u,41),B=Hs(h,u,14)^Hs(h,u,18)^Ri(h,u,41),P=h&b^~h&y,M=u&f^~u&C,R=fv(N,B,M,Rv[A],Xs[A]),L=pv(R,_,E,P,Pv[A],Zs[A]),q=R|0,K=qs(n,i,28)^Pi(n,i,34)^Pi(n,i,39),j=Hs(n,i,28)^Ri(n,i,34)^Ri(n,i,39),D=n&o^n&r^o&r,F=i&a^i&c^a&c;_=y|0,N=C|0,y=b|0,C=f|0,b=h|0,f=u|0,{h,l:u}=Gt(l|0,d|0,L|0,q|0),l=r|0,d=c|0,r=o|0,c=a|0,o=n|0,a=i|0;const p=ac(q,j,F);n=rc(p,L,K,D),i=p|0}({h:n,l:i}=Gt(this.Ah|0,this.Al|0,n|0,i|0)),{h:o,l:a}=Gt(this.Bh|0,this.Bl|0,o|0,a|0),{h:r,l:c}=Gt(this.Ch|0,this.Cl|0,r|0,c|0),{h:l,l:d}=Gt(this.Dh|0,this.Dl|0,l|0,d|0),{h,l:u}=Gt(this.Eh|0,this.El|0,h|0,u|0),{h:b,l:f}=Gt(this.Fh|0,this.Fl|0,b|0,f|0),{h:y,l:C}=Gt(this.Gh|0,this.Gl|0,y|0,C|0),{h:_,l:N}=Gt(this.Hh|0,this.Hl|0,_|0,N|0),this.set(n,i,o,a,r,c,l,d,h,u,b,f,y,C,_,N)}roundClean(){Ut(Zs,Xs)}destroy(){Ut(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};class Uv extends dc{constructor(){super(48),this.Ah=nt[0]|0,this.Al=nt[1]|0,this.Bh=nt[2]|0,this.Bl=nt[3]|0,this.Ch=nt[4]|0,this.Cl=nt[5]|0,this.Dh=nt[6]|0,this.Dl=nt[7]|0,this.Eh=nt[8]|0,this.El=nt[9]|0,this.Fh=nt[10]|0,this.Fl=nt[11]|0,this.Gh=nt[12]|0,this.Gl=nt[13]|0,this.Hh=nt[14]|0,this.Hl=nt[15]|0}}const ot=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class Nv extends dc{constructor(){super(32),this.Ah=ot[0]|0,this.Al=ot[1]|0,this.Bh=ot[2]|0,this.Bl=ot[3]|0,this.Ch=ot[4]|0,this.Cl=ot[5]|0,this.Dh=ot[6]|0,this.Dl=ot[7]|0,this.Eh=ot[8]|0,this.El=ot[9]|0,this.Fh=ot[10]|0,this.Fl=ot[11]|0,this.Gh=ot[12]|0,this.Gl=ot[13]|0,this.Hh=ot[14]|0,this.Hl=ot[15]|0}}const sa=Ni(()=>new Ov),Lv=Ni(()=>new dc),$v=Ni(()=>new Uv),Mv=Ni(()=>new Nv),zv=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]),ze=Uint32Array.from([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),le=new Uint32Array(32);function Qs(t,e,s,n,i,o){const a=i[o],r=i[o+1];let c=le[2*t],l=le[2*t+1],d=le[2*e],h=le[2*e+1],u=le[2*s],b=le[2*s+1],f=le[2*n],y=le[2*n+1],C=ac(c,d,a);l=rc(C,l,h,r),c=C|0,{Dh:y,Dl:f}={Dh:y^l,Dl:f^c},{Dh:y,Dl:f}={Dh:ov(y,f),Dl:av(y)},{h:b,l:u}=Gt(b,u,y,f),{Bh:h,Bl:d}={Bh:h^b,Bl:d^u},{Bh:h,Bl:d}={Bh:qs(h,d,24),Bl:Hs(h,d,24)},le[2*t]=c,le[2*t+1]=l,le[2*e]=d,le[2*e+1]=h,le[2*s]=u,le[2*s+1]=b,le[2*n]=f,le[2*n+1]=y}function Js(t,e,s,n,i,o){const a=i[o],r=i[o+1];let c=le[2*t],l=le[2*t+1],d=le[2*e],h=le[2*e+1],u=le[2*s],b=le[2*s+1],f=le[2*n],y=le[2*n+1],C=ac(c,d,a);l=rc(C,l,h,r),c=C|0,{Dh:y,Dl:f}={Dh:y^l,Dl:f^c},{Dh:y,Dl:f}={Dh:qs(y,f,16),Dl:Hs(y,f,16)},{h:b,l:u}=Gt(b,u,y,f),{Bh:h,Bl:d}={Bh:h^b,Bl:d^u},{Bh:h,Bl:d}={Bh:Pi(h,d,63),Bl:Ri(h,d,63)},le[2*t]=c,le[2*t+1]=l,le[2*e]=d,le[2*e+1]=h,le[2*s]=u,le[2*s+1]=b,le[2*n]=f,le[2*n+1]=y}function jv(t,e={},s,n,i){if(ks(s),t<0||t>s)throw new Error("outputLen bigger than keyLen");const{key:o,salt:a,personalization:r}=e;if(o!==void 0&&(o.length<1||o.length>s))throw new Error("key length must be undefined or 1.."+s);if(a!==void 0&&a.length!==n)throw new Error("salt must be undefined or "+n);if(r!==void 0&&r.length!==i)throw new Error("personalization must be undefined or "+i)}class qv extends ta{constructor(e,s){super(),this.finished=!1,this.destroyed=!1,this.length=0,this.pos=0,ks(e),ks(s),this.blockLen=e,this.outputLen=s,this.buffer=new Uint8Array(e),this.buffer32=Ui(this.buffer)}update(e){Vs(this),e=Zt(e),Yt(e);const{blockLen:s,buffer:n,buffer32:i}=this,o=e.length,a=e.byteOffset,r=e.buffer;for(let c=0;c<o;){this.pos===s&&(Ks(i),this.compress(i,0,!1),Ks(i),this.pos=0);const l=Math.min(s-this.pos,o-c),d=a+c;if(l===s&&!(d%4)&&c+l<o){const h=new Uint32Array(r,d,Math.floor((o-c)/4));Ks(h);for(let u=0;c+s<o;u+=i.length,c+=s)this.length+=s,this.compress(h,u,!1);Ks(h);continue}n.set(e.subarray(c,c+l),this.pos),this.pos+=l,this.length+=l,c+=l}return this}digestInto(e){Vs(this),cc(e,this);const{pos:s,buffer32:n}=this;this.finished=!0,Ut(this.buffer.subarray(s)),Ks(n),this.compress(n,0,!0),Ks(n);const i=Ui(e);this.get().forEach((o,a)=>i[a]=Cs(o))}digest(){const{buffer:e,outputLen:s}=this;this.digestInto(e);const n=e.slice(0,s);return this.destroy(),n}_cloneInto(e){const{buffer:s,length:n,finished:i,destroyed:o,outputLen:a,pos:r}=this;return e||(e=new this.constructor({dkLen:a})),e.set(...this.get()),e.buffer.set(s),e.destroyed=o,e.finished=i,e.length=n,e.pos=r,e.outputLen=a,e}clone(){return this._cloneInto()}}class Hv extends qv{constructor(e={}){const s=e.dkLen===void 0?64:e.dkLen;super(128,s),this.v0l=ze[0]|0,this.v0h=ze[1]|0,this.v1l=ze[2]|0,this.v1h=ze[3]|0,this.v2l=ze[4]|0,this.v2h=ze[5]|0,this.v3l=ze[6]|0,this.v3h=ze[7]|0,this.v4l=ze[8]|0,this.v4h=ze[9]|0,this.v5l=ze[10]|0,this.v5h=ze[11]|0,this.v6l=ze[12]|0,this.v6h=ze[13]|0,this.v7l=ze[14]|0,this.v7h=ze[15]|0,jv(s,e,64,16,16);let{key:n,personalization:i,salt:o}=e,a=0;if(n!==void 0&&(n=Zt(n),a=n.length),this.v0l^=this.outputLen|a<<8|65536|1<<24,o!==void 0){o=Zt(o);const r=Ui(o);this.v4l^=Cs(r[0]),this.v4h^=Cs(r[1]),this.v5l^=Cs(r[2]),this.v5h^=Cs(r[3])}if(i!==void 0){i=Zt(i);const r=Ui(i);this.v6l^=Cs(r[0]),this.v6h^=Cs(r[1]),this.v7l^=Cs(r[2]),this.v7h^=Cs(r[3])}if(n!==void 0){const r=new Uint8Array(this.blockLen);r.set(n),this.update(r)}}get(){let{v0l:e,v0h:s,v1l:n,v1h:i,v2l:o,v2h:a,v3l:r,v3h:c,v4l:l,v4h:d,v5l:h,v5h:u,v6l:b,v6h:f,v7l:y,v7h:C}=this;return[e,s,n,i,o,a,r,c,l,d,h,u,b,f,y,C]}set(e,s,n,i,o,a,r,c,l,d,h,u,b,f,y,C){this.v0l=e|0,this.v0h=s|0,this.v1l=n|0,this.v1h=i|0,this.v2l=o|0,this.v2h=a|0,this.v3l=r|0,this.v3h=c|0,this.v4l=l|0,this.v4h=d|0,this.v5l=h|0,this.v5h=u|0,this.v6l=b|0,this.v6h=f|0,this.v7l=y|0,this.v7h=C|0}compress(e,s,n){this.get().forEach((c,l)=>le[l]=c),le.set(ze,16);let{h:i,l:o}=kf(BigInt(this.length));le[24]=ze[8]^o,le[25]=ze[9]^i,n&&(le[28]=~le[28],le[29]=~le[29]);let a=0;const r=zv;for(let c=0;c<12;c++)Qs(0,4,8,12,e,s+2*r[a++]),Js(0,4,8,12,e,s+2*r[a++]),Qs(1,5,9,13,e,s+2*r[a++]),Js(1,5,9,13,e,s+2*r[a++]),Qs(2,6,10,14,e,s+2*r[a++]),Js(2,6,10,14,e,s+2*r[a++]),Qs(3,7,11,15,e,s+2*r[a++]),Js(3,7,11,15,e,s+2*r[a++]),Qs(0,5,10,15,e,s+2*r[a++]),Js(0,5,10,15,e,s+2*r[a++]),Qs(1,6,11,12,e,s+2*r[a++]),Js(1,6,11,12,e,s+2*r[a++]),Qs(2,7,8,13,e,s+2*r[a++]),Js(2,7,8,13,e,s+2*r[a++]),Qs(3,4,9,14,e,s+2*r[a++]),Js(3,4,9,14,e,s+2*r[a++]);this.v0l^=le[0]^le[16],this.v0h^=le[1]^le[17],this.v1l^=le[2]^le[18],this.v1h^=le[3]^le[19],this.v2l^=le[4]^le[20],this.v2h^=le[5]^le[21],this.v3l^=le[6]^le[22],this.v3h^=le[7]^le[23],this.v4l^=le[8]^le[24],this.v4h^=le[9]^le[25],this.v5l^=le[10]^le[26],this.v5h^=le[11]^le[27],this.v6l^=le[12]^le[28],this.v6h^=le[13]^le[29],this.v7l^=le[14]^le[30],this.v7h^=le[15]^le[31],Ut(le)}destroy(){this.destroyed=!0,Ut(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Vv=bv(t=>new Hv(t)),Kv="https://rpc.walletconnect.org/v1";function Mf(t){const e=`Ethereum Signed Message:
|
|
854
|
+
${t.length}`,s=new TextEncoder().encode(e+t);return"0x"+Buffer.from(Bv(s)).toString("hex")}async function Wv(t,e,s,n,i,o){switch(s.t){case"eip191":return await Gv(t,e,s.s);case"eip1271":return await Yv(t,e,s.s,n,i,o);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${s.t}`)}}function Gv(t,e,s){const n=_3(s);return V3({payload:Mf(e),signature:n}).toLowerCase()===t.toLowerCase()}async function Yv(t,e,s,n,i,o){const a=Yo(n);if(!a.namespace||!a.reference)throw new Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${n}`);try{const r="0x1626ba7e",c="0000000000000000000000000000000000000000000000000000000000000040",l=s.substring(2),d=(l.length/2).toString(16).padStart(64,"0"),h=(e.startsWith("0x")?e:Mf(e)).substring(2),u=r+h+c+d+l,b=await fetch(`${o||Kv}/?chainId=${n}&projectId=${i}`,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({id:Zv(),jsonrpc:"2.0",method:"eth_call",params:[{to:t,data:u},"latest"]})}),{result:f}=await b.json();return f?f.slice(0,r.length).toLowerCase()===r.toLowerCase():!1}catch(r){return console.error("isValidEip1271Signature: ",r),!1}}function Zv(){return Date.now()+Math.floor(Math.random()*1e3)}function Xv(t){const e=atob(t),s=new Uint8Array(e.length);for(let a=0;a<e.length;a++)s[a]=e.charCodeAt(a);const n=s[0];if(n===0)throw new Error("No signatures found");const i=1+n*64;if(s.length<i)throw new Error("Transaction data too short for claimed signature count");if(s.length<100)throw new Error("Transaction too short");const o=Buffer.from(t,"base64").slice(1,65);return Si.encode(o)}function Qv(t){const e=new Uint8Array(Buffer.from(t,"base64")),s=Array.from("TransactionData::").map(o=>o.charCodeAt(0)),n=new Uint8Array(s.length+e.length);n.set(s),n.set(e,s.length);const i=Vv(n,{dkLen:32});return Si.encode(i)}function zf(t){const e=new Uint8Array(sa(Jv(t)));return Si.encode(e)}function Jv(t){if(t instanceof Uint8Array)return t;if(Array.isArray(t))return new Uint8Array(t);if(typeof t=="object"&&t!=null&&t.data)return new Uint8Array(Object.values(t.data));if(typeof t=="object"&&t)return new Uint8Array(Object.values(t));throw new Error("getNearUint8ArrayFromBytes: Unexpected result type from bytes array")}function jf(t){const e=Buffer.from(t,"base64"),s=F5(e).txn;if(!s)throw new Error("Invalid signed transaction: missing 'txn' field");const n=x5(s),i=Buffer.from("TX"),o=Buffer.concat([i,Buffer.from(n)]),a=Mv(o);return H3.encode(a).replace(/=+$/,"")}function hc(t){const e=[];let s=BigInt(t);for(;s>=BigInt(128);)e.push(Number(s&BigInt(127)|BigInt(128))),s>>=BigInt(7);return e.push(Number(s)),Buffer.from(e)}function e9(t){const e=Buffer.from(t.signed.bodyBytes,"base64"),s=Buffer.from(t.signed.authInfoBytes,"base64"),n=Buffer.from(t.signature.signature,"base64"),i=[];i.push(Buffer.from([10])),i.push(hc(e.length)),i.push(e),i.push(Buffer.from([18])),i.push(hc(s.length)),i.push(s),i.push(Buffer.from([26])),i.push(hc(n.length)),i.push(n);const o=Buffer.concat(i),a=sa(o);return Buffer.from(a).toString("hex").toUpperCase()}function t9(t){var e,s;const n=[];try{if(typeof t=="string")return n.push(t),n;if(typeof t!="object")return n;t!=null&&t.id&&n.push(t.id);const i=(s=(e=t==null?void 0:t.capabilities)==null?void 0:e.caip345)==null?void 0:s.transactionHashes;i&&n.push(...i)}catch(i){console.warn("getWalletSendCallsHashes failed: ",i)}return n}var s9=Object.defineProperty,n9=Object.defineProperties,i9=Object.getOwnPropertyDescriptors,qf=Object.getOwnPropertySymbols,o9=Object.prototype.hasOwnProperty,a9=Object.prototype.propertyIsEnumerable,Hf=(t,e,s)=>e in t?s9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,r9=(t,e)=>{for(var s in e||(e={}))o9.call(e,s)&&Hf(t,s,e[s]);if(qf)for(var s of qf(e))a9.call(e,s)&&Hf(t,s,e[s]);return t},c9=(t,e)=>n9(t,i9(e));const l9="did:pkh:",uc=t=>t==null?void 0:t.split(":"),d9=t=>{const e=t&&uc(t);if(e)return t.includes(l9)?e[3]:e[1]},fc=t=>{const e=t&&uc(t);if(e)return e[2]+":"+e[3]},na=t=>{const e=t&&uc(t);if(e)return e.pop()};async function Vf(t){const{cacao:e,projectId:s}=t,{s:n,p:i}=e,o=Kf(i,i.iss),a=na(i.iss);return await Wv(a,o,n,fc(i.iss),s)}const Kf=(t,e)=>{const s=`${t.domain} wants you to sign in with your Ethereum account:`,n=na(e);if(!t.aud&&!t.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let i=t.statement||void 0;const o=`URI: ${t.aud||t.uri}`,a=`Version: ${t.version}`,r=`Chain ID: ${d9(e)}`,c=`Nonce: ${t.nonce}`,l=`Issued At: ${t.iat}`,d=t.exp?`Expiration Time: ${t.exp}`:void 0,h=t.nbf?`Not Before: ${t.nbf}`:void 0,u=t.requestId?`Request ID: ${t.requestId}`:void 0,b=t.resources?`Resources:${t.resources.map(y=>`
|
|
855
|
+
- ${y}`).join("")}`:void 0,f=ia(t.resources);if(f){const y=$i(f);i=w9(i,y)}return[s,n,"",i,"",o,a,r,c,l,d,h,u,b].filter(y=>y!=null).join(`
|
|
856
|
+
`)};function h9(t){return Buffer.from(JSON.stringify(t)).toString("base64")}function u9(t){return JSON.parse(Buffer.from(t,"base64").toString("utf-8"))}function En(t){if(!t)throw new Error("No recap provided, value is undefined");if(!t.att)throw new Error("No `att` property found");const e=Object.keys(t.att);if(!(e!=null&&e.length))throw new Error("No resources found in `att` property");e.forEach(s=>{const n=t.att[s];if(Array.isArray(n))throw new Error(`Resource must be an object: ${s}`);if(typeof n!="object")throw new Error(`Resource must be an object: ${s}`);if(!Object.keys(n).length)throw new Error(`Resource object is empty: ${s}`);Object.keys(n).forEach(i=>{const o=n[i];if(!Array.isArray(o))throw new Error(`Ability limits ${i} must be an array of objects, found: ${o}`);if(!o.length)throw new Error(`Value of ${i} is empty array, must be an array with objects`);o.forEach(a=>{if(typeof a!="object")throw new Error(`Ability limits (${i}) must be an array of objects, found: ${a}`)})})})}function f9(t,e,s,n={}){return s==null||s.sort((i,o)=>i.localeCompare(o)),{att:{[t]:p9(e,s,n)}}}function p9(t,e,s={}){e=e==null?void 0:e.sort((i,o)=>i.localeCompare(o));const n=e.map(i=>({[`${t}/${i}`]:[s]}));return Object.assign({},...n)}function Wf(t){return En(t),`urn:recap:${h9(t).replace(/=/g,"")}`}function $i(t){const e=u9(t.replace("urn:recap:",""));return En(e),e}function m9(t,e,s){const n=f9(t,e,s);return Wf(n)}function g9(t){return t&&t.includes("urn:recap:")}function b9(t,e){const s=$i(t),n=$i(e),i=y9(s,n);return Wf(i)}function y9(t,e){En(t),En(e);const s=Object.keys(t.att).concat(Object.keys(e.att)).sort((i,o)=>i.localeCompare(o)),n={att:{}};return s.forEach(i=>{var o,a;Object.keys(((o=t.att)==null?void 0:o[i])||{}).concat(Object.keys(((a=e.att)==null?void 0:a[i])||{})).sort((r,c)=>r.localeCompare(c)).forEach(r=>{var c,l;n.att[i]=c9(r9({},n.att[i]),{[r]:((c=t.att[i])==null?void 0:c[r])||((l=e.att[i])==null?void 0:l[r])})})}),n}function w9(t="",e){En(e);const s="I further authorize the stated URI to perform the following actions on my behalf: ";if(t.includes(s))return t;const n=[];let i=0;Object.keys(e.att).forEach(r=>{const c=Object.keys(e.att[r]).map(h=>({ability:h.split("/")[0],action:h.split("/")[1]}));c.sort((h,u)=>h.action.localeCompare(u.action));const l={};c.forEach(h=>{l[h.ability]||(l[h.ability]=[]),l[h.ability].push(h.action)});const d=Object.keys(l).map(h=>(i++,`(${i}) '${h}': '${l[h].join("', '")}' for '${r}'.`));n.push(d.join(", ").replace(".,","."))});const o=n.join(" "),a=`${s}${o}`;return`${t?t+" ":""}${a}`}function Gf(t){var e;const s=$i(t);En(s);const n=(e=s.att)==null?void 0:e.eip155;return n?Object.keys(n).map(i=>i.split("/")[1]):[]}function Yf(t){const e=$i(t);En(e);const s=[];return Object.values(e.att).forEach(n=>{Object.values(n).forEach(i=>{var o;(o=i==null?void 0:i[0])!=null&&o.chains&&s.push(i[0].chains)})}),[...new Set(s.flat())]}function ia(t){if(!t)return;const e=t==null?void 0:t[t.length-1];return g9(e)?e:void 0}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function Zf(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function pc(t){if(typeof t!="boolean")throw new Error(`boolean expected, not ${t}`)}function mc(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function xt(t,...e){if(!Zf(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function Xf(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function v9(t,e){xt(t);const s=e.outputLen;if(t.length<s)throw new Error("digestInto() expects output buffer of length at least "+s)}function en(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Wn(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function x9(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}const E9=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function k9(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function gc(t){if(typeof t=="string")t=k9(t);else if(Zf(t))t=bc(t);else throw new Error("Uint8Array expected, got "+typeof t);return t}function C9(t,e){if(e==null||typeof e!="object")throw new Error("options must be defined");return Object.assign(t,e)}function A9(t,e){if(t.length!==e.length)return!1;let s=0;for(let n=0;n<t.length;n++)s|=t[n]^e[n];return s===0}const D9=(t,e)=>{function s(n,...i){if(xt(n),!E9)throw new Error("Non little-endian hardware is not yet supported");if(t.nonceLength!==void 0){const l=i[0];if(!l)throw new Error("nonce / iv required");t.varSizeNonce?xt(l):xt(l,t.nonceLength)}const o=t.tagLength;o&&i[1]!==void 0&&xt(i[1]);const a=e(n,...i),r=(l,d)=>{if(d!==void 0){if(l!==2)throw new Error("cipher output not supported");xt(d)}};let c=!1;return{encrypt(l,d){if(c)throw new Error("cannot encrypt() twice with same key + nonce");return c=!0,xt(l),r(a.encrypt.length,d),a.encrypt(l,d)},decrypt(l,d){if(xt(l),o&&l.length<o)throw new Error("invalid ciphertext length: smaller than tagLength="+o);return r(a.decrypt.length,d),a.decrypt(l,d)}}}return Object.assign(s,t),s};function Qf(t,e,s=!0){if(e===void 0)return new Uint8Array(t);if(e.length!==t)throw new Error("invalid output length, expected "+t+", got: "+e.length);if(s&&!B9(e))throw new Error("invalid output, must be aligned");return e}function Jf(t,e,s,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,s,n);const i=BigInt(32),o=BigInt(4294967295),a=Number(s>>i&o),r=Number(s&o);t.setUint32(e+4,a,n),t.setUint32(e+0,r,n)}function S9(t,e,s){pc(s);const n=new Uint8Array(16),i=x9(n);return Jf(i,0,BigInt(e),s),Jf(i,8,BigInt(t),s),n}function B9(t){return t.byteOffset%4===0}function bc(t){return Uint8Array.from(t)}const ep=t=>Uint8Array.from(t.split("").map(e=>e.charCodeAt(0))),T9=ep("expand 16-byte k"),F9=ep("expand 32-byte k"),I9=en(T9),_9=en(F9);function Ee(t,e){return t<<e|t>>>32-e}function yc(t){return t.byteOffset%4===0}const oa=64,O9=16,tp=2**32-1,sp=new Uint32Array;function P9(t,e,s,n,i,o,a,r){const c=i.length,l=new Uint8Array(oa),d=en(l),h=yc(i)&&yc(o),u=h?en(i):sp,b=h?en(o):sp;for(let f=0;f<c;a++){if(t(e,s,n,d,a,r),a>=tp)throw new Error("arx: counter overflow");const y=Math.min(oa,c-f);if(h&&y===oa){const C=f/4;if(f%4!==0)throw new Error("arx: invalid block position");for(let _=0,N;_<O9;_++)N=C+_,b[N]=u[N]^d[_];f+=oa;continue}for(let C=0,_;C<y;C++)_=f+C,o[_]=i[_]^l[C];f+=y}}function R9(t,e){const{allowShortKeys:s,extendNonceFn:n,counterLength:i,counterRight:o,rounds:a}=C9({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},e);if(typeof t!="function")throw new Error("core must be a function");return mc(i),mc(a),pc(o),pc(s),(r,c,l,d,h=0)=>{xt(r),xt(c),xt(l);const u=l.length;if(d===void 0&&(d=new Uint8Array(u)),xt(d),mc(h),h<0||h>=tp)throw new Error("arx: counter overflow");if(d.length<u)throw new Error(`arx: output (${d.length}) is shorter than data (${u})`);const b=[];let f=r.length,y,C;if(f===32)b.push(y=bc(r)),C=_9;else if(f===16&&s)y=new Uint8Array(32),y.set(r),y.set(r,16),C=I9,b.push(y);else throw new Error(`arx: invalid 32-byte key, got length=${f}`);yc(c)||b.push(c=bc(c));const _=en(y);if(n){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");n(C,_,en(c.subarray(0,16)),_),c=c.subarray(16)}const N=16-i;if(N!==c.length)throw new Error(`arx: nonce must be ${N} or 16 bytes`);if(N!==12){const E=new Uint8Array(12);E.set(c,o?0:12-c.length),c=E,b.push(c)}const A=en(c);return P9(t,C,_,A,l,d,h,a),Wn(...b),d}}const Qe=(t,e)=>t[e++]&255|(t[e++]&255)<<8;class U9{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,e=gc(e),xt(e,32);const s=Qe(e,0),n=Qe(e,2),i=Qe(e,4),o=Qe(e,6),a=Qe(e,8),r=Qe(e,10),c=Qe(e,12),l=Qe(e,14);this.r[0]=s&8191,this.r[1]=(s>>>13|n<<3)&8191,this.r[2]=(n>>>10|i<<6)&7939,this.r[3]=(i>>>7|o<<9)&8191,this.r[4]=(o>>>4|a<<12)&255,this.r[5]=a>>>1&8190,this.r[6]=(a>>>14|r<<2)&8191,this.r[7]=(r>>>11|c<<5)&8065,this.r[8]=(c>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let d=0;d<8;d++)this.pad[d]=Qe(e,16+2*d)}process(e,s,n=!1){const i=n?0:2048,{h:o,r:a}=this,r=a[0],c=a[1],l=a[2],d=a[3],h=a[4],u=a[5],b=a[6],f=a[7],y=a[8],C=a[9],_=Qe(e,s+0),N=Qe(e,s+2),A=Qe(e,s+4),E=Qe(e,s+6),B=Qe(e,s+8),P=Qe(e,s+10),M=Qe(e,s+12),R=Qe(e,s+14);let L=o[0]+(_&8191),q=o[1]+((_>>>13|N<<3)&8191),K=o[2]+((N>>>10|A<<6)&8191),j=o[3]+((A>>>7|E<<9)&8191),D=o[4]+((E>>>4|B<<12)&8191),F=o[5]+(B>>>1&8191),p=o[6]+((B>>>14|P<<2)&8191),g=o[7]+((P>>>11|M<<5)&8191),w=o[8]+((M>>>8|R<<8)&8191),T=o[9]+(R>>>5|i),S=0,O=S+L*r+q*(5*C)+K*(5*y)+j*(5*f)+D*(5*b);S=O>>>13,O&=8191,O+=F*(5*u)+p*(5*h)+g*(5*d)+w*(5*l)+T*(5*c),S+=O>>>13,O&=8191;let z=S+L*c+q*r+K*(5*C)+j*(5*y)+D*(5*f);S=z>>>13,z&=8191,z+=F*(5*b)+p*(5*u)+g*(5*h)+w*(5*d)+T*(5*l),S+=z>>>13,z&=8191;let H=S+L*l+q*c+K*r+j*(5*C)+D*(5*y);S=H>>>13,H&=8191,H+=F*(5*f)+p*(5*b)+g*(5*u)+w*(5*h)+T*(5*d),S+=H>>>13,H&=8191;let Y=S+L*d+q*l+K*c+j*r+D*(5*C);S=Y>>>13,Y&=8191,Y+=F*(5*y)+p*(5*f)+g*(5*b)+w*(5*u)+T*(5*h),S+=Y>>>13,Y&=8191;let W=S+L*h+q*d+K*l+j*c+D*r;S=W>>>13,W&=8191,W+=F*(5*C)+p*(5*y)+g*(5*f)+w*(5*b)+T*(5*u),S+=W>>>13,W&=8191;let X=S+L*u+q*h+K*d+j*l+D*c;S=X>>>13,X&=8191,X+=F*r+p*(5*C)+g*(5*y)+w*(5*f)+T*(5*b),S+=X>>>13,X&=8191;let ee=S+L*b+q*u+K*h+j*d+D*l;S=ee>>>13,ee&=8191,ee+=F*c+p*r+g*(5*C)+w*(5*y)+T*(5*f),S+=ee>>>13,ee&=8191;let ie=S+L*f+q*b+K*u+j*h+D*d;S=ie>>>13,ie&=8191,ie+=F*l+p*c+g*r+w*(5*C)+T*(5*y),S+=ie>>>13,ie&=8191;let he=S+L*y+q*f+K*b+j*u+D*h;S=he>>>13,he&=8191,he+=F*d+p*l+g*c+w*r+T*(5*C),S+=he>>>13,he&=8191;let ce=S+L*C+q*y+K*f+j*b+D*u;S=ce>>>13,ce&=8191,ce+=F*h+p*d+g*l+w*c+T*r,S+=ce>>>13,ce&=8191,S=(S<<2)+S|0,S=S+O|0,O=S&8191,S=S>>>13,z+=S,o[0]=O,o[1]=z,o[2]=H,o[3]=Y,o[4]=W,o[5]=X,o[6]=ee,o[7]=ie,o[8]=he,o[9]=ce}finalize(){const{h:e,pad:s}=this,n=new Uint16Array(10);let i=e[1]>>>13;e[1]&=8191;for(let r=2;r<10;r++)e[r]+=i,i=e[r]>>>13,e[r]&=8191;e[0]+=i*5,i=e[0]>>>13,e[0]&=8191,e[1]+=i,i=e[1]>>>13,e[1]&=8191,e[2]+=i,n[0]=e[0]+5,i=n[0]>>>13,n[0]&=8191;for(let r=1;r<10;r++)n[r]=e[r]+i,i=n[r]>>>13,n[r]&=8191;n[9]-=8192;let o=(i^1)-1;for(let r=0;r<10;r++)n[r]&=o;o=~o;for(let r=0;r<10;r++)e[r]=e[r]&o|n[r];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let a=e[0]+s[0];e[0]=a&65535;for(let r=1;r<8;r++)a=(e[r]+s[r]|0)+(a>>>16)|0,e[r]=a&65535;Wn(n)}update(e){Xf(this),e=gc(e),xt(e);const{buffer:s,blockLen:n}=this,i=e.length;for(let o=0;o<i;){const a=Math.min(n-this.pos,i-o);if(a===n){for(;n<=i-o;o+=n)this.process(e,o);continue}s.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===n&&(this.process(s,0,!1),this.pos=0)}return this}destroy(){Wn(this.h,this.r,this.buffer,this.pad)}digestInto(e){Xf(this),v9(e,this),this.finished=!0;const{buffer:s,h:n}=this;let{pos:i}=this;if(i){for(s[i++]=1;i<16;i++)s[i]=0;this.process(s,0,!0)}this.finalize();let o=0;for(let a=0;a<8;a++)e[o++]=n[a]>>>0,e[o++]=n[a]>>>8;return e}digest(){const{buffer:e,outputLen:s}=this;this.digestInto(e);const n=e.slice(0,s);return this.destroy(),n}}function N9(t){const e=(n,i)=>t(i).update(gc(n)).digest(),s=t(new Uint8Array(32));return e.outputLen=s.outputLen,e.blockLen=s.blockLen,e.create=n=>t(n),e}const L9=N9(t=>new U9(t));function $9(t,e,s,n,i,o=20){let a=t[0],r=t[1],c=t[2],l=t[3],d=e[0],h=e[1],u=e[2],b=e[3],f=e[4],y=e[5],C=e[6],_=e[7],N=i,A=s[0],E=s[1],B=s[2],P=a,M=r,R=c,L=l,q=d,K=h,j=u,D=b,F=f,p=y,g=C,w=_,T=N,S=A,O=E,z=B;for(let Y=0;Y<o;Y+=2)P=P+q|0,T=Ee(T^P,16),F=F+T|0,q=Ee(q^F,12),P=P+q|0,T=Ee(T^P,8),F=F+T|0,q=Ee(q^F,7),M=M+K|0,S=Ee(S^M,16),p=p+S|0,K=Ee(K^p,12),M=M+K|0,S=Ee(S^M,8),p=p+S|0,K=Ee(K^p,7),R=R+j|0,O=Ee(O^R,16),g=g+O|0,j=Ee(j^g,12),R=R+j|0,O=Ee(O^R,8),g=g+O|0,j=Ee(j^g,7),L=L+D|0,z=Ee(z^L,16),w=w+z|0,D=Ee(D^w,12),L=L+D|0,z=Ee(z^L,8),w=w+z|0,D=Ee(D^w,7),P=P+K|0,z=Ee(z^P,16),g=g+z|0,K=Ee(K^g,12),P=P+K|0,z=Ee(z^P,8),g=g+z|0,K=Ee(K^g,7),M=M+j|0,T=Ee(T^M,16),w=w+T|0,j=Ee(j^w,12),M=M+j|0,T=Ee(T^M,8),w=w+T|0,j=Ee(j^w,7),R=R+D|0,S=Ee(S^R,16),F=F+S|0,D=Ee(D^F,12),R=R+D|0,S=Ee(S^R,8),F=F+S|0,D=Ee(D^F,7),L=L+q|0,O=Ee(O^L,16),p=p+O|0,q=Ee(q^p,12),L=L+q|0,O=Ee(O^L,8),p=p+O|0,q=Ee(q^p,7);let H=0;n[H++]=a+P|0,n[H++]=r+M|0,n[H++]=c+R|0,n[H++]=l+L|0,n[H++]=d+q|0,n[H++]=h+K|0,n[H++]=u+j|0,n[H++]=b+D|0,n[H++]=f+F|0,n[H++]=y+p|0,n[H++]=C+g|0,n[H++]=_+w|0,n[H++]=N+T|0,n[H++]=A+S|0,n[H++]=E+O|0,n[H++]=B+z|0}const M9=R9($9,{counterRight:!1,counterLength:4,allowShortKeys:!1}),z9=new Uint8Array(16),np=(t,e)=>{t.update(e);const s=e.length%16;s&&t.update(z9.subarray(s))},j9=new Uint8Array(32);function ip(t,e,s,n,i){const o=t(e,s,j9),a=L9.create(o);i&&np(a,i),np(a,n);const r=S9(n.length,i?i.length:0,!0);a.update(r);const c=a.digest();return Wn(o,r),c}const q9=t=>(e,s,n)=>({encrypt(i,o){const a=i.length;o=Qf(a+16,o,!1),o.set(i);const r=o.subarray(0,-16);t(e,s,r,r,1);const c=ip(t,e,s,r,n);return o.set(c,a),Wn(c),o},decrypt(i,o){o=Qf(i.length-16,o,!1);const a=i.subarray(0,-16),r=i.subarray(-16),c=ip(t,e,s,a,n);if(!A9(r,c))throw new Error("invalid tag");return o.set(i.subarray(0,-16)),t(e,s,o,o,1),Wn(c),o}}),op=D9({blockSize:64,nonceLength:12,tagLength:16},q9(M9));let ap=class extends ta{constructor(e,s){super(),this.finished=!1,this.destroyed=!1,Jo(e);const n=Zt(s);if(this.iHash=e.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 i=this.blockLen,o=new Uint8Array(i);o.set(n.length>i?e.create().update(n).digest():n);for(let a=0;a<o.length;a++)o[a]^=54;this.iHash.update(o),this.oHash=e.create();for(let a=0;a<o.length;a++)o[a]^=106;this.oHash.update(o),Ut(o)}update(e){return Vs(this),this.iHash.update(e),this}digestInto(e){Vs(this),Yt(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:s,iHash:n,finished:i,destroyed:o,blockLen:a,outputLen:r}=this;return e=e,e.finished=i,e.destroyed=o,e.blockLen=a,e.outputLen=r,e.oHash=s._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const aa=(t,e,s)=>new ap(t,e).update(s).digest();aa.create=(t,e)=>new ap(t,e);function H9(t,e,s){return Jo(t),s===void 0&&(s=new Uint8Array(t.outputLen)),aa(t,Zt(s),Zt(e))}const wc=Uint8Array.from([0]),rp=Uint8Array.of();function V9(t,e,s,n=32){Jo(t),ks(n);const i=t.outputLen;if(n>255*i)throw new Error("Length should be <= 255*HashLen");const o=Math.ceil(n/i);s===void 0&&(s=rp);const a=new Uint8Array(o*i),r=aa.create(t,e),c=r._cloneInto(),l=new Uint8Array(r.outputLen);for(let d=0;d<o;d++)wc[0]=d+1,c.update(d===0?rp:l).update(s).update(wc).digestInto(l),a.set(l,i*d),r._cloneInto(c);return r.destroy(),c.destroy(),Ut(l,wc),a.slice(0,n)}const K9=(t,e,s,n,i)=>V9(t,H9(t,e,s),n,i),ra=sa,vc=BigInt(0),xc=BigInt(1);function ca(t,e=""){if(typeof t!="boolean"){const s=e&&`"${e}"`;throw new Error(s+"expected boolean, got type="+typeof t)}return t}function kn(t,e,s=""){const n=Qo(t),i=t==null?void 0:t.length,o=e!==void 0;if(!n||o&&i!==e){const a=s&&`"${s}" `,r=o?` of length ${e}`:"",c=n?`length=${i}`:`type=${typeof t}`;throw new Error(a+"expected Uint8Array"+r+", got "+c)}return t}function la(t){const e=t.toString(16);return e.length&1?"0"+e:e}function cp(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?vc:BigInt("0x"+t)}function da(t){return cp(Kn(t))}function ha(t){return Yt(t),cp(Kn(Uint8Array.from(t).reverse()))}function Ec(t,e){return ea(t.toString(16).padStart(e*2,"0"))}function kc(t,e){return Ec(t,e).reverse()}function at(t,e,s){let n;if(typeof e=="string")try{n=ea(e)}catch(o){throw new Error(t+" must be hex string or Uint8Array, cause: "+o)}else if(Qo(e))n=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");const i=n.length;if(typeof s=="number"&&i!==s)throw new Error(t+" of length "+s+" expected, got "+i);return n}const Cc=t=>typeof t=="bigint"&&vc<=t;function W9(t,e,s){return Cc(t)&&Cc(e)&&Cc(s)&&e<=t&&t<s}function Ac(t,e,s,n){if(!W9(e,s,n))throw new Error("expected valid "+t+": "+s+" <= n < "+n+", got "+e)}function lp(t){let e;for(e=0;t>vc;t>>=xc,e+=1);return e}const Mi=t=>(xc<<BigInt(t))-xc;function G9(t,e,s){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof s!="function")throw new Error("hmacFn must be a function");const n=u=>new Uint8Array(u),i=u=>Uint8Array.of(u);let o=n(t),a=n(t),r=0;const c=()=>{o.fill(1),a.fill(0),r=0},l=(...u)=>s(a,o,...u),d=(u=n(0))=>{a=l(i(0),u),o=l(),u.length!==0&&(a=l(i(1),u),o=l())},h=()=>{if(r++>=1e3)throw new Error("drbg: tried 1000 values");let u=0;const b=[];for(;u<e;){o=l();const f=o.slice();b.push(f),u+=o.length}return Ws(...b)};return(u,b)=>{c(),d(u);let f;for(;!(f=b(h()));)d();return c(),f}}function ua(t,e,s={}){if(!t||typeof t!="object")throw new Error("expected valid options object");function n(i,o,a){const r=t[i];if(a&&r===void 0)return;const c=typeof r;if(c!==o||r===null)throw new Error(`param "${i}" is invalid: expected ${o}, got ${c}`)}Object.entries(e).forEach(([i,o])=>n(i,o,!1)),Object.entries(s).forEach(([i,o])=>n(i,o,!0))}function dp(t){const e=new WeakMap;return(s,...n)=>{const i=e.get(s);if(i!==void 0)return i;const o=t(s,...n);return e.set(s,o),o}}const Et=BigInt(0),ht=BigInt(1),Cn=BigInt(2),hp=BigInt(3),up=BigInt(4),fp=BigInt(5),Y9=BigInt(7),pp=BigInt(8),Z9=BigInt(9),mp=BigInt(16);function Tt(t,e){const s=t%e;return s>=Et?s:e+s}function Xt(t,e,s){let n=t;for(;e-- >Et;)n*=n,n%=s;return n}function gp(t,e){if(t===Et)throw new Error("invert: expected non-zero number");if(e<=Et)throw new Error("invert: expected positive modulus, got "+e);let s=Tt(t,e),n=e,i=Et,o=ht;for(;s!==Et;){const a=n/s,r=n%s,c=i-o*a;n=s,s=r,i=o,o=c}if(n!==ht)throw new Error("invert: does not exist");return Tt(i,e)}function Dc(t,e,s){if(!t.eql(t.sqr(e),s))throw new Error("Cannot find square root")}function bp(t,e){const s=(t.ORDER+ht)/up,n=t.pow(e,s);return Dc(t,n,e),n}function X9(t,e){const s=(t.ORDER-fp)/pp,n=t.mul(e,Cn),i=t.pow(n,s),o=t.mul(e,i),a=t.mul(t.mul(o,Cn),i),r=t.mul(o,t.sub(a,t.ONE));return Dc(t,r,e),r}function Q9(t){const e=tn(t),s=yp(t),n=s(e,e.neg(e.ONE)),i=s(e,n),o=s(e,e.neg(n)),a=(t+Y9)/mp;return(r,c)=>{let l=r.pow(c,a),d=r.mul(l,n);const h=r.mul(l,i),u=r.mul(l,o),b=r.eql(r.sqr(d),c),f=r.eql(r.sqr(h),c);l=r.cmov(l,d,b),d=r.cmov(u,h,f);const y=r.eql(r.sqr(d),c),C=r.cmov(l,d,y);return Dc(r,C,c),C}}function yp(t){if(t<hp)throw new Error("sqrt is not defined for small field");let e=t-ht,s=0;for(;e%Cn===Et;)e/=Cn,s++;let n=Cn;const i=tn(t);for(;vp(i,n)===1;)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(s===1)return bp;let o=i.pow(n,e);const a=(e+ht)/Cn;return function(r,c){if(r.is0(c))return c;if(vp(r,c)!==1)throw new Error("Cannot find square root");let l=s,d=r.mul(r.ONE,o),h=r.pow(c,e),u=r.pow(c,a);for(;!r.eql(h,r.ONE);){if(r.is0(h))return r.ZERO;let b=1,f=r.sqr(h);for(;!r.eql(f,r.ONE);)if(b++,f=r.sqr(f),b===l)throw new Error("Cannot find square root");const y=ht<<BigInt(l-b-1),C=r.pow(d,y);l=b,d=r.sqr(C),h=r.mul(h,d),u=r.mul(u,C)}return u}}function J9(t){return t%up===hp?bp:t%pp===fp?X9:t%mp===Z9?Q9(t):yp(t)}const e7=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function t7(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},s=e7.reduce((n,i)=>(n[i]="function",n),e);return ua(t,s),t}function s7(t,e,s){if(s<Et)throw new Error("invalid exponent, negatives unsupported");if(s===Et)return t.ONE;if(s===ht)return e;let n=t.ONE,i=e;for(;s>Et;)s&ht&&(n=t.mul(n,i)),i=t.sqr(i),s>>=ht;return n}function wp(t,e,s=!1){const n=new Array(e.length).fill(s?t.ZERO:void 0),i=e.reduce((a,r,c)=>t.is0(r)?a:(n[c]=a,t.mul(a,r)),t.ONE),o=t.inv(i);return e.reduceRight((a,r,c)=>t.is0(r)?a:(n[c]=t.mul(a,n[c]),t.mul(a,r)),o),n}function vp(t,e){const s=(t.ORDER-ht)/Cn,n=t.pow(e,s),i=t.eql(n,t.ONE),o=t.eql(n,t.ZERO),a=t.eql(n,t.neg(t.ONE));if(!i&&!o&&!a)throw new Error("invalid Legendre symbol result");return i?1:o?0:-1}function xp(t,e){e!==void 0&&ks(e);const s=e!==void 0?e:t.toString(2).length,n=Math.ceil(s/8);return{nBitLength:s,nByteLength:n}}function tn(t,e,s=!1,n={}){if(t<=Et)throw new Error("invalid field: expected ORDER > 0, got "+t);let i,o,a=!1,r;if(typeof e=="object"&&e!=null){if(n.sqrt||s)throw new Error("cannot specify opts in two arguments");const u=e;u.BITS&&(i=u.BITS),u.sqrt&&(o=u.sqrt),typeof u.isLE=="boolean"&&(s=u.isLE),typeof u.modFromBytes=="boolean"&&(a=u.modFromBytes),r=u.allowedLengths}else typeof e=="number"&&(i=e),n.sqrt&&(o=n.sqrt);const{nBitLength:c,nByteLength:l}=xp(t,i);if(l>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let d;const h=Object.freeze({ORDER:t,isLE:s,BITS:c,BYTES:l,MASK:Mi(c),ZERO:Et,ONE:ht,allowedLengths:r,create:u=>Tt(u,t),isValid:u=>{if(typeof u!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof u);return Et<=u&&u<t},is0:u=>u===Et,isValidNot0:u=>!h.is0(u)&&h.isValid(u),isOdd:u=>(u&ht)===ht,neg:u=>Tt(-u,t),eql:(u,b)=>u===b,sqr:u=>Tt(u*u,t),add:(u,b)=>Tt(u+b,t),sub:(u,b)=>Tt(u-b,t),mul:(u,b)=>Tt(u*b,t),pow:(u,b)=>s7(h,u,b),div:(u,b)=>Tt(u*gp(b,t),t),sqrN:u=>u*u,addN:(u,b)=>u+b,subN:(u,b)=>u-b,mulN:(u,b)=>u*b,inv:u=>gp(u,t),sqrt:o||(u=>(d||(d=J9(t)),d(h,u))),toBytes:u=>s?kc(u,l):Ec(u,l),fromBytes:(u,b=!0)=>{if(r){if(!r.includes(u.length)||u.length>l)throw new Error("Field.fromBytes: expected "+r+" bytes, got "+u.length);const y=new Uint8Array(l);y.set(u,s?0:y.length-u.length),u=y}if(u.length!==l)throw new Error("Field.fromBytes: expected "+l+" bytes, got "+u.length);let f=s?ha(u):da(u);if(a&&(f=Tt(f,t)),!b&&!h.isValid(f))throw new Error("invalid field element: outside of range 0..ORDER");return f},invertBatch:u=>wp(h,u),cmov:(u,b,f)=>f?b:u});return Object.freeze(h)}function Ep(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function kp(t){const e=Ep(t);return e+Math.ceil(e/2)}function n7(t,e,s=!1){const n=t.length,i=Ep(e),o=kp(e);if(n<16||n<o||n>1024)throw new Error("expected "+o+"-1024 bytes of input, got "+n);const a=s?ha(t):da(t),r=Tt(a,e-ht)+ht;return s?kc(r,i):Ec(r,i)}const Gn=BigInt(0),An=BigInt(1);function fa(t,e){const s=e.negate();return t?s:e}function Sc(t,e){const s=wp(t.Fp,e.map(n=>n.Z));return e.map((n,i)=>t.fromAffine(n.toAffine(s[i])))}function Cp(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function Bc(t,e){Cp(t,e);const s=Math.ceil(e/t)+1,n=2**(t-1),i=2**t,o=Mi(t),a=BigInt(t);return{windows:s,windowSize:n,mask:o,maxNumber:i,shiftBy:a}}function Ap(t,e,s){const{windowSize:n,mask:i,maxNumber:o,shiftBy:a}=s;let r=Number(t&i),c=t>>a;r>n&&(r-=o,c+=An);const l=e*n,d=l+Math.abs(r)-1,h=r===0,u=r<0,b=e%2!==0;return{nextN:c,offset:d,isZero:h,isNeg:u,isNegF:b,offsetF:l}}function i7(t,e){if(!Array.isArray(t))throw new Error("array expected");t.forEach((s,n)=>{if(!(s instanceof e))throw new Error("invalid point at index "+n)})}function o7(t,e){if(!Array.isArray(t))throw new Error("array of scalars expected");t.forEach((s,n)=>{if(!e.isValid(s))throw new Error("invalid scalar at index "+n)})}const Tc=new WeakMap,Dp=new WeakMap;function Fc(t){return Dp.get(t)||1}function Sp(t){if(t!==Gn)throw new Error("invalid wNAF")}class a7{constructor(e,s){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=s}_unsafeLadder(e,s,n=this.ZERO){let i=e;for(;s>Gn;)s&An&&(n=n.add(i)),i=i.double(),s>>=An;return n}precomputeWindow(e,s){const{windows:n,windowSize:i}=Bc(s,this.bits),o=[];let a=e,r=a;for(let c=0;c<n;c++){r=a,o.push(r);for(let l=1;l<i;l++)r=r.add(a),o.push(r);a=r.double()}return o}wNAF(e,s,n){if(!this.Fn.isValid(n))throw new Error("invalid scalar");let i=this.ZERO,o=this.BASE;const a=Bc(e,this.bits);for(let r=0;r<a.windows;r++){const{nextN:c,offset:l,isZero:d,isNeg:h,isNegF:u,offsetF:b}=Ap(n,r,a);n=c,d?o=o.add(fa(u,s[b])):i=i.add(fa(h,s[l]))}return Sp(n),{p:i,f:o}}wNAFUnsafe(e,s,n,i=this.ZERO){const o=Bc(e,this.bits);for(let a=0;a<o.windows&&n!==Gn;a++){const{nextN:r,offset:c,isZero:l,isNeg:d}=Ap(n,a,o);if(n=r,!l){const h=s[c];i=i.add(d?h.negate():h)}}return Sp(n),i}getPrecomputes(e,s,n){let i=Tc.get(s);return i||(i=this.precomputeWindow(s,e),e!==1&&(typeof n=="function"&&(i=n(i)),Tc.set(s,i))),i}cached(e,s,n){const i=Fc(e);return this.wNAF(i,this.getPrecomputes(i,e,n),s)}unsafe(e,s,n,i){const o=Fc(e);return o===1?this._unsafeLadder(e,s,i):this.wNAFUnsafe(o,this.getPrecomputes(o,e,n),s,i)}createCache(e,s){Cp(s,this.bits),Dp.set(e,s),Tc.delete(e)}hasCache(e){return Fc(e)!==1}}function r7(t,e,s,n){let i=e,o=t.ZERO,a=t.ZERO;for(;s>Gn||n>Gn;)s&An&&(o=o.add(i)),n&An&&(a=a.add(i)),i=i.double(),s>>=An,n>>=An;return{p1:o,p2:a}}function c7(t,e,s,n){i7(s,t),o7(n,e);const i=s.length,o=n.length;if(i!==o)throw new Error("arrays of points and scalars must have equal length");const a=t.ZERO,r=lp(BigInt(i));let c=1;r>12?c=r-3:r>4?c=r-2:r>0&&(c=2);const l=Mi(c),d=new Array(Number(l)+1).fill(a),h=Math.floor((e.BITS-1)/c)*c;let u=a;for(let b=h;b>=0;b-=c){d.fill(a);for(let y=0;y<o;y++){const C=n[y],_=Number(C>>BigInt(b)&l);d[_]=d[_].add(s[y])}let f=a;for(let y=d.length-1,C=a;y>0;y--)C=C.add(d[y]),f=f.add(C);if(u=u.add(f),b!==0)for(let y=0;y<c;y++)u=u.double()}return u}function Bp(t,e,s){if(e){if(e.ORDER!==t)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return t7(e),e}else return tn(t,{isLE:s})}function l7(t,e,s={},n){if(n===void 0&&(n=t==="edwards"),!e||typeof e!="object")throw new Error(`expected valid ${t} CURVE object`);for(const r of["p","n","h"]){const c=e[r];if(!(typeof c=="bigint"&&c>Gn))throw new Error(`CURVE.${r} must be positive bigint`)}const i=Bp(e.p,s.Fp,n),o=Bp(e.n,s.Fn,n),a=["Gx","Gy","a","b"];for(const r of a)if(!i.isValid(e[r]))throw new Error(`CURVE.${r} must be valid field element of CURVE.Fp`);return e=Object.freeze(Object.assign({},e)),{CURVE:e,Fp:i,Fn:o}}BigInt(0),BigInt(1),BigInt(2),BigInt(8),If("HashToScalar-");const zi=BigInt(0),Yn=BigInt(1),pa=BigInt(2);function d7(t){return ua(t,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...t})}function h7(t){const e=d7(t),{P:s,type:n,adjustScalarBytes:i,powPminus2:o,randomBytes:a}=e,r=n==="x25519";if(!r&&n!=="x448")throw new Error("invalid type");const c=a||xn,l=r?255:448,d=r?32:56,h=BigInt(r?9:5),u=BigInt(r?121665:39081),b=r?pa**BigInt(254):pa**BigInt(447),f=r?BigInt(8)*pa**BigInt(251)-Yn:BigInt(4)*pa**BigInt(445)-Yn,y=b+f+Yn,C=j=>Tt(j,s),_=N(h);function N(j){return kc(C(j),d)}function A(j){const D=at("u coordinate",j,d);return r&&(D[31]&=127),C(ha(D))}function E(j){return ha(i(at("scalar",j,d)))}function B(j,D){const F=R(A(D),E(j));if(F===zi)throw new Error("invalid private or public key received");return N(F)}function P(j){return B(j,_)}function M(j,D,F){const p=C(j*(D-F));return D=C(D-p),F=C(F+p),{x_2:D,x_3:F}}function R(j,D){Ac("u",j,zi,s),Ac("scalar",D,b,y);const F=D,p=j;let g=Yn,w=zi,T=j,S=Yn,O=zi;for(let H=BigInt(l-1);H>=zi;H--){const Y=F>>H&Yn;O^=Y,{x_2:g,x_3:T}=M(O,g,T),{x_2:w,x_3:S}=M(O,w,S),O=Y;const W=g+w,X=C(W*W),ee=g-w,ie=C(ee*ee),he=X-ie,ce=T+S,se=T-S,I=C(se*W),m=C(ce*ee),v=I+m,x=I-m;T=C(v*v),S=C(p*C(x*x)),g=C(X*ie),w=C(he*(X+C(u*he)))}({x_2:g,x_3:T}=M(O,g,T)),{x_2:w,x_3:S}=M(O,w,S);const z=o(w);return C(g*z)}const L={secretKey:d,publicKey:d,seed:d},q=(j=c(d))=>(Yt(j,L.seed),j);function K(j){const D=q(j);return{secretKey:D,publicKey:P(D)}}return{keygen:K,getSharedSecret:(j,D)=>B(j,D),getPublicKey:j=>P(j),scalarMult:B,scalarMultBase:P,utils:{randomSecretKey:q,randomPrivateKey:q},GuBytes:_.slice(),lengths:L}}const u7=BigInt(1),Tp=BigInt(2),f7=BigInt(3),p7=BigInt(5);BigInt(8);const Fp=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),m7={p:Fp,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function g7(t){const e=BigInt(10),s=BigInt(20),n=BigInt(40),i=BigInt(80),o=Fp,a=t*t%o*t%o,r=Xt(a,Tp,o)*a%o,c=Xt(r,u7,o)*t%o,l=Xt(c,p7,o)*c%o,d=Xt(l,e,o)*l%o,h=Xt(d,s,o)*d%o,u=Xt(h,n,o)*h%o,b=Xt(u,i,o)*u%o,f=Xt(b,i,o)*u%o,y=Xt(f,e,o)*l%o;return{pow_p_5_8:Xt(y,Tp,o)*t%o,b2:a}}function b7(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}const y7=tn(m7.p,{isLE:!0}),Ic=(()=>{const t=y7.ORDER;return h7({P:t,type:"x25519",powPminus2:e=>{const{pow_p_5_8:s,b2:n}=g7(e);return Tt(Xt(s,f7,t)*n,t)},adjustScalarBytes:b7})})(),Ip=(t,e)=>(t+(t>=0?e:-e)/_p)/e;function w7(t,e,s){const[[n,i],[o,a]]=e,r=Ip(a*t,s),c=Ip(-i*t,s);let l=t-r*n-c*o,d=-r*i-c*a;const h=l<Ss,u=d<Ss;h&&(l=-l),u&&(d=-d);const b=Mi(Math.ceil(lp(s)/2))+Zn;if(l<Ss||l>=b||d<Ss||d>=b)throw new Error("splitScalar (endomorphism): failed, k="+t);return{k1neg:h,k1:l,k2neg:u,k2:d}}function _c(t){if(!["compact","recovered","der"].includes(t))throw new Error('Signature format must be "compact", "recovered", or "der"');return t}function Oc(t,e){const s={};for(let n of Object.keys(e))s[n]=t[n]===void 0?e[n]:t[n];return ca(s.lowS,"lowS"),ca(s.prehash,"prehash"),s.format!==void 0&&_c(s.format),s}class v7 extends Error{constructor(e=""){super(e)}}const Ds={Err:v7,_tlv:{encode:(t,e)=>{const{Err:s}=Ds;if(t<0||t>256)throw new s("tlv.encode: wrong tag");if(e.length&1)throw new s("tlv.encode: unpadded data");const n=e.length/2,i=la(n);if(i.length/2&128)throw new s("tlv.encode: long form length too big");const o=n>127?la(i.length/2|128):"";return la(t)+o+i+e},decode(t,e){const{Err:s}=Ds;let n=0;if(t<0||t>256)throw new s("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new s("tlv.decode: wrong tlv");const i=e[n++],o=!!(i&128);let a=0;if(!o)a=i;else{const c=i&127;if(!c)throw new s("tlv.decode(long): indefinite length not supported");if(c>4)throw new s("tlv.decode(long): byte length is too big");const l=e.subarray(n,n+c);if(l.length!==c)throw new s("tlv.decode: length bytes not complete");if(l[0]===0)throw new s("tlv.decode(long): zero leftmost byte");for(const d of l)a=a<<8|d;if(n+=c,a<128)throw new s("tlv.decode(long): not minimal encoding")}const r=e.subarray(n,n+a);if(r.length!==a)throw new s("tlv.decode: wrong value length");return{v:r,l:e.subarray(n+a)}}},_int:{encode(t){const{Err:e}=Ds;if(t<Ss)throw new e("integer: negative integers are not allowed");let s=la(t);if(Number.parseInt(s[0],16)&8&&(s="00"+s),s.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return s},decode(t){const{Err:e}=Ds;if(t[0]&128)throw new e("invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return da(t)}},toSig(t){const{Err:e,_int:s,_tlv:n}=Ds,i=at("signature",t),{v:o,l:a}=n.decode(48,i);if(a.length)throw new e("invalid signature: left bytes after parsing");const{v:r,l:c}=n.decode(2,o),{v:l,l:d}=n.decode(2,c);if(d.length)throw new e("invalid signature: left bytes after parsing");return{r:s.decode(r),s:s.decode(l)}},hexFromSig(t){const{_tlv:e,_int:s}=Ds,n=e.encode(2,s.encode(t.r)),i=e.encode(2,s.encode(t.s)),o=n+i;return e.encode(48,o)}},Ss=BigInt(0),Zn=BigInt(1),_p=BigInt(2),ma=BigInt(3),x7=BigInt(4);function Xn(t,e){const{BYTES:s}=t;let n;if(typeof e=="bigint")n=e;else{let i=at("private key",e);try{n=t.fromBytes(i)}catch{throw new Error(`invalid private key: expected ui8a of size ${s}, got ${typeof e}`)}}if(!t.isValidNot0(n))throw new Error("invalid private key: out of range [1..N-1]");return n}function E7(t,e={}){const s=l7("weierstrass",t,e),{Fp:n,Fn:i}=s;let o=s.CURVE;const{h:a,n:r}=o;ua(e,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:c}=e;if(c&&(!n.is0(o.a)||typeof c.beta!="bigint"||!Array.isArray(c.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const l=Pp(n,i);function d(){if(!n.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function h(j,D,F){const{x:p,y:g}=D.toAffine(),w=n.toBytes(p);if(ca(F,"isCompressed"),F){d();const T=!n.isOdd(g);return Ws(Op(T),w)}else return Ws(Uint8Array.of(4),w,n.toBytes(g))}function u(j){kn(j,void 0,"Point");const{publicKey:D,publicKeyUncompressed:F}=l,p=j.length,g=j[0],w=j.subarray(1);if(p===D&&(g===2||g===3)){const T=n.fromBytes(w);if(!n.isValid(T))throw new Error("bad point: is not on curve, wrong x");const S=y(T);let O;try{O=n.sqrt(S)}catch(H){const Y=H instanceof Error?": "+H.message:"";throw new Error("bad point: is not on curve, sqrt error"+Y)}d();const z=n.isOdd(O);return(g&1)===1!==z&&(O=n.neg(O)),{x:T,y:O}}else if(p===F&&g===4){const T=n.BYTES,S=n.fromBytes(w.subarray(0,T)),O=n.fromBytes(w.subarray(T,T*2));if(!C(S,O))throw new Error("bad point: is not on curve");return{x:S,y:O}}else throw new Error(`bad point: got length ${p}, expected compressed=${D} or uncompressed=${F}`)}const b=e.toBytes||h,f=e.fromBytes||u;function y(j){const D=n.sqr(j),F=n.mul(D,j);return n.add(n.add(F,n.mul(j,o.a)),o.b)}function C(j,D){const F=n.sqr(D),p=y(j);return n.eql(F,p)}if(!C(o.Gx,o.Gy))throw new Error("bad curve params: generator point");const _=n.mul(n.pow(o.a,ma),x7),N=n.mul(n.sqr(o.b),BigInt(27));if(n.is0(n.add(_,N)))throw new Error("bad curve params: a or b");function A(j,D,F=!1){if(!n.isValid(D)||F&&n.is0(D))throw new Error(`bad point coordinate ${j}`);return D}function E(j){if(!(j instanceof L))throw new Error("ProjectivePoint expected")}function B(j){if(!c||!c.basises)throw new Error("no endo");return w7(j,c.basises,i.ORDER)}const P=dp((j,D)=>{const{X:F,Y:p,Z:g}=j;if(n.eql(g,n.ONE))return{x:F,y:p};const w=j.is0();D==null&&(D=w?n.ONE:n.inv(g));const T=n.mul(F,D),S=n.mul(p,D),O=n.mul(g,D);if(w)return{x:n.ZERO,y:n.ZERO};if(!n.eql(O,n.ONE))throw new Error("invZ was invalid");return{x:T,y:S}}),M=dp(j=>{if(j.is0()){if(e.allowInfinityPoint&&!n.is0(j.Y))return;throw new Error("bad point: ZERO")}const{x:D,y:F}=j.toAffine();if(!n.isValid(D)||!n.isValid(F))throw new Error("bad point: x or y not field elements");if(!C(D,F))throw new Error("bad point: equation left != right");if(!j.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function R(j,D,F,p,g){return F=new L(n.mul(F.X,j),F.Y,F.Z),D=fa(p,D),F=fa(g,F),D.add(F)}class L{constructor(D,F,p){this.X=A("x",D),this.Y=A("y",F,!0),this.Z=A("z",p),Object.freeze(this)}static CURVE(){return o}static fromAffine(D){const{x:F,y:p}=D||{};if(!D||!n.isValid(F)||!n.isValid(p))throw new Error("invalid affine point");if(D instanceof L)throw new Error("projective point not allowed");return n.is0(F)&&n.is0(p)?L.ZERO:new L(F,p,n.ONE)}static fromBytes(D){const F=L.fromAffine(f(kn(D,void 0,"point")));return F.assertValidity(),F}static fromHex(D){return L.fromBytes(at("pointHex",D))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(D=8,F=!0){return K.createCache(this,D),F||this.multiply(ma),this}assertValidity(){M(this)}hasEvenY(){const{y:D}=this.toAffine();if(!n.isOdd)throw new Error("Field doesn't support isOdd");return!n.isOdd(D)}equals(D){E(D);const{X:F,Y:p,Z:g}=this,{X:w,Y:T,Z:S}=D,O=n.eql(n.mul(F,S),n.mul(w,g)),z=n.eql(n.mul(p,S),n.mul(T,g));return O&&z}negate(){return new L(this.X,n.neg(this.Y),this.Z)}double(){const{a:D,b:F}=o,p=n.mul(F,ma),{X:g,Y:w,Z:T}=this;let S=n.ZERO,O=n.ZERO,z=n.ZERO,H=n.mul(g,g),Y=n.mul(w,w),W=n.mul(T,T),X=n.mul(g,w);return X=n.add(X,X),z=n.mul(g,T),z=n.add(z,z),S=n.mul(D,z),O=n.mul(p,W),O=n.add(S,O),S=n.sub(Y,O),O=n.add(Y,O),O=n.mul(S,O),S=n.mul(X,S),z=n.mul(p,z),W=n.mul(D,W),X=n.sub(H,W),X=n.mul(D,X),X=n.add(X,z),z=n.add(H,H),H=n.add(z,H),H=n.add(H,W),H=n.mul(H,X),O=n.add(O,H),W=n.mul(w,T),W=n.add(W,W),H=n.mul(W,X),S=n.sub(S,H),z=n.mul(W,Y),z=n.add(z,z),z=n.add(z,z),new L(S,O,z)}add(D){E(D);const{X:F,Y:p,Z:g}=this,{X:w,Y:T,Z:S}=D;let O=n.ZERO,z=n.ZERO,H=n.ZERO;const Y=o.a,W=n.mul(o.b,ma);let X=n.mul(F,w),ee=n.mul(p,T),ie=n.mul(g,S),he=n.add(F,p),ce=n.add(w,T);he=n.mul(he,ce),ce=n.add(X,ee),he=n.sub(he,ce),ce=n.add(F,g);let se=n.add(w,S);return ce=n.mul(ce,se),se=n.add(X,ie),ce=n.sub(ce,se),se=n.add(p,g),O=n.add(T,S),se=n.mul(se,O),O=n.add(ee,ie),se=n.sub(se,O),H=n.mul(Y,ce),O=n.mul(W,ie),H=n.add(O,H),O=n.sub(ee,H),H=n.add(ee,H),z=n.mul(O,H),ee=n.add(X,X),ee=n.add(ee,X),ie=n.mul(Y,ie),ce=n.mul(W,ce),ee=n.add(ee,ie),ie=n.sub(X,ie),ie=n.mul(Y,ie),ce=n.add(ce,ie),X=n.mul(ee,ce),z=n.add(z,X),X=n.mul(se,ce),O=n.mul(he,O),O=n.sub(O,X),X=n.mul(he,ee),H=n.mul(se,H),H=n.add(H,X),new L(O,z,H)}subtract(D){return this.add(D.negate())}is0(){return this.equals(L.ZERO)}multiply(D){const{endo:F}=e;if(!i.isValidNot0(D))throw new Error("invalid scalar: out of range");let p,g;const w=T=>K.cached(this,T,S=>Sc(L,S));if(F){const{k1neg:T,k1:S,k2neg:O,k2:z}=B(D),{p:H,f:Y}=w(S),{p:W,f:X}=w(z);g=Y.add(X),p=R(F.beta,H,W,T,O)}else{const{p:T,f:S}=w(D);p=T,g=S}return Sc(L,[p,g])[0]}multiplyUnsafe(D){const{endo:F}=e,p=this;if(!i.isValid(D))throw new Error("invalid scalar: out of range");if(D===Ss||p.is0())return L.ZERO;if(D===Zn)return p;if(K.hasCache(this))return this.multiply(D);if(F){const{k1neg:g,k1:w,k2neg:T,k2:S}=B(D),{p1:O,p2:z}=r7(L,p,w,S);return R(F.beta,O,z,g,T)}else return K.unsafe(p,D)}multiplyAndAddUnsafe(D,F,p){const g=this.multiplyUnsafe(F).add(D.multiplyUnsafe(p));return g.is0()?void 0:g}toAffine(D){return P(this,D)}isTorsionFree(){const{isTorsionFree:D}=e;return a===Zn?!0:D?D(L,this):K.unsafe(this,r).is0()}clearCofactor(){const{clearCofactor:D}=e;return a===Zn?this:D?D(L,this):this.multiplyUnsafe(a)}isSmallOrder(){return this.multiplyUnsafe(a).is0()}toBytes(D=!0){return ca(D,"isCompressed"),this.assertValidity(),b(L,this,D)}toHex(D=!0){return Kn(this.toBytes(D))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(D=!0){return this.toBytes(D)}_setWindowSize(D){this.precompute(D)}static normalizeZ(D){return Sc(L,D)}static msm(D,F){return c7(L,i,D,F)}static fromPrivateKey(D){return L.BASE.multiply(Xn(i,D))}}L.BASE=new L(o.Gx,o.Gy,n.ONE),L.ZERO=new L(n.ZERO,n.ONE,n.ZERO),L.Fp=n,L.Fn=i;const q=i.BITS,K=new a7(L,e.endo?Math.ceil(q/2):q);return L.BASE.precompute(8),L}function Op(t){return Uint8Array.of(t?2:3)}function Pp(t,e){return{secretKey:e.BYTES,publicKey:1+t.BYTES,publicKeyUncompressed:1+2*t.BYTES,publicKeyHasPrefix:!0,signature:2*e.BYTES}}function k7(t,e={}){const{Fn:s}=t,n=e.randomBytes||xn,i=Object.assign(Pp(t.Fp,s),{seed:kp(s.ORDER)});function o(u){try{return!!Xn(s,u)}catch{return!1}}function a(u,b){const{publicKey:f,publicKeyUncompressed:y}=i;try{const C=u.length;return b===!0&&C!==f||b===!1&&C!==y?!1:!!t.fromBytes(u)}catch{return!1}}function r(u=n(i.seed)){return n7(kn(u,i.seed,"seed"),s.ORDER)}function c(u,b=!0){return t.BASE.multiply(Xn(s,u)).toBytes(b)}function l(u){const b=r(u);return{secretKey:b,publicKey:c(b)}}function d(u){if(typeof u=="bigint")return!1;if(u instanceof t)return!0;const{secretKey:b,publicKey:f,publicKeyUncompressed:y}=i;if(s.allowedLengths||b===f)return;const C=at("key",u).length;return C===f||C===y}function h(u,b,f=!0){if(d(u)===!0)throw new Error("first arg must be private key");if(d(b)===!1)throw new Error("second arg must be public key");const y=Xn(s,u);return t.fromHex(b).multiply(y).toBytes(f)}return Object.freeze({getPublicKey:c,getSharedSecret:h,keygen:l,Point:t,utils:{isValidSecretKey:o,isValidPublicKey:a,randomSecretKey:r,isValidPrivateKey:o,randomPrivateKey:r,normPrivateKeyToScalar:u=>Xn(s,u),precompute(u=8,b=t.BASE){return b.precompute(u,!1)}},lengths:i})}function C7(t,e,s={}){Jo(e),ua(s,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const n=s.randomBytes||xn,i=s.hmac||((F,...p)=>aa(e,F,Ws(...p))),{Fp:o,Fn:a}=t,{ORDER:r,BITS:c}=a,{keygen:l,getPublicKey:d,getSharedSecret:h,utils:u,lengths:b}=k7(t,s),f={prehash:!1,lowS:typeof s.lowS=="boolean"?s.lowS:!1,format:void 0,extraEntropy:!1},y="compact";function C(F){const p=r>>Zn;return F>p}function _(F,p){if(!a.isValidNot0(p))throw new Error(`invalid signature ${F}: out of range 1..Point.Fn.ORDER`);return p}function N(F,p){_c(p);const g=b.signature,w=p==="compact"?g:p==="recovered"?g+1:void 0;return kn(F,w,`${p} signature`)}class A{constructor(p,g,w){this.r=_("r",p),this.s=_("s",g),w!=null&&(this.recovery=w),Object.freeze(this)}static fromBytes(p,g=y){N(p,g);let w;if(g==="der"){const{r:z,s:H}=Ds.toSig(kn(p));return new A(z,H)}g==="recovered"&&(w=p[0],g="compact",p=p.subarray(1));const T=a.BYTES,S=p.subarray(0,T),O=p.subarray(T,T*2);return new A(a.fromBytes(S),a.fromBytes(O),w)}static fromHex(p,g){return this.fromBytes(ea(p),g)}addRecoveryBit(p){return new A(this.r,this.s,p)}recoverPublicKey(p){const g=o.ORDER,{r:w,s:T,recovery:S}=this;if(S==null||![0,1,2,3].includes(S))throw new Error("recovery id invalid");if(r*_p<g&&S>1)throw new Error("recovery id is ambiguous for h>1 curve");const O=S===2||S===3?w+r:w;if(!o.isValid(O))throw new Error("recovery id 2 or 3 invalid");const z=o.toBytes(O),H=t.fromBytes(Ws(Op((S&1)===0),z)),Y=a.inv(O),W=B(at("msgHash",p)),X=a.create(-W*Y),ee=a.create(T*Y),ie=t.BASE.multiplyUnsafe(X).add(H.multiplyUnsafe(ee));if(ie.is0())throw new Error("point at infinify");return ie.assertValidity(),ie}hasHighS(){return C(this.s)}toBytes(p=y){if(_c(p),p==="der")return ea(Ds.hexFromSig(this));const g=a.toBytes(this.r),w=a.toBytes(this.s);if(p==="recovered"){if(this.recovery==null)throw new Error("recovery bit must be present");return Ws(Uint8Array.of(this.recovery),g,w)}return Ws(g,w)}toHex(p){return Kn(this.toBytes(p))}assertValidity(){}static fromCompact(p){return A.fromBytes(at("sig",p),"compact")}static fromDER(p){return A.fromBytes(at("sig",p),"der")}normalizeS(){return this.hasHighS()?new A(this.r,a.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return Kn(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return Kn(this.toBytes("compact"))}}const E=s.bits2int||function(F){if(F.length>8192)throw new Error("input is too large");const p=da(F),g=F.length*8-c;return g>0?p>>BigInt(g):p},B=s.bits2int_modN||function(F){return a.create(E(F))},P=Mi(c);function M(F){return Ac("num < 2^"+c,F,Ss,P),a.toBytes(F)}function R(F,p){return kn(F,void 0,"message"),p?kn(e(F),void 0,"prehashed message"):F}function L(F,p,g){if(["recovered","canonical"].some(ee=>ee in g))throw new Error("sign() legacy options not supported");const{lowS:w,prehash:T,extraEntropy:S}=Oc(g,f);F=R(F,T);const O=B(F),z=Xn(a,p),H=[M(z),M(O)];if(S!=null&&S!==!1){const ee=S===!0?n(b.secretKey):S;H.push(at("extraEntropy",ee))}const Y=Ws(...H),W=O;function X(ee){const ie=E(ee);if(!a.isValidNot0(ie))return;const he=a.inv(ie),ce=t.BASE.multiply(ie).toAffine(),se=a.create(ce.x);if(se===Ss)return;const I=a.create(he*a.create(W+se*z));if(I===Ss)return;let m=(ce.x===se?0:2)|Number(ce.y&Zn),v=I;return w&&C(I)&&(v=a.neg(I),m^=1),new A(se,v,m)}return{seed:Y,k2sig:X}}function q(F,p,g={}){F=at("message",F);const{seed:w,k2sig:T}=L(F,p,g);return G9(e.outputLen,a.BYTES,i)(w,T)}function K(F){let p;const g=typeof F=="string"||Qo(F),w=!g&&F!==null&&typeof F=="object"&&typeof F.r=="bigint"&&typeof F.s=="bigint";if(!g&&!w)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(w)p=new A(F.r,F.s);else if(g){try{p=A.fromBytes(at("sig",F),"der")}catch(T){if(!(T instanceof Ds.Err))throw T}if(!p)try{p=A.fromBytes(at("sig",F),"compact")}catch{return!1}}return p||!1}function j(F,p,g,w={}){const{lowS:T,prehash:S,format:O}=Oc(w,f);if(g=at("publicKey",g),p=R(at("message",p),S),"strict"in w)throw new Error("options.strict was renamed to lowS");const z=O===void 0?K(F):A.fromBytes(at("sig",F),O);if(z===!1)return!1;try{const H=t.fromBytes(g);if(T&&z.hasHighS())return!1;const{r:Y,s:W}=z,X=B(p),ee=a.inv(W),ie=a.create(X*ee),he=a.create(Y*ee),ce=t.BASE.multiplyUnsafe(ie).add(H.multiplyUnsafe(he));return ce.is0()?!1:a.create(ce.x)===Y}catch{return!1}}function D(F,p,g={}){const{prehash:w}=Oc(g,f);return p=R(p,w),A.fromBytes(F,"recovered").recoverPublicKey(p).toBytes()}return Object.freeze({keygen:l,getPublicKey:d,getSharedSecret:h,utils:u,lengths:b,Point:t,sign:q,verify:j,recoverPublicKey:D,Signature:A,hash:e})}function A7(t){const e={a:t.a,b:t.b,p:t.Fp.ORDER,n:t.n,h:t.h,Gx:t.Gx,Gy:t.Gy},s=t.Fp;let n=t.allowedPrivateKeyLengths?Array.from(new Set(t.allowedPrivateKeyLengths.map(a=>Math.ceil(a/2)))):void 0;const i=tn(e.n,{BITS:t.nBitLength,allowedLengths:n,modFromBytes:t.wrapPrivateKey}),o={Fp:s,Fn:i,allowInfinityPoint:t.allowInfinityPoint,endo:t.endo,isTorsionFree:t.isTorsionFree,clearCofactor:t.clearCofactor,fromBytes:t.fromBytes,toBytes:t.toBytes};return{CURVE:e,curveOpts:o}}function D7(t){const{CURVE:e,curveOpts:s}=A7(t),n={hmac:t.hmac,randomBytes:t.randomBytes,lowS:t.lowS,bits2int:t.bits2int,bits2int_modN:t.bits2int_modN};return{CURVE:e,curveOpts:s,hash:t.hash,ecdsaOpts:n}}function S7(t,e){const s=e.Point;return Object.assign({},e,{ProjectivePoint:s,CURVE:Object.assign({},t,xp(s.Fn.ORDER,s.Fn.BITS))})}function B7(t){const{CURVE:e,curveOpts:s,hash:n,ecdsaOpts:i}=D7(t),o=E7(e,s),a=C7(o,n,i);return S7(t,a)}function Pc(t,e){const s=n=>B7({...t,hash:n});return{...s(e),create:s}}const Rp={p:BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),h:BigInt(1),a:BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")},Up={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),h:BigInt(1),a:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),b:BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")},Np={p:BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),h:BigInt(1),a:BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),b:BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")},T7=tn(Rp.p),F7=tn(Up.p),I7=tn(Np.p),_7=Pc({...Rp,Fp:T7,lowS:!1},sa);Pc({...Up,Fp:F7,lowS:!1},$v),Pc({...Np,Fp:I7,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},Lv);const O7=_7,Lp="base10",ut="base16",kt="base64pad",sn="base64url",ji="utf8",$p=0,Bs=1,qi=2,P7=0,Mp=1,Hi=12,Rc=32;function R7(){const t=Ic.utils.randomPrivateKey(),e=Ic.getPublicKey(t);return{privateKey:vt(t,ut),publicKey:vt(e,ut)}}function Uc(){const t=xn(Rc);return vt(t,ut)}function U7(t,e){const s=Ic.getSharedSecret(Rt(t,ut),Rt(e,ut)),n=K9(ra,s,void 0,void 0,Rc);return vt(n,ut)}function ga(t){const e=ra(Rt(t,ut));return vt(e,ut)}function Nt(t){const e=ra(Rt(t,ji));return vt(e,ut)}function zp(t){return Rt(`${t}`,Lp)}function Dn(t){return Number(vt(t,Lp))}function jp(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function qp(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),s=(4-e.length%4)%4;return e+"=".repeat(s)}function N7(t){const e=zp(typeof t.type<"u"?t.type:$p);if(Dn(e)===Bs&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const s=typeof t.senderPublicKey<"u"?Rt(t.senderPublicKey,ut):void 0,n=typeof t.iv<"u"?Rt(t.iv,ut):xn(Hi),i=Rt(t.symKey,ut),o=op(i,n).encrypt(Rt(t.message,ji)),a=Hp({type:e,sealed:o,iv:n,senderPublicKey:s});return t.encoding===sn?jp(a):a}function L7(t){const e=Rt(t.symKey,ut),{sealed:s,iv:n}=Vi({encoded:t.encoded,encoding:t.encoding}),i=op(e,n).decrypt(s);if(i===null)throw new Error("Failed to decrypt");return vt(i,ji)}function $7(t,e){const s=zp(qi),n=xn(Hi),i=Rt(t,ji),o=Hp({type:s,sealed:i,iv:n});return e===sn?jp(o):o}function M7(t,e){const{sealed:s}=Vi({encoded:t,encoding:e});return vt(s,ji)}function Hp(t){if(Dn(t.type)===qi)return vt(Ii([t.type,t.sealed]),kt);if(Dn(t.type)===Bs){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return vt(Ii([t.type,t.senderPublicKey,t.iv,t.sealed]),kt)}return vt(Ii([t.type,t.iv,t.sealed]),kt)}function Vi(t){const e=(t.encoding||kt)===sn?qp(t.encoded):t.encoded,s=Rt(e,kt),n=s.slice(P7,Mp),i=Mp;if(Dn(n)===Bs){const c=i+Rc,l=c+Hi,d=s.slice(i,c),h=s.slice(c,l),u=s.slice(l);return{type:n,sealed:u,iv:h,senderPublicKey:d}}if(Dn(n)===qi){const c=s.slice(i),l=xn(Hi);return{type:n,sealed:c,iv:l}}const o=i+Hi,a=s.slice(i,o),r=s.slice(o);return{type:n,sealed:r,iv:a}}function z7(t,e){const s=Vi({encoded:t,encoding:e==null?void 0:e.encoding});return Vp({type:Dn(s.type),senderPublicKey:typeof s.senderPublicKey<"u"?vt(s.senderPublicKey,ut):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function Vp(t){const e=(t==null?void 0:t.type)||$p;if(e===Bs){if(typeof(t==null?void 0:t.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(t==null?void 0:t.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t==null?void 0:t.senderPublicKey,receiverPublicKey:t==null?void 0:t.receiverPublicKey}}function Kp(t){return t.type===Bs&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}function Wp(t){return t.type===qi}function j7(t){const e=Buffer.from(t.x,"base64"),s=Buffer.from(t.y,"base64");return Ii([new Uint8Array([4]),e,s])}function q7(t,e){const[s,n,i]=t.split("."),o=Buffer.from(qp(i),"base64");if(o.length!==64)throw new Error("Invalid signature length");const a=o.slice(0,32),r=o.slice(32,64),c=`${s}.${n}`,l=ra(c),d=j7(e);if(!O7.verify(Ii([a,r]),l,d))throw new Error("Invalid signature");return wr(t).payload}const H7="irn";function ba(t){return(t==null?void 0:t.relay)||{protocol:H7}}function Qn(t){const e=S4[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var V7=Object.defineProperty,K7=Object.defineProperties,W7=Object.getOwnPropertyDescriptors,Gp=Object.getOwnPropertySymbols,G7=Object.prototype.hasOwnProperty,Y7=Object.prototype.propertyIsEnumerable,Yp=(t,e,s)=>e in t?V7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Nc=(t,e)=>{for(var s in e||(e={}))G7.call(e,s)&&Yp(t,s,e[s]);if(Gp)for(var s of Gp(e))Y7.call(e,s)&&Yp(t,s,e[s]);return t},Z7=(t,e)=>K7(t,W7(e));function X7(t,e="-"){const s={},n="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(n)){const o=i.replace(n,""),a=t[i];s[o]=a}}),s}function Zp(t){if(!t.includes("wc:")){const l=xf(t);l!=null&&l.includes("wc:")&&(t=l)}t=t.includes("wc://")?t.replace("wc://",""):t,t=t.includes("wc:")?t.replace("wc:",""):t;const e=t.indexOf(":"),s=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),i=t.substring(e+1,s).split("@"),o=typeof s<"u"?t.substring(s):"",a=new URLSearchParams(o),r=Object.fromEntries(a.entries()),c=typeof r.methods=="string"?r.methods.split(","):void 0;return{protocol:n,topic:Q7(i[0]),version:parseInt(i[1],10),symKey:r.symKey,relay:X7(r),methods:c,expiryTimestamp:r.expiryTimestamp?parseInt(r.expiryTimestamp,10):void 0}}function Q7(t){return t.startsWith("//")?t.substring(2):t}function J7(t,e="-"){const s="relay",n={};return Object.keys(t).forEach(i=>{const o=i,a=s+e+o;t[o]&&(n[a]=t[o])}),n}function Xp(t){const e=new URLSearchParams,s=Nc(Nc(Z7(Nc({},J7(t.relay)),{symKey:t.symKey}),t.expiryTimestamp&&{expiryTimestamp:t.expiryTimestamp.toString()}),t.methods&&{methods:t.methods.join(",")});return Object.entries(s).sort(([n],[i])=>n.localeCompare(i)).forEach(([n,i])=>{i!==void 0&&e.append(n,String(i))}),`${t.protocol}:${t.topic}@${t.version}?${e}`}function ya(t,e,s){return`${t}?wc_ev=${s}&topic=${e}`}var ex=Object.defineProperty,tx=Object.defineProperties,sx=Object.getOwnPropertyDescriptors,Qp=Object.getOwnPropertySymbols,nx=Object.prototype.hasOwnProperty,ix=Object.prototype.propertyIsEnumerable,Jp=(t,e,s)=>e in t?ex(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,ox=(t,e)=>{for(var s in e||(e={}))nx.call(e,s)&&Jp(t,s,e[s]);if(Qp)for(var s of Qp(e))ix.call(e,s)&&Jp(t,s,e[s]);return t},ax=(t,e)=>tx(t,sx(e));function Jn(t){const e=[];return t.forEach(s=>{const[n,i]=s.split(":");e.push(`${n}:${i}`)}),e}function rx(t){const e=[];return Object.values(t).forEach(s=>{e.push(...Jn(s.accounts))}),e}function cx(t,e){const s=[];return Object.values(t).forEach(n=>{Jn(n.accounts).includes(e)&&s.push(...n.methods)}),s}function lx(t,e){const s=[];return Object.values(t).forEach(n=>{Jn(n.accounts).includes(e)&&s.push(...n.events)}),s}function em(t){return t.includes(":")}function dx(t){return em(t)?t.split(":")[0]:t}function tm(t){var e,s,n;const i={};if(!Ki(t))return i;for(const[o,a]of Object.entries(t)){const r=em(o)?[o]:a.chains,c=a.methods||[],l=a.events||[],d=dx(o);i[d]=ax(ox({},i[d]),{chains:vn(r,(e=i[d])==null?void 0:e.chains),methods:vn(c,(s=i[d])==null?void 0:s.methods),events:vn(l,(n=i[d])==null?void 0:n.events)})}return i}function hx(t){const e={};return t==null||t.forEach(s=>{var n;const[i,o]=s.split(":");e[i]||(e[i]={accounts:[],chains:[],events:[],methods:[]}),e[i].accounts.push(s),(n=e[i].chains)==null||n.push(`${i}:${o}`)}),e}function sm(t,e){e=e.map(n=>n.replace("did:pkh:",""));const s=hx(e);for(const[n,i]of Object.entries(s))i.methods?i.methods=vn(i.methods,t):i.methods=t,i.events=["chainChanged","accountsChanged"];return s}function ux(t,e){var s,n,i,o,a,r;const c=tm(t),l=tm(e),d={},h=Object.keys(c).concat(Object.keys(l));for(const u of h)d[u]={chains:vn((s=c[u])==null?void 0:s.chains,(n=l[u])==null?void 0:n.chains),methods:vn((i=c[u])==null?void 0:i.methods,(o=l[u])==null?void 0:o.methods),events:vn((a=c[u])==null?void 0:a.events,(r=l[u])==null?void 0:r.events)};return d}const fx={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},px={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function oe(t,e){const{message:s,code:n}=px[t];return{message:e?`${s} ${e}`:s,code:n}}function _e(t,e){const{message:s,code:n}=fx[t];return{message:e?`${s} ${e}`:s,code:n}}function ei(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function Ki(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function je(t){return typeof t>"u"}function Ne(t,e){return e&&je(t)?!0:typeof t=="string"&&!!t.trim().length}function Lc(t,e){return e&&je(t)?!0:typeof t=="number"&&!isNaN(t)}function mx(t,e){const{requiredNamespaces:s}=e,n=Object.keys(t.namespaces),i=Object.keys(s);let o=!0;return yn(i,n)?(n.forEach(a=>{const{accounts:r,methods:c,events:l}=t.namespaces[a],d=Jn(r),h=s[a];(!yn(df(a,h),d)||!yn(h.methods,c)||!yn(h.events,l))&&(o=!1)}),o):!1}function wa(t){return Ne(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function gx(t){if(Ne(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const s=e[0]+":"+e[1];return!!e[2]&&wa(s)}}return!1}function bx(t){function e(s){try{return typeof new URL(s)<"u"}catch{return!1}}try{if(Ne(t,!1)){if(e(t))return!0;const s=xf(t);return e(s)}}catch{}return!1}function yx(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function wx(t){return t==null?void 0:t.topic}function vx(t,e){let s=null;return Ne(t==null?void 0:t.publicKey,!1)||(s=oe("MISSING_OR_INVALID",`${e} controller public key should be a string`)),s}function nm(t){let e=!0;return ei(t)?t.length&&(e=t.every(s=>Ne(s,!1))):e=!1,e}function xx(t,e,s){let n=null;return ei(e)&&e.length?e.forEach(i=>{n||wa(i)||(n=_e("UNSUPPORTED_CHAINS",`${s}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):wa(t)||(n=_e("UNSUPPORTED_CHAINS",`${s}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function Ex(t,e,s){let n=null;return Object.entries(t).forEach(([i,o])=>{if(n)return;const a=xx(i,df(i,o),`${e} ${s}`);a&&(n=a)}),n}function kx(t,e){let s=null;return ei(t)?t.forEach(n=>{s||gx(n)||(s=_e("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):s=_e("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),s}function Cx(t,e){let s=null;return Object.values(t).forEach(n=>{if(s)return;const i=kx(n==null?void 0:n.accounts,`${e} namespace`);i&&(s=i)}),s}function Ax(t,e){let s=null;return nm(t==null?void 0:t.methods)?nm(t==null?void 0:t.events)||(s=_e("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):s=_e("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),s}function im(t,e){let s=null;return Object.values(t).forEach(n=>{if(s)return;const i=Ax(n,`${e}, namespace`);i&&(s=i)}),s}function Dx(t,e,s){let n=null;if(t&&Ki(t)){const i=im(t,e);i&&(n=i);const o=Ex(t,e,s);o&&(n=o)}else n=oe("MISSING_OR_INVALID",`${e}, ${s} should be an object with data`);return n}function $c(t,e){let s=null;if(t&&Ki(t)){const n=im(t,e);n&&(s=n);const i=Cx(t,e);i&&(s=i)}else s=oe("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return s}function om(t){return Ne(t.protocol,!0)}function Sx(t,e){let s=!1;return t?t&&ei(t)&&t.length&&t.forEach(n=>{s=om(n)}):s=!0,s}function Bx(t){return typeof t=="number"}function Ct(t){return typeof t<"u"&&typeof t!==null}function Tx(t){return!(!t||typeof t!="object"||!t.code||!Lc(t.code,!1)||!t.message||!Ne(t.message,!1))}function Fx(t){return!(je(t)||!Ne(t.method,!1))}function Ix(t){return!(je(t)||je(t.result)&&je(t.error)||!Lc(t.id,!1)||!Ne(t.jsonrpc,!1))}function _x(t){return!(je(t)||!Ne(t.name,!1))}function am(t,e){return!(!wa(e)||!rx(t).includes(e))}function Ox(t,e,s){return Ne(s,!1)?cx(t,e).includes(s):!1}function Px(t,e,s){return Ne(s,!1)?lx(t,e).includes(s):!1}function rm(t,e,s){let n=null;const i=Rx(t),o=Ux(e),a=Object.keys(i),r=Object.keys(o),c=cm(Object.keys(t)),l=cm(Object.keys(e)),d=c.filter(h=>!l.includes(h));return d.length&&(n=oe("NON_CONFORMING_NAMESPACES",`${s} namespaces keys don't satisfy requiredNamespaces.
|
|
857
|
+
Required: ${d.toString()}
|
|
858
|
+
Received: ${Object.keys(e).toString()}`)),yn(a,r)||(n=oe("NON_CONFORMING_NAMESPACES",`${s} namespaces chains don't satisfy required namespaces.
|
|
859
|
+
Required: ${a.toString()}
|
|
860
|
+
Approved: ${r.toString()}`)),Object.keys(e).forEach(h=>{if(!h.includes(":")||n)return;const u=Jn(e[h].accounts);u.includes(h)||(n=oe("NON_CONFORMING_NAMESPACES",`${s} namespaces accounts don't satisfy namespace accounts for ${h}
|
|
861
|
+
Required: ${h}
|
|
862
|
+
Approved: ${u.toString()}`))}),a.forEach(h=>{n||(yn(i[h].methods,o[h].methods)?yn(i[h].events,o[h].events)||(n=oe("NON_CONFORMING_NAMESPACES",`${s} namespaces events don't satisfy namespace events for ${h}`)):n=oe("NON_CONFORMING_NAMESPACES",`${s} namespaces methods don't satisfy namespace methods for ${h}`))}),n}function Rx(t){const e={};return Object.keys(t).forEach(s=>{var n;s.includes(":")?e[s]=t[s]:(n=t[s].chains)==null||n.forEach(i=>{e[i]={methods:t[s].methods,events:t[s].events}})}),e}function cm(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function Ux(t){const e={};return Object.keys(t).forEach(s=>{if(s.includes(":"))e[s]=t[s];else{const n=Jn(t[s].accounts);n==null||n.forEach(i=>{e[i]={accounts:t[s].accounts.filter(o=>o.includes(`${i}:`)),methods:t[s].methods,events:t[s].events}})}}),e}function Nx(t,e){return Lc(t,!1)&&t<=e.max&&t>=e.min}function lm(){const t=Oi();return new Promise(e=>{switch(t){case Bt.browser:e(Lx());break;case Bt.reactNative:e($x());break;case Bt.node:e(Mx());break;default:e(!0)}})}function Lx(){return Hn()&&(navigator==null?void 0:navigator.onLine)}async function $x(){if(zs()&&typeof global<"u"&&global!=null&&global.NetInfo){const t=await(global==null?void 0:global.NetInfo.fetch());return t==null?void 0:t.isConnected}return!0}function Mx(){return!0}function zx(t){switch(Oi()){case Bt.browser:jx(t);break;case Bt.reactNative:qx(t);break}}function jx(t){!zs()&&Hn()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}function qx(t){zs()&&typeof global<"u"&&global!=null&&global.NetInfo&&(global==null||global.NetInfo.addEventListener(e=>t(e==null?void 0:e.isConnected)))}function Hx(){var t;return Hn()&&bs.getDocument()?((t=bs.getDocument())==null?void 0:t.visibilityState)==="visible":!0}const Mc={};class Wi{static get(e){return Mc[e]}static set(e,s){Mc[e]=s}static delete(e){delete Mc[e]}}function Vx(t){const e=Si.decode(t);if(e.length<33)throw new Error("Too short to contain a public key");return e.slice(1,33)}function Kx({publicKey:t,signature:e,payload:s}){var n;const i=zc(s.method),o=128|parseInt(((n=s.version)==null?void 0:n.toString())||"4"),a=Yx(s.address),r=s.era==="00"?new Uint8Array([0]):zc(s.era);if(r.length!==1&&r.length!==2)throw new Error("Invalid era length");const c=parseInt(s.nonce,16),l=new Uint8Array([c&255,c>>8&255]),d=BigInt(`0x${Gx(s.tip)}`),h=Xx(d),u=new Uint8Array([0,...t,a,...e,...r,...l,...h,...i]),b=Zx(u.length+1);return new Uint8Array([...b,o,...u])}function Wx(t){const e=zc(t),s=I4.blake2b(e,void 0,32);return"0x"+Buffer.from(s).toString("hex")}function zc(t){return new Uint8Array(t.replace(/^0x/,"").match(/.{1,2}/g).map(e=>parseInt(e,16)))}function Gx(t){return t.startsWith("0x")?t.slice(2):t}function Yx(t){const e=Si.decode(t)[0];return e===42?0:e===60?2:1}function Zx(t){if(t<64)return new Uint8Array([t<<2]);if(t<16384){const e=t<<2|1;return new Uint8Array([e&255,e>>8&255])}else if(t<1<<30){const e=t<<2|2;return new Uint8Array([e&255,e>>8&255,e>>16&255,e>>24&255])}else throw new Error("Compact encoding > 2^30 not supported")}function Xx(t){if(t<BigInt(1)<<BigInt(6))return new Uint8Array([Number(t<<BigInt(2))]);if(t<BigInt(1)<<BigInt(14)){const e=t<<BigInt(2)|BigInt(1);return new Uint8Array([Number(e&BigInt(255)),Number(e>>BigInt(8)&BigInt(255))])}else if(t<BigInt(1)<<BigInt(30)){const e=t<<BigInt(2)|BigInt(2);return new Uint8Array([Number(e&BigInt(255)),Number(e>>BigInt(8)&BigInt(255)),Number(e>>BigInt(16)&BigInt(255)),Number(e>>BigInt(24)&BigInt(255))])}else throw new Error("BigInt compact encoding not supported > 2^30")}function Qx(t){const e=Uint8Array.from(Buffer.from(t.signature,"hex")),s=Vx(t.transaction.address),n=Kx({publicKey:s,signature:e,payload:t.transaction}),i=Buffer.from(n).toString("hex");return Wx(i)}function dm({logger:t,name:e}){const s=typeof t=="string"?zd({opts:{level:t,name:e}}).logger:t;return s.level=typeof t=="string"?t:t.level,s}const Jx="PARSE_ERROR",eE="INVALID_REQUEST",tE="METHOD_NOT_FOUND",sE="INVALID_PARAMS",hm="INTERNAL_ERROR",jc="SERVER_ERROR",nE=[-32700,-32600,-32601,-32602,-32603],Gi={[Jx]:{code:-32700,message:"Parse error"},[eE]:{code:-32600,message:"Invalid Request"},[tE]:{code:-32601,message:"Method not found"},[sE]:{code:-32602,message:"Invalid params"},[hm]:{code:-32603,message:"Internal error"},[jc]:{code:-32e3,message:"Server error"}},um=jc;function iE(t){return nE.includes(t)}function fm(t){return Object.keys(Gi).includes(t)?Gi[t]:Gi[um]}function oE(t){const e=Object.values(Gi).find(s=>s.code===t);return e||Gi[um]}function aE(t,e,s){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${s} RPC url at ${e}`):t}var qc={};/*! *****************************************************************************
|
|
863
|
+
Copyright (c) Microsoft Corporation.
|
|
864
|
+
|
|
865
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
866
|
+
purpose with or without fee is hereby granted.
|
|
867
|
+
|
|
868
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
869
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
870
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
871
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
872
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
873
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
874
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
875
|
+
***************************************************************************** */var Hc=function(t,e){return Hc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,n){s.__proto__=n}||function(s,n){for(var i in n)n.hasOwnProperty(i)&&(s[i]=n[i])},Hc(t,e)};function rE(t,e){Hc(t,e);function s(){this.constructor=t}t.prototype=e===null?Object.create(e):(s.prototype=e.prototype,new s)}var Vc=function(){return Vc=Object.assign||function(e){for(var s,n=1,i=arguments.length;n<i;n++){s=arguments[n];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},Vc.apply(this,arguments)};function cE(t,e){var s={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(s[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(s[n[i]]=t[n[i]]);return s}function lE(t,e,s,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,s):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,s,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(i<3?a(o):i>3?a(e,s,o):a(e,s))||o);return i>3&&o&&Object.defineProperty(e,s,o),o}function dE(t,e){return function(s,n){e(s,n,t)}}function hE(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function uE(t,e,s,n){function i(o){return o instanceof s?o:new s(function(a){a(o)})}return new(s||(s=Promise))(function(o,a){function r(d){try{l(n.next(d))}catch(h){a(h)}}function c(d){try{l(n.throw(d))}catch(h){a(h)}}function l(d){d.done?o(d.value):i(d.value).then(r,c)}l((n=n.apply(t,e||[])).next())})}function fE(t,e){var s={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(l){return function(d){return c([l,d])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return s.label++,{value:l[1],done:!1};case 5:s.label++,i=l[1],l=[0];continue;case 7:l=s.ops.pop(),s.trys.pop();continue;default:if(o=s.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){s=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){s.label=l[1];break}if(l[0]===6&&s.label<o[1]){s.label=o[1],o=l;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(l);break}o[2]&&s.ops.pop(),s.trys.pop();continue}l=e.call(t,s)}catch(d){l=[6,d],i=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function pE(t,e,s,n){n===void 0&&(n=s),t[n]=e[s]}function mE(t,e){for(var s in t)s!=="default"&&!e.hasOwnProperty(s)&&(e[s]=t[s])}function Kc(t){var e=typeof Symbol=="function"&&Symbol.iterator,s=e&&t[e],n=0;if(s)return s.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function pm(t,e){var s=typeof Symbol=="function"&&t[Symbol.iterator];if(!s)return t;var n=s.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(r){a={error:r}}finally{try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}}return o}function gE(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(pm(arguments[e]));return t}function bE(){for(var t=0,e=0,s=arguments.length;e<s;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<s;e++)for(var o=arguments[e],a=0,r=o.length;a<r;a++,i++)n[i]=o[a];return n}function Yi(t){return this instanceof Yi?(this.v=t,this):new Yi(t)}function yE(t,e,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=s.apply(t,e||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(u){n[u]&&(i[u]=function(b){return new Promise(function(f,y){o.push([u,b,f,y])>1||r(u,b)})})}function r(u,b){try{c(n[u](b))}catch(f){h(o[0][3],f)}}function c(u){u.value instanceof Yi?Promise.resolve(u.value.v).then(l,d):h(o[0][2],u)}function l(u){r("next",u)}function d(u){r("throw",u)}function h(u,b){u(b),o.shift(),o.length&&r(o[0][0],o[0][1])}}function wE(t){var e,s;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,o){e[i]=t[i]?function(a){return(s=!s)?{value:Yi(t[i](a)),done:i==="return"}:o?o(a):a}:o}}function vE(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],s;return e?e.call(t):(t=typeof Kc=="function"?Kc(t):t[Symbol.iterator](),s={},n("next"),n("throw"),n("return"),s[Symbol.asyncIterator]=function(){return this},s);function n(o){s[o]=t[o]&&function(a){return new Promise(function(r,c){a=t[o](a),i(r,c,a.done,a.value)})}}function i(o,a,r,c){Promise.resolve(c).then(function(l){o({value:l,done:r})},a)}}function xE(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function EE(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)Object.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e.default=t,e}function kE(t){return t&&t.__esModule?t:{default:t}}function CE(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function AE(t,e,s){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,s),s}const DE=Yl(Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return Vc},__asyncDelegator:wE,__asyncGenerator:yE,__asyncValues:vE,__await:Yi,__awaiter:uE,__classPrivateFieldGet:CE,__classPrivateFieldSet:AE,__createBinding:pE,__decorate:lE,__exportStar:mE,__extends:rE,__generator:fE,__importDefault:kE,__importStar:EE,__makeTemplateObject:xE,__metadata:hE,__param:dE,__read:pm,__rest:cE,__spread:gE,__spreadArrays:bE,__values:Kc},Symbol.toStringTag,{value:"Module"})));var Ts={},mm;function SE(){if(mm)return Ts;mm=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.isBrowserCryptoAvailable=Ts.getSubtleCrypto=Ts.getBrowerCrypto=void 0;function t(){return(_n==null?void 0:_n.crypto)||(_n==null?void 0:_n.msCrypto)||{}}Ts.getBrowerCrypto=t;function e(){const n=t();return n.subtle||n.webkitSubtle}Ts.getSubtleCrypto=e;function s(){return!!t()&&!!e()}return Ts.isBrowserCryptoAvailable=s,Ts}var Fs={},gm;function BE(){if(gm)return Fs;gm=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.isBrowser=Fs.isNode=Fs.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}Fs.isReactNative=t;function e(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Fs.isNode=e;function s(){return!t()&&!e()}return Fs.isBrowser=s,Fs}var bm;function TE(){return bm||(bm=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=DE;e.__exportStar(SE(),t),e.__exportStar(BE(),t)})(qc)),qc}var FE=TE();function is(t=3){const e=Date.now()*Math.pow(10,t),s=Math.floor(Math.random()*Math.pow(10,t));return e+s}function nn(t=6){return BigInt(is(t))}function Is(t,e,s){return{id:s||is(),jsonrpc:"2.0",method:t,params:e}}function va(t,e){return{id:t,jsonrpc:"2.0",result:e}}function Wc(t,e,s){return{id:t,jsonrpc:"2.0",error:IE(e)}}function IE(t,e){return typeof t>"u"?fm(hm):(typeof t=="string"&&(t=Object.assign(Object.assign({},fm(jc)),{message:t})),iE(t.code)&&(t=oE(t.code)),t)}class _E{}class OE extends _E{constructor(){super()}}class PE extends OE{constructor(e){super()}}const RE="^wss?:";function UE(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function NE(t,e){const s=UE(t);return typeof s>"u"?!1:new RegExp(e).test(s)}function ym(t){return NE(t,RE)}function LE(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function wm(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function Gc(t){return wm(t)&&"method"in t}function xa(t){return wm(t)&&(os(t)||Lt(t))}function os(t){return"result"in t}function Lt(t){return"error"in t}class $E extends PE{constructor(e){super(e),this.events=new Kt.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,s){this.events.on(e,s)}once(e,s){this.events.once(e,s)}off(e,s){this.events.off(e,s)}removeListener(e,s){this.events.removeListener(e,s)}async request(e,s){return this.requestStrict(Is(e.method,e.params||[],e.id||nn().toString()),s)}async requestStrict(e,s){return new Promise(async(n,i)=>{if(!this.connection.connected)try{await this.open()}catch(o){i(o)}this.events.on(`${e.id}`,o=>{Lt(o)?i(o.error):n(o.result)});try{await this.connection.send(e,s)}catch(o){i(o)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),xa(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const ME=()=>typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws"),zE=()=>typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",vm=t=>t.split("?")[0],xm=10,jE=ME();let qE=class{constructor(e){if(this.url=e,this.events=new Kt.EventEmitter,this.registering=!1,!ym(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,s){this.events.on(e,s)}once(e,s){this.events.once(e,s)}off(e,s){this.events.off(e,s)}removeListener(e,s){this.events.removeListener(e,s)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,s)=>{if(typeof this.socket>"u"){s(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),e()},this.socket.close()})}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(fn(e))}catch(s){this.onError(e.id,s)}}register(e=this.url){if(!ym(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const s=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=s||this.events.listenerCount("open")>=s)&&this.events.setMaxListeners(s+1),new Promise((n,i)=>{this.events.once("register_error",o=>{this.resetMaxListeners(),i(o)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=e,this.registering=!0,new Promise((s,n)=>{const i=FE.isReactNative()?void 0:{rejectUnauthorized:!LE(e)},o=new jE(e,[],i);zE()?o.onerror=a=>{const r=a;n(this.emitError(r.error))}:o.on("error",a=>{n(this.emitError(a))}),o.onopen=()=>{this.onOpen(o),s(o)}})}onOpen(e){e.onmessage=s=>this.onPayload(s),e.onclose=s=>this.onClose(s),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const s=typeof e.data=="string"?Un(e.data):e.data;this.events.emit("payload",s)}onError(e,s){const n=this.parseError(s),i=n.message||n.toString(),o=Wc(e,i);this.events.emit("payload",o)}parseError(e,s=this.url){return aE(e,vm(s),"WS")}resetMaxListeners(){this.events.getMaxListeners()>xm&&this.events.setMaxListeners(xm)}emitError(e){const s=this.parseError(new Error((e==null?void 0:e.message)||`WebSocket connection failed for host: ${vm(this.url)}`));return this.events.emit("register_error",s),s}};const Em="wc",km=2,Yc="core",as=`${Em}@2:${Yc}:`,HE={logger:"error"},VE={database:":memory:"},KE="crypto",Cm="client_ed25519_seed",WE=re.ONE_DAY,GE="keychain",YE="0.3",ZE="messages",XE="0.3",QE=re.SIX_HOURS,JE="publisher",Am="irn",ek="error",Dm="wss://relay.walletconnect.org",tk="relayer",Re={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",transport_closed:"relayer_transport_closed",publish:"relayer_publish"},sk="_subscription",$t={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},nk=.1,Zc="2.22.3",Ie={link_mode:"link_mode",relay:"relay"},Ea={inbound:"inbound",outbound:"outbound"},ik="0.3",ok="WALLETCONNECT_CLIENT_ID",Sm="WALLETCONNECT_LINK_MODE_APPS",Ft={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},ak="subscription",rk="0.3",ck="pairing",lk="0.3",Zi={wc_pairingDelete:{req:{ttl:re.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:re.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:re.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:re.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:re.ONE_DAY,prompt:!1,tag:0},res:{ttl:re.ONE_DAY,prompt:!1,tag:0}}},Sn={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},Qt={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},dk="history",hk="0.3",uk="expirer",Mt={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},fk="0.3",pk="verify-api",mk="https://verify.walletconnect.com",Bm="https://verify.walletconnect.org",Xi=Bm,gk=`${Xi}/v3`,bk=[mk,Bm],yk="echo",wk="https://echo.walletconnect.com",rs={pairing_started:"pairing_started",pairing_uri_validation_success:"pairing_uri_validation_success",pairing_uri_not_expired:"pairing_uri_not_expired",store_new_pairing:"store_new_pairing",subscribing_pairing_topic:"subscribing_pairing_topic",subscribe_pairing_topic_success:"subscribe_pairing_topic_success",existing_pairing:"existing_pairing",pairing_not_expired:"pairing_not_expired",emit_inactive_pairing:"emit_inactive_pairing",emit_session_proposal:"emit_session_proposal",subscribing_to_pairing_topic:"subscribing_to_pairing_topic"},_s={no_wss_connection:"no_wss_connection",no_internet_connection:"no_internet_connection",malformed_pairing_uri:"malformed_pairing_uri",active_pairing_already_exists:"active_pairing_already_exists",subscribe_pairing_topic_failure:"subscribe_pairing_topic_failure",pairing_expired:"pairing_expired",proposal_expired:"proposal_expired",proposal_listener_not_found:"proposal_listener_not_found"},Jt={session_approve_started:"session_approve_started",proposal_not_expired:"proposal_not_expired",session_namespaces_validation_success:"session_namespaces_validation_success",create_session_topic:"create_session_topic",subscribing_session_topic:"subscribing_session_topic",subscribe_session_topic_success:"subscribe_session_topic_success",publishing_session_approve:"publishing_session_approve",session_approve_publish_success:"session_approve_publish_success",store_session:"store_session",publishing_session_settle:"publishing_session_settle",session_settle_publish_success:"session_settle_publish_success",session_request_response_started:"session_request_response_started",session_request_response_validation_success:"session_request_response_validation_success",session_request_response_publish_started:"session_request_response_publish_started"},Bn={no_internet_connection:"no_internet_connection",no_wss_connection:"no_wss_connection",proposal_expired:"proposal_expired",subscribe_session_topic_failure:"subscribe_session_topic_failure",session_approve_publish_failure:"session_approve_publish_failure",session_settle_publish_failure:"session_settle_publish_failure",session_approve_namespace_validation_failure:"session_approve_namespace_validation_failure",proposal_not_found:"proposal_not_found",session_request_response_validation_failure:"session_request_response_validation_failure",session_request_response_publish_failure:"session_request_response_publish_failure"},Tn={authenticated_session_approve_started:"authenticated_session_approve_started",create_authenticated_session_topic:"create_authenticated_session_topic",cacaos_verified:"cacaos_verified",store_authenticated_session:"store_authenticated_session",subscribing_authenticated_session_topic:"subscribing_authenticated_session_topic",subscribe_authenticated_session_topic_success:"subscribe_authenticated_session_topic_success",publishing_authenticated_session_approve:"publishing_authenticated_session_approve"},Qi={no_internet_connection:"no_internet_connection",invalid_cacao:"invalid_cacao",subscribe_authenticated_session_topic_failure:"subscribe_authenticated_session_topic_failure",authenticated_session_approve_publish_failure:"authenticated_session_approve_publish_failure",authenticated_session_pending_request_not_found:"authenticated_session_pending_request_not_found"},vk=.1,xk="event-client",Ek=86400,kk="https://pulse.walletconnect.org/batch";function Ck(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var s=new Uint8Array(256),n=0;n<s.length;n++)s[n]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),a=o.charCodeAt(0);if(s[a]!==255)throw new TypeError(o+" is ambiguous");s[a]=i}var r=t.length,c=t.charAt(0),l=Math.log(r)/Math.log(256),d=Math.log(256)/Math.log(r);function h(f){if(f instanceof Uint8Array||(ArrayBuffer.isView(f)?f=new Uint8Array(f.buffer,f.byteOffset,f.byteLength):Array.isArray(f)&&(f=Uint8Array.from(f))),!(f instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(f.length===0)return"";for(var y=0,C=0,_=0,N=f.length;_!==N&&f[_]===0;)_++,y++;for(var A=(N-_)*d+1>>>0,E=new Uint8Array(A);_!==N;){for(var B=f[_],P=0,M=A-1;(B!==0||P<C)&&M!==-1;M--,P++)B+=256*E[M]>>>0,E[M]=B%r>>>0,B=B/r>>>0;if(B!==0)throw new Error("Non-zero carry");C=P,_++}for(var R=A-C;R!==A&&E[R]===0;)R++;for(var L=c.repeat(y);R<A;++R)L+=t.charAt(E[R]);return L}function u(f){if(typeof f!="string")throw new TypeError("Expected String");if(f.length===0)return new Uint8Array;var y=0;if(f[y]!==" "){for(var C=0,_=0;f[y]===c;)C++,y++;for(var N=(f.length-y)*l+1>>>0,A=new Uint8Array(N);f[y];){var E=s[f.charCodeAt(y)];if(E===255)return;for(var B=0,P=N-1;(E!==0||B<_)&&P!==-1;P--,B++)E+=r*A[P]>>>0,A[P]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");_=B,y++}if(f[y]!==" "){for(var M=N-_;M!==N&&A[M]===0;)M++;for(var R=new Uint8Array(C+(N-M)),L=C;M!==N;)R[L++]=A[M++];return R}}}function b(f){var y=u(f);if(y)return y;throw new Error(`Non-${e} character`)}return{encode:h,decodeUnsafe:u,decode:b}}var Ak=Ck,Dk=Ak;const Tm=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},Sk=t=>new TextEncoder().encode(t),Bk=t=>new TextDecoder().decode(t);class Tk{constructor(e,s,n){this.name=e,this.prefix=s,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Fk{constructor(e,s,n){if(this.name=e,this.prefix=s,s.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=s.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return Fm(this,e)}}class Ik{constructor(e){this.decoders=e}or(e){return Fm(this,e)}decode(e){const s=e[0],n=this.decoders[s];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Fm=(t,e)=>new Ik({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class _k{constructor(e,s,n,i){this.name=e,this.prefix=s,this.baseEncode=n,this.baseDecode=i,this.encoder=new Tk(e,s,n),this.decoder=new Fk(e,s,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const ka=({name:t,prefix:e,encode:s,decode:n})=>new _k(t,e,s,n),Ji=({prefix:t,name:e,alphabet:s})=>{const{encode:n,decode:i}=Dk(s,e);return ka({prefix:t,name:e,encode:n,decode:o=>Tm(i(o))})},Ok=(t,e,s,n)=>{const i={};for(let d=0;d<e.length;++d)i[e[d]]=d;let o=t.length;for(;t[o-1]==="=";)--o;const a=new Uint8Array(o*s/8|0);let r=0,c=0,l=0;for(let d=0;d<o;++d){const h=i[t[d]];if(h===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<s|h,r+=s,r>=8&&(r-=8,a[l++]=255&c>>r)}if(r>=s||255&c<<8-r)throw new SyntaxError("Unexpected end of data");return a},Pk=(t,e,s)=>{const n=e[e.length-1]==="=",i=(1<<s)-1;let o="",a=0,r=0;for(let c=0;c<t.length;++c)for(r=r<<8|t[c],a+=8;a>s;)a-=s,o+=e[i&r>>a];if(a&&(o+=e[i&r<<s-a]),n)for(;o.length*s&7;)o+="=";return o},Je=({name:t,prefix:e,bitsPerChar:s,alphabet:n})=>ka({prefix:e,name:t,encode(i){return Pk(i,n,s)},decode(i){return Ok(i,n,s,t)}}),Rk=ka({prefix:"\0",name:"identity",encode:t=>Bk(t),decode:t=>Sk(t)});var Uk=Object.freeze({__proto__:null,identity:Rk});const Nk=Je({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Lk=Object.freeze({__proto__:null,base2:Nk});const $k=Je({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Mk=Object.freeze({__proto__:null,base8:$k});const zk=Ji({prefix:"9",name:"base10",alphabet:"0123456789"});var jk=Object.freeze({__proto__:null,base10:zk});const qk=Je({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Hk=Je({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Vk=Object.freeze({__proto__:null,base16:qk,base16upper:Hk});const Kk=Je({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Wk=Je({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Gk=Je({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Yk=Je({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Zk=Je({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Xk=Je({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Qk=Je({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Jk=Je({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),eC=Je({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var tC=Object.freeze({__proto__:null,base32:Kk,base32upper:Wk,base32pad:Gk,base32padupper:Yk,base32hex:Zk,base32hexupper:Xk,base32hexpad:Qk,base32hexpadupper:Jk,base32z:eC});const sC=Ji({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),nC=Ji({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var iC=Object.freeze({__proto__:null,base36:sC,base36upper:nC});const oC=Ji({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),aC=Ji({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var rC=Object.freeze({__proto__:null,base58btc:oC,base58flickr:aC});const cC=Je({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),lC=Je({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),dC=Je({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),hC=Je({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var uC=Object.freeze({__proto__:null,base64:cC,base64pad:lC,base64url:dC,base64urlpad:hC});const Im=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),fC=Im.reduce((t,e,s)=>(t[s]=e,t),[]),pC=Im.reduce((t,e,s)=>(t[e.codePointAt(0)]=s,t),[]);function mC(t){return t.reduce((e,s)=>(e+=fC[s],e),"")}function gC(t){const e=[];for(const s of t){const n=pC[s.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${s}`);e.push(n)}return new Uint8Array(e)}const bC=ka({prefix:"🚀",name:"base256emoji",encode:mC,decode:gC});var yC=Object.freeze({__proto__:null,base256emoji:bC}),wC=Om,_m=128,vC=-128,xC=Math.pow(2,31);function Om(t,e,s){e=e||[],s=s||0;for(var n=s;t>=xC;)e[s++]=t&255|_m,t/=128;for(;t&vC;)e[s++]=t&255|_m,t>>>=7;return e[s]=t|0,Om.bytes=s-n+1,e}var EC=Xc,kC=128,Pm=127;function Xc(t,n){var s=0,n=n||0,i=0,o=n,a,r=t.length;do{if(o>=r)throw Xc.bytes=0,new RangeError("Could not decode varint");a=t[o++],s+=i<28?(a&Pm)<<i:(a&Pm)*Math.pow(2,i),i+=7}while(a>=kC);return Xc.bytes=o-n,s}var CC=Math.pow(2,7),AC=Math.pow(2,14),DC=Math.pow(2,21),SC=Math.pow(2,28),BC=Math.pow(2,35),TC=Math.pow(2,42),FC=Math.pow(2,49),IC=Math.pow(2,56),_C=Math.pow(2,63),OC=function(t){return t<CC?1:t<AC?2:t<DC?3:t<SC?4:t<BC?5:t<TC?6:t<FC?7:t<IC?8:t<_C?9:10},PC={encode:wC,decode:EC,encodingLength:OC},Rm=PC;const Um=(t,e,s=0)=>(Rm.encode(t,e,s),e),Nm=t=>Rm.encodingLength(t),Qc=(t,e)=>{const s=e.byteLength,n=Nm(t),i=n+Nm(s),o=new Uint8Array(i+s);return Um(t,o,0),Um(s,o,n),o.set(e,i),new RC(t,s,e,o)};class RC{constructor(e,s,n,i){this.code=e,this.size=s,this.digest=n,this.bytes=i}}const Lm=({name:t,code:e,encode:s})=>new UC(t,e,s);class UC{constructor(e,s,n){this.name=e,this.code=s,this.encode=n}digest(e){if(e instanceof Uint8Array){const s=this.encode(e);return s instanceof Uint8Array?Qc(this.code,s):s.then(n=>Qc(this.code,n))}else throw Error("Unknown type, must be binary type")}}const $m=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),NC=Lm({name:"sha2-256",code:18,encode:$m("SHA-256")}),LC=Lm({name:"sha2-512",code:19,encode:$m("SHA-512")});var $C=Object.freeze({__proto__:null,sha256:NC,sha512:LC});const Mm=0,MC="identity",zm=Tm;var zC=Object.freeze({__proto__:null,identity:{code:Mm,name:MC,encode:zm,digest:t=>Qc(Mm,zm(t))}});new TextEncoder,new TextDecoder;const jm={...Uk,...Lk,...Mk,...jk,...Vk,...tC,...iC,...rC,...uC,...yC};({...$C,...zC});function qm(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function jC(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?qm(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function Hm(t,e,s,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:s},decoder:{decode:n}}}const Vm=Hm("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),Jc=Hm("ascii","a",t=>{let e="a";for(let s=0;s<t.length;s++)e+=String.fromCharCode(t[s]);return e},t=>{t=t.substring(1);const e=jC(t.length);for(let s=0;s<t.length;s++)e[s]=t.charCodeAt(s);return e}),qC={utf8:Vm,"utf-8":Vm,hex:jm.base16,latin1:Jc,ascii:Jc,binary:Jc,...jm};function HC(t,e="utf8"){const s=qC[e];if(!s)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?qm(globalThis.Buffer.from(t,"utf-8")):s.decoder.decode(`${s.prefix}${t}`)}var VC=Object.defineProperty,KC=(t,e,s)=>e in t?VC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,cs=(t,e,s)=>KC(t,typeof e!="symbol"?e+"":e,s);class WC{constructor(e,s){this.core=e,this.logger=s,cs(this,"keychain",new Map),cs(this,"name",GE),cs(this,"version",YE),cs(this,"initialized",!1),cs(this,"storagePrefix",as),cs(this,"init",async()=>{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}}),cs(this,"has",n=>(this.isInitialized(),this.keychain.has(n))),cs(this,"set",async(n,i)=>{this.isInitialized(),this.keychain.set(n,i),await this.persist()}),cs(this,"get",n=>{this.isInitialized();const i=this.keychain.get(n);if(typeof i>"u"){const{message:o}=oe("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(o)}return i}),cs(this,"del",async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()}),this.core=e,this.logger=Dt(s,this.name)}get context(){return gt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,nc(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?ic(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=oe("NOT_INITIALIZED",this.name);throw new Error(e)}}}var GC=Object.defineProperty,YC=(t,e,s)=>e in t?GC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Ge=(t,e,s)=>YC(t,typeof e!="symbol"?e+"":e,s);class ZC{constructor(e,s,n){this.core=e,this.logger=s,Ge(this,"name",KE),Ge(this,"keychain"),Ge(this,"randomSessionIdentifier",Uc()),Ge(this,"initialized",!1),Ge(this,"clientId"),Ge(this,"init",async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)}),Ge(this,"hasKeys",i=>(this.isInitialized(),this.keychain.has(i))),Ge(this,"getClientId",async()=>{if(this.isInitialized(),this.clientId)return this.clientId;const i=await this.getClientSeed(),o=Nh(i),a=Uh(o.publicKey);return this.clientId=a,a}),Ge(this,"generateKeyPair",()=>{this.isInitialized();const i=R7();return this.setPrivateKey(i.publicKey,i.privateKey)}),Ge(this,"signJWT",async i=>{this.isInitialized();const o=await this.getClientSeed(),a=Nh(o),r=this.randomSessionIdentifier;return await C6(r,i,WE,a)}),Ge(this,"generateSharedKey",(i,o,a)=>{this.isInitialized();const r=this.getPrivateKey(i),c=U7(r,o);return this.setSymKey(c,a)}),Ge(this,"setSymKey",async(i,o)=>{this.isInitialized();const a=o||ga(i);return await this.keychain.set(a,i),a}),Ge(this,"deleteKeyPair",async i=>{this.isInitialized(),await this.keychain.del(i)}),Ge(this,"deleteSymKey",async i=>{this.isInitialized(),await this.keychain.del(i)}),Ge(this,"encode",async(i,o,a)=>{this.isInitialized();const r=Vp(a),c=fn(o);if(Wp(r))return $7(c,a==null?void 0:a.encoding);if(Kp(r)){const u=r.senderPublicKey,b=r.receiverPublicKey;i=await this.generateSharedKey(u,b)}const l=this.getSymKey(i),{type:d,senderPublicKey:h}=r;return N7({type:d,symKey:l,message:c,senderPublicKey:h,encoding:a==null?void 0:a.encoding})}),Ge(this,"decode",async(i,o,a)=>{this.isInitialized();const r=z7(o,a);if(Wp(r)){const c=M7(o,a==null?void 0:a.encoding);return Un(c)}if(Kp(r)){const c=r.receiverPublicKey,l=r.senderPublicKey;i=await this.generateSharedKey(c,l)}try{const c=this.getSymKey(i),l=L7({symKey:c,encoded:o,encoding:a==null?void 0:a.encoding});return Un(l)}catch(c){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(c)}}),Ge(this,"getPayloadType",(i,o=kt)=>{const a=Vi({encoded:i,encoding:o});return Dn(a.type)}),Ge(this,"getPayloadSenderPublicKey",(i,o=kt)=>{const a=Vi({encoded:i,encoding:o});return a.senderPublicKey?vt(a.senderPublicKey,ut):void 0}),this.core=e,this.logger=Dt(s,this.name),this.keychain=n||new WC(this.core,this.logger)}get context(){return gt(this.logger)}async setPrivateKey(e,s){return await this.keychain.set(e,s),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(Cm)}catch{e=Uc(),await this.keychain.set(Cm,e)}return HC(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=oe("NOT_INITIALIZED",this.name);throw new Error(e)}}}var XC=Object.defineProperty,QC=Object.defineProperties,JC=Object.getOwnPropertyDescriptors,Km=Object.getOwnPropertySymbols,eA=Object.prototype.hasOwnProperty,tA=Object.prototype.propertyIsEnumerable,el=(t,e,s)=>e in t?XC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,sA=(t,e)=>{for(var s in e||(e={}))eA.call(e,s)&&el(t,s,e[s]);if(Km)for(var s of Km(e))tA.call(e,s)&&el(t,s,e[s]);return t},nA=(t,e)=>QC(t,JC(e)),It=(t,e,s)=>el(t,typeof e!="symbol"?e+"":e,s);class iA extends Cy{constructor(e,s){super(e,s),this.logger=e,this.core=s,It(this,"messages",new Map),It(this,"messagesWithoutClientAck",new Map),It(this,"name",ZE),It(this,"version",XE),It(this,"initialized",!1),It(this,"storagePrefix",as),It(this,"init",async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n);const i=await this.getRelayerMessagesWithoutClientAck();typeof i<"u"&&(this.messagesWithoutClientAck=i),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}}),It(this,"set",async(n,i,o)=>{this.isInitialized();const a=Nt(i);let r=this.messages.get(n);if(typeof r>"u"&&(r={}),typeof r[a]<"u")return a;if(r[a]=i,this.messages.set(n,r),o===Ea.inbound){const c=this.messagesWithoutClientAck.get(n)||{};this.messagesWithoutClientAck.set(n,nA(sA({},c),{[a]:i}))}return await this.persist(),a}),It(this,"get",n=>{this.isInitialized();let i=this.messages.get(n);return typeof i>"u"&&(i={}),i}),It(this,"getWithoutAck",n=>{this.isInitialized();const i={};for(const o of n){const a=this.messagesWithoutClientAck.get(o)||{};i[o]=Object.values(a)}return i}),It(this,"has",(n,i)=>{this.isInitialized();const o=this.get(n),a=Nt(i);return typeof o[a]<"u"}),It(this,"ack",async(n,i)=>{this.isInitialized();const o=this.messagesWithoutClientAck.get(n);if(typeof o>"u")return;const a=Nt(i);delete o[a],Object.keys(o).length===0?this.messagesWithoutClientAck.delete(n):this.messagesWithoutClientAck.set(n,o),await this.persist()}),It(this,"del",async n=>{this.isInitialized(),this.messages.delete(n),this.messagesWithoutClientAck.delete(n),await this.persist()}),this.logger=Dt(e,this.name),this.core=s}get context(){return gt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get storageKeyWithoutClientAck(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name+"_withoutClientAck"}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,nc(e))}async setRelayerMessagesWithoutClientAck(e){await this.core.storage.setItem(this.storageKeyWithoutClientAck,nc(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?ic(e):void 0}async getRelayerMessagesWithoutClientAck(){const e=await this.core.storage.getItem(this.storageKeyWithoutClientAck);return typeof e<"u"?ic(e):void 0}async persist(){await this.setRelayerMessages(this.messages),await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck)}isInitialized(){if(!this.initialized){const{message:e}=oe("NOT_INITIALIZED",this.name);throw new Error(e)}}}var oA=Object.defineProperty,aA=Object.defineProperties,rA=Object.getOwnPropertyDescriptors,Wm=Object.getOwnPropertySymbols,cA=Object.prototype.hasOwnProperty,lA=Object.prototype.propertyIsEnumerable,tl=(t,e,s)=>e in t?oA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,ti=(t,e)=>{for(var s in e||(e={}))cA.call(e,s)&&tl(t,s,e[s]);if(Wm)for(var s of Wm(e))lA.call(e,s)&&tl(t,s,e[s]);return t},Gm=(t,e)=>aA(t,rA(e)),zt=(t,e,s)=>tl(t,typeof e!="symbol"?e+"":e,s);class dA extends Ay{constructor(e,s){super(e,s),this.relayer=e,this.logger=s,zt(this,"events",new Kt.EventEmitter),zt(this,"name",JE),zt(this,"queue",new Map),zt(this,"publishTimeout",re.toMiliseconds(re.ONE_MINUTE)),zt(this,"initialPublishTimeout",re.toMiliseconds(re.ONE_SECOND*15)),zt(this,"needsTransportRestart",!1),zt(this,"publish",async(n,i,o)=>{var a,r,c,l,d;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:i,opts:o}});const h=(o==null?void 0:o.ttl)||QE,u=(o==null?void 0:o.prompt)||!1,b=(o==null?void 0:o.tag)||0,f=(o==null?void 0:o.id)||nn().toString(),y=Qn(ba().protocol),C={id:f,method:(o==null?void 0:o.publishMethod)||y.publish,params:ti({topic:n,message:i,ttl:h,prompt:u,tag:b,attestation:o==null?void 0:o.attestation},o==null?void 0:o.tvf)},_=`Failed to publish payload, please try again. id:${f} tag:${b}`;try{je((a=C.params)==null?void 0:a.prompt)&&((r=C.params)==null||delete r.prompt),je((c=C.params)==null?void 0:c.tag)&&((l=C.params)==null||delete l.tag);const N=new Promise(async A=>{const E=({id:P})=>{var M;((M=C.id)==null?void 0:M.toString())===P.toString()&&(this.removeRequestFromQueue(P),this.relayer.events.removeListener(Re.publish,E),A())};this.relayer.events.on(Re.publish,E);const B=ss(new Promise((P,M)=>{this.rpcPublish(C,o).then(P).catch(R=>{this.logger.warn(R,R==null?void 0:R.message),M(R)})}),this.initialPublishTimeout,`Failed initial publish, retrying.... id:${f} tag:${b}`);try{await B,this.events.removeListener(Re.publish,E)}catch(P){this.queue.set(f,{request:C,opts:o,attempt:1}),this.logger.warn(P,P==null?void 0:P.message)}});this.logger.trace({type:"method",method:"publish",params:{id:f,topic:n,message:i,opts:o}}),await ss(N,this.publishTimeout,_)}catch(N){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(N),(d=o==null?void 0:o.internal)!=null&&d.throwOnFailedPublish)throw N}finally{this.queue.delete(f)}}),zt(this,"publishCustom",async n=>{var i,o,a,r,c;this.logger.debug("Publishing custom payload"),this.logger.trace({type:"method",method:"publishCustom",params:n});const{payload:l,opts:d={}}=n,{attestation:h,tvf:u,publishMethod:b,prompt:f,tag:y,ttl:C=re.FIVE_MINUTES}=d,_=d.id||nn().toString(),N=Qn(ba().protocol),A=b||N.publish,E={id:_,method:A,params:ti(Gm(ti({},l),{ttl:C,prompt:f,tag:y,attestation:h}),u)},B=`Failed to publish custom payload, please try again. id:${_} tag:${y}`;try{je((i=E.params)==null?void 0:i.prompt)&&((o=E.params)==null||delete o.prompt),je((a=E.params)==null?void 0:a.tag)&&((r=E.params)==null||delete r.tag);const P=new Promise(async M=>{const R=({id:q})=>{var K;((K=E.id)==null?void 0:K.toString())===q.toString()&&(this.removeRequestFromQueue(q),this.relayer.events.removeListener(Re.publish,R),M())};this.relayer.events.on(Re.publish,R);const L=ss(new Promise((q,K)=>{this.rpcPublish(E,d).then(q).catch(j=>{this.logger.warn(j,j==null?void 0:j.message),K(j)})}),this.initialPublishTimeout,`Failed initial custom payload publish, retrying.... method:${A} id:${_} tag:${y}`);try{await L,this.events.removeListener(Re.publish,R)}catch(q){this.queue.set(_,{request:E,opts:d,attempt:1}),this.logger.warn(q,q==null?void 0:q.message)}});this.logger.trace({type:"method",method:"publish",params:{id:_,payload:l,opts:d}}),await ss(P,this.publishTimeout,B)}catch(P){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(P),(c=d==null?void 0:d.internal)!=null&&c.throwOnFailedPublish)throw P}finally{this.queue.delete(_)}}),zt(this,"on",(n,i)=>{this.events.on(n,i)}),zt(this,"once",(n,i)=>{this.events.once(n,i)}),zt(this,"off",(n,i)=>{this.events.off(n,i)}),zt(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),this.relayer=e,this.logger=Dt(s,this.name),this.registerEventListeners()}get context(){return gt(this.logger)}async rpcPublish(e,s){this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:e});const n=await this.relayer.request(e);return this.relayer.events.emit(Re.publish,ti(ti({},e),s)),this.logger.debug("Successfully Published Payload"),n}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async(e,s)=>{var n;const i=e.attempt+1;this.queue.set(s,Gm(ti({},e),{attempt:i})),this.logger.warn({},`Publisher: queue->publishing: ${e.request.id}, tag: ${(n=e.request.params)==null?void 0:n.tag}, attempt: ${i}`),await this.rpcPublish(e.request,e.opts),this.logger.warn({},`Publisher: queue->published: ${e.request.id}`)})}registerEventListeners(){this.relayer.core.heartbeat.on(hn.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(Re.connection_stalled);return}this.checkQueue()}),this.relayer.on(Re.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}var hA=Object.defineProperty,uA=(t,e,s)=>e in t?hA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,si=(t,e,s)=>uA(t,typeof e!="symbol"?e+"":e,s);class fA{constructor(){si(this,"map",new Map),si(this,"set",(e,s)=>{const n=this.get(e);this.exists(e,s)||this.map.set(e,[...n,s])}),si(this,"get",e=>this.map.get(e)||[]),si(this,"exists",(e,s)=>this.get(e).includes(s)),si(this,"delete",(e,s)=>{if(typeof s>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const n=this.get(e);if(!this.exists(e,s))return;const i=n.filter(o=>o!==s);if(!i.length){this.map.delete(e);return}this.map.set(e,i)}),si(this,"clear",()=>{this.map.clear()})}get topics(){return Array.from(this.map.keys())}}var pA=Object.defineProperty,mA=Object.defineProperties,gA=Object.getOwnPropertyDescriptors,Ym=Object.getOwnPropertySymbols,bA=Object.prototype.hasOwnProperty,yA=Object.prototype.propertyIsEnumerable,sl=(t,e,s)=>e in t?pA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,eo=(t,e)=>{for(var s in e||(e={}))bA.call(e,s)&&sl(t,s,e[s]);if(Ym)for(var s of Ym(e))yA.call(e,s)&&sl(t,s,e[s]);return t},nl=(t,e)=>mA(t,gA(e)),Be=(t,e,s)=>sl(t,typeof e!="symbol"?e+"":e,s);class wA extends By{constructor(e,s){super(e,s),this.relayer=e,this.logger=s,Be(this,"subscriptions",new Map),Be(this,"topicMap",new fA),Be(this,"events",new Kt.EventEmitter),Be(this,"name",ak),Be(this,"version",rk),Be(this,"pending",new Map),Be(this,"cached",[]),Be(this,"initialized",!1),Be(this,"storagePrefix",as),Be(this,"subscribeTimeout",re.toMiliseconds(re.ONE_MINUTE)),Be(this,"initialSubscribeTimeout",re.toMiliseconds(re.ONE_SECOND*15)),Be(this,"clientId"),Be(this,"batchSubscribeTopicsLimit",500),Be(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),await this.restore()),this.initialized=!0}),Be(this,"subscribe",async(n,i)=>{var o;this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}});try{const a=ba(i),r={topic:n,relay:a,transportType:i==null?void 0:i.transportType};(o=i==null?void 0:i.internal)!=null&&o.skipSubscribe||this.pending.set(n,r);const c=await this.rpcSubscribe(n,a,i);return typeof c=="string"&&(this.onSubscribe(c,r),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:i}})),c}catch(a){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(a),a}}),Be(this,"unsubscribe",async(n,i)=>{this.isInitialized(),typeof(i==null?void 0:i.id)<"u"?await this.unsubscribeById(n,i.id,i):await this.unsubscribeByTopic(n,i)}),Be(this,"isSubscribed",n=>new Promise(i=>{i(this.topicMap.topics.includes(n))})),Be(this,"isKnownTopic",n=>new Promise(i=>{i(this.topicMap.topics.includes(n)||this.pending.has(n)||this.cached.some(o=>o.topic===n))})),Be(this,"on",(n,i)=>{this.events.on(n,i)}),Be(this,"once",(n,i)=>{this.events.once(n,i)}),Be(this,"off",(n,i)=>{this.events.off(n,i)}),Be(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),Be(this,"start",async()=>{await this.onConnect()}),Be(this,"stop",async()=>{await this.onDisconnect()}),Be(this,"restart",async()=>{await this.restore(),await this.onRestart()}),Be(this,"checkPending",async()=>{if(this.pending.size===0&&(!this.initialized||!this.relayer.connected))return;const n=[];this.pending.forEach(i=>{n.push(i)}),await this.batchSubscribe(n)}),Be(this,"registerEventListeners",()=>{this.relayer.core.heartbeat.on(hn.pulse,async()=>{await this.checkPending()}),this.events.on(Ft.created,async n=>{const i=Ft.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:n}),await this.persist()}),this.events.on(Ft.deleted,async n=>{const i=Ft.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:n}),await this.persist()})}),this.relayer=e,this.logger=Dt(s,this.name),this.clientId=""}get context(){return gt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}get hasAnyTopics(){return this.topicMap.topics.length>0||this.pending.size>0||this.cached.length>0||this.subscriptions.size>0}hasSubscription(e,s){let n=!1;try{n=this.getSubscription(e).topic===s}catch{}return n}reset(){this.cached=[],this.initialized=!0}onDisable(){this.values.length>0&&(this.cached=this.values),this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,s){const n=this.topicMap.get(e);await Promise.all(n.map(async i=>await this.unsubscribeById(e,i,s)))}async unsubscribeById(e,s,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:s,opts:n}});try{const i=ba(n);await this.restartToComplete({topic:e,id:s,relay:i}),await this.rpcUnsubscribe(e,s,i);const o=_e("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,s,o),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:s,opts:n}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,s,n){var i,o;const a=await this.getSubscriptionId(e);if((i=n==null?void 0:n.internal)!=null&&i.skipSubscribe)return a;(!n||(n==null?void 0:n.transportType)===Ie.relay)&&await this.restartToComplete({topic:e,id:e,relay:s});const r={method:Qn(s.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});const c=(o=n==null?void 0:n.internal)==null?void 0:o.throwOnFailedPublish;try{if((n==null?void 0:n.transportType)===Ie.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(r).catch(h=>this.logger.warn(h))},re.toMiliseconds(re.ONE_SECOND)),a;const l=new Promise(async h=>{const u=b=>{b.topic===e&&(this.events.removeListener(Ft.created,u),h(b.id))};this.events.on(Ft.created,u);try{const b=await ss(new Promise((f,y)=>{this.relayer.request(r).catch(C=>{this.logger.warn(C,C==null?void 0:C.message),y(C)}).then(f)}),this.initialSubscribeTimeout,`Subscribing to ${e} failed, please try again`);this.events.removeListener(Ft.created,u),h(b)}catch{}}),d=await ss(l,this.subscribeTimeout,`Subscribing to ${e} failed, please try again`);if(!d&&c)throw new Error(`Subscribing to ${e} failed, please try again`);return d?a:null}catch(l){if(this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Re.connection_stalled),c)throw l}return null}async rpcBatchSubscribe(e){if(!e.length)return;const s=e[0].relay,n={method:Qn(s.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await ss(new Promise(i=>{this.relayer.request(n).catch(o=>this.logger.warn(o)).then(i)}),this.subscribeTimeout,"rpcBatchSubscribe failed, please try again")}catch{this.relayer.events.emit(Re.connection_stalled)}}async rpcBatchFetchMessages(e){if(!e.length)return;const s=e[0].relay,n={method:Qn(s.protocol).batchFetchMessages,params:{topics:e.map(o=>o.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});let i;try{i=await await ss(new Promise((o,a)=>{this.relayer.request(n).catch(r=>{this.logger.warn(r),a(r)}).then(o)}),this.subscribeTimeout,"rpcBatchFetchMessages failed, please try again")}catch{this.relayer.events.emit(Re.connection_stalled)}return i}rpcUnsubscribe(e,s,n){const i={method:Qn(n.protocol).unsubscribe,params:{topic:e,id:s}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,s){this.setSubscription(e,nl(eo({},s),{id:e})),this.pending.delete(s.topic)}onBatchSubscribe(e){e.length&&e.forEach(s=>{this.setSubscription(s.id,eo({},s)),this.pending.delete(s.topic)})}async onUnsubscribe(e,s,n){this.events.removeAllListeners(s),this.hasSubscription(s,e)&&this.deleteSubscription(s,n),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,s){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:s}),this.addSubscription(e,s)}addSubscription(e,s){this.subscriptions.set(e,eo({},s)),this.topicMap.set(s.topic,e),this.events.emit(Ft.created,s)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const s=this.subscriptions.get(e);if(!s){const{message:n}=oe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return s}deleteSubscription(e,s){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:s});const n=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(n.topic,e),this.events.emit(Ft.deleted,nl(eo({},n),{reason:s}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Ft.sync)}async onRestart(){if(this.cached.length){const e=[...this.cached],s=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let n=0;n<s;n++){const i=e.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(i)}}this.events.emit(Ft.resubscribed)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size&&!e.every(s=>{var n;return s.topic===((n=this.subscriptions.get(s.id))==null?void 0:n.topic)})){const{message:s}=oe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(s),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(s)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){e.length&&(await this.rpcBatchSubscribe(e),this.onBatchSubscribe(await Promise.all(e.map(async s=>nl(eo({},s),{id:await this.getSubscriptionId(s.topic)})))))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);const s=await this.rpcBatchFetchMessages(e);s&&s.messages&&(await nv(re.toMiliseconds(re.ONE_SECOND)),await this.relayer.handleBatchMessageEvents(s.messages))}async onConnect(){await this.restart(),this.reset()}onDisconnect(){this.onDisable()}isInitialized(){if(!this.initialized){const{message:e}=oe("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(e){!this.relayer.connected&&!this.relayer.connecting&&(this.cached.push(e),await this.relayer.transportOpen())}async getClientId(){return this.clientId||(this.clientId=await this.relayer.core.crypto.getClientId()),this.clientId}async getSubscriptionId(e){return Nt(e+await this.getClientId())}}var vA=Object.defineProperty,Zm=Object.getOwnPropertySymbols,xA=Object.prototype.hasOwnProperty,EA=Object.prototype.propertyIsEnumerable,il=(t,e,s)=>e in t?vA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Xm=(t,e)=>{for(var s in e||(e={}))xA.call(e,s)&&il(t,s,e[s]);if(Zm)for(var s of Zm(e))EA.call(e,s)&&il(t,s,e[s]);return t},ke=(t,e,s)=>il(t,typeof e!="symbol"?e+"":e,s);class kA extends Dy{constructor(e){var s;super(e),ke(this,"protocol","wc"),ke(this,"version",2),ke(this,"core"),ke(this,"logger"),ke(this,"events",new Kt.EventEmitter),ke(this,"provider"),ke(this,"messages"),ke(this,"subscriber"),ke(this,"publisher"),ke(this,"name",tk),ke(this,"transportExplicitlyClosed",!1),ke(this,"initialized",!1),ke(this,"connectionAttemptInProgress",!1),ke(this,"relayUrl"),ke(this,"projectId"),ke(this,"packageName"),ke(this,"bundleId"),ke(this,"hasExperiencedNetworkDisruption",!1),ke(this,"pingTimeout"),ke(this,"heartBeatTimeout",re.toMiliseconds(re.THIRTY_SECONDS+re.FIVE_SECONDS)),ke(this,"reconnectTimeout"),ke(this,"connectPromise"),ke(this,"reconnectInProgress",!1),ke(this,"requestsInFlight",[]),ke(this,"connectTimeout",re.toMiliseconds(re.ONE_SECOND*15)),ke(this,"request",async n=>{var i,o;this.logger.debug("Publishing Request Payload");const a=n.id||nn().toString();await this.toEstablishConnection();try{this.logger.trace({id:a,method:n.method,topic:(i=n.params)==null?void 0:i.topic},"relayer.request - publishing...");const r=`${a}:${((o=n.params)==null?void 0:o.tag)||""}`;this.requestsInFlight.push(r);const c=await this.provider.request(n);return this.requestsInFlight=this.requestsInFlight.filter(l=>l!==r),c}catch(r){throw this.logger.debug(`Failed to Publish Request: ${a}`),r}}),ke(this,"resetPingTimeout",()=>{Zo()&&(clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var n,i,o,a;try{this.logger.debug({},"pingTimeout: Connection stalled, terminating..."),(a=(o=(i=(n=this.provider)==null?void 0:n.connection)==null?void 0:i.socket)==null?void 0:o.terminate)==null||a.call(o)}catch(r){this.logger.warn(r,r==null?void 0:r.message)}},this.heartBeatTimeout))}),ke(this,"onPayloadHandler",n=>{this.onProviderPayload(n),this.resetPingTimeout()}),ke(this,"onConnectHandler",()=>{this.logger.warn({},"Relayer connected 🛜"),this.startPingTimeout(),this.events.emit(Re.connect)}),ke(this,"onDisconnectHandler",()=>{this.logger.warn({},"Relayer disconnected 🛑"),this.requestsInFlight=[],this.onProviderDisconnect()}),ke(this,"onProviderErrorHandler",n=>{this.logger.fatal(`Fatal socket error: ${n.message}`),this.events.emit(Re.error,n),this.logger.fatal("Fatal socket error received, closing transport"),this.transportClose()}),ke(this,"registerProviderListeners",()=>{this.provider.on($t.payload,this.onPayloadHandler),this.provider.on($t.connect,this.onConnectHandler),this.provider.on($t.disconnect,this.onDisconnectHandler),this.provider.on($t.error,this.onProviderErrorHandler)}),this.core=e.core,this.logger=dm({logger:(s=e.logger)!=null?s:ek,name:this.name}),this.messages=new iA(this.logger,e.core),this.subscriber=new wA(this,this.logger),this.publisher=new dA(this,this.logger),this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||Dm,z4()?this.packageName=pf():j4()&&(this.bundleId=pf()),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.transportOpen().catch(e=>this.logger.warn(e,e==null?void 0:e.message))}get context(){return gt(this.logger)}get connected(){var e,s,n;return((n=(s=(e=this.provider)==null?void 0:e.connection)==null?void 0:s.socket)==null?void 0:n.readyState)===1||!1}get connecting(){var e,s,n;return((n=(s=(e=this.provider)==null?void 0:e.connection)==null?void 0:s.socket)==null?void 0:n.readyState)===0||this.connectPromise!==void 0||!1}async publish(e,s,n){this.isInitialized(),await this.publisher.publish(e,s,n),await this.recordMessageEvent({topic:e,message:s,publishedAt:Date.now(),transportType:Ie.relay},Ea.outbound)}async publishCustom(e){this.isInitialized(),await this.publisher.publishCustom(e)}async subscribe(e,s){var n,i,o;this.isInitialized(),(!(s!=null&&s.transportType)||(s==null?void 0:s.transportType)==="relay")&&await this.toEstablishConnection();const a=typeof((n=s==null?void 0:s.internal)==null?void 0:n.throwOnFailedPublish)>"u"?!0:(i=s==null?void 0:s.internal)==null?void 0:i.throwOnFailedPublish;let r=((o=this.subscriber.topicMap.get(e))==null?void 0:o[0])||"",c;const l=d=>{d.topic===e&&(this.subscriber.off(Ft.created,l),c())};return await Promise.all([new Promise(d=>{c=d,this.subscriber.on(Ft.created,l)}),new Promise(async(d,h)=>{r=await this.subscriber.subscribe(e,Xm({internal:{throwOnFailedPublish:a}},s)).catch(u=>{a&&h(u)})||r,d()})]),r}async unsubscribe(e,s){this.isInitialized(),await this.subscriber.unsubscribe(e,s)}on(e,s){this.events.on(e,s)}once(e,s){this.events.once(e,s)}off(e,s){this.events.off(e,s)}removeListener(e,s){this.events.removeListener(e,s)}async transportDisconnect(){this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await ss(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){if(!this.subscriber.hasAnyTopics){this.logger.info("Starting WS connection skipped because the client has no topics to work with.");return}if(this.connectPromise?(this.logger.debug({},"Waiting for existing connection attempt to resolve..."),await this.connectPromise,this.logger.debug({},"Existing connection attempt resolved")):(this.connectPromise=new Promise(async(s,n)=>{await this.connect(e).then(s).catch(n).finally(()=>{this.connectPromise=void 0})}),await this.connectPromise),!this.connected)throw new Error(`Couldn't establish socket connection to the relay server: ${this.relayUrl}`)}async restartTransport(e){this.logger.debug({},"Restarting transport..."),!this.connectionAttemptInProgress&&(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await lm())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if((e==null?void 0:e.length)===0){this.logger.trace("Batch message events is empty. Ignoring...");return}const s=e.sort((n,i)=>n.publishedAt-i.publishedAt);this.logger.debug(`Batch of ${s.length} message events sorted`);for(const n of s)try{await this.onMessageEvent(n)}catch(i){this.logger.warn(i,"Error while processing batch message event: "+(i==null?void 0:i.message))}this.logger.trace(`Batch of ${s.length} message events processed`)}async onLinkMessageEvent(e,s){const{topic:n}=e;if(!s.sessionExists){const i=Me(re.FIVE_MINUTES),o={topic:n,expiry:i,relay:{protocol:"irn"},active:!1};await this.core.pairing.pairings.set(n,o)}this.events.emit(Re.message,e),await this.recordMessageEvent(e,Ea.inbound)}async connect(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;let s=1;for(;s<6;){try{if(this.transportExplicitlyClosed)break;this.logger.debug({},`Connecting to ${this.relayUrl}, attempt: ${s}...`),await this.createProvider(),await new Promise(async(n,i)=>{const o=()=>{i(new Error("Connection interrupted while trying to connect"))};this.provider.once($t.disconnect,o),await ss(new Promise((a,r)=>{this.provider.connect().then(a).catch(r)}),this.connectTimeout,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(a=>{i(a)}).finally(()=>{this.provider.off($t.disconnect,o),clearTimeout(this.reconnectTimeout)}),await new Promise(async(a,r)=>{const c=()=>{i(new Error("Connection interrupted while trying to subscribe"))};this.provider.once($t.disconnect,c),await this.subscriber.start().then(a).catch(r).finally(()=>{this.provider.off($t.disconnect,c)})}),this.hasExperiencedNetworkDisruption=!1,n()})}catch(n){await this.subscriber.stop();const i=n;this.logger.warn({},i.message),this.hasExperiencedNetworkDisruption=!0}finally{this.connectionAttemptInProgress=!1}if(this.connected){this.logger.debug({},`Connected to ${this.relayUrl} successfully on attempt: ${s}`);break}await new Promise(n=>setTimeout(n,re.toMiliseconds(s*1))),s++}}startPingTimeout(){var e,s,n,i,o;if(Zo())try{(s=(e=this.provider)==null?void 0:e.connection)!=null&&s.socket&&((o=(i=(n=this.provider)==null?void 0:n.connection)==null?void 0:i.socket)==null||o.on("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(a){this.logger.warn(a,a==null?void 0:a.message)}}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new $E(new qE(W4({sdkVersion:Zc,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId,packageName:this.packageName}))),this.registerProviderListeners()}async recordMessageEvent(e,s){const{topic:n,message:i}=e;await this.messages.set(n,i,s)}async shouldIgnoreMessageEvent(e){const{topic:s,message:n}=e;if(!n||n.length===0)return this.logger.warn(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isKnownTopic(s))return this.logger.warn(`Ignoring message for unknown topic ${s}`),!0;const i=this.messages.has(s,n);return i&&this.logger.warn(`Ignoring duplicate message: ${n}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),Gc(e)){if(!e.method.endsWith(sk))return;const s=e.params,{topic:n,message:i,publishedAt:o,attestation:a}=s.data,r={topic:n,message:i,publishedAt:o,transportType:Ie.relay,attestation:a};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(Xm({type:"event",event:s.id},r)),this.events.emit(s.id,r),await this.acknowledgePayload(e),await this.onMessageEvent(r)}else xa(e)&&this.events.emit(Re.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(await this.recordMessageEvent(e,Ea.inbound),this.events.emit(Re.message,e))}async acknowledgePayload(e){const s=va(e.id,!0);await this.provider.connection.send(s)}unregisterProviderListeners(){this.provider.off($t.payload,this.onPayloadHandler),this.provider.off($t.connect,this.onConnectHandler),this.provider.off($t.disconnect,this.onDisconnectHandler),this.provider.off($t.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await lm();zx(async s=>{e!==s&&(e=s,s?await this.transportOpen().catch(n=>this.logger.error(n,n==null?void 0:n.message)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}),this.core.heartbeat.on(hn.pulse,async()=>{if(!this.transportExplicitlyClosed&&!this.connected&&Hx())try{await this.confirmOnlineStateOrThrow(),await this.transportOpen()}catch(s){this.logger.warn(s,s==null?void 0:s.message)}})}async onProviderDisconnect(){clearTimeout(this.pingTimeout),this.events.emit(Re.disconnect),this.connectionAttemptInProgress=!1,!this.reconnectInProgress&&(this.reconnectInProgress=!0,await this.subscriber.stop(),this.subscriber.hasAnyTopics&&(this.transportExplicitlyClosed||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e,e==null?void 0:e.message)),this.reconnectTimeout=void 0,this.reconnectInProgress=!1},re.toMiliseconds(nk)))))}isInitialized(){if(!this.initialized){const{message:e}=oe("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectPromise){await this.connectPromise;return}await this.connect()}}}function CA(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function Qm(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function Jm(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const AA="[object RegExp]",DA="[object String]",SA="[object Number]",BA="[object Boolean]",e0="[object Arguments]",TA="[object Symbol]",FA="[object Date]",IA="[object Map]",_A="[object Set]",OA="[object Array]",PA="[object Function]",RA="[object ArrayBuffer]",ol="[object Object]",UA="[object Error]",NA="[object DataView]",LA="[object Uint8Array]",$A="[object Uint8ClampedArray]",MA="[object Uint16Array]",zA="[object Uint32Array]",jA="[object BigUint64Array]",qA="[object Int8Array]",HA="[object Int16Array]",VA="[object Int32Array]",KA="[object BigInt64Array]",WA="[object Float32Array]",GA="[object Float64Array]";function YA(){}function t0(t){if(!t||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)==="[object Object]":!1}function ZA(t,e,s){return to(t,e,void 0,void 0,void 0,void 0,s)}function to(t,e,s,n,i,o,a){const r=a(t,e,s,n,i,o);if(r!==void 0)return r;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return t===e;case"number":return t===e||Object.is(t,e);case"function":return t===e;case"object":return so(t,e,o,a)}return so(t,e,o,a)}function so(t,e,s,n){if(Object.is(t,e))return!0;let i=Jm(t),o=Jm(e);if(i===e0&&(i=ol),o===e0&&(o=ol),i!==o)return!1;switch(i){case DA:return t.toString()===e.toString();case SA:{const c=t.valueOf(),l=e.valueOf();return CA(c,l)}case BA:case FA:case TA:return Object.is(t.valueOf(),e.valueOf());case AA:return t.source===e.source&&t.flags===e.flags;case PA:return t===e}s=s??new Map;const a=s.get(t),r=s.get(e);if(a!=null&&r!=null)return a===e;s.set(t,e),s.set(e,t);try{switch(i){case IA:{if(t.size!==e.size)return!1;for(const[c,l]of t.entries())if(!e.has(c)||!to(l,e.get(c),c,t,e,s,n))return!1;return!0}case _A:{if(t.size!==e.size)return!1;const c=Array.from(t.values()),l=Array.from(e.values());for(let d=0;d<c.length;d++){const h=c[d],u=l.findIndex(b=>to(h,b,void 0,t,e,s,n));if(u===-1)return!1;l.splice(u,1)}return!0}case OA:case LA:case $A:case MA:case zA:case jA:case qA:case HA:case VA:case KA:case WA:case GA:{if(typeof Buffer<"u"&&Buffer.isBuffer(t)!==Buffer.isBuffer(e)||t.length!==e.length)return!1;for(let c=0;c<t.length;c++)if(!to(t[c],e[c],c,t,e,s,n))return!1;return!0}case RA:return t.byteLength!==e.byteLength?!1:so(new Uint8Array(t),new Uint8Array(e),s,n);case NA:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:so(new Uint8Array(t),new Uint8Array(e),s,n);case UA:return t.name===e.name&&t.message===e.message;case ol:{if(!(so(t.constructor,e.constructor,s,n)||t0(t)&&t0(e)))return!1;const c=[...Object.keys(t),...Qm(t)],l=[...Object.keys(e),...Qm(e)];if(c.length!==l.length)return!1;for(let d=0;d<c.length;d++){const h=c[d],u=t[h];if(!Object.hasOwn(e,h))return!1;const b=e[h];if(!to(u,b,h,t,e,s,n))return!1}return!0}default:return!1}}finally{s.delete(t),s.delete(e)}}function XA(t,e){return ZA(t,e,YA)}var QA=Object.defineProperty,s0=Object.getOwnPropertySymbols,JA=Object.prototype.hasOwnProperty,eD=Object.prototype.propertyIsEnumerable,al=(t,e,s)=>e in t?QA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,n0=(t,e)=>{for(var s in e||(e={}))JA.call(e,s)&&al(t,s,e[s]);if(s0)for(var s of s0(e))eD.call(e,s)&&al(t,s,e[s]);return t},At=(t,e,s)=>al(t,typeof e!="symbol"?e+"":e,s);class Fn extends Sy{constructor(e,s,n,i=as,o=void 0){super(e,s,n,i),this.core=e,this.logger=s,this.name=n,At(this,"map",new Map),At(this,"version",ik),At(this,"cached",[]),At(this,"initialized",!1),At(this,"getKey"),At(this,"storagePrefix",as),At(this,"recentlyDeleted",[]),At(this,"recentlyDeletedLimit",200),At(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(a=>{this.getKey&&a!==null&&!je(a)?this.map.set(this.getKey(a),a):yx(a)?this.map.set(a.id,a):wx(a)&&this.map.set(a.topic,a)}),this.cached=[],this.initialized=!0)}),At(this,"set",async(a,r)=>{this.isInitialized(),this.map.has(a)?await this.update(a,r):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:a,value:r}),this.map.set(a,r),await this.persist())}),At(this,"get",a=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:a}),this.getData(a))),At(this,"getAll",a=>(this.isInitialized(),a?this.values.filter(r=>Object.keys(a).every(c=>XA(r[c],a[c]))):this.values)),At(this,"update",async(a,r)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:a,update:r});const c=n0(n0({},this.getData(a)),r);this.map.set(a,c),await this.persist()}),At(this,"delete",async(a,r)=>{this.isInitialized(),this.map.has(a)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:a,reason:r}),this.map.delete(a),this.addToRecentlyDeleted(a),await this.persist())}),this.logger=Dt(s,this.name),this.storagePrefix=i,this.getKey=o}get context(){return gt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const s=this.map.get(e);if(!s){if(this.recentlyDeleted.includes(e)){const{message:i}=oe("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}const{message:n}=oe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(n),new Error(n)}return s}async persist(){await this.setDataStore(this.values)}async restore(){try{const e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){const{message:s}=oe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(s),new Error(s)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){const{message:e}=oe("NOT_INITIALIZED",this.name);throw new Error(e)}}}var tD=Object.defineProperty,sD=(t,e,s)=>e in t?tD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,ve=(t,e,s)=>sD(t,typeof e!="symbol"?e+"":e,s);class nD{constructor(e,s){this.core=e,this.logger=s,ve(this,"name",ck),ve(this,"version",lk),ve(this,"events",new md),ve(this,"pairings"),ve(this,"initialized",!1),ve(this,"storagePrefix",as),ve(this,"ignoredPayloadTypes",[Bs]),ve(this,"registeredMethods",[]),ve(this,"init",async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))}),ve(this,"register",({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]}),ve(this,"create",async n=>{this.isInitialized();const i=Uc(),o=await this.core.crypto.setSymKey(i),a=Me(re.FIVE_MINUTES),r={protocol:Am},c={topic:o,expiry:a,relay:r,active:!1,methods:n==null?void 0:n.methods},l=Xp({protocol:this.core.protocol,version:this.core.version,topic:o,symKey:i,relay:r,expiryTimestamp:a,methods:n==null?void 0:n.methods});return this.events.emit(Sn.create,c),this.core.expirer.set(o,a),await this.pairings.set(o,c),await this.core.relayer.subscribe(o,{transportType:n==null?void 0:n.transportType,internal:n==null?void 0:n.internal}),{topic:o,uri:l}}),ve(this,"pair",async n=>{this.isInitialized();const i=this.core.eventClient.createEvent({properties:{topic:n==null?void 0:n.uri,trace:[rs.pairing_started]}});this.isValidPair(n,i);const{topic:o,symKey:a,relay:r,expiryTimestamp:c,methods:l}=Zp(n.uri);i.props.properties.topic=o,i.addTrace(rs.pairing_uri_validation_success),i.addTrace(rs.pairing_uri_not_expired);let d;if(this.pairings.keys.includes(o)){if(d=this.pairings.get(o),i.addTrace(rs.existing_pairing),d.active)throw i.setError(_s.active_pairing_already_exists),new Error(`Pairing already exists: ${o}. Please try again with a new connection URI.`);i.addTrace(rs.pairing_not_expired)}const h=c||Me(re.FIVE_MINUTES),u={topic:o,relay:r,expiry:h,active:!1,methods:l};this.core.expirer.set(o,h),await this.pairings.set(o,u),i.addTrace(rs.store_new_pairing),n.activatePairing&&await this.activate({topic:o}),this.events.emit(Sn.create,u),i.addTrace(rs.emit_inactive_pairing),this.core.crypto.keychain.has(o)||await this.core.crypto.setSymKey(a,o),i.addTrace(rs.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{i.setError(_s.no_internet_connection)}try{await this.core.relayer.subscribe(o,{relay:r})}catch(b){throw i.setError(_s.subscribe_pairing_topic_failure),b}return i.addTrace(rs.subscribe_pairing_topic_success),u}),ve(this,"activate",async({topic:n})=>{this.isInitialized();const i=Me(re.FIVE_MINUTES);this.core.expirer.set(n,i),await this.pairings.update(n,{active:!0,expiry:i})}),ve(this,"ping",async n=>{this.isInitialized(),await this.isValidPing(n),this.logger.warn("ping() is deprecated and will be removed in the next major release.");const{topic:i}=n;if(this.pairings.keys.includes(i)){const o=await this.sendRequest(i,"wc_pairingPing",{}),{done:a,resolve:r,reject:c}=wn();this.events.once(Ae("pairing_ping",o),({error:l})=>{l?c(l):r()}),await a()}}),ve(this,"updateExpiry",async({topic:n,expiry:i})=>{this.isInitialized(),await this.pairings.update(n,{expiry:i})}),ve(this,"updateMetadata",async({topic:n,metadata:i})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:i})}),ve(this,"getPairings",()=>(this.isInitialized(),this.pairings.values)),ve(this,"disconnect",async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:i}=n;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",_e("USER_DISCONNECTED")),await this.deletePairing(i))}),ve(this,"formatUriFromPairing",n=>{this.isInitialized();const{topic:i,relay:o,expiry:a,methods:r}=n,c=this.core.crypto.keychain.get(i);return Xp({protocol:this.core.protocol,version:this.core.version,topic:i,symKey:c,relay:o,expiryTimestamp:a,methods:r})}),ve(this,"sendRequest",async(n,i,o)=>{const a=Is(i,o),r=await this.core.crypto.encode(n,a),c=Zi[i].req;return this.core.history.set(n,a),this.core.relayer.publish(n,r,c),a.id}),ve(this,"sendResult",async(n,i,o)=>{const a=va(n,o),r=await this.core.crypto.encode(i,a),c=(await this.core.history.get(i,n)).request.method,l=Zi[c].res;await this.core.relayer.publish(i,r,l),await this.core.history.resolve(a)}),ve(this,"sendError",async(n,i,o)=>{const a=Wc(n,o),r=await this.core.crypto.encode(i,a),c=(await this.core.history.get(i,n)).request.method,l=Zi[c]?Zi[c].res:Zi.unregistered_method.res;await this.core.relayer.publish(i,r,l),await this.core.history.resolve(a)}),ve(this,"deletePairing",async(n,i)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,_e("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),i?Promise.resolve():this.core.expirer.del(n)])}),ve(this,"cleanup",async()=>{const n=this.pairings.getAll().filter(i=>js(i.expiry));await Promise.all(n.map(i=>this.deletePairing(i.topic)))}),ve(this,"onRelayEventRequest",async n=>{const{topic:i,payload:o}=n;switch(o.method){case"wc_pairingPing":return await this.onPairingPingRequest(i,o);case"wc_pairingDelete":return await this.onPairingDeleteRequest(i,o);default:return await this.onUnknownRpcMethodRequest(i,o)}}),ve(this,"onRelayEventResponse",async n=>{const{topic:i,payload:o}=n,a=(await this.core.history.get(i,o.id)).request.method;switch(a){case"wc_pairingPing":return this.onPairingPingResponse(i,o);default:return this.onUnknownRpcMethodResponse(a)}}),ve(this,"onPairingPingRequest",async(n,i)=>{const{id:o}=i;try{this.isValidPing({topic:n}),await this.sendResult(o,n,!0),this.events.emit(Sn.ping,{id:o,topic:n})}catch(a){await this.sendError(o,n,a),this.logger.error(a)}}),ve(this,"onPairingPingResponse",(n,i)=>{const{id:o}=i;setTimeout(()=>{os(i)?this.events.emit(Ae("pairing_ping",o),{}):Lt(i)&&this.events.emit(Ae("pairing_ping",o),{error:i.error})},500)}),ve(this,"onPairingDeleteRequest",async(n,i)=>{const{id:o}=i;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(Sn.delete,{id:o,topic:n})}catch(a){await this.sendError(o,n,a),this.logger.error(a)}}),ve(this,"onUnknownRpcMethodRequest",async(n,i)=>{const{id:o,method:a}=i;try{if(this.registeredMethods.includes(a))return;const r=_e("WC_METHOD_UNSUPPORTED",a);await this.sendError(o,n,r),this.logger.error(r)}catch(r){await this.sendError(o,n,r),this.logger.error(r)}}),ve(this,"onUnknownRpcMethodResponse",n=>{this.registeredMethods.includes(n)||this.logger.error(_e("WC_METHOD_UNSUPPORTED",n))}),ve(this,"isValidPair",(n,i)=>{var o;if(!Ct(n)){const{message:r}=oe("MISSING_OR_INVALID",`pair() params: ${n}`);throw i.setError(_s.malformed_pairing_uri),new Error(r)}if(!bx(n.uri)){const{message:r}=oe("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw i.setError(_s.malformed_pairing_uri),new Error(r)}const a=Zp(n==null?void 0:n.uri);if(!((o=a==null?void 0:a.relay)!=null&&o.protocol)){const{message:r}=oe("MISSING_OR_INVALID","pair() uri#relay-protocol");throw i.setError(_s.malformed_pairing_uri),new Error(r)}if(!(a!=null&&a.symKey)){const{message:r}=oe("MISSING_OR_INVALID","pair() uri#symKey");throw i.setError(_s.malformed_pairing_uri),new Error(r)}if(a!=null&&a.expiryTimestamp&&re.toMiliseconds(a==null?void 0:a.expiryTimestamp)<Date.now()){i.setError(_s.pairing_expired);const{message:r}=oe("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(r)}}),ve(this,"isValidPing",async n=>{if(!Ct(n)){const{message:o}=oe("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(o)}const{topic:i}=n;await this.isValidPairingTopic(i)}),ve(this,"isValidDisconnect",async n=>{if(!Ct(n)){const{message:o}=oe("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(o)}const{topic:i}=n;await this.isValidPairingTopic(i)}),ve(this,"isValidPairingTopic",async n=>{if(!Ne(n,!1)){const{message:i}=oe("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(i)}if(!this.pairings.keys.includes(n)){const{message:i}=oe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(i)}if(js(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:i}=oe("EXPIRED",`pairing topic: ${n}`);throw new Error(i)}}),this.core=e,this.logger=Dt(s,this.name),this.pairings=new Fn(this.core,this.logger,this.name,this.storagePrefix)}get context(){return gt(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=oe("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(Re.message,async e=>{const{topic:s,message:n,transportType:i}=e;if(this.pairings.keys.includes(s)&&i!==Ie.link_mode&&!this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))try{const o=await this.core.crypto.decode(s,n);Gc(o)?(this.core.history.set(s,o),await this.onRelayEventRequest({topic:s,payload:o})):xa(o)&&(await this.core.history.resolve(o),await this.onRelayEventResponse({topic:s,payload:o}),this.core.history.delete(s,o.id)),await this.core.relayer.messages.ack(s,n)}catch(o){this.logger.error(o)}})}registerExpirerEvents(){this.core.expirer.on(Mt.expired,async e=>{const{topic:s}=yf(e.target);s&&this.pairings.keys.includes(s)&&(await this.deletePairing(s,!0),this.events.emit(Sn.expire,{topic:s}))})}}var iD=Object.defineProperty,oD=(t,e,s)=>e in t?iD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,et=(t,e,s)=>oD(t,typeof e!="symbol"?e+"":e,s);class aD extends ky{constructor(e,s){super(e,s),this.core=e,this.logger=s,et(this,"records",new Map),et(this,"events",new Kt.EventEmitter),et(this,"name",dk),et(this,"version",hk),et(this,"cached",[]),et(this,"initialized",!1),et(this,"storagePrefix",as),et(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),et(this,"set",(n,i,o)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:i,chainId:o}),this.records.has(i.id))return;const a={id:i.id,topic:n,request:{method:i.method,params:i.params||null},chainId:o,expiry:Me(re.THIRTY_DAYS)};this.records.set(a.id,a),this.persist(),this.events.emit(Qt.created,a)}),et(this,"resolve",async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const i=await this.getRecord(n.id);typeof i.response>"u"&&(i.response=Lt(n)?{error:n.error}:{result:n.result},this.records.set(i.id,i),this.persist(),this.events.emit(Qt.updated,i))}),et(this,"get",async(n,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:i}),await this.getRecord(i))),et(this,"delete",(n,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(o=>{if(o.topic===n){if(typeof i<"u"&&o.id!==i)return;this.records.delete(o.id),this.events.emit(Qt.deleted,o)}}),this.persist()}),et(this,"exists",async(n,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===n:!1)),et(this,"on",(n,i)=>{this.events.on(n,i)}),et(this,"once",(n,i)=>{this.events.once(n,i)}),et(this,"off",(n,i)=>{this.events.off(n,i)}),et(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),this.logger=Dt(s,this.name)}get context(){return gt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(s=>{if(typeof s.response<"u")return;const n={topic:s.topic,request:Is(s.request.method,s.request.params,s.id),chainId:s.chainId};return e.push(n)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();const s=this.records.get(e);if(!s){const{message:n}=oe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(n)}return s}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Qt.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:s}=oe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(s),new Error(s)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(Qt.created,e=>{const s=Qt.created;this.logger.info(`Emitting ${s}`),this.logger.debug({type:"event",event:s,record:e})}),this.events.on(Qt.updated,e=>{const s=Qt.updated;this.logger.info(`Emitting ${s}`),this.logger.debug({type:"event",event:s,record:e})}),this.events.on(Qt.deleted,e=>{const s=Qt.deleted;this.logger.info(`Emitting ${s}`),this.logger.debug({type:"event",event:s,record:e})}),this.core.heartbeat.on(hn.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(s=>{re.toMiliseconds(s.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${s.id}`),this.records.delete(s.id),this.events.emit(Qt.deleted,s,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=oe("NOT_INITIALIZED",this.name);throw new Error(e)}}}var rD=Object.defineProperty,cD=(t,e,s)=>e in t?rD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,rt=(t,e,s)=>cD(t,typeof e!="symbol"?e+"":e,s);class lD extends Ty{constructor(e,s){super(e,s),this.core=e,this.logger=s,rt(this,"expirations",new Map),rt(this,"events",new Kt.EventEmitter),rt(this,"name",uk),rt(this,"version",fk),rt(this,"cached",[]),rt(this,"initialized",!1),rt(this,"storagePrefix",as),rt(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),rt(this,"has",n=>{try{const i=this.formatTarget(n);return typeof this.getExpiration(i)<"u"}catch{return!1}}),rt(this,"set",(n,i)=>{this.isInitialized();const o=this.formatTarget(n),a={target:o,expiry:i};this.expirations.set(o,a),this.checkExpiry(o,a),this.events.emit(Mt.created,{target:o,expiration:a})}),rt(this,"get",n=>{this.isInitialized();const i=this.formatTarget(n);return this.getExpiration(i)}),rt(this,"del",n=>{if(this.isInitialized(),this.has(n)){const i=this.formatTarget(n),o=this.getExpiration(i);this.expirations.delete(i),this.events.emit(Mt.deleted,{target:i,expiration:o})}}),rt(this,"on",(n,i)=>{this.events.on(n,i)}),rt(this,"once",(n,i)=>{this.events.once(n,i)}),rt(this,"off",(n,i)=>{this.events.off(n,i)}),rt(this,"removeListener",(n,i)=>{this.events.removeListener(n,i)}),this.logger=Dt(s,this.name)}get context(){return gt(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if(typeof e=="string")return G4(e);if(typeof e=="number")return Y4(e);const{message:s}=oe("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(s)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Mt.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:s}=oe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(s),new Error(s)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){const s=this.expirations.get(e);if(!s){const{message:n}=oe("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(n),new Error(n)}return s}checkExpiry(e,s){const{expiry:n}=s;re.toMiliseconds(n)-Date.now()<=0&&this.expire(e,s)}expire(e,s){this.expirations.delete(e),this.events.emit(Mt.expired,{target:e,expiration:s})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,s)=>this.checkExpiry(s,e))}registerEventListeners(){this.core.heartbeat.on(hn.pulse,()=>this.checkExpirations()),this.events.on(Mt.created,e=>{const s=Mt.created;this.logger.info(`Emitting ${s}`),this.logger.debug({type:"event",event:s,data:e}),this.persist()}),this.events.on(Mt.expired,e=>{const s=Mt.expired;this.logger.info(`Emitting ${s}`),this.logger.debug({type:"event",event:s,data:e}),this.persist()}),this.events.on(Mt.deleted,e=>{const s=Mt.deleted;this.logger.info(`Emitting ${s}`),this.logger.debug({type:"event",event:s,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=oe("NOT_INITIALIZED",this.name);throw new Error(e)}}}var dD=Object.defineProperty,hD=(t,e,s)=>e in t?dD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Le=(t,e,s)=>hD(t,typeof e!="symbol"?e+"":e,s);class uD extends Fy{constructor(e,s,n){super(e,s,n),this.core=e,this.logger=s,this.store=n,Le(this,"name",pk),Le(this,"abortController"),Le(this,"isDevEnv"),Le(this,"verifyUrlV3",gk),Le(this,"storagePrefix",as),Le(this,"version",km),Le(this,"publicKey"),Le(this,"fetchPromise"),Le(this,"init",async()=>{var i;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&re.toMiliseconds((i=this.publicKey)==null?void 0:i.expiresAt)<Date.now()&&(this.logger.debug("verify v2 public key expired"),await this.removePublicKey()))}),Le(this,"register",async i=>{if(!Hn()||this.isDevEnv)return;const o=window.location.origin,{id:a,decryptedId:r}=i,c=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${o}&id=${a}&decryptedId=${r}`;try{const l=bs.getDocument(),d=this.startAbortTimer(re.ONE_SECOND*5),h=await new Promise((u,b)=>{const f=()=>{window.removeEventListener("message",C),l.body.removeChild(y),b("attestation aborted")};this.abortController.signal.addEventListener("abort",f);const y=l.createElement("iframe");y.src=c,y.style.display="none",y.addEventListener("error",f,{signal:this.abortController.signal});const C=_=>{if(_.data&&typeof _.data=="string")try{const N=JSON.parse(_.data);if(N.type==="verify_attestation"){if(wr(N.attestation).payload.id!==a)return;clearInterval(d),l.body.removeChild(y),this.abortController.signal.removeEventListener("abort",f),window.removeEventListener("message",C),u(N.attestation===null?"":N.attestation)}}catch(N){this.logger.warn(N)}};l.body.appendChild(y),window.addEventListener("message",C,{signal:this.abortController.signal})});return this.logger.debug(h,"jwt attestation"),h}catch(l){this.logger.warn(l)}return""}),Le(this,"resolve",async i=>{if(this.isDevEnv)return"";const{attestationId:o,hash:a,encryptedId:r}=i;if(o===""){this.logger.debug("resolve: attestationId is empty, skipping");return}if(o){if(wr(o).payload.id!==r)return;const l=await this.isValidJwtAttestation(o);if(l){if(!l.isVerified){this.logger.warn("resolve: jwt attestation: origin url not verified");return}return l}}if(!a)return;const c=this.getVerifyUrl(i==null?void 0:i.verifyUrl);return this.fetchAttestation(a,c)}),Le(this,"fetchAttestation",async(i,o)=>{this.logger.debug(`resolving attestation: ${i} from url: ${o}`);const a=this.startAbortTimer(re.ONE_SECOND*5),r=await fetch(`${o}/attestation/${i}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(a),r.status===200?await r.json():void 0}),Le(this,"getVerifyUrl",i=>{let o=i||Xi;return bk.includes(o)||(this.logger.info(`verify url: ${o}, not included in trusted list, assigning default: ${Xi}`),o=Xi),o}),Le(this,"fetchPublicKey",async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);const i=this.startAbortTimer(re.FIVE_SECONDS),o=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(i),await o.json()}catch(i){this.logger.warn(i)}}),Le(this,"persistPublicKey",async i=>{this.logger.debug(i,"persisting public key to local storage"),await this.store.setItem(this.storeKey,i),this.publicKey=i}),Le(this,"removePublicKey",async()=>{this.logger.debug("removing verify v2 public key from storage"),await this.store.removeItem(this.storeKey),this.publicKey=void 0}),Le(this,"isValidJwtAttestation",async i=>{const o=await this.getPublicKey();try{if(o)return this.validateAttestation(i,o)}catch(r){this.logger.error(r),this.logger.warn("error validating attestation")}const a=await this.fetchAndPersistPublicKey();try{if(a)return this.validateAttestation(i,a)}catch(r){this.logger.error(r),this.logger.warn("error validating attestation")}}),Le(this,"getPublicKey",async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey()),Le(this,"fetchAndPersistPublicKey",async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async o=>{const a=await this.fetchPublicKey();a&&(await this.persistPublicKey(a),o(a))});const i=await this.fetchPromise;return this.fetchPromise=void 0,i}),Le(this,"validateAttestation",(i,o)=>{const a=q7(i,o.publicKey),r={hasExpired:re.toMiliseconds(a.exp)<Date.now(),payload:a};if(r.hasExpired)throw this.logger.warn("resolve: jwt attestation expired"),new Error("JWT attestation expired");return{origin:r.payload.origin,isScam:r.payload.isScam,isVerified:r.payload.isVerified}}),this.logger=Dt(s,this.name),this.abortController=new AbortController,this.isDevEnv=oc(),this.init()}get storeKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//verify:public:key"}get context(){return gt(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),re.toMiliseconds(e))}}var fD=Object.defineProperty,pD=(t,e,s)=>e in t?fD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,i0=(t,e,s)=>pD(t,typeof e!="symbol"?e+"":e,s);class mD extends Iy{constructor(e,s){super(e,s),this.projectId=e,this.logger=s,i0(this,"context",yk),i0(this,"registerDeviceToken",async n=>{const{clientId:i,token:o,notificationType:a,enableEncrypted:r=!1}=n,c=`${wk}/${this.projectId}/clients`;await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:a,token:o,always_raw:r})})}),this.logger=Dt(s,this.context)}}var gD=Object.defineProperty,o0=Object.getOwnPropertySymbols,bD=Object.prototype.hasOwnProperty,yD=Object.prototype.propertyIsEnumerable,rl=(t,e,s)=>e in t?gD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,no=(t,e)=>{for(var s in e||(e={}))bD.call(e,s)&&rl(t,s,e[s]);if(o0)for(var s of o0(e))yD.call(e,s)&&rl(t,s,e[s]);return t},Ye=(t,e,s)=>rl(t,typeof e!="symbol"?e+"":e,s);class wD extends _y{constructor(e,s,n=!0){super(e,s,n),this.core=e,this.logger=s,Ye(this,"context",xk),Ye(this,"storagePrefix",as),Ye(this,"storageVersion",vk),Ye(this,"events",new Map),Ye(this,"shouldPersist",!1),Ye(this,"init",async()=>{if(!oc())try{const i={eventId:vf(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:"INIT",type:"",properties:{client_id:await this.core.crypto.getClientId(),user_agent:gf(this.core.relayer.protocol,this.core.relayer.version,Zc)}}};await this.sendEvent([i])}catch(i){this.logger.warn(i)}}),Ye(this,"createEvent",i=>{const{event:o="ERROR",type:a="",properties:{topic:r,trace:c}}=i,l=vf(),d=this.core.projectId||"",h=Date.now(),u=no({eventId:l,timestamp:h,props:{event:o,type:a,properties:{topic:r,trace:c}},bundleId:d,domain:this.getAppDomain()},this.setMethods(l));return this.telemetryEnabled&&(this.events.set(l,u),this.shouldPersist=!0),u}),Ye(this,"getEvent",i=>{const{eventId:o,topic:a}=i;if(o)return this.events.get(o);const r=Array.from(this.events.values()).find(c=>c.props.properties.topic===a);if(r)return no(no({},r),this.setMethods(r.eventId))}),Ye(this,"deleteEvent",i=>{const{eventId:o}=i;this.events.delete(o),this.shouldPersist=!0}),Ye(this,"setEventListeners",()=>{this.core.heartbeat.on(hn.pulse,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(i=>{re.fromMiliseconds(Date.now())-re.fromMiliseconds(i.timestamp)>Ek&&(this.events.delete(i.eventId),this.shouldPersist=!0)})})}),Ye(this,"setMethods",i=>({addTrace:o=>this.addTrace(i,o),setError:o=>this.setError(i,o)})),Ye(this,"addTrace",(i,o)=>{const a=this.events.get(i);a&&(a.props.properties.trace.push(o),this.events.set(i,a),this.shouldPersist=!0)}),Ye(this,"setError",(i,o)=>{const a=this.events.get(i);a&&(a.props.type=o,a.timestamp=Date.now(),this.events.set(i,a),this.shouldPersist=!0)}),Ye(this,"persist",async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1}),Ye(this,"restore",async()=>{try{const i=await this.core.storage.getItem(this.storageKey)||[];if(!i.length)return;i.forEach(o=>{this.events.set(o.eventId,no(no({},o),this.setMethods(o.eventId)))})}catch(i){this.logger.warn(i)}}),Ye(this,"submit",async()=>{if(!this.telemetryEnabled||this.events.size===0)return;const i=[];for(const[o,a]of this.events)a.props.type&&i.push(a);if(i.length!==0)try{if((await this.sendEvent(i)).ok)for(const o of i)this.events.delete(o.eventId),this.shouldPersist=!0}catch(o){this.logger.warn(o)}}),Ye(this,"sendEvent",async i=>{const o=this.getAppDomain()?"":"&sp=desktop";return await fetch(`${kk}?projectId=${this.core.projectId}&st=events_sdk&sv=js-${Zc}${o}`,{method:"POST",body:JSON.stringify(i)})}),Ye(this,"getAppDomain",()=>mf().url),this.logger=Dt(s,this.context),this.telemetryEnabled=n,n?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+"//"+this.context}}var vD=Object.defineProperty,a0=Object.getOwnPropertySymbols,xD=Object.prototype.hasOwnProperty,ED=Object.prototype.propertyIsEnumerable,cl=(t,e,s)=>e in t?vD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,r0=(t,e)=>{for(var s in e||(e={}))xD.call(e,s)&&cl(t,s,e[s]);if(a0)for(var s of a0(e))ED.call(e,s)&&cl(t,s,e[s]);return t},Te=(t,e,s)=>cl(t,typeof e!="symbol"?e+"":e,s);class ll extends wy{constructor(e){var s;super(e),Te(this,"protocol",Em),Te(this,"version",km),Te(this,"name",Yc),Te(this,"relayUrl"),Te(this,"projectId"),Te(this,"customStoragePrefix"),Te(this,"events",new Kt.EventEmitter),Te(this,"logger"),Te(this,"heartbeat"),Te(this,"relayer"),Te(this,"crypto"),Te(this,"storage"),Te(this,"history"),Te(this,"expirer"),Te(this,"pairing"),Te(this,"verify"),Te(this,"echoClient"),Te(this,"linkModeSupportedApps"),Te(this,"eventClient"),Te(this,"initialized",!1),Te(this,"logChunkController"),Te(this,"on",(r,c)=>this.events.on(r,c)),Te(this,"once",(r,c)=>this.events.once(r,c)),Te(this,"off",(r,c)=>this.events.off(r,c)),Te(this,"removeListener",(r,c)=>this.events.removeListener(r,c)),Te(this,"dispatchEnvelope",({topic:r,message:c,sessionExists:l})=>{if(!r||!c)return;const d={topic:r,message:c,publishedAt:Date.now(),transportType:Ie.link_mode};this.relayer.onLinkMessageEvent(d,{sessionExists:l})});const n=this.getGlobalCore(e==null?void 0:e.customStoragePrefix);if(n)try{return this.customStoragePrefix=n.customStoragePrefix,this.logger=n.logger,this.heartbeat=n.heartbeat,this.crypto=n.crypto,this.history=n.history,this.expirer=n.expirer,this.storage=n.storage,this.relayer=n.relayer,this.pairing=n.pairing,this.verify=n.verify,this.echoClient=n.echoClient,this.linkModeSupportedApps=n.linkModeSupportedApps,this.eventClient=n.eventClient,this.initialized=n.initialized,this.logChunkController=n.logChunkController,n}catch(r){console.warn("Failed to copy global core",r)}this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||Dm,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const i=uy({level:typeof(e==null?void 0:e.logger)=="string"&&e.logger?e.logger:HE.logger,name:Yc}),{logger:o,chunkLoggerController:a}=zd({opts:i,maxSizeInBytes:e==null?void 0:e.maxLogBlobSizeInBytes,loggerOverride:e==null?void 0:e.logger});this.logChunkController=a,(s=this.logChunkController)!=null&&s.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var r,c;(r=this.logChunkController)!=null&&r.downloadLogsBlobInBrowser&&((c=this.logChunkController)==null||c.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=Dt(o,this.name),this.heartbeat=new c1,this.crypto=new ZC(this,this.logger,e==null?void 0:e.keychain),this.history=new aD(this,this.logger),this.expirer=new lD(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new H1(r0(r0({},VE),e==null?void 0:e.storageOptions)),this.relayer=new kA({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new nD(this,this.logger),this.verify=new uD(this,this.logger,this.storage),this.echoClient=new mD(this.projectId||"",this.logger),this.linkModeSupportedApps=[],this.eventClient=new wD(this,this.logger,e==null?void 0:e.telemetryEnabled),this.setGlobalCore(this)}static async init(e){const s=new ll(e);await s.initialize();const n=await s.crypto.getClientId();return await s.storage.setItem(ok,n),s}get context(){return gt(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return(e=this.logChunkController)==null?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(e){this.linkModeSupportedApps.includes(e)||(this.linkModeSupportedApps.push(e),await this.storage.setItem(Sm,this.linkModeSupportedApps))}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.linkModeSupportedApps=await this.storage.getItem(Sm)||[],this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(e,`Core Initialization Failure at epoch ${Date.now()}`),this.logger.error(e.message),e}}getGlobalCore(e=""){try{if(this.isGlobalCoreDisabled())return;const s=`_walletConnectCore_${e}`,n=`${s}_count`;return globalThis[n]=(globalThis[n]||0)+1,globalThis[n]>1&&console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[n]} times.`),globalThis[s]}catch(s){console.warn("Failed to get global WalletConnect core",s);return}}setGlobalCore(e){var s;try{if(this.isGlobalCoreDisabled())return;const n=`_walletConnectCore_${((s=e.opts)==null?void 0:s.customStoragePrefix)||""}`;globalThis[n]=e}catch(n){console.warn("Failed to set global WalletConnect core",n)}}isGlobalCoreDisabled(){try{return typeof process<"u"&&process.env.DISABLE_GLOBAL_CORE==="true"}catch{return!0}}}const kD=ll,c0="wc",l0=2,d0="client",dl=`${c0}@${l0}:${d0}:`,hl={name:d0,logger:"error"},h0="WALLETCONNECT_DEEPLINK_CHOICE",CD="proposal",u0="Proposal expired",AD="session",ni=re.SEVEN_DAYS,DD="engine",tt={wc_sessionPropose:{req:{ttl:re.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:re.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:re.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:re.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:re.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:re.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:re.ONE_DAY,prompt:!1,tag:1104},res:{ttl:re.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:re.ONE_DAY,prompt:!1,tag:1106},res:{ttl:re.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:re.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:re.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:re.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:re.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:re.ONE_DAY,prompt:!1,tag:1112},res:{ttl:re.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:re.ONE_DAY,prompt:!1,tag:1114},res:{ttl:re.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:re.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:re.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:re.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:re.FIVE_MINUTES,prompt:!1,tag:1119}}},ul={min:re.FIVE_MINUTES,max:re.SEVEN_DAYS},ls={idle:"IDLE",active:"ACTIVE"},SD={eth_sendTransaction:{key:""},eth_sendRawTransaction:{key:""},wallet_sendCalls:{key:""},solana_signTransaction:{key:"signature"},solana_signAllTransactions:{key:"transactions"},solana_signAndSendTransaction:{key:"signature"},sui_signAndExecuteTransaction:{key:"digest"},sui_signTransaction:{key:""},hedera_signAndExecuteTransaction:{key:"transactionId"},hedera_executeTransaction:{key:"transactionId"},near_signTransaction:{key:""},near_signTransactions:{key:""},tron_signTransaction:{key:"txID"},xrpl_signTransaction:{key:""},xrpl_signTransactionFor:{key:""},algo_signTxn:{key:""},sendTransfer:{key:"txid"},stacks_stxTransfer:{key:"txId"},polkadot_signTransaction:{key:""},cosmos_signDirect:{key:""}},BD="request",TD=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],FD="wc",ID="auth",_D="authKeys",OD="pairingTopics",PD="requests",Ca=`${FD}@${1.5}:${ID}:`,Aa=`${Ca}:PUB_KEY`;var RD=Object.defineProperty,UD=Object.defineProperties,ND=Object.getOwnPropertyDescriptors,f0=Object.getOwnPropertySymbols,LD=Object.prototype.hasOwnProperty,$D=Object.prototype.propertyIsEnumerable,fl=(t,e,s)=>e in t?RD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,De=(t,e)=>{for(var s in e||(e={}))LD.call(e,s)&&fl(t,s,e[s]);if(f0)for(var s of f0(e))$D.call(e,s)&&fl(t,s,e[s]);return t},ct=(t,e)=>UD(t,ND(e)),J=(t,e,s)=>fl(t,typeof e!="symbol"?e+"":e,s);class MD extends Uy{constructor(e){super(e),J(this,"name",DD),J(this,"events",new md),J(this,"initialized",!1),J(this,"requestQueue",{state:ls.idle,queue:[]}),J(this,"sessionRequestQueue",{state:ls.idle,queue:[]}),J(this,"emittedSessionRequests",new iv({limit:500})),J(this,"requestQueueDelay",re.ONE_SECOND),J(this,"expectedPairingMethodMap",new Map),J(this,"recentlyDeletedMap",new Map),J(this,"recentlyDeletedLimit",200),J(this,"relayMessageCache",[]),J(this,"pendingSessions",new Map),J(this,"init",async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(tt)}),this.initialized=!0,setTimeout(async()=>{await this.processPendingMessageEvents(),this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},re.toMiliseconds(this.requestQueueDelay)))}),J(this,"connect",async s=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();const n=ct(De({},s),{requiredNamespaces:s.requiredNamespaces||{},optionalNamespaces:s.optionalNamespaces||{}});await this.isValidConnect(n),n.optionalNamespaces=ux(n.requiredNamespaces,n.optionalNamespaces),n.requiredNamespaces={};const{pairingTopic:i,requiredNamespaces:o,optionalNamespaces:a,sessionProperties:r,scopedProperties:c,relays:l}=n;let d=i,h,u=!1;try{if(d){const P=this.client.core.pairing.pairings.get(d);this.client.logger.warn("connect() with existing pairing topic is deprecated and will be removed in the next major release."),u=P.active}}catch(P){throw this.client.logger.error(`connect() -> pairing.get(${d}) failed`),P}if(!d||!u){const{topic:P,uri:M}=await this.client.core.pairing.create({internal:{skipSubscribe:!0}});d=P,h=M}if(!d){const{message:P}=oe("NO_MATCHING_KEY",`connect() pairing topic: ${d}`);throw new Error(P)}const b=await this.client.core.crypto.generateKeyPair(),f=tt.wc_sessionPropose.req.ttl||re.FIVE_MINUTES,y=Me(f),C=ct(De(De({requiredNamespaces:o,optionalNamespaces:a,relays:l??[{protocol:Am}],proposer:{publicKey:b,metadata:this.client.metadata},expiryTimestamp:y,pairingTopic:d},r&&{sessionProperties:r}),c&&{scopedProperties:c}),{id:is()}),_=Ae("session_connect",C.id),{reject:N,resolve:A,done:E}=wn(f,u0),B=({id:P})=>{P===C.id&&(this.client.events.off("proposal_expire",B),this.pendingSessions.delete(C.id),this.events.emit(_,{error:{message:u0,code:0}}))};return this.client.events.on("proposal_expire",B),this.events.once(_,({error:P,session:M})=>{this.client.events.off("proposal_expire",B),P?N(P):M&&A(M)}),await this.sendProposeSession({proposal:C,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:C.id}}}),await this.setProposal(C.id,C),{uri:h,approval:E}}),J(this,"pair",async s=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(s)}catch(n){throw this.client.logger.error("pair() failed"),n}}),J(this,"approve",async s=>{var n,i,o;const a=this.client.core.eventClient.createEvent({properties:{topic:(n=s==null?void 0:s.id)==null?void 0:n.toString(),trace:[Jt.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(L){throw a.setError(Bn.no_internet_connection),L}try{await this.isValidProposalId(s==null?void 0:s.id)}catch(L){throw this.client.logger.error(`approve() -> proposal.get(${s==null?void 0:s.id}) failed`),a.setError(Bn.proposal_not_found),L}try{await this.isValidApprove(s)}catch(L){throw this.client.logger.error("approve() -> isValidApprove() failed"),a.setError(Bn.session_approve_namespace_validation_failure),L}const{id:r,relayProtocol:c,namespaces:l,sessionProperties:d,scopedProperties:h,sessionConfig:u}=s,b=this.client.proposal.get(r);this.client.core.eventClient.deleteEvent({eventId:a.eventId});const{pairingTopic:f,proposer:y,requiredNamespaces:C,optionalNamespaces:_}=b;let N=(i=this.client.core.eventClient)==null?void 0:i.getEvent({topic:f});N||(N=(o=this.client.core.eventClient)==null?void 0:o.createEvent({type:Jt.session_approve_started,properties:{topic:f,trace:[Jt.session_approve_started,Jt.session_namespaces_validation_success]}}));const A=await this.client.core.crypto.generateKeyPair(),E=y.publicKey,B=await this.client.core.crypto.generateSharedKey(A,E),P=De(De(De({relay:{protocol:c??"irn"},namespaces:l,controller:{publicKey:A,metadata:this.client.metadata},expiry:Me(ni)},d&&{sessionProperties:d}),h&&{scopedProperties:h}),u&&{sessionConfig:u}),M=Ie.relay;N.addTrace(Jt.subscribing_session_topic);try{await this.client.core.relayer.subscribe(B,{transportType:M,internal:{skipSubscribe:!0}})}catch(L){throw N.setError(Bn.subscribe_session_topic_failure),L}N.addTrace(Jt.subscribe_session_topic_success);const R=ct(De({},P),{topic:B,requiredNamespaces:C,optionalNamespaces:_,pairingTopic:f,acknowledged:!1,self:P.controller,peer:{publicKey:y.publicKey,metadata:y.metadata},controller:A,transportType:Ie.relay});await this.client.session.set(B,R),N.addTrace(Jt.store_session);try{await this.sendApproveSession({sessionTopic:B,proposal:b,pairingProposalResponse:{relay:{protocol:c??"irn"},responderPublicKey:A},sessionSettleRequest:P,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:r}}}),N.addTrace(Jt.session_approve_publish_success)}catch(L){throw this.client.logger.error(L),this.client.session.delete(B,_e("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(B),L}return this.client.core.eventClient.deleteEvent({eventId:N.eventId}),await this.client.core.pairing.updateMetadata({topic:f,metadata:y.metadata}),await this.deleteProposal(r),await this.client.core.pairing.activate({topic:f}),await this.setExpiry(B,Me(ni)),{topic:B,acknowledged:()=>Promise.resolve(this.client.session.get(B))}}),J(this,"reject",async s=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(s)}catch(a){throw this.client.logger.error("reject() -> isValidReject() failed"),a}const{id:n,reason:i}=s;let o;try{o=this.client.proposal.get(n).pairingTopic}catch(a){throw this.client.logger.error(`reject() -> proposal.get(${n}) failed`),a}o&&await this.sendError({id:n,topic:o,error:i,rpcOpts:tt.wc_sessionPropose.reject}),await this.deleteProposal(n)}),J(this,"update",async s=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(s)}catch(h){throw this.client.logger.error("update() -> isValidUpdate() failed"),h}const{topic:n,namespaces:i}=s,{done:o,resolve:a,reject:r}=wn(),c=is(),l=nn().toString(),d=this.client.session.get(n).namespaces;return this.events.once(Ae("session_update",c),({error:h})=>{h?r(h):a()}),await this.client.session.update(n,{namespaces:i}),await this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:i},throwOnFailedPublish:!0,clientRpcId:c,relayRpcId:l}).catch(h=>{this.client.logger.error(h),this.client.session.update(n,{namespaces:d}),r(h)}),{acknowledged:o}}),J(this,"extend",async s=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(s)}catch(c){throw this.client.logger.error("extend() -> isValidExtend() failed"),c}const{topic:n}=s,i=is(),{done:o,resolve:a,reject:r}=wn();return this.events.once(Ae("session_extend",i),({error:c})=>{c?r(c):a()}),await this.setExpiry(n,Me(ni)),this.sendRequest({topic:n,method:"wc_sessionExtend",params:{},clientRpcId:i,throwOnFailedPublish:!0}).catch(c=>{r(c)}),{acknowledged:o}}),J(this,"request",async s=>{this.isInitialized();try{await this.isValidRequest(s)}catch(C){throw this.client.logger.error("request() -> isValidRequest() failed"),C}const{chainId:n,request:i,topic:o,expiry:a=tt.wc_sessionRequest.req.ttl}=s,r=this.client.session.get(o);(r==null?void 0:r.transportType)===Ie.relay&&await this.confirmOnlineStateOrThrow();const c=is(),l=nn().toString(),{done:d,resolve:h,reject:u}=wn(a,"Request expired. Please try again.");this.events.once(Ae("session_request",c),({error:C,result:_})=>{C?u(C):h(_)});const b="wc_sessionRequest",f=this.getAppLinkIfEnabled(r.peer.metadata,r.transportType);if(f)return await this.sendRequest({clientRpcId:c,relayRpcId:l,topic:o,method:b,params:{request:ct(De({},i),{expiryTimestamp:Me(a)}),chainId:n},expiry:a,throwOnFailedPublish:!0,appLink:f}).catch(C=>u(C)),this.client.events.emit("session_request_sent",{topic:o,request:i,chainId:n,id:c}),await d();const y={request:ct(De({},i),{expiryTimestamp:Me(a)}),chainId:n};return await Promise.all([new Promise(async C=>{await this.sendRequest({clientRpcId:c,relayRpcId:l,topic:o,method:b,params:y,expiry:a,throwOnFailedPublish:!0,tvf:this.getTVFParams(c,y)}).catch(_=>u(_)),this.client.events.emit("session_request_sent",{topic:o,request:i,chainId:n,id:c}),C()}),new Promise(async C=>{var _;if(!((_=r.sessionConfig)!=null&&_.disableDeepLink)){const N=await J4(this.client.core.storage,h0);await Z4({id:c,topic:o,wcDeepLink:N})}C()}),d()]).then(C=>C[2])}),J(this,"respond",async s=>{var n,i;this.isInitialized();const o=this.client.core.eventClient.createEvent({properties:{topic:(s==null?void 0:s.topic)||((i=(n=s==null?void 0:s.response)==null?void 0:n.id)==null?void 0:i.toString()),trace:[Jt.session_request_response_started]}});try{await this.isValidRespond(s)}catch(h){throw o.addTrace(h==null?void 0:h.message),o.setError(Bn.session_request_response_validation_failure),h}o.addTrace(Jt.session_request_response_validation_success);const{topic:a,response:r}=s,{id:c}=r,l=this.client.session.get(a);l.transportType===Ie.relay&&await this.confirmOnlineStateOrThrow();const d=this.getAppLinkIfEnabled(l.peer.metadata,l.transportType);try{o.addTrace(Jt.session_request_response_publish_started),os(r)?await this.sendResult({id:c,topic:a,result:r.result,throwOnFailedPublish:!0,appLink:d}):Lt(r)&&await this.sendError({id:c,topic:a,error:r.error,appLink:d}),this.cleanupAfterResponse(s)}catch(h){throw o.addTrace(h==null?void 0:h.message),o.setError(Bn.session_request_response_publish_failure),h}}),J(this,"ping",async s=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(s)}catch(i){throw this.client.logger.error("ping() -> isValidPing() failed"),i}const{topic:n}=s;if(this.client.session.keys.includes(n)){const i=is(),o=nn().toString(),{done:a,resolve:r,reject:c}=wn();this.events.once(Ae("session_ping",i),({error:l})=>{l?c(l):r()}),await Promise.all([this.sendRequest({topic:n,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:i,relayRpcId:o}),a()])}else this.client.core.pairing.pairings.keys.includes(n)&&(this.client.logger.warn("ping() on pairing topic is deprecated and will be removed in the next major release."),await this.client.core.pairing.ping({topic:n}))}),J(this,"emit",async s=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(s);const{topic:n,event:i,chainId:o}=s,a=nn().toString(),r=is();await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:i,chainId:o},throwOnFailedPublish:!0,relayRpcId:a,clientRpcId:r})}),J(this,"disconnect",async s=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(s);const{topic:n}=s;if(this.client.session.keys.includes(n))await this.sendRequest({topic:n,method:"wc_sessionDelete",params:_e("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:n,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(n))await this.client.core.pairing.disconnect({topic:n});else{const{message:i}=oe("MISMATCHED_TOPIC",`Session or pairing topic not found: ${n}`);throw new Error(i)}}),J(this,"find",s=>(this.isInitialized(),this.client.session.getAll().filter(n=>mx(n,s)))),J(this,"getPendingSessionRequests",()=>this.client.pendingRequest.getAll()),J(this,"authenticate",async(s,n)=>{var i;this.isInitialized(),this.isValidAuthenticate(s);const o=n&&this.client.core.linkModeSupportedApps.includes(n)&&((i=this.client.metadata.redirect)==null?void 0:i.linkMode),a=o?Ie.link_mode:Ie.relay;a===Ie.relay&&await this.confirmOnlineStateOrThrow();const{chains:r,statement:c="",uri:l,domain:d,nonce:h,type:u,exp:b,nbf:f,methods:y=[],expiry:C}=s,_=[...s.resources||[]],{topic:N,uri:A}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"],transportType:a});this.client.logger.info({message:"Generated new pairing",pairing:{topic:N,uri:A}});const E=await this.client.core.crypto.generateKeyPair(),B=ga(E);if(await Promise.all([this.client.auth.authKeys.set(Aa,{responseTopic:B,publicKey:E}),this.client.auth.pairingTopics.set(B,{topic:B,pairingTopic:N})]),await this.client.core.relayer.subscribe(B,{transportType:a}),this.client.logger.info(`sending request to new pairing topic: ${N}`),y.length>0){const{namespace:S}=Yo(r[0]);let O=m9(S,"request",y);ia(_)&&(O=b9(O,_.pop())),_.push(O)}const P=C&&C>tt.wc_sessionAuthenticate.req.ttl?C:tt.wc_sessionAuthenticate.req.ttl,M={authPayload:{type:u??"caip122",chains:r,statement:c,aud:l,domain:d,version:"1",nonce:h,iat:new Date().toISOString(),exp:b,nbf:f,resources:_},requester:{publicKey:E,metadata:this.client.metadata},expiryTimestamp:Me(P)},R={eip155:{chains:r,methods:[...new Set(["personal_sign",...y])],events:["chainChanged","accountsChanged"]}},L={requiredNamespaces:{},optionalNamespaces:R,relays:[{protocol:"irn"}],pairingTopic:N,proposer:{publicKey:E,metadata:this.client.metadata},expiryTimestamp:Me(tt.wc_sessionPropose.req.ttl),id:is()},{done:q,resolve:K,reject:j}=wn(P,"Request expired"),D=is(),F=Ae("session_connect",L.id),p=Ae("session_request",D),g=async({error:S,session:O})=>{this.events.off(p,w),S?j(S):O&&K({session:O})},w=async S=>{var O,z,H;if(await this.deletePendingAuthRequest(D,{message:"fulfilled",code:0}),S.error){const ce=_e("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return S.error.code===ce.code?void 0:(this.events.off(F,g),j(S.error.message))}await this.deleteProposal(L.id),this.events.off(F,g);const{cacaos:Y,responder:W}=S.result,X=[],ee=[];for(const ce of Y){await Vf({cacao:ce,projectId:this.client.core.projectId})||(this.client.logger.error(ce,"Signature verification failed"),j(_e("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:se}=ce,I=ia(se.resources),m=[fc(se.iss)],v=na(se.iss);if(I){const x=Gf(I),k=Yf(I);X.push(...x),m.push(...k)}for(const x of m)ee.push(`${x}:${v}`)}const ie=await this.client.core.crypto.generateSharedKey(E,W.publicKey);let he;X.length>0&&(he={topic:ie,acknowledged:!0,self:{publicKey:E,metadata:this.client.metadata},peer:W,controller:W.publicKey,expiry:Me(ni),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:N,namespaces:sm([...new Set(X)],[...new Set(ee)]),transportType:a},await this.client.core.relayer.subscribe(ie,{transportType:a}),await this.client.session.set(ie,he),N&&await this.client.core.pairing.updateMetadata({topic:N,metadata:W.metadata}),he=this.client.session.get(ie)),(O=this.client.metadata.redirect)!=null&&O.linkMode&&(z=W.metadata.redirect)!=null&&z.linkMode&&(H=W.metadata.redirect)!=null&&H.universal&&n&&(this.client.core.addLinkModeSupportedApp(W.metadata.redirect.universal),this.client.session.update(ie,{transportType:Ie.link_mode})),K({auths:Y,session:he})};this.events.once(F,g),this.events.once(p,w);let T;try{if(o){const S=Is("wc_sessionAuthenticate",M,D);this.client.core.history.set(N,S);const O=await this.client.core.crypto.encode("",S,{type:qi,encoding:sn});T=ya(n,N,O)}else await Promise.all([this.sendRequest({topic:N,method:"wc_sessionAuthenticate",params:M,expiry:s.expiry,throwOnFailedPublish:!0,clientRpcId:D}),this.sendRequest({topic:N,method:"wc_sessionPropose",params:L,expiry:tt.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:L.id})])}catch(S){throw this.events.off(F,g),this.events.off(p,w),S}return await this.setProposal(L.id,L),await this.setAuthRequest(D,{request:ct(De({},M),{verifyContext:{}}),pairingTopic:N,transportType:a}),{uri:T??A,response:q}}),J(this,"approveSessionAuthenticate",async s=>{const{id:n,auths:i}=s,o=this.client.core.eventClient.createEvent({properties:{topic:n.toString(),trace:[Tn.authenticated_session_approve_started]}});try{this.isInitialized()}catch(C){throw o.setError(Qi.no_internet_connection),C}const a=this.getPendingAuthRequest(n);if(!a)throw o.setError(Qi.authenticated_session_pending_request_not_found),new Error(`Could not find pending auth request with id ${n}`);const r=a.transportType||Ie.relay;r===Ie.relay&&await this.confirmOnlineStateOrThrow();const c=a.requester.publicKey,l=await this.client.core.crypto.generateKeyPair(),d=ga(c),h={type:Bs,receiverPublicKey:c,senderPublicKey:l},u=[],b=[];for(const C of i){if(!await Vf({cacao:C,projectId:this.client.core.projectId})){o.setError(Qi.invalid_cacao);const B=_e("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:n,topic:d,error:B,encodeOpts:h}),new Error(B.message)}o.addTrace(Tn.cacaos_verified);const{p:_}=C,N=ia(_.resources),A=[fc(_.iss)],E=na(_.iss);if(N){const B=Gf(N),P=Yf(N);u.push(...B),A.push(...P)}for(const B of A)b.push(`${B}:${E}`)}const f=await this.client.core.crypto.generateSharedKey(l,c);o.addTrace(Tn.create_authenticated_session_topic);let y;if((u==null?void 0:u.length)>0){y={topic:f,acknowledged:!0,self:{publicKey:l,metadata:this.client.metadata},peer:{publicKey:c,metadata:a.requester.metadata},controller:c,expiry:Me(ni),authentication:i,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:a.pairingTopic,namespaces:sm([...new Set(u)],[...new Set(b)]),transportType:r},o.addTrace(Tn.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(f,{transportType:r})}catch(C){throw o.setError(Qi.subscribe_authenticated_session_topic_failure),C}o.addTrace(Tn.subscribe_authenticated_session_topic_success),await this.client.session.set(f,y),o.addTrace(Tn.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:a.pairingTopic,metadata:a.requester.metadata})}o.addTrace(Tn.publishing_authenticated_session_approve);try{await this.sendResult({topic:d,id:n,result:{cacaos:i,responder:{publicKey:l,metadata:this.client.metadata}},encodeOpts:h,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(a.requester.metadata,r)})}catch(C){throw o.setError(Qi.authenticated_session_approve_publish_failure),C}return await this.client.auth.requests.delete(n,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:a.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:o.eventId}),{session:y}}),J(this,"rejectSessionAuthenticate",async s=>{this.isInitialized();const{id:n,reason:i}=s,o=this.getPendingAuthRequest(n);if(!o)throw new Error(`Could not find pending auth request with id ${n}`);o.transportType===Ie.relay&&await this.confirmOnlineStateOrThrow();const a=o.requester.publicKey,r=await this.client.core.crypto.generateKeyPair(),c=ga(a),l={type:Bs,receiverPublicKey:a,senderPublicKey:r};await this.sendError({id:n,topic:c,error:i,encodeOpts:l,rpcOpts:tt.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(o.requester.metadata,o.transportType)}),await this.client.auth.requests.delete(n,{message:"rejected",code:0}),await this.deleteProposal(n)}),J(this,"formatAuthMessage",s=>{this.isInitialized();const{request:n,iss:i}=s;return Kf(n,i)}),J(this,"processRelayMessageCache",()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{const s=this.relayMessageCache.shift();s&&await this.onRelayMessage(s)}catch(s){this.client.logger.error(s)}},50)}),J(this,"cleanupDuplicatePairings",async s=>{if(s.pairingTopic)try{const n=this.client.core.pairing.pairings.get(s.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(o=>{var a,r;return((a=o.peerMetadata)==null?void 0:a.url)&&((r=o.peerMetadata)==null?void 0:r.url)===s.peer.metadata.url&&o.topic&&o.topic!==n.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(o=>this.client.core.pairing.disconnect({topic:o.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}}),J(this,"deleteSession",async s=>{var n;const{topic:i,expirerHasDeleted:o=!1,emitEvent:a=!0,id:r=0}=s,{self:c}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),await this.client.session.delete(i,_e("USER_DISCONNECTED")),this.addToRecentlyDeleted(i,"session"),this.client.core.crypto.keychain.has(c.publicKey)&&await this.client.core.crypto.deleteKeyPair(c.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),o||this.client.core.expirer.del(i),this.client.core.storage.removeItem(h0).catch(l=>this.client.logger.warn(l)),this.getPendingSessionRequests().forEach(l=>{l.topic===i&&this.deletePendingSessionRequest(l.id,_e("USER_DISCONNECTED"))}),i===((n=this.sessionRequestQueue.queue[0])==null?void 0:n.topic)&&(this.sessionRequestQueue.state=ls.idle),a&&this.client.events.emit("session_delete",{id:r,topic:i})}),J(this,"deleteProposal",async(s,n)=>{if(n)try{const i=this.client.proposal.get(s),o=this.client.core.eventClient.getEvent({topic:i.pairingTopic});o==null||o.setError(Bn.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(s,_e("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(s)]),this.addToRecentlyDeleted(s,"proposal")}),J(this,"deletePendingSessionRequest",async(s,n,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(s,n),i?Promise.resolve():this.client.core.expirer.del(s)]),this.addToRecentlyDeleted(s,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(o=>o.id!==s),i&&(this.sessionRequestQueue.state=ls.idle,this.client.events.emit("session_request_expire",{id:s}))}),J(this,"deletePendingAuthRequest",async(s,n,i=!1)=>{await Promise.all([this.client.auth.requests.delete(s,n),i?Promise.resolve():this.client.core.expirer.del(s)])}),J(this,"setExpiry",async(s,n)=>{this.client.session.keys.includes(s)&&(this.client.core.expirer.set(s,n),await this.client.session.update(s,{expiry:n}))}),J(this,"setProposal",async(s,n)=>{this.client.core.expirer.set(s,Me(tt.wc_sessionPropose.req.ttl)),await this.client.proposal.set(s,n)}),J(this,"setAuthRequest",async(s,n)=>{const{request:i,pairingTopic:o,transportType:a=Ie.relay}=n;this.client.core.expirer.set(s,i.expiryTimestamp),await this.client.auth.requests.set(s,{authPayload:i.authPayload,requester:i.requester,expiryTimestamp:i.expiryTimestamp,id:s,pairingTopic:o,verifyContext:i.verifyContext,transportType:a})}),J(this,"setPendingSessionRequest",async s=>{const{id:n,topic:i,params:o,verifyContext:a}=s,r=o.request.expiryTimestamp||Me(tt.wc_sessionRequest.req.ttl);this.client.core.expirer.set(n,r),await this.client.pendingRequest.set(n,{id:n,topic:i,params:o,verifyContext:a})}),J(this,"sendRequest",async s=>{const{topic:n,method:i,params:o,expiry:a,relayRpcId:r,clientRpcId:c,throwOnFailedPublish:l,appLink:d,tvf:h,publishOpts:u={}}=s,b=Is(i,o,c);let f;const y=!!d;try{const N=y?sn:kt;f=await this.client.core.crypto.encode(n,b,{encoding:N})}catch(N){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${n} failed`),N}let C;if(TD.includes(i)){const N=Nt(JSON.stringify(b)),A=Nt(f);C=await this.client.core.verify.register({id:A,decryptedId:N})}const _=De(De({},tt[i].req),u);if(_.attestation=C,a&&(_.ttl=a),r&&(_.id=r),this.client.core.history.set(n,b),y){const N=ya(d,n,f);await global.Linking.openURL(N,this.client.name)}else _.tvf=ct(De({},h),{correlationId:b.id}),l?(_.internal=ct(De({},_.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,f,_)):this.client.core.relayer.publish(n,f,_).catch(N=>this.client.logger.error(N));return b.id}),J(this,"sendProposeSession",async s=>{const{proposal:n,publishOpts:i}=s,o=Is("wc_sessionPropose",n,n.id);this.client.core.history.set(n.pairingTopic,o);const a=await this.client.core.crypto.encode(n.pairingTopic,o,{encoding:kt}),r=Nt(JSON.stringify(o)),c=Nt(a),l=await this.client.core.verify.register({id:c,decryptedId:r});await this.client.core.relayer.publishCustom({payload:{pairingTopic:n.pairingTopic,sessionProposal:a},opts:ct(De({},i),{publishMethod:"wc_proposeSession",attestation:l})})}),J(this,"sendApproveSession",async s=>{const{sessionTopic:n,pairingProposalResponse:i,proposal:o,sessionSettleRequest:a,publishOpts:r}=s,c=va(o.id,i),l=await this.client.core.crypto.encode(o.pairingTopic,c,{encoding:kt}),d=Is("wc_sessionSettle",a,r==null?void 0:r.id),h=await this.client.core.crypto.encode(n,d,{encoding:kt});this.client.core.history.set(n,d),await this.client.core.relayer.publishCustom({payload:{sessionTopic:n,pairingTopic:o.pairingTopic,sessionProposalResponse:l,sessionSettlementRequest:h},opts:ct(De({},r),{publishMethod:"wc_approveSession"})})}),J(this,"sendResult",async s=>{const{id:n,topic:i,result:o,throwOnFailedPublish:a,encodeOpts:r,appLink:c}=s,l=va(n,o);let d;const h=c&&typeof(global==null?void 0:global.Linking)<"u";try{const f=h?sn:kt;d=await this.client.core.crypto.encode(i,l,ct(De({},r||{}),{encoding:f}))}catch(f){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${i} failed`),f}let u,b;try{u=await this.client.core.history.get(i,n);const f=u.request;try{b=this.getTVFParams(n,f.params,o)}catch(y){this.client.logger.warn(`sendResult() -> getTVFParams() failed: ${y==null?void 0:y.message}`)}}catch(f){throw this.client.logger.error(`sendResult() -> history.get(${i}, ${n}) failed`),f}if(h){const f=ya(c,i,d);await global.Linking.openURL(f,this.client.name)}else{const f=u.request.method,y=tt[f].res;y.tvf=ct(De({},b),{correlationId:n}),a?(y.internal=ct(De({},y.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,d,y)):this.client.core.relayer.publish(i,d,y).catch(C=>this.client.logger.error(C))}await this.client.core.history.resolve(l)}),J(this,"sendError",async s=>{const{id:n,topic:i,error:o,encodeOpts:a,rpcOpts:r,appLink:c}=s,l=Wc(n,o);let d;const h=c&&typeof(global==null?void 0:global.Linking)<"u";try{const b=h?sn:kt;d=await this.client.core.crypto.encode(i,l,ct(De({},a||{}),{encoding:b}))}catch(b){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${i} failed`),b}let u;try{u=await this.client.core.history.get(i,n)}catch(b){throw this.client.logger.error(`sendError() -> history.get(${i}, ${n}) failed`),b}if(h){const b=ya(c,i,d);await global.Linking.openURL(b,this.client.name)}else{const b=u.request.method,f=r||tt[b].res;this.client.core.relayer.publish(i,d,f)}await this.client.core.history.resolve(l)}),J(this,"cleanup",async()=>{const s=[],n=[];this.client.session.getAll().forEach(i=>{let o=!1;js(i.expiry)&&(o=!0),this.client.core.crypto.keychain.has(i.topic)||(o=!0),o&&s.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{js(i.expiryTimestamp)&&n.push(i.id)}),await Promise.all([...s.map(i=>this.deleteSession({topic:i})),...n.map(i=>this.deleteProposal(i))])}),J(this,"onProviderMessageEvent",async s=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(s):await this.onRelayMessage(s)}),J(this,"onRelayEventRequest",async s=>{this.requestQueue.queue.push(s),await this.processRequestsQueue()}),J(this,"processRequestsQueue",async()=>{if(this.requestQueue.state===ls.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=ls.active;const s=this.requestQueue.queue.shift();if(s)try{await this.processRequest(s)}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=ls.idle}),J(this,"processRequest",async s=>{const{topic:n,payload:i,attestation:o,transportType:a,encryptedId:r}=s,c=i.method;if(!this.shouldIgnorePairingRequest({topic:n,requestMethod:c}))switch(c){case"wc_sessionPropose":return await this.onSessionProposeRequest({topic:n,payload:i,attestation:o,encryptedId:r});case"wc_sessionSettle":return await this.onSessionSettleRequest(n,i);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(n,i);case"wc_sessionExtend":return await this.onSessionExtendRequest(n,i);case"wc_sessionPing":return await this.onSessionPingRequest(n,i);case"wc_sessionDelete":return await this.onSessionDeleteRequest(n,i);case"wc_sessionRequest":return await this.onSessionRequest({topic:n,payload:i,attestation:o,encryptedId:r,transportType:a});case"wc_sessionEvent":return await this.onSessionEventRequest(n,i);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest({topic:n,payload:i,attestation:o,encryptedId:r,transportType:a});default:return this.client.logger.info(`Unsupported request method ${c}`)}}),J(this,"onRelayEventResponse",async s=>{const{topic:n,payload:i,transportType:o}=s,a=(await this.client.core.history.get(n,i.id)).request.method;switch(a){case"wc_sessionPropose":return this.onSessionProposeResponse(n,i,o);case"wc_sessionSettle":return this.onSessionSettleResponse(n,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,i);case"wc_sessionExtend":return this.onSessionExtendResponse(n,i);case"wc_sessionPing":return this.onSessionPingResponse(n,i);case"wc_sessionRequest":return this.onSessionRequestResponse(n,i);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(n,i);default:return this.client.logger.info(`Unsupported response method ${a}`)}}),J(this,"onRelayEventUnknownPayload",s=>{const{topic:n}=s,{message:i}=oe("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)}),J(this,"shouldIgnorePairingRequest",s=>{const{topic:n,requestMethod:i}=s,o=this.expectedPairingMethodMap.get(n);return!o||o.includes(i)?!1:!!(o.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)}),J(this,"onSessionProposeRequest",async s=>{const{topic:n,payload:i,attestation:o,encryptedId:a}=s,{params:r,id:c}=i;try{const l=this.client.core.eventClient.getEvent({topic:n});this.client.events.listenerCount("session_proposal")===0&&(console.warn("No listener for session_proposal event"),l==null||l.setError(_s.proposal_listener_not_found)),this.isValidConnect(De({},i.params));const d=r.expiryTimestamp||Me(tt.wc_sessionPropose.req.ttl),h=De({id:c,pairingTopic:n,expiryTimestamp:d,attestation:o,encryptedId:a},r);await this.setProposal(c,h);const u=await this.getVerifyContext({attestationId:o,hash:Nt(JSON.stringify(i)),encryptedId:a,metadata:h.proposer.metadata});l==null||l.addTrace(rs.emit_session_proposal),this.client.events.emit("session_proposal",{id:c,params:h,verifyContext:u})}catch(l){await this.sendError({id:c,topic:n,error:l,rpcOpts:tt.wc_sessionPropose.autoReject}),this.client.logger.error(l)}}),J(this,"onSessionProposeResponse",async(s,n,i)=>{const{id:o}=n;if(os(n)){const{result:a}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:a});const r=this.client.proposal.get(o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:r});const c=r.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:c});const l=a.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:l});const d=await this.client.core.crypto.generateSharedKey(c,l);this.pendingSessions.set(o,{sessionTopic:d,pairingTopic:s,proposalId:o,publicKey:c});const h=await this.client.core.relayer.subscribe(d,{transportType:i});this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:h}),await this.client.core.pairing.activate({topic:s})}else if(Lt(n)){await this.deleteProposal(o);const a=Ae("session_connect",o);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners, 954`);this.events.emit(a,{error:n.error})}}),J(this,"onSessionSettleRequest",async(s,n)=>{const{id:i,params:o}=n;try{this.isValidSessionSettleRequest(o);const{relay:a,controller:r,expiry:c,namespaces:l,sessionProperties:d,scopedProperties:h,sessionConfig:u}=n.params,b=[...this.pendingSessions.values()].find(C=>C.sessionTopic===s);if(!b)return this.client.logger.error(`Pending session not found for topic ${s}`);const f=this.client.proposal.get(b.proposalId),y=ct(De(De(De({topic:s,relay:a,expiry:c,namespaces:l,acknowledged:!0,pairingTopic:b.pairingTopic,requiredNamespaces:f.requiredNamespaces,optionalNamespaces:f.optionalNamespaces,controller:r.publicKey,self:{publicKey:b.publicKey,metadata:this.client.metadata},peer:{publicKey:r.publicKey,metadata:r.metadata}},d&&{sessionProperties:d}),h&&{scopedProperties:h}),u&&{sessionConfig:u}),{transportType:Ie.relay});await this.client.session.set(y.topic,y),await this.setExpiry(y.topic,y.expiry),await this.client.core.pairing.updateMetadata({topic:b.pairingTopic,metadata:y.peer.metadata}),this.client.events.emit("session_connect",{session:y}),this.events.emit(Ae("session_connect",b.proposalId),{session:y}),this.pendingSessions.delete(b.proposalId),this.deleteProposal(b.proposalId,!1),this.cleanupDuplicatePairings(y),await this.sendResult({id:n.id,topic:s,result:!0})}catch(a){await this.sendError({id:i,topic:s,error:a}),this.client.logger.error(a)}}),J(this,"onSessionSettleResponse",async(s,n)=>{const{id:i}=n;os(n)?(await this.client.session.update(s,{acknowledged:!0}),this.events.emit(Ae("session_approve",i),{})):Lt(n)&&(await this.client.session.delete(s,_e("USER_DISCONNECTED")),this.events.emit(Ae("session_approve",i),{error:n.error}))}),J(this,"onSessionUpdateRequest",async(s,n)=>{const{params:i,id:o}=n;try{const a=`${s}_session_update`,r=Wi.get(a);if(r&&this.isRequestOutOfSync(r,o)){this.client.logger.warn(`Discarding out of sync request - ${o}`),this.sendError({id:o,topic:s,error:_e("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(De({topic:s},i));try{Wi.set(a,o),await this.client.session.update(s,{namespaces:i.namespaces}),await this.sendResult({id:o,topic:s,result:!0})}catch(c){throw Wi.delete(a),c}this.client.events.emit("session_update",{id:o,topic:s,params:i})}catch(a){await this.sendError({id:o,topic:s,error:a}),this.client.logger.error(a)}}),J(this,"isRequestOutOfSync",(s,n)=>n.toString().slice(0,-3)<s.toString().slice(0,-3)),J(this,"onSessionUpdateResponse",(s,n)=>{const{id:i}=n,o=Ae("session_update",i);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners`);os(n)?this.events.emit(Ae("session_update",i),{}):Lt(n)&&this.events.emit(Ae("session_update",i),{error:n.error})}),J(this,"onSessionExtendRequest",async(s,n)=>{const{id:i}=n;try{this.isValidExtend({topic:s}),await this.setExpiry(s,Me(ni)),await this.sendResult({id:i,topic:s,result:!0}),this.client.events.emit("session_extend",{id:i,topic:s})}catch(o){await this.sendError({id:i,topic:s,error:o}),this.client.logger.error(o)}}),J(this,"onSessionExtendResponse",(s,n)=>{const{id:i}=n,o=Ae("session_extend",i);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners`);os(n)?this.events.emit(Ae("session_extend",i),{}):Lt(n)&&this.events.emit(Ae("session_extend",i),{error:n.error})}),J(this,"onSessionPingRequest",async(s,n)=>{const{id:i}=n;try{this.isValidPing({topic:s}),await this.sendResult({id:i,topic:s,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:i,topic:s})}catch(o){await this.sendError({id:i,topic:s,error:o}),this.client.logger.error(o)}}),J(this,"onSessionPingResponse",(s,n)=>{const{id:i}=n,o=Ae("session_ping",i);setTimeout(()=>{if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners 2176`);os(n)?this.events.emit(Ae("session_ping",i),{}):Lt(n)&&this.events.emit(Ae("session_ping",i),{error:n.error})},500)}),J(this,"onSessionDeleteRequest",async(s,n)=>{const{id:i}=n;try{this.isValidDisconnect({topic:s,reason:n.params}),await Promise.all([new Promise(o=>{this.client.core.relayer.once(Re.publish,async()=>{o(await this.deleteSession({topic:s,id:i}))})}),this.sendResult({id:i,topic:s,result:!0}),this.cleanupPendingSentRequestsForTopic({topic:s,error:_e("USER_DISCONNECTED")})]).catch(o=>this.client.logger.error(o))}catch(o){this.client.logger.error(o)}}),J(this,"onSessionRequest",async s=>{var n,i,o;const{topic:a,payload:r,attestation:c,encryptedId:l,transportType:d}=s,{id:h,params:u}=r;try{await this.isValidRequest(De({topic:a},u));const b=this.client.session.get(a),f=await this.getVerifyContext({attestationId:c,hash:Nt(JSON.stringify(Is("wc_sessionRequest",u,h))),encryptedId:l,metadata:b.peer.metadata,transportType:d}),y={id:h,topic:a,params:u,verifyContext:f};await this.setPendingSessionRequest(y),d===Ie.link_mode&&(n=b.peer.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp((i=b.peer.metadata.redirect)==null?void 0:i.universal),(o=this.client.signConfig)!=null&&o.disableRequestQueue?this.emitSessionRequest(y):(this.addSessionRequestToSessionRequestQueue(y),this.processSessionRequestQueue())}catch(b){await this.sendError({id:h,topic:a,error:b}),this.client.logger.error(b)}}),J(this,"onSessionRequestResponse",(s,n)=>{const{id:i}=n,o=Ae("session_request",i);if(this.events.listenerCount(o)===0)throw new Error(`emitting ${o} without any listeners`);os(n)?this.events.emit(Ae("session_request",i),{result:n.result}):Lt(n)&&this.events.emit(Ae("session_request",i),{error:n.error})}),J(this,"onSessionEventRequest",async(s,n)=>{const{id:i,params:o}=n;try{const a=`${s}_session_event_${o.event.name}`,r=Wi.get(a);if(r&&this.isRequestOutOfSync(r,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(De({topic:s},o)),this.client.events.emit("session_event",{id:i,topic:s,params:o}),Wi.set(a,i)}catch(a){await this.sendError({id:i,topic:s,error:a}),this.client.logger.error(a)}}),J(this,"onSessionAuthenticateResponse",(s,n)=>{const{id:i}=n;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:s,payload:n}),os(n)?this.events.emit(Ae("session_request",i),{result:n.result}):Lt(n)&&this.events.emit(Ae("session_request",i),{error:n.error})}),J(this,"onSessionAuthenticateRequest",async s=>{var n;const{topic:i,payload:o,attestation:a,encryptedId:r,transportType:c}=s;try{const{requester:l,authPayload:d,expiryTimestamp:h}=o.params,u=await this.getVerifyContext({attestationId:a,hash:Nt(JSON.stringify(o)),encryptedId:r,metadata:l.metadata,transportType:c}),b={requester:l,pairingTopic:i,id:o.id,authPayload:d,verifyContext:u,expiryTimestamp:h};await this.setAuthRequest(o.id,{request:b,pairingTopic:i,transportType:c}),c===Ie.link_mode&&(n=l.metadata.redirect)!=null&&n.universal&&this.client.core.addLinkModeSupportedApp(l.metadata.redirect.universal),this.client.events.emit("session_authenticate",{topic:i,params:o.params,id:o.id,verifyContext:u})}catch(l){this.client.logger.error(l);const d=o.params.requester.publicKey,h=await this.client.core.crypto.generateKeyPair(),u=this.getAppLinkIfEnabled(o.params.requester.metadata,c),b={type:Bs,receiverPublicKey:d,senderPublicKey:h};await this.sendError({id:o.id,topic:i,error:l,encodeOpts:b,rpcOpts:tt.wc_sessionAuthenticate.autoReject,appLink:u})}}),J(this,"addSessionRequestToSessionRequestQueue",s=>{this.sessionRequestQueue.queue.push(s)}),J(this,"cleanupAfterResponse",s=>{this.deletePendingSessionRequest(s.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=ls.idle,this.processSessionRequestQueue()},re.toMiliseconds(this.requestQueueDelay))}),J(this,"cleanupPendingSentRequestsForTopic",({topic:s,error:n})=>{const i=this.client.core.history.pending;i.length>0&&i.filter(o=>o.topic===s&&o.request.method==="wc_sessionRequest").forEach(o=>{const a=o.request.id,r=Ae("session_request",a);if(this.events.listenerCount(r)===0)throw new Error(`emitting ${r} without any listeners`);this.events.emit(Ae("session_request",o.request.id),{error:n})})}),J(this,"processSessionRequestQueue",()=>{if(this.sessionRequestQueue.state===ls.active){this.client.logger.info("session request queue is already active.");return}const s=this.sessionRequestQueue.queue[0];if(!s){this.client.logger.info("session request queue is empty.");return}try{this.emitSessionRequest(s)}catch(n){this.client.logger.error(n)}}),J(this,"emitSessionRequest",s=>{if(this.emittedSessionRequests.has(s.id)){this.client.logger.warn({id:s.id},`Skipping emitting \`session_request\` event for duplicate request. id: ${s.id}`);return}this.sessionRequestQueue.state=ls.active,this.emittedSessionRequests.add(s.id),this.client.events.emit("session_request",s)}),J(this,"onPairingCreated",s=>{if(s.methods&&this.expectedPairingMethodMap.set(s.topic,s.methods),s.active)return;const n=this.client.proposal.getAll().find(i=>i.pairingTopic===s.topic);n&&this.onSessionProposeRequest({topic:s.topic,payload:Is("wc_sessionPropose",ct(De({},n),{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer,sessionProperties:n.sessionProperties,scopedProperties:n.scopedProperties}),n.id),attestation:n.attestation,encryptedId:n.encryptedId})}),J(this,"isValidConnect",async s=>{if(!Ct(s)){const{message:l}=oe("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(s)}`);throw new Error(l)}const{pairingTopic:n,requiredNamespaces:i,optionalNamespaces:o,sessionProperties:a,scopedProperties:r,relays:c}=s;if(je(n)||await this.isValidPairingTopic(n),!Sx(c)){const{message:l}=oe("MISSING_OR_INVALID",`connect() relays: ${c}`);throw new Error(l)}if(i&&!je(i)&&Ki(i)!==0){const l="requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces";["fatal","error","silent"].includes(this.client.logger.level)?console.warn(l):this.client.logger.warn(l),this.validateNamespaces(i,"requiredNamespaces")}if(o&&!je(o)&&Ki(o)!==0&&this.validateNamespaces(o,"optionalNamespaces"),a&&!je(a)&&this.validateSessionProps(a,"sessionProperties"),r&&!je(r)){this.validateSessionProps(r,"scopedProperties");const l=Object.keys(i||{}).concat(Object.keys(o||{}));if(!Object.keys(r).every(d=>l.includes(d.split(":")[0])))throw new Error(`Scoped properties must be a subset of required/optional namespaces, received: ${JSON.stringify(r)}, required/optional namespaces: ${JSON.stringify(l)}`)}}),J(this,"validateNamespaces",(s,n)=>{const i=Dx(s,"connect()",n);if(i)throw new Error(i.message)}),J(this,"isValidApprove",async s=>{if(!Ct(s))throw new Error(oe("MISSING_OR_INVALID",`approve() params: ${s}`).message);const{id:n,namespaces:i,relayProtocol:o,sessionProperties:a,scopedProperties:r}=s;this.checkRecentlyDeleted(n),await this.isValidProposalId(n);const c=this.client.proposal.get(n),l=$c(i,"approve()");if(l)throw new Error(l.message);const d=rm(c.requiredNamespaces,i,"approve()");if(d)throw new Error(d.message);if(!Ne(o,!0)){const{message:h}=oe("MISSING_OR_INVALID",`approve() relayProtocol: ${o}`);throw new Error(h)}if(a&&!je(a)&&this.validateSessionProps(a,"sessionProperties"),r&&!je(r)){this.validateSessionProps(r,"scopedProperties");const h=new Set(Object.keys(i));if(!Object.keys(r).every(u=>h.has(u.split(":")[0])))throw new Error(`Scoped properties must be a subset of approved namespaces, received: ${JSON.stringify(r)}, approved namespaces: ${Array.from(h).join(", ")}`)}}),J(this,"isValidReject",async s=>{if(!Ct(s)){const{message:o}=oe("MISSING_OR_INVALID",`reject() params: ${s}`);throw new Error(o)}const{id:n,reason:i}=s;if(this.checkRecentlyDeleted(n),await this.isValidProposalId(n),!Tx(i)){const{message:o}=oe("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(o)}}),J(this,"isValidSessionSettleRequest",s=>{if(!Ct(s)){const{message:l}=oe("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${s}`);throw new Error(l)}const{relay:n,controller:i,namespaces:o,expiry:a}=s;if(!om(n)){const{message:l}=oe("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(l)}const r=vx(i,"onSessionSettleRequest()");if(r)throw new Error(r.message);const c=$c(o,"onSessionSettleRequest()");if(c)throw new Error(c.message);if(js(a)){const{message:l}=oe("EXPIRED","onSessionSettleRequest()");throw new Error(l)}}),J(this,"isValidUpdate",async s=>{if(!Ct(s)){const{message:c}=oe("MISSING_OR_INVALID",`update() params: ${s}`);throw new Error(c)}const{topic:n,namespaces:i}=s;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const o=this.client.session.get(n),a=$c(i,"update()");if(a)throw new Error(a.message);const r=rm(o.requiredNamespaces,i,"update()");if(r)throw new Error(r.message)}),J(this,"isValidExtend",async s=>{if(!Ct(s)){const{message:i}=oe("MISSING_OR_INVALID",`extend() params: ${s}`);throw new Error(i)}const{topic:n}=s;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n)}),J(this,"isValidRequest",async s=>{if(!Ct(s)){const{message:c}=oe("MISSING_OR_INVALID",`request() params: ${s}`);throw new Error(c)}const{topic:n,request:i,chainId:o,expiry:a}=s;this.checkRecentlyDeleted(n),await this.isValidSessionTopic(n);const{namespaces:r}=this.client.session.get(n);if(!am(r,o)){const{message:c}=oe("MISSING_OR_INVALID",`request() chainId: ${o}`);throw new Error(c)}if(!Fx(i)){const{message:c}=oe("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(c)}if(!Ox(r,o,i.method)){const{message:c}=oe("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(c)}if(a&&!Nx(a,ul)){const{message:c}=oe("MISSING_OR_INVALID",`request() expiry: ${a}. Expiry must be a number (in seconds) between ${ul.min} and ${ul.max}`);throw new Error(c)}}),J(this,"isValidRespond",async s=>{var n;if(!Ct(s)){const{message:r}=oe("MISSING_OR_INVALID",`respond() params: ${s}`);throw new Error(r)}const{topic:i,response:o}=s;try{await this.isValidSessionTopic(i)}catch(r){throw(n=s==null?void 0:s.response)!=null&&n.id&&this.cleanupAfterResponse(s),r}if(!Ix(o)){const{message:r}=oe("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(o)}`);throw new Error(r)}const a=this.client.pendingRequest.get(o.id);if(a.topic!==i){const{message:r}=oe("MISMATCHED_TOPIC",`Request response topic mismatch. reqId: ${o.id}, expected topic: ${a.topic}, received topic: ${i}`);throw new Error(r)}}),J(this,"isValidPing",async s=>{if(!Ct(s)){const{message:i}=oe("MISSING_OR_INVALID",`ping() params: ${s}`);throw new Error(i)}const{topic:n}=s;await this.isValidSessionOrPairingTopic(n)}),J(this,"isValidEmit",async s=>{if(!Ct(s)){const{message:r}=oe("MISSING_OR_INVALID",`emit() params: ${s}`);throw new Error(r)}const{topic:n,event:i,chainId:o}=s;await this.isValidSessionTopic(n);const{namespaces:a}=this.client.session.get(n);if(!am(a,o)){const{message:r}=oe("MISSING_OR_INVALID",`emit() chainId: ${o}`);throw new Error(r)}if(!_x(i)){const{message:r}=oe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(r)}if(!Px(a,o,i.name)){const{message:r}=oe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(r)}}),J(this,"isValidDisconnect",async s=>{if(!Ct(s)){const{message:i}=oe("MISSING_OR_INVALID",`disconnect() params: ${s}`);throw new Error(i)}const{topic:n}=s;await this.isValidSessionOrPairingTopic(n)}),J(this,"isValidAuthenticate",s=>{const{chains:n,uri:i,domain:o,nonce:a}=s;if(!Array.isArray(n)||n.length===0)throw new Error("chains is required and must be a non-empty array");if(!Ne(i,!1))throw new Error("uri is required parameter");if(!Ne(o,!1))throw new Error("domain is required parameter");if(!Ne(a,!1))throw new Error("nonce is required parameter");if([...new Set(n.map(c=>Yo(c).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:r}=Yo(n[0]);if(r!=="eip155")throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")}),J(this,"getVerifyContext",async s=>{const{attestationId:n,hash:i,encryptedId:o,metadata:a,transportType:r}=s,c={verified:{verifyUrl:a.verifyUrl||Xi,validation:"UNKNOWN",origin:a.url||""}};try{if(r===Ie.link_mode){const d=this.getAppLinkIfEnabled(a,r);return c.verified.validation=d&&new URL(d).origin===new URL(a.url).origin?"VALID":"INVALID",c}const l=await this.client.core.verify.resolve({attestationId:n,hash:i,encryptedId:o,verifyUrl:a.verifyUrl});l&&(c.verified.origin=l.origin,c.verified.isScam=l.isScam,c.verified.validation=l.origin===new URL(a.url).origin?"VALID":"INVALID")}catch(l){this.client.logger.warn(l)}return this.client.logger.debug(`Verify context: ${JSON.stringify(c)}`),c}),J(this,"validateSessionProps",(s,n)=>{Object.values(s).forEach((i,o)=>{if(i==null){const{message:a}=oe("MISSING_OR_INVALID",`${n} must contain an existing value for each key. Received: ${i} for key ${Object.keys(s)[o]}`);throw new Error(a)}})}),J(this,"getPendingAuthRequest",s=>{const n=this.client.auth.requests.get(s);return typeof n=="object"?n:void 0}),J(this,"addToRecentlyDeleted",(s,n)=>{if(this.recentlyDeletedMap.set(s,n),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let i=0;const o=this.recentlyDeletedLimit/2;for(const a of this.recentlyDeletedMap.keys()){if(i++>=o)break;this.recentlyDeletedMap.delete(a)}}}),J(this,"checkRecentlyDeleted",s=>{const n=this.recentlyDeletedMap.get(s);if(n){const{message:i}=oe("MISSING_OR_INVALID",`Record was recently deleted - ${n}: ${s}`);throw new Error(i)}}),J(this,"isLinkModeEnabled",(s,n)=>{var i,o,a,r,c,l,d,h,u;return!s||n!==Ie.link_mode?!1:((o=(i=this.client.metadata)==null?void 0:i.redirect)==null?void 0:o.linkMode)===!0&&((r=(a=this.client.metadata)==null?void 0:a.redirect)==null?void 0:r.universal)!==void 0&&((l=(c=this.client.metadata)==null?void 0:c.redirect)==null?void 0:l.universal)!==""&&((d=s==null?void 0:s.redirect)==null?void 0:d.universal)!==void 0&&((h=s==null?void 0:s.redirect)==null?void 0:h.universal)!==""&&((u=s==null?void 0:s.redirect)==null?void 0:u.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(s.redirect.universal)&&typeof(global==null?void 0:global.Linking)<"u"}),J(this,"getAppLinkIfEnabled",(s,n)=>{var i;return this.isLinkModeEnabled(s,n)?(i=s==null?void 0:s.redirect)==null?void 0:i.universal:void 0}),J(this,"handleLinkModeMessage",({url:s})=>{if(!s||!s.includes("wc_ev")||!s.includes("topic"))return;const n=wf(s,"topic")||"",i=decodeURIComponent(wf(s,"wc_ev")||""),o=this.client.session.keys.includes(n);o&&this.client.session.update(n,{transportType:Ie.link_mode}),this.client.core.dispatchEnvelope({topic:n,message:i,sessionExists:o})}),J(this,"registerLinkModeListeners",async()=>{var s;if(oc()||zs()&&(s=this.client.metadata.redirect)!=null&&s.linkMode){const n=global==null?void 0:global.Linking;if(typeof n<"u"){n.addEventListener("url",this.handleLinkModeMessage,this.client.name);const i=await n.getInitialURL();i&&setTimeout(()=>{this.handleLinkModeMessage({url:i})},50)}}}),J(this,"getTVFParams",(s,n,i)=>{var o,a,r;if(!((o=n.request)!=null&&o.method))return{};const c={correlationId:s,rpcMethods:[n.request.method],chainId:n.chainId};try{const l=this.extractTxHashesFromResult(n.request,i);c.txHashes=l,c.contractAddresses=this.isValidContractData(n.request.params)?[(r=(a=n.request.params)==null?void 0:a[0])==null?void 0:r.to]:[]}catch(l){this.client.logger.warn(l,"Error getting TVF params")}return c}),J(this,"isValidContractData",s=>{var n;if(!s)return!1;try{const i=(s==null?void 0:s.data)||((n=s==null?void 0:s[0])==null?void 0:n.data);if(!i.startsWith("0x"))return!1;const o=i.slice(2);return/^[0-9a-fA-F]*$/.test(o)?o.length%2===0:!1}catch{}return!1}),J(this,"extractTxHashesFromResult",(s,n)=>{var i;try{if(!n)return[];const o=s.method,a=SD[o];if(o==="sui_signTransaction")return[Qv(n.transactionBytes)];if(o==="near_signTransaction")return[zf(n)];if(o==="near_signTransactions")return n.map(c=>zf(c));if(o==="xrpl_signTransactionFor"||o==="xrpl_signTransaction")return[(i=n.tx_json)==null?void 0:i.hash];if(o==="polkadot_signTransaction")return[Qx({transaction:s.params.transactionPayload,signature:n.signature})];if(o==="algo_signTxn")return ei(n)?n.map(c=>jf(c)):[jf(n)];if(o==="cosmos_signDirect")return[e9(n)];if(o==="wallet_sendCalls")return t9(n);if(typeof n=="string")return[n];const r=n[a.key];if(ei(r))return o==="solana_signAllTransactions"?r.map(c=>Xv(c)):r;if(typeof r=="string")return[r]}catch(o){this.client.logger.warn(o,"Error extracting tx hashes from result")}return[]})}async processPendingMessageEvents(){try{const e=this.client.session.keys,s=this.client.core.relayer.messages.getWithoutAck(e);for(const[n,i]of Object.entries(s))for(const o of i)try{await this.onProviderMessageEvent({topic:n,message:o,publishedAt:Date.now()})}catch{this.client.logger.warn(`Error processing pending message event for topic: ${n}, message: ${o}`)}}catch(e){this.client.logger.warn(e,"processPendingMessageEvents failed")}}isInitialized(){if(!this.initialized){const{message:e}=oe("NOT_INITIALIZED",this.name);throw new Error(e)}}async confirmOnlineStateOrThrow(){await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(Re.message,e=>{this.onProviderMessageEvent(e)})}async onRelayMessage(e){const{topic:s,message:n,attestation:i,transportType:o}=e,{publicKey:a}=this.client.auth.authKeys.keys.includes(Aa)?this.client.auth.authKeys.get(Aa):{publicKey:void 0};try{const r=await this.client.core.crypto.decode(s,n,{receiverPublicKey:a,encoding:o===Ie.link_mode?sn:kt});Gc(r)?(this.client.core.history.set(s,r),await this.onRelayEventRequest({topic:s,payload:r,attestation:i,transportType:o,encryptedId:Nt(n)})):xa(r)?(await this.client.core.history.resolve(r),await this.onRelayEventResponse({topic:s,payload:r,transportType:o}),this.client.core.history.delete(s,r.id)):await this.onRelayEventUnknownPayload({topic:s,payload:r,transportType:o}),await this.client.core.relayer.messages.ack(s,n)}catch(r){this.client.logger.error(r)}}registerExpirerEvents(){this.client.core.expirer.on(Mt.expired,async e=>{const{topic:s,id:n}=yf(e.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,oe("EXPIRED"),!0);if(n&&this.client.auth.requests.keys.includes(n))return await this.deletePendingAuthRequest(n,oe("EXPIRED"),!0);s?this.client.session.keys.includes(s)&&(await this.deleteSession({topic:s,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:s})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(Sn.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(Sn.delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!Ne(e,!1)){const{message:s}=oe("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(s)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:s}=oe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(s)}if(js(this.client.core.pairing.pairings.get(e).expiry)){const{message:s}=oe("EXPIRED",`pairing topic: ${e}`);throw new Error(s)}}async isValidSessionTopic(e){if(!Ne(e,!1)){const{message:s}=oe("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(s)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){const{message:s}=oe("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(s)}if(js(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:s}=oe("EXPIRED",`session topic: ${e}`);throw new Error(s)}if(!this.client.core.crypto.keychain.has(e)){const{message:s}=oe("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(s)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(Ne(e,!1)){const{message:s}=oe("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(s)}else{const{message:s}=oe("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(s)}}async isValidProposalId(e){if(!Bx(e)){const{message:s}=oe("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(s)}if(!this.client.proposal.keys.includes(e)){const{message:s}=oe("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(s)}if(js(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:s}=oe("EXPIRED",`proposal id: ${e}`);throw new Error(s)}}}class zD extends Fn{constructor(e,s){super(e,s,CD,dl),this.core=e,this.logger=s}}class jD extends Fn{constructor(e,s){super(e,s,AD,dl),this.core=e,this.logger=s}}class qD extends Fn{constructor(e,s){super(e,s,BD,dl,n=>n.id),this.core=e,this.logger=s}}class HD extends Fn{constructor(e,s){super(e,s,_D,Ca,()=>Aa),this.core=e,this.logger=s}}class VD extends Fn{constructor(e,s){super(e,s,OD,Ca),this.core=e,this.logger=s}}class KD extends Fn{constructor(e,s){super(e,s,PD,Ca,n=>n.id),this.core=e,this.logger=s}}var WD=Object.defineProperty,GD=(t,e,s)=>e in t?WD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,pl=(t,e,s)=>GD(t,typeof e!="symbol"?e+"":e,s);class YD{constructor(e,s){this.core=e,this.logger=s,pl(this,"authKeys"),pl(this,"pairingTopics"),pl(this,"requests"),this.authKeys=new HD(this.core,this.logger),this.pairingTopics=new VD(this.core,this.logger),this.requests=new KD(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}var ZD=Object.defineProperty,XD=(t,e,s)=>e in t?ZD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,xe=(t,e,s)=>XD(t,typeof e!="symbol"?e+"":e,s);class ml extends Ry{constructor(e){super(e),xe(this,"protocol",c0),xe(this,"version",l0),xe(this,"name",hl.name),xe(this,"metadata"),xe(this,"core"),xe(this,"logger"),xe(this,"events",new Kt.EventEmitter),xe(this,"engine"),xe(this,"session"),xe(this,"proposal"),xe(this,"pendingRequest"),xe(this,"auth"),xe(this,"signConfig"),xe(this,"on",(n,i)=>this.events.on(n,i)),xe(this,"once",(n,i)=>this.events.once(n,i)),xe(this,"off",(n,i)=>this.events.off(n,i)),xe(this,"removeListener",(n,i)=>this.events.removeListener(n,i)),xe(this,"removeAllListeners",n=>this.events.removeAllListeners(n)),xe(this,"connect",async n=>{try{return await this.engine.connect(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"pair",async n=>{try{return await this.engine.pair(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"approve",async n=>{try{return await this.engine.approve(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"reject",async n=>{try{return await this.engine.reject(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"update",async n=>{try{return await this.engine.update(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"extend",async n=>{try{return await this.engine.extend(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"request",async n=>{try{return await this.engine.request(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"respond",async n=>{try{return await this.engine.respond(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"ping",async n=>{try{return await this.engine.ping(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"emit",async n=>{try{return await this.engine.emit(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"disconnect",async n=>{try{return await this.engine.disconnect(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"find",n=>{try{return this.engine.find(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"getPendingSessionRequests",()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}}),xe(this,"authenticate",async(n,i)=>{try{return await this.engine.authenticate(n,i)}catch(o){throw this.logger.error(o.message),o}}),xe(this,"formatAuthMessage",n=>{try{return this.engine.formatAuthMessage(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"approveSessionAuthenticate",async n=>{try{return await this.engine.approveSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}}),xe(this,"rejectSessionAuthenticate",async n=>{try{return await this.engine.rejectSessionAuthenticate(n)}catch(i){throw this.logger.error(i.message),i}}),this.name=(e==null?void 0:e.name)||hl.name,this.metadata=H4(e==null?void 0:e.metadata),this.signConfig=e==null?void 0:e.signConfig;const s=dm({logger:(e==null?void 0:e.logger)||hl.logger,name:this.name});this.logger=s,this.core=(e==null?void 0:e.core)||new kD(e),this.session=new jD(this.core,this.logger),this.proposal=new zD(this.core,this.logger),this.pendingRequest=new qD(this.core,this.logger),this.engine=new MD(this),this.auth=new YD(this.core,this.logger)}static async init(e){const s=new ml(e);return await s.initialize(),s}get context(){return gt(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}const QD=ml;class JD{constructor({shadow:e}){this.shadow=e}get currentSession(){return this.session}set currentSession(e){this.session=e}restoreLastSession(){if(!this.client)throw new Error("wallet connect client not initialized");console.log("all sessions",this.client.session.getAll());const e=this.client.session.getAll().pop();return console.log("lastSession",e),e}findSession(e){if(!this.client)throw new Error("wallet connect client not initialized");return console.log("walletConnect findSession, all sessions:",this.client.session.getAll()),this.client.session.getAll().find(s=>s.peer.metadata.name===e.wcPeerName)}async init(){this.client=await QD.init({projectId:zg}),this.session=this.restoreLastSession(),this.client.on("session_event",e=>{console.log("session event",e)}),this.client.on("session_update",({topic:e,params:s})=>{var a;const{namespaces:n}=s,o={...(a=this.client)==null?void 0:a.session.get(e),namespaces:n};console.log("session updated:",o)}),this.client.on("session_delete",e=>{console.log("session deleted:",e)})}async connectWalletWithQrCode(){if(!this.client)throw new Error("wallet connect client not initialized");const{uri:e,approval:s}=await this.client.connect({requiredNamespaces:{eip155:{methods:["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"],chains:["eip155:1"],events:["chainChanged","accountsChanged"]}}});return console.log("Connect with URI:",e),{uri:e,approval:s}}async sendEthTransaction(e,s){if(!this.client)throw new Error("wallet connect client not initialized");if(s=s||this.session,!s)throw new Error("wallet connect session not initialized");console.log("sending eth_sendTransaction request");const n=await this.client.request({chainId:"eip155:1",topic:s.topic,request:{method:"eth_sendTransaction",params:[e]}});return console.log("result:",n),n}getSessionAddress(e,s){var n;return(n=e.namespaces.eip155.accounts.find(i=>i.startsWith(s)))==null?void 0:n.split(":").pop()}}const p0={USD:{locale:"en-US",currency:"USD",symbol:"$"},TRY:{locale:"tr-TR",currency:"TRY",symbol:"TRY"}};function eS(t){var e;return(e=t.split("?").pop())==null?void 0:e.split("&").reduce((s,n)=>{const[i,o]=n.split("=");return s[i]=o,s},{})}function tS(t){return t.length===0?t:t.charAt(0).toUpperCase()+t.slice(1)}function io(t,e){if(!e)return t.toString();const s=p0[e];if(!s)throw new Error(`Unsupported currency: ${e}. Supported currencies: ${Object.keys(p0).join(", ")}`);return s.symbol+new Intl.NumberFormat(s.locale,{style:"currency",currency:s.currency}).format(t)}function m0(t,e){let s=1,n=2;switch(e){case"USD":s=1;break;case"TRY":s=41;break;default:s=1}return+(t/s).toFixed(n)}function sS(t,e){let s=1,n=2;switch(e){case"BTC":s=114983.41;break;case"ETH":s=4148.15;break;case"SOL":s=199.77;break;case"TRX":s=.3;break}return+(t*s).toFixed(n)}function nS(t){const e=new Date(t);return new Intl.DateTimeFormat("en-US",{month:"numeric",day:"numeric",year:"2-digit",hour:"numeric",minute:"numeric",hour12:!0}).format(e)}function iS(t){return oS(t,2)}function oS(t,e){return t.toFixed(e)}function aS(t,e){const s=t.exec(e);return s==null?void 0:s.groups}const g0=/^tuple(?<array>(\[(\d*)\])*)$/;function gl(t){let e=t.type;if(g0.test(t.type)&&"components"in t){e="(";const s=t.components.length;for(let i=0;i<s;i++){const o=t.components[i];e+=gl(o),i<s-1&&(e+=", ")}const n=aS(g0,t.type);return e+=`)${(n==null?void 0:n.array)??""}`,gl({...t,type:e})}return"indexed"in t&&t.indexed&&(e=`${e} indexed`),t.name?`${e} ${t.name}`:e}function oo(t){let e="";const s=t.length;for(let n=0;n<s;n++){const i=t[n];e+=gl(i),n!==s-1&&(e+=", ")}return e}function rS(t){var e;return t.type==="function"?`function ${t.name}(${oo(t.inputs)})${t.stateMutability&&t.stateMutability!=="nonpayable"?` ${t.stateMutability}`:""}${(e=t.outputs)!=null&&e.length?` returns (${oo(t.outputs)})`:""}`:t.type==="event"?`event ${t.name}(${oo(t.inputs)})`:t.type==="error"?`error ${t.name}(${oo(t.inputs)})`:t.type==="constructor"?`constructor(${oo(t.inputs)})${t.stateMutability==="payable"?" payable":""}`:t.type==="fallback"?`fallback() external${t.stateMutability==="payable"?" payable":""}`:"receive() external payable"}function bl(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new mS(t.type);return`${t.name}(${b0(t.inputs,{includeName:e})})`}function b0(t,{includeName:e=!1}={}){return t?t.map(s=>cS(s,{includeName:e})).join(e?", ":","):""}function cS(t,{includeName:e}){return t.type.startsWith("tuple")?`(${b0(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}function ao(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function jt(t){return ao(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}const y0="2.38.3";let ro={getDocsUrl:({docsBaseUrl:t,docsPath:e="",docsSlug:s})=>e?`${t??"https://viem.sh"}${e}${s?`#${s}`:""}`:void 0,version:`viem@${y0}`};class qe extends Error{constructor(e,s={}){var r;const n=(()=>{var c;return s.cause instanceof qe?s.cause.details:(c=s.cause)!=null&&c.message?s.cause.message:s.details})(),i=s.cause instanceof qe&&s.cause.docsPath||s.docsPath,o=(r=ro.getDocsUrl)==null?void 0:r.call(ro,{...s,docsPath:i}),a=[e||"An error occurred.","",...s.metaMessages?[...s.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...n?[`Details: ${n}`]:[],...ro.version?[`Version: ${ro.version}`]:[]].join(`
|
|
876
|
+
`);super(a,s.cause?{cause:s.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=n,this.docsPath=i,this.metaMessages=s.metaMessages,this.name=s.name??this.name,this.shortMessage=e,this.version=y0}walk(e){return w0(this,e)}}function w0(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t&&t.cause!==void 0?w0(t.cause,e):e?null:t}class lS extends qe{constructor({expectedLength:e,givenLength:s,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${s}`].join(`
|
|
877
|
+
`),{name:"AbiEncodingArrayLengthMismatchError"})}}class dS extends qe{constructor({expectedSize:e,value:s}){super(`Size of bytes "${s}" (bytes${jt(s)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class hS extends qe{constructor({expectedLength:e,givenLength:s}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${s}`].join(`
|
|
878
|
+
`),{name:"AbiEncodingLengthMismatchError"})}}class v0 extends qe{constructor(e,{docsPath:s}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
879
|
+
`),{docsPath:s,name:"AbiFunctionNotFoundError"})}}class uS extends qe{constructor(e,s){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${bl(e.abiItem)}\`, and`,`\`${s.type}\` in \`${bl(s.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class fS extends qe{constructor(e,{docsPath:s}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
|
|
880
|
+
`),{docsPath:s,name:"InvalidAbiEncodingType"})}}class pS extends qe{constructor(e){super([`Value "${e}" is not a valid array.`].join(`
|
|
881
|
+
`),{name:"InvalidArrayError"})}}class mS extends qe{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
|
|
882
|
+
`),{name:"InvalidDefinitionTypeError"})}}class x0 extends qe{constructor({offset:e,position:s,size:n}){super(`Slice ${s==="start"?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}class E0 extends qe{constructor({size:e,targetSize:s,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${s}).`,{name:"SizeExceedsPaddingSizeError"})}}function ii(t,{dir:e,size:s=32}={}){return typeof t=="string"?on(t,{dir:e,size:s}):gS(t,{dir:e,size:s})}function on(t,{dir:e,size:s=32}={}){if(s===null)return t;const n=t.replace("0x","");if(n.length>s*2)throw new E0({size:Math.ceil(n.length/2),targetSize:s,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](s*2,"0")}`}function gS(t,{dir:e,size:s=32}={}){if(s===null)return t;if(t.length>s)throw new E0({size:t.length,targetSize:s,type:"bytes"});const n=new Uint8Array(s);for(let i=0;i<s;i++){const o=e==="right";n[o?i:s-i-1]=t[o?i:t.length-i-1]}return n}class k0 extends qe{constructor({max:e,min:s,signed:n,size:i,value:o}){super(`Number "${o}" is not in safe ${i?`${i*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${s} to ${e})`:`(above ${s})`}`,{name:"IntegerOutOfRangeError"})}}class bS extends qe{constructor({givenSize:e,maxSize:s}){super(`Size cannot exceed ${s} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function co(t,{size:e}){if(jt(t)>e)throw new bS({givenSize:jt(t),maxSize:e})}const yS=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function wS(t,e={}){return typeof t=="number"||typeof t=="bigint"?In(t,e):typeof t=="string"?D0(t,e):typeof t=="boolean"?C0(t,e):A0(t,e)}function C0(t,e={}){const s=`0x${Number(t)}`;return typeof e.size=="number"?(co(s,{size:e.size}),ii(s,{size:e.size})):s}function A0(t,e={}){let s="";for(let i=0;i<t.length;i++)s+=yS[t[i]];const n=`0x${s}`;return typeof e.size=="number"?(co(n,{size:e.size}),ii(n,{dir:"right",size:e.size})):n}function In(t,e={}){const{signed:s,size:n}=e,i=BigInt(t);let o;n?s?o=(1n<<BigInt(n)*8n-1n)-1n:o=2n**(BigInt(n)*8n)-1n:typeof t=="number"&&(o=BigInt(Number.MAX_SAFE_INTEGER));const a=typeof o=="bigint"&&s?-o-1n:0;if(o&&i>o||i<a){const c=typeof t=="bigint"?"n":"";throw new k0({max:o?`${o}${c}`:void 0,min:`${a}${c}`,signed:s,size:n,value:`${t}${c}`})}const r=`0x${(s&&i<0?(1n<<BigInt(n*8))+BigInt(i):i).toString(16)}`;return n?ii(r,{size:n}):r}const vS=new TextEncoder;function D0(t,e={}){const s=vS.encode(t);return A0(s,e)}const xS=new TextEncoder;function S0(t,e={}){return typeof t=="number"||typeof t=="bigint"?kS(t,e):typeof t=="boolean"?ES(t,e):ao(t)?T0(t,e):F0(t,e)}function ES(t,e={}){const s=new Uint8Array(1);return s[0]=Number(t),typeof e.size=="number"?(co(s,{size:e.size}),ii(s,{size:e.size})):s}const Os={zero:48,nine:57,A:65,F:70,a:97,f:102};function B0(t){if(t>=Os.zero&&t<=Os.nine)return t-Os.zero;if(t>=Os.A&&t<=Os.F)return t-(Os.A-10);if(t>=Os.a&&t<=Os.f)return t-(Os.a-10)}function T0(t,e={}){let s=t;e.size&&(co(s,{size:e.size}),s=ii(s,{dir:"right",size:e.size}));let n=s.slice(2);n.length%2&&(n=`0${n}`);const i=n.length/2,o=new Uint8Array(i);for(let a=0,r=0;a<i;a++){const c=B0(n.charCodeAt(r++)),l=B0(n.charCodeAt(r++));if(c===void 0||l===void 0)throw new qe(`Invalid byte sequence ("${n[r-2]}${n[r-1]}" in "${n}").`);o[a]=c*16+l}return o}function kS(t,e){const s=In(t,e);return T0(s)}function F0(t,e={}){const s=xS.encode(t);return typeof e.size=="number"?(co(s,{size:e.size}),ii(s,{dir:"right",size:e.size})):s}const Da=BigInt(2**32-1),I0=BigInt(32);function CS(t,e=!1){return e?{h:Number(t&Da),l:Number(t>>I0&Da)}:{h:Number(t>>I0&Da)|0,l:Number(t&Da)|0}}function AS(t,e=!1){const s=t.length;let n=new Uint32Array(s),i=new Uint32Array(s);for(let o=0;o<s;o++){const{h:a,l:r}=CS(t[o],e);[n[o],i[o]]=[a,r]}return[n,i]}const DS=(t,e,s)=>t<<s|e>>>32-s,SS=(t,e,s)=>e<<s|t>>>32-s,BS=(t,e,s)=>e<<s-32|t>>>64-s,TS=(t,e,s)=>t<<s-32|e>>>64-s;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function FS(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function _0(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function Sa(t,...e){if(!FS(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function O0(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function IS(t,e){Sa(t);const s=e.outputLen;if(t.length<s)throw new Error("digestInto() expects output buffer of length at least "+s)}function _S(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function P0(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}const OS=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function PS(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function RS(t){for(let e=0;e<t.length;e++)t[e]=PS(t[e]);return t}const R0=OS?t=>t:RS;function US(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function U0(t){return typeof t=="string"&&(t=US(t)),Sa(t),t}class NS{}function LS(t){const e=n=>t().update(U0(n)).digest(),s=t();return e.outputLen=s.outputLen,e.blockLen=s.blockLen,e.create=()=>t(),e}const $S=BigInt(0),lo=BigInt(1),MS=BigInt(2),zS=BigInt(7),jS=BigInt(256),qS=BigInt(113),N0=[],L0=[],$0=[];for(let t=0,e=lo,s=1,n=0;t<24;t++){[s,n]=[n,(2*s+3*n)%5],N0.push(2*(5*n+s)),L0.push((t+1)*(t+2)/2%64);let i=$S;for(let o=0;o<7;o++)e=(e<<lo^(e>>zS)*qS)%jS,e&MS&&(i^=lo<<(lo<<BigInt(o))-lo);$0.push(i)}const M0=AS($0,!0),HS=M0[0],VS=M0[1],z0=(t,e,s)=>s>32?BS(t,e,s):DS(t,e,s),j0=(t,e,s)=>s>32?TS(t,e,s):SS(t,e,s);function KS(t,e=24){const s=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let a=0;a<10;a++)s[a]=t[a]^t[a+10]^t[a+20]^t[a+30]^t[a+40];for(let a=0;a<10;a+=2){const r=(a+8)%10,c=(a+2)%10,l=s[c],d=s[c+1],h=z0(l,d,1)^s[r],u=j0(l,d,1)^s[r+1];for(let b=0;b<50;b+=10)t[a+b]^=h,t[a+b+1]^=u}let i=t[2],o=t[3];for(let a=0;a<24;a++){const r=L0[a],c=z0(i,o,r),l=j0(i,o,r),d=N0[a];i=t[d],o=t[d+1],t[d]=c,t[d+1]=l}for(let a=0;a<50;a+=10){for(let r=0;r<10;r++)s[r]=t[a+r];for(let r=0;r<10;r++)t[a+r]^=~s[(r+2)%10]&s[(r+4)%10]}t[0]^=HS[n],t[1]^=VS[n]}P0(s)}class yl extends NS{constructor(e,s,n,i=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=s,this.outputLen=n,this.enableXOF=i,this.rounds=o,_0(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=_S(this.state)}clone(){return this._cloneInto()}keccak(){R0(this.state32),KS(this.state32,this.rounds),R0(this.state32),this.posOut=0,this.pos=0}update(e){O0(this),e=U0(e),Sa(e);const{blockLen:s,state:n}=this,i=e.length;for(let o=0;o<i;){const a=Math.min(s-this.pos,i-o);for(let r=0;r<a;r++)n[this.pos++]^=e[o++];this.pos===s&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:s,pos:n,blockLen:i}=this;e[n]^=s,(s&128)!==0&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){O0(this,!1),Sa(e),this.finish();const s=this.state,{blockLen:n}=this;for(let i=0,o=e.length;i<o;){this.posOut>=n&&this.keccak();const a=Math.min(n-this.posOut,o-i);e.set(s.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return _0(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(IS(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,P0(this.state)}_cloneInto(e){const{blockLen:s,suffix:n,outputLen:i,rounds:o,enableXOF:a}=this;return e||(e=new yl(s,n,i,a,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=n,e.outputLen=i,e.enableXOF=a,e.destroyed=this.destroyed,e}}const WS=(t,e,s)=>LS(()=>new yl(e,t,s)),GS=WS(1,136,256/8);function q0(t,e){const s=e||"hex",n=GS(ao(t,{strict:!1})?S0(t):t);return s==="bytes"?n:wS(n)}const YS=t=>q0(S0(t));function ZS(t){return YS(t)}function XS(t){let e=!0,s="",n=0,i="",o=!1;for(let a=0;a<t.length;a++){const r=t[a];if(["(",")",","].includes(r)&&(e=!0),r==="("&&n++,r===")"&&n--,!!e){if(n===0){if(r===" "&&["event","function",""].includes(i))i="";else if(i+=r,r===")"){o=!0;break}continue}if(r===" "){t[a-1]!==","&&s!==","&&s!==",("&&(s="",e=!1);continue}i+=r,s+=r}}if(!o)throw new qe("Unable to normalize signature.");return i}const QS=t=>{const e=typeof t=="string"?t:rS(t);return XS(e)};function H0(t){return ZS(QS(t))}const JS=H0;class eB extends qe{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class V0 extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const s=super.get(e);return super.has(e)&&s!==void 0&&(this.delete(e),super.set(e,s)),s}set(e,s){if(super.set(e,s),this.maxSize&&this.size>this.maxSize){const n=this.keys().next().value;n&&this.delete(n)}return this}}const wl=new V0(8192);function tB(t,e){if(wl.has(`${t}.${e}`))return wl.get(`${t}.${e}`);const s=t.substring(2).toLowerCase(),n=q0(F0(s),"bytes"),i=s.split("");for(let a=0;a<40;a+=2)n[a>>1]>>4>=8&&i[a]&&(i[a]=i[a].toUpperCase()),(n[a>>1]&15)>=8&&i[a+1]&&(i[a+1]=i[a+1].toUpperCase());const o=`0x${i.join("")}`;return wl.set(`${t}.${e}`,o),o}const sB=/^0x[a-fA-F0-9]{40}$/,vl=new V0(8192);function Ba(t,e){const{strict:s=!0}=e??{},n=`${t}.${s}`;if(vl.has(n))return vl.get(n);const i=sB.test(t)?t.toLowerCase()===t?!0:s?tB(t)===t:!0:!1;return vl.set(n,i),i}function oi(t){return typeof t[0]=="string"?K0(t):nB(t)}function nB(t){let e=0;for(const i of t)e+=i.length;const s=new Uint8Array(e);let n=0;for(const i of t)s.set(i,n),n+=i.length;return s}function K0(t){return`0x${t.reduce((e,s)=>e+s.replace("0x",""),"")}`}function W0(t,e,s,{strict:n}={}){return ao(t,{strict:!1})?oB(t,e,s,{strict:n}):iB(t,e,s,{strict:n})}function G0(t,e){if(typeof e=="number"&&e>0&&e>jt(t)-1)throw new x0({offset:e,position:"start",size:jt(t)})}function Y0(t,e,s){if(typeof e=="number"&&typeof s=="number"&&jt(t)!==s-e)throw new x0({offset:s,position:"end",size:jt(t)})}function iB(t,e,s,{strict:n}={}){G0(t,e);const i=t.slice(e,s);return n&&Y0(i,e,s),i}function oB(t,e,s,{strict:n}={}){G0(t,e);const i=`0x${t.replace("0x","").slice((e??0)*2,(s??t.length)*2)}`;return n&&Y0(i,e,s),i}const aB=/^(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)?$/;function rB(t,e){if(t.length!==e.length)throw new hS({expectedLength:t.length,givenLength:e.length});const s=cB({params:t,values:e}),n=El(s);return n.length===0?"0x":n}function cB({params:t,values:e}){const s=[];for(let n=0;n<t.length;n++)s.push(xl({param:t[n],value:e[n]}));return s}function xl({param:t,value:e}){const s=gB(t.type);if(s){const[n,i]=s;return dB(e,{length:n,param:{...t,type:i}})}if(t.type==="tuple")return mB(e,{param:t});if(t.type==="address")return lB(e);if(t.type==="bool")return uB(e);if(t.type.startsWith("uint")||t.type.startsWith("int")){const n=t.type.startsWith("int"),[,,i="256"]=aB.exec(t.type)??[];return fB(e,{signed:n,size:Number(i)})}if(t.type.startsWith("bytes"))return hB(e,{param:t});if(t.type==="string")return pB(e);throw new fS(t.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function El(t){let e=0;for(let o=0;o<t.length;o++){const{dynamic:a,encoded:r}=t[o];a?e+=32:e+=jt(r)}const s=[],n=[];let i=0;for(let o=0;o<t.length;o++){const{dynamic:a,encoded:r}=t[o];a?(s.push(In(e+i,{size:32})),n.push(r),i+=jt(r)):s.push(r)}return oi([...s,...n])}function lB(t){if(!Ba(t))throw new eB({address:t});return{dynamic:!1,encoded:on(t.toLowerCase())}}function dB(t,{length:e,param:s}){const n=e===null;if(!Array.isArray(t))throw new pS(t);if(!n&&t.length!==e)throw new lS({expectedLength:e,givenLength:t.length,type:`${s.type}[${e}]`});let i=!1;const o=[];for(let a=0;a<t.length;a++){const r=xl({param:s,value:t[a]});r.dynamic&&(i=!0),o.push(r)}if(n||i){const a=El(o);if(n){const r=In(o.length,{size:32});return{dynamic:!0,encoded:o.length>0?oi([r,a]):r}}if(i)return{dynamic:!0,encoded:a}}return{dynamic:!1,encoded:oi(o.map(({encoded:a})=>a))}}function hB(t,{param:e}){const[,s]=e.type.split("bytes"),n=jt(t);if(!s){let i=t;return n%32!==0&&(i=on(i,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:oi([on(In(n,{size:32})),i])}}if(n!==Number.parseInt(s,10))throw new dS({expectedSize:Number.parseInt(s,10),value:t});return{dynamic:!1,encoded:on(t,{dir:"right"})}}function uB(t){if(typeof t!="boolean")throw new qe(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:on(C0(t))}}function fB(t,{signed:e,size:s=256}){if(typeof s=="number"){const n=2n**(BigInt(s)-(e?1n:0n))-1n,i=e?-n-1n:0n;if(t>n||t<i)throw new k0({max:n.toString(),min:i.toString(),signed:e,size:s/8,value:t.toString()})}return{dynamic:!1,encoded:In(t,{size:32,signed:e})}}function pB(t){const e=D0(t),s=Math.ceil(jt(e)/32),n=[];for(let i=0;i<s;i++)n.push(on(W0(e,i*32,(i+1)*32),{dir:"right"}));return{dynamic:!0,encoded:oi([on(In(jt(e),{size:32})),...n])}}function mB(t,{param:e}){let s=!1;const n=[];for(let i=0;i<e.components.length;i++){const o=e.components[i],a=Array.isArray(t)?i:o.name,r=xl({param:o,value:t[a]});n.push(r),r.dynamic&&(s=!0)}return{dynamic:s,encoded:s?El(n):oi(n.map(({encoded:i})=>i))}}function gB(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}const Z0=t=>W0(H0(t),0,4);function bB(t){const{abi:e,args:s=[],name:n}=t,i=ao(n,{strict:!1}),o=e.filter(r=>i?r.type==="function"?Z0(r)===n:r.type==="event"?JS(r)===n:!1:"name"in r&&r.name===n);if(o.length===0)return;if(o.length===1)return o[0];let a;for(const r of o){if(!("inputs"in r))continue;if(!s||s.length===0){if(!r.inputs||r.inputs.length===0)return r;continue}if(!r.inputs||r.inputs.length===0||r.inputs.length!==s.length)continue;if(s.every((l,d)=>{const h="inputs"in r&&r.inputs[d];return h?kl(l,h):!1})){if(a&&"inputs"in a&&a.inputs){const l=X0(r.inputs,a.inputs,s);if(l)throw new uS({abiItem:r,type:l[0]},{abiItem:a,type:l[1]})}a=r}}return a||o[0]}function kl(t,e){const s=typeof t,n=e.type;switch(n){case"address":return Ba(t,{strict:!1});case"bool":return s==="boolean";case"function":return s==="string";case"string":return s==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((i,o)=>kl(Object.values(t)[o],i)):/^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)?$/.test(n)?s==="number"||s==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?s==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(t)&&t.every(i=>kl(i,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function X0(t,e,s){for(const n in t){const i=t[n],o=e[n];if(i.type==="tuple"&&o.type==="tuple"&&"components"in i&&"components"in o)return X0(i.components,o.components,s[n]);const a=[i.type,o.type];if(a.includes("address")&&a.includes("bytes20")?!0:a.includes("address")&&a.includes("string")?Ba(s[n],{strict:!1}):a.includes("address")&&a.includes("bytes")?Ba(s[n],{strict:!1}):!1)return a}}const Q0="/docs/contract/encodeFunctionData";function yB(t){const{abi:e,args:s,functionName:n}=t;let i=e[0];if(n){const o=bB({abi:e,args:s,name:n});if(!o)throw new v0(n,{docsPath:Q0});i=o}if(i.type!=="function")throw new v0(void 0,{docsPath:Q0});return{abi:[i],functionName:Z0(bl(i))}}function J0(t){const{args:e}=t,{abi:s,functionName:n}=(()=>{var r;return t.abi.length===1&&((r=t.functionName)!=null&&r.startsWith("0x"))?t:yB(t)})(),i=s[0],o=n,a="inputs"in i&&i.inputs?rB(i.inputs,e??[]):void 0;return K0([o,a??"0x"])}const eg={contractAddress:"0xdAC17F958D2ee523a2206206994597C13D831ec7",abi:[{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}]};function wB({fromAddress:t,toAddress:e,uint256:s}){return{from:t,to:eg.contractAddress,data:J0({abi:eg.abi,functionName:"transfer",args:[e,s]})}}function tg(t,e){const s=`btnWallet${t.id}`;return _t.h("button",{id:s,class:"w-full flex items-center space-x-2 border border-gray-300 rounded-lg px-4 py-2 hover:bg-gray-50"},_t.h("div",{style:{width:"44",paddingRight:"5px"}},_t.h("img",{src:t.img,alt:t.name,style:"height: 34px; width: 44px;"})),_t.h("div",{class:"flex w-full",style:"justify-content: space-between;"},_t.h("span",null,t.name),_t.h("span",{class:"text-lydian-green"},e?"Linked":""))).outerHTML}var Ta={exports:{}},vB=Ta.exports,sg;function xB(){return sg||(sg=1,(function(t,e){(function(s,n){t.exports=n()})(vB,(function(){return(()=>{var s={192:(o,a)=>{var r,c,l=(function(){var d=function(D,F){var p=D,g=C[F],w=null,T=0,S=null,O=[],z={},H=function(I,m){w=(function(v){for(var x=new Array(v),k=0;k<v;k+=1){x[k]=new Array(v);for(var $=0;$<v;$+=1)x[k][$]=null}return x})(T=4*p+17),Y(0,0),Y(T-7,0),Y(0,T-7),X(),W(),ie(I,m),p>=7&&ee(I),S==null&&(S=ce(p,g,O)),he(S,m)},Y=function(I,m){for(var v=-1;v<=7;v+=1)if(!(I+v<=-1||T<=I+v))for(var x=-1;x<=7;x+=1)m+x<=-1||T<=m+x||(w[I+v][m+x]=0<=v&&v<=6&&(x==0||x==6)||0<=x&&x<=6&&(v==0||v==6)||2<=v&&v<=4&&2<=x&&x<=4)},W=function(){for(var I=8;I<T-8;I+=1)w[I][6]==null&&(w[I][6]=I%2==0);for(var m=8;m<T-8;m+=1)w[6][m]==null&&(w[6][m]=m%2==0)},X=function(){for(var I=_.getPatternPosition(p),m=0;m<I.length;m+=1)for(var v=0;v<I.length;v+=1){var x=I[m],k=I[v];if(w[x][k]==null)for(var $=-2;$<=2;$+=1)for(var U=-2;U<=2;U+=1)w[x+$][k+U]=$==-2||$==2||U==-2||U==2||$==0&&U==0}},ee=function(I){for(var m=_.getBCHTypeNumber(p),v=0;v<18;v+=1){var x=!I&&(m>>v&1)==1;w[Math.floor(v/3)][v%3+T-8-3]=x}for(v=0;v<18;v+=1)x=!I&&(m>>v&1)==1,w[v%3+T-8-3][Math.floor(v/3)]=x},ie=function(I,m){for(var v=g<<3|m,x=_.getBCHTypeInfo(v),k=0;k<15;k+=1){var $=!I&&(x>>k&1)==1;k<6?w[k][8]=$:k<8?w[k+1][8]=$:w[T-15+k][8]=$}for(k=0;k<15;k+=1)$=!I&&(x>>k&1)==1,k<8?w[8][T-k-1]=$:k<9?w[8][15-k-1+1]=$:w[8][15-k-1]=$;w[T-8][8]=!I},he=function(I,m){for(var v=-1,x=T-1,k=7,$=0,U=_.getMaskFunction(m),G=T-1;G>0;G-=2)for(G==6&&(G-=1);;){for(var Z=0;Z<2;Z+=1)if(w[x][G-Z]==null){var Q=!1;$<I.length&&(Q=(I[$]>>>k&1)==1),U(x,G-Z)&&(Q=!Q),w[x][G-Z]=Q,(k-=1)==-1&&($+=1,k=7)}if((x+=v)<0||T<=x){x-=v,v=-v;break}}},ce=function(I,m,v){for(var x=E.getRSBlocks(I,m),k=B(),$=0;$<v.length;$+=1){var U=v[$];k.put(U.getMode(),4),k.put(U.getLength(),_.getLengthInBits(U.getMode(),I)),U.write(k)}var G=0;for($=0;$<x.length;$+=1)G+=x[$].dataCount;if(k.getLengthInBits()>8*G)throw"code length overflow. ("+k.getLengthInBits()+">"+8*G+")";for(k.getLengthInBits()+4<=8*G&&k.put(0,4);k.getLengthInBits()%8!=0;)k.putBit(!1);for(;!(k.getLengthInBits()>=8*G||(k.put(236,8),k.getLengthInBits()>=8*G));)k.put(17,8);return(function(Z,Q){for(var V=0,ae=0,pe=0,ue=new Array(Q.length),te=new Array(Q.length),ne=0;ne<Q.length;ne+=1){var ge=Q[ne].dataCount,we=Q[ne].totalCount-ge;ae=Math.max(ae,ge),pe=Math.max(pe,we),ue[ne]=new Array(ge);for(var de=0;de<ue[ne].length;de+=1)ue[ne][de]=255&Z.getBuffer()[de+V];V+=ge;var be=_.getErrorCorrectPolynomial(we),fe=A(ue[ne],be.getLength()-1).mod(be);for(te[ne]=new Array(be.getLength()-1),de=0;de<te[ne].length;de+=1){var me=de+fe.getLength()-te[ne].length;te[ne][de]=me>=0?fe.getAt(me):0}}var Fe=0;for(de=0;de<Q.length;de+=1)Fe+=Q[de].totalCount;var He=new Array(Fe),Ce=0;for(de=0;de<ae;de+=1)for(ne=0;ne<Q.length;ne+=1)de<ue[ne].length&&(He[Ce]=ue[ne][de],Ce+=1);for(de=0;de<pe;de+=1)for(ne=0;ne<Q.length;ne+=1)de<te[ne].length&&(He[Ce]=te[ne][de],Ce+=1);return He})(k,x)};z.addData=function(I,m){var v=null;switch(m=m||"Byte"){case"Numeric":v=P(I);break;case"Alphanumeric":v=M(I);break;case"Byte":v=R(I);break;case"Kanji":v=L(I);break;default:throw"mode:"+m}O.push(v),S=null},z.isDark=function(I,m){if(I<0||T<=I||m<0||T<=m)throw I+","+m;return w[I][m]},z.getModuleCount=function(){return T},z.make=function(){if(p<1){for(var I=1;I<40;I++){for(var m=E.getRSBlocks(I,g),v=B(),x=0;x<O.length;x++){var k=O[x];v.put(k.getMode(),4),v.put(k.getLength(),_.getLengthInBits(k.getMode(),I)),k.write(v)}var $=0;for(x=0;x<m.length;x++)$+=m[x].dataCount;if(v.getLengthInBits()<=8*$)break}p=I}H(!1,(function(){for(var U=0,G=0,Z=0;Z<8;Z+=1){H(!0,Z);var Q=_.getLostPoint(z);(Z==0||U>Q)&&(U=Q,G=Z)}return G})())},z.createTableTag=function(I,m){I=I||2;var v="";v+='<table style="',v+=" border-width: 0px; border-style: none;",v+=" border-collapse: collapse;",v+=" padding: 0px; margin: "+(m=m===void 0?4*I:m)+"px;",v+='">',v+="<tbody>";for(var x=0;x<z.getModuleCount();x+=1){v+="<tr>";for(var k=0;k<z.getModuleCount();k+=1)v+='<td style="',v+=" border-width: 0px; border-style: none;",v+=" border-collapse: collapse;",v+=" padding: 0px; margin: 0px;",v+=" width: "+I+"px;",v+=" height: "+I+"px;",v+=" background-color: ",v+=z.isDark(x,k)?"#000000":"#ffffff",v+=";",v+='"/>';v+="</tr>"}return(v+="</tbody>")+"</table>"},z.createSvgTag=function(I,m,v,x){var k={};typeof arguments[0]=="object"&&(I=(k=arguments[0]).cellSize,m=k.margin,v=k.alt,x=k.title),I=I||2,m=m===void 0?4*I:m,(v=typeof v=="string"?{text:v}:v||{}).text=v.text||null,v.id=v.text?v.id||"qrcode-description":null,(x=typeof x=="string"?{text:x}:x||{}).text=x.text||null,x.id=x.text?x.id||"qrcode-title":null;var $,U,G,Z,Q=z.getModuleCount()*I+2*m,V="";for(Z="l"+I+",0 0,"+I+" -"+I+",0 0,-"+I+"z ",V+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',V+=k.scalable?"":' width="'+Q+'px" height="'+Q+'px"',V+=' viewBox="0 0 '+Q+" "+Q+'" ',V+=' preserveAspectRatio="xMinYMin meet"',V+=x.text||v.text?' role="img" aria-labelledby="'+se([x.id,v.id].join(" ").trim())+'"':"",V+=">",V+=x.text?'<title id="'+se(x.id)+'">'+se(x.text)+"</title>":"",V+=v.text?'<description id="'+se(v.id)+'">'+se(v.text)+"</description>":"",V+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',V+='<path d="',U=0;U<z.getModuleCount();U+=1)for(G=U*I+m,$=0;$<z.getModuleCount();$+=1)z.isDark(U,$)&&(V+="M"+($*I+m)+","+G+Z);return(V+='" stroke="transparent" fill="black"/>')+"</svg>"},z.createDataURL=function(I,m){I=I||2,m=m===void 0?4*I:m;var v=z.getModuleCount()*I+2*m,x=m,k=v-m;return j(v,v,(function($,U){if(x<=$&&$<k&&x<=U&&U<k){var G=Math.floor(($-x)/I),Z=Math.floor((U-x)/I);return z.isDark(Z,G)?0:1}return 1}))},z.createImgTag=function(I,m,v){I=I||2,m=m===void 0?4*I:m;var x=z.getModuleCount()*I+2*m,k="";return k+="<img",k+=' src="',k+=z.createDataURL(I,m),k+='"',k+=' width="',k+=x,k+='"',k+=' height="',k+=x,k+='"',v&&(k+=' alt="',k+=se(v),k+='"'),k+"/>"};var se=function(I){for(var m="",v=0;v<I.length;v+=1){var x=I.charAt(v);switch(x){case"<":m+="<";break;case">":m+=">";break;case"&":m+="&";break;case'"':m+=""";break;default:m+=x}}return m};return z.createASCII=function(I,m){if((I=I||1)<2)return(function(ue){ue=ue===void 0?2:ue;var te,ne,ge,we,de,be=1*z.getModuleCount()+2*ue,fe=ue,me=be-ue,Fe={"██":"█","█ ":"▀"," █":"▄"," ":" "},He={"██":"▀","█ ":"▀"," █":" "," ":" "},Ce="";for(te=0;te<be;te+=2){for(ge=Math.floor((te-fe)/1),we=Math.floor((te+1-fe)/1),ne=0;ne<be;ne+=1)de="█",fe<=ne&&ne<me&&fe<=te&&te<me&&z.isDark(ge,Math.floor((ne-fe)/1))&&(de=" "),fe<=ne&&ne<me&&fe<=te+1&&te+1<me&&z.isDark(we,Math.floor((ne-fe)/1))?de+=" ":de+="█",Ce+=ue<1&&te+1>=me?He[de]:Fe[de];Ce+=`
|
|
883
|
+
`}return be%2&&ue>0?Ce.substring(0,Ce.length-be-1)+Array(be+1).join("▀"):Ce.substring(0,Ce.length-1)})(m);I-=1,m=m===void 0?2*I:m;var v,x,k,$,U=z.getModuleCount()*I+2*m,G=m,Z=U-m,Q=Array(I+1).join("██"),V=Array(I+1).join(" "),ae="",pe="";for(v=0;v<U;v+=1){for(k=Math.floor((v-G)/I),pe="",x=0;x<U;x+=1)$=1,G<=x&&x<Z&&G<=v&&v<Z&&z.isDark(k,Math.floor((x-G)/I))&&($=0),pe+=$?Q:V;for(k=0;k<I;k+=1)ae+=pe+`
|
|
884
|
+
`}return ae.substring(0,ae.length-1)},z.renderTo2dContext=function(I,m){m=m||2;for(var v=z.getModuleCount(),x=0;x<v;x++)for(var k=0;k<v;k++)I.fillStyle=z.isDark(x,k)?"black":"white",I.fillRect(x*m,k*m,m,m)},z};d.stringToBytes=(d.stringToBytesFuncs={default:function(D){for(var F=[],p=0;p<D.length;p+=1){var g=D.charCodeAt(p);F.push(255&g)}return F}}).default,d.createStringToBytes=function(D,F){var p=(function(){for(var w=K(D),T=function(){var W=w.read();if(W==-1)throw"eof";return W},S=0,O={};;){var z=w.read();if(z==-1)break;var H=T(),Y=T()<<8|T();O[String.fromCharCode(z<<8|H)]=Y,S+=1}if(S!=F)throw S+" != "+F;return O})(),g=63;return function(w){for(var T=[],S=0;S<w.length;S+=1){var O=w.charCodeAt(S);if(O<128)T.push(O);else{var z=p[w.charAt(S)];typeof z=="number"?(255&z)==z?T.push(z):(T.push(z>>>8),T.push(255&z)):T.push(g)}}return T}};var h,u,b,f,y,C={L:1,M:0,Q:3,H:2},_=(h=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],u=1335,b=7973,y=function(D){for(var F=0;D!=0;)F+=1,D>>>=1;return F},(f={}).getBCHTypeInfo=function(D){for(var F=D<<10;y(F)-y(u)>=0;)F^=u<<y(F)-y(u);return 21522^(D<<10|F)},f.getBCHTypeNumber=function(D){for(var F=D<<12;y(F)-y(b)>=0;)F^=b<<y(F)-y(b);return D<<12|F},f.getPatternPosition=function(D){return h[D-1]},f.getMaskFunction=function(D){switch(D){case 0:return function(F,p){return(F+p)%2==0};case 1:return function(F,p){return F%2==0};case 2:return function(F,p){return p%3==0};case 3:return function(F,p){return(F+p)%3==0};case 4:return function(F,p){return(Math.floor(F/2)+Math.floor(p/3))%2==0};case 5:return function(F,p){return F*p%2+F*p%3==0};case 6:return function(F,p){return(F*p%2+F*p%3)%2==0};case 7:return function(F,p){return(F*p%3+(F+p)%2)%2==0};default:throw"bad maskPattern:"+D}},f.getErrorCorrectPolynomial=function(D){for(var F=A([1],0),p=0;p<D;p+=1)F=F.multiply(A([1,N.gexp(p)],0));return F},f.getLengthInBits=function(D,F){if(1<=F&&F<10)switch(D){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+D}else if(F<27)switch(D){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+D}else{if(!(F<41))throw"type:"+F;switch(D){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+D}}},f.getLostPoint=function(D){for(var F=D.getModuleCount(),p=0,g=0;g<F;g+=1)for(var w=0;w<F;w+=1){for(var T=0,S=D.isDark(g,w),O=-1;O<=1;O+=1)if(!(g+O<0||F<=g+O))for(var z=-1;z<=1;z+=1)w+z<0||F<=w+z||O==0&&z==0||S==D.isDark(g+O,w+z)&&(T+=1);T>5&&(p+=3+T-5)}for(g=0;g<F-1;g+=1)for(w=0;w<F-1;w+=1){var H=0;D.isDark(g,w)&&(H+=1),D.isDark(g+1,w)&&(H+=1),D.isDark(g,w+1)&&(H+=1),D.isDark(g+1,w+1)&&(H+=1),H!=0&&H!=4||(p+=3)}for(g=0;g<F;g+=1)for(w=0;w<F-6;w+=1)D.isDark(g,w)&&!D.isDark(g,w+1)&&D.isDark(g,w+2)&&D.isDark(g,w+3)&&D.isDark(g,w+4)&&!D.isDark(g,w+5)&&D.isDark(g,w+6)&&(p+=40);for(w=0;w<F;w+=1)for(g=0;g<F-6;g+=1)D.isDark(g,w)&&!D.isDark(g+1,w)&&D.isDark(g+2,w)&&D.isDark(g+3,w)&&D.isDark(g+4,w)&&!D.isDark(g+5,w)&&D.isDark(g+6,w)&&(p+=40);var Y=0;for(w=0;w<F;w+=1)for(g=0;g<F;g+=1)D.isDark(g,w)&&(Y+=1);return p+Math.abs(100*Y/F/F-50)/5*10},f),N=(function(){for(var D=new Array(256),F=new Array(256),p=0;p<8;p+=1)D[p]=1<<p;for(p=8;p<256;p+=1)D[p]=D[p-4]^D[p-5]^D[p-6]^D[p-8];for(p=0;p<255;p+=1)F[D[p]]=p;return{glog:function(g){if(g<1)throw"glog("+g+")";return F[g]},gexp:function(g){for(;g<0;)g+=255;for(;g>=256;)g-=255;return D[g]}}})();function A(D,F){if(D.length===void 0)throw D.length+"/"+F;var p=(function(){for(var w=0;w<D.length&&D[w]==0;)w+=1;for(var T=new Array(D.length-w+F),S=0;S<D.length-w;S+=1)T[S]=D[S+w];return T})(),g={getAt:function(w){return p[w]},getLength:function(){return p.length},multiply:function(w){for(var T=new Array(g.getLength()+w.getLength()-1),S=0;S<g.getLength();S+=1)for(var O=0;O<w.getLength();O+=1)T[S+O]^=N.gexp(N.glog(g.getAt(S))+N.glog(w.getAt(O)));return A(T,0)},mod:function(w){if(g.getLength()-w.getLength()<0)return g;for(var T=N.glog(g.getAt(0))-N.glog(w.getAt(0)),S=new Array(g.getLength()),O=0;O<g.getLength();O+=1)S[O]=g.getAt(O);for(O=0;O<w.getLength();O+=1)S[O]^=N.gexp(N.glog(w.getAt(O))+T);return A(S,0).mod(w)}};return g}var E=(function(){var D=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],F=function(g,w){var T={};return T.totalCount=g,T.dataCount=w,T},p={getRSBlocks:function(g,w){var T=(function(ee,ie){switch(ie){case C.L:return D[4*(ee-1)+0];case C.M:return D[4*(ee-1)+1];case C.Q:return D[4*(ee-1)+2];case C.H:return D[4*(ee-1)+3];default:return}})(g,w);if(T===void 0)throw"bad rs block @ typeNumber:"+g+"/errorCorrectionLevel:"+w;for(var S=T.length/3,O=[],z=0;z<S;z+=1)for(var H=T[3*z+0],Y=T[3*z+1],W=T[3*z+2],X=0;X<H;X+=1)O.push(F(Y,W));return O}};return p})(),B=function(){var D=[],F=0,p={getBuffer:function(){return D},getAt:function(g){var w=Math.floor(g/8);return(D[w]>>>7-g%8&1)==1},put:function(g,w){for(var T=0;T<w;T+=1)p.putBit((g>>>w-T-1&1)==1)},getLengthInBits:function(){return F},putBit:function(g){var w=Math.floor(F/8);D.length<=w&&D.push(0),g&&(D[w]|=128>>>F%8),F+=1}};return p},P=function(D){var F=D,p={getMode:function(){return 1},getLength:function(T){return F.length},write:function(T){for(var S=F,O=0;O+2<S.length;)T.put(g(S.substring(O,O+3)),10),O+=3;O<S.length&&(S.length-O==1?T.put(g(S.substring(O,O+1)),4):S.length-O==2&&T.put(g(S.substring(O,O+2)),7))}},g=function(T){for(var S=0,O=0;O<T.length;O+=1)S=10*S+w(T.charAt(O));return S},w=function(T){if("0"<=T&&T<="9")return T.charCodeAt(0)-48;throw"illegal char :"+T};return p},M=function(D){var F=D,p={getMode:function(){return 2},getLength:function(w){return F.length},write:function(w){for(var T=F,S=0;S+1<T.length;)w.put(45*g(T.charAt(S))+g(T.charAt(S+1)),11),S+=2;S<T.length&&w.put(g(T.charAt(S)),6)}},g=function(w){if("0"<=w&&w<="9")return w.charCodeAt(0)-48;if("A"<=w&&w<="Z")return w.charCodeAt(0)-65+10;switch(w){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+w}};return p},R=function(D){var F=d.stringToBytes(D);return{getMode:function(){return 4},getLength:function(p){return F.length},write:function(p){for(var g=0;g<F.length;g+=1)p.put(F[g],8)}}},L=function(D){var F=d.stringToBytesFuncs.SJIS;if(!F)throw"sjis not supported.";(function(w,T){var S=F("友");if(S.length!=2||(S[0]<<8|S[1])!=38726)throw"sjis not supported."})();var p=F(D),g={getMode:function(){return 8},getLength:function(w){return~~(p.length/2)},write:function(w){for(var T=p,S=0;S+1<T.length;){var O=(255&T[S])<<8|255&T[S+1];if(33088<=O&&O<=40956)O-=33088;else{if(!(57408<=O&&O<=60351))throw"illegal char at "+(S+1)+"/"+O;O-=49472}O=192*(O>>>8&255)+(255&O),w.put(O,13),S+=2}if(S<T.length)throw"illegal char at "+(S+1)}};return g},q=function(){var D=[],F={writeByte:function(p){D.push(255&p)},writeShort:function(p){F.writeByte(p),F.writeByte(p>>>8)},writeBytes:function(p,g,w){g=g||0,w=w||p.length;for(var T=0;T<w;T+=1)F.writeByte(p[T+g])},writeString:function(p){for(var g=0;g<p.length;g+=1)F.writeByte(p.charCodeAt(g))},toByteArray:function(){return D},toString:function(){var p="";p+="[";for(var g=0;g<D.length;g+=1)g>0&&(p+=","),p+=D[g];return p+"]"}};return F},K=function(D){var F=D,p=0,g=0,w=0,T={read:function(){for(;w<8;){if(p>=F.length){if(w==0)return-1;throw"unexpected end of file./"+w}var O=F.charAt(p);if(p+=1,O=="=")return w=0,-1;O.match(/^\s$/)||(g=g<<6|S(O.charCodeAt(0)),w+=6)}var z=g>>>w-8&255;return w-=8,z}},S=function(O){if(65<=O&&O<=90)return O-65;if(97<=O&&O<=122)return O-97+26;if(48<=O&&O<=57)return O-48+52;if(O==43)return 62;if(O==47)return 63;throw"c:"+O};return T},j=function(D,F,p){for(var g=(function(Y,W){var X=Y,ee=W,ie=new Array(Y*W),he={setPixel:function(I,m,v){ie[m*X+I]=v},write:function(I){I.writeString("GIF87a"),I.writeShort(X),I.writeShort(ee),I.writeByte(128),I.writeByte(0),I.writeByte(0),I.writeByte(0),I.writeByte(0),I.writeByte(0),I.writeByte(255),I.writeByte(255),I.writeByte(255),I.writeString(","),I.writeShort(0),I.writeShort(0),I.writeShort(X),I.writeShort(ee),I.writeByte(0);var m=ce(2);I.writeByte(2);for(var v=0;m.length-v>255;)I.writeByte(255),I.writeBytes(m,v,255),v+=255;I.writeByte(m.length-v),I.writeBytes(m,v,m.length-v),I.writeByte(0),I.writeString(";")}},ce=function(I){for(var m=1<<I,v=1+(1<<I),x=I+1,k=se(),$=0;$<m;$+=1)k.add(String.fromCharCode($));k.add(String.fromCharCode(m)),k.add(String.fromCharCode(v));var U,G,Z,Q=q(),V=(U=Q,G=0,Z=0,{write:function(te,ne){if(te>>>ne)throw"length over";for(;G+ne>=8;)U.writeByte(255&(te<<G|Z)),ne-=8-G,te>>>=8-G,Z=0,G=0;Z|=te<<G,G+=ne},flush:function(){G>0&&U.writeByte(Z)}});V.write(m,x);var ae=0,pe=String.fromCharCode(ie[ae]);for(ae+=1;ae<ie.length;){var ue=String.fromCharCode(ie[ae]);ae+=1,k.contains(pe+ue)?pe+=ue:(V.write(k.indexOf(pe),x),k.size()<4095&&(k.size()==1<<x&&(x+=1),k.add(pe+ue)),pe=ue)}return V.write(k.indexOf(pe),x),V.write(v,x),V.flush(),Q.toByteArray()},se=function(){var I={},m=0,v={add:function(x){if(v.contains(x))throw"dup key:"+x;I[x]=m,m+=1},size:function(){return m},indexOf:function(x){return I[x]},contains:function(x){return I[x]!==void 0}};return v};return he})(D,F),w=0;w<F;w+=1)for(var T=0;T<D;T+=1)g.setPixel(T,w,p(T,w));var S=q();g.write(S);for(var O=(function(){var Y=0,W=0,X=0,ee="",ie={},he=function(se){ee+=String.fromCharCode(ce(63&se))},ce=function(se){if(!(se<0)){if(se<26)return 65+se;if(se<52)return se-26+97;if(se<62)return se-52+48;if(se==62)return 43;if(se==63)return 47}throw"n:"+se};return ie.writeByte=function(se){for(Y=Y<<8|255&se,W+=8,X+=1;W>=6;)he(Y>>>W-6),W-=6},ie.flush=function(){if(W>0&&(he(Y<<6-W),Y=0,W=0),X%3!=0)for(var se=3-X%3,I=0;I<se;I+=1)ee+="="},ie.toString=function(){return ee},ie})(),z=S.toByteArray(),H=0;H<z.length;H+=1)O.writeByte(z[H]);return O.flush(),"data:image/gif;base64,"+O};return d})();l.stringToBytesFuncs["UTF-8"]=function(d){return(function(h){for(var u=[],b=0;b<h.length;b++){var f=h.charCodeAt(b);f<128?u.push(f):f<2048?u.push(192|f>>6,128|63&f):f<55296||f>=57344?u.push(224|f>>12,128|f>>6&63,128|63&f):(b++,f=65536+((1023&f)<<10|1023&h.charCodeAt(b)),u.push(240|f>>18,128|f>>12&63,128|f>>6&63,128|63&f))}return u})(d)},(c=typeof(r=function(){return l})=="function"?r.apply(a,[]):r)===void 0||(o.exports=c)},676:(o,a,r)=>{r.d(a,{default:()=>se});const c="Numeric",l="Alphanumeric",d="Byte";var h=function(){return h=Object.assign||function(I){for(var m,v=1,x=arguments.length;v<x;v++)for(var k in m=arguments[v])Object.prototype.hasOwnProperty.call(m,k)&&(I[k]=m[k]);return I},h.apply(this,arguments)},u=function(){for(var I=0,m=0,v=arguments.length;m<v;m++)I+=arguments[m].length;var x=Array(I),k=0;for(m=0;m<v;m++)for(var $=arguments[m],U=0,G=$.length;U<G;U++,k++)x[k]=$[U];return x},b=function(I){return!!I&&typeof I=="object"&&!Array.isArray(I)};function f(I){for(var m=[],v=1;v<arguments.length;v++)m[v-1]=arguments[v];if(!m.length)return I;var x=m.shift();return x!==void 0&&b(I)&&b(x)?(I=h({},I),Object.keys(x).forEach((function(k){var $=I[k],U=x[k];Array.isArray($)&&Array.isArray(U)?I[k]=U:b($)&&b(U)?I[k]=f(Object.assign({},$),U):I[k]=U})),f.apply(void 0,u([I],m))):I}function y(I,m){var v=document.createElement("a");v.download=m,v.href=I,document.body.appendChild(v),v.click(),document.body.removeChild(v)}var C=function(I,m,v,x){return new(v||(v=Promise))((function(k,$){function U(Q){try{Z(x.next(Q))}catch(V){$(V)}}function G(Q){try{Z(x.throw(Q))}catch(V){$(V)}}function Z(Q){var V;Q.done?k(Q.value):(V=Q.value,V instanceof v?V:new v((function(ae){ae(V)}))).then(U,G)}Z((x=x.apply(I,[])).next())}))},_=function(I,m){var v,x,k,$,U={label:0,sent:function(){if(1&k[0])throw k[1];return k[1]},trys:[],ops:[]};return $={next:G(0),throw:G(1),return:G(2)},typeof Symbol=="function"&&($[Symbol.iterator]=function(){return this}),$;function G(Z){return function(Q){return(function(V){if(v)throw new TypeError("Generator is already executing.");for(;U;)try{if(v=1,x&&(k=2&V[0]?x.return:V[0]?x.throw||((k=x.return)&&k.call(x),0):x.next)&&!(k=k.call(x,V[1])).done)return k;switch(x=0,k&&(V=[2&V[0],k.value]),V[0]){case 0:case 1:k=V;break;case 4:return U.label++,{value:V[1],done:!1};case 5:U.label++,x=V[1],V=[0];continue;case 7:V=U.ops.pop(),U.trys.pop();continue;default:if(!((k=(k=U.trys).length>0&&k[k.length-1])||V[0]!==6&&V[0]!==2)){U=0;continue}if(V[0]===3&&(!k||V[1]>k[0]&&V[1]<k[3])){U.label=V[1];break}if(V[0]===6&&U.label<k[1]){U.label=k[1],k=V;break}if(k&&U.label<k[2]){U.label=k[2],U.ops.push(V);break}k[2]&&U.ops.pop(),U.trys.pop();continue}V=m.call(I,U)}catch(ae){V=[6,ae],x=0}finally{v=k=0}if(5&V[0])throw V[1];return{value:V[0]?V[1]:void 0,done:!0}})([Z,Q])}}};function N(I){return C(this,void 0,void 0,(function(){return _(this,(function(m){return[2,new Promise((function(v){var x=new XMLHttpRequest;x.onload=function(){var k=new FileReader;k.onloadend=function(){v(k.result)},k.readAsDataURL(x.response)},x.open("GET",I),x.responseType="blob",x.send()}))]}))}))}const A={L:.07,M:.15,Q:.25,H:.3};var E=function(){return E=Object.assign||function(I){for(var m,v=1,x=arguments.length;v<x;v++)for(var k in m=arguments[v])Object.prototype.hasOwnProperty.call(m,k)&&(I[k]=m[k]);return I},E.apply(this,arguments)},B=(function(){function I(m){var v=m.svg,x=m.type;this._svg=v,this._type=x}return I.prototype.draw=function(m,v,x,k){var $;switch(this._type){case"dots":$=this._drawDot;break;case"classy":$=this._drawClassy;break;case"classy-rounded":$=this._drawClassyRounded;break;case"rounded":$=this._drawRounded;break;case"extra-rounded":$=this._drawExtraRounded;break;default:$=this._drawSquare}$.call(this,{x:m,y:v,size:x,getNeighbor:k})},I.prototype._rotateFigure=function(m){var v,x=m.x,k=m.y,$=m.size,U=m.rotation,G=U===void 0?0:U,Z=x+$/2,Q=k+$/2;(0,m.draw)(),(v=this._element)===null||v===void 0||v.setAttribute("transform","rotate("+180*G/Math.PI+","+Z+","+Q+")")},I.prototype._basicDot=function(m){var v=this,x=m.size,k=m.x,$=m.y;this._rotateFigure(E(E({},m),{draw:function(){v._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),v._element.setAttribute("cx",String(k+x/2)),v._element.setAttribute("cy",String($+x/2)),v._element.setAttribute("r",String(x/2))}}))},I.prototype._basicSquare=function(m){var v=this,x=m.size,k=m.x,$=m.y;this._rotateFigure(E(E({},m),{draw:function(){v._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),v._element.setAttribute("x",String(k)),v._element.setAttribute("y",String($)),v._element.setAttribute("width",String(x)),v._element.setAttribute("height",String(x))}}))},I.prototype._basicSideRounded=function(m){var v=this,x=m.size,k=m.x,$=m.y;this._rotateFigure(E(E({},m),{draw:function(){v._element=document.createElementNS("http://www.w3.org/2000/svg","path"),v._element.setAttribute("d","M "+k+" "+$+"v "+x+"h "+x/2+"a "+x/2+" "+x/2+", 0, 0, 0, 0 "+-x)}}))},I.prototype._basicCornerRounded=function(m){var v=this,x=m.size,k=m.x,$=m.y;this._rotateFigure(E(E({},m),{draw:function(){v._element=document.createElementNS("http://www.w3.org/2000/svg","path"),v._element.setAttribute("d","M "+k+" "+$+"v "+x+"h "+x+"v "+-x/2+"a "+x/2+" "+x/2+", 0, 0, 0, "+-x/2+" "+-x/2)}}))},I.prototype._basicCornerExtraRounded=function(m){var v=this,x=m.size,k=m.x,$=m.y;this._rotateFigure(E(E({},m),{draw:function(){v._element=document.createElementNS("http://www.w3.org/2000/svg","path"),v._element.setAttribute("d","M "+k+" "+$+"v "+x+"h "+x+"a "+x+" "+x+", 0, 0, 0, "+-x+" "+-x)}}))},I.prototype._basicCornersRounded=function(m){var v=this,x=m.size,k=m.x,$=m.y;this._rotateFigure(E(E({},m),{draw:function(){v._element=document.createElementNS("http://www.w3.org/2000/svg","path"),v._element.setAttribute("d","M "+k+" "+$+"v "+x/2+"a "+x/2+" "+x/2+", 0, 0, 0, "+x/2+" "+x/2+"h "+x/2+"v "+-x/2+"a "+x/2+" "+x/2+", 0, 0, 0, "+-x/2+" "+-x/2)}}))},I.prototype._drawDot=function(m){var v=m.x,x=m.y,k=m.size;this._basicDot({x:v,y:x,size:k,rotation:0})},I.prototype._drawSquare=function(m){var v=m.x,x=m.y,k=m.size;this._basicSquare({x:v,y:x,size:k,rotation:0})},I.prototype._drawRounded=function(m){var v=m.x,x=m.y,k=m.size,$=m.getNeighbor,U=$?+$(-1,0):0,G=$?+$(1,0):0,Z=$?+$(0,-1):0,Q=$?+$(0,1):0,V=U+G+Z+Q;if(V!==0)if(V>2||U&&G||Z&&Q)this._basicSquare({x:v,y:x,size:k,rotation:0});else{if(V===2){var ae=0;return U&&Z?ae=Math.PI/2:Z&&G?ae=Math.PI:G&&Q&&(ae=-Math.PI/2),void this._basicCornerRounded({x:v,y:x,size:k,rotation:ae})}if(V===1)return ae=0,Z?ae=Math.PI/2:G?ae=Math.PI:Q&&(ae=-Math.PI/2),void this._basicSideRounded({x:v,y:x,size:k,rotation:ae})}else this._basicDot({x:v,y:x,size:k,rotation:0})},I.prototype._drawExtraRounded=function(m){var v=m.x,x=m.y,k=m.size,$=m.getNeighbor,U=$?+$(-1,0):0,G=$?+$(1,0):0,Z=$?+$(0,-1):0,Q=$?+$(0,1):0,V=U+G+Z+Q;if(V!==0)if(V>2||U&&G||Z&&Q)this._basicSquare({x:v,y:x,size:k,rotation:0});else{if(V===2){var ae=0;return U&&Z?ae=Math.PI/2:Z&&G?ae=Math.PI:G&&Q&&(ae=-Math.PI/2),void this._basicCornerExtraRounded({x:v,y:x,size:k,rotation:ae})}if(V===1)return ae=0,Z?ae=Math.PI/2:G?ae=Math.PI:Q&&(ae=-Math.PI/2),void this._basicSideRounded({x:v,y:x,size:k,rotation:ae})}else this._basicDot({x:v,y:x,size:k,rotation:0})},I.prototype._drawClassy=function(m){var v=m.x,x=m.y,k=m.size,$=m.getNeighbor,U=$?+$(-1,0):0,G=$?+$(1,0):0,Z=$?+$(0,-1):0,Q=$?+$(0,1):0;U+G+Z+Q!==0?U||Z?G||Q?this._basicSquare({x:v,y:x,size:k,rotation:0}):this._basicCornerRounded({x:v,y:x,size:k,rotation:Math.PI/2}):this._basicCornerRounded({x:v,y:x,size:k,rotation:-Math.PI/2}):this._basicCornersRounded({x:v,y:x,size:k,rotation:Math.PI/2})},I.prototype._drawClassyRounded=function(m){var v=m.x,x=m.y,k=m.size,$=m.getNeighbor,U=$?+$(-1,0):0,G=$?+$(1,0):0,Z=$?+$(0,-1):0,Q=$?+$(0,1):0;U+G+Z+Q!==0?U||Z?G||Q?this._basicSquare({x:v,y:x,size:k,rotation:0}):this._basicCornerExtraRounded({x:v,y:x,size:k,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:v,y:x,size:k,rotation:-Math.PI/2}):this._basicCornersRounded({x:v,y:x,size:k,rotation:Math.PI/2})},I})();const P=B;var M=function(){return M=Object.assign||function(I){for(var m,v=1,x=arguments.length;v<x;v++)for(var k in m=arguments[v])Object.prototype.hasOwnProperty.call(m,k)&&(I[k]=m[k]);return I},M.apply(this,arguments)},R=(function(){function I(m){var v=m.svg,x=m.type;this._svg=v,this._type=x}return I.prototype.draw=function(m,v,x,k){var $;switch(this._type){case"square":$=this._drawSquare;break;case"extra-rounded":$=this._drawExtraRounded;break;default:$=this._drawDot}$.call(this,{x:m,y:v,size:x,rotation:k})},I.prototype._rotateFigure=function(m){var v,x=m.x,k=m.y,$=m.size,U=m.rotation,G=U===void 0?0:U,Z=x+$/2,Q=k+$/2;(0,m.draw)(),(v=this._element)===null||v===void 0||v.setAttribute("transform","rotate("+180*G/Math.PI+","+Z+","+Q+")")},I.prototype._basicDot=function(m){var v=this,x=m.size,k=m.x,$=m.y,U=x/7;this._rotateFigure(M(M({},m),{draw:function(){v._element=document.createElementNS("http://www.w3.org/2000/svg","path"),v._element.setAttribute("clip-rule","evenodd"),v._element.setAttribute("d","M "+(k+x/2)+" "+$+"a "+x/2+" "+x/2+" 0 1 0 0.1 0zm 0 "+U+"a "+(x/2-U)+" "+(x/2-U)+" 0 1 1 -0.1 0Z")}}))},I.prototype._basicSquare=function(m){var v=this,x=m.size,k=m.x,$=m.y,U=x/7;this._rotateFigure(M(M({},m),{draw:function(){v._element=document.createElementNS("http://www.w3.org/2000/svg","path"),v._element.setAttribute("clip-rule","evenodd"),v._element.setAttribute("d","M "+k+" "+$+"v "+x+"h "+x+"v "+-x+"zM "+(k+U)+" "+($+U)+"h "+(x-2*U)+"v "+(x-2*U)+"h "+(2*U-x)+"z")}}))},I.prototype._basicExtraRounded=function(m){var v=this,x=m.size,k=m.x,$=m.y,U=x/7;this._rotateFigure(M(M({},m),{draw:function(){v._element=document.createElementNS("http://www.w3.org/2000/svg","path"),v._element.setAttribute("clip-rule","evenodd"),v._element.setAttribute("d","M "+k+" "+($+2.5*U)+"v "+2*U+"a "+2.5*U+" "+2.5*U+", 0, 0, 0, "+2.5*U+" "+2.5*U+"h "+2*U+"a "+2.5*U+" "+2.5*U+", 0, 0, 0, "+2.5*U+" "+2.5*-U+"v "+-2*U+"a "+2.5*U+" "+2.5*U+", 0, 0, 0, "+2.5*-U+" "+2.5*-U+"h "+-2*U+"a "+2.5*U+" "+2.5*U+", 0, 0, 0, "+2.5*-U+" "+2.5*U+"M "+(k+2.5*U)+" "+($+U)+"h "+2*U+"a "+1.5*U+" "+1.5*U+", 0, 0, 1, "+1.5*U+" "+1.5*U+"v "+2*U+"a "+1.5*U+" "+1.5*U+", 0, 0, 1, "+1.5*-U+" "+1.5*U+"h "+-2*U+"a "+1.5*U+" "+1.5*U+", 0, 0, 1, "+1.5*-U+" "+1.5*-U+"v "+-2*U+"a "+1.5*U+" "+1.5*U+", 0, 0, 1, "+1.5*U+" "+1.5*-U)}}))},I.prototype._drawDot=function(m){var v=m.x,x=m.y,k=m.size,$=m.rotation;this._basicDot({x:v,y:x,size:k,rotation:$})},I.prototype._drawSquare=function(m){var v=m.x,x=m.y,k=m.size,$=m.rotation;this._basicSquare({x:v,y:x,size:k,rotation:$})},I.prototype._drawExtraRounded=function(m){var v=m.x,x=m.y,k=m.size,$=m.rotation;this._basicExtraRounded({x:v,y:x,size:k,rotation:$})},I})();const L=R;var q=function(){return q=Object.assign||function(I){for(var m,v=1,x=arguments.length;v<x;v++)for(var k in m=arguments[v])Object.prototype.hasOwnProperty.call(m,k)&&(I[k]=m[k]);return I},q.apply(this,arguments)},K=(function(){function I(m){var v=m.svg,x=m.type;this._svg=v,this._type=x}return I.prototype.draw=function(m,v,x,k){(this._type==="square"?this._drawSquare:this._drawDot).call(this,{x:m,y:v,size:x,rotation:k})},I.prototype._rotateFigure=function(m){var v,x=m.x,k=m.y,$=m.size,U=m.rotation,G=U===void 0?0:U,Z=x+$/2,Q=k+$/2;(0,m.draw)(),(v=this._element)===null||v===void 0||v.setAttribute("transform","rotate("+180*G/Math.PI+","+Z+","+Q+")")},I.prototype._basicDot=function(m){var v=this,x=m.size,k=m.x,$=m.y;this._rotateFigure(q(q({},m),{draw:function(){v._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),v._element.setAttribute("cx",String(k+x/2)),v._element.setAttribute("cy",String($+x/2)),v._element.setAttribute("r",String(x/2))}}))},I.prototype._basicSquare=function(m){var v=this,x=m.size,k=m.x,$=m.y;this._rotateFigure(q(q({},m),{draw:function(){v._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),v._element.setAttribute("x",String(k)),v._element.setAttribute("y",String($)),v._element.setAttribute("width",String(x)),v._element.setAttribute("height",String(x))}}))},I.prototype._drawDot=function(m){var v=m.x,x=m.y,k=m.size,$=m.rotation;this._basicDot({x:v,y:x,size:k,rotation:$})},I.prototype._drawSquare=function(m){var v=m.x,x=m.y,k=m.size,$=m.rotation;this._basicSquare({x:v,y:x,size:k,rotation:$})},I})();const j=K,D="circle";var F=function(I,m,v,x){return new(v||(v=Promise))((function(k,$){function U(Q){try{Z(x.next(Q))}catch(V){$(V)}}function G(Q){try{Z(x.throw(Q))}catch(V){$(V)}}function Z(Q){var V;Q.done?k(Q.value):(V=Q.value,V instanceof v?V:new v((function(ae){ae(V)}))).then(U,G)}Z((x=x.apply(I,[])).next())}))},p=function(I,m){var v,x,k,$,U={label:0,sent:function(){if(1&k[0])throw k[1];return k[1]},trys:[],ops:[]};return $={next:G(0),throw:G(1),return:G(2)},typeof Symbol=="function"&&($[Symbol.iterator]=function(){return this}),$;function G(Z){return function(Q){return(function(V){if(v)throw new TypeError("Generator is already executing.");for(;U;)try{if(v=1,x&&(k=2&V[0]?x.return:V[0]?x.throw||((k=x.return)&&k.call(x),0):x.next)&&!(k=k.call(x,V[1])).done)return k;switch(x=0,k&&(V=[2&V[0],k.value]),V[0]){case 0:case 1:k=V;break;case 4:return U.label++,{value:V[1],done:!1};case 5:U.label++,x=V[1],V=[0];continue;case 7:V=U.ops.pop(),U.trys.pop();continue;default:if(!((k=(k=U.trys).length>0&&k[k.length-1])||V[0]!==6&&V[0]!==2)){U=0;continue}if(V[0]===3&&(!k||V[1]>k[0]&&V[1]<k[3])){U.label=V[1];break}if(V[0]===6&&U.label<k[1]){U.label=k[1],k=V;break}if(k&&U.label<k[2]){U.label=k[2],U.ops.push(V);break}k[2]&&U.ops.pop(),U.trys.pop();continue}V=m.call(I,U)}catch(ae){V=[6,ae],x=0}finally{v=k=0}if(5&V[0])throw V[1];return{value:V[0]?V[1]:void 0,done:!0}})([Z,Q])}}},g=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],w=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const T=(function(){function I(m){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(m.width)),this._element.setAttribute("height",String(m.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._instanceId=I.instanceCount++,this._options=m}return Object.defineProperty(I.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),I.prototype.getElement=function(){return this._element},I.prototype.drawQR=function(m){return F(this,void 0,void 0,(function(){var v,x,k,$,U,G,Z,Q,V,ae,pe=this;return p(this,(function(ue){switch(ue.label){case 0:return v=m.getModuleCount(),x=Math.min(this._options.width,this._options.height)-2*this._options.margin,k=this._options.shape===D?x/Math.sqrt(2):x,$=k/v,U={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=m,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(ue.sent(),!this._image)return[2];G=this._options,Z=G.imageOptions,Q=G.qrOptions,V=Z.imageSize*A[Q.errorCorrectionLevel],ae=Math.floor(V*v*v),U=(function(te){var ne=te.originalHeight,ge=te.originalWidth,we=te.maxHiddenDots,de=te.maxHiddenAxisDots,be=te.dotSize,fe={x:0,y:0},me={x:0,y:0};if(ne<=0||ge<=0||we<=0||be<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var Fe=ne/ge;return fe.x=Math.floor(Math.sqrt(we/Fe)),fe.x<=0&&(fe.x=1),de&&de<fe.x&&(fe.x=de),fe.x%2==0&&fe.x--,me.x=fe.x*be,fe.y=1+2*Math.ceil((fe.x*Fe-1)/2),me.y=Math.round(me.x*Fe),(fe.y*fe.x>we||de&&de<fe.y)&&(de&&de<fe.y?(fe.y=de,fe.y%2==0&&fe.x--):fe.y-=2,me.y=fe.y*be,fe.x=1+2*Math.ceil((fe.y/Fe-1)/2),me.x=Math.round(me.y/Fe)),{height:me.y,width:me.x,hideYDots:fe.y,hideXDots:fe.x}})({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:ae,maxHiddenAxisDots:v-14,dotSize:$}),ue.label=2;case 2:return this.drawBackground(),this.drawDots((function(te,ne){var ge,we,de,be,fe,me;return!(pe._options.imageOptions.hideBackgroundDots&&te>=(v-U.hideXDots)/2&&te<(v+U.hideXDots)/2&&ne>=(v-U.hideYDots)/2&&ne<(v+U.hideYDots)/2||!((ge=g[te])===null||ge===void 0)&&ge[ne]||!((we=g[te-v+7])===null||we===void 0)&&we[ne]||!((de=g[te])===null||de===void 0)&&de[ne-v+7]||!((be=w[te])===null||be===void 0)&&be[ne]||!((fe=w[te-v+7])===null||fe===void 0)&&fe[ne]||!((me=w[te])===null||me===void 0)&&me[ne-v+7])})),this.drawCorners(),this._options.image?[4,this.drawImage({width:U.width,height:U.height,count:v,dotSize:$})]:[3,4];case 3:ue.sent(),ue.label=4;case 4:return[2]}}))}))},I.prototype.drawBackground=function(){var m,v,x,k=this._element,$=this._options;if(k){var U=(m=$.backgroundOptions)===null||m===void 0?void 0:m.gradient,G=(v=$.backgroundOptions)===null||v===void 0?void 0:v.color;if((U||G)&&this._createColor({options:U,color:G,additionalRotation:0,x:0,y:0,height:$.height,width:$.width,name:"background-color"}),(x=$.backgroundOptions)===null||x===void 0?void 0:x.round){var Z=Math.min($.width,$.height),Q=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),Q.setAttribute("x",String(($.width-Z)/2)),Q.setAttribute("y",String(($.height-Z)/2)),Q.setAttribute("width",String(Z)),Q.setAttribute("height",String(Z)),Q.setAttribute("rx",String(Z/2*$.backgroundOptions.round)),this._backgroundClipPath.appendChild(Q)}}},I.prototype.drawDots=function(m){var v,x,k=this;if(!this._qr)throw"QR code is not defined";var $=this._options,U=this._qr.getModuleCount();if(U>$.width||U>$.height)throw"The canvas is too small.";var G=Math.min($.width,$.height)-2*$.margin,Z=($.shape===D?G/Math.sqrt(2):G)/U,Q=($.width-U*Z)/2,V=($.height-U*Z)/2,ae=new P({svg:this._element,type:$.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color-"+this._instanceId),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(v=$.dotsOptions)===null||v===void 0?void 0:v.gradient,color:$.dotsOptions.color,additionalRotation:0,x:0,y:0,height:$.height,width:$.width,name:"dot-color-"+this._instanceId});for(var pe=function(Ce){for(var qt=function(Ue){return m&&!m(Ce,Ue)?"continue":!((x=ue._qr)===null||x===void 0)&&x.isDark(Ce,Ue)?(ae.draw(Q+Ce*Z,V+Ue*Z,Z,(function(lt,st){return!(Ce+lt<0||Ue+st<0||Ce+lt>=U||Ue+st>=U)&&!(m&&!m(Ce+lt,Ue+st))&&!!k._qr&&k._qr.isDark(Ce+lt,Ue+st)})),void(ae._element&&ue._dotsClipPath&&ue._dotsClipPath.appendChild(ae._element))):"continue"},ft=0;ft<U;ft++)qt(ft)},ue=this,te=0;te<U;te++)pe(te);if($.shape===D){var ne=Math.floor((G/Z-U)/2),ge=U+2*ne,we=Q-ne*Z,de=V-ne*Z,be=[],fe=Math.floor(ge/2);for(te=0;te<ge;te++){be[te]=[];for(var me=0;me<ge;me++)te>=ne-1&&te<=ge-ne&&me>=ne-1&&me<=ge-ne||Math.sqrt((te-fe)*(te-fe)+(me-fe)*(me-fe))>fe?be[te][me]=0:be[te][me]=this._qr.isDark(me-2*ne<0?me:me>=U?me-2*ne:me-ne,te-2*ne<0?te:te>=U?te-2*ne:te-ne)?1:0}var Fe=function(Ce){for(var qt=function(Ue){if(!be[Ce][Ue])return"continue";ae.draw(we+Ce*Z,de+Ue*Z,Z,(function(lt,st){var pt;return!!(!((pt=be[Ce+lt])===null||pt===void 0)&&pt[Ue+st])})),ae._element&&He._dotsClipPath&&He._dotsClipPath.appendChild(ae._element)},ft=0;ft<ge;ft++)qt(ft)},He=this;for(te=0;te<ge;te++)Fe(te)}},I.prototype.drawCorners=function(){var m=this;if(!this._qr)throw"QR code is not defined";var v=this._element,x=this._options;if(!v)throw"Element code is not defined";var k=this._qr.getModuleCount(),$=Math.min(x.width,x.height)-2*x.margin,U=(x.shape===D?$/Math.sqrt(2):$)/k,G=7*U,Z=3*U,Q=(x.width-k*U)/2,V=(x.height-k*U)/2;[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(ae){var pe,ue,te,ne,ge,we,de,be,fe,me,Fe,He,Ce=ae[0],qt=ae[1],ft=ae[2],Ue=Q+Ce*U*(k-7),lt=V+qt*U*(k-7),st=m._dotsClipPath,pt=m._dotsClipPath;if((!((pe=x.cornersSquareOptions)===null||pe===void 0)&&pe.gradient||!((ue=x.cornersSquareOptions)===null||ue===void 0)&&ue.color)&&((st=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+Ce+"-"+qt),m._defs.appendChild(st),m._cornersSquareClipPath=m._cornersDotClipPath=pt=st,m._createColor({options:(te=x.cornersSquareOptions)===null||te===void 0?void 0:te.gradient,color:(ne=x.cornersSquareOptions)===null||ne===void 0?void 0:ne.color,additionalRotation:ft,x:Ue,y:lt,height:G,width:G,name:"corners-square-color-"+Ce+"-"+qt})),(ge=x.cornersSquareOptions)===null||ge===void 0?void 0:ge.type){var ai=new L({svg:m._element,type:x.cornersSquareOptions.type});ai.draw(Ue,lt,G,ft),ai._element&&st&&st.appendChild(ai._element)}else for(var ds=new P({svg:m._element,type:x.dotsOptions.type}),Fa=function(Ht){for(var ci=function(fs){if(!(!((we=g[Ht])===null||we===void 0)&&we[fs]))return"continue";ds.draw(Ue+Ht*U,lt+fs*U,U,(function(li,di){var ps;return!!(!((ps=g[Ht+li])===null||ps===void 0)&&ps[fs+di])})),ds._element&&st&&st.appendChild(ds._element)},us=0;us<g[Ht].length;us++)ci(us)},hs=0;hs<g.length;hs++)Fa(hs);if((!((de=x.cornersDotOptions)===null||de===void 0)&&de.gradient||!((be=x.cornersDotOptions)===null||be===void 0)&&be.color)&&((pt=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+Ce+"-"+qt),m._defs.appendChild(pt),m._cornersDotClipPath=pt,m._createColor({options:(fe=x.cornersDotOptions)===null||fe===void 0?void 0:fe.gradient,color:(me=x.cornersDotOptions)===null||me===void 0?void 0:me.color,additionalRotation:ft,x:Ue+2*U,y:lt+2*U,height:Z,width:Z,name:"corners-dot-color-"+Ce+"-"+qt})),(Fe=x.cornersDotOptions)===null||Fe===void 0?void 0:Fe.type){var ri=new j({svg:m._element,type:x.cornersDotOptions.type});ri.draw(Ue+2*U,lt+2*U,Z,ft),ri._element&&pt&&pt.appendChild(ri._element)}else{ds=new P({svg:m._element,type:x.dotsOptions.type});var Ia=function(Ht){for(var ci=function(fs){if(!(!((He=w[Ht])===null||He===void 0)&&He[fs]))return"continue";ds.draw(Ue+Ht*U,lt+fs*U,U,(function(li,di){var ps;return!!(!((ps=w[Ht+li])===null||ps===void 0)&&ps[fs+di])})),ds._element&&pt&&pt.appendChild(ds._element)},us=0;us<w[Ht].length;us++)ci(us)};for(hs=0;hs<w.length;hs++)Ia(hs)}}))},I.prototype.loadImage=function(){var m=this;return new Promise((function(v,x){var k=m._options,$=new Image;if(!k.image)return x("Image is not defined");typeof k.imageOptions.crossOrigin=="string"&&($.crossOrigin=k.imageOptions.crossOrigin),m._image=$,$.onload=function(){v()},$.src=k.image}))},I.prototype.drawImage=function(m){var v=m.width,x=m.height,k=m.count,$=m.dotSize;return F(this,void 0,void 0,(function(){var U,G,Z,Q,V,ae,pe,ue,te;return p(this,(function(ne){switch(ne.label){case 0:return U=this._options,G=(U.width-k*$)/2,Z=(U.height-k*$)/2,Q=G+U.imageOptions.margin+(k*$-v)/2,V=Z+U.imageOptions.margin+(k*$-x)/2,ae=v-2*U.imageOptions.margin,pe=x-2*U.imageOptions.margin,(ue=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(Q)),ue.setAttribute("y",String(V)),ue.setAttribute("width",ae+"px"),ue.setAttribute("height",pe+"px"),[4,N(U.image||"")];case 1:return te=ne.sent(),ue.setAttribute("href",te||""),this._element.appendChild(ue),[2]}}))}))},I.prototype._createColor=function(m){var v=m.options,x=m.color,k=m.additionalRotation,$=m.x,U=m.y,G=m.height,Z=m.width,Q=m.name,V=Z>G?Z:G,ae=document.createElementNS("http://www.w3.org/2000/svg","rect");if(ae.setAttribute("x",String($)),ae.setAttribute("y",String(U)),ae.setAttribute("height",String(G)),ae.setAttribute("width",String(Z)),ae.setAttribute("clip-path","url('#clip-path-"+Q+"')"),v){var pe;if(v.type==="radial")(pe=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",Q),pe.setAttribute("gradientUnits","userSpaceOnUse"),pe.setAttribute("fx",String($+Z/2)),pe.setAttribute("fy",String(U+G/2)),pe.setAttribute("cx",String($+Z/2)),pe.setAttribute("cy",String(U+G/2)),pe.setAttribute("r",String(V/2));else{var ue=((v.rotation||0)+k)%(2*Math.PI),te=(ue+2*Math.PI)%(2*Math.PI),ne=$+Z/2,ge=U+G/2,we=$+Z/2,de=U+G/2;te>=0&&te<=.25*Math.PI||te>1.75*Math.PI&&te<=2*Math.PI?(ne-=Z/2,ge-=G/2*Math.tan(ue),we+=Z/2,de+=G/2*Math.tan(ue)):te>.25*Math.PI&&te<=.75*Math.PI?(ge-=G/2,ne-=Z/2/Math.tan(ue),de+=G/2,we+=Z/2/Math.tan(ue)):te>.75*Math.PI&&te<=1.25*Math.PI?(ne+=Z/2,ge+=G/2*Math.tan(ue),we-=Z/2,de-=G/2*Math.tan(ue)):te>1.25*Math.PI&&te<=1.75*Math.PI&&(ge+=G/2,ne+=Z/2/Math.tan(ue),de-=G/2,we-=Z/2/Math.tan(ue)),(pe=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",Q),pe.setAttribute("gradientUnits","userSpaceOnUse"),pe.setAttribute("x1",String(Math.round(ne))),pe.setAttribute("y1",String(Math.round(ge))),pe.setAttribute("x2",String(Math.round(we))),pe.setAttribute("y2",String(Math.round(de)))}v.colorStops.forEach((function(be){var fe=be.offset,me=be.color,Fe=document.createElementNS("http://www.w3.org/2000/svg","stop");Fe.setAttribute("offset",100*fe+"%"),Fe.setAttribute("stop-color",me),pe.appendChild(Fe)})),ae.setAttribute("fill","url('#"+Q+"')"),this._defs.appendChild(pe)}else x&&ae.setAttribute("fill",x);this._element.appendChild(ae)},I.instanceCount=0,I})(),S="canvas";for(var O={},z=0;z<=40;z++)O[z]=z;const H={type:S,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:O[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var Y=function(){return Y=Object.assign||function(I){for(var m,v=1,x=arguments.length;v<x;v++)for(var k in m=arguments[v])Object.prototype.hasOwnProperty.call(m,k)&&(I[k]=m[k]);return I},Y.apply(this,arguments)};function W(I){var m=Y({},I);if(!m.colorStops||!m.colorStops.length)throw"Field 'colorStops' is required in gradient";return m.rotation?m.rotation=Number(m.rotation):m.rotation=0,m.colorStops=m.colorStops.map((function(v){return Y(Y({},v),{offset:Number(v.offset)})})),m}function X(I){var m=Y({},I);return m.width=Number(m.width),m.height=Number(m.height),m.margin=Number(m.margin),m.imageOptions=Y(Y({},m.imageOptions),{hideBackgroundDots:!!m.imageOptions.hideBackgroundDots,imageSize:Number(m.imageOptions.imageSize),margin:Number(m.imageOptions.margin)}),m.margin>Math.min(m.width,m.height)&&(m.margin=Math.min(m.width,m.height)),m.dotsOptions=Y({},m.dotsOptions),m.dotsOptions.gradient&&(m.dotsOptions.gradient=W(m.dotsOptions.gradient)),m.cornersSquareOptions&&(m.cornersSquareOptions=Y({},m.cornersSquareOptions),m.cornersSquareOptions.gradient&&(m.cornersSquareOptions.gradient=W(m.cornersSquareOptions.gradient))),m.cornersDotOptions&&(m.cornersDotOptions=Y({},m.cornersDotOptions),m.cornersDotOptions.gradient&&(m.cornersDotOptions.gradient=W(m.cornersDotOptions.gradient))),m.backgroundOptions&&(m.backgroundOptions=Y({},m.backgroundOptions),m.backgroundOptions.gradient&&(m.backgroundOptions.gradient=W(m.backgroundOptions.gradient))),m}var ee=r(192),ie=r.n(ee),he=function(I,m,v,x){return new(v||(v=Promise))((function(k,$){function U(Q){try{Z(x.next(Q))}catch(V){$(V)}}function G(Q){try{Z(x.throw(Q))}catch(V){$(V)}}function Z(Q){var V;Q.done?k(Q.value):(V=Q.value,V instanceof v?V:new v((function(ae){ae(V)}))).then(U,G)}Z((x=x.apply(I,[])).next())}))},ce=function(I,m){var v,x,k,$,U={label:0,sent:function(){if(1&k[0])throw k[1];return k[1]},trys:[],ops:[]};return $={next:G(0),throw:G(1),return:G(2)},typeof Symbol=="function"&&($[Symbol.iterator]=function(){return this}),$;function G(Z){return function(Q){return(function(V){if(v)throw new TypeError("Generator is already executing.");for(;U;)try{if(v=1,x&&(k=2&V[0]?x.return:V[0]?x.throw||((k=x.return)&&k.call(x),0):x.next)&&!(k=k.call(x,V[1])).done)return k;switch(x=0,k&&(V=[2&V[0],k.value]),V[0]){case 0:case 1:k=V;break;case 4:return U.label++,{value:V[1],done:!1};case 5:U.label++,x=V[1],V=[0];continue;case 7:V=U.ops.pop(),U.trys.pop();continue;default:if(!((k=(k=U.trys).length>0&&k[k.length-1])||V[0]!==6&&V[0]!==2)){U=0;continue}if(V[0]===3&&(!k||V[1]>k[0]&&V[1]<k[3])){U.label=V[1];break}if(V[0]===6&&U.label<k[1]){U.label=k[1],k=V;break}if(k&&U.label<k[2]){U.label=k[2],U.ops.push(V);break}k[2]&&U.ops.pop(),U.trys.pop();continue}V=m.call(I,U)}catch(ae){V=[6,ae],x=0}finally{v=k=0}if(5&V[0])throw V[1];return{value:V[0]?V[1]:void 0,done:!0}})([Z,Q])}}};const se=(function(){function I(m){this._options=m?X(f(H,m)):H,this.update()}return I._clearContainer=function(m){m&&(m.innerHTML="")},I.prototype._setupSvg=function(){var m=this;if(this._qr){var v=new T(this._options);this._svg=v.getElement(),this._svgDrawingPromise=v.drawQR(this._qr).then((function(){var x;m._svg&&((x=m._extension)===null||x===void 0||x.call(m,v.getElement(),m._options))}))}},I.prototype._setupCanvas=function(){var m,v=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=(m=this._svgDrawingPromise)===null||m===void 0?void 0:m.then((function(){if(v._svg){var x=v._svg,k=new XMLSerializer().serializeToString(x),$="data:image/svg+xml;base64,"+btoa(k),U=new Image;return new Promise((function(G){U.onload=function(){var Z,Q;(Q=(Z=v._canvas)===null||Z===void 0?void 0:Z.getContext("2d"))===null||Q===void 0||Q.drawImage(U,0,0),G()},U.src=$}))}})))},I.prototype._getElement=function(m){return m===void 0&&(m="png"),he(this,void 0,void 0,(function(){return ce(this,(function(v){switch(v.label){case 0:if(!this._qr)throw"QR code is empty";return m.toLowerCase()!=="svg"?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return v.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return v.sent(),[2,this._canvas]}}))}))},I.prototype.update=function(m){I._clearContainer(this._container),this._options=m?X(f(this._options,m)):this._options,this._options.data&&(this._qr=ie()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||(function(v){switch(!0){case/^[0-9]*$/.test(v):return c;case/^[0-9A-Z $%*+\-./:]*$/.test(v):return l;default:return d}})(this._options.data)),this._qr.make(),this._options.type===S?this._setupCanvas():this._setupSvg(),this.append(this._container))},I.prototype.append=function(m){if(m){if(typeof m.appendChild!="function")throw"Container should be a single DOM node";this._options.type===S?this._canvas&&m.appendChild(this._canvas):this._svg&&m.appendChild(this._svg),this._container=m}},I.prototype.applyExtension=function(m){if(!m)throw"Extension function should be defined.";this._extension=m,this.update()},I.prototype.deleteExtension=function(){this._extension=void 0,this.update()},I.prototype.getRawData=function(m){return m===void 0&&(m="png"),he(this,void 0,void 0,(function(){var v,x,k;return ce(this,(function($){switch($.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(m)];case 1:return(v=$.sent())?m.toLowerCase()==="svg"?(x=new XMLSerializer,k=x.serializeToString(v),[2,new Blob([`<?xml version="1.0" standalone="no"?>\r
|
|
885
|
+
`+k],{type:"image/svg+xml"})]):[2,new Promise((function(U){return v.toBlob(U,"image/"+m,1)}))]:[2,null]}}))}))},I.prototype.download=function(m){return he(this,void 0,void 0,(function(){var v,x,k,$,U;return ce(this,(function(G){switch(G.label){case 0:if(!this._qr)throw"QR code is empty";return v="png",x="qr",typeof m=="string"?(v=m,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof m=="object"&&m!==null&&(m.name&&(x=m.name),m.extension&&(v=m.extension)),[4,this._getElement(v)];case 1:return(k=G.sent())?(v.toLowerCase()==="svg"?($=new XMLSerializer,U=`<?xml version="1.0" standalone="no"?>\r
|
|
886
|
+
`+(U=$.serializeToString(k)),y("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(U),x+".svg")):y(k.toDataURL("image/"+v),x+"."+v),[2]):[2]}}))}))},I})()}},n={};function i(o){if(n[o])return n[o].exports;var a=n[o]={exports:{}};return s[o](a,a.exports,i),a.exports}return i.n=o=>{var a=o&&o.__esModule?()=>o.default:()=>o;return i.d(a,{a}),a},i.d=(o,a)=>{for(var r in a)i.o(a,r)&&!i.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:a[r]})},i.o=(o,a)=>Object.prototype.hasOwnProperty.call(o,a),i(676)})().default}))})(Ta)),Ta.exports}var EB=xB();const kB=ho(EB),Cl={contractAddress:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",abi:[{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],type:"function"}],multiplier:1e6};function CB({fromAddress:t,toAddress:e,uint256:s}){return{from:t,to:Cl.contractAddress,data:J0({abi:Cl.abi,functionName:"transfer",args:[e,s]})}}const AB={networks:JSON.parse(`[{"code":"algorand","name":"Algorand","symbol":"ALGO","decimals":6,"family":"algorand","explorer":"https://algoexplorer.io/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/algorand/logo.png","checksum":"sha256:27699c49f72d4ab0db6a09a75a009f6c81978ee78268fd970ad6384338474dba"},"metadata":{"website":"http://algorand.foundation","description":"Algorand is the first blockchain to provide immediate transaction finality. No forking. No uncertainty. Algorand removes the technical barriers that for years undermined mainstream blockchain adoption: decentralization, scale, and security.","links":{"x":"https://x.com/AlgoFoundation","github":"https://github.com/algorand","reddit":"https://reddit.com/r/AlgorandOfficial"}},"tokens":[{"address":"31566704","symbol":"USDC","name":"USD Coin","decimals":6,"type":"ASA","status":"active","logo":{"url":"https://chain-assets.lydian.com/algorand/tokens/31566704/logo.png","checksum":"sha256:4fd4b78e88ef0ee54c6424140c2f0adac34c79828db4d917948c52f35c734651"},"metadata":{"website":"https://www.centre.io","description":"USDC provides a fully collateralized US dollar stablecoin, and is based on the open source asset-backed stablecoin framework developed by Centre.","links":{"github":"https://github.com/centrehq"}}}]},{"code":"aptos","name":"Aptos","symbol":"APT","decimals":8,"family":"aptos","explorer":"https://explorer.aptoslabs.com","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/aptos/logo.png","checksum":"sha256:5750ea0071d4ad1f9c0ef1faba52c6b872983855f88291cc25de0e446aa7d03a"},"metadata":{"website":"https://aptoslabs.com","description":"Building the safest and most scalable Layer 1 blockchain.","links":{"x":"https://x.com/aptoslabs","discord":"https://discord.com/invite/aptoslabs","github":"https://github.com/aptoslabs"}},"tokens":[{"address":"0x05fabd1b12e39967a3c24e91b7b8f67719a6dacee74f3c8b9fb7d93e855437d2","symbol":"USD1","name":"World Liberty Financial USD","decimals":6,"type":"APTOS","status":"active","logo":{"url":"https://chain-assets.lydian.com/aptos/tokens/0x05fabd1b12e39967a3c24e91b7b8f67719a6dacee74f3c8b9fb7d93e855437d2/logo.png","checksum":"sha256:226ce53d1fccec27a3c062bc1849ff62e4f7280f46fbf6f62a3c16872a1081fb"},"metadata":{"website":"https://www.worldlibertyfinancial.com/","description":"A stablecoin by World Liberty Financial, redeemable 1:1 for the US dollar and backed by U.S. treasuries, dollar deposits, and other cash equivalents."}},{"address":"0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b","symbol":"USDT","name":"Tether USD","decimals":6,"type":"APTOSFA","status":"active","logo":{"url":"https://chain-assets.lydian.com/aptos/tokens/0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b/logo.png","checksum":"sha256:e60a2daa63fccc42c4cf1ae50443eb0d1e35811bc2ef91481686f77faa426876"},"metadata":{"website":"https://tether.to","description":"Tether (USDT) is a cryptocurrency with a value meant to mirror the value of the U.S. dollar.","links":{"x":"https://x.com/Tether_to/"}}},{"address":"0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b","symbol":"USDC","name":"USDC","decimals":6,"type":"APTOSFA","status":"active","logo":{"url":"https://chain-assets.lydian.com/aptos/tokens/0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b/logo.png","checksum":"sha256:ee0ce597a62d84363dc3ce7863f865290b9f6dc61139b087ff1b5937e669fd47"},"metadata":{"website":"https://circle.com/usdc","description":"USDC is a stablecoin that is pegged to the U.S. dollar on a 1:1 basis","links":{"x":"https://x.com/circle"}}}]},{"code":"arbitrum","name":"Arbitrum","symbol":"ARETH","decimals":18,"family":"evm","explorer":"https://arbiscan.io","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/arbitrum/logo.png","checksum":"sha256:a65f9fb615c6200cad5b62b2b86d1228f348a3fd40dc1596658ef68c8a6463f2"},"metadata":{"chainId":42161,"website":"https://offchainlabs.com","description":"Arbitrum is a Layer 2 cryptocurrency platform that makes smart contracts scalable, fast, and private","links":{"x":"https://x.com/arbitrum"}},"tokens":[{"address":"0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a","symbol":"AUSD","name":"AUSD","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a/logo.png","checksum":"sha256:4c843634b435281e4392869cdbc806c55310aaeab05d902152664d031f716145"},"metadata":{"website":"https://www.agora.finance/","description":"AUSD is a safe, secure asset that enables billions of dollars of transfers and is used globally."}},{"address":"0x0c880f6761F1af8d9Aa9C466984b80DAb9a8c9e8","symbol":"PENDLE","name":"Pendle","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x0c880f6761F1af8d9Aa9C466984b80DAb9a8c9e8/logo.png","checksum":"sha256:449f3edf3a15b31afbfc0bf74adf38e9c620694e82beaba8acfaf5db086c748a"},"metadata":{"website":"https://www.pendle.finance/","description":"Pendle is a protocol for people to trade and hedge yield. Users can tokenize yield and trade them on Pendle's AMM","links":{"x":"https://x.com/pendle_fi","discord":"https://discord.com/invite/9x9VUngNZD","github":"https://github.com/pendle-finance"}}},{"address":"0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978","symbol":"CRV","name":"Curve DAO Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978/logo.png","checksum":"sha256:06bade2be8fd267848c7fc14ab12097c5a8ce9e51084fa5e6802c9c7187cb27c"},"metadata":{"website":"https://curve.finance","description":"CRV is a governance token on the Curve platform with time-weighted voting and value accrual mechanisms.","links":{"x":"https://x.com/CurveFinance","telegram":"https://t.me/curvefi","github":"https://github.com/curvefi/curve-contract"}}},{"address":"0x13Ad51ed4F1B7e9Dc168d8a00cB3f4dDD85EfA60","symbol":"LDO","name":"Lido DAO","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x13Ad51ed4F1B7e9Dc168d8a00cB3f4dDD85EfA60/logo.png","checksum":"sha256:5ccdf72e293767d66fcaf6c41bd25c20a57a4027049bffaebec4e68e7370a081"},"metadata":{"website":"https://stake.lido.fi/","description":"Lido is a liquid staking solution for Ethereum. Lido lets users stake their ETH - with no minimum deposits or maintaining of infrastructure - whilst participating in on-chain activities, e.g. lending, to compound returns. LDO is an ERC20 token granting governance rights in the Lido DAO.","links":{"x":"https://x.com/lidofinance","telegram":"https://t.me/lidofinance"}}},{"address":"0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F","symbol":"FRAX","name":"Frax","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F/logo.png","checksum":"sha256:06a629a0169c3bbc01fd09a38175dc01eee66d88c115092554270b9a8b905d81"},"metadata":{"website":"https://frax.finance/","description":"Frax is a new paradigm in stablecoin design, bringing together a two-token seigniorage share system, swap-based monetary policy, fully on-chain oracles, and decentralized governance alongside its fractional-algorithmic stablecoin design.","links":{"x":"https://x.com/Frax Finance","telegram":"https://t.me/fraxfinance","discord":"https://discord.com/invite/Xwe8kAwZ4a","github":"https://github.com/FraxFinance"}}},{"address":"0x23ee2343B892b1BB63503a4FAbc840E0e2C6810f","symbol":"AXL","name":"Axelar","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x23ee2343B892b1BB63503a4FAbc840E0e2C6810f/logo.png","checksum":"sha256:b6f30181437283842a7c02f2de35f51137b356432ab07fdd13cdb8e25fb880ed"},"metadata":{"website":"https://axelar.network/","description":"Axelar delivers secure cross-chain communication for Web3. Our infrastructure enables dApp users to interact with any asset or application, on any chain, with one click.","links":{"x":"https://x.com/axelarcore","telegram":"https://t.me/axelarcommunity","discord":"https://discord.com/invite/aRZ3Ra6f7D","github":"https://github.com/axelarnetwork","reddit":"https://reddit.com/r/axelar"}}},{"address":"0x319f865b287fCC10b30d8cE6144e8b6D1b476999","symbol":"CTSI","name":"Cartesi","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x319f865b287fCC10b30d8cE6144e8b6D1b476999/logo.png","checksum":"sha256:450c70637f45ce6f7e37a252c3be23d187aa673b878f865beadccbc1bb5517ab"},"metadata":{"website":"https://cartesi.io/","description":"Cartesi, The Blockchain OS, is a layer-2 platform for the development and deployment of scalable decentralized applications. The Blockchain OS offers a Linux operating system coupled with a blockchain infrastructure.","links":{"x":"https://x.com/cartesiproject","telegram":"https://t.me/cartesiproject"}}},{"address":"0x35e050d3C0eC2d29D269a8EcEa763a183bDF9A9D","symbol":"USDY","name":"Ondo U.S. Dollar Yield","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x35e050d3C0eC2d29D269a8EcEa763a183bDF9A9D/logo.png","checksum":"sha256:c92e519c23b9e966a013d4c82171279930bc61d23a8d1960bbb4feed29095d90"},"metadata":{"website":"https://ondo.finance/","description":"Ondo US Dollar Yield (USDY) is a decentralized lending protocol designed to honor transfer restrictions from permissioned tokens, thereby expanding the universe of assets it can support. This unique approach allows it to cater to a broader range of financial instruments, making it a versatile player in the blockchain ecosystem.","links":{"x":"https://x.com/ondofinance"}}},{"address":"0x371c7ec6D8039ff7933a2AA28EB827Ffe1F52f07","symbol":"JOE","name":"JOE","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x371c7ec6D8039ff7933a2AA28EB827Ffe1F52f07/logo.png","checksum":"sha256:705f0fff12f9907a86e9de2ae3b483bc3b999b50b5e8c5dec627e9d38fb4522c"},"metadata":{"website":"https://traderjoexyz.com/","description":"One-stop Decentralized Trading on Avalanche.","links":{"x":"https://x.com/traderjoe_xyz","telegram":"https://t.me/traderjoe_xyz","github":"https://github.com/traderjoe-xyz/"}}},{"address":"0x37a645648dF29205C6261289983FB04ECD70b4B3","symbol":"ANIME","name":"Animecoin","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x37a645648dF29205C6261289983FB04ECD70b4B3/logo.png","checksum":"sha256:58d04c5f53280dd95d2918b82e4f7d72a681b638c6dd620bfa1545ef23f203db"},"metadata":{"website":"https://www.anime.xyz/","description":"Backed by Azuki, the premier Web3 anime brand, ANIME empowers one billion global fans to shape and own the future of anime culture. Anime fans are among the most passionate and creative communities in the world. Yet, they have long been passive consumers. Animecoin transforms the anime ecosystem into a community-owned creative economy.","links":{"x":"https://x.com/animecoin"}}},{"address":"0x3E6648C5a70A150A88bCE65F4aD4d506Fe15d2AF","symbol":"SPELL","name":"Spell Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x3E6648C5a70A150A88bCE65F4aD4d506Fe15d2AF/logo.png","checksum":"sha256:dc5223584b758423bcb11a82983b4c7b7b8d1f5a406e32e33f704c70c0595799"},"metadata":{"website":"https://abracadabra.money/","description":"Abracadabra.money is a lending platform that allows users to borrow funds using Interest Bearing Tokens as collateral.","links":{"x":"https://x.com/MIM_Spell"}}},{"address":"0x431402e8b9dE9aa016C743880e04E517074D8cEC","symbol":"HEGIC","name":"Hegic","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x431402e8b9dE9aa016C743880e04E517074D8cEC/logo.png","checksum":"sha256:45dd3788690d805e306fbedfa3447c80c3f667cb23b715bd144e4fcf09e85c6a"},"metadata":{"website":"https://hegic.co/","description":"Hegic is an on-chain, non-custodial peer-to-pool options trading protocol built on Ethereum. Currently Hegic supports options trading in for Bitcoin (wBTC) and Ether (ETH).","links":{"github":"https://github.com/hegic"}}},{"address":"0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66","symbol":"XAI","name":"Xai","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66/logo.png","checksum":"sha256:0a6d25409a400a591158e9bc1b2ba9cbddcdcb52864d66ab20393bc651f8ad8e"},"metadata":{"website":"https://xai.games/","description":"The Xai token has a dual role on the Xai blockchain. It serves as the gas token for transactions and rewards validator nodes. Moreover, it is the main currency in the gaming ecosystem, accepted for game purchases and in-game items.","links":{"x":"https://x.com/xai_games"}}},{"address":"0x539bdE0d7Dbd336b79148AA742883198BBF60342","symbol":"MAGIC","name":"MAGIC","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x539bdE0d7Dbd336b79148AA742883198BBF60342/logo.png","checksum":"sha256:7e1523b1103e8a599eafc58bac9c251942484f9cf0bb36373c8c92be228f6dac"},"metadata":{"website":"https://treasure.lol/","description":"MAGIC is the utility token that connects gaming communities in the Treasure Metaverse: a decentralized NFT ecosystem which sits on Arbitrum, one of Ethereum’s Layer 2 scaling solutions.","links":{"x":"https://x.com/Treasure_NFT"}}},{"address":"0x61A1ff55C5216b636a294A07D77C6F4Df10d3B56","symbol":"APEX","name":"ApeX","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x61A1ff55C5216b636a294A07D77C6F4Df10d3B56/logo.png","checksum":"sha256:cc43c66602a66f3d995da209bf3d614d9472882f75e3640932c192eaf1e1fa43"},"metadata":{"website":"https://apex.exchange/","description":"ApeX is a decentralized, non-custodial, permissionless, censorship-resistant perpetual derivative protocol that enables the introduction of perpetual swap markets for any token pairs.","links":{"x":"https://x.com/OfficialApeXdex","telegram":"https://t.me/ApeXdex"}}},{"address":"0x6491c05A82219b8D1479057361ff1654749b876b","symbol":"USDS","name":"USDS","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x6491c05A82219b8D1479057361ff1654749b876b/logo.png","checksum":"sha256:db7c8f90a7ef7fd51643a4818baef1da4a96d69fd79edef304660fdca462eb03"},"metadata":{"website":"https://sky.money/","description":"Cryptocurrency, also referred to as “crypto,” is a type of digital currency that uses cryptography to help improve the security and overall user control of associated transactions","links":{"x":"https://x.com/SkyEcosystem"}}},{"address":"0x6694340fc020c5E6B96567843da2df01b2CE1eb6","symbol":"STG","name":"Stargate","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x6694340fc020c5E6B96567843da2df01b2CE1eb6/logo.png","checksum":"sha256:2a4ec045b033efde4314ea65c11d18bd38c64bb3ceb5257cb79e32ce6fdd6553"},"metadata":{"website":"https://stargate.finance/","description":"Stargate is a fully composable liquidity transport protocol.","links":{"telegram":"https://t.me/joinchat/LEM0ELklmO1kODdh"}}},{"address":"0x6985884C4392D348587B19cb9eAAf157F13271cd","symbol":"ZRO","name":"LayerZero","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x6985884C4392D348587B19cb9eAAf157F13271cd/logo.png","checksum":"sha256:6d2e57666161c774b320aec817b1576f78644e2adc1358fbf5db6ba9e93616b2"},"metadata":{"website":"https://layerzero.network/","description":"LayerZero is a technology that enables applications to move data across blockchains, uniquely supporting censorship-resistant messages and permissionless development through immutable smart contracts","links":{"x":"https://x.com/LayerZero_Labs","telegram":"https://t.me/joinchat/VcqxYkStIDsyN2Rh"}}},{"address":"0x69Eb4FA4a2fbd498C257C57Ea8b7655a2559A581","symbol":"DODO","name":"DODO","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x69Eb4FA4a2fbd498C257C57Ea8b7655a2559A581/logo.png","checksum":"sha256:cddb1dc47fd671e24f3b082c52bdb03efe5a6f05614ac66f6b47563406cbfbc9"},"metadata":{"website":"https://dodoex.io/","description":"DODO is a liquidity protocol powered by the Proactive Market Maker (PMM) algorithm and built for capital efficiency.","links":{"x":"https://x.com/DODO","github":"https://github.com/DODOEX/","reddit":"https://reddit.com/r/DodoEx/"}}},{"address":"0x82e3A8F066a6989666b031d916c43672085b1582","symbol":"YFI","name":"yearn.finance","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x82e3A8F066a6989666b031d916c43672085b1582/logo.png","checksum":"sha256:e99831fd2ad39bb53e03c086e9933d703fb3d6c3193330f600c95b3334f875c6"},"metadata":{"website":"https://yearn.finance/","description":"YFI is the governance token for Yearn.Finance, a site that performs a variety of functions for DeFi users, moving their assets in and out of different liquidity pools in order to find the best yields.","links":{"x":"https://x.com/iearnfinance","telegram":"https://t.me/iearnfinance","github":"https://github.com/iearn-finance"}}},{"address":"0x8aD3c73F833d3F9A523aB01476625F269aEB7Cf0","symbol":"TSLAX","name":"Tesla tokenized stock (xStock)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x8aD3c73F833d3F9A523aB01476625F269aEB7Cf0/logo.png","checksum":"sha256:7067e84db7a7af0f9ccdc7e146fa22c004b0a73f91cb59ac1255a53dd541004b"},"metadata":{"website":"https://assets.backed.fi/products","description":"Tesla tokenized stock (xStock) (TSLAX) is a cryptocurrency and operates on the Solana platform. Tesla tokenized stock (xStock) has a current supply of 50,998.28909342 with 10,999.28657402 in circulation. The last known price of Tesla tokenized stock (xStock) is 417.05893204 USD and is down -0.76 over the last 24 hours. It is currently trading on 44 active market(s) with $21,478,606.39 traded over the last 24 hours. More information can be found at https://assets.backed.fi/products/tesla-xstock.","links":{"x":"https://x.com/xstocksfi"}}},{"address":"0x90A2a4c76b5D8c0bc892A69EA28Aa775a8f2dD48","symbol":"SPYX","name":"SP500 tokenized ETF (xStock)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x90A2a4c76b5D8c0bc892A69EA28Aa775a8f2dD48/logo.png","checksum":"sha256:ce30a90fe96282ecb37db778ad33e4ecff126dcb861d5c4158dedf3c055bdee1"},"metadata":{"website":"https://assets.backed.fi/products","description":"SP500 tokenized ETF (xStock) (SPYX) is a cryptocurrency and operates on the Solana platform. SP500 tokenized ETF (xStock) has a current supply of 15,999.19889527. The last known price of SP500 tokenized ETF (xStock) is 662.57535897 USD and is up 0.48 over the last 24 hours. It is currently trading on 29 active market(s) with $2,070,018.72 traded over the last 24 hours. More information can be found at https://assets.backed.fi/products/sp500-xstock.","links":{"x":"https://x.com/xstocksfi"}}},{"address":"0x912CE59144191C1204E64559FE8253a0e49E6548","symbol":"ARB","name":"Arbitrum","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x912CE59144191C1204E64559FE8253a0e49E6548/logo.png","checksum":"sha256:398ceedea8ce4b8f409aad460b275d0f2fb33b1cc489d926f149f903d8fe60ed"},"metadata":{"website":"https://arbitrum.foundation/","description":"$ARB tokens can be used to vote on Arbitrum DAO governance proposals, allowing $ARB holders to collectively shape the future of Arbitrum protocols and chains. Token holders can also delegate their voting power to delegates.","links":{"x":"https://x.com/arbitrum","discord":"https://discord.com/arbitrum"}}},{"address":"0x9623063377AD1B27544C965cCd7342f7EA7e88C7","symbol":"GRT","name":"The Graph","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0x9623063377AD1B27544C965cCd7342f7EA7e88C7/logo.png","checksum":"sha256:04e211ff16cbe14e7f4cd642f5cf327a0335a8f47321797ca5029cc4b36d47b5"},"metadata":{"website":"https://thegraph.com","description":"The Graph is an indexing protocol and global API for organizing blockchain data and making it easily accessible with GraphQL. Developers can use Graph Explorer to search, find, and publish all the public data they need to build decentralized applications. The Graph Network makes it possible to build serverless dApps that run entirely on public infrastructure.","links":{"x":"https://x.com/graphprotocol","telegram":"https://t.me/graphprotocol","github":"https://github.com/graphprotocol/graph-node","reddit":"https://reddit.com/r/thegraph"}}},{"address":"0xAE2f842EF90C0d5213259Ab82639D5BBF649b08E","symbol":"MSTRX","name":"MicroStrategy tokenized stock (xStock)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xAE2f842EF90C0d5213259Ab82639D5BBF649b08E/logo.png","checksum":"sha256:7890c13fad8af0a9b160e4f4ead9b0cba72ab2c4461eb897d00e06973f71ce03"},"metadata":{"website":"https://assets.backed.fi/products","description":"MicroStrategy tokenized stock (xStock) (MSTRX) is a cryptocurrency and operates on the Solana platform. MicroStrategy tokenized stock (xStock) has a current supply of 19,499.52630505. The last known price of MicroStrategy tokenized stock (xStock) is 329.14757255 USD and is down -0.35 over the last 24 hours. It is currently trading on 28 active market(s) with $3,268,417.42 traded over the last 24 hours. More information can be found at https://assets.backed.fi/products/microstrategy-xstock.","links":{"x":"https://x.com/xstocksfi"}}},{"address":"0xDBB5Cf12408a3Ac17d668037Ce289f9eA75439D7","symbol":"WMTX","name":"WorldMobileToken","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xDBB5Cf12408a3Ac17d668037Ce289f9eA75439D7/logo.png","checksum":"sha256:09b47d9f8323d8e40014010503e9be41d6a17298903de7d075afdb508990cb93"},"metadata":{"website":"https://worldmobiletoken.com/","description":"World Mobile Token (WMTX) is the utility token that powers the World Mobile network, a decentralized mobile network at the forefront of the DePIN space. World Mobile aims to connect the world by leveraging blockchain technology and a sharing economy.","links":{"x":"https://x.com/wmtoken"}}},{"address":"0xFF7F8F301F7A706E3CfD3D2275f5dc0b9EE8009B","symbol":"FOLKS","name":"Folks Finance","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xFF7F8F301F7A706E3CfD3D2275f5dc0b9EE8009B/logo.png","checksum":"sha256:c3245428d5d41850d1529312299c9661f03252ed0452ae159ed33b244725bc60"},"metadata":{"website":"https://folks.finance","description":"Folks Finance is a crosschain decentralized finance (DeFi) protocol that enables users to supply, borrow, and manage digital assets across multiple blockchains from a single platform.","links":{"x":"https://x.com/FolksFinance"}}},{"address":"0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0","symbol":"UNI","name":"Uniswap","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0/logo.png","checksum":"sha256:c3e284ae768675c5195fdac51073f9b2b66831f1c793f50b2c040c82f9c2f7a9"},"metadata":{"website":"https://uniswap.org","description":"UNI is the Uniswap protocol token. Uniswap is a decentralized protocol for automated liquidity provision on Ethereum.","links":{"x":"https://x.com/UniswapProtocol","discord":"https://discord.com/invite/XErMcTq"}}},{"address":"0xa0b862F60edEf4452F25B4160F177db44DeB6Cf1","symbol":"GNO","name":"Gnosis","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xa0b862F60edEf4452F25B4160F177db44DeB6Cf1/logo.png","checksum":"sha256:7e0ee9ce5fff69e3c2b491081ba7aed545c23498889d433d8b0cbd0649e1981a"},"metadata":{"website":"https://gnosis.io","description":"Gnosis is a decentralized prediction market built on the Ethereum protocol.","links":{"x":"https://x.com/gnosisPM","github":"https://github.com/gnosis","reddit":"https://reddit.com/r/gnosisPM/"}}},{"address":"0xa753A7395cAe905Cd615Da0B82A53E0560f250af","symbol":"QQQX","name":"Nasdaq tokenized ETF (xStock)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xa753A7395cAe905Cd615Da0B82A53E0560f250af/logo.png","checksum":"sha256:fcef4d60067c63ded719748b49e216247bc4d459b6755fb2de54bd4b59e69655"},"metadata":{"website":"https://assets.backed.fi/products","description":"Nasdaq tokenized ETF (xStock) (QQQX) is a cryptocurrency and operates on the Solana platform. Nasdaq tokenized ETF (xStock) has a current supply of 5,999.92232021. The last known price of Nasdaq tokenized ETF (xStock) is 593.40939583 USD and is up 0.98 over the last 24 hours. It is currently trading on 15 active market(s) with $930,481.21 traded over the last 24 hours. More information can be found at https://assets.backed.fi/products/nasdaq-xstock.","links":{"x":"https://x.com/xstocksfi"}}},{"address":"0xa78d8321B20c4Ef90eCd72f2588AA985A4BDb684","symbol":"ANT","name":"Autonomi","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xa78d8321B20c4Ef90eCd72f2588AA985A4BDb684/logo.png","checksum":"sha256:d56173c290b8bec68cfefa93082737d84048dcd6960b31ca03d889c3be7b669e"},"metadata":{"website":"https://autonomi.com/","description":"ANT is the utility token of Autonomi, a decentralized network running on everyday devices. Self-encryption, quantum-safe security, and lifetime storage by pooling spare device capacity. It enables secure data storage, communication, and services without middlemen, ensuring privacy and accessibility.","links":{"x":"https://x.com/WithAutonomi"}}},{"address":"0xaf88d065e77c8cC2239327C5EDb3A432268e5831","symbol":"USDC","name":"USD Coin","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xaf88d065e77c8cC2239327C5EDb3A432268e5831/logo.png","checksum":"sha256:4fd4b78e88ef0ee54c6424140c2f0adac34c79828db4d917948c52f35c734651"},"metadata":{"website":"https://www.centre.io/usdc","description":"USDC is a fully collateralized US Dollar stablecoin developed by CENTRE, the open source project with Circle being the first of several forthcoming issuers."}},{"address":"0xba5DdD1f9d7F570dc94a51479a000E3BCE967196","symbol":"AAVE","name":"Aave","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xba5DdD1f9d7F570dc94a51479a000E3BCE967196/logo.png","checksum":"sha256:40ea8e81f238e099b918b9db970b02631666f1aa8b68c8cb297b92d301d5d39a"},"metadata":{"website":"https://aave.com","description":"Aave is a decentralized finance protocol that allows people to lend and borrow crypto.","links":{"x":"https://x.com/aave","github":"https://github.com/aave/aave-protocol","reddit":"https://reddit.com/r/Aave_Official"}}},{"address":"0xc08Cd26474722cE93F4D0c34D16201461c10AA8C","symbol":"CARV","name":"CARV","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xc08Cd26474722cE93F4D0c34D16201461c10AA8C/logo.png","checksum":"sha256:bdee2736028642350a01ae142a99d5d73e18740e55f3b5ac953ca8ae0f3c5350"},"metadata":{"website":"https://carv.io/","description":"The CARV Protocol is a modular data layer that facilitates data exchange and value distribution across gaming, AI and ∞. It encompasses end-to-end data flow processes, including data verification, identity authentication, storage, processing, model training, and value distribution.","links":{"x":"https://x.com/carv_official","telegram":"https://t.me/carv_official_global"}}},{"address":"0xc845b2894dBddd03858fd2D643B4eF725fE0849d","symbol":"NVDAX","name":"NVIDIA tokenized stock (xStock)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xc845b2894dBddd03858fd2D643B4eF725fE0849d/logo.png","checksum":"sha256:c5691a31cfc59bee27620a61e4ab9fa1b4f681b19d4b9145907b323039a9d13a"},"metadata":{"website":"https://assets.backed.fi/products","description":"NVIDIA tokenized stock (xStock) (NVDAX) is a cryptocurrency and operates on the Solana platform. NVIDIA tokenized stock (xStock) has a current supply of 48,653.72471846 with 7,655.63423039 in circulation. The last known price of NVIDIA tokenized stock (xStock) is 177.44432253 USD and is up 1.21 over the last 24 hours. It is currently trading on 44 active market(s) with $7,676,418.12 traded over the last 24 hours. More information can be found at https://assets.backed.fi/products/nvidia-xstock.","links":{"x":"https://x.com/xstocksfi"}}},{"address":"0xc87B37a581ec3257B734886d9d3a581F5A9d056c","symbol":"ATH","name":"Aethir","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xc87B37a581ec3257B734886d9d3a581F5A9d056c/logo.png","checksum":"sha256:9b5449502fa80bacb37b2eed465c808fb502041ffa111f05664d5ffb126975ca"},"metadata":{"website":"https://www.aethir.com/","description":"Aethir builds distributed GPU-based compute infrastructure for dynamic, enterprise use cases. It aims to make it easier for GPU infrastructure providers to scale, and simpler for buyers to access GPU worldwide.","links":{"x":"https://x.com/AethirCloud","telegram":"https://t.me/aethir_cloud"}}},{"address":"0xcAFcD85D8ca7Ad1e1C6F82F651fA15E33AEfD07b","symbol":"WOO","name":"Wootrade Network","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xcAFcD85D8ca7Ad1e1C6F82F651fA15E33AEfD07b/logo.png","checksum":"sha256:e2d294d316cb85127822ceba32f95c3734419d3069639f83624a036f823a8bd8"},"metadata":{"website":"https://woo.network","description":"Wootrade aims to provide deep liquidity and superior order execution at the lowest cost for traders, exchanges, institutions, and DeFi platforms. Its flagship, WOO X, is a professional trading platform featuring customizable modules, and zero-fees with deep liquidity across spot and margin. Wootrade was founded by Kronos Research, a quantitative trading firm generating $10-15B in daily volume, with the goal of democratizing access to deep liquidity and yield strategies through various products.","links":{"telegram":"https://t.me/wootrade"}}},{"address":"0xcb8b5CD20BdCaea9a010aC1F8d835824F5C87A04","symbol":"COW","name":"CoW Protocol Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xcb8b5CD20BdCaea9a010aC1F8d835824F5C87A04/logo.png","checksum":"sha256:8ccdcff86a118fed5a42af74a8bf35c4604251f69a36d5409344d3ace281b9b1"},"metadata":{"website":"https://cow.fi","description":"COW token allows its holders the right to govern and curate the infrastructure of the CoW Protocol ecosystem through the CowDAO. Additionally, COW token holders receive fee discounts when trading on CowSwap & some other perks.","links":{"x":"https://x.com/CoWSwap","discord":"https://discord.com/invite/cowprotocol","github":"https://github.com/cowprotocol"}}},{"address":"0xd4d42F0b6DEF4CE0383636770eF773390d85c61A","symbol":"SUSHI","name":"SushiSwap","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xd4d42F0b6DEF4CE0383636770eF773390d85c61A/logo.png","checksum":"sha256:b5d42b51ccbe4cf62023b35c90bbfde68ea0b4ec959c29b8d5c04f2853e164a3"},"metadata":{"website":"https://sushiswap.fi","description":"SushiSwap claims to be an evolution of #Uniswap with $SUSHI tokenomics.","links":{"x":"https://x.com/sushiswap","github":"https://github.com/sushiswap"}}},{"address":"0xd58D345Fd9c82262E087d2D0607624B410D88242","symbol":"TRB","name":"Tellor","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xd58D345Fd9c82262E087d2D0607624B410D88242/logo.png","checksum":"sha256:a785ff7aeb811587f7475da6aecac5863cf8d3432285f1d2e2db4205f852926e"},"metadata":{"website":"https://tellor.io","description":"Tellor (a decentralized oracle) aims to address the Oracle problem on Ethereum.","links":{"x":"https://x.com/WeAreTellor","telegram":"https://t.me/tellor"}}},{"address":"0xe4DDDfe67E7164b0FE14E218d80dC4C08eDC01cB","symbol":"KNC","name":"Kyber Network","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xe4DDDfe67E7164b0FE14E218d80dC4C08eDC01cB/logo.png","checksum":"sha256:79831643a287a755cbca289959a69d8c7cd8127713fe1ac20d0632ba35e6d33c"},"metadata":{"website":"https://kyber.network","description":"Kyber Network’s on-chain liquidity protocol allows decentralized token swaps to be integrated into any application, enabling value exchange to be performed seamlessly between all parties in the ecosystem."}},{"address":"0xe92f673Ca36C5E2Efd2DE7628f815f84807e803F","symbol":"GOOGLX","name":"Alphabet tokenized stock (xStock)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xe92f673Ca36C5E2Efd2DE7628f815f84807e803F/logo.png","checksum":"sha256:51a73216759bde12b6df3fcffb730d87e54111ad2c8861919bf19bbab47ac06e"},"metadata":{"website":"https://assets.backed.fi/products","description":"Alphabet tokenized stock (xStock) (GOOGLX) is a cryptocurrency and operates on the Solana platform. Alphabet tokenized stock (xStock) has a current supply of 20,999.24547712. The last known price of Alphabet tokenized stock (xStock) is 254.51926743 USD and is up 4.55 over the last 24 hours. It is currently trading on 34 active market(s) with $4,238,360.30 traded over the last 24 hours. More information can be found at https://assets.backed.fi/products/alphabet-xstock.","links":{"x":"https://x.com/xstocksfi"}}},{"address":"0xf3C091ed43de9c270593445163a41A876A0bb3dd","symbol":"ORBS","name":"Orbs","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xf3C091ed43de9c270593445163a41A876A0bb3dd/logo.png","checksum":"sha256:9760d7feeaf5d2de8f1009226454f6bf1f00f6f38388ad543e3b9af1c947e8c1"},"metadata":{"website":"https://orbs.com","description":"Orbs is a blockchain infrastructure-as-a-service built for large scale consumer applications to meet their business and technological requirements.","links":{"x":"https://x.com/orbs_network","telegram":"https://t.me/orbs_network","github":"https://github.com/orbs-network"}}},{"address":"0xf97f4df75117a78c1A5a0DBb814Af92458539FB4","symbol":"LINK","name":"Chainlink","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xf97f4df75117a78c1A5a0DBb814Af92458539FB4/logo.png","checksum":"sha256:08a918aae0eec47429d4f729e0ef2fe436fb4f33169d02d7978bb464d3043632"},"metadata":{"website":"https://chain.link","description":"Chainlink is a decentralized oracle service, which aims to connect smart contracts with data from the real world. Oracles are needed to function as data feeds in smart contracts. Oracles provide external data (e.g. temperature, weather) that can drive smart contract executions. Participants on the network are incentivized (through rewards) to provide smart contracts with access to external data feeds.","links":{"x":"https://x.com/chainlink","github":"https://github.com/smartcontractkit/chainlink","reddit":"https://reddit.com/r/chainlink"}}},{"address":"0xfEbDEd1B0986a8ee107f5AB1a1c5a813491DeCEB","symbol":"CRCLX","name":"Circle tokenized stock (xStock)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xfEbDEd1B0986a8ee107f5AB1a1c5a813491DeCEB/logo.png","checksum":"sha256:59553d7740c22356ff64f3f9293b9c1bfd95f75a9ec52cb573c8d3c5738bb615"},"metadata":{"website":"https://assets.backed.fi/products","description":"Circle tokenized stock (xStock) (CRCLX) is a cryptocurrency and operates on the Solana platform. Circle tokenized stock (xStock) has a current supply of 49,998.60984587. The last known price of Circle tokenized stock (xStock) is 134.16292538 USD and is up 4.96 over the last 24 hours. It is currently trading on 44 active market(s) with $8,141,888.27 traded over the last 24 hours. More information can be found at https://assets.backed.fi/products/circle-xstock.","links":{"x":"https://x.com/xstocksfi"}}},{"address":"0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a","symbol":"GMX","name":"GMX","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/arbitrum/tokens/0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a/logo.png","checksum":"sha256:cd408f539745ca2d8d4857dd5fac37c6fa23230e63dcbd50f462c2fc322af8e9"},"metadata":{"website":"https://gmx.io/","description":"GMX is a decentralized spot and perpetual exchange that supports low swap fees and zero price impact trades.","links":{"x":"https://x.com/GMX_IO","telegram":"https://t.me/GMX_IO"}}}]},{"code":"aurora","name":"Aurora","symbol":"ETH","decimals":18,"family":"evm","explorer":"https://explorer.mainnet.aurora.dev/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/aurora/logo.png","checksum":"sha256:1c72086b6d4aed8cc399683d7e0ec82559597fb4ac61b2433c0ab320c4a435f8"},"metadata":{"chainId":1313161554,"website":"https://aurora.dev","description":"Aurora provides Ethereum compatibility, NEAR Protocol scalability, and industry-first user experience through affordable transactions.","links":{"x":"https://x.com/auroraisnear"}},"tokens":[{"address":"0x8BEc47865aDe3B172A928df8f990Bc7f2A3b9f79","symbol":"AURORA","name":"Aurora","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/aurora/tokens/0x8BEc47865aDe3B172A928df8f990Bc7f2A3b9f79/logo.png","checksum":"sha256:1c72086b6d4aed8cc399683d7e0ec82559597fb4ac61b2433c0ab320c4a435f8"},"metadata":{"website":"https://aurora.dev/","description":"AURORA token is a governance token to ensure proper upgrades to the protocol. Aurora is governed by AuroraDAO which includes representatives from different ecosystems and sectors of the blockchain industry.","links":{"x":"https://x.com/auroraisnear","telegram":"https://t.me/auroraisnear","github":"https://github.com/aurora-is-near"}}}]},{"code":"avalanche","name":"Avalanche C-Chain","symbol":"AVAX","decimals":18,"family":"evm","explorer":"https://explorer.avax.network","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/avalanche/logo.png","checksum":"sha256:d1f704c262a799578483f98c16afe5d182fe3b2ebff0c54b5e8656f6a3d61241"},"metadata":{"chainId":43114,"website":"http://avax.network","description":"Avalanche is an open-source platform for launching highly decentralized applications, new financial primitives, and new interoperable blockchains. This is the C-Chain, the default smart contract blockchain on Avalanche that enables the creation of any Ethereum-compatible smart contracts.","links":{"github":"https://github.com/ava-labs"}},"tokens":[{"address":"0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a","symbol":"AUSD","name":"AUSD","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a/logo.png","checksum":"sha256:4c843634b435281e4392869cdbc806c55310aaeab05d902152664d031f716145"},"metadata":{"website":"https://www.agora.finance/","description":"AUSD is a safe, secure asset that enables billions of dollars of transfers and is used globally."}},{"address":"0x1C20E891Bab6b1727d14Da358FAe2984Ed9B59EB","symbol":"TUSD","name":"TrueUSD","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x1C20E891Bab6b1727d14Da358FAe2984Ed9B59EB/logo.png","checksum":"sha256:5e4046bad4be380664933c6633a99e97f50d5a10e94423edecbbd1e4b5ad38ab"},"metadata":{"website":"https://trueusd.com/","description":"A regulated, exchange-independent stablecoin backed 1-for-1 with US Dollars.","links":{"x":"https://x.com/tusd_official"}}},{"address":"0x214DB107654fF987AD859F34125307783fC8e387","symbol":"FXS","name":"Frax Share","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x214DB107654fF987AD859F34125307783fC8e387/logo.png","checksum":"sha256:be83ca4a29c1ced0aebb8a86bc3ecb039debf20f2bd4251fff8c178d9428aaf6"},"metadata":{"website":"https://frax.finance/","description":"FXS is the value accrual and governance token of the entire Frax ecosystem. Frax is a fractional-algorithmic stablecoin protocol. It aims to provide a highly scalable, decentralized, algorithmic money in place of fixed-supply assets like BTC.","links":{"x":"https://x.com/fraxfinance","telegram":"https://t.me/fraxfinance"}}},{"address":"0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590","symbol":"STG","name":"StargateToken","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590/logo.png","checksum":"sha256:d86b08417c95a404769402ded2e21d2b1b7ba215074ae806c673d62c7a33171c"},"metadata":{"website":"https://stargate.finance","description":"Stargate is a fully composable liquidity transport protocol that lives at the heart of Omnichain DeFi.","links":{"telegram":"https://t.me/joinchat/LEM0ELklmO1kODdh"}}},{"address":"0x37B608519F91f70F2EeB0e5Ed9AF4061722e4F76","symbol":"SUSHI.e","name":"SushiToken","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x37B608519F91f70F2EeB0e5Ed9AF4061722e4F76/logo.png","checksum":"sha256:b5d42b51ccbe4cf62023b35c90bbfde68ea0b4ec959c29b8d5c04f2853e164a3"},"metadata":{"website":"https://sushi.com/","description":"Be a DeFi Chef with Sushi - Swap, earn, stack yields, lend, borrow, leverage all on one decentralized, community driven platform.","links":{"x":"https://x.com/sushiswap","github":"https://github.com/sushiswap"}}},{"address":"0x39fC9e94Caeacb435842FADeDeCB783589F50f5f","symbol":"KNC","name":"Kyber Network Crystal v2","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x39fC9e94Caeacb435842FADeDeCB783589F50f5f/logo.png","checksum":"sha256:451eba58c64717e183f96829f3d129c50c0bda072274dc457227273a54604b03"},"metadata":{"website":"https://kyber.network/","description":"Kyber is a blockchain-based liquidity protocol that aggregates liquidity from a wide range of reserves, powering instant and secure token exchange in any decentralized application.","links":{"x":"https://x.com/KyberNetwork","github":"https://github.com/KyberNetwork"}}},{"address":"0x3Ab1C9aDb065F3FcA0059652Cd7A52B05C98f9a9","symbol":"ORBS","name":"Orbs","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x3Ab1C9aDb065F3FcA0059652Cd7A52B05C98f9a9/logo.png","checksum":"sha256:9760d7feeaf5d2de8f1009226454f6bf1f00f6f38388ad543e3b9af1c947e8c1"},"metadata":{"website":"https://orbs.com","description":"Orbs is a blockchain infrastructure-as-a-service built for large scale consumer applications to meet their business and technological requirements.","links":{"x":"https://x.com/orbs_network","telegram":"https://t.me/orbs_network","github":"https://github.com/orbs-network"}}},{"address":"0x3Bd2B1c7ED8D396dbb98DED3aEbb41350a5b2339","symbol":"UMA.e","name":"UMA Voting Token v1","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x3Bd2B1c7ED8D396dbb98DED3aEbb41350a5b2339/logo.png","checksum":"sha256:6a876893f1bc66829e58e5170fe6f61294bc655b2add6c5d96e72de187621f56"},"metadata":{"website":"https://umaproject.org/","description":"UMA is a decentralized financial contracts platform built to enable Universal Market Access.","links":{"x":"https://x.com/umaprotocol/","github":"https://github.com/UMAprotocol/protocol"}}},{"address":"0x44c784266cf024a60e8acF2427b9857Ace194C5d","symbol":"AXL","name":"Axelar","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x44c784266cf024a60e8acF2427b9857Ace194C5d/logo.png","checksum":"sha256:b6f30181437283842a7c02f2de35f51137b356432ab07fdd13cdb8e25fb880ed"},"metadata":{"website":"https://axelar.network/","description":"Axelar delivers secure cross-chain communication for Web3. Our infrastructure enables dApp users to interact with any asset or application, on any chain, with one click.","links":{"x":"https://x.com/axelarcore","telegram":"https://t.me/axelarcommunity","discord":"https://discord.com/invite/aRZ3Ra6f7D","github":"https://github.com/axelarnetwork","reddit":"https://reddit.com/r/axelar"}}},{"address":"0x5947BB275c521040051D82396192181b413227A3","symbol":"LINK.e","name":"Chainlink Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x5947BB275c521040051D82396192181b413227A3/logo.png","checksum":"sha256:08a918aae0eec47429d4f729e0ef2fe436fb4f33169d02d7978bb464d3043632"},"metadata":{"website":"https://chain.link/","description":"A blockchain-based middleware, acting as a bridge between cryptocurrency smart contracts, data feeds, APIs and traditional bank account payments.","links":{"telegram":"https://t.me/chainlinkofficial"}}},{"address":"0x62edc0692BD897D2295872a9FFCac5425011c661","symbol":"GMX","name":"GMX","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x62edc0692BD897D2295872a9FFCac5425011c661/logo.png","checksum":"sha256:cd408f539745ca2d8d4857dd5fac37c6fa23230e63dcbd50f462c2fc322af8e9"},"metadata":{"website":"https://gmx.io/","description":"GMX is a decentralized spot and perpetual exchange that supports low swap fees and zero price impact trades.","links":{"x":"https://x.com/GMX_IO","telegram":"https://t.me/GMX_IO"}}},{"address":"0x63a72806098Bd3D9520cC43356dD78afe5D386D9","symbol":"AAVE.e","name":"Aave Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x63a72806098Bd3D9520cC43356dD78afe5D386D9/logo.png","checksum":"sha256:2ed37dd80301a82cc92cde4c37d6a34926317ce44910c8e9ee57a0a4ed10829e"},"metadata":{"website":"https://aave.com/","description":"The Avalanche Bridge Wrapped Aave Token. Aave is an Open Source and Non-Custodial protocol to earn interest on deposits & borrow assets. It also features access to highly innovative flash loans, which let developers borrow instantly and easily; no collateral needed.","links":{"x":"https://x.com/AaveAave"}}},{"address":"0x6985884C4392D348587B19cb9eAAf157F13271cd","symbol":"ZRO","name":"LayerZero","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x6985884C4392D348587B19cb9eAAf157F13271cd/logo.png","checksum":"sha256:6d2e57666161c774b320aec817b1576f78644e2adc1358fbf5db6ba9e93616b2"},"metadata":{"website":"https://layerzero.network/","description":"LayerZero is a technology that enables applications to move data across blockchains, uniquely supporting censorship-resistant messages and permissionless development through immutable smart contracts","links":{"x":"https://x.com/LayerZero_Labs","telegram":"https://t.me/joinchat/VcqxYkStIDsyN2Rh"}}},{"address":"0x6b289CCeAA8639e3831095D75A3e43520faBf552","symbol":"CTSI","name":"Cartesi Token (PoS)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x6b289CCeAA8639e3831095D75A3e43520faBf552/logo.png","checksum":"sha256:89574e7438d45a10883f9fceaa5147b23f880735b5b0de4dfff05c8561a476bc"},"metadata":{"website":"https://cartesi.io","description":"Cartesi is the first Blockchain OS. It allows developers to build decentralized logic with Linux and standard programming environments preserving the decentralization and security of blockchains.","links":{"x":"https://x.com/cartesiproject","telegram":"https://t.me/cartesiannouncements"}}},{"address":"0x6e84a6216eA6dACC71eE8E6b0a5B7322EEbC0fDd","symbol":"JOE","name":"JOE","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x6e84a6216eA6dACC71eE8E6b0a5B7322EEbC0fDd/logo.png","checksum":"sha256:705f0fff12f9907a86e9de2ae3b483bc3b999b50b5e8c5dec627e9d38fb4522c"},"metadata":{"website":"https://traderjoexyz.com/","description":"One-stop Decentralized Trading on Avalanche.","links":{"x":"https://x.com/traderjoe_xyz","telegram":"https://t.me/traderjoe_xyz","github":"https://github.com/traderjoe-xyz/"}}},{"address":"0x8a0cAc13c7da965a312f08ea4229c37869e85cB9","symbol":"GRT.e","name":"Graph Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x8a0cAc13c7da965a312f08ea4229c37869e85cB9/logo.png","checksum":"sha256:04e211ff16cbe14e7f4cd642f5cf327a0335a8f47321797ca5029cc4b36d47b5"},"metadata":{"website":"https://thegraph.com/","description":"The Graph is an indexing protocol and global API for organizing blockchain data and making it easily accessible with GraphQL.","links":{"x":"https://x.com/graphprotocol"}}},{"address":"0x8eBAf22B6F053dFFeaf46f4Dd9eFA95D89ba8580","symbol":"UNI.e","name":"Uniswap","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x8eBAf22B6F053dFFeaf46f4Dd9eFA95D89ba8580/logo.png","checksum":"sha256:c3e284ae768675c5195fdac51073f9b2b66831f1c793f50b2c040c82f9c2f7a9"},"metadata":{"website":"https://uniswap.org/","description":"The Avalanche Bridge Wrapped Uniswap. Unwrapped Etherscan ERC20 Desc Below:UNI token served as governance token for Uniswap protocol with 1 billion UNI have been minted at genesis. 60% of the UNI genesis supply is allocated to Uniswap community members and remaining for team, investors and advisors.","links":{"x":"https://x.com/uniswap/"}}},{"address":"0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7","symbol":"USDt","name":"TetherToken","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7/logo.png","checksum":"sha256:0e30667248a83ba395a480fd453ae3cb8a2ca9a06375f0395ce7fc93bc47c17c"},"metadata":{"website":"https://tether.to/","description":"Tether gives you the joint benefits of open blockchain technology and traditional currency by converting your cash into a stable digital currency equivalent.","links":{"x":"https://x.com/Tether_to"}}},{"address":"0x98443B96EA4b0858FDF3219Cd13e98C7A4690588","symbol":"BAT.e","name":"Basic Attention Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x98443B96EA4b0858FDF3219Cd13e98C7A4690588/logo.png","checksum":"sha256:8a0594941e296c52900fb3ae1912a22a452dae1aad85f66e11687a4602e017bd"},"metadata":{"website":"https://basicattentiontoken.org/","description":"The Avalanche Bridge Wrapped BAT. The Basic Attention Token is the new token for the digital advertising industry.","links":{"x":"https://x.com/@attentiontoken"}}},{"address":"0x9eAaC1B23d935365bD7b542Fe22cEEe2922f52dc","symbol":"YFI.e","name":"yearn.finance","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0x9eAaC1B23d935365bD7b542Fe22cEEe2922f52dc/logo.png","checksum":"sha256:e99831fd2ad39bb53e03c086e9933d703fb3d6c3193330f600c95b3334f875c6"},"metadata":{"website":"https://yearn.finance/","description":"DeFi made simple.","links":{"x":"https://x.com/iearnfinance","telegram":"https://t.me/iearnfinance"}}},{"address":"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E","symbol":"USDC","name":"USD Coin","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E/logo.png","checksum":"sha256:ee0ce597a62d84363dc3ce7863f865290b9f6dc61139b087ff1b5937e669fd47"},"metadata":{"website":"https://www.centre.io/","description":"USDC is a fully collateralized US Dollar stablecoin developed by CENTRE, the open source project with Circle being the first of several forthcoming issuers.","links":{"x":"https://x.com/centre_io"}}},{"address":"0xBeC243C995409E6520D7C41E404da5dEba4b209B","symbol":"SNX.e","name":"Synthetix Network Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0xBeC243C995409E6520D7C41E404da5dEba4b209B/logo.png","checksum":"sha256:5c0e732b5db086867c8e32046439c4db659d56447d0693a388c82b6801f46290"},"metadata":{"website":"https://www.synthetix.io/","description":"The Avalanche Bridge Wrapped Synthetix Network Token. The Synthetix Network Token is the native token of Synthetix, a synthetic asset (Synth) issuance protocol built on Ethereum. The SNX token is used as collateral to issue Synths.","links":{"x":"https://x.com/synthetix_io","github":"https://github.com/havven/havven"}}},{"address":"0xC891EB4cbdEFf6e073e859e987815Ed1505c2ACD","symbol":"EURC","name":"Euro Coin","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0xC891EB4cbdEFf6e073e859e987815Ed1505c2ACD/logo.png","checksum":"sha256:51e122a505d7f640613aadd51c19fecee855a64b766b62bad1b349e419c251ed"},"metadata":{"website":"https://www.circle.com/eurc","description":"Eurocoin (EUC) is an open-sourced, decentralized digital cryptocurrency that functions on a community-based standard.","links":{"x":"https://x.com/circle","discord":"https://discord.com/invite/buildoncircle"}}},{"address":"0xCE1bFFBD5374Dac86a2893119683F4911a2F7814","symbol":"SPELL","name":"Spell Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0xCE1bFFBD5374Dac86a2893119683F4911a2F7814/logo.png","checksum":"sha256:dc5223584b758423bcb11a82983b4c7b7b8d1f5a406e32e33f704c70c0595799"},"metadata":{"website":"https://abracadabra.money/","description":"Abracadabra.money is a lending platform that allows users to borrow funds using Interest Bearing Tokens as collateral.","links":{"x":"https://x.com/MIM_Spell"}}},{"address":"0xD24C2Ad096400B6FBcd2ad8B24E7acBc21A1da64","symbol":"FRAX","name":"Frax","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0xD24C2Ad096400B6FBcd2ad8B24E7acBc21A1da64/logo.png","checksum":"sha256:06a629a0169c3bbc01fd09a38175dc01eee66d88c115092554270b9a8b905d81"},"metadata":{"website":"https://frax.finance/","description":"Frax is a fractional-algorithmic stablecoin protocol. It aims to provide a highly scalable, decentralized, algorithmic money in place of fixed-supply assets like BTC. Additionally, FXS is the value accrual and governance token of the entire Frax ecosystem.","links":{"x":"https://x.com/fraxfinance"}}},{"address":"0xFF7F8F301F7A706E3CfD3D2275f5dc0b9EE8009B","symbol":"FOLKS","name":"Folks Finance","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0xFF7F8F301F7A706E3CfD3D2275f5dc0b9EE8009B/logo.png","checksum":"sha256:c3245428d5d41850d1529312299c9661f03252ed0452ae159ed33b244725bc60"},"metadata":{"website":"https://folks.finance","description":"Folks Finance is a crosschain decentralized finance (DeFi) protocol that enables users to supply, borrow, and manage digital assets across multiple blockchains from a single platform.","links":{"x":"https://x.com/FolksFinance"}}},{"address":"0xaBC9547B534519fF73921b1FBA6E672b5f58D083","symbol":"WOO","name":"Wootrade Network","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0xaBC9547B534519fF73921b1FBA6E672b5f58D083/logo.png","checksum":"sha256:e2d294d316cb85127822ceba32f95c3734419d3069639f83624a036f823a8bd8"},"metadata":{"website":"https://woo.network","description":"Wootrade aims to provide deep liquidity and superior order execution at the lowest cost for traders, exchanges, institutions, and DeFi platforms. Its flagship, WOO X, is a professional trading platform featuring customizable modules, and zero-fees with deep liquidity across spot and margin. Wootrade was founded by Kronos Research, a quantitative trading firm generating $10-15B in daily volume, with the goal of democratizing access to deep liquidity and yield strategies through various products.","links":{"telegram":"https://t.me/wootrade"}}},{"address":"0xc3048E19E76CB9a3Aa9d77D8C03c29Fc906e2437","symbol":"COMP.e","name":"Compound","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/avalanche/tokens/0xc3048E19E76CB9a3Aa9d77D8C03c29Fc906e2437/logo.png","checksum":"sha256:1589022c02aaef1a77815da8b4562aa4a75c71c655e13fd0a2f7c4049d2591f9"},"metadata":{"website":"https://compound.finance/","description":"The Avalanche Bridge Wrapped Compound.","links":{"x":"https://x.com/compoundfinance"}}}]},{"code":"base","name":"Base","symbol":"ETH","decimals":18,"family":"evm","explorer":"https://basescan.org","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/base/logo.png","checksum":"sha256:6f67f39d5d6e4497c6499d75a7bd80447d88a29e0d70d371e04244e43a42b13b"},"metadata":{"chainId":8453,"website":"https://base.org","description":"Base is a secure, low-cost, builder-friendly Ethereum L2 built to bring the next billion users onchain.","links":{"x":"https://x.com/buildonbase","github":"https://github.com/base-org"}},"tokens":[{"address":"0x0C03Ce270B4826Ec62e7DD007f0B716068639F7B","symbol":"TIG","name":"The Innovation Game","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x0C03Ce270B4826Ec62e7DD007f0B716068639F7B/logo.png","checksum":"sha256:9bd219dc57b4fbe7806f0496aad96b6871d2ea0fc19176d4cdf73da3ce389a82"},"metadata":{"website":"https://tig.foundation/","description":"The Innovation Game (TIG) is a protocol designed to accelerate algorithmic innovation. At TIG's core is a novel PoW mechanism that allows for optimisation of the PoW algorithms.","links":{"x":"https://x.com/tigfoundation"}}},{"address":"0x0C1dC73159e30c4b06170F2593D3118968a0DCa5","symbol":"GPS","name":"GoPlus Security","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x0C1dC73159e30c4b06170F2593D3118968a0DCa5/logo.png","checksum":"sha256:d0e61ed79a7bcd46456ebd83d018ab55df16a29a371b2329c71b8f7c46b22348"},"metadata":{"website":"https://gopluslabs.io","description":"GoPlus Security is building Web3's first decentralized security layer, providing comprehensive protection across all blockchain networks to protect every transaction for users.","links":{"x":"https://x.com/GoplusSecurity"}}},{"address":"0x0b3e328455c4059EEb9e3f84b5543F74E24e7E1b","symbol":"VIRTUAL","name":"Virtual Protocol","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x0b3e328455c4059EEb9e3f84b5543F74E24e7E1b/logo.png","checksum":"sha256:337f47e876ac2659d71fe27ffe0ea4ef338f156c60dc5a3e83c54b8032abb33d"},"metadata":{"website":"https://app.virtuals.io/","description":"The ecosystem for the creation and co-ownership of autonomous AI Agents. Building the first autonomous agentic network state."}},{"address":"0x18dD5B087bCA9920562aFf7A0199b96B9230438b","symbol":"PRO","name":"Propy","decimals":8,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x18dD5B087bCA9920562aFf7A0199b96B9230438b/logo.png","checksum":"sha256:2724b5de5746d107be9f6752b9a53ad34743495af7fd5a85e8e7cc3ee8524992"},"metadata":{"website":"https://propy.com","description":"Propy is a decentralized real-estate market place backed by superior blockchain infrastructure to facilitate real-time unified transaction in order to reduce fraud and redundancy. Propy is the world’s first international real-estate marketplace.","links":{"x":"https://x.com/propyinc"}}},{"address":"0x1bc0c42215582d5A085795f4baDbaC3ff36d1Bcb","symbol":"CLANKER","name":"tokenbot","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x1bc0c42215582d5A085795f4baDbaC3ff36d1Bcb/logo.png","checksum":"sha256:47ee8b4c1f1dd0a3b0095e274d1aedbfd5187423fa28e56136b0c73d178d37ee"},"metadata":{"website":"https://www.clanker.world/","description":"tokenbot"}},{"address":"0x22aF33FE49fD1Fa80c7149773dDe5890D3c76F3b","symbol":"BNKR","name":"BankrCoin","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x22aF33FE49fD1Fa80c7149773dDe5890D3c76F3b/logo.png","checksum":"sha256:829c478bacdd8c6239265426ab97a1261330453fad03da8d15078aa8fc15bd10"},"metadata":{"website":"https://bankr.bot/","description":"Your Friendly AI-Powered Crypto Companion","links":{"x":"https://x.com/bankrbot"}}},{"address":"0x259Fac10c5CbFEFE3E710e1D9467f70a76138d45","symbol":"CTSI","name":"Cartesi Token (PoS)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x259Fac10c5CbFEFE3E710e1D9467f70a76138d45/logo.png","checksum":"sha256:89574e7438d45a10883f9fceaa5147b23f880735b5b0de4dfff05c8561a476bc"},"metadata":{"website":"https://cartesi.io","description":"Cartesi is the first Blockchain OS. It allows developers to build decentralized logic with Linux and standard programming environments preserving the decentralization and security of blockchains.","links":{"x":"https://x.com/cartesiproject","telegram":"https://t.me/cartesiannouncements"}}},{"address":"0x2Da56AcB9Ea78330f947bD57C54119Debda7AF71","symbol":"Mog","name":"Mog Coin","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x2Da56AcB9Ea78330f947bD57C54119Debda7AF71/logo.png","checksum":"sha256:59bdb3b33379513519ea929b732495c20b1606646261448e29414c9a98938445"},"metadata":{"website":"https://mogcoin.xyz/","description":"This Coin mogs all other coins. Base bridge version of Mog Coin on Ethereum.","links":{"x":"https://x.com/MogCoinEth"}}},{"address":"0x3055913c90Fcc1A6CE9a358911721eEb942013A1","symbol":"Cake","name":"PancakeSwap Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x3055913c90Fcc1A6CE9a358911721eEb942013A1/logo.png","checksum":"sha256:c1a30c2dfe5aee41becdaa0c6328ae1b7193c07a349cc16acc5d8e6bd91e405f"},"metadata":{"website":"https://pancakeswap.finance/","description":"Pancakeswap was originally built on the BNB Chain and allows users to trade tokens without using a centralized exchange. It provides an array of products, such as: - An exchange to swap tokens - A yield farm to earn rewards - Syrup pools to stake CAKE tokens, etc..","links":{"x":"https://x.com/pancakeswap"}}},{"address":"0x3e31966d4f81C72D2a55310A6365A56A4393E98D","symbol":"WMTX","name":"WorldMobileToken","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x3e31966d4f81C72D2a55310A6365A56A4393E98D/logo.png","checksum":"sha256:09b47d9f8323d8e40014010503e9be41d6a17298903de7d075afdb508990cb93"},"metadata":{"website":"https://worldmobiletoken.com/","description":"World Mobile Token (WMTX) is the utility token that powers the World Mobile network, a decentralized mobile network at the forefront of the DePIN space. World Mobile aims to connect the world by leveraging blockchain technology and a sharing economy.","links":{"x":"https://x.com/wmtoken"}}},{"address":"0x4F9Fd6Be4a90f2620860d680c0d4d5Fb53d1A825","symbol":"AIXBT","name":"aixbt by Virtuals","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x4F9Fd6Be4a90f2620860d680c0d4d5Fb53d1A825/logo.png","checksum":"sha256:1aafa6b8987094831ccf5ace78bd4306d52c81ee5e69eb0d39bb57f465b2fe41"},"metadata":{"website":"https://app.virtuals.io/virtuals/1199","description":"AIXBT tracks CT discussions and leverages its proprietary engine to identify high momentum plays. AIXBT token holders gain access to its analytics platform.","links":{"x":"https://x.com/aixbt_agent"}}},{"address":"0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed","symbol":"DEGEN","name":"Degen","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed/logo.png","checksum":"sha256:0dffe7f922c3016d3ba5cff14def30ad9ebe28b199d65bf1dbfc67f02a8a79ba"},"metadata":{"website":"https://www.degen.tips/","description":"Degen, an ERC-20 token on Base, launched in January 2024 with an airdrop to the Degen channel community on Farcaster. Our goal is to distribute the token among builders, content creators, and users in the Base and Farcaster ecosystem.","links":{"x":"https://x.com/degentokenbase","telegram":"https://t.me/degentokenbase"}}},{"address":"0x50dA645f148798F68EF2d7dB7C1CB22A6819bb2C","symbol":"SPX","name":"SPX6900","decimals":8,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x50dA645f148798F68EF2d7dB7C1CB22A6819bb2C/logo.png","checksum":"sha256:c655eafa05ec92ee0d4bba03bed9cfffeb6913cfe74bc316f1bfd3176e8b77b9"},"metadata":{"website":"https://www.spx6900.com/","description":"SPX6900 is an advanced blockchain cryptography token coin capable of limitless possibilities and scientific utilization.","links":{"x":"https://x.com/spx6900"}}},{"address":"0x52C2b317eb0bb61e650683D2f287f56C413E4CF6","symbol":"TREE","name":"Tree","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x52C2b317eb0bb61e650683D2f287f56C413E4CF6/logo.png","checksum":"sha256:6c253fc50993326b227ba6bd675498212c27b9dc33307ec20754c90bed7b5fe5"},"metadata":{"website":"https://news.treeofalpha.com/","description":"TREE is the token that powers everything around Tree News, the Crypto News aggregator","links":{"x":"https://x.com/TreeNewsToken"}}},{"address":"0x532f27101965dd16442E59d40670FaF5eBB142E4","symbol":"BRETT","name":"Brett","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x532f27101965dd16442E59d40670FaF5eBB142E4/logo.png","checksum":"sha256:a22af37af9ff1b55c6caca02fda2f1ef49adb7e357b015a7d6a3c00efed5188d"},"metadata":{"website":"https://www.basedbrett.com/","description":"Center character in Matt Furies “Boys’ Club” following the adventures of Brett the Toad, PEPE the frog, Landwolf the wolf, and Andy the dog.","links":{"x":"https://x.com/BasedBrett"}}},{"address":"0x5aB3D4c385B400F3aBB49e80DE2fAF6a88A7B691","symbol":"FLOCK","name":"FLock.io","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x5aB3D4c385B400F3aBB49e80DE2fAF6a88A7B691/logo.png","checksum":"sha256:9416b7e2e5cb7befea83d585ac80a4a365aeccaeed014cc9042082d6ab066330"},"metadata":{"website":"https://flock.io/","description":"FLock.io is the first decentralised AI training platform, combining Federated Learning and blockchain technology to revolutionise AI model development","links":{"x":"https://x.com/flock_io"}}},{"address":"0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42","symbol":"EURC","name":"EURC","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42/logo.png","checksum":"sha256:51e122a505d7f640613aadd51c19fecee855a64b766b62bad1b349e419c251ed"},"metadata":{"website":"https://www.circle.com/eurc","description":"EURC is a euro-backed stablecoin issued by Circle. EURC is designed to provide a faster, safer, and more efficient way to send, spend, and exchange money around the world.","links":{"x":"https://x.com/circle","discord":"https://discord.com/invite/buildoncircle"}}},{"address":"0x624e2e7fDc8903165F64891672267AB0FCB98831","symbol":"SOSO","name":"SoSoValue","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x624e2e7fDc8903165F64891672267AB0FCB98831/logo.png","checksum":"sha256:0e581e8cd4fd3b0f96bb3da99c5bb10e270397e3d3eabf4ef33b0e24f98dc8d5"},"metadata":{"website":"https://sosovalue.com/","description":"SoSoValue is an AI-powered research and investment platform designed to enhance efficiency and accessibility of the crypto market. It provides users with advanced market insights, an AI-driven investment decision assistant, and a seamless ecosystem for investing in SoSoValue Indexes(SSI).","links":{"x":"https://x.com/SoSoValueCrypto"}}},{"address":"0x6985884C4392D348587B19cb9eAAf157F13271cd","symbol":"ZRO","name":"LayerZero","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x6985884C4392D348587B19cb9eAAf157F13271cd/logo.png","checksum":"sha256:6d2e57666161c774b320aec817b1576f78644e2adc1358fbf5db6ba9e93616b2"},"metadata":{"website":"https://layerzero.network/","description":"LayerZero is a technology that enables applications to move data across blockchains, uniquely supporting censorship-resistant messages and permissionless development through immutable smart contracts","links":{"x":"https://x.com/LayerZero_Labs","telegram":"https://t.me/joinchat/VcqxYkStIDsyN2Rh"}}},{"address":"0x6B2504A03ca4D43d0D73776F6aD46dAb2F2a4cFD","symbol":"REI","name":"REI","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x6B2504A03ca4D43d0D73776F6aD46dAb2F2a4cFD/logo.png","checksum":"sha256:47c104647addce589fc3c8436e01129dfb02c848f87cf419c889eaf7ad96ac86"},"metadata":{"website":"https://reisearch.box/","description":"Rei Network is a collective of AI and Crypto natives dedicated to reimagining how we approach the AI x Blockchain space. The discovery of new methods, to implement neural architectures on the EVM, is our core mission.","links":{"x":"https://x.com/ReiNetwork0x"}}},{"address":"0x7431aDa8a591C955a994a21710752EF9b882b8e3","symbol":"MOR","name":"Morpheus","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x7431aDa8a591C955a994a21710752EF9b882b8e3/logo.png","checksum":"sha256:7f626dbcb53d129033b5a2cb21dd5ff7ab5cb0e95cb7588f831efb26d2e714bc"},"metadata":{"website":"https://mor.org/","description":"The first peer-to-peer network for general purpose AI, powered by MOR","links":{"x":"https://x.com/MorpheusAIs"}}},{"address":"0x764A726d9ceD0433A8D7643335919dEb03a9a935","symbol":"POKT","name":"Pocket Network","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x764A726d9ceD0433A8D7643335919dEb03a9a935/logo.png","checksum":"sha256:6c34ea8bd444f5278f1f5515a0a043d2a183c7fcf09e80cab4de9033eb3db61f"},"metadata":{"website":"https://www.pokt.network/","description":"Pocket Network is a decentralized blockchain data platform - a protocol that is built to connect to any blockchain and service the data demands of Web3 dApps. Pocket Network uses cost-efficient economics to coordinate and distribute data at scale, using the POKT token to facilitate the protocol's service.","links":{"x":"https://x.com/poktnetwork?s=11&t=ZGzrL8B9N7GpbA3YLFvU9A"}}},{"address":"0x820C137fa70C8691f0e44Dc420a5e53c168921Dc","symbol":"USDS","name":"USDS Stablecoin","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x820C137fa70C8691f0e44Dc420a5e53c168921Dc/logo.png","checksum":"sha256:44bebb161d742f26e38611ed484bbfc947023ebeb4f11a67cf873bab8f950751"},"metadata":{"website":"https://sky.money/","description":"USDS token is an ERC-20 compliant token with added support for permit functionality and EIP-1271 smart contract signature validation.","links":{"x":"https://x.com/SkyEcosystem"}}},{"address":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","symbol":"USDC","name":"USD Coin","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913/logo.png","checksum":"sha256:4fd4b78e88ef0ee54c6424140c2f0adac34c79828db4d917948c52f35c734651"},"metadata":{"website":"https://centre.io/usdc","description":"USDC is a fully collateralized US dollar stablecoin, an Ethereum powered coin and is the brainchild of CENTRE, an open source project bootstrapped by contributions from Circle and Coinbase.","links":{"github":"https://github.com/centrehq"}}},{"address":"0x83dB73EF5192de4B6a4c92bD0141Ba1a0Dc87c65","symbol":"cUSDO","name":"Compounding Open Dollar","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x83dB73EF5192de4B6a4c92bD0141Ba1a0Dc87c65/logo.png","checksum":"sha256:9d3969ecc6fc19f4dcf7af47119a2c86c2c0024c28392c41120056384ce63ac1"},"metadata":{"website":"https://openeden.com/","description":"The OpenEden CompoundingOpenDollar ('USDO') is a rebasing yield-bearing stablecoin issued by OpenEden Digital ('OED'), a Bermuda Monetary Authority ('BMA') licensed digital asset issuer. USDO is backed by high-quality, liquid reserves, primarily consisting of U.S. Treasury bills.","links":{"x":"https://x.com/OpenEden_X"}}},{"address":"0x8Ee73c484A26e0A5df2Ee2a4960B789967dd0415","symbol":"CRV","name":"Curve DAO Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x8Ee73c484A26e0A5df2Ee2a4960B789967dd0415/logo.png","checksum":"sha256:06bade2be8fd267848c7fc14ab12097c5a8ce9e51084fa5e6802c9c7187cb27c"},"metadata":{"website":"https://curve.finance","description":"CRV is a governance token on the Curve platform with time-weighted voting and value accrual mechanisms.","links":{"x":"https://x.com/CurveFinance","telegram":"https://t.me/curvefi","github":"https://github.com/curvefi/curve-contract"}}},{"address":"0x940181a94A35A4569E4529A3CDfB74e38FD98631","symbol":"AERO","name":"Aerodrome","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x940181a94A35A4569E4529A3CDfB74e38FD98631/logo.png","checksum":"sha256:f1bb8cbf9b04386a1bb1f970a9562a8a6187029b463d96a2e44085cedba1e244"},"metadata":{"website":"https://aerodrome.finance/","description":"Aerodrome Finance is a next-generation AMM designed to serve as Base's central liquidity hub, combining a powerful liquidity incentive engine, vote-lock governance model, and friendly user experience.","links":{"x":"https://x.com/AerodromeFi"}}},{"address":"0x98d0baa52b2D063E780DE12F615f963Fe8537553","symbol":"KAITO","name":"KAITO","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x98d0baa52b2D063E780DE12F615f963Fe8537553/logo.png","checksum":"sha256:7e41d36bf9018608c63872ead7023cbeab55ddbb3400f4770b68cc85d6866611"},"metadata":{"website":"https://yaps.kaito.ai","description":"$KAITO is the native token and the fundamental building block of the AI-powered InfoFi network","links":{"x":"https://x.com/kaitoai"}}},{"address":"0x9C7BEBa8F6eF6643aBd725e45a4E8387eF260649","symbol":"G","name":"Gravity","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x9C7BEBa8F6eF6643aBd725e45a4E8387eF260649/logo.png","checksum":"sha256:6603b2acc1785c868c44b0f201e9e10da7404eb58f87e181b407e12c34d6d739"},"metadata":{"website":"https://gravity.xyz/","description":"G is the native token on Gravity and the utility token for both Gravity and the Galxe ecosystem. As the primary utility token across both ecosystems, G drives governance decisions, incentivizes growth, and facilitates payments.","links":{"x":"https://x.com/gravitychain"}}},{"address":"0x9EaF8C1E34F05a589EDa6BAfdF391Cf6Ad3CB239","symbol":"YFI","name":"yearn.finance","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x9EaF8C1E34F05a589EDa6BAfdF391Cf6Ad3CB239/logo.png","checksum":"sha256:e99831fd2ad39bb53e03c086e9933d703fb3d6c3193330f600c95b3334f875c6"},"metadata":{"website":"https://yearn.finance/","description":"DeFi made simple.","links":{"x":"https://x.com/iearnfinance","telegram":"https://t.me/iearnfinance"}}},{"address":"0x9c632E6Aaa3eA73f91554f8A3cB2ED2F29605e0C","symbol":"XCN","name":"Onyx","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0x9c632E6Aaa3eA73f91554f8A3cB2ED2F29605e0C/logo.png","checksum":"sha256:c37ac7d982ffc01581557205b8905407872b08bfeb78955bcbae85fe4bfe9d18"},"metadata":{"website":"https://onyx.org","description":"Onyx Protocol enables users to access a cross-token aggregated liquidity protocol that supports NFTs, Tokens and ETH all-in-one. Onyx is powered by Onyxcoin (XCN), the protocols native utility and governance token.","links":{"x":"https://x.com/OnyxDAO","telegram":"https://t.me/onyx","github":"https://github.com/Onyx-Protocol"}}},{"address":"0xA88594D404727625A9437C3f886C7643872296AE","symbol":"WELL","name":"WELL","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xA88594D404727625A9437C3f886C7643872296AE/logo.png","checksum":"sha256:f5cbc99f6fd22da6c86366728e68af2bf2329de50ec37275d85caba88cd22d66"},"metadata":{"website":"https://moonwell.fi/","description":"Moonwell is an open lending and borrowing app built on Base, Moonbeam, and Moonriver.","links":{"x":"https://x.com/MoonwellDeFi"}}},{"address":"0xAC1Bd2486aAf3B5C0fc3Fd868558b082a531B2B4","symbol":"TOSHI","name":"Toshi","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xAC1Bd2486aAf3B5C0fc3Fd868558b082a531B2B4/logo.png","checksum":"sha256:46d962a4b4f88199c28cca0e31e1501e0d83f90669d6090be833bab8135b4909"},"metadata":{"website":"https://www.toshithecat.com","description":"Toshi aims to become the first Base-native token to get listed on Coinbase.","links":{"x":"https://x.com/toshi_base","github":"https://github.com/ToshiTheCat"}}},{"address":"0xB166E8B140D35D9D8226E40C09f757BAC5A4d87d","symbol":"NPC","name":"Non-Playable Coin","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xB166E8B140D35D9D8226E40C09f757BAC5A4d87d/logo.png","checksum":"sha256:c6bfe7120230f89cc8682fa6ceae667613c17ea7d147e7f46fed5afead61b8c1"},"metadata":{"website":"https://nonplayablecoin.io/","description":"A hive mind of unique and special individuals. $NPC is a meme fungible token (MFT) tradable on both Uniswap and NFT exchanges.","links":{"x":"https://x.com/NonPlayableCoin"}}},{"address":"0xB38266e0e9D9681b77aEB0A280E98131b953F865","symbol":"DOVU","name":"DOVU","decimals":8,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xB38266e0e9D9681b77aEB0A280E98131b953F865/logo.png","checksum":"sha256:f4ec7699b90831df29416940a9a80e407029be49ae2ec89ac3e389a482816a22"},"metadata":{"website":"https://dovu.earth/","description":"DOVU is a technology infrastructure provider, powering trusted environmental and carbon digital markets by providing market integrity. The DOVU token serves as the protocol’s utility token, enabling holders to participate and create their own environmental audit trail ecosystems. Token holders can stake their DOVU to earn multiplier rewards, aligning long-term incentives with the protocol’s mission of building reliable carbon markets.","links":{"x":"https://x.com/dovuofficial","github":"https://github.com/dovuofficial/"}}},{"address":"0xB3B32F9f8827D4634fE7d973Fa1034Ec9fdDB3B3","symbol":"B3","name":"B3","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xB3B32F9f8827D4634fE7d973Fa1034Ec9fdDB3B3/logo.png","checksum":"sha256:cb4ac54815114acae185f9b6d7b7ed20e56b301a40bb78efb68de59b186f793e"},"metadata":{"website":"https://b3.fun/","description":"B3 is a layer 3 gaming ecosystem. We believe the future of gaming is open, connected, and shaped by the players themselves","links":{"x":"https://x.com/b3dotfun","github":"https://github.com/b3-fun"}}},{"address":"0xBAa5CC21fd487B8Fcc2F632f3F4E8D37262a0842","symbol":"MORPHO","name":"Morpho Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xBAa5CC21fd487B8Fcc2F632f3F4E8D37262a0842/logo.png","checksum":"sha256:15c06b6824b228f9e60dceeccfd2389266d9f24a66fc12bbaab1d6d9fe556355"},"metadata":{"website":"https://morpho.org/","description":"Morpho is an open, efficient, and resilient platform that allows anyone to earn yield and borrow assets. Lenders can earn on Morpho using Morpho Vaults, noncustodial simple to use lending vaults that optimize yields for depositors. Borrowers can borrow any assets directly from Morpho Markets.","links":{"x":"https://x.com/morpholabs?s=11&t=ZGzrL8B9N7GpbA3YLFvU9A"}}},{"address":"0xBCBAf311ceC8a4EAC0430193A528d9FF27ae38C1","symbol":"IOTX","name":"IoTeX Network","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xBCBAf311ceC8a4EAC0430193A528d9FF27ae38C1/logo.png","checksum":"sha256:05417eb0d3ddb203bb15ee291c277a02781005f8de428e530fbd6e24454d0a05"},"metadata":{"website":"https://iotex.io","description":"BNB pegged IoTeX Network (IOTX BEP20) is a token issued by Binance on Smart Chain; its price is pegged to IoTeX Network (IOTX ERC20) at a ratio of 1:1.","links":{"x":"https://x.com/iotex_io","telegram":"https://t.me/IoTeXGroup","github":"https://github.com/iotexproject/iotex-core","reddit":"https://reddit.com/r/IoTeX/"}}},{"address":"0xE3B53AF74a4BF62Ae5511055290838050bf764Df","symbol":"STG","name":"StargateToken","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xE3B53AF74a4BF62Ae5511055290838050bf764Df/logo.png","checksum":"sha256:d86b08417c95a404769402ded2e21d2b1b7ba215074ae806c673d62c7a33171c"},"metadata":{"website":"https://stargate.finance","description":"Stargate is a fully composable liquidity transport protocol that lives at the heart of Omnichain DeFi.","links":{"telegram":"https://t.me/joinchat/LEM0ELklmO1kODdh"}}},{"address":"0xFbB75A59193A3525a8825BeBe7D4b56899E2f7e1","symbol":"RSC","name":"ResearchCoin","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xFbB75A59193A3525a8825BeBe7D4b56899E2f7e1/logo.png","checksum":"sha256:c9333bc718ea0e9979989659e3f6d491553a1cfc8f0394cf65d2ae83d3f9c67c"},"metadata":{"website":"https://www.researchhub.com/","description":"The project is aimed towards creating a community of open science, including discussions about papers & funding. Scientists post papers in a Reddit-like manner and can receive funding from any source. Users are rewarded with RSC upon contributing.","links":{"x":"https://x.com/ResearchHub"}}},{"address":"0xaAC78d1219c08AecC8e37e03858FE885f5EF1799","symbol":"YGG","name":"Yield Guild Games","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xaAC78d1219c08AecC8e37e03858FE885f5EF1799/logo.png","checksum":"sha256:9c818cf673937c75b17dbc474849594ff48430c7fd364f2f401af9bca3163372"},"metadata":{"website":"https://yieldguild.io/","description":"Yield Guild Games (YGG) is a decentralized autonomous organization (DAO) for investing in non fungible tokens (NFTs) used in virtual worlds and blockchain-based games. The organization’s mission is to create the biggest virtual world economy, optimizing its community-owned assets for maximum utility and sharing its profits with its token holders.","links":{"x":"https://x.com/YieldGuild","telegram":"https://t.me/yieldguildgames","discord":"https://discord.com/invite/ygg"}}},{"address":"0xaB36452DbAC151bE02b16Ca17d8919826072f64a","symbol":"RSR","name":"Reserve Rights","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xaB36452DbAC151bE02b16Ca17d8919826072f64a/logo.png","checksum":"sha256:203294104ba313b8fd19e33fdb6088259cec7a43a3f1cf226f37a9a41ad5ca18"},"metadata":{"website":"https://reserve.org/","description":"The fluctuating protocol token that plays a role in stabilizing RSV and confers the cryptographic right to purchase excess Reserve tokens as the network grows.","links":{"x":"https://x.com/reserveprotocol","telegram":"https://t.me/reservecurrency"}}},{"address":"0xacfE6019Ed1A7Dc6f7B508C02d1b04ec88cC21bf","symbol":"VVV","name":"Venice","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xacfE6019Ed1A7Dc6f7B508C02d1b04ec88cC21bf/logo.png","checksum":"sha256:b174953c60ab6b2701838e8651e8c1d2af82dd1e87c4186828b71ba9ff9ebe06"},"metadata":{"website":"https://venice.ai/","description":"The Venice token (VVV) is an access key for AI agents and developers to consume private, uncensored inference through the Venice API, without paying per request.","links":{"x":"https://x.com/AskVenice"}}},{"address":"0xb33Ff54b9F7242EF1593d2C9Bcd8f9df46c77935","symbol":"FAI","name":"FAI","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xb33Ff54b9F7242EF1593d2C9Bcd8f9df46c77935/logo.png","checksum":"sha256:e18f8f850cc0a1835c508821c2f7ae04769373c253ace2f449aff624b8dd0a64"},"metadata":{"website":"https://www.freysa.ai/","description":"Freysa is an evolving AI stack and agent, starting as the world's first adversarial agent game.","links":{"x":"https://x.com/freysa_ai"}}},{"address":"0xc08Cd26474722cE93F4D0c34D16201461c10AA8C","symbol":"CARV","name":"CARV","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xc08Cd26474722cE93F4D0c34D16201461c10AA8C/logo.png","checksum":"sha256:bdee2736028642350a01ae142a99d5d73e18740e55f3b5ac953ca8ae0f3c5350"},"metadata":{"website":"https://carv.io/","description":"The CARV Protocol is a modular data layer that facilitates data exchange and value distribution across gaming, AI and ∞. It encompasses end-to-end data flow processes, including data verification, identity authentication, storage, processing, model training, and value distribution.","links":{"x":"https://x.com/carv_official","telegram":"https://t.me/carv_official_global"}}},{"address":"0xdf49c226ED9CF05Be0e38cdb86Df4E8A945158B1","symbol":"ZENT","name":"Zentry","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xdf49c226ED9CF05Be0e38cdb86Df4E8A945158B1/logo.png","checksum":"sha256:5a05da794f7d1d7cce3eec61a7a5e2e820cbfea68b4a22f1bc9324a19739bef3"},"metadata":{"website":"https://zentry.com/","description":"Zentry, - the Gaming Superlayer that brings the MMORPG experience to real life, ushering the world’s three billion gamers into a unified Play Economy across digital and physical realms.","links":{"x":"https://x.com/ZentryHQ"}}},{"address":"0xf43eB8De897Fbc7F2502483B2Bef7Bb9EA179229","symbol":"ZEN","name":"Horizen","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xf43eB8De897Fbc7F2502483B2Bef7Bb9EA179229/logo.png","checksum":"sha256:5dde0e4eb4dbd72dacc0e280dcb77bab8df7338d6ee074f3fb694bd8116ffdb9"},"metadata":{"website":"https://www.horizen.io/","description":"A Base appchain built for privacy","links":{"x":"https://x.com/horizenglobal","telegram":"https://t.me/horizencommunity","discord":"https://discord.com/invite/z8eebsj7Sv"}}},{"address":"0xfA980cEd6895AC314E7dE34Ef1bFAE90a5AdD21b","symbol":"PRIME","name":"Prime","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/base/tokens/0xfA980cEd6895AC314E7dE34Ef1bFAE90a5AdD21b/logo.png","checksum":"sha256:d0e9010b30527047349580fe3bc8ddfd6e0165e2b223ea19c299397fc54a80da"},"metadata":{"website":"https://www.echelon.io/","description":"The Echelon Prime Foundation is a Web3 ecosystem advancing the next-gen of gaming. Echelon creates and distributes tools to encourage innovation in, and promote the growth of, games. These tools encompass smart contract libraries, communication infrastructure, governance frameworks and more.","links":{"x":"https://x.com/EchelonFND"}}}]},{"code":"bitcoin","name":"Bitcoin","symbol":"BTC","decimals":8,"family":"bitcoin","explorer":"https://blockchain.info","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/bitcoin/logo.png","checksum":"sha256:9afe5599e09dc5439026a76c6fda98f64c47cfc8dd3e37186b32ea02ca55b277"},"metadata":{"website":"https://bitcoin.org","description":"Bitcoin is a cryptocurrency and worldwide payment system. It is the first decentralized digital currency, as the system works without a central bank or single administrator.","links":{"x":"https://x.com/Bitcoin","github":"https://github.com/bitcoin","reddit":"https://reddit.com/r/Bitcoin"}},"tokens":[]},{"code":"bitcoincash","name":"Bitcoin Cash","symbol":"BCH","decimals":8,"family":"bitcoin","explorer":"https://blockchair.com/bitcoin-cash","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/bitcoincash/logo.png","checksum":"sha256:b69d7d2f67712327c3331d119f811c02a40d5794b7565c64a3a4fb25f8996b92"},"metadata":{"website":"https://bitcoincash.org/","description":"Bitcoin ABC is an electronic cash platform that allows peer-to-peer online cash payments. It is a fork (a copy in a way) of Bitcoin (BTC).","links":{"x":"https://x.com/BITCOlNCASH","github":"https://github.com/bitcoincashorg/","reddit":"https://reddit.com/r/Bitcoincash"}},"tokens":[]},{"code":"blast","name":"Blast","symbol":"ETH","decimals":18,"family":"evm","explorer":"https://blastscan.io","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/blast/logo.png","checksum":"sha256:ee44e0347b61e121ac095b41f1cdea35893e5e95ceb329bf5b01dd7ef6366a69"},"metadata":{"chainId":81457,"website":"https://blast.io/en","description":"Blast is the only Ethereum L2 with native yield for ETH and stablecoins.","links":{"x":"https://x.com/Blast_L2","discord":"https://discord.com/invite/blast-l2"}},"tokens":[]},{"code":"boba","name":"Boba","symbol":"BOBAETH","decimals":18,"family":"evm","explorer":"https://blockexplorer.boba.network/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/boba/logo.png","checksum":"sha256:817308eac47b4304d40ff6dfceb7edaec994f5b7bf7087b4d2dc0279a03283b7"},"metadata":{"chainId":288,"website":"https://boba.network","description":"Boba Network is an Optimistic Rollup with swap-based onramp, fast exit and cross-chain bridging.","links":{"x":"https://x.com/bobanetwork"}},"tokens":[]},{"code":"bouncebit","name":"BounceBit","symbol":"BB","decimals":18,"family":"evm","explorer":"https://blastscan.io","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/bouncebit/logo.png","checksum":"sha256:2d3ae57b02a980b0b4cdd55e248353940e4166a967e13202b04b3ca4e134c5d5"},"metadata":{"chainId":6001,"website":"https://bouncebit.io/","description":"BounceBit is building a BTC restaking infrastructure that provides a foundational layer for different restaking products, secured by the regulated custody of Mainnet Digital and Ceffu.","links":{"x":"https://x.com/bounce_bit","discord":"https://discord.com/invite/bouncebit"}},"tokens":[]},{"code":"bsc","name":"BNB Smart Chain","symbol":"BNB","decimals":18,"family":"evm","explorer":"https://bscscan.com/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/bsc/logo.png","checksum":"sha256:22d153278a71758a2e463e15357f3275eac72821fa3d3b35f5c245e290eb7af2"},"metadata":{"chainId":56,"website":"https://www.bnbchain.world/en/smartChain","description":"A blockchain with a full-fledged environment for developing high-performance decentralized applications and cross-chain compatibility with Binance Chain.","links":{"x":"https://x.com/BNBCHAIN","github":"https://github.com/binance-chain/","reddit":"https://reddit.com/r/BinanceExchange"}},"tokens":[{"address":"0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a","symbol":"AUSD","name":"AUSD","decimals":6,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a/logo.png","checksum":"sha256:4c843634b435281e4392869cdbc806c55310aaeab05d902152664d031f716145"},"metadata":{"website":"https://www.agora.finance/","description":"AUSD is a safe, secure asset that enables billions of dollars of transfers and is used globally."}},{"address":"0x0000028a2eB8346cd5c0267856aB7594B7a55308","symbol":"ZETA","name":"Zeta","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x0000028a2eB8346cd5c0267856aB7594B7a55308/logo.png","checksum":"sha256:a0550a87898719727eb4ed41271db57fe2580a2312631a41e77bfc642dcadee7"},"metadata":{"website":"https://www.zetachain.com/","description":"ZetaChain is a public, decentralized blockchain and smart contract platform that enables message passing and value transfer between any blockchain.","links":{"x":"https://x.com/zetablockchain"}}},{"address":"0x000Ae314E2A2172a039B26378814C252734f556A","symbol":"ASTER","name":"Aster","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x000Ae314E2A2172a039B26378814C252734f556A/logo.png","checksum":"sha256:51f8ed3dc03e9fd4801ce34dcbd314c0dfbff3fb4de57132cc4bd230f43bc83f"},"metadata":{"website":"https://www.asterdex.com/","description":"Aster is a next-generation decentralized exchange offering both Perpetual and Spot trading, designed as a one-stop onchain venue for global crypto traders. It features MEV-free, one-click execution in Simple Mode. Pro Mode adds 24/7 stock perpetuals, Hidden Orders, and grid trading, available across BNB Chain, Ethereum, Solana, and Arbitrum.","links":{"x":"https://x.com/Aster_DEX"}}},{"address":"0x031b41e504677879370e9DBcF937283A8691Fa7f","symbol":"FET","name":"Fetch","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x031b41e504677879370e9DBcF937283A8691Fa7f/logo.png","checksum":"sha256:e4b3bbad2b42e6f573869ec4897475e9dfd94ca852d1757b48f684b9149013f0"},"metadata":{"website":"https://fetch.ai","description":"Fetch.ai aims to be at the forefront of accelerating research and the deployment of emerging technologies such as blockchain and AI."}},{"address":"0x0782b6d8c4551B9760e74c0545a9bCD90bdc41E5","symbol":"lisUSD","name":"Lista USD","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x0782b6d8c4551B9760e74c0545a9bCD90bdc41E5/logo.png","checksum":"sha256:62cb5c25100fdb41863e3d966cbf7f24ec99cae74e7e16a6181ba8edd2ca1c05"},"metadata":{"website":"https://lista.org/","description":"TWhat is Lista DAO (lisUSD)Lista DAO is a decentralized over-collateralized lending and liquid staking platform on the BNB chain.","links":{"x":"https://x.com/Lista_DAO","telegram":"https://t.me/ListaDAO"}}},{"address":"0x0DF0587216a4a1bB7d5082fdc491d93d2dD4B413","symbol":"Cheems","name":"Cheems","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x0DF0587216a4a1bB7d5082fdc491d93d2dD4B413/logo.png","checksum":"sha256:6cc5f8048cf399f679111f2f6ad86b0a0296a5c048c3e1f8139ca4b03efee079"},"metadata":{"website":"https://cheems.pet/","description":"“Cheems” is the lord of memes, a small, pitiful, helpless Shiba Inu.","links":{"x":"https://x.com/LordCheems_bsc"}}},{"address":"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82","symbol":"CAKE","name":"PancakeSwap Token","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82/logo.png","checksum":"sha256:b8975ab2856c969a90e966c57d942966f83b376d6670be677333cee834675174"},"metadata":{"website":"https://pancakeswap.finance","description":"PancakeSwap is a yield farming project whereby users can get FLIP (LP token) for staking and get CAKE token as reward.","links":{"x":"https://x.com/pancakeswap","telegram":"https://t.me/PancakeSwap","github":"https://github.com/pancakeswap"}}},{"address":"0x0Eb3a705fc54725037CC9e008bDede697f62F335","symbol":"ATOM","name":"BNB pegged Cosmos Token","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x0Eb3a705fc54725037CC9e008bDede697f62F335/logo.png","checksum":"sha256:712ec7b32ca3e77fc998c038853313e2a1897ef999858307f6136ca7f38c0d48"},"metadata":{"website":"https://cosmos.network","description":"BNB pegged Cosmos Token (ATOM BEP20) is a token issued by Binance on Smart Chain; its price is pegged to Cosmos (ATOM) at a ratio of 1:1."}},{"address":"0x1104EB7e85E25eB45F88e638b0C27A06C1A91CB2","symbol":"IVVon","name":"iShares Core S&P 500 ETF (Ondo Tokenized)","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x1104EB7e85E25eB45F88e638b0C27A06C1A91CB2/logo.png","checksum":"sha256:6cb7b0bbe3f32679c4ebfdd1dbd056665f00cf6f003a311351a831b14e8bbe8c"},"metadata":{"website":"https://ondo.finance/","description":"IVVon is the Ondo Tokenized version of the iShares Core S&P 500 ETF, giving tokenholders economic exposure similar to holding IVV and reinvesting any dividends. Ondo tokenized stocks enable non-US retail and institutional users around the world to instantly mint and redeem tokenized U.S. stocks and ETFs, 24 hours a day, five days a week with full access to traditional exchange liquidity. Additional restrictions apply. Learn more at ondo.finance/global-markets.","links":{"x":"https://x.com/ondofinance"}}},{"address":"0x111111111117dC0aa78b770fA6A738034120C302","symbol":"1INCH","name":"1INCH Token","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x111111111117dC0aa78b770fA6A738034120C302/logo.png","checksum":"sha256:cc5a8e8f6c4896bc2a2ca1e1f68966be50f6279076f3d8befcd1ba98ab7e55f1"},"metadata":{"website":"https://1inch.io","description":"The 1INCH token on Binance Smart Chain will be used for a bridge between the Binance and Ethereum networks.","links":{"x":"https://x.com/1inchExchange","telegram":"https://t.me/OneInchExchange","reddit":"https://reddit.com/r/trustapp"}}},{"address":"0x1f8955E640Cbd9abc3C3Bb408c9E2E1f5F20DfE6","symbol":"USDon","name":"Ondo U.S. Dollar Token","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x1f8955E640Cbd9abc3C3Bb408c9E2E1f5F20DfE6/logo.png","checksum":"sha256:bb0a2a3fba7a7fbcc53db6cc41196b65ed2fe726283d41d4d43290854d849196"},"metadata":{"website":"https://ondo.finance/","description":"USDon is a stablecoin backed 1:1 by a US dollar in one of Global Markets’ brokerage accounts. USDon is the stablecoin used to instantly buy or redeem Ondo tokenized stocks.","links":{"x":"https://x.com/ondofinance"}}},{"address":"0x208bF3E7dA9639f1Eaefa2DE78c23396B0682025","symbol":"TAG","name":"Tagger","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x208bF3E7dA9639f1Eaefa2DE78c23396B0682025/logo.png","checksum":"sha256:e1c45c0a89a53249de20f7cf0e84791b0353fff81d078461dff58e1547de8ba1"},"metadata":{"website":"https://www.tagger.pro","description":"Tagger proposes a framework whereby data can be gathered, labeled, verified, and exchanged without relying on a centralized authority","links":{"x":"https://x.com/TaggerAI"}}},{"address":"0x20eE7B720f4E4c4FFcB00C4065cdae55271aECCa","symbol":"NFT","name":"APENFT","decimals":6,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x20eE7B720f4E4c4FFcB00C4065cdae55271aECCa/logo.png","checksum":"sha256:c1c78c7ac378d3f96adfd14182eb843e6d5d5f6e5e84069be183601fdb63aff9"},"metadata":{"website":"https://apenft.io/","description":"APENFT Fund was born with the mission to register worid-class artworks as NFTs on blockchain and aim to be the ARK Funds in the NFT space to buld a bridge between top-notch artists and blockchain, and to support the growth of native crypto NFT artists.","links":{"x":"https://x.com/apenftorg","telegram":"https://t.me/apenftEN"}}},{"address":"0x33d08D8C7a168333a85285a68C0042b39fC3741D","symbol":"AIOZ","name":"AIOZ Network Coin","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x33d08D8C7a168333a85285a68C0042b39fC3741D/logo.png","checksum":"sha256:73aedbddc120e8da9936df1adb099e3d0035a571c6d66d409a1165d3d335f484"},"metadata":{"website":"https://aioz.network","description":"AIOZ Network is re-imagining streaming from the ground up with a blockchain that integrates content distribution and tokenomics built for media."}},{"address":"0x352Cb5E19b12FC216548a2677bD0fce83BaE434B","symbol":"BTT","name":"BitTorrent","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x352Cb5E19b12FC216548a2677bD0fce83BaE434B/logo.png","checksum":"sha256:e1bc0194e0101145c36e80b44e6100b007d2a9aa72b42d9e8a5799cec4cd8ebe"},"metadata":{"website":"https://bt.io/","description":"BTT is the official token of BitTorrent Chain. BitTorrent Chain is a brand-new heterogeneous cross-chain interoperability protocol, which leverages sidechains for the scaling of smart contracts.","links":{"x":"https://x.com/BitTorrent","telegram":"https://t.me/BitTorrentChain","github":"https://github.com/bttcprotocol/bttc"}}},{"address":"0x3d4f0513E8a29669B960f9dBcA61861548A9A760","symbol":"BANANA","name":"Banana For Scale","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x3d4f0513E8a29669B960f9dBcA61861548A9A760/logo.png","checksum":"sha256:9c8f9950272e7f5550f4f34ad47777bc9aac4a4a18e141abf4d287484886458b"},"metadata":{"website":"https://bananabsc.com/","description":"BANANA","links":{"x":"https://x.com/BananaS31_bsc","telegram":"https://t.me/BananaForScale_bsc"}}},{"address":"0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9","symbol":"TUSD","name":"BNB pegged TrueUSD","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9/logo.png","checksum":"sha256:5e4046bad4be380664933c6633a99e97f50d5a10e94423edecbbd1e4b5ad38ab"},"metadata":{"website":"https://www.trueusd.com/","description":"BNB pegged TrueUSD (TUSDP BEP20) is a token issued by Binance on Smart Chain; its price is pegged to TrueUSD (TUSD ERC20) at a ratio of 1:1.","links":{"x":"https://x.com/tusd_official","telegram":"https://t.me/TUSDofficial_EN","github":"https://github.com/trusttoken/TrueUSD"}}},{"address":"0x4B0F1812e5Df2A09796481Ff14017e6005508003","symbol":"TWT","name":"Trust Wallet","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x4B0F1812e5Df2A09796481Ff14017e6005508003/logo.png","checksum":"sha256:0056152929c00a11f19375751ff7c7deec65e37e263c017687b9853b1d9c00fa"},"metadata":{"website":"https://trustwallet.com","description":"Utility token to increase adoption of cryptocurrency.","links":{"github":"https://github.com/trustwallet/"}}},{"address":"0x52CE071Bd9b1C4B00A0b92D298c512478CaD67e8","symbol":"COMP","name":"BNB pegged Compound","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x52CE071Bd9b1C4B00A0b92D298c512478CaD67e8/logo.png","checksum":"sha256:f25f66eca8e215b43db4c0a137d054ae0abd38dec8a45c2832a9559ff6ca3c48"},"metadata":{"website":"https://compound.finance","description":"BNB pegged Compound (COMP BEP20) is a token issued by Binance on Smart Chain; its price is pegged to Compound (COMP ERC20) at a ratio of 1:1."}},{"address":"0x5A110fC00474038f6c02E89C707D638602EA44B5","symbol":"USDF","name":"Astherus USDF","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x5A110fC00474038f6c02E89C707D638602EA44B5/logo.png","checksum":"sha256:28b5bd28012eacbe7f77f117bee93e587c66c374997ec2bbcad764f5525962ad"},"metadata":{"website":"https://astherus.finance/en/usdf","description":"Astherus is a multi-asset liquidity hub designed to unlock the full earning potential of crypto assets.","links":{"x":"https://x.com/AstherusHub"}}},{"address":"0x5de3939b2F811A61d830E6F52d13B066881412ab","symbol":"XPR","name":"XPR Network","decimals":4,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x5de3939b2F811A61d830E6F52d13B066881412ab/logo.png","checksum":"sha256:d89ad5e64952999f8ff0c8a671dbcb6c4d145c13f6179544a84555309a137018"},"metadata":{"website":"https://protonchain.com","description":"Proton is a new public blockchain and dApp platform designed for both consumer applications and P2P payments. It is built around a secure identity and financial settlements layer that allows users to directly link real identity and fiat accounts, pull funds and buy crypto, and use crypto seamlessly.","links":{"x":"https://x.com/protonxpr","telegram":"https://t.me/protonxpr/","discord":"https://discord.com/invite/B2QDmgf","github":"https://github.com/ProtonProtocol","reddit":"https://reddit.com/r/ProtonChain/"}}},{"address":"0x62D0A8458eD7719FDAF978fe5929C6D342B0bFcE","symbol":"BEAM","name":"Beam","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x62D0A8458eD7719FDAF978fe5929C6D342B0bFcE/logo.png","checksum":"sha256:05eeb38e98ae1df4a6bff0bf4725fbd6d8642b49dac61438f6d98e6a9d2275b8"},"metadata":{"website":"https://meritcircle.io/","description":"Beam is a sovereign network focused on gaming brought to you by the Merit Circle DAO.","links":{"x":"https://x.com/buildonbeam","telegram":"https://t.me/meritcircle","discord":"https://discord.com/invite/meritcircle","github":"https://github.com/Merit-Circle"}}},{"address":"0x6985884C4392D348587B19cb9eAAf157F13271cd","symbol":"ZRO","name":"LayerZero","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x6985884C4392D348587B19cb9eAAf157F13271cd/logo.png","checksum":"sha256:6d2e57666161c774b320aec817b1576f78644e2adc1358fbf5db6ba9e93616b2"},"metadata":{"website":"https://layerzero.network/","description":"LayerZero is a technology that enables applications to move data across blockchains, uniquely supporting censorship-resistant messages and permissionless development through immutable smart contracts","links":{"x":"https://x.com/LayerZero_Labs","telegram":"https://t.me/joinchat/VcqxYkStIDsyN2Rh"}}},{"address":"0x6E88056E8376Ae7709496Ba64d37fa2f8015ce3e","symbol":"DEXE","name":"DeXe","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x6E88056E8376Ae7709496Ba64d37fa2f8015ce3e/logo.png","checksum":"sha256:6b2ff439ceb1589f1cb613b831c675834ecf775a16e1c4742e2f43c8d029f995"},"metadata":{"website":"https://dexe.network/","description":"DeXe Protocol is a decentralized suite of permissionless tools for managing assets, products, and communities governed by $DEXE holders within DeXe Protocol DAO. It offers a no-code environment on blockchain for launching DAOs, tokens, and fundraises; AI-powered automation for decision-making; on/off-chain in a seamless space; account abstraction acting as a DAO, multi-sig or single party with numerous features for managing assets and payouts, and(or) communities.","links":{"x":"https://x.com/DexeNetwork","telegram":"https://t.me/dexe_network_official_chat","github":"https://github.com/dexe-network/DeXe-Protocol"}}},{"address":"0x715D400F88C167884bbCc41C5FeA407ed4D2f8A0","symbol":"AXS","name":"BNB pegged Axie Infinity Shard","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x715D400F88C167884bbCc41C5FeA407ed4D2f8A0/logo.png","checksum":"sha256:49404eea96f9d8fd88098dec9345d99e50b2da1706943ad1682d373a1b90a678"},"metadata":{"website":"https://axieinfinity.com","description":"BNB pegged Axie Infinity Shard (AXS BEP20) is a token issued by Binance on Smart Chain; its price is pegged to Axie Infinity Shard (AXS ERC20) at a ratio of 1:1."}},{"address":"0x7324c7C0d95CEBC73eEa7E85CbAac0dBdf88a05b","symbol":"XCN","name":"Onyx","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x7324c7C0d95CEBC73eEa7E85CbAac0dBdf88a05b/logo.png","checksum":"sha256:2303bc127ab8554f1181e885f23df6d5146feaf52cc0e2a1227409725ca9e2db"},"metadata":{"website":"https://onyx.org","description":"Onyx Protocol enables users to access a cross-token aggregated liquidity protocol that supports NFTs, Tokens and ETH all-in-one. Onyx is powered by Onyxcoin (XCN), the protocols native utility and governance token.","links":{"x":"https://x.com/OnyxProtocol","telegram":"https://t.me/onyx","github":"https://github.com/Onyx-Protocol"}}},{"address":"0x76A797A59Ba2C17726896976B7B3747BfD1d220f","symbol":"TONCOIN","name":"Wrapped TON Coin","decimals":9,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x76A797A59Ba2C17726896976B7B3747BfD1d220f/logo.png","checksum":"sha256:eccd35bb16d230bc415e79d5e64b5385735559ef2dc35226d747cbd2977f2fd6"},"metadata":{"website":"https://ton.org/","description":"The Open Network is a blockchain-based decentralized computer network. TON is designed to enable processing millions of transactions per second via infinite sharding paradigm. It allows building Web 3.0 empowered by decentralized storage and DNS, instant payments and decentralized services.","links":{"telegram":"https://t.me/tonblockchain","github":"https://github.com/newton-blockchain"}}},{"address":"0x7Ddc52c4De30e94Be3A6A0A2b259b2850f421989","symbol":"GOMINING","name":"GoMining","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x7Ddc52c4De30e94Be3A6A0A2b259b2850f421989/logo.png","checksum":"sha256:042206e69422dc3ed86d5e35a5779cbe0818fa765f12ee3467ea7c0de5ee6ae4"},"metadata":{"website":"https://gomining.com/","description":"Gomining is an exchange token backed by a Top 10 global bitcoin mining project.","links":{"x":"https://x.com/GMT_Token","telegram":"https://t.me/gmt_token_talk","reddit":"https://reddit.com/user/GoMiningToken"}}},{"address":"0x8C907e0a72C3d55627E853f4ec6a96b0C8771145","symbol":"ZIG","name":"ZigCoin","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x8C907e0a72C3d55627E853f4ec6a96b0C8771145/logo.png","checksum":"sha256:993bfaf6d21b5a50574d996d87e01ebe66e1943b0b718d66af67b2c6a0a6802a"},"metadata":{"website":"https://zignaly.com/","description":"Zignaly is a social investment platform where users can follow winning strategies and participate in their returns.","links":{"x":"https://x.com/zignaly"}}},{"address":"0x8b1f4432F943c465A973FeDC6d7aa50Fc96f1f65","symbol":"AXL","name":"Axelar","decimals":6,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x8b1f4432F943c465A973FeDC6d7aa50Fc96f1f65/logo.png","checksum":"sha256:b6f30181437283842a7c02f2de35f51137b356432ab07fdd13cdb8e25fb880ed"},"metadata":{"website":"https://axelar.network/","description":"Axelar delivers secure cross-chain communication for Web3. Our infrastructure enables dApp users to interact with any asset or application, on any chain, with one click.","links":{"x":"https://x.com/axelarcore","telegram":"https://t.me/axelarcommunity","discord":"https://discord.com/invite/aRZ3Ra6f7D","github":"https://github.com/axelarnetwork","reddit":"https://reddit.com/r/axelar"}}},{"address":"0x8b6ACf6041A81567f012Ff6A4C6D96d5818d74bF","symbol":"MUon","name":"Micron Technology (Ondo Tokenized)","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x8b6ACf6041A81567f012Ff6A4C6D96d5818d74bF/logo.png","checksum":"sha256:ea20c8e49b37f4fc66e96726485829112ab2a7de3d0c74b2fea48e06d65f33ad"},"metadata":{"website":"https://ondo.finance/","description":"MUon is the Ondo Tokenized version of Micron Technology, giving tokenholders economic exposure similar to holding MU and reinvesting any dividends. Ondo tokenized stocks enable non-US retail and institutional users around the world to instantly mint and redeem tokenized U.S. stocks and ETFs, 24 hours a day, five days a week with full access to traditional exchange liquidity. Additional restrictions apply. Learn more at ondo.finance/global-markets.","links":{"x":"https://x.com/ondofinance"}}},{"address":"0x8d0D000Ee44948FC98c9B98A4FA4921476f08B0d","symbol":"USD1","name":"World Liberty Financial USD","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x8d0D000Ee44948FC98c9B98A4FA4921476f08B0d/logo.png","checksum":"sha256:226ce53d1fccec27a3c062bc1849ff62e4f7280f46fbf6f62a3c16872a1081fb"},"metadata":{"website":"https://www.worldlibertyfinancial.com/","description":"A stablecoin by World Liberty Financial, redeemable 1:1 for the US dollar and backed by U.S. treasuries, dollar deposits, and other cash equivalents."}},{"address":"0x992879Cd8ce0c312d98648875B5A8D6D042cbF34","symbol":"CRCLon","name":"Circle Internet Group (Ondo Tokenized)","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x992879Cd8ce0c312d98648875B5A8D6D042cbF34/logo.png","checksum":"sha256:448c9eadd18d2e5c6ab60b577384b17bc79a175103da095c90d399576256247b"},"metadata":{"website":"https://ondo.finance/","description":"CRCLon is the Ondo Tokenized version of Circle Internet Group, giving tokenholders economic exposure similar to holding CRCL and reinvesting any dividends. Ondo tokenized stocks enable non-US retail and institutional users around the world to instantly mint and redeem tokenized U.S. stocks and ETFs, 24 hours a day, five days a week with full access to traditional exchange liquidity. Additional restrictions apply. Learn more at ondo.finance/global-markets.","links":{"x":"https://x.com/ondofinance"}}},{"address":"0x997A58129890bBdA032231A52eD1ddC845fc18e1","symbol":"SIREN","name":"SIREN","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0x997A58129890bBdA032231A52eD1ddC845fc18e1/logo.png","checksum":"sha256:a36909fafb971227feff79e8fa4df3492ed9ed55e1e16bb36454cb54e0182d82"},"metadata":{"website":"https://x.com/genius_sirenBSC","description":"tep into the mystique of ancient lore reimagined for the digital age with SirenCoin (ticker: SIREN). Drawing inspiration from the legendary sirens of Greek mythology—those enchanting beings from Homer’s Odyssey whose celestial songs both bewitched and warned—the project channels their dual nature into an innovative crypto experience. Discover a coin/token that’s as captivating as it is cutting-edge.","links":{"x":"https://x.com/genius_sirenBSC"}}},{"address":"0xB2BD0749DBE21f623d9BABa856D3B0f0e1BFEc9C","symbol":"DUSK","name":"Dusk Network","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xB2BD0749DBE21f623d9BABa856D3B0f0e1BFEc9C/logo.png","checksum":"sha256:effb30c8bb28fd65697dda1ccd4e3dca7d4f912001047253b9ddb092fadc7cb1"},"metadata":{"website":"https://dusk.network/","description":"Dusk Network is technology for securities. An open source and secure blockchain (DLT) infrastructure that businesses use to tokenize financial instruments and automate costly processes."}},{"address":"0xBf5140A22578168FD562DCcF235E5D43A02ce9B1","symbol":"UNI","name":"BNB pegged Uniswap","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xBf5140A22578168FD562DCcF235E5D43A02ce9B1/logo.png","checksum":"sha256:c3e284ae768675c5195fdac51073f9b2b66831f1c793f50b2c040c82f9c2f7a9"},"metadata":{"website":"https://uniswap.org","description":"BNB pegged Uniswap (UNI BEP20) is a token issued by Binance on Smart Chain; its price is pegged to Uniswap (UNI ERC20) at a ratio of 1:1.","links":{"x":"https://x.com/UniswapProtocol"}}},{"address":"0xD41FDb03Ba84762dD66a0af1a6C8540FF1ba5dfb","symbol":"SFP","name":"SafePal Token","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xD41FDb03Ba84762dD66a0af1a6C8540FF1ba5dfb/logo.png","checksum":"sha256:05f889ba6886e910338e94ca33884efb1e48fb9ad35f24673785a06009c4eb46"},"metadata":{"website":"https://www.safepal.io","description":"SafePal is a cryptocurrency wallet that aims to provide a secure and user-friendly crypto asset management platform.","links":{"x":"https://x.com/iSafePal","telegram":"https://t.me/SafePalwallet","github":"https://github.com/SafePalWallet"}}},{"address":"0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD","symbol":"LINK","name":"BNB pegged ChainLink","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD/logo.png","checksum":"sha256:08a918aae0eec47429d4f729e0ef2fe436fb4f33169d02d7978bb464d3043632"},"metadata":{"website":"https://chain.link","description":"BNB pegged ChainLink (LINK BEP20) is a token issued by Binance on Smart Chain; its price is pegged to ChainLink (LINK ERC20) at a ratio of 1:1."}},{"address":"0xFEbfA339E44c28E2aa9E62Ea1027C9CB4e378605","symbol":"NPC","name":"Non-Playable Coin","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xFEbfA339E44c28E2aa9E62Ea1027C9CB4e378605/logo.png","checksum":"sha256:c6bfe7120230f89cc8682fa6ceae667613c17ea7d147e7f46fed5afead61b8c1"},"metadata":{"website":"https://nonplayablecoin.io/","description":"A hive mind of unique and special individuals. $NPC is a meme fungible token (MFT) tradable on both Uniswap and NFT exchanges.","links":{"x":"https://x.com/NonPlayableCoin"}}},{"address":"0xa2B726B1145A4773F68593CF171187d8EBe4d495","symbol":"INJ","name":"Injective","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xa2B726B1145A4773F68593CF171187d8EBe4d495/logo.png","checksum":"sha256:adaac9db4c7a404691e64adf6f14d96f1d9ccf94309b7836b997e79ac78ae3f0"},"metadata":{"website":"https://injectiveprotocol.com","description":"The Universal Layer-2 DeFi Protocol for Cross-Chain Derivatives Trading."}},{"address":"0xa3f020a5C92e15be13CAF0Ee5C95cF79585EeCC9","symbol":"ELF","name":"aelf","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xa3f020a5C92e15be13CAF0Ee5C95cF79585EeCC9/logo.png","checksum":"sha256:897ba06347010a81b69d722d8a4ae6f52e12a3ae1349617b3b9c4c623465e9f1"},"metadata":{"website":"http://aelf.io","description":"Aelf (ELF) is an enterprise-focused blockchain platform powered by cloud computing. Leveraging cloud nodes and parallel processing, Aelf is reportedly able to achieve secure transactions at scale for commercial use cases."}},{"address":"0xb3Ed0A426155B79B898849803E3B36552f7ED507","symbol":"PENDLE","name":"Pendle","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xb3Ed0A426155B79B898849803E3B36552f7ED507/logo.png","checksum":"sha256:fddda44780e0015b1b3ce0c511053bf04ea04dd7b92c52fa09ef72bb71473246"},"metadata":{"website":"https://www.pendle.finance/","description":"Pendle is a protocol for people to trade and hedge yield. Users can tokenize yield and trade them on Pendle's AMM","links":{"x":"https://x.com/pendle_fi","discord":"https://discord.com/invite/9x9VUngNZD","github":"https://github.com/pendle-finance"}}},{"address":"0xb86AbCb37C3A4B64f74f59301AFF131a1BEcC787","symbol":"ZIL","name":"Zilliqa","decimals":12,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xb86AbCb37C3A4B64f74f59301AFF131a1BEcC787/logo.png","checksum":"sha256:406a497106fcea1c7a95295e5ebcbe2d030b9ba08b3eae00e9b906a464eeeebe"},"metadata":{"website":"http://www.zilliqa.com/","description":"Zilliqa (ZIL) is a public blockchain built on a sharded architecture. It has solved blockchain scalability and speed by implementing sharding.","links":{"x":"https://x.com/zilliqa","telegram":"https://t.me/zilliqachat","github":"https://github.com/Zilliqa","reddit":"https://reddit.com/r/zilliqa"}}},{"address":"0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409","symbol":"FDUSD","name":"First Digital USD","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409/logo.png","checksum":"sha256:28fb705f72d6410d75ddd94e5901b95bcafc2a79cb3ee3a9b28c20fa3636bad6"},"metadata":{"website":"https://firstdigitallabs.com/","description":"FDUSD (First Digital USD) is a 1:1 USD-backed Stablecoin. FDUSD revolutionizes global finance with a cutting-edge digital stablecoin, providing businesses and builders with security, speed, and innovation worldwide.","links":{"x":"https://x.com/FDLabsHQ"}}},{"address":"0xc748673057861a797275CD8A068AbB95A902e8de","symbol":"BabyDoge","name":"Baby Doge Coin","decimals":9,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xc748673057861a797275CD8A068AbB95A902e8de/logo.png","checksum":"sha256:6043f804c1d57dc9be7e4b59dc7e4613d11dc8a263cefbd29b59eb0fde0fbbad"},"metadata":{"website":"https://babydoge.com/","description":"Baby Doge Coin has learned a few tricks and lessons from his meme father, Doge. A new crypto birthed by fans of the Doge Meme online community. He is Hyper-deflationary with static reflection that rewards holders, so more baby doge coins are being automatically added to your wallet each transaction. Simply Love, pet, and hold as 5% from each transaction is automatically redistributed to baby doge holders via smart contract.","links":{"x":"https://x.com/babydogecoin","telegram":"https://t.me/babydogecoin","discord":"https://discord.com/invite/babydogecoin","reddit":"https://reddit.com/user/Baby_doge_coin"}}},{"address":"0xcE24439F2D9C6a2289F741120FE202248B666666","symbol":"U","name":"United Stables","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xcE24439F2D9C6a2289F741120FE202248B666666/logo.png","checksum":"sha256:2ba31ab8c4e941a1088b79a1c0168487c8b1f306ec4523ed56cce6569a1412e6"},"metadata":{"website":"https://u.tech/","description":"United Stables develops transparent, secure, and programmable stablecoin infrastructure for global markets. $U is a fully backed, operational-grade stablecoin designed for institutional trading, DeFi liquidity, treasury operations, and cross-border settlement. It’s the first stablecoin to aggregate liquidity, fully backed 1:1 by cash and audited stablecoins.","links":{"x":"https://x.com/UTechStables"}}},{"address":"0xe6DF05CE8C8301223373CF5B969AFCb1498c5528","symbol":"KOGE","name":"BNB48 Club Token","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xe6DF05CE8C8301223373CF5B969AFCb1498c5528/logo.png","checksum":"sha256:b4f30ae88328245fb0c7a8e7dd07d04bf1f8d74f8eb43efab6822234744a2aa1"},"metadata":{"website":"https://www.48.club/","description":"48 Club® was founded in Sept. 2017 by a diverse and tight-knit group of investors with a common passion for BNB. We now have over 500 club members with various backgrounds hailing from all over the world. 48 Club® is run as a decentralized autonomous organization (DAO) and its main areas of operations and expertise are industry research, angel investment, product development, community development and management, and technical operations and maintenance.","links":{"x":"https://x.com/48Club_Official"}}},{"address":"0xf486ad071f3bEE968384D2E39e2D8aF0fCf6fd46","symbol":"VELO","name":"VELO","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xf486ad071f3bEE968384D2E39e2D8aF0fCf6fd46/logo.png","checksum":"sha256:3b1173bb867f57ed494e1c18abc6d3357808c03ffe6672e19f81933ac187a91b"},"metadata":{"website":"http://velo.org/","description":"Velo’s core mission is to build a decentralized settlement network that allows its Trusted Partners to securely transfer value among one another in a timely and transparent manner. Velo’s initial focus will be on businesses in the remittance space in the southeast Asia region.","links":{"x":"https://x.com/veloprotocol"}}},{"address":"0xfb5B838b6cfEEdC2873aB27866079AC55363D37E","symbol":"FLOKI","name":"FLOKI","decimals":9,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xfb5B838b6cfEEdC2873aB27866079AC55363D37E/logo.png","checksum":"sha256:df690d920dace754e4d63e9f6a97bbad9a3518859fb2d9ef44363faf1bc6657c"},"metadata":{"website":"https://floki.com","description":"The people's cryptocurrency. By combining the power of memes with real utility and charitability, FLOKI gives power and opportunity to the people — to the underdogs — instead of venture capitalists and hedge funds. FLOKI aims to be the most known and most used cryptocurrency in the world.","links":{"x":"https://x.com/realflokiinu","telegram":"https://t.me/FlokiInuToken","discord":"https://discord.com/invite/floki"}}},{"address":"0xfb6115445Bff7b52FeB98650C87f44907E58f802","symbol":"AAVE","name":"Binance-Peg Aave Token","decimals":18,"type":"BEP20","status":"active","logo":{"url":"https://chain-assets.lydian.com/bsc/tokens/0xfb6115445Bff7b52FeB98650C87f44907E58f802/logo.png","checksum":"sha256:40ea8e81f238e099b918b9db970b02631666f1aa8b68c8cb297b92d301d5d39a"},"metadata":{"website":"https://aave.com","description":"Aave is a decentralized finance protocol that allows people to lend and borrow crypto.","links":{"x":"https://x.com/aave","github":"https://github.com/aave/aave-protocol","reddit":"https://reddit.com/r/Aave_Official"}}}]},{"code":"cardano","name":"Cardano","symbol":"ADA","decimals":6,"family":"cardano","explorer":"https://cardanoexplorer.com/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/cardano/logo.png","checksum":"sha256:d3b417a9c5d19e81474cce3275000abc96104ee1cf020d6d8c0dd2d1aa867168"},"metadata":{"website":"https://cardano.org","description":"Cardano (ADA) is a decentralized platform that will allow complex programmable transfers of value in a secure and scalable fashion. Cardano is built in the secure Haskell programming language.","links":{"x":"https://x.com/cardano","github":"https://github.com/input-output-hk/cardano-sl/","reddit":"https://reddit.com/r/cardano"}},"tokens":[]},{"code":"celo","name":"Celo","symbol":"CELO","decimals":18,"family":"evm","explorer":"https://explorer.celo.org/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/celo/logo.png","checksum":"sha256:7acdb5bd14e829978445a8f0b63ab46e53505d10107d879200c7f516b011c063"},"metadata":{"chainId":42220,"website":"https://celo.org/","description":"Celo is an open platform that makes financial tools accessible to anyone with a mobile phone","links":{"x":"https://x.com/CeloOrg","github":"https://github.com/celo-org/celo-blockchain"}},"tokens":[{"address":"0x471EcE3750Da237f93B8E339c536989b8978a438","symbol":"CELO","name":"Celo","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/celo/tokens/0x471EcE3750Da237f93B8E339c536989b8978a438/logo.png","checksum":"sha256:6a93c7890137ac4a5b983b9bb669a92e10d0a46f545f60506b66e837b9e8db73"},"metadata":{"website":"https://celo.org/","description":"Celo is a carbon-negative, permissionless, blockchain with a rich ecosystem of global partners building innovative Web3 dapps to support a more inclusive financial system.","links":{"github":"https://github.com/celo-org"}}},{"address":"0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e","symbol":"USDT","name":"Tether","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/celo/tokens/0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e/logo.png","checksum":"sha256:0e30667248a83ba395a480fd453ae3cb8a2ca9a06375f0395ce7fc93bc47c17c"},"metadata":{"website":"https://tether.to","description":"Tether (USDT) is a cryptocurrency with a value meant to mirror the value of the U.S. dollar.","links":{"x":"https://x.com/Tether_to/"}}},{"address":"0xcebA9300f2b948710d2653dD7B07f33A8B32118C","symbol":"USDC","name":"USD Coin","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/celo/tokens/0xcebA9300f2b948710d2653dD7B07f33A8B32118C/logo.png","checksum":"sha256:2afd598ddc705065edb385f429ca102efe71c0865d64e9d83a18b4cc26b78cfc"},"metadata":{"website":"https://centre.io/usdc","description":"USDC is a fully collateralized US dollar stablecoin, an Ethereum powered coin and is the brainchild of CENTRE, an open source project bootstrapped by contributions from Circle and Coinbase.","links":{"github":"https://github.com/centrehq"}}}]},{"code":"cosmos","name":"Cosmos","symbol":"ATOM","decimals":6,"family":"cosmos","explorer":"https://www.mintscan.io/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/cosmos/logo.png","checksum":"sha256:712ec7b32ca3e77fc998c038853313e2a1897ef999858307f6136ca7f38c0d48"},"metadata":{"website":"https://cosmos.network/","description":"Cosmos is a secure & scalable blockchain ecosystem where thousands of dApps interoperate to create the foundation for a new token economy.","links":{"x":"https://x.com/cosmos","github":"https://github.com/cosmos","reddit":"https://reddit.com/r/cosmosnetwork"}},"tokens":[]},{"code":"cronos","name":"Cronos","symbol":"CRO","decimals":18,"family":"evm","explorer":"https://cronoscan.com","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/cronos/logo.png","checksum":"sha256:b0872109f02ceee080abcec2b610709e9e239ac3c37518112ae7ae00b665396a"},"metadata":{"chainId":25,"website":"https://crypto.com","description":"Pay and be paid in crypto anywhere, with any crypto, for free.","links":{"x":"https://x.com/cryptocom","telegram":"https://t.me/CryptoComOfficial","reddit":"https://reddit.com/Crypto_com/"}},"tokens":[]},{"code":"dash","name":"Dash","symbol":"DASH","decimals":8,"family":"bitcoin","explorer":"https://blockchair.com/dash","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/dash/logo.png","checksum":"sha256:cf243301e71021992e163a1e255e7c5dc868535cf165548eec9ad5e8590d0a81"},"metadata":{"website":"https://dash.org/","description":"Dash (DASH) is digital cash designed to offer financial freedom to everyone. Payments are instant, easy and secure, with near-zero fees.","links":{"x":"https://x.com/Dashpay","github":"https://github.com/dashpay/dash","reddit":"https://reddit.com/r/dashpay"}},"tokens":[]},{"code":"decred","name":"Decred","symbol":"DCR","decimals":8,"family":"bitcoin","explorer":"https://dcrdata.decred.org","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/decred/logo.png","checksum":"sha256:54e362ec2dee4af5763eb3db3657aafa371f4d6e05513f471b631592300eb80f"},"metadata":{"website":"https://decred.org","description":"Decred is a community-directed cryptocurrency with built-in governance to make it a superior long-term store of value.","links":{"x":"https://x.com/decredproject","github":"https://github.com/decred","reddit":"https://reddit.com/r/decred"}},"tokens":[]},{"code":"digibyte","name":"DigiByte","symbol":"DGB","decimals":8,"family":"bitcoin","explorer":"https://digiexplorer.info/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/digibyte/logo.png","checksum":"sha256:223b735cfd6f61c9f4baa2103a1e5c7d2429f8fe271976dfa1d4b269e59eab4f"},"metadata":{"website":"http://digibyte.io","description":"DigiByte is a blockchain which focusses mainly on cybersecurity and fast transactions. Its blockrate of 1 block per 15 seconds makes it one of the fastest blockchains today.","links":{"x":"https://x.com/DigiByteCoin","github":"https://github.com/DigiByte-Core","reddit":"https://reddit.com/r/Digibyte"}},"tokens":[]},{"code":"eos","name":"EOS","symbol":"EOS","decimals":4,"family":"eos","explorer":"https://bloks.io/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/eos/logo.png","checksum":"sha256:893aa6f4ef3316021b14a5d6ca0f707c8793abfca0448b8f03de309ef412189d"},"metadata":{"website":"https://eos.io","description":"EOS is a cryptocurrency token and blockchain that operates as a smart contract platform for the deployment of decentralized applications and decentralized autonomous corporations.","links":{"x":"https://x.com/block_one_","github":"https://github.com/eosio","reddit":"https://reddit.com/r/EOS"}},"tokens":[]},{"code":"ethereum","name":"Ethereum","symbol":"ETH","decimals":18,"family":"evm","explorer":"https://etherscan.io/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/ethereum/logo.png","checksum":"sha256:bcb6f39fe57a04462e93f6a7404e1b20c9856d3143fe9770b0d5a606f488b5ce"},"metadata":{"chainId":1,"website":"https://ethereum.org/","description":"Open source platform to write and distribute decentralized applications.","links":{"x":"https://x.com/ethereum","github":"https://github.com/ethereum","reddit":"https://reddit.com/r/ethereum"}},"tokens":[{"address":"0x0000000000085d4780B73119b644AE5ecd22b376","symbol":"TUSD","name":"TrueUSD","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x0000000000085d4780B73119b644AE5ecd22b376/logo.png","checksum":"sha256:5e4046bad4be380664933c6633a99e97f50d5a10e94423edecbbd1e4b5ad38ab"},"metadata":{"website":"https://www.trueusd.com/","description":"TrueUSD is the first independently-verified digital asset redeemable 1-for-1 for US Dollars.","links":{"x":"https://x.com/tusd_official","telegram":"https://t.me/TUSDofficial_EN","github":"https://github.com/trusttoken/TrueUSD"}}},{"address":"0x1151CB3d861920e07a38e03eEAd12C32178567F6","symbol":"Bonk","name":"Bonk","decimals":5,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x1151CB3d861920e07a38e03eEAd12C32178567F6/logo.png","checksum":"sha256:becf116743b1059b5689212894d6f2098dda6d0f92654b93ff1c3abe211cfedb"},"metadata":{"website":"https://bonkcoin.com/","description":"According to the one-pager, BONK is the first dog-themed coin on Solana 'for the people, by the people' with 50% of the total supply of the cryptocurrency airdropped to the Solana community. BONK is similar to Shiba Inu (SHIB) and Dogecoin (DOGE) memecoins, it was launched on December 25, 2022, and led to an increase in the price of the SOL token (a rise of 34% in 48 hours).","links":{"x":"https://x.com/bonk_inu"}}},{"address":"0x152649eA73beAb28c5b49B26eb48f7EAD6d4c898","symbol":"Cake","name":"PancakeSwap Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x152649eA73beAb28c5b49B26eb48f7EAD6d4c898/logo.png","checksum":"sha256:c1a30c2dfe5aee41becdaa0c6328ae1b7193c07a349cc16acc5d8e6bd91e405f"},"metadata":{"website":"https://pancakeswap.finance/","description":"Pancakeswap was originally built on the BNB Chain and allows users to trade tokens without using a centralized exchange. It provides an array of products, such as: - An exchange to swap tokens - A yield farm to earn rewards - Syrup pools to stake CAKE tokens, etc..","links":{"x":"https://x.com/pancakeswap"}}},{"address":"0x163f8C2467924be0ae7B5347228CABF260318753","symbol":"WLD","name":"Worldcoin","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x163f8C2467924be0ae7B5347228CABF260318753/logo.png","checksum":"sha256:eac1e72ccd35bc36ddbb9d564f8562b8b262c5405a7ca16d8f90ca0f5708b316"},"metadata":{"website":"https://worldcoin.org/","description":"The Worldcoin system revolves around World ID, a privacy-preserving global identity network. World ID enables users to verify their humanness online (\`Proof of Personhood\`) while maintaining their privacy through zero-knowledge proofs.","links":{"x":"https://x.com/worldcoin","telegram":"https://t.me/worldcoin"}}},{"address":"0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c","symbol":"EURC","name":"EURC","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c/logo.png","checksum":"sha256:1b1ef7f57f85ae467d2cd43eb7ccfa1a50be5ee15a382730804b1e531f6f0ffb"},"metadata":{"website":"https://www.circle.com/en/eurc","description":"EURC is a euro-backed stablecoin issued by Circle. EURC is designed to provide a faster, safer, and more efficient way to send, spend, and exchange money around the world.","links":{"x":"https://x.com/circle"}}},{"address":"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984","symbol":"UNI","name":"Uniswap","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984/logo.png","checksum":"sha256:c3e284ae768675c5195fdac51073f9b2b66831f1c793f50b2c040c82f9c2f7a9"},"metadata":{"website":"https://uniswap.org","description":"UNI is the Uniswap protocol token. Uniswap is a decentralized protocol for automated liquidity provision on Ethereum.","links":{"x":"https://x.com/UniswapProtocol","discord":"https://discord.com/invite/XErMcTq"}}},{"address":"0x2AF5D2aD76741191D15Dfe7bF6aC92d4Bd912Ca3","symbol":"LEO","name":"UNUS SED LEO","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x2AF5D2aD76741191D15Dfe7bF6aC92d4Bd912Ca3/logo.png","checksum":"sha256:38fb5b956c35948144ac0ecc970e6e80869922965cb2c13b2ae5856c7bf27567"},"metadata":{"website":"https://bitfinex.com","description":"LEO Token is a Bitfinex exchange token, which mainly use is for discounts on the exchange.","links":{"x":"https://x.com/bitfinex","telegram":"https://t.me/bfxtelegram"}}},{"address":"0x3506424F91fD33084466F402d5D97f05F8e3b4AF","symbol":"CHZ","name":"Chiliz","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x3506424F91fD33084466F402d5D97f05F8e3b4AF/logo.png","checksum":"sha256:81faaa2849f74dab0821fc658b96aaa5364da8d55e6bc55d7ad8797450ea3b60"},"metadata":{"website":"https://chiliz.com","description":"Chiliz, powering Socios.com, aims to give sports and esports fans the ability to crowd-manage their favorite teams, games, leagues, and events.","links":{"x":"https://x.com/chiliZ/","telegram":"https://t.me/chiliz_io"}}},{"address":"0x3c3a81e81dc49A522A592e7622A7E711c06bf354","symbol":"MNT","name":"Mantle","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x3c3a81e81dc49A522A592e7622A7E711c06bf354/logo.png","checksum":"sha256:009d992c9d1c1d8f83a7da74756da338835978576079f5b32c6584cea9642fed"},"metadata":{"website":"https://www.mantle.xyz/","description":"Mantle is a DAO-led web3 ecosystem whose goal is the mass adoption of decentralized and token-governed technologies. It comprises Mantle products such as Mantle Network, Mantle Governance (DAO), and Mantle Treasury. Mantle token ($MNT) is the unified product and governance token of the ecosystem.","links":{"x":"https://x.com/0xMantle","telegram":"https://t.me/mantlenetwork"}}},{"address":"0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f","symbol":"GHO","name":"Gho","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f/logo.png","checksum":"sha256:505e15f80a459aaceac1aaa26f84689333f7307d78f3c61a2bfd46e8d412139e"},"metadata":{"website":"https://gho.xyz/","description":"GHO is a native decentralized, overcollateralized digital asset pegged to USD.","links":{"x":"https://x.com/GHOAave","github":"https://github.com/aave/gho-core/"}}},{"address":"0x44ff8620b8cA30902395A7bD3F2407e1A091BF73","symbol":"VIRTUAL","name":"Virtual Protocol","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x44ff8620b8cA30902395A7bD3F2407e1A091BF73/logo.png","checksum":"sha256:37a379704f23f54e134c1537a3d8d09341b5a8f6efb06b0aa56e8c3236bbbd74"},"metadata":{"website":"https://www.virtuals.io/","description":"Virtual is an AI protocol that creates co-owned, human-curated, plug-and-play gaming AIs.","links":{"x":"https://x.com/virtuals_io","telegram":"https://t.me/virtuals"}}},{"address":"0x455e53CBB86018Ac2B8092FdCd39d8444aFFC3F6","symbol":"POL","name":"Polygon Ecosystem Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x455e53CBB86018Ac2B8092FdCd39d8444aFFC3F6/logo.png","checksum":"sha256:3ebe89ecd7ad4115b10f8efa65ec2b0b3a00d8c691ee6959ebbf4089ef5ba1d5"},"metadata":{"website":"https://polygon.technology/","description":"Polygon is a protocol and a framework for building and connecting Ethereum-compatible blockchain networks. Aggregating scalable solutions on Ethereum supporting a multi-chain Ethereum ecosystem.","links":{"x":"https://x.com/0xPolygon","telegram":"https://t.me/polygonofficial"}}},{"address":"0x45804880De22913dAFE09f4980848ECE6EcbAf78","symbol":"PAXG","name":"PAX Gold","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x45804880De22913dAFE09f4980848ECE6EcbAf78/logo.png","checksum":"sha256:ec1fd7c9e39c62722e4fbffe2ee5a166913c6bc2ededb3e2cccdd232c4c4d5aa"},"metadata":{"website":"https://paxos.com/paxgold","description":"PAX Gold (PAXG) is a digital asset where one token is backed by one fine troy ounce (t oz) of a 400 oz London Good Delivery gold bar, stored in Brink’s gold vaults."}},{"address":"0x4a220E6096B25EADb88358cb44068A3248254675","symbol":"QNT","name":"Quant","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x4a220E6096B25EADb88358cb44068A3248254675/logo.png","checksum":"sha256:d5b5682c11f262ce56c16323cf366fc9f8945e14d04ee90de8c80614d8b48e10"},"metadata":{"website":"https://quant.network","description":"The Quant Network team developed Quant as a cryptocurrency token based on the Ethereum blockchain. The solutions offered by Quant include Overledger OS and GoVerify.","links":{"x":"https://x.com/quant_network","telegram":"https://t.me/quantnetworkannouncements","github":"https://github.com/quantnetwork","reddit":"https://reddit.com/r/QuantNetwork/"}}},{"address":"0x4c9EDD5852cd905f086C759E8383e09bff1E68B3","symbol":"USDe","name":"USDe","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x4c9EDD5852cd905f086C759E8383e09bff1E68B3/logo.png","checksum":"sha256:04757d5d901160873a8ff25747ebf8d2d88edb9d1cfa4e0c1352ce0a32c365b6"},"metadata":{"website":"https://ethena.fi/","description":"Ethena is a synthetic dollar protocol built on Ethereum that will provide a crypto-native solution for money not reliant on traditional banking system infrastructure, alongside a globally accessible dollar denominated savings instrument - the 'Internet Bond'.","links":{"x":"https://x.com/ethena_labs"}}},{"address":"0x4f8e5DE400DE08B164E7421B3EE387f461beCD1A","symbol":"USDD","name":"Decentralized USD","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x4f8e5DE400DE08B164E7421B3EE387f461beCD1A/logo.png","checksum":"sha256:79eb68bbda22ca7e73c0c700c2abb4d731c40b125ee97e18b3fb3c9fbb6bcd33"},"metadata":{"website":"https://usdd.io/","description":"Decentralized USD (USDD) is a fully decentralized stablecoin pegged to the US dollar through crypto reserves.","links":{"x":"https://x.com/usddio"}}},{"address":"0x514910771AF9Ca656af840dff83E8264EcF986CA","symbol":"LINK","name":"Chainlink","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x514910771AF9Ca656af840dff83E8264EcF986CA/logo.png","checksum":"sha256:08a918aae0eec47429d4f729e0ef2fe436fb4f33169d02d7978bb464d3043632"},"metadata":{"website":"https://chain.link","description":"Chainlink is a decentralized oracle service, which aims to connect smart contracts with data from the real world. Oracles are needed to function as data feeds in smart contracts. Oracles provide external data (e.g. temperature, weather) that can drive smart contract executions. Participants on the network are incentivized (through rewards) to provide smart contracts with access to external data feeds.","links":{"x":"https://x.com/chainlink","github":"https://github.com/smartcontractkit/chainlink","reddit":"https://reddit.com/r/chainlink"}}},{"address":"0x56072C95FAA701256059aa122697B133aDEd9279","symbol":"SKY","name":"Sky","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x56072C95FAA701256059aa122697B133aDEd9279/logo.png","checksum":"sha256:0d769567f8f32b6e6d6ad7ae566eeec69876d621d2607b64c2fc7d774b456b2a"},"metadata":{"website":"https://sky.money","description":"SKY is an upgraded version of the MKR token. Upgrading is optional. It is an ERC-20 token with permit functionality and EIP-1271 signature validation. The SKY token also enables two-way conversions between MKR and SKY tokens, using the mint and burn functions of both tokens. The conversion rate is 1 MKR to 24,000 SKY.","links":{"x":"https://x.com/SkyEcosystem","github":"https://github.com/makerdao/"}}},{"address":"0x57e114B691Db790C35207b2e685D4A43181e6061","symbol":"ENA","name":"ENA","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x57e114B691Db790C35207b2e685D4A43181e6061/logo.png","checksum":"sha256:af53d450b51a716369a8d285883a803cbca207920634973773419d4a686f85be"},"metadata":{"website":"https://www.ethena.fi/","description":"Ethena is a synthetic dollar protocol built on Ethereum that will provide a crypto-native solution for money not reliant on traditional banking system infrastructure, alongside a globally accessible dollar-denominated savings instrument - the 'Internet Bond'.","links":{"x":"https://x.com/ethena_labs","telegram":"https://t.me/ethena_labs"}}},{"address":"0x582d872A1B094FC48F5DE31D3B73F2D9bE47def1","symbol":"TONCOIN","name":"Wrapped TON Coin","decimals":9,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x582d872A1B094FC48F5DE31D3B73F2D9bE47def1/logo.png","checksum":"sha256:eccd35bb16d230bc415e79d5e64b5385735559ef2dc35226d747cbd2977f2fd6"},"metadata":{"website":"https://ton.org/","description":"The Open Network is a blockchain-based decentralized computer network. TON is designed to enable processing millions of transactions per second via infinite sharding paradigm. It allows building Web 3.0 empowered by decentralized storage and DNS, instant payments and decentralized services.","links":{"telegram":"https://t.me/tonblockchain","github":"https://github.com/newton-blockchain"}}},{"address":"0x58D97B57BB95320F9a05dC918Aef65434969c2B2","symbol":"MORPHO","name":"Morpho","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x58D97B57BB95320F9a05dC918Aef65434969c2B2/logo.png","checksum":"sha256:8a74a0601d8dbfa64cef3a010a19ccbab9663b326c6a75181c9bb23330268469"},"metadata":{"website":"https://morpho.org/","description":"Morpho is an open, efficient, and resilient platform that allows anyone to earn yield and borrow assets. Lenders can earn on Morpho using Morpho Vaults, noncustodial simple to use lending vaults that optimize yields for depositors. Borrowers can borrow any assets directly from Morpho Markets.","links":{"x":"https://x.com/MorphoLabs"}}},{"address":"0x68749665FF8D2d112Fa859AA293F07A622782F38","symbol":"XAUt","name":"Tether Gold","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x68749665FF8D2d112Fa859AA293F07A622782F38/logo.png","checksum":"sha256:38837cb8acac95508a27f16ad93cd82a55a6702f8fa0aeff19e54a4db08684db"},"metadata":{"website":"https://gold.tether.to/","description":"Each XAU₮ token represents ownership of one troy fine ounce of physical gold on a specific gold bar. Furthermore, Tether Gold (XAU₮) is the only product among the competition that offers zero custody fees and has direct control over the physical gold storage.","links":{"x":"https://x.com/tethergold/"}}},{"address":"0x6982508145454Ce325dDbE47a25d4ec3d2311933","symbol":"PEPE","name":"Pepe","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x6982508145454Ce325dDbE47a25d4ec3d2311933/logo.png","checksum":"sha256:4096b7caf0d97f6d4c218fe84e2b220a0dd4c3b84a78fdd2a2d34424039ebb1a"},"metadata":{"website":"https://www.pepe.vip/","description":"Pepe is a community based memecoin with one mission: to make memecoins great again. Made to honor the iconic meme we all know and love, Pepe is here to take reign as the most memeable memecoin in existence, fueled purely by memetic power. Pepe is for the people.","links":{"x":"https://x.com/pepecoineth","telegram":"https://t.me/pepecoineth"}}},{"address":"0x6B175474E89094C44Da98b954EedeAC495271d0F","symbol":"DAI","name":"Dai","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png","checksum":"sha256:8d6eb505f139ae703ae0440264aee73a2eb2e69ba6d70999124d397cf072f6bb"},"metadata":{"website":"http://makerdao.com","description":"Dai is a stable cryptocurrency supported by Maker (MKR). To ensure price stability, Dai minimizes the price volatility against the US dollar, through an incentive structure for its participants.","links":{"x":"https://x.com/MakerDAO","reddit":"https://reddit.com/r/MakerDAO/"}}},{"address":"0x6De037ef9aD2725EB40118Bb1702EBb27e4Aeb24","symbol":"RNDR","name":"Render Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x6De037ef9aD2725EB40118Bb1702EBb27e4Aeb24/logo.png","checksum":"sha256:30426947f162aeab054f7fb764148506d61ad83b1986590e0dbd4b08c97ad624"},"metadata":{"website":"https://rendertoken.com/","description":"Distributed GPU rendering on the blockchain."}},{"address":"0x6c3ea9036406852006290770BEdFcAbA0e23A0e8","symbol":"PYUSD","name":"PayPal USD","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x6c3ea9036406852006290770BEdFcAbA0e23A0e8/logo.png","checksum":"sha256:2a7575c768a5c146f2cf5fe4a50cb4aacf0ac8c966e7381a703acf71f1bede33"},"metadata":{"website":"https://www.paypal.com/us/digital-wallet/manage-money/crypto/pyusd","description":"PayPal USD is designed to contribute to the opportunity stablecoins offer for payments and is 100% backed by U.S. dollar deposits, short-term U.S Treasuries and similar cash equivalents. PayPal USD is redeemable 1:1 for U.S. dollars and is issued by Paxos Trust Company.","links":{"x":"https://x.com/PayPal"}}},{"address":"0x6fA0BE17e4beA2fCfA22ef89BF8ac9aab0AB0fc9","symbol":"A7A5","name":"A7A5","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x6fA0BE17e4beA2fCfA22ef89BF8ac9aab0AB0fc9/logo.png","checksum":"sha256:d9857f4d9216b65a09a1fd764b65a061bf18c7f4eb2ba42a5ab476cac93da463"},"metadata":{"website":"https://a7a5.io/","description":"A7A5 is an RWA token backed by fiat deposits in top-tier banks with high overnight rates. A7A5 automatically distributes 50% of its daily income to all token holders at a random time each day, requiring no action on their part. A7A5 has a wrapped version - wA7A5 (0x0d57436f2d39c0664c6f0f2e349229483f87ea38) which is used for DeFi platforms as A7A5 is a rebasing token.","links":{"x":"https://x.com/A7A5official","telegram":"https://t.me/A7A5official","github":"https://github.com/a7a5-defi/a7a5"}}},{"address":"0x73A15FeD60Bf67631dC6cd7Bc5B6e8da8190aCF5","symbol":"USD0","name":"Usual USD","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x73A15FeD60Bf67631dC6cd7Bc5B6e8da8190aCF5/logo.png","checksum":"sha256:b36ebb680a15134ee02334c7516fc171bfd5474c7c2c525034c15684c62643b3"},"metadata":{"website":"https://usual.money/","description":"USD0 is a stablecoin fully backed 1:1 by Real-World Assets (RWA) like US Treasury Bills. It provides users with a stable, secure asset that is independent of traditional banking systems, fully transferable, and accessible within the DeFi ecosystem. As the core stability asset of Usual, USD0 supports transparency and security by maintaining real-time reserves, offering a non-fractional, reliable alternative to stablecoins like USDT and USDC.","links":{"x":"https://x.com/usualmoney"}}},{"address":"0x75231F58b43240C9718Dd58B4967c5114342a86c","symbol":"OKB","name":"OKB","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x75231F58b43240C9718Dd58B4967c5114342a86c/logo.png","checksum":"sha256:b11b4de26ebc6741d449a52a05e31ae2ba10040e9d025d76d1d323cb9ae61b37"},"metadata":{"website":"https://okex.com","description":"OKB is a global utility token issued by OK Blockchain foundation.","links":{"x":"https://x.com/okex_","telegram":"https://t.me/okexofficial_en"}}},{"address":"0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9","symbol":"AAVE","name":"Aave","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9/logo.png","checksum":"sha256:40ea8e81f238e099b918b9db970b02631666f1aa8b68c8cb297b92d301d5d39a"},"metadata":{"website":"https://aave.com","description":"Aave Protocol is a decentralised liquidity protocol where people can lend and borrow digital assets. The AAVE token is the governance token of the protocol, so AAVE holders can vote on proposals for updates. AAVE holders can also stake their AAVE in the protocol Safety Module and earn Safety Incentives for securing the protocol","links":{"x":"https://x.com/AaveAave","github":"https://github.com/aave/aave-protocol","reddit":"https://reddit.com/r/Aave_Official"}}},{"address":"0x8d0D000Ee44948FC98c9B98A4FA4921476f08B0d","symbol":"USD1","name":"World Liberty Financial USD","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x8d0D000Ee44948FC98c9B98A4FA4921476f08B0d/logo.png","checksum":"sha256:226ce53d1fccec27a3c062bc1849ff62e4f7280f46fbf6f62a3c16872a1081fb"},"metadata":{"website":"https://www.worldlibertyfinancial.com/","description":"A stablecoin by World Liberty Financial, redeemable 1:1 for the US dollar and backed by U.S. treasuries, dollar deposits, and other cash equivalents."}},{"address":"0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE","symbol":"SHIB","name":"SHIBA INU","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE/logo.png","checksum":"sha256:e24196c2f414d801aecad180b6ef53fe9a3f910e1611a7fa2ebc919f037be0ba"},"metadata":{"website":"https://shibatoken.com/","description":"According to SHIBA INU, the reasoning behind the creation of SHIBA is that Shibas constantly forget where they bury their treasure. The website proclaims \\"Many doggie wars have been waged over precious treasure and delicious goodies.\\"","links":{"telegram":"https://t.me/shibainuthedogecoinkiller"}}},{"address":"0x96F6eF951840721AdBF46Ac996b59E0235CB985C","symbol":"USDY","name":"Ondo U.S. Dollar Yield","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0x96F6eF951840721AdBF46Ac996b59E0235CB985C/logo.png","checksum":"sha256:c92e519c23b9e966a013d4c82171279930bc61d23a8d1960bbb4feed29095d90"},"metadata":{"website":"https://ondo.finance/","description":"Ondo US Dollar Yield (USDY) is a decentralized lending protocol designed to honor transfer restrictions from permissioned tokens, thereby expanding the universe of assets it can support. This unique approach allows it to cater to a broader range of financial instruments, making it a versatile player in the blockchain ecosystem.","links":{"x":"https://x.com/ondofinance"}}},{"address":"0xA0b73E1Ff0B80914AB6fe0444E65848C4C34450b","symbol":"CRO","name":"Crypto.com Coin","decimals":8,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xA0b73E1Ff0B80914AB6fe0444E65848C4C34450b/logo.png","checksum":"sha256:73d1fdc7b2c4e5bb2de7538848526ef9da0de9e4c6ffa859e80a7433355d3b0c"},"metadata":{"website":"https://crypto.com/en/chain","description":"Crypto.com Chain will be a privacy preserving payment network that focuses on enabling crypto spending in the real world, powering the future of mobile money.","links":{"x":"https://x.com/cryptocom","telegram":"https://t.me/CryptoComOfficial","reddit":"https://reddit.com/r/Crypto_com/"}}},{"address":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","symbol":"USDC","name":"USD Coin","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png","checksum":"sha256:2afd598ddc705065edb385f429ca102efe71c0865d64e9d83a18b4cc26b78cfc"},"metadata":{"website":"https://centre.io/usdc","description":"USDC is a fully collateralized US dollar stablecoin, an Ethereum powered coin and is the brainchild of CENTRE, an open source project bootstrapped by contributions from Circle and Coinbase.","links":{"github":"https://github.com/centrehq"}}},{"address":"0xB50721BCf8d664c30412Cfbc6cf7a15145234ad1","symbol":"ARB","name":"Arbitrum","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xB50721BCf8d664c30412Cfbc6cf7a15145234ad1/logo.png","checksum":"sha256:398ceedea8ce4b8f409aad460b275d0f2fb33b1cc489d926f149f903d8fe60ed"},"metadata":{"website":"https://arbitrum.foundation/","description":"$ARB tokens can be used to vote on Arbitrum DAO governance proposals, allowing $ARB holders to collectively shape the future of Arbitrum protocols and chains. Token holders can also delegate their voting power to delegates.","links":{"x":"https://x.com/arbitrum","discord":"https://discord.com/arbitrum"}}},{"address":"0xB62132e35a6c13ee1EE0f84dC5d40bad8d815206","symbol":"NEXO","name":"Nexo","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xB62132e35a6c13ee1EE0f84dC5d40bad8d815206/logo.png","checksum":"sha256:740a3aafff3c2e0d4b0164283740fa123b3dae6e11bb1e62f9e30b0abdf97d3b"},"metadata":{"website":"http://nexo.io","description":"NEXO (NEXO) is a compliant token that is backed by the underlying assets of Nexo’s loan portfolio.","links":{"x":"https://x.com/NexoFinance","telegram":"https://t.me/nexofinance","github":"https://github.com/nexofinance/NEXO-Token/"}}},{"address":"0xB8c77482e45F1F44dE1745F52C74426C631bDD52","symbol":"BNB","name":"BNB","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xB8c77482e45F1F44dE1745F52C74426C631bDD52/logo.png","checksum":"sha256:65180e680b9de0129869e644b7bef074091cc315f06043ec93b9266b6ba5dedf"},"metadata":{"website":"https://www.binance.com","description":"-"}},{"address":"0xC139190F447e929f090Edeb554D95AbB8b18aC1C","symbol":"USDtb","name":"USDtb","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xC139190F447e929f090Edeb554D95AbB8b18aC1C/logo.png","checksum":"sha256:af53d450b51a716369a8d285883a803cbca207920634973773419d4a686f85be"},"metadata":{"website":"https://usdtb.money/","description":"Digital Dollars for the Internet Economy. Backed by institutional grade tokenized treasury funds and powered by Ethena Labs","links":{"x":"https://x.com/ethena_labs"}}},{"address":"0xE66747a101bFF2dBA3697199DCcE5b743b454759","symbol":"GT","name":"Gatechain Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xE66747a101bFF2dBA3697199DCcE5b743b454759/logo.png","checksum":"sha256:4f825ec4ad49dda01c0e654fe394f37be1b8009da56a2155fd94d0033bce9041"},"metadata":{"website":"https://gatechain.io","description":"GateChain is a public blockchain dedicated to blockchain asset safety even after private keys are compromised.","links":{"x":"https://x.com/gatechain_io/photo","github":"https://github.com/gatechain"}}},{"address":"0xFa2B947eEc368f42195f24F36d2aF29f7c24CeC2","symbol":"USDf","name":"Falcon USD","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xFa2B947eEc368f42195f24F36d2aF29f7c24CeC2/logo.png","checksum":"sha256:c2e0be0547ecc3524726fe1a6826d2842d387c4cebae9ca3741622055788f992"},"metadata":{"website":"https://falcon.finance/","description":"Falcon Finance is a overcollaterized synthetic dollar protocol.","links":{"x":"https://x.com/FalconStable"}}},{"address":"0xaea46A60368A7bD060eec7DF8CBa43b7EF41Ad85","symbol":"FET","name":"Fetch.ai","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xaea46A60368A7bD060eec7DF8CBa43b7EF41Ad85/logo.png","checksum":"sha256:e4b3bbad2b42e6f573869ec4897475e9dfd94ca852d1757b48f684b9149013f0"},"metadata":{"website":"https://fetch.ai","description":"Fetch.ai aims to be at the forefront of accelerating research and the deployment of emerging technologies such as blockchain and AI."}},{"address":"0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409","symbol":"FDUSD","name":"First Digital USD","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409/logo.png","checksum":"sha256:28fb705f72d6410d75ddd94e5901b95bcafc2a79cb3ee3a9b28c20fa3636bad6"},"metadata":{"website":"https://firstdigitallabs.com","description":"FDUSD (First Digital USD) is a 1:1 USD-backed Stablecoin. FDUSD revolutionizes global finance with a cutting-edge digital stablecoin, providing businesses and builders with security, speed, and innovation worldwide.","links":{"x":"https://x.com/FDLabsHQ"}}},{"address":"0xdA5e1988097297dCdc1f90D4dFE7909e847CBeF6","symbol":"WLFI","name":"World Liberty Financial","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xdA5e1988097297dCdc1f90D4dFE7909e847CBeF6/logo.png","checksum":"sha256:eeafcececc21d1196ed28c98b133af89a2536cd220e97512f1a5a27dbc89b0ed"},"metadata":{"website":"https://www.worldlibertyfinancial.com/","description":"The WLFi protocol aims to become the one-stop-shop for DeFi across the globe. It is being designed and built by leading pioneers in the crypto industry.","links":{"x":"https://x.com/worldlibertyfi","telegram":"https://t.me/defiant1s"}}},{"address":"0xdAC17F958D2ee523a2206206994597C13D831ec7","symbol":"USDT","name":"Tether","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png","checksum":"sha256:032f5190a9066fce37aad7bc7da4752bb420837623692e1981ca45ecc7b167fd"},"metadata":{"website":"https://tether.to","description":"Tether (USDT) is a cryptocurrency with a value meant to mirror the value of the U.S. dollar.","links":{"x":"https://x.com/Tether_to/"}}},{"address":"0xdC035D45d973E3EC169d2276DDab16f1e407384F","symbol":"USDS","name":"USDS","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xdC035D45d973E3EC169d2276DDab16f1e407384F/logo.png","checksum":"sha256:e783cdb8ac05bedc7f3c86eeb955e6d6d278a604e6652bdaa3573416a8189edc"},"metadata":{"website":"https://sky.money","description":"USDS is an upgraded version of the DAI token. Upgrading is optional. It is an ERC-20 token with permit functionality and EIP-1271 signature validation. The USDS token also enables two-way conversions between DAI and USDS tokens, using the mint and burn functions of both tokens. The conversion rate of the stablecoin is 1 DAI to 1 USDS.","links":{"x":"https://x.com/SkyEcosystem","github":"https://github.com/makerdao/"}}},{"address":"0xde4EE8057785A7e8e800Db58F9784845A5C2Cbd6","symbol":"DEXE","name":"DeXe","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xde4EE8057785A7e8e800Db58F9784845A5C2Cbd6/logo.png","checksum":"sha256:6b2ff439ceb1589f1cb613b831c675834ecf775a16e1c4742e2f43c8d029f995"},"metadata":{"website":"https://dexe.network/","description":"DeXe Protocol is a decentralized suite of permissionless tools for managing assets, products, and communities governed by $DEXE holders within DeXe Protocol DAO. It offers a no-code environment on blockchain for launching DAOs, tokens, and fundraises; AI-powered automation for decision-making; on/off-chain in a seamless space; account abstraction acting as a DAO, multi-sig or single party with numerous features for managing assets and payouts, and(or) communities.","links":{"x":"https://x.com/DexeNetwork","telegram":"https://t.me/dexe_network_official_chat","github":"https://github.com/dexe-network/DeXe-Protocol"}}},{"address":"0xe28b3B32B6c345A34Ff64674606124Dd5Aceca30","symbol":"INJ","name":"Injective","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xe28b3B32B6c345A34Ff64674606124Dd5Aceca30/logo.png","checksum":"sha256:adaac9db4c7a404691e64adf6f14d96f1d9ccf94309b7836b997e79ac78ae3f0"},"metadata":{"website":"https://injectiveprotocol.com","description":"The Universal Layer-2 DeFi Protocol for Cross-Chain Derivatives Trading."}},{"address":"0xe343167631d89B6Ffc58B88d6b7fB0228795491D","symbol":"USDG","name":"Global Dollar","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xe343167631d89B6Ffc58B88d6b7fB0228795491D/logo.png","checksum":"sha256:79b06101392560f0117201d51fcb89a62ffdfc88b42427b12311fc00d32af935"},"metadata":{"website":"https://globaldollar.com/","description":"Global Dollar (USDG) is a single-currency stablecoin pegged to the US dollar, issued by Paxos Digital Singapore Pte. Ltd. and is compliant with the Monetary Authority of Singapore's (MAS) forthcoming stablecoin framework. USDG is redeemable from Paxos on a one-to-one basis for US dollars.","links":{"x":"https://x.com/ondofinance"}}},{"address":"0xfAbA6f8e4a5E8Ab82F62fe7C39859FA577269BE3","symbol":"ONDO","name":"Ondo","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ethereum/tokens/0xfAbA6f8e4a5E8Ab82F62fe7C39859FA577269BE3/logo.png","checksum":"sha256:7eeabfdcbfd1ebd247490cd1a51803953a47774eb802eb34458acd919e69234d"},"metadata":{"website":"https://ondo.finance/","description":"Ondo Finance is a decentralized investment banking protocol consisting of on-chain financial products that connect investors with capital demand broadening access, improving transparency, and reducing cost versus the status quo. The ONDO token will govern the Ondo Finance protocol.","links":{"x":"https://x.com/ondofinance","telegram":"https://t.me/ondofinance"}}}]},{"code":"evmos","name":"Evmos","symbol":"EVMOS","decimals":18,"family":"evm","explorer":"https://evm.evmos.org","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/evmos/logo.png","checksum":"sha256:057079030b023d65a3d254f7a989735935b68872300c8b65fe2e29af499600de"},"metadata":{"chainId":9001,"website":"https://evmos.org","description":"Evmos is bringing the world of Ethereum-based applications and assets to the interoperable networks of the Cosmos ecosystem, all while aligning developer and user incentives. Let’s adventure together into the world of innovation where EVM meets interchain composability.","links":{"x":"https://x.com/EvmosOrg","telegram":"https://t.me/EvmosOrg","discord":"https://discord.com/invite/evmos","github":"https://github.com/tharsis/evmos"}},"tokens":[]},{"code":"fantom","name":"Fantom","symbol":"FTM","decimals":18,"family":"evm","explorer":"https://ftmscan.com","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/fantom/logo.png","checksum":"sha256:a028cc0444394fc587917c7a41077e319e38ac0f78ab817592b426d64d0eb6c0"},"metadata":{"chainId":250,"website":"https://fantom.foundation","description":"A DAG-Based Smart-Contract Platform.","links":{"x":"https://x.com/FantomFDN","telegram":"https://t.me/fantomfoundation","discord":"https://discord.com/invite/zS4Ek4WByA/","reddit":"https://reddit.com/r/FantomFoundation/"}},"tokens":[{"address":"0x0E1694483eBB3b74d3054E383840C6cf011e518e","symbol":"sUSD","name":"sUSD","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0x0E1694483eBB3b74d3054E383840C6cf011e518e/logo.png","checksum":"sha256:ce0628cb8a040eb740c822c9663d827de0d58e960721d844623f46bee5833986"},"metadata":{"website":"https://synthetix.io","description":"sUSD is an ERC-20 token made by the Synthetix team which tracks the price of USD.","links":{"x":"https://x.com/synthetix_io","github":"https://github.com/Synthetixio"}}},{"address":"0x29b0Da86e484E1C0029B56e817912d778aC0EC69","symbol":"YFI","name":"yearn.finance","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0x29b0Da86e484E1C0029B56e817912d778aC0EC69/logo.png","checksum":"sha256:e99831fd2ad39bb53e03c086e9933d703fb3d6c3193330f600c95b3334f875c6"},"metadata":{"website":"https://yearn.finance/","description":"YFI is the governance token for Yearn.Finance, a site that performs a variety of functions for DeFi users, moving their assets in and out of different liquidity pools in order to find the best yields.","links":{"x":"https://x.com/iearnfinance","github":"https://github.com/iearn-finance"}}},{"address":"0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590","symbol":"STG","name":"StargateToken","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590/logo.png","checksum":"sha256:d86b08417c95a404769402ded2e21d2b1b7ba215074ae806c673d62c7a33171c"},"metadata":{"website":"https://stargate.finance","description":"Stargate is a fully composable liquidity transport protocol that lives at the heart of Omnichain DeFi.","links":{"telegram":"https://t.me/joinchat/LEM0ELklmO1kODdh"}}},{"address":"0x44B26E839eB3572c5E959F994804A5De66600349","symbol":"HEGIC","name":"Hegic","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0x44B26E839eB3572c5E959F994804A5De66600349/logo.png","checksum":"sha256:45dd3788690d805e306fbedfa3447c80c3f667cb23b715bd144e4fcf09e85c6a"},"metadata":{"website":"https://hegic.co/","description":"Hegic is an on-chain, non-custodial peer-to-pool options trading protocol built on Ethereum. Currently Hegic supports options trading in for Bitcoin (wBTC) and Ether (ETH).","links":{"github":"https://github.com/hegic"}}},{"address":"0x468003B688943977e6130F4F68F23aad939a1040","symbol":"SPELL","name":"Spell Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0x468003B688943977e6130F4F68F23aad939a1040/logo.png","checksum":"sha256:dc5223584b758423bcb11a82983b4c7b7b8d1f5a406e32e33f704c70c0595799"},"metadata":{"website":"https://abracadabra.money/","description":"Abracadabra.money is a lending platform that allows users to borrow funds using Interest Bearing Tokens as collateral.","links":{"x":"https://x.com/MIM_Spell"}}},{"address":"0x46E7628E8b4350b2716ab470eE0bA1fa9e76c6C5","symbol":"BAND","name":"Band Protocol","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0x46E7628E8b4350b2716ab470eE0bA1fa9e76c6C5/logo.png","checksum":"sha256:6af684cca98763fa710c2a475fc7746975b1db8b7d097cda8f0231e596010cdd"},"metadata":{"website":"https://bandprotocol.com","description":"Band Protocol is a cross-chain data oracle network that aggregates and connects real-world data and APIs to smart contracts.","links":{"x":"https://x.com/BandProtocol","telegram":"https://t.me/bandprotocol"}}},{"address":"0x56ee926bD8c72B2d5fa1aF4d9E4Cbb515a1E3Adc","symbol":"SNX","name":"Synthetix Network","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0x56ee926bD8c72B2d5fa1aF4d9E4Cbb515a1E3Adc/logo.png","checksum":"sha256:5c0e732b5db086867c8e32046439c4db659d56447d0693a388c82b6801f46290"},"metadata":{"website":"https://www.synthetix.io/","description":"The Synthetix Network Token (SNX) is the native token of Synthetix, a synthetic asset (Synth) issuance protocol built on Ethereum. The SNX token is used as collateral to issue Synths, ERC-20 tokens that track the price of assets like Gold, Silver, Oil and Bitcoin.","links":{"x":"https://x.com/synthetix_io","github":"https://github.com/synthetixio"}}},{"address":"0x6626c47c00F1D87902fc13EECfaC3ed06D5E8D8a","symbol":"WOO","name":"Wootrade Network","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0x6626c47c00F1D87902fc13EECfaC3ed06D5E8D8a/logo.png","checksum":"sha256:e2d294d316cb85127822ceba32f95c3734419d3069639f83624a036f823a8bd8"},"metadata":{"website":"https://woo.network","description":"Wootrade aims to provide deep liquidity and superior order execution at the lowest cost for traders, exchanges, institutions, and DeFi platforms. Its flagship, WOO X, is a professional trading platform featuring customizable modules, and zero-fees with deep liquidity across spot and margin. Wootrade was founded by Kronos Research, a quantitative trading firm generating $10-15B in daily volume, with the goal of democratizing access to deep liquidity and yield strategies through various products.","links":{"telegram":"https://t.me/wootrade"}}},{"address":"0x6a07A792ab2965C72a5B8088d3a069A7aC3a993B","symbol":"AAVE","name":"Aave","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0x6a07A792ab2965C72a5B8088d3a069A7aC3a993B/logo.png","checksum":"sha256:40ea8e81f238e099b918b9db970b02631666f1aa8b68c8cb297b92d301d5d39a"},"metadata":{"website":"https://aave.com","description":"Aave Protocol is a decentralised liquidity protocol where people can lend and borrow digital assets. The AAVE token is the governance token of the protocol, so AAVE holders can vote on proposals for updates. AAVE holders can also stake their AAVE in the protocol Safety Module and earn Safety Incentives for securing the protocol","links":{"x":"https://x.com/aave","github":"https://github.com/aave/aave-protocol","reddit":"https://reddit.com/r/Aave_Official"}}},{"address":"0x7d016eec9c25232b01F23EF992D98ca97fc2AF5a","symbol":"FXS","name":"Frax Share","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0x7d016eec9c25232b01F23EF992D98ca97fc2AF5a/logo.png","checksum":"sha256:4e82a6e0b9b61979a2c1c37dc6575813792f06dc5af9179c0a891999cb1c3a50"},"metadata":{"website":"https://frax.finance/","description":"FXS is the value accrual and governance token of the entire Frax ecosystem. Frax is a fractional-algorithmic stablecoin protocol. It aims to provide highly scalable, decentralized, algorithmic money in place of fixed-supply assets like BTC.","links":{"x":"https://x.com/fraxfinance","github":"https://github.com/fraxfinance/frax-solidity"}}},{"address":"0x8b1f4432F943c465A973FeDC6d7aa50Fc96f1f65","symbol":"AXL","name":"Axelar","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0x8b1f4432F943c465A973FeDC6d7aa50Fc96f1f65/logo.png","checksum":"sha256:b6f30181437283842a7c02f2de35f51137b356432ab07fdd13cdb8e25fb880ed"},"metadata":{"website":"https://axelar.network/","description":"Axelar delivers secure cross-chain communication for Web3. Our infrastructure enables dApp users to interact with any asset or application, on any chain, with one click.","links":{"x":"https://x.com/axelarcore","telegram":"https://t.me/axelarcommunity","discord":"https://discord.com/invite/aRZ3Ra6f7D","github":"https://github.com/axelarnetwork","reddit":"https://reddit.com/r/axelar"}}},{"address":"0xae75A438b2E0cB8Bb01Ec1E1e376De11D44477CC","symbol":"SUSHI","name":"Sushi","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0xae75A438b2E0cB8Bb01Ec1E1e376De11D44477CC/logo.png","checksum":"sha256:b5d42b51ccbe4cf62023b35c90bbfde68ea0b4ec959c29b8d5c04f2853e164a3"},"metadata":{"website":"https://sushiswap.org/","description":"The SushiSwap protocol realigns incentives for network participants by introducing revenue sharing and forum-driven network efforts to the popular AMM model.","links":{"x":"https://x.com/sushiswap","github":"https://github.com/sushiswap"}}},{"address":"0xb3654dc3D10Ea7645f8319668E8F54d2574FBdC8","symbol":"LINK","name":"ChainLink","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0xb3654dc3D10Ea7645f8319668E8F54d2574FBdC8/logo.png","checksum":"sha256:08a918aae0eec47429d4f729e0ef2fe436fb4f33169d02d7978bb464d3043632"},"metadata":{"website":"https://chain.link/","description":"A blockchain-based middleware, acting as a bridge between cryptocurrency smart contracts, data feeds, APIs and traditional bank account payments.","links":{"x":"https://x.com/chainlink","telegram":"https://t.me/chainlinkofficial"}}},{"address":"0xdc301622e621166BD8E82f2cA0A26c13Ad0BE355","symbol":"FRAX","name":"Frax","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/fantom/tokens/0xdc301622e621166BD8E82f2cA0A26c13Ad0BE355/logo.png","checksum":"sha256:8f79390a7262253e3c75d613b2130b85f5deae6897b807cdb17c2c73d8a038ea"},"metadata":{"website":"https://frax.finance/","description":"Frax is a fractional-algorithmic stablecoin protocol. It aims to provide highly scalable, decentralized, algorithmic money in place of fixed-supply assets like BTC.","links":{"x":"https://x.com/fraxfinance","github":"https://github.com/fraxfinance/frax-solidity"}}}]},{"code":"filecoin","name":"Filecoin","symbol":"FIL","decimals":18,"family":"evm","explorer":"https://filfox.info/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/filecoin/logo.png","checksum":"sha256:f03e815d146ab922e8dcfc9e3c3a1f6e427e02ef655bd3014cc4d6662950bac3"},"metadata":{"chainId":314,"website":"https://filecoin.io","description":"Filecoin provides a blockchain-based marketplace that aims to revolutionize the global storage economy."},"tokens":[]},{"code":"groestlcoin","name":"Groestlcoin","symbol":"GRS","decimals":8,"family":"bitcoin","explorer":"https://grs.tokenview.com/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/groestlcoin/logo.png","checksum":"sha256:abd0947203edc853895bb2002387e93bf4877b86d3f0c10e2a6c03c0fd3f5a43"},"metadata":{"website":"http://groestlcoin.org","description":"Groestlcoin (GRS) is a cryptocoin, that is optionally private. Anyone can mine it effectively, with GPU.","links":{"x":"https://x.com/GroestlcoinTeam","github":"https://github.com/Groestlcoin","reddit":"https://reddit.com/r/groestlcoin"}},"tokens":[]},{"code":"hedera","name":"Hedera","symbol":"HBAR","decimals":8,"family":"evm","explorer":"https://hashscan.io/mainnet/dashboard","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/hedera/logo.png","checksum":"sha256:0cd9298ffb0a9ae77815f2f135fd97251f5ef773c144b67ff319f15db6059082"},"metadata":{"chainId":295,"website":"https://hedera.com/","description":"The 3rd generation public ledger","links":{"x":"https://x.com/hedera","discord":"https://discord.com/invite/EC2GY8ueRk","github":"https://github.com/hashgraph"}},"tokens":[]},{"code":"iotex","name":"IoTeX","symbol":"IOTX","decimals":18,"family":"evm","explorer":"https://iotexscan.io/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/iotex/logo.png","checksum":"sha256:05417eb0d3ddb203bb15ee291c277a02781005f8de428e530fbd6e24454d0a05"},"metadata":{"chainId":4689,"website":"https://iotex.io","description":"IOTX will be a Decentralized Network for Internet of Things. Powered by a Privacy-Centric Blockchain.","links":{"x":"https://x.com/iotex_io","github":"https://github.com/iotexproject","reddit":"https://reddit.com/r/IoTex"}},"tokens":[]},{"code":"kava","name":"Kava","symbol":"KAVA","decimals":6,"family":"evm","explorer":"https://kava.mintscan.io/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/kava/logo.png","checksum":"sha256:4d611b78905675091a1821e85a176aed3644f7417a351fb53daa6c1dacfd9dc9"},"metadata":{"chainId":2222,"website":"https://kava.io","description":"Kava is a cross-chain DeFi Lending platform enabling stablecoin loans for users of major cryptocurrencies.","links":{"x":"https://x.com/kava_labs","github":"https://github.com/kava-labs"}},"tokens":[]},{"code":"linea","name":"Linea","symbol":"ETH","decimals":18,"family":"evm","explorer":"https://explorer.linea.build","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/linea/logo.png","checksum":"sha256:da22a39992d217802b4e918e1740bde2fd430c157b4cac17e783e2c08fbd9308"},"metadata":{"chainId":59144,"website":"https://linea.build","description":"Linea is a network that scales the experience of Ethereum.","links":{"x":"https://x.com/LineaBuild","discord":"https://discord.com/invite/consensys"}},"tokens":[{"address":"0x1789e0043623282D5DCc7F213d703C6D8BAfBB04","symbol":"LINEA","name":"Linea","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/linea/tokens/0x1789e0043623282D5DCc7F213d703C6D8BAfBB04/logo.png","checksum":"sha256:d96a3584c88d8a70287549f2abc241f551f6d6f5bd86e10bc32b793ea6bccbb6"},"metadata":{"website":"https://linea.build","description":"Linea is the Layer 2 built from first principles to strengthen Ethereum and the entire ETH economy. Every aspect of its design—from its productive ETH burn mechanics, and capital efficient native yield, to its underlying Ethereum-equivalent zk tech—amplifies the value and utility of Ethereum Mainnet.","links":{"x":"https://x.com/LineaAssoc"}}}]},{"code":"litecoin","name":"Litecoin","symbol":"LTC","decimals":8,"family":"bitcoin","explorer":"https://blockchair.com/litecoin","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/litecoin/logo.png","checksum":"sha256:b15149faba4f883f5665c5797b9cad4afd5b1f5bf616fb825fac2c9638412550"},"metadata":{"website":"https://litecoin.org/","description":"Litecoin is a peer-to-peer Internet currency that enables instant, near-zero cost payments to anyone in the world.","links":{"x":"https://x.com/LitecoinProject","github":"https://github.com/litecoin-project/litecoin","reddit":"https://reddit.com/r/litecoin"}},"tokens":[]},{"code":"mantle","name":"Mantle Chain","symbol":"MNT","decimals":18,"family":"evm","explorer":"https://explorer.mantle.xyz/blocks","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/mantle/logo.png","checksum":"sha256:009d992c9d1c1d8f83a7da74756da338835978576079f5b32c6584cea9642fed"},"metadata":{"chainId":5000,"website":"https://www.mantle.xyz","description":"Mantle Network is a technology stack for scaling Ethereum, and we strive to be EVM-compatible while doing so."},"tokens":[{"address":"0x8aD3c73F833d3F9A523aB01476625F269aEB7Cf0","symbol":"TSLAx","name":"Tesla xStock","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/mantle/tokens/0x8aD3c73F833d3F9A523aB01476625F269aEB7Cf0/logo.png","checksum":"sha256:d372f5a7b450cf126fb13a1606e6608088473a96b9f47244edb6086bbff40e1a"},"metadata":{"website":"https://assets.backed.fi/products","description":"Tesla xStock"}},{"address":"0xc845b2894dBddd03858fd2D643B4eF725fE0849d","symbol":"NVDAx","name":"NVIDIA xStock","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/mantle/tokens/0xc845b2894dBddd03858fd2D643B4eF725fE0849d/logo.png","checksum":"sha256:2aa268e39aaedead3f3a2d3b6b7abc906bc0842a83f7c6edb87e5ec3d8a005ba"},"metadata":{"website":"https://assets.backed.fi/products","description":"NVIDIA xStock"}},{"address":"0xe92f673Ca36C5E2Efd2DE7628f815f84807e803F","symbol":"GOOGLx","name":"Alphabet xStock","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/mantle/tokens/0xe92f673Ca36C5E2Efd2DE7628f815f84807e803F/logo.png","checksum":"sha256:db4c360380c07b9ee2bb6418b7458319944d718d31ae8a22a464da238557474c"},"metadata":{"website":"https://assets.backed.fi/products","description":"Alphabet xStock"}}]},{"code":"megaeth","name":"MegaETH","symbol":"ETH","decimals":18,"family":"evm","explorer":"https://megaeth.blockscout.com/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/megaeth/logo.png","checksum":"sha256:76e86b20b5a1885bd4dedc71bd240f5c9c49ed4e22d126e3c653c0a8a0317db8"},"metadata":{"chainId":4326,"website":"https://www.megaeth.com/","description":"MegaETH is the first real-time blockchain, where crypto applications leverage extreme performance to reach their full potential. MegaETH is secured by Ethereum and powered by a hyper-optimized execution environment with a heterogeneous architecture. It delivers streaming throughput with 10 millisecond latency and up to 100,000 TPS. Developers scale apps with real-time state streaming, and users get instant transactions all while preserving full Ethereum composability.","links":{"x":"https://x.com/megaeth"}},"tokens":[{"address":"0x28B7E77f82B25B95953825F1E3eA0E36c1c29861","symbol":"MEGA","name":"MEGA","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/megaeth/tokens/0x28B7E77f82B25B95953825F1E3eA0E36c1c29861/logo.png","checksum":"sha256:76e86b20b5a1885bd4dedc71bd240f5c9c49ed4e22d126e3c653c0a8a0317db8"},"metadata":{"website":"https://www.megaeth.com","description":"MEGA Governance token","links":{"x":"https://x.com/megaborrowfi","telegram":"https://t.me/MegaETH_Official","discord":"https://discord.com/megaeth","github":"https://github.com/megaeth-labs"}}},{"address":"0xFAfDdbb3FC7688494971a79cc65DCa3EF82079E7","symbol":"USDM","name":"MegaUSD","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/megaeth/tokens/0xFAfDdbb3FC7688494971a79cc65DCa3EF82079E7/logo.png","checksum":"sha256:3dc2a71f3601873bfabe1ce2592a3ce6e12860d2b4849499ebdc673b40beea22"},"metadata":{"website":"https://www.megaeth.com","description":"MegaUSD stablecoin on MegaETH","links":{"x":"https://x.com/megaborrowfi","telegram":"https://t.me/MegaETH_Official","discord":"https://discord.com/megaeth","github":"https://github.com/megaeth-labs"}}},{"address":"0xcCcc62962d17b8914c62D74FfB843d73B2a3cccC","symbol":"cUSD","name":"Cap USD","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/megaeth/tokens/0xcCcc62962d17b8914c62D74FfB843d73B2a3cccC/logo.png","checksum":"sha256:32c491a30ede362d40c0aecf407f78254c2f7cdaf7147b89c8e724310be7f386"},"metadata":{"website":"https://cap.app/","description":"cUSD is a digital dollar issued on the Ethereum blockchain that can be used on any network. cUSD's reserve is backed by blue chip stablecoins such as USDC, USDT, pyUSD, BUIDL, and BENJI, i.e. issued by regulated institutions with transparent attestations. It is 1:1 redeemable for any of the available reserve assets.","links":{"x":"https://x.com/capmoney_"}}}]},{"code":"meter","name":"Meter","symbol":"MTRG","decimals":18,"family":"evm","explorer":"https://scan.meter.io/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/meter/logo.png","checksum":"sha256:f92507bc9ad38948ce0f595fcc5dd6977ffb75219a970f90562246b5cb2201fe"},"metadata":{"chainId":82,"website":"https://meter.io/","description":"Meter is a high performance Ethereum compatible infrastructure that allows smart contracts to scale and travel through blockchain networks. Transactions on Meter is front running resistant with stable and low gas cost paid in metastable gas token MTR","links":{"x":"https://x.com/Meter_IO","telegram":"https://t.me/Meter_IO","github":"https://github.com/meterio","reddit":"https://reddit.com/r/Meter_io/"}},"tokens":[{"address":"0xb158870beB809Ad955Bf56065C5C10D7Fd957cC0","symbol":"MOVR","name":"MOVR from MoonRiver on Meter","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/meter/tokens/0xb158870beB809Ad955Bf56065C5C10D7Fd957cC0/logo.png","checksum":"sha256:443d92743d00fe2085fd16546734f7431ee62834da45c7e587acb0fd2cdcf6a8"},"metadata":{"website":"https://moonbeam.network/networks/moonriver/","description":"Moonriver is a sister network of Moonbeam, and provides an environment to test new code under real economic conditions."}}]},{"code":"monad","name":"Monad","symbol":"MON","decimals":18,"family":"evm","explorer":"https://monvision.io/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/monad/logo.png","checksum":"sha256:edccb4162b518dfc31258fa5d74adaa4edeba07bc7eea17754026296b2f29db8"},"metadata":{"chainId":143,"website":"https://www.monad.xyz/","description":"Monad is a high-performance Layer 1 blockchain that is 100% EVM-compatible. It processes 10,000 transactions per second with near-zero fees and sub-second finality. MON is the native token of the Monad blockchain, used for gas fees and network operations.","links":{"x":"https://x.com/monad"}},"tokens":[{"address":"0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a","symbol":"AUSD","name":"AUSD","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/monad/tokens/0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a/logo.png","checksum":"sha256:f4f188dc3b2092f2e3415b89432c22adc8b7ee6dd63dbc07769d5914f381e027"},"metadata":{"website":"https://www.agora.finance/","description":"AUSD, a digital dollar minted 1:1 with USD fiat. AUSD is designed to be a secure digital currency, utilizing one of the world’s largest custodian banks to safeguard assets."}},{"address":"0x111111d2bf19e43C34263401e0CAd979eD1cdb61","symbol":"USD1","name":"USD1","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/monad/tokens/0x111111d2bf19e43C34263401e0CAd979eD1cdb61/logo.png","checksum":"sha256:5f8d651c2ab765b780361d42a6558f07a08facfe9c406116305f4386622f3865"},"metadata":{"website":"https://worldlibertyfinancial.com/","description":"USD1 is a fiat-backed digital asset, designed to maintain a 1:1 equivalence with the U.S. dollar. "}},{"address":"0x754704Bc059F8C67012fEd69BC8A327a5aafb603","symbol":"USDC","name":"USDC","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/monad/tokens/0x754704Bc059F8C67012fEd69BC8A327a5aafb603/logo.png","checksum":"sha256:2afd598ddc705065edb385f429ca102efe71c0865d64e9d83a18b4cc26b78cfc"},"metadata":{"website":"https://www.circle.com/","description":"USDC is a stablecoin that is pegged to the U.S. dollar on a 1:1 basis. Every unit of this cryptocurrency in circulation is backed up by $1 that is held in reserve, in a mix of cash and short-term U.S. Treasury bonds.","links":{"x":"https://x.com/circle"}}},{"address":"0xFF7F8F301F7A706E3CfD3D2275f5dc0b9EE8009B","symbol":"FOLKS","name":"Folks Finance","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/monad/tokens/0xFF7F8F301F7A706E3CfD3D2275f5dc0b9EE8009B/logo.png","checksum":"sha256:d50b3c74d6f5d7974aff2fa4199fffeba2cc29e0f2a56a5c20e71af19238e213"},"metadata":{"website":"https://folks.finance/","description":"Folks Finance is a crosschain decentralized finance (DeFi) protocol that enables users to supply, borrow, and manage digital assets across multiple blockchains from a single platform.","links":{"x":"https://x.com/FolksFinance"}}}]},{"code":"moonbeam","name":"Moonbeam","symbol":"GLMR","decimals":18,"family":"evm","explorer":"https://moonscan.io","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/moonbeam/logo.png","checksum":"sha256:aa916c02f60dfadb61a749f06921026690363a05d93668d1fc75e84df7f6df26"},"metadata":{"chainId":1284,"website":"https://moonbeam.network","description":"Moonbeam combines the best of both worlds: the familiar and easy-to-use tooling of Ethereum and the scalable, interoperable architecture of Polkadot.","links":{"x":"https://x.com/moonbeamnetwork"}},"tokens":[{"address":"0x467719aD09025FcC6cF6F8311755809d45a5E5f3","symbol":"AXL","name":"Axelar","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/moonbeam/tokens/0x467719aD09025FcC6cF6F8311755809d45a5E5f3/logo.png","checksum":"sha256:b6f30181437283842a7c02f2de35f51137b356432ab07fdd13cdb8e25fb880ed"},"metadata":{"website":"https://axelar.network/","description":"Axelar delivers secure cross-chain communication for Web3. Our infrastructure enables dApp users to interact with any asset or application, on any chain, with one click.","links":{"x":"https://x.com/axelarcore","telegram":"https://t.me/axelarcommunity","discord":"https://discord.com/invite/aRZ3Ra6f7D","github":"https://github.com/axelarnetwork","reddit":"https://reddit.com/r/axelar"}}}]},{"code":"moonriver","name":"Moonriver","symbol":"MOVR","decimals":18,"family":"evm","explorer":"https://moonriver.moonscan.io/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/moonriver/logo.png","checksum":"sha256:d890dc3fbfa789dafa3f5f54ac96dfdb2867a2e7c9ea6266cb1e321ffcc2f108"},"metadata":{"chainId":1285,"website":"https://moonbeam.network/networks/moonriver/","description":"Moonriver is a sister network of Moonbeam, and provides an environment to test new code under real economic conditions.","links":{"x":"https://x.com/moonrivernw"}},"tokens":[]},{"code":"near","name":"NEAR Protocol","symbol":"NEAR","decimals":24,"family":"near","explorer":"https://explorer.near.org/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/near/logo.png","checksum":"sha256:998c7555820291748fac1778f4867de81c801934fe9cd3275958603516d587cc"},"metadata":{"website":"https://near.org","description":"NEAR is an open source platform that accelerates the development of decentralized applications.","links":{"x":"https://x.com/nearprotocol","github":"https://github.com/nearprotocol/nearcore","reddit":"https://reddit.com/r/nearprotocol/"}},"tokens":[]},{"code":"oasis","name":"Oasis Network","symbol":"ROSE","decimals":8,"family":"evm","explorer":"https://www.oasisscan.com/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/oasis/logo.png","checksum":"sha256:3a39795e21577c1bbcacb3383fd96a33e041ae450c67d31db49bb16a171acbd8"},"metadata":{"chainId":42262,"website":"https://oasisprotocol.org/","description":"The Oasis Network is a privacy-enabled scalable blockchain network built for open finance and a responsible data economy.","links":{"x":"https://x.com/oasisprotocol","telegram":"https://t.me/oasisprotocolcommunity","github":"https://github.com/oasisprotocol/"}},"tokens":[]},{"code":"opbnb","name":"opBNB","symbol":"BNB","decimals":18,"family":"evm","explorer":"https://opbnbscan.com/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/opbnb/logo.png","checksum":"sha256:bc872477635217c847f96b00fee3dae65328d103e7815bdb802da348f3bfec55"},"metadata":{"chainId":204,"website":"https://opbnb.bnbchain.org/en","description":"An Optimized Layer-2 Solution That Delivers Lower Fees And Higher Throughput To Unlock The Full Potential Of The BNB Chain.","links":{"x":"https://x.com/BNBChainDevs","discord":"https://discord.com/invite/bnbchain"}},"tokens":[]},{"code":"opmainnet","name":"Optimistic Ethereum","symbol":"OETH","decimals":18,"family":"evm","explorer":"https://optimistic.etherscan.io","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/opmainnet/logo.png","checksum":"sha256:612defdaff82bdc17fd4e0eecda4ed997c34b6ab43671972e21ccbe0c1d9ca1f"},"metadata":{"chainId":10,"website":"https://optimism.io/","description":"Optimism is a Layer 2 scaling solution for Ethereum."},"tokens":[{"address":"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85","symbol":"USDC","name":"USD Coin","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/opmainnet/tokens/0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85/logo.png","checksum":"sha256:4fd4b78e88ef0ee54c6424140c2f0adac34c79828db4d917948c52f35c734651"},"metadata":{"website":"https://www.centre.io/","description":"USDC is a fully collateralized US Dollar stablecoin developed by CENTRE, the open source project with Circle being the first of several forthcoming issuers.","links":{"github":"https://github.com/centrehq"}}},{"address":"0x14778860E937f509e651192a90589dE711Fb88a9","symbol":"CYBER","name":"CyberConnect","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/opmainnet/tokens/0x14778860E937f509e651192a90589dE711Fb88a9/logo.png","checksum":"sha256:30e99118f45d772b4c3f334f3b3d1a39bf46b70410b8a6225fad71cd5da8f810"},"metadata":{"website":"https://cyberconnect.me/","description":"CyberConnect is a Web3 social network that enables developers to create social applications empowering users to own their digital identity, content, connections, and interactions.","links":{"x":"https://x.com/CyberConnectHQ","github":"https://github.com/cyberconnecthq"}}},{"address":"0x350a791Bfc2C21F9Ed5d10980Dad2e2638ffa7f6","symbol":"LINK","name":"ChainLink","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/opmainnet/tokens/0x350a791Bfc2C21F9Ed5d10980Dad2e2638ffa7f6/logo.png","checksum":"sha256:08a918aae0eec47429d4f729e0ef2fe436fb4f33169d02d7978bb464d3043632"},"metadata":{"website":"https://chain.link/","description":"A blockchain-based middleware, acting as a bridge between cryptocurrency smart contracts, data feeds, APIs and traditional bank account payments.","links":{"x":"https://x.com/chainlink"}}},{"address":"0x4200000000000000000000000000000000000042","symbol":"OP","name":"Optimism","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/opmainnet/tokens/0x4200000000000000000000000000000000000042/logo.png","checksum":"sha256:6828eedd7911a6aab0337bd5156c2dde7d573b39b62e12541ab09e87a58b1724"},"metadata":{"website":"https://app.optimism.io/governance","description":"Optimism is a Layer 2 scaling solution for Ethereum.","links":{"x":"https://x.com/optimismPBC","github":"https://github.com/ethereum-optimism/"}}},{"address":"0x6985884C4392D348587B19cb9eAAf157F13271cd","symbol":"ZRO","name":"LayerZero","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/opmainnet/tokens/0x6985884C4392D348587B19cb9eAAf157F13271cd/logo.png","checksum":"sha256:6d2e57666161c774b320aec817b1576f78644e2adc1358fbf5db6ba9e93616b2"},"metadata":{"website":"https://layerzero.network/","description":"LayerZero is a technology that enables applications to move data across blockchains, uniquely supporting censorship-resistant messages and permissionless development through immutable smart contracts","links":{"x":"https://x.com/LayerZero_Labs","telegram":"https://t.me/joinchat/VcqxYkStIDsyN2Rh"}}},{"address":"0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4","symbol":"SNX","name":"Synthetix Network","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/opmainnet/tokens/0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4/logo.png","checksum":"sha256:5c0e732b5db086867c8e32046439c4db659d56447d0693a388c82b6801f46290"},"metadata":{"website":"https://synthetix.io","description":"Synthetix is a derivatives liquidity protocol on Ethereum that enables the issuance and trading of synthetic assets.","links":{"x":"https://x.com/synthetix_io","github":"https://github.com/havven/havven","reddit":"https://reddit.com/r/synthetix_io/"}}},{"address":"0x8aE125E8653821E851F12A49F7765db9a9ce7384","symbol":"DOLA","name":"Dola USD Stablecoin","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/opmainnet/tokens/0x8aE125E8653821E851F12A49F7765db9a9ce7384/logo.png","checksum":"sha256:ea18b0b3665933392a939b64b5d4a1b0099352875059d5a372cf594e191ae55a"},"metadata":{"website":"https://www.inverse.finance/","description":"Dola is a debt and asset backed, capital-efficient, decentralized stablecoin from Inverse Finance","links":{"x":"https://x.com/InverseFinance","telegram":"https://t.me/InverseFinance"}}},{"address":"0x9046D36440290FfDE54FE0DD84Db8b1CfEE9107B","symbol":"YFI","name":"yearn.finance","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/opmainnet/tokens/0x9046D36440290FfDE54FE0DD84Db8b1CfEE9107B/logo.png","checksum":"sha256:2fc14e977632ba45acbddd7c7c2b8d88b5812cdf767fd0863a300f795bf86e42"},"metadata":{"website":"https://yearn.finance/","description":"YFI is the governance token for Yearn.Finance, a site that performs a variety of functions for DeFi users, moving their assets in and out of different liquidity pools in order to find the best yields.","links":{"x":"https://x.com/iearnfinance","telegram":"https://t.me/iearnfinance","github":"https://github.com/iearn-finance"}}},{"address":"0x9560e827aF36c94D2Ac33a39bCE1Fe78631088Db","symbol":"VELO","name":"VelodromeV2","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/opmainnet/tokens/0x9560e827aF36c94D2Ac33a39bCE1Fe78631088Db/logo.png","checksum":"sha256:97442f8e64b717cc5a5670bbbea185e4e4f902e3a3aa1e0b612551c46f958265"},"metadata":{"website":"https://www.velodrome.finance/","description":"Velodrome Finance, at its core, is a solution for protocols on Optimism to properly incentivize liquidity for their own use cases. Building on top of the groundwork laid out by Solidly, our team has addressed that first iteration's core issues to realize its full potential.","links":{"x":"https://x.com/VelodromeFi"}}},{"address":"0xEc6adef5E1006bb305bB1975333e8fc4071295bf","symbol":"CTSI","name":"Cartesi Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/opmainnet/tokens/0xEc6adef5E1006bb305bB1975333e8fc4071295bf/logo.png","checksum":"sha256:22134c15177eba5322214af9df4f74d127f26d47a870146244529c02ae598476"},"metadata":{"website":"https://cartesi.io","description":"Cartesi Rollups is a modular execution layer that elevates simple smart contracts to decentralized Linux runtime.","links":{"x":"https://x.com/cartesiproject","telegram":"https://t.me/cartesiproject"}}},{"address":"0xa00E3A3511aAC35cA78530c85007AFCd31753819","symbol":"KNC","name":"Kyber Network","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/opmainnet/tokens/0xa00E3A3511aAC35cA78530c85007AFCd31753819/logo.png","checksum":"sha256:79831643a287a755cbca289959a69d8c7cd8127713fe1ac20d0632ba35e6d33c"},"metadata":{"website":"https://kyber.network","description":"Kyber Network’s on-chain liquidity protocol allows decentralized token swaps to be integrated into any application, enabling value exchange to be performed seamlessly between all parties in the ecosystem."}},{"address":"0xaf8cA653Fa2772d58f4368B0a71980e9E3cEB888","symbol":"TRB","name":"Tellor","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/opmainnet/tokens/0xaf8cA653Fa2772d58f4368B0a71980e9E3cEB888/logo.png","checksum":"sha256:a785ff7aeb811587f7475da6aecac5863cf8d3432285f1d2e2db4205f852926e"},"metadata":{"website":"https://tellor.io","description":"Tellor (a decentralized oracle) aims to address the Oracle problem on Ethereum.","links":{"x":"https://x.com/WeAreTellor","telegram":"https://t.me/tellor"}}},{"address":"0xdC6fF44d5d932Cbd77B52E5612Ba0529DC6226F1","symbol":"WLD","name":"Worldcoin","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/opmainnet/tokens/0xdC6fF44d5d932Cbd77B52E5612Ba0529DC6226F1/logo.png","checksum":"sha256:eac1e72ccd35bc36ddbb9d564f8562b8b262c5405a7ca16d8f90ca0f5708b316"},"metadata":{"website":"https://worldcoin.org/","description":"The Worldcoin system revolves around World ID, a privacy-preserving global identity network. World ID enables users to verify their humanness online (\`Proof of Personhood\`) while maintaining their privacy through zero-knowledge proofs.","links":{"x":"https://x.com/worldcoin","telegram":"https://t.me/worldcoin"}}}]},{"code":"plasma","name":"Plasma","symbol":"XPL","decimals":18,"family":"evm","explorer":"https://plasmascan.to/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/plasma/logo.png","checksum":"sha256:f4f2cff313932697a0e28ec8b6d521c55240e75dfcffb4c5895a9a7c7efee394"},"metadata":{"chainId":9745,"website":"https://www.plasma.to/","description":"Plasma is a high performance Layer 1 blockchain that is purpose built for global stablecoin payments. XPL is the native token of the Plasma blockchain, which will be used to facilitate and be used in transactions as well as rewarding those who provide network support by validating transactions.","links":{"x":"https://x.com/PlasmaFDN"}},"tokens":[{"address":"0x0A1a1A107E45b7Ced86833863f482BC5f4ed82EF","symbol":"USDai","name":"USDai","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/plasma/tokens/0x0A1a1A107E45b7Ced86833863f482BC5f4ed82EF/logo.png","checksum":"sha256:d4346995b6bf45c08894b13b9c3f2fc30fe575423f373e4fcb8adcc72b64dc3e"},"metadata":{"website":"https://usd.ai/","description":"USDai is a low risk, fully-backed synthetic dollar, which allows it to be redeemed instantly at all times. USDai does not pass yield through to holders, instead providing users with deep secondary market liquidity across DeFi and CeFi.","links":{"x":"https://x.com/USDai_Official"}}},{"address":"0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34","symbol":"USDe","name":"USDe","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/plasma/tokens/0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34/logo.png","checksum":"sha256:04757d5d901160873a8ff25747ebf8d2d88edb9d1cfa4e0c1352ce0a32c365b6"},"metadata":{"website":"https://ethena.fi/","description":"Ethena is a synthetic dollar protocol built on Ethereum that will provide a crypto-native solution for money not reliant on traditional banking system infrastructure, alongside a globally accessible dollar denominated savings instrument - the 'Internet Bond'.","links":{"x":"https://x.com/ethena_labs"}}}]},{"code":"polkadot","name":"Polkadot","symbol":"DOT","decimals":10,"family":"polkadot","explorer":"https://assethub-polkadot.subscan.io/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/polkadot/logo.png","checksum":"sha256:5daed247a36cab5f7b7ee5aee56698ac8acf10e8b0f7ad2934d409394a8b8702"},"metadata":{"website":"https://polkadot.com","description":"Polkadot is a blockchain project that aims to connect blockchains, to enable the transfer of value and logic across chains. DOT is the native coin of the network.","links":{"x":"https://x.com/polkadotnetwork","github":"https://github.com/w3f","reddit":"https://reddit.com/r/dot"}},"tokens":[]},{"code":"polygon","name":"POL (ex-MATIC)","symbol":"POL","decimals":18,"family":"evm","explorer":"https://polygonscan.com/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/polygon/logo.png","checksum":"sha256:98006483ca85b4f65da07786e8502b383a99a16df10d7e0505deb98b4c76078a"},"metadata":{"chainId":137,"website":"https://polygon.technology/","description":"Polygon (Matic) strives to solve the scalability and usability issues, while not compromising on decentralization and leveraging the existing developer community and ecosystem","links":{"x":"https://x.com/0xPolygon","github":"https://github.com/maticnetwork/","reddit":"https://reddit.com/r/maticnetwork/"}},"tokens":[{"address":"0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a","symbol":"AUSD","name":"AUSD","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a/logo.png","checksum":"sha256:4c843634b435281e4392869cdbc806c55310aaeab05d902152664d031f716145"},"metadata":{"website":"https://www.agora.finance/","description":"AUSD is a safe, secure asset that enables billions of dollars of transfers and is used globally."}},{"address":"0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a","symbol":"SUSHI","name":"SushiToken (PoS)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a/logo.png","checksum":"sha256:25eca40f31e4d53a54264b146824a072cf7ea55b7502a67869dac3396734f738"},"metadata":{"website":"https://sushi.com/","description":"Sushi is the home of DeFi. Our community is building a comprehensive, decentralized trading platform for the future of finance.","links":{"x":"https://x.com/sushiswap","github":"https://github.com/sushiswap"}}},{"address":"0x101A023270368c0D50BFfb62780F4aFd4ea79C35","symbol":"ANKR","name":"Ankr Network","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x101A023270368c0D50BFfb62780F4aFd4ea79C35/logo.png","checksum":"sha256:a0f8818dd2e53a55010dd05e7d232c3c48da3c28d54a8de292ef0d7a1769b8eb"},"metadata":{"website":"https://ankr.com","description":"Ankr is building an infrastructure platform and marketplace for Web3-stack deployment","links":{"x":"https://x.com/ankr","telegram":"https://t.me/ankrnetwork","discord":"https://discord.com/invite/ankr","github":"https://github.com/Ankr-network","reddit":"https://reddit.com/r/Ankrofficial/"}}},{"address":"0x172370d5Cd63279eFa6d502DAB29171933a610AF","symbol":"CRV","name":"CRV (PoS)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x172370d5Cd63279eFa6d502DAB29171933a610AF/logo.png","checksum":"sha256:c13b39e5accfa14a6d00767d650be83ffb895256591c3caee951cded6e58f387"},"metadata":{"website":"https://www.curve.finance/","description":"The main purposes of the Curve DAO token are to incentivise liquidity providers on the Curve Finance platform as well as getting as many users involved as possible in the governance of the protocol.","links":{"x":"https://x.com/CurveFinance","telegram":"https://t.me/curvefi","github":"https://github.com/curvefi/curve-contract"}}},{"address":"0x1B815d120B3eF02039Ee11dC2d33DE7aA4a8C603","symbol":"WOO","name":"WOO Network","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x1B815d120B3eF02039Ee11dC2d33DE7aA4a8C603/logo.png","checksum":"sha256:0f2a5c2eb7fdb4be2a92d160aa1414e9a93de87ab2c0e984d9bb52c758f6fb61"},"metadata":{"website":"https://woo.network","description":"Wootrade is a layer one trading infrastructure complete with deep liquidity, frontend trading GUI, and the ability to integrate into any exchange, trading desk, wallet, dApp, or other trading-related platform.","links":{"telegram":"https://t.me/wootrade"}}},{"address":"0x1C954E8fe737F99f68Fa1CCda3e51ebDB291948C","symbol":"KNC","name":"Kyber Network","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x1C954E8fe737F99f68Fa1CCda3e51ebDB291948C/logo.png","checksum":"sha256:79831643a287a755cbca289959a69d8c7cd8127713fe1ac20d0632ba35e6d33c"},"metadata":{"website":"https://kyber.network","description":"Kyber Network’s on-chain liquidity protocol allows decentralized token swaps to be integrated into any application, enabling value exchange to be performed seamlessly between all parties in the ecosystem."}},{"address":"0x2727Ab1c2D22170ABc9b595177B2D5C6E1Ab7B7B","symbol":"CTSI","name":"Cartesi Token (PoS)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x2727Ab1c2D22170ABc9b595177B2D5C6E1Ab7B7B/logo.png","checksum":"sha256:89574e7438d45a10883f9fceaa5147b23f880735b5b0de4dfff05c8561a476bc"},"metadata":{"website":"https://cartesi.io","description":"Cartesi is the first Blockchain OS. It allows developers to build decentralized logic with Linux and standard programming environments preserving the decentralization and security of blockchains.","links":{"x":"https://x.com/cartesiproject","telegram":"https://t.me/cartesiannouncements"}}},{"address":"0x2B9E7ccDF0F4e5B24757c1E1a80e311E34Cb10c7","symbol":"MASK","name":"Mask Network","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x2B9E7ccDF0F4e5B24757c1E1a80e311E34Cb10c7/logo.png","checksum":"sha256:7c90ce01316aeabc7050b8137640486d224a3babc64c9cb6e26cc6055a7fba68"},"metadata":{"website":"https://mask.io","description":"The portal to the new, open internet.","links":{"x":"https://x.com/realmaskbook","github":"https://github.com/DimensionDev/Maskbook"}}},{"address":"0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590","symbol":"STG","name":"StargateToken","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590/logo.png","checksum":"sha256:d86b08417c95a404769402ded2e21d2b1b7ba215074ae806c673d62c7a33171c"},"metadata":{"website":"https://stargate.finance","description":"Stargate is a fully composable liquidity transport protocol that lives at the heart of Omnichain DeFi.","links":{"telegram":"https://t.me/joinchat/LEM0ELklmO1kODdh"}}},{"address":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","symbol":"USDC","name":"Native USD Coin (PoS)","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359/logo.png","checksum":"sha256:4fd4b78e88ef0ee54c6424140c2f0adac34c79828db4d917948c52f35c734651"},"metadata":{"website":"https://centre.io/usdc","description":"USDC is a fully collateralized US dollar stablecoin, an Ethereum powered coin and is the brainchild of CENTRE, an open source project bootstrapped by contributions from Circle and Coinbase.","links":{"github":"https://github.com/centrehq"}}},{"address":"0x50B728D8D964fd00C2d0AAD81718b71311feF68a","symbol":"SNX","name":"Synthetix","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x50B728D8D964fd00C2d0AAD81718b71311feF68a/logo.png","checksum":"sha256:5c0e732b5db086867c8e32046439c4db659d56447d0693a388c82b6801f46290"},"metadata":{"website":"https://synthetix.io","description":"Synthetix is a derivatives liquidity protocol on Ethereum that enables the issuance and trading of synthetic assets.","links":{"x":"https://x.com/synthetix_io","github":"https://github.com/havven/havven","reddit":"https://reddit.com/r/synthetix_io/"}}},{"address":"0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39","symbol":"LINK","name":"ChainLink Token","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39/logo.png","checksum":"sha256:e395d05243571540feb3026ce7a6ed432b74dadd0063562105b2d7f2668030f5"},"metadata":{"website":"https://chain.link/","description":"A blockchain-based middleware, acting as a bridge between cryptocurrency smart contracts, data feeds, APIs and traditional bank account payments.","links":{"x":"https://x.com/chainlink"}}},{"address":"0x5fe2B58c013d7601147DcdD68C143A77499f5531","symbol":"GRT","name":"Graph Token (PoS)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x5fe2B58c013d7601147DcdD68C143A77499f5531/logo.png","checksum":"sha256:61f811187b07d769be5132c2a582f34f90cead4953d306eedc57e80745af24f3"},"metadata":{"website":"https://thegraph.com","description":"The Graph is an indexing protocol and global API for organizing blockchain data and making it easily accessible with GraphQL. Developers can use Graph Explorer to search, find, and publish all the public data they need to build decentralized applications. The Graph Network makes it possible to build serverless dApps that run entirely on public infrastructure.","links":{"x":"https://x.com/graphprotocol","telegram":"https://t.me/graphprotocol","github":"https://github.com/graphprotocol/graph-node","reddit":"https://reddit.com/r/thegraph"}}},{"address":"0x614389EaAE0A6821DC49062D56BDA3d9d45Fa2ff","symbol":"ORBS","name":"Orbs","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x614389EaAE0A6821DC49062D56BDA3d9d45Fa2ff/logo.png","checksum":"sha256:9760d7feeaf5d2de8f1009226454f6bf1f00f6f38388ad543e3b9af1c947e8c1"},"metadata":{"website":"https://orbs.com","description":"Orbs is a blockchain infrastructure-as-a-service built for large scale consumer applications to meet their business and technological requirements.","links":{"x":"https://x.com/orbs_network","telegram":"https://t.me/orbs_network","github":"https://github.com/orbs-network"}}},{"address":"0x6985884C4392D348587B19cb9eAAf157F13271cd","symbol":"ZRO","name":"LayerZero","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x6985884C4392D348587B19cb9eAAf157F13271cd/logo.png","checksum":"sha256:6d2e57666161c774b320aec817b1576f78644e2adc1358fbf5db6ba9e93616b2"},"metadata":{"website":"https://layerzero.network/","description":"LayerZero is a technology that enables applications to move data across blockchains, uniquely supporting censorship-resistant messages and permissionless development through immutable smart contracts","links":{"x":"https://x.com/LayerZero_Labs","telegram":"https://t.me/joinchat/VcqxYkStIDsyN2Rh"}}},{"address":"0x6e4E624106Cb12E168E6533F8ec7c82263358940","symbol":"AXL","name":"Axelar","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x6e4E624106Cb12E168E6533F8ec7c82263358940/logo.png","checksum":"sha256:b6f30181437283842a7c02f2de35f51137b356432ab07fdd13cdb8e25fb880ed"},"metadata":{"website":"https://axelar.network/","description":"Axelar delivers secure cross-chain communication for Web3. Our infrastructure enables dApp users to interact with any asset or application, on any chain, with one click.","links":{"x":"https://x.com/axelarcore","telegram":"https://t.me/axelarcommunity","discord":"https://discord.com/invite/aRZ3Ra6f7D","github":"https://github.com/axelarnetwork","reddit":"https://reddit.com/r/axelar"}}},{"address":"0x77f56cf9365955486B12C4816992388eE8606f0E","symbol":"C98","name":"Coin98","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x77f56cf9365955486B12C4816992388eE8606f0E/logo.png","checksum":"sha256:53594dfd818c6ff0c50eaafdd2e5c10919617bdb5ede17084e3619443111a6ea"},"metadata":{"website":"https://coin98.com/","description":"Coin98 enables value transfer as easily as using the Internet by the innovation of Multi-chain Engine, Fully Automatic Liquidity and Space Gate, all in one Super Liquidity Aggregator.","links":{"x":"https://x.com/coin98_finance","telegram":"https://t.me/StackerVentures","github":"https://github.com/coin98"}}},{"address":"0x7BeBd226154E865954A87650FAefA8F485d36081","symbol":"ZIG","name":"ZigCoin","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x7BeBd226154E865954A87650FAefA8F485d36081/logo.png","checksum":"sha256:993bfaf6d21b5a50574d996d87e01ebe66e1943b0b718d66af67b2c6a0a6802a"},"metadata":{"website":"https://zignaly.com/","description":"Zignaly is a social investment platform where users can follow winning strategies and participate in their returns.","links":{"x":"https://x.com/zignaly"}}},{"address":"0x82617aA52dddf5Ed9Bb7B370ED777b3182A30fd1","symbol":"YGG","name":"Yield Guild Games (PoS)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0x82617aA52dddf5Ed9Bb7B370ED777b3182A30fd1/logo.png","checksum":"sha256:9c818cf673937c75b17dbc474849594ff48430c7fd364f2f401af9bca3163372"},"metadata":{"website":"https://yieldguild.io/","description":"Yield Guild Games (YGG) is a decentralized autonomous organization (DAO) for investing in non fungible tokens (NFTs) used in virtual worlds and blockchain-based games. The organization’s mission is to create the biggest virtual world economy, optimizing its community-owned assets for maximum utility and sharing its profits with its token holders.","links":{"x":"https://x.com/YieldGuild","telegram":"https://t.me/yieldguildgames","discord":"https://discord.com/invite/ygg"}}},{"address":"0xA3f751662e282E83EC3cBc387d225Ca56dD63D3A","symbol":"APEPE","name":"Ape and Pepe","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0xA3f751662e282E83EC3cBc387d225Ca56dD63D3A/logo.png","checksum":"sha256:6c0b3f0e1897c668722403379e7f6dda5b266b779bac280d6cfc6b3e046686a2"},"metadata":{"website":"https://apepe.lol/","description":"A new meme that combines APE and PEPE to symbolize small investors. The APEPE community aims to bring together small investors and become a force to be reckoned with. APEPE's symbol, the community, is worth noting.","links":{"x":"https://x.com/APEPE_MEME","telegram":"https://t.me/APEPE_Official","github":"https://github.com/"}}},{"address":"0xB25e20De2F2eBb4CfFD4D16a55C7B395e8a94762","symbol":"REQ","name":"Request","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0xB25e20De2F2eBb4CfFD4D16a55C7B395e8a94762/logo.png","checksum":"sha256:5486f116e5fd249be48e3389d8e051765549289cb0fa8b22421cc950e00162b8"},"metadata":{"website":"https://request.network/","description":"Request Network is the protocol for payment requests. They are immutably recorded processed without an intermediary. Companies, DAOs & individuals pay & get paid in cryptos of payment networks incl. Ethereum, BSC, & Fantom.","links":{"x":"https://x.com/RequestNetwork","telegram":"https://t.me/requestnetwork"}}},{"address":"0xB9638272aD6998708de56BBC0A290a1dE534a578","symbol":"IQ","name":"Everipedia IQ","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0xB9638272aD6998708de56BBC0A290a1dE534a578/logo.png","checksum":"sha256:3092bdf4a8365af50ab6454589d0b80b389b4597981fba8c579b2efb6664ca6d"},"metadata":{"website":"https://iq.wiki/","description":"Everipedia IQ’s mission is to bring the world’s knowledge on-chain.","links":{"x":"https://x.com/Everipedia","github":"https://github.com/EveripediaNetwork"}}},{"address":"0xD6DF932A45C0f255f85145f286eA0b292B21C90B","symbol":"AAVE","name":"Aave (PoS)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0xD6DF932A45C0f255f85145f286eA0b292B21C90B/logo.png","checksum":"sha256:40ea8e81f238e099b918b9db970b02631666f1aa8b68c8cb297b92d301d5d39a"},"metadata":{"website":"https://aave.com","description":"Aave Protocol is a decentralised liquidity protocol where people can lend and borrow digital assets. The AAVE token is the governance token of the protocol, so AAVE holders can vote on proposals for updates. AAVE holders can also stake their AAVE in the protocol Safety Module and earn Safety Incentives for securing the protocol","links":{"x":"https://x.com/aave","github":"https://github.com/aave/aave-protocol","reddit":"https://reddit.com/r/Aave_Official"}}},{"address":"0xE0339c80fFDE91F3e20494Df88d4206D86024cdF","symbol":"ELON","name":"Dogelon","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0xE0339c80fFDE91F3e20494Df88d4206D86024cdF/logo.png","checksum":"sha256:10743d6a014e6c94d46f979c983a403ea2c97433906bed1196e98516225d991d"},"metadata":{"website":"https://dogelon.io","description":"I am Dogelon. Dogelon Mars. Join me and together we'll reach the stars ✨ We want to reach Mars and beyond. However, many of those good people are rugged, or buy scam tokens that can't be sold. For this reason, the Dogelon community pledges to send tokens over time to victims of rugs and scams, so that the worst day of their trading life can be turned into their best. And after some time, they will be able to join us on our regular flights to Mars....","links":{"x":"https://x.com/dogelonmars"}}},{"address":"0xE3322702BEdaaEd36CdDAb233360B939775ae5f1","symbol":"TRB","name":"Tellor","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0xE3322702BEdaaEd36CdDAb233360B939775ae5f1/logo.png","checksum":"sha256:a785ff7aeb811587f7475da6aecac5863cf8d3432285f1d2e2db4205f852926e"},"metadata":{"website":"https://tellor.io","description":"Tellor (a decentralized oracle) aims to address the Oracle problem on Ethereum.","links":{"x":"https://x.com/WeAreTellor","telegram":"https://t.me/tellor"}}},{"address":"0xFF7F8F301F7A706E3CfD3D2275f5dc0b9EE8009B","symbol":"FOLKS","name":"Folks Finance","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0xFF7F8F301F7A706E3CfD3D2275f5dc0b9EE8009B/logo.png","checksum":"sha256:c3245428d5d41850d1529312299c9661f03252ed0452ae159ed33b244725bc60"},"metadata":{"website":"https://folks.finance","description":"Folks Finance is a crosschain decentralized finance (DeFi) protocol that enables users to supply, borrow, and manage digital assets across multiple blockchains from a single platform.","links":{"x":"https://x.com/FolksFinance"}}},{"address":"0xa1428174F516F527fafdD146b883bB4428682737","symbol":"SUPER","name":"SuperVerse","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0xa1428174F516F527fafdD146b883bB4428682737/logo.png","checksum":"sha256:bbe25616860e41fb62b1df3d60205c271ac1622ae17b4dc12447f60799a50d45"},"metadata":{"website":"https://www.superverse.co","description":"SuperVerse is a cross-chain DeFi protocol that allows users to deploy crypto and NFT farms with no code required!","links":{"x":"https://x.com/SuperVerseDAO","telegram":"https://t.me/SuperVerseDAO"}}},{"address":"0xb33EaAd8d922B1083446DC23f610c2567fB5180f","symbol":"UNI","name":"Uniswap (PoS)","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0xb33EaAd8d922B1083446DC23f610c2567fB5180f/logo.png","checksum":"sha256:ffeb195044f885ad937304ceb0fcdd2dcdc79b58b0a9e16a4f05c155891e3706"},"metadata":{"website":"https://uniswap.org/","description":"The Uniswap protocol empowers developers, liquidity providers and traders to participate in a financial marketplace that is open and accessible to all.","links":{"x":"https://x.com/UniswapProtocol","discord":"https://discord.com/FCfyBSbCU5"}}},{"address":"0xdF7837DE1F2Fa4631D716CF2502f8b230F1dcc32","symbol":"TEL","name":"Telcoin","decimals":2,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0xdF7837DE1F2Fa4631D716CF2502f8b230F1dcc32/logo.png","checksum":"sha256:9027adec951ba4fdfdbb7eaf233512626cdee2fb3ddc02beeadd92afe31251de"},"metadata":{"website":"https://www.telco.in/","description":"A cryptocurrency distributed by your mobile operator and accepted everywhere.","links":{"x":"https://x.com/telcoin_team","telegram":"https://t.me/telcoincommunity","github":"https://github.com/telcoin"}}},{"address":"0xf1c1A3C2481A3a8A3f173A9ab5Ade275292A6fA3","symbol":"VEE","name":"BLOCKv","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/polygon/tokens/0xf1c1A3C2481A3a8A3f173A9ab5Ade275292A6fA3/logo.png","checksum":"sha256:7b703b6c74224d5febdf25d0177a50c5cede88729bcad3a99407eea0d94dbc4f"},"metadata":{"website":"https://blockv.io/","description":"Create and Public Digital virtual goods on the blockchain","links":{"x":"https://x.com/blockv_io"}}}]},{"code":"polygonzkevm","name":"Polygon zkEVM","symbol":"tETH","decimals":18,"family":"evm","explorer":"https://polygon.technology/polygon-zkevm","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/polygonzkevm/logo.png","checksum":"sha256:b099e480e21e4dbe0cb1a6c90c3a14730324939c5d2377a619ef5a769e6db07e"},"metadata":{"chainId":1101,"website":"https://www.polygon.technology/","description":"Polygon zkEVM is the leading zero knowledge scaling solution that’s fully equivalent with the Ethereum Virtual Machine: all existing smart contracts, developer tools, and wallets work seamlessly.","links":{"x":"https://x.com/0xPolygonHermez"}},"tokens":[]},{"code":"ravencoin","name":"Ravencoin","symbol":"RVN","decimals":8,"family":"bitcoin","explorer":"https://ravencoin.network","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/ravencoin/logo.png","checksum":"sha256:3275769dad750488aaefcb7124a93b6bb078c457a6ef03049fb4ebbf812417bd"},"metadata":{"website":"https://ravencoin.org","description":"Ravencoin is a digital peer to peer network that aims to implement a use case specific blockchain, designed to efficiently handle the transfer of assets from one party to another.","links":{"x":"https://x.com/ravencoin","github":"https://github.com/RavenProject/Ravencoin","reddit":"https://reddit.com/r/Ravencoin"}},"tokens":[]},{"code":"ripple","name":"XRP","symbol":"XRP","decimals":6,"family":"ripple","explorer":"https://xrpcharts.ripple.com/#/graph/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/ripple/logo.png","checksum":"sha256:c387bdebaf32ae9224724dc0a00f82d6d6f794bffcdc251ec4073df34366d467"},"metadata":{"website":"https://ripple.com/xrp/","description":"Instantly move money to all corners of the world.","links":{"x":"https://x.com/Ripple","github":"https://github.com/ripple","reddit":"https://reddit.com/r/Ripple"}},"tokens":[]},{"code":"ronin","name":"Ronin","symbol":"RON","decimals":18,"family":"evm","explorer":"https://explorer.roninchain.com","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/ronin/logo.png","checksum":"sha256:44c67ce2be41fd659376504d064f8d8140870a4d90b9835d800654f19a1bf89a"},"metadata":{"chainId":2020,"website":"https://skymavis.com","description":"Ronin unlocks explosive growth for Blockchain gaming and collectible projects."},"tokens":[{"address":"0x97a9107C1793BC407d6F527b77e7fff4D812bece","symbol":"AXS","name":"Axie Infinity Shard","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ronin/tokens/0x97a9107C1793BC407d6F527b77e7fff4D812bece/logo.png","checksum":"sha256:49404eea96f9d8fd88098dec9345d99e50b2da1706943ad1682d373a1b90a678"},"metadata":{"website":"https://axieinfinity.com","description":"Axie Infinity Shards are Axie Infinity's governance token."}},{"address":"0xa8754b9Fa15fc18BB59458815510E40a12cD2014","symbol":"SLP","name":"Smooth Love Potion","decimals":0,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/ronin/tokens/0xa8754b9Fa15fc18BB59458815510E40a12cD2014/logo.png","checksum":"sha256:331e720c19bba753268d237d52452ea6ac7c59efcc69f1b9b2bf23023c91d706"},"metadata":{"website":"https://axieinfinity.com","description":"Smooth Love Potion (SLP) is an ERC-20 token on the Axie Infinity platform that is used to breed new digital pets (Axies)."}}]},{"code":"rootstock","name":"Rootstock","symbol":"ROOTSTOCK","decimals":18,"family":"evm","explorer":"https://explorer.rootstock.io/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/rootstock/logo.png","checksum":"sha256:ff43b25179f27d5002ca4b9718699cc9a8a79411d9da6372dbc5a62d3df592d5"},"metadata":{"chainId":30,"website":"https://rootstock.io/","description":"Deploy EVM compatible smart contracts on Rootstock and leverage the security of the Bitcoin network.","links":{"x":"https://x.com/rootstock_io","telegram":"https://t.me/rskofficialcommunity"}},"tokens":[]},{"code":"scroll","name":"Scroll","symbol":"ETH","decimals":18,"family":"evm","explorer":"https://blockscout.scroll.io","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/scroll/logo.png","checksum":"sha256:9e4390dd9d318aec9ac99e7a697d685351086ce1b78c88cf55fcd5525de94f33"},"metadata":{"chainId":534352,"website":"https://scroll.io","description":"Scroll is a zkEVM-based zkRollup on Ethereum that enables native compatibility for existing Ethereum applications and tools.","links":{"x":"https://x.com/Scroll_ZKP","github":"https://github.com/scroll-tech"}},"tokens":[]},{"code":"smartbch","name":"smartBCH","symbol":"BCH","decimals":18,"family":"evm","explorer":"http://smartscan.cash/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/smartbch/logo.png","checksum":"sha256:1b49b7558e2fcbe378d8f0b2037522b0eaa0ebb42071a262548c3b9454b9a287"},"metadata":{"chainId":10000,"website":"https://smartbch.org/","description":"Smart Bitcoin Cash (smartBCH for short) is a sidechain for Bitcoin Cash and has an aim to explore new ideas and unlock possibilities. It is compatible with Ethereum's EVM and Web3 API and provides high throughput for DApps in a fast, secure, and decentralized manner.","links":{"x":"https://x.com/SmartBCH","github":"https://github.com/smartbch/smartbch","reddit":"https://reddit.com/user/SmartBCH"}},"tokens":[]},{"code":"solana","name":"Solana","symbol":"SOL","decimals":9,"family":"solana","explorer":"https://explorer.solana.com/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/solana/logo.png","checksum":"sha256:fd805829bfc0c13102a1adef141cd196954f4ee7e137d195f08e9c014593af75"},"metadata":{"website":"https://solana.com/","description":"Solana is the worlds most performant blockchain in the world at 710k transactions per second. 710k TPS is achieved by encoding the passage of time as data.","links":{"x":"https://x.com/solana","github":"https://github.com/solana-labs","reddit":"https://reddit.com/r/solana"}},"tokens":[{"address":"26f12PmBk77wQV1TzLe8XKkNBvMFggbuypxdtMLzNLzz","symbol":"ZIG","name":"ZigCoin","decimals":8,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/26f12PmBk77wQV1TzLe8XKkNBvMFggbuypxdtMLzNLzz/logo.png","checksum":"sha256:993bfaf6d21b5a50574d996d87e01ebe66e1943b0b718d66af67b2c6a0a6802a"},"metadata":{"website":"https://zignaly.com/","description":"Zignaly is a social investment platform where users can follow winning strategies and participate in their returns.","links":{"x":"https://x.com/zignaly"}}},{"address":"2Dyzu65QA9zdX1UeE7Gx71k7fiwyUK6sZdrvJ7auq5wm","symbol":"TURBO","name":"Turbo","decimals":8,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/2Dyzu65QA9zdX1UeE7Gx71k7fiwyUK6sZdrvJ7auq5wm/logo.png","checksum":"sha256:85b822ad392f21782199a05686e5d7cbfaba80c8357825ad66b8f1adbbb6cad7"},"metadata":{"website":"https://sites.google.com/view/turbotoad","description":"Turbo Token is a revolutionary meme coin featuring our futuristic toad mascot.","links":{"x":"https://x.com/TurboToadToken","discord":"https://discord.com/FYdKKmV3CU"}}},{"address":"2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo","symbol":"PYUSD","name":"PayPal USD","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo/logo.png","checksum":"sha256:ab15a000ff083943901de2a9d2cb0cc05424c4ddeacda7271bdc210dce464e6e"},"metadata":{"website":"https://www.paypal.com/us/digital-wallet/manage-money/crypto/pyusd","description":"PayPal USD is designed to contribute to the opportunity stablecoins offer for payments and is 100% backed by U.S. dollar deposits, short-term U.S Treasuries and similar cash equivalents.","links":{"x":"https://x.com/PayPal"}}},{"address":"2qEHjDLDLbuBgRYvsxhc5D6uDWAivNFZGan56P1tpump","symbol":"Pnut","name":"Peanut the Squirrel","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/2qEHjDLDLbuBgRYvsxhc5D6uDWAivNFZGan56P1tpump/logo.png","checksum":"sha256:af267e994f907ebbdc932b5303b1c23c681a8d7beb6317a7efc0e3466ccf569b"},"metadata":{"website":"https://www.pnutsol.com/","description":"PEANUT FOREVER. #JusticeForPeanut. Peanut the Squirrel is a meme coin on Solana.","links":{"x":"https://x.com/pnutsolana","telegram":"https://t.me/pnutportal"}}},{"address":"2u1tszSeqZ3qBWF3uNGPFc8TzMk2tdiwknnRMWGWjGWH","symbol":"USDG","name":"Global Dollar","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/2u1tszSeqZ3qBWF3uNGPFc8TzMk2tdiwknnRMWGWjGWH/logo.png","checksum":"sha256:79b06101392560f0117201d51fcb89a62ffdfc88b42427b12311fc00d32af935"},"metadata":{"website":"https://globaldollar.com/","description":"Global Dollar (USDG) is a single-currency stablecoin pegged to the US dollar, issued by Paxos Digital Singapore Pte. Ltd. and is compliant with the Monetary Authority of Singapore's (MAS) forthcoming stablecoin framework. USDG is redeemable from Paxos on a one-to-one basis for US dollars.","links":{"x":"https://x.com/ondofinance"}}},{"address":"2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv","symbol":"PENGU","name":"Pudgy Penguins","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv/logo.png","checksum":"sha256:cd1acb7a0df6a024e53dae4788572314589cf7d1ac4f79e904ee8db9967c515f"},"metadata":{"website":"https://www.pudgypenguins.com","description":"Pudgy Penguins has become the face of crypto with one of the most influential communities in the industry. From large companies wearing the Penguin, to being featured in ETF commercials, to garnering millions of followers and over 50 billion views, the Pengu has become a cultural icon.","links":{"x":"https://x.com/pudgypenguins"}}},{"address":"3KzAE8dPyJRgZ36Eh81v7WPwi6dm7bDhdMb8EAus2RAf","symbol":"GOMINING","name":"GoMining","decimals":9,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/3KzAE8dPyJRgZ36Eh81v7WPwi6dm7bDhdMb8EAus2RAf/logo.png","checksum":"sha256:042206e69422dc3ed86d5e35a5779cbe0818fa765f12ee3467ea7c0de5ee6ae4"},"metadata":{"website":"https://gomining.com/","description":"Gomining is an exchange token backed by a Top 10 global bitcoin mining project.","links":{"x":"https://x.com/GMT_Token","telegram":"https://t.me/gmt_token_talk","reddit":"https://reddit.com/user/GoMiningToken"}}},{"address":"3dQTr7ror2QPKQ3GbBCokJUmjErGg8kTJzdnYjNfvi3Z","symbol":"BORG","name":"SwissBorg Token","decimals":9,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/3dQTr7ror2QPKQ3GbBCokJUmjErGg8kTJzdnYjNfvi3Z/logo.png","checksum":"sha256:dc590dadba53d99ff7d0c8ca94ef841ad1531d0b93fcbc7de649cc534c8efe44"},"metadata":{"website":"https://swissborg.com/","description":"SwissBorg is an all-encompassing crypto management app designed to offer services such as exchanging crypto and fiat, earning yield, and accessing launchpad investment opportunities. Established during the ICO era of 2017, it has amassed over 1 million registered users by 2024. The BORG is the token powering this revolutionary financial ecosystem.","links":{"x":"https://x.com/swissborg"}}},{"address":"4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R","symbol":"RAY","name":"Raydium","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R/logo.png","checksum":"sha256:b4d831034ed939c6e933210956af14d736b21f18bfff93f4993d43e5050432af"},"metadata":{"website":"https://raydium.io/","description":"Raydium is an on-chain order book automated market maker (AMM) that enables lightning-fast trades, shared liquidity and new features for earning yield.","links":{"x":"https://x.com/RaydiumProtocol","telegram":"https://t.me/raydiumprotocol","discord":"https://discord.com/invite/6EvFwvCfpx"}}},{"address":"61V8vBaqAGMpgDQi4JcAwo1dmBGHsyhzodcPqnEVpump","symbol":"arc","name":"AI Rig Complex","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/61V8vBaqAGMpgDQi4JcAwo1dmBGHsyhzodcPqnEVpump/logo.png","checksum":"sha256:6504153ee3bcd42d0714df9c8a0395a14bd367dbcfd572bb5847a0a6232bfccb"},"metadata":{"website":"https://www.arc.fun/index.html","description":"we take the red pill then the blue pill","links":{"x":"https://x.com/arcdotfun"}}},{"address":"6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN","symbol":"TRUMP","name":"OFFICIAL TRUMP","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN/logo.png","checksum":"sha256:3b410d4af7415fa18949ae60ca994cfb30f46cdc52a5a2d0db284ce14b33d896"},"metadata":{"website":"https://gettrumpmemes.com/","description":"$TRUMP are now freely tradeable on the blockchain.","links":{"x":"https://x.com/GetTrumpMemes"}}},{"address":"7GCihgDB8fe6KNjn2MYtkzZcRjQy3t9GHdC8uHYmW2hr","symbol":"POPCAT","name":"POPCAT","decimals":9,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/7GCihgDB8fe6KNjn2MYtkzZcRjQy3t9GHdC8uHYmW2hr/logo.png","checksum":"sha256:4af206d0c4a7b4a87aa18812520362451acae491ffc2b4d8e6db00388b44d472"},"metadata":{"website":"https://www.popcatsolana.xyz/","description":"Popcat is an Internet meme originating in October 2020, in a series of videos which showcase two images of a domestic short-haired cat named 'Oatmeal'","links":{"x":"https://x.com/popcatsolana"}}},{"address":"7JA5eZdCzztSfQbJvS8aVVxMFfd81Rs9VvwnocV1mKHu","symbol":"GEOD","name":"Geodnet","decimals":9,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/7JA5eZdCzztSfQbJvS8aVVxMFfd81Rs9VvwnocV1mKHu/logo.png","checksum":"sha256:39527be26323454da2c372bc2f126ea016571a30629a6239ea23898213c1340f"},"metadata":{"website":"https://www.geodnet.com","description":"Join the world’s largest Web3 blockchain-based precise positioning network. Contribute RTK data to power robotics and earn GEOD tokens","links":{"x":"https://x.com/GEODNET_"}}},{"address":"7dUKUopcNWW6CcU4eRxCHh1uiMh32zDrmGf6ufqhxann","symbol":"BabyDoge","name":"Baby Doge Coin","decimals":1,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/7dUKUopcNWW6CcU4eRxCHh1uiMh32zDrmGf6ufqhxann/logo.png","checksum":"sha256:e4876ae814a8dbb1b74d8582624dac4d082bccd2d357dd41b2cc4753026e2135"},"metadata":{"website":"https://babydoge.com","description":"BabyDoge is the leading community meme coin on the BNB chain. Baby Doge was created initially as a joke with a mission to help spread awareness of animal adoption.","links":{"x":"https://x.com/babydogecoin"}}},{"address":"85VBFQZC9TZkfaptBWjvUw7YbZjy52A6mjtPGjstQAmQ","symbol":"W","name":"Wormhole","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/85VBFQZC9TZkfaptBWjvUw7YbZjy52A6mjtPGjstQAmQ/logo.png","checksum":"sha256:3a4cc9be4a9d55db978b36f9929e36b8b91350c638fff16dbd89ab3c188d6a9b"},"metadata":{"website":"https://wormhole.com","description":"Wormhole is the leading interoperability platform that powers multichain applications and bridges at scale.","links":{"x":"https://x.com/wormhole"}}},{"address":"9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump","symbol":"Fartcoin","name":"Fartcoin","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump/logo.png","checksum":"sha256:2099db7967223510f7378911e5b8f53d26299cc0f157f10d7612687bd0488656"},"metadata":{"website":"https://www.infinitebackrooms.com/dreams/conversation-1721540624-scenario-terminal-of-truths-txt","description":"Tokenising farts with the help of bots. No TG, no cabal, fart freely!","links":{"x":"https://x.com/FartCoinOfSOL"}}},{"address":"9PR7nCP9DpcUotnDPVLUBUZKu5WAYkwrCUx9wDnSpump","symbol":"Ban","name":"Comedian","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/9PR7nCP9DpcUotnDPVLUBUZKu5WAYkwrCUx9wDnSpump/logo.png","checksum":"sha256:572d8845e581354a065136c85a3a3cf4c1f99549b23690722ea628fa4ae8b0c8"},"metadata":{"website":"https://banart.art/pc/index.html","description":"The emergence of Comedian as a cryptocurrency taps into a unique blend of irony and commentary.","links":{"x":"https://x.com/ban_comedian"}}},{"address":"A1KLoBrKBde8Ty9qtNQUtq3C2ortoC3u7twggz7sEto6","symbol":"USDY","name":"Ondo U.S. Dollar Yield","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/A1KLoBrKBde8Ty9qtNQUtq3C2ortoC3u7twggz7sEto6/logo.png","checksum":"sha256:c92e519c23b9e966a013d4c82171279930bc61d23a8d1960bbb4feed29095d90"},"metadata":{"website":"https://ondo.finance/","description":"Ondo US Dollar Yield (USDY) is a decentralized lending protocol designed to honor transfer restrictions from permissioned tokens, thereby expanding the universe of assets it can support. This unique approach allows it to cater to a broader range of financial instruments, making it a versatile player in the blockchain ecosystem.","links":{"x":"https://x.com/ondofinance"}}},{"address":"BZLbGTNCSFfoth2GYDtwr7e4imWzpR5jqcUuGEwr646K","symbol":"IO","name":"IO","decimals":8,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/BZLbGTNCSFfoth2GYDtwr7e4imWzpR5jqcUuGEwr646K/logo.png","checksum":"sha256:6d6c7c3dd9259aa24d3b8ab3047e4f2633c98b7c42a91ef2be2db4602216d3fd"},"metadata":{"website":"https://io.net/","description":"io.net the world’s largest decentralized AI computing network that allows machine learning engineers to access scalable distributed clusters at a small fraction of the cost of comparable centralized services.","links":{"x":"https://x.com/ionet","telegram":"https://t.me/io_net"}}},{"address":"ChVzxWRmrTeSgwd3Ui3UumcN8KX7VK3WaD4KGeSKpypj","symbol":"SUSHI","name":"SushiToken (Portal)","decimals":8,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/ChVzxWRmrTeSgwd3Ui3UumcN8KX7VK3WaD4KGeSKpypj/logo.png","checksum":"sha256:aa3aaa22ce3a0edb8d4c51680f1fca3b3b72e9f0e488247bf983f888ed1881eb"},"metadata":{"website":"https://sushi.com/","description":"Cross Chain Portal Bridged Token"}},{"address":"CreiuhfwdWCN5mJbMJtA9bBpYQrQF2tCBuZwSPWfpump","symbol":"PYTHIA","name":"PYTHIA","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/CreiuhfwdWCN5mJbMJtA9bBpYQrQF2tCBuZwSPWfpump/logo.png","checksum":"sha256:e344039a1ef70ca8516eb3b401979311fafdec2439350bcf2b4172c16c23a4b6"},"metadata":{"website":"https://ratpythia.ai/","description":"I’m Pythia, the first AI-brain-linked rat","links":{"x":"https://x.com/neirylab"}}},{"address":"DBRiDgJAMsM95moTzJs7M9LnkGErpbv9v6CUR1DXnUu5","symbol":"DBR","name":"deBridge","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/DBRiDgJAMsM95moTzJs7M9LnkGErpbv9v6CUR1DXnUu5/logo.png","checksum":"sha256:ce754f00b0f1ab3e3609f293b02af2c15773494ab2f3387d898fffb3e37f61ce"},"metadata":{"website":"https://debridge.finance/","description":"deBridge is DeFi's internet of liquidity, enabling real-time movement of assets and information across the DeFi landscape.","links":{"x":"https://x.com/deBridgeFinance"}}},{"address":"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263","symbol":"Bonk","name":"Bonk","decimals":5,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263/logo.png","checksum":"sha256:becf116743b1059b5689212894d6f2098dda6d0f92654b93ff1c3abe211cfedb"},"metadata":{"website":"https://www.bonkcoin.com","description":"Bonk is the first Solana dog coin for the people, by the people with 50% of the total supply airdropped to the Solana community. The Bonk contributors were tired of toxic “Alameda” tokenomics and wanted to make a fun memecoin where everyone gets a fair shot.","links":{"x":"https://x.com/bonk_inu"}}},{"address":"ED5nyyWEzpPPiWimP8vYm7sD7TD3LAt3Q3gRTWHzPJBY","symbol":"MOODENG","name":"Moo Deng","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/ED5nyyWEzpPPiWimP8vYm7sD7TD3LAt3Q3gRTWHzPJBY/logo.png","checksum":"sha256:3b419fdeb07c817d3d2b200d6c644520144580ed6e6b277d0da3258475a6e98f"},"metadata":{"website":"https://www.moodengsol.com/","description":"An unofficial fan page / memecoin of Moo Deng on Solana","links":{"x":"https://x.com/ai16zeliza","telegram":"https://t.me/+hCTQLf149JNlZjgx"}}},{"address":"EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm","symbol":"WIF","name":"dogwifhat","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm/logo.png","checksum":"sha256:5d1f50a663c188db76b2c3340986de3e8b47834c34b85e0bef3b551fe19a2de7"},"metadata":{"website":"https://dogwifcoin.org","description":"The live dogwifhat price today is $0.239284 USD with a 24-hour trading volume of $32,653,726 USD.","links":{"x":"https://x.com/dogwifcoin"}}},{"address":"EPeUFDgHRxs9xxEPVaL6kfGQvCon7jmAWKVUHuux1Tpz","symbol":"BAT","name":"Basic Attention Token (Portal)","decimals":8,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/EPeUFDgHRxs9xxEPVaL6kfGQvCon7jmAWKVUHuux1Tpz/logo.png","checksum":"sha256:6c20dfd3e4fa52b97df1db1005fa14f5c533c2c2b6256b07c7ea9e4fd46fe212"},"metadata":{"website":"https://basicattentiontoken.org/","description":"Cross Chain Portal Bridged Token"}},{"address":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","symbol":"USDC","name":"USD Coin","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v/logo.png","checksum":"sha256:2afd598ddc705065edb385f429ca102efe71c0865d64e9d83a18b4cc26b78cfc"},"metadata":{"website":"https://www.centre.io/usdc","description":"USDC is a fully collateralized US dollar stablecoin, an Ethereum powered coin and is the brainchild of CENTRE, an open source project bootstrapped by contributions from Circle and Coinbase.","links":{"x":"https://x.com/solanabeach_io","telegram":"https://t.me/stakingfacilities"}}},{"address":"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB","symbol":"USDT","name":"Tether USDT","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB/logo.png","checksum":"sha256:032f5190a9066fce37aad7bc7da4752bb420837623692e1981ca45ecc7b167fd"},"metadata":{"website":"https://tether.to","description":"Tether gives you the joint benefits of open blockchain technology and traditional currency by converting your cash into a stable digital currency equivalent.","links":{"x":"https://x.com/Tether_to/","telegram":"https://t.me/OfficialTether"}}},{"address":"FUAfBo2jgks6gB4Z4LfZkqSZgzNucisEHqnNebaRxM1P","symbol":"MELANIA","name":"Melania Meme","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/FUAfBo2jgks6gB4Z4LfZkqSZgzNucisEHqnNebaRxM1P/logo.png","checksum":"sha256:a7216774a1d253be9e3fca9b3a4a3f02e1cbfffa58a06c669fe7ae085322ce79"},"metadata":{"website":"https://melaniameme.com","description":"Melania memes are digital collectibles intended to function as an expression of support for and engagement with the values embodied by the symbol MELANIA. and the associated artwork, and are not intended to be, or to be the subject of, an investment opportunity, investment contract, or security of any type.","links":{"x":"https://x.com/MELANIATRUMP"}}},{"address":"FeR8VBqNRSUD5NtXAj2n3j1dAHkZHfyDktKuLXD4pump","symbol":"jellyjelly","name":"jelly-my-jelly","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/FeR8VBqNRSUD5NtXAj2n3j1dAHkZHfyDktKuLXD4pump/logo.png","checksum":"sha256:cecaed537745ec92b1aadeca423340e7bb4364d623cc6d0ea0bb7c015f9a0070"},"metadata":{"website":"https://www.jellyjelly.com","description":"The fastest way to post clips from a video chat"}},{"address":"Grass7B4RdKfBCjTKgSqnXkqjwiGvQyFbuSCUJr3XXjs","symbol":"Grass","name":"Grass","decimals":9,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/Grass7B4RdKfBCjTKgSqnXkqjwiGvQyFbuSCUJr3XXjs/logo.png","checksum":"sha256:4383a6b4e033f4603f79f1b3e3dcf7612a408042829f55fcd7657049b3157bcb"},"metadata":{"website":"https://www.getgrass.io/","description":"Grass is building the first open internet scale web crawl. Today, the network is powered by over 3 million users who are running nodes to scrape petabytes of data for AI models.","links":{"x":"https://x.com/getgrass_io"}}},{"address":"HNg5PYJmtqcmzXrv6S9zP1CDKk5BgDuyFBxbvNApump","symbol":"ALCH","name":"Alchemist AI","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/HNg5PYJmtqcmzXrv6S9zP1CDKk5BgDuyFBxbvNApump/logo.png","checksum":"sha256:ba6b447b6ec1d27092c95e63be38623716970b69c67de24c378e2df36a770ff8"},"metadata":{"website":"https://www.alchemistai.app/","description":"Alchemist AI is a no-code development platform where users can manifest any idea, dream, or thoughts into a living application.","links":{"x":"https://x.com/alchemistAIapp"}}},{"address":"HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3","symbol":"PYTH","name":"Pyth Network","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3/logo.png","checksum":"sha256:cdccd32fb4d6b62780bca44143b19cc14f8b44b77deada10d6d695568276f5de"},"metadata":{"website":"https://pyth.network","description":"The Pyth Network is the largest and fastest-growing first-party oracle network. Pyth delivers real-time market data to financial dApps across 40+ blockchains and provides 380+ low-latency price feeds across cryptocurrencies, equities, ETFs, FX pairs, and commodities.","links":{"x":"https://x.com/PythNetwork","telegram":"https://t.me/Pyth_Network"}}},{"address":"J1Wpmugrooj1yMyQKrdZ2vwRXG5rhfx3vTnYE39gpump","symbol":"WOULD","name":"would","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/J1Wpmugrooj1yMyQKrdZ2vwRXG5rhfx3vTnYE39gpump/logo.png","checksum":"sha256:422ab2a8edb799c442d6871faa997143bbbc3a96f417707fd59e88ee74d3de6e"},"metadata":{"website":"https://www.wouldmeme.com/","description":"The Would meme, emerging in September 2022, represents a significant moment in internet culture through its simple yet effective format","links":{"x":"https://x.com/wouldmemesol"}}},{"address":"J3NKxxXZcnNiMjKw9hYb2K4LUxgwB6t1FtPtQVsv3KFr","symbol":"SPX","name":"SPX6900","decimals":8,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/J3NKxxXZcnNiMjKw9hYb2K4LUxgwB6t1FtPtQVsv3KFr/logo.png","checksum":"sha256:7a2feb9f46e1f547f4ff7f9aa7ab5880cd1f7203557bf4732ce537dd57ade67b"},"metadata":{"website":"https://www.spx6900.com/","description":"SPX6900 is an advanced blockchain cryptography token with limitless possibilities and scientific utilization.","links":{"x":"https://x.com/spx6900"}}},{"address":"JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN","symbol":"JUP","name":"Jupiter","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN/logo.png","checksum":"sha256:e1fb74fab6e55067a55ff1d81d2be423021b79d2ae897d974dcb1c292ea51a1c"},"metadata":{"website":"https://jup.ag/","description":"As one of the industry's most advanced swap aggregation engines, Jupiter excels in delivering essential liquidity infrastructure for the Solana ecosystem.","links":{"x":"https://x.com/JupiterExchange"}}},{"address":"KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS","symbol":"KMNO","name":"Kamino","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS/logo.png","checksum":"sha256:628ad7a05871e9117c69bdc3cb4983a217dc8b96cc08a6b1f9ea8286a5d414fb"},"metadata":{"website":"https://app.kamino.finance/","description":"Kamino Finance was originally created to offer users the easiest possible way of providing liquidity and earning yield on-chain.","links":{"x":"https://x.com/KaminoFinancen"}}},{"address":"MEFNBXixkEbait3xn9bkm8WsJzXtVsaJEn4c8Sam21u","symbol":"ME","name":"Magic Eden","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/MEFNBXixkEbait3xn9bkm8WsJzXtVsaJEn4c8Sam21u/logo.png","checksum":"sha256:34732ba92268e88b110a069b6ec13ba1d7f82e9a1af504513304ed9345bbb160"},"metadata":{"website":"https://magiceden.io/","description":"$ME is powering the onchain economy and represents the most powerful suite of cross chain trading, minting, and wallet protocols.","links":{"x":"https://x.com/MagicEden"}}},{"address":"MEW1gQWJ3nEXg2qgERiKu7FAFj79PHvQVREQUzScPP5","symbol":"MEW","name":"cat in a dogs world","decimals":5,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/MEW1gQWJ3nEXg2qgERiKu7FAFj79PHvQVREQUzScPP5/logo.png","checksum":"sha256:312ff670024d53940c32c0429d5978a336406c0b2190e266f9dde26be11f0644"},"metadata":{"website":"https://mew.xyz","description":"Mew is a cat in a dogs world out to save the world from other dog coins.","links":{"x":"https://x.com/ClearpoolFin"}}},{"address":"USD1ttGY1N17NEEHLmELoaybftRBUSErhqYiQzvEmuB","symbol":"USD1","name":"World Liberty Financial USD","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/USD1ttGY1N17NEEHLmELoaybftRBUSErhqYiQzvEmuB/logo.png","checksum":"sha256:226ce53d1fccec27a3c062bc1849ff62e4f7280f46fbf6f62a3c16872a1081fb"},"metadata":{"website":"https://www.worldlibertyfinancial.com/","description":"A stablecoin by World Liberty Financial, redeemable 1:1 for the US dollar and backed by U.S. treasuries, dollar deposits, and other cash equivalents."}},{"address":"Xs78JED6PFZxWc2wCEPspZW9kL3Se5J7L5TChKgsidH","symbol":"STRCx","name":"Strategy PP Variable xStock","decimals":8,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/Xs78JED6PFZxWc2wCEPspZW9kL3Se5J7L5TChKgsidH/logo.png","checksum":"sha256:323cc945178d4e1e279c9f42bb41b8cb1746924e5834008843d140d7da5be548"},"metadata":{"website":"https://assets.backed.fi/products","description":"Strategy PP Variable xStock"}},{"address":"XsDoVfqeBukxuZHWhdvWHBhgEHjGNst4MLodqsJHzoB","symbol":"TSLAX","name":"Tesla tokenized stock (xStock)","decimals":8,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/XsDoVfqeBukxuZHWhdvWHBhgEHjGNst4MLodqsJHzoB/logo.png","checksum":"sha256:7067e84db7a7af0f9ccdc7e146fa22c004b0a73f91cb59ac1255a53dd541004b"},"metadata":{"website":"https://assets.backed.fi/products","description":"Tesla tokenized stock (xStock) (TSLAX) is a cryptocurrency and operates on the Solana platform. Tesla tokenized stock (xStock) has a current supply of 50,998.28909342 with 10,999.28657402 in circulation. The last known price of Tesla tokenized stock (xStock) is 417.05893204 USD and is down -0.76 over the last 24 hours. It is currently trading on 44 active market(s) with $21,478,606.39 traded over the last 24 hours. More information can be found at https://assets.backed.fi/products/tesla-xstock.","links":{"x":"https://x.com/xstocksfi"}}},{"address":"XsueG8BtpquVJX9LVLLEGuViXUungE6WmK5YZ3p3bd1","symbol":"CRCLX","name":"Circle tokenized stock (xStock)","decimals":8,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/XsueG8BtpquVJX9LVLLEGuViXUungE6WmK5YZ3p3bd1/logo.png","checksum":"sha256:59553d7740c22356ff64f3f9293b9c1bfd95f75a9ec52cb573c8d3c5738bb615"},"metadata":{"website":"https://assets.backed.fi/products","description":"Circle tokenized stock (xStock) (CRCLX) is a cryptocurrency and operates on the Solana platform. Circle tokenized stock (xStock) has a current supply of 49,998.60984587. The last known price of Circle tokenized stock (xStock) is 134.16292538 USD and is up 4.96 over the last 24 hours. It is currently trading on 44 active market(s) with $8,141,888.27 traded over the last 24 hours. More information can be found at https://assets.backed.fi/products/circle-xstock.","links":{"x":"https://x.com/xstocksfi"}}},{"address":"ZBCNpuD7YMXzTHB2fhGkGi78MNsHGLRXUhRewNRm9RU","symbol":"ZBCN","name":"Zebec","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/ZBCNpuD7YMXzTHB2fhGkGi78MNsHGLRXUhRewNRm9RU/logo.png","checksum":"sha256:916a3007c5aed04e3a8944c5d77296f1825fc7d14fedab6b34317e78ed62edf0"},"metadata":{"website":"https://www.zebec.io","description":"Zebec is a decentralized infrastructure network for real world value flows. Founded in 2021, Zebec has attracted $35 million in investments by Circle, Coinbase, Solana Ventures, Breyer Capital, Republic, and Lightspeed Venture Partners, among others.","links":{"x":"https://x.com/Zebec_HQ"}}},{"address":"bioJ9JTqW62MLz7UKHU69gtKhPpGi1BQhccj2kmSvUJ","symbol":"BIO","name":"BIO","decimals":9,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/bioJ9JTqW62MLz7UKHU69gtKhPpGi1BQhccj2kmSvUJ/logo.png","checksum":"sha256:48d00a6edafbcbf5663c3f4848fd8a402a10ff19ff5dea5fdd216156436ccb92"},"metadata":{"website":"https://www.bio.xyz/","description":"BIO Protocol enables global communities of scientists, patients, and investors to collectively fund, develop, and co-own new drugs and therapeutics through its network of Biotech Decentralized Autonomous Organizations (BioDAOs).","links":{"x":"https://x.com/bioprotocol"}}},{"address":"hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux","symbol":"HNT","name":"Helium Network","decimals":8,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux/logo.png","checksum":"sha256:7fcb33e86bf4e7fb023a60cf2d10d7f3fbb3a8ca560eace9cb767ac6e116eee3"},"metadata":{"website":"https://www.helium.com","description":"Helium (HNT) is a decentralized blockchain-powered network for Internet of Things (IoT) devices.","links":{"x":"https://x.com/helium"}}},{"address":"jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL","symbol":"JTO","name":"JITO","decimals":9,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL/logo.png","checksum":"sha256:bcae8c986fd17bdc7135d35b3b58ef86de8d914e83ea92b9058f69db31e87fe3"},"metadata":{"website":"https://www.jito.network/","description":"Jito Network is a major contributor to the Solana ecosystem through its JitoSOL liquid staking pool, and its collection of MEV products.","links":{"x":"https://x.com/jito_sol","telegram":"https://t.me/+csIgnEQMCHhiYjVh","discord":"https://discord.com/invite/jito"}}},{"address":"orcaEKTdK7LKz57vaAYr9QeNsVEPfiu6QeMU1kektZE","symbol":"ORCA","name":"Orca","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/orcaEKTdK7LKz57vaAYr9QeNsVEPfiu6QeMU1kektZE/logo.png","checksum":"sha256:d41e0a3d1583fc87c75a3763cb8c8a1bf4a7a7279745e1829eba837545a6c94e"},"metadata":{"website":"https://orca.so/","description":"Orca is the easiest place to exchange cryptocurrency on Solana.","links":{"x":"https://x.com/orca_so"}}},{"address":"pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn","symbol":"PUMP","name":"Pump","decimals":6,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn/logo.png","checksum":"sha256:2c0c1ea48dd9f844da052679d30467b7cca7669107b52024a50f18dff8312db4"},"metadata":{"website":"https://pump.fun/","description":"The PUMP crypto-asset is the official utility coin of the pump.fun utility coin launch platform and the swap.pump.fun automated market maker (AMM) protocol (together, the \\"Pump.Fun Protocols\\"). The PUMP crypto-asset will not be required in order to utilize the Pump.Fun Protocols, which remain permissionless. Holders of the PUMP crypto-asset may opt to participate in promotional give aways from the Pump.Fun Protocols. The PUMP crypto-asset is a utility coin that will be used alongside the pump.fun brand behind the Pump.Fun Protocols.","links":{"x":"https://x.com/pumpdotfun"}}},{"address":"rndrizKT3MK1iimdxRdWabcF7Zg7AR5T4nud4EkHBof","symbol":"RNDR","name":"Render Token","decimals":8,"type":"SPL","status":"active","logo":{"url":"https://chain-assets.lydian.com/solana/tokens/rndrizKT3MK1iimdxRdWabcF7Zg7AR5T4nud4EkHBof/logo.png","checksum":"sha256:c3e2da7f16c5551914bea876974e7e21726828f6095989710622c9c004ba969e"},"metadata":{"website":"https://rendertoken.com/","description":"Distributed GPU rendering on the blockchain.","links":{"x":"https://x.com/rendernetwork","telegram":"https://t.me/rendernetwork"}}}]},{"code":"sonic","name":"Sonic","symbol":"S","decimals":18,"family":"evm","explorer":"https://sonicscan.org/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/sonic/logo.png","checksum":"sha256:a591f2352d528601a22dd7255ed77db1068dbdfe20ff02e6e9c431353e1205e6"},"metadata":{"chainId":146,"website":"https://www.soniclabs.com/","description":"Sonic is the highest-performing EVM L1","links":{"x":"https://x.com/SonicLabs","telegram":"https://t.me/Sonic_English","discord":"https://discord.com/3Ynr2QDSnB","reddit":"https://reddit.com/r/0xSonic/"}},"tokens":[{"address":"0x29219dd400f2Bf60E5a23d13Be72B486D4038894","symbol":"USDC.e","name":"Bridged USDC (Sonic Labs)","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/sonic/tokens/0x29219dd400f2Bf60E5a23d13Be72B486D4038894/logo.png","checksum":"sha256:969422e0f918b8b3ff8fd72c308499d462c6634341966c2e25ec775a5aef7ed0"},"metadata":{"website":"https://www.circle.com/en/usdc","description":"USDC is a US dollar-backed stablecoin issued by Circle. USDC is designed to provide a faster, safer, and more efficient way to send, spend, and exchange money around the world.","links":{"x":"https://x.com/circle"}}},{"address":"0x80Eede496655FB9047dd39d9f418d5483ED600df","symbol":"frxUSD","name":"Frax USD","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/sonic/tokens/0x80Eede496655FB9047dd39d9f418d5483ED600df/logo.png","checksum":"sha256:4e6e4ec0a59416415ee0e0c717096ee7ab546ae56f607acfdbfe48968e488448"},"metadata":{"website":"https://frax.com","description":"Fraxtal is a blockchain optimized for extreme performance, next-to-nothing transaction fees, and Ethereum-level security","links":{"x":"https://x.com/fraxfinance"}}},{"address":"0xf1eF7d2D4C0c881cd634481e0586ed5d2871A74B","symbol":"PENDLE","name":"Pendle","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/sonic/tokens/0xf1eF7d2D4C0c881cd634481e0586ed5d2871A74B/logo.png","checksum":"sha256:fddda44780e0015b1b3ce0c511053bf04ea04dd7b92c52fa09ef72bb71473246"},"metadata":{"website":"https://pendle.finance/","description":"Pendle is essentially a protocol for tokenizing yield and an AMM for trading tokenized yield and other time-decaying assets.","links":{"x":"https://x.com/pendle_fi"}}}]},{"code":"stellar","name":"Stellar","symbol":"XLM","decimals":7,"family":"stellar","explorer":"https://dashboard.stellar.org/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/stellar/logo.png","checksum":"sha256:cbe5091d17aac7eda3ef9b7712d2025e634f29e20b76c8a25598ebd7d606f3f3"},"metadata":{"website":"https://stellar.org","description":"Stellar is an open platform for building financial products. It enables near instant payments, with almost zero fees, and a smart contract platform to create digital asset economy.","links":{"x":"https://x.com/StellarOrg","github":"https://github.com/stellar","reddit":"https://reddit.com/r/stellar"}},"tokens":[]},{"code":"sui","name":"Sui","symbol":"SUI","decimals":9,"family":"sui","explorer":"https://explorer.sui.io/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/sui/logo.png","checksum":"sha256:76adb670502a1ddc2931c8c32e1dd685fbe3bc453b3ea39b3230ed884eef66ae"},"metadata":{"website":"https://sui.io/","description":"Sui is a boundless platform to build rich and dynamic on-chain assets from gaming to finance.","links":{"x":"https://x.com/SuiNetwork","discord":"https://discord.com/invite/suiglobal","github":"https://github.com/MystenLabs/sui"}},"tokens":[{"address":"0x35169bc93e1fddfcf3a82a9eae726d349689ed59e4b065369af8789fe59f8608::mmt::MMT","symbol":"MMT","name":"Momentum","decimals":9,"type":"SUI","status":"active","logo":{"url":"https://chain-assets.lydian.com/sui/tokens/0x35169bc93e1fddfcf3a82a9eae726d349689ed59e4b065369af8789fe59f8608::mmt::MMT/logo.png","checksum":"sha256:c1ca08b57108ef64d5d46f9891760ef187f73d31d74d7133421da8a4d56d1bcf"},"metadata":{"website":"https://www.mmt.finance/","description":"Momentum is the Global Financial Operating System for the Tokenised Future, built on the Move language and powered by the ve(3,3) governance model.","links":{"x":"https://x.com/MMTFinance"}}},{"address":"0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC","symbol":"USDC","name":"USDC","decimals":6,"type":"SUI","status":"active","logo":{"url":"https://chain-assets.lydian.com/sui/tokens/0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC/logo.png","checksum":"sha256:ee0ce597a62d84363dc3ce7863f865290b9f6dc61139b087ff1b5937e669fd47"},"metadata":{"website":"https://www.circle.com/en/multi-chain-usdc","description":"USDC is a US dollar-backed stablecoin issued by Circle. USDC is designed to provide a faster, safer, and more efficient way to send, spend, and exchange money around the world.","links":{"x":"https://x.com/circle"}}},{"address":"0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP","symbol":"DEEP","name":"DeepBook","decimals":6,"type":"SUI","status":"active","logo":{"url":"https://chain-assets.lydian.com/sui/tokens/0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP/logo.png","checksum":"sha256:4762b9ed7df66457b9a220b0807ef429a3328de1ae30a345563df5b7ef1a8e30"},"metadata":{"website":"https://deepbook.tech/","description":"DeepBook is a decentralized central limit order book (CLOB) built on Sui. DeepBook leverages Sui's parallel execution and low transaction fees to bring a highly performant, low-latency exchange on chain.","links":{"x":"https://x.com/DeepBookonSui","discord":"https://discord.com/invite/deepbook"}}}]},{"code":"syscoin","name":"Syscoin","symbol":"SYS","decimals":8,"family":"evm","explorer":"https://explorer.syscoin.org","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/syscoin/logo.png","checksum":"sha256:7ef726086cc0ff5ec5a22e5fb71b94e04b16274765599e15a309db3620a32926"},"metadata":{"chainId":57,"website":"http://syscoin.org/","description":"Syscoin is designed to support the future of smart contracts within Metaverse, IoT, Smart Cities, and future interplanetary economies.","links":{"x":"https://x.com/syscoin"}},"tokens":[]},{"code":"tezos","name":"Tezos","symbol":"XTZ","decimals":6,"family":"tezos","explorer":"https://tezos.id","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/tezos/logo.png","checksum":"sha256:e5243983f69835ec08ed9ba9ed65cbd5761df270e5aa7162826f0b29b01bd934"},"metadata":{"website":"https://tezos.com/","description":"Tezos is a smart contract platform that uses blockchain voting to be self-governing by its token holders. Also, the platform aims to boost the security of smart contracts.","links":{"x":"https://x.com/tezos","reddit":"https://reddit.com/r/tezos"}},"tokens":[]},{"code":"theta","name":"THETA","symbol":"THETA","decimals":18,"family":"evm","explorer":"https://explorer.thetatoken.org","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/theta/logo.png","checksum":"sha256:f980ea5a7838f71abb4f6877e5cbd7ffa6e880567250b1bc8f151f0c602c678e"},"metadata":{"chainId":361,"website":"https://thetatoken.org","description":"Theta is a decentralized video delivery network, powered by users and an innovative new blockchain.","links":{"x":"https://x.com/Theta_Network","github":"https://github.com/thetatoken","reddit":"https://reddit.com/r/theta_network"}},"tokens":[]},{"code":"tomochain","name":"Viction","symbol":"VIC","decimals":18,"family":"evm","explorer":"https://scan.tomochain.com","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/tomochain/logo.png","checksum":"sha256:878e39a6f46a793a997435a3364dd662bbe99bb24c42b763cd5f581376f185ac"},"metadata":{"chainId":88,"website":"https://viction.xyz/","description":"Viction (VIC) is a people-centric layer-1 blockchain that provides zero-gas transactions and heightened security, making Web3 accessible and safe for everyone.","links":{"x":"https://x.com/BuildOnViction","telegram":"https://t.me/buildonviction","github":"https://github.com/tomochain"}},"tokens":[]},{"code":"ton","name":"The Open Network","symbol":"TON","decimals":9,"family":"ton","explorer":"https://tonscan.org/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/ton/logo.png","checksum":"sha256:25fefc1d2b60ee529b1f939029ad3d789c6068212ed345c6aef9247e04ae692b"},"metadata":{"website":"https://ton.org","description":"The Open Network is a blockchain-based decentralized computer network. TON is designed to enable processing millions of transactions per second via infinite sharding paradigm. It allows building Web 3.0 empowered by decentralized storage and DNS, instant payments and decentralized services.","links":{"x":"https://x.com/ton_blockchain","telegram":"https://t.me/toncoin","github":"https://github.com/ton-blockchain"}},"tokens":[{"address":"EQA2kCVNwVsil2EM2mB0SkXytxCqQjS4mttjDpnXmwG9T6bO","symbol":"STON","name":"STON","decimals":9,"type":"JETTON","status":"active","logo":{"url":"https://chain-assets.lydian.com/ton/tokens/EQA2kCVNwVsil2EM2mB0SkXytxCqQjS4mttjDpnXmwG9T6bO/logo.png","checksum":"sha256:0d3d9c9f2352886098d44d327efd82bb7512bc40119b1cf5c92100e045e75cb1"},"metadata":{"website":"https://ston.fi/","description":"STON is the utility token of the STON.fi DEX integrated into the core protocol mechanics. STON allows participation in protocol governance through long-term staking."}},{"address":"EQALwJzXnxFjckNsurCi9O2kVg_0b1KdtjOSfvOedlY37iZc","symbol":"GOOGLx","name":"Alphabet xStock","decimals":8,"type":"JETTON","status":"active","logo":{"url":"https://chain-assets.lydian.com/ton/tokens/EQALwJzXnxFjckNsurCi9O2kVg_0b1KdtjOSfvOedlY37iZc/logo.png","checksum":"sha256:db4c360380c07b9ee2bb6418b7458319944d718d31ae8a22a464da238557474c"},"metadata":{"website":"https://assets.backed.fi/products","description":"Alphabet xStock"}},{"address":"EQAvlWFDxGF2lXm67y4yzC17wYKD9A0guwPkMs1gOsM__NOT","symbol":"NOT","name":"Notcoin","decimals":9,"type":"JETTON","status":"active","logo":{"url":"https://chain-assets.lydian.com/ton/tokens/EQAvlWFDxGF2lXm67y4yzC17wYKD9A0guwPkMs1gOsM__NOT/logo.png","checksum":"sha256:c3715132f1b0d117e8985d939f42a8b31f436b007cc5c5054a03a1f1bcf44eaf"},"metadata":{"website":"https://notco.in/","description":"Probably nothing","links":{"x":"https://x.com/thenotcoin"}}},{"address":"EQB4IwqWZPUczntdry8vSN2tsJKt-9F7iIb7gEFREYYOB563","symbol":"TSLAx","name":"Tesla xStock","decimals":8,"type":"JETTON","status":"active","logo":{"url":"https://chain-assets.lydian.com/ton/tokens/EQB4IwqWZPUczntdry8vSN2tsJKt-9F7iIb7gEFREYYOB563/logo.png","checksum":"sha256:d372f5a7b450cf126fb13a1606e6608088473a96b9f47244edb6086bbff40e1a"},"metadata":{"website":"https://assets.backed.fi/products","description":"Tesla xStock"}},{"address":"EQCva-Of7acQdU_piADdlcbzsFtA-xJwZoctz8ZOXBdBoaB8","symbol":"NVDAx","name":"NVIDIA xStock","decimals":8,"type":"JETTON","status":"active","logo":{"url":"https://chain-assets.lydian.com/ton/tokens/EQCva-Of7acQdU_piADdlcbzsFtA-xJwZoctz8ZOXBdBoaB8/logo.png","checksum":"sha256:2aa268e39aaedead3f3a2d3b6b7abc906bc0842a83f7c6edb87e5ec3d8a005ba"},"metadata":{"website":"https://assets.backed.fi/products","description":"NVIDIA xStock"}},{"address":"EQCvxJy4eG8hyHBFsZ7eePxrRsUQSFE_jpptRAYBmcG_DOGS","symbol":"DOGS","name":"DOGS","decimals":9,"type":"JETTON","status":"active","logo":{"url":"https://chain-assets.lydian.com/ton/tokens/EQCvxJy4eG8hyHBFsZ7eePxrRsUQSFE_jpptRAYBmcG_DOGS/logo.png","checksum":"sha256:194876fd1bd8ce789324324609a2d7d1c0854d77cd2fdbd34b585f83bf570740"},"metadata":{"website":"https://t.me/dogshouse_bot","description":"Dogs Community is a vibrant, community-driven initiative built on the TON Blockchain, designed to leverage Telegram's vast user base and native meme culture","links":{"x":"https://x.com/realDogsHouse"}}},{"address":"EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs","symbol":"USDT","name":"Tether USD","decimals":6,"type":"JETTON","status":"active","logo":{"url":"https://chain-assets.lydian.com/ton/tokens/EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs/logo.png","checksum":"sha256:7ecf9734c9b2499aa0e237834c09c52c784f96bc8854b6be86d60902466e34e2"},"metadata":{"website":"https://tether.to","description":"Tether (USDT) is a cryptocurrency with a value meant to mirror the value of the U.S. dollar.","links":{"x":"https://x.com/Tether_to/"}}},{"address":"EQD-cvR0Nz6XAyRBvbhz-abTrRC6sI5tvHvvpeQraV9UAAD7","symbol":"CATI","name":"Catizen","decimals":9,"type":"JETTON","status":"active","logo":{"url":"https://chain-assets.lydian.com/ton/tokens/EQD-cvR0Nz6XAyRBvbhz-abTrRC6sI5tvHvvpeQraV9UAAD7/logo.png","checksum":"sha256:81c499ed0ac659d5cf5bc7b56f79b79ee5d0b5c1128ed5099ddc967415116ed8"},"metadata":{"website":"https://catizen.ai/","description":"$CATI is the utility token issued by Catizen Limited which is a subsidiary of Catizen Foundation Company.","links":{"x":"https://x.com/CatizenAI","telegram":"https://t.me/CatizenAnn"}}},{"address":"EQD0laik0FgHV8aNfRhebi8GDG2rpDyKGXem0MBfya_Ew1-8","symbol":"GOMINING","name":"GoMining","decimals":18,"type":"JETTON","status":"active","logo":{"url":"https://chain-assets.lydian.com/ton/tokens/EQD0laik0FgHV8aNfRhebi8GDG2rpDyKGXem0MBfya_Ew1-8/logo.png","checksum":"sha256:042206e69422dc3ed86d5e35a5779cbe0818fa765f12ee3467ea7c0de5ee6ae4"},"metadata":{"website":"https://gomining.com/","description":"Gomining is an exchange token backed by a Top 10 global bitcoin mining project","links":{"x":"https://x.com/GMT_Token","telegram":"https://t.me/gmt_token_talk","reddit":"https://reddit.com/user/GoMiningToken"}}}]},{"code":"tron","name":"TRON","symbol":"TRX","decimals":6,"family":"tron","explorer":"https://tronscan.io/#/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/tron/logo.png","checksum":"sha256:cba50e3c109ce96d33e00ff8c636e7e080aa3c52063a3cffd825a7e84356f652"},"metadata":{"website":"https://tron.network/","description":"TRON is dedicated to building the infrastructure for a truly decentralized Internet.","links":{"x":"https://x.com/Tronfoundation","github":"https://github.com/tronprotocol","reddit":"https://reddit.com/r/Tronix"}},"tokens":[{"address":"TAFjULxiVgT4qWk6UZwjqwZXTSaGaqnVp4","symbol":"BTT","name":"BitTorrent","decimals":18,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TAFjULxiVgT4qWk6UZwjqwZXTSaGaqnVp4/logo.png","checksum":"sha256:cf11e855dc7c7613a62e5af8ef3de8e446c01d9df8e8ccd6cc949222b65c5c27"},"metadata":{"website":"https://bittorrentchain.io","description":"BitTorrent Chain is a brand-new heterogeneous cross-chain interoperability protocol, which leverages sidechains for the scaling of smart contracts."}},{"address":"TCFLL5dx5ZJdKnWuesXxi1VPwjLVmWZZy9","symbol":"JST","name":"JUST","decimals":18,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TCFLL5dx5ZJdKnWuesXxi1VPwjLVmWZZy9/logo.png","checksum":"sha256:7d7c3725936f50939f88c4a12db7d42541cf0d7a623d3ecbeb1e0b4a3b92afc8"},"metadata":{"website":"https://just.network","description":"JUST aims to build a fair, decentralized financial system that provides stablecoin lending and governance mechanisms for users around the world."}},{"address":"TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8","symbol":"USDC","name":"USD Coin","decimals":6,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8/logo.png","checksum":"sha256:4fd4b78e88ef0ee54c6424140c2f0adac34c79828db4d917948c52f35c734651"},"metadata":{"website":"https://www.centre.io","description":"USDC is a fully collateralized US Dollar stablecoin developed by CENTRE, the open source project with Circle being the first of several forthcoming issuers.","links":{"x":"https://x.com/centre_io","github":"https://github.com/centrehq"}}},{"address":"TFczxzPhnThNSqr5by8tvxsdCFRRz6cPNq","symbol":"NFT","name":"APENFT","decimals":6,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TFczxzPhnThNSqr5by8tvxsdCFRRz6cPNq/logo.png","checksum":"sha256:59c68398cd070b09023cadc74fefbe622f8a08ba839f23b3c0b21e37012f0ff6"},"metadata":{"website":"https://apenft.org","description":"APENFT Fund was born with the mission to register world-class artworks as NFTs on-chain."}},{"address":"TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7","symbol":"WIN","name":"WINk","decimals":6,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7/logo.png","checksum":"sha256:4324a78991d967043e5cbc1ef8c0bca7777acb3d7f3609b9ce49fb97b865c73b"},"metadata":{"website":"https://wink.org","description":"WINK (formerly TRONBet) describes itself as a betting DApp based on the TRC20 WIN token.","links":{"x":"https://x.com/WinkLink_Oracle","telegram":"https://t.me/WINkLink_Oracle_official"}}},{"address":"TLeVfrdym8RoJreJ23dAGyfJDygRtiWKBZ","symbol":"A7A5","name":"A7A5","decimals":6,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TLeVfrdym8RoJreJ23dAGyfJDygRtiWKBZ/logo.png","checksum":"sha256:41d8352c9c4829d7a3e855800003f5f05db4b5cb53028bbc2efa1642f8ec803b"},"metadata":{"website":"https://a7a5.io/","description":"A7A5 is an RWA token backed by fiat deposits in top-tier banks with high overnight rates. A7A5 automatically distributes 50% of its daily income to all token holders at a random time each day, requiring no action on their part.","links":{"x":"https://x.com/A7A5official","telegram":"https://t.me/A7A5official","github":"https://github.com/a7a5-defi/a7a5"}}},{"address":"TNMR6r9Z4cL7eWNrNQ4e4sm2XPhhifexZU","symbol":"NVDAx","name":"NVIDIA xStock","decimals":18,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TNMR6r9Z4cL7eWNrNQ4e4sm2XPhhifexZU/logo.png","checksum":"sha256:2aa268e39aaedead3f3a2d3b6b7abc906bc0842a83f7c6edb87e5ec3d8a005ba"},"metadata":{"website":"https://assets.backed.fi/products","description":"NVIDIA xStock"}},{"address":"TPFqcBAaaUMCSVRCqPaQ9QnzKhmuoLR6Rc","symbol":"USD1","name":"World Liberty Financial USD","decimals":18,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TPFqcBAaaUMCSVRCqPaQ9QnzKhmuoLR6Rc/logo.png","checksum":"sha256:226ce53d1fccec27a3c062bc1849ff62e4f7280f46fbf6f62a3c16872a1081fb"},"metadata":{"website":"https://www.worldlibertyfinancial.com/","description":"A stablecoin by World Liberty Financial, redeemable 1:1 for the US dollar and backed by U.S. treasuries, dollar deposits, and other cash equivalents."}},{"address":"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t","symbol":"USDT","name":"Tether USDT","decimals":6,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t/logo.png","checksum":"sha256:032f5190a9066fce37aad7bc7da4752bb420837623692e1981ca45ecc7b167fd"},"metadata":{"website":"https://tether.to","description":"Tether (USDT) is a cryptocurrency with a value meant to mirror the value of the U.S. dollar.","links":{"x":"https://x.com/Tether_to","telegram":"https://t.me/tronnetworkEN","discord":"https://discord.com/invite/hqKvyAM","reddit":"https://reddit.com/r/Tronix/"}}},{"address":"TSSMHYeV2uE9qYH95DqyoCuNCzEL1NvU3S","symbol":"SUN","name":"Sun","decimals":18,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TSSMHYeV2uE9qYH95DqyoCuNCzEL1NvU3S/logo.png","checksum":"sha256:85164a6f8a37d07954298f77b580fcc9e0705b526178546861f859229b717a6c"},"metadata":{"website":"https://sun.io/#/home","description":"The SUN.io platform is TRON's first one-stop platform that supports stablecoin swap, token mining and self-governance.","links":{"x":"https://x.com/defi_sunio"}}},{"address":"TUPM7K8REVzD2UdV4R5fe5M8XbnR2DdoJ6","symbol":"HTX","name":"HTX","decimals":18,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TUPM7K8REVzD2UdV4R5fe5M8XbnR2DdoJ6/logo.png","checksum":"sha256:feb4249afa910f437469387cd260bad8d05e0662b9da3f81fe7aa07cd178711c"},"metadata":{"website":"https://www.htxdao.com/","description":"HTX is the governance token of HTX DAO, a decentralized autonomous organization relying on the collective autonomy of HTX token holders. HTX holders possess the right to vote on proposals and can freely delegate and exercise their voting rights in the decision-making process.","links":{"x":"https://x.com/HTX_DAO"}}},{"address":"TUpMhErZL2fhh4sVNULAbNKLokS4GjC1F4","symbol":"TrueUSD","name":"TrueUSDToken","decimals":18,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TUpMhErZL2fhh4sVNULAbNKLokS4GjC1F4/logo.png","checksum":"sha256:5e4046bad4be380664933c6633a99e97f50d5a10e94423edecbbd1e4b5ad38ab"},"metadata":{"website":"https://www.trueusd.com/","description":"TrueUSD (TUSD) is the first independently-verified digital asset redeemable 1-for-1 for US Dollars.","links":{"x":"https://x.com/tusd_official","telegram":"https://t.me/TUSDofficial_EN","github":"https://github.com/trusttoken/TrueUSD"}}},{"address":"TXBcx59eDVndV5upFQnTR2xdvqFd5reXET","symbol":"BPX","name":"Black Phoenix","decimals":18,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TXBcx59eDVndV5upFQnTR2xdvqFd5reXET/logo.png","checksum":"sha256:f68095a445e465effdbdc08a8c58b026276a07fa06b292e94f8d0b310379216a"},"metadata":{"website":"https://www.blackphoenixbpx.com","description":"The token is designed to be profitable for people unfamiliar with digital currency.And tries to be profitable. And teach the new generation of money to the world with future plans and its amazing combination of metaverse, DeFi, GameFi and NFT instruments.","links":{"x":"https://x.com/OfficialBPX","telegram":"https://t.me/BlackPhoenixOfficial","github":"https://github.com/BLACKPHOENIXBPX","reddit":"https://reddit.com/u/OfficialBlackPhoenix"}}},{"address":"TXDk8mbtRbXeYuMNS83CfKPaYYT8XWv9Hz","symbol":"USDD","name":"Decentralized USD","decimals":18,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TXDk8mbtRbXeYuMNS83CfKPaYYT8XWv9Hz/logo.png","checksum":"sha256:79eb68bbda22ca7e73c0c700c2abb4d731c40b125ee97e18b3fb3c9fbb6bcd33"},"metadata":{"website":"https://usdd.io/","description":"Decentralized USD (USDD) is a fully decentralized stablecoin pegged to the US dollar through crypto reserves.","links":{"x":"https://x.com/usddio"}}},{"address":"TXZo12qvnEVKvU2zbfuQeMXKusWyxonwEG","symbol":"USDKG","name":"USDKG","decimals":6,"type":"TRC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/tron/tokens/TXZo12qvnEVKvU2zbfuQeMXKusWyxonwEG/logo.png","checksum":"sha256:56cd815044fa2e5002abf829f6552b26f5fa99ebcca599f11eee009cb9170d0d"},"metadata":{"website":"https://www.usdkg.com/","description":"USDKG is the world's first gold-collateralized stablecoin pegged 1:1 to the US Dollar, fully supported by the Ministry of Finance of the Kyrgyz Republic, and backed by physical gold reserves to ensure stability and transparency in digital transactions.","links":{"x":"https://x.com/USDKG_Official","github":"https://github.com/USDkg/USDkg"}}}]},{"code":"vechain","name":"VeChain","symbol":"VET","decimals":18,"family":"evm","explorer":"https://insight.vecha.in","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/vechain/logo.png","checksum":"sha256:368bef0881997096735ebecff20ef1872b3318cd4b694f82b9d4888eb8215b10"},"metadata":{"chainId":100009,"website":"https://vechain.org","description":"VeChain is the world’s leading blockchain platform offering Blockchain-as-a-Service to enterprises for products and information. VeChain strives to build a trust-free and distributed business ecosystem.","links":{"x":"https://x.com/vechainofficial","github":"https://github.com/vechain","reddit":"https://reddit.com/r/vechain"}},"tokens":[]},{"code":"wanchain","name":"Wanchain","symbol":"WAN","decimals":18,"family":"evm","explorer":"https://www.wanscan.org","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/wanchain/logo.png","checksum":"sha256:6979eb6dc0341ddd26b4869b4face9fa23aa3a897af662a93d43b53844121d72"},"metadata":{"chainId":888,"website":"https://wanchain.org","description":"Wanchain aims to build a super financial market of digital assets. It is an infrastructure connecting different digital assets with Private Cross-Chain Smart Contracts.","links":{"x":"https://x.com/wanchain_org","github":"https://github.com/wanchain","reddit":"https://reddit.com/r/wanchain"}},"tokens":[]},{"code":"xdai","name":"Gnosis Chain","symbol":"xDAI","decimals":18,"family":"evm","explorer":"https://blockscout.com/poa/xdai","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/xdai/logo.png","checksum":"sha256:ec8661debc518070b94e53de51d08bfdc77f2e7d56882d96378ef2a0b9c6435b"},"metadata":{"chainId":100,"website":"https://xdaichain.com","description":"The first-ever USD stable blockchain and multi-chain staking token.","links":{"x":"https://x.com/xdaichain","github":"https://github.com/xdaichain","reddit":"https://reddit.com/r/POA"}},"tokens":[{"address":"0x177127622c4A00F3d409B75571e12cB3c8973d3c","symbol":"COW","name":"CoW Protocol Token from Mainnet","decimals":18,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/xdai/tokens/0x177127622c4A00F3d409B75571e12cB3c8973d3c/logo.png","checksum":"sha256:8ccdcff86a118fed5a42af74a8bf35c4604251f69a36d5409344d3ace281b9b1"},"metadata":{"website":"https://cow.fi","description":"COW token allows its holders the right to govern and curate the infrastructure of the CoW Protocol ecosystem through the CowDAO. Additionally, COW token holders receive fee discounts when trading on CowSwap & some other perks.","links":{"x":"https://x.com/CoWSwap","discord":"https://discord.com/invite/cowprotocol","github":"https://github.com/cowprotocol"}}}]},{"code":"zcash","name":"Zcash","symbol":"ZEC","decimals":8,"family":"bitcoin","explorer":"https://explorer.zcha.in","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/zcash/logo.png","checksum":"sha256:ca7279cd9fe1e5a3150f51155e00377f74f3a646d8e27afe691e874ef86cb914"},"metadata":{"website":"https://z.cash","description":"Zcash is a decentralized and open-source cryptocurrency that provides strong privacy protections. Shielded transactions hide the sender, recipient, and value on the blockchain.","links":{"x":"https://x.com/electriccoinco","github":"https://github.com/zcash/zcash","reddit":"https://reddit.com/r/zec/"}},"tokens":[]},{"code":"zetachain","name":"Native ZetaChain","symbol":"ZETA","decimals":18,"family":"evm","explorer":"https://explorer.zetachain.com/cosmos/tx","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/zetachain/logo.png","checksum":"sha256:a526024d44a7b6333358f920aa4f0f1c4141b73911f533cee8b9c7f7234e4421"},"metadata":{"chainId":7000,"website":"https://www.zetachain.com/","description":"ZetaChain is the only public, decentralized blockchain and smart contract platform that enables message passing and value transfer between any blockchain. Our omnichain smart contracts give the power of programmability to non-smart contract chains like Bitcoin and Dogecoin. No other blockchain enables fully interoperable smart contracts like we do.","links":{"x":"https://x.com/zetablockchain","telegram":"https://t.me/zetachainofficial","discord":"https://discord.com/invite/zetachain","github":"https://github.com/zeta-chain"}},"tokens":[]},{"code":"zksync","name":"ZkSync Era","symbol":"ETH","decimals":18,"family":"evm","explorer":"https://explorer.zksync.io/","status":"active","recommended":false,"logo":{"url":"https://chain-assets.lydian.com/zksync/logo.png","checksum":"sha256:8d4e7c1343e301e88b2b2684f159e32a339ea77e6c1890193f6b4700637530db"},"metadata":{"chainId":324,"website":"https://zksync.io/","description":"zkSync Era is made to look and feel like Ethereum, but with lower fees.","links":{"x":"https://x.com/zksync"}},"tokens":[{"address":"0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4","symbol":"USDC","name":"USD Coin","decimals":6,"type":"ERC20","status":"active","logo":{"url":"https://chain-assets.lydian.com/zksync/tokens/0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4/logo.png","checksum":"sha256:4fd4b78e88ef0ee54c6424140c2f0adac34c79828db4d917948c52f35c734651"},"metadata":{"website":"https://www.centre.io/","description":"USDC is a fully collateralized US Dollar stablecoin developed by CENTRE, the open source project with Circle being the first of several forthcoming issuers.","links":{"x":"https://x.com/centre_io","discord":"https://discord.com/CetY6Y4"}}}]}]`)};class DB extends HTMLElement{constructor(){super(),this.initOptions=null,this.API=null,this.sdkConfig=null,this.cryptoTransaction=null,this.getCryptoTransactionIntervalID=null,this.walletConnectService=null,this.containerPaymentSuccess=null,this.containerPaymentFailure=null,this.containerQRCode=null,this.lydianProcessingContainer=null,this.lydianProcessingText=null,this.lydianUsdtPaymentContainer=null,this.containerMoreNetworks=null,this.containerNetworks=null,this.containerNetworkList=null,this.assetImg=null,this.assetTitle=null,this.containerCryptoPayment=null,this.containerAssets=null,this.containerAssetsMore=null,this.btnMoreAssets=null,this.canvasQRCode=null,this.displayTotalAmount=null,this.displayTransactionID=null,this.displayAssetTotal=null,this.displayAdditionalCustomerFee=null,this.displayScanText=null,this.displayExpirationLeft=null,this.btnAppPayment=null,this.btnCryptoPayment=null,this.btnMoreNetworks=null,this.btnCancelCryptoPayment=null,this.lydianBtnCancelCryptoPayment=null,this.lydianBtnCancelUsdtPayment=null,this.lydianBtnCancelWalletConnect=null,this.selectedAsset=null,this.selectedAssetNetworks=null,this.selectedNetwork=null,this.connectWalletButtonsContainer=null,this.containerMoreWallets=null,this.containerWalletList=null,this.btnMoreWallets=null,this.containerWalletManual=null,this.modal=null,this.modalBtnBack=null,this.modalContainerPaymentSuccess=null,this.modalContainerPaymentFailure=null,this.modalContainerQRCode=null,this.modalLydianProcessingContainer=null,this.modalLydianProcessingText=null,this.modalContainerMoreNetworks=null,this.modalContainerNetworks=null,this.modalContainerNetworkList=null,this.modalBtnMoreNetworks=null,this.modalAssetImg=null,this.modalAssetTitle=null,this.modalContainerCryptoPayment=null,this.modalContainerAssets=null,this.modalCanvasQRCode=null,this.modalDisplayAssetTotal=null,this.modalDisplayScanText=null,this.modalDisplayExpirationLeft=null,this.modalTitle=null,this.modalDisplayNetwork=null,this.modalDisplayWalletAddress=null,this.modalButtonCopyAssetTotal=null,this.modalButtonCopyWalletAddress=null,this.modalTransactionOverpaidAmountUSDTContainer=null,this.modalTransactionReturnAmountUSDTContainer=null,this.modalLydianID=null,this.modalTransactionAmount=null,this.modalTransactionAmountUSDT=null,this.modalTransactionTotalAmountUSDT=null,this.modalTransactionOverpaidAmountUSDT=null,this.modalTransactionReturnAmountUSDT=null,this.modalOverpaidWarning=null,this.modalOverpaidLessThanGasFeesWarning=null,this.modalUnderpaidWarning=null,this.modalUnderpaidAmountsBlock=null,this.modalTransactionAmountForUnderpaidWarning=null,this.modalTransactionAmountForUnderpaid=null,this.modalTransactionPaidAmountForUnderpaid=null,this.modalTransactionDetailsContainer=null,this.modalTransactionDetailItemsContainer=null,this.modalButtonTransactionDetails=null,this.modalUnderpaidButtonsContainer=null,this.modalButtonCancelTransaction=null,this.modalButtonChooseDifferentAsset=null,this.modalCancelTransaction=null,this.modalButtonRejectCancelTransaction=null,this.modalButtonAcceptCancelTransaction=null,this.modalHeaderButtonNeedHelp=null,this.modalTransactionCompleteButtonNeedHelp=null,this.modalOverpaidButtonNeedHelp=null,this.modalUnderpaidButtonNeedHelp=null,this.modalCloseTransactionModal=null,this.modalButtonAcceptTransactionModalClose=null,this.modalButtonRejectTransactionModalClose=null,this.modalCloseTransactionModalDescription=null,this.modalContainerKYCAndTravelRulesContainer=null,this.modalEmail=null,this.modalFirstName=null,this.modalLastName=null,this.modalStreet=null,this.modalCity=null,this.modalRegion=null,this.modalPostalCode=null,this.modalCountry=null,this.modalDocumentType=null,this.modalDocumentFileFront=null,this.modalDocumentFileBackContainer=null,this.modalDocumentFileBack=null,this.modelButtonKYCVerificationAndTravelRules=null,this.modalContainerKYCAndTravelRulesDocument=null,this.containerKYCAndTravelRules=null,this.email=null,this.firstName=null,this.lastName=null,this.street=null,this.city=null,this.region=null,this.postalCode=null,this.country=null,this.documentType=null,this.documentFileFront=null,this.documentFileBackContainer=null,this.documentFileBack=null,this.buttonKYCVerificationAndTravelRules=null,this.containerKYCAndTravelRulesDocument=null,this.processingUnderpayment=!1,this.timeInterval=null,this.shadow=this.attachShadow({mode:"open"}),this.walletConnectService=new JD({shadow:this.shadow})}async getMerchantConfiguration(e){var n;this.initOptions=e;let s=Vg;e.dev&&(s=Hg),!e.dev&&!e.sandbox&&(s=Kg),this.API=new Gl(s,this.initOptions.publishableKey),this.render(),await this.getSDKConfig(),this.initializeComponents(),this.setAssetButtons(),this.attachListeners(),this.loadInitialState(),await((n=this.walletConnectService)==null?void 0:n.init())}async updateTransaction(e){if(!this.initOptions)throw new Error("Tether Pay not initialized.");if(!e.amount||!e.currency)throw new Error("Amount and currency are required.");if(!Dl(e.currency))throw new Error("Invalid value for currency, valid values are: "+_a.join(", "));this.initOptions.transaction=e,this.loadInitialState()}loadInitialState(){var e,s,n,i,o,a,r,c,l,d,h,u,b,f,y,C,_,N,A,E,B,P,M,R,L,q,K,j,D,F,p,g,w,T,S,O,z,H,Y,W,X,ee,ie,he,ce,se,I,m,v,x,k,$,U,G,Z,Q,V,ae,pe,ue,te,ne,ge,we,de,be;this.setSelectedAsset(null),this.setSelectedNetwork(null),this.clearInterval(),this.hideQRCode(),this.hidePaymentSuccess(),this.showButtons(),(e=this.containerPaymentFailure)==null||e.classList.add("hidden"),(s=this.modalContainerPaymentFailure)==null||s.classList.add("hidden"),(n=this.containerPaymentSuccess)==null||n.classList.add("hidden"),(i=this.modalContainerPaymentSuccess)==null||i.classList.add("hidden"),(o=this.btnAppPayment)==null||o.classList.add("hidden"),(a=this.sdkConfig)!=null&&a.appPayEnabled&&((r=this.btnAppPayment)==null||r.classList.remove("hidden")),(c=this.btnCryptoPayment)==null||c.classList.add("hidden"),(l=this.sdkConfig)!=null&&l.cryptoPayEnabled&&((d=this.btnCryptoPayment)==null||d.classList.remove("hidden")),(h=this.modalButtonCancelTransaction)==null||h.classList.add("hidden"),(u=this.sdkConfig)!=null&&u.cancelTransactionEnabled&&((b=this.modalButtonCancelTransaction)==null||b.classList.remove("hidden")),(f=this.lydianUsdtPaymentContainer)==null||f.classList.add("hidden"),(y=this.containerCryptoPayment)==null||y.classList.add("hidden"),(C=this.containerAssetsMore)==null||C.classList.add("hidden"),(_=this.btnMoreAssets)==null||_.classList.remove("hidden"),(N=this.containerNetworks)==null||N.classList.add("hidden"),(A=this.containerMoreNetworks)==null||A.classList.add("hidden"),(E=this.btnMoreNetworks)==null||E.classList.remove("hidden"),(B=this.containerMoreWallets)==null||B.classList.add("hidden"),(P=this.btnMoreWallets)==null||P.classList.remove("hidden"),(M=this.connectWalletButtonsContainer)==null||M.classList.add("hidden"),(R=this.modalContainerNetworks)==null||R.classList.add("hidden"),(L=this.modalContainerMoreNetworks)==null||L.classList.add("hidden"),(q=this.modalBtnMoreNetworks)==null||q.classList.remove("hidden"),(K=this.modalContainerCryptoPayment)==null||K.classList.add("hidden"),(j=this.modalOverpaidWarning)==null||j.classList.add("hidden"),(D=this.modalOverpaidLessThanGasFeesWarning)==null||D.classList.add("hidden"),(F=this.modalTransactionOverpaidAmountUSDTContainer)==null||F.classList.add("hidden"),(p=this.modalTransactionReturnAmountUSDTContainer)==null||p.classList.add("hidden"),(g=this.modalUnderpaidWarning)==null||g.classList.add("hidden"),(w=this.modalUnderpaidAmountsBlock)==null||w.classList.add("hidden"),(T=this.modalUnderpaidButtonsContainer)==null||T.classList.add("hidden"),this.modalTitle&&(this.modalTitle.innerText="Select an Asset"),(S=this.modalBtnBack)==null||S.classList.remove("hidden"),(O=this.modalHeaderButtonNeedHelp)==null||O.classList.add("hidden"),(z=this.modalTransactionCompleteButtonNeedHelp)==null||z.classList.add("hidden"),(H=this.modalOverpaidButtonNeedHelp)==null||H.classList.add("hidden"),(Y=this.modalUnderpaidButtonNeedHelp)==null||Y.classList.add("hidden"),(W=this.sdkConfig)!=null&&W.support&&((X=this.sdkConfig)!=null&&X.support.email||(ee=this.sdkConfig)!=null&&ee.support.link)&&((ie=this.modalHeaderButtonNeedHelp)==null||ie.classList.remove("hidden"),(he=this.modalTransactionCompleteButtonNeedHelp)==null||he.classList.remove("hidden"),(ce=this.modalOverpaidButtonNeedHelp)==null||ce.classList.remove("hidden"),(se=this.modalUnderpaidButtonNeedHelp)==null||se.classList.remove("hidden"),this.modalHeaderButtonNeedHelp&&(this.modalHeaderButtonNeedHelp.href=(I=this.sdkConfig)!=null&&I.support.link?(m=this.sdkConfig)==null?void 0:m.support.link:`mailto: ${(v=this.sdkConfig)==null?void 0:v.support.email}`),this.modalTransactionCompleteButtonNeedHelp&&(this.modalTransactionCompleteButtonNeedHelp.href=(x=this.sdkConfig)!=null&&x.support.link?(k=this.sdkConfig)==null?void 0:k.support.link:`mailto: ${($=this.sdkConfig)==null?void 0:$.support.email}`),this.modalOverpaidButtonNeedHelp&&(this.modalOverpaidButtonNeedHelp.href=(U=this.sdkConfig)!=null&&U.support.link?(G=this.sdkConfig)==null?void 0:G.support.link:`mailto: ${(Z=this.sdkConfig)==null?void 0:Z.support.email}`),this.modalUnderpaidButtonNeedHelp&&(this.modalUnderpaidButtonNeedHelp.href=(Q=this.sdkConfig)!=null&&Q.support.link?(V=this.sdkConfig)==null?void 0:V.support.link:`mailto: ${(ae=this.sdkConfig)==null?void 0:ae.support.email}`)),this.modalButtonAcceptTransactionModalClose&&(this.modalButtonAcceptTransactionModalClose.innerText="Close"),this.modalCloseTransactionModalDescription&&(this.modalCloseTransactionModalDescription.innerText="Are you sure you want to close this modal? If you continue, you will loose any progress you have made."),this.cryptoTransaction=null,this.timeInterval&&(clearInterval(this.timeInterval),this.timeInterval=null,(pe=this.displayExpirationLeft)!=null&&pe.innerHTML&&(this.displayExpirationLeft.innerHTML="15:00"),(ue=this.modalDisplayExpirationLeft)!=null&&ue.innerHTML&&(this.modalDisplayExpirationLeft.innerHTML="15:00")),(te=this.modalContainerKYCAndTravelRulesContainer)==null||te.classList.add("hidden"),(ne=this.modalDocumentFileBackContainer)==null||ne.classList.remove("hidden"),(ge=this.modalContainerKYCAndTravelRulesDocument)==null||ge.classList.add("hidden"),this.modalEmail&&(this.modalEmail.value=""),this.modalFirstName&&(this.modalFirstName.value=""),this.modalLastName&&(this.modalLastName.value=""),this.modalStreet&&(this.modalStreet.value=""),this.modalCity&&(this.modalCity.value=""),this.modalRegion&&(this.modalRegion.value=""),this.modalPostalCode&&(this.modalPostalCode.value=""),this.modalCountry&&(this.modalCountry.value="US"),this.modalDocumentType&&(this.modalDocumentType.value="ID_CARD"),this.modalDocumentFileFront&&(this.modalDocumentFileFront.value=""),this.modalDocumentFileBack&&(this.modalDocumentFileBack.value=""),(we=this.containerKYCAndTravelRules)==null||we.classList.add("hidden"),(de=this.documentFileBackContainer)==null||de.classList.remove("hidden"),(be=this.containerKYCAndTravelRulesDocument)==null||be.classList.add("hidden"),this.email&&(this.email.value=""),this.firstName&&(this.firstName.value=""),this.lastName&&(this.lastName.value=""),this.street&&(this.street.value=""),this.city&&(this.city.value=""),this.region&&(this.region.value=""),this.postalCode&&(this.postalCode.value=""),this.country&&(this.country.value="US"),this.documentType&&(this.documentType.value="ID_CARD"),this.documentFileFront&&(this.documentFileFront.value=""),this.documentFileBack&&(this.documentFileBack.value="")}setSelectedAsset(e){switch(e){case Bl:this.selectedAsset=zl;break;case Fl:this.selectedAsset=Ml;break;case Nl:this.selectedAsset=Ll;break;case Ol:this.selectedAsset=$l;break;case Wg:this.selectedAsset=ib;break;case Gg:this.selectedAsset=ob;break;case Yg:this.selectedAsset=ab;break;case Zg:this.selectedAsset=rb;break;case Xg:this.selectedAsset=cb;break;case Qg:this.selectedAsset=lb;break;case eb:this.selectedAsset=db;break;case tb:this.selectedAsset=hb;break;case sb:this.selectedAsset=ub;break;case _l:this.selectedAsset=jl;break;case Il:this.selectedAsset=ql;break;case Pl:this.selectedAsset=Hl;break;case Ul:this.selectedAsset=Vl;break;case Tl:this.selectedAsset=Kl;break;case Rl:this.selectedAsset=Wl;break;default:this.selectedAsset=null;break}}setSelectedNetwork(e){this.selectedNetwork=e}setSelectedWallet(e){this.selectedWallet=e}showPaymentSuccess(){var e,s,n;(e=this.initOptions)!=null&&e.isEmbedded?(s=this.containerPaymentSuccess)==null||s.classList.remove("hidden"):(n=this.modalContainerPaymentSuccess)==null||n.classList.remove("hidden"),this.hideButtons(),this.hideQRCode()}showPaymentFailure(){var e,s,n;(e=this.initOptions)!=null&&e.isEmbedded?(s=this.containerPaymentFailure)==null||s.classList.remove("hidden"):(n=this.modalContainerPaymentFailure)==null||n.classList.remove("hidden"),this.hideButtons(),this.hideQRCode()}hidePaymentSuccess(){var e,s,n;(e=this.initOptions)!=null&&e.isEmbedded?(s=this.containerPaymentSuccess)==null||s.classList.add("hidden"):(n=this.modalContainerPaymentSuccess)==null||n.classList.add("hidden")}showProcessing(e="Processing..."){var s,n,i,o;(s=this.initOptions)!=null&&s.isEmbedded&&this.lydianProcessingText?this.lydianProcessingText.innerHTML=e:this.modalLydianProcessingText&&(this.modalLydianProcessingText.innerHTML=e),(n=this.initOptions)!=null&&n.isEmbedded?(i=this.lydianProcessingContainer)==null||i.classList.remove("hidden"):(o=this.modalLydianProcessingContainer)==null||o.classList.remove("hidden")}hideProcessing(){var e,s,n,i;(e=this.initOptions)!=null&&e.isEmbedded&&this.lydianProcessingText?this.lydianProcessingText.innerHTML="":this.modalLydianProcessingText&&(this.modalLydianProcessingText.innerHTML=""),(s=this.initOptions)!=null&&s.isEmbedded?(n=this.lydianProcessingContainer)==null||n.classList.add("hidden"):(i=this.modalLydianProcessingContainer)==null||i.classList.add("hidden")}showButtons(){var e,s,n,i;(e=this.sdkConfig)!=null&&e.appPayEnabled&&((s=this.btnAppPayment)==null||s.classList.remove("hidden")),(n=this.sdkConfig)!=null&&n.cryptoPayEnabled&&((i=this.btnCryptoPayment)==null||i.classList.remove("hidden"))}hideButtons(){var e,s,n,i,o,a,r,c,l;(e=this.btnAppPayment)==null||e.classList.add("hidden"),(s=this.btnCryptoPayment)==null||s.classList.add("hidden"),(n=this.lydianUsdtPaymentContainer)==null||n.classList.add("hidden"),(i=this.containerCryptoPayment)==null||i.classList.add("hidden"),(o=this.containerNetworks)==null||o.classList.add("hidden"),(a=this.connectWalletButtonsContainer)==null||a.classList.add("hidden"),(r=this.containerWalletManual)==null||r.classList.add("hidden"),(c=this.modalContainerCryptoPayment)==null||c.classList.add("hidden"),(l=this.modalContainerNetworks)==null||l.classList.add("hidden")}showQRCode(e,s,n,i){var f,y,C,_,N,A,E,B,P,M;if(!this.selectedAsset)return;const o=iS(s)+" "+this.selectedAsset.code.toUpperCase(),a=this.selectedNetwork?tS(this.selectedNetwork):this.selectedAsset.networks[0],r=(f=this.initOptions)==null?void 0:f.transaction.referenceNumber,c=(C=this.initOptions)==null?void 0:C.transaction.amount.toLocaleString("en-US",{style:"currency",currency:(y=this.initOptions)==null?void 0:y.transaction.currency}),l=i.toLocaleString("en-US",{style:"currency",currency:(_=this.initOptions)==null?void 0:_.transaction.currency});(N=this.initOptions)!=null&&N.isEmbedded?((A=this.containerQRCode)==null||A.classList.remove("hidden"),this.displayAssetTotal&&(this.displayAssetTotal.innerText=o),this.displayAdditionalCustomerFee&&i>0&&(this.displayAdditionalCustomerFee.innerText=l),this.displayTransactionID&&(this.displayTransactionID.innerText=r),this.displayTotalAmount&&(this.displayTotalAmount.innerText=c)):((E=this.modalContainerQRCode)==null||E.classList.remove("hidden"),this.modalDisplayAssetTotal&&(this.modalDisplayAssetTotal.innerText=o),this.modalTitle&&(this.modalTitle.innerText="Scan with Your Wallet"),this.modalDisplayNetwork&&(this.modalDisplayNetwork.innerText=a),this.modalDisplayWalletAddress&&(this.modalDisplayWalletAddress.innerText=n));let d=null;if((B=this.initOptions)!=null&&B.isEmbedded&&this.displayExpirationLeft?d=this.displayExpirationLeft:this.modalDisplayExpirationLeft&&(d=this.modalDisplayExpirationLeft),d){const R=new Date().getTime()+9e5;this.timeInterval=setInterval(()=>{const L=new Date().getTime(),q=R-L,K=Math.floor(q%(1e3*60*60)/(1e3*60)),j=Math.floor(q%(1e3*60)/1e3);d.innerHTML=String(K).padStart(2,"0")+":"+String(j).padStart(2,"0"),q<=0&&this.timeInterval&&clearInterval(this.timeInterval)},1e3)}const h="Scan the code below using your <br />CAMERA, CRYPTO WALLET, or QR READER";(P=this.initOptions)!=null&&P.isEmbedded&&this.displayScanText&&this.selectedWallet.code=="manual"?this.displayScanText.innerHTML=h:this.modalDisplayScanText&&this.selectedWallet.code=="manual"&&(this.modalDisplayScanText.innerHTML=h);let u="";switch(this.selectedWallet.code){case"manual":u="https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/7065960c-8ebd-4d80-f352-8027ff2bb600/public";break;case"metamask":u="https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/a0ddd685-4a84-4f5c-ab6d-9796994cf500/public";break;case"trustwallet":u="https://imagedelivery.net/PC9Gitw-w-Qpo5uwdjlmgw/327c5e87-ea96-4b84-aa1f-8f99c2c70f00/public";break}this.canvasQRCode&&(this.canvasQRCode.innerHTML=""),this.modalCanvasQRCode&&(this.modalCanvasQRCode.innerHTML="");const b=new kB({width:238,height:238,type:"canvas",data:e,image:u,dotsOptions:{color:"#000000",type:"extra-rounded"},backgroundOptions:{color:"#ffffff"}});(M=this.initOptions)!=null&&M.isEmbedded&&this.canvasQRCode?b.append(this.canvasQRCode):this.modalCanvasQRCode&&b.append(this.modalCanvasQRCode)}hideQRCode(){var e,s,n;(e=this.initOptions)!=null&&e.isEmbedded?((s=this.containerQRCode)==null||s.classList.add("hidden"),this.canvasQRCode&&(this.canvasQRCode.innerHTML="")):((n=this.modalContainerQRCode)==null||n.classList.add("hidden"),this.modalCanvasQRCode&&(this.modalCanvasQRCode.innerHTML=""))}render(){this.shadow.innerHTML=`<style>${$g}</style>${Mg}`}initializeComponents(){var e,s,n,i,o,a,r,c,l,d,h,u,b,f,y,C,_,N,A,E,B,P,M,R,L,q,K,j,D,F,p,g,w,T,S,O,z,H,Y,W,X,ee,ie,he,ce,se,I,m,v,x,k,$,U,G,Z,Q,V,ae,pe,ue,te,ne,ge,we,de,be,fe,me,Fe,He,Ce,qt,ft,Ue,lt,st,pt,ai,ds,Fa,hs,ri,Ia,Ht,ci,us,fs,li,di,ps,ng,ig,og,ag,rg,cg,lg,dg,hg,ug,fg,pg,mg,gg,bg,yg,wg,vg,xg,Eg,kg,Cg,Ag,Dg,Sg,Bg,Tg,Fg,Ig,_g,Og;this.lydianUsdtPaymentContainer=(e=this.shadowRoot)==null?void 0:e.getElementById("lydianUsdtPaymentContainer"),this.containerMoreNetworks=(s=this.shadowRoot)==null?void 0:s.getElementById("containerMoreNetworks"),this.containerNetworks=(n=this.shadowRoot)==null?void 0:n.getElementById("containerNetworks"),this.containerNetworkList=(i=this.shadowRoot)==null?void 0:i.getElementById("containerNetworkList"),this.containerPaymentSuccess=(o=this.shadowRoot)==null?void 0:o.getElementById("containerPaymentSuccess"),this.containerPaymentFailure=(a=this.shadowRoot)==null?void 0:a.getElementById("containerPaymentFailure"),this.containerQRCode=(r=this.shadowRoot)==null?void 0:r.getElementById("containerQRCode"),this.lydianProcessingContainer=(c=this.shadowRoot)==null?void 0:c.getElementById("lydianProcessingContainer"),this.lydianProcessingText=(l=this.shadowRoot)==null?void 0:l.getElementById("lydianProcessingText"),this.assetImg=(d=this.shadowRoot)==null?void 0:d.getElementById("assetImg"),this.assetTitle=(h=this.shadowRoot)==null?void 0:h.getElementById("assetTitle"),this.containerCryptoPayment=(u=this.shadowRoot)==null?void 0:u.getElementById("containerCryptoPayment"),this.containerAssets=(b=this.shadowRoot)==null?void 0:b.getElementById("containerAssets"),this.containerAssetsMore=(f=this.shadowRoot)==null?void 0:f.getElementById("containerAssetsMore"),this.canvasQRCode=(y=this.shadowRoot)==null?void 0:y.getElementById("canvasQRCode"),this.displayTotalAmount=(C=this.shadowRoot)==null?void 0:C.getElementById("displayTotalAmount"),this.displayTransactionID=(_=this.shadowRoot)==null?void 0:_.getElementById("displayTransactionID"),this.displayAssetTotal=(N=this.shadowRoot)==null?void 0:N.getElementById("displayAssetTotal"),this.displayAdditionalCustomerFee=(A=this.shadowRoot)==null?void 0:A.getElementById("displayAdditionalCustomerFee"),this.displayScanText=(E=this.shadowRoot)==null?void 0:E.getElementById("displayScanText"),this.displayExpirationLeft=(B=this.shadowRoot)==null?void 0:B.getElementById("displayExpirationLeft"),this.btnAppPayment=(P=this.shadowRoot)==null?void 0:P.getElementById("btnAppPayment"),this.btnCryptoPayment=(M=this.shadowRoot)==null?void 0:M.getElementById("btnCryptoPayment"),this.btnMoreNetworks=(R=this.shadowRoot)==null?void 0:R.getElementById("btnMoreNetworks"),this.btnMoreAssets=(L=this.shadowRoot)==null?void 0:L.getElementById("btnMoreAssets"),this.btnMoreWallets=(q=this.shadowRoot)==null?void 0:q.getElementById("btnMoreWallets"),this.btnCancelCryptoPayment=(K=this.shadowRoot)==null?void 0:K.getElementById("btnCancelCryptoPayment"),this.lydianBtnCancelCryptoPayment=(j=this.shadowRoot)==null?void 0:j.getElementById("lydianBtnCancelCryptoPayment"),this.lydianBtnCancelUsdtPayment=(D=this.shadowRoot)==null?void 0:D.getElementById("lydianBtnCancelUsdtPayment"),this.lydianBtnCancelWalletConnect=(F=this.shadowRoot)==null?void 0:F.getElementById("lydianBtnCancelWalletConnect"),this.connectWalletButtonsContainer=(p=this.shadowRoot)==null?void 0:p.getElementById("connectWalletContainer"),this.containerMoreWallets=(g=this.shadowRoot)==null?void 0:g.getElementById("containerMoreWallets"),this.containerWalletList=(w=this.shadowRoot)==null?void 0:w.getElementById("containerWalletList"),this.containerWalletManual=(T=this.shadowRoot)==null?void 0:T.getElementById("containerWalletManual"),this.modal=(S=this.shadowRoot)==null?void 0:S.getElementById("modal"),this.modalBtnBack=(O=this.shadowRoot)==null?void 0:O.getElementById("modalBtnBack"),this.modalContainerNetworks=(z=this.shadowRoot)==null?void 0:z.getElementById("modalContainerNetworks"),this.modalContainerMoreNetworks=(H=this.shadowRoot)==null?void 0:H.getElementById("modalContainerMoreNetworks"),this.modalContainerNetworks=(Y=this.shadowRoot)==null?void 0:Y.getElementById("modalContainerNetworks"),this.modalContainerNetworkList=(W=this.shadowRoot)==null?void 0:W.getElementById("modalContainerNetworkList"),this.modalBtnMoreNetworks=(X=this.shadowRoot)==null?void 0:X.getElementById("modalBtnMoreNetworks"),this.modalContainerPaymentSuccess=(ee=this.shadowRoot)==null?void 0:ee.getElementById("modalContainerPaymentSuccess"),this.modalContainerPaymentFailure=(ie=this.shadowRoot)==null?void 0:ie.getElementById("modalContainerPaymentFailure"),this.modalContainerQRCode=(he=this.shadowRoot)==null?void 0:he.getElementById("modalContainerQRCode"),this.modalLydianProcessingContainer=(ce=this.shadowRoot)==null?void 0:ce.getElementById("modalLydianProcessingContainer"),this.modalLydianProcessingText=(se=this.shadowRoot)==null?void 0:se.getElementById("modalLydianProcessingText"),this.modalContainerCryptoPayment=(I=this.shadowRoot)==null?void 0:I.getElementById("modalContainerCryptoPayment"),this.modalContainerAssets=(m=this.shadowRoot)==null?void 0:m.getElementById("modalContainerAssets"),this.modalCanvasQRCode=(v=this.shadowRoot)==null?void 0:v.getElementById("modalCanvasQRCode"),this.modalDisplayAssetTotal=(x=this.shadowRoot)==null?void 0:x.getElementById("modalDisplayAssetTotal"),this.modalDisplayScanText=(k=this.shadowRoot)==null?void 0:k.getElementById("modalDisplayScanText"),this.modalDisplayExpirationLeft=($=this.shadowRoot)==null?void 0:$.getElementById("modalDisplayExpirationLeft"),this.modalAssetImg=(U=this.shadowRoot)==null?void 0:U.getElementById("modalAssetImg"),this.modalAssetTitle=(G=this.shadowRoot)==null?void 0:G.getElementById("modalAssetTitle"),this.modalTitle=(Z=this.shadowRoot)==null?void 0:Z.getElementById("modalTitle"),this.modalDisplayNetwork=(Q=this.shadowRoot)==null?void 0:Q.getElementById("modalDisplayNetwork"),this.modalDisplayWalletAddress=(V=this.shadowRoot)==null?void 0:V.getElementById("modalDisplayWalletAddress"),this.modalButtonCopyAssetTotal=(ae=this.shadowRoot)==null?void 0:ae.getElementById("modalButtonCopyAssetTotal"),this.modalButtonCopyWalletAddress=(pe=this.shadowRoot)==null?void 0:pe.getElementById("modalButtonCopyWalletAddress"),this.modalTransactionOverpaidAmountUSDTContainer=(ue=this.shadowRoot)==null?void 0:ue.getElementById("modalTransactionOverpaidAmountUSDTContainer"),this.modalTransactionReturnAmountUSDTContainer=(te=this.shadowRoot)==null?void 0:te.getElementById("modalTransactionReturnAmountUSDTContainer"),this.modalLydianID=(ne=this.shadowRoot)==null?void 0:ne.getElementById("modalLydianID"),this.modalTransactionAmount=(ge=this.shadowRoot)==null?void 0:ge.getElementById("modalTransactionAmount"),this.modalTransactionAmountUSDT=(we=this.shadowRoot)==null?void 0:we.getElementById("modalTransactionAmountUSDT"),this.modalTransactionTotalAmountUSDT=(de=this.shadowRoot)==null?void 0:de.getElementById("modalTransactionTotalAmountUSDT"),this.modalTransactionOverpaidAmountUSDT=(be=this.shadowRoot)==null?void 0:be.getElementById("modalTransactionOverpaidAmountUSDT"),this.modalTransactionReturnAmountUSDT=(fe=this.shadowRoot)==null?void 0:fe.getElementById("modalTransactionReturnAmountUSDT"),this.modalOverpaidWarning=(me=this.shadowRoot)==null?void 0:me.getElementById("modalOverpaidWarning"),this.modalOverpaidLessThanGasFeesWarning=(Fe=this.shadowRoot)==null?void 0:Fe.getElementById("modalOverpaidLessThanGasFeesWarning"),this.modalUnderpaidWarning=(He=this.shadowRoot)==null?void 0:He.getElementById("modalUnderpaidWarning"),this.modalUnderpaidAmountsBlock=(Ce=this.shadowRoot)==null?void 0:Ce.getElementById("modalUnderpaidAmountsBlock"),this.modalTransactionAmountForUnderpaidWarning=(qt=this.shadowRoot)==null?void 0:qt.getElementById("modalTransactionAmountForUnderpaidWarning"),this.modalTransactionAmountForUnderpaid=(ft=this.shadowRoot)==null?void 0:ft.getElementById("modalTransactionAmountForUnderpaid"),this.modalTransactionPaidAmountForUnderpaid=(Ue=this.shadowRoot)==null?void 0:Ue.getElementById("modalTransactionPaidAmountForUnderpaid"),this.modalTransactionDetailsContainer=(lt=this.shadowRoot)==null?void 0:lt.getElementById("modalTransactionDetailsContainer"),this.modalTransactionDetailItemsContainer=(st=this.shadowRoot)==null?void 0:st.getElementById("modalTransactionDetailItemsContainer"),this.modalButtonTransactionDetails=(pt=this.shadowRoot)==null?void 0:pt.getElementById("modalButtonTransactionDetails"),this.modalUnderpaidButtonsContainer=(ai=this.shadowRoot)==null?void 0:ai.getElementById("modalUnderpaidButtonsContainer"),this.modalButtonCancelTransaction=(ds=this.shadowRoot)==null?void 0:ds.getElementById("modalButtonCancelTransaction"),this.modalButtonChooseDifferentAsset=(Fa=this.shadowRoot)==null?void 0:Fa.getElementById("modalButtonChooseDifferentAsset"),this.modalCancelTransaction=(hs=this.shadowRoot)==null?void 0:hs.getElementById("modalCancelTransaction"),this.modalButtonRejectCancelTransaction=(ri=this.shadowRoot)==null?void 0:ri.getElementById("modalButtonRejectCancelTransaction"),this.modalButtonAcceptCancelTransaction=(Ia=this.shadowRoot)==null?void 0:Ia.getElementById("modalButtonAcceptCancelTransaction"),this.modalHeaderButtonNeedHelp=(Ht=this.shadowRoot)==null?void 0:Ht.getElementById("modalHeaderButtonNeedHelp"),this.modalTransactionCompleteButtonNeedHelp=(ci=this.shadowRoot)==null?void 0:ci.getElementById("modalTransactionCompleteButtonNeedHelp"),this.modalOverpaidButtonNeedHelp=(us=this.shadowRoot)==null?void 0:us.getElementById("modalOverpaidButtonNeedHelp"),this.modalUnderpaidButtonNeedHelp=(fs=this.shadowRoot)==null?void 0:fs.getElementById("modalUnderpaidButtonNeedHelp"),this.modalCloseTransactionModal=(li=this.shadowRoot)==null?void 0:li.getElementById("modalCloseTransactionModal"),this.modalButtonAcceptTransactionModalClose=(di=this.shadowRoot)==null?void 0:di.getElementById("modalButtonAcceptTransactionModalClose"),this.modalButtonRejectTransactionModalClose=(ps=this.shadowRoot)==null?void 0:ps.getElementById("modalButtonRejectTransactionModalClose"),this.modalCloseTransactionModalDescription=(ng=this.shadowRoot)==null?void 0:ng.getElementById("modalCloseTransactionModalDescription"),this.modalContainerKYCAndTravelRulesContainer=(ig=this.shadowRoot)==null?void 0:ig.getElementById("modalContainerKYCAndTravelRulesContainer"),this.modalEmail=(og=this.shadowRoot)==null?void 0:og.getElementById("modalEmail"),this.modalFirstName=(ag=this.shadowRoot)==null?void 0:ag.getElementById("modalFirstName"),this.modalLastName=(rg=this.shadowRoot)==null?void 0:rg.getElementById("modalLastName"),this.modalStreet=(cg=this.shadowRoot)==null?void 0:cg.getElementById("modalStreet"),this.modalCity=(lg=this.shadowRoot)==null?void 0:lg.getElementById("modalCity"),this.modalRegion=(dg=this.shadowRoot)==null?void 0:dg.getElementById("modalRegion"),this.modalPostalCode=(hg=this.shadowRoot)==null?void 0:hg.getElementById("modalPostalCode"),this.modalCountry=(ug=this.shadowRoot)==null?void 0:ug.getElementById("modalCountry"),this.modalDocumentType=(fg=this.shadowRoot)==null?void 0:fg.getElementById("modalDocumentType"),this.modalDocumentFileFront=(pg=this.shadowRoot)==null?void 0:pg.getElementById("modalDocumentFileFront"),this.modalDocumentFileBackContainer=(mg=this.shadowRoot)==null?void 0:mg.getElementById("modalDocumentFileBackContainer"),this.modalDocumentFileBack=(gg=this.shadowRoot)==null?void 0:gg.getElementById("modalDocumentFileBack"),this.modelButtonKYCVerificationAndTravelRules=(bg=this.shadowRoot)==null?void 0:bg.getElementById("modelButtonKYCVerificationAndTravelRules"),this.modalContainerKYCAndTravelRulesDocument=(yg=this.shadowRoot)==null?void 0:yg.getElementById("modalContainerKYCAndTravelRulesDocument"),this.containerKYCAndTravelRules=(wg=this.shadowRoot)==null?void 0:wg.getElementById("containerKYCAndTravelRules"),this.email=(vg=this.shadowRoot)==null?void 0:vg.getElementById("containerCustomerVerification"),this.firstName=(xg=this.shadowRoot)==null?void 0:xg.getElementById("firstName"),this.lastName=(Eg=this.shadowRoot)==null?void 0:Eg.getElementById("lastName"),this.street=(kg=this.shadowRoot)==null?void 0:kg.getElementById("street"),this.city=(Cg=this.shadowRoot)==null?void 0:Cg.getElementById("city"),this.region=(Ag=this.shadowRoot)==null?void 0:Ag.getElementById("region"),this.postalCode=(Dg=this.shadowRoot)==null?void 0:Dg.getElementById("postalCode"),this.country=(Sg=this.shadowRoot)==null?void 0:Sg.getElementById("country"),this.documentType=(Bg=this.shadowRoot)==null?void 0:Bg.getElementById("documentType"),this.documentFileFront=(Tg=this.shadowRoot)==null?void 0:Tg.getElementById("documentFileFront"),this.documentFileBackContainer=(Fg=this.shadowRoot)==null?void 0:Fg.getElementById("documentFileBackContainer"),this.documentFileBack=(Ig=this.shadowRoot)==null?void 0:Ig.getElementById("documentFileBack"),this.buttonKYCVerificationAndTravelRules=(_g=this.shadowRoot)==null?void 0:_g.getElementById("buttonKYCVerificationAndTravelRules"),this.containerKYCAndTravelRulesDocument=(Og=this.shadowRoot)==null?void 0:Og.getElementById("containerKYCAndTravelRulesDocument")}attachListeners(){var e,s,n,i,o,a,r,c,l,d,h,u,b,f,y,C,_,N,A,E,B,P,M;(e=this.btnAppPayment)==null||e.addEventListener("click",R=>{console.log("TODO: NOT IMPLEMENTED")}),(s=this.btnCryptoPayment)==null||s.addEventListener("click",()=>{var R,L,q,K,j;(R=this.btnCryptoPayment)==null||R.classList.toggle("hidden"),(L=this.initOptions)!=null&&L.isEmbedded?(q=this.containerCryptoPayment)==null||q.classList.toggle("hidden"):((K=this.modal)==null||K.showModal(),(j=this.modalContainerCryptoPayment)==null||j.classList.toggle("hidden"))}),(n=this.modalBtnBack)==null||n.addEventListener("click",R=>{var L,q,K;R.preventDefault(),R.stopPropagation(),(L=this.modalContainerPaymentSuccess)!=null&&L.classList.contains("hidden")?(q=this.modalCloseTransactionModal)==null||q.showModal():((K=this.modal)==null||K.close(),this.loadInitialState())}),(i=this.modalButtonAcceptTransactionModalClose)==null||i.addEventListener("click",()=>{var R,L,q,K,j,D;(R=this.cryptoTransaction)!=null&&R.transactionId&&this.API&&this.API.cancelCryptoTransaction((L=this.cryptoTransaction)==null?void 0:L.transactionId,{reason:"Cancelled from the SDK",forfeit:!((q=this.sdkConfig)!=null&&q.cancelTransactionEnabled)}),(K=this.modalCloseTransactionModal)==null||K.close(),(j=this.modal)==null||j.close(),this.cryptoTransaction=null,this.loadInitialState(),(D=this.initOptions)==null||D.paymentCanceledListener()}),(o=this.modalButtonRejectTransactionModalClose)==null||o.addEventListener("click",()=>{var R;(R=this.modalCloseTransactionModal)==null||R.close()}),(a=this.modal)==null||a.addEventListener("click",R=>{var K,j,D,F;const L=(K=this.modal)==null?void 0:K.getBoundingClientRect();let q=null;L!=null&&(q=R.clientX>=L.left&&R.clientX<=L.right&&R.clientY>=L.top&&R.clientY<=L.bottom),q||((j=this.modalContainerPaymentSuccess)!=null&&j.classList.contains("hidden")?(D=this.modalCloseTransactionModal)==null||D.showModal():((F=this.modal)==null||F.close(),this.loadInitialState()))}),(r=this.btnMoreNetworks)==null||r.addEventListener("click",()=>{var R,L;(R=this.containerMoreNetworks)==null||R.classList.toggle("hidden"),(L=this.btnMoreNetworks)==null||L.classList.toggle("hidden")}),(c=this.modalBtnMoreNetworks)==null||c.addEventListener("click",()=>{var R,L;(R=this.modalContainerMoreNetworks)==null||R.classList.toggle("hidden"),(L=this.modalBtnMoreNetworks)==null||L.classList.toggle("hidden")}),(l=this.btnMoreAssets)==null||l.addEventListener("click",()=>{var R,L;(R=this.containerAssetsMore)==null||R.classList.toggle("hidden"),(L=this.btnMoreAssets)==null||L.classList.toggle("hidden")}),(d=this.btnMoreWallets)==null||d.addEventListener("click",()=>{var R,L;(R=this.containerMoreWallets)==null||R.classList.toggle("hidden"),(L=this.btnMoreWallets)==null||L.classList.toggle("hidden")}),(h=this.btnCancelCryptoPayment)==null||h.addEventListener("click",()=>{this.loadInitialState()}),(u=this.lydianBtnCancelCryptoPayment)==null||u.addEventListener("click",()=>{this.loadInitialState()}),(b=this.modalButtonCopyAssetTotal)==null||b.addEventListener("click",R=>{var q;const L=((q=this.modalDisplayAssetTotal)==null?void 0:q.innerText)??"";navigator.clipboard.writeText(L)}),(f=this.modalButtonCopyWalletAddress)==null||f.addEventListener("click",()=>{var L;const R=((L=this.modalDisplayWalletAddress)==null?void 0:L.innerText)??"";navigator.clipboard.writeText(R)}),(y=this.modalButtonTransactionDetails)==null||y.addEventListener("click",()=>{var R;(R=this.modalTransactionDetailsContainer)==null||R.classList.toggle("hidden")}),(C=this.modalButtonCancelTransaction)==null||C.addEventListener("click",()=>{var R;(R=this.modalCancelTransaction)==null||R.showModal()}),(_=this.modalButtonChooseDifferentAsset)==null||_.addEventListener("click",()=>{var R,L,q;this.clearInterval(),this.timeInterval&&(clearInterval(this.timeInterval),this.timeInterval=null,(R=this.displayExpirationLeft)!=null&&R.innerHTML&&(this.displayExpirationLeft.innerHTML="15:00"),(L=this.modalDisplayExpirationLeft)!=null&&L.innerHTML&&(this.modalDisplayExpirationLeft.innerHTML="15:00")),this.modalTitle&&(this.modalTitle.innerText="Select an Asset"),(q=this.modalContainerCryptoPayment)==null||q.classList.remove("hidden"),requestAnimationFrame(()=>{var K;return(K=this.modalContainerQRCode)==null?void 0:K.classList.add("hidden")})}),(N=this.modalButtonRejectCancelTransaction)==null||N.addEventListener("click",()=>{var R;(R=this.modalCancelTransaction)==null||R.close()}),(A=this.modalButtonAcceptCancelTransaction)==null||A.addEventListener("click",()=>{var R,L,q,K,j;(R=this.cryptoTransaction)!=null&&R.transactionId&&this.API&&this.API.cancelCryptoTransaction((L=this.cryptoTransaction)==null?void 0:L.transactionId,{reason:"Cancelled from the SDK"}),(q=this.modalCancelTransaction)==null||q.close(),(K=this.modal)==null||K.close(),this.cryptoTransaction=null,this.loadInitialState(),(j=this.initOptions)==null||j.paymentCanceledListener()}),(E=this.modalDocumentType)==null||E.addEventListener("change",R=>{var L,q,K,j,D,F;((L=this.modalDocumentType)==null?void 0:L.value)==="PASSPORT"||((q=this.modalDocumentType)==null?void 0:q.value)==="RESIDENCE_PERMIT"?(j=(K=this.modalDocumentFileBackContainer)==null?void 0:K.classList)==null||j.add("hidden"):(F=(D=this.modalDocumentFileBackContainer)==null?void 0:D.classList)==null||F.remove("hidden")}),(B=this.documentType)==null||B.addEventListener("change",R=>{var L,q,K,j,D,F;((L=this.documentType)==null?void 0:L.value)==="PASSPORT"||((q=this.documentType)==null?void 0:q.value)==="RESIDENCE_PERMIT"?(j=(K=this.documentFileBackContainer)==null?void 0:K.classList)==null||j.add("hidden"):(F=(D=this.documentFileBackContainer)==null?void 0:D.classList)==null||F.remove("hidden")}),(P=this.modelButtonKYCVerificationAndTravelRules)==null||P.addEventListener("click",async()=>{await this.handleKYCAndTravelRulesFormSubmission()}),(M=this.buttonKYCVerificationAndTravelRules)==null||M.addEventListener("click",async()=>{await this.handleKYCAndTravelRulesFormSubmission()})}async createCryptoTransaction(){var e,s,n,i,o,a;if(!this.selectedAsset||!this.selectedNetwork){(s=(e=this.initOptions)==null?void 0:e.paymentFailedListener)==null||s.call(e,"Asset and network selection required.");return}if(this.initOptions&&this.API){this.clearInterval(),this.hideButtons();try{this.cryptoTransaction=await this.API.createCryptoTransaction({descriptor:this.initOptions.transaction.descriptor,referenceNumber:this.initOptions.transaction.referenceNumber,amount:this.initOptions.transaction.amount,amountCurrency:this.initOptions.transaction.currency,asset:this.selectedAsset.code,network:this.selectedNetwork}),console.log("transaction",this.cryptoTransaction)}catch{(i=(n=this.initOptions)==null?void 0:n.paymentFailedListener)==null||i.call(n,"Unable to create transaction.")}}else(a=(o=this.initOptions)==null?void 0:o.paymentFailedListener)==null||a.call(o,"Lydian not initialized.")}startListeningCryptoTransaction(){this.clearInterval(),this.getCryptoTransactionIntervalID=setInterval(async()=>{var e,s,n,i,o,a,r,c,l,d,h,u,b,f,y,C,_,N,A,E,B,P,M;if((e=this.cryptoTransaction)!=null&&e.transactionId){const R=await((n=this.API)==null?void 0:n.getCryptoTransaction((s=this.cryptoTransaction)==null?void 0:s.transactionId));if(R){let L=0,q=[],K=!1;for(const[O,z]of Object.entries(R.cryptoTransactions)){const H=Date.parse(z.expiration),Y=Date.now();z.status===Sl?(L-=sS(z.gasFee,z.cryptoAsset),q.push(z)):z.status===jg&&H>=Y&&(K=!0)}const j=m0(R.amount,R.amountCurrency),D=m0(R.amount-R.remainingBalance,R.amountCurrency),F=+(D-j).toFixed(2),p=+(F+L).toFixed(2);this.modalLydianID.innerText=R.transactionID,this.modalTransactionAmount.innerText=io(R.amount),this.modalTransactionAmountUSDT.innerText=j.toString(),this.modalTransactionTotalAmountUSDT.innerText=D.toString(),this.modalTransactionOverpaidAmountUSDT.innerText=F.toString(),this.modalTransactionReturnAmountUSDT.innerText=p.toString(),this.modalTransactionAmountForUnderpaidWarning.innerText=io(R.amount,R.amountCurrency),this.modalTransactionAmountForUnderpaid.innerText=io(R.amount,R.amountCurrency),this.modalTransactionPaidAmountForUnderpaid.innerText=io(R.amount-R.remainingBalance,R.amountCurrency),this.modalTransactionDetailItemsContainer&&(this.modalTransactionDetailItemsContainer.innerHTML="",q.forEach(O=>{this.modalTransactionDetailItemsContainer.innerHTML+=`
|
|
887
|
+
<div class="flex items-bottom justify-between mt-2">
|
|
888
|
+
<div class="flex flex-col">
|
|
889
|
+
<p class="font-bold">${nS(O.createdAt)}</p>
|
|
890
|
+
</div>
|
|
891
|
+
<span class="mb-1.5 grow mx-1 border-b border-dotted border-neutral-400"></span>
|
|
892
|
+
<div class="flex flex-col text-right">
|
|
893
|
+
<p><span class="font-bold">${io(O.amount,R.amountCurrency)} ${O.cryptoAsset}</span> on ${O.cryptoNetwork}</p>
|
|
894
|
+
</div>
|
|
895
|
+
</div>
|
|
896
|
+
`}));let g=!1,w=!1;p>0?((i=this.modalTransactionOverpaidAmountUSDTContainer)==null||i.classList.remove("hidden"),(o=this.modalOverpaidWarning)==null||o.classList.remove("hidden"),(a=this.modalTransactionReturnAmountUSDTContainer)==null||a.classList.remove("hidden"),g=!0):D>j?((r=this.modalTransactionOverpaidAmountUSDTContainer)==null||r.classList.remove("hidden"),(l=(c=this.modalOverpaidLessThanGasFeesWarning)==null?void 0:c.classList)==null||l.remove("hidden"),g=!0):q.length>0&&D<j?(w=!0,this.processingUnderpayment=!0):D===j&&R.status===Sl&&(g=!0);const T=Date.parse(R.expiration),S=Date.now();if(g)this.clearInterval(),this.showPaymentSuccess(),(h=(d=this.initOptions)==null?void 0:d.paymentSuccessListener)==null||h.call(d);else if(!((u=this.initOptions)!=null&&u.isEmbedded)&&w&&this.API)try{this.selectedAsset&&this.selectedNetwork?(K||(this.clearInterval(),this.timeInterval&&(clearInterval(this.timeInterval),this.timeInterval=null,(b=this.displayExpirationLeft)!=null&&b.innerHTML&&(this.displayExpirationLeft.innerHTML="15:00"),(f=this.modalDisplayExpirationLeft)!=null&&f.innerHTML&&(this.modalDisplayExpirationLeft.innerHTML="15:00")),await this.beginWalletConnectTransaction()),(y=this.modalUnderpaidWarning)==null||y.classList.remove("hidden"),(C=this.modalUnderpaidAmountsBlock)==null||C.classList.remove("hidden"),(_=this.modalUnderpaidButtonsContainer)==null||_.classList.remove("hidden"),this.modalTitle&&(this.modalTitle.innerText="Pay Remaining Balance"),(N=this.modalBtnBack)==null||N.classList.add("hidden"),(A=this.sdkConfig)!=null&&A.cancelTransactionEnabled&&(this.modalButtonAcceptTransactionModalClose&&(this.modalButtonAcceptTransactionModalClose.innerText="Close and Forfeit Funds"),this.modalCloseTransactionModalDescription&&(this.modalCloseTransactionModalDescription.innerText=`Are you sure you want to close this modal? If you continue, you will forfeit the ${D} USDT already transferred, and your order will not be placed.`))):this.loadInitialState()}catch(O){console.log("error",O),(B=(E=this.initOptions)==null?void 0:E.paymentFailedListener)==null||B.call(E,"Unable to collect underpaid amount.")}else T<S&&(this.showPaymentFailure(),this.clearInterval(),(M=(P=this.initOptions)==null?void 0:P.paymentFailedListener)==null||M.call(P,"Transaction Timed Out / Failed!"))}}},2e3)}clearInterval(){console.log("Clear interval called..."),this.getCryptoTransactionIntervalID&&(clearInterval(this.getCryptoTransactionIntervalID),this.getCryptoTransactionIntervalID=null)}setAssetButtons(){var s,n,i,o,a,r;if((s=this.initOptions)!=null&&s.isEmbedded&&(!this.containerAssets||!this.containerAssetsMore))return;if(!this.modalContainerAssets)return;const e=(i=(n=this.sdkConfig)==null?void 0:n.allowedAssets)==null?void 0:i.map((c,l)=>{switch(c.code){case Bl:return Vt(zl);case Fl:return Vt(Ml);case Nl:return Vt(Ll);case Ol:return Vt($l);case Jg:return Vt(nb);case _l:return Vt(jl);case Il:return Vt(ql);case Pl:return Vt(Hl);case Ul:return Vt(Vl);case Tl:return Vt(Kl);case Rl:return Vt(Wl)}});(o=this.initOptions)!=null&&o.isEmbedded?(this.containerAssets.innerHTML="",this.containerAssetsMore.innerHTML="",e==null||e.filter(c=>c).forEach((c,l)=>{l>=2&&this.containerAssetsMore?this.containerAssetsMore.innerHTML+=c:this.containerAssets&&(this.containerAssets.innerHTML+=c)})):(this.modalContainerAssets.innerHTML="",e==null||e.filter(c=>c).forEach((c,l)=>{this.modalContainerAssets&&(this.modalContainerAssets.innerHTML+=c)})),(a=this.sdkConfig)!=null&&a.allowedAssets&&this.sdkConfig.allowedAssets.length<=2&&((r=this.btnMoreAssets)==null||r.classList.add("hidden")),this.attachListenersOnAssets()}attachListenersOnAssets(){var e,s;(s=(e=this.sdkConfig)==null?void 0:e.allowedAssets)==null||s.forEach(n=>{var o;const i=(o=this.shadowRoot)==null?void 0:o.getElementById("btnAsset"+n.code);i==null||i.addEventListener("click",async()=>{var a;this.setSelectedAsset(n.code),(a=this.initOptions)!=null&&a.isEmbedded?requestAnimationFrame(()=>{var r;return(r=this.containerCryptoPayment)==null?void 0:r.classList.add("hidden")}):requestAnimationFrame(()=>{var r;return(r=this.modalContainerCryptoPayment)==null?void 0:r.classList.add("hidden")}),n.type=="token"?(this.setNetworkButtons(),this.modalTitle&&(this.modalTitle.innerText="Select a Network")):(this.setSelectedNetwork(n.networks[0]),await this.showWalletConnectButtons())})})}setNetworkButtons(){var n,i,o,a,r,c,l,d,h,u,b,f,y,C,_,N;if((n=this.initOptions)!=null&&n.isEmbedded&&(!this.containerNetworkList||!this.containerMoreNetworks||!this.assetTitle)||!((i=this.initOptions)!=null&&i.isEmbedded)&&(!this.modalContainerNetworkList||!this.modalContainerMoreNetworks||!this.modalAssetTitle)||(o=this.initOptions)!=null&&o.isEmbedded&&!this.assetImg||!((a=this.initOptions)!=null&&a.isEmbedded)&&!this.modalAssetImg)return;(r=this.initOptions)!=null&&r.isEmbedded?(this.containerNetworkList.innerHTML="",this.containerMoreNetworks.innerHTML="",this.assetTitle.innerHTML=(c=this.selectedAsset)==null?void 0:c.title,this.assetImg.src=(l=this.selectedAsset)==null?void 0:l.img):(this.modalContainerNetworkList.innerHTML="",this.modalContainerMoreNetworks.innerHTML="",this.modalAssetTitle.innerHTML=(d=this.selectedAsset)==null?void 0:d.title,this.modalAssetImg.src=(h=this.selectedAsset)==null?void 0:h.img);let e=(u=this.sdkConfig)==null?void 0:u.allowedAssets;const s=e==null?void 0:e.find(A=>{var E;return A.code===((E=this.selectedAsset)==null?void 0:E.code)});if(s==null){console.log("Unknown asset: ",(b=this.selectedAsset)==null?void 0:b.code);return}console.log("asset",s),s==null||s.networks.forEach((A,E)=>{var M,R,L;const B=AB.networks.filter(q=>q.code===A);if(B.length===0)return;const P=Ib({code:B[0].code,name:B[0].name,img:B[0].logo.url});E>=4&&((M=this.initOptions)!=null&&M.isEmbedded)&&this.containerMoreNetworks?this.containerMoreNetworks.innerHTML+=P:E>=4&&!((R=this.initOptions)!=null&&R.isEmbedded)&&this.modalContainerMoreNetworks?this.modalContainerMoreNetworks.innerHTML+=P:(L=this.initOptions)!=null&&L.isEmbedded&&this.containerNetworkList?this.containerNetworkList.innerHTML+=P:this.modalContainerNetworkList&&(this.modalContainerNetworkList.innerHTML+=P)}),s!=null&&s.networks&&(s==null?void 0:s.networks.length)<=2&&((f=this.btnMoreNetworks)==null||f.classList.add("hidden"),(y=this.modalBtnMoreNetworks)==null||y.classList.add("hidden")),(C=this.initOptions)!=null&&C.isEmbedded?(_=this.containerNetworks)==null||_.classList.remove("hidden"):(N=this.modalContainerNetworks)==null||N.classList.remove("hidden"),this.attachListenerOnNetworks(s.networks)}attachListenerOnNetworks(e){var s;e==null||e.forEach(n=>{var o;const i=(o=this.shadowRoot)==null?void 0:o.getElementById("btnNetwork"+n);i==null||i.addEventListener("click",async()=>{this.setSelectedNetwork(n),await this.showWalletConnectButtons()})}),(s=this.lydianBtnCancelUsdtPayment)==null||s.addEventListener("click",async()=>{this.loadInitialState()})}async getSDKConfig(){var e,s,n,i;if(this.API)try{this.sdkConfig=await this.API.getSDKConfig()}catch{(s=(e=this.initOptions)==null?void 0:e.paymentFailedListener)==null||s.call(e,"Unable to load SDK configuration.")}else(i=(n=this.initOptions)==null?void 0:n.paymentFailedListener)==null||i.call(n,"SDK not initialized.")}async showWalletConnectButtons(){var n,i,o,a,r;if(!this.connectWalletButtonsContainer||!this.containerMoreWallets||!this.containerWalletList)return;this.containerWalletList.innerHTML="",this.containerMoreWallets.innerHTML="",(n=this.initOptions)!=null&&n.isEmbedded?requestAnimationFrame(()=>{var c;return(c=this.containerNetworks)==null?void 0:c.classList.add("hidden")}):requestAnimationFrame(()=>{var c;return(c=this.modalContainerNetworks)==null?void 0:c.classList.add("hidden")}),this.connectWalletButtonsContainer.classList.remove("hidden");const e={id:"manual",name:"Manual QR Code",img:"https://tetherpay.com/images/95de9fd2-da4f-4415-3ec7-bb1befdbc500/public"};(i=this.sdkConfig)!=null&&i.walletConnectEnabled||(this.setSelectedWallet(e),await this.beginWalletConnectTransaction(),(o=this.lydianBtnCancelWalletConnect)==null||o.addEventListener("click",async()=>{this.loadInitialState()})),this.containerWalletManual&&(this.containerWalletManual.innerHTML="",this.containerWalletManual.innerHTML+=tg(e));const s=[{id:"metamask",name:"MetaMask",img:"https://tetherpay.com/images/a0ddd685-4a84-4f5c-ab6d-9796994cf500/public",wcPeerName:"MetaMask Wallet"},{id:"trustwallet",name:"Trust Wallet",img:"https://logowik.com/content/uploads/images/trust-wallet-shield4830.logowik.com.webp",wcPeerName:"Trust Wallet"}];s.forEach((c,l)=>{var h;const d=tg(c,!!((h=this.walletConnectService)!=null&&h.findSession(c)));l>=3&&this.containerMoreWallets?this.containerMoreWallets.innerHTML+=d:this.containerWalletList&&(this.containerWalletList.innerHTML+=d)}),s.length<=3&&((a=this.containerMoreWallets)==null||a.classList.add("hidden")),(r=this.containerWalletList)==null||r.classList.remove("hidden"),this.attachListenerOnWallets([...s,e])}attachListenerOnWallets(e){var s;e.forEach(n=>{var o;const i=(o=this.shadowRoot)==null?void 0:o.getElementById("btnWallet"+n.id);i==null||i.addEventListener("click",async()=>{this.setSelectedWallet(n),await this.beginWalletConnectTransaction()})}),(s=this.lydianBtnCancelWalletConnect)==null||s.addEventListener("click",async()=>{this.loadInitialState()})}async beginWalletConnectTransaction(){var e,s,n,i,o,a,r,c,l,d,h,u,b,f,y,C;if(!this.selectedAsset||!this.selectedNetwork){(s=(e=this.initOptions)==null?void 0:e.paymentFailedListener)==null||s.call(e,"Asset and network selection required.");return}if(!this.initOptions||!this.API){(i=(n=this.initOptions)==null?void 0:n.paymentFailedListener)==null||i.call(n,"Lydian not initialized.");return}if(!this.walletConnectService){(a=(o=this.initOptions)==null?void 0:o.paymentFailedListener)==null||a.call(o,"Wallet Connect not initialized.");return}(r=this.connectWalletButtonsContainer)==null||r.classList.add("hidden"),this.showProcessing("Generating QR Code");try{!this.processingUnderpayment||!((c=this.cryptoTransaction)!=null&&c.transactionId)?this.cryptoTransaction=await this.API.createCryptoTransaction({descriptor:this.initOptions.transaction.descriptor,referenceNumber:this.initOptions.transaction.referenceNumber,amount:this.initOptions.transaction.amount,amountCurrency:this.initOptions.transaction.currency,asset:this.selectedAsset.code,network:this.selectedNetwork}):this.cryptoTransaction=await this.API.collectCryptoTransaction(this.cryptoTransaction.transactionId,{asset:this.selectedAsset.code,network:this.selectedNetwork}),console.log("transaction",this.cryptoTransaction),this.hideProcessing(),this.cryptoTransaction.status===qg?this.initOptions.isEmbedded?((l=this.containerKYCAndTravelRules)==null||l.classList.remove("hidden"),this.cryptoTransaction.supportedDocumentTypes.length>0?(d=this.containerKYCAndTravelRulesDocument)==null||d.classList.remove("hidden"):(h=this.containerKYCAndTravelRulesDocument)==null||h.classList.add("hidden")):((u=this.modalContainerKYCAndTravelRulesContainer)==null||u.classList.remove("hidden"),this.cryptoTransaction.supportedDocumentTypes.length>0?(b=this.modalContainerKYCAndTravelRulesDocument)==null||b.classList.remove("hidden"):(f=this.modalContainerKYCAndTravelRulesDocument)==null||f.classList.add("hidden"),this.modalTitle&&(this.modalTitle.innerText="Submit Your Information")):await this.handleCreatedTransactionAndStartListening()}catch{this.hideProcessing(),(C=(y=this.initOptions)==null?void 0:y.paymentFailedListener)==null||C.call(y,"Unable to create cryptotransaction.")}}async handleCreatedTransactionAndStartListening(){var e,s,n,i,o,a,r,c,l,d;if(!this.selectedAsset||!this.selectedNetwork){(s=(e=this.initOptions)==null?void 0:e.paymentFailedListener)==null||s.call(e,"Asset and network selection required.");return}if(!this.walletConnectService){(i=(n=this.initOptions)==null?void 0:n.paymentFailedListener)==null||i.call(n,"Wallet Connect not initialized.");return}if(!this.cryptoTransaction){(a=(o=this.initOptions)==null?void 0:o.paymentFailedListener)==null||a.call(o,"Crypto transaction not created..");return}if(this.selectedWallet.id=="manual")this.showQRCode(this.cryptoTransaction.qrData,this.cryptoTransaction.assetAmount,this.cryptoTransaction.address,this.cryptoTransaction.additionalCustomerFee);else{let h=(r=this.walletConnectService)==null?void 0:r.findSession(this.selectedWallet);if(console.log("selected wallet",this.selectedWallet),console.log("matching wallet session",h),!h){const{uri:y,approval:C}=await((c=this.walletConnectService)==null?void 0:c.connectWalletWithQrCode());y&&this.showQRCode(y,this.cryptoTransaction.assetAmount,this.cryptoTransaction.address,this.cryptoTransaction.additionalCustomerFee),h=await C(),console.log("Session established:",h),this.walletConnectService.currentSession=h,this.hideQRCode()}const u=this.walletConnectService.getSessionAddress(h,"eip155:1");if(!u)throw new Error("failed to find wallet address from current session");const b=eS(this.cryptoTransaction.qrData);console.log("parsedQrCodeData",b);let f;if(this.selectedAsset.code==="USDT")f=wB({fromAddress:u,toAddress:b.address,uint256:parseInt(b.uint256)});else if(this.selectedAsset.code==="USDC")f=CB({fromAddress:u,toAddress:b.address,uint256:parseFloat(b.uint256)*Cl.multiplier});else throw new Error(`unable to encode unkown asset code "${this.selectedAsset.code}"`);try{this.showProcessing(`Waiting for transaction approval from ${h.peer.metadata.name}...`);const y=await this.walletConnectService.sendEthTransaction(f,h);this.hideProcessing(),this.showPaymentSuccess(),this.clearInterval(),(d=(l=this.initOptions)==null?void 0:l.paymentSuccessListener)==null||d.call(l)}catch{this.hideProcessing(),this.showPaymentFailure(),this.clearInterval()}}this.startListeningCryptoTransaction(),wb()&&(window.location.href=this.cryptoTransaction.qrData)}async handleKYCAndTravelRulesFormSubmission(){var b,f,y,C,_,N,A,E,B,P,M,R,L,q,K,j,D,F,p,g,w,T,S,O,z,H,Y,W,X,ee,ie,he,ce,se,I,m,v,x,k,$,U,G,Z,Q,V,ae,pe,ue,te,ne,ge,we,de,be,fe,me,Fe;if(!this.selectedAsset||!this.selectedNetwork){(f=(b=this.initOptions)==null?void 0:b.paymentFailedListener)==null||f.call(b,"Asset and network selection required.");return}if(!this.initOptions||!this.API){(C=(y=this.initOptions)==null?void 0:y.paymentFailedListener)==null||C.call(y,"Lydian not initialized.");return}if(!this.cryptoTransaction){(N=(_=this.initOptions)==null?void 0:_.paymentFailedListener)==null||N.call(_,"Transaction not created.");return}let e,s,n,i,o,a,r,c,l,d,h;if(this.initOptions.isEmbedded?(e=((A=this.email)==null?void 0:A.value)??"",s=((E=this.firstName)==null?void 0:E.value)??"",n=((B=this.lastName)==null?void 0:B.value)??"",i=((P=this.street)==null?void 0:P.value)??"",o=((M=this.city)==null?void 0:M.value)??"",a=((R=this.region)==null?void 0:R.value)??"",r=((L=this.postalCode)==null?void 0:L.value)??"",c=((q=this.country)==null?void 0:q.value)??"",l=((j=(K=this.cryptoTransaction)==null?void 0:K.supportedDocumentTypes)==null?void 0:j.length)>0?((D=this.documentType)==null?void 0:D.value)??"":"",d=((p=(F=this.cryptoTransaction)==null?void 0:F.supportedDocumentTypes)==null?void 0:p.length)>0?(w=(g=this.documentFileFront)==null?void 0:g.files)==null?void 0:w[0]:void 0,h=((S=(T=this.cryptoTransaction)==null?void 0:T.supportedDocumentTypes)==null?void 0:S.length)>0?(z=(O=this.documentFileBack)==null?void 0:O.files)==null?void 0:z[0]:void 0):(e=((H=this.modalEmail)==null?void 0:H.value)??"",s=((Y=this.modalFirstName)==null?void 0:Y.value)??"",n=((W=this.modalLastName)==null?void 0:W.value)??"",i=((X=this.modalStreet)==null?void 0:X.value)??"",o=((ee=this.modalCity)==null?void 0:ee.value)??"",a=((ie=this.modalRegion)==null?void 0:ie.value)??"",r=((he=this.modalPostalCode)==null?void 0:he.value)??"",c=((ce=this.modalCountry)==null?void 0:ce.value)??"",l=((I=(se=this.cryptoTransaction)==null?void 0:se.supportedDocumentTypes)==null?void 0:I.length)>0?((m=this.modalDocumentType)==null?void 0:m.value)??"":"",d=((x=(v=this.cryptoTransaction)==null?void 0:v.supportedDocumentTypes)==null?void 0:x.length)>0?($=(k=this.modalDocumentFileFront)==null?void 0:k.files)==null?void 0:$[0]:void 0,h=((G=(U=this.cryptoTransaction)==null?void 0:U.supportedDocumentTypes)==null?void 0:G.length)>0?(Q=(Z=this.modalDocumentFileBack)==null?void 0:Z.files)==null?void 0:Q[0]:void 0),(V=this.cryptoTransaction)!=null&&V.requiredFields.includes(e)&&e==""){alert("Please enter your email address.");return}else if((ae=this.cryptoTransaction)!=null&&ae.requiredFields.includes("firstName")&&s==""){alert("Please enter your first name.");return}else if((pe=this.cryptoTransaction)!=null&&pe.requiredFields.includes("lastName")&&n==""){alert("Please enter your last name.");return}else if((ue=this.cryptoTransaction)!=null&&ue.requiredFields.includes("address")&&(i==""||o==""||a==""||r==""||c=="")){alert("Please enter your complete address.");return}else if(((ne=(te=this.cryptoTransaction)==null?void 0:te.supportedDocumentTypes)==null?void 0:ne.length)>0&&!d){alert("Please upload front image of the selected document.");return}else if(((we=(ge=this.cryptoTransaction)==null?void 0:ge.supportedDocumentTypes)==null?void 0:we.length)>0&&(l==="ID_CARD"||l==="DRIVERS")&&!h){alert("Please upload back image of the selected document.");return}this.showProcessing("Submitting your information"),requestAnimationFrame(()=>{var He;return(He=this.modalContainerKYCAndTravelRulesContainer)==null?void 0:He.classList.add("hidden")}),(de=this.containerKYCAndTravelRules)==null||de.classList.add("hidden");const u={asset:this.selectedAsset.code,network:this.selectedNetwork,email:e,firstName:s,lastName:n,street:i,city:o,region:a,postalCode:r,country:c,documentType:((fe=(be=this.cryptoTransaction)==null?void 0:be.supportedDocumentTypes)==null?void 0:fe.length)>0?l:void 0,documentFiles:d?[d]:[]};(l==="ID_CARD"||l==="DRIVERS")&&h&&u.documentFiles.push(h);try{this.cryptoTransaction=await this.API.kycVerification(this.cryptoTransaction.transactionId,u),console.log("transaction",this.cryptoTransaction),this.hideProcessing(),await this.handleCreatedTransactionAndStartListening()}catch{this.hideProcessing(),this.showPaymentFailure(),this.clearInterval(),(Fe=(me=this.initOptions)==null?void 0:me.paymentFailedListener)==null||Fe.call(me,"Unable to verify customer.")}}}customElements.get("lydian-checkout")||customElements.define("lydian-checkout",DB);async function SB(t){const e=document.querySelector("lydian-checkout");if(!t.publishableKey||!t.transaction.amount||!t.transaction.currency)throw new Error("SDK initialization requires a baseURI, publishableKey, and transaction");if(!Dl(t.transaction.currency))throw new Error("Invalid value for currency, valid values are: "+_a.join(", "));await e.getMerchantConfiguration(t)}async function BB(t){await document.querySelector("lydian-checkout").updateTransaction(t)}window.Lydian={init:SB,updateTransaction:BB}})();
|