@multiversx/sdk-dapp-swap
Version:
A library to hold the main logic for swapping between tokens on the MultiversX blockchain
3 lines (2 loc) • 787 B
JavaScript
import{a as i,b as l,c as I,d as f}from"./chunk-KPPFFURF.js";import{a as m,b as S}from"./chunk-5ETWGUEB.js";import{a as g,b as u,c as v}from"./chunk-7OW72CTP.js";import{a as O}from"./chunk-YDAF6TDL.js";import{e as t,f as d}from"./chunk-5W737WN4.js";d();var E=T=>{var o,c;let{data:a,value:w,receiver:P,sender:e,gasLimit:p,gasPrice:B,chainID:b,version:n,options:r}=T,{address:A}=S(m().getState()),L=a?O(a)?t.Buffer.from(a,"base64"):t.Buffer.from(a.trim()):void 0,s=new l({value:BigInt(w),data:L,receiver:new i(P),sender:new i(e&&e!==""?e:A),gasLimit:BigInt((o=p.valueOf())!=null?o:g),gasPrice:BigInt((c=B.valueOf())!=null?c:u),chainID:b.valueOf(),version:new f(n!=null?n:v).valueOf()});return r&&(s.options=new I(r).valueOf()),s};export{E as a};
//# sourceMappingURL=chunk-QFD3NDSC.js.map