@catena/cli 0.4.0 → 0.5.1

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/README.md CHANGED
@@ -131,12 +131,30 @@ pnpm dlx @catena/cli accounts list
131
131
 
132
132
  ### `counterparties list`
133
133
 
134
- List counterparties and their rails. Use rail ids from this output with `send`.
134
+ List counterparties, their status, and their rails. Use rail ids from this
135
+ output with `send`.
135
136
 
136
137
  ```bash
137
138
  pnpm dlx @catena/cli counterparties list
138
139
  ```
139
140
 
141
+ ### `counterparties create`
142
+
143
+ Request creation of a counterparty with an email but no payment details. This
144
+ saves the counterparty without sending an email. The command returns an intent
145
+ envelope; policy may complete it, block it, or route it to approval.
146
+
147
+ ```bash
148
+ pnpm dlx @catena/cli counterparties create \
149
+ --name "Acme Vendor" \
150
+ --email billing@acme.test
151
+ ```
152
+
153
+ Required flags: `--name`, `--email`.
154
+
155
+ `counterparties create email` is an equivalent explicit form. Use the `bank` or
156
+ `wallet` subcommand when payment details are available.
157
+
140
158
  ### `counterparties create bank`
141
159
 
142
160
  Request creation of a bank-rail counterparty. The command returns an intent
@@ -177,6 +195,21 @@ Required flags: `--name`, `--address`.
177
195
  Optional flags: `--network` (defaults to `base`; Base is the only supported
178
196
  wallet network), `--email`.
179
197
 
198
+ ### `counterparties request-details`
199
+
200
+ Ask an existing counterparty to provide bank details, wallet details, or both.
201
+ The request follows policy and may require human approval.
202
+
203
+ ```bash
204
+ pnpm dlx @catena/cli counterparties request-details cp_... --bank
205
+ ```
206
+
207
+ Pass at least one of `--bank` or `--wallet`. `--idempotency-key` is optional.
208
+ Without it, a request is not permanently deduplicated: another request is
209
+ rejected while the current invitation is outstanding, but creates a new intent
210
+ after that invitation expires. To recover an exact submission after a lost
211
+ response, retry with the same explicit `--idempotency-key`.
212
+
180
213
  ### `send`
181
214
 
182
215
  Request a USD send to a counterparty rail.
@@ -310,6 +343,8 @@ Every command supports `--help`.
310
343
  pnpm dlx @catena/cli --help
311
344
  pnpm dlx @catena/cli send --help
312
345
  pnpm dlx @catena/cli counterparties create --help
346
+ pnpm dlx @catena/cli counterparties create email --help
313
347
  pnpm dlx @catena/cli counterparties create bank --help
314
348
  pnpm dlx @catena/cli counterparties create wallet --help
349
+ pnpm dlx @catena/cli counterparties request-details --help
315
350
  ```
@@ -0,0 +1 @@
1
+ import{_ as e}from"./dist-B0qgGwAq.mjs";function t(e){return r(i(e))}function n(n,r){let i=n.padStart(Math.ceil(n.length/2)*2,`0`);return t(e(i,r).reduce((e,t)=>e+String.fromCharCode(t),``))}function r(e){return e.replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function i(e){if(arguments.length===0)throw TypeError(`1 argument required, but only 0 present.`);let t;for(e=`${e}`,t=0;t<e.length;t++)if(e.charCodeAt(t)>255)throw Error(`InvalidCharacterError: found code point greater than 255:${e.charCodeAt(t)} at position ${t}`);let n=``;for(t=0;t<e.length;t+=3){let r=[void 0,void 0,void 0,void 0];r[0]=e.charCodeAt(t)>>2,r[1]=(e.charCodeAt(t)&3)<<4,e.length>t+1&&(r[1]|=e.charCodeAt(t+1)>>4,r[2]=(e.charCodeAt(t+1)&15)<<2),e.length>t+2&&(r[2]|=e.charCodeAt(t+2)>>6,r[3]=e.charCodeAt(t+2)&63);for(let e=0;e<r.length;e++)r[e]===void 0?n+=`=`:n+=a(r[e])}return n}function a(e){if(e>=0&&e<64)return`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`[e]}export{t as n,n as t};
@@ -0,0 +1,3 @@
1
+ import*as e from"node:crypto";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},c=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),l=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},u=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},d=(e,r,i)=>(i=e==null?{}:t(a(e)),u(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),f=e=>o.call(e,`module.exports`)?e[`module.exports`]:u(n({},`__esModule`,{value:!0}),e);function p(e){return e.reduce((e,t)=>e+t.toString(16).padStart(2,`0`),``)}const m=(e,t)=>{if(!e||e.length%2!=0||!/^[0-9A-Fa-f]+$/.test(e))throw Error(`cannot create uint8array from invalid hex string: "${e}"`);let n=new Uint8Array(e.match(/../g).map(e=>parseInt(e,16)));if(!t)return n;if(e.length/2>t)throw Error(`hex value cannot fit in a buffer of `+t+` byte(s)`);let r=new Uint8Array(t);return r.set(n,t-n.length),r},h=(e,t)=>{let n=t-e.length;if(n>0){let t=new Uint8Array(n).fill(0);return new Uint8Array([...t,...e])}if(n<0){let r=n*-1,i=0;for(let t=0;t<r&&t<e.length;t++)e[t]===0&&i++;if(i!==r)throw Error(`invalid number of starting zeroes. Expected number of zeroes: ${r}. Found: ${i}.`);return e.slice(r,r+t)}return e};function g(e){if(e.length>=255)throw TypeError(`Alphabet too long`);let t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let n=0;n<e.length;n++){let r=e.charAt(n),i=r.charCodeAt(0);if(t[i]!==255)throw TypeError(r+` is ambiguous`);t[i]=n}let n=e.length,r=e.charAt(0),i=Math.log(n)/Math.log(256),a=Math.log(256)/Math.log(n);function o(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError(`Expected Uint8Array`);if(t.length===0)return``;let i=0,o=0,s=0,c=t.length;for(;s!==c&&t[s]===0;)s++,i++;let l=(c-s)*a+1>>>0,u=new Uint8Array(l);for(;s!==c;){let e=t[s],r=0;for(let t=l-1;(e!==0||r<o)&&t!==-1;t--,r++)e+=256*u[t]>>>0,u[t]=e%n>>>0,e=e/n>>>0;if(e!==0)throw Error(`Non-zero carry`);o=r,s++}let d=l-o;for(;d!==l&&u[d]===0;)d++;let f=r.repeat(i);for(;d<l;++d)f+=e.charAt(u[d]);return f}function s(e){if(typeof e!=`string`)throw TypeError(`Expected String`);if(e.length===0)return new Uint8Array;let a=0,o=0,s=0;for(;e[a]===r;)o++,a++;let c=(e.length-a)*i+1>>>0,l=new Uint8Array(c);for(;a<e.length;){let r=e.charCodeAt(a);if(r>255)return;let i=t[r];if(i===255)return;let o=0;for(let e=c-1;(i!==0||o<s)&&e!==-1;e--,o++)i+=n*l[e]>>>0,l[e]=i%256>>>0,i=i/256>>>0;if(i!==0)throw Error(`Non-zero carry`);s=o,a++}let u=c-s;for(;u!==c&&l[u]===0;)u++;let d=new Uint8Array(o+(c-u)),f=o;for(;u!==c;)d[f++]=l[u++];return d}function c(e){let t=s(e);if(t)return t;throw Error(`Non-base`+n+` character`)}return{encode:o,decodeUnsafe:s,decode:c}}var _=l({default:()=>v}),v=g(`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`);function y(e){let t=e;for(;t&&!(t.encode&&t.decode&&t.decodeUnsafe)&&t.default;)t=t.default;return t}y(_);const b=e&&typeof e==`object`&&`webcrypto`in e?e.webcrypto:e&&typeof e==`object`&&`randomBytes`in e?e:void 0;
2
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
3
+ function x(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function S(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`positive integer expected, got `+e)}function C(e,...t){if(!x(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length `+t+`, got length=`+e.length)}function w(e){if(typeof e!=`function`||typeof e.create!=`function`)throw Error(`Hash should be wrapped by utils.createHasher`);S(e.outputLen),S(e.blockLen)}function T(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function E(e,t){C(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least `+n)}function D(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function O(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function k(e,t){return e<<32-t|e>>>t}const A=typeof Uint8Array.from([]).toHex==`function`&&typeof Uint8Array.fromHex==`function`,ee=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function te(e){if(C(e),A)return e.toHex();let t=``;for(let n=0;n<e.length;n++)t+=ee[e[n]];return t}const j={_0:48,_9:57,A:65,F:70,a:97,f:102};function M(e){if(e>=j._0&&e<=j._9)return e-j._0;if(e>=j.A&&e<=j.F)return e-(j.A-10);if(e>=j.a&&e<=j.f)return e-(j.a-10)}function ne(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);if(A)return Uint8Array.fromHex(e);let t=e.length,n=t/2;if(t%2)throw Error(`hex string expected, got unpadded hex of length `+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=M(e.charCodeAt(i)),a=M(e.charCodeAt(i+1));if(n===void 0||a===void 0){let t=e[i]+e[i+1];throw Error(`hex string expected, got non-hex character "`+t+`" at index `+i)}r[t]=n*16+a}return r}function re(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function N(e){return typeof e==`string`&&(e=re(e)),C(e),e}function ie(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];C(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let i=e[t];n.set(i,r),r+=i.length}return n}var P=class{};function F(e){let t=t=>e().update(N(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ae(e=32){if(b&&typeof b.getRandomValues==`function`)return b.getRandomValues(new Uint8Array(e));if(b&&typeof b.randomBytes==`function`)return Uint8Array.from(b.randomBytes(e));throw Error(`crypto.getRandomValues must be defined`)}function oe(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}function se(e,t,n){return e&t^~e&n}function ce(e,t,n){return e&t^e&n^t&n}var I=class extends P{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=O(this.buffer)}update(e){T(this),e=N(e),C(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=O(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){T(this),E(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,D(this.buffer.subarray(a)),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;oe(n,r-8,BigInt(this.length*8),i),this.process(n,0);let o=O(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen should be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}};const L=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),R=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),z=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),B=BigInt(2**32-1),V=BigInt(32);function le(e,t=!1){return t?{h:Number(e&B),l:Number(e>>V&B)}:{h:Number(e>>V&B)|0,l:Number(e&B)|0}}function ue(e,t=!1){let n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let a=0;a<n;a++){let{h:n,l:o}=le(e[a],t);[r[a],i[a]]=[n,o]}return[r,i]}const H=(e,t,n)=>e>>>n,U=(e,t,n)=>e<<32-n|t>>>n,W=(e,t,n)=>e>>>n|t<<32-n,G=(e,t,n)=>e<<32-n|t>>>n,K=(e,t,n)=>e<<64-n|t>>>n-32,q=(e,t,n)=>e>>>n-32|t<<64-n;function J(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}const de=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),fe=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,pe=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),me=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,he=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),ge=(e,t,n,r,i,a)=>t+n+r+i+a+(e/2**32|0)|0,_e=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]),Y=new Uint32Array(64);var ve=class extends I{constructor(e=32){super(64,e,8,!1),this.A=L[0]|0,this.B=L[1]|0,this.C=L[2]|0,this.D=L[3]|0,this.E=L[4]|0,this.F=L[5]|0,this.G=L[6]|0,this.H=L[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,t){for(let n=0;n<16;n++,t+=4)Y[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=Y[e-15],n=Y[e-2],r=k(t,7)^k(t,18)^t>>>3,i=k(n,17)^k(n,19)^n>>>10;Y[e]=i+Y[e-7]+r+Y[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=k(o,6)^k(o,11)^k(o,25),u=l+t+se(o,s,c)+_e[e]+Y[e]|0,d=(k(n,2)^k(n,13)^k(n,22))+ce(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){D(Y)}destroy(){this.set(0,0,0,0,0,0,0,0),D(this.buffer)}};const X=ue(`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`.split(`.`).map(e=>BigInt(e))),ye=X[0],be=X[1],Z=new Uint32Array(80),Q=new Uint32Array(80);var xe=class extends I{constructor(e=64){super(128,e,16,!1),this.Ah=z[0]|0,this.Al=z[1]|0,this.Bh=z[2]|0,this.Bl=z[3]|0,this.Ch=z[4]|0,this.Cl=z[5]|0,this.Dh=z[6]|0,this.Dl=z[7]|0,this.Eh=z[8]|0,this.El=z[9]|0,this.Fh=z[10]|0,this.Fl=z[11]|0,this.Gh=z[12]|0,this.Gl=z[13]|0,this.Hh=z[14]|0,this.Hl=z[15]|0}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:a,Dh:o,Dl:s,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:p,Hh:m,Hl:h}=this;return[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h]}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=r|0,this.Ch=i|0,this.Cl=a|0,this.Dh=o|0,this.Dl=s|0,this.Eh=c|0,this.El=l|0,this.Fh=u|0,this.Fl=d|0,this.Gh=f|0,this.Gl=p|0,this.Hh=m|0,this.Hl=h|0}process(e,t){for(let n=0;n<16;n++,t+=4)Z[n]=e.getUint32(t),Q[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=Z[e-15]|0,n=Q[e-15]|0,r=W(t,n,1)^W(t,n,8)^H(t,n,7),i=G(t,n,1)^G(t,n,8)^U(t,n,7),a=Z[e-2]|0,o=Q[e-2]|0,s=W(a,o,19)^K(a,o,61)^H(a,o,6),c=G(a,o,19)^q(a,o,61)^U(a,o,6),l=pe(i,c,Q[e-7],Q[e-16]),u=me(l,r,s,Z[e-7],Z[e-16]);Z[e]=u|0,Q[e]=l|0}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:o,Cl:s,Dh:c,Dl:l,Eh:u,El:d,Fh:f,Fl:p,Gh:m,Gl:h,Hh:g,Hl:_}=this;for(let e=0;e<80;e++){let t=W(u,d,14)^W(u,d,18)^K(u,d,41),v=G(u,d,14)^G(u,d,18)^q(u,d,41),y=u&f^~u&m,b=d&p^~d&h,x=he(_,v,b,be[e],Q[e]),S=ge(x,g,t,y,ye[e],Z[e]),C=x|0,w=W(n,r,28)^K(n,r,34)^K(n,r,39),T=G(n,r,28)^q(n,r,34)^q(n,r,39),E=n&i^n&o^i&o,D=r&a^r&s^a&s;g=m|0,_=h|0,m=f|0,h=p|0,f=u|0,p=d|0,{h:u,l:d}=J(c|0,l|0,S|0,C|0),c=o|0,l=s|0,o=i|0,s=a|0,i=n|0,a=r|0;let O=de(C,T,D);n=fe(O,S,w,E),r=O|0}({h:n,l:r}=J(this.Ah|0,this.Al|0,n|0,r|0)),{h:i,l:a}=J(this.Bh|0,this.Bl|0,i|0,a|0),{h:o,l:s}=J(this.Ch|0,this.Cl|0,o|0,s|0),{h:c,l}=J(this.Dh|0,this.Dl|0,c|0,l|0),{h:u,l:d}=J(this.Eh|0,this.El|0,u|0,d|0),{h:f,l:p}=J(this.Fh|0,this.Fl|0,f|0,p|0),{h:m,l:h}=J(this.Gh|0,this.Gl|0,m|0,h|0),{h:g,l:_}=J(this.Hh|0,this.Hl|0,g|0,_|0),this.set(n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_)}roundClean(){D(Z,Q)}destroy(){D(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},Se=class extends xe{constructor(){super(48),this.Ah=R[0]|0,this.Al=R[1]|0,this.Bh=R[2]|0,this.Bl=R[3]|0,this.Ch=R[4]|0,this.Cl=R[5]|0,this.Dh=R[6]|0,this.Dl=R[7]|0,this.Eh=R[8]|0,this.El=R[9]|0,this.Fh=R[10]|0,this.Fl=R[11]|0,this.Gh=R[12]|0,this.Gl=R[13]|0,this.Hh=R[14]|0,this.Hl=R[15]|0}};const Ce=F(()=>new ve),we=F(()=>new xe),Te=F(()=>new Se),$=Ce;function Ee(e){function t(t){var n=Uint8Array.from(t),r=e(n),i=n.length+4,a=new Uint8Array(i);return a.set(n,0),a.set(r.subarray(0,4),n.length),v.encode(a)}function n(t){var n=t.slice(0,-4),r=t.slice(-4),i=e(n);if(!(r[0]^i[0]|r[1]^i[1]|r[2]^i[2]|r[3]^i[3]))return n}function r(e){var t=v.decodeUnsafe(e);if(t!=null)return n(t)}function i(e){var t=n(v.decode(e));if(t==null)throw Error(`Invalid checksum`);return t}return{encode:t,decode:i,decodeUnsafe:r}}var De=l({default:()=>ke});function Oe(e){return $($(e))}var ke=Ee(Oe);function Ae(e){let t=e;for(;t&&!(t.encode&&t.decode&&t.decodeUnsafe)&&t.default;)t=t.default;return t}Ae(De);export{d as C,f as S,m as _,C as a,s as b,S as c,ie as d,ne as f,h as g,N as h,P as i,te as l,ae as m,Te as n,T as o,x as p,we as r,w as s,Ce as t,D as u,p as v,l as x,c as y};