@smartledger/bsv 7.8.1 → 7.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +117 -6
  2. package/README.md +38 -38
  3. package/bsv-covenant.min.js +1 -1
  4. package/bsv-ecies.min.js +1 -1
  5. package/bsv-gdaf.min.js +54 -54
  6. package/bsv-ltp.min.js +58 -85
  7. package/bsv-message.min.js +2 -2
  8. package/bsv-mnemonic.min.js +12 -14
  9. package/bsv-script-helper.min.js +1 -1
  10. package/bsv-shamir.min.js +14 -16
  11. package/bsv-smartcontract.min.js +23 -25
  12. package/bsv.bundle.js +54 -54
  13. package/bsv.min.js +54 -54
  14. package/build/esbuild.js +84 -4
  15. package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
  16. package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
  17. package/docs/getting-started/INSTALLATION.md +23 -23
  18. package/docs/getting-started/QUICK_START.md +7 -7
  19. package/docs/migration/FROM_BSV_1_5_6.md +5 -5
  20. package/index.js +9 -1
  21. package/lib/covenant/helpers.js +146 -0
  22. package/lib/covenant/index.js +21 -0
  23. package/lib/covenant/pushtx.js +243 -0
  24. package/lib/covenant-interface.js +408 -397
  25. package/lib/custom-script-helper.js +44 -38
  26. package/lib/ecies/bitcore-ecies.js +3 -4
  27. package/lib/ecies/electrum-ecies.js +4 -6
  28. package/lib/ecies/errors.js +1 -1
  29. package/lib/gdaf/attestation-signer.js +7 -7
  30. package/lib/gdaf/attestation-verifier.js +5 -6
  31. package/lib/gdaf/did-resolver.js +10 -9
  32. package/lib/gdaf/smartledger-anchor.js +13 -12
  33. package/lib/gdaf/zk-prover.js +8 -8
  34. package/lib/ltp/anchor.js +2 -3
  35. package/lib/ltp/claim.js +2 -3
  36. package/lib/ltp/index.js +2 -3
  37. package/lib/ltp/obligation.js +9 -9
  38. package/lib/ltp/proof.js +7 -7
  39. package/lib/ltp/registry.js +4 -5
  40. package/lib/ltp/right.js +11 -11
  41. package/lib/message/index.js +5 -4
  42. package/lib/message/message.js +11 -11
  43. package/lib/mnemonic/errors.js +1 -1
  44. package/lib/mnemonic/index.js +5 -4
  45. package/lib/mnemonic/mnemonic.js +22 -10
  46. package/lib/ordinals/bsv20.js +4 -4
  47. package/lib/ordinals/inscription.js +8 -12
  48. package/lib/ordinals/ordlock.js +26 -21
  49. package/lib/script/interpreter.js +96 -31
  50. package/lib/smart_contract/authorizers.js +8 -6
  51. package/lib/smart_contract/builder.js +32 -26
  52. package/lib/smart_contract/covenant.js +32 -25
  53. package/lib/smart_contract/covenant_helpers.js +8 -128
  54. package/lib/smart_contract/debugger.js +9 -6
  55. package/lib/smart_contract/dsl.js +5 -6
  56. package/lib/smart_contract/index.js +11 -8
  57. package/lib/smart_contract/locks.js +3 -4
  58. package/lib/smart_contract/opcode_list.js +2 -3
  59. package/lib/smart_contract/pels.js +4 -5
  60. package/lib/smart_contract/preimage.js +11 -7
  61. package/lib/smart_contract/pushtx.js +8 -263
  62. package/lib/smart_contract/script_interpreter.js +112 -105
  63. package/lib/smart_contract/script_tester.js +24 -18
  64. package/lib/smart_contract/script_utils.js +15 -14
  65. package/lib/smart_contract/sighash.js +23 -15
  66. package/lib/smart_contract/stack_examiner.js +70 -63
  67. package/lib/smart_contract/token.js +6 -6
  68. package/lib/smart_contract/utxo_generator.js +21 -15
  69. package/lib/smartutxo.js +27 -21
  70. package/lib/spv/headerchain.js +3 -3
  71. package/lib/spv/merkleproof.js +3 -3
  72. package/package.json +4 -2
  73. package/test/script/chronicle.js +53 -10
  74. package/test/script/interpreter.js +9 -6
  75. package/test/script/string_ops.js +26 -10
  76. package/version.js +1 -1
@@ -1,3 +1,3 @@
1
- var bsvMessage=(()=>{var Vr=Object.create;var cr=Object.defineProperty;var Xr=Object.getOwnPropertyDescriptor;var zr=Object.getOwnPropertyNames;var Qr=Object.getPrototypeOf,Zr=Object.prototype.hasOwnProperty;var vr=(e,r,t)=>()=>{if(t)throw t[0];try{return e&&(r=e(e=0)),r}catch(i){throw t=[i],i}};var R=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(t){throw r=0,t}};var rt=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of zr(r))!Zr.call(e,n)&&n!==t&&cr(e,n,{get:()=>r[n],enumerable:!(i=Xr(r,n))||i.enumerable});return e};var sr=(e,r,t)=>(t=e!=null?Vr(Qr(e)):{},rt(r||!e||!e.__esModule?cr(t,"default",{value:e,enumerable:!0}):t,e));var wr=R((Gt,yr)=>{x();var y=yr.exports={},E,I;function X(){throw new Error("setTimeout has not been defined")}function z(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?E=setTimeout:E=X}catch{E=X}try{typeof clearTimeout=="function"?I=clearTimeout:I=z}catch{I=z}})();function ar(e){if(E===setTimeout)return setTimeout(e,0);if((E===X||!E)&&setTimeout)return E=setTimeout,setTimeout(e,0);try{return E(e,0)}catch{try{return E.call(null,e,0)}catch{return E.call(this,e,0)}}}function tt(e){if(I===clearTimeout)return clearTimeout(e);if((I===z||!I)&&clearTimeout)return I=clearTimeout,clearTimeout(e);try{return I(e)}catch{try{return I.call(null,e)}catch{return I.call(this,e)}}}var T=[],P=!1,N,Y=-1;function et(){!P||!N||(P=!1,N.length?T=N.concat(T):Y=-1,T.length&&pr())}function pr(){if(!P){var e=ar(et);P=!0;for(var r=T.length;r;){for(N=T,T=[];++Y<r;)N&&N[Y].run();Y=-1,r=T.length}N=null,P=!1,tt(e)}}y.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];T.push(new lr(e,r)),T.length===1&&!P&&ar(pr)};function lr(e,r){this.fun=e,this.array=r}lr.prototype.run=function(){this.fun.apply(null,this.array)};y.title="browser";y.browser=!0;y.env={};y.argv=[];y.version="";y.versions={};function S(){}y.on=S;y.addListener=S;y.once=S;y.off=S;y.removeListener=S;y.removeAllListeners=S;y.emit=S;y.prependListener=S;y.prependOnceListener=S;y.listeners=function(e){return[]};y.binding=function(e){throw new Error("process.binding is not supported")};y.cwd=function(){return"/"};y.chdir=function(e){throw new Error("process.chdir is not supported")};y.umask=function(){return 0}});var Br=R(J=>{"use strict";x();J.byteLength=nt;J.toByteArray=ut;J.fromByteArray=ct;var F=[],m=[],it=typeof Uint8Array<"u"?Uint8Array:Array,Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(M=0,xr=Q.length;M<xr;++M)F[M]=Q[M],m[Q.charCodeAt(M)]=M;var M,xr;m[45]=62;m[95]=63;function gr(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var i=t===r?0:4-t%4;return[t,i]}function nt(e){var r=gr(e),t=r[0],i=r[1];return(t+i)*3/4-i}function ot(e,r,t){return(r+t)*3/4-t}function ut(e){var r,t=gr(e),i=t[0],n=t[1],o=new it(ot(e,i,n)),u=0,h=n>0?i-4:i,c;for(c=0;c<h;c+=4)r=m[e.charCodeAt(c)]<<18|m[e.charCodeAt(c+1)]<<12|m[e.charCodeAt(c+2)]<<6|m[e.charCodeAt(c+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return n===2&&(r=m[e.charCodeAt(c)]<<2|m[e.charCodeAt(c+1)]>>4,o[u++]=r&255),n===1&&(r=m[e.charCodeAt(c)]<<10|m[e.charCodeAt(c+1)]<<4|m[e.charCodeAt(c+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function ft(e){return F[e>>18&63]+F[e>>12&63]+F[e>>6&63]+F[e&63]}function ht(e,r,t){for(var i,n=[],o=r;o<t;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),n.push(ft(i));return n.join("")}function ct(e){for(var r,t=e.length,i=t%3,n=[],o=16383,u=0,h=t-i;u<h;u+=o)n.push(ht(e,u,u+o>h?h:u+o));return i===1?(r=e[t-1],n.push(F[r>>2]+F[r<<4&63]+"==")):i===2&&(r=(e[t-2]<<8)+e[t-1],n.push(F[r>>10]+F[r>>4&63]+F[r<<2&63]+"=")),n.join("")}});var mr=R(Z=>{x();Z.read=function(e,r,t,i,n){var o,u,h=n*8-i-1,c=(1<<h)-1,p=c>>1,a=-7,s=t?n-1:0,k=t?-1:1,d=e[r+s];for(s+=k,o=d&(1<<-a)-1,d>>=-a,a+=h;a>0;o=o*256+e[r+s],s+=k,a-=8);for(u=o&(1<<-a)-1,o>>=-a,a+=i;a>0;u=u*256+e[r+s],s+=k,a-=8);if(o===0)o=1-p;else{if(o===c)return u?NaN:(d?-1:1)*(1/0);u=u+Math.pow(2,i),o=o-p}return(d?-1:1)*u*Math.pow(2,o-i)};Z.write=function(e,r,t,i,n,o){var u,h,c,p=o*8-n-1,a=(1<<p)-1,s=a>>1,k=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,V=i?1:-1,Kr=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(h=isNaN(r)?1:0,u=a):(u=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-u))<1&&(u--,c*=2),u+s>=1?r+=k/c:r+=k*Math.pow(2,1-s),r*c>=2&&(u++,c/=2),u+s>=a?(h=0,u=a):u+s>=1?(h=(r*c-1)*Math.pow(2,n),u=u+s):(h=r*Math.pow(2,s-1)*Math.pow(2,n),u=0));n>=8;e[t+d]=h&255,d+=V,h/=256,n-=8);for(u=u<<n|h,p+=n;p>0;e[t+d]=u&255,d+=V,u/=256,p-=8);e[t+d-V]|=Kr*128}});var Pr=R(q=>{"use strict";x();var v=Br(),$=mr(),dr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;q.Buffer=f;q.SlowBuffer=wt;q.INSPECT_MAX_BYTES=50;var W=2147483647;q.kMaxLength=W;f.TYPED_ARRAY_SUPPORT=st();!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function st(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}});Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function C(e){if(e>W)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,f.prototype),r}function f(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ir(e)}return Ar(e,r,t)}f.poolSize=8192;function Ar(e,r,t){if(typeof e=="string")return pt(e,r);if(ArrayBuffer.isView(e))return lt(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(A(e,ArrayBuffer)||e&&A(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(A(e,SharedArrayBuffer)||e&&A(e.buffer,SharedArrayBuffer)))return tr(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=e.valueOf&&e.valueOf();if(i!=null&&i!==e)return f.from(i,r,t);let n=yt(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return f.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}f.from=function(e,r,t){return Ar(e,r,t)};Object.setPrototypeOf(f.prototype,Uint8Array.prototype);Object.setPrototypeOf(f,Uint8Array);function Ur(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function at(e,r,t){return Ur(e),e<=0?C(e):r!==void 0?typeof t=="string"?C(e).fill(r,t):C(e).fill(r):C(e)}f.alloc=function(e,r,t){return at(e,r,t)};function ir(e){return Ur(e),C(e<0?0:nr(e)|0)}f.allocUnsafe=function(e){return ir(e)};f.allocUnsafeSlow=function(e){return ir(e)};function pt(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!f.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=Tr(e,r)|0,i=C(t),n=i.write(e,r);return n!==t&&(i=i.slice(0,n)),i}function rr(e){let r=e.length<0?0:nr(e.length)|0,t=C(r);for(let i=0;i<r;i+=1)t[i]=e[i]&255;return t}function lt(e){if(A(e,Uint8Array)){let r=new Uint8Array(e);return tr(r.buffer,r.byteOffset,r.byteLength)}return rr(e)}function tr(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');let i;return r===void 0&&t===void 0?i=new Uint8Array(e):t===void 0?i=new Uint8Array(e,r):i=new Uint8Array(e,r,t),Object.setPrototypeOf(i,f.prototype),i}function yt(e){if(f.isBuffer(e)){let r=nr(e.length)|0,t=C(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||ur(e.length)?C(0):rr(e);if(e.type==="Buffer"&&Array.isArray(e.data))return rr(e.data)}function nr(e){if(e>=W)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+W.toString(16)+" bytes");return e|0}function wt(e){return+e!=e&&(e=0),f.alloc(+e)}f.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==f.prototype};f.compare=function(r,t){if(A(r,Uint8Array)&&(r=f.from(r,r.offset,r.byteLength)),A(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(r)||!f.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let i=r.length,n=t.length;for(let o=0,u=Math.min(i,n);o<u;++o)if(r[o]!==t[o]){i=r[o],n=t[o];break}return i<n?-1:n<i?1:0};f.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};f.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return f.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<r.length;++i)t+=r[i].length;let n=f.allocUnsafe(t),o=0;for(i=0;i<r.length;++i){let u=r[i];if(A(u,Uint8Array))o+u.length>n.length?(f.isBuffer(u)||(u=f.from(u)),u.copy(n,o)):Uint8Array.prototype.set.call(n,u,o);else if(f.isBuffer(u))u.copy(n,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=u.length}return n};function Tr(e,r){if(f.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||A(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let t=e.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let n=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return er(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return kr(e).length;default:if(n)return i?-1:er(e).length;r=(""+r).toLowerCase(),n=!0}}f.byteLength=Tr;function xt(e,r,t){let i=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return Tt(this,r,t);case"utf8":case"utf-8":return Cr(this,r,t);case"ascii":return At(this,r,t);case"latin1":case"binary":return Ut(this,r,t);case"base64":return It(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return St(this,r,t);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}f.prototype._isBuffer=!0;function L(e,r,t){let i=e[r];e[r]=e[t],e[t]=i}f.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)L(this,t,t+1);return this};f.prototype.swap32=function(){let r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)L(this,t,t+3),L(this,t+1,t+2);return this};f.prototype.swap64=function(){let r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)L(this,t,t+7),L(this,t+1,t+6),L(this,t+2,t+5),L(this,t+3,t+4);return this};f.prototype.toString=function(){let r=this.length;return r===0?"":arguments.length===0?Cr(this,0,r):xt.apply(this,arguments)};f.prototype.toLocaleString=f.prototype.toString;f.prototype.equals=function(r){if(!f.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:f.compare(this,r)===0};f.prototype.inspect=function(){let r="",t=q.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};dr&&(f.prototype[dr]=f.prototype.inspect);f.prototype.compare=function(r,t,i,n,o){if(A(r,Uint8Array)&&(r=f.from(r,r.offset,r.byteLength)),!f.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),i===void 0&&(i=r?r.length:0),n===void 0&&(n=0),o===void 0&&(o=this.length),t<0||i>r.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=i)return 0;if(n>=o)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,n>>>=0,o>>>=0,this===r)return 0;let u=o-n,h=i-t,c=Math.min(u,h),p=this.slice(n,o),a=r.slice(t,i);for(let s=0;s<c;++s)if(p[s]!==a[s]){u=p[s],h=a[s];break}return u<h?-1:h<u?1:0};function Sr(e,r,t,i,n){if(e.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,ur(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof r=="string"&&(r=f.from(r,i)),f.isBuffer(r))return r.length===0?-1:Er(e,r,t,i,n);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):Er(e,[r],t,i,n);throw new TypeError("val must be string, number or Buffer")}function Er(e,r,t,i,n){let o=1,u=e.length,h=r.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,u/=2,h/=2,t/=2}function c(a,s){return o===1?a[s]:a.readUInt16BE(s*o)}let p;if(n){let a=-1;for(p=t;p<u;p++)if(c(e,p)===c(r,a===-1?0:p-a)){if(a===-1&&(a=p),p-a+1===h)return a*o}else a!==-1&&(p-=p-a),a=-1}else for(t+h>u&&(t=u-h),p=t;p>=0;p--){let a=!0;for(let s=0;s<h;s++)if(c(e,p+s)!==c(r,s)){a=!1;break}if(a)return p}return-1}f.prototype.includes=function(r,t,i){return this.indexOf(r,t,i)!==-1};f.prototype.indexOf=function(r,t,i){return Sr(this,r,t,i,!0)};f.prototype.lastIndexOf=function(r,t,i){return Sr(this,r,t,i,!1)};function gt(e,r,t,i){t=Number(t)||0;let n=e.length-t;i?(i=Number(i),i>n&&(i=n)):i=n;let o=r.length;i>o/2&&(i=o/2);let u;for(u=0;u<i;++u){let h=parseInt(r.substr(u*2,2),16);if(ur(h))return u;e[t+u]=h}return u}function Bt(e,r,t,i){return j(er(r,e.length-t),e,t,i)}function mt(e,r,t,i){return j(bt(r),e,t,i)}function dt(e,r,t,i){return j(kr(r),e,t,i)}function Et(e,r,t,i){return j(Nt(r,e.length-t),e,t,i)}f.prototype.write=function(r,t,i,n){if(t===void 0)n="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")n=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-t;if((i===void 0||i>o)&&(i=o),r.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let u=!1;for(;;)switch(n){case"hex":return gt(this,r,t,i);case"utf8":case"utf-8":return Bt(this,r,t,i);case"ascii":case"latin1":case"binary":return mt(this,r,t,i);case"base64":return dt(this,r,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Et(this,r,t,i);default:if(u)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function It(e,r,t){return r===0&&t===e.length?v.fromByteArray(e):v.fromByteArray(e.slice(r,t))}function Cr(e,r,t){t=Math.min(e.length,t);let i=[],n=r;for(;n<t;){let o=e[n],u=null,h=o>239?4:o>223?3:o>191?2:1;if(n+h<=t){let c,p,a,s;switch(h){case 1:o<128&&(u=o);break;case 2:c=e[n+1],(c&192)===128&&(s=(o&31)<<6|c&63,s>127&&(u=s));break;case 3:c=e[n+1],p=e[n+2],(c&192)===128&&(p&192)===128&&(s=(o&15)<<12|(c&63)<<6|p&63,s>2047&&(s<55296||s>57343)&&(u=s));break;case 4:c=e[n+1],p=e[n+2],a=e[n+3],(c&192)===128&&(p&192)===128&&(a&192)===128&&(s=(o&15)<<18|(c&63)<<12|(p&63)<<6|a&63,s>65535&&s<1114112&&(u=s))}}u===null?(u=65533,h=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|u&1023),i.push(u),n+=h}return Ft(i)}var Ir=4096;function Ft(e){let r=e.length;if(r<=Ir)return String.fromCharCode.apply(String,e);let t="",i=0;for(;i<r;)t+=String.fromCharCode.apply(String,e.slice(i,i+=Ir));return t}function At(e,r,t){let i="";t=Math.min(e.length,t);for(let n=r;n<t;++n)i+=String.fromCharCode(e[n]&127);return i}function Ut(e,r,t){let i="";t=Math.min(e.length,t);for(let n=r;n<t;++n)i+=String.fromCharCode(e[n]);return i}function Tt(e,r,t){let i=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>i)&&(t=i);let n="";for(let o=r;o<t;++o)n+=Mt[e[o]];return n}function St(e,r,t){let i=e.slice(r,t),n="";for(let o=0;o<i.length-1;o+=2)n+=String.fromCharCode(i[o]+i[o+1]*256);return n}f.prototype.slice=function(r,t){let i=this.length;r=~~r,t=t===void 0?i:~~t,r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<r&&(t=r);let n=this.subarray(r,t);return Object.setPrototypeOf(n,f.prototype),n};function w(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||w(r,t,this.length);let n=this[r],o=1,u=0;for(;++u<t&&(o*=256);)n+=this[r+u]*o;return n};f.prototype.readUintBE=f.prototype.readUIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||w(r,t,this.length);let n=this[r+--t],o=1;for(;t>0&&(o*=256);)n+=this[r+--t]*o;return n};f.prototype.readUint8=f.prototype.readUInt8=function(r,t){return r=r>>>0,t||w(r,1,this.length),this[r]};f.prototype.readUint16LE=f.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||w(r,2,this.length),this[r]|this[r+1]<<8};f.prototype.readUint16BE=f.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||w(r,2,this.length),this[r]<<8|this[r+1]};f.prototype.readUint32LE=f.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||w(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};f.prototype.readUint32BE=f.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||w(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};f.prototype.readBigUInt64LE=b(function(r){r=r>>>0,O(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&H(r,this.length-8);let n=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,o=this[++r]+this[++r]*2**8+this[++r]*2**16+i*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))});f.prototype.readBigUInt64BE=b(function(r){r=r>>>0,O(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&H(r,this.length-8);let n=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],o=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(o)});f.prototype.readIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||w(r,t,this.length);let n=this[r],o=1,u=0;for(;++u<t&&(o*=256);)n+=this[r+u]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n};f.prototype.readIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||w(r,t,this.length);let n=t,o=1,u=this[r+--n];for(;n>0&&(o*=256);)u+=this[r+--n]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*t)),u};f.prototype.readInt8=function(r,t){return r=r>>>0,t||w(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};f.prototype.readInt16LE=function(r,t){r=r>>>0,t||w(r,2,this.length);let i=this[r]|this[r+1]<<8;return i&32768?i|4294901760:i};f.prototype.readInt16BE=function(r,t){r=r>>>0,t||w(r,2,this.length);let i=this[r+1]|this[r]<<8;return i&32768?i|4294901760:i};f.prototype.readInt32LE=function(r,t){return r=r>>>0,t||w(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};f.prototype.readInt32BE=function(r,t){return r=r>>>0,t||w(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};f.prototype.readBigInt64LE=b(function(r){r=r>>>0,O(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&H(r,this.length-8);let n=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)});f.prototype.readBigInt64BE=b(function(r){r=r>>>0,O(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&H(r,this.length-8);let n=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(n)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i)});f.prototype.readFloatLE=function(r,t){return r=r>>>0,t||w(r,4,this.length),$.read(this,r,!0,23,4)};f.prototype.readFloatBE=function(r,t){return r=r>>>0,t||w(r,4,this.length),$.read(this,r,!1,23,4)};f.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||w(r,8,this.length),$.read(this,r,!0,52,8)};f.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||w(r,8,this.length),$.read(this,r,!1,52,8)};function B(e,r,t,i,n,o){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>n||r<o)throw new RangeError('"value" argument is out of bounds');if(t+i>e.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){let h=Math.pow(2,8*i)-1;B(this,r,t,i,h,0)}let o=1,u=0;for(this[t]=r&255;++u<i&&(o*=256);)this[t+u]=r/o&255;return t+i};f.prototype.writeUintBE=f.prototype.writeUIntBE=function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){let h=Math.pow(2,8*i)-1;B(this,r,t,i,h,0)}let o=i-1,u=1;for(this[t+o]=r&255;--o>=0&&(u*=256);)this[t+o]=r/u&255;return t+i};f.prototype.writeUint8=f.prototype.writeUInt8=function(r,t,i){return r=+r,t=t>>>0,i||B(this,r,t,1,255,0),this[t]=r&255,t+1};f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||B(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||B(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||B(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||B(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function Rr(e,r,t,i,n){Lr(r,i,n,e,t,7);let o=Number(r&BigInt(4294967295));e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o;let u=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u,t}function _r(e,r,t,i,n){Lr(r,i,n,e,t,7);let o=Number(r&BigInt(4294967295));e[t+7]=o,o=o>>8,e[t+6]=o,o=o>>8,e[t+5]=o,o=o>>8,e[t+4]=o;let u=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=u,u=u>>8,e[t+2]=u,u=u>>8,e[t+1]=u,u=u>>8,e[t]=u,t+8}f.prototype.writeBigUInt64LE=b(function(r,t=0){return Rr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});f.prototype.writeBigUInt64BE=b(function(r,t=0){return _r(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});f.prototype.writeIntLE=function(r,t,i,n){if(r=+r,t=t>>>0,!n){let c=Math.pow(2,8*i-1);B(this,r,t,i,c-1,-c)}let o=0,u=1,h=0;for(this[t]=r&255;++o<i&&(u*=256);)r<0&&h===0&&this[t+o-1]!==0&&(h=1),this[t+o]=(r/u>>0)-h&255;return t+i};f.prototype.writeIntBE=function(r,t,i,n){if(r=+r,t=t>>>0,!n){let c=Math.pow(2,8*i-1);B(this,r,t,i,c-1,-c)}let o=i-1,u=1,h=0;for(this[t+o]=r&255;--o>=0&&(u*=256);)r<0&&h===0&&this[t+o+1]!==0&&(h=1),this[t+o]=(r/u>>0)-h&255;return t+i};f.prototype.writeInt8=function(r,t,i){return r=+r,t=t>>>0,i||B(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};f.prototype.writeInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||B(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};f.prototype.writeInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||B(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};f.prototype.writeInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||B(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};f.prototype.writeInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||B(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};f.prototype.writeBigInt64LE=b(function(r,t=0){return Rr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});f.prototype.writeBigInt64BE=b(function(r,t=0){return _r(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function br(e,r,t,i,n,o){if(t+i>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Nr(e,r,t,i,n){return r=+r,t=t>>>0,n||br(e,r,t,4,34028234663852886e22,-34028234663852886e22),$.write(e,r,t,i,23,4),t+4}f.prototype.writeFloatLE=function(r,t,i){return Nr(this,r,t,!0,i)};f.prototype.writeFloatBE=function(r,t,i){return Nr(this,r,t,!1,i)};function Mr(e,r,t,i,n){return r=+r,t=t>>>0,n||br(e,r,t,8,17976931348623157e292,-17976931348623157e292),$.write(e,r,t,i,52,8),t+8}f.prototype.writeDoubleLE=function(r,t,i){return Mr(this,r,t,!0,i)};f.prototype.writeDoubleBE=function(r,t,i){return Mr(this,r,t,!1,i)};f.prototype.copy=function(r,t,i,n){if(!f.isBuffer(r))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n<i&&(n=i),n===i||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-t<n-i&&(n=r.length-t+i);let o=n-i;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,n):Uint8Array.prototype.set.call(r,this.subarray(i,n),t),o};f.prototype.fill=function(r,t,i,n){if(typeof r=="string"){if(typeof t=="string"?(n=t,t=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(r.length===1){let u=r.charCodeAt(0);(n==="utf8"&&u<128||n==="latin1")&&(r=u)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,r||(r=0);let o;if(typeof r=="number")for(o=t;o<i;++o)this[o]=r;else{let u=f.isBuffer(r)?r:f.from(r,n),h=u.length;if(h===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(o=0;o<i-t;++o)this[o+t]=u[o%h]}return this};var D={};function or(e,r,t){D[e]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}or("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);or("ERR_INVALID_ARG_TYPE",function(e,r){return`The "${e}" argument must be of type number. Received type ${typeof r}`},TypeError);or("ERR_OUT_OF_RANGE",function(e,r,t){let i=`The value of "${e}" is out of range.`,n=t;return Number.isInteger(t)&&Math.abs(t)>2**32?n=Fr(String(t)):typeof t=="bigint"&&(n=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(n=Fr(n)),n+="n"),i+=` It must be ${r}. Received ${n}`,i},RangeError);function Fr(e){let r="",t=e.length,i=e[0]==="-"?1:0;for(;t>=i+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}function Ct(e,r,t){O(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&H(r,e.length-(t+1))}function Lr(e,r,t,i,n,o){if(e>t||e<r){let u=typeof r=="bigint"?"n":"",h;throw o>3?r===0||r===BigInt(0)?h=`>= 0${u} and < 2${u} ** ${(o+1)*8}${u}`:h=`>= -(2${u} ** ${(o+1)*8-1}${u}) and < 2 ** ${(o+1)*8-1}${u}`:h=`>= ${r}${u} and <= ${t}${u}`,new D.ERR_OUT_OF_RANGE("value",h,e)}Ct(i,n,o)}function O(e,r){if(typeof e!="number")throw new D.ERR_INVALID_ARG_TYPE(r,"number",e)}function H(e,r,t){throw Math.floor(e)!==e?(O(e,t),new D.ERR_OUT_OF_RANGE(t||"offset","an integer",e)):r<0?new D.ERR_BUFFER_OUT_OF_BOUNDS:new D.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${r}`,e)}var Rt=/[^+/0-9A-Za-z-_]/g;function _t(e){if(e=e.split("=")[0],e=e.trim().replace(Rt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function er(e,r){r=r||1/0;let t,i=e.length,n=null,o=[];for(let u=0;u<i;++u){if(t=e.charCodeAt(u),t>55295&&t<57344){if(!n){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(u+1===i){(r-=3)>-1&&o.push(239,191,189);continue}n=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(r-=3)>-1&&o.push(239,191,189);if(n=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function bt(e){let r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function Nt(e,r){let t,i,n,o=[];for(let u=0;u<e.length&&!((r-=2)<0);++u)t=e.charCodeAt(u),i=t>>8,n=t%256,o.push(n),o.push(i);return o}function kr(e){return v.toByteArray(_t(e))}function j(e,r,t,i){let n;for(n=0;n<i&&!(n+t>=r.length||n>=e.length);++n)r[n+t]=e[n];return n}function A(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function ur(e){return e!==e}var Mt=(function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let i=t*16;for(let n=0;n<16;++n)r[i+n]=e[t]+e[n]}return r})();function b(e){return typeof BigInt>"u"?Lt:e}function Lt(){throw new Error("BigInt not supported")}});var _,g,x=vr(()=>{_=sr(wr()),g=sr(Pr())});var fr=R((Qt,Dr)=>{x();Dr.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv});var Hr=R((vt,Gr)=>{"use strict";x();var U=fr(),K=U.deps._,kt=U.PrivateKey,Pt=U.PublicKey,$r=U.Address,Or=U.encoding.BufferWriter,hr=U.crypto.ECDSA,qr=U.crypto.Signature,Dt=U.crypto.Hash.sha256sha256,$t=U.util.js,G=U.util.preconditions,l=function e(r){return this instanceof e?(G.checkArgument(K.isString(r)||g.Buffer.isBuffer(r),"First argument should be a string or Buffer"),K.isString(r)&&(this.messageBuffer=g.Buffer.from(r)),g.Buffer.isBuffer(r)&&(this.messageBuffer=r),this):new e(r)};l.sign=function(e,r){return new l(e).sign(r)};l.verify=function(e,r,t){return new l(e).verify(r,t)};l.MAGIC_BYTES=g.Buffer.from(`Bitcoin Signed Message:
2
- `);l.prototype.magicHash=function(){var r=Or.varintBufNum(l.MAGIC_BYTES.length),t=Or.varintBufNum(this.messageBuffer.length),i=g.Buffer.concat([r,l.MAGIC_BYTES,t,this.messageBuffer]),n=Dt(i);return n};l.prototype._sign=function(r){G.checkArgument(r instanceof kt,"First argument should be an instance of PrivateKey");var t=this.magicHash();return hr.signWithCalcI(t,r)};l.prototype.sign=function(r){var t=this._sign(r);return t.toCompact().toString("base64")};l.prototype._verify=function(r,t){G.checkArgument(r instanceof Pt,"First argument should be an instance of PublicKey"),G.checkArgument(t instanceof qr,"Second argument should be an instance of Signature");var i=this.magicHash(),n=hr.verify(i,t,r);return n||(this.error="The signature was invalid"),n};l.prototype.verify=function(r,t){G.checkArgument(r),G.checkArgument(t&&K.isString(t)),K.isString(r)&&(r=$r.fromString(r));var i=qr.fromCompact(g.Buffer.from(t,"base64")),n=new hr;n.hashbuf=this.magicHash(),n.sig=i;var o=n.toPublicKey(),u=$r.fromPublicKey(o,r.network);return r.toString()!==u.toString()?(this.error="The signature did not match the message digest",!1):this._verify(o,i)};l.fromString=function(e){return new l(e)};l.fromJSON=function(r){return $t.isValidJSON(r)&&(r=JSON.parse(r)),l.fromObject(r)};l.prototype.toObject=function(){return{messageHex:this.messageBuffer.toString("hex")}};l.fromObject=function(e){let r=g.Buffer.from(e.messageHex,"hex");return new l(r)};l.prototype.toJSON=function(){return JSON.stringify(this.toObject())};l.prototype.toString=function(){return this.messageBuffer.toString()};l.prototype.inspect=function(){return"<Message: "+this.toString()+">"};Gr.exports=l});var Wr=R((te,Jr)=>{x();var Yr=fr();Yr.Message=Hr();Jr.exports=Yr.Message});var Ot=R((ie,jr)=>{x();jr.exports=Wr()});return Ot();})();
1
+ var bsvMessage=(()=>{var pt=Object.create;var sr=Object.defineProperty;var yt=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var dt=Object.getPrototypeOf,gt=Object.prototype.hasOwnProperty;var xt=(e,r,t)=>()=>{if(t)throw t[0];try{return e&&(r=e(e=0)),r}catch(i){throw t=[i],i}};var x=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(t){throw r=0,t}};var mt=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of wt(r))!gt.call(e,n)&&n!==t&&sr(e,n,{get:()=>r[n],enumerable:!(i=yt(r,n))||i.enumerable});return e};var hr=(e,r,t)=>(t=e!=null?pt(dt(e)):{},mt(r||!e||!e.__esModule?sr(t,"default",{value:e,enumerable:!0}):t,e));var yr=x((se,pr)=>{l();var g=pr.exports={},A,T;function V(){throw new Error("setTimeout has not been defined")}function X(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?A=setTimeout:A=V}catch{A=V}try{typeof clearTimeout=="function"?T=clearTimeout:T=X}catch{T=X}})();function cr(e){if(A===setTimeout)return setTimeout(e,0);if((A===V||!A)&&setTimeout)return A=setTimeout,setTimeout(e,0);try{return A(e,0)}catch{try{return A.call(null,e,0)}catch{return A.call(this,e,0)}}}function Bt(e){if(T===clearTimeout)return clearTimeout(e);if((T===X||!T)&&clearTimeout)return T=clearTimeout,clearTimeout(e);try{return T(e)}catch{try{return T.call(null,e)}catch{return T.call(this,e)}}}var S=[],D=!1,N,G=-1;function Et(){!D||!N||(D=!1,N.length?S=N.concat(S):G=-1,S.length&&ar())}function ar(){if(!D){var e=cr(Et);D=!0;for(var r=S.length;r;){for(N=S,S=[];++G<r;)N&&N[G].run();G=-1,r=S.length}N=null,D=!1,Bt(e)}}g.nextTick=function(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];S.push(new lr(e,r)),S.length===1&&!D&&cr(ar)};function lr(e,r){this.fun=e,this.array=r}lr.prototype.run=function(){this.fun.apply(null,this.array)};g.title="browser";g.browser=!0;g.env={};g.argv=[];g.version="";g.versions={};function C(){}g.on=C;g.addListener=C;g.once=C;g.off=C;g.removeListener=C;g.removeAllListeners=C;g.emit=C;g.prependListener=C;g.prependOnceListener=C;g.listeners=function(e){return[]};g.binding=function(e){throw new Error("process.binding is not supported")};g.cwd=function(){return"/"};g.chdir=function(e){throw new Error("process.chdir is not supported")};g.umask=function(){return 0}});var gr=x(Y=>{"use strict";l();Y.byteLength=Ft;Y.toByteArray=Tt;Y.fromByteArray=St;var U=[],I=[],It=typeof Uint8Array<"u"?Uint8Array:Array,z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(L=0,wr=z.length;L<wr;++L)U[L]=z[L],I[z.charCodeAt(L)]=L;var L,wr;I[45]=62;I[95]=63;function dr(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var i=t===r?0:4-t%4;return[t,i]}function Ft(e){var r=dr(e),t=r[0],i=r[1];return(t+i)*3/4-i}function At(e,r,t){return(r+t)*3/4-t}function Tt(e){var r,t=dr(e),i=t[0],n=t[1],o=new It(At(e,i,n)),u=0,s=n>0?i-4:i,h;for(h=0;h<s;h+=4)r=I[e.charCodeAt(h)]<<18|I[e.charCodeAt(h+1)]<<12|I[e.charCodeAt(h+2)]<<6|I[e.charCodeAt(h+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=r&255;return n===2&&(r=I[e.charCodeAt(h)]<<2|I[e.charCodeAt(h+1)]>>4,o[u++]=r&255),n===1&&(r=I[e.charCodeAt(h)]<<10|I[e.charCodeAt(h+1)]<<4|I[e.charCodeAt(h+2)]>>2,o[u++]=r>>8&255,o[u++]=r&255),o}function Ut(e){return U[e>>18&63]+U[e>>12&63]+U[e>>6&63]+U[e&63]}function bt(e,r,t){for(var i,n=[],o=r;o<t;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),n.push(Ut(i));return n.join("")}function St(e){for(var r,t=e.length,i=t%3,n=[],o=16383,u=0,s=t-i;u<s;u+=o)n.push(bt(e,u,u+o>s?s:u+o));return i===1?(r=e[t-1],n.push(U[r>>2]+U[r<<4&63]+"==")):i===2&&(r=(e[t-2]<<8)+e[t-1],n.push(U[r>>10]+U[r>>4&63]+U[r<<2&63]+"=")),n.join("")}});var xr=x(Q=>{l();Q.read=function(e,r,t,i,n){var o,u,s=n*8-i-1,h=(1<<s)-1,p=h>>1,a=-7,c=t?n-1:0,k=t?-1:1,F=e[r+c];for(c+=k,o=F&(1<<-a)-1,F>>=-a,a+=s;a>0;o=o*256+e[r+c],c+=k,a-=8);for(u=o&(1<<-a)-1,o>>=-a,a+=i;a>0;u=u*256+e[r+c],c+=k,a-=8);if(o===0)o=1-p;else{if(o===h)return u?NaN:(F?-1:1)*(1/0);u=u+Math.pow(2,i),o=o-p}return(F?-1:1)*u*Math.pow(2,o-i)};Q.write=function(e,r,t,i,n,o){var u,s,h,p=o*8-n-1,a=(1<<p)-1,c=a>>1,k=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,F=i?0:o-1,v=i?1:-1,lt=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,u=a):(u=Math.floor(Math.log(r)/Math.LN2),r*(h=Math.pow(2,-u))<1&&(u--,h*=2),u+c>=1?r+=k/h:r+=k*Math.pow(2,1-c),r*h>=2&&(u++,h/=2),u+c>=a?(s=0,u=a):u+c>=1?(s=(r*h-1)*Math.pow(2,n),u=u+c):(s=r*Math.pow(2,c-1)*Math.pow(2,n),u=0));n>=8;e[t+F]=s&255,F+=v,s/=256,n-=8);for(u=u<<n|s,p+=n;p>0;e[t+F]=u&255,F+=v,u/=256,p-=8);e[t+F-v]|=lt*128}});var kr=x(q=>{"use strict";l();var Z=gr(),O=xr(),mr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;q.Buffer=f;q.SlowBuffer=Mt;q.INSPECT_MAX_BYTES=50;var J=2147483647;q.kMaxLength=J;f.TYPED_ARRAY_SUPPORT=Ct();!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Ct(){try{let e=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(e,r),e.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}});Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function R(e){if(e>J)throw new RangeError('The value "'+e+'" is invalid for option "size"');let r=new Uint8Array(e);return Object.setPrototypeOf(r,f.prototype),r}function f(e,r,t){if(typeof e=="number"){if(typeof r=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ir(e)}return Fr(e,r,t)}f.poolSize=8192;function Fr(e,r,t){if(typeof e=="string")return _t(e,r);if(ArrayBuffer.isView(e))return Nt(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(b(e,ArrayBuffer)||e&&b(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(b(e,SharedArrayBuffer)||e&&b(e.buffer,SharedArrayBuffer)))return tr(e,r,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=e.valueOf&&e.valueOf();if(i!=null&&i!==e)return f.from(i,r,t);let n=Lt(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return f.from(e[Symbol.toPrimitive]("string"),r,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}f.from=function(e,r,t){return Fr(e,r,t)};Object.setPrototypeOf(f.prototype,Uint8Array.prototype);Object.setPrototypeOf(f,Uint8Array);function Ar(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Rt(e,r,t){return Ar(e),e<=0?R(e):r!==void 0?typeof t=="string"?R(e).fill(r,t):R(e).fill(r):R(e)}f.alloc=function(e,r,t){return Rt(e,r,t)};function ir(e){return Ar(e),R(e<0?0:nr(e)|0)}f.allocUnsafe=function(e){return ir(e)};f.allocUnsafeSlow=function(e){return ir(e)};function _t(e,r){if((typeof r!="string"||r==="")&&(r="utf8"),!f.isEncoding(r))throw new TypeError("Unknown encoding: "+r);let t=Tr(e,r)|0,i=R(t),n=i.write(e,r);return n!==t&&(i=i.slice(0,n)),i}function rr(e){let r=e.length<0?0:nr(e.length)|0,t=R(r);for(let i=0;i<r;i+=1)t[i]=e[i]&255;return t}function Nt(e){if(b(e,Uint8Array)){let r=new Uint8Array(e);return tr(r.buffer,r.byteOffset,r.byteLength)}return rr(e)}function tr(e,r,t){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(t||0))throw new RangeError('"length" is outside of buffer bounds');let i;return r===void 0&&t===void 0?i=new Uint8Array(e):t===void 0?i=new Uint8Array(e,r):i=new Uint8Array(e,r,t),Object.setPrototypeOf(i,f.prototype),i}function Lt(e){if(f.isBuffer(e)){let r=nr(e.length)|0,t=R(r);return t.length===0||e.copy(t,0,0,r),t}if(e.length!==void 0)return typeof e.length!="number"||ur(e.length)?R(0):rr(e);if(e.type==="Buffer"&&Array.isArray(e.data))return rr(e.data)}function nr(e){if(e>=J)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+J.toString(16)+" bytes");return e|0}function Mt(e){return+e!=e&&(e=0),f.alloc(+e)}f.isBuffer=function(r){return r!=null&&r._isBuffer===!0&&r!==f.prototype};f.compare=function(r,t){if(b(r,Uint8Array)&&(r=f.from(r,r.offset,r.byteLength)),b(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(r)||!f.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===t)return 0;let i=r.length,n=t.length;for(let o=0,u=Math.min(i,n);o<u;++o)if(r[o]!==t[o]){i=r[o],n=t[o];break}return i<n?-1:n<i?1:0};f.isEncoding=function(r){switch(String(r).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};f.concat=function(r,t){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(r.length===0)return f.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<r.length;++i)t+=r[i].length;let n=f.allocUnsafe(t),o=0;for(i=0;i<r.length;++i){let u=r[i];if(b(u,Uint8Array))o+u.length>n.length?(f.isBuffer(u)||(u=f.from(u)),u.copy(n,o)):Uint8Array.prototype.set.call(n,u,o);else if(f.isBuffer(u))u.copy(n,o);else throw new TypeError('"list" argument must be an Array of Buffers');o+=u.length}return n};function Tr(e,r){if(f.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||b(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let t=e.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let n=!1;for(;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return er(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Mr(e).length;default:if(n)return i?-1:er(e).length;r=(""+r).toLowerCase(),n=!0}}f.byteLength=Tr;function kt(e,r,t){let i=!1;if((r===void 0||r<0)&&(r=0),r>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,r>>>=0,t<=r))return"";for(e||(e="utf8");;)switch(e){case"hex":return Jt(this,r,t);case"utf8":case"utf-8":return br(this,r,t);case"ascii":return Gt(this,r,t);case"latin1":case"binary":return Yt(this,r,t);case"base64":return jt(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt(this,r,t);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}f.prototype._isBuffer=!0;function M(e,r,t){let i=e[r];e[r]=e[t],e[t]=i}f.prototype.swap16=function(){let r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<r;t+=2)M(this,t,t+1);return this};f.prototype.swap32=function(){let r=this.length;if(r%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<r;t+=4)M(this,t,t+3),M(this,t+1,t+2);return this};f.prototype.swap64=function(){let r=this.length;if(r%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<r;t+=8)M(this,t,t+7),M(this,t+1,t+6),M(this,t+2,t+5),M(this,t+3,t+4);return this};f.prototype.toString=function(){let r=this.length;return r===0?"":arguments.length===0?br(this,0,r):kt.apply(this,arguments)};f.prototype.toLocaleString=f.prototype.toString;f.prototype.equals=function(r){if(!f.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:f.compare(this,r)===0};f.prototype.inspect=function(){let r="",t=q.INSPECT_MAX_BYTES;return r=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(r+=" ... "),"<Buffer "+r+">"};mr&&(f.prototype[mr]=f.prototype.inspect);f.prototype.compare=function(r,t,i,n,o){if(b(r,Uint8Array)&&(r=f.from(r,r.offset,r.byteLength)),!f.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(t===void 0&&(t=0),i===void 0&&(i=r?r.length:0),n===void 0&&(n=0),o===void 0&&(o=this.length),t<0||i>r.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=i)return 0;if(n>=o)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,n>>>=0,o>>>=0,this===r)return 0;let u=o-n,s=i-t,h=Math.min(u,s),p=this.slice(n,o),a=r.slice(t,i);for(let c=0;c<h;++c)if(p[c]!==a[c]){u=p[c],s=a[c];break}return u<s?-1:s<u?1:0};function Ur(e,r,t,i,n){if(e.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,ur(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof r=="string"&&(r=f.from(r,i)),f.isBuffer(r))return r.length===0?-1:Br(e,r,t,i,n);if(typeof r=="number")return r=r&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):Br(e,[r],t,i,n);throw new TypeError("val must be string, number or Buffer")}function Br(e,r,t,i,n){let o=1,u=e.length,s=r.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||r.length<2)return-1;o=2,u/=2,s/=2,t/=2}function h(a,c){return o===1?a[c]:a.readUInt16BE(c*o)}let p;if(n){let a=-1;for(p=t;p<u;p++)if(h(e,p)===h(r,a===-1?0:p-a)){if(a===-1&&(a=p),p-a+1===s)return a*o}else a!==-1&&(p-=p-a),a=-1}else for(t+s>u&&(t=u-s),p=t;p>=0;p--){let a=!0;for(let c=0;c<s;c++)if(h(e,p+c)!==h(r,c)){a=!1;break}if(a)return p}return-1}f.prototype.includes=function(r,t,i){return this.indexOf(r,t,i)!==-1};f.prototype.indexOf=function(r,t,i){return Ur(this,r,t,i,!0)};f.prototype.lastIndexOf=function(r,t,i){return Ur(this,r,t,i,!1)};function Dt(e,r,t,i){t=Number(t)||0;let n=e.length-t;i?(i=Number(i),i>n&&(i=n)):i=n;let o=r.length;i>o/2&&(i=o/2);let u;for(u=0;u<i;++u){let s=parseInt(r.substr(u*2,2),16);if(ur(s))return u;e[t+u]=s}return u}function Pt(e,r,t,i){return W(er(r,e.length-t),e,t,i)}function Ot(e,r,t,i){return W(Xt(r),e,t,i)}function $t(e,r,t,i){return W(Mr(r),e,t,i)}function qt(e,r,t,i){return W(zt(r,e.length-t),e,t,i)}f.prototype.write=function(r,t,i,n){if(t===void 0)n="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")n=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let o=this.length-t;if((i===void 0||i>o)&&(i=o),r.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let u=!1;for(;;)switch(n){case"hex":return Dt(this,r,t,i);case"utf8":case"utf-8":return Pt(this,r,t,i);case"ascii":case"latin1":case"binary":return Ot(this,r,t,i);case"base64":return $t(this,r,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qt(this,r,t,i);default:if(u)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),u=!0}};f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function jt(e,r,t){return r===0&&t===e.length?Z.fromByteArray(e):Z.fromByteArray(e.slice(r,t))}function br(e,r,t){t=Math.min(e.length,t);let i=[],n=r;for(;n<t;){let o=e[n],u=null,s=o>239?4:o>223?3:o>191?2:1;if(n+s<=t){let h,p,a,c;switch(s){case 1:o<128&&(u=o);break;case 2:h=e[n+1],(h&192)===128&&(c=(o&31)<<6|h&63,c>127&&(u=c));break;case 3:h=e[n+1],p=e[n+2],(h&192)===128&&(p&192)===128&&(c=(o&15)<<12|(h&63)<<6|p&63,c>2047&&(c<55296||c>57343)&&(u=c));break;case 4:h=e[n+1],p=e[n+2],a=e[n+3],(h&192)===128&&(p&192)===128&&(a&192)===128&&(c=(o&15)<<18|(h&63)<<12|(p&63)<<6|a&63,c>65535&&c<1114112&&(u=c))}}u===null?(u=65533,s=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|u&1023),i.push(u),n+=s}return Ht(i)}var Er=4096;function Ht(e){let r=e.length;if(r<=Er)return String.fromCharCode.apply(String,e);let t="",i=0;for(;i<r;)t+=String.fromCharCode.apply(String,e.slice(i,i+=Er));return t}function Gt(e,r,t){let i="";t=Math.min(e.length,t);for(let n=r;n<t;++n)i+=String.fromCharCode(e[n]&127);return i}function Yt(e,r,t){let i="";t=Math.min(e.length,t);for(let n=r;n<t;++n)i+=String.fromCharCode(e[n]);return i}function Jt(e,r,t){let i=e.length;(!r||r<0)&&(r=0),(!t||t<0||t>i)&&(t=i);let n="";for(let o=r;o<t;++o)n+=Qt[e[o]];return n}function Wt(e,r,t){let i=e.slice(r,t),n="";for(let o=0;o<i.length-1;o+=2)n+=String.fromCharCode(i[o]+i[o+1]*256);return n}f.prototype.slice=function(r,t){let i=this.length;r=~~r,t=t===void 0?i:~~t,r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<r&&(t=r);let n=this.subarray(r,t);return Object.setPrototypeOf(n,f.prototype),n};function B(e,r,t){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+r>t)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||B(r,t,this.length);let n=this[r],o=1,u=0;for(;++u<t&&(o*=256);)n+=this[r+u]*o;return n};f.prototype.readUintBE=f.prototype.readUIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||B(r,t,this.length);let n=this[r+--t],o=1;for(;t>0&&(o*=256);)n+=this[r+--t]*o;return n};f.prototype.readUint8=f.prototype.readUInt8=function(r,t){return r=r>>>0,t||B(r,1,this.length),this[r]};f.prototype.readUint16LE=f.prototype.readUInt16LE=function(r,t){return r=r>>>0,t||B(r,2,this.length),this[r]|this[r+1]<<8};f.prototype.readUint16BE=f.prototype.readUInt16BE=function(r,t){return r=r>>>0,t||B(r,2,this.length),this[r]<<8|this[r+1]};f.prototype.readUint32LE=f.prototype.readUInt32LE=function(r,t){return r=r>>>0,t||B(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+this[r+3]*16777216};f.prototype.readUint32BE=f.prototype.readUInt32BE=function(r,t){return r=r>>>0,t||B(r,4,this.length),this[r]*16777216+(this[r+1]<<16|this[r+2]<<8|this[r+3])};f.prototype.readBigUInt64LE=_(function(r){r=r>>>0,$(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&H(r,this.length-8);let n=t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24,o=this[++r]+this[++r]*2**8+this[++r]*2**16+i*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))});f.prototype.readBigUInt64BE=_(function(r){r=r>>>0,$(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&H(r,this.length-8);let n=t*2**24+this[++r]*2**16+this[++r]*2**8+this[++r],o=this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(o)});f.prototype.readIntLE=function(r,t,i){r=r>>>0,t=t>>>0,i||B(r,t,this.length);let n=this[r],o=1,u=0;for(;++u<t&&(o*=256);)n+=this[r+u]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n};f.prototype.readIntBE=function(r,t,i){r=r>>>0,t=t>>>0,i||B(r,t,this.length);let n=t,o=1,u=this[r+--n];for(;n>0&&(o*=256);)u+=this[r+--n]*o;return o*=128,u>=o&&(u-=Math.pow(2,8*t)),u};f.prototype.readInt8=function(r,t){return r=r>>>0,t||B(r,1,this.length),this[r]&128?(255-this[r]+1)*-1:this[r]};f.prototype.readInt16LE=function(r,t){r=r>>>0,t||B(r,2,this.length);let i=this[r]|this[r+1]<<8;return i&32768?i|4294901760:i};f.prototype.readInt16BE=function(r,t){r=r>>>0,t||B(r,2,this.length);let i=this[r+1]|this[r]<<8;return i&32768?i|4294901760:i};f.prototype.readInt32LE=function(r,t){return r=r>>>0,t||B(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24};f.prototype.readInt32BE=function(r,t){return r=r>>>0,t||B(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]};f.prototype.readBigInt64LE=_(function(r){r=r>>>0,$(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&H(r,this.length-8);let n=this[r+4]+this[r+5]*2**8+this[r+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+this[++r]*2**8+this[++r]*2**16+this[++r]*2**24)});f.prototype.readBigInt64BE=_(function(r){r=r>>>0,$(r,"offset");let t=this[r],i=this[r+7];(t===void 0||i===void 0)&&H(r,this.length-8);let n=(t<<24)+this[++r]*2**16+this[++r]*2**8+this[++r];return(BigInt(n)<<BigInt(32))+BigInt(this[++r]*2**24+this[++r]*2**16+this[++r]*2**8+i)});f.prototype.readFloatLE=function(r,t){return r=r>>>0,t||B(r,4,this.length),O.read(this,r,!0,23,4)};f.prototype.readFloatBE=function(r,t){return r=r>>>0,t||B(r,4,this.length),O.read(this,r,!1,23,4)};f.prototype.readDoubleLE=function(r,t){return r=r>>>0,t||B(r,8,this.length),O.read(this,r,!0,52,8)};f.prototype.readDoubleBE=function(r,t){return r=r>>>0,t||B(r,8,this.length),O.read(this,r,!1,52,8)};function E(e,r,t,i,n,o){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>n||r<o)throw new RangeError('"value" argument is out of bounds');if(t+i>e.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){let s=Math.pow(2,8*i)-1;E(this,r,t,i,s,0)}let o=1,u=0;for(this[t]=r&255;++u<i&&(o*=256);)this[t+u]=r/o&255;return t+i};f.prototype.writeUintBE=f.prototype.writeUIntBE=function(r,t,i,n){if(r=+r,t=t>>>0,i=i>>>0,!n){let s=Math.pow(2,8*i)-1;E(this,r,t,i,s,0)}let o=i-1,u=1;for(this[t+o]=r&255;--o>=0&&(u*=256);)this[t+o]=r/u&255;return t+i};f.prototype.writeUint8=f.prototype.writeUInt8=function(r,t,i){return r=+r,t=t>>>0,i||E(this,r,t,1,255,0),this[t]=r&255,t+1};f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||E(this,r,t,2,65535,0),this[t]=r&255,this[t+1]=r>>>8,t+2};f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||E(this,r,t,2,65535,0),this[t]=r>>>8,this[t+1]=r&255,t+2};f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||E(this,r,t,4,4294967295,0),this[t+3]=r>>>24,this[t+2]=r>>>16,this[t+1]=r>>>8,this[t]=r&255,t+4};f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||E(this,r,t,4,4294967295,0),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};function Sr(e,r,t,i,n){Lr(r,i,n,e,t,7);let o=Number(r&BigInt(4294967295));e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o,o=o>>8,e[t++]=o;let u=Number(r>>BigInt(32)&BigInt(4294967295));return e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u,u=u>>8,e[t++]=u,t}function Cr(e,r,t,i,n){Lr(r,i,n,e,t,7);let o=Number(r&BigInt(4294967295));e[t+7]=o,o=o>>8,e[t+6]=o,o=o>>8,e[t+5]=o,o=o>>8,e[t+4]=o;let u=Number(r>>BigInt(32)&BigInt(4294967295));return e[t+3]=u,u=u>>8,e[t+2]=u,u=u>>8,e[t+1]=u,u=u>>8,e[t]=u,t+8}f.prototype.writeBigUInt64LE=_(function(r,t=0){return Sr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});f.prototype.writeBigUInt64BE=_(function(r,t=0){return Cr(this,r,t,BigInt(0),BigInt("0xffffffffffffffff"))});f.prototype.writeIntLE=function(r,t,i,n){if(r=+r,t=t>>>0,!n){let h=Math.pow(2,8*i-1);E(this,r,t,i,h-1,-h)}let o=0,u=1,s=0;for(this[t]=r&255;++o<i&&(u*=256);)r<0&&s===0&&this[t+o-1]!==0&&(s=1),this[t+o]=(r/u>>0)-s&255;return t+i};f.prototype.writeIntBE=function(r,t,i,n){if(r=+r,t=t>>>0,!n){let h=Math.pow(2,8*i-1);E(this,r,t,i,h-1,-h)}let o=i-1,u=1,s=0;for(this[t+o]=r&255;--o>=0&&(u*=256);)r<0&&s===0&&this[t+o+1]!==0&&(s=1),this[t+o]=(r/u>>0)-s&255;return t+i};f.prototype.writeInt8=function(r,t,i){return r=+r,t=t>>>0,i||E(this,r,t,1,127,-128),r<0&&(r=255+r+1),this[t]=r&255,t+1};f.prototype.writeInt16LE=function(r,t,i){return r=+r,t=t>>>0,i||E(this,r,t,2,32767,-32768),this[t]=r&255,this[t+1]=r>>>8,t+2};f.prototype.writeInt16BE=function(r,t,i){return r=+r,t=t>>>0,i||E(this,r,t,2,32767,-32768),this[t]=r>>>8,this[t+1]=r&255,t+2};f.prototype.writeInt32LE=function(r,t,i){return r=+r,t=t>>>0,i||E(this,r,t,4,2147483647,-2147483648),this[t]=r&255,this[t+1]=r>>>8,this[t+2]=r>>>16,this[t+3]=r>>>24,t+4};f.prototype.writeInt32BE=function(r,t,i){return r=+r,t=t>>>0,i||E(this,r,t,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[t]=r>>>24,this[t+1]=r>>>16,this[t+2]=r>>>8,this[t+3]=r&255,t+4};f.prototype.writeBigInt64LE=_(function(r,t=0){return Sr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});f.prototype.writeBigInt64BE=_(function(r,t=0){return Cr(this,r,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Rr(e,r,t,i,n,o){if(t+i>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function _r(e,r,t,i,n){return r=+r,t=t>>>0,n||Rr(e,r,t,4,34028234663852886e22,-34028234663852886e22),O.write(e,r,t,i,23,4),t+4}f.prototype.writeFloatLE=function(r,t,i){return _r(this,r,t,!0,i)};f.prototype.writeFloatBE=function(r,t,i){return _r(this,r,t,!1,i)};function Nr(e,r,t,i,n){return r=+r,t=t>>>0,n||Rr(e,r,t,8,17976931348623157e292,-17976931348623157e292),O.write(e,r,t,i,52,8),t+8}f.prototype.writeDoubleLE=function(r,t,i){return Nr(this,r,t,!0,i)};f.prototype.writeDoubleBE=function(r,t,i){return Nr(this,r,t,!1,i)};f.prototype.copy=function(r,t,i,n){if(!f.isBuffer(r))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),t>=r.length&&(t=r.length),t||(t=0),n>0&&n<i&&(n=i),n===i||r.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),r.length-t<n-i&&(n=r.length-t+i);let o=n-i;return this===r&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,n):Uint8Array.prototype.set.call(r,this.subarray(i,n),t),o};f.prototype.fill=function(r,t,i,n){if(typeof r=="string"){if(typeof t=="string"?(n=t,t=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(r.length===1){let u=r.charCodeAt(0);(n==="utf8"&&u<128||n==="latin1")&&(r=u)}}else typeof r=="number"?r=r&255:typeof r=="boolean"&&(r=Number(r));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,r||(r=0);let o;if(typeof r=="number")for(o=t;o<i;++o)this[o]=r;else{let u=f.isBuffer(r)?r:f.from(r,n),s=u.length;if(s===0)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(o=0;o<i-t;++o)this[o+t]=u[o%s]}return this};var P={};function or(e,r,t){P[e]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:r.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}or("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);or("ERR_INVALID_ARG_TYPE",function(e,r){return`The "${e}" argument must be of type number. Received type ${typeof r}`},TypeError);or("ERR_OUT_OF_RANGE",function(e,r,t){let i=`The value of "${e}" is out of range.`,n=t;return Number.isInteger(t)&&Math.abs(t)>2**32?n=Ir(String(t)):typeof t=="bigint"&&(n=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(n=Ir(n)),n+="n"),i+=` It must be ${r}. Received ${n}`,i},RangeError);function Ir(e){let r="",t=e.length,i=e[0]==="-"?1:0;for(;t>=i+4;t-=3)r=`_${e.slice(t-3,t)}${r}`;return`${e.slice(0,t)}${r}`}function Kt(e,r,t){$(r,"offset"),(e[r]===void 0||e[r+t]===void 0)&&H(r,e.length-(t+1))}function Lr(e,r,t,i,n,o){if(e>t||e<r){let u=typeof r=="bigint"?"n":"",s;throw o>3?r===0||r===BigInt(0)?s=`>= 0${u} and < 2${u} ** ${(o+1)*8}${u}`:s=`>= -(2${u} ** ${(o+1)*8-1}${u}) and < 2 ** ${(o+1)*8-1}${u}`:s=`>= ${r}${u} and <= ${t}${u}`,new P.ERR_OUT_OF_RANGE("value",s,e)}Kt(i,n,o)}function $(e,r){if(typeof e!="number")throw new P.ERR_INVALID_ARG_TYPE(r,"number",e)}function H(e,r,t){throw Math.floor(e)!==e?($(e,t),new P.ERR_OUT_OF_RANGE(t||"offset","an integer",e)):r<0?new P.ERR_BUFFER_OUT_OF_BOUNDS:new P.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${r}`,e)}var vt=/[^+/0-9A-Za-z-_]/g;function Vt(e){if(e=e.split("=")[0],e=e.trim().replace(vt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function er(e,r){r=r||1/0;let t,i=e.length,n=null,o=[];for(let u=0;u<i;++u){if(t=e.charCodeAt(u),t>55295&&t<57344){if(!n){if(t>56319){(r-=3)>-1&&o.push(239,191,189);continue}else if(u+1===i){(r-=3)>-1&&o.push(239,191,189);continue}n=t;continue}if(t<56320){(r-=3)>-1&&o.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(r-=3)>-1&&o.push(239,191,189);if(n=null,t<128){if((r-=1)<0)break;o.push(t)}else if(t<2048){if((r-=2)<0)break;o.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;o.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;o.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return o}function Xt(e){let r=[];for(let t=0;t<e.length;++t)r.push(e.charCodeAt(t)&255);return r}function zt(e,r){let t,i,n,o=[];for(let u=0;u<e.length&&!((r-=2)<0);++u)t=e.charCodeAt(u),i=t>>8,n=t%256,o.push(n),o.push(i);return o}function Mr(e){return Z.toByteArray(Vt(e))}function W(e,r,t,i){let n;for(n=0;n<i&&!(n+t>=r.length||n>=e.length);++n)r[n+t]=e[n];return n}function b(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function ur(e){return e!==e}var Qt=(function(){let e="0123456789abcdef",r=new Array(256);for(let t=0;t<16;++t){let i=t*16;for(let n=0;n<16;++n)r[i+n]=e[t]+e[n]}return r})();function _(e){return typeof BigInt>"u"?Zt:e}function Zt(){throw new Error("BigInt not supported")}});var m,w,l=xt(()=>{m=hr(yr()),w=hr(kr())});var Pr=x((xe,Dr)=>{l();Dr.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.crypto.Hash});var $r=x((Be,Or)=>{l();Or.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.crypto.Random});var jr=x((Ie,qr)=>{"use strict";l();var re=$r(),y={};y.isArray=e=>Array.isArray(e);y.isNumber=e=>typeof e=="number";y.isObject=e=>e&&typeof e=="object";y.isString=e=>typeof e=="string";y.isUndefined=e=>typeof e>"u";y.isFunction=e=>typeof e=="function";y.isNull=e=>e===null;y.isDate=e=>e instanceof Date;y.extend=(e,r)=>Object.assign(e,r);y.noop=()=>{};y.every=(e,r)=>e.every(r||(t=>t));y.map=(e,r)=>Array.from(e).map(r||(t=>t));y.includes=(e,r)=>e.includes(r);y.each=(e,r)=>e.forEach(r);y.clone=e=>Object.assign({},e);y.pick=(e,r)=>{let t={};return r.forEach(i=>{typeof e[i]<"u"&&(t[i]=e[i])}),t};y.values=e=>Object.values(e);y.filter=(e,r)=>e.filter(r);y.reduce=(e,r,t)=>e.reduce(r,t);y.without=(e,r)=>e.filter(t=>t!==r);y.shuffle=e=>{let r=e.slice(0);for(let t=r.length-1;t>0;t--){let n=re.getRandomBuffer(4).readUInt32BE(0)/4294967296,o=Math.floor(n*(t+1));[r[t],r[o]]=[r[o],r[t]]}return r};y.difference=(e,r)=>e.filter(t=>!r.includes(t));y.findIndex=(e,r)=>e.findIndex(r);y.some=(e,r)=>e.some(r);y.range=e=>[...Array(e).keys()];qr.exports=y});var Gr=x((Ae,Hr)=>{l();Hr.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.PrivateKey});var Jr=x((Ue,Yr)=>{l();Yr.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.PublicKey});var Kr=x((Se,Wr)=>{l();Wr.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.Address});var Vr=x((Re,vr)=>{l();vr.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.encoding.BufferWriter});var zr=x((Ne,Xr)=>{l();Xr.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.crypto.ECDSA});var Zr=x((Me,Qr)=>{l();Qr.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.crypto.Signature});var tt=x((De,rt)=>{l();rt.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.util.js});var it=x((Oe,et)=>{l();et.exports=(typeof globalThis<"u"?globalThis:typeof self<"u"?self:window).bsv.util.preconditions});var st=x((qe,ft)=>{"use strict";l();var te=Pr(),K=jr(),ee=Gr(),ie=Jr(),nt=Kr(),ot=Vr(),fr=zr(),ut=Zr(),ne=te.sha256sha256,oe=tt(),j=it(),d=function e(r){return this instanceof e?(j.checkArgument(K.isString(r)||w.Buffer.isBuffer(r),"First argument should be a string or Buffer"),K.isString(r)&&(this.messageBuffer=w.Buffer.from(r)),w.Buffer.isBuffer(r)&&(this.messageBuffer=r),this):new e(r)};d.sign=function(e,r){return new d(e).sign(r)};d.verify=function(e,r,t){return new d(e).verify(r,t)};d.MAGIC_BYTES=w.Buffer.from(`Bitcoin Signed Message:
2
+ `);d.prototype.magicHash=function(){var r=ot.varintBufNum(d.MAGIC_BYTES.length),t=ot.varintBufNum(this.messageBuffer.length),i=w.Buffer.concat([r,d.MAGIC_BYTES,t,this.messageBuffer]),n=ne(i);return n};d.prototype._sign=function(r){j.checkArgument(r instanceof ee,"First argument should be an instance of PrivateKey");var t=this.magicHash();return fr.signWithCalcI(t,r)};d.prototype.sign=function(r){var t=this._sign(r);return t.toCompact().toString("base64")};d.prototype._verify=function(r,t){j.checkArgument(r instanceof ie,"First argument should be an instance of PublicKey"),j.checkArgument(t instanceof ut,"Second argument should be an instance of Signature");var i=this.magicHash(),n=fr.verify(i,t,r);return n||(this.error="The signature was invalid"),n};d.prototype.verify=function(r,t){j.checkArgument(r),j.checkArgument(t&&K.isString(t)),K.isString(r)&&(r=nt.fromString(r));var i=ut.fromCompact(w.Buffer.from(t,"base64")),n=new fr;n.hashbuf=this.magicHash(),n.sig=i;var o=n.toPublicKey(),u=nt.fromPublicKey(o,r.network);return r.toString()!==u.toString()?(this.error="The signature did not match the message digest",!1):this._verify(o,i)};d.fromString=function(e){return new d(e)};d.fromJSON=function(r){return oe.isValidJSON(r)&&(r=JSON.parse(r)),d.fromObject(r)};d.prototype.toObject=function(){return{messageHex:this.messageBuffer.toString("hex")}};d.fromObject=function(e){let r=w.Buffer.from(e.messageHex,"hex");return new d(r)};d.prototype.toJSON=function(){return JSON.stringify(this.toObject())};d.prototype.toString=function(){return this.messageBuffer.toString()};d.prototype.inspect=function(){return"<Message: "+this.toString()+">"};ft.exports=d});var ct=x((He,ht)=>{l();ht.exports=st()});var ue=x((Ye,at)=>{l();at.exports=ct()});return ue();})();
3
3
  if(typeof module!=="undefined"&&module.exports){module.exports=bsvMessage}else if(typeof define==="function"&&define.amd){define([],function(){return bsvMessage})}