From e8d477f7f7ceedf807667cb4278b0de8e7bcbbff Mon Sep 17 00:00:00 2001
From: Romeo Rosete <110788242+bombastictranz@users.noreply.github.com>
Date: Sat, 13 Apr 2024 08:32:19 -0400
Subject: [PATCH] index.e27c1c3f.js.download
Stock control supervisors
---
index.e27c1c3f.js.download | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 index.e27c1c3f.js.download
diff --git a/index.e27c1c3f.js.download b/index.e27c1c3f.js.download
new file mode 100644
index 0000000..a1a7c35
--- /dev/null
+++ b/index.e27c1c3f.js.download
@@ -0,0 +1,2 @@
+"use strict";(self.webpackChunkdefi_mode=self.webpackChunkdefi_mode||[]).push([[7549],{32516:(e,t,n)=>{n.d(t,{Z:()=>s});var r={"@imtbl/imx-sdk":()=>Promise.all([n.e(5120),n.e(2682),n.e(2857),n.e(5128),n.e(5711),n.e(1286),n.e(5183),n.e(1019)]).then(n.bind(n,5183)),"@scure/btc-signer":()=>Promise.all([n.e(6262),n.e(2464),n.e(1386)]).then(n.bind(n,51386)),"@scure/base":()=>n.e(5117).then(n.bind(n,55117)),"@solana/web3.js":()=>Promise.all([n.e(6262),n.e(2464),n.e(5120),n.e(6503),n.e(1347),n.e(1215),n.e(9182),n.e(6601)]).then(n.bind(n,49182)),"@solana/spl-token":()=>Promise.all([n.e(6262),n.e(2464),n.e(5120),n.e(6503),n.e(1347),n.e(1215),n.e(9182),n.e(5128),n.e(3158),n.e(5373)]).then(n.bind(n,3158)),"@metaplex-foundation/mpl-token-metadata":()=>Promise.all([n.e(6262),n.e(2464),n.e(5120),n.e(6503),n.e(1347),n.e(1215),n.e(9182),n.e(2857),n.e(5275),n.e(3492)]).then(n.t.bind(n,75275,23)),"@mysten/sui.js":()=>Promise.all([n.e(6262),n.e(2464),n.e(5974),n.e(6503),n.e(4967),n.e(5315),n.e(9482),n.e(7451)]).then(n.bind(n,59482)),"@metaplex-foundation/js":()=>Promise.all([n.e(6262),n.e(2464),n.e(5120),n.e(6503),n.e(1347),n.e(1215),n.e(9182),n.e(2857),n.e(5128),n.e(5275),n.e(1286),n.e(2413),n.e(1656)]).then(n.bind(n,92413))};function s(e){var t=r[e];if(!t)throw new Error("moduleName-error");return t()}},27549:(e,t,n)=>{n.r(t),n.d(t,{default:()=>F});var r=n(1413),s=n(37762),a=n(29439),u=n(74165),c=n(15861),i=n(93380),o=n(14300),p=n(35686),l=n(15702),d=(n(8911),n(92643),n(1708)),x=n(64037),f=n(82148),b=n(40910),v=n(97282),g=n(45271),m=n(65326),y=n(32516),h=n(75219),w=n(48779),k="P2PKH",Z="P2SH",_="P2WPKH",P="TR",T="616e27323840ee0c2ae434d998267f81170988ba9477f78dcd00fc247a27db40",O="bc1pcyj5mt2q4t4py8jnur8vpxvxxchke4pzy7tdr9yvj3u3kdfgrj6sw3rzmr",A="0000000000000000000000000000000000000000000000000000000000000000",I=600,B=546,W={isAddress:function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d.Z.setChainType({chainId:x.Bv.BTC});case 3:return e.next=5,d.Z.isBtcAddress(t);case 5:return n=e.sent,e.abrupt("return",n);case 9:return e.prev=9,e.t0=e.catch(0),console.error(e.t0),e.abrupt("return",!1);case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),checkInitWallet:function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n,r,s,a,c,i,o,p,l;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W.getWalletType();case 2:return r=e.sent,s=r.isXverse,e.next=6,d.Z.getWalletAccount();case 6:return a=e.sent,e.next=9,d.Z.getWalletAdapter();case 9:if(c=e.sent,!s){e.next=16;break}return e.next=13,c.getPaymentAccount();case 13:e.t0=e.sent,e.next=17;break;case 16:e.t0=a;case 17:return i=e.t0,e.next=20,v.Z.getUtxos({coinId:1,utxoRequests:[{utxoType:13,address:i,batchDummyNum:t}]});case 20:return o=e.sent,p=o.data,l=(null===(n=(void 0===p?[]:p)[0])||void 0===n?void 0:n.utxoList)||[],e.abrupt("return",l.filter((e=>e.dummy)));case 25:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),splitUtxoUnisatOrXverse:function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n,r,s,p,l,x,f,b,g,m,w,k,Z,_,P,T,O,A,B,F,S,U,K,N,H,L,E,X,C,R,j,V,z,q,D;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.from,s=t.needSplitDummyAmount,e.next=3,(0,y.Z)("@scure/btc-signer");case 3:return p=e.sent,e.next=6,(0,y.Z)("@scure/base");case 6:return l=e.sent,x=l.hex,f=l.base64,b=r,e.next=12,W.getWalletType();case 12:return g=e.sent,m=g.isXverse,w=g.isUnisat,e.next=17,d.Z.getWalletAdapter();case 17:return k=e.sent,e.next=20,null===k||void 0===k?void 0:k.getPublicKey();case 20:if(Z=e.sent,!m){e.next=27;break}return e.next=24,k.getPaymentPublicKey();case 24:e.t0=e.sent,e.next=28;break;case 27:e.t0=Z;case 28:return _=e.t0,P={coinId:1,utxoRequests:[{utxoType:6,address:b,coinAmount:s*I,serviceCharge:0}]},e.next=32,v.Z.getUtxos(P);case 32:return T=e.sent,O=T.data,A=((null===(n=(void 0===O?[]:O)[0])||void 0===n?void 0:n.utxoList)||[]).filter((e=>!e.dummy)).map((e=>({txid:e.txHash,vout:e.vout,value:e.coinAmount,rawTransaction:e.rawTransaction}))),B=new p.Transaction,e.next=39,W.getPayment({address:b,publicKey:m?_:Z});case 39:return F=e.sent,S=0,A.forEach(function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=B,e.next=3,W.getInput(F,t);case 3:e.t1=e.sent,e.t0.addInput.call(e.t0,e.t1),S+=null===t||void 0===t?void 0:t.value;case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=44,(0,h.Z)(v.Z.getBTCNetworkFee({coinId:1,address:b}));case 44:for(U=e.sent,K=(0,a.Z)(U,2),N=K[1],H=N.info,L=H.max,E=0;Et)),sigHash:p.SignatureHash.ALL}]});case 66:for(j=e.sent,z=w?p.Transaction.fromPSBT(x.decode(V)).extract():"",q=[],D=0;D=B&&O.addOutputAddress(w,BigInt(D)),e.next=100,m.sendPsbt({psbtBase64:x.encode(O.toPSBT()),inputsToSign:[{address:g,signingIndexes:[0],sigHash:p.SignatureHash.ALL},{address:w,signingIndexes:null===O||void 0===O?void 0:O.inputs.map(((e,t)=>t)).slice(1),sigHash:p.SignatureHash.ALL}]});case 100:return Y=e.sent,e.abrupt("return",{txhash:Y});case 102:case"end":return e.stop()}}),e,null,[[73,86,89,92]])})));return function(t){return e.apply(this,arguments)}}(),checkDustBatchTrade:function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n,r,s;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.Z.checkBtcDust(t);case 2:if(n=e.sent,r=n.data,s=(void 0===r?{}:r).dustInscriptionIds,!((void 0===s?[]:s).length>0)){e.next=10;break}return e.next=9,W.dustTradeInfo();case 9:throw new Error((0,o.O4)("btcnft_subtitle_dialog_subtitle_low_utxo"));case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),batchTransfer:function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n,r,c,p,l,x,f,b,g,m,w,k,Z,_,P,T,O,A,I,B,F,S,U,K,N,H,L,E,X,C,R,j,V,z,q,D,Y,G,M,J,Q,$;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.nftList,r=t.toAddress,e.next=3,(0,y.Z)("@scure/btc-signer");case 3:return c=e.sent,e.next=6,(0,y.Z)("@scure/base");case 6:return p=e.sent,l=p.base64,x=p.hex,e.next=11,W.getWalletType();case 11:return f=e.sent,b=f.isXverse,g=f.isUnisat,e.next=16,d.Z.getWalletAccount();case 16:return m=e.sent,e.next=19,d.Z.getWalletAdapter();case 19:if(w=e.sent,!b){e.next=26;break}return e.next=23,w.getPaymentAccount();case 23:e.t0=e.sent,e.next=27;break;case 26:e.t0=m;case 27:return k=e.t0,e.next=30,w.getPublicKey();case 30:if(Z=e.sent,!b){e.next=37;break}return e.next=34,w.getPaymentPublicKey();case 34:e.t1=e.sent,e.next=38;break;case 37:e.t1=Z;case 38:return _=e.t1,e.next=41,W.getPayment({address:m,publicKey:Z});case 41:P=e.sent,T=new c.Transaction,O=[],A=(0,s.Z)(n),e.prev=45,A.s();case 47:if((I=A.n()).done){e.next=62;break}return B=I.value,F=B.tokenId,S=B.ticker,e.next=52,W.getOrdinalsNFTUtxo({tokenId:F,tick:S,ownerAddress:m});case 52:return U=e.sent,O.push(U),e.t2=T,e.next=57,W.getInput(P,U);case 57:e.t3=e.sent,e.t2.addInput.call(e.t2,e.t3),T.addOutputAddress(r,BigInt(null===U||void 0===U?void 0:U.value));case 60:e.next=47;break;case 62:e.next=67;break;case 64:e.prev=64,e.t4=e.catch(45),A.e(e.t4);case 67:return e.prev=67,A.f(),e.finish(67);case 70:return e.next=72,W.getPayment({address:k,publicKey:_});case 72:return K=e.sent,e.next=75,(0,h.Z)(v.Z.getBTCNetworkFee({coinId:1,address:k}));case 75:return N=e.sent,H=(0,a.Z)(N,2),L=H[1],E=L.info,X=E.max,e.next=82,W.getNetworkFee({psbt:T,networkFeeRate:X});case 82:return C=e.sent,R=C.networkFee,e.next=86,W.getPaymentUtxos({walletAddress:k,price:Number(R),needFilteredUtxo:O.map((e=>e.txid))||[]});case 86:if(!((j=e.sent).length<=0)){e.next=89;break}throw new Error((0,o.O4)("btcnft_transact_err_msg_utxo_insuff_balance"));case 89:V=0,z=(0,s.Z)(j),e.prev=91,z.s();case 93:if((q=z.n()).done){e.next=102;break}return D=q.value,V=i.yx.add(V,null===D||void 0===D?void 0:D.value),e.next=98,W.getInput(K,D);case 98:Y=e.sent,T.addInput(Y);case 100:e.next=93;break;case 102:e.next=107;break;case 104:e.prev=104,e.t5=e.catch(91),z.e(e.t5);case 107:return e.prev=107,z.f(),e.finish(107);case 110:return e.next=112,W.getNetworkFee({psbt:T,networkFeeRate:X});case 112:if(G=e.sent,M=G.networkFee,J=i.yx.sub(V,M),T.addOutputAddress(k,BigInt(J)),!g){e.next=120;break}return e.next=119,w.signPsbt({psbtHex:x.encode(T.toPSBT())});case 119:Q=e.sent;case 120:return e.next=122,w.sendPsbt({psbtHex:Q,psbtBase64:l.encode(T.toPSBT()),inputsToSign:[{address:m,signingIndexes:O.map(((e,t)=>t)),sigHash:c.SignatureHash.ALL},{address:k,signingIndexes:null===T||void 0===T?void 0:T.inputs.map(((e,t)=>t)).slice(O.length),sigHash:c.SignatureHash.ALL}]});case 122:return $=e.sent,e.abrupt("return",{txhash:$});case 125:case"end":return e.stop()}}),e,null,[[45,64,67,70],[91,104,107,110]])})));return function(t){return e.apply(this,arguments)}}(),getSellerPsbt:function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n,s,a,c,i,p,l,d,x,f,b,v,g;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.sellerPublicKey,s=t.sellerAddress,a=t.sellerPaymentAddress,c=t.ordinalsNFTUtxo,i=t.nftPrice,e.next=3,(0,y.Z)("@scure/btc-signer");case 3:return p=e.sent,e.next=6,(0,y.Z)("@scure/base");case 6:return l=e.sent,d=l.hex,x=new p.Transaction,e.next=11,W.getWalletType();case 11:return f=e.sent,b=f.isXverse,e.next=15,W.getPayment({address:s,publicKey:n});case 15:return v=e.sent,x.addInput({txid:A,index:0,witnessUtxo:{amount:BigInt(0),script:p.p2tr(d.decode(T)).script},tapInternalKey:d.decode(T)}),x.addInput({txid:A,index:1,witnessUtxo:{amount:BigInt(0),script:p.p2tr(d.decode(T)).script},tapInternalKey:d.decode(T)}),e.next=20,W.getInput(v,c);case 20:if((g=e.sent).txid){e.next=23;break}throw new Error((0,o.O4)("brc20_reminder_dialog_invalid_status"));case 23:if(x.addInput((0,r.Z)((0,r.Z)({},g),{},{sighashType:p.SignatureHash.SINGLE|p.SignatureHash.ANYONECANPAY})),x.addOutputAddress(O,BigInt(0)),x.addOutputAddress(O,BigInt(0)),!isNaN(i)){e.next=28;break}throw new Error("price error");case 28:return x.addOutputAddress(b?a:s,BigInt(i)),e.abrupt("return",x);case 30:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),getBuyerPsbt:function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n,r,s,a,p,l,x,f,b,v,g,m,h,w,k,Z,_,P,T,O,A,F,S,U,K,N,H,L;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=t.sellerPsbtBase64,a=t.fromPublicKey,p=t.buyerPublicKey,l=t.dummyUtxos,x=t.paymentUtxos,f=t.ordinalsNFTUtxo,b=t.nftPrice,v=t.networkFeeRate,e.next=3,(0,y.Z)("@scure/btc-signer");case 3:return g=e.sent,e.next=6,(0,y.Z)("@scure/base");case 6:return m=e.sent,h=m.base64,e.next=10,d.Z.getWalletAdapter();case 10:return w=e.sent,e.next=13,d.Z.getWalletAccount();case 13:return k=e.sent,e.next=16,W.getWalletType();case 16:if(Z=e.sent,!Z.isXverse){e.next=24;break}return e.next=21,w.getPaymentAccount();case 21:e.t0=e.sent,e.next=25;break;case 24:e.t0=k;case 25:return _=e.t0,P=g.Transaction.fromPSBT(h.decode(s)),e.next=29,W.getPayment({address:_,publicKey:p});case 29:return T=e.sent,e.next=32,W.getPayment({address:k,publicKey:a});case 32:return O=e.sent,A=x.reduce(((e,t)=>e+(null===t||void 0===t?void 0:t.value)),0),e.next=36,Promise.all(l.utxos.map(function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t,n){var r;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W.getInput(T,t);case 2:r=e.sent,P.inputs[n]=P.normalizeInput(r);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),!0));case 36:return e.next=38,Promise.all(x.map(function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W.getInput(T,t);case 2:n=e.sent,P.addInput(n,!0);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 38:return F=(null===f||void 0===f?void 0:f.value)=B&&P.addOutput(W.getOutput(T,L),!0),e.abrupt("return",{psbt:P,networkFee:H});case 56:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),buyerSigners:function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n,r,s,a,c,i,o,p,l,x,f,b,v;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,y.Z)("@scure/base");case 2:return n=e.sent,r=n.hex,s=n.base64,e.next=7,W.getBuyerPsbt(t);case 7:return a=e.sent,c=a.psbt,i=a.networkFee,o=c.toPSBT(),e.next=13,W.getWalletType();case 13:return p=e.sent,l=p.isXverse,e.next=17,d.Z.getWalletAccount();case 17:return x=e.sent,e.next=20,d.Z.getWalletAdapter();case 20:return f=e.sent,b={},b=l?{psbtBase64:s.encode(o),inputsToSign:[{address:t.paymentAddress,signingIndexes:null===c||void 0===c?void 0:c.inputs.map(((e,t)=>t)).filter(((e,t)=>2!==t))}]}:{type:"trade",psbtHex:r.encode(o),account:x,options:{autoFinalized:!1}},e.next=25,f.signPsbt(b);case 25:return v=e.sent,e.abrupt("return",{buyerPsbtBase64:l?v:s.encode(r.decode(v)),gas:i});case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),getBatchBuyerPsbt:function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n,r,s,p,l,x,f,b,g,m,w,k,Z,_,P,T,O,A,F,S,U,K,N,H,L,E,X,C,R,j;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.nftUtxos,r=t.fromPublicKey,s=t.buyerPublicKey,p=t.dummyUtxos,l=t.paymentUtxos,x=t.totalPrice,f=t.networkFeeRate,e.next=3,(0,y.Z)("@scure/btc-signer");case 3:return b=e.sent,e.next=6,(0,y.Z)("@scure/base");case 6:return g=e.sent,m=g.base64,e.next=10,d.Z.getWalletAdapter();case 10:return w=e.sent,e.next=13,d.Z.getWalletAccount();case 13:return k=e.sent,e.next=16,W.getWalletType();case 16:if(Z=e.sent,!Z.isXverse){e.next=24;break}return e.next=21,w.getPaymentAccount();case 21:e.t0=e.sent,e.next=25;break;case 24:e.t0=k;case 25:return _=e.t0,P=new b.Transaction,e.next=29,W.getPayment({address:_,publicKey:s});case 29:return T=e.sent,e.next=32,W.getPayment({address:k,publicKey:r});case 32:return O=e.sent,A=l.reduce(((e,t)=>e+t.value),0),e.next=36,Promise.all(p.utxos.map(function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W.getInput(T,t);case 2:n=e.sent,P.addInput(n,!0);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),!0));case 36:return e.next=38,Promise.all(n.map(function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=b.Transaction.fromPSBT(m.decode(null===t||void 0===t?void 0:t.sellerPsbt)),P.addInput(n.inputs[2],!0);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),!0));case 38:return e.next=40,Promise.all(l.map(function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W.getInput(T,t);case 2:n=e.sent,P.addInput(n,!0);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 40:return F=0,p.utxos.forEach((e=>{F+=e.value})),S=W.getOutput(T,F),P.addOutput(S,!0),e.next=46,Promise.all(n.map(function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n,r;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=W.getOutput(O,null===t||void 0===t||null===(n=t.utxo)||void 0===n?void 0:n.value),P.addOutput(r,!0);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),!0));case 46:return e.next=48,Promise.all(n.map(function(){var e=(0,c.Z)((0,u.Z)().mark((function e(t){var n;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=b.Transaction.fromPSBT(m.decode(null===t||void 0===t?void 0:t.sellerPsbt)),P.addOutput(n.outputs[2],!0);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),!0));case 48:for(U=0;U