edge-currency-plugins 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -57,7 +57,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
57
57
|
`],wif:[239],legacyXPriv:[70615956],legacyXPub:[70617039],wrappedSegwitXPriv:[71978536],wrappedSegwitXPub:[71979618],segwitXPriv:[73341116],segwitXPub:[73342198],pubkeyHash:[111],scriptHash:[196],bech32:["btg"]}},qf={currencyInfo:Gf,engineInfo:Vf,coinInfo:Ua};var Xf=Object.defineProperty,Zf=Object.defineProperties,Ha=Object.getOwnPropertyDescriptors,vi=Object.getOwnPropertySymbols,za=Object.prototype.hasOwnProperty,Ui=Object.prototype.propertyIsEnumerable,Ka=(P,B,H)=>B in P?Xf(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,Yf=(P,B)=>{for(var H in B||(B={}))za.call(B,H)&&Ka(P,H,B[H]);if(vi)for(var H of vi(B))Ui.call(B,H)&&Ka(P,H,B[H]);return P},$f=(P,B)=>Zf(P,Ha(B));const Yo=$f(Yf({currencyCode:"BSV",customFeeTemplate:Pt,displayName:"Bitcoin SV",memoOptions:qe,pluginId:"bitcoinsv",walletType:"wallet:bitcoinsv",blockExplorer:"https://whatsonchain.com/block/%s",addressExplorer:"https://whatsonchain.com/address/%s",transactionExplorer:"https://whatsonchain.com/tx/%s",denominations:[{name:"BSV",multiplier:"100000000",symbol:"\u20BF"},{name:"mBSV",multiplier:"100000",symbol:"m\u20BF"},{name:"cash",multiplier:"100",symbol:"\u0180"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:["wss://blockbook.siftbitcoin.com:9146"],enableCustomServers:!1},metaTokens:[]}),$o={formats:["bip44","bip32"],uriPrefix:"bitcoin",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(Yo,33.61)},asBlockbookAddress:z(P=>{const B=h(P);try{const H=B.replace("bitcoincash:",""),ue=Ue({address:H,coin:"bitcoincash"});return Je({scriptPubkey:ue,coin:"bitcoinsv",addressType:_i.p2pkh}).address}catch{return B}},P=>P)},ja={name:"bitcoinsv",segwit:!1,sighash:ve.iL.BCH_SIGHASH_ALL,coinType:236,prefixes:{messagePrefix:[`Bitcoin Signed Message:
|
|
58
58
|
`],wif:[128],legacyXPriv:[76066276],legacyXPub:[76067358],pubkeyHash:[0],scriptHash:[5]}},Jf={currencyInfo:Yo,engineInfo:$o,coinInfo:ja};var Wa=Object.defineProperty,Ga=Object.defineProperties,Va=Object.getOwnPropertyDescriptors,mi=Object.getOwnPropertySymbols,mo=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,qa=(P,B,H)=>B in P?Wa(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,Xa=(P,B)=>{for(var H in B||(B={}))mo.call(B,H)&&qa(P,H,B[H]);if(mi)for(var H of mi(B))Nn.call(B,H)&&qa(P,H,B[H]);return P},Qf=(P,B)=>Ga(P,Va(B));const gi={currencyInfo:Qf(Xa({canReplaceByFee:!0,currencyCode:"TESTBTC",customFeeTemplate:Pt,displayName:"Bitcoin Testnet",memoOptions:qe,pluginId:"bitcointestnet",walletType:"wallet:bitcointestnet",blockExplorer:"https://blockchair.com/bitcoin/testnet/block/%s",addressExplorer:"https://blockchair.com/bitcoin/testnet/address/%s",transactionExplorer:"https://blockchair.com/bitcoin/testnet/transaction/%s",denominations:[{name:"TESTBTC",multiplier:"100000000",symbol:"\u20BF"},{name:"mTESTBTC",multiplier:"100000",symbol:"m\u20BF"},{name:"bits",multiplier:"100",symbol:"\u0180"},{name:"sats",multiplier:"1",symbol:"s"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:["wss://tbtc1.trezor.io","wss://tbtc2.trezor.io"],enableCustomServers:!1},metaTokens:[]}),engineInfo:{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"}},coinInfo:{name:"bitcointestnet",segwit:!0,coinType:1,prefixes:{messagePrefix:[`Bitcoin Signed Message:
|
|
59
59
|
`],wif:[239],legacyXPriv:[70615956],legacyXPub:[70617039],wrappedSegwitXPriv:[71978536],wrappedSegwitXPub:[71979618],segwitXPriv:[73341116],segwitXPub:[73342198],pubkeyHash:[111],scriptHash:[196],bech32:["tb"]}}};var Jo=Object.defineProperty,tu=Object.defineProperties,Za=Object.getOwnPropertyDescriptors,yo=Object.getOwnPropertySymbols,Ya=Object.prototype.hasOwnProperty,$a=Object.prototype.propertyIsEnumerable,Ja=(P,B,H)=>B in P?Jo(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,ru=(P,B)=>{for(var H in B||(B={}))Ya.call(B,H)&&Ja(P,H,B[H]);if(yo)for(var H of yo(B))$a.call(B,H)&&Ja(P,H,B[H]);return P},Zr=(P,B)=>tu(P,Za(B));const Qo=Zr(ru({currencyCode:"DASH",customFeeTemplate:Pt,displayName:"Dash",memoOptions:qe,pluginId:"dash",walletType:"wallet:dash",addressExplorer:"https://blockchair.com/dash/address/%s?from=edgeapp",blockExplorer:"https://blockchair.com/dash/block/%s?from=edgeapp",transactionExplorer:"https://blockchair.com/dash/transaction/%s?from=edgeapp",denominations:[{name:"DASH",multiplier:"100000000",symbol:"\xD0"},{name:"mDASH",multiplier:"100000",symbol:"m\xD0"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:["wss://dash1.trezor.io","wss://dash2.trezor.io","wss://dash3.trezor.io","wss://dash4.trezor.io","wss://dash5.trezor.io","wss://dash.nownodes.io/wss/%{nowNodesApiKey}"],enableCustomServers:!1},metaTokens:[]}),nu={serverConfigs:[{type:"blockbook-nownode",uris:["https://dashbook.nownodes.io"]}],formats:["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",maximumFeeRate:Ze(Qo,25.8)},txSpecificHandling:(P,B)=>{const H=F({instantlock:n(f)}),ue=G(H)(B);return(ue==null?void 0:ue.instantlock)===!0&&(P.confirmations="confirmed"),P}},ti={currencyInfo:Qo,engineInfo:nu,coinInfo:{name:"dash",segwit:!1,coinType:5,prefixes:{messagePrefix:["unused"],wif:[204],legacyXPriv:[50221816],legacyXPub:[50221772],pubkeyHash:[76],scriptHash:[16]}}};var Qa=Object.defineProperty,bo=Object.defineProperties,xn=Object.getOwnPropertyDescriptors,wo=Object.getOwnPropertySymbols,zi=Object.prototype.hasOwnProperty,iu=Object.prototype.propertyIsEnumerable,es=(P,B,H)=>B in P?Qa(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,Ln=(P,B)=>{for(var H in B||(B={}))zi.call(B,H)&&es(P,H,B[H]);if(wo)for(var H of wo(B))iu.call(B,H)&&es(P,H,B[H]);return P},ou=(P,B)=>bo(P,xn(B));const bi=ou(Ln({currencyCode:"DGB",customFeeTemplate:Pt,displayName:"DigiByte",memoOptions:qe,pluginId:"digibyte",walletType:"wallet:digibyte",addressExplorer:"https://digiexplorer.info/address/%s",blockExplorer:"https://digiexplorer.info/block/%s",transactionExplorer:"https://digiexplorer.info/tx/%s",denominations:[{name:"DGB",multiplier:"100000000",symbol:"\u018A"},{name:"mDGB",multiplier:"100000",symbol:"m\u018A"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:["wss://dgb1.trezor.io","wss://dgb2.trezor.io","wss://dgbbook.nownodes.io/wss/%{nowNodesApiKey}"],enableCustomServers:!1},metaTokens:[]}),ts={serverConfigs:[{type:"blockbook-nownode",uris:["https://dgbbook.nownodes.io"]}],formats:["bip49","bip84","bip44","bip32"],forks:[],gapLimit:10,feeUpdateInterval:6e4,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(bi,.006176)}},xo={currencyInfo:bi,engineInfo:ts,coinInfo:{name:"digibyte",segwit:!0,coinType:20,prefixes:{messagePrefix:[`Digibyte Signed Message:
|
|
60
|
-
`],wif:[128,158],legacyXPriv:[76066276],legacyXPub:[76067358],wrappedSegwitXPriv:[77428856],wrappedSegwitXPub:[77429938],segwitXPriv:[78791436],segwitXPub:[78792518],pubkeyHash:[30],scriptHash:[63,5],bech32:["dgb"]}}};var Ki=Qt(8287).Buffer;const rs=4,Mo=1,ns=72,au=33,su=22,fu=36,uu=4,ji=P=>P<253?1:P<=65535?3:P<=4294967295?5:9,Mn=P=>ji(P)+P,wi=(()=>{const P=Mn(Mo+ns+Mo+au),B=(P+ji(1))/rs,H=Mn(su),ue=B+H;return{p2pkh:P,p2wpkh:B,p2wpkhp2sh:ue,replayprotection:284,replayprotectionp2sh:284}})();function Eo(P){const B=wi[P.scriptType];if(B==null)throw new Error(`${P.scriptType} script type not supported, yet`);return fu+B+uu}function xi(P){const H=ji(P.script.length),ue=P.script.length;return 8+H+ue}function is(P,B){return xi(P)*B}function Wi(P){return P.reduce((B,H)=>((H.scriptType===gn.p2wsh||H.scriptType===gn.p2wpkhp2sh||H.scriptType===gn.p2wpkh)&&B++,B),0)}function ri(P,B){const ue=ji(P.length),Me=ji(B.length);let xe=4+ue+Me+4;Wi(P)>0&&(xe+=Math.ceil(2/rs));const Se=P.reduce((Ke,Ge)=>Ke+Eo(Ge),0),_e=B.reduce((Ke,Ge)=>Ke+xi(Ge),0);return xe+Se+_e}const Gi=P=>ve.ZX.fromHex(P).virtualSize();function Jr(P){return isFinite(P)?Math.floor(P)!==P?NaN:P<0?NaN:P:NaN}function ea(P){return P.reduce((B,H)=>B+(isFinite(H.value)?H.value:0),0)}function cn(P){return P.reduce((B,H)=>B+Jr(H.value),0)}function Mi(P,B,H,ue){const Me=cn(P),Pe=cn(B);let xe=ri(P,B),ke=Math.ceil(H*xe);const Se=Me-(Pe+ke),_e={script:Ki.from(ue,"hex"),scriptPubkey:Ki.from(ue,"hex"),value:Se},Ke=xi(_e);xe+=Ke;const Ge=H*Ke;_e.value-=Ge;let st=!1;return _e.value>is(_e,H)?(B.push(_e),ke+=Ge,st=!0):ke+=Se,{inputs:P,outputs:B,changeUsed:st,fee:ke}}var ta=Qt(8287).Buffer,os=Object.defineProperty,as=Object.defineProperties,ss=Object.getOwnPropertyDescriptors,ra=Object.getOwnPropertySymbols,lu=Object.prototype.hasOwnProperty,fs=Object.prototype.propertyIsEnumerable,us=(P,B,H)=>B in P?os(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,cu=(P,B)=>{for(var H in B||(B={}))lu.call(B,H)&&us(P,H,B[H]);if(ra)for(var H of ra(B))fs.call(B,H)&&us(P,H,B[H]);return P},hu=(P,B)=>as(P,ss(B));function ls(P){const{utxos:B,targets:H,feeRate:ue,changeScript:Me}=P;if(!isFinite(Jr(ue)))throw new Error("No rate provided");const Pe=H.map(_e=>hu(cu({},_e),{script:ta.from(_e.script,"hex"),scriptPubkey:ta.from(_e.script,"hex")}));let xe=0;const ke=[],Se=cn(H);for(let _e=0;_e<B.length;++_e){const Ke=B[_e];if(ue*Eo(Ke)>Ke.value){if(_e===B.length-1)break;continue}ke.push(Ke),xe+=Ke.value;const ct=ri(ke,Pe)*ue;if(!(xe<Se+ct))return Mi(ke,Pe,ue,Me)}return{changeUsed:!1,fee:Math.ceil(ue*ri(ke,Pe)),inputs:ke}}var cs=Qt(8287).Buffer,du=Object.defineProperty,hs=Object.defineProperties,na=Object.getOwnPropertyDescriptors,ia=Object.getOwnPropertySymbols,ds=Object.prototype.hasOwnProperty,pu=Object.prototype.propertyIsEnumerable,ps=(P,B,H)=>B in P?du(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,vu=(P,B)=>{for(var H in B||(B={}))ds.call(B,H)&&ps(P,H,B[H]);if(ia)for(var H of ia(B))pu.call(B,H)&&ps(P,H,B[H]);return P},Ei=(P,B)=>hs(P,na(B));function vs(P){const{utxos:B,useUtxos:H,targets:ue,feeRate:Me,changeScript:Pe}=P;if(!isFinite(Jr(Me)))throw new Error("No rate provided");const xe=ue.map(st=>Ei(vu({},st),{script:cs.from(st.script,"hex"),scriptPubkey:cs.from(st.script,"hex")})),ke=H!=null?H:[];let Se=ke.reduce((st,{value:ct})=>st+ct,0);const _e=cn(ue),Ge=ri(ke,xe)*Me;if(Se>=_e+Ge)return Mi(ke,xe,Me,Pe);for(let st=0;st<B.length;++st){const ct=B[st];if(Me*Eo(ct)>ct.value){if(st===B.length-1)break;continue}ke.push(ct),Se+=ct.value;const Rt=ri(ke,xe)*Me;if(!(Se<_e+Rt))return Mi(ke,xe,Me,Pe)}return{changeUsed:!1,fee:Math.ceil(Me*ri(ke,xe)),inputs:ke}}var So=Qt(8287).Buffer,ko=Object.defineProperty,mu=Object.defineProperties,ms=Object.getOwnPropertyDescriptors,oa=Object.getOwnPropertySymbols,gs=Object.prototype.hasOwnProperty,ys=Object.prototype.propertyIsEnumerable,Vi=(P,B,H)=>B in P?ko(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,aa=(P,B)=>{for(var H in B||(B={}))gs.call(B,H)&&Vi(P,H,B[H]);if(oa)for(var H of oa(B))ys.call(B,H)&&Vi(P,H,B[H]);return P},gu=(P,B)=>mu(P,ms(B));function _o(P){const{utxos:B,targets:H,feeRate:ue}=P,Me=H.map(ke=>gu(aa({},ke),{script:So.from(ke.script,"hex"),scriptPubkey:So.from(ke.script,"hex")})),Pe=Math.ceil(ue*ri(B,Me));H[0].value-=Pe,Me[0].value-=Pe;const xe=cn(H);return isNaN(xe)||Pe>xe?{inputs:B,fee:Pe,changeUsed:!1}:{inputs:B,outputs:Me,fee:Pe,changeUsed:!1}}function yu(){return{forceUseUtxo:B=>(B.feeRate<
|
|
60
|
+
`],wif:[128,158],legacyXPriv:[76066276],legacyXPub:[76067358],wrappedSegwitXPriv:[77428856],wrappedSegwitXPub:[77429938],segwitXPriv:[78791436],segwitXPub:[78792518],pubkeyHash:[30],scriptHash:[63,5],bech32:["dgb"]}}};var Ki=Qt(8287).Buffer;const rs=4,Mo=1,ns=72,au=33,su=22,fu=36,uu=4,ji=P=>P<253?1:P<=65535?3:P<=4294967295?5:9,Mn=P=>ji(P)+P,wi=(()=>{const P=Mn(Mo+ns+Mo+au),B=(P+ji(1))/rs,H=Mn(su),ue=B+H;return{p2pkh:P,p2wpkh:B,p2wpkhp2sh:ue,replayprotection:284,replayprotectionp2sh:284}})();function Eo(P){const B=wi[P.scriptType];if(B==null)throw new Error(`${P.scriptType} script type not supported, yet`);return fu+B+uu}function xi(P){const H=ji(P.script.length),ue=P.script.length;return 8+H+ue}function is(P,B){return xi(P)*B}function Wi(P){return P.reduce((B,H)=>((H.scriptType===gn.p2wsh||H.scriptType===gn.p2wpkhp2sh||H.scriptType===gn.p2wpkh)&&B++,B),0)}function ri(P,B){const ue=ji(P.length),Me=ji(B.length);let xe=4+ue+Me+4;Wi(P)>0&&(xe+=Math.ceil(2/rs));const Se=P.reduce((Ke,Ge)=>Ke+Eo(Ge),0),_e=B.reduce((Ke,Ge)=>Ke+xi(Ge),0);return xe+Se+_e}const Gi=P=>ve.ZX.fromHex(P).virtualSize();function Jr(P){return isFinite(P)?Math.floor(P)!==P?NaN:P<0?NaN:P:NaN}function ea(P){return P.reduce((B,H)=>B+(isFinite(H.value)?H.value:0),0)}function cn(P){return P.reduce((B,H)=>B+Jr(H.value),0)}function Mi(P,B,H,ue){const Me=cn(P),Pe=cn(B);let xe=ri(P,B),ke=Math.ceil(H*xe);const Se=Me-(Pe+ke),_e={script:Ki.from(ue,"hex"),scriptPubkey:Ki.from(ue,"hex"),value:Se},Ke=xi(_e);xe+=Ke;const Ge=H*Ke;_e.value-=Ge;let st=!1;return _e.value>is(_e,H)?(B.push(_e),ke+=Ge,st=!0):ke+=Se,{inputs:P,outputs:B,changeUsed:st,fee:ke}}var ta=Qt(8287).Buffer,os=Object.defineProperty,as=Object.defineProperties,ss=Object.getOwnPropertyDescriptors,ra=Object.getOwnPropertySymbols,lu=Object.prototype.hasOwnProperty,fs=Object.prototype.propertyIsEnumerable,us=(P,B,H)=>B in P?os(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,cu=(P,B)=>{for(var H in B||(B={}))lu.call(B,H)&&us(P,H,B[H]);if(ra)for(var H of ra(B))fs.call(B,H)&&us(P,H,B[H]);return P},hu=(P,B)=>as(P,ss(B));function ls(P){const{utxos:B,targets:H,feeRate:ue,changeScript:Me}=P;if(!isFinite(Jr(ue)))throw new Error("No rate provided");const Pe=H.map(_e=>hu(cu({},_e),{script:ta.from(_e.script,"hex"),scriptPubkey:ta.from(_e.script,"hex")}));let xe=0;const ke=[],Se=cn(H);for(let _e=0;_e<B.length;++_e){const Ke=B[_e];if(ue*Eo(Ke)>Ke.value){if(_e===B.length-1)break;continue}ke.push(Ke),xe+=Ke.value;const ct=ri(ke,Pe)*ue;if(!(xe<Se+ct))return Mi(ke,Pe,ue,Me)}return{changeUsed:!1,fee:Math.ceil(ue*ri(ke,Pe)),inputs:ke}}var cs=Qt(8287).Buffer,du=Object.defineProperty,hs=Object.defineProperties,na=Object.getOwnPropertyDescriptors,ia=Object.getOwnPropertySymbols,ds=Object.prototype.hasOwnProperty,pu=Object.prototype.propertyIsEnumerable,ps=(P,B,H)=>B in P?du(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,vu=(P,B)=>{for(var H in B||(B={}))ds.call(B,H)&&ps(P,H,B[H]);if(ia)for(var H of ia(B))pu.call(B,H)&&ps(P,H,B[H]);return P},Ei=(P,B)=>hs(P,na(B));function vs(P){const{utxos:B,useUtxos:H,targets:ue,feeRate:Me,changeScript:Pe}=P;if(!isFinite(Jr(Me)))throw new Error("No rate provided");const xe=ue.map(st=>Ei(vu({},st),{script:cs.from(st.script,"hex"),scriptPubkey:cs.from(st.script,"hex")})),ke=H!=null?H:[];let Se=ke.reduce((st,{value:ct})=>st+ct,0);const _e=cn(ue),Ge=ri(ke,xe)*Me;if(Se>=_e+Ge)return Mi(ke,xe,Me,Pe);for(let st=0;st<B.length;++st){const ct=B[st];if(Me*Eo(ct)>ct.value){if(st===B.length-1)break;continue}ke.push(ct),Se+=ct.value;const Rt=ri(ke,xe)*Me;if(!(Se<_e+Rt))return Mi(ke,xe,Me,Pe)}return{changeUsed:!1,fee:Math.ceil(Me*ri(ke,xe)),inputs:ke}}var So=Qt(8287).Buffer,ko=Object.defineProperty,mu=Object.defineProperties,ms=Object.getOwnPropertyDescriptors,oa=Object.getOwnPropertySymbols,gs=Object.prototype.hasOwnProperty,ys=Object.prototype.propertyIsEnumerable,Vi=(P,B,H)=>B in P?ko(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,aa=(P,B)=>{for(var H in B||(B={}))gs.call(B,H)&&Vi(P,H,B[H]);if(oa)for(var H of oa(B))ys.call(B,H)&&Vi(P,H,B[H]);return P},gu=(P,B)=>mu(P,ms(B));function _o(P){const{utxos:B,targets:H,feeRate:ue}=P,Me=H.map(ke=>gu(aa({},ke),{script:So.from(ke.script,"hex"),scriptPubkey:So.from(ke.script,"hex")})),Pe=Math.ceil(ue*ri(B,Me));H[0].value-=Pe,Me[0].value-=Pe;const xe=cn(H);return isNaN(xe)||Pe>xe?{inputs:B,fee:Pe,changeUsed:!1}:{inputs:B,outputs:Me,fee:Pe,changeUsed:!1}}function yu(){return{forceUseUtxo:B=>(B.feeRate<1e3&&(B.feeRate=1e3),vs(B)),subtractFee:B=>(B.feeRate<1e3&&(B.feeRate=1e3),_o(B)),accumulative:B=>(B.feeRate<1e3&&(B.feeRate=1e3),ls(B))}}var bs=Object.defineProperty,ws=Object.defineProperties,sa=Object.getOwnPropertyDescriptors,xs=Object.getOwnPropertySymbols,bu=Object.prototype.hasOwnProperty,Ms=Object.prototype.propertyIsEnumerable,fa=(P,B,H)=>B in P?bs(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,wu=(P,B)=>{for(var H in B||(B={}))bu.call(B,H)&&fa(P,H,B[H]);if(xs)for(var H of xs(B))Ms.call(B,H)&&fa(P,H,B[H]);return P},xu=(P,B)=>ws(P,sa(B));const Es=xu(wu({currencyCode:"DOGE",customFeeTemplate:Pt,displayName:"Dogecoin",memoOptions:qe,pluginId:"dogecoin",walletType:"wallet:dogecoin",addressExplorer:"https://blockchair.com/dogecoin/address/%s?from=edgeapp",blockExplorer:"https://blockchair.com/dogecoin/block/%s?from=edgeapp",transactionExplorer:"https://blockchair.com/dogecoin/transaction/%s?from=edgeapp",denominations:[{name:"DOGE",multiplier:"100000000",symbol:"\xD0"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:["wss://doge1.trezor.io","wss://doge2.trezor.io","wss://doge3.trezor.io","wss://doge4.trezor.io","wss://doge5.trezor.io","wss://dogebook.nownodes.io/wss/%{nowNodesApiKey}"],enableCustomServers:!1},metaTokens:[]}),Mu={serverConfigs:[{type:"blockbook-nownode",uris:["https://dogebook.nownodes.io"]}],formats:["bip44","bip32"],gapLimit:10,feeUpdateInterval:1e4,defaultFeeInfo:{lowFeeFudgeFactor:void 0,standardFeeLowFudgeFactor:void 0,standardFeeHighFudgeFactor:void 0,highFeeFudgeFactor:void 0,highFee:"526316",lowFee:"526316",standardFeeLow:"526316",standardFeeHigh:"526316",standardFeeLowAmount:"2000000000",standardFeeHighAmount:"98100000000",maximumFeeRate:Ze(Es,.05938)}},Eu={name:"dogecoin",segwit:!1,coinType:3,utxoPicker:yu(),prefixes:{messagePrefix:[`Dogecoin Signed Message:
|
|
61
61
|
`],wif:[158],legacyXPriv:[49988504],legacyXPub:[49990397],pubkeyHash:[30],scriptHash:[22]}},jn={currencyInfo:Es,engineInfo:Mu,coinInfo:Eu};var Ss=Object.defineProperty,Su=Object.defineProperties,ku=Object.getOwnPropertyDescriptors,ks=Object.getOwnPropertySymbols,qi=Object.prototype.hasOwnProperty,_s=Object.prototype.propertyIsEnumerable,ua=(P,B,H)=>B in P?Ss(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,Si=(P,B)=>{for(var H in B||(B={}))qi.call(B,H)&&ua(P,H,B[H]);if(ks)for(var H of ks(B))_s.call(B,H)&&ua(P,H,B[H]);return P},_u=(P,B)=>Su(P,ku(B));const ni=_u(Si({currencyCode:"EBST",customFeeTemplate:Pt,displayName:"eBoost",memoOptions:qe,pluginId:"eboost",walletType:"wallet:eboost",addressExplorer:"https://www.blockexperts.com/ebst/address/%s",blockExplorer:"https://www.blockexperts.com/ebst/hash/%s",transactionExplorer:"https://www.blockexperts.com/ebst/tx/%s",denominations:[{name:"EBST",multiplier:"100000000",symbol:"EBST"},{name:"mEBST",multiplier:"100000",symbol:"mEBST"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:[],enableCustomServers:!1},metaTokens:[]}),Is={formats:["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",maximumFeeRate:Ze(ni,.0033)}},Iu={currencyInfo:ni,engineInfo:Is,coinInfo:{name:"eboost",segwit:!1,coinType:324,prefixes:{messagePrefix:[`Bitcoin Signed Message:
|
|
62
62
|
`],wif:[220],legacyXPriv:[76066276],legacyXPub:[76067358],pubkeyHash:[92],scriptHash:[5]}}};var Au=Object.defineProperty,As=Object.defineProperties,Tu=Object.getOwnPropertyDescriptors,Ts=Object.getOwnPropertySymbols,Ps=Object.prototype.hasOwnProperty,la=Object.prototype.propertyIsEnumerable,Os=(P,B,H)=>B in P?Au(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,Xi=(P,B)=>{for(var H in B||(B={}))Ps.call(B,H)&&Os(P,H,B[H]);if(Ts)for(var H of Ts(B))la.call(B,H)&&Os(P,H,B[H]);return P},Pu=(P,B)=>As(P,Tu(B));const Bs=Pu(Xi({currencyCode:"FTC",customFeeTemplate:Pt,displayName:"Feathercoin",memoOptions:qe,pluginId:"feathercoin",walletType:"wallet:feathercoin",addressExplorer:"https://fsight.chain.tips/address/%s",blockExplorer:"https://fsight.chain.tips/block/%s",transactionExplorer:"https://fsight.chain.tips/tx/%s",denominations:[{name:"FTC",multiplier:"100000000",symbol:"F"},{name:"mFTC",multiplier:"100000",symbol:"mF"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:["wss://blockbook.feathercoin.com"],enableCustomServers:!1},metaTokens:[]}),Ou={formats:["bip49","bip84","bip44","bip32"],gapLimit:10,feeUpdateInterval:6e4,defaultFeeInfo:{lowFeeFudgeFactor:void 0,standardFeeLowFudgeFactor:void 0,standardFeeHighFudgeFactor:void 0,highFeeFudgeFactor:void 0,highFee:"1200",lowFee:"400",standardFeeLow:"600",standardFeeHigh:"800",standardFeeLowAmount:"2000000000",standardFeeHighAmount:"98100000000",maximumFeeRate:Ze(Bs,.002275)}},Bu={currencyInfo:Bs,engineInfo:Ou,coinInfo:{name:"feathercoin",segwit:!0,coinType:8,prefixes:{messagePrefix:[`Feathercoin Signed Message:
|
|
63
63
|
`],wif:[142],legacyXPriv:[76077806],legacyXPub:[76069926],wrappedSegwitXPriv:[77428856],wrappedSegwitXPub:[77429938],segwitXPriv:[78791436],segwitXPub:[78792518],pubkeyHash:[14],scriptHash:[5],bech32:["fc"]}}};var Rs=Qt(9596),ca=Qt(3929),Ru=Qt(625),Cs=Object.defineProperty,Cu=Object.defineProperties,Fu=Object.getOwnPropertyDescriptors,ha=Object.getOwnPropertySymbols,Nu=Object.prototype.hasOwnProperty,Lu=Object.prototype.propertyIsEnumerable,Fs=(P,B,H)=>B in P?Cs(P,B,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[B]=H,Du=(P,B)=>{for(var H in B||(B={}))Nu.call(B,H)&&Fs(P,H,B[H]);if(ha)for(var H of ha(B))Lu.call(B,H)&&Fs(P,H,B[H]);return P},Uu=(P,B)=>Cu(P,Fu(B));const Ns=Uu(Du({currencyCode:"GRS",customFeeTemplate:Pt,displayName:"Groestlcoin",memoOptions:qe,pluginId:"groestlcoin",walletType:"wallet:groestlcoin",addressExplorer:"https://blockchair.com/groestlcoin/address/%s?from=edgeapp?from=edgeapp",blockExplorer:"https://blockchair.com/groestlcoin/block/%s?from=edgeapp",transactionExplorer:"https://blockchair.com/groestlcoin/transaction/%s?from=edgeapp",denominations:[{name:"GRS",multiplier:"100000000",symbol:"G"},{name:"mGRS",multiplier:"100000",symbol:"mG"}]},tt),{defaultSettings:{customFeeSettings:["satPerByte"],blockbookServers:["wss://blockbook.groestlcoin.org","wss://grsbook.nownodes.io/wss/%{nowNodesApiKey}"],enableCustomServers:!1},metaTokens:[]}),Hu={serverConfigs:[{type:"blockbook-nownode",uris:["https://grs.nownodes.io"]}],formats:["bip49","bip84","bip44","bip32"],gapLimit:10,feeUpdateInterval:6e4,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(Ns,.4705)}},Io={name:"groestlcoin",segwit:!0,coinType:17,sighashFunction:ve.Et.sha256,txHashFunction:ve.Et.sha256,bs58DecodeFunc:ca.decode,bs58EncodeFunc:ca.encode,wifEncodeFunc:Ru.encode,bip32FromBase58Func:Rs.n3,bip32FromSeedFunc:Rs.CC,prefixes:{messagePrefix:[`GroestlCoin Signed Message:
|
|
@@ -8,8 +8,12 @@ var _forceUseUtxo = require('../../keymanager/utxopicker/forceUseUtxo');
|
|
|
8
8
|
var _subtractFee = require('../../keymanager/utxopicker/subtractFee');
|
|
9
9
|
|
|
10
10
|
function makeDogeUtxoPicker() {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/*
|
|
12
|
+
According to https://github.com/dogecoin/dogecoin/blob/master/doc/fee-recommendation.md
|
|
13
|
+
the min fee rate is now 0.01 DOGE/kB which is 0.00001 DOGE/byte or
|
|
14
|
+
1,000 sats/vByte .
|
|
15
|
+
*/
|
|
16
|
+
const minRelayFeeRate = 1000
|
|
13
17
|
|
|
14
18
|
return {
|
|
15
19
|
forceUseUtxo: (args) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edge-currency-plugins",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
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",
|