Login with Hive Keychain
Enter your Hive username to sign in securely.
Welcome to HiveComb
HiveComb runs on Hive — an open, decentralized blockchain where your posts, votes, and communities belong to you, not a company. To get started, follow these steps:
Create a Hive account
Set up your free account — it only takes a minute.
Install Hive Keychain
A browser extension that securely signs your transactions — your keys never leave your device.
Refresh & log in
Once Keychain is installed, refresh this page and click Login again.
Need help? Join our Discord and we'll help you get set up.
No account? Create one
Having trouble creating your account? Come to our Discord and we'll get you set up.
No posts found
Try adjusting your filters or wait for the worker to classify more posts.
No posts found
Try adjusting your filters or wait for the worker to classify more posts.
No posts found
Try adjusting your filters or wait for the worker to classify more posts.
Welcome to HiveComb!
Choose your default filters to see the content you care about most.
Languages
Categories
Sentiment
RE: Propolis Wallet v1 (AR)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Propolis Wallet</title>
<script type="module" crossorigin>(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))r(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function t(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(n){if(n.ep)return;n.ep=!0;const s=t(n);fetch(n.href,s)}})();/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Wt(o){return o instanceof Uint8Array||ArrayBuffer.isView(o)&&o.constructor.name==="Uint8Array"}function We(o,e=""){if(!Number.isSafeInteger(o)||o<0){const t=e&&`"${e}" `;throw new Error(`${t}expected integer >= 0, got ${o}`)}}function Z(o,e,t=""){const r=Wt(o),n=o?.length,s=e!==void 0;if(!r||s&&n!==e){const i=t&&`"${t}" `,c=s?` of length ${e}`:"",a=r?`length=${n}`:`type=${typeof o}`;throw new Error(i+"expected Uint8Array"+c+", got "+a)}return o}function Ir(o){if(typeof o!="function"||typeof o.create!="function")throw new Error("Hash must wrapped by utils.createHasher");We(o.outputLen),We(o.blockLen)}function yt(o,e=!0){if(o.destroyed)throw new Error("Hash instance has been destroyed");if(e&&o.finished)throw new Error("Hash#digest() has already been called")}function Io(o,e){Z(o,void 0,"digestInto() output");const t=e.outputLen;if(o.length<t)throw new Error('"digestInto() output" expected to be of length >='+t)}function qe(...o){for(let e=0;e<o.length;e++)o[e].fill(0)}function St(o){return new DataView(o.buffer,o.byteOffset,o.byteLength)}function pe(o,e){return o<<32-e|o>>>e}function ct(o,e){return o<<e|o>>>32-e>>>0}const $r=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",$o=Array.from({length:256},(o,e)=>e.toString(16).padStart(2,"0"));function be(o){if(Z(o),$r)return o.toHex();let e="";for(let t=0;t<o.length;t++)e+=$o[o[t]];return e}const Be={_0:48,_9:57,A:65,F:70,a:97,f:102};function cr(o){if(o>=Be._0&&o<=Be._9)return o-Be._0;if(o>=Be.A&&o<=Be.F)return o-(Be.A-10);if(o>=Be.a&&o<=Be.f)return o-(Be.a-10)}function ye(o){if(typeof o!="string")throw new Error("hex string expected, got "+typeof o);if($r)return Uint8Array.fromHex(o);const e=o.length,t=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(t);for(let n=0,s=0;n<t;n++,s+=2){const i=cr(o.charCodeAt(s)),c=cr(o.charCodeAt(s+1));if(i===void 0||c===void 0){const a=o[s]+o[s+1];throw new Error('hex string expected, got non-hex character "'+a+'" at index '+s)}r[n]=i*16+c}return r}function Oe(...o){let e=0;for(let r=0;r<o.length;r++){const n=o[r];Z(n),e+=n.length}const t=new Uint8Array(e);for(let r=0,n=0;r<o.length;r++){const s=o[r];t.set(s,n),n+=s.length}return t}function Kt(o,e={}){const t=(n,s)=>o(s).update(n).digest(),r=o(void 0);return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>o(n),Object.assign(t,e),Object.freeze(t)}function Mr(o=32){const e=typeof globalThis=="object"?globalThis.crypto:null;if(typeof e?.getRandomValues!="function")throw new Error("crypto.getRandomValues must be defined");return e.getRandomValues(new Uint8Array(o))}const Or=o=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,o])});/**
* [@license](/@license) bytebuffer.ts (c) 2015 Daniel Wirtz <dcode@dcode.io>
* Backing buffer: ArrayBuffer, Accessor: DataView
* Released under the Apache License, Version 2.0
* see: https://github.com/dcodeIO/bytebuffer.ts for details
* modified by @xmcl/bytebuffer
* And customized for hive-tx
*/const lt=new ArrayBuffer(0),Mo=new TextEncoder,lr=new TextDecoder;class T{constructor(e=T.DEFAULT_CAPACITY,t=T.DEFAULT_ENDIAN){this.readUInt32=this.readUint32,this.buffer=e===0?lt:new ArrayBuffer(e),this.view=e===0?new DataView(lt):new DataView(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=e,this.littleEndian=t}static allocate(e,t){return new T(e,t)}static concat(e,t){let r=0;for(let c=0;c<e.length;++c){const a=e[c];if(a instanceof T)r+=a.limit-a.offset;else if(a instanceof Uint8Array)r+=a.length;else if(a instanceof ArrayBuffer)r+=a.byteLength;else if(Array.isArray(a))r+=a.length;else throw TypeError("Illegal buffer")}if(r===0)return new T(0,t);const n=new T(r,t),s=new Uint8Array(n.buffer);let i=0;for(let c=0;c<e.length;++c){let a=e[c];a instanceof T?(s.set(new Uint8Array(a.buffer,a.offset,a.limit-a.offset),i),i+=a.limit-a.offset):a instanceof Uint8Array?(s.set(a,i),i+=a.length):a instanceof ArrayBuffer?(s.set(new Uint8Array(a),i),i+=a.byteLength):(s.set(a,i),i+=a.length)}return n.limit=n.offset=i,n.offset=0,n}static wrap(e,t){if(e instanceof T){const n=e.clone();return n.markedOffset=-1,n}let r;if(e instanceof Uint8Array)r=new T(0,t),e.length>0&&(r.buffer=e.buffer,r.offset=e.byteOffset,r.limit=e.byteOffset+e.byteLength,r.view=new DataView(e.buffer));else if(e instanceof ArrayBuffer)r=new T(0,t),e.byteLength>0&&(r.buffer=e,r.offset=0,r.limit=e.byteLength,r.view=e.byteLength>0?new DataView(e):new DataView(lt));else if(Array.isArray(e))r=new T(e.length,t),r.limit=e.length,new Uint8Array(r.buffer).set(e);else throw TypeError("Illegal buffer");return r}writeBytes(e,t){return this.append(e,t)}writeInt8(e,t){const r=typeof t>"u";return r?t=this.offset:t=t,t+1>this.buffer.byteLength&&this.resize(t+1),this.view.setInt8(t,e),r&&(this.offset+=1),this}writeByte(e,t){return this.writeInt8(e,t)}writeUint8(e,t){const r=typeof t>"u";return r?t=this.offset:t=t,t+1>this.buffer.byteLength&&this.resize(t+1),this.view.setUint8(t,e),r&&(this.offset+=1),this}writeUInt8(e,t){return this.writeUint8(e,t)}readUint8(e){const t=typeof e>"u";t?e=this.offset:e=e;const r=this.view.getUint8(e);return t&&(this.offset+=1),r}readUInt8(e){return this.readUint8(e)}writeInt16(e,t){const r=typeof t>"u";return r?t=this.offset:t=t,t+2>this.buffer.byteLength&&this.resize(t+2),this.view.setInt16(t,e,this.littleEndian),r&&(this.offset+=2),this}writeShort(e,t){return this.writeInt16(e,t)}writeUint16(e,t){const r=typeof t>"u";return r?t=this.offset:t=t,t+2>this.buffer.byteLength&&this.resize(t+2),this.view.setUint16(t,e,this.littleEndian),r&&(this.offset+=2),this}writeUInt16(e,t){return this.writeUint16(e,t)}writeInt32(e,t){const r=typeof t>"u";return r?t=this.offset:t=t,t+4>this.buffer.byteLength&&this.resize(t+4),this.view.setInt32(t,e,this.littleEndian),r&&(this.offset+=4),this}writeInt(e,t){return this.writeInt32(e,t)}writeUint32(e,t){const r=typeof t>"u";return r?t=this.offset:t=t,t+4>this.buffer.byteLength&&this.resize(t+4),this.view.setUint32(t,e,this.littleEndian),r&&(this.offset+=4),this}writeUInt32(e,t){return this.writeUint32(e,t)}readUint32(e){const t=typeof e>"u";t?e=this.offset:e=e;const r=this.view.getUint32(e,this.littleEndian);return t&&(this.offset+=4),r}append(e,t){const r=typeof t>"u";r?t=this.offset:t=t;let n;return e instanceof T?(n=new Uint8Array(e.buffer,e.offset,e.limit-e.offset),e.offset+=n.length):e instanceof Uint8Array?n=e:e instanceof ArrayBuffer?n=new Uint8Array(e):n=new Uint8Array(e),n.length<=0?this:(t+n.length>this.buffer.byteLength&&this.resize(t+n.length),new Uint8Array(this.buffer).set(n,t),r&&(this.offset+=n.length),this)}clone(e){const t=new T(0,this.littleEndian);return e?(t.buffer=new ArrayBuffer(this.buffer.byteLength),new Uint8Array(t.buffer).set(new Uint8Array(this.buffer)),t.view=new DataView(t.buffer)):(t.buffer=this.buffer,t.view=this.view),t.offset=this.offset,t.markedOffset=this.markedOffset,t.limit=this.limit,t}copy(e,t){if(e===void 0&&(e=this.offset),t===void 0&&(t=this.limit),e===t)return new T(0,this.littleEndian);const r=t-e,n=new T(r,this.littleEndian);return n.offset=0,n.limit=r,new Uint8Array(n.buffer).set(new Uint8Array(this.buffer).subarray(e,t),0),n}copyTo(e,t,r,n){const s=typeof t>"u",i=typeof r>"u";t=s?e.offset:t,r=i?this.offset:r,n=n===void 0?this.limit:n;const c=n-r;return c===0?e:(e.ensureCapacity(t+c),new Uint8Array(e.buffer).set(new Uint8Array(this.buffer).subarray(r,n),t),i&&(this.offset+=c),s&&(e.offset+=c),this)}ensureCapacity(e){let t=this.buffer.byteLength;return t<e?this.resize((t*=2)>e?t:e):this}flip(){return this.limit=this.offset,this.offset=0,this}resize(e){if(this.buffer.byteLength<e){const t=new ArrayBuffer(e);new Uint8Array(t).set(new Uint8Array(this.buffer)),this.buffer=t,this.view=new DataView(t)}return this}skip(e){return this.offset+=e,this}writeInt64(e,t){const r=typeof t>"u";return r?t=this.offset:t=t,typeof e=="number"&&(e=BigInt(e)),t+8>this.buffer.byteLength&&this.resize(t+8),this.view.setBigInt64(t,e,this.littleEndian),r&&(this.offset+=8),this}writeLong(e,t){return this.writeInt64(e,t)}readInt64(e){const t=typeof e>"u";t?e=this.offset:e=e;const r=this.view.getBigInt64(e,this.littleEndian);return t&&(this.offset+=8),r}readLong(e){return this.readInt64(e)}writeUint64(e,t){const r=typeof t>"u";return r?t=this.offset:t=t,typeof e=="number"&&(e=BigInt(e)),t+8>this.buffer.byteLength&&this.resize(t+8),this.view.setBigUint64(t,e,this.littleEndian),r&&(this.offset+=8),this}writeUInt64(e,t){return this.writeUint64(e,t)}readUint64(e){const t=typeof e>"u";t?e=this.offset:e=e;const r=this.view.getBigUint64(e,this.littleEndian);return t&&(this.offset+=8),r}readUInt64(e){return this.readUint64(e)}toBuffer(e){const t=this.offset,r=this.limit;return!e&&t===0&&r===this.buffer.byteLength?this.buffer:t===r?lt:this.buffer.slice(t,r)}toArrayBuffer(e){return this.toBuffer(e)}writeVarint32(e,t){const r=typeof t>"u";r?t=this.offset:t=t;const n=this.calculateVarint32(e);for(t+n>this.buffer.byteLength&&this.resize(t+n),e>>>=0;e>=128;)this.view.setUint8(t++,e&127|128),e>>>=7;return this.view.setUint8(t++,e),r?(this.offset=t,this):n}readVarint32(e){const t=typeof e>"u";typeof e>"u"&&(e=this.offset);let r=0,n=0,s;do s=this.view.getUint8(e++),r<5&&(n|=(s&127)<<7*r),++r;while((s&128)!==0);return n|=0,t?(this.offset=e,n):{value:n,length:r}}calculateVarint32(e){return e=e>>>0,e<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5}writeVString(e,t){const r=typeof t>"u";let n=r?this.offset:t;const s=Mo.encode(e),i=s.length,c=this.calculateVarint32(i);return n+c+i>this.buffer.byteLength&&this.resize(n+c+i),this.writeVarint32(i,n),n+=c,new Uint8Array(this.buffer).set(s,n),n+=i,r?(this.offset=n,this):n-(t||0)}readVString(e){const t=typeof e>"u";t?e=this.offset:e=e;const r=e,n=this.readVarint32(e),s=n.value,i=n.length;e+=i;const c=lr.decode(new Uint8Array(this.buffer,e,s));return e+=s,t?(this.offset=e,c):{string:c,length:e-r}}readUTF8String(e,t){const r=typeof t>"u";r?t=this.offset:t=t;const n=lr.decode(new Uint8Array(this.buffer,t,e));return r?(this.offset+=e,n):{string:n,length:e}}}T.LITTLE_ENDIAN=!0;T.BIG_ENDIAN=!1;T.DEFAULT_CAPACITY=16;T.DEFAULT_ENDIAN=T.BIG_ENDIAN;function Oo(o,e,t){return o&e^~o&t}function Uo(o,e,t){return o&e^o&t^e&t}class Zt{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,r,n){this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=St(this.buffer)}update(e){yt(this),Z(e);const{view:t,buffer:r,blockLen:n}=this,s=e.length;for(let i=0;i<s;){const c=Math.min(n-this.pos,s-i);if(c===n){const a=St(e);for(;n<=s-i;i+=n)this.process(a,i);continue}r.set(e.subarray(i,i+c),this.pos),this.pos+=c,i+=c,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){yt(this),Io(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:s}=this;let{pos:i}=this;t[i++]=128,qe(this.buffer.subarray(i)),this.padOffset>n-i&&(this.process(r,0),i=0);for(let u=i;u<n;u++)t[u]=0;r.setBigUint64(n-8,BigInt(this.length*8),s),this.process(r,0);const c=St(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const l=a/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;u<l;u++)c.setUint32(4*u,d[u],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||=new this.constructor,e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:s,destroyed:i,pos:c}=this;return e.destroyed=i,e.finished=s,e.length=n,e.pos=c,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const Se=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ee=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),To=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Ur=Uint8Array.from(new Array(16).fill(0).map((o,e)=>e)),Ro=Ur.map(o=>(9*o+5)%16),Tr=(()=>{const t=[[Ur],[Ro]];for(let r=0;r<4;r++)for(let n of t)n.push(n[r].map(s=>To[s]));return t})(),Rr=Tr[0],qr=Tr[1],Nr=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(o=>Uint8Array.from(o)),qo=Rr.map((o,e)=>o.map(t=>Nr[e][t])),No=qr.map((o,e)=>o.map(t=>Nr[e][t])),Do=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),Ho=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function dr(o,e,t,r){return o===0?e^t^r:o===1?e&t|~e&r:o===2?(e|~t)^r:o===3?e&r|t&~r:e^(t|~r)}const dt=new Uint32Array(16);class zo extends Zt{h0=1732584193;h1=-271733879;h2=-1732584194;h3=271733878;h4=-1009589776;constructor(){super(64,20,8,!0)}get(){const{h0:e,h1:t,h2:r,h3:n,h4:s}=this;return[e,t,r,n,s]}set(e,t,r,n,s){this.h0=e|0,this.h1=t|0,this.h2=r|0,this.h3=n|0,this.h4=s|0}process(e,t){for(let h=0;h<16;h++,t+=4)dt[h]=e.getUint32(t,!0);let r=this.h0|0,n=r,s=this.h1|0,i=s,c=this.h2|0,a=c,l=this.h3|0,d=l,u=this.h4|0,f=u;for(let h=0;h<5;h++){const p=4-h,b=Do[h],w=Ho[h],k=Rr[h],B=qr[h],C=qo[h],E=No[h];for(let R=0;R<16;R++){const V=ct(r+dr(h,s,c,l)+dt[k[R]]+b,C[R])+u|0;r=u,u=l,l=ct(c,10)|0,c=s,s=V}for(let R=0;R<16;R++){const V=ct(n+dr(p,i,a,d)+dt[B[R]]+w,E[R])+f|0;n=f,f=d,d=ct(a,10)|0,a=i,i=V}}this.set(this.h1+c+d|0,this.h2+l+f|0,this.h3+u+n|0,this.h4+r+i|0,this.h0+s+a|0)}roundClean(){qe(dt)}destroy(){this.destroyed=!0,qe(this.buffer),this.set(0,0,0,0,0)}}const Vo=Kt(()=>new zo);function Fo(o){if(o.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<o.length;l++){const d=o.charAt(l),u=d.charCodeAt(0);if(e[u]!==255)throw new TypeError(d+" is ambiguous");e[u]=l}const t=o.length,r=o.charAt(0),n=Math.log(t)/Math.log(256),s=Math.log(256)/Math.log(t);function i(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,u=0,f=0;const h=l.length;for(;f!==h&&l[f]===0;)f++,d++;const p=(h-f)*s+1>>>0,b=new Uint8Array(p);for(;f!==h;){let B=l[f],C=0;for(let E=p-1;(B!==0||C<u)&&E!==-1;E--,C++)B+=256*b[E]>>>0,b[E]=B%t>>>0,B=B/t>>>0;if(B!==0)throw new Error("Non-zero carry");u=C,f++}let w=p-u;for(;w!==p&&b[w]===0;)w++;let k=r.repeat(d);for(;w<p;++w)k+=o.charAt(b[w]);return k}function c(l){if(typeof l!="string")throw new TypeError("Expected String");if(l.length===0)return new Uint8Array;let d=0,u=0,f=0;for(;l[d]===r;)u++,d++;const h=(l.length-d)*n+1>>>0,p=new Uint8Array(h);for(;d<l.length;){const B=l.charCodeAt(d);if(B>255)return;let C=e[B];if(C===255)return;let E=0;for(let R=h-1;(C!==0||E<f)&&R!==-1;R--,E++)C+=t*p[R]>>>0,p[R]=C%256>>>0,C=C/256>>>0;if(C!==0)throw new Error("Non-zero carry");f=E,d++}let b=h-f;for(;b!==h&&p[b]===0;)b++;const w=new Uint8Array(u+(h-b));let k=u;for(;b!==h;)w[k++]=p[b++];return w}function a(l){const d=c(l);if(d)return d;throw new Error("Non-base"+t+" character")}return{encode:i,decodeUnsafe:c,decode:a}}var jo="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";const rt=Fo(jo),ae={nodes:["https://api.hive.blog","https://api.deathwing.me","https://api.openhive.network","https://rpc.mahdiyari.info","https://techcoderx.com","https://hiveapi.actifit.io","https://api.c0ff33a.uk"],restNodes:["https://api.hive.blog","https://rpc.mahdiyari.info","https://techcoderx.com","https://hiveapi.actifit.io","https://api.c0ff33a.uk"],chain_id:"beeab0de00000000000000000000000000000000000000000000000000000000",address_prefix:"STM",timeout:1e4,retry:8},ut=BigInt(2**32-1),ur=BigInt(32);function Wo(o,e=!1){return e?{h:Number(o&ut),l:Number(o>>ur&ut)}:{h:Number(o>>ur&ut)|0,l:Number(o&ut)|0}}function Ko(o,e=!1){const t=o.length;let r=new Uint32Array(t),n=new Uint32Array(t);for(let s=0;s<t;s++){const{h:i,l:c}=Wo(o[s],e);[r[s],n[s]]=[i,c]}return[r,n]}const fr=(o,e,t)=>o>>>t,hr=(o,e,t)=>o<<32-t|e>>>t,Ze=(o,e,t)=>o>>>t|e<<32-t,Xe=(o,e,t)=>o<<32-t|e>>>t,ft=(o,e,t)=>o<<64-t|e>>>t-32,ht=(o,e,t)=>o>>>t-32|e<<64-t;function ve(o,e,t,r){const n=(e>>>0)+(r>>>0);return{h:o+t+(n/2**32|0)|0,l:n|0}}const Zo=(o,e,t)=>(o>>>0)+(e>>>0)+(t>>>0),Xo=(o,e,t,r)=>e+t+r+(o/2**32|0)|0,Yo=(o,e,t,r)=>(o>>>0)+(e>>>0)+(t>>>0)+(r>>>0),Go=(o,e,t,r,n)=>e+t+r+n+(o/2**32|0)|0,Qo=(o,e,t,r,n)=>(o>>>0)+(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),Jo=(o,e,t,r,n,s)=>e+t+r+n+s+(o/2**32|0)|0,en=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]),Ae=new Uint32Array(64);class tn extends Zt{constructor(e){super(64,e,8,!1)}get(){const{A:e,B:t,C:r,D:n,E:s,F:i,G:c,H:a}=this;return[e,t,r,n,s,i,c,a]}set(e,t,r,n,s,i,c,a){this.A=e|0,this.B=t|0,this.C=r|0,this.D=n|0,this.E=s|0,this.F=i|0,this.G=c|0,this.H=a|0}process(e,t){for(let u=0;u<16;u++,t+=4)Ae[u]=e.getUint32(t,!1);for(let u=16;u<64;u++){const f=Ae[u-15],h=Ae[u-2],p=pe(f,7)^pe(f,18)^f>>>3,b=pe(h,17)^pe(h,19)^h>>>10;Ae[u]=b+Ae[u-7]+p+Ae[u-16]|0}let{A:r,B:n,C:s,D:i,E:c,F:a,G:l,H:d}=this;for(let u=0;u<64;u++){const f=pe(c,6)^pe(c,11)^pe(c,25),h=d+f+Oo(c,a,l)+en[u]+Ae[u]|0,b=(pe(r,2)^pe(r,13)^pe(r,22))+Uo(r,n,s)|0;d=l,l=a,a=c,c=i+h|0,i=s,s=n,n=r,r=h+b|0}r=r+this.A|0,n=n+this.B|0,s=s+this.C|0,i=i+this.D|0,c=c+this.E|0,a=a+this.F|0,l=l+this.G|0,d=d+this.H|0,this.set(r,n,s,i,c,a,l,d)}roundClean(){qe(Ae)}destroy(){this.set(0,0,0,0,0,0,0,0),qe(this.buffer)}}class rn extends tn{A=Se[0]|0;B=Se[1]|0;C=Se[2]|0;D=Se[3]|0;E=Se[4]|0;F=Se[5]|0;G=Se[6]|0;H=Se[7]|0;constructor(){super(32)}}const Dr=Ko(["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(o=>BigInt(o))),on=Dr[0],nn=Dr[1],Le=new Uint32Array(80),Ie=new Uint32Array(80);class sn extends Zt{constructor(e){super(128,e,16,!1)}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:s,Cl:i,Dh:c,Dl:a,Eh:l,El:d,Fh:u,Fl:f,Gh:h,Gl:p,Hh:b,Hl:w}=this;return[e,t,r,n,s,i,c,a,l,d,u,f,h,p,b,w]}set(e,t,r,n,s,i,c,a,l,d,u,f,h,p,b,w){this.Ah=e|0,this.Al=t|0,this.Bh=r|0,this.Bl=n|0,this.Ch=s|0,this.Cl=i|0,this.Dh=c|0,this.Dl=a|0,this.Eh=l|0,this.El=d|0,this.Fh=u|0,this.Fl=f|0,this.Gh=h|0,this.Gl=p|0,this.Hh=b|0,this.Hl=w|0}process(e,t){for(let C=0;C<16;C++,t+=4)Le[C]=e.getUint32(t),Ie[C]=e.getUint32(t+=4);for(let C=16;C<80;C++){const E=Le[C-15]|0,R=Ie[C-15]|0,V=Ze(E,R,1)^Ze(E,R,8)^fr(E,R,7),oe=Xe(E,R,1)^Xe(E,R,8)^hr(E,R,7),X=Le[C-2]|0,U=Ie[C-2]|0,de=Ze(X,U,19)^ft(X,U,61)^fr(X,U,6),se=Xe(X,U,19)^ht(X,U,61)^hr(X,U,6),D=Yo(oe,se,Ie[C-7],Ie[C-16]),_=Go(D,V,de,Le[C-7],Le[C-16]);Le[C]=_|0,Ie[C]=D|0}let{Ah:r,Al:n,Bh:s,Bl:i,Ch:c,Cl:a,Dh:l,Dl:d,Eh:u,El:f,Fh:h,Fl:p,Gh:b,Gl:w,Hh:k,Hl:B}=this;for(let C=0;C<80;C++){const E=Ze(u,f,14)^Ze(u,f,18)^ft(u,f,41),R=Xe(u,f,14)^Xe(u,f,18)^ht(u,f,41),V=u&h^~u&b,oe=f&p^~f&w,X=Qo(B,R,oe,nn[C],Ie[C]),U=Jo(X,k,E,V,on[C],Le[C]),de=X|0,se=Ze(r,n,28)^ft(r,n,34)^ft(r,n,39),D=Xe(r,n,28)^ht(r,n,34)^ht(r,n,39),_=r&s^r&c^s&c,v=n&i^n&a^i&a;k=b|0,B=w|0,b=h|0,w=p|0,h=u|0,p=f|0,{h:u,l:f}=ve(l|0,d|0,U|0,de|0),l=c|0,d=a|0,c=s|0,a=i|0,s=r|0,i=n|0;const y=Zo(de,D,v);r=Xo(y,U,se,_),n=y|0}({h:r,l:n}=ve(this.Ah|0,this.Al|0,r|0,n|0)),{h:s,l:i}=ve(this.Bh|0,this.Bl|0,s|0,i|0),{h:c,l:a}=ve(this.Ch|0,this.Cl|0,c|0,a|0),{h:l,l:d}=ve(this.Dh|0,this.Dl|0,l|0,d|0),{h:u,l:f}=ve(this.Eh|0,this.El|0,u|0,f|0),{h,l:p}=ve(this.Fh|0,this.Fl|0,h|0,p|0),{h:b,l:w}=ve(this.Gh|0,this.Gl|0,b|0,w|0),{h:k,l:B}=ve(this.Hh|0,this.Hl|0,k|0,B|0),this.set(r,n,s,i,c,a,l,d,u,f,h,p,b,w,k,B)}roundClean(){qe(Le,Ie)}destroy(){qe(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class an extends sn{Ah=ee[0]|0;Al=ee[1]|0;Bh=ee[2]|0;Bl=ee[3]|0;Ch=ee[4]|0;Cl=ee[5]|0;Dh=ee[6]|0;Dl=ee[7]|0;Eh=ee[8]|0;El=ee[9]|0;Fh=ee[10]|0;Fl=ee[11]|0;Gh=ee[12]|0;Gl=ee[13]|0;Hh=ee[14]|0;Hl=ee[15]|0;constructor(){super(64)}}const Ke=Kt(()=>new rn,Or(1)),Hr=Kt(()=>new an,Or(3));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Xt=BigInt(0),Nt=BigInt(1);function kt(o,e=""){if(typeof o!="boolean"){const t=e&&`"${e}" `;throw new Error(t+"expected boolean, got type="+typeof o)}return o}function zr(o){if(typeof o=="bigint"){if(!gt(o))throw new Error("positive bigint expected, got "+o)}else We(o);return o}function mt(o){const e=zr(o).toString(16);return e.length&1?"0"+e:e}function Vr(o){if(typeof o!="string")throw new Error("hex string expected, got "+typeof o);return o===""?Xt:BigInt("0x"+o)}function xt(o){return Vr(be(o))}function Fr(o){return Vr(be(cn(Z(o)).reverse()))}function Yt(o,e){We(e),o=zr(o);const t=ye(o.toString(16).padStart(e*2,"0"));if(t.length!==e)throw new Error("number too large");return t}function jr(o,e){return Yt(o,e).reverse()}function cn(o){return Uint8Array.from(o)}const gt=o=>typeof o=="bigint"&&Xt<=o;function ln(o,e,t){return gt(o)&>(e)&>(t)&&e<=o&&o<t}function dn(o,e,t,r){if(!ln(e,t,r))throw new Error("expected valid "+o+": "+t+" <= n < "+r+", got "+e)}function un(o){let e;for(e=0;o>Xt;o>>=Nt,e+=1);return e}const Gt=o=>(Nt<<BigInt(o))-Nt;function fn(o,e,t){if(We(o,"hashLen"),We(e,"qByteLen"),typeof t!="function")throw new Error("hmacFn must be a function");const r=w=>new Uint8Array(w),n=Uint8Array.of(),s=Uint8Array.of(0),i=Uint8Array.of(1),c=1e3;let a=r(o),l=r(o),d=0;const u=()=>{a.fill(1),l.fill(0),d=0},f=(...w)=>t(l,Oe(a,...w)),h=(w=n)=>{l=f(s,w),a=f(),w.length!==0&&(l=f(i,w),a=f())},p=()=>{if(d++>=c)throw new Error("drbg: tried max amount of iterations");let w=0;const k=[];for(;w<e;){a=f();const B=a.slice();k.push(B),w+=a.length}return Oe(...k)};return(w,k)=>{u(),h(w);let B;for(;!(B=k(p()));)h();return u(),B}}function Qt(o,e={},t={}){if(!o||typeof o!="object")throw new Error("expected valid options object");function r(s,i,c){const a=o[s];if(c&&a===void 0)return;const l=typeof a;if(l!==i||a===null)throw new Error(`param "${s}" is invalid: expected ${i}, got ${l}`)}const n=(s,i)=>Object.entries(s).forEach(([c,a])=>r(c,a,i));n(e,!1),n(t,!0)}function mr(o){const e=new WeakMap;return(t,...r)=>{const n=e.get(t);if(n!==void 0)return n;const s=o(t,...r);return e.set(t,s),s}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ne=BigInt(0),re=BigInt(1),He=BigInt(2),Wr=BigInt(3),Kr=BigInt(4),Zr=BigInt(5),hn=BigInt(7),Xr=BigInt(8),mn=BigInt(9),Yr=BigInt(16);function ue(o,e){const t=o%e;return t>=ne?t:e+t}function ie(o,e,t){let r=o;for(;e-- >ne;)r*=r,r%=t;return r}function wr(o,e){if(o===ne)throw new Error("invert: expected non-zero number");if(e<=ne)throw new Error("invert: expected positive modulus, got "+e);let t=ue(o,e),r=e,n=ne,s=re;for(;t!==ne;){const c=r/t,a=r%t,l=n-s*c;r=t,t=a,n=s,s=l}if(r!==re)throw new Error("invert: does not exist");return ue(n,e)}function Jt(o,e,t){if(!o.eql(o.sqr(e),t))throw new Error("Cannot find square root")}function Gr(o,e){const t=(o.ORDER+re)/Kr,r=o.pow(e,t);return Jt(o,r,e),r}function wn(o,e){const t=(o.ORDER-Zr)/Xr,r=o.mul(e,He),n=o.pow(r,t),s=o.mul(e,n),i=o.mul(o.mul(s,He),n),c=o.mul(s,o.sub(i,o.ONE));return Jt(o,c,e),c}function pn(o){const e=Pt(o),t=Qr(o),r=t(e,e.neg(e.ONE)),n=t(e,r),s=t(e,e.neg(r)),i=(o+hn)/Yr;return(c,a)=>{let l=c.pow(a,i),d=c.mul(l,r);const u=c.mul(l,n),f=c.mul(l,s),h=c.eql(c.sqr(d),a),p=c.eql(c.sqr(u),a);l=c.cmov(l,d,h),d=c.cmov(f,u,p);const b=c.eql(c.sqr(d),a),w=c.cmov(l,d,b);return Jt(c,w,a),w}}function Qr(o){if(o<Wr)throw new Error("sqrt is not defined for small field");let e=o-re,t=0;for(;e%He===ne;)e/=He,t++;let r=He;const n=Pt(o);for(;pr(n,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(t===1)return Gr;let s=n.pow(r,e);const i=(e+re)/He;return function(a,l){if(a.is0(l))return l;if(pr(a,l)!==1)throw new Error("Cannot find square root");let d=t,u=a.mul(a.ONE,s),f=a.pow(l,e),h=a.pow(l,i);for(;!a.eql(f,a.ONE);){if(a.is0(f))return a.ZERO;let p=1,b=a.sqr(f);for(;!a.eql(b,a.ONE);)if(p++,b=a.sqr(b),p===d)throw new Error("Cannot find square root");const w=re<<BigInt(d-p-1),k=a.pow(u,w);d=p,u=a.sqr(k),f=a.mul(f,u),h=a.mul(h,k)}return h}}function gn(o){return o%Kr===Wr?Gr:o%Xr===Zr?wn:o%Yr===mn?pn(o):Qr(o)}const bn=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function yn(o){const e={ORDER:"bigint",BYTES:"number",BITS:"number"},t=bn.reduce((r,n)=>(r[n]="function",r),e);return Qt(o,t),o}function kn(o,e,t){if(t<ne)throw new Error("invalid exponent, negatives unsupported");if(t===ne)return o.ONE;if(t===re)return e;let r=o.ONE,n=e;for(;t>ne;)t&re&&(r=o.mul(r,n)),n=o.sqr(n),t>>=re;return r}function Jr(o,e,t=!1){const r=new Array(e.length).fill(t?o.ZERO:void 0),n=e.reduce((i,c,a)=>o.is0(c)?i:(r[a]=i,o.mul(i,c)),o.ONE),s=o.inv(n);return e.reduceRight((i,c,a)=>o.is0(c)?i:(r[a]=o.mul(i,r[a]),o.mul(i,c)),s),r}function pr(o,e){const t=(o.ORDER-re)/He,r=o.pow(e,t),n=o.eql(r,o.ONE),s=o.eql(r,o.ZERO),i=o.eql(r,o.neg(o.ONE));if(!n&&!s&&!i)throw new Error("invalid Legendre symbol result");return n?1:s?0:-1}function Bn(o,e){e!==void 0&&We(e);const t=e!==void 0?e:o.toString(2).length,r=Math.ceil(t/8);return{nBitLength:t,nByteLength:r}}class vn{ORDER;BITS;BYTES;isLE;ZERO=ne;ONE=re;_lengths;_sqrt;_mod;constructor(e,t={}){if(e<=ne)throw new Error("invalid field: expected ORDER > 0, got "+e);let r;this.isLE=!1,t!=null&&typeof t=="object"&&(typeof t.BITS=="number"&&(r=t.BITS),typeof t.sqrt=="function"&&(this.sqrt=t.sqrt),typeof t.isLE=="boolean"&&(this.isLE=t.isLE),t.allowedLengths&&(this._lengths=t.allowedLengths?.slice()),typeof t.modFromBytes=="boolean"&&(this._mod=t.modFromBytes));const{nBitLength:n,nByteLength:s}=Bn(e,r);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=e,this.BITS=n,this.BYTES=s,this._sqrt=void 0,Object.preventExtensions(this)}create(e){return ue(e,this.ORDER)}isValid(e){if(typeof e!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof e);return ne<=e&&e<this.ORDER}is0(e){return e===ne}isValidNot0(e){return!this.is0(e)&&this.isValid(e)}isOdd(e){return(e&re)===re}neg(e){return ue(-e,this.ORDER)}eql(e,t){return e===t}sqr(e){return ue(e*e,this.ORDER)}add(e,t){return ue(e+t,this.ORDER)}sub(e,t){return ue(e-t,this.ORDER)}mul(e,t){return ue(e*t,this.ORDER)}pow(e,t){return kn(this,e,t)}div(e,t){return ue(e*wr(t,this.ORDER),this.ORDER)}sqrN(e){return e*e}addN(e,t){return e+t}subN(e,t){return e-t}mulN(e,t){return e*t}inv(e){return wr(e,this.ORDER)}sqrt(e){return this._sqrt||(this._sqrt=gn(this.ORDER)),this._sqrt(this,e)}toBytes(e){return this.isLE?jr(e,this.BYTES):Yt(e,this.BYTES)}fromBytes(e,t=!1){Z(e);const{_lengths:r,BYTES:n,isLE:s,ORDER:i,_mod:c}=this;if(r){if(!r.includes(e.length)||e.length>n)throw new Error("Field.fromBytes: expected "+r+" bytes, got "+e.length);const l=new Uint8Array(n);l.set(e,s?0:l.length-e.length),e=l}if(e.length!==n)throw new Error("Field.fromBytes: expected "+n+" bytes, got "+e.length);let a=s?Fr(e):xt(e);if(c&&(a=ue(a,i)),!t&&!this.isValid(a))throw new Error("invalid field element: outside of range 0..ORDER");return a}invertBatch(e){return Jr(this,e)}cmov(e,t,r){return r?t:e}}function Pt(o,e={}){return new vn(o,e)}function eo(o){if(typeof o!="bigint")throw new Error("field order must be bigint");const e=o.toString(2).length;return Math.ceil(e/8)}function to(o){const e=eo(o);return e+Math.ceil(e/2)}function _n(o,e,t=!1){Z(o);const r=o.length,n=eo(e),s=to(e);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const i=t?Fr(o):xt(o),c=ue(i,e-re)+re;return t?jr(c,n):Yt(c,n)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const tt=BigInt(0),ze=BigInt(1);function Bt(o,e){const t=e.negate();return o?t:e}function gr(o,e){const t=Jr(o.Fp,e.map(r=>r.Z));return e.map((r,n)=>o.fromAffine(r.toAffine(t[n])))}function ro(o,e){if(!Number.isSafeInteger(o)||o<=0||o>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+o)}function At(o,e){ro(o,e);const t=Math.ceil(e/o)+1,r=2**(o-1),n=2**o,s=Gt(o),i=BigInt(o);return{windows:t,windowSize:r,mask:s,maxNumber:n,shiftBy:i}}function br(o,e,t){const{windowSize:r,mask:n,maxNumber:s,shiftBy:i}=t;let c=Number(o&n),a=o>>i;c>r&&(c-=s,a+=ze);const l=e*r,d=l+Math.abs(c)-1,u=c===0,f=c<0,h=e%2!==0;return{nextN:a,offset:d,isZero:u,isNeg:f,isNegF:h,offsetF:l}}const Lt=new WeakMap,oo=new WeakMap;function It(o){return oo.get(o)||1}function yr(o){if(o!==tt)throw new Error("invalid wNAF")}class Cn{BASE;ZERO;Fn;bits;constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,r=this.ZERO){let n=e;for(;t>tt;)t&ze&&(r=r.add(n)),n=n.double(),t>>=ze;return r}precomputeWindow(e,t){const{windows:r,windowSize:n}=At(t,this.bits),s=[];let i=e,c=i;for(let a=0;a<r;a++){c=i,s.push(c);for(let l=1;l<n;l++)c=c.add(i),s.push(c);i=c.double()}return s}wNAF(e,t,r){if(!this.Fn.isValid(r))throw new Error("invalid scalar");let n=this.ZERO,s=this.BASE;const i=At(e,this.bits);for(let c=0;c<i.windows;c++){const{nextN:a,offset:l,isZero:d,isNeg:u,isNegF:f,offsetF:h}=br(r,c,i);r=a,d?s=s.add(Bt(f,t[h])):n=n.add(Bt(u,t[l]))}return yr(r),{p:n,f:s}}wNAFUnsafe(e,t,r,n=this.ZERO){const s=At(e,this.bits);for(let i=0;i<s.windows&&r!==tt;i++){const{nextN:c,offset:a,isZero:l,isNeg:d}=br(r,i,s);if(r=c,!l){const u=t[a];n=n.add(d?u.negate():u)}}return yr(r),n}getPrecomputes(e,t,r){let n=Lt.get(t);return n||(n=this.precomputeWindow(t,e),e!==1&&(typeof r=="function"&&(n=r(n)),Lt.set(t,n))),n}cached(e,t,r){const n=It(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)}unsafe(e,t,r,n){const s=It(e);return s===1?this._unsafeLadder(e,t,n):this.wNAFUnsafe(s,this.getPrecomputes(s,e,r),t,n)}createCache(e,t){ro(t,this.bits),oo.set(e,t),Lt.delete(e)}hasCache(e){return It(e)!==1}}function xn(o,e,t,r){let n=e,s=o.ZERO,i=o.ZERO;for(;t>tt||r>tt;)t&ze&&(s=s.add(n)),r&ze&&(i=i.add(n)),n=n.double(),t>>=ze,r>>=ze;return{p1:s,p2:i}}function kr(o,e,t){if(e){if(e.ORDER!==o)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return yn(e),e}else return Pt(o,{isLE:t})}function Pn(o,e,t={},r){if(r===void 0&&(r=o==="edwards"),!e||typeof e!="object")throw new Error(`expected valid ${o} CURVE object`);for(const a of["p","n","h"]){const l=e[a];if(!(typeof l=="bigint"&&l>tt))throw new Error(`CURVE.${a} must be positive bigint`)}const n=kr(e.p,t.Fp,r),s=kr(e.n,t.Fn,r),c=["Gx","Gy","a","b"];for(const a of c)if(!n.isValid(e[a]))throw new Error(`CURVE.${a} must be valid field element of CURVE.Fp`);return e=Object.freeze(Object.assign({},e)),{CURVE:e,Fp:n,Fn:s}}function En(o,e){return function(r){const n=o(r);return{secretKey:n,publicKey:e(n)}}}class no{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(e,t){if(Ir(e),Z(t,void 0,"key"),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 r=this.blockLen,n=new Uint8Array(r);n.set(t.length>r?e.create().update(t).digest():t);for(let s=0;s<n.length;s++)n[s]^=54;this.iHash.update(n),this.oHash=e.create();for(let s=0;s<n.length;s++)n[s]^=106;this.oHash.update(n),qe(n)}update(e){return yt(this),this.iHash.update(e),this}digestInto(e){yt(this),Z(e,this.outputLen,"output"),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||=Object.create(Object.getPrototypeOf(this),{});const{oHash:t,iHash:r,finished:n,destroyed:s,blockLen:i,outputLen:c}=this;return e=e,e.finished=n,e.destroyed=s,e.blockLen=i,e.outputLen=c,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const so=(o,e,t)=>new no(o,e).update(t).digest();so.create=(o,e)=>new no(o,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Br=(o,e)=>(o+(o>=0?e:-e)/io)/e;function Sn(o,e,t){const[[r,n],[s,i]]=e,c=Br(i*o,t),a=Br(-n*o,t);let l=o-c*r-a*s,d=-c*n-a*i;const u=l<Pe,f=d<Pe;u&&(l=-l),f&&(d=-d);const h=Gt(Math.ceil(un(t)/2))+Je;if(l<Pe||l>=h||d<Pe||d>=h)throw new Error("splitScalar (endomorphism): failed, k="+o);return{k1neg:u,k1:l,k2neg:f,k2:d}}function Dt(o){if(!["compact","recovered","der"].includes(o))throw new Error('Signature format must be "compact", "recovered", or "der"');return o}function $t(o,e){const t={};for(let r of Object.keys(e))t[r]=o[r]===void 0?e[r]:o[r];return kt(t.lowS,"lowS"),kt(t.prehash,"prehash"),t.format!==void 0&&Dt(t.format),t}class An extends Error{constructor(e=""){super(e)}}const Me={Err:An,_tlv:{encode:(o,e)=>{const{Err:t}=Me;if(o<0||o>256)throw new t("tlv.encode: wrong tag");if(e.length&1)throw new t("tlv.encode: unpadded data");const r=e.length/2,n=mt(r);if(n.length/2&128)throw new t("tlv.encode: long form length too big");const s=r>127?mt(n.length/2|128):"";return mt(o)+s+n+e},decode(o,e){const{Err:t}=Me;let r=0;if(o<0||o>256)throw new t("tlv.encode: wrong tag");if(e.length<2||e[r++]!==o)throw new t("tlv.decode: wrong tlv");const n=e[r++],s=!!(n&128);let i=0;if(!s)i=n;else{const a=n&127;if(!a)throw new t("tlv.decode(long): indefinite length not supported");if(a>4)throw new t("tlv.decode(long): byte length is too big");const l=e.subarray(r,r+a);if(l.length!==a)throw new t("tlv.decode: length bytes not complete");if(l[0]===0)throw new t("tlv.decode(long): zero leftmost byte");for(const d of l)i=i<<8|d;if(r+=a,i<128)throw new t("tlv.decode(long): not minimal encoding")}const c=e.subarray(r,r+i);if(c.length!==i)throw new t("tlv.decode: wrong value length");return{v:c,l:e.subarray(r+i)}}},_int:{encode(o){const{Err:e}=Me;if(o<Pe)throw new e("integer: negative integers are not allowed");let t=mt(o);if(Number.parseInt(t[0],16)&8&&(t="00"+t),t.length&1)throw new e("unexpected DER parsing assertion: unpadded hex");return t},decode(o){const{Err:e}=Me;if(o[0]&128)throw new e("invalid signature integer: negative");if(o[0]===0&&!(o[1]&128))throw new e("invalid signature integer: unnecessary leading zero");return xt(o)}},toSig(o){const{Err:e,_int:t,_tlv:r}=Me,n=Z(o,void 0,"signature"),{v:s,l:i}=r.decode(48,n);if(i.length)throw new e("invalid signature: left bytes after parsing");const{v:c,l:a}=r.decode(2,s),{v:l,l:d}=r.decode(2,a);if(d.length)throw new e("invalid signature: left bytes after parsing");return{r:t.decode(c),s:t.decode(l)}},hexFromSig(o){const{_tlv:e,_int:t}=Me,r=e.encode(2,t.encode(o.r)),n=e.encode(2,t.encode(o.s)),s=r+n;return e.encode(48,s)}},Pe=BigInt(0),Je=BigInt(1),io=BigInt(2),wt=BigInt(3),Ln=BigInt(4);function In(o,e={}){const t=Pn("weierstrass",o,e),{Fp:r,Fn:n}=t;let s=t.CURVE;const{h:i,n:c}=s;Qt(e,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});const{endo:a}=e;if(a&&(!r.is0(s.a)||typeof a.beta!="bigint"||!Array.isArray(a.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const l=co(r,n);function d(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function u(D,_,v){const{x:y,y:x}=_.toAffine(),S=r.toBytes(y);if(kt(v,"isCompressed"),v){d();const L=!r.isOdd(x);return Oe(ao(L),S)}else return Oe(Uint8Array.of(4),S,r.toBytes(x))}function f(D){Z(D,void 0,"Point");const{publicKey:_,publicKeyUncompressed:v}=l,y=D.length,x=D[0],S=D.subarray(1);if(y===_&&(x===2||x===3)){const L=r.fromBytes(S);if(!r.isValid(L))throw new Error("bad point: is not on curve, wrong x");const A=b(L);let P;try{P=r.sqrt(A)}catch(Y){const F=Y instanceof Error?": "+Y.message:"";throw new Error("bad point: is not on curve, sqrt error"+F)}d();const O=r.isOdd(P);return(x&1)===1!==O&&(P=r.neg(P)),{x:L,y:P}}else if(y===v&&x===4){const L=r.BYTES,A=r.fromBytes(S.subarray(0,L)),P=r.fromBytes(S.subarray(L,L*2));if(!w(A,P))throw new Error("bad point: is not on curve");return{x:A,y:P}}else throw new Error(`bad point: got length ${y}, expected compressed=${_} or uncompressed=${v}`)}const h=e.toBytes||u,p=e.fromBytes||f;function b(D){const _=r.sqr(D),v=r.mul(_,D);return r.add(r.add(v,r.mul(D,s.a)),s.b)}function w(D,_){const v=r.sqr(_),y=b(D);return r.eql(v,y)}if(!w(s.Gx,s.Gy))throw new Error("bad curve params: generator point");const k=r.mul(r.pow(s.a,wt),Ln),B=r.mul(r.sqr(s.b),BigInt(27));if(r.is0(r.add(k,B)))throw new Error("bad curve params: a or b");function C(D,_,v=!1){if(!r.isValid(_)||v&&r.is0(_))throw new Error(`bad point coordinate ${D}`);return _}function E(D){if(!(D instanceof U))throw new Error("Weierstrass Point expected")}function R(D){if(!a||!a.basises)throw new Error("no endo");return Sn(D,a.basises,n.ORDER)}const V=mr((D,_)=>{const{X:v,Y:y,Z:x}=D;if(r.eql(x,r.ONE))return{x:v,y};const S=D.is0();_==null&&(_=S?r.ONE:r.inv(x));const L=r.mul(v,_),A=r.mul(y,_),P=r.mul(x,_);if(S)return{x:r.ZERO,y:r.ZERO};if(!r.eql(P,r.ONE))throw new Error("invZ was invalid");return{x:L,y:A}}),oe=mr(D=>{if(D.is0()){if(e.allowInfinityPoint&&!r.is0(D.Y))return;throw new Error("bad point: ZERO")}const{x:_,y:v}=D.toAffine();if(!r.isValid(_)||!r.isValid(v))throw new Error("bad point: x or y not field elements");if(!w(_,v))throw new Error("bad point: equation left != right");if(!D.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function X(D,_,v,y,x){return v=new U(r.mul(v.X,D),v.Y,v.Z),_=Bt(y,_),v=Bt(x,v),_.add(v)}class U{static BASE=new U(s.Gx,s.Gy,r.ONE);static ZERO=new U(r.ZERO,r.ONE,r.ZERO);static Fp=r;static Fn=n;X;Y;Z;constructor(_,v,y){this.X=C("x",_),this.Y=C("y",v,!0),this.Z=C("z",y),Object.freeze(this)}static CURVE(){return s}static fromAffine(_){const{x:v,y}=_||{};if(!_||!r.isValid(v)||!r.isValid(y))throw new Error("invalid affine point");if(_ instanceof U)throw new Error("projective point not allowed");return r.is0(v)&&r.is0(y)?U.ZERO:new U(v,y,r.ONE)}static fromBytes(_){const v=U.fromAffine(p(Z(_,void 0,"point")));return v.assertValidity(),v}static fromHex(_){return U.fromBytes(ye(_))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(_=8,v=!0){return se.createCache(this,_),v||this.multiply(wt),this}assertValidity(){oe(this)}hasEvenY(){const{y:_}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(_)}equals(_){E(_);const{X:v,Y:y,Z:x}=this,{X:S,Y:L,Z:A}=_,P=r.eql(r.mul(v,A),r.mul(S,x)),O=r.eql(r.mul(y,A),r.mul(L,x));return P&&O}negate(){return new U(this.X,r.neg(this.Y),this.Z)}double(){const{a:_,b:v}=s,y=r.mul(v,wt),{X:x,Y:S,Z:L}=this;let A=r.ZERO,P=r.ZERO,O=r.ZERO,q=r.mul(x,x),Y=r.mul(S,S),F=r.mul(L,L),H=r.mul(x,S);return H=r.add(H,H),O=r.mul(x,L),O=r.add(O,O),A=r.mul(_,O),P=r.mul(y,F),P=r.add(A,P),A=r.sub(Y,P),P=r.add(Y,P),P=r.mul(A,P),A=r.mul(H,A),O=r.mul(y,O),F=r.mul(_,F),H=r.sub(q,F),H=r.mul(_,H),H=r.add(H,O),O=r.add(q,q),q=r.add(O,q),q=r.add(q,F),q=r.mul(q,H),P=r.add(P,q),F=r.mul(S,L),F=r.add(F,F),q=r.mul(F,H),A=r.sub(A,q),O=r.mul(F,Y),O=r.add(O,O),O=r.add(O,O),new U(A,P,O)}add(_){E(_);const{X:v,Y:y,Z:x}=this,{X:S,Y:L,Z:A}=_;let P=r.ZERO,O=r.ZERO,q=r.ZERO;const Y=s.a,F=r.mul(s.b,wt);let H=r.mul(v,S),j=r.mul(y,L),Q=r.mul(x,A),we=r.add(v,y),W=r.add(S,L);we=r.mul(we,W),W=r.add(H,j),we=r.sub(we,W),W=r.add(v,x);let J=r.add(S,A);return W=r.mul(W,J),J=r.add(H,Q),W=r.sub(W,J),J=r.add(y,x),P=r.add(L,A),J=r.mul(J,P),P=r.add(j,Q),J=r.sub(J,P),q=r.mul(Y,W),P=r.mul(F,Q),q=r.add(P,q),P=r.sub(j,q),q=r.add(j,q),O=r.mul(P,q),j=r.add(H,H),j=r.add(j,H),Q=r.mul(Y,Q),W=r.mul(F,W),j=r.add(j,Q),Q=r.sub(H,Q),Q=r.mul(Y,Q),W=r.add(W,Q),H=r.mul(j,W),O=r.add(O,H),H=r.mul(J,W),P=r.mul(we,P),P=r.sub(P,H),H=r.mul(we,j),q=r.mul(J,q),q=r.add(q,H),new U(P,O,q)}subtract(_){return this.add(_.negate())}is0(){return this.equals(U.ZERO)}multiply(_){const{endo:v}=e;if(!n.isValidNot0(_))throw new Error("invalid scalar: out of range");let y,x;const S=L=>se.cached(this,L,A=>gr(U,A));if(v){const{k1neg:L,k1:A,k2neg:P,k2:O}=R(_),{p:q,f:Y}=S(A),{p:F,f:H}=S(O);x=Y.add(H),y=X(v.beta,q,F,L,P)}else{const{p:L,f:A}=S(_);y=L,x=A}return gr(U,[y,x])[0]}multiplyUnsafe(_){const{endo:v}=e,y=this;if(!n.isValid(_))throw new Error("invalid scalar: out of range");if(_===Pe||y.is0())return U.ZERO;if(_===Je)return y;if(se.hasCache(this))return this.multiply(_);if(v){const{k1neg:x,k1:S,k2neg:L,k2:A}=R(_),{p1:P,p2:O}=xn(U,y,S,A);return X(v.beta,P,O,x,L)}else return se.unsafe(y,_)}toAffine(_){return V(this,_)}isTorsionFree(){const{isTorsionFree:_}=e;return i===Je?!0:_?_(U,this):se.unsafe(this,c).is0()}clearCofactor(){const{clearCofactor:_}=e;return i===Je?this:_?_(U,this):this.multiplyUnsafe(i)}isSmallOrder(){return this.multiplyUnsafe(i).is0()}toBytes(_=!0){return kt(_,"isCompressed"),this.assertValidity(),h(U,this,_)}toHex(_=!0){return be(this.toBytes(_))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}const de=n.BITS,se=new Cn(U,e.endo?Math.ceil(de/2):de);return U.BASE.precompute(8),U}function ao(o){return Uint8Array.of(o?2:3)}function co(o,e){return{secretKey:e.BYTES,publicKey:1+o.BYTES,publicKeyUncompressed:1+2*o.BYTES,publicKeyHasPrefix:!0,signature:2*e.BYTES}}function $n(o,e={}){const{Fn:t}=o,r=e.randomBytes||Mr,n=Object.assign(co(o.Fp,t),{seed:to(t.ORDER)});function s(h){try{const p=t.fromBytes(h);return t.isValidNot0(p)}catch{return!1}}function i(h,p){const{publicKey:b,publicKeyUncompressed:w}=n;try{const k=h.length;return p===!0&&k!==b||p===!1&&k!==w?!1:!!o.fromBytes(h)}catch{return!1}}function c(h=r(n.seed)){return _n(Z(h,n.seed,"seed"),t.ORDER)}function a(h,p=!0){return o.BASE.multiply(t.fromBytes(h)).toBytes(p)}function l(h){const{secretKey:p,publicKey:b,publicKeyUncompressed:w}=n;if(!Wt(h)||"_lengths"in t&&t._lengths||p===b)return;const k=Z(h,void 0,"key").length;return k===b||k===w}function d(h,p,b=!0){if(l(h)===!0)throw new Error("first arg must be private key");if(l(p)===!1)throw new Error("second arg must be public key");const w=t.fromBytes(h);return o.fromBytes(p).multiply(w).toBytes(b)}const u={isValidSecretKey:s,isValidPublicKey:i,randomSecretKey:c},f=En(c,a);return Object.freeze({getPublicKey:a,getSharedSecret:d,keygen:f,Point:o,utils:u,lengths:n})}function Mn(o,e,t={}){Ir(e),Qt(t,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"}),t=Object.assign({},t);const r=t.randomBytes||Mr,n=t.hmac||((v,y)=>so(e,v,y)),{Fp:s,Fn:i}=o,{ORDER:c,BITS:a}=i,{keygen:l,getPublicKey:d,getSharedSecret:u,utils:f,lengths:h}=$n(o,t),p={prehash:!0,lowS:typeof t.lowS=="boolean"?t.lowS:!0,format:"compact",extraEntropy:!1},b=c*io<s.ORDER;function w(v){const y=c>>Je;return v>y}function k(v,y){if(!i.isValidNot0(y))throw new Error(`invalid signature ${v}: out of range 1..Point.Fn.ORDER`);return y}function B(){if(b)throw new Error('"recovered" sig type is not supported for cofactor >2 curves')}function C(v,y){Dt(y);const x=h.signature,S=y==="compact"?x:y==="recovered"?x+1:void 0;return Z(v,S)}class E{r;s;recovery;constructor(y,x,S){if(this.r=k("r",y),this.s=k("s",x),S!=null){if(B(),![0,1,2,3].includes(S))throw new Error("invalid recovery id");this.recovery=S}Object.freeze(this)}static fromBytes(y,x=p.format){C(y,x);let S;if(x==="der"){const{r:O,s:q}=Me.toSig(Z(y));return new E(O,q)}x==="recovered"&&(S=y[0],x="compact",y=y.subarray(1));const L=h.signature/2,A=y.subarray(0,L),P=y.subarray(L,L*2);return new E(i.fromBytes(A),i.fromBytes(P),S)}static fromHex(y,x){return this.fromBytes(ye(y),x)}assertRecovery(){const{recovery:y}=this;if(y==null)throw new Error("invalid recovery id: must be present");return y}addRecoveryBit(y){return new E(this.r,this.s,y)}recoverPublicKey(y){const{r:x,s:S}=this,L=this.assertRecovery(),A=L===2||L===3?x+c:x;if(!s.isValid(A))throw new Error("invalid recovery id: sig.r+curve.n != R.x");const P=s.toBytes(A),O=o.fromBytes(Oe(ao((L&1)===0),P)),q=i.inv(A),Y=V(Z(y,void 0,"msgHash")),F=i.create(-Y*q),H=i.create(S*q),j=o.BASE.multiplyUnsafe(F).add(O.multiplyUnsafe(H));if(j.is0())throw new Error("invalid recovery: point at infinify");return j.assertValidity(),j}hasHighS(){return w(this.s)}toBytes(y=p.format){if(Dt(y),y==="der")return ye(Me.hexFromSig(this));const{r:x,s:S}=this,L=i.toBytes(x),A=i.toBytes(S);return y==="recovered"?(B(),Oe(Uint8Array.of(this.assertRecovery()),L,A)):Oe(L,A)}toHex(y){return be(this.toBytes(y))}}const R=t.bits2int||function(y){if(y.length>8192)throw new Error("input is too large");const x=xt(y),S=y.length*8-a;return S>0?x>>BigInt(S):x},V=t.bits2int_modN||function(y){return i.create(R(y))},oe=Gt(a);function X(v){return dn("num < 2^"+a,v,Pe,oe),i.toBytes(v)}function U(v,y){return Z(v,void 0,"message"),y?Z(e(v),void 0,"prehashed message"):v}function de(v,y,x){const{lowS:S,prehash:L,extraEntropy:A}=$t(x,p);v=U(v,L);const P=V(v),O=i.fromBytes(y);if(!i.isValidNot0(O))throw new Error("invalid private key");const q=[X(O),X(P)];if(A!=null&&A!==!1){const j=A===!0?r(h.secretKey):A;q.push(Z(j,void 0,"extraEntropy"))}const Y=Oe(...q),F=P;function H(j){const Q=R(j);if(!i.isValidNot0(Q))return;const we=i.inv(Q),W=o.BASE.multiply(Q).toAffine(),J=i.create(W.x);if(J===Pe)return;const at=i.create(we*i.create(F+J*O));if(at===Pe)return;let ir=(W.x===J?0:2)|Number(W.y&Je),ar=at;return S&&w(at)&&(ar=i.neg(at),ir^=1),new E(J,ar,b?void 0:ir)}return{seed:Y,k2sig:H}}function se(v,y,x={}){const{seed:S,k2sig:L}=de(v,y,x);return fn(e.outputLen,i.BYTES,n)(S,L).toBytes(x.format)}function D(v,y,x,S={}){const{lowS:L,prehash:A,format:P}=$t(S,p);if(x=Z(x,void 0,"publicKey"),y=U(y,A),!Wt(v)){const O=v instanceof E?", use sig.toBytes()":"";throw new Error("verify expects Uint8Array signature"+O)}C(v,P);try{const O=E.fromBytes(v,P),q=o.fromBytes(x);if(L&&O.hasHighS())return!1;const{r:Y,s:F}=O,H=V(y),j=i.inv(F),Q=i.create(H*j),we=i.create(Y*j),W=o.BASE.multiplyUnsafe(Q).add(q.multiplyUnsafe(we));return W.is0()?!1:i.create(W.x)===Y}catch{return!1}}function _(v,y,x={}){const{prehash:S}=$t(x,p);return y=U(y,S),E.fromBytes(v,"recovered").recoverPublicKey(y).toBytes()}return Object.freeze({keygen:l,getPublicKey:d,getSharedSecret:u,utils:f,lengths:h,Point:o,sign:se,verify:D,recoverPublicKey:_,Signature:E,hash:e})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const er={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},On={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},vr=BigInt(2);function Un(o){const e=er.p,t=BigInt(3),r=BigInt(6),n=BigInt(11),s=BigInt(22),i=BigInt(23),c=BigInt(44),a=BigInt(88),l=o*o*o%e,d=l*l*o%e,u=ie(d,t,e)*d%e,f=ie(u,t,e)*d%e,h=ie(f,vr,e)*l%e,p=ie(h,n,e)*h%e,b=ie(p,s,e)*p%e,w=ie(b,c,e)*b%e,k=ie(w,a,e)*w%e,B=ie(k,c,e)*b%e,C=ie(B,t,e)*d%e,E=ie(C,i,e)*p%e,R=ie(E,r,e)*l%e,V=ie(R,vr,e);if(!Ht.eql(Ht.sqr(V),o))throw new Error("Cannot find square root");return V}const Ht=Pt(er.p,{sqrt:Un}),Tn=In(er,{Fp:Ht,endo:On}),xe=Mn(Tn,Ke);class Et{constructor(e,t,r){this.data=e,this.recovery=t,this.compressed=r??!0}static from(e){if(typeof e=="string"){const t=ye(e);let r=parseInt(be(t.subarray(0,1)),16)-31,n=!0;r<0&&(n=!1,r=r+4);const s=t.subarray(1);return new Et(s,r,n)}else throw new Error("Expected string for data")}toBuffer(){const e=new Uint8Array(65).fill(0);return this.compressed?e[0]=this.recovery+31&255:e[0]=this.recovery+27&255,e.set(this.data,1),e}customToString(){return be(this.toBuffer())}getPublicKey(e){if(e instanceof Uint8Array&&e.length!==32||typeof e=="string"&&e.length!==64)throw new Error("Expected a valid sha256 hash as message");typeof e=="string"&&(e=ye(e));const t=xe.Signature.fromBytes(this.data,"compact"),r=new xe.Signature(t.r,t.s,this.recovery);return new ce(r.recoverPublicKey(e).toBytes())}}const Rn=ae.address_prefix;class ce{constructor(e,t){this.key=e,this.prefix=t??Rn}static fromString(e){const{key:t,prefix:r}=Nn(e);return new ce(t,r)}static from(e){return e instanceof ce?e:ce.fromString(e)}verify(e,t){return typeof t=="string"&&(t=Et.from(t)),xe.verify(t.data,e,this.key,{prehash:!1,format:"compact"})}toString(){return qn(this.key,this.prefix)}toJSON(){return this.toString()}inspect(){return`PublicKey: ${this.toString()}`}}const qn=(o,e)=>{const t=Vo(o);return e+rt.encode(new Uint8Array([...o,...t.subarray(0,4)]))},Nn=o=>{const e=o.slice(0,3);o=o.slice(3);const t=rt.decode(o);return{key:t.subarray(0,t.length-4),prefix:e}};class Ye{constructor(e,t){this.amount=e,this.symbol=t==="HIVE"?"STEEM":t==="HBD"?"SBD":t}static fromString(e,t=null){const[r,n]=e.split(" ");if(["STEEM","VESTS","SBD","TESTS","TBD","HIVE","HBD"].indexOf(n)===-1)throw new Error(`Invalid asset symbol: ${n}`);if(t&&n!==t)throw new Error(`Invalid asset, expected symbol: ${t} got: ${n}`);const s=Number.parseFloat(r);if(!Number.isFinite(s))throw new Error(`Invalid asset amount: ${r}`);return new Ye(s,n)}static from(e,t){if(e instanceof Ye){if(t&&e.symbol!==t)throw new Error(`Invalid asset, expected symbol: ${t} got: ${e.symbol}`);return e}else{if(typeof e=="number"&&Number.isFinite(e))return new Ye(e,t||"STEEM");if(typeof e=="string")return Ye.fromString(e,t);throw new Error(`Invalid asset '${String(e)}'`)}}getPrecision(){switch(this.symbol){case"TESTS":case"TBD":case"STEEM":case"SBD":case"HBD":case"HIVE":return 3;case"VESTS":return 6;default:return 3}}toString(){return`${this.amount.toFixed(this.getPrecision())} ${this.symbol}`}toJSON(){return this.toString()}}class Ge{static from(e){return e instanceof Ge?e:e instanceof Uint8Array?new Ge(e):typeof e=="string"?new Ge(ye(e)):new Ge(new Uint8Array(e))}constructor(e){this.buffer=e}toString(){return be(this.buffer)}toJSON(){return this.toString()}}const $={vote:0,comment:1,transfer:2,transfer_to_vesting:3,withdraw_vesting:4,limit_order_create:5,limit_order_cancel:6,feed_publish:7,convert:8,account_create:9,account_update:10,witness_update:11,account_witness_vote:12,account_witness_proxy:13,custom:15,delete_comment:17,custom_json:18,comment_options:19,set_withdraw_vesting_route:20,limit_order_create2:21,claim_account:22,create_claimed_account:23,request_account_recovery:24,recover_account:25,change_recovery_account:26,escrow_transfer:27,escrow_dispute:28,escrow_release:29,escrow_approve:31,transfer_to_savings:32,transfer_from_savings:33,cancel_transfer_from_savings:34,decline_voting_rights:36,reset_account:37,set_reset_account:38,claim_reward_balance:39,delegate_vesting_shares:40,account_create_with_delegation:41,witness_set_properties:42,account_update2:43,create_proposal:44,update_proposal_votes:45,remove_proposal:46,update_proposal:47,collateralized_convert:48,recurrent_transfer:49},le=()=>{throw new Error("Void can not be serialized")},g=(o,e)=>{o.writeVString(e)},Dn=(o,e)=>{o.writeInt16(e)},lo=(o,e)=>{o.writeInt64(e)},_r=(o,e)=>{o.writeUint8(e)},he=(o,e)=>{o.writeUint16(e)},te=(o,e)=>{o.writeUint32(e)},uo=(o,e)=>{o.writeUint64(e)},Ee=(o,e)=>{o.writeByte(e?1:0)},fo=o=>(e,t)=>{const[r,n]=t;e.writeVarint32(r),o[r](e,n)},z=(o,e)=>{const t=Ye.from(e),r=t.getPrecision();o.writeInt64(Math.round(t.amount*Math.pow(10,r))),o.writeUint8(r);for(let n=0;n<7;n++)o.writeUint8(t.symbol.charCodeAt(n)||0)},Ne=(o,e)=>{o.writeUint32(Math.floor(new Date(e+"Z").getTime()/1e3))},ke=(o,e)=>{e===null||typeof e=="string"&&e.slice(-39)==="1111111111111111111111111111111114T1Anm"?o.append(new Uint8Array(33).fill(0)):o.append(ce.from(e).key)},ho=(o=null)=>(e,t)=>{t=Ge.from(t);const r=t.buffer.length;if(o){if(r!==o)throw new Error(`Unable to serialize binary. Expected ${o} bytes, got ${r}`)}e
Comments
Report Misclassification
Why is this post incorrectly classified?