bsv2 2.0.19 → 2.0.20
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/.babelrc +10 -0
- package/dist/770.module.js +1 -0
- package/dist/921.bundle.js +7 -0
- package/dist/921.mjs +7 -0
- package/dist/main.bundle.js +2 -0
- package/dist/{bsv2.cjs.js → main.cjs.js} +2 -3
- package/dist/main.mjs +2 -0
- package/dist/main.module.js +2 -0
- package/package.json +7 -5
- package/webpack.config.js +59 -8
- package/dist/bsv.bundle.js +0 -3
- package/dist/bsv.bundle.js.LICENSE.txt +0 -10
- package/dist/bsv.bundle.js.map +0 -1
- package/dist/bsv.cjs.js +0 -3
- package/dist/bsv.cjs.js.map +0 -1
- package/dist/bsv.module.js +0 -3
- package/dist/bsv.module.js.LICENSE.txt +0 -1
- package/dist/bsv.module.js.map +0 -1
- package/dist/bsv2.bundle.js +0 -3
- package/dist/bsv2.bundle.js.LICENSE.txt +0 -10
- package/dist/bsv2.bundle.js.map +0 -1
- package/dist/bsv2.cjs.js.LICENSE.txt +0 -1
- package/dist/bsv2.cjs.js.map +0 -1
- package/dist/bsv2.mjs +0 -3
- package/dist/bsv2.mjs.LICENSE.txt +0 -10
- package/dist/bsv2.mjs.map +0 -1
- package/dist/bsv2.module.js +0 -3
- package/dist/bsv2.module.js.LICENSE.txt +0 -1
- package/dist/bsv2.module.js.map +0 -1
- /package/dist/{bsv.cjs.js.LICENSE.txt → main.cjs.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var re=Object.defineProperty;var w=(wt,Bt)=>re(wt,"name",{value:Bt,configurable:!0});(()=>{"use strict";var wt={242:(y,L,x)=>{x.r(L),x.d(L,{Ach:()=>ut,Address:()=>X,Aes:()=>G,Aescbc:()=>et,Base58:()=>ft,Base58Check:()=>$,Bip32:()=>yt,Bip39:()=>Nt,Block:()=>Lt,BlockHeader:()=>Rt,Bn:()=>c,Br:()=>z,Bsm:()=>J,Bw:()=>R,Cbc:()=>A,Constants:()=>P,Ecdsa:()=>j,Ecies:()=>Q,Hash:()=>d,Interp:()=>p,KeyPair:()=>M,OpCode:()=>o,Point:()=>k,PrivKey:()=>Y,PubKey:()=>H,Random:()=>tt,Script:()=>I,Sig:()=>S,SigOperations:()=>Ft,Struct:()=>_,Tx:()=>T,TxBuilder:()=>Zt,TxIn:()=>v,TxOut:()=>q,TxOutMap:()=>Kt,TxVerifier:()=>vt,VarInt:()=>F,Workers:()=>B,WorkersResult:()=>Ht,cmp:()=>it,deps:()=>$t,en:()=>It,es:()=>kt,getConstants:()=>Qt,jp:()=>Pt,version:()=>te});var Z=x(297),D=x.n(Z),V=x(550),C=x.n(V),rt=x(191),st=x.n(rt),xt=x(666),Dt=x.n(xt),jt=x(715),pt=x.n(jt),Vt=x(601),At=x(300);const Gt={i8:"2.0.20"};function c(i,t,...e){if(!(this instanceof c))return new c(i,t,...e);C().call(this,i,t,...e)}w(c,"Bn"),Object.keys(C()).forEach(function(i){c[i]=C()[i]}),c.prototype=Object.create(C().prototype),c.prototype.constructor=c;function Et(i){const t=Buffer.alloc(i.length);for(let e=0;e<i.length;e++)t[e]=i[i.length-1-e];return t}w(Et,"reverseBuf"),c.prototype.fromHex=function(i,t){return this.fromBuffer(Buffer.from(i,"hex"),t)},c.prototype.toHex=function(i){return this.toBuffer(i).toString("hex")},c.prototype.toJSON=function(){return this.toString()},c.prototype.fromJSON=function(i){return c(i).copy(this),this},c.prototype.fromNumber=function(i){return c(i).copy(this),this},c.prototype.toNumber=function(){return parseInt(this.toString(10),10)},c.prototype.fromString=function(i,t){return c(i,t).copy(this),this},c.fromBuffer=function(i,t={endian:"big"}){t.endian==="little"&&(i=Et(i));const e=i.toString("hex");return new c(e,16)},c.prototype.fromBuffer=function(i,t){return c.fromBuffer(i,t).copy(this),this},c.prototype.toBuffer=function(i={size:void 0,endian:"big"}){let t;if(i.size){const r=this.toString(16,2),s=r.length/2;if(t=Buffer.from(r,"hex"),s!==i.size){if(s>i.size)t=t.slice(s-t.length,t.length);else if(s<i.size){const n=Buffer.alloc(i.size);for(let a=0;a<t.length;a++)n[n.length-1-a]=t[t.length-1-a];for(let a=0;a<i.size-s;a++)n[a]=0;t=n}}}else{const r=this.toString(16,2);t=Buffer.from(r,"hex")}i.endian==="little"&&(t=Et(t));const e=Buffer.from([0]);return Buffer.compare(t,e)===0?Buffer.from([]):t},c.prototype.toFastBuffer=c.prototype.toBuffer,c.fromFastBuffer=c.fromBuffer,c.prototype.fromFastBuffer=c.prototype.fromBuffer,c.prototype.fromSm=function(i,t={endian:"big"}){return i.length===0&&this.fromBuffer(Buffer.from([0])),t.endian==="little"&&(i=Et(i)),i[0]&128?(i[0]=i[0]&127,this.fromBuffer(i),this.neg().copy(this)):this.fromBuffer(i),this},c.prototype.toSm=function(i={endian:"big"}){const t=i.endian;let e;return this.cmp(0)===-1?(e=this.neg().toBuffer(),e[0]&128?e=Buffer.concat([Buffer.from([128]),e]):e[0]=e[0]|128):(e=this.toBuffer(),e[0]&128&&(e=Buffer.concat([Buffer.from([0]),e]))),e.length===1&e[0]===0&&(e=Buffer.from([])),t==="little"&&(e=Et(e)),e},c.prototype.fromBits=function(i,t={strict:!1}){let e=Buffer.alloc(4);if(e.writeUInt32BE(i,0),i=e.readInt32BE(0),t.strict&&i&8388608)throw new Error("negative bit set");const r=i>>24,s=i&8388607;if(e=Buffer.alloc(4),e.writeInt32BE(s),r<=3)e=e.slice(1,r+1);else{const n=Buffer.alloc(r-3);n.fill(0),e=Buffer.concat([e,n])}return this.fromBuffer(e),i&8388608&&c(0).sub(this).copy(this),this},c.prototype.toBits=function(){let i;this.lt(0)?i=this.neg().toBuffer():i=this.toBuffer();let t=i.length,e;if(t>3)e=Buffer.concat([Buffer.from([0]),i.slice(0,3)]).readUInt32BE(0);else if(t<=3){const s=Buffer.alloc(3-t+1);s.fill(0),e=Buffer.concat([s,i.slice(0,t)]).readUInt32BE(0)}e&8388608&&(e>>=8,t++),this.lt(0)&&(e|=8388608);const r=t<<24|e;return i=Buffer.alloc(4),i.writeInt32BE(r,0),i.readUInt32BE(0)},c.prototype.fromScriptNumBuffer=function(i,t,e,r=!1){if(e===void 0&&(e=4),i.length>e)throw new Error(`script number overflow nMaxNumSize: ${e}`);if(t&&i.length>0&&!(i[i.length-1]&127)&&(i.length<=1||!(i[i.length-2]&128)))throw new Error("non-minimally encoded script number");return i.byteLength===0||i.byteLength<=e,this.fromSm(i,{endian:"little"})},c.prototype.toScriptNumBuffer=function(i){return this.toSm({endian:"little"})},c.prototype.neg=function(){const i=C().prototype.neg.call(this),t=Object.create(c.prototype);return i.copy(t),t},c.prototype.add=function(i){const t=C().prototype.add.call(this,i);return i=Object.create(c.prototype),t.copy(i),i},c.prototype.sub=function(i){const t=C().prototype.sub.call(this,i);return i=Object.create(c.prototype),t.copy(i),i},c.prototype.mul=function(i){const t=C().prototype.mul.call(this,i);return i=Object.create(c.prototype),t.copy(i),i},c.prototype.mod=function(i){const t=C().prototype.mod.call(this,i);return i=Object.create(c.prototype),t.copy(i),i},c.prototype.umod=function(i){const t=C().prototype.umod.call(this,i);return i=Object.create(c.prototype),t.copy(i),i},c.prototype.invm=function(i){const t=C().prototype.invm.call(this,i);return i=Object.create(c.prototype),t.copy(i),i},c.prototype.div=function(i){const t=C().prototype.div.call(this,i);return i=Object.create(c.prototype),t.copy(i),i},c.prototype.ushln=function(i){const t=C().prototype.ushln.call(this,i),e=Object.create(c.prototype);return t.copy(e),e},c.prototype.ushrn=function(i){const t=C().prototype.ushrn.call(this,i),e=Object.create(c.prototype);return t.copy(e),e},c.prototype.cmp=function(i){return C().prototype.cmp.call(this,i)};function W(i){c.prototype["_"+i]=c.prototype[i];const t=w(function(e){return typeof e=="string"?e=new c(e):typeof e=="number"&&(e=new c(e.toString())),this["_"+i](e)},"f");c.prototype[i]=t}w(W,"decorate"),c.prototype.eq=function(i){return this.cmp(i)===0},c.prototype.neq=function(i){return this.cmp(i)!==0},c.prototype.gt=function(i){return this.cmp(i)>0},c.prototype.geq=function(i){return this.cmp(i)>=0},c.prototype.lt=function(i){return this.cmp(i)<0},c.prototype.leq=function(i){return this.cmp(i)<=0},W("add"),W("sub"),W("mul"),W("mod"),W("invm"),W("div"),W("cmp"),W("gt"),W("geq"),W("lt"),W("leq");class z{static{w(this,"Br")}constructor(t){this.fromObject({buf:t})}fromObject(t){return this.buf=t.buf||this.buf||void 0,this.pos=t.pos||this.pos||0,this}eof(){return this.pos>=this.buf.length}read(t=this.buf.length){const e=this.buf.slice(this.pos,this.pos+t);return this.pos=this.pos+t,e}readReverse(t=this.buf.length){const e=this.buf.slice(this.pos,this.pos+t);this.pos=this.pos+t;const r=Buffer.alloc(e.length);for(let s=0;s<r.length;s++)r[s]=e[e.length-1-s];return r}readUInt8(){const t=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,t}readInt8(){const t=this.buf.readInt8(this.pos);return this.pos=this.pos+1,t}readUInt16BE(){const t=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,t}readInt16BE(){const t=this.buf.readInt16BE(this.pos);return this.pos=this.pos+2,t}readUInt16LE(){const t=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,t}readInt16LE(){const t=this.buf.readInt16LE(this.pos);return this.pos=this.pos+2,t}readUInt32BE(){const t=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,t}readInt32BE(){const t=this.buf.readInt32BE(this.pos);return this.pos=this.pos+4,t}readUInt32LE(){const t=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,t}readInt32LE(){const t=this.buf.readInt32LE(this.pos);return this.pos=this.pos+4,t}readUInt64BEBn(){const t=this.buf.slice(this.pos,this.pos+8),e=new c().fromBuffer(t);return this.pos=this.pos+8,e}readUInt64LEBn(){const t=this.readReverse(8);return new c().fromBuffer(t)}readVarIntNum(){const t=this.readUInt8();let e,r;switch(t){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:if(e=this.readUInt64LEBn(),r=e.toNumber(),r<=Math.pow(2,53))return r;throw new Error("number too large to retain precision - use readVarIntBn");default:return t}}readVarIntBuf(){switch(this.buf.readUInt8(this.pos)){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}}readVarIntBn(){const t=this.readUInt8();switch(t){case 253:return new c(this.readUInt16LE());case 254:return new c(this.readUInt32LE());case 255:return this.readUInt64LEBn();default:return new c(t)}}}class R{static{w(this,"Bw")}constructor(t){this.fromObject({bufs:t})}fromObject(t){return this.bufs=t.bufs||this.bufs||[],this}getLength(){let t=0;for(const e in this.bufs){const r=this.bufs[e];t=t+r.length}return t}toBuffer(){return Buffer.concat(this.bufs)}write(t){return this.bufs.push(t),this}writeReverse(t){const e=Buffer.alloc(t.length);for(let r=0;r<e.length;r++)e[r]=t[t.length-1-r];return this.bufs.push(e),this}writeUInt8(t){const e=Buffer.alloc(1);return e.writeUInt8(t,0),this.write(e),this}writeInt8(t){const e=Buffer.alloc(1);return e.writeInt8(t,0),this.write(e),this}writeUInt16BE(t){const e=Buffer.alloc(2);return e.writeUInt16BE(t,0),this.write(e),this}writeInt16BE(t){const e=Buffer.alloc(2);return e.writeInt16BE(t,0),this.write(e),this}writeUInt16LE(t){const e=Buffer.alloc(2);return e.writeUInt16LE(t,0),this.write(e),this}writeInt16LE(t){const e=Buffer.alloc(2);return e.writeInt16LE(t,0),this.write(e),this}writeUInt32BE(t){const e=Buffer.alloc(4);return e.writeUInt32BE(t,0),this.write(e),this}writeInt32BE(t){const e=Buffer.alloc(4);return e.writeInt32BE(t,0),this.write(e),this}writeUInt32LE(t){const e=Buffer.alloc(4);return e.writeUInt32LE(t,0),this.write(e),this}writeInt32LE(t){const e=Buffer.alloc(4);return e.writeInt32LE(t,0),this.write(e),this}writeUInt64BEBn(t){const e=t.toBuffer({size:8});return this.write(e),this}writeUInt64LEBn(t){const e=t.toBuffer({size:8});return this.writeReverse(e),this}writeVarIntNum(t){const e=R.varIntBufNum(t);return this.write(e),this}writeVarIntBn(t){const e=R.varIntBufBn(t);return this.write(e),this}static varIntBufNum(t){let e;return t<253?(e=Buffer.alloc(1),e.writeUInt8(t,0)):t<65536?(e=Buffer.alloc(3),e.writeUInt8(253,0),e.writeUInt16LE(t,1)):t<4294967296?(e=Buffer.alloc(5),e.writeUInt8(254,0),e.writeUInt32LE(t,1)):(e=Buffer.alloc(9),e.writeUInt8(255,0),e.writeInt32LE(t&-1,1),e.writeUInt32LE(Math.floor(t/4294967296),5)),e}static varIntBufBn(t){let e;const r=t.toNumber();if(r<253)e=Buffer.alloc(1),e.writeUInt8(r,0);else if(r<65536)e=Buffer.alloc(3),e.writeUInt8(253,0),e.writeUInt16LE(r,1);else if(r<4294967296)e=Buffer.alloc(5),e.writeUInt8(254,0),e.writeUInt32LE(r,1);else{const s=new R;s.writeUInt8(255),s.writeUInt64LEBn(t),e=s.toBuffer()}return e}}var Yt=x(291);const Ct=Yt.f;class _{static{w(this,"Struct")}constructor(t){this.fromObject(t)}fromObject(t){if(!t)return this;for(const e of Object.keys(t))t[e]!==void 0&&(this[e]=t[e]);return this}static fromObject(t){return new this().fromObject(t)}fromBr(t){throw t instanceof z?new Error("not implemented"):new Error("br must be a buffer reader")}static fromBr(t){return new this().fromBr(t)}asyncFromBr(t){throw t instanceof z?new Error("not implemented"):new Error("br must be a buffer reader")}static asyncFromBr(t){return new this().asyncFromBr(t)}toBw(t){throw new Error("not implemented")}asyncToBw(t){throw new Error("not implemented")}*genFromBuffers(){throw new Error("not implemented")}*expect(t,e){let r=e;const s=new R;let n=0;for(e&&(s.write(e),n+=e.length);n<t;)r=yield t-n,r&&(s.write(r),n+=r.length);r=s.toBuffer();const a=n-t,u=r.slice(r.length-a,r.length);return r=r.slice(0,r.length-a),{buf:r,remainderbuf:u}}fromBuffer(t,...e){if(!Buffer.isBuffer(t))throw new Error("buf must be a buffer");const r=new z(t);return this.fromBr(r,...e)}static fromBuffer(...t){return new this().fromBuffer(...t)}asyncFromBuffer(t,...e){if(!Buffer.isBuffer(t))throw new Error("buf must be a buffer");const r=new z(t);return this.asyncFromBr(r,...e)}static asyncFromBuffer(t,...e){return new this().asyncFromBuffer(t,...e)}fromFastBuffer(t,...e){return t.length===0?this:this.fromBuffer(t,...e)}static fromFastBuffer(...t){return new this().fromFastBuffer(...t)}toBuffer(...t){return this.toBw(...t).toBuffer()}asyncToBuffer(...t){return this.asyncToBw(...t).then(e=>e.toBuffer())}toFastBuffer(...t){return Object.keys(this).length===0?Buffer.alloc(0):this.toBuffer(...t)}fromHex(t,...e){if(!Ct(t))throw new Error("invalid hex string");const r=Buffer.from(t,"hex");return this.fromBuffer(r,...e)}static fromHex(t,...e){return new this().fromHex(t,...e)}asyncFromHex(t,...e){if(!Ct(t))throw new Error("invalid hex string");const r=Buffer.from(t,"hex");return this.asyncFromBuffer(r,...e)}static asyncFromHex(t,...e){return new this().asyncFromHex(t,...e)}fromFastHex(t,...e){if(!Ct(t))throw new Error("invalid hex string");const r=Buffer.from(t,"hex");return this.fromFastBuffer(r,...e)}static fromFastHex(t,...e){return new this().fromFastHex(t,...e)}toHex(...t){return this.toBuffer(...t).toString("hex")}asyncToHex(...t){return this.asyncToBuffer(...t).then(e=>e.toString("hex"))}toFastHex(...t){return this.toFastBuffer(...t).toString("hex")}fromString(t,...e){if(typeof t!="string")throw new Error("str must be a string");return this.fromHex(t,...e)}static fromString(t,...e){return new this().fromString(t,...e)}asyncFromString(t,...e){if(typeof t!="string")throw new Error("str must be a string");return this.asyncFromHex(t,...e)}static asyncFromString(t,...e){return new this().asyncFromString(t,...e)}toString(...t){return this.toHex(...t)}asyncToString(...t){return this.asyncToHex(...t)}fromJSON(t){throw new Error("not implemented")}static fromJSON(t,...e){return new this().fromJSON(t,...e)}asyncFromJSON(t,...e){throw new Error("not implemented")}static asyncFromJSON(t,...e){return new this().asyncFromJSON(t,...e)}toJSON(){var t={};for(var e in this)if(Array.isArray(this[e])){const s=[];for(var r in this[e])typeof this[e][r].toJSON=="function"?s.push(this[e][r].toJSON()):s.push(JSON.stringify(this[e][r]));t[e]=s}else if(this[e]===null)t[e]=this[e];else if(typeof this[e]=="object"&&typeof this[e].toJSON=="function")t[e]=this[e].toJSON();else if(typeof this[e]=="boolean"||typeof this[e]=="number"||typeof this[e]=="string")t[e]=this[e];else if(Buffer.isBuffer(this[e]))t[e]=this[e].toString("hex");else if(this[e]instanceof Map)t[e]=JSON.stringify(this[e]);else if(typeof this[e]=="object")throw new Error("not implemented");return t}asyncToJSON(){throw new Error("not implemented")}clone(){return this.cloneByJSON()}cloneByBuffer(){return new this.constructor().fromBuffer(this.toBuffer())}cloneByFastBuffer(){return new this.constructor().fromFastBuffer(this.toFastBuffer())}cloneByHex(){return new this.constructor().fromHex(this.toHex())}cloneByString(){return new this.constructor().fromString(this.toString())}cloneByJSON(){return new this.constructor().fromJSON(this.toJSON())}}class ft extends _{static{w(this,"Base58")}constructor(t){super({buf:t})}fromHex(t){return this.fromBuffer(Buffer.from(t,"hex"))}toHex(){return this.toBuffer().toString("hex")}static encode(t){if(!Buffer.isBuffer(t))throw new Error("Input should be a buffer");return st().encode(t)}static decode(t){if(typeof t!="string")throw new Error("Input should be a string");return Buffer.from(st().decode(t))}fromBuffer(t){return this.buf=t,this}fromString(t){const e=ft.decode(t);return this.buf=e,this}toBuffer(){return this.buf}toString(){return ft.encode(this.buf)}}const it=w((i,t)=>{if(!Buffer.isBuffer(i)||!Buffer.isBuffer(t))throw new Error("buf1 and buf2 must be buffers");if(i.length!==t.length)return!1;let e=0;for(let r=0;r<i.length;r++){const s=i[r],n=t[r];e|=s^n}return e===0},"cmp");class Ht extends _{static{w(this,"WorkersResult")}constructor(t,e,r){super({resbuf:t,isError:e,id:r})}fromResult(t,e){return t.toFastBuffer?this.resbuf=t.toFastBuffer():Buffer.isBuffer(t)?this.resbuf=t:this.resbuf=Buffer.from(JSON.stringify(t)),this.isError=!1,this.id=e,this}static fromResult(t,e){return new this().fromResult(t,e)}fromError(t,e){return this.resbuf=Buffer.from(JSON.stringify(t.message)),this.isError=!0,this.id=e,this}toBw(t){return t||(t=new R),t.writeVarIntNum(this.resbuf.length),t.write(this.resbuf),t.writeUInt8(Number(this.isError)),t.writeVarIntNum(this.id),t}fromBr(t){const e=t.readVarIntNum();return this.resbuf=t.read(e),this.isError=!!t.readUInt8(),this.id=t.readVarIntNum(),this}}let nt;class B{static{w(this,"Workers")}constructor(t=[],e=0,r=[],s=new Map){this.nativeWorkers=t,this.lastid=e,this.incompconsteRes=r,this.promisemap=s}asyncObjectMethod(t,e,r,s=this.lastid+1){if(!r)throw new Error("must specify args");const n=t[e](...r);return new Ht().fromResult(n,s)}static asyncObjectMethod(t,e,r,s){return nt||(nt=new B),nt.asyncObjectMethod(t,e,r,s)}asyncClassMethod(t,e,r,s=this.lastid+1){if(!r)throw new Error("must specify args");const n=t[e](...r);return new Ht().fromResult(n,s)}static asyncClassMethod(t,e,r,s){return nt||(nt=new B),nt.asyncClassMethod(t,e,r,s)}static endGlobalWorkers(){nt&&!process.browser&&(nt=void 0)}}class d{static{w(this,"Hash")}}d.sha1=function(i){if(!Buffer.isBuffer(i))throw new Error("sha1 hash must be of a buffer");const t=pt().sha1,e=new t().update(i).digest();return Buffer.from(e)},d.sha1.blockSize=512,d.asyncSha1=async function(i){const t=[i];return(await B.asyncClassMethod(d,"sha1",t)).resbuf},d.sha256=function(i){if(!Buffer.isBuffer(i))throw new Error("sha256 hash must be of a buffer");const t=pt().sha256,e=new t().update(i).digest();return Buffer.from(e)},d.sha256.blockSize=512,d.asyncSha256=async function(i){const t=[i];return(await B.asyncClassMethod(d,"sha256",t)).resbuf},d.sha256Sha256=function(i){try{return d.sha256(d.sha256(i))}catch(t){throw new Error("sha256Sha256 hash must be of a buffer: "+t)}},d.asyncSha256Sha256=async function(i){const t=[i];return(await B.asyncClassMethod(d,"sha256Sha256",t)).resbuf},d.ripemd160=function(i){if(!Buffer.isBuffer(i))throw new Error("ripemd160 hash must be of a buffer");const t=pt().ripemd160,e=new t().update(i).digest();return Buffer.from(e)},d.asyncRipemd160=async function(i){const t=[i];return(await B.asyncClassMethod(d,"ripemd160",t)).resbuf},d.sha256Ripemd160=function(i){try{return d.ripemd160(d.sha256(i))}catch(t){throw new Error("sha256Ripemd160 hash must be of a buffer: "+t)}},d.asyncSha256Ripemd160=async function(i){const t=[i];return(await B.asyncClassMethod(d,"sha256Ripemd160",t)).resbuf},d.sha512=function(i){if(!Buffer.isBuffer(i))throw new Error("sha512 hash must be of a buffer");const t=pt().sha512,e=new t().update(i).digest();return Buffer.from(e)},d.asyncSha512=async function(i){const t=[i];return(await B.asyncClassMethod(d,"sha512",t)).resbuf},d.sha512.blockSize=1024,d.hmac=function(i,t,e){if(i!=="sha1"&&i!=="sha256"&&i!=="sha512")throw new Error("invalid choice of hash function");const r=d[i];if(!Buffer.isBuffer(t)||!Buffer.isBuffer(e))throw new Error("data and key must be buffers");const s=r.blockSize/8;if(e.length>s&&(e=r(e)),e.length<s){const u=Buffer.alloc(s);u.fill(0,e.length),e.copy(u),e=u}const n=Buffer.alloc(s),a=Buffer.alloc(s);for(let u=0;u<s;u++)n[u]=92^e[u],a[u]=54^e[u];return r(Buffer.concat([n,r(Buffer.concat([a,t]))]))},d.sha1Hmac=function(i,t){return d.hmac("sha1",i,t)},d.asyncSha1Hmac=async function(i,t){const e=[i,t];return(await B.asyncClassMethod(d,"sha1Hmac",e)).resbuf},d.sha1Hmac.bitsize=160,d.sha256Hmac=function(i,t){return d.hmac("sha256",i,t)},d.asyncSha256Hmac=async function(i,t){const e=[i,t];return(await B.asyncClassMethod(d,"sha256Hmac",e)).resbuf},d.sha256Hmac.bitsize=256,d.sha512Hmac=function(i,t){return d.hmac("sha512",i,t)},d.asyncSha512Hmac=async function(i,t){const e=[i,t];return(await B.asyncClassMethod(d,"sha512Hmac",e)).resbuf},d.sha512Hmac.bitsize=512;class $ extends _{static{w(this,"Base58Check")}constructor(t){super({buf:t})}fromHex(t){return this.fromBuffer(Buffer.from(t,"hex"))}toHex(){return this.toBuffer().toString("hex")}static decode(t){if(typeof t!="string")throw new Error("Input must be a string");const e=ft.decode(t);if(e.length<4)throw new Error("Input string too short");const r=e.slice(0,-4),s=e.slice(-4),a=d.sha256Sha256(r).slice(0,4);if(!it(s,a))throw new Error("Checksum mismatch");return r}static encode(t){if(!Buffer.isBuffer(t))throw new Error("Input must be a buffer");const e=Buffer.alloc(t.length+4),r=d.sha256Sha256(t);return t.copy(e),r.copy(e,t.length),ft.encode(e)}fromBuffer(t){return this.buf=t,this}fromString(t){const e=$.decode(t);return this.buf=e,this}toBuffer(){return this.buf}toString(){return $.encode(this.buf)}}class Jt{static{w(this,"Config")}constructor(t){this.keyDefined=e=>e in t,this.getValue=e=>t[e]}get(t){if(this.keyDefined(t))return this.getValue(t);throw new Error(`Unknown configuration: ${t}`)}}class qt{static{w(this,"ConfigBuilder")}constructor(){this.variables={}}build(){return new Jt(this.variables)}addValue(t,e){if(e===void 0)throw new Error(`Failed to add "${t}" property. The value cannot be undefined`);if(t in this.variables)throw new Error(`"${t}" already has a value defined.`);return this.variables[t]=e,this}addValueWithDefault(t,e,r){if(r===void 0)throw new Error(`Failed to add "${t}" property. Default value cannot be undefined`);return this.addValue(t,e===void 0?r:e)}}const dt=new qt().addValue("NETWORK",process.env.NETWORK||"mainnet").build(),P={};if(P.Mainnet={MaxSize:33554432,Port:8333,Address:{pubKeyHash:0,payToScriptHash:5},Bip32:{pubKey:76067358,privKey:76066276},Block:{maxNBits:486604799,magicNum:3823236072},Msg:{magicNum:3823236072,versionBytesNum:70015},PrivKey:{versionByteNum:128},TxBuilder:{dust:0,feePerKbNum:50},Workers:{timeout:6e4}},P.Testnet=Object.assign({},P.Mainnet,{Port:18333,Address:{pubKeyHash:111,payToScriptHash:196},Bip32:{pubKey:70617039,privKey:70615956},Block:{maxNBits:486604799,magicNum:4108710900},Msg:{magicNum:4108710900,versionBytesNum:70015},PrivKey:{versionByteNum:239}}),P.Regtest=Object.assign({},P.Mainnet,{Port:18444,Address:{pubKeyHash:111,payToScriptHash:196},Bip32:{pubKey:70617039,privKey:70615956},Block:{maxNBits:545259519,magicNum:3669344250},Msg:{magicNum:3669344250,versionBytesNum:70015},PrivKey:{versionByteNum:239}}),P.STN=Object.assign({},P.Mainnet,{Port:9333,Address:{pubKeyHash:111,payToScriptHash:196},Bip32:{pubKey:70617039,privKey:70615956},Block:{maxNBits:486604799,magicNum:4224632057},Msg:{magicNum:4224632057,versionBytesNum:70015},PrivKey:{versionByteNum:239}}),dt.get("NETWORK")==="testnet")P.Default=Object.assign({},P.Testnet);else if(dt.get("NETWORK")==="mainnet")P.Default=Object.assign({},P.Mainnet);else if(dt.get("NETWORK")==="regtest")P.Default=Object.assign({},P.Regtest);else if(dt.get("NETWORK")==="stn")P.Default=Object.assign({},P.STN);else throw new Error(`must set network in environment variable - mainnet, testnet, regtest or stn?, received ${dt.get("NETWORK")}`);const Qt=w(i=>P.Mainnet.Msg.magicNum===i?P.Mainnet:P.Testnet.Msg.magicNum===i?P.Testnet:P.Regtest.Msg.magicNum===i?P.Regtest:P.STN.Msg.magicNum===i?P.STN:P.Default,"getConstants"),gt={FALSE:0,0:0,PUSHDATA1:76,PUSHDATA2:77,PUSHDATA4:78,"1NEGATE":79,RESERVED:80,TRUE:81,1:81,2:82,3:83,4:84,5:85,6:86,7:87,8:88,9:89,10:90,11:91,12:92,13:93,14:94,15:95,16:96,NOP:97,VER:98,IF:99,NOTIF:100,VERIF:101,VERNOTIF:102,ELSE:103,ENDIF:104,VERIFY:105,RETURN:106,TOALTSTACK:107,FROMALTSTACK:108,"2DROP":109,"2DUP":110,"3DUP":111,"2OVER":112,"2ROT":113,"2SWAP":114,IFDUP:115,DEPTH:116,DROP:117,DUP:118,NIP:119,OVER:120,PICK:121,ROLL:122,ROT:123,SWAP:124,TUCK:125,CAT:126,SUBSTR:127,SPLIT:127,LEFT:128,NUM2BIN:128,RIGHT:129,BIN2NUM:129,SIZE:130,INVERT:131,AND:132,OR:133,XOR:134,EQUAL:135,EQUALVERIFY:136,RESERVED1:137,RESERVED2:138,"1ADD":139,"1SUB":140,"2MUL":141,"2DIV":142,NEGATE:143,ABS:144,NOT:145,"0NOTEQUAL":146,ADD:147,SUB:148,MUL:149,DIV:150,MOD:151,LSHIFT:152,RSHIFT:153,BOOLAND:154,BOOLOR:155,NUMEQUAL:156,NUMEQUALVERIFY:157,NUMNOTEQUAL:158,LESSTHAN:159,GREATERTHAN:160,LESSTHANOREQUAL:161,GREATERTHANOREQUAL:162,MIN:163,MAX:164,WITHIN:165,RIPEMD160:166,SHA1:167,SHA256:168,HASH160:169,HASH256:170,CODESEPARATOR:171,CHECKSIG:172,CHECKSIGVERIFY:173,CHECKMULTISIG:174,CHECKMULTISIGVERIFY:175,NOP1:176,NOP2:177,CHECKLOCKTIMEVERIFY:177,NOP3:178,CHECKSEQUENCEVERIFY:178,NOP4:179,NOP5:180,NOP6:181,NOP7:182,NOP8:183,NOP9:184,NOP10:185,SMALLDATA:249,SMALLINTEGER:250,PUBKEYS:251,PUBKEYHASH:253,PUBKEY:254,INVALIDOPCODE:255},St={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_SPLIT:127,OP_LEFT:128,OP_NUM2BIN:128,OP_RIGHT:129,OP_BIN2NUM:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_NOP1:176,OP_NOP2:177,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP3:178,OP_CHECKSEQUENCEVERIFY:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_SMALLDATA:249,OP_SMALLINTEGER:250,OP_PUBKEYS:251,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255};class o extends _{static{w(this,"OpCode")}constructor(t){super({num:t})}fromNumber(t){return this.num=t,this}static fromNumber(t){return new this().fromNumber(t)}toNumber(){return this.num}fromString(t){const e=St[t];if(e===void 0)throw new Error("Invalid opCodeStr");return this.num=e,this}fromNoOpString(t){const e=gt[t];if(e===void 0)throw new Error("Invalid opCodeStr");return this.num=e,this}static fromString(t){return new this().fromString(t)}static fromNoOpString(t){return new this().fromNoOpString(t)}toString(){const t=o.str[this.num];return t===void 0?this.num>0&&this.num<o.OP_PUSHDATA1?this.num.toString():"OP_"+this.num.toNumber():t}toNoOpString(){const t=o.noopstr[this.num];return t===void 0?this.num>0&&this.num<o.OP_PUSHDATA1?this.num.toString():this.num.toNumber():t}}o.str={},o.noopstr={};for(const i in St)o[i]=St[i],Object.prototype.hasOwnProperty.call(St,i)&&(o.str[St[i]]=i);for(const i in gt)o[i]=gt[i],Object.prototype.hasOwnProperty.call(gt,i)&&(o.noopstr[gt[i]]=i);const bt=Dt().curves.secp256k1,at=bt.curve.point().constructor;class k extends at{static{w(this,"Point")}constructor(t,e,r){super(bt.curve,t,e,r)}static fromX(t,e){const r=bt.curve.pointFromX(e,t);return Object.create(k.prototype).copyFrom(r)}copyFrom(t){if(!(t instanceof at))throw new Error("point should be an external point");return Object.keys(t).forEach(function(e){this[e]=t[e]}.bind(this)),this}add(t){return t=at.prototype.add.call(this,t),Object.create(k.prototype).copyFrom(t)}mul(t){if(!t.lt(k.getN()))throw new Error("point mul out of range");const e=at.prototype.mul.call(this,t);return Object.create(k.prototype).copyFrom(e)}mulAdd(t,e,r){const s=at.prototype.mulAdd.call(this,t,e,r);return e=Object.create(k.prototype),e.copyFrom(s)}getX(){const t=at.prototype.getX.call(this),e=Object.create(c.prototype);return t.copy(e),e}getY(){const t=at.prototype.getY.call(this),e=Object.create(c.prototype);return t.copy(e),e}fromX(t,e){const r=k.fromX(t,e);return this.copyFrom(r)}toJSON(){return{x:this.getX().toString(),y:this.getY().toString()}}fromJSON(t){const e=new c().fromString(t.x),r=new c().fromString(t.y),s=new k(e,r);return this.copyFrom(s)}toString(){return JSON.stringify(this.toJSON())}fromString(t){const e=JSON.parse(t),r=new k().fromJSON(e);return this.copyFrom(r)}static getG(){const t=bt.curve.g;return Object.create(k.prototype).copyFrom(t)}static getN(){return new c(bt.curve.n.toArray())}validate(){if(k.fromX(this.getY().isOdd(),this.getX()).getY().cmp(this.getY())!==0)throw new Error("Invalid y value of public key");if(!(this.getX().gt(-1)&&this.getX().lt(k.getN()))||!(this.getY().gt(-1)&&this.getY().lt(k.getN())))throw new Error("Point does not lie on the curve");return this}}class H extends _{static{w(this,"PubKey")}constructor(t,e){super({point:t,compressed:e})}fromJSON(t){return this.fromFastHex(t),this}toJSON(){return this.toFastHex()}fromPrivKey(t){return this.fromObject({point:k.getG().mul(t.bn),compressed:t.compressed}),this}static fromPrivKey(t){return new this().fromPrivKey(t)}async asyncFromPrivKey(t){const e=await B.asyncObjectMethod(this,"fromPrivKey",[t]);return this.fromFastBuffer(e.resbuf)}static asyncFromPrivKey(t){return new this().asyncFromPrivKey(t)}fromBuffer(t,e){return this.fromDer(t,e)}async asyncFromBuffer(t,e){const r=[t,e],s=await B.asyncObjectMethod(this,"fromBuffer",r);return this.fromFastBuffer(s.resbuf)}fromFastBuffer(t){if(t.length===0)return this;const e=!!t[0];return t=t.slice(1),this.fromDer(t),this.compressed=e,this}fromDer(t,e){if(e===void 0?e=!0:e=!1,t[0]===4||!e&&(t[0]===6||t[0]===7)){const r=t.slice(1,33),s=t.slice(33,65);if(r.length!==32||s.length!==32||t.length!==65)throw new Error("LEngth of x and y must be 32 bytes");const n=new c(r),a=new c(s);this.point=new k(n,a),this.compressed=!1}else if(t[0]===3){const r=t.slice(1),s=new c(r);this.fromX(!0,s),this.compressed=!0}else if(t[0]===2){const r=t.slice(1),s=new c(r);this.fromX(!1,s),this.compressed=!0}else throw new Error("Invalid DER format pubKey");return this}static fromDer(t,e){return new this().fromDer(t,e)}fromString(t){return this.fromDer(Buffer.from(t,"hex")),this}fromX(t,e){if(typeof t!="boolean")throw new Error("Must specify whether y is odd or not (true or false)");return this.point=k.fromX(t,e),this}static fromX(t,e){return new this().fromX(t,e)}toBuffer(){const t=this.compressed===void 0?!0:this.compressed;return this.toDer(t)}toFastBuffer(){if(!this.point)return Buffer.alloc(0);const t=new R,e=this.compressed===void 0?!0:!!this.compressed;return t.writeUInt8(Number(e)),t.write(this.toDer(!1)),t.toBuffer()}toDer(t){if(t=t===void 0?this.compressed:t,typeof t!="boolean")throw new Error("Must specify whether the public key is compressed or not (true or false)");const e=this.point.getX(),r=this.point.getY(),s=e.toBuffer({size:32}),n=r.toBuffer({size:32});let a;return t?(n[n.length-1]%2?a=Buffer.from([3]):a=Buffer.from([2]),Buffer.concat([a,s])):(a=Buffer.from([4]),Buffer.concat([a,s,n]))}toString(){const t=this.compressed===void 0?!0:this.compressed;return this.toDer(t).toString("hex")}static isCompressedOrUncompressed(t){if(t.length<33)return!1;if(t[0]===4){if(t.length!==65)return!1}else if(t[0]===2||t[0]===3){if(t.length!==33)return!1}else return!1;return!0}validate(){if(this.point.isInfinity())throw new Error("point: Point cannot be equal to Infinity");if(this.point.eq(new k(new c(0),new c(0))))throw new Error("point: Point cannot be equal to 0, 0");return this.point.validate(),this}}var Wt=x(353),Xt=x.n(Wt);class tt{static{w(this,"Random")}}tt.getRandomBuffer=function(i){return Xt()(i)};class Y extends _{static{w(this,"priv_key_PrivKey")}constructor(t,e,r=null){super({bn:t,compressed:e}),r=r||P.Default.PrivKey,this.Constants=r}fromJSON(t){return this.fromHex(t),this}toJSON(){return this.toHex()}fromRandom(){let t,e,r;do t=tt.getRandomBuffer(32),e=new c().fromBuffer(t),r=e.lt(k.getN());while(!r);return this.fromObject({bn:e,compressed:!0}),this}static fromRandom(){return new this().fromRandom()}toBuffer(){let t=this.compressed;t===void 0&&(t=!0);const e=this.bn.toBuffer({size:32});let r;return t?r=Buffer.concat([Buffer.from([this.Constants.versionByteNum]),e,Buffer.from([1])]):r=Buffer.concat([Buffer.from([this.Constants.versionByteNum]),e]),r}fromBuffer(t){if(t.length===34&&t[33]===1)this.compressed=!0;else if(t.length===33)this.compressed=!1;else throw new Error("Length of privKey buffer must be 33 (uncompressed pubKey) or 34 (compressed pubKey)");if(t[0]!==this.Constants.versionByteNum)throw new Error("Invalid versionByteNum byte");return this.fromBn(new c().fromBuffer(t.slice(1,33)))}toBn(){return this.bn}fromBn(t){return this.bn=t,this}static fromBn(t){return new this().fromBn(t)}validate(){if(!this.bn.lt(k.getN()))throw new Error("Number must be less than N");if(typeof this.compressed!="boolean")throw new Error("Must specify whether the corresponding public key is compressed or not (true or false)");return this}toWif(){return $.encode(this.toBuffer())}fromWif(t){return this.fromBuffer($.decode(t))}static fromWif(t){return new this().fromWif(t)}toString(){return this.toWif()}fromString(t){return this.fromWif(t)}}Y.Mainnet=class extends Y{constructor(i,t){super(i,t,P.Mainnet.PrivKey)}},Y.Testnet=class extends Y{constructor(i,t){super(i,t,P.Testnet.PrivKey)}};class S extends _{static{w(this,"Sig")}constructor(t,e,r,s,n){super({r:t,s:e,nHashType:r,recovery:s,compressed:n})}fromBuffer(t){try{return this.fromDer(t,!0)}catch{}try{return this.fromCompact(t)}catch{}return this.fromTxFormat(t)}toBuffer(){return this.nHashType!==void 0?this.toTxFormat():this.recovery!==void 0?this.toCompact():this.toDer()}fromCompact(t){let e=!0,r=t.slice(0,1)[0]-27-4;if(r<0&&(e=!1,r=r+4),!(r===0||r===1||r===2||r===3))throw new Error("i must be 0, 1, 2, or 3");this.compressed=e,this.recovery=r;const s=t.slice(1);return this.fromRS(s),this}static fromCompact(t){return new this().fromCompact(t)}fromRS(t){const e=t.slice(0,32),r=t.slice(32,64);if(e.length!==32)throw new Error("r must be 32 bytes");if(r.length!==32||t.length>64)throw new Error("s must be 32 bytes");return this.r=new c().fromBuffer(e),this.s=new c().fromBuffer(r),this}static fromRS(t){return new this().fromRS(t)}fromDer(t,e){const r=S.parseDer(t,e);return this.r=r.r,this.s=r.s,this}static fromDer(t,e){return new this().fromDer(t,e)}fromTxFormat(t){if(t.length===0)return this.r=new c(1),this.s=new c(1),this.nHashType=1,this;const e=t.readUInt8(t.length-1),r=t.slice(0,t.length-1);return this.fromDer(r,!1),this.nHashType=e,this}static fromTxFormat(t){return new this().fromTxFormat(t)}fromString(t){return this.fromHex(t)}static parseDer(t,e){if(e===void 0&&(e=!0),!Buffer.isBuffer(t))throw new Error("DER formatted signature should be a buffer");const r=t[0];if(r!==48)throw new Error("Header byte should be 0x30");let s=t[1];const n=t.slice(2).length;if(e&&s!==n)throw new Error("LEngth byte should length of what follows");s=s<n?s:n;const a=t[2];if(a!==2)throw new Error("Integer byte for r should be 0x02");const u=t[3],h=t.slice(4,4+u),l=new c().fromBuffer(h),g=t[4]===0;if(u!==h.length)throw new Error("LEngth of r incorrect");const O=t[4+u+0];if(O!==2)throw new Error("Integer byte for s should be 0x02");const E=t[4+u+1],K=t.slice(4+u+2,4+u+2+E),f=new c().fromBuffer(K),m=t[4+u+2+2]===0;if(E!==K.length)throw new Error("LEngth of s incorrect");const b=4+u+2+E;if(s!==b-2)throw new Error("LEngth of signature incorrect");return{header:r,length:s,rheader:a,rlength:u,rneg:g,rbuf:h,r:l,sheader:O,slength:E,sneg:m,sbuf:K,s:f}}static IsTxDer(t){if(t.length<9||t.length>73||t[0]!==48||t[1]!==t.length-3)return!1;const e=t[3];if(5+e>=t.length)return!1;const r=t[5+e];if(e+r+7!==t.length)return!1;const s=t.slice(4);if(t[2]!==2||e===0||s[0]&128||e>1&&s[0]===0&&!(s[1]&128))return!1;const n=t.slice(6+e);return!(t[6+e-2]!==2||r===0||n[0]&128||r>1&&n[0]===0&&!(n[1]&128))}hasLowS(){return!(this.s.lt(1)||this.s.gt(c.fromBuffer(Buffer.from("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex"))))}hasDefinedHashType(){return!(this.nHashType<S.SIGHASH_ALL||this.nHashType>S.SIGHASH_SINGLE)}toCompact(t,e){if(t=typeof t=="number"?t:this.recovery,e=typeof e=="boolean"?e:this.compressed,!(t===0||t===1||t===2||t===3))throw new Error("recovery must be equal to 0, 1, 2, or 3");let r=t+27+4;e===!1&&(r=r-4);const s=Buffer.from([r]),n=this.r.toBuffer({size:32}),a=this.s.toBuffer({size:32});return Buffer.concat([s,n,a])}toRS(){return Buffer.concat([this.r.toBuffer({size:32}),this.s.toBuffer({size:32})])}toDer(){const t=this.r.toBuffer(),e=this.s.toBuffer(),r=t[0]&128,s=e[0]&128,n=r?Buffer.concat([Buffer.from([0]),t]):t,a=s?Buffer.concat([Buffer.from([0]),e]):e,u=2+n.length+2+a.length,h=n.length,l=a.length;return Buffer.concat([Buffer.from([48,u,2,h]),n,Buffer.from([2,l]),a])}toTxFormat(){const t=this.toDer(),e=Buffer.alloc(1);return e.writeUInt8(this.nHashType,0),Buffer.concat([t,e])}toString(){return this.toHex()}}S.SIGHASH_ALL=1,S.SIGHASH_NONE=2,S.SIGHASH_SINGLE=3,S.SIGHASH_FORKID=64,S.SIGHASH_ANYONECANPAY=128;class I extends _{static{w(this,"Script")}constructor(t=[]){super({chunks:t})}fromJSON(t){return this.fromString(t)}toJSON(){return this.toString()}fromBuffer(t){this.chunks=[];const e=new z(t);for(;!e.eof();){const r=e.readUInt8();let s=0,n=Buffer.from([]);if(r>0&&r<o.OP_PUSHDATA1)s=r,this.chunks.push({buf:e.read(s),len:s,opCodeNum:r});else if(r===o.OP_PUSHDATA1){try{s=e.readUInt8(),n=e.read(s)}catch{e.read()}this.chunks.push({buf:n,len:s,opCodeNum:r})}else if(r===o.OP_PUSHDATA2){try{s=e.readUInt16LE(),n=e.read(s)}catch{e.read()}this.chunks.push({buf:n,len:s,opCodeNum:r})}else if(r===o.OP_PUSHDATA4){try{s=e.readUInt32LE(),n=e.read(s)}catch{e.read()}this.chunks.push({buf:n,len:s,opCodeNum:r})}else this.chunks.push({opCodeNum:r})}return this}toBuffer(){const t=new R;for(let e=0;e<this.chunks.length;e++){const r=this.chunks[e],s=r.opCodeNum;t.writeUInt8(s),r.buf&&(s<o.OP_PUSHDATA1?t.write(r.buf):s===o.OP_PUSHDATA1?(t.writeUInt8(r.len),t.write(r.buf)):s===o.OP_PUSHDATA2?(t.writeUInt16LE(r.len),t.write(r.buf)):s===o.OP_PUSHDATA4&&(t.writeUInt32LE(r.len),t.write(r.buf)))}return t.toBuffer()}fromString(t){if(this.chunks=[],t===""||t===void 0)return this;const e=t.split(" ");let r=0;for(;r<e.length;){const s=e[r];let n;try{n=new o().fromString(s).toNumber()}catch{}if(n===void 0)if(n=parseInt(s,10),n>0&&n<o.OP_PUSHDATA1)this.chunks.push({buf:Buffer.from(e[r+1].slice(2),"hex"),len:n,opCodeNum:n}),r=r+2;else if(n===0)this.chunks.push({opCodeNum:0}),r=r+1;else throw new Error("Invalid script");else if(n===o.OP_PUSHDATA1||n===o.OP_PUSHDATA2||n===o.OP_PUSHDATA4){if(e[r+2].slice(0,2)!=="0x")throw new Error("Pushdata data must start with 0x");this.chunks.push({buf:Buffer.from(e[r+2].slice(2),"hex"),len:parseInt(e[r+1],10),opCodeNum:n}),r=r+3}else this.chunks.push({opCodeNum:n}),r=r+1}return this}toString(t={noOp:!1}){let e="";for(let r=0;r<this.chunks.length;r++){const s=this.chunks[r],n=s.opCodeNum.hasOwnProperty("num")?s.opCodeNum.num:s.opCodeNum;s.buf?((n===o.OP_PUSHDATA1||n===o.OP_PUSHDATA2||n===o.OP_PUSHDATA4)&&(e=t.noOp?e+" "+new o(n).toNoOpString():e+" "+new o(n).toString()),e=e+" "+s.len,e=e+" 0x"+s.buf.toString("hex")):o.str[n]!==void 0||o.noopstr[n]!==void 0?e=t.noOp?e+" "+new o(n).toNoOpString():e+" "+new o(n).toString():e=e+" 0x"+n.toString(16)}return e.substr(1)}fromBitcoindString(t){const e=new R,r=t.split(" ");let s;for(s=0;s<r.length;s++){const a=r[s];if(a!=="")if(a[0]==="0"&&a[1]==="x"){const u=a.slice(2);e.write(Buffer.from(u,"hex"))}else if(a[0]==="'"){const u=a.slice(1,a.length-1),h=Buffer.from(u),l=new I().writeBuffer(h).toBuffer();e.write(l)}else if(o["OP_"+a]!==void 0){const u="OP_"+a,h=o[u];e.writeUInt8(h)}else if(typeof o[a]=="number"){const h=o[a];e.writeUInt8(h)}else{if(isNaN(parseInt(a,10)))throw new Error("Could not determine type of script value");{const u=new c(a),l=new I().writeBn(u).toBuffer();e.write(l)}}}const n=e.toBuffer();return this.fromBuffer(n)}static fromBitcoindString(t){return new this().fromBitcoindString(t)}toBitcoindString(){let t="";for(let e=0;e<this.chunks.length;e++){const r=this.chunks[e];if(r.buf){const n=new I([r]).toBuffer().toString("hex");t=t+" 0x"+n}else if(o.str[r.opCodeNum]!==void 0){const s=new o(r.opCodeNum).toString();t=t+" "+s.slice(3)}else t=t+" 0x"+r.opCodeNum.toString(16)}return t.substr(1)}fromAsmString(t){this.chunks=[];const e=t.split(" ");let r=0;for(;r<e.length;){const s=e[r];let n,a;try{n=o.fromString(s),a=n.toNumber()}catch{n=void 0,a=void 0}if(s==="0")a=0,this.chunks.push({opCodeNum:a}),r=r+1;else if(s==="-1")a=o.OP_1NEGATE,this.chunks.push({opCodeNum:a}),r=r+1;else if(n===void 0){const u=e[r],h=Buffer.from(u,"hex");if(h.toString("hex")!==u)throw new Error("invalid hex string in script");const l=h.length;l>=0&&l<o.OP_PUSHDATA1?a=l:l<Math.pow(2,8)?a=o.OP_PUSHDATA1:l<Math.pow(2,16)?a=o.OP_PUSHDATA2:l<Math.pow(2,32)&&(a=o.OP_PUSHDATA4),this.chunks.push({buf:h,len:h.length,opCodeNum:a}),r=r+1}else this.chunks.push({opCodeNum:a}),r=r+1}return this}static fromAsmString(t){return new this().fromAsmString(t)}toAsmString(t={noOp:!1}){for(var e="",r=0;r<this.chunks.length;r++){var s=this.chunks[r];e+=this._chunkToString(s,t)}return e.substr(1)}_chunkToString(t,e={noOp:!1}){var r=t.opCodeNum,s="";if(t.buf)t.len>0&&(s=s+" "+t.buf.toString("hex"));else if(typeof o.str[r]<"u")r===0?s=s+" 0":r===79?s=s+" -1":s=e.noOp?s+" "+new o(r).toNoOpString():s+" "+new o(r).toString();else{var n=r.toString(16);n.length%2!==0&&(n="0"+n),s=s+" "+n}return s}fromOpReturnData(t){return this.writeOpCode(o.OP_RETURN),this.writeBuffer(t),this}static fromOpReturnData(t){return new this().fromOpReturnData(t)}fromSafeData(t){return this.writeOpCode(o.OP_FALSE),this.writeOpCode(o.OP_RETURN),this.writeBuffer(t),this}static fromSafeData(t){return new this().fromSafeData(t)}fromSafeDataArray(t){this.writeOpCode(o.OP_FALSE),this.writeOpCode(o.OP_RETURN);for(const e in t){const r=t[e];this.writeBuffer(r)}return this}static fromSafeDataArray(t){return new this().fromSafeDataArray(t)}getData(){if(this.isSafeDataOut())return this.chunks.slice(2).map(r=>r.buf);if(this.isOpReturn())return this.chunks.slice(1).map(r=>r.buf);throw new Error("Unrecognized script type to get data from")}fromPubKeyHash(t){if(t.length!==20)throw new Error("hashBuf must be a 20 byte buffer");return this.writeOpCode(o.OP_DUP),this.writeOpCode(o.OP_HASH160),this.writeBuffer(t),this.writeOpCode(o.OP_EQUALVERIFY),this.writeOpCode(o.OP_CHECKSIG),this}static fromPubKeyHash(t){return new this().fromPubKeyHash(t)}static sortPubKeys(t){return t.slice().sort((e,r)=>{const s=e.toBuffer(),n=r.toBuffer(),a=Math.max(s.length,n.length);for(let u=0;u<=a;u++){if(s[u]===void 0)return-1;if(n[u]===void 0)return 1;if(s[u]<n[u])return-1;if(s[u]>n[u])return 1}})}fromPubKeys(t,e,r=!0){if(typeof t!="number")throw new Error("m must be a number");r===!0&&(e=I.sortPubKeys(e)),this.writeOpCode(t+o.OP_1-1);for(const s in e)this.writeBuffer(e[s].toBuffer());return this.writeOpCode(e.length+o.OP_1-1),this.writeOpCode(o.OP_CHECKMULTISIG),this}static fromPubKeys(t,e,r){return new this().fromPubKeys(t,e,r)}removeCodeseparators(){const t=[];for(let e=0;e<this.chunks.length;e++)this.chunks[e].opCodeNum!==o.OP_CODESEPARATOR&&t.push(this.chunks[e]);return this.chunks=t,this}isPushOnly(){for(let t=0;t<this.chunks.length;t++)if(this.chunks[t].opCodeNum>o.OP_16)return!1;return!0}isNonSpendable(){const t=this.chunks[0].opCodeNum===o.OP_FALSE,e=this.chunks[1]&&this.chunks[1].opCodeNum===o.OP_RETURN;return!!t&&!!e}isOpReturn(){return this.chunks[0].opCodeNum===o.OP_RETURN&&this.chunks.filter(t=>Buffer.isBuffer(t.buf)).length===this.chunks.slice(1).length}isSafeDataOut(){if(this.chunks.length<2||this.chunks[0].opCodeNum!==o.OP_FALSE)return!1;var t=this.chunks.slice(1),e=new I(t);return e.isOpReturn()}isPubKeyHashOut(){return!!(this.chunks[0]&&this.chunks[0].opCodeNum===o.OP_DUP&&this.chunks[1]&&this.chunks[1].opCodeNum===o.OP_HASH160&&this.chunks[2].buf&&this.chunks[3]&&this.chunks[3].opCodeNum===o.OP_EQUALVERIFY&&this.chunks[4]&&this.chunks[4].opCodeNum===o.OP_CHECKSIG)}isPubKeyHashIn(){return!!(this.chunks.length===2&&(this.chunks[0].buf||this.chunks[0].opCodeNum===o.OP_0)&&(this.chunks[1].buf||this.chunks[0].opCodeNum===o.OP_0))}isScriptHashOut(){const t=this.toBuffer();return t.length===23&&t[0]===o.OP_HASH160&&t[1]===20&&t[22]===o.OP_EQUAL}isScriptHashIn(){if(!this.isPushOnly())return!1;try{new I().fromBuffer(this.chunks[this.chunks.length-1].buf)}catch{return!1}return!0}isMultiSigOut(){const t=this.chunks[0].opCodeNum-o.OP_1+1;if(!(t>=1&&t<=16)||!this.chunks.slice(1,this.chunks.length-2).every(s=>{try{const n=s.buf;return new H().fromDer(n).validate(),!0}catch{return!1}}))return!1;const r=this.chunks[this.chunks.length-2].opCodeNum-o.OP_1+1;return!(!(r>=t&&r<=16)||this.chunks[1+r+1].opCodeNum!==o.OP_CHECKMULTISIG)}isMultiSigIn(){if(this.chunks[0].opCodeNum!==o.OP_0)return!1;const t=this.chunks.slice(1);return t.length<1?!1:t.every(e=>Buffer.isBuffer(e.buf)&&S.IsTxDer(e.buf))}findAndDelete(t){const e=t.toBuffer();for(let r=0;r<this.chunks.length;r++){const n=new I([this.chunks[r]]).toBuffer();it(e,n)&&this.chunks.splice(r,1)}return this}writeScript(t){return this.chunks=this.chunks.concat(t.chunks),this}static writeScript(t){return new this().writeScript(t)}writeString(t){const e=new I().fromString(t);return this.chunks=this.chunks.concat(e.chunks),this}static writeString(t){return new this().writeString(t)}writeOpCode(t){return this.chunks.push({opCodeNum:t}),this}static writeOpCode(t){return new this().writeOpCode(t)}setChunkOpCode(t,e){return this.chunks[t]={opCodeNum:e},this}writeBn(t){if(t.cmp(0)===o.OP_0)this.chunks.push({opCodeNum:o.OP_0});else if(t.cmp(-1)===0)this.chunks.push({opCodeNum:o.OP_1NEGATE});else if(t.cmp(1)>=0&&t.cmp(16)<=0)this.chunks.push({opCodeNum:t.toNumber()+o.OP_1-1});else{const e=t.toSm({endian:"little"});this.writeBuffer(e)}return this}static writeBn(t){return new this().writeBn(t)}writeNumber(t){return this.writeBn(new c().fromNumber(t)),this}static writeNumber(t){return new this().writeNumber(t)}setChunkBn(t,e){return this.chunks[t]=new I().writeBn(e).chunks[0],this}writeBuffer(t){let e;const r=t.length;if(t.length>0&&t.length<o.OP_PUSHDATA1)e=t.length;else if(t.length===0)e=o.OP_0;else if(t.length<Math.pow(2,8))e=o.OP_PUSHDATA1;else if(t.length<Math.pow(2,16))e=o.OP_PUSHDATA2;else if(t.length<Math.pow(2,32))e=o.OP_PUSHDATA4;else throw new Error("You can't push that much data");return this.chunks.push({buf:t,len:r,opCodeNum:e}),this}static writeBuffer(t){return new this().writeBuffer(t)}setChunkBuffer(t,e){return this.chunks[t]=new I().writeBuffer(e).chunks[0],this}checkMinimalPush(t){const e=this.chunks[t],r=e.buf,s=e.opCodeNum;return r?r.length===0?s===o.OP_0:r.length===1&&r[0]>=1&&r[0]<=16?s===o.OP_1+(r[0]-1):r.length===1&&r[0]===129?s===o.OP_1NEGATE:r.length<=75?s===r.length:r.length<=255?s===o.OP_PUSHDATA1:r.length<=65535?s===o.OP_PUSHDATA2:!0:!0}}class X extends _{static{w(this,"Address")}constructor(t,e,r=null){super({versionByteNum:t,hashBuf:e}),r=r||P.Default.Address,this.Constants=r}fromBuffer(t){if(t.length!==21)throw new Error("address buffers must be exactly 21 bytes");if(t[0]!==this.Constants.pubKeyHash)throw new Error("address: invalid versionByteNum byte");return this.versionByteNum=t[0],this.hashBuf=t.slice(1),this}fromPubKeyHashBuf(t){return this.hashBuf=t,this.versionByteNum=this.Constants.pubKeyHash,this}static fromPubKeyHashBuf(t){return new this().fromPubKeyHashBuf(t)}fromPubKey(t){const e=d.sha256Ripemd160(t.toBuffer());return this.fromPubKeyHashBuf(e)}static fromPubKey(t){return new this().fromPubKey(t)}async asyncFromPubKey(t){const e=[t],r=await B.asyncObjectMethod(this,"fromPubKey",e);return this.fromFastBuffer(r.resbuf)}static asyncFromPubKey(t){return new this().asyncFromPubKey(t)}fromPrivKey(t){const e=new H().fromPrivKey(t),r=d.sha256Ripemd160(e.toBuffer());return this.fromPubKeyHashBuf(r)}static fromPrivKey(t){return new this().fromPrivKey(t)}async asyncFromPrivKey(t){const e=[t],r=await B.asyncObjectMethod(this,"fromPrivKey",e);return this.fromFastBuffer(r.resbuf)}static asyncFromPrivKey(t){return new this().fromPrivKey(t)}fromRandom(){const t=new Y().fromRandom();return this.fromPrivKey(t)}static fromRandom(){return new this().fromRandom()}async asyncFromRandom(){const t=[],e=await B.asyncObjectMethod(this,"fromRandom",t);return this.fromFastBuffer(e.resbuf)}static asyncFromRandom(){return new this().fromRandom()}fromString(t){const e=$.decode(t);return this.fromBuffer(e)}async asyncFromString(t){const e=[t],r=await B.asyncObjectMethod(this,"fromString",e);return this.fromFastBuffer(r.resbuf)}static asyncFromString(t){return new this().asyncFromString(t)}static isValid(t){let e;try{e=new X().fromString(t)}catch{return!1}return e.isValid()}isValid(){try{return this.validate(),!0}catch{return!1}}toTxOutScript(){const t=new I;return t.writeOpCode(o.OP_DUP),t.writeOpCode(o.OP_HASH160),t.writeBuffer(this.hashBuf),t.writeOpCode(o.OP_EQUALVERIFY),t.writeOpCode(o.OP_CHECKSIG),t}fromTxInScript(t){const e=d.sha256Ripemd160(t.chunks[1].buf||Buffer.from("00".repeat(32),"hex"));return this.fromPubKeyHashBuf(e)}static fromTxInScript(t){return new this().fromTxInScript(t)}fromTxOutScript(t){return this.fromPubKeyHashBuf(t.chunks[2].buf)}static fromTxOutScript(t){return new this().fromTxOutScript(t)}toBuffer(){const t=Buffer.from([this.versionByteNum]);return Buffer.concat([t,this.hashBuf])}toJSON(){const t={};return this.hashBuf&&(t.hashBuf=this.hashBuf.toString("hex")),typeof this.versionByteNum<"u"&&(t.versionByteNum=this.versionByteNum),t}fromJSON(t){return t.hashBuf&&(this.hashBuf=Buffer.from(t.hashBuf,"hex")),typeof t.versionByteNum<"u"&&(this.versionByteNum=t.versionByteNum),this}toString(){return $.encode(this.toBuffer())}async asyncToString(){const t=[],e=await B.asyncObjectMethod(this,"toString",t);return JSON.parse(e.resbuf.toString())}validate(){if(!Buffer.isBuffer(this.hashBuf)||this.hashBuf.length!==20)throw new Error("hashBuf must be a buffer of 20 bytes");if(this.versionByteNum!==this.Constants.pubKeyHash)throw new Error("invalid versionByteNum");return this}}X.Mainnet=class extends X{constructor(i,t){super(i,t,P.Mainnet.Address)}},X.Testnet=class extends X{constructor(i,t){super(i,t,P.Testnet.Address)}};class yt extends _{static{w(this,"Bip32")}constructor(t,e,r,s,n,a,u,h=null,l=Y){super({versionBytesNum:t,depth:e,parentFingerPrint:r,childIndex:s,chainCode:n,privKey:a,pubKey:u}),h=h||P.Default.Bip32,this.Constants=h,this.PrivKey=l}fromRandom(){return this.versionBytesNum=this.Constants.privKey,this.depth=0,this.parentFingerPrint=Buffer.from([0,0,0,0]),this.childIndex=0,this.chainCode=tt.getRandomBuffer(32),this.privKey=new this.PrivKey().fromRandom(),this.pubKey=new H().fromPrivKey(this.privKey),this}static fromRandom(){return new this().fromRandom()}fromString(t){return this.fromBuffer($.decode(t))}async asyncFromString(t){const e=[t],r=await B.asyncObjectMethod(this,"fromString",e);return this.fromFastBuffer(r.resbuf)}fromSeed(t){if(!Buffer.isBuffer(t))throw new Error("bytes must be a buffer");if(t.length<16)throw new Error("Need more than 128 bits of entropy");if(t.length>64)throw new Error("More than 512 bits of entropy is nonstandard");const e=d.sha512Hmac(t,Buffer.from("Bitcoin seed"));return this.depth=0,this.parentFingerPrint=Buffer.from([0,0,0,0]),this.childIndex=0,this.chainCode=e.slice(32,64),this.versionBytesNum=this.Constants.privKey,this.privKey=new this.PrivKey().fromBn(c().fromBuffer(e.slice(0,32))),this.pubKey=new H().fromPrivKey(this.privKey),this}static fromSeed(t){return new this().fromSeed(t)}async asyncFromSeed(t){const e=await B.asyncObjectMethod(this,"fromSeed",[t]);return this.fromFastBuffer(e.resbuf)}static asyncFromSeed(t){return new this().asyncFromSeed(t)}fromBuffer(t){if(t.length!==78)throw new Error("incorrect bip32 data length");this.versionBytesNum=t.slice(0,4).readUInt32BE(0),this.depth=t.slice(4,5).readUInt8(0),this.parentFingerPrint=t.slice(5,9),this.childIndex=t.slice(9,13).readUInt32BE(0),this.chainCode=t.slice(13,45);const e=t.slice(45,78),r=this.versionBytesNum===this.Constants.privKey,s=this.versionBytesNum===this.Constants.pubKey;if(r&&e[0]===0)this.privKey=new this.PrivKey().fromBn(c().fromBuffer(e.slice(1,33))),this.pubKey=new H().fromPrivKey(this.privKey);else if(s&&(e[0]===2||e[0]===3))this.pubKey=new H().fromDer(e);else throw new Error("Invalid key");return this}fromFastBuffer(t){if(t.length===0)return this;if(t.length!==78&&t.length!==111)throw new Error("incorrect bip32 fastBuffer data length: "+t.length);this.versionBytesNum=t.slice(0,4).readUInt32BE(0),this.depth=t.slice(4,5).readUInt8(0),this.parentFingerPrint=t.slice(5,9),this.childIndex=t.slice(9,13).readUInt32BE(0),this.chainCode=t.slice(13,45);const e=t.slice(45,t.length),r=this.versionBytesNum===this.Constants.privKey,s=this.versionBytesNum===this.Constants.pubKey;if(r&&e[0]===0&&t.length===78)this.privKey=new this.PrivKey().fromBn(c().fromBuffer(e.slice(1,33))),this.pubKey=new H().fromPrivKey(this.privKey);else if(s&&t.length===111)this.pubKey=new H().fromFastBuffer(e),this.pubKey.compressed=!0;else throw new Error("Invalid key");return this}derive(t){const e=t.split("/");if(t==="m")return this;let r=this;for(const s in e){const n=e[s];if(s==="0"){if(n!=="m")throw new Error("invalid path");continue}if(parseInt(n.replace("'",""),10).toString()!==n.replace("'",""))throw new Error("invalid path");const a=n.length>1&&n[n.length-1]==="'";let u=parseInt(a?n.slice(0,n.length-1):n,10)&2147483647;a&&(u+=2147483648),r=r.deriveChild(u)}return r}async asyncDerive(t){const e=await B.asyncObjectMethod(this,"derive",[t]);return new this.constructor().fromFastBuffer(e.resbuf)}deriveChild(t){if(typeof t!="number")throw new Error("i must be a number");let e=[];e.push(t>>24&255),e.push(t>>16&255),e.push(t>>8&255),e.push(t&255),e=Buffer.from(e);const r=(t&2147483648)!==0,s=this.versionBytesNum===this.Constants.privKey;if(r&&(!this.privKey||!s))throw new Error("Cannot do private key derivation without private key");let n=null;if(this.privKey){let u=null;r?u=Buffer.concat([Buffer.from([0]),this.privKey.bn.toBuffer({size:32}),e]):u=Buffer.concat([this.pubKey.toBuffer({size:32}),e]);const h=d.sha512Hmac(u,this.chainCode),l=c().fromBuffer(h.slice(0,32),{size:32}),g=h.slice(32,64),O=l.add(this.privKey.bn).mod(k.getN());n=new this.constructor,n.chainCode=g,n.privKey=new this.PrivKey().fromBn(O),n.pubKey=new H().fromPrivKey(n.privKey)}else{const u=Buffer.concat([this.pubKey.toBuffer(),e]),h=d.sha512Hmac(u,this.chainCode),l=c().fromBuffer(h.slice(0,32)),g=h.slice(32,64),O=k.getG().mul(l),E=this.pubKey.point,K=O.add(E),f=new H;f.point=K,n=new this.constructor,n.chainCode=g,n.pubKey=f}n.childIndex=t;const a=d.sha256Ripemd160(this.pubKey.toBuffer());return n.parentFingerPrint=a.slice(0,4),n.versionBytesNum=this.versionBytesNum,n.depth=this.depth+1,n}toPublic(){const t=new this.constructor().fromObject(this);return t.versionBytesNum=this.Constants.pubKey,t.privKey=void 0,t}toBuffer(){const t=this.versionBytesNum===this.Constants.privKey,e=this.versionBytesNum===this.Constants.pubKey;if(t)return new R().writeUInt32BE(this.versionBytesNum).writeUInt8(this.depth).write(this.parentFingerPrint).writeUInt32BE(this.childIndex).write(this.chainCode).writeUInt8(0).write(this.privKey.bn.toBuffer({size:32})).toBuffer();if(e){if(this.pubKey.compressed===!1)throw new Error("cannot convert bip32 to buffer if pubKey is not compressed");return new R().writeUInt32BE(this.versionBytesNum).writeUInt8(this.depth).write(this.parentFingerPrint).writeUInt32BE(this.childIndex).write(this.chainCode).write(this.pubKey.toBuffer()).toBuffer()}else throw new Error("bip32: invalid versionBytesNum byte")}toFastBuffer(){if(!this.versionBytesNum)return Buffer.alloc(0);const t=this.versionBytesNum===this.Constants.privKey,e=this.versionBytesNum===this.Constants.pubKey;if(t)return new R().writeUInt32BE(this.versionBytesNum).writeUInt8(this.depth).write(this.parentFingerPrint).writeUInt32BE(this.childIndex).write(this.chainCode).writeUInt8(0).write(this.privKey.bn.toBuffer({size:32})).toBuffer();if(e)return new R().writeUInt32BE(this.versionBytesNum).writeUInt8(this.depth).write(this.parentFingerPrint).writeUInt32BE(this.childIndex).write(this.chainCode).write(this.pubKey.toFastBuffer()).toBuffer();throw new Error("bip32: invalid versionBytesNum byte")}toString(){return $.encode(this.toBuffer())}async asyncToString(){const t=await B.asyncObjectMethod(this,"toString",[]);return JSON.parse(t.resbuf.toString())}toJSON(){return this.toFastHex()}fromJSON(t){return this.fromFastHex(t)}isPrivate(){return this.versionBytesNum===this.Constants.privKey}}yt.Mainnet=class extends yt{constructor(i,t,e,r,s,n,a){super(i,t,e,r,s,n,a,P.Mainnet.Bip32,Y.Mainnet)}},yt.Testnet=class extends yt{constructor(i,t,e,r,s,n,a){super(i,t,e,r,s,n,a,P.Testnet.Bip32,Y.Testnet)}};const It=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];It.space=" ";const Pt=["\u3042\u3044\u3053\u304F\u3057\u3093","\u3042\u3044\u3055\u3064","\u3042\u3044\u3060","\u3042\u304A\u305E\u3089","\u3042\u304B\u3061\u3083\u3093","\u3042\u304D\u308B","\u3042\u3051\u304C\u305F","\u3042\u3051\u308B","\u3042\u3053\u304C\u308C\u308B","\u3042\u3055\u3044","\u3042\u3055\u3072","\u3042\u3057\u3042\u3068","\u3042\u3058\u308F\u3046","\u3042\u305A\u304B\u308B","\u3042\u305A\u304D","\u3042\u305D\u3076","\u3042\u305F\u3048\u308B","\u3042\u305F\u305F\u3081\u308B","\u3042\u305F\u308A\u307E\u3048","\u3042\u305F\u308B","\u3042\u3064\u3044","\u3042\u3064\u304B\u3046","\u3042\u3063\u3057\u3085\u304F","\u3042\u3064\u307E\u308A","\u3042\u3064\u3081\u308B","\u3042\u3066\u306A","\u3042\u3066\u306F\u307E\u308B","\u3042\u3072\u308B","\u3042\u3076\u3089","\u3042\u3076\u308B","\u3042\u3075\u308C\u308B","\u3042\u307E\u3044","\u3042\u307E\u3069","\u3042\u307E\u3084\u304B\u3059","\u3042\u307E\u308A","\u3042\u307F\u3082\u306E","\u3042\u3081\u308A\u304B","\u3042\u3084\u307E\u308B","\u3042\u3086\u3080","\u3042\u3089\u3044\u3050\u307E","\u3042\u3089\u3057","\u3042\u3089\u3059\u3058","\u3042\u3089\u305F\u3081\u308B","\u3042\u3089\u3086\u308B","\u3042\u3089\u308F\u3059","\u3042\u308A\u304C\u3068\u3046","\u3042\u308F\u305B\u308B","\u3042\u308F\u3066\u308B","\u3042\u3093\u3044","\u3042\u3093\u304C\u3044","\u3042\u3093\u3053","\u3042\u3093\u305C\u3093","\u3042\u3093\u3066\u3044","\u3042\u3093\u306A\u3044","\u3042\u3093\u307E\u308A","\u3044\u3044\u3060\u3059","\u3044\u304A\u3093","\u3044\u304C\u3044","\u3044\u304C\u304F","\u3044\u304D\u304A\u3044","\u3044\u304D\u306A\u308A","\u3044\u304D\u3082\u306E","\u3044\u304D\u308B","\u3044\u304F\u3058","\u3044\u304F\u3076\u3093","\u3044\u3051\u3070\u306A","\u3044\u3051\u3093","\u3044\u3053\u3046","\u3044\u3053\u304F","\u3044\u3053\u3064","\u3044\u3055\u307E\u3057\u3044","\u3044\u3055\u3093","\u3044\u3057\u304D","\u3044\u3058\u3085\u3046","\u3044\u3058\u3087\u3046","\u3044\u3058\u308F\u308B","\u3044\u305A\u307F","\u3044\u305A\u308C","\u3044\u305B\u3044","\u3044\u305B\u3048\u3073","\u3044\u305B\u304B\u3044","\u3044\u305B\u304D","\u3044\u305C\u3093","\u3044\u305D\u3046\u308D\u3046","\u3044\u305D\u304C\u3057\u3044","\u3044\u3060\u3044","\u3044\u3060\u304F","\u3044\u305F\u305A\u3089","\u3044\u305F\u307F","\u3044\u305F\u308A\u3042","\u3044\u3061\u304A\u3046","\u3044\u3061\u3058","\u3044\u3061\u3069","\u3044\u3061\u3070","\u3044\u3061\u3076","\u3044\u3061\u308A\u3085\u3046","\u3044\u3064\u304B","\u3044\u3063\u3057\u3085\u3093","\u3044\u3063\u305B\u3044","\u3044\u3063\u305D\u3046","\u3044\u3063\u305F\u3093","\u3044\u3063\u3061","\u3044\u3063\u3066\u3044","\u3044\u3063\u307D\u3046","\u3044\u3066\u3056","\u3044\u3066\u3093","\u3044\u3069\u3046","\u3044\u3068\u3053","\u3044\u306A\u3044","\u3044\u306A\u304B","\u3044\u306D\u3080\u308A","\u3044\u306E\u3061","\u3044\u306E\u308B","\u3044\u306F\u3064","\u3044\u3070\u308B","\u3044\u306F\u3093","\u3044\u3073\u304D","\u3044\u3072\u3093","\u3044\u3075\u304F","\u3044\u3078\u3093","\u3044\u307B\u3046","\u3044\u307F\u3093","\u3044\u3082\u3046\u3068","\u3044\u3082\u305F\u308C","\u3044\u3082\u308A","\u3044\u3084\u304C\u308B","\u3044\u3084\u3059","\u3044\u3088\u304B\u3093","\u3044\u3088\u304F","\u3044\u3089\u3044","\u3044\u3089\u3059\u3068","\u3044\u308A\u3050\u3061","\u3044\u308A\u3087\u3046","\u3044\u308C\u3044","\u3044\u308C\u3082\u306E","\u3044\u308C\u308B","\u3044\u308D\u3048\u3093\u3074\u3064","\u3044\u308F\u3044","\u3044\u308F\u3046","\u3044\u308F\u304B\u3093","\u3044\u308F\u3070","\u3044\u308F\u3086\u308B","\u3044\u3093\u3052\u3093\u307E\u3081","\u3044\u3093\u3055\u3064","\u3044\u3093\u3057\u3087\u3046","\u3044\u3093\u3088\u3046","\u3046\u3048\u304D","\u3046\u3048\u308B","\u3046\u304A\u3056","\u3046\u304C\u3044","\u3046\u304B\u3076","\u3046\u304B\u3079\u308B","\u3046\u304D\u308F","\u3046\u304F\u3089\u3044\u306A","\u3046\u304F\u308C\u308C","\u3046\u3051\u305F\u307E\u308F\u308B","\u3046\u3051\u3064\u3051","\u3046\u3051\u3068\u308B","\u3046\u3051\u3082\u3064","\u3046\u3051\u308B","\u3046\u3054\u304B\u3059","\u3046\u3054\u304F","\u3046\u3053\u3093","\u3046\u3055\u304E","\u3046\u3057\u306A\u3046","\u3046\u3057\u308D\u304C\u307F","\u3046\u3059\u3044","\u3046\u3059\u304E","\u3046\u3059\u3050\u3089\u3044","\u3046\u3059\u3081\u308B","\u3046\u305B\u3064","\u3046\u3061\u3042\u308F\u305B","\u3046\u3061\u304C\u308F","\u3046\u3061\u304D","\u3046\u3061\u3085\u3046","\u3046\u3063\u304B\u308A","\u3046\u3064\u304F\u3057\u3044","\u3046\u3063\u305F\u3048\u308B","\u3046\u3064\u308B","\u3046\u3069\u3093","\u3046\u306A\u304E","\u3046\u306A\u3058","\u3046\u306A\u305A\u304F","\u3046\u306A\u308B","\u3046\u306D\u308B","\u3046\u306E\u3046","\u3046\u3076\u3052","\u3046\u3076\u3054\u3048","\u3046\u307E\u308C\u308B","\u3046\u3081\u308B","\u3046\u3082\u3046","\u3046\u3084\u307E\u3046","\u3046\u3088\u304F","\u3046\u3089\u304C\u3048\u3059","\u3046\u3089\u3050\u3061","\u3046\u3089\u306A\u3044","\u3046\u308A\u3042\u3052","\u3046\u308A\u304D\u308C","\u3046\u308B\u3055\u3044","\u3046\u308C\u3057\u3044","\u3046\u308C\u3086\u304D","\u3046\u308C\u308B","\u3046\u308D\u3053","\u3046\u308F\u304D","\u3046\u308F\u3055","\u3046\u3093\u3053\u3046","\u3046\u3093\u3061\u3093","\u3046\u3093\u3066\u3093","\u3046\u3093\u3069\u3046","\u3048\u3044\u3048\u3093","\u3048\u3044\u304C","\u3048\u3044\u304D\u3087\u3046","\u3048\u3044\u3054","\u3048\u3044\u305B\u3044","\u3048\u3044\u3076\u3093","\u3048\u3044\u3088\u3046","\u3048\u3044\u308F","\u3048\u304A\u308A","\u3048\u304C\u304A","\u3048\u304C\u304F","\u3048\u304D\u305F\u3044","\u3048\u304F\u305B\u308B","\u3048\u3057\u3083\u304F","\u3048\u3059\u3066","\u3048\u3064\u3089\u3093","\u3048\u306E\u3050","\u3048\u307B\u3046\u307E\u304D","\u3048\u307B\u3093","\u3048\u307E\u304D","\u3048\u3082\u3058","\u3048\u3082\u306E","\u3048\u3089\u3044","\u3048\u3089\u3076","\u3048\u308A\u3042","\u3048\u3093\u3048\u3093","\u3048\u3093\u304B\u3044","\u3048\u3093\u304E","\u3048\u3093\u3052\u304D","\u3048\u3093\u3057\u3085\u3046","\u3048\u3093\u305C\u3064","\u3048\u3093\u305D\u304F","\u3048\u3093\u3061\u3087\u3046","\u3048\u3093\u3068\u3064","\u304A\u3044\u304B\u3051\u308B","\u304A\u3044\u3053\u3059","\u304A\u3044\u3057\u3044","\u304A\u3044\u3064\u304F","\u304A\u3046\u3048\u3093","\u304A\u3046\u3055\u307E","\u304A\u3046\u3058","\u304A\u3046\u305B\u3064","\u304A\u3046\u305F\u3044","\u304A\u3046\u3075\u304F","\u304A\u3046\u3079\u3044","\u304A\u3046\u3088\u3046","\u304A\u3048\u308B","\u304A\u304A\u3044","\u304A\u304A\u3046","\u304A\u304A\u3069\u304A\u308A","\u304A\u304A\u3084","\u304A\u304A\u3088\u305D","\u304A\u304B\u3048\u308A","\u304A\u304B\u305A","\u304A\u304C\u3080","\u304A\u304B\u308F\u308A","\u304A\u304E\u306A\u3046","\u304A\u304D\u308B","\u304A\u304F\u3055\u307E","\u304A\u304F\u3058\u3087\u3046","\u304A\u304F\u308A\u304C\u306A","\u304A\u304F\u308B","\u304A\u304F\u308C\u308B","\u304A\u3053\u3059","\u304A\u3053\u306A\u3046","\u304A\u3053\u308B","\u304A\u3055\u3048\u308B","\u304A\u3055\u306A\u3044","\u304A\u3055\u3081\u308B","\u304A\u3057\u3044\u308C","\u304A\u3057\u3048\u308B","\u304A\u3058\u304E","\u304A\u3058\u3055\u3093","\u304A\u3057\u3083\u308C","\u304A\u305D\u3089\u304F","\u304A\u305D\u308F\u308B","\u304A\u305F\u304C\u3044","\u304A\u305F\u304F","\u304A\u3060\u3084\u304B","\u304A\u3061\u3064\u304F","\u304A\u3063\u3068","\u304A\u3064\u308A","\u304A\u3067\u304B\u3051","\u304A\u3068\u3057\u3082\u306E","\u304A\u3068\u306A\u3057\u3044","\u304A\u3069\u308A","\u304A\u3069\u308D\u304B\u3059","\u304A\u3070\u3055\u3093","\u304A\u307E\u3044\u308A","\u304A\u3081\u3067\u3068\u3046","\u304A\u3082\u3044\u3067","\u304A\u3082\u3046","\u304A\u3082\u305F\u3044","\u304A\u3082\u3061\u3083","\u304A\u3084\u3064","\u304A\u3084\u3086\u3073","\u304A\u3088\u307C\u3059","\u304A\u3089\u3093\u3060","\u304A\u308D\u3059","\u304A\u3093\u304C\u304F","\u304A\u3093\u3051\u3044","\u304A\u3093\u3057\u3083","\u304A\u3093\u305B\u3093","\u304A\u3093\u3060\u3093","\u304A\u3093\u3061\u3085\u3046","\u304A\u3093\u3069\u3051\u3044","\u304B\u3042\u3064","\u304B\u3044\u304C","\u304C\u3044\u304D","\u304C\u3044\u3051\u3093","\u304C\u3044\u3053\u3046","\u304B\u3044\u3055\u3064","\u304B\u3044\u3057\u3083","\u304B\u3044\u3059\u3044\u3088\u304F","\u304B\u3044\u305C\u3093","\u304B\u3044\u305E\u3046\u3069","\u304B\u3044\u3064\u3046","\u304B\u3044\u3066\u3093","\u304B\u3044\u3068\u3046","\u304B\u3044\u3075\u304F","\u304C\u3044\u3078\u304D","\u304B\u3044\u307B\u3046","\u304B\u3044\u3088\u3046","\u304C\u3044\u3089\u3044","\u304B\u3044\u308F","\u304B\u3048\u308B","\u304B\u304A\u308A","\u304B\u304B\u3048\u308B","\u304B\u304C\u304F","\u304B\u304C\u3057","\u304B\u304C\u307F","\u304B\u304F\u3054","\u304B\u304F\u3068\u304F","\u304B\u3056\u308B","\u304C\u305E\u3046","\u304B\u305F\u3044","\u304B\u305F\u3061","\u304C\u3061\u3087\u3046","\u304C\u3063\u304D\u3085\u3046","\u304C\u3063\u3053\u3046","\u304C\u3063\u3055\u3093","\u304C\u3063\u3057\u3087\u3046","\u304B\u306A\u3056\u308F\u3057","\u304B\u306E\u3046","\u304C\u306F\u304F","\u304B\u3076\u304B","\u304B\u307B\u3046","\u304B\u307B\u3054","\u304B\u307E\u3046","\u304B\u307E\u307C\u3053","\u304B\u3081\u308C\u304A\u3093","\u304B\u3086\u3044","\u304B\u3088\u3046\u3073","\u304B\u3089\u3044","\u304B\u308B\u3044","\u304B\u308D\u3046","\u304B\u308F\u304F","\u304B\u308F\u3089","\u304C\u3093\u304B","\u304B\u3093\u3051\u3044","\u304B\u3093\u3053\u3046","\u304B\u3093\u3057\u3083","\u304B\u3093\u305D\u3046","\u304B\u3093\u305F\u3093","\u304B\u3093\u3061","\u304C\u3093\u3070\u308B","\u304D\u3042\u3044","\u304D\u3042\u3064","\u304D\u3044\u308D","\u304E\u3044\u3093","\u304D\u3046\u3044","\u304D\u3046\u3093","\u304D\u3048\u308B","\u304D\u304A\u3046","\u304D\u304A\u304F","\u304D\u304A\u3061","\u304D\u304A\u3093","\u304D\u304B\u3044","\u304D\u304B\u304F","\u304D\u304B\u3093\u3057\u3083","\u304D\u304D\u3066","\u304D\u304F\u3070\u308A","\u304D\u304F\u3089\u3052","\u304D\u3051\u3093\u305B\u3044","\u304D\u3053\u3046","\u304D\u3053\u3048\u308B","\u304D\u3053\u304F","\u304D\u3055\u3044","\u304D\u3055\u304F","\u304D\u3055\u307E","\u304D\u3055\u3089\u304E","\u304E\u3058\u304B\u304C\u304F","\u304E\u3057\u304D","\u304E\u3058\u305F\u3044\u3051\u3093","\u304E\u3058\u306B\u3063\u3066\u3044","\u304E\u3058\u3085\u3064\u3057\u3083","\u304D\u3059\u3046","\u304D\u305B\u3044","\u304D\u305B\u304D","\u304D\u305B\u3064","\u304D\u305D\u3046","\u304D\u305E\u304F","\u304D\u305E\u3093","\u304D\u305F\u3048\u308B","\u304D\u3061\u3087\u3046","\u304D\u3064\u3048\u3093","\u304E\u3063\u3061\u308A","\u304D\u3064\u3064\u304D","\u304D\u3064\u306D","\u304D\u3066\u3044","\u304D\u3069\u3046","\u304D\u3069\u304F","\u304D\u306A\u3044","\u304D\u306A\u304C","\u304D\u306A\u3053","\u304D\u306C\u3054\u3057","\u304D\u306D\u3093","\u304D\u306E\u3046","\u304D\u306E\u3057\u305F","\u304D\u306F\u304F","\u304D\u3073\u3057\u3044","\u304D\u3072\u3093","\u304D\u3075\u304F","\u304D\u3076\u3093","\u304D\u307C\u3046","\u304D\u307B\u3093","\u304D\u307E\u308B","\u304D\u307F\u3064","\u304D\u3080\u305A\u304B\u3057\u3044","\u304D\u3081\u308B","\u304D\u3082\u3060\u3081\u3057","\u304D\u3082\u3061","\u304D\u3082\u306E","\u304D\u3083\u304F","\u304D\u3084\u304F","\u304E\u3085\u3046\u306B\u304F","\u304D\u3088\u3046","\u304D\u3087\u3046\u308A\u3085\u3046","\u304D\u3089\u3044","\u304D\u3089\u304F","\u304D\u308A\u3093","\u304D\u308C\u3044","\u304D\u308C\u3064","\u304D\u308D\u304F","\u304E\u308D\u3093","\u304D\u308F\u3081\u308B","\u304E\u3093\u3044\u308D","\u304D\u3093\u304B\u304F\u3058","\u304D\u3093\u3058\u3087","\u304D\u3093\u3088\u3046\u3073","\u3050\u3042\u3044","\u304F\u3044\u305A","\u304F\u3046\u304B\u3093","\u304F\u3046\u304D","\u304F\u3046\u3050\u3093","\u304F\u3046\u3053\u3046","\u3050\u3046\u305B\u3044","\u304F\u3046\u305D\u3046","\u3050\u3046\u305F\u3089","\u304F\u3046\u3075\u304F","\u304F\u3046\u307C","\u304F\u304B\u3093","\u304F\u304D\u3087\u3046","\u304F\u3052\u3093","\u3050\u3053\u3046","\u304F\u3055\u3044","\u304F\u3055\u304D","\u304F\u3055\u3070\u306A","\u304F\u3055\u308B","\u304F\u3057\u3083\u307F","\u304F\u3057\u3087\u3046","\u304F\u3059\u306E\u304D","\u304F\u3059\u308A\u3086\u3073","\u304F\u305B\u3052","\u304F\u305B\u3093","\u3050\u305F\u3044\u3066\u304D","\u304F\u3060\u3055\u308B","\u304F\u305F\u3073\u308C\u308B","\u304F\u3061\u3053\u307F","\u304F\u3061\u3055\u304D","\u304F\u3064\u3057\u305F","\u3050\u3063\u3059\u308A","\u304F\u3064\u308D\u3050","\u304F\u3068\u3046\u3066\u3093","\u304F\u3069\u304F","\u304F\u306A\u3093","\u304F\u306D\u304F\u306D","\u304F\u306E\u3046","\u304F\u3075\u3046","\u304F\u307F\u3042\u308F\u305B","\u304F\u307F\u305F\u3066\u308B","\u304F\u3081\u308B","\u304F\u3084\u304F\u3057\u3087","\u304F\u3089\u3059","\u304F\u3089\u3079\u308B","\u304F\u308B\u307E","\u304F\u308C\u308B","\u304F\u308D\u3046","\u304F\u308F\u3057\u3044","\u3050\u3093\u304B\u3093","\u3050\u3093\u3057\u3087\u304F","\u3050\u3093\u305F\u3044","\u3050\u3093\u3066","\u3051\u3042\u306A","\u3051\u3044\u304B\u304F","\u3051\u3044\u3051\u3093","\u3051\u3044\u3053","\u3051\u3044\u3055\u3064","\u3052\u3044\u3058\u3085\u3064","\u3051\u3044\u305F\u3044","\u3052\u3044\u306E\u3046\u3058\u3093","\u3051\u3044\u308C\u304D","\u3051\u3044\u308D","\u3051\u304A\u3068\u3059","\u3051\u304A\u308A\u3082\u306E","\u3052\u304D\u304B","\u3052\u304D\u3052\u3093","\u3052\u304D\u3060\u3093","\u3052\u304D\u3061\u3093","\u3052\u304D\u3068\u3064","\u3052\u304D\u306F","\u3052\u304D\u3084\u304F","\u3052\u3053\u3046","\u3052\u3053\u304F\u3058\u3087\u3046","\u3052\u3056\u3044","\u3051\u3055\u304D","\u3052\u3056\u3093","\u3051\u3057\u304D","\u3051\u3057\u3054\u3080","\u3051\u3057\u3087\u3046","\u3052\u3059\u3068","\u3051\u305F\u3070","\u3051\u3061\u3083\u3063\u3077","\u3051\u3061\u3089\u3059","\u3051\u3064\u3042\u3064","\u3051\u3064\u3044","\u3051\u3064\u3048\u304D","\u3051\u3063\u3053\u3093","\u3051\u3064\u3058\u3087","\u3051\u3063\u305B\u304D","\u3051\u3063\u3066\u3044","\u3051\u3064\u307E\u3064","\u3052\u3064\u3088\u3046\u3073","\u3052\u3064\u308C\u3044","\u3051\u3064\u308D\u3093","\u3052\u3069\u304F","\u3051\u3068\u3070\u3059","\u3051\u3068\u308B","\u3051\u306A\u3052","\u3051\u306A\u3059","\u3051\u306A\u307F","\u3051\u306C\u304D","\u3052\u306D\u3064","\u3051\u306D\u3093","\u3051\u306F\u3044","\u3052\u3072\u3093","\u3051\u3076\u304B\u3044","\u3052\u307C\u304F","\u3051\u307E\u308A","\u3051\u307F\u304B\u308B","\u3051\u3080\u3057","\u3051\u3080\u308A","\u3051\u3082\u306E","\u3051\u3089\u3044","\u3051\u308D\u3051\u308D","\u3051\u308F\u3057\u3044","\u3051\u3093\u3044","\u3051\u3093\u3048\u3064","\u3051\u3093\u304A","\u3051\u3093\u304B","\u3052\u3093\u304D","\u3051\u3093\u3052\u3093","\u3051\u3093\u3053\u3046","\u3051\u3093\u3055\u304F","\u3051\u3093\u3057\u3085\u3046","\u3051\u3093\u3059\u3046","\u3052\u3093\u305D\u3046","\u3051\u3093\u3061\u304F","\u3051\u3093\u3066\u3044","\u3051\u3093\u3068\u3046","\u3051\u3093\u306A\u3044","\u3051\u3093\u306B\u3093","\u3052\u3093\u3076\u3064","\u3051\u3093\u307E","\u3051\u3093\u307F\u3093","\u3051\u3093\u3081\u3044","\u3051\u3093\u3089\u3093","\u3051\u3093\u308A","\u3053\u3042\u304F\u307E","\u3053\u3044\u306C","\u3053\u3044\u3073\u3068","\u3054\u3046\u3044","\u3053\u3046\u3048\u3093","\u3053\u3046\u304A\u3093","\u3053\u3046\u304B\u3093","\u3054\u3046\u304D\u3085\u3046","\u3054\u3046\u3051\u3044","\u3053\u3046\u3053\u3046","\u3053\u3046\u3055\u3044","\u3053\u3046\u3058","\u3053\u3046\u3059\u3044","\u3054\u3046\u305B\u3044","\u3053\u3046\u305D\u304F","\u3053\u3046\u305F\u3044","\u3053\u3046\u3061\u3083","\u3053\u3046\u3064\u3046","\u3053\u3046\u3066\u3044","\u3053\u3046\u3069\u3046","\u3053\u3046\u306A\u3044","\u3053\u3046\u306F\u3044","\u3054\u3046\u307B\u3046","\u3054\u3046\u307E\u3093","\u3053\u3046\u3082\u304F","\u3053\u3046\u308A\u3064","\u3053\u3048\u308B","\u3053\u304A\u308A","\u3054\u304B\u3044","\u3054\u304C\u3064","\u3054\u304B\u3093","\u3053\u304F\u3054","\u3053\u304F\u3055\u3044","\u3053\u304F\u3068\u3046","\u3053\u304F\u306A\u3044","\u3053\u304F\u306F\u304F","\u3053\u3050\u307E","\u3053\u3051\u3044","\u3053\u3051\u308B","\u3053\u3053\u306E\u304B","\u3053\u3053\u308D","\u3053\u3055\u3081","\u3053\u3057\u3064","\u3053\u3059\u3046","\u3053\u305B\u3044","\u3053\u305B\u304D","\u3053\u305C\u3093","\u3053\u305D\u3060\u3066","\u3053\u305F\u3044","\u3053\u305F\u3048\u308B","\u3053\u305F\u3064","\u3053\u3061\u3087\u3046","\u3053\u3063\u304B","\u3053\u3064\u3053\u3064","\u3053\u3064\u3070\u3093","\u3053\u3064\u3076","\u3053\u3066\u3044","\u3053\u3066\u3093","\u3053\u3068\u304C\u3089","\u3053\u3068\u3057","\u3053\u3068\u3070","\u3053\u3068\u308A","\u3053\u306A\u3054\u306A","\u3053\u306D\u3053\u306D","\u3053\u306E\u307E\u307E","\u3053\u306E\u307F","\u3053\u306E\u3088","\u3054\u306F\u3093","\u3053\u3072\u3064\u3058","\u3053\u3075\u3046","\u3053\u3075\u3093","\u3053\u307C\u308C\u308B","\u3054\u307E\u3042\u3076\u3089","\u3053\u307E\u304B\u3044","\u3054\u307E\u3059\u308A","\u3053\u307E\u3064\u306A","\u3053\u307E\u308B","\u3053\u3080\u304E\u3053","\u3053\u3082\u3058","\u3053\u3082\u3061","\u3053\u3082\u306E","\u3053\u3082\u3093","\u3053\u3084\u304F","\u3053\u3084\u307E","\u3053\u3086\u3046","\u3053\u3086\u3073","\u3053\u3088\u3044","\u3053\u3088\u3046","\u3053\u308A\u308B","\u3053\u308C\u304F\u3057\u3087\u3093","\u3053\u308D\u3063\u3051","\u3053\u308F\u3082\u3066","\u3053\u308F\u308C\u308B","\u3053\u3093\u3044\u3093","\u3053\u3093\u304B\u3044","\u3053\u3093\u304D","\u3053\u3093\u3057\u3085\u3046","\u3053\u3093\u3059\u3044","\u3053\u3093\u3060\u3066","\u3053\u3093\u3068\u3093","\u3053\u3093\u306A\u3093","\u3053\u3093\u3073\u306B","\u3053\u3093\u307D\u3093","\u3053\u3093\u307E\u3051","\u3053\u3093\u3084","\u3053\u3093\u308C\u3044","\u3053\u3093\u308F\u304F","\u3056\u3044\u3048\u304D","\u3055\u3044\u304B\u3044","\u3055\u3044\u304D\u3093","\u3056\u3044\u3052\u3093","\u3056\u3044\u3053","\u3055\u3044\u3057\u3087","\u3055\u3044\u305B\u3044","\u3056\u3044\u305F\u304F","\u3056\u3044\u3061\u3085\u3046","\u3055\u3044\u3066\u304D","\u3056\u3044\u308A\u3087\u3046","\u3055\u3046\u306A","\u3055\u304B\u3044\u3057","\u3055\u304C\u3059","\u3055\u304B\u306A","\u3055\u304B\u307F\u3061","\u3055\u304C\u308B","\u3055\u304E\u3087\u3046","\u3055\u304F\u3057","\u3055\u304F\u3072\u3093","\u3055\u304F\u3089","\u3055\u3053\u304F","\u3055\u3053\u3064","\u3055\u305A\u304B\u308B","\u3056\u305B\u304D","\u3055\u305F\u3093","\u3055\u3064\u3048\u3044","\u3056\u3064\u304A\u3093","\u3056\u3063\u304B","\u3056\u3064\u304C\u304F","\u3055\u3063\u304D\u3087\u304F","\u3056\u3063\u3057","\u3055\u3064\u3058\u3093","\u3056\u3063\u305D\u3046","\u3055\u3064\u305F\u3070","\u3055\u3064\u307E\u3044\u3082","\u3055\u3066\u3044","\u3055\u3068\u3044\u3082","\u3055\u3068\u3046","\u3055\u3068\u304A\u3084","\u3055\u3068\u3057","\u3055\u3068\u308B","\u3055\u306E\u3046","\u3055\u3070\u304F","\u3055\u3073\u3057\u3044","\u3055\u3079\u3064","\u3055\u307B\u3046","\u3055\u307B\u3069","\u3055\u307E\u3059","\u3055\u307F\u3057\u3044","\u3055\u307F\u3060\u308C","\u3055\u3080\u3051","\u3055\u3081\u308B","\u3055\u3084\u3048\u3093\u3069\u3046","\u3055\u3086\u3046","\u3055\u3088\u3046","\u3055\u3088\u304F","\u3055\u3089\u3060","\u3056\u308B\u305D\u3070","\u3055\u308F\u3084\u304B","\u3055\u308F\u308B","\u3055\u3093\u3044\u3093","\u3055\u3093\u304B","\u3055\u3093\u304D\u3083\u304F","\u3055\u3093\u3053\u3046","\u3055\u3093\u3055\u3044","\u3056\u3093\u3057\u3087","\u3055\u3093\u3059\u3046","\u3055\u3093\u305B\u3044","\u3055\u3093\u305D","\u3055\u3093\u3061","\u3055\u3093\u307E","\u3055\u3093\u307F","\u3055\u3093\u3089\u3093","\u3057\u3042\u3044","\u3057\u3042\u3052","\u3057\u3042\u3055\u3063\u3066","\u3057\u3042\u308F\u305B","\u3057\u3044\u304F","\u3057\u3044\u3093","\u3057\u3046\u3061","\u3057\u3048\u3044","\u3057\u304A\u3051","\u3057\u304B\u3044","\u3057\u304B\u304F","\u3058\u304B\u3093","\u3057\u3054\u3068","\u3057\u3059\u3046","\u3058\u3060\u3044","\u3057\u305F\u3046\u3051","\u3057\u305F\u304E","\u3057\u305F\u3066","\u3057\u305F\u307F","\u3057\u3061\u3087\u3046","\u3057\u3061\u308A\u3093","\u3057\u3063\u304B\u308A","\u3057\u3064\u3058","\u3057\u3064\u3082\u3093","\u3057\u3066\u3044","\u3057\u3066\u304D","\u3057\u3066\u3064","\u3058\u3066\u3093","\u3058\u3069\u3046","\u3057\u306A\u304E\u308C","\u3057\u306A\u3082\u306E","\u3057\u306A\u3093","\u3057\u306D\u307E","\u3057\u306D\u3093","\u3057\u306E\u3050","\u3057\u306E\u3076","\u3057\u306F\u3044","\u3057\u3070\u304B\u308A","\u3057\u306F\u3064","\u3057\u306F\u3089\u3044","\u3057\u306F\u3093","\u3057\u3072\u3087\u3046","\u3057\u3075\u304F","\u3058\u3076\u3093","\u3057\u3078\u3044","\u3057\u307B\u3046","\u3057\u307B\u3093","\u3057\u307E\u3046","\u3057\u307E\u308B","\u3057\u307F\u3093","\u3057\u3080\u3051\u308B","\u3058\u3080\u3057\u3087","\u3057\u3081\u3044","\u3057\u3081\u308B","\u3057\u3082\u3093","\u3057\u3083\u3044\u3093","\u3057\u3083\u3046\u3093","\u3057\u3083\u304A\u3093","\u3058\u3083\u304C\u3044\u3082","\u3057\u3084\u304F\u3057\u3087","\u3057\u3083\u304F\u307B\u3046","\u3057\u3083\u3051\u3093","\u3057\u3083\u3053","\u3057\u3083\u3056\u3044","\u3057\u3083\u3057\u3093","\u3057\u3083\u305B\u3093","\u3057\u3083\u305D\u3046","\u3057\u3083\u305F\u3044","\u3057\u3083\u3061\u3087\u3046","\u3057\u3083\u3063\u304D\u3093","\u3058\u3083\u307E","\u3057\u3083\u308A\u3093","\u3057\u3083\u308C\u3044","\u3058\u3086\u3046","\u3058\u3085\u3046\u3057\u3087","\u3057\u3085\u304F\u306F\u304F","\u3058\u3085\u3057\u3093","\u3057\u3085\u3063\u305B\u304D","\u3057\u3085\u307F","\u3057\u3085\u3089\u3070","\u3058\u3085\u3093\u3070\u3093","\u3057\u3087\u3046\u304B\u3044","\u3057\u3087\u304F\u305F\u304F","\u3057\u3087\u3063\u3051\u3093","\u3057\u3087\u3069\u3046","\u3057\u3087\u3082\u3064","\u3057\u3089\u305B\u308B","\u3057\u3089\u3079\u308B","\u3057\u3093\u304B","\u3057\u3093\u3053\u3046","\u3058\u3093\u3058\u3083","\u3057\u3093\u305B\u3044\u3058","\u3057\u3093\u3061\u304F","\u3057\u3093\u308A\u3093","\u3059\u3042\u3052","\u3059\u3042\u3057","\u3059\u3042\u306A","\u305A\u3042\u3093","\u3059\u3044\u3048\u3044","\u3059\u3044\u304B","\u3059\u3044\u3068\u3046","\u305A\u3044\u3076\u3093","\u3059\u3044\u3088\u3046\u3073","\u3059\u3046\u304C\u304F","\u3059\u3046\u3058\u3064","\u3059\u3046\u305B\u3093","\u3059\u304A\u3069\u308A","\u3059\u304D\u307E","\u3059\u304F\u3046","\u3059\u304F\u306A\u3044","\u3059\u3051\u308B","\u3059\u3054\u3044","\u3059\u3053\u3057","\u305A\u3055\u3093","\u3059\u305A\u3057\u3044","\u3059\u3059\u3080","\u3059\u3059\u3081\u308B","\u3059\u3063\u304B\u308A","\u305A\u3063\u3057\u308A","\u305A\u3063\u3068","\u3059\u3066\u304D","\u3059\u3066\u308B","\u3059\u306D\u308B","\u3059\u306E\u3053","\u3059\u306F\u3060","\u3059\u3070\u3089\u3057\u3044","\u305A\u3072\u3087\u3046","\u305A\u3076\u306C\u308C","\u3059\u3076\u308A","\u3059\u3075\u308C","\u3059\u3079\u3066","\u3059\u3079\u308B","\u305A\u307B\u3046","\u3059\u307C\u3093","\u3059\u307E\u3044","\u3059\u3081\u3057","\u3059\u3082\u3046","\u3059\u3084\u304D","\u3059\u3089\u3059\u3089","\u3059\u308B\u3081","\u3059\u308C\u3061\u304C\u3046","\u3059\u308D\u3063\u3068","\u3059\u308F\u308B","\u3059\u3093\u305C\u3093","\u3059\u3093\u307D\u3046","\u305B\u3042\u3076\u3089","\u305B\u3044\u304B\u3064","\u305B\u3044\u3052\u3093","\u305B\u3044\u3058","\u305B\u3044\u3088\u3046","\u305B\u304A\u3046","\u305B\u304B\u3044\u304B\u3093","\u305B\u304D\u306B\u3093","\u305B\u304D\u3080","\u305B\u304D\u3086","\u305B\u304D\u3089\u3093\u3046\u3093","\u305B\u3051\u3093","\u305B\u3053\u3046","\u305B\u3059\u3058","\u305B\u305F\u3044","\u305B\u305F\u3051","\u305B\u3063\u304B\u304F","\u305B\u3063\u304D\u3083\u304F","\u305C\u3063\u304F","\u305B\u3063\u3051\u3093","\u305B\u3063\u3053\u3064","\u305B\u3063\u3055\u305F\u304F\u307E","\u305B\u3064\u305E\u304F","\u305B\u3064\u3060\u3093","\u305B\u3064\u3067\u3093","\u305B\u3063\u3071\u3093","\u305B\u3064\u3073","\u305B\u3064\u3076\u3093","\u305B\u3064\u3081\u3044","\u305B\u3064\u308A\u3064","\u305B\u306A\u304B","\u305B\u306E\u3073","\u305B\u306F\u3070","\u305B\u3073\u308D","\u305B\u307C\u306D","\u305B\u307E\u3044","\u305B\u307E\u308B","\u305B\u3081\u308B","\u305B\u3082\u305F\u308C","\u305B\u308A\u3075","\u305C\u3093\u3042\u304F","\u305B\u3093\u3044","\u305B\u3093\u3048\u3044","\u305B\u3093\u304B","\u305B\u3093\u304D\u3087","\u305B\u3093\u304F","\u305B\u3093\u3052\u3093","\u305C\u3093\u3054","\u305B\u3093\u3055\u3044","\u305B\u3093\u3057\u3085","\u305B\u3093\u3059\u3044","\u305B\u3093\u305B\u3044","\u305B\u3093\u305E","\u305B\u3093\u305F\u304F","\u305B\u3093\u3061\u3087\u3046","\u305B\u3093\u3066\u3044","\u305B\u3093\u3068\u3046","\u305B\u3093\u306C\u304D","\u305B\u3093\u306D\u3093","\u305B\u3093\u3071\u3044","\u305C\u3093\u3076","\u305C\u3093\u307D\u3046","\u305B\u3093\u3080","\u305B\u3093\u3081\u3093\u3058\u3087","\u305B\u3093\u3082\u3093","\u305B\u3093\u3084\u304F","\u305B\u3093\u3086\u3046","\u305B\u3093\u3088\u3046","\u305C\u3093\u3089","\u305C\u3093\u308A\u3083\u304F","\u305B\u3093\u308C\u3044","\u305B\u3093\u308D","\u305D\u3042\u304F","\u305D\u3044\u3068\u3052\u308B","\u305D\u3044\u306D","\u305D\u3046\u304C\u3093\u304D\u3087\u3046","\u305D\u3046\u304D","\u305D\u3046\u3054","\u305D\u3046\u3057\u3093","\u305D\u3046\u3060\u3093","\u305D\u3046\u306A\u3093","\u305D\u3046\u3073","\u305D\u3046\u3081\u3093","\u305D\u3046\u308A","\u305D\u3048\u3082\u306E","\u305D\u3048\u3093","\u305D\u304C\u3044","\u305D\u3052\u304D","\u305D\u3053\u3046","\u305D\u3053\u305D\u3053","\u305D\u3056\u3044","\u305D\u3057\u306A","\u305D\u305B\u3044","\u305D\u305B\u3093","\u305D\u305D\u3050","\u305D\u3060\u3066\u308B","\u305D\u3064\u3046","\u305D\u3064\u3048\u3093","\u305D\u3063\u304B\u3093","\u305D\u3064\u304E\u3087\u3046","\u305D\u3063\u3051\u3064","\u305D\u3063\u3053\u3046","\u305D\u3063\u305B\u3093","\u305D\u3063\u3068","\u305D\u3068\u304C\u308F","\u305D\u3068\u3065\u3089","\u305D\u306A\u3048\u308B","\u305D\u306A\u305F","\u305D\u3075\u307C","\u305D\u307C\u304F","\u305D\u307C\u308D","\u305D\u307E\u3064","\u305D\u307E\u308B","\u305D\u3080\u304F","\u305D\u3080\u308A\u3048","\u305D\u3081\u308B","\u305D\u3082\u305D\u3082","\u305D\u3088\u304B\u305C","\u305D\u3089\u307E\u3081","\u305D\u308D\u3046","\u305D\u3093\u304B\u3044","\u305D\u3093\u3051\u3044","\u305D\u3093\u3056\u3044","\u305D\u3093\u3057\u3064","\u305D\u3093\u305E\u304F","\u305D\u3093\u3061\u3087\u3046","\u305E\u3093\u3073","\u305E\u3093\u3076\u3093","\u305D\u3093\u307F\u3093","\u305F\u3042\u3044","\u305F\u3044\u3044\u3093","\u305F\u3044\u3046\u3093","\u305F\u3044\u3048\u304D","\u305F\u3044\u304A\u3046","\u3060\u3044\u304C\u304F","\u305F\u3044\u304D","\u305F\u3044\u3050\u3046","\u305F\u3044\u3051\u3093","\u305F\u3044\u3053","\u305F\u3044\u3056\u3044","\u3060\u3044\u3058\u3087\u3046\u3076","\u3060\u3044\u3059\u304D","\u305F\u3044\u305B\u3064","\u305F\u3044\u305D\u3046","\u3060\u3044\u305F\u3044","\u305F\u3044\u3061\u3087\u3046","\u305F\u3044\u3066\u3044","\u3060\u3044\u3069\u3053\u308D","\u305F\u3044\u306A\u3044","\u305F\u3044\u306D\u3064","\u305F\u3044\u306E\u3046","\u305F\u3044\u306F\u3093","\u3060\u3044\u3072\u3087\u3046","\u305F\u3044\u3075\u3046","\u305F\u3044\u3078\u3093","\u305F\u3044\u307B","\u305F\u3044\u307E\u3064\u3070\u306A","\u305F\u3044\u307F\u3093\u3050","\u305F\u3044\u3080","\u305F\u3044\u3081\u3093","\u305F\u3044\u3084\u304D","\u305F\u3044\u3088\u3046","\u305F\u3044\u3089","\u305F\u3044\u308A\u3087\u304F","\u305F\u3044\u308B","\u305F\u3044\u308F\u3093","\u305F\u3046\u3048","\u305F\u3048\u308B","\u305F\u304A\u3059","\u305F\u304A\u308B","\u305F\u304A\u308C\u308B","\u305F\u304B\u3044","\u305F\u304B\u306D","\u305F\u304D\u3073","\u305F\u304F\u3055\u3093","\u305F\u3053\u304F","\u305F\u3053\u3084\u304D","\u305F\u3055\u3044","\u305F\u3057\u3056\u3093","\u3060\u3058\u3083\u308C","\u305F\u3059\u3051\u308B","\u305F\u305A\u3055\u308F\u308B","\u305F\u305D\u304C\u308C","\u305F\u305F\u304B\u3046","\u305F\u305F\u304F","\u305F\u3060\u3057\u3044","\u305F\u305F\u307F","\u305F\u3061\u3070\u306A","\u3060\u3063\u304B\u3044","\u3060\u3063\u304D\u3083\u304F","\u3060\u3063\u3053","\u3060\u3063\u3057\u3085\u3064","\u3060\u3063\u305F\u3044","\u305F\u3066\u308B","\u305F\u3068\u3048\u308B","\u305F\u306A\u3070\u305F","\u305F\u306B\u3093","\u305F\u306C\u304D","\u305F\u306E\u3057\u307F","\u305F\u306F\u3064","\u305F\u3076\u3093","\u305F\u3079\u308B","\u305F\u307C\u3046","\u305F\u307E\u3054","\u305F\u307E\u308B","\u3060\u3080\u308B","\u305F\u3081\u3044\u304D","\u305F\u3081\u3059","\u305F\u3081\u308B","\u305F\u3082\u3064","\u305F\u3084\u3059\u3044","\u305F\u3088\u308B","\u305F\u3089\u3059","\u305F\u308A\u304D\u307B\u3093\u304C\u3093","\u305F\u308A\u3087\u3046","\u305F\u308A\u308B","\u305F\u308B\u3068","\u305F\u308C\u308B","\u305F\u308C\u3093\u3068","\u305F\u308D\u3063\u3068","\u305F\u308F\u3080\u308C\u308B","\u3060\u3093\u3042\u3064","\u305F\u3093\u3044","\u305F\u3093\u304A\u3093","\u305F\u3093\u304B","\u305F\u3093\u304D","\u305F\u3093\u3051\u3093","\u305F\u3093\u3054","\u305F\u3093\u3055\u3093","\u305F\u3093\u3058\u3087\u3046\u3073","\u3060\u3093\u305B\u3044","\u305F\u3093\u305D\u304F","\u305F\u3093\u305F\u3044","\u3060\u3093\u3061","\u305F\u3093\u3066\u3044","\u305F\u3093\u3068\u3046","\u3060\u3093\u306A","\u305F\u3093\u306B\u3093","\u3060\u3093\u306D\u3064","\u305F\u3093\u306E\u3046","\u305F\u3093\u3074\u3093","\u3060\u3093\u307C\u3046","\u305F\u3093\u307E\u3064","\u305F\u3093\u3081\u3044","\u3060\u3093\u308C\u3064","\u3060\u3093\u308D","\u3060\u3093\u308F","\u3061\u3042\u3044","\u3061\u3042\u3093","\u3061\u3044\u304D","\u3061\u3044\u3055\u3044","\u3061\u3048\u3093","\u3061\u304B\u3044","\u3061\u304B\u3089","\u3061\u304D\u3085\u3046","\u3061\u304D\u3093","\u3061\u3051\u3044\u305A","\u3061\u3051\u3093","\u3061\u3053\u304F","\u3061\u3055\u3044","\u3061\u3057\u304D","\u3061\u3057\u308A\u3087\u3046","\u3061\u305B\u3044","\u3061\u305D\u3046","\u3061\u305F\u3044","\u3061\u305F\u3093","\u3061\u3061\u304A\u3084","\u3061\u3064\u3058\u3087","\u3061\u3066\u304D","\u3061\u3066\u3093","\u3061\u306C\u304D","\u3061\u306C\u308A","\u3061\u306E\u3046","\u3061\u3072\u3087\u3046","\u3061\u3078\u3044\u305B\u3093","\u3061\u307B\u3046","\u3061\u307E\u305F","\u3061\u307F\u3064","\u3061\u307F\u3069\u308D","\u3061\u3081\u3044\u3069","\u3061\u3083\u3093\u3053\u306A\u3079","\u3061\u3085\u3046\u3044","\u3061\u3086\u308A\u3087\u304F","\u3061\u3087\u3046\u3057","\u3061\u3087\u3055\u304F\u3051\u3093","\u3061\u3089\u3057","\u3061\u3089\u307F","\u3061\u308A\u304C\u307F","\u3061\u308A\u3087\u3046","\u3061\u308B\u3069","\u3061\u308F\u308F","\u3061\u3093\u305F\u3044","\u3061\u3093\u3082\u304F","\u3064\u3044\u304B","\u3064\u3044\u305F\u3061","\u3064\u3046\u304B","\u3064\u3046\u3058\u3087\u3046","\u3064\u3046\u306F\u3093","\u3064\u3046\u308F","\u3064\u304B\u3046","\u3064\u304B\u308C\u308B","\u3064\u304F\u306D","\u3064\u304F\u308B","\u3064\u3051\u306D","\u3064\u3051\u308B","\u3064\u3054\u3046","\u3064\u305F\u3048\u308B","\u3064\u3065\u304F","\u3064\u3064\u3058","\u3064\u3064\u3080","\u3064\u3068\u3081\u308B","\u3064\u306A\u304C\u308B","\u3064\u306A\u307F","\u3064\u306D\u3065\u306D","\u3064\u306E\u308B","\u3064\u3076\u3059","\u3064\u307E\u3089\u306A\u3044","\u3064\u307E\u308B","\u3064\u307F\u304D","\u3064\u3081\u305F\u3044","\u3064\u3082\u308A","\u3064\u3082\u308B","\u3064\u3088\u3044","\u3064\u308B\u307C","\u3064\u308B\u307F\u304F","\u3064\u308F\u3082\u306E","\u3064\u308F\u308A","\u3066\u3042\u3057","\u3066\u3042\u3066","\u3066\u3042\u307F","\u3066\u3044\u304A\u3093","\u3066\u3044\u304B","\u3066\u3044\u304D","\u3066\u3044\u3051\u3044","\u3066\u3044\u3053\u304F","\u3066\u3044\u3055\u3064","\u3066\u3044\u3057","\u3066\u3044\u305B\u3044","\u3066\u3044\u305F\u3044","\u3066\u3044\u3069","\u3066\u3044\u306D\u3044","\u3066\u3044\u3072\u3087\u3046","\u3066\u3044\u3078\u3093","\u3066\u3044\u307C\u3046","\u3066\u3046\u3061","\u3066\u304A\u304F\u308C","\u3066\u304D\u3068\u3046","\u3066\u304F\u3073","\u3067\u3053\u307C\u3053","\u3066\u3055\u304E\u3087\u3046","\u3066\u3055\u3052","\u3066\u3059\u308A","\u3066\u305D\u3046","\u3066\u3061\u304C\u3044","\u3066\u3061\u3087\u3046","\u3066\u3064\u304C\u304F","\u3066\u3064\u3065\u304D","\u3067\u3063\u3071","\u3066\u3064\u307C\u3046","\u3066\u3064\u3084","\u3067\u306C\u304B\u3048","\u3066\u306C\u304D","\u3066\u306C\u3050\u3044","\u3066\u306E\u3072\u3089","\u3066\u306F\u3044","\u3066\u3076\u304F\u308D","\u3066\u3075\u3060","\u3066\u307B\u3069\u304D","\u3066\u307B\u3093","\u3066\u307E\u3048","\u3066\u307E\u304D\u305A\u3057","\u3066\u307F\u3058\u304B","\u3066\u307F\u3084\u3052","\u3066\u3089\u3059","\u3066\u308C\u3073","\u3066\u308F\u3051","\u3066\u308F\u305F\u3057","\u3067\u3093\u3042\u3064","\u3066\u3093\u3044\u3093","\u3066\u3093\u304B\u3044","\u3066\u3093\u304D","\u3066\u3093\u3050","\u3066\u3093\u3051\u3093","\u3066\u3093\u3054\u304F","\u3066\u3093\u3055\u3044","\u3066\u3093\u3057","\u3066\u3093\u3059\u3046","\u3067\u3093\u3061","\u3066\u3093\u3066\u304D","\u3066\u3093\u3068\u3046","\u3066\u3093\u306A\u3044","\u3066\u3093\u3077\u3089","\u3066\u3093\u307C\u3046\u3060\u3044","\u3066\u3093\u3081\u3064","\u3066\u3093\u3089\u3093\u304B\u3044","\u3067\u3093\u308A\u3087\u304F","\u3067\u3093\u308F","\u3069\u3042\u3044","\u3068\u3044\u308C","\u3069\u3046\u304B\u3093","\u3068\u3046\u304D\u3085\u3046","\u3069\u3046\u3050","\u3068\u3046\u3057","\u3068\u3046\u3080\u304E","\u3068\u304A\u3044","\u3068\u304A\u304B","\u3068\u304A\u304F","\u3068\u304A\u3059","\u3068\u304A\u308B","\u3068\u304B\u3044","\u3068\u304B\u3059","\u3068\u304D\u304A\u308A","\u3068\u304D\u3069\u304D","\u3068\u304F\u3044","\u3068\u304F\u3057\u3085\u3046","\u3068\u304F\u3066\u3093","\u3068\u304F\u306B","\u3068\u304F\u3079\u3064","\u3068\u3051\u3044","\u3068\u3051\u308B","\u3068\u3053\u3084","\u3068\u3055\u304B","\u3068\u3057\u3087\u304B\u3093","\u3068\u305D\u3046","\u3068\u305F\u3093","\u3068\u3061\u3085\u3046","\u3068\u3063\u304D\u3085\u3046","\u3068\u3063\u304F\u3093","\u3068\u3064\u305C\u3093","\u3068\u3064\u306B\u3085\u3046","\u3068\u3069\u3051\u308B","\u3068\u3068\u306E\u3048\u308B","\u3068\u306A\u3044","\u3068\u306A\u3048\u308B","\u3068\u306A\u308A","\u3068\u306E\u3055\u307E","\u3068\u3070\u3059","\u3069\u3076\u304C\u308F","\u3068\u307B\u3046","\u3068\u307E\u308B","\u3068\u3081\u308B","\u3068\u3082\u3060\u3061","\u3068\u3082\u308B","\u3069\u3088\u3046\u3073","\u3068\u3089\u3048\u308B","\u3068\u3093\u304B\u3064","\u3069\u3093\u3076\u308A","\u306A\u3044\u304B\u304F","\u306A\u3044\u3053\u3046","\u306A\u3044\u3057\u3087","\u306A\u3044\u3059","\u306A\u3044\u305B\u3093","\u306A\u3044\u305D\u3046","\u306A\u304A\u3059","\u306A\u304C\u3044","\u306A\u304F\u3059","\u306A\u3052\u308B","\u306A\u3053\u3046\u3069","\u306A\u3055\u3051","\u306A\u305F\u3067\u3053\u3053","\u306A\u3063\u3068\u3046","\u306A\u3064\u3084\u3059\u307F","\u306A\u306A\u304A\u3057","\u306A\u306B\u3054\u3068","\u306A\u306B\u3082\u306E","\u306A\u306B\u308F","\u306A\u306E\u304B","\u306A\u3075\u3060","\u306A\u307E\u3044\u304D","\u306A\u307E\u3048","\u306A\u307E\u307F","\u306A\u307F\u3060","\u306A\u3081\u3089\u304B","\u306A\u3081\u308B","\u306A\u3084\u3080","\u306A\u3089\u3046","\u306A\u3089\u3073","\u306A\u3089\u3076","\u306A\u308C\u308B","\u306A\u308F\u3068\u3073","\u306A\u308F\u3070\u308A","\u306B\u3042\u3046","\u306B\u3044\u304C\u305F","\u306B\u3046\u3051","\u306B\u304A\u3044","\u306B\u304B\u3044","\u306B\u304C\u3066","\u306B\u304D\u3073","\u306B\u304F\u3057\u307F","\u306B\u304F\u307E\u3093","\u306B\u3052\u308B","\u306B\u3055\u3093\u304B\u305F\u3093\u305D","\u306B\u3057\u304D","\u306B\u305B\u3082\u306E","\u306B\u3061\u3058\u3087\u3046","\u306B\u3061\u3088\u3046\u3073","\u306B\u3063\u304B","\u306B\u3063\u304D","\u306B\u3063\u3051\u3044","\u306B\u3063\u3053\u3046","\u306B\u3063\u3055\u3093","\u306B\u3063\u3057\u3087\u304F","\u306B\u3063\u3059\u3046","\u306B\u3063\u305B\u304D","\u306B\u3063\u3066\u3044","\u306B\u306A\u3046","\u306B\u307B\u3093","\u306B\u307E\u3081","\u306B\u3082\u3064","\u306B\u3084\u308A","\u306B\u3085\u3046\u3044\u3093","\u306B\u308A\u3093\u3057\u3083","\u306B\u308F\u3068\u308A","\u306B\u3093\u3044","\u306B\u3093\u304B","\u306B\u3093\u304D","\u306B\u3093\u3052\u3093","\u306B\u3093\u3057\u304D","\u306B\u3093\u305A\u3046","\u306B\u3093\u305D\u3046","\u306B\u3093\u305F\u3044","\u306B\u3093\u3061","\u306B\u3093\u3066\u3044","\u306B\u3093\u306B\u304F","\u306B\u3093\u3077","\u306B\u3093\u307E\u308A","\u306B\u3093\u3080","\u306B\u3093\u3081\u3044","\u306B\u3093\u3088\u3046","\u306C\u3044\u304F\u304E","\u306C\u304B\u3059","\u306C\u3050\u3044\u3068\u308B","\u306C\u3050\u3046","\u306C\u304F\u3082\u308A","\u306C\u3059\u3080","\u306C\u307E\u3048\u3073","\u306C\u3081\u308A","\u306C\u3089\u3059","\u306C\u3093\u3061\u3083\u304F","\u306D\u3042\u3052","\u306D\u3044\u304D","\u306D\u3044\u308B","\u306D\u3044\u308D","\u306D\u3050\u305B","\u306D\u304F\u305F\u3044","\u306D\u304F\u3089","\u306D\u3053\u305C","\u306D\u3053\u3080","\u306D\u3055\u3052","\u306D\u3059\u3054\u3059","\u306D\u305D\u3079\u308B","\u306D\u3060\u3093","\u306D\u3064\u3044","\u306D\u3063\u3057\u3093","\u306D\u3064\u305E\u3046","\u306D\u3063\u305F\u3044\u304E\u3087","\u306D\u3076\u305D\u304F","\u306D\u3075\u3060","\u306D\u307C\u3046","\u306D\u307B\u308A\u306F\u307B\u308A","\u306D\u307E\u304D","\u306D\u307E\u308F\u3057","\u306D\u307F\u307F","\u306D\u3080\u3044","\u306D\u3080\u305F\u3044","\u306D\u3082\u3068","\u306D\u3089\u3046","\u306D\u308F\u3056","\u306D\u3093\u3044\u308A","\u306D\u3093\u304A\u3057","\u306D\u3093\u304B\u3093","\u306D\u3093\u304D\u3093","\u306D\u3093\u3050","\u306D\u3093\u3056","\u306D\u3093\u3057","\u306D\u3093\u3061\u3083\u304F","\u306D\u3093\u3069","\u306D\u3093\u3074","\u306D\u3093\u3076\u3064","\u306D\u3093\u307E\u3064","\u306D\u3093\u308A\u3087\u3046","\u306D\u3093\u308C\u3044","\u306E\u3044\u305A","\u306E\u304A\u3065\u307E","\u306E\u304C\u3059","\u306E\u304D\u306A\u307F","\u306E\u3053\u304E\u308A","\u306E\u3053\u3059","\u306E\u3053\u308B","\u306E\u305B\u308B","\u306E\u305E\u304F","\u306E\u305E\u3080","\u306E\u305F\u307E\u3046","\u306E\u3061\u307B\u3069","\u306E\u3063\u304F","\u306E\u3070\u3059","\u306E\u306F\u3089","\u306E\u3079\u308B","\u306E\u307C\u308B","\u306E\u307F\u3082\u306E","\u306E\u3084\u307E","\u306E\u3089\u3044\u306C","\u306E\u3089\u306D\u3053","\u306E\u308A\u3082\u306E","\u306E\u308A\u3086\u304D","\u306E\u308C\u3093","\u306E\u3093\u304D","\u3070\u3042\u3044","\u306F\u3042\u304F","\u3070\u3042\u3055\u3093","\u3070\u3044\u304B","\u3070\u3044\u304F","\u306F\u3044\u3051\u3093","\u306F\u3044\u3054","\u306F\u3044\u3057\u3093","\u306F\u3044\u3059\u3044","\u306F\u3044\u305B\u3093","\u306F\u3044\u305D\u3046","\u306F\u3044\u3061","\u3070\u3044\u3070\u3044","\u306F\u3044\u308C\u3064","\u306F\u3048\u308B","\u306F\u304A\u308B","\u306F\u304B\u3044","\u3070\u304B\u308A","\u306F\u304B\u308B","\u306F\u304F\u3057\u3085","\u306F\u3051\u3093","\u306F\u3053\u3076","\u306F\u3055\u307F","\u306F\u3055\u3093","\u306F\u3057\u3054","\u3070\u3057\u3087","\u306F\u3057\u308B","\u306F\u305B\u308B","\u3071\u305D\u3053\u3093","\u306F\u305D\u3093","\u306F\u305F\u3093","\u306F\u3061\u307F\u3064","\u306F\u3064\u304A\u3093","\u306F\u3063\u304B\u304F","\u306F\u3065\u304D","\u306F\u3063\u304D\u308A","\u306F\u3063\u304F\u3064","\u306F\u3063\u3051\u3093","\u306F\u3063\u3053\u3046","\u306F\u3063\u3055\u3093","\u306F\u3063\u3057\u3093","\u306F\u3063\u305F\u3064","\u306F\u3063\u3061\u3085\u3046","\u306F\u3063\u3066\u3093","\u306F\u3063\u3074\u3087\u3046","\u306F\u3063\u307D\u3046","\u306F\u306A\u3059","\u306F\u306A\u3073","\u306F\u306B\u304B\u3080","\u306F\u3076\u3089\u3057","\u306F\u307F\u304C\u304D","\u306F\u3080\u304B\u3046","\u306F\u3081\u3064","\u306F\u3084\u3044","\u306F\u3084\u3057","\u306F\u3089\u3046","\u306F\u308D\u3046\u3043\u3093","\u306F\u308F\u3044","\u306F\u3093\u3044","\u306F\u3093\u3048\u3044","\u306F\u3093\u304A\u3093","\u306F\u3093\u304B\u304F","\u306F\u3093\u304D\u3087\u3046","\u3070\u3093\u3050\u307F","\u306F\u3093\u3053","\u306F\u3093\u3057\u3083","\u306F\u3093\u3059\u3046","\u306F\u3093\u3060\u3093","\u3071\u3093\u3061","\u3071\u3093\u3064","\u306F\u3093\u3066\u3044","\u306F\u3093\u3068\u3057","\u306F\u3093\u306E\u3046","\u306F\u3093\u3071","\u306F\u3093\u3076\u3093","\u306F\u3093\u307A\u3093","\u306F\u3093\u307C\u3046\u304D","\u306F\u3093\u3081\u3044","\u306F\u3093\u3089\u3093","\u306F\u3093\u308D\u3093","\u3072\u3044\u304D","\u3072\u3046\u3093","\u3072\u3048\u308B","\u3072\u304B\u304F","\u3072\u304B\u308A","\u3072\u304B\u308B","\u3072\u304B\u3093","\u3072\u304F\u3044","\u3072\u3051\u3064","\u3072\u3053\u3046\u304D","\u3072\u3053\u304F","\u3072\u3055\u3044","\u3072\u3055\u3057\u3076\u308A","\u3072\u3055\u3093","\u3073\u3058\u3085\u3064\u304B\u3093","\u3072\u3057\u3087","\u3072\u305D\u304B","\u3072\u305D\u3080","\u3072\u305F\u3080\u304D","\u3072\u3060\u308A","\u3072\u305F\u308B","\u3072\u3064\u304E","\u3072\u3063\u3053\u3057","\u3072\u3063\u3057","\u3072\u3064\u3058\u3085\u3072\u3093","\u3072\u3063\u3059","\u3072\u3064\u305C\u3093","\u3074\u3063\u305F\u308A","\u3074\u3063\u3061\u308A","\u3072\u3064\u3088\u3046","\u3072\u3066\u3044","\u3072\u3068\u3054\u307F","\u3072\u306A\u307E\u3064\u308A","\u3072\u306A\u3093","\u3072\u306D\u308B","\u3072\u306F\u3093","\u3072\u3073\u304F","\u3072\u3072\u3087\u3046","\u3072\u307B\u3046","\u3072\u307E\u308F\u308A","\u3072\u307E\u3093","\u3072\u307F\u3064","\u3072\u3081\u3044","\u3072\u3081\u3058\u3057","\u3072\u3084\u3051","\u3072\u3084\u3059","\u3072\u3088\u3046","\u3073\u3087\u3046\u304D","\u3072\u3089\u304C\u306A","\u3072\u3089\u304F","\u3072\u308A\u3064","\u3072\u308A\u3087\u3046","\u3072\u308B\u307E","\u3072\u308B\u3084\u3059\u307F","\u3072\u308C\u3044","\u3072\u308D\u3044","\u3072\u308D\u3046","\u3072\u308D\u304D","\u3072\u308D\u3086\u304D","\u3072\u3093\u304B\u304F","\u3072\u3093\u3051\u3064","\u3072\u3093\u3053\u3093","\u3072\u3093\u3057\u3085","\u3072\u3093\u305D\u3046","\u3074\u3093\u3061","\u3072\u3093\u3071\u3093","\u3073\u3093\u307C\u3046","\u3075\u3042\u3093","\u3075\u3044\u3046\u3061","\u3075\u3046\u3051\u3044","\u3075\u3046\u305B\u3093","\u3077\u3046\u305F\u308D\u3046","\u3075\u3046\u3068\u3046","\u3075\u3046\u3075","\u3075\u3048\u308B","\u3075\u304A\u3093","\u3075\u304B\u3044","\u3075\u304D\u3093","\u3075\u304F\u3056\u3064","\u3075\u304F\u3076\u304F\u308D","\u3075\u3053\u3046","\u3075\u3055\u3044","\u3075\u3057\u304E","\u3075\u3058\u307F","\u3075\u3059\u307E","\u3075\u305B\u3044","\u3075\u305B\u3050","\u3075\u305D\u304F","\u3076\u305F\u306B\u304F","\u3075\u305F\u3093","\u3075\u3061\u3087\u3046","\u3075\u3064\u3046","\u3075\u3064\u304B","\u3075\u3063\u304B\u3064","\u3075\u3063\u304D","\u3075\u3063\u3053\u304F","\u3076\u3069\u3046","\u3075\u3068\u308B","\u3075\u3068\u3093","\u3075\u306E\u3046","\u3075\u306F\u3044","\u3075\u3072\u3087\u3046","\u3075\u3078\u3093","\u3075\u307E\u3093","\u3075\u307F\u3093","\u3075\u3081\u3064","\u3075\u3081\u3093","\u3075\u3088\u3046","\u3075\u308A\u3053","\u3075\u308A\u308B","\u3075\u308B\u3044","\u3075\u3093\u3044\u304D","\u3076\u3093\u304C\u304F","\u3076\u3093\u3050","\u3075\u3093\u3057\u3064","\u3076\u3093\u305B\u304D","\u3075\u3093\u305D\u3046","\u3076\u3093\u307D\u3046","\u3078\u3044\u3042\u3093","\u3078\u3044\u304A\u3093","\u3078\u3044\u304C\u3044","\u3078\u3044\u304D","\u3078\u3044\u3052\u3093","\u3078\u3044\u3053\u3046","\u3078\u3044\u3055","\u3078\u3044\u3057\u3083","\u3078\u3044\u305B\u3064","\u3078\u3044\u305D","\u3078\u3044\u305F\u304F","\u3078\u3044\u3066\u3093","\u3078\u3044\u306D\u3064","\u3078\u3044\u308F","\u3078\u304D\u304C","\u3078\u3053\u3080","\u3079\u306B\u3044\u308D","\u3079\u306B\u3057\u3087\u3046\u304C","\u3078\u3089\u3059","\u3078\u3093\u304B\u3093","\u3079\u3093\u304D\u3087\u3046","\u3079\u3093\u3054\u3057","\u3078\u3093\u3055\u3044","\u3078\u3093\u305F\u3044","\u3079\u3093\u308A","\u307B\u3042\u3093","\u307B\u3044\u304F","\u307C\u3046\u304E\u3087","\u307B\u3046\u3053\u304F","\u307B\u3046\u305D\u3046","\u307B\u3046\u307B\u3046","\u307B\u3046\u3082\u3093","\u307B\u3046\u308A\u3064","\u307B\u3048\u308B","\u307B\u304A\u3093","\u307B\u304B\u3093","\u307B\u304D\u3087\u3046","\u307C\u304D\u3093","\u307B\u304F\u308D","\u307B\u3051\u3064","\u307B\u3051\u3093","\u307B\u3053\u3046","\u307B\u3053\u308B","\u307B\u3057\u3044","\u307B\u3057\u3064","\u307B\u3057\u3085","\u307B\u3057\u3087\u3046","\u307B\u305B\u3044","\u307B\u305D\u3044","\u307B\u305D\u304F","\u307B\u305F\u3066","\u307B\u305F\u308B","\u307D\u3061\u3076\u304F\u308D","\u307B\u3063\u304D\u3087\u304F","\u307B\u3063\u3055","\u307B\u3063\u305F\u3093","\u307B\u3068\u3093\u3069","\u307B\u3081\u308B","\u307B\u3093\u3044","\u307B\u3093\u304D","\u307B\u3093\u3051","\u307B\u3093\u3057\u3064","\u307B\u3093\u3084\u304F","\u307E\u3044\u306B\u3061","\u307E\u304B\u3044","\u307E\u304B\u305B\u308B","\u307E\u304C\u308B","\u307E\u3051\u308B","\u307E\u3053\u3068","\u307E\u3055\u3064","\u307E\u3058\u3081","\u307E\u3059\u304F","\u307E\u305C\u308B","\u307E\u3064\u308A","\u307E\u3068\u3081","\u307E\u306A\u3076","\u307E\u306C\u3051","\u307E\u306D\u304F","\u307E\u307B\u3046","\u307E\u3082\u308B","\u307E\u3086\u3052","\u307E\u3088\u3046","\u307E\u308D\u3084\u304B","\u307E\u308F\u3059","\u307E\u308F\u308A","\u307E\u308F\u308B","\u307E\u3093\u304C","\u307E\u3093\u304D\u3064","\u307E\u3093\u305E\u304F","\u307E\u3093\u306A\u304B","\u307F\u3044\u3089","\u307F\u3046\u3061","\u307F\u3048\u308B","\u307F\u304C\u304F","\u307F\u304B\u305F","\u307F\u304B\u3093","\u307F\u3051\u3093","\u307F\u3053\u3093","\u307F\u3058\u304B\u3044","\u307F\u3059\u3044","\u307F\u3059\u3048\u308B","\u307F\u305B\u308B","\u307F\u3063\u304B","\u307F\u3064\u304B\u308B","\u307F\u3064\u3051\u308B","\u307F\u3066\u3044","\u307F\u3068\u3081\u308B","\u307F\u306A\u3068","\u307F\u306A\u307F\u304B\u3055\u3044","\u307F\u306D\u3089\u308B","\u307F\u306E\u3046","\u307F\u306E\u304C\u3059","\u307F\u307B\u3093","\u307F\u3082\u3068","\u307F\u3084\u3052","\u307F\u3089\u3044","\u307F\u308A\u3087\u304F","\u307F\u308F\u304F","\u307F\u3093\u304B","\u307F\u3093\u305E\u304F","\u3080\u3044\u304B","\u3080\u3048\u304D","\u3080\u3048\u3093","\u3080\u304B\u3044","\u3080\u304B\u3046","\u3080\u304B\u3048","\u3080\u304B\u3057","\u3080\u304E\u3061\u3083","\u3080\u3051\u308B","\u3080\u3052\u3093","\u3080\u3055\u307C\u308B","\u3080\u3057\u3042\u3064\u3044","\u3080\u3057\u3070","\u3080\u3058\u3085\u3093","\u3080\u3057\u308D","\u3080\u3059\u3046","\u3080\u3059\u3053","\u3080\u3059\u3076","\u3080\u3059\u3081","\u3080\u305B\u308B","\u3080\u305B\u3093","\u3080\u3061\u3085\u3046","\u3080\u306A\u3057\u3044","\u3080\u306E\u3046","\u3080\u3084\u307F","\u3080\u3088\u3046","\u3080\u3089\u3055\u304D","\u3080\u308A\u3087\u3046","\u3080\u308D\u3093","\u3081\u3044\u3042\u3093","\u3081\u3044\u3046\u3093","\u3081\u3044\u3048\u3093","\u3081\u3044\u304B\u304F","\u3081\u3044\u304D\u3087\u304F","\u3081\u3044\u3055\u3044","\u3081\u3044\u3057","\u3081\u3044\u305D\u3046","\u3081\u3044\u3076\u3064","\u3081\u3044\u308C\u3044","\u3081\u3044\u308F\u304F","\u3081\u3050\u307E\u308C\u308B","\u3081\u3056\u3059","\u3081\u3057\u305F","\u3081\u305A\u3089\u3057\u3044","\u3081\u3060\u3064","\u3081\u307E\u3044","\u3081\u3084\u3059","\u3081\u3093\u304D\u3087","\u3081\u3093\u305B\u304D","\u3081\u3093\u3069\u3046","\u3082\u3046\u3057\u3042\u3052\u308B","\u3082\u3046\u3069\u3046\u3051\u3093","\u3082\u3048\u308B","\u3082\u304F\u3057","\u3082\u304F\u3066\u304D","\u3082\u304F\u3088\u3046\u3073","\u3082\u3061\u308D\u3093","\u3082\u3069\u308B","\u3082\u3089\u3046","\u3082\u3093\u304F","\u3082\u3093\u3060\u3044","\u3084\u304A\u3084","\u3084\u3051\u308B","\u3084\u3055\u3044","\u3084\u3055\u3057\u3044","\u3084\u3059\u3044","\u3084\u3059\u305F\u308D\u3046","\u3084\u3059\u307F","\u3084\u305B\u308B","\u3084\u305D\u3046","\u3084\u305F\u3044","\u3084\u3061\u3093","\u3084\u3063\u3068","\u3084\u3063\u3071\u308A","\u3084\u3076\u308B","\u3084\u3081\u308B","\u3084\u3084\u3053\u3057\u3044","\u3084\u3088\u3044","\u3084\u308F\u3089\u304B\u3044","\u3086\u3046\u304D","\u3086\u3046\u3073\u3093\u304D\u3087\u304F","\u3086\u3046\u3079","\u3086\u3046\u3081\u3044","\u3086\u3051\u3064","\u3086\u3057\u3085\u3064","\u3086\u305B\u3093","\u3086\u305D\u3046","\u3086\u305F\u304B","\u3086\u3061\u3083\u304F","\u3086\u3067\u308B","\u3086\u306B\u3085\u3046","\u3086\u3073\u308F","\u3086\u3089\u3044","\u3086\u308C\u308B","\u3088\u3046\u3044","\u3088\u3046\u304B","\u3088\u3046\u304D\u3085\u3046","\u3088\u3046\u3058","\u3088\u3046\u3059","\u3088\u3046\u3061\u3048\u3093","\u3088\u304B\u305C","\u3088\u304B\u3093","\u3088\u304D\u3093","\u3088\u304F\u305B\u3044","\u3088\u304F\u307C\u3046","\u3088\u3051\u3044","\u3088\u3054\u308C\u308B","\u3088\u3055\u3093","\u3088\u3057\u3085\u3046","\u3088\u305D\u3046","\u3088\u305D\u304F","\u3088\u3063\u304B","\u3088\u3066\u3044","\u3088\u3069\u304C\u308F\u304F","\u3088\u306D\u3064","\u3088\u3084\u304F","\u3088\u3086\u3046","\u3088\u308D\u3053\u3076","\u3088\u308D\u3057\u3044","\u3089\u3044\u3046","\u3089\u304F\u304C\u304D","\u3089\u304F\u3054","\u3089\u304F\u3055\u3064","\u3089\u304F\u3060","\u3089\u3057\u3093\u3070\u3093","\u3089\u305B\u3093","\u3089\u305E\u304F","\u3089\u305F\u3044","\u3089\u3063\u304B","\u3089\u308C\u3064","\u308A\u3048\u304D","\u308A\u304B\u3044","\u308A\u304D\u3055\u304F","\u308A\u304D\u305B\u3064","\u308A\u304F\u3050\u3093","\u308A\u304F\u3064","\u308A\u3051\u3093","\u308A\u3053\u3046","\u308A\u305B\u3044","\u308A\u305D\u3046","\u308A\u305D\u304F","\u308A\u3066\u3093","\u308A\u306D\u3093","\u308A\u3086\u3046","\u308A\u3085\u3046\u304C\u304F","\u308A\u3088\u3046","\u308A\u3087\u3046\u308A","\u308A\u3087\u304B\u3093","\u308A\u3087\u304F\u3061\u3083","\u308A\u3087\u3053\u3046","\u308A\u308A\u304F","\u308A\u308C\u304D","\u308A\u308D\u3093","\u308A\u3093\u3054","\u308B\u3044\u3051\u3044","\u308B\u3044\u3055\u3044","\u308B\u3044\u3058","\u308B\u3044\u305B\u304D","\u308B\u3059\u3070\u3093","\u308B\u308A\u304C\u308F\u3089","\u308C\u3044\u304B\u3093","\u308C\u3044\u304E","\u308C\u3044\u305B\u3044","\u308C\u3044\u305E\u3046\u3053","\u308C\u3044\u3068\u3046","\u308C\u3044\u307C\u3046","\u308C\u304D\u3057","\u308C\u304D\u3060\u3044","\u308C\u3093\u3042\u3044","\u308C\u3093\u3051\u3044","\u308C\u3093\u3053\u3093","\u308C\u3093\u3055\u3044","\u308C\u3093\u3057\u3085\u3046","\u308C\u3093\u305E\u304F","\u308C\u3093\u3089\u304F","\u308D\u3046\u304B","\u308D\u3046\u3054","\u308D\u3046\u3058\u3093","\u308D\u3046\u305D\u304F","\u308D\u304F\u304C","\u308D\u3053\u3064","\u308D\u3058\u3046\u3089","\u308D\u3057\u3085\u3064","\u308D\u305B\u3093","\u308D\u3066\u3093","\u308D\u3081\u3093","\u308D\u308C\u3064","\u308D\u3093\u304E","\u308D\u3093\u3071","\u308D\u3093\u3076\u3093","\u308D\u3093\u308A","\u308F\u304B\u3059","\u308F\u304B\u3081","\u308F\u304B\u3084\u307E","\u308F\u304B\u308C\u308B","\u308F\u3057\u3064","\u308F\u3058\u307E\u3057","\u308F\u3059\u308C\u3082\u306E","\u308F\u3089\u3046","\u308F\u308C\u308B"];Pt.space="\u3000";const kt=["a\u0301baco","abdomen","abeja","abierto","abogado","abono","aborto","abrazo","abrir","abuelo","abuso","acabar","academia","acceso","accio\u0301n","aceite","acelga","acento","aceptar","a\u0301cido","aclarar","acne\u0301","acoger","acoso","activo","acto","actriz","actuar","acudir","acuerdo","acusar","adicto","admitir","adoptar","adorno","aduana","adulto","ae\u0301reo","afectar","aficio\u0301n","afinar","afirmar","a\u0301gil","agitar","agoni\u0301a","agosto","agotar","agregar","agrio","agua","agudo","a\u0301guila","aguja","ahogo","ahorro","aire","aislar","ajedrez","ajeno","ajuste","alacra\u0301n","alambre","alarma","alba","a\u0301lbum","alcalde","aldea","alegre","alejar","alerta","aleta","alfiler","alga","algodo\u0301n","aliado","aliento","alivio","alma","almeja","almi\u0301bar","altar","alteza","altivo","alto","altura","alumno","alzar","amable","amante","amapola","amargo","amasar","a\u0301mbar","a\u0301mbito","ameno","amigo","amistad","amor","amparo","amplio","ancho","anciano","ancla","andar","ande\u0301n","anemia","a\u0301ngulo","anillo","a\u0301nimo","ani\u0301s","anotar","antena","antiguo","antojo","anual","anular","anuncio","an\u0303adir","an\u0303ejo","an\u0303o","apagar","aparato","apetito","apio","aplicar","apodo","aporte","apoyo","aprender","aprobar","apuesta","apuro","arado","aran\u0303a","arar","a\u0301rbitro","a\u0301rbol","arbusto","archivo","arco","arder","ardilla","arduo","a\u0301rea","a\u0301rido","aries","armoni\u0301a","arne\u0301s","aroma","arpa","arpo\u0301n","arreglo","arroz","arruga","arte","artista","asa","asado","asalto","ascenso","asegurar","aseo","asesor","asiento","asilo","asistir","asno","asombro","a\u0301spero","astilla","astro","astuto","asumir","asunto","atajo","ataque","atar","atento","ateo","a\u0301tico","atleta","a\u0301tomo","atraer","atroz","atu\u0301n","audaz","audio","auge","aula","aumento","ausente","autor","aval","avance","avaro","ave","avellana","avena","avestruz","avio\u0301n","aviso","ayer","ayuda","ayuno","azafra\u0301n","azar","azote","azu\u0301car","azufre","azul","baba","babor","bache","bahi\u0301a","baile","bajar","balanza","balco\u0301n","balde","bambu\u0301","banco","banda","ban\u0303o","barba","barco","barniz","barro","ba\u0301scula","basto\u0301n","basura","batalla","bateri\u0301a","batir","batuta","bau\u0301l","bazar","bebe\u0301","bebida","bello","besar","beso","bestia","bicho","bien","bingo","blanco","bloque","blusa","boa","bobina","bobo","boca","bocina","boda","bodega","boina","bola","bolero","bolsa","bomba","bondad","bonito","bono","bonsa\u0301i","borde","borrar","bosque","bote","boti\u0301n","bo\u0301veda","bozal","bravo","brazo","brecha","breve","brillo","brinco","brisa","broca","broma","bronce","brote","bruja","brusco","bruto","buceo","bucle","bueno","buey","bufanda","bufo\u0301n","bu\u0301ho","buitre","bulto","burbuja","burla","burro","buscar","butaca","buzo\u0301n","caballo","cabeza","cabina","cabra","cacao","cada\u0301ver","cadena","caer","cafe\u0301","cai\u0301da","caima\u0301n","caja","cajo\u0301n","cal","calamar","calcio","caldo","calidad","calle","calma","calor","calvo","cama","cambio","camello","camino","campo","ca\u0301ncer","candil","canela","canguro","canica","canto","can\u0303a","can\u0303o\u0301n","caoba","caos","capaz","capita\u0301n","capote","captar","capucha","cara","carbo\u0301n","ca\u0301rcel","careta","carga","carin\u0303o","carne","carpeta","carro","carta","casa","casco","casero","caspa","castor","catorce","catre","caudal","causa","cazo","cebolla","ceder","cedro","celda","ce\u0301lebre","celoso","ce\u0301lula","cemento","ceniza","centro","cerca","cerdo","cereza","cero","cerrar","certeza","ce\u0301sped","cetro","chacal","chaleco","champu\u0301","chancla","chapa","charla","chico","chiste","chivo","choque","choza","chuleta","chupar","ciclo\u0301n","ciego","cielo","cien","cierto","cifra","cigarro","cima","cinco","cine","cinta","cipre\u0301s","circo","ciruela","cisne","cita","ciudad","clamor","clan","claro","clase","clave","cliente","clima","cli\u0301nica","cobre","coccio\u0301n","cochino","cocina","coco","co\u0301digo","codo","cofre","coger","cohete","coji\u0301n","cojo","cola","colcha","colegio","colgar","colina","collar","colmo","columna","combate","comer","comida","co\u0301modo","compra","conde","conejo","conga","conocer","consejo","contar","copa","copia","corazo\u0301n","corbata","corcho","cordo\u0301n","corona","correr","coser","cosmos","costa","cra\u0301neo","cra\u0301ter","crear","crecer","crei\u0301do","crema","cri\u0301a","crimen","cripta","crisis","cromo","cro\u0301nica","croqueta","crudo","cruz","cuadro","cuarto","cuatro","cubo","cubrir","cuchara","cuello","cuento","cuerda","cuesta","cueva","cuidar","culebra","culpa","culto","cumbre","cumplir","cuna","cuneta","cuota","cupo\u0301n","cu\u0301pula","curar","curioso","curso","curva","cutis","dama","danza","dar","dardo","da\u0301til","deber","de\u0301bil","de\u0301cada","decir","dedo","defensa","definir","dejar","delfi\u0301n","delgado","delito","demora","denso","dental","deporte","derecho","derrota","desayuno","deseo","desfile","desnudo","destino","desvi\u0301o","detalle","detener","deuda","di\u0301a","diablo","diadema","diamante","diana","diario","dibujo","dictar","diente","dieta","diez","difi\u0301cil","digno","dilema","diluir","dinero","directo","dirigir","disco","disen\u0303o","disfraz","diva","divino","doble","doce","dolor","domingo","don","donar","dorado","dormir","dorso","dos","dosis","drago\u0301n","droga","ducha","duda","duelo","duen\u0303o","dulce","du\u0301o","duque","durar","dureza","duro","e\u0301bano","ebrio","echar","eco","ecuador","edad","edicio\u0301n","edificio","editor","educar","efecto","eficaz","eje","ejemplo","elefante","elegir","elemento","elevar","elipse","e\u0301lite","elixir","elogio","eludir","embudo","emitir","emocio\u0301n","empate","empen\u0303o","empleo","empresa","enano","encargo","enchufe","enci\u0301a","enemigo","enero","enfado","enfermo","engan\u0303o","enigma","enlace","enorme","enredo","ensayo","ensen\u0303ar","entero","entrar","envase","envi\u0301o","e\u0301poca","equipo","erizo","escala","escena","escolar","escribir","escudo","esencia","esfera","esfuerzo","espada","espejo","espi\u0301a","esposa","espuma","esqui\u0301","estar","este","estilo","estufa","etapa","eterno","e\u0301tica","etnia","evadir","evaluar","evento","evitar","exacto","examen","exceso","excusa","exento","exigir","exilio","existir","e\u0301xito","experto","explicar","exponer","extremo","fa\u0301brica","fa\u0301bula","fachada","fa\u0301cil","factor","faena","faja","falda","fallo","falso","faltar","fama","familia","famoso","farao\u0301n","farmacia","farol","farsa","fase","fatiga","fauna","favor","fax","febrero","fecha","feliz","feo","feria","feroz","fe\u0301rtil","fervor","festi\u0301n","fiable","fianza","fiar","fibra","ficcio\u0301n","ficha","fideo","fiebre","fiel","fiera","fiesta","figura","fijar","fijo","fila","filete","filial","filtro","fin","finca","fingir","finito","firma","flaco","flauta","flecha","flor","flota","fluir","flujo","flu\u0301or","fobia","foca","fogata","fogo\u0301n","folio","folleto","fondo","forma","forro","fortuna","forzar","fosa","foto","fracaso","fra\u0301gil","franja","frase","fraude","frei\u0301r","freno","fresa","fri\u0301o","frito","fruta","fuego","fuente","fuerza","fuga","fumar","funcio\u0301n","funda","furgo\u0301n","furia","fusil","fu\u0301tbol","futuro","gacela","gafas","gaita","gajo","gala","galeri\u0301a","gallo","gamba","ganar","gancho","ganga","ganso","garaje","garza","gasolina","gastar","gato","gavila\u0301n","gemelo","gemir","gen","ge\u0301nero","genio","gente","geranio","gerente","germen","gesto","gigante","gimnasio","girar","giro","glaciar","globo","gloria","gol","golfo","goloso","golpe","goma","gordo","gorila","gorra","gota","goteo","gozar","grada","gra\u0301fico","grano","grasa","gratis","grave","grieta","grillo","gripe","gris","grito","grosor","gru\u0301a","grueso","grumo","grupo","guante","guapo","guardia","guerra","gui\u0301a","guin\u0303o","guion","guiso","guitarra","gusano","gustar","haber","ha\u0301bil","hablar","hacer","hacha","hada","hallar","hamaca","harina","haz","hazan\u0303a","hebilla","hebra","hecho","helado","helio","hembra","herir","hermano","he\u0301roe","hervir","hielo","hierro","hi\u0301gado","higiene","hijo","himno","historia","hocico","hogar","hoguera","hoja","hombre","hongo","honor","honra","hora","hormiga","horno","hostil","hoyo","hueco","huelga","huerta","hueso","huevo","huida","huir","humano","hu\u0301medo","humilde","humo","hundir","huraca\u0301n","hurto","icono","ideal","idioma","i\u0301dolo","iglesia","iglu\u0301","igual","ilegal","ilusio\u0301n","imagen","ima\u0301n","imitar","impar","imperio","imponer","impulso","incapaz","i\u0301ndice","inerte","infiel","informe","ingenio","inicio","inmenso","inmune","innato","insecto","instante","intere\u0301s","i\u0301ntimo","intuir","inu\u0301til","invierno","ira","iris","ironi\u0301a","isla","islote","jabali\u0301","jabo\u0301n","jamo\u0301n","jarabe","jardi\u0301n","jarra","jaula","jazmi\u0301n","jefe","jeringa","jinete","jornada","joroba","joven","joya","juerga","jueves","juez","jugador","jugo","juguete","juicio","junco","jungla","junio","juntar","ju\u0301piter","jurar","justo","juvenil","juzgar","kilo","koala","labio","lacio","lacra","lado","ladro\u0301n","lagarto","la\u0301grima","laguna","laico","lamer","la\u0301mina","la\u0301mpara","lana","lancha","langosta","lanza","la\u0301piz","largo","larva","la\u0301stima","lata","la\u0301tex","latir","laurel","lavar","lazo","leal","leccio\u0301n","leche","lector","leer","legio\u0301n","legumbre","lejano","lengua","lento","len\u0303a","leo\u0301n","leopardo","lesio\u0301n","letal","letra","leve","leyenda","libertad","libro","licor","li\u0301der","lidiar","lienzo","liga","ligero","lima","li\u0301mite","limo\u0301n","limpio","lince","lindo","li\u0301nea","lingote","lino","linterna","li\u0301quido","liso","lista","litera","litio","litro","llaga","llama","llanto","llave","llegar","llenar","llevar","llorar","llover","lluvia","lobo","locio\u0301n","loco","locura","lo\u0301gica","logro","lombriz","lomo","lonja","lote","lucha","lucir","lugar","lujo","luna","lunes","lupa","lustro","luto","luz","maceta","macho","madera","madre","maduro","maestro","mafia","magia","mago","mai\u0301z","maldad","maleta","malla","malo","mama\u0301","mambo","mamut","manco","mando","manejar","manga","maniqui\u0301","manjar","mano","manso","manta","man\u0303ana","mapa","ma\u0301quina","mar","marco","marea","marfil","margen","marido","ma\u0301rmol","marro\u0301n","martes","marzo","masa","ma\u0301scara","masivo","matar","materia","matiz","matriz","ma\u0301ximo","mayor","mazorca","mecha","medalla","medio","me\u0301dula","mejilla","mejor","melena","melo\u0301n","memoria","menor","mensaje","mente","menu\u0301","mercado","merengue","me\u0301rito","mes","meso\u0301n","meta","meter","me\u0301todo","metro","mezcla","miedo","miel","miembro","miga","mil","milagro","militar","millo\u0301n","mimo","mina","minero","mi\u0301nimo","minuto","miope","mirar","misa","miseria","misil","mismo","mitad","mito","mochila","mocio\u0301n","moda","modelo","moho","mojar","molde","moler","molino","momento","momia","monarca","moneda","monja","monto","mon\u0303o","morada","morder","moreno","morir","morro","morsa","mortal","mosca","mostrar","motivo","mover","mo\u0301vil","mozo","mucho","mudar","mueble","muela","muerte","muestra","mugre","mujer","mula","muleta","multa","mundo","mun\u0303eca","mural","muro","mu\u0301sculo","museo","musgo","mu\u0301sica","muslo","na\u0301car","nacio\u0301n","nadar","naipe","naranja","nariz","narrar","nasal","natal","nativo","natural","na\u0301usea","naval","nave","navidad","necio","ne\u0301ctar","negar","negocio","negro","neo\u0301n","nervio","neto","neutro","nevar","nevera","nicho","nido","niebla","nieto","nin\u0303ez","nin\u0303o","ni\u0301tido","nivel","nobleza","noche","no\u0301mina","noria","norma","norte","nota","noticia","novato","novela","novio","nube","nuca","nu\u0301cleo","nudillo","nudo","nuera","nueve","nuez","nulo","nu\u0301mero","nutria","oasis","obeso","obispo","objeto","obra","obrero","observar","obtener","obvio","oca","ocaso","oce\u0301ano","ochenta","ocho","ocio","ocre","octavo","octubre","oculto","ocupar","ocurrir","odiar","odio","odisea","oeste","ofensa","oferta","oficio","ofrecer","ogro","oi\u0301do","oi\u0301r","ojo","ola","oleada","olfato","olivo","olla","olmo","olor","olvido","ombligo","onda","onza","opaco","opcio\u0301n","o\u0301pera","opinar","oponer","optar","o\u0301ptica","opuesto","oracio\u0301n","orador","oral","o\u0301rbita","orca","orden","oreja","o\u0301rgano","orgi\u0301a","orgullo","oriente","origen","orilla","oro","orquesta","oruga","osadi\u0301a","oscuro","osezno","oso","ostra","oton\u0303o","otro","oveja","o\u0301vulo","o\u0301xido","oxi\u0301geno","oyente","ozono","pacto","padre","paella","pa\u0301gina","pago","pai\u0301s","pa\u0301jaro","palabra","palco","paleta","pa\u0301lido","palma","paloma","palpar","pan","panal","pa\u0301nico","pantera","pan\u0303uelo","papa\u0301","papel","papilla","paquete","parar","parcela","pared","parir","paro","pa\u0301rpado","parque","pa\u0301rrafo","parte","pasar","paseo","pasio\u0301n","paso","pasta","pata","patio","patria","pausa","pauta","pavo","payaso","peato\u0301n","pecado","pecera","pecho","pedal","pedir","pegar","peine","pelar","peldan\u0303o","pelea","peligro","pellejo","pelo","peluca","pena","pensar","pen\u0303o\u0301n","peo\u0301n","peor","pepino","pequen\u0303o","pera","percha","perder","pereza","perfil","perico","perla","permiso","perro","persona","pesa","pesca","pe\u0301simo","pestan\u0303a","pe\u0301talo","petro\u0301leo","pez","pezun\u0303a","picar","picho\u0301n","pie","piedra","pierna","pieza","pijama","pilar","piloto","pimienta","pino","pintor","pinza","pin\u0303a","piojo","pipa","pirata","pisar","piscina","piso","pista","pito\u0301n","pizca","placa","plan","plata","playa","plaza","pleito","pleno","plomo","pluma","plural","pobre","poco","poder","podio","poema","poesi\u0301a","poeta","polen","polici\u0301a","pollo","polvo","pomada","pomelo","pomo","pompa","poner","porcio\u0301n","portal","posada","poseer","posible","poste","potencia","potro","pozo","prado","precoz","pregunta","premio","prensa","preso","previo","primo","pri\u0301ncipe","prisio\u0301n","privar","proa","probar","proceso","producto","proeza","profesor","programa","prole","promesa","pronto","propio","pro\u0301ximo","prueba","pu\u0301blico","puchero","pudor","pueblo","puerta","puesto","pulga","pulir","pulmo\u0301n","pulpo","pulso","puma","punto","pun\u0303al","pun\u0303o","pupa","pupila","pure\u0301","quedar","queja","quemar","querer","queso","quieto","qui\u0301mica","quince","quitar","ra\u0301bano","rabia","rabo","racio\u0301n","radical","rai\u0301z","rama","rampa","rancho","rango","rapaz","ra\u0301pido","rapto","rasgo","raspa","rato","rayo","raza","razo\u0301n","reaccio\u0301n","realidad","reban\u0303o","rebote","recaer","receta","rechazo","recoger","recreo","recto","recurso","red","redondo","reducir","reflejo","reforma","refra\u0301n","refugio","regalo","regir","regla","regreso","rehe\u0301n","reino","rei\u0301r","reja","relato","relevo","relieve","relleno","reloj","remar","remedio","remo","rencor","rendir","renta","reparto","repetir","reposo","reptil","res","rescate","resina","respeto","resto","resumen","retiro","retorno","retrato","reunir","reve\u0301s","revista","rey","rezar","rico","riego","rienda","riesgo","rifa","ri\u0301gido","rigor","rinco\u0301n","rin\u0303o\u0301n","ri\u0301o","riqueza","risa","ritmo","rito","rizo","roble","roce","rociar","rodar","rodeo","rodilla","roer","rojizo","rojo","romero","romper","ron","ronco","ronda","ropa","ropero","rosa","rosca","rostro","rotar","rubi\u0301","rubor","rudo","rueda","rugir","ruido","ruina","ruleta","rulo","rumbo","rumor","ruptura","ruta","rutina","sa\u0301bado","saber","sabio","sable","sacar","sagaz","sagrado","sala","saldo","salero","salir","salmo\u0301n","salo\u0301n","salsa","salto","salud","salvar","samba","sancio\u0301n","sandi\u0301a","sanear","sangre","sanidad","sano","santo","sapo","saque","sardina","sarte\u0301n","sastre","sata\u0301n","sauna","saxofo\u0301n","seccio\u0301n","seco","secreto","secta","sed","seguir","seis","sello","selva","semana","semilla","senda","sensor","sen\u0303al","sen\u0303or","separar","sepia","sequi\u0301a","ser","serie","sermo\u0301n","servir","sesenta","sesio\u0301n","seta","setenta","severo","sexo","sexto","sidra","siesta","siete","siglo","signo","si\u0301laba","silbar","silencio","silla","si\u0301mbolo","simio","sirena","sistema","sitio","situar","sobre","socio","sodio","sol","solapa","soldado","soledad","so\u0301lido","soltar","solucio\u0301n","sombra","sondeo","sonido","sonoro","sonrisa","sopa","soplar","soporte","sordo","sorpresa","sorteo","soste\u0301n","so\u0301tano","suave","subir","suceso","sudor","suegra","suelo","suen\u0303o","suerte","sufrir","sujeto","sulta\u0301n","sumar","superar","suplir","suponer","supremo","sur","surco","suren\u0303o","surgir","susto","sutil","tabaco","tabique","tabla","tabu\u0301","taco","tacto","tajo","talar","talco","talento","talla","talo\u0301n","taman\u0303o","tambor","tango","tanque","tapa","tapete","tapia","tapo\u0301n","taquilla","tarde","tarea","tarifa","tarjeta","tarot","tarro","tarta","tatuaje","tauro","taza","tazo\u0301n","teatro","techo","tecla","te\u0301cnica","tejado","tejer","tejido","tela","tele\u0301fono","tema","temor","templo","tenaz","tender","tener","tenis","tenso","teori\u0301a","terapia","terco","te\u0301rmino","ternura","terror","tesis","tesoro","testigo","tetera","texto","tez","tibio","tiburo\u0301n","tiempo","tienda","tierra","tieso","tigre","tijera","tilde","timbre","ti\u0301mido","timo","tinta","ti\u0301o","ti\u0301pico","tipo","tira","tiro\u0301n","tita\u0301n","ti\u0301tere","ti\u0301tulo","tiza","toalla","tobillo","tocar","tocino","todo","toga","toldo","tomar","tono","tonto","topar","tope","toque","to\u0301rax","torero","tormenta","torneo","toro","torpedo","torre","torso","tortuga","tos","tosco","toser","to\u0301xico","trabajo","tractor","traer","tra\u0301fico","trago","traje","tramo","trance","trato","trauma","trazar","tre\u0301bol","tregua","treinta","tren","trepar","tres","tribu","trigo","tripa","triste","triunfo","trofeo","trompa","tronco","tropa","trote","trozo","truco","trueno","trufa","tuberi\u0301a","tubo","tuerto","tumba","tumor","tu\u0301nel","tu\u0301nica","turbina","turismo","turno","tutor","ubicar","u\u0301lcera","umbral","unidad","unir","universo","uno","untar","un\u0303a","urbano","urbe","urgente","urna","usar","usuario","u\u0301til","utopi\u0301a","uva","vaca","vaci\u0301o","vacuna","vagar","vago","vaina","vajilla","vale","va\u0301lido","valle","valor","va\u0301lvula","vampiro","vara","variar","varo\u0301n","vaso","vecino","vector","vehi\u0301culo","veinte","vejez","vela","velero","veloz","vena","vencer","venda","veneno","vengar","venir","venta","venus","ver","verano","verbo","verde","vereda","verja","verso","verter","vi\u0301a","viaje","vibrar","vicio","vi\u0301ctima","vida","vi\u0301deo","vidrio","viejo","viernes","vigor","vil","villa","vinagre","vino","vin\u0303edo","violi\u0301n","viral","virgo","virtud","visor","vi\u0301spera","vista","vitamina","viudo","vivaz","vivero","vivir","vivo","volca\u0301n","volumen","volver","voraz","votar","voto","voz","vuelo","vulgar","yacer","yate","yegua","yema","yerno","yeso","yodo","yoga","yogur","zafiro","zanja","zapato","zarza","zona","zorro","zumo","zurdo"];kt.space=" ";class Nt extends _{static{w(this,"Bip39")}constructor(t,e,r){super({mnemonic:t,seed:e,wordlist:r}),this.Wordlist=It,this.es=kt,this.jp=Pt}setLang(t){switch(t){default:case"en":this.Wordlist=It;break;case"es":this.Wordlist=kt;break;case"jp":this.Wordlist=Pt;break}}toBw(t){if(t||(t=new R),this.mnemonic){const e=Buffer.from(this.mnemonic);t.writeVarIntNum(e.length),t.write(e)}else t.writeVarIntNum(0);return this.seed?(t.writeVarIntNum(this.seed.length),t.write(this.seed)):t.writeVarIntNum(0),t}fromBr(t){const e=t.readVarIntNum();e>0&&(this.mnemonic=t.read(e).toString());const r=t.readVarIntNum();return r>0&&(this.seed=t.read(r)),this}fromRandom(t){if(t||(t=128),t%32!==0)throw new Error("bits must be multiple of 32");if(t<128)throw new Error("bits must be at least 128");const e=tt.getRandomBuffer(t/8);return this.entropy2Mnemonic(e),this.mnemonic2Seed(),this}static fromRandom(t){return new this().fromRandom(t)}async asyncFromRandom(t){t||(t=128);const e=tt.getRandomBuffer(t/8);let r=await B.asyncObjectMethod(this,"entropy2Mnemonic",[e]);const s=new Nt().fromFastBuffer(r.resbuf);return r=await B.asyncObjectMethod(s,"mnemonic2Seed",[]),this.fromFastBuffer(r.resbuf)}static asyncFromRandom(t){return new this().asyncFromRandom(t)}fromEntropy(t){return this.entropy2Mnemonic(t),this}static fromEntropy(t){return new this().fromEntropy(t)}async asyncFromEntropy(t){const e=await B.asyncObjectMethod(this,"fromEntropy",[t]);return this.fromFastBuffer(e.resbuf)}static asyncFromEntropy(t){return new this().asyncFromEntropy(t)}fromString(t){return this.mnemonic=t.trim(),this}toString(){return this.mnemonic}toSeed(t){return this.mnemonic2Seed(t),this.seed}async asyncToSeed(t){t===void 0&&(t="");const e=[t];return(await B.asyncObjectMethod(this,"toSeed",e)).resbuf}entropy2Mnemonic(t){if(!Buffer.isBuffer(t)||t.length<16)throw new Error("Entropy is less than 128 bits. It must be 128 bits or more.");const e=d.sha256(t);let r="";const s=t.length*8;for(let u=0;u<t.length;u++)r=r+("00000000"+t[u].toString(2)).slice(-8);let n=e[0].toString(2);if(n=("00000000"+n).slice(-8).slice(0,s/32),r=r+n,r.length%11!==0)throw new Error("internal error - entropy not an even multiple of 11 bits - "+r.length);let a="";for(let u=0;u<r.length/11;u++){a!==""&&(a=a+this.Wordlist.space);const h=parseInt(r.slice(u*11,(u+1)*11),2);a=a+this.Wordlist[h]}return this.mnemonic=a,this}check(){const e=this.mnemonic.split(this.Wordlist.space);let r="";for(let g=0;g<e.length;g++){const O=this.Wordlist.indexOf(e[g]);if(O<0)return!1;r=r+("00000000000"+O.toString(2)).slice(-11)}if(r.length%11!==0)throw new Error("internal error - entropy not an even multiple of 11 bits - "+r.length);const s=r.length/33,n=r.slice(-s),a=r.slice(0,r.length-s),u=Buffer.alloc(a.length/8);for(let g=0;g<a.length/8;g++)u.writeUInt8(parseInt(r.slice(g*8,(g+1)*8),2),g);let l=d.sha256(u)[0].toString(2);return l=("00000000"+l).slice(-8).slice(0,s),l===n}mnemonic2Seed(t=""){let e=this.mnemonic;if(!this.check())throw new Error("Mnemonic does not pass the check - was the mnemonic typed incorrectly? Are there extra spaces?");if(typeof t!="string")throw new Error("passphrase must be a string or undefined");e=e.normalize("NFKD"),t=t.normalize("NFKD");const r=Buffer.from(e),s=Buffer.concat([Buffer.from("mnemonic"),Buffer.from(t)]);return this.seed=Vt.pbkdf2Sync(r,s,2048,64,"sha512"),this}isValid(t=""){let e;try{e=!!this.mnemonic2Seed(t)}catch{e=!1}return e}static isValid(t,e=""){return new Nt(t).isValid(e)}}class M extends _{static{w(this,"KeyPair")}constructor(t,e,r=Y){super({privKey:t,pubKey:e}),this.PrivKey=r}fromJSON(t){return t.privKey&&(this.privKey=this.PrivKey.fromJSON(t.privKey)),t.pubKey&&(this.pubKey=H.fromJSON(t.pubKey)),this}fromBr(t){const e=t.readUInt8();e>0&&(this.privKey=new this.PrivKey().fromFastBuffer(t.read(e)));const r=t.readUInt8();return r>0&&(this.pubKey=new H().fromFastBuffer(t.read(r))),this}toBw(t){if(t||(t=new R),this.privKey){const e=this.privKey.toFastBuffer();t.writeUInt8(e.length),t.write(e)}else t.writeUInt8(0);if(this.pubKey){const e=this.pubKey.toFastBuffer();t.writeUInt8(e.length),t.write(e)}else t.writeUInt8(0);return t}fromString(t){return this.fromJSON(JSON.parse(t))}toString(){return JSON.stringify(this.toJSON())}toPublic(){const t=new M().fromObject(this);return t.privKey=void 0,t}fromPrivKey(t){return this.privKey=t,this.pubKey=new H().fromPrivKey(t),this}static fromPrivKey(t){return new this().fromPrivKey(t)}async asyncFromPrivKey(t){return this.privKey=t,this.pubKey=await new H().asyncFromPrivKey(t),this}static asyncFromPrivKey(t){return new this().asyncFromPrivKey(t)}fromRandom(){return this.privKey=new this.PrivKey().fromRandom(),this.pubKey=new H().fromPrivKey(this.privKey),this}static fromRandom(){return new this().fromRandom()}async asyncFromRandom(){return this.privKey=new this.PrivKey().fromRandom(),this.asyncFromPrivKey(this.privKey)}static asyncFromRandom(){return new this().asyncFromRandom()}}M.Mainnet=class extends M{constructor(i,t){super(i,t,Y.Mainnet)}},M.Testnet=class extends M{constructor(i,t){super(i,t,Y.Testnet)}};class j extends _{static{w(this,"Ecdsa")}constructor(t,e,r,s,n,a){super({sig:t,keyPair:e,hashBuf:r,k:s,endian:n,verified:a})}toJSON(){return{sig:this.sig?this.sig.toString():void 0,keyPair:this.keyPair?this.keyPair.toBuffer().toString("hex"):void 0,hashBuf:this.hashBuf?this.hashBuf.toString("hex"):void 0,k:this.k?this.k.toString():void 0,endian:this.endian,verified:this.verified}}fromJSON(t){return this.sig=t.sig?new S().fromString(t.sig):void 0,this.keyPair=t.keyPair?new M().fromBuffer(Buffer.from(t.keyPair,"hex")):void 0,this.hashBuf=t.hashBuf?Buffer.from(t.hashBuf,"hex"):void 0,this.k=t.k?new c().fromString(t.k):void 0,this.endian=t.endian,this.verified=t.verified,this}toBuffer(){const t=JSON.stringify(this.toJSON());return Buffer.from(t)}fromBuffer(t){const e=JSON.parse(t.toString());return this.fromJSON(e)}calcrecovery(){for(let t=0;t<4;t++){let e;this.sig.recovery=t;try{e=this.sig2PubKey()}catch{continue}if(e.point.eq(this.keyPair.pubKey.point)){const r=this.keyPair.pubKey.compressed;return this.sig.compressed=this.keyPair.pubKey.compressed===void 0?!0:r,this}}throw this.sig.recovery=void 0,new Error("Unable to find valid recovery factor")}async asyncCalcrecovery(){const t=await B.asyncObjectMethod(this,"calcrecovery",[]);return this.fromFastBuffer(t.resbuf)}static calcrecovery(t,e,r){return new j().fromObject({sig:t,keyPair:new M().fromObject({pubKey:e}),hashBuf:r}).calcrecovery().sig}static async asyncCalcrecovery(t,e,r){const s=await B.asyncClassMethod(j,"calcrecovery",[t,e,r]);return new S().fromFastBuffer(s.resbuf)}fromString(t){const e=JSON.parse(t);return e.hashBuf&&(this.hashBuf=Buffer.from(e.hashBuf,"hex")),e.keyPair&&(this.keyPair=new M().fromString(e.keyPair)),e.sig&&(this.sig=new S().fromString(e.sig)),e.k&&(this.k=new c(e.k,10)),this}randomK(){const t=k.getN();let e;do e=new c().fromBuffer(tt.getRandomBuffer(32));while(!(e.lt(t)&&e.gt(0)));return this.k=e,this}deterministicK(t){let e=Buffer.alloc(32);e.fill(1);let r=Buffer.alloc(32);r.fill(0);const s=this.keyPair.privKey.bn.toBuffer({size:32});r=d.sha256Hmac(Buffer.concat([e,Buffer.from([0]),s,this.hashBuf]),r),e=d.sha256Hmac(e,r),r=d.sha256Hmac(Buffer.concat([e,Buffer.from([1]),s,this.hashBuf]),r),e=d.sha256Hmac(e,r),e=d.sha256Hmac(e,r);let n=new c().fromBuffer(e);const a=k.getN();t===void 0&&(t=0);for(let u=0;u<t||!(n.lt(a)&&n.gt(0));u++)r=d.sha256Hmac(Buffer.concat([e,Buffer.from([0])]),r),e=d.sha256Hmac(e,r),e=d.sha256Hmac(e,r),n=new c().fromBuffer(e);return this.k=n,this}sig2PubKey(){const t=this.sig.recovery;if(!(t===0||t===1||t===2||t===3))throw new Error("i must be equal to 0, 1, 2, or 3");const e=new c().fromBuffer(this.hashBuf),r=this.sig.r,s=this.sig.s,n=t&1,a=t>>1,u=k.getN(),h=k.getG(),l=a?r.add(u):r,g=k.fromX(n,l);let O="";try{g.mul(u)}catch(b){O=b.message}if(O!=="point mul out of range")throw new Error("nR is not a valid curve point");const E=e.neg().umod(u),K=r.invm(u),f=g.mul(s).add(h.mul(E)).mul(K),m=new H(f);return m.compressed=this.sig.compressed,m.validate(),m}async asyncSig2PubKey(){const t=await B.asyncObjectMethod(this,"sig2PubKey",[]);return H.fromFastBuffer(t.resbuf)}static sig2PubKey(t,e){return new j().fromObject({sig:t,hashBuf:e}).sig2PubKey()}static async asyncSig2PubKey(t,e){return await new j().fromObject({sig:t,hashBuf:e}).asyncSig2PubKey()}verifyStr(t=!0){if(!Buffer.isBuffer(this.hashBuf)||this.hashBuf.length!==32)return"hashBuf must be a 32 byte buffer";try{this.keyPair.pubKey.validate()}catch(g){return"Invalid pubKey: "+g}const e=this.sig.r,r=this.sig.s;if(!(e.gt(0)&&e.lt(k.getN()))||!(r.gt(0)&&r.lt(k.getN())))return"r and s not in range";if(t&&!this.sig.hasLowS())return"s is too high and does not satisfy low s contraint - see bip 62";const s=new c().fromBuffer(this.hashBuf,this.endian?{endian:this.endian}:void 0),n=k.getN(),a=r.invm(n),u=a.mul(s).mod(n),h=a.mul(e).mod(n),l=k.getG().mulAdd(u,this.keyPair.pubKey.point,h);return l.isInfinity()?"p is infinity":l.getX().mod(n).cmp(e)!==0?"Invalid signature":!1}sign(){const t=this.endian==="little"?new z(this.hashBuf).readReverse():this.hashBuf,e=this.keyPair.privKey,r=e.bn;if(!t||!e||!r)throw new Error("invalid parameters");if(!Buffer.isBuffer(t)||t.length!==32)throw new Error("hashBuf must be a 32 byte buffer");const s=k.getN(),n=k.getG(),a=new c().fromBuffer(t);let u=0,h,l,g,O;do(!this.k||u>0)&&this.deterministicK(u),u++,h=this.k,l=n.mul(h),g=l.getX().mod(s),O=h.invm(s).mul(a.add(r.mul(g))).mod(s);while(g.cmp(0)<=0||O.cmp(0)<=0);return O.gt(new c().fromBuffer(Buffer.from("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))&&(O=k.getN().sub(O)),this.sig=S.fromObject({r:g,s:O,compressed:this.keyPair.pubKey.compressed}),this}async asyncSign(){const t=await B.asyncObjectMethod(this,"sign",[]);return this.fromFastBuffer(t.resbuf)}signRandomK(){return this.randomK(),this.sign()}toString(){const t={};return this.hashBuf&&(t.hashBuf=this.hashBuf.toString("hex")),this.keyPair&&(t.keyPair=this.keyPair.toString()),this.sig&&(t.sig=this.sig.toString()),this.k&&(t.k=this.k.toString()),JSON.stringify(t)}verify(t=!0){return this.verifyStr(t)?this.verified=!1:this.verified=!0,this}async asyncVerify(t=!0){const e=await B.asyncObjectMethod(this,"verify",[t]);return this.fromFastBuffer(e.resbuf)}static sign(t,e,r){return new j().fromObject({hashBuf:t,endian:r,keyPair:e}).sign().sig}static async asyncSign(t,e,r){const s=new j().fromObject({hashBuf:t,endian:r,keyPair:e});return await s.asyncSign(),s.sig}static verify(t,e,r,s,n=!0){return new j().fromObject({hashBuf:t,endian:s,sig:e,keyPair:new M().fromObject({pubKey:r})}).verify(n).verified}static async asyncVerify(t,e,r,s,n=!0){const a=new j().fromObject({hashBuf:t,endian:s,sig:e,keyPair:new M().fromObject({pubKey:r})});return await a.asyncVerify(n),a.verified}}class J extends _{static{w(this,"Bsm")}constructor(t,e,r,s,n){super({messageBuf:t,keyPair:e,sig:r,address:s,verified:n})}static magicHash(t){if(!Buffer.isBuffer(t))throw new Error("messageBuf must be a buffer");const e=new R;e.writeVarIntNum(J.magicBytes.length),e.write(J.magicBytes),e.writeVarIntNum(t.length),e.write(t);const r=e.toBuffer();return d.sha256Sha256(r)}static async asyncMagicHash(t){const e=[t];return(await B.asyncClassMethod(J,"magicHash",e)).resbuf}static sign(t,e){const r=new J(t,e);return r.sign(),r.sig.toCompact().toString("base64")}static async asyncSign(t,e){const r=[t,e],s=await B.asyncClassMethod(J,"sign",r);return JSON.parse(s.resbuf.toString())}static verify(t,e,r){const s=Buffer.from(e,"base64"),n=new J;return n.messageBuf=t,n.sig=new S().fromCompact(s),n.address=r,n.verify().verified}static async asyncVerify(t,e,r){const s=[t,e,r],n=await B.asyncClassMethod(J,"verify",s);return JSON.parse(n.resbuf.toString())}sign(){const t=J.magicHash(this.messageBuf),e=new j().fromObject({hashBuf:t,keyPair:this.keyPair});return e.sign(),e.calcrecovery(),this.sig=e.sig,this}verify(){const t=J.magicHash(this.messageBuf),e=new j;if(e.hashBuf=t,e.sig=this.sig,e.keyPair=new M,e.keyPair.pubKey=e.sig2PubKey(),!e.verify())return this.verified=!1,this;const r=new X().fromPubKey(e.keyPair.pubKey,void 0,this.sig.compressed);return it(r.hashBuf,this.address.hashBuf)?this.verified=!0:this.verified=!1,this}}J.magicBytes=Buffer.from(`Bitcoin Signed Message:
|
|
2
|
+
`);class Rt extends _{static{w(this,"BlockHeader")}constructor(t,e,r,s,n,a){super({versionBytesNum:t,prevBlockHashBuf:e,merkleRootBuf:r,time:s,bits:n,nonce:a})}fromJSON(t){return this.fromObject({versionBytesNum:t.versionBytesNum,prevBlockHashBuf:Buffer.from(t.prevBlockHashBuf,"hex"),merkleRootBuf:Buffer.from(t.merkleRootBuf,"hex"),time:t.time,bits:t.bits,nonce:t.nonce}),this}toJSON(){return{versionBytesNum:this.versionBytesNum,prevBlockHashBuf:this.prevBlockHashBuf.toString("hex"),merkleRootBuf:this.merkleRootBuf.toString("hex"),time:this.time,bits:this.bits,nonce:this.nonce}}fromBr(t){return this.versionBytesNum=t.readUInt32LE(),this.prevBlockHashBuf=t.read(32),this.merkleRootBuf=t.read(32),this.time=t.readUInt32LE(),this.bits=t.readUInt32LE(),this.nonce=t.readUInt32LE(),this}toBw(t){return t||(t=new R),t.writeUInt32LE(this.versionBytesNum),t.write(this.prevBlockHashBuf),t.write(this.merkleRootBuf),t.writeUInt32LE(this.time),t.writeUInt32LE(this.bits),t.writeUInt32LE(this.nonce),t}}class ht extends _{static{w(this,"Merkle")}constructor(t,e,r,s){super({hashBuf:t,buf:e,merkle1:r,merkle2:s})}hash(){if(this.hashBuf)return this.hashBuf;if(this.buf)return d.sha256Sha256(this.buf);const t=this.merkle1.hash(),e=this.merkle2.hash();return this.buf=Buffer.concat([t,e]),d.sha256Sha256(this.buf)}fromBuffers(t){if(t.length<1)throw new Error("buffers must have a length");t=t.slice();const e=Math.log2(t.length);if(!Number.isInteger(e)){const a=t[t.length-1];var r=Math.pow(2,Math.ceil(e));for(let u=t.length;u<r;u++)t.push(a)}const s=t.slice(0,t.length/2),n=t.slice(t.length/2);return this.fromBufferArrays(s,n),this}static fromBuffers(t){return new this().fromBuffers(t)}fromBufferArrays(t,e){if(t.length===1)return this.merkle1=new ht(void 0,t[0]),this.merkle2=new ht(void 0,e[0]),this;const r=t.slice(0,t.length/2),s=t.slice(t.length/2);this.merkle1=new ht().fromBufferArrays(r,s);const n=e.slice(0,e.length/2),a=e.slice(e.length/2);return this.merkle2=new ht().fromBufferArrays(n,a),this}static fromBufferArrays(t,e){return new this().fromBufferArrays(t,e)}leavesNum(){if(this.merkle1)return this.merkle1.leavesNum()+this.merkle2.leavesNum();if(this.buf)return 1;throw new Error("invalid number of leaves")}}class _t extends _{static{w(this,"HashCache")}constructor(t,e,r){super(),this.fromObject({prevoutsHashBuf:t,sequenceHashBuf:e,outputsHashBuf:r})}fromBuffer(t){return this.fromJSON(JSON.parse(t.toString()))}toBuffer(){return Buffer.from(JSON.stringify(this.toJSON()))}fromJSON(t){return this.prevoutsHashBuf=t.prevoutsHashBuf?Buffer.from(t.prevoutsHashBuf,"hex"):void 0,this.sequenceHashBuf=t.sequenceHashBuf?Buffer.from(t.sequenceHashBuf,"hex"):void 0,this.outputsHashBuf=t.outputsHashBuf?Buffer.from(t.outputsHashBuf,"hex"):void 0,this}toJSON(){return{prevoutsHashBuf:this.prevoutsHashBuf?this.prevoutsHashBuf.toString("hex"):void 0,sequenceHashBuf:this.sequenceHashBuf?this.sequenceHashBuf.toString("hex"):void 0,outputsHashBuf:this.outputsHashBuf?this.outputsHashBuf.toString("hex"):void 0}}}class F extends _{static{w(this,"VarInt")}constructor(t){super({buf:t})}fromJSON(t){return this.fromObject({buf:Buffer.from(t,"hex")}),this}toJSON(){return this.buf.toString("hex")}fromBuffer(t){return this.buf=t,this}fromBr(t){return this.buf=t.readVarIntBuf(),this}fromBn(t){return this.buf=new R().writeVarIntBn(t).toBuffer(),this}static fromBn(t){return new this().fromBn(t)}fromNumber(t){return this.buf=new R().writeVarIntNum(t).toBuffer(),this}static fromNumber(t){return new this().fromNumber(t)}toBuffer(){return this.buf}toBn(){return new z(this.buf).readVarIntBn()}toNumber(){return new z(this.buf).readVarIntNum()}}class v extends _{static{w(this,"TxIn")}constructor(t,e,r,s,n=4294967295){super({txHashBuf:t,txOutNum:e,scriptVi:r,script:s,nSequence:n})}setScript(t){return this.scriptVi=F.fromNumber(t.toBuffer().length),this.script=t,this}fromProperties(t,e,r,s){return this.fromObject({txHashBuf:t,txOutNum:e,nSequence:s}),this.setScript(r),this}static fromProperties(t,e,r,s){return new this().fromProperties(t,e,r,s)}fromJSON(t){return this.fromObject({txHashBuf:typeof t.txHashBuf<"u"?Buffer.from(t.txHashBuf,"hex"):void 0,txOutNum:t.txOutNum,scriptVi:typeof t.scriptVi<"u"?F.fromJSON(t.scriptVi):void 0,script:typeof t.script<"u"?I.fromJSON(t.script):void 0,nSequence:t.nSequence}),this}toJSON(){return{txHashBuf:typeof this.txHashBuf<"u"?this.txHashBuf.toString("hex"):void 0,txOutNum:this.txOutNum,scriptVi:typeof this.scriptVi<"u"?this.scriptVi.toJSON():void 0,script:typeof this.script<"u"?this.script.toJSON():void 0,nSequence:this.nSequence}}fromBr(t){return this.txHashBuf=t.read(32),this.txOutNum=t.readUInt32LE(),this.scriptVi=F.fromBuffer(t.readVarIntBuf()),this.script=I.fromBuffer(t.read(this.scriptVi.toNumber())),this.nSequence=t.readUInt32LE(),this}toBw(t){return t||(t=new R),t.write(this.txHashBuf),t.writeUInt32LE(this.txOutNum),t.write(this.scriptVi.buf),t.write(this.script.toBuffer()),t.writeUInt32LE(this.nSequence),t}fromPubKeyHashTxOut(t,e,r,s){const n=new I;if(r.script.isPubKeyHashOut())n.writeOpCode(o.OP_0),s?n.writeBuffer(s.toBuffer()):n.writeOpCode(o.OP_0);else throw new Error("txOut must be of type pubKeyHash");return this.txHashBuf=t,this.txOutNum=e,this.setScript(n),this}hasNullInput(){return this.txHashBuf.toString("hex")==="0000000000000000000000000000000000000000000000000000000000000000"&&this.txOutNum===4294967295}setNullInput(){this.txHashBuf=Buffer.alloc(32),this.txHashBuf.fill(0),this.txOutNum=4294967295}}v.LOCKTIME_VERIFY_SEQUENCE=1,v.SEQUENCE_FINAL=4294967295,v.SEQUENCE_LOCKTIME_DISABLE_FLAG=-2147483648,v.SEQUENCE_LOCKTIME_TYPE_FLAG=4194304,v.SEQUENCE_LOCKTIME_MASK=65535,v.SEQUENCE_LOCKTIME_GRANULARITY=9;class q extends _{static{w(this,"TxOut")}constructor(t,e,r){super({valueBn:t,scriptVi:e,script:r})}setScript(t){return this.scriptVi=F.fromNumber(t.toBuffer().length),this.script=t,this}fromProperties(t,e){return this.fromObject({valueBn:t}),this.setScript(e),this}static fromProperties(t,e){return new this().fromProperties(t,e)}fromJSON(t){return this.fromObject({valueBn:new c().fromJSON(t.valueBn),scriptVi:new F().fromJSON(t.scriptVi),script:new I().fromJSON(t.script)}),this}toJSON(){return{valueBn:this.valueBn.toJSON(),scriptVi:this.scriptVi.toJSON(),script:this.script.toJSON()}}fromBr(t){return this.valueBn=t.readUInt64LEBn(),this.scriptVi=F.fromNumber(t.readVarIntNum()),this.script=new I().fromBuffer(t.read(this.scriptVi.toNumber())),this}toBw(t){return t||(t=new R),t.writeUInt64LEBn(this.valueBn),t.write(this.scriptVi.buf),t.write(this.script.toBuffer()),t}}class T extends _{static{w(this,"Tx")}constructor(t=1,e=F.fromNumber(0),r=[],s=F.fromNumber(0),n=[],a=0){super({versionBytesNum:t,txInsVi:e,txIns:r,txOutsVi:s,txOuts:n,nLockTime:a})}fromJSON(t){const e=[];t.txIns.forEach(function(s){e.push(new v().fromJSON(s))});const r=[];return t.txOuts.forEach(function(s){r.push(new q().fromJSON(s))}),this.fromObject({versionBytesNum:t.versionBytesNum,txInsVi:new F().fromJSON(t.txInsVi),txIns:e,txOutsVi:new F().fromJSON(t.txOutsVi),txOuts:r,nLockTime:t.nLockTime}),this}toJSON(){const t=[];this.txIns.forEach(function(r){t.push(r.toJSON())});const e=[];return this.txOuts.forEach(function(r){e.push(r.toJSON())}),{versionBytesNum:this.versionBytesNum,txInsVi:this.txInsVi.toJSON(),txIns:t,txOutsVi:this.txOutsVi.toJSON(),txOuts:e,nLockTime:this.nLockTime}}fromBr(t){this.versionBytesNum=t.readUInt32LE(),this.txInsVi=new F(t.readVarIntBuf());const e=this.txInsVi.toNumber();this.txIns=[];for(let s=0;s<e;s++)this.txIns.push(new v().fromBr(t));this.txOutsVi=new F(t.readVarIntBuf());const r=this.txOutsVi.toNumber();this.txOuts=[];for(let s=0;s<r;s++)this.txOuts.push(new q().fromBr(t));return this.nLockTime=t.readUInt32LE(),this}toBw(t){t||(t=new R),t.writeUInt32LE(this.versionBytesNum),t.write(this.txInsVi.buf);for(let e=0;e<this.txIns.length;e++)this.txIns[e].toBw(t);t.write(this.txOutsVi.buf);for(let e=0;e<this.txOuts.length;e++)this.txOuts[e].toBw(t);return t.writeUInt32LE(this.nLockTime),t}hashPrevouts(){const t=new R;for(const e in this.txIns){const r=this.txIns[e];t.write(r.txHashBuf),t.writeUInt32LE(r.txOutNum)}return d.sha256Sha256(t.toBuffer())}hashSequence(){const t=new R;for(const e in this.txIns){const r=this.txIns[e];t.writeUInt32LE(r.nSequence)}return d.sha256Sha256(t.toBuffer())}hashOutputs(){const t=new R;for(const e in this.txOuts){const r=this.txOuts[e];t.write(r.toBuffer())}return d.sha256Sha256(t.toBuffer())}sighash(t,e,r,s,n=0,a=new _t){const u=this.sighashPreimage(t,e,r,s,n,a);return u.compare(Buffer.from("0000000000000000000000000000000000000000000000000000000000000001","hex"))===0?u:new z(d.sha256Sha256(u)).readReverse()}async asyncSighash(t,e,r,s,n=0,a={}){return(await B.asyncObjectMethod(this,"sighash",[t,e,r,s,n,a])).resbuf}sighashPreimage(t,e,r,s,n=0,a=new _t){if(t&S.SIGHASH_FORKID&&n&T.SCRIPT_ENABLE_SIGHASH_FORKID){let l=Buffer.alloc(32,0),g=Buffer.alloc(32,0),O=Buffer.alloc(32,0);t&S.SIGHASH_ANYONECANPAY||(l=a.prevoutsHashBuf?a.prevoutsHashBuf:a.prevoutsHashBuf=this.hashPrevouts()),!(t&S.SIGHASH_ANYONECANPAY)&&(t&31)!==S.SIGHASH_SINGLE&&(t&31)!==S.SIGHASH_NONE&&(g=a.sequenceHashBuf?a.sequenceHashBuf:a.sequenceHashBuf=this.hashSequence()),(t&31)!==S.SIGHASH_SINGLE&&(t&31)!==S.SIGHASH_NONE?O=a.outputsHashBuf?a.outputsHashBuf:a.outputsHashBuf=this.hashOutputs():(t&31)===S.SIGHASH_SINGLE&&e<this.txOuts.length&&(O=d.sha256Sha256(this.txOuts[e].toBuffer()));const E=new R;return E.writeUInt32LE(this.versionBytesNum),E.write(l),E.write(g),E.write(this.txIns[e].txHashBuf),E.writeUInt32LE(this.txIns[e].txOutNum),E.writeVarIntNum(r.toBuffer().length),E.write(r.toBuffer()),E.writeUInt64LEBn(s),E.writeUInt32LE(this.txIns[e].nSequence),E.write(O),E.writeUInt32LE(this.nLockTime),E.writeUInt32LE(t>>>0),E.toBuffer()}const u=this.cloneByBuffer();r=new I().fromBuffer(r.toBuffer()),r.removeCodeseparators();for(let l=0;l<u.txIns.length;l++)u.txIns[l]=v.fromBuffer(u.txIns[l].toBuffer()).setScript(new I);if(u.txIns[e]=v.fromBuffer(u.txIns[e].toBuffer()).setScript(r),(t&31)===S.SIGHASH_NONE){u.txOuts.length=0,u.txOutsVi=F.fromNumber(0);for(let l=0;l<u.txIns.length;l++)l!==e&&(u.txIns[l].nSequence=0)}else if((t&31)===S.SIGHASH_SINGLE){if(e>u.txOuts.length-1)return Buffer.from("0000000000000000000000000000000000000000000000000000000000000001","hex");u.txOuts.length=e+1,u.txOutsVi=F.fromNumber(e+1);for(let l=0;l<u.txOuts.length;l++)l<e&&(u.txOuts[l]=q.fromProperties(new c().fromBuffer(Buffer.from("ffffffffffffffff","hex")),new I));for(let l=0;l<u.txIns.length;l++)l!==e&&(u.txIns[l].nSequence=0)}return t&S.SIGHASH_ANYONECANPAY&&(u.txIns[0]=u.txIns[e],u.txIns.length=1,u.txInsVi=F.fromNumber(1)),new R().write(u.toBuffer()).writeInt32LE(t).toBuffer()}async asyncSighashPreimage(t,e,r,s,n=0,a={}){return(await B.asyncObjectMethod(this,"sighashPreimage",[t,e,r,s,n,a])).resbuf}sign(t,e=S.SIGHASH_ALL|S.SIGHASH_FORKID,r,s,n,a=T.SCRIPT_ENABLE_SIGHASH_FORKID,u={}){const h=this.sighash(e,r,s,n,a,u);return j.sign(h,t,"little").fromObject({nHashType:e})}async asyncSign(t,e=S.SIGHASH_ALL|S.SIGHASH_FORKID,r,s,n,a=T.SCRIPT_ENABLE_SIGHASH_FORKID,u={}){const h=await B.asyncObjectMethod(this,"sign",[t,e,r,s,n,a,u]);return new S().fromFastBuffer(h.resbuf)}verify(t,e,r,s,n=!1,a,u=T.SCRIPT_ENABLE_SIGHASH_FORKID,h={}){const l=this.sighash(t.nHashType,r,s,a,u,h);return j.verify(l,t,e,"little",n)}async asyncVerify(t,e,r,s,n=!1,a,u=T.SCRIPT_ENABLE_SIGHASH_FORKID,h={}){const l=await B.asyncObjectMethod(this,"verify",[t,e,r,s,n,a,u,h]);return JSON.parse(l.resbuf.toString())}hash(){return d.sha256Sha256(this.toBuffer())}async asyncHash(){return(await B.asyncObjectMethod(this,"hash",[])).resbuf}id(){return new z(this.hash()).readReverse().toString("hex")}async asyncId(){const t=await B.asyncObjectMethod(this,"id",[]);return JSON.parse(t.resbuf.toString())}addTxIn(t,e,r,s){let n;return t instanceof v?n=t:n=new v().fromObject({txHashBuf:t,txOutNum:e,nSequence:s}).setScript(r),this.txIns.push(n),this.txInsVi=F.fromNumber(this.txInsVi.toNumber()+1),this}addTxOut(t,e){let r;return t instanceof q?r=t:r=new q().fromObject({valueBn:t}).setScript(e),this.txOuts.push(r),this.txOutsVi=F.fromNumber(this.txOutsVi.toNumber()+1),this}isCoinbase(){return this.txIns.length===1&&this.txIns[0].hasNullInput()}sort(){return this.txIns.sort((t,e)=>new z(t.txHashBuf).readReverse().compare(new z(e.txHashBuf).readReverse())||t.txOutNum-e.txOutNum),this.txOuts.sort((t,e)=>t.valueBn.sub(e.valueBn).toNumber()||t.script.toBuffer().compare(e.script.toBuffer())),this}}T.MAX_MONEY=21e14,T.SCRIPT_ENABLE_SIGHASH_FORKID=65536;class Lt extends _{static{w(this,"Block")}constructor(t,e,r){super({blockHeader:t,txsVi:e,txs:r})}fromJSON(t){const e=[];return t.txs.forEach(function(r){e.push(new T().fromJSON(r))}),this.fromObject({blockHeader:new Rt().fromJSON(t.blockHeader),txsVi:new F().fromJSON(t.txsVi),txs:e}),this}toJSON(){const t=[];return this.txs.forEach(function(e){t.push(e.toJSON())}),{blockHeader:this.blockHeader.toJSON(),txsVi:this.txsVi.toJSON(),txs:t}}fromBr(t){this.blockHeader=new Rt().fromBr(t),this.txsVi=new F(t.readVarIntBuf());const e=this.txsVi.toNumber();this.txs=[];for(let r=0;r<e;r++)this.txs.push(new T().fromBr(t));return this}toBw(t){t||(t=new R),t.write(this.blockHeader.toBuffer()),t.write(this.txsVi.buf);const e=this.txsVi.toNumber();for(let r=0;r<e;r++)this.txs[r].toBw(t);return t}hash(){return d.sha256Sha256(this.blockHeader.toBuffer())}async asyncHash(){return(await B.asyncObjectMethod(this,"hash",[])).resbuf}id(){return new z(this.hash()).readReverse().toString("hex")}async asyncId(){const t=await B.asyncObjectMethod(this,"id",[]);return JSON.parse(t.resbuf.toString())}verifyMerkleRoot(){const t=this.txs.map(r=>r.toBuffer()),e=ht.fromBuffers(t).hash();return Buffer.compare(e,this.blockHeader.merkleRootBuf)}static iterateTxs(t){const e=new z(t),r=new Rt().fromBr(e),s=new F(e.readVarIntBuf()),n=s.toNumber();return{blockHeader:r,txsVi:s,txsNum:n,*[Symbol.iterator](){for(let a=0;a<n;a++)yield new T().fromBr(e)}}}}Lt.MAX_BLOCK_SIZE=1e6;class p extends _{static{w(this,"Interp")}constructor(t,e,r,s=[],n=[],a=0,u=0,h=0,l=[],g="",O=p.defaultFlags,E=new c(0)){super({script:t,tx:e,nIn:r,stack:s,altStack:n,pc:a,pBeginCodeHash:u,nOpCount:h,ifStack:l,errStr:g,flags:O,valueBn:E})}initialize(){return this.script=new I,this.stack=[],this.altStack=[],this.pc=0,this.pBeginCodeHash=0,this.nOpCount=0,this.ifStack=[],this.errStr="",this.flags=p.defaultFlags,this.scriptLimit=1e7,this.stackLimit=1e7,this}fromJSON(t){return this.fromJSONNoTx(t),this.tx=t.tx?new T().fromJSON(t.tx):void 0,this}fromJSONNoTx(t){return this.fromObject({script:t.script!==void 0?new I().fromJSON(t.script):void 0,nIn:t.nIn}),this.stack=[],t.stack.forEach(function(e){this.stack.push(Buffer.from(e,"hex"))}.bind(this)),this.altStack=[],t.altStack.forEach(function(e){this.altStack.push(Buffer.from(e,"hex"))}.bind(this)),this.fromObject({pc:t.pc,pBeginCodeHash:t.pBeginCodeHash,nOpCount:t.nOpCount,ifStack:t.ifStack,errStr:t.errStr,flags:t.flags}),this}fromBr(t){let e=t.readVarIntNum(),r=t.read(e);this.fromJSONNoTx(JSON.parse(r.toString()));let s=t.readVarIntNum();if(s>0){let n=t.read(s);this.tx=new T().fromFastBuffer(n)}return this}toJSON(){let t=this.toJSONNoTx();return t.tx=this.tx?this.tx.toJSON():void 0,t}toJSONNoTx(){let t=[];this.stack.forEach(function(r){t.push(r.toString("hex"))});let e=[];return this.altStack.forEach(function(r){e.push(r.toString("hex"))}),{script:this.script?this.script.toJSON():void 0,nIn:this.nIn,stack:t,altStack:e,pc:this.pc,pBeginCodeHash:this.pBeginCodeHash,nOpCount:this.nOpCount,ifStack:this.ifStack,errStr:this.errStr,flags:this.flags}}toBw(t){t||(t=new R);let e=Buffer.from(JSON.stringify(this.toJSONNoTx()));if(t.writeVarIntNum(e.length),t.write(e),this.tx){let r=this.tx.toFastBuffer();t.writeVarIntNum(r.length),t.write(r)}else t.writeVarIntNum(0);return t}static getFlags(t){let e=0;return t.indexOf("NONE")!==-1&&(e=e|p.SCRIPT_VERIFY_NONE),t.indexOf("P2SH")!==-1&&(e=e|p.SCRIPT_VERIFY_P2SH),t.indexOf("STRICTENC")!==-1&&(e=e|p.SCRIPT_VERIFY_STRICTENC),t.indexOf("DERSIG")!==-1&&(e=e|p.SCRIPT_VERIFY_DERSIG),t.indexOf("LOW_S")!==-1&&(e=e|p.SCRIPT_VERIFY_LOW_S),t.indexOf("NULLDUMMY")!==-1&&(e=e|p.SCRIPT_VERIFY_NULLDUMMY),t.indexOf("SIGPUSHONLY")!==-1&&(e=e|p.SCRIPT_VERIFY_SIGPUSHONLY),t.indexOf("MINIMALDATA")!==-1&&(e=e|p.SCRIPT_VERIFY_MINIMALDATA),t.indexOf("DISCOURAGE_UPGRADABLE_NOPS")!==-1&&(e=e|p.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS),t.indexOf("CLEANSTACK")!==-1&&(e=e|p.SCRIPT_VERIFY_CLEANSTACK),t.indexOf("CHECKLOCKTIMEVERIFY")!==-1&&(e=e|p.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY),t.indexOf("CHECKSEQUENCEVERIFY")!==-1&&(e=e|p.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY),t.indexOf("SIGHASH_FORKID")!==-1&&(e=e|p.SCRIPT_ENABLE_SIGHASH_FORKID),e}static castToBool(t){for(let e=0;e<t.length;e++)if(t[e]!==0)return!(e===t.length-1&&t[e]===128);return!1}checkSigEncoding(t){if(t.length===0)return!0;if(this.flags&(p.SCRIPT_VERIFY_DERSIG|p.SCRIPT_VERIFY_LOW_S|p.SCRIPT_VERIFY_STRICTENC)&&!S.IsTxDer(t))return this.errStr="SCRIPT_ERR_SIG_DER",!1;if(this.flags&p.SCRIPT_VERIFY_LOW_S){if(!new S().fromTxFormat(t).hasLowS())return this.errStr="SCRIPT_ERR_SIG_DER",!1}else if(this.flags&p.SCRIPT_VERIFY_STRICTENC&&!new S().fromTxFormat(t).hasDefinedHashType())return this.errStr="SCRIPT_ERR_SIG_HASHTYPE",!1;return!0}checkPubKeyEncoding(t){return this.flags&p.SCRIPT_VERIFY_STRICTENC&&!H.isCompressedOrUncompressed(t)?(this.errStr="SCRIPT_ERR_PUBKEYTYPE",!1):!0}checkLockTime(t){return!(!(this.tx.nLockTime<p.LOCKTIME_THRESHOLD&&t<p.LOCKTIME_THRESHOLD||this.tx.nLockTime>=p.LOCKTIME_THRESHOLD&&t>=p.LOCKTIME_THRESHOLD)||t>this.tx.nLockTime||v.SEQUENCE_FINAL===this.tx.txIns[this.nIn].nSequence)}checkSequence(t){let e=this.tx.txIns[this.nIn].nSequence;if(this.tx.versionBytesNum<2||e&v.SEQUENCE_LOCKTIME_DISABLE_FLAG)return!1;let r=v.SEQUENCE_LOCKTIME_TYPE_FLAG|v.SEQUENCE_LOCKTIME_MASK,s=e&r,n=t&r;return!(!(s<v.SEQUENCE_LOCKTIME_TYPE_FLAG&&n<v.SEQUENCE_LOCKTIME_TYPE_FLAG||s>=v.SEQUENCE_LOCKTIME_TYPE_FLAG&&n>=v.SEQUENCE_LOCKTIME_TYPE_FLAG)||n>s)}*eval(){this.script.toBuffer().length>this.scriptLimit&&(this.errStr="SCRIPT_ERR_SCRIPT_SIZE",yield!1);try{for(;this.pc<this.script.chunks.length;){let t=this.step();t?yield t:yield!1}this.stack.length+this.altStack.length>this.stackLimit&&(this.errStr="SCRIPT_ERR_STACK_SIZE",yield!1)}catch(t){this.errStr="SCRIPT_ERR_UNKNOWN_ERROR: "+t,yield!1}this.ifStack.length>0&&(this.errStr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",yield!1),yield!0}step(){let t=(this.flags&p.SCRIPT_VERIFY_MINIMALDATA)!==0,e=!(this.ifStack.indexOf(!1)+1),r=this.script.chunks[this.pc];this.pc++;let s=r.opCodeNum;if(s===void 0)return this.errStr="SCRIPT_ERR_BAD_OPCODE",!1;if(s>o.OP_16&&++this.nOpCount>201)return this.errStr="SCRIPT_ERR_OP_COUNT",!1;if(s===o.OP_LEFT||s===o.OP_RIGHT||s===o.OP_2MUL||s===o.OP_2DIV)return this.errStr="SCRIPT_ERR_DISABLED_OPCODE",!1;if(e&&s>=0&&s<=o.OP_PUSHDATA4){if(t&&!this.script.checkMinimalPush(this.pc-1))return this.errStr="SCRIPT_ERR_MINIMALDATA",!1;if(!r.buf)this.stack.push(p.false);else{if(r.len!==r.buf.length)throw new Error("LEngth of push value not equal to length of data");this.stack.push(r.buf)}}else if(e||o.OP_IF<=s&&s<=o.OP_ENDIF)switch(s){case o.OP_1NEGATE:case o.OP_1:case o.OP_2:case o.OP_3:case o.OP_4:case o.OP_5:case o.OP_6:case o.OP_7:case o.OP_8:case o.OP_9:case o.OP_10:case o.OP_11:case o.OP_12:case o.OP_13:case o.OP_14:case o.OP_15:case o.OP_16:{let f=s-(o.OP_1-1),m=new c(f).toScriptNumBuffer();this.stack.push(m)}break;case o.OP_NOP:break;case o.OP_CHECKLOCKTIMEVERIFY:{if(!(this.flags&p.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)){if(this.flags&p.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errStr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-1],b=new c().fromScriptNumBuffer(f,t,5).toNumber();if(b<0)return this.errStr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(!this.checkLockTime(b))return this.errStr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1}break;case o.OP_CHECKSEQUENCEVERIFY:{if(!(this.flags&p.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)){if(this.flags&p.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errStr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-1],b=new c().fromScriptNumBuffer(f,t,5).toNumber();if(b<0)return this.errStr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(b&v.SEQUENCE_LOCKTIME_DISABLE_FLAG)break;if(!this.checkSequence(b))return this.errStr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1}break;case o.OP_NOP1:case o.OP_NOP3:case o.OP_NOP4:case o.OP_NOP5:case o.OP_NOP6:case o.OP_NOP7:case o.OP_NOP8:case o.OP_NOP9:case o.OP_NOP10:if(this.flags&p.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errStr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break;case o.OP_IF:case o.OP_NOTIF:{let f=!1;if(e){if(this.stack.length<1)return this.errStr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;let m=this.stack.pop();f=p.castToBool(m),s===o.OP_NOTIF&&(f=!f)}this.ifStack.push(f)}break;case o.OP_ELSE:if(this.ifStack.length===0)return this.errStr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.ifStack[this.ifStack.length-1]=!this.ifStack[this.ifStack.length-1];break;case o.OP_ENDIF:if(this.ifStack.length===0)return this.errStr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.ifStack.pop();break;case o.OP_VERIFY:{if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-1];if(p.castToBool(f))this.stack.pop();else return this.errStr="SCRIPT_ERR_VERIFY",!1}break;case o.OP_RETURN:return this.errStr="SCRIPT_ERR_OP_RETURN",!1;case o.OP_TOALTSTACK:if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.altStack.push(this.stack.pop());break;case o.OP_FROMALTSTACK:if(this.altStack.length<1)return this.errStr="SCRIPT_ERR_INVALID_ALTSTACK_OPERATION",!1;this.stack.push(this.altStack.pop());break;case o.OP_2DROP:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop(),this.stack.pop();break;case o.OP_2DUP:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-2],m=this.stack[this.stack.length-1];this.stack.push(f),this.stack.push(m)}break;case o.OP_3DUP:{if(this.stack.length<3)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-3],m=this.stack[this.stack.length-2],b=this.stack[this.stack.length-1];this.stack.push(f),this.stack.push(m),this.stack.push(b)}break;case o.OP_2OVER:{if(this.stack.length<4)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-4],m=this.stack[this.stack.length-3];this.stack.push(f),this.stack.push(m)}break;case o.OP_2ROT:{if(this.stack.length<6)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack.splice(this.stack.length-6,2);this.stack.push(f[0]),this.stack.push(f[1])}break;case o.OP_2SWAP:{if(this.stack.length<4)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack.splice(this.stack.length-4,2);this.stack.push(f[0]),this.stack.push(f[1])}break;case o.OP_IFDUP:{if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-1];p.castToBool(f)&&this.stack.push(f)}break;case o.OP_DEPTH:{let f=new c(this.stack.length).toScriptNumBuffer();this.stack.push(f)}break;case o.OP_DROP:if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop();break;case o.OP_DUP:if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-1]);break;case o.OP_NIP:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,1);break;case o.OP_OVER:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-2]);break;case o.OP_PICK:case o.OP_ROLL:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-1],b=new c().fromScriptNumBuffer(f,t,p.DEFAULT_SCRIPT_NUM_LENGTH_POLICY_AFTER_GENESIS).toNumber();if(this.stack.pop(),b<0||b>=this.stack.length)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;f=this.stack[this.stack.length-b-1],s===o.OP_ROLL&&this.stack.splice(this.stack.length-b-1,1),this.stack.push(f)}break;case o.OP_ROT:{if(this.stack.length<3)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-3],m=this.stack[this.stack.length-2],b=this.stack[this.stack.length-1];this.stack[this.stack.length-3]=m,this.stack[this.stack.length-2]=b,this.stack[this.stack.length-1]=f}break;case o.OP_SWAP:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-2],m=this.stack[this.stack.length-1];this.stack[this.stack.length-2]=m,this.stack[this.stack.length-1]=f}break;case o.OP_TUCK:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,0,this.stack[this.stack.length-1]);break;case o.OP_SIZE:{if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=new c(this.stack[this.stack.length-1].length);this.stack.push(f.toScriptNumBuffer())}break;case o.OP_OR:case o.OP_AND:case o.OP_XOR:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let n=this.stack[this.stack.length-2],a=this.stack[this.stack.length-1];if(n.length!=a.length)return this.errStr="SCRIPT_ERR_INVALID_OPERAND_SIZE",!1;switch(s){case o.OP_AND:for(let f=0;f<n.length;f++)n[f]&=a[f];break;case o.OP_OR:for(let f=0;f<n.length;f++)n[f]|=a[f];break;case o.OP_XOR:for(let f=0;f<n.length;f++)n[f]^=a[f];break}this.stack.pop();break;case o.OP_INVERT:if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let u=this.stack[this.stack.length-1];for(let f=0;f<u.length;f++)u[f]=~u[f];break;case o.OP_LSHIFT:case o.OP_RSHIFT:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-2],m=new c(f),b=new c().fromScriptNumBuffer(this.stack[this.stack.length-1],t,p.DEFAULT_SCRIPT_NUM_LENGTH_POLICY_AFTER_GENESIS).toNumber();if(b<0)return this.errStr="SCRIPT_ERR_INVALID_NUMBER_RANGE",!1;switch(this.stack.pop(),this.stack.pop(),s){case o.OP_LSHIFT:m=m.ushln(b);break;case o.OP_RSHIFT:m=m.ushrn(b);break}let U=m.toBuffer().slice(-f.length);U.length<f.length&&(U=Buffer.concat([Buffer.alloc(f.length-U.length),U])),this.stack.push(U);break}case o.OP_EQUAL:case o.OP_EQUALVERIFY:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-2],m=this.stack[this.stack.length-1],b=it(f,m);if(this.stack.pop(),this.stack.pop(),this.stack.push(b?p.true:p.false),s===o.OP_EQUALVERIFY)if(b)this.stack.pop();else return this.errStr="SCRIPT_ERR_EQUALVERIFY",!1}break;case o.OP_1ADD:case o.OP_1SUB:case o.OP_NEGATE:case o.OP_ABS:case o.OP_NOT:case o.OP_0NOTEQUAL:{if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-1],m=new c().fromScriptNumBuffer(f,t,p.DEFAULT_SCRIPT_NUM_LENGTH_POLICY_AFTER_GENESIS);switch(s){case o.OP_1ADD:m=m.add(1);break;case o.OP_1SUB:m=m.sub(1);break;case o.OP_NEGATE:m=m.neg();break;case o.OP_ABS:m.lt(0)&&(m=m.neg());break;case o.OP_NOT:m=new c(m.eq(0)+0);break;case o.OP_0NOTEQUAL:m=new c(m.neq(0)+0);break}this.stack.pop(),this.stack.push(m.toScriptNumBuffer())}break;case o.OP_ADD:case o.OP_SUB:case o.OP_MUL:case o.OP_DIV:case o.OP_MOD:case o.OP_BOOLAND:case o.OP_BOOLOR:case o.OP_NUMEQUAL:case o.OP_NUMEQUALVERIFY:case o.OP_NUMNOTEQUAL:case o.OP_LESSTHAN:case o.OP_GREATERTHAN:case o.OP_LESSTHANOREQUAL:case o.OP_GREATERTHANOREQUAL:case o.OP_MIN:case o.OP_MAX:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=new c().fromScriptNumBuffer(this.stack[this.stack.length-2],t,p.DEFAULT_SCRIPT_NUM_LENGTH_POLICY_AFTER_GENESIS),m=new c().fromScriptNumBuffer(this.stack[this.stack.length-1],t,p.DEFAULT_SCRIPT_NUM_LENGTH_POLICY_AFTER_GENESIS),b=new c(0);switch(s){case o.OP_ADD:b=f.add(m);break;case o.OP_SUB:b=f.sub(m);break;case o.OP_MUL:b=f.mul(m);break;case o.OP_DIV:if(m==0)return this.errStr="SCRIPT_ERR_DIV_BY_ZERO",!1;b=f.div(m);break;case o.OP_MOD:if(m==0)return this.errStr="SCRIPT_ERR_DIV_BY_ZERO",!1;b=f.mod(m);break;case o.OP_BOOLAND:b=new c((f.neq(0)&&m.neq(0))+0);break;case o.OP_BOOLOR:b=new c((f.neq(0)||m.neq(0))+0);break;case o.OP_NUMEQUAL:b=new c(f.eq(m)+0);break;case o.OP_NUMEQUALVERIFY:b=new c(f.eq(m)+0);break;case o.OP_NUMNOTEQUAL:b=new c(f.neq(m)+0);break;case o.OP_LESSTHAN:b=new c(f.lt(m)+0);break;case o.OP_GREATERTHAN:b=new c(f.gt(m)+0);break;case o.OP_LESSTHANOREQUAL:b=new c(f.leq(m)+0);break;case o.OP_GREATERTHANOREQUAL:b=new c(f.geq(m)+0);break;case o.OP_MIN:b=f.lt(m)?f:m;break;case o.OP_MAX:b=f.gt(m)?f:m;break}if(this.stack.pop(),this.stack.pop(),this.stack.push(b.toScriptNumBuffer()),s===o.OP_NUMEQUALVERIFY)if(p.castToBool(this.stack[this.stack.length-1]))this.stack.pop();else return this.errStr="SCRIPT_ERR_NUMEQUALVERIFY",!1}break;case o.OP_WITHIN:{if(this.stack.length<3)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=new c().fromScriptNumBuffer(this.stack[this.stack.length-3],t,p.DEFAULT_SCRIPT_NUM_LENGTH_POLICY_AFTER_GENESIS),m=new c().fromScriptNumBuffer(this.stack[this.stack.length-2],t,p.DEFAULT_SCRIPT_NUM_LENGTH_POLICY_AFTER_GENESIS),b=new c().fromScriptNumBuffer(this.stack[this.stack.length-1],t,p.DEFAULT_SCRIPT_NUM_LENGTH_POLICY_AFTER_GENESIS),U=m.leq(f)&&f.lt(b);this.stack.pop(),this.stack.pop(),this.stack.pop(),this.stack.push(U?p.true:p.false)}break;case o.OP_RIPEMD160:case o.OP_SHA1:case o.OP_SHA256:case o.OP_HASH160:case o.OP_HASH256:{if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-1],m;s===o.OP_RIPEMD160?m=d.ripemd160(f):s===o.OP_SHA1?m=d.sha1(f):s===o.OP_SHA256?m=d.sha256(f):s===o.OP_HASH160?m=d.sha256Ripemd160(f):s===o.OP_HASH256&&(m=d.sha256Sha256(f)),this.stack.pop(),this.stack.push(m)}break;case o.OP_CODESEPARATOR:this.pBeginCodeHash=this.pc;break;case o.OP_CHECKSIG:case o.OP_CHECKSIGVERIFY:{if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let f=this.stack[this.stack.length-2],m=this.stack[this.stack.length-1],b=new I().fromObject({chunks:this.script.chunks.slice(this.pBeginCodeHash)});if((f.length>0?f.readUInt8(f.length-1):0)&S.SIGHASH_FORKID){if(!(this.flags&p.SCRIPT_ENABLE_SIGHASH_FORKID))return this.errStr="SCRIPT_ERR_ILLEGAL_FORKID",!1}else b.findAndDelete(new I().writeBuffer(f));if(!this.checkSigEncoding(f)||!this.checkPubKeyEncoding(m))return!1;let ot;try{let Ot=new S().fromTxFormat(f),lt=new H().fromBuffer(m,!1);ot=this.tx.verify(Ot,lt,this.nIn,b,!!(this.flags&p.SCRIPT_VERIFY_LOW_S),this.valueBn,this.flags)}catch{ot=!1}if(this.stack.pop(),this.stack.pop(),this.stack.push(ot?p.true:p.false),s===o.OP_CHECKSIGVERIFY)if(ot)this.stack.pop();else return this.errStr="SCRIPT_ERR_CHECKSIGVERIFY",!1}break;case o.OP_CHECKMULTISIG:case o.OP_CHECKMULTISIGVERIFY:{let f=1;if(this.stack.length<f)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let m=new c().fromScriptNumBuffer(this.stack[this.stack.length-f],t).toNumber();if(m<0||m>20)return this.errStr="SCRIPT_ERR_PUBKEY_COUNT",!1;if(this.nOpCount+=m,this.nOpCount>201)return this.errStr="SCRIPT_ERR_OP_COUNT",!1;let b=++f;if(f+=m,this.stack.length<f)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let U=new c().fromScriptNumBuffer(this.stack[this.stack.length-f],t).toNumber();if(U<0||U>m)return this.errStr="SCRIPT_ERR_SIG_COUNT",!1;let ot=++f;if(f+=U,this.stack.length<f)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let Ot=new I().fromObject({chunks:this.script.chunks.slice(this.pBeginCodeHash)});for(let mt=0;mt<U;mt++){let ct=this.stack[this.stack.length-ot-mt];if((ct.length>0?ct.readUInt8(ct.length-1):0)&S.SIGHASH_FORKID){if(!(this.flags&p.SCRIPT_ENABLE_SIGHASH_FORKID))return this.errStr="SCRIPT_ERR_ILLEGAL_FORKID",!1}else Ot.findAndDelete(new I().writeBuffer(ct))}let lt=!0;for(;lt&&U>0;){let mt=this.stack[this.stack.length-ot],ct=this.stack[this.stack.length-b];if(!this.checkSigEncoding(mt)||!this.checkPubKeyEncoding(ct))return!1;let Tt;try{let Mt=new S().fromTxFormat(mt),ee=new H().fromBuffer(ct,!1);Tt=this.tx.verify(Mt,ee,this.nIn,Ot,!!(this.flags&p.SCRIPT_VERIFY_LOW_S),this.valueBn,this.flags)}catch{Tt=!1}Tt&&(ot++,U--),b++,m--,U>m&&(lt=!1)}for(;f-- >1;)this.stack.pop();if(this.stack.length<1)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(this.flags&p.SCRIPT_VERIFY_NULLDUMMY&&this.stack[this.stack.length-1].length)return this.errStr="SCRIPT_ERR_SIG_NULLDUMMY",!1;if(this.stack.pop(),this.stack.push(lt?p.true:p.false),s===o.OP_CHECKMULTISIGVERIFY)if(lt)this.stack.pop();else return this.errStr="SCRIPT_ERR_CHECKMULTISIGVERIFY",!1}break;case o.OP_CAT:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let h=this.stack[this.stack.length-2],l=this.stack[this.stack.length-1];this.stack[this.stack.length-2]=Buffer.concat([h,l]),this.stack.pop();break;case o.OP_SPLIT:if(this.stack.length<2)return this.errStr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let g=this.stack[this.stack.length-2],O=new c().fromScriptNumBuffer(this.stack[this.stack.length-1],t);if(O.lt(0)||O.gt(g.length))return this.errStr="SCRIPT_ERR_INVALID_SPLIT_RANGE",!1;let E=g.slice(0,O),K=g.slice(O);this.stack.pop(),this.stack.pop(),this.stack.push(E),this.stack.push(K);break;default:return this.errStr="SCRIPT_ERR_BAD_OPCODE",!1}return!0}verify(t,e,r,s,n,a){let u=this.results(t,e,r,s,n,a);for(let h of u)if(!h)return!1;return!0}*results(t,e,r,s,n,a){let u;this.fromObject({script:t,tx:r,nIn:s,flags:n,valueBn:a}),n&p.SCRIPT_VERIFY_SIGPUSHONLY&&!t.isPushOnly()&&(this.errStr=this.errStr||"SCRIPT_ERR_SIG_PUSHONLY",yield!1),yield*this.eval(),n&p.SCRIPT_VERIFY_P2SH&&(u=this.stack.slice());let h=this.stack;this.initialize(),this.fromObject({script:e,stack:h,tx:r,nIn:s,flags:n,valueBn:a}),yield*this.eval(),this.stack.length===0&&(this.errStr=this.errStr||"SCRIPT_ERR_EVAL_FALSE",yield!1);let l=this.stack[this.stack.length-1];if(p.castToBool(l)||(this.errStr=this.errStr||"SCRIPT_ERR_EVAL_FALSE",yield!1),n&p.SCRIPT_VERIFY_P2SH&&e.isScriptHashOut()){t.isPushOnly()||(this.errStr=this.errStr||"SCRIPT_ERR_SIG_PUSHONLY",yield!1);let g=h;if(h=u,u=g,h.length===0)throw new Error("internal error - stack copy empty");let O=h[h.length-1],E=new I().fromBuffer(O);h.pop(),this.initialize(),this.fromObject({script:E,stack:h,tx:r,nIn:s,flags:n,valueBn:a}),yield*this.eval(),h.length===0&&(this.errStr=this.errStr||"SCRIPT_ERR_EVAL_FALSE",yield!1),p.castToBool(h[h.length-1])?yield!0:(this.errStr=this.errStr||"SCRIPT_ERR_EVAL_FALSE",yield!1)}if(n&p.SCRIPT_VERIFY_CLEANSTACK){if(!(n&p.SCRIPT_VERIFY_P2SH))throw new Error("cannot use CLEANSTACK without P2SH");h.length!==1&&(this.errStr=this.errStr||"SCRIPT_ERR_CLEANSTACK",yield!1)}yield!0}getDebugObject(){let t=this.pc-1;return{errStr:this.errStr,scriptStr:this.script?this.script.toString():"no script found",pc:t,stack:this.stack.map(e=>e.toString("hex")),altStack:this.altStack.map(e=>e.toString("hex")),opCodeStr:this.script?o.fromNumber(this.script.chunks[t].opCodeNum).toString():"no script found"}}getDebugString(){return JSON.stringify(this.getDebugObject(),null,2)}}p.true=Buffer.from([1]),p.false=Buffer.from([]),p.DEFAULT_SCRIPT_NUM_LENGTH_POLICY_AFTER_GENESIS=1e4,p.LOCKTIME_THRESHOLD=5e8,p.SCRIPT_VERIFY_NONE=0,p.SCRIPT_VERIFY_P2SH=1,p.SCRIPT_VERIFY_STRICTENC=2,p.SCRIPT_VERIFY_DERSIG=4,p.SCRIPT_VERIFY_LOW_S=8,p.SCRIPT_VERIFY_NULLDUMMY=16,p.SCRIPT_VERIFY_SIGPUSHONLY=32,p.SCRIPT_VERIFY_MINIMALDATA=64,p.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=128,p.SCRIPT_VERIFY_CLEANSTACK=256,p.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY=512,p.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY=1024,p.SCRIPT_ENABLE_SIGHASH_FORKID=65536,p.defaultFlags=p.SCRIPT_VERIFY_P2SH|p.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY;class Ft extends _{static{w(this,"SigOperations")}constructor(t=new Map){super({map:t})}toJSON(){const t={};return this.map.forEach((e,r)=>{t[r]=e.map(s=>({nScriptChunk:s.nScriptChunk,type:s.type,addressStr:s.addressStr,nHashType:s.nHashType,log:s.log}))}),t}fromJSON(t){return Object.keys(t).forEach(e=>{this.map.set(e,t[e].map(r=>({nScriptChunk:r.nScriptChunk,type:r.type,addressStr:r.addressStr,nHashType:r.nHashType,log:r.log})))}),this}setOne(t,e,r,s="sig",n,a=S.SIGHASH_ALL|S.SIGHASH_FORKID){const u=t.toString("hex")+":"+e,h={nScriptChunk:r,type:s,addressStr:n,nHashType:a};return this.map.set(u,[h]),this}setMany(t,e,r){const s=t.toString("hex")+":"+e;return r=r.map(n=>({type:n.type||"sig",nHashType:n.nHashType||S.SIGHASH_ALL|S.SIGHASH_FORKID,...n})),this.map.set(s,r),this}addOne(t,e,r,s="sig",n,a=S.SIGHASH_ALL|S.SIGHASH_FORKID){const u=this.get(t,e)||[];return u.push({nScriptChunk:r,type:s,addressStr:n,nHashType:a}),this.setMany(t,e,u),this}get(t,e){const r=t.toString("hex")+":"+e;return this.map.get(r)||[]}}class Kt extends _{static{w(this,"TxOutMap")}constructor(t=new Map){super({map:t})}toJSON(){const t={};return this.map.forEach((e,r)=>{t[r]=e.toHex()}),t}fromJSON(t){return Object.keys(t).forEach(e=>{this.map.set(e,q.fromHex(t[e]))}),this}set(t,e,r){const s=t.toString("hex")+":"+e;return this.map.set(s,r),this}get(t,e){const r=t.toString("hex")+":"+e;return this.map.get(r)}setTx(t){const e=t.hash().toString("hex");return t.txOuts.forEach((r,s)=>{const n=e+":"+s;this.map.set(n,r)}),this}}const Ut=P.Default.TxBuilder;class Zt extends _{static{w(this,"TxBuilder")}constructor(t=new T,e=[],r=[],s=new Kt,n=new Ft,a,u,h,l=Ut.feePerKbNum,g=0,O=1,E=1,K=Ut.dust,f=!1,m=new _t){super({tx:t,txIns:e,txOuts:r,uTxOutMap:s,sigOperations:n,changeScript:a,changeAmountBn:u,feeAmountBn:h,feePerKbNum:l,nLockTime:g,versionBytesNum:O,sigsPerInput:E,dust:K,dustChangeToFees:f,hashCache:m})}toJSON(){const t={};return t.tx=this.tx.toHex(),t.txIns=this.txIns.map(e=>e.toHex()),t.txOuts=this.txOuts.map(e=>e.toHex()),t.uTxOutMap=this.uTxOutMap.toJSON(),t.sigOperations=this.sigOperations.toJSON(),t.changeScript=this.changeScript?this.changeScript.toHex():void 0,t.changeAmountBn=this.changeAmountBn?this.changeAmountBn.toNumber():void 0,t.feeAmountBn=this.feeAmountBn?this.feeAmountBn.toNumber():void 0,t.feePerKbNum=this.feePerKbNum,t.sigsPerInput=this.sigsPerInput,t.dust=this.dust,t.dustChangeToFees=this.dustChangeToFees,t.hashCache=this.hashCache.toJSON(),t}fromJSON(t){return this.tx=new T().fromHex(t.tx),this.txIns=t.txIns.map(e=>v.fromHex(e)),this.txOuts=t.txOuts.map(e=>q.fromHex(e)),this.uTxOutMap=new Kt().fromJSON(t.uTxOutMap),this.sigOperations=new Ft().fromJSON(t.sigOperations),this.changeScript=t.changeScript?new I().fromHex(t.changeScript):void 0,this.changeAmountBn=t.changeAmountBn?new c(t.changeAmountBn):void 0,this.feeAmountBn=t.feeAmountBn?new c(t.feeAmountBn):void 0,this.feePerKbNum=t.feePerKbNum||this.feePerKbNum,this.sigsPerInput=t.sigsPerInput||this.sigsPerInput,this.dust=t.dust||this.dust,this.dustChangeToFees=t.dustChangeToFees||this.dustChangeToFees,this.hashCache=_t.fromJSON(t.hashCache),this}setFeePerKbNum(t){if(typeof t!="number"||t<0)throw new Error("cannot set a fee of zero or less");return this.feePerKbNum=t,this}setChangeAddress(t){return this.changeScript=t.toTxOutScript(),this}setChangeScript(t){return this.changeScript=t,this}setNLocktime(t){return this.nLockTime=t,this}setVersion(t){return this.versionBytesNum=t,this}setDust(t=Ut.dust){return this.dust=t,this}sendDustChangeToFees(t=!1){return this.dustChangeToFees=t,this}importPartiallySignedTx(t,e=this.uTxOutMap,r=this.sigOperations){return this.tx=t,this.uTxOutMap=e,this.sigOperations=r,this}inputFromScript(t,e,r,s,n){if(!Buffer.isBuffer(t)||typeof e!="number"||!(r instanceof q)||!(s instanceof I))throw new Error("invalid one of: txHashBuf, txOutNum, txOut, script");return this.txIns.push(v.fromProperties(t,e,s,n)),this.uTxOutMap.set(t,e,r),this}addSigOperation(t,e,r,s,n,a){return this.sigOperations.addOne(t,e,r,s,n,a),this}inputFromPubKeyHash(t,e,r,s,n,a){if(!Buffer.isBuffer(t)||typeof e!="number"||!(r instanceof q))throw new Error("invalid one of: txHashBuf, txOutNum, txOut");this.txIns.push(new v().fromObject({nSequence:n}).fromPubKeyHashTxOut(t,e,r,s)),this.uTxOutMap.set(t,e,r);const u=X.fromTxOutScript(r.script).toString();return this.addSigOperation(t,e,0,"sig",u,a),this.addSigOperation(t,e,1,"pubKey",u),this}outputToAddress(t,e){if(!(e instanceof X)||!(t instanceof c))throw new Error("addr must be an Address, and valueBn must be a Bn");const r=new I().fromPubKeyHash(e.hashBuf);return this.outputToScript(t,r),this}outputToScript(t,e){if(!(e instanceof I)||!(t instanceof c))throw new Error("script must be a Script, and valueBn must be a Bn");const r=q.fromProperties(t,e);return this.txOuts.push(r),this}buildOutputs(){let t=new c(0);return this.txOuts.forEach(e=>{if(e.valueBn.lt(this.dust)&&!e.script.isNonSpendable())throw new Error("cannot create output lesser than dust");t=t.add(e.valueBn),this.tx.addTxOut(e)}),t}buildInputs(t,e=0){let r=new c(0);for(const s of this.txIns){const n=this.uTxOutMap.get(s.txHashBuf,s.txOutNum);if(r=r.add(n.valueBn),this.tx.addTxIn(s),r.geq(t)){if(e<=0)break;e--}}if(r.lt(t))throw new Error("not enough funds for outputs: inAmountBn "+r.toNumber()+" outAmountBn "+t.toNumber());return r}estimateSize(){let r=this.tx.toBuffer().length;return this.tx.txIns.forEach(s=>{const{txHashBuf:n,txOutNum:a}=s;this.sigOperations.get(n,a).forEach(h=>{const{nScriptChunk:l,type:g}=h,E=new I([s.script.chunks[l]]).toBuffer().length;if(r-=E,g==="sig")r+=72;else if(h.type==="pubKey")r+=35;else throw new Error("unsupported sig operations type")})}),r=r+1,Math.round(r)}estimateFee(t=new c(0)){const e=Math.ceil(this.estimateSize()/1e3*this.feePerKbNum);return new c(e).add(t)}build(t={useAllInputs:!1}){let e;if(this.txIns.length<=0)throw Error("tx-builder number of inputs must be greater than 0");if(!this.changeScript)throw new Error("must specify change script to use build method");for(let r=t.useAllInputs?this.txIns.length-1:0;r<this.txIns.length;r++){this.tx=new T;const s=this.buildOutputs(),n=q.fromProperties(new c(0),this.changeScript);this.tx.addTxOut(n);let a;try{a=this.buildInputs(s,r)}catch(u){throw u.message.includes("not enough funds for outputs")?new Error("unable to gather enough inputs for outputs and fee"):u}if(this.changeAmountBn=a.sub(s),n.valueBn=this.changeAmountBn,e=this.estimateFee(),this.changeAmountBn.geq(e)&&this.changeAmountBn.sub(e).gt(this.dust))break}if(this.changeAmountBn.geq(e)){if(this.feeAmountBn=e,this.changeAmountBn=this.changeAmountBn.sub(this.feeAmountBn),this.tx.txOuts[this.tx.txOuts.length-1].valueBn=this.changeAmountBn,this.changeAmountBn.lt(this.dust))if(this.dustChangeToFees)this.tx.txOuts.pop(),this.tx.txOutsVi=F.fromNumber(this.tx.txOutsVi.toNumber()-1),this.feeAmountBn=this.feeAmountBn.add(this.changeAmountBn),this.changeAmountBn=new c(0);else throw new Error("unable to create change amount greater than dust");if(this.tx.nLockTime=this.nLockTime,this.tx.versionBytesNum=this.versionBytesNum,this.tx.txOuts.length===0)throw new Error("outputs length is zero - unable to create any outputs greater than dust");return this}else throw new Error("unable to gather enough inputs for outputs and fee")}sort(){return this.tx.sort(),this}static allSigsPresent(t,e){let r=0;for(let s=1;s<e.chunks.length-1;s++)e.chunks[s].buf&&r++;return r===t}static removeBlankSigs(t){t=new I(t.chunks.slice());for(let e=1;e<t.chunks.length-1;e++)t.chunks[e].buf||t.chunks.splice(e,1);return t}fillSig(t,e,r){const s=this.tx.txIns[t];return s.script.chunks[e]=new I().writeBuffer(r.toTxFormat()).chunks[0],s.scriptVi=F.fromNumber(s.script.toBuffer().length),this}getSig(t,e=S.SIGHASH_ALL|S.SIGHASH_FORKID,r,s,n=T.SCRIPT_ENABLE_SIGHASH_FORKID){let a;if(e&S.SIGHASH_FORKID&&n&T.SCRIPT_ENABLE_SIGHASH_FORKID){const u=this.tx.txIns[r].txHashBuf,h=this.tx.txIns[r].txOutNum,l=this.uTxOutMap.get(u,h);if(!l)throw new Error("for SIGHASH_FORKID must provide UTXOs");a=l.valueBn}return this.tx.sign(t,e,r,s,a,n,this.hashCache)}asyncGetSig(t,e=S.SIGHASH_ALL|S.SIGHASH_FORKID,r,s,n=T.SCRIPT_ENABLE_SIGHASH_FORKID){let a;if(e&S.SIGHASH_FORKID&&n&T.SCRIPT_ENABLE_SIGHASH_FORKID){const u=this.tx.txIns[r].txHashBuf,h=this.tx.txIns[r].txOutNum,l=this.uTxOutMap.get(u,h);if(!l)throw new Error("for SIGHASH_FORKID must provide UTXOs");a=l.valueBn}return this.tx.asyncSign(t,e,r,s,a,n,this.hashCache)}signTxIn(t,e,r,s,n=S.SIGHASH_ALL|S.SIGHASH_FORKID,a=T.SCRIPT_ENABLE_SIGHASH_FORKID){const u=this.tx.txIns[t],h=u.script;if(s===void 0&&h.isPubKeyHashIn()&&(s=0),s===void 0)throw new Error("cannot sign unknown script type for input "+t);const l=u.txHashBuf,g=u.txOutNum;r||(r=this.uTxOutMap.get(l,g));const E=r.script,K=this.getSig(e,n,t,E,a,this.hashCache);return this.fillSig(t,s,K),this}async asyncSignTxIn(t,e,r,s,n=S.SIGHASH_ALL|S.SIGHASH_FORKID,a=T.SCRIPT_ENABLE_SIGHASH_FORKID){const u=this.tx.txIns[t],h=u.script;if(s===void 0&&h.isPubKeyHashIn()&&(s=0),s===void 0)throw new Error("cannot sign unknown script type for input "+t);const l=u.txHashBuf,g=u.txOutNum;r||(r=this.uTxOutMap.get(l,g));const E=r.script,K=await this.asyncGetSig(e,n,t,E,a,this.hashCache);return this.fillSig(t,s,K),this}signWithKeyPairs(t){const e={};for(const r of t){const s=X.fromPubKey(r.pubKey).toString();e[s]=r}for(const r in this.tx.txIns){const s=this.tx.txIns[r],n=this.sigOperations.get(s.txHashBuf,s.txOutNum);for(const a of n){const{nScriptChunk:u,type:h,addressStr:l,nHashType:g}=a,O=e[l];if(!O){a.log=`cannot find keyPair for addressStr ${l}`;continue}const E=this.uTxOutMap.get(s.txHashBuf,s.txOutNum);if(h==="sig")this.signTxIn(r,O,E,u,g),a.log="successfully inserted signature";else if(h==="pubKey")s.script.chunks[u]=new I().writeBuffer(O.pubKey.toBuffer()).chunks[0],s.setScript(s.script),a.log="successfully inserted public key";else{a.log=`cannot perform operation of type ${h}`;continue}}}return this}}class vt extends _{static{w(this,"TxVerifier")}constructor(t,e,r,s){super({tx:t,txOutMap:e,errStr:r,interp:s})}verify(t=p.SCRIPT_ENABLE_SIGHASH_FORKID){return!this.checkStr()&&!this.verifyStr(t)}async asyncVerify(t){const e=await this.asyncVerifyStr(t);return!this.checkStr()&&!e}static verify(t,e,r){return new vt(t,e).verify(r)}static asyncVerify(t,e,r){return new vt(t,e).asyncVerify(r)}checkStr(){if(this.tx.txIns.length===0||this.tx.txInsVi.toNumber()===0)return this.errStr="transaction txIns empty",this.errStr;if(this.tx.txOuts.length===0||this.tx.txOutsVi.toNumber()===0)return this.errStr="transaction txOuts empty",this.errStr;if(this.tx.toBuffer().length>Lt.MAX_BLOCK_SIZE)return this.errStr="transaction over the maximum block size",this.errStr;let t=new c(0);for(let r=0;r<this.tx.txOuts.length;r++){const s=this.tx.txOuts[r];if(s.valueBn.lt(0))return this.errStr="transaction txOut "+r+" negative",this.errStr;if(s.valueBn.gt(T.MAX_MONEY))return this.errStr="transaction txOut "+r+" greater than MAX_MONEY",this.errStr;if(t=t.add(s.valueBn),t.gt(T.MAX_MONEY))return this.errStr="transaction txOut "+r+" total output greater than MAX_MONEY",this.errStr}const e={};for(let r=0;r<this.tx.txIns.length;r++){const s=this.tx.txIns[r],n=s.txHashBuf.toString("hex")+":"+s.txOutNum;if(e[n]!==void 0)return this.errStr="transaction input "+r+" duplicate input",this.errStr;e[n]=!0}if(this.tx.isCoinbase()){const r=this.tx.txIns[0].script.toBuffer();if(r.length<2||r.length>100)return this.errStr="coinbase trasaction script size invalid",this.errStr}else for(let r=0;r<this.tx.txIns.length;r++)if(this.tx.txIns[r].hasNullInput())return this.errStr="transaction input "+r+" has null input",this.errStr;return!1}verifyStr(t){for(let e=0;e<this.tx.txIns.length;e++)if(!this.verifyNIn(e,t))return this.errStr="input "+e+" failed script verify",this.errStr;return!1}async asyncVerifyStr(t){for(let e=0;e<this.tx.txIns.length;e++)if(!await this.asyncVerifyNIn(e,t))return this.errStr="input "+e+" failed script verify",this.errStr;return!1}verifyNIn(t,e){const r=this.tx.txIns[t],s=r.script,n=this.txOutMap.get(r.txHashBuf,r.txOutNum);if(!n)return console.log("output "+r.txOutNum+" not found"),!1;const a=n.script,u=n.valueBn;return this.interp=new p,this.interp.verify(s,a,this.tx,t,e,u)}async asyncVerifyNIn(t,e){const r=this.tx.txIns[t],s=r.script,n=this.txOutMap.get(r.txHashBuf,r.txOutNum);if(!n)return console.log("output "+r.txOutNum+" not found"),!1;const a=n.script,u=n.valueBn;this.interp=new p;const h=await B.asyncObjectMethod(this.interp,"verify",[s,a,this.tx,t,e,u]);return JSON.parse(h.resbuf.toString())}getDebugObject(){return{errStr:this.errStr,interpFailure:this.interp?this.interp.getDebugObject():void 0}}getDebugString(){return JSON.stringify(this.getDebugObject(),null,2)}}class G{static{w(this,"Aes")}}G.encrypt=function(i,t){const e=G.buf2Words(t),r=G.buf2Words(i),n=new(D())(e).encrypt(r);return G.words2Buf(n)},G.decrypt=function(i,t){const e=G.buf2Words(i),r=G.buf2Words(t),n=new(D())(r).decrypt(e);return G.words2Buf(n)},G.buf2Words=function(i){if(i.length%4)throw new Error("buf length must be a multiple of 4");const t=[];for(let e=0;e<i.length/4;e++)t.push(i.readUInt32BE(e*4));return t},G.words2Buf=function(i){const t=Buffer.alloc(i.length*4);for(let e=0;e<i.length;e++)t.writeUInt32BE(i[e],e*4);return t};class A{static{w(this,"Cbc")}}A.buf2BlocksBuf=function(i,t){const e=t/8,r=[];for(let s=0;s<=i.length/e;s++){let n=i.slice(s*e,s*e+e);n.length<t&&(n=A.pkcs7Pad(n,t)),r.push(n)}return r},A.blockBufs2Buf=function(i){let t=i[i.length-1];return t=A.pkcs7Unpad(t),i[i.length-1]=t,Buffer.concat(i)},A.encrypt=function(i,t,e,r){const s=t.length*8,n=A.buf2BlocksBuf(i,s),a=A.encryptBlocks(n,t,e,r);return Buffer.concat(a)},A.decrypt=function(i,t,e,r){const s=t.length,n=[];for(let h=0;h<i.length/s;h++)n.push(i.slice(h*s,h*s+s));const a=A.decryptBlocks(n,t,e,r);return A.blockBufs2Buf(a)},A.encryptBlock=function(i,t,e,r){const s=A.xorBufs(i,t);return e.encrypt(s,r)},A.decryptBlock=function(i,t,e,r){const s=e.decrypt(i,r);return A.xorBufs(s,t)},A.encryptBlocks=function(i,t,e,r){const s=[];for(let n=0;n<i.length;n++){const a=i[n],u=A.encryptBlock(a,t,e,r);s.push(u),t=u}return s},A.decryptBlocks=function(i,t,e,r){const s=[];for(let n=0;n<i.length;n++){const a=i[n],u=A.decryptBlock(a,t,e,r);s.push(u),t=a}return s},A.pkcs7Pad=function(i,t){const r=t/8-i.length,s=Buffer.alloc(r);return s.fill(r),Buffer.concat([i,s])},A.pkcs7Unpad=function(i){const t=i[i.length-1],e=i.slice(i.length-t,i.length),r=Buffer.alloc(t);if(r.fill(t),!it(e,r))throw new Error("invalid padding");return i.slice(0,i.length-t)},A.xorBufs=function(i,t){if(i.length!==t.length)throw new Error("bufs must have the same length");const e=Buffer.alloc(i.length);for(let r=0;r<i.length;r++)e[r]=i[r]^t[r];return e};class et{static{w(this,"Aescbc")}}et.encrypt=function(i,t,e,r=!0){e=e||tt.getRandomBuffer(16);const s=A.encrypt(i,e,G,t);return r?Buffer.concat([e,s]):s},et.decrypt=function(i,t,e=!1){if(e){const r=i;return A.decrypt(r,e,G,t)}else{const r=i.slice(0,16),s=i.slice(128/8);return A.decrypt(s,r,G,t)}};class ut{static{w(this,"Ach")}}ut.encrypt=function(i,t,e){const r=et.encrypt(i,t,e),s=d.sha256Hmac(r,t);return Buffer.concat([s,r])},ut.asyncEncrypt=async function(i,t,e){e||(e=tt.getRandomBuffer(16));const r=[i,t,e];return(await B.asyncClassMethod(ut,"encrypt",r)).resbuf},ut.decrypt=function(i,t){if(i.length<64)throw new Error("The encrypted data must be at least 256+128+128 bits, which is the length of the Hmac plus the iv plus the smallest encrypted data size");const e=i.slice(0,256/8);i=i.slice(32,i.length);const r=d.sha256Hmac(i,t);if(!it(e,r))throw new Error("Message authentication failed - Hmacs are not equivalent");return et.decrypt(i,t)},ut.asyncDecrypt=async function(i,t){const e=[i,t];return(await B.asyncClassMethod(ut,"decrypt",e)).resbuf};class Q{static{w(this,"Ecies")}}Q.ivkEkM=function(i,t){const e=i.bn,s=t.point.mul(e),a=new H(s).toBuffer(),u=d.sha512(a);return{iv:u.slice(0,16),kE:u.slice(16,32),kM:u.slice(32,64)}},Q.electrumEncrypt=function(i,t,e,r=!1){if(!Buffer.isBuffer(i))throw new Error("messageBuf must be a buffer");let s;e===null&&(e=M.fromRandom()),r||(s=e.pubKey.toDer(!0));const{iv:n,kE:a,kM:u}=Q.ivkEkM(e.privKey,t),h=et.encrypt(i,a,n,!1),l=Buffer.from("BIE1");let g;s?g=Buffer.concat([l,s,h]):g=Buffer.concat([l,h]);const O=d.sha256Hmac(g,u);return Buffer.concat([g,O])},Q.electrumDecrypt=function(i,t,e=null){if(!Buffer.isBuffer(i))throw new Error("encBuf must be a buffer");const r=32;if(!i.slice(0,4).equals(Buffer.from("BIE1")))throw new Error("Invalid Magic");let n=4;if(e===null){const E=i.slice(4,37);e=H.fromDer(E),n=37}const{iv:a,kE:u,kM:h}=Q.ivkEkM(t,e),l=i.slice(n,i.length-r),g=i.slice(i.length-r,i.length),O=d.sha256Hmac(i.slice(0,i.length-r),h);if(!g.equals(O))throw new Error("Invalid checksum");return et.decrypt(l,u,a)},Q.bitcoreEncrypt=function(i,t,e,r){e||(e=M.fromRandom());const s=e.privKey.bn,a=e.pubKey.toDer(!0),g=t.point.mul(s).getX().toBuffer({size:32}),O=d.sha512(g),E=O.slice(0,32),K=O.slice(32,64),f=et.encrypt(i,E,r),m=d.sha256Hmac(f,K);return Buffer.concat([a,f,m])},Q.asyncBitcoreEncrypt=async function(i,t,e,r){e||(e=await M.asyncFromRandom()),r||(r=tt.getRandomBuffer(16));const s=[i,t,e,r];return(await B.asyncClassMethod(Q,"bitcoreEncrypt",s)).resbuf},Q.bitcoreDecrypt=function(i,t){const e=t.bn,n=H.fromDer(i.slice(0,33)).point.mul(e);if(n.eq(new k))throw new Error("P equals 0");const u=n.getX().toBuffer({size:32}),h=d.sha512(u),l=h.slice(0,32),g=h.slice(32,64),O=i.slice(33,i.length-32),E=i.slice(i.length-32,i.length),K=d.sha256Hmac(O,g);if(!it(E,K))throw new Error("Invalid checksum");return et.decrypt(O,l)},Q.asyncBitcoreDecrypt=async function(i,t){const e=[i,t];return(await B.asyncClassMethod(Q,"bitcoreDecrypt",e)).resbuf};const $t={aes:D(),bnjs:C(),bs58:st(),elliptic:Dt(),hashjs:pt(),pbkdf2:Vt,Buffer:At.Buffer},te=Gt.i8},300:y=>{y.exports=require("buffer")},113:y=>{y.exports=require("crypto")},837:y=>{y.exports=require("util")}},Bt={};function N(y){var L=Bt[y];if(L!==void 0)return L.exports;var x=Bt[y]={id:y,loaded:!1,exports:{}};return wt[y].call(x.exports,x,x.exports,N),x.loaded=!0,x.exports}w(N,"__webpack_require__"),N.m=wt,N.x=()=>{var y=N.O(void 0,[770],()=>N(242));return y=N.O(y),y},(()=>{var y=[];N.O=(L,x,Z,D)=>{if(x){D=D||0;for(var V=y.length;V>0&&y[V-1][2]>D;V--)y[V]=y[V-1];y[V]=[x,Z,D];return}for(var C=1/0,V=0;V<y.length;V++){for(var[x,Z,D]=y[V],rt=!0,st=0;st<x.length;st++)(D&!1||C>=D)&&Object.keys(N.O).every(At=>N.O[At](x[st]))?x.splice(st--,1):(rt=!1,D<C&&(C=D));if(rt){y.splice(V--,1);var xt=Z();xt!==void 0&&(L=xt)}}return L}})(),N.n=y=>{var L=y&&y.__esModule?()=>y.default:()=>y;return N.d(L,{a:L}),L},N.d=(y,L)=>{for(var x in L)N.o(L,x)&&!N.o(y,x)&&Object.defineProperty(y,x,{enumerable:!0,get:L[x]})},N.f={},N.e=y=>Promise.all(Object.keys(N.f).reduce((L,x)=>(N.f[x](y,L),L),[])),N.u=y=>""+y+".module.js",N.o=(y,L)=>Object.prototype.hasOwnProperty.call(y,L),N.r=y=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},N.nmd=y=>(y.paths=[],y.children||(y.children=[]),y),(()=>{var y={179:1};N.O.require=x=>y[x];var L=w(x=>{var Z=x.modules,D=x.ids,V=x.runtime;for(var C in Z)N.o(Z,C)&&(N.m[C]=Z[C]);V&&V(N);for(var rt=0;rt<D.length;rt++)y[D[rt]]=1;N.O()},"installChunk");N.f.require=(x,Z)=>{y[x]||L(require("./"+N.u(x)))}})(),(()=>{var y=N.x;N.x=()=>(N.e(770),y())})();var zt=N.x();module.exports=zt})();
|