edge-currency-plugins 3.4.1 → 3.4.3

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.
@@ -50,7 +50,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
50
50
  (`+M+": "+E+")",m.name="ChunkLoadError",m.type=M,m.request=E,p[1](m)}};Qt.l(o,l,"chunk-"+S,S)}};var x=(S,y)=>{var[p,I,o]=y,m,l,g=0;if(p.some(E=>fe[E]!==0)){for(m in I)Qt.o(I,m)&&(Qt.m[m]=I[m]);if(o)var M=o(Qt)}for(S&&S(y);g<p.length;g++)l=p[g],Qt.o(fe,l)&&fe[l]&&fe[l][0](),fe[l]=0},T=self.webpackChunkedge_currency_plugins=self.webpackChunkedge_currency_plugins||[];T.forEach(x.bind(null,0)),T.push=x.bind(null,T.push.bind(T))})();var kg={};(()=>{"use strict";function fe(P,B,H,ue,Me,Pe,xe){try{var ke=P[Pe](xe),Se=ke.value}catch(_e){H(_e);return}ke.done?B(Se):Promise.resolve(Se).then(ue,Me)}function x(P){return function(){var B=this,H=arguments;return new Promise(function(ue,Me){var Pe=P.apply(B,H);function xe(Se){fe(Pe,ue,Me,xe,ke,"next",Se)}function ke(Se){fe(Pe,ue,Me,xe,ke,"throw",Se)}xe(void 0)})}}function T(){return T=Object.assign||function(P){for(var B=1;B<arguments.length;B++){var H=arguments[B];for(var ue in H)Object.prototype.hasOwnProperty.call(H,ue)&&(P[ue]=H[ue])}return P},T.apply(this,arguments)}var S=function(B){return new Promise(function(H){setTimeout(H,B)})};function y(P){if(/^\//.test(P))throw new Error("Absolute paths are not supported");for(var B=P.split("/"),H=0,ue=0;H<B.length;){var Me=B[H++];if(Me===".."?ue--:Me!=="."&&Me!==""&&(B[ue++]=Me),ue<0)throw new Error("Path would escape folder")}return B.slice(0,ue).join("/")}function p(P){return P===""?P:P+"/"}function I(P){return P.split(":").slice(1).join(":")}function o(){var P=[],B={},H={enqueue:function(Pe,xe){var ke;xe===void 0&&(xe=Date.now());for(var Se=(ke=B[Pe.key])!=null?ke:xe,_e=P.length-1;_e>=0;){var Ke=P[_e],Ge=B[Ke.key];if(Ge==null)throw new Error("Missing timestamp for item in queue");if(Se>Ge||Se===Ge&&Pe.key>Ke.key)break;--_e}P.splice(_e+1,0,Pe),B[Pe.key]=Se},dequeue:function(){var Pe=P.shift();return Pe!=null&&delete B[Pe.key],Pe},requeue:function(Pe,xe){xe===void 0&&(xe=Date.now()),H.remove(Pe),B[Pe.key]=xe,H.enqueue(Pe)},remove:function(Pe){var xe=ue(Pe);if(xe>=0){var ke=P.splice(xe,1),Se=ke[0];delete B[Se.key]}},list:function(){return P}};return H;function ue(Me){var Pe=B[Me.key],xe=0,ke=P.length-1;if(Pe==null)return-1;for(;xe<=ke;){var Se=xe+ke>>1,_e=P[Se],Ke=B[_e.key];if(Ke==null)throw new Error("Missing timestamp for item in queue");var Ge=Pe-Ke===0?Me.key===_e.key?0:Me.key>_e.key?1:-1:Pe-Ke;if(Ge>0)xe=Se+1;else if(Ge<0)ke=Se-1;else return Se}return-1}}function m(P,B){var H=p(y(B));return{delete:function(Me){return P.delete(H+Me)},getJson:function(Me){return P.getJson(H+Me)},list:function(Me){return Me===void 0&&(Me=""),P.list(H+Me).then(function(Pe){var xe={};for(var ke in Pe)xe[ke.replace(H,"")]=Pe[ke];return xe})},setJson:function(Me,Pe){return P.setJson(H+Me,Pe)},onFlush:P.onFlush,_instanceId:P._instanceId}}var l={maxMemoryUsage:1/0},g={config:T({},l),store:{memoryUsage:0,files:{},errors:{},actions:{}},fileMemoryQueue:o(),actionQueue:o(),nextFlushEvent:void 0},M=100,E=100,d=0,A=/^Cannot load ".+"$|^Cannot read '.+'$/;function v(P){var B=d++,H={delete:function(){var xe=x(function*(Se){var _e=y(Se),Ke=yield j(ue(_e));Ke!=null&&g.fileMemoryQueue.remove(Ke),Pe(ue(_e)),g.nextFlushEvent=e()});function ke(Se){return xe.apply(this,arguments)}return ke}(),list:function(){var xe=x(function*(Se){Se===void 0&&(Se="");var _e=y(Se);return g.actionQueue.list().length>0&&(yield g.nextFlushEvent),yield P.list(_e)});function ke(Se){return xe.apply(this,arguments)}return ke}(),getJson:function(){var xe=x(function*(Se){var _e=y(Se),Ke=ue(_e),Ge=N(Ke);if(Ge!=null)return g.fileMemoryQueue.requeue(Ge),Ge.data;if(g.store.errors[Ke]!=null)throw g.store.errors[Ke];try{var st;if(((st=g.store.actions[Ke])==null?void 0:st.type)==="delete")throw new Error('Cannot load "'+_e+'""');var ct=yield P.getText(_e),xt=JSON.parse(ct),It=yield C(Ke,xt,ct.length);return g.fileMemoryQueue.requeue(It),g.actionQueue.requeue(Y(It.key,"read",x(function*(){g.fileMemoryQueue.requeue(It)}))),xt}catch(Rt){throw(A.test(Rt==null?void 0:Rt.message)||(Rt==null?void 0:Rt.code)==="ENOENT")&&(g.store.errors[Ke]=Rt),Rt}});function ke(Se){return xe.apply(this,arguments)}return ke}(),setJson:function(){var xe=x(function*(Se,_e){var Ke=y(Se),Ge=ue(Ke),st=N(Ge),ct=JSON.stringify(_e);if(st!=null){var xt=st.size;st.data=_e,st.size=ct.length,delete g.store.errors[Ge],g.fileMemoryQueue.remove(st),Me(st);var It=st.size-xt;yield $(It)}else{var Rt=yield C(Ge,_e,ct.length);Me(Rt)}g.nextFlushEvent=e()});function ke(Se,_e){return xe.apply(this,arguments)}return ke}(),onFlush:function*(){for(;;)yield g.nextFlushEvent}(),_instanceId:B};return H;function ue(xe){return B+":"+xe}function Me(xe){g.actionQueue.requeue(Y(xe.key,"write",x(function*(){yield P.setText(I(xe.key),JSON.stringify(xe.data)),g.fileMemoryQueue.requeue(xe)})))}function Pe(xe){g.actionQueue.requeue(Y(xe,"delete",x(function*(){yield P.delete(I(xe))})))}}function b(P){P.maxMemoryUsage!=null&&(P.maxMemoryUsage=P.maxMemoryUsage/2),g.config=T({},g.config,P)}function k(){g.store.memoryUsage=0,g.store.files={},g.fileMemoryQueue=o(),g.actionQueue=o()}function R(){g.config=T({},l),k()}function U(){return g}function C(P,B,H){return L.apply(this,arguments)}function L(){return L=x(function*(P,B,H){var ue={key:P,data:B,size:H};return g.store.files[P]=ue,yield $(ue.size),ue}),L.apply(this,arguments)}function N(P){return g.store.files[P]}function j(P){return K.apply(this,arguments)}function K(){return K=x(function*(P){var B=N(P);return B!=null&&(yield $(-B.size),delete g.store.files[P]),B}),K.apply(this,arguments)}function $(P){return Q.apply(this,arguments)}function Q(){return Q=x(function*(P){if(P!=null&&(g.store.memoryUsage+=P),g.store.memoryUsage>g.config.maxMemoryUsage){var B=g.fileMemoryQueue.dequeue();B!=null&&(yield j(B.key))}}),Q.apply(this,arguments)}function Y(P,B,H){var ue=g.store.actions[P];if(ue!=null)return ue.routine=H,ue;var Me={key:P,type:B,routine:H};return g.store.actions[P]=Me,Me}function ee(){return u.apply(this,arguments)}function u(){return u=x(function*(){for(var P=0;P<M;++P){var B=g.actionQueue.dequeue();if(B==null)break;yield B.routine(),delete g.store.actions[B.key]}yield $(0)}),u.apply(this,arguments)}function e(){return r.apply(this,arguments)}function r(){return r=x(function*(){if(g.nextFlushEvent!=null)return yield g.nextFlushEvent;try{for(;g.actionQueue.list().length>0;)yield S(E),yield ee()}finally{g.nextFlushEvent=void 0}}),r.apply(this,arguments)}function n(P,B){return function(ue){return ue!=null?P(ue):typeof B=="function"?B():B}}function i(){for(var P=arguments.length,B=new Array(P),H=0;H<P;H++)B[H]=arguments[H];return function(Me){for(var Pe=0;Pe<B.length;++Pe)if(Me===B[Pe])return Me;var xe="Expected ";B.length!==1&&(xe+="one of: ");for(var ke=0;ke<B.length;++ke)ke>0&&(xe+=" | "),xe+=JSON.stringify(B[ke]);throw new TypeError(xe)}}function f(P){if(typeof P!="boolean")throw new TypeError("Expected a boolean");return P}function c(P){if(typeof P!="number")throw new TypeError("Expected a number");return P}function h(P){if(typeof P!="string")throw new TypeError("Expected a string");return P}var s=i(null),t=i(void 0);function a(P){return P}var w=n(s);function D(P,B,H){return P instanceof Error&&(P.insertStepAt==null&&(P.message+=" at ",P.insertStepAt=P.message.length),P.message=P.message.slice(0,P.insertStepAt)+B+P.message.slice(P.insertStepAt),P.insertStepAt+=H),P}function Z(P){return function(H){if(!Array.isArray(H))throw new TypeError("Expected an array");for(var ue=[],Me=0;Me<H.length;++Me)try{ue[Me]=P(H[Me])}catch(Pe){throw D(Pe,"["+Me+"]",0)}return ue}}function F(P){if(typeof P=="function")return function(Pe){if(typeof Pe!="object"||Pe==null)throw new TypeError("Expected an object");for(var xe={},ke=Object.keys(Pe),Se=0;Se<ke.length;++Se){var _e=ke[Se];if(_e!=="__proto__")try{xe[_e]=P(Pe[_e])}catch(Ke){throw D(Ke,"["+JSON.stringify(_e)+"]",0)}}return xe};var B=Object.keys(P);function H(Me){return function(xe){if(typeof xe!="object"||xe==null)throw new TypeError("Expected an object");var ke,Se={};if(Me){var _e=Object.keys(xe);for(ke=0;ke<_e.length;++ke){var Ke=_e[ke];Ke!=="__proto__"&&(Se[Ke]=xe[Ke])}}for(ke=0;ke<B.length;++ke){var Ge=B[ke];try{Se[Ge]=P[Ge](xe[Ge])}catch(st){throw D(st,"."+Ge,0)}}return Se}}var ue=H(!1);return ue.shape=P,ue.withRest=H(!0),ue}var V=null;function q(){for(var P=arguments.length,B=new Array(P),H=0;H<P;H++)B[H]=arguments[H];function ue(Me){if(!Array.isArray(Me))throw new TypeError("Expected an array");for(var Pe=[],xe=0;xe<B.length;++xe)try{Pe[xe]=B[xe](Me[xe])}catch(ke){throw D(ke,"["+xe+"]")}return Pe}return ue}function re(){for(var P=arguments.length,B=new Array(P),H=0;H<P;H++)B[H]=arguments[H];return function(Me){for(var Pe=0;Pe<B.length;Pe++)try{return B[Pe](Me)}catch(xe){if(Pe+1>=B.length)throw xe}}}function G(P,B){return function(ue){try{return P(ue)}catch{return typeof B=="function"?B():B}}}function z(P,B){return function(ue){return le[be]>0?B(ue):P(ue)}}function oe(P){return function(H){le[be]==null&&Object.defineProperty(le,be,{value:0,writable:!0});try{return++le[be],P(H)}finally{--le[be]}}}var le=typeof globalThis=="object"&&globalThis!=null?globalThis:JSON,be=typeof Symbol=="function"?Symbol.for("uncleaning"):"uncleaning",ie=z(function(B){if(typeof B!="string"&&!(B instanceof Date))throw new TypeError("Expected a date string");var H=new Date(B);if(H.toJSON()==null)throw new TypeError("Invalid date format");return H},function(B){return B.toISOString()});function J(P){return z(function(H){var ue=JSON.parse(h(H));try{return P(ue)}catch(Me){throw D(Me,"JSON.parse()",11)}},function(H){return JSON.stringify(P(H))})}var ve=Qt(1062),Ve=Qt(6001),he=Qt(852),te=Qt(749),ce=Qt(1948),ge=Qt.n(ce),Oe=Qt(8700);const lt=(P,B)=>P!=null?P[Math.min(B,P.length-1)]:void 0,Le=P=>P!==""?P:void 0;var ze=Qt(8287).Buffer;const Tt=P=>[...P].sort((B,H)=>{const ue=ze.from(B.hash).reverse(),Me=ze.from(H.hash).reverse(),Pe=ue.compare(Me);return Pe!==0?Pe:B.index-H.index}),ae=P=>[...P].sort((B,H)=>B.value===H.value?B.script.compare(H.script):B.value-H.value);var de=Qt(8287);const We="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Ae={q:0,p:1,z:2,r:3,y:4,9:5,x:6,8:7,g:8,f:9,2:10,t:11,v:12,d:13,w:14,0:15,s:16,3:17,j:18,n:19,5:20,4:21,k:22,h:23,c:24,e:25,6:26,m:27,u:28,a:29,7:30,l:31};function Ce(P){let B="";for(let H=0;H<P.length;H++){const ue=P[H];if(ue<0||ue>32)throw new Error(`InvalidArgument: ${ue}`);B+=We[ue]}return B}function ut(P){const B=[];for(let H=0;H<P.length;H++){const ue=P[H];if(!(ue in Ae))throw new Error(`InvalidArgument: ${ue} not in CHARSET_INVERSE_INDEX`);B.push(Ae[ue])}return B}var De=Qt(9404),ye=Qt.n(De);const we=function(P){const B=de.Buffer.alloc(P.length);for(let H=0;H<P.length;H++)B[H]=P[P.length-1-H];return B};ye().Zero=new(ye())(0),ye().One=new(ye())(1),ye().Minus1=new(ye())(-1),ye().fromNumber=function(P){if(typeof P!="number")throw new Error(`InvalidArgument: ${JSON.stringify(P)} not a number`);return new(ye())(P)},ye().fromString=function(P,B){if(typeof P!="string")throw new Error(`InvalidArgument: ${JSON.stringify(P)} not a string`);return new(ye())(P,B)},ye().fromBuffer=function(P,B){B.endian==="little"&&(P=we(P));const H=P.toString("hex");return new(ye())(H,16)},ye().fromSM=function(P,B){var H;let ue;return P.length===0?ye().fromBuffer(de.Buffer.from([0])):(((H=B.endian)!=null?H:"big")==="little"&&(P=we(P)),P[0]&128?(P[0]=P[0]&127,ue=ye().fromBuffer(P),ue.neg().copy(ue)):ue=ye().fromBuffer(P),ue)},ye().prototype.toNumber=function(){return parseInt(this.toString(10),10)},ye().prototype.toBuffer=function(P){let B,H;if(P.size!=null&&P.size>0){H=this.toString(16,2);const ue=H.length/2;B=de.Buffer.from(H,"hex"),ue>P.size?B=ye().trim(B,ue):ue<P.size&&(B=ye().pad(B,ue,P.size))}else H=this.toString(16,2),B=de.Buffer.from(H,"hex");return P.endian==="little"&&(B=we(B)),B},ye().prototype.toSMBigEndian=function(){let P;return this.cmp(ye().Zero)===-1?(P=this.neg().toBuffer(),P[0]&128?P=de.Buffer.concat([de.Buffer.from([128]),P]):P[0]=P[0]|128):(P=this.toBuffer(),P[0]&128&&(P=de.Buffer.concat([de.Buffer.from([0]),P]))),P.length===1&&P[0]===0&&(P=de.Buffer.from([])),P},ye().prototype.toSM=function(P){var B;const H=(B=P.endian)!=null?B:"big";let ue=this.toSMBigEndian();return H==="little"&&(ue=we(ue)),ue},ye().fromScriptNumBuffer=function(P,B,H){const ue=H!=null?H:4;if(P.length>ue)throw new Error("InvalidArgument: script number overflow");if(B&&P.length>0&&!(P[P.length-1]&127)&&(P.length<=1||!(P[P.length-2]&128)))throw new Error("non-minimally encoded script number");return ye().fromSM(P,{endian:"little"})},ye().prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})},ye().prototype.gt=function(P){return this.cmp(P)>0},ye().prototype.gte=function(P){return this.cmp(P)>=0},ye().prototype.lt=function(P){return this.cmp(P)<0},ye().trim=function(P,B){return P.slice(B-P.length,P.length)},ye().pad=function(P,B,H){const ue=de.Buffer.alloc(H);for(let Me=0;Me<P.length;Me++)ue[ue.length-1-Me]=P[P.length-1-Me];for(let Me=0;Me<H-B;Me++)ue[Me]=0;return ue};const me=ye();var Ie=(P=>(P.pubkeyhash="pubkeyhash",P.scripthash="scripthash",P))(Ie||{});const rt=[656907472481,522768456162,0xf33e5fb3c4,748107326120,130178868336].map(P=>new me(P)),Fe=P=>{let B=new me(1);const H=new me(34359738367);for(let ue=0;ue<P.length;ue++){const Me=P[ue],Pe=B.shrn(35);B=B.and(H),B=B.shln(5).xor(new me(Me));for(let xe=0;xe<rt.length;++xe)Pe.shrn(xe).and(me.One).eqn(1)===!0&&(B=B.xor(rt[xe]))}return B.xor(me.One)},He=(P,B,H,ue)=>{ue==null&&(ue=!1);let Me=0,Pe=0;const xe=[],ke=(1<<H)-1;for(let Se=0;Se<P.length;Se++){const _e=P[Se];if(_e<0||_e>>B)throw new Error(`InvalidArgument in function convertBits: ${JSON.stringify(_e)}`);for(Me=Me<<B|_e,Pe+=B;Pe>=H;)Pe-=H,xe.push(Me>>Pe&ke)}if(isNaN(H)||H==null||isNaN(Me)||isNaN(Pe)||isNaN(ke)||ke==null)throw Error(`InvalidArgument in function convertBits: ${H}`);if(!ue)Pe>0&&xe.push(Me<<H-Pe&ke);else if(Pe>=B||Me<<H-Pe&ke)throw new Error("InvalidState: Conversion requires padding but strict mode was used");return xe},yt=P=>{const B=[];for(let H=0;H<P.length;H++)B.push(P.charCodeAt(H)&31);return B},je=(P,B,H,ue=!1)=>{function Me(It){const Rt=[],Dt=new me(31);for(let Jt=0;Jt<8;++Jt)Rt.push(It.and(Dt).toNumber()),It=It.shrn(5);return Rt.reverse()}function Pe(It){switch(It){case"pubkeyhash":return 0;case"scripthash":return 8;default:throw new Error("Invalid type:"+It)}}function xe(It){switch(It.length*8){case 160:return 0;case 192:return 1;case 224:return 2;case 256:return 3;case 320:return 4;case 384:return 5;case 448:return 6;case 512:return 7;default:throw new Error("Invalid hash size:"+It.length.toString())}}const ke=de.Buffer.from(P,"hex"),Se=[0,0,0,0,0,0,0,0],_e=yt(H).concat([0]),Ke=Pe(B)+xe(ke),Ge=Array.prototype.slice.call(ke,0),st=He([Ke].concat(Ge),8,5),ct=_e.concat(st).concat(Se),xt=st.concat(Me(Fe(ct)));return ue?H+":"+Ce(xt):Ce(xt)},Ye=(P,B)=>{function H(It){switch(It&7){case 0:return 160;case 1:return 192;case 2:return 224;case 3:return 256;case 4:return 320;case 5:return 384;case 6:return 448;case 7:return 512;default:return 0}}function ue(It){const Rt=It.toLowerCase(),Dt=It.toUpperCase();return It===Rt||It===Dt}function Me(It,Rt){const Dt=yt(It).concat([0]);return Fe(Dt.concat(Rt)).eqn(0)}if(!ue(P))throw new Error(`InvalidArgument: ${P} has Mixed case`);P=P.toLowerCase();const Pe=P.split(":");if(Pe.length>2)throw new Error(`InvalidArgument: ${P} has invalid format`);let xe,ke;Pe.length===2?(xe=Pe[0],ke=Pe[1]):(xe=null,ke=Pe[0]);const Se=ut(ke.toLowerCase());if(xe!=null){if(!Me(xe,Se))throw new Error(`InvalidArgument: ${P} has invalid checksum`)}else{for(let It=0;It<B.length;++It){const Rt=B[It];if(Me(Rt,Se)){xe=Rt;break}}if(xe==null)throw new Error(`InvalidArgument: ${P} has invalid checksum`)}const _e=He(Se.slice(0,-8),5,8,!0),Ke=_e.shift(),Ge=_e;if(Ke==null)throw new Error("cashaddress converter produced bad version byte");if(H(Ke)!==Ge.length*8)throw new Error(`InvalidArgument: ${P} has invalid hash size`);function st(It){switch(It&120){case 0:return"pubkeyhash";case 8:return"scripthash";default:throw new Error("Invalid address type in version byte: "+It.toString())}}const ct=st(Ke);return{scriptHash:de.Buffer.from(Ge),type:ct}},Pt=[{type:"nativeAmount",key:"satPerByte",displayName:"Satoshis Per Byte",displayMultiplier:"0"}],qe=[{type:"hex",hidden:!0,maxBytes:80,memoName:"OP_RETURN"}],tt={memoMaxLength:80,memoType:"text"};var Gt=Object.defineProperty,et=Object.defineProperties,at=Object.getOwnPropertyDescriptors,er=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,Qe=(P,B,H)=>B in P?Gt(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,Ee=(P,B)=>{for(var H in B||(B={}))ot.call(B,H)&&Qe(P,H,B[H]);if(er)for(var H of er(B))ft.call(B,H)&&Qe(P,H,B[H]);return P},Be=(P,B)=>et(P,at(B));const Lt={currencyInfo:Be(Ee({currencyCode:"BAD",customFeeTemplate:Pt,displayName:"Badcoin",memoOptions:qe,pluginId:"badcoin",walletType:"wallet:badcoin",addressExplorer:"https://www.blockingbad.com/address/%s",blockExplorer:"https://www.blockingbad.com/block/%s",transactionExplorer:"https://www.blockingbad.com/tx/%s",denominations:[{name:"BAD",multiplier:"100000000",symbol:"BAD"},{name:"mBAD",multiplier:"100000",symbol:"mBAD"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:[],enableCustomServers:!1},metaTokens:[]}),engineInfo:{formats:["bip49","bip44","bip32"],gapLimit:10,feeUpdateInterval:6e4,defaultFeeInfo:{lowFeeFudgeFactor:void 0,standardFeeLowFudgeFactor:void 0,standardFeeHighFudgeFactor:void 0,highFeeFudgeFactor:void 0,highFee:"300",lowFee:"100",standardFeeLow:"150",standardFeeHigh:"200",standardFeeLowAmount:"20000000",standardFeeHighAmount:"981000000"}},coinInfo:{name:"badcoin",segwit:!1,coinType:324,prefixes:{messagePrefix:[`Badcoin Signed Message:
51
51
  `,`Bitcoin Signed Message:
52
52
  `],wif:[176,128],legacyXPriv:[113552329,76066276],legacyXPub:[113552328,76067358],pubkeyHash:[28,0],scriptHash:[25,5]}}},Ze=(P,B)=>{const{currencyCode:H,denominations:ue}=P,Me=ue.find(Pe=>Pe.name===H);if(Me==null)throw new Error(`Missing primary currency denomination for ${H}`);return(0,Ve.round)((0,Ve.mul)((0,Ve.div)("1",String(B),16),Me.multiplier),0)};var it=Object.defineProperty,zt=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,Ft=(P,B,H)=>B in P?it(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,Vt=(P,B)=>{for(var H in B||(B={}))bt.call(B,H)&&Ft(P,H,B[H]);if(mt)for(var H of mt(B))Ot.call(B,H)&&Ft(P,H,B[H]);return P},Xt=(P,B)=>zt(P,wt(B));const ar=Xt(Vt({canReplaceByFee:!0,currencyCode:"BTC",customFeeTemplate:Pt,displayName:"Bitcoin",memoOptions:qe,pluginId:"bitcoin",walletType:"wallet:bitcoin",blockExplorer:"https://blockchair.com/bitcoin/block/%s",addressExplorer:"https://blockchair.com/bitcoin/address/%s",transactionExplorer:"https://blockchair.com/bitcoin/transaction/%s",denominations:[{name:"BTC",multiplier:"100000000",symbol:"\u20BF"},{name:"mBTC",multiplier:"100000",symbol:"m\u20BF"},{name:"bits",multiplier:"100",symbol:"\u0180"},{name:"sats",multiplier:"1",symbol:"s"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:["wss://btc1.trezor.io","wss://btc2.trezor.io","wss://btc3.trezor.io","wss://btc4.trezor.io","wss://btc5.trezor.io","wss://btcbook.nownodes.io/wss/%{nowNodesApiKey}"],enableCustomServers:!1},metaTokens:[]}),or={serverConfigs:[{type:"blockbook-nownode",uris:["https://btcbook.nownodes.io"]}],formats:["bip49","bip84","bip44","bip32"],forks:["bitcoincash","bitcoingold"],gapLimit:25,feeUpdateInterval:6e4,mempoolSpaceFeeInfoServer:"https://mempool.space/api/v1/fees/recommended",defaultFeeInfo:{lowFeeFudgeFactor:void 0,standardFeeLowFudgeFactor:void 0,standardFeeHighFudgeFactor:void 0,highFeeFudgeFactor:void 0,highFee:"150",lowFee:"20",standardFeeLow:"50",standardFeeHigh:"100",standardFeeLowAmount:"173200",standardFeeHighAmount:"8670000",maximumFeeRate:Ze(ar,27460.65)}},$t={currencyInfo:ar,engineInfo:or,coinInfo:{name:"bitcoin",segwit:!0,coinType:0,prefixes:{messagePrefix:[`Bitcoin Signed Message:
53
- `],wif:[128],legacyXPriv:[76066276],legacyXPub:[76067358],wrappedSegwitXPriv:[77428856],wrappedSegwitXPub:[77429938],segwitXPriv:[78791436],segwitXPub:[78792518],pubkeyHash:[0],scriptHash:[5],bech32:["bc"]}}},ir="bb",fr="ba",lr="ac",vr="30440220256c12175e809381f97637933ed6ab97737d263eaaebca6add21bced67fd12a402205ce29ecc1369d6fc1b51977ed38faaf41119e3be1d7edfafd7cfaf0b6061bd07",cr="",gr="038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508",mr=P=>{const H=(P.length/2).toString(16);return(H.length%2===0?H:`0${H}`)+P},fn=(P,B,H,ue)=>{const Me=`${mr(ue)}${lr}`;return[`${mr(P)}${mr(B)}${mr(H)}`,Me]},qr={replayProtection:P=>fn(vr,cr,gr,P).join(ir),checkdatasig:(P,B)=>{var H,ue,Me;const Pe=(H=B==null?void 0:B.cdsSig)!=null?H:"",xe=(ue=B==null?void 0:B.cdsMsg)!=null?ue:"",ke=(Me=B==null?void 0:B.cdsPubKey)!=null?Me:"";return fn(Pe,xe,ke,P).join(fr)},checkdatasigverify:(P,B)=>{var H,ue,Me;const Pe=(H=B==null?void 0:B.cdsSig)!=null?H:"",xe=(ue=B==null?void 0:B.cdsMsg)!=null?ue:"",ke=(Me=B==null?void 0:B.cdsPubKey)!=null?Me:"";return fn(Pe,xe,ke,P).join(ir)}};var Cr=Object.defineProperty,wn=Object.defineProperties,Kn=Object.getOwnPropertyDescriptors,Yn=Object.getOwnPropertySymbols,Bn=Object.prototype.hasOwnProperty,jo=Object.prototype.propertyIsEnumerable,fo=(P,B,H)=>B in P?Cr(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,ci=(P,B)=>{for(var H in B||(B={}))Bn.call(B,H)&&fo(P,H,B[H]);if(Yn)for(var H of Yn(B))jo.call(B,H)&&fo(P,H,B[H]);return P},$n=(P,B)=>wn(P,Kn(B));const Rn=$n(ci({currencyCode:"BCH",customFeeTemplate:Pt,displayName:"Bitcoin Cash",memoOptions:qe,pluginId:"bitcoincash",walletType:"wallet:bitcoincash",blockExplorer:"https://blockchair.com/bitcoin-cash/block/%s",addressExplorer:"https://blockchair.com/bitcoin-cash/address/%s",transactionExplorer:"https://blockchair.com/bitcoin-cash/transaction/%s",xpubExplorer:"https://bch1.trezor.io/xpub/%s",denominations:[{name:"BCH",multiplier:"100000000",symbol:"\u20BF"},{name:"mBCH",multiplier:"100000",symbol:"m\u20BF"},{name:"cash",multiplier:"100",symbol:"\u0180"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:["wss://bch1.trezor.io","wss://bch2.trezor.io","wss://bch3.trezor.io","wss://bch4.trezor.io","wss://bch5.trezor.io","wss://bchbook.nownodes.io/wss/%{nowNodesApiKey}"],enableCustomServers:!1},metaTokens:[]}),uo={serverConfigs:[{type:"blockbook-nownode",uris:["https://bchbook.nownodes.io"]}],formats:["bip44","bip32"],forks:[],gapLimit:10,feeUpdateInterval:6e4,defaultFeeInfo:{lowFeeFudgeFactor:void 0,standardFeeLowFudgeFactor:void 0,standardFeeHighFudgeFactor:void 0,highFeeFudgeFactor:void 0,highFee:"20",lowFee:"3",standardFeeLow:"5",standardFeeHigh:"10",standardFeeLowAmount:"1000000",standardFeeHighAmount:"65000000",maximumFeeRate:Ze(Rn,212.86)},scriptTemplates:qr,asBlockbookAddress:z(P=>h(P).split(":")[1],P=>`bitcoincash:${P}`)},Jn={name:"bitcoincash",segwit:!1,sighash:ve.iL.BCH_SIGHASH_ALL,coinType:145,prefixes:{messagePrefix:[`Bitcoin Signed Message:
53
+ `],wif:[128],legacyXPriv:[76066276],legacyXPub:[76067358],wrappedSegwitXPriv:[77428856],wrappedSegwitXPub:[77429938],segwitXPriv:[78791436],segwitXPub:[78792518],pubkeyHash:[0],scriptHash:[5],bech32:["bc"]}}},ir="bb",fr="ba",lr="ac",vr="30440220256c12175e809381f97637933ed6ab97737d263eaaebca6add21bced67fd12a402205ce29ecc1369d6fc1b51977ed38faaf41119e3be1d7edfafd7cfaf0b6061bd07",cr="",gr="038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508",mr=P=>{const H=(P.length/2).toString(16);return(H.length%2===0?H:`0${H}`)+P},fn=(P,B,H,ue)=>{const Me=`${mr(ue)}${lr}`;return[`${mr(P)}${mr(B)}${mr(H)}`,Me]},qr={replayProtection:P=>fn(vr,cr,gr,P).join(ir),checkdatasig:(P,B)=>{var H,ue,Me;const Pe=(H=B==null?void 0:B.cdsSig)!=null?H:"",xe=(ue=B==null?void 0:B.cdsMsg)!=null?ue:"",ke=(Me=B==null?void 0:B.cdsPubKey)!=null?Me:"";return fn(Pe,xe,ke,P).join(fr)},checkdatasigverify:(P,B)=>{var H,ue,Me;const Pe=(H=B==null?void 0:B.cdsSig)!=null?H:"",xe=(ue=B==null?void 0:B.cdsMsg)!=null?ue:"",ke=(Me=B==null?void 0:B.cdsPubKey)!=null?Me:"";return fn(Pe,xe,ke,P).join(ir)}};var Cr=Object.defineProperty,wn=Object.defineProperties,Kn=Object.getOwnPropertyDescriptors,Yn=Object.getOwnPropertySymbols,Bn=Object.prototype.hasOwnProperty,jo=Object.prototype.propertyIsEnumerable,fo=(P,B,H)=>B in P?Cr(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,ci=(P,B)=>{for(var H in B||(B={}))Bn.call(B,H)&&fo(P,H,B[H]);if(Yn)for(var H of Yn(B))jo.call(B,H)&&fo(P,H,B[H]);return P},$n=(P,B)=>wn(P,Kn(B));const Rn=$n(ci({currencyCode:"BCH",customFeeTemplate:Pt,displayName:"Bitcoin Cash",memoOptions:qe,pluginId:"bitcoincash",walletType:"wallet:bitcoincash",blockExplorer:"https://blockchair.com/bitcoin-cash/block/%s",addressExplorer:"https://blockchair.com/bitcoin-cash/address/%s",transactionExplorer:"https://blockchair.com/bitcoin-cash/transaction/%s",denominations:[{name:"BCH",multiplier:"100000000",symbol:"\u20BF"},{name:"mBCH",multiplier:"100000",symbol:"m\u20BF"},{name:"cash",multiplier:"100",symbol:"\u0180"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:["wss://bch1.trezor.io","wss://bch2.trezor.io","wss://bch3.trezor.io","wss://bch4.trezor.io","wss://bch5.trezor.io","wss://bchbook.nownodes.io/wss/%{nowNodesApiKey}"],enableCustomServers:!1},metaTokens:[]}),uo={serverConfigs:[{type:"blockbook-nownode",uris:["https://bchbook.nownodes.io"]}],formats:["bip44","bip32"],forks:[],gapLimit:10,feeUpdateInterval:6e4,defaultFeeInfo:{lowFeeFudgeFactor:void 0,standardFeeLowFudgeFactor:void 0,standardFeeHighFudgeFactor:void 0,highFeeFudgeFactor:void 0,highFee:"20",lowFee:"3",standardFeeLow:"5",standardFeeHigh:"10",standardFeeLowAmount:"1000000",standardFeeHighAmount:"65000000",maximumFeeRate:Ze(Rn,212.86)},scriptTemplates:qr,asBlockbookAddress:z(P=>h(P).split(":")[1],P=>`bitcoincash:${P}`)},Jn={name:"bitcoincash",segwit:!1,sighash:ve.iL.BCH_SIGHASH_ALL,coinType:145,prefixes:{messagePrefix:[`Bitcoin Signed Message:
54
54
  `],wif:[128],legacyXPriv:[76066276],legacyXPub:[76067358],pubkeyHash:[0],scriptHash:[5],cashaddr:["bitcoincash"]}},hi={currencyInfo:Rn,engineInfo:uo,coinInfo:Jn};var Qn=Object.defineProperty,lo=Object.defineProperties,vn=Object.getOwnPropertyDescriptors,In=Object.getOwnPropertySymbols,Li=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,Yr=(P,B,H)=>B in P?Qn(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,Tr=(P,B)=>{for(var H in B||(B={}))Li.call(B,H)&&Yr(P,H,B[H]);if(In)for(var H of In(B))en.call(B,H)&&Yr(P,H,B[H]);return P},Cn=(P,B)=>lo(P,vn(B));const mn=Cn(Tr({currencyCode:"TBCH",displayName:"Bitcoin Cash",memoOptions:qe,customFeeTemplate:Pt,pluginId:"bitcoincashtestnet",walletType:"wallet:bitcoincashtestnet",blockExplorer:"https://blockchair.com/bitcoin-cash/block/%s",addressExplorer:"https://blockchair.com/bitcoin-cash/address/%s",transactionExplorer:"https://blockchair.com/bitcoin-cash/transaction/%s",xpubExplorer:"https://blockchair.com/bitcoin-cash/xpub/%s",denominations:[{name:"TBCH",multiplier:"100000000",symbol:"\u20BF"},{name:"mTBCH",multiplier:"100000",symbol:"m\u20BF"},{name:"cash",multiplier:"100",symbol:"\u0180"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:[],enableCustomServers:!1},metaTokens:[]}),Xr={formats:["bip44","bip32"],forks:["bitcoinsv"],gapLimit:10,feeUpdateInterval:6e4,defaultFeeInfo:{lowFeeFudgeFactor:void 0,standardFeeLowFudgeFactor:void 0,standardFeeHighFudgeFactor:void 0,highFeeFudgeFactor:void 0,highFee:"20",lowFee:"3",standardFeeLow:"5",standardFeeHigh:"10",standardFeeLowAmount:"1000000",standardFeeHighAmount:"65000000"},scriptTemplates:qr},$r={name:"bitcoincashtestnet",segwit:!1,sighash:ve.iL.BCH_SIGHASH_ALL,coinType:1,prefixes:{messagePrefix:[`Bitcoin Signed Message:
55
55
  `],wif:[239],legacyXPriv:[70615956],legacyXPub:[70617039],pubkeyHash:[111],scriptHash:[196],cashaddr:["bchtest"]}},co={currencyInfo:mn,engineInfo:Xr,coinInfo:$r};var ei=Object.defineProperty,Wo=Object.defineProperties,Pr=Object.getOwnPropertyDescriptors,Fn=Object.getOwnPropertySymbols,ho=Object.prototype.hasOwnProperty,Go=Object.prototype.propertyIsEnumerable,Vo=(P,B,H)=>B in P?ei(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,po=(P,B)=>{for(var H in B||(B={}))ho.call(B,H)&&Vo(P,H,B[H]);if(Fn)for(var H of Fn(B))Go.call(B,H)&&Vo(P,H,B[H]);return P},La=(P,B)=>Wo(P,Pr(B));const qo=La(po({currencyCode:"BTG",customFeeTemplate:Pt,displayName:"Bitcoin Gold",memoOptions:qe,pluginId:"bitcoingold",walletType:"wallet:bitcoingold",addressExplorer:"https://explorer.bitcoingold.org/insight/address/%s",blockExplorer:"https://explorer.bitcoingold.org/insight/block/%s",transactionExplorer:"https://explorer.bitcoingold.org/insight/tx/%s",denominations:[{name:"BTG",multiplier:"100000000",symbol:"\u20BF"},{name:"mBTG",multiplier:"100000",symbol:"m\u20BF"},{name:"bits",multiplier:"100",symbol:"\u0180"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:["wss://btg1.trezor.io","wss://btg2.trezor.io","wss://btg3.trezor.io","wss://btg4.trezor.io","wss://btg5.trezor.io"],enableCustomServers:!1},metaTokens:[]}),Di={formats:["bip49","bip84","bip44","bip32"],gapLimit:10,feeUpdateInterval:6e4,defaultFeeInfo:{lowFeeFudgeFactor:void 0,standardFeeLowFudgeFactor:void 0,standardFeeHighFudgeFactor:void 0,highFeeFudgeFactor:void 0,highFee:"200",lowFee:"10",standardFeeLow:"15",standardFeeHigh:"140",standardFeeLowAmount:"17320",standardFeeHighAmount:"86700000",maximumFeeRate:Ze(qo,12.62)}},di={name:"bitcoingold",segwit:!0,sighash:ve.iL.BTG_SIGHASH_ALL,coinType:156,prefixes:{messagePrefix:[`Bitcoin Gold Signed Message:
56
56
  `],wif:[128],legacyXPriv:[76066276],legacyXPub:[76067358],wrappedSegwitXPriv:[77428856],wrappedSegwitXPub:[77429938],segwitXPriv:[78791436],segwitXPub:[78792518],pubkeyHash:[38],scriptHash:[23],bech32:["btg"]}},Xo={currencyInfo:qo,engineInfo:Di,coinInfo:di};var Da=Object.defineProperty,zf=Object.defineProperties,Nr=Object.getOwnPropertyDescriptors,vo=Object.getOwnPropertySymbols,Kf=Object.prototype.hasOwnProperty,pi=Object.prototype.propertyIsEnumerable,Zo=(P,B,H)=>B in P?Da(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,jf=(P,B)=>{for(var H in B||(B={}))Kf.call(B,H)&&Zo(P,H,B[H]);if(vo)for(var H of vo(B))pi.call(B,H)&&Zo(P,H,B[H]);return P},Wf=(P,B)=>zf(P,Nr(B));const Gf=Wf(jf({currencyCode:"TBTG",customFeeTemplate:Pt,displayName:"Bitcoin Gold",memoOptions:qe,pluginId:"bitcoingoldtestnet",walletType:"wallet:bitcoingoldtestnet",addressExplorer:"https://explorer.bitcoingold.org/insight/address/%s",blockExplorer:"https://explorer.bitcoingold.org/insight/block/%s",transactionExplorer:"https://explorer.bitcoingold.org/insight/tx/%s",denominations:[{name:"TBTG",multiplier:"100000000",symbol:"\u20BF"},{name:"mTBTG",multiplier:"100000",symbol:"m\u20BF"},{name:"bits",multiplier:"100",symbol:"\u0180"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:[],enableCustomServers:!1},metaTokens:[]}),Vf={formats:["bip49","bip84","bip44","bip32"],gapLimit:10,feeUpdateInterval:6e4,defaultFeeInfo:{lowFeeFudgeFactor:void 0,standardFeeLowFudgeFactor:void 0,standardFeeHighFudgeFactor:void 0,highFeeFudgeFactor:void 0,highFee:"200",lowFee:"10",standardFeeLow:"15",standardFeeHigh:"140",standardFeeLowAmount:"17320",standardFeeHighAmount:"86700000"}},Ua={name:"bitcoingoldtestnet",segwit:!0,sighash:ve.iL.BTG_SIGHASH_ALL,coinType:1,prefixes:{messagePrefix:[`Bitcoin Gold Signed Message:
@@ -23,7 +23,6 @@ const currencyInfo = {
23
23
  blockExplorer: 'https://blockchair.com/bitcoin-cash/block/%s',
24
24
  addressExplorer: 'https://blockchair.com/bitcoin-cash/address/%s',
25
25
  transactionExplorer: 'https://blockchair.com/bitcoin-cash/transaction/%s',
26
- xpubExplorer: 'https://bch1.trezor.io/xpub/%s',
27
26
 
28
27
  denominations: [
29
28
  { name: 'BCH', multiplier: '100000000', symbol: '₿' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edge-currency-plugins",
3
- "version": "3.4.1",
3
+ "version": "3.4.3",
4
4
  "description": "Edge currency plugins to fetch and process wallet accounts, balances and transactions.",
5
5
  "homepage": "https://edge.app/",
6
6
  "repository": "https://github.com/EdgeApp/edge-currency-plugins",