@chainrails/common 0.3.1 → 0.3.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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
`);super(a,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=o,this.docsPath=i,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=Z}walk(t){return ee(this,t)}}function ee(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?ee(e.cause,t):t?null:e}class te extends g{constructor({size:t,targetSize:n,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}function b(e,{dir:t,size:n=32}={}){return typeof e=="string"?ye(e,{dir:t,size:n}):Ce(e,{dir:t,size:n})}function ye(e,{dir:t,size:n=32}={}){if(n===null)return e;const o=e.replace("0x","");if(o.length>n*2)throw new te({size:Math.ceil(o.length/2),targetSize:n,type:"hex"});return`0x${o[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function Ce(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new te({size:e.length,targetSize:n,type:"bytes"});const o=new Uint8Array(n);for(let i=0;i<n;i++){const r=t==="right";o[r?i:n-i-1]=e[r?i:e.length-i-1]}return o}class Re extends g{constructor({max:t,min:n,signed:o,size:i,value:r}){super(`Number "${r}" is not in safe ${i?`${i*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class Ne extends g{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function R(e,{size:t}){if(Q(e)>t)throw new Ne({givenSize:Q(e),maxSize:t})}function Me(e,t={}){const{signed:n,size:o}=t,i=BigInt(e);let r;o?n?r=(1n<<BigInt(o)*8n-1n)-1n:r=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(r=BigInt(Number.MAX_SAFE_INTEGER));const a=typeof r=="bigint"&&n?-r-1n:0;if(r&&i>r||i<a){const h=typeof e=="bigint"?"n":"";throw new Re({max:r?`${r}${h}`:void 0,min:`${a}${h}`,signed:n,size:o,value:`${e}${h}`})}const m=`0x${(n&&i<0?(1n<<BigInt(o*8))+BigInt(i):i).toString(16)}`;return o?b(m,{size:o}):m}const ke=new TextEncoder;function Be(e,t={}){return typeof e=="number"||typeof e=="bigint"?xe(e,t):typeof e=="boolean"?we(e,t):y(e)?se(e,t):oe(e,t)}function we(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(R(n,{size:t.size}),b(n,{size:t.size})):n}const f={zero:48,nine:57,A:65,F:70,a:97,f:102};function ne(e){if(e>=f.zero&&e<=f.nine)return e-f.zero;if(e>=f.A&&e<=f.F)return e-(f.A-10);if(e>=f.a&&e<=f.f)return e-(f.a-10)}function se(e,t={}){let n=e;t.size&&(R(n,{size:t.size}),n=b(n,{dir:"right",size:t.size}));let o=n.slice(2);o.length%2&&(o=`0${o}`);const i=o.length/2,r=new Uint8Array(i);for(let a=0,m=0;a<i;a++){const h=ne(o.charCodeAt(m++)),p=ne(o.charCodeAt(m++));if(h===void 0||p===void 0)throw new g(`Invalid byte sequence ("${o[m-2]}${o[m-1]}" in "${o}").`);r[a]=h*16+p}return r}function xe(e,t){const n=Me(e,t);return se(n)}function oe(e,t={}){const n=ke.encode(e);return typeof t.size=="number"?(R(n,{size:t.size}),b(n,{dir:"right",size:t.size})):n}const I=BigInt(2**32-1),ie=BigInt(32);function ve(e,t=!1){return t?{h:Number(e&I),l:Number(e>>ie&I)}:{h:Number(e>>ie&I)|0,l:Number(e&I)|0}}function Oe(e,t=!1){const n=e.length;let o=new Uint32Array(n),i=new Uint32Array(n);for(let r=0;r<n;r++){const{h:a,l:m}=ve(e[r],t);[o[r],i[r]]=[a,m]}return[o,i]}const He=(e,t,n)=>e<<n|t>>>32-n,_e=(e,t,n)=>t<<n|e>>>32-n,Le=(e,t,n)=>t<<n-32|e>>>64-n,Fe=(e,t,n)=>e<<n-32|t>>>64-n;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function $e(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function ae(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function U(e,...t){if(!$e(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function re(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Pe(e,t){U(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Ve(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ce(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}const Ke=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function ze(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function We(e){for(let t=0;t<e.length;t++)e[t]=ze(e[t]);return e}const de=Ke?e=>e:We;function Ye(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function le(e){return typeof e=="string"&&(e=Ye(e)),U(e),e}class je{}function Ge(e){const t=o=>e().update(le(o)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const Xe=BigInt(0),A=BigInt(1),qe=BigInt(2),Je=BigInt(7),Qe=BigInt(256),Ze=BigInt(113),me=[],Ee=[],Te=[];for(let e=0,t=A,n=1,o=0;e<24;e++){[n,o]=[o,(2*n+3*o)%5],me.push(2*(5*o+n)),Ee.push((e+1)*(e+2)/2%64);let i=Xe;for(let r=0;r<7;r++)t=(t<<A^(t>>Je)*Ze)%Qe,t&qe&&(i^=A<<(A<<BigInt(r))-A);Te.push(i)}const ue=Oe(Te,!0),et=ue[0],tt=ue[1],he=(e,t,n)=>n>32?Le(e,t,n):He(e,t,n),fe=(e,t,n)=>n>32?Fe(e,t,n):_e(e,t,n);function nt(e,t=24){const n=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let a=0;a<10;a++)n[a]=e[a]^e[a+10]^e[a+20]^e[a+30]^e[a+40];for(let a=0;a<10;a+=2){const m=(a+8)%10,h=(a+2)%10,p=n[h],S=n[h+1],bt=he(p,S,1)^n[m],It=fe(p,S,1)^n[m+1];for(let D=0;D<50;D+=10)e[a+D]^=bt,e[a+D+1]^=It}let i=e[2],r=e[3];for(let a=0;a<24;a++){const m=Ee[a],h=he(i,r,m),p=fe(i,r,m),S=me[a];i=e[S],r=e[S+1],e[S]=h,e[S+1]=p}for(let a=0;a<50;a+=10){for(let m=0;m<10;m++)n[m]=e[a+m];for(let m=0;m<10;m++)e[a+m]^=~n[(m+2)%10]&n[(m+4)%10]}e[0]^=et[o],e[1]^=tt[o]}ce(n)}class N extends je{constructor(t,n,o,i=!1,r=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=n,this.outputLen=o,this.enableXOF=i,this.rounds=r,ae(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=Ve(this.state)}clone(){return this._cloneInto()}keccak(){de(this.state32),nt(this.state32,this.rounds),de(this.state32),this.posOut=0,this.pos=0}update(t){re(this),t=le(t),U(t);const{blockLen:n,state:o}=this,i=t.length;for(let r=0;r<i;){const a=Math.min(n-this.pos,i-r);for(let m=0;m<a;m++)o[this.pos++]^=t[r++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:o,blockLen:i}=this;t[o]^=n,(n&128)!==0&&o===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){re(this,!1),U(t),this.finish();const n=this.state,{blockLen:o}=this;for(let i=0,r=t.length;i<r;){this.posOut>=o&&this.keccak();const a=Math.min(o-this.posOut,r-i);t.set(n.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return ae(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Pe(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,ce(this.state)}_cloneInto(t){const{blockLen:n,suffix:o,outputLen:i,rounds:r,enableXOF:a}=this;return t||(t=new N(n,o,i,a,r)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=r,t.suffix=o,t.outputLen=i,t.enableXOF=a,t.destroyed=this.destroyed,t}}const st=(e,t,n)=>Ge(()=>new N(t,e,n)),ot=st(1,136,256/8);function it(e,t){return ot(y(e,{strict:!1})?Be(e):e)}class at extends g{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class ge extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){const n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){const o=this.keys().next().value;o&&this.delete(o)}return this}}const M=new ge(8192);function pe(e,t){if(M.has(`${e}.${t}`))return M.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),o=it(oe(n)),i=n.split("");for(let a=0;a<40;a+=2)o[a>>1]>>4>=8&&i[a]&&(i[a]=i[a].toUpperCase()),(o[a>>1]&15)>=8&&i[a+1]&&(i[a+1]=i[a+1].toUpperCase());const r=`0x${i.join("")}`;return M.set(`${e}.${t}`,r),r}function u(e,t){if(!ct(e,{strict:!1}))throw new at({address:e});return pe(e,t)}const rt=/^0x[a-fA-F0-9]{40}$/,k=new ge(8192);function ct(e,t){const{strict:n=!0}=t??{},o=`${e}.${n}`;if(k.has(o))return k.get(o);const i=rt.test(e)?e.toLowerCase()===e?!0:n?pe(e)===e:!0:!1;return k.set(o,i),i}const s={USDC:"USDC",USDT:"USDT",DAI:"DAI",BUSD:"BUSD",EURC:"EURC",ETH:"ETH",WETH:"WETH",STRK:"STRK",BNB:"BNB",LORDS:"LORDS"},dt=s.USDC,l={[c.ARBITRUM]:{[s.DAI]:{address:u("0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"),symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[s.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:s.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[s.USDC]:{address:u("0xaf88d065e77c8cC2239327C5EDb3A432268e5831"),symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"},[s.USDT]:{address:u("0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"),symbol:s.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[s.WETH]:{address:u("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),symbol:s.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.ARBITRUM_TESTNET]:{[s.USDC]:{address:u("0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"),symbol:s.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.AVALANCHE]:{[s.DAI]:{address:"0xd586E7F844cEa2F87f50152665BCbc2C279D8d70",symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[s.USDC]:{address:u("0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"),symbol:s.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[s.USDT]:{address:"0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",symbol:s.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[s.WETH]:{address:"0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",symbol:s.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.AVALANCHE_TESTNET]:{[s.USDC]:{address:u("0x5425890298aed601595a70AB815c96711a31Bc65"),symbol:s.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.BASE]:{[s.DAI]:{address:"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[s.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:s.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[s.EURC]:{address:"0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",symbol:s.EURC,name:"Euro Coin",decimals:6,logoURI:"/images/tokens/eurc.png"},[s.USDC]:{address:u("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"),symbol:s.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[s.WETH]:{address:u("0x4200000000000000000000000000000000000006"),symbol:s.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.BASE_TESTNET]:{[s.USDC]:{address:u("0x036CbD53842c5426634e7929541eC2318f3dCF7e"),symbol:s.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.BSC]:{[s.BNB]:{address:"0x0000000000000000000000000000000000000000",symbol:s.BNB,name:"BNB",decimals:18,logoURI:"/images/chains/bsc.webp"},[s.BUSD]:{address:"0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",symbol:s.BUSD,name:"Binance USD",decimals:18,logoURI:"/images/tokens/busd.png"},[s.DAI]:{address:"0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3",symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[s.ETH]:{address:"0x2170Ed0880ac9A755fd29B2688956BD959F933F8",symbol:s.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[s.USDC]:{address:u("0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"),symbol:s.USDC,decimals:18,name:"USD Coin",logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[s.USDT]:{address:"0x55d398326f99059fF775485246999027B3197955",symbol:s.USDT,name:"Tether USD",decimals:18,logoURI:"/images/tokens/usdt.png"},[s.WETH]:{address:"0x4db5a66e937a9f4473fa95b1caf1d1e1d62e29ea",symbol:s.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.ETHEREUM]:{[s.BUSD]:{address:"0x4Fabb145d64652a948d72533023f6E7A623C7C53",symbol:s.BUSD,name:"Binance USD",decimals:18,logoURI:"/images/tokens/busd.png"},[s.DAI]:{address:u("0x6B175474E89094C44Da98b954EedeAC495271d0F"),symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[s.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:s.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[s.EURC]:{address:"0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",symbol:s.EURC,name:"Euro Coin",decimals:6,logoURI:"/images/tokens/eurc.png"},[s.STRK]:{address:"0xCa14007Eff0dB1f8135f4C25B34De49AB0d42766",symbol:s.STRK,name:"Starknet Token",decimals:18,logoURI:"/images/chains/starknet.svg"},[s.USDC]:{address:u("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"),symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[s.USDT]:{address:u("0xdAC17F958D2ee523a2206206994597C13D831ec7"),symbol:s.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[s.WETH]:{address:u("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),symbol:s.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.ETHEREUM_TESTNET]:{[s.USDC]:{address:u("0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"),symbol:s.USDC,decimals:6,name:"USD Coin",logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.HYPEREVM]:{[s.USDC]:{address:"0xb88339CB7199b77E23DB6E890353E22632Ba630f",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.LISK]:{[s.USDC]:{address:"0xF242275d3a6527d877f2c927a82D9b057609cc71",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.MONAD]:{[s.USDC]:{address:"0x754704Bc059F8C67012fEd69BC8A327a5aafb603",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.MONAD_TESTNET]:{[s.USDC]:{address:"0x534b2f3A21130d7a60830c2Df862319e593943A3",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.OPTIMISM]:{[s.DAI]:{address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[s.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:s.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[s.USDC]:{address:"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"},[s.USDT]:{address:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",symbol:s.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[s.WETH]:{address:"0x4200000000000000000000000000000000000006",symbol:s.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.OPTIMISM_TESTNET]:{[s.USDC]:{address:"0x5fd84259d66Cd46123540766Be93DFE6D43130D7",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.POLYGON]:{[s.DAI]:{address:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[s.USDC]:{address:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"},[s.USDT]:{address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",symbol:s.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[s.WETH]:{address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",symbol:s.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.STARKNET]:{[s.DAI]:{address:"0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad",symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[s.ETH]:{address:"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",symbol:s.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[s.LORDS]:{address:"0x0124aeb495b947201f5faC96fD1138E326AD86195B98df6DEc9009158A533B49",symbol:s.LORDS,name:"LORDS Token",decimals:18,logoURI:"/images/tokens/lords.png"},[s.STRK]:{address:"0x04718f5a0Fc34cC1AF16A1cdee98fFB20C31f5cD61D6Ab07201858f4287c938D",symbol:s.STRK,name:"Starknet Token",decimals:18,logoURI:"/images/chains/starknet.svg"},[s.USDC]:{address:"0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[s.USDT]:{address:"0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",symbol:s.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"}},[c.STARKNET_TESTNET]:{[s.USDC]:{address:"0x0512feAc6339Ff7889822cb5aA2a86C848e9D392bB0E3E237C008674feeD8343",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}}},lt={ARBITRUM:l[c.ARBITRUM],ARBITRUM_TESTNET:l[c.ARBITRUM_TESTNET],AVALANCHE:l[c.AVALANCHE],AVALANCHE_TESTNET:l[c.AVALANCHE_TESTNET],BASE:l[c.BASE],BASE_TESTNET:l[c.BASE_TESTNET],BSC:l[c.BSC],ETHEREUM:l[c.ETHEREUM],ETHEREUM_TESTNET:l[c.ETHEREUM_TESTNET],STARKNET:l[c.STARKNET]},mt={ARBITRUM_MAINNET:{...v,tokens:l[c.ARBITRUM]},ARBITRUM_TESTNET:{...O,tokens:l[c.ARBITRUM_TESTNET]},AVALANCHE_MAINNET:{...H,tokens:l[c.AVALANCHE]},AVALANCHE_TESTNET:{..._,tokens:l[c.AVALANCHE_TESTNET]},BASE_MAINNET:{...L,tokens:l[c.BASE]},BASE_TESTNET:{...F,tokens:l[c.BASE_TESTNET]},BSC_MAINNET:{...$,tokens:l[c.BSC]},ETHEREUM_MAINNET:{...P,tokens:l[c.ETHEREUM]},ETHEREUM_TESTNET:{...V,tokens:l[c.ETHEREUM_TESTNET]},HYPEREVM_MAINNET:{...K,tokens:l[c.HYPEREVM]},LISK_MAINNET:{...z,tokens:l[c.LISK]},MONAD_MAINNET:{...W,tokens:l[c.MONAD]},MONAD_TESTNET:{...Y,tokens:l[c.MONAD_TESTNET]},OPTIMISM_MAINNET:{...j,tokens:l[c.OPTIMISM]},OPTIMISM_TESTNET:{...G,tokens:l[c.OPTIMISM_TESTNET]},POLYGON_MAINNET:{...X,tokens:l[c.POLYGON]},STARKNET_MAINNET:{...q,tokens:l[c.STARKNET]},STARKNET_TESTNET:{...J,tokens:l[c.STARKNET_TESTNET]}},Et=new Set(Object.values(c));function Tt(e){if(Se(e))return e;const t=c[e];if(!t)throw new Error(`Invalid chain: ${e}. Chain must be a valid chain alias or internal chain value from Chains.`);return t}function ut(e){for(const[t,n]of Object.entries(c))if(n===e)return t;throw new Error(`Invalid internal chain value: ${e}. Internal chain value must be a valid value from InternalChains.`)}function ht(e){return e in x}function Se(e){return Et.has(e)}function ft(e,t){if(e.symbol!==t)throw new Error(`Token symbol mismatch: token is ${e.symbol}, tokenSymbol is ${t}. The token symbol must match the tokenSymbol parameter.`)}function Ae(e,t){const n=t.toLowerCase().trim(),o=l[e];if(!o)throw new Error(`Chain not found: ${e}. The chain key must be a valid chain identifier.`);let i;for(const r in o){const a=o[r];if(a&&a.address.toLowerCase()===n.toLowerCase()){i=a;break}}if(!i)throw new Error(`Token address mismatch: address ${t} does not exist on chain ${e}. The token address must be a valid token address on the specified chain.`);return i}function gt(e,t){if(e.symbol!==t)throw new Error(`Token symbol mismatch: token symbol is "${e.symbol}", expected "${t}". The token symbol must match the expected token symbol.`)}function pt(e,t,n){const o=Ae(e,t);if(o.symbol!==n)throw new Error(`Token address and symbol mismatch: address ${t} on chain ${e} corresponds to token "${o.symbol}", but expected "${n}". The token address must correspond to a token with the expected symbol on the specified chain.`);return o}function B(e,t){return l[e]?.[t]}function St(e,t){return B(e,t)?.address}function At(e,t){return B(e,t)?.decimals}var w=(e=>(e.PRODUCTION="production",e.STAGING="staging",e))(w||{});class T{constructor({api_key:t,env:n,seesion_token:o,props:i}){this.api_key=t||"",this.sessionToken=o||"",this.env=n??w.PRODUCTION,this.props=i}static async config(t){if(!T.app){if(!t)throw new Error("Please provide an api_key");T.app=new T(t)}return t&&(t.api_key!==void 0&&(T.app.api_key=t.api_key),t.seesion_token!==void 0&&(T.app.sessionToken=t.seesion_token),t.env!==void 0&&(T.app.env=t.env),t.props!==void 0&&(T.app.props=t.props)),T.app}static getApiKey(){if(!T.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return T.app.api_key}static getSessionToken(){if(!T.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return T.app.sessionToken}static getProps(){if(!T.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return T.app.props}static getEnv(){if(!T.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return T.app.env==="internal"?"staging":T.app.env}static getBaseUrl(){if(!T.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");switch(T.app.env){case"production":return"https://api.chainrails.io/api/v1";case"staging":return"https://dev.chainrails.io/api/v1";case"internal":return"https://dev.chainrails.io/api/v1";default:return"https://api.chainrails.io/api/v1"}}static getPayModalUrl(t){if(!T.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");const n=T.app.env==="internal"?"https://chainrails-frontend-git-staging-horus-labs.vercel.app":"https://app.chainrails.io",o=Number(t),i=t&&!isNaN(Number(t))&&o>0?"/pay/":"/deposit/",r=`${t&&!isNaN(Number(t))&&o>0?o*100:""}`;return n+i+r}}d.AmountSymbols=s,d.ChainTypes=E,d.Chainrails=T,d.Chains=x,d.DEFAULT_AMOUNT_SYMBOL=dt,d.InternalChains=c,d.TOKEN_REGISTRY=l,d.Tokens=lt,d.allChains=mt,d.arbitrum=v,d.arbitrumTestnet=O,d.assertTokenAddressMatchesChain=Ae,d.assertTokenAddressMatchesChainAndSymbol=pt,d.assertTokenMatchesAmountSymbol=ft,d.assertTokenSymbolMatches=gt,d.avalanche=H,d.avalancheTestnet=_,d.base=L,d.baseTestnet=F,d.bsc=$,d.celo=be,d.environment=w,d.ethereum=P,d.ethereumTestnet=V,d.getToken=B,d.getTokenAddress=St,d.getTokenDecimals=At,d.hyperevm=K,d.isChainAlias=ht,d.isInternalChain=Se,d.linea=Ie,d.lisk=z,d.monad=W,d.monadTestnet=Y,d.optimism=j,d.optimismTestnet=G,d.polygon=X,d.starknet=q,d.starknetTestnet=J,d.toChainAlias=ut,d.toInternalChain=Tt,d.unichain=Ue,d.worldchain=De,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(l,m){typeof exports=="object"&&typeof module<"u"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):(l=typeof globalThis<"u"?globalThis:l||self,m(l.Chainrails={}))})(this,(function(l){"use strict";const m={EVM:"EVM",STARKNET:"STARKNET"},c={ARBITRUM:"ARBITRUM_MAINNET",ARBITRUM_TESTNET:"ARBITRUM_TESTNET",AVALANCHE:"AVALANCHE_MAINNET",AVALANCHE_TESTNET:"AVALANCHE_TESTNET",BASE:"BASE_MAINNET",BASE_TESTNET:"BASE_TESTNET",BSC:"BSC_MAINNET",ETHEREUM:"ETHEREUM_MAINNET",ETHEREUM_TESTNET:"ETHEREUM_TESTNET",HYPEREVM:"HYPEREVM_MAINNET",LISK:"LISK_MAINNET",MONAD:"MONAD_MAINNET",MONAD_TESTNET:"MONAD_TESTNET",OPTIMISM:"OPTIMISM_MAINNET",OPTIMISM_TESTNET:"OPTIMISM_TESTNET",POLYGON:"POLYGON_MAINNET",STARKNET:"STARKNET_MAINNET",STARKNET_TESTNET:"STARKNET_TESTNET"},w={ARBITRUM:"ARBITRUM",ARBITRUM_TESTNET:"ARBITRUM_TESTNET",AVALANCHE:"AVALANCHE",AVALANCHE_TESTNET:"AVALANCHE_TESTNET",BASE:"BASE",BASE_TESTNET:"BASE_TESTNET",BSC:"BSC",ETHEREUM:"ETHEREUM",ETHEREUM_TESTNET:"ETHEREUM_TESTNET",HYPEREVM:"HYPEREVM",LISK:"LISK",MONAD:"MONAD",MONAD_TESTNET:"MONAD_TESTNET",OPTIMISM:"OPTIMISM",OPTIMISM_TESTNET:"OPTIMISM_TESTNET",POLYGON:"POLYGON",STARKNET:"STARKNET",STARKNET_TESTNET:"STARKNET_TESTNET"},x={type:m.EVM,chainId:42161,name:"Arbitrum",cctpDomain:3,logoURI:"/images/chains/arbitrum.svg",explorer:"https://arbiscan.io"},O={type:m.EVM,chainId:421614,name:"Arbitrum Sepolia",cctpDomain:3,logoURI:"/images/chains/arbitrum.svg",explorer:"https://sepolia.arbiscan.io"},H={type:m.EVM,chainId:43114,name:"Avalanche",cctpDomain:1,logoURI:"/images/chains/avalanche.svg",explorer:"https://snowtrace.io"},_={type:m.EVM,chainId:43113,name:"Avalanche Fuji",cctpDomain:1,logoURI:"/images/chains/avalanche.svg",explorer:"https://testnet.snowtrace.io"},L={type:m.EVM,chainId:8453,name:"Base",cctpDomain:6,logoURI:"/images/chains/base.webp",explorer:"https://basescan.org"},F={type:m.EVM,chainId:84532,name:"Base Sepolia",cctpDomain:6,logoURI:"/images/chains/base.webp",explorer:"https://sepolia.basescan.org"},$={type:m.EVM,chainId:56,name:"BNB Chain",cctpDomain:null,logoURI:"/images/chains/bsc.webp",explorer:"https://bscscan.com"},be={type:m.EVM,chainId:42220,name:"Celo",cctpDomain:null,logoURI:"/images/chains/celo.svg",explorer:"https://celoscan.io"},P={type:m.EVM,chainId:1,name:"Ethereum",cctpDomain:0,logoURI:"/images/chains/ethereum.svg",explorer:"https://etherscan.io"},V={type:m.EVM,chainId:11155111,name:"Ethereum Sepolia",cctpDomain:0,logoURI:"/images/chains/ethereum.svg",explorer:"https://sepolia.etherscan.io"},K={type:m.EVM,chainId:999,name:"HyperEVM",cctpDomain:19,logoURI:"/images/chains/hyperevm.webp",explorer:"https://liquidscan.io"},Ie={type:m.EVM,chainId:59144,name:"Linea",cctpDomain:11,logoURI:"/images/chains/linea.svg",explorer:"https://lineascan.build"},z={type:m.EVM,chainId:1135,name:"Lisk",cctpDomain:null,logoURI:"/images/chains/lisk.png",explorer:"https://blockscout.lisk.com"},W={type:m.EVM,chainId:143,name:"Monad",cctpDomain:7,logoURI:"/images/chains/monad.png",explorer:"https://monadvision.com"},Y={type:m.EVM,chainId:10143,name:"Monad Testnet",cctpDomain:null,logoURI:"/images/chains/monad.png",explorer:"https://testnet.monadvision.com"},j={type:m.EVM,chainId:10,name:"Optimism",cctpDomain:2,logoURI:"/images/chains/optimism.svg",explorer:"https://optimistic.etherscan.io"},G={type:m.EVM,chainId:11155420,name:"Optimism Testnet",cctpDomain:2,logoURI:"/images/chains/optimism.svg",explorer:"https://testnet-explorer.optimism.io"},X={type:m.EVM,chainId:137,name:"Polygon",cctpDomain:7,logoURI:"/images/chains/polygon.svg",explorer:"https://polygonscan.com"},q={type:m.STARKNET,chainId:"0x534e5f4d41494e",name:"Starknet",cctpDomain:25,logoURI:"/images/chains/starknet.svg",explorer:""},J={type:m.STARKNET,chainId:"0x534e5f5345504f4c4941",name:"Starknet Testnet",cctpDomain:null,logoURI:"/images/chains/starknet.svg",explorer:""},Ue={type:m.EVM,chainId:130,name:"Unichain",cctpDomain:10,logoURI:"/images/chains/unichain.webp",explorer:""},De={type:m.EVM,chainId:480,name:"Worldchain",cctpDomain:14,logoURI:"/images/chains/worldchain.svg",explorer:""};function k(e,{strict:n=!0}={}){return!e||typeof e!="string"?!1:n?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function Q(e){return k(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const Z="2.43.4";let C={getDocsUrl:({docsBaseUrl:e,docsPath:n="",docsSlug:t})=>n?`${e??"https://viem.sh"}${n}${t?`#${t}`:""}`:void 0,version:`viem@${Z}`};class g extends Error{constructor(n,t={}){const o=t.cause instanceof g?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof g&&t.cause.docsPath||t.docsPath,r=C.getDocsUrl?.({...t,docsPath:a}),i=[n||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...r?[`Docs: ${r}`]:[],...o?[`Details: ${o}`]:[],...C.version?[`Version: ${C.version}`]:[]].join(`
|
|
2
|
+
`);super(i,t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=o,this.docsPath=a,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=n,this.version=Z}walk(n){return ee(this,n)}}function ee(e,n){return n?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?ee(e.cause,n):n?null:e}class ne extends g{constructor({size:n,targetSize:t,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${n}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function b(e,{dir:n,size:t=32}={}){return typeof e=="string"?ke(e,{dir:n,size:t}):Ce(e,{dir:n,size:t})}function ke(e,{dir:n,size:t=32}={}){if(t===null)return e;const o=e.replace("0x","");if(o.length>t*2)throw new ne({size:Math.ceil(o.length/2),targetSize:t,type:"hex"});return`0x${o[n==="right"?"padEnd":"padStart"](t*2,"0")}`}function Ce(e,{dir:n,size:t=32}={}){if(t===null)return e;if(e.length>t)throw new ne({size:e.length,targetSize:t,type:"bytes"});const o=new Uint8Array(t);for(let a=0;a<t;a++){const r=n==="right";o[r?a:t-a-1]=e[r?a:e.length-a-1]}return o}class ye extends g{constructor({max:n,min:t,signed:o,size:a,value:r}){super(`Number "${r}" is not in safe ${a?`${a*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${n?`(${t} to ${n})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class Re extends g{constructor({givenSize:n,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${n} bytes.`,{name:"SizeOverflowError"})}}function y(e,{size:n}){if(Q(e)>n)throw new Re({givenSize:Q(e),maxSize:n})}function Ne(e,n={}){const{signed:t,size:o}=n,a=BigInt(e);let r;o?t?r=(1n<<BigInt(o)*8n-1n)-1n:r=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(r=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof r=="bigint"&&t?-r-1n:0;if(r&&a>r||a<i){const E=typeof e=="bigint"?"n":"";throw new ye({max:r?`${r}${E}`:void 0,min:`${i}${E}`,signed:t,size:o,value:`${e}${E}`})}const T=`0x${(t&&a<0?(1n<<BigInt(o*8))+BigInt(a):a).toString(16)}`;return o?b(T,{size:o}):T}const Me=new TextEncoder;function ve(e,n={}){return typeof e=="number"||typeof e=="bigint"?we(e,n):typeof e=="boolean"?Be(e,n):k(e)?se(e,n):oe(e,n)}function Be(e,n={}){const t=new Uint8Array(1);return t[0]=Number(e),typeof n.size=="number"?(y(t,{size:n.size}),b(t,{size:n.size})):t}const h={zero:48,nine:57,A:65,F:70,a:97,f:102};function te(e){if(e>=h.zero&&e<=h.nine)return e-h.zero;if(e>=h.A&&e<=h.F)return e-(h.A-10);if(e>=h.a&&e<=h.f)return e-(h.a-10)}function se(e,n={}){let t=e;n.size&&(y(t,{size:n.size}),t=b(t,{dir:"right",size:n.size}));let o=t.slice(2);o.length%2&&(o=`0${o}`);const a=o.length/2,r=new Uint8Array(a);for(let i=0,T=0;i<a;i++){const E=te(o.charCodeAt(T++)),S=te(o.charCodeAt(T++));if(E===void 0||S===void 0)throw new g(`Invalid byte sequence ("${o[T-2]}${o[T-1]}" in "${o}").`);r[i]=E*16+S}return r}function we(e,n){const t=Ne(e,n);return se(t)}function oe(e,n={}){const t=Me.encode(e);return typeof n.size=="number"?(y(t,{size:n.size}),b(t,{dir:"right",size:n.size})):t}const I=BigInt(2**32-1),ae=BigInt(32);function xe(e,n=!1){return n?{h:Number(e&I),l:Number(e>>ae&I)}:{h:Number(e>>ae&I)|0,l:Number(e&I)|0}}function Oe(e,n=!1){const t=e.length;let o=new Uint32Array(t),a=new Uint32Array(t);for(let r=0;r<t;r++){const{h:i,l:T}=xe(e[r],n);[o[r],a[r]]=[i,T]}return[o,a]}const He=(e,n,t)=>e<<t|n>>>32-t,_e=(e,n,t)=>n<<t|e>>>32-t,Le=(e,n,t)=>n<<t-32|e>>>64-t,Fe=(e,n,t)=>e<<t-32|n>>>64-t;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function $e(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function ie(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function U(e,...n){if(!$e(e))throw new Error("Uint8Array expected");if(n.length>0&&!n.includes(e.length))throw new Error("Uint8Array expected of length "+n+", got length="+e.length)}function re(e,n=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(n&&e.finished)throw new Error("Hash#digest() has already been called")}function Pe(e,n){U(e);const t=n.outputLen;if(e.length<t)throw new Error("digestInto() expects output buffer of length at least "+t)}function Ve(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ce(...e){for(let n=0;n<e.length;n++)e[n].fill(0)}const Ke=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function ze(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function We(e){for(let n=0;n<e.length;n++)e[n]=ze(e[n]);return e}const le=Ke?e=>e:We;function Ye(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function de(e){return typeof e=="string"&&(e=Ye(e)),U(e),e}class je{}function Ge(e){const n=o=>e().update(de(o)).digest(),t=e();return n.outputLen=t.outputLen,n.blockLen=t.blockLen,n.create=()=>e(),n}const Xe=BigInt(0),A=BigInt(1),qe=BigInt(2),Je=BigInt(7),Qe=BigInt(256),Ze=BigInt(113),Te=[],me=[],fe=[];for(let e=0,n=A,t=1,o=0;e<24;e++){[t,o]=[o,(2*t+3*o)%5],Te.push(2*(5*o+t)),me.push((e+1)*(e+2)/2%64);let a=Xe;for(let r=0;r<7;r++)n=(n<<A^(n>>Je)*Ze)%Qe,n&qe&&(a^=A<<(A<<BigInt(r))-A);fe.push(a)}const ue=Oe(fe,!0),en=ue[0],nn=ue[1],Ee=(e,n,t)=>t>32?Le(e,n,t):He(e,n,t),he=(e,n,t)=>t>32?Fe(e,n,t):_e(e,n,t);function tn(e,n=24){const t=new Uint32Array(10);for(let o=24-n;o<24;o++){for(let i=0;i<10;i++)t[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const T=(i+8)%10,E=(i+2)%10,S=t[E],p=t[E+1],In=Ee(S,p,1)^t[T],Un=he(S,p,1)^t[T+1];for(let D=0;D<50;D+=10)e[i+D]^=In,e[i+D+1]^=Un}let a=e[2],r=e[3];for(let i=0;i<24;i++){const T=me[i],E=Ee(a,r,T),S=he(a,r,T),p=Te[i];a=e[p],r=e[p+1],e[p]=E,e[p+1]=S}for(let i=0;i<50;i+=10){for(let T=0;T<10;T++)t[T]=e[i+T];for(let T=0;T<10;T++)e[i+T]^=~t[(T+2)%10]&t[(T+4)%10]}e[0]^=en[o],e[1]^=nn[o]}ce(t)}class R extends je{constructor(n,t,o,a=!1,r=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=n,this.suffix=t,this.outputLen=o,this.enableXOF=a,this.rounds=r,ie(o),!(0<n&&n<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=Ve(this.state)}clone(){return this._cloneInto()}keccak(){le(this.state32),tn(this.state32,this.rounds),le(this.state32),this.posOut=0,this.pos=0}update(n){re(this),n=de(n),U(n);const{blockLen:t,state:o}=this,a=n.length;for(let r=0;r<a;){const i=Math.min(t-this.pos,a-r);for(let T=0;T<i;T++)o[this.pos++]^=n[r++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:n,suffix:t,pos:o,blockLen:a}=this;n[o]^=t,(t&128)!==0&&o===a-1&&this.keccak(),n[a-1]^=128,this.keccak()}writeInto(n){re(this,!1),U(n),this.finish();const t=this.state,{blockLen:o}=this;for(let a=0,r=n.length;a<r;){this.posOut>=o&&this.keccak();const i=Math.min(o-this.posOut,r-a);n.set(t.subarray(this.posOut,this.posOut+i),a),this.posOut+=i,a+=i}return n}xofInto(n){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(n)}xof(n){return ie(n),this.xofInto(new Uint8Array(n))}digestInto(n){if(Pe(n,this),this.finished)throw new Error("digest() was already called");return this.writeInto(n),this.destroy(),n}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,ce(this.state)}_cloneInto(n){const{blockLen:t,suffix:o,outputLen:a,rounds:r,enableXOF:i}=this;return n||(n=new R(t,o,a,i,r)),n.state32.set(this.state32),n.pos=this.pos,n.posOut=this.posOut,n.finished=this.finished,n.rounds=r,n.suffix=o,n.outputLen=a,n.enableXOF=i,n.destroyed=this.destroyed,n}}const sn=(e,n,t)=>Ge(()=>new R(n,e,t)),on=sn(1,136,256/8);function an(e,n){return on(k(e,{strict:!1})?ve(e):e)}class rn extends g{constructor({address:n}){super(`Address "${n}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class ge extends Map{constructor(n){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=n}get(n){const t=super.get(n);return super.has(n)&&t!==void 0&&(this.delete(n),super.set(n,t)),t}set(n,t){if(super.set(n,t),this.maxSize&&this.size>this.maxSize){const o=this.keys().next().value;o&&this.delete(o)}return this}}const N=new ge(8192);function Se(e,n){if(N.has(`${e}.${n}`))return N.get(`${e}.${n}`);const t=e.substring(2).toLowerCase(),o=an(oe(t)),a=t.split("");for(let i=0;i<40;i+=2)o[i>>1]>>4>=8&&a[i]&&(a[i]=a[i].toUpperCase()),(o[i>>1]&15)>=8&&a[i+1]&&(a[i+1]=a[i+1].toUpperCase());const r=`0x${a.join("")}`;return N.set(`${e}.${n}`,r),r}function u(e,n){if(!ln(e,{strict:!1}))throw new rn({address:e});return Se(e,n)}const cn=/^0x[a-fA-F0-9]{40}$/,M=new ge(8192);function ln(e,n){const{strict:t=!0}=n??{},o=`${e}.${t}`;if(M.has(o))return M.get(o);const a=cn.test(e)?e.toLowerCase()===e?!0:t?Se(e)===e:!0:!1;return M.set(o,a),a}const s={USDC:"USDC",USDT:"USDT",DAI:"DAI",BUSD:"BUSD",EURC:"EURC",ETH:"ETH",WETH:"WETH",STRK:"STRK",BNB:"BNB",LORDS:"LORDS"},dn=s.USDC,d={[c.ARBITRUM]:{[s.DAI]:{address:u("0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"),symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png",nativeToken:!1},[s.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:s.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg",nativeToken:!0},[s.USDC]:{address:u("0xaf88d065e77c8cC2239327C5EDb3A432268e5831"),symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",nativeToken:!1},[s.USDT]:{address:u("0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"),symbol:s.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png",nativeToken:!1},[s.WETH]:{address:u("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),symbol:s.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png",nativeToken:!1}},[c.ARBITRUM_TESTNET]:{[s.USDC]:{address:u("0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"),symbol:s.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png",nativeToken:!1}},[c.AVALANCHE]:{[s.DAI]:{address:"0xd586E7F844cEa2F87f50152665BCbc2C279D8d70",symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png",nativeToken:!1},[s.USDC]:{address:u("0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"),symbol:s.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png",nativeToken:!1},[s.USDT]:{address:"0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",symbol:s.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png",nativeToken:!1},[s.WETH]:{address:"0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",symbol:s.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png",nativeToken:!1}},[c.AVALANCHE_TESTNET]:{[s.USDC]:{address:u("0x5425890298aed601595a70AB815c96711a31Bc65"),symbol:s.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png",nativeToken:!1}},[c.BASE]:{[s.DAI]:{address:"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png",nativeToken:!1},[s.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:s.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg",nativeToken:!0},[s.EURC]:{address:"0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",symbol:s.EURC,name:"Euro Coin",decimals:6,logoURI:"/images/tokens/eurc.png",nativeToken:!1},[s.USDC]:{address:u("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"),symbol:s.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png",nativeToken:!1},[s.WETH]:{address:u("0x4200000000000000000000000000000000000006"),symbol:s.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png",nativeToken:!1}},[c.BASE_TESTNET]:{[s.USDC]:{address:u("0x036CbD53842c5426634e7929541eC2318f3dCF7e"),symbol:s.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png",nativeToken:!1}},[c.BSC]:{[s.BNB]:{address:"0x0000000000000000000000000000000000000000",symbol:s.BNB,name:"BNB",decimals:18,logoURI:"/images/chains/bsc.webp",nativeToken:!0},[s.BUSD]:{address:"0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",symbol:s.BUSD,name:"Binance USD",decimals:18,logoURI:"/images/tokens/busd.png",nativeToken:!1},[s.DAI]:{address:"0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3",symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png",nativeToken:!1},[s.ETH]:{address:"0x2170Ed0880ac9A755fd29B2688956BD959F933F8",symbol:s.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg",nativeToken:!1},[s.USDC]:{address:u("0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"),symbol:s.USDC,decimals:18,name:"USD Coin",logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png",nativeToken:!1},[s.USDT]:{address:"0x55d398326f99059fF775485246999027B3197955",symbol:s.USDT,name:"Tether USD",decimals:18,logoURI:"/images/tokens/usdt.png",nativeToken:!1}},[c.ETHEREUM]:{[s.BUSD]:{address:"0x4Fabb145d64652a948d72533023f6E7A623C7C53",symbol:s.BUSD,name:"Binance USD",decimals:18,logoURI:"/images/tokens/busd.png",nativeToken:!1},[s.DAI]:{address:u("0x6B175474E89094C44Da98b954EedeAC495271d0F"),symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png",nativeToken:!1},[s.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:s.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg",nativeToken:!0},[s.EURC]:{address:"0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",symbol:s.EURC,name:"Euro Coin",decimals:6,logoURI:"/images/tokens/eurc.png",nativeToken:!1},[s.STRK]:{address:"0xCa14007Eff0dB1f8135f4C25B34De49AB0d42766",symbol:s.STRK,name:"Starknet Token",decimals:18,logoURI:"/images/chains/starknet.svg",nativeToken:!1},[s.USDC]:{address:u("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"),symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png",nativeToken:!1},[s.USDT]:{address:u("0xdAC17F958D2ee523a2206206994597C13D831ec7"),symbol:s.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png",nativeToken:!1},[s.WETH]:{address:u("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),symbol:s.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png",nativeToken:!1}},[c.ETHEREUM_TESTNET]:{[s.USDC]:{address:u("0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"),symbol:s.USDC,decimals:6,name:"USD Coin",logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png",nativeToken:!1}},[c.HYPEREVM]:{[s.USDC]:{address:"0xb88339CB7199b77E23DB6E890353E22632Ba630f",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",nativeToken:!1}},[c.LISK]:{[s.USDC]:{address:"0xF242275d3a6527d877f2c927a82D9b057609cc71",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",nativeToken:!1}},[c.MONAD]:{[s.USDC]:{address:"0x754704Bc059F8C67012fEd69BC8A327a5aafb603",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",nativeToken:!1}},[c.MONAD_TESTNET]:{[s.USDC]:{address:"0x534b2f3A21130d7a60830c2Df862319e593943A3",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",nativeToken:!1}},[c.OPTIMISM]:{[s.DAI]:{address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png",nativeToken:!1},[s.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:s.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg",nativeToken:!0},[s.USDC]:{address:"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",nativeToken:!1},[s.USDT]:{address:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",symbol:s.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png",nativeToken:!1},[s.WETH]:{address:"0x4200000000000000000000000000000000000006",symbol:s.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png",nativeToken:!1}},[c.OPTIMISM_TESTNET]:{[s.USDC]:{address:"0x5fd84259d66Cd46123540766Be93DFE6D43130D7",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",nativeToken:!1}},[c.POLYGON]:{[s.DAI]:{address:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png",nativeToken:!1},[s.USDC]:{address:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",nativeToken:!1},[s.USDT]:{address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",symbol:s.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png",nativeToken:!1},[s.WETH]:{address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",symbol:s.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png",nativeToken:!1}},[c.STARKNET]:{[s.DAI]:{address:"0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad",symbol:s.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png",nativeToken:!1},[s.ETH]:{address:"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",symbol:s.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg",nativeToken:!1},[s.LORDS]:{address:"0x0124aeb495b947201f5faC96fD1138E326AD86195B98df6DEc9009158A533B49",symbol:s.LORDS,name:"LORDS Token",decimals:18,logoURI:"/images/tokens/lords.png",nativeToken:!1},[s.STRK]:{address:"0x04718f5a0Fc34cC1AF16A1cdee98fFB20C31f5cD61D6Ab07201858f4287c938D",symbol:s.STRK,name:"Starknet Token",decimals:18,logoURI:"/images/chains/starknet.svg",nativeToken:!1},[s.USDC]:{address:"0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png",nativeToken:!1},[s.USDT]:{address:"0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",symbol:s.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png",nativeToken:!1}},[c.STARKNET_TESTNET]:{[s.USDC]:{address:"0x0512feAc6339Ff7889822cb5aA2a86C848e9D392bB0E3E237C008674feeD8343",symbol:s.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",nativeToken:!1}}},Tn={ARBITRUM:d[c.ARBITRUM],ARBITRUM_TESTNET:d[c.ARBITRUM_TESTNET],AVALANCHE:d[c.AVALANCHE],AVALANCHE_TESTNET:d[c.AVALANCHE_TESTNET],BASE:d[c.BASE],BASE_TESTNET:d[c.BASE_TESTNET],BSC:d[c.BSC],ETHEREUM:d[c.ETHEREUM],ETHEREUM_TESTNET:d[c.ETHEREUM_TESTNET],STARKNET:d[c.STARKNET]},mn={ARBITRUM_MAINNET:{...x,tokens:d[c.ARBITRUM]},ARBITRUM_TESTNET:{...O,tokens:d[c.ARBITRUM_TESTNET]},AVALANCHE_MAINNET:{...H,tokens:d[c.AVALANCHE]},AVALANCHE_TESTNET:{..._,tokens:d[c.AVALANCHE_TESTNET]},BASE_MAINNET:{...L,tokens:d[c.BASE]},BASE_TESTNET:{...F,tokens:d[c.BASE_TESTNET]},BSC_MAINNET:{...$,tokens:d[c.BSC]},ETHEREUM_MAINNET:{...P,tokens:d[c.ETHEREUM]},ETHEREUM_TESTNET:{...V,tokens:d[c.ETHEREUM_TESTNET]},HYPEREVM_MAINNET:{...K,tokens:d[c.HYPEREVM]},LISK_MAINNET:{...z,tokens:d[c.LISK]},MONAD_MAINNET:{...W,tokens:d[c.MONAD]},MONAD_TESTNET:{...Y,tokens:d[c.MONAD_TESTNET]},OPTIMISM_MAINNET:{...j,tokens:d[c.OPTIMISM]},OPTIMISM_TESTNET:{...G,tokens:d[c.OPTIMISM_TESTNET]},POLYGON_MAINNET:{...X,tokens:d[c.POLYGON]},STARKNET_MAINNET:{...q,tokens:d[c.STARKNET]},STARKNET_TESTNET:{...J,tokens:d[c.STARKNET_TESTNET]}},fn=new Set(Object.values(c));function un(e){if(pe(e))return e;const n=c[e];if(!n)throw new Error(`Invalid chain: ${e}. Chain must be a valid chain alias or internal chain value from Chains.`);return n}function En(e){for(const[n,t]of Object.entries(c))if(t===e)return n;throw new Error(`Invalid internal chain value: ${e}. Internal chain value must be a valid value from InternalChains.`)}function hn(e){return e in w}function pe(e){return fn.has(e)}function gn(e,n){if(e.symbol!==n)throw new Error(`Token symbol mismatch: token is ${e.symbol}, tokenSymbol is ${n}. The token symbol must match the tokenSymbol parameter.`)}function Ae(e,n){const t=n.toLowerCase().trim(),o=d[e];if(!o)throw new Error(`Chain not found: ${e}. The chain key must be a valid chain identifier.`);let a;for(const r in o){const i=o[r];if(i&&i.address.toLowerCase()===t.toLowerCase()){a=i;break}}if(!a)throw new Error(`Token address mismatch: address ${n} does not exist on chain ${e}. The token address must be a valid token address on the specified chain.`);return a}function Sn(e,n){if(e.symbol!==n)throw new Error(`Token symbol mismatch: token symbol is "${e.symbol}", expected "${n}". The token symbol must match the expected token symbol.`)}function pn(e,n,t){const o=Ae(e,n);if(o.symbol!==t)throw new Error(`Token address and symbol mismatch: address ${n} on chain ${e} corresponds to token "${o.symbol}", but expected "${t}". The token address must correspond to a token with the expected symbol on the specified chain.`);return o}function v(e,n){return d[e]?.[n]}function An(e,n){return v(e,n)?.address}function bn(e,n){return v(e,n)?.decimals}var B=(e=>(e.PRODUCTION="production",e.STAGING="staging",e))(B||{});class f{constructor({api_key:n,env:t,seesion_token:o,props:a}){this.api_key=n||"",this.sessionToken=o||"",this.env=t??B.PRODUCTION,this.props=a}static async config(n){if(!f.app){if(!n)throw new Error("Please provide an api_key");f.app=new f(n)}return n&&(n.api_key!==void 0&&(f.app.api_key=n.api_key),n.seesion_token!==void 0&&(f.app.sessionToken=n.seesion_token),n.env!==void 0&&(f.app.env=n.env),n.props!==void 0&&(f.app.props=n.props)),f.app}static getApiKey(){if(!f.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return f.app.api_key}static getSessionToken(){if(!f.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return f.app.sessionToken}static getProps(){if(!f.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return f.app.props}static getEnv(){if(!f.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return f.app.env==="internal"?"staging":f.app.env}static getBaseUrl(){if(!f.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");switch(f.app.env){case"production":return"https://api.chainrails.io/api/v1";case"staging":return"https://dev.chainrails.io/api/v1";case"internal":return"https://dev.chainrails.io/api/v1";default:return"https://api.chainrails.io/api/v1"}}static getPayModalUrl(n){if(!f.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");const t=f.app.env==="internal"?"https://chainrails-frontend-git-staging-horus-labs.vercel.app":"https://app.chainrails.io",o=Number(n),a=n&&!isNaN(Number(n))&&o>0?"/pay/":"/deposit/",r=`${n&&!isNaN(Number(n))&&o>0?o*100:""}`;return t+a+r}}l.AmountSymbols=s,l.ChainTypes=m,l.Chainrails=f,l.Chains=w,l.DEFAULT_AMOUNT_SYMBOL=dn,l.InternalChains=c,l.TOKEN_REGISTRY=d,l.Tokens=Tn,l.allChains=mn,l.arbitrum=x,l.arbitrumTestnet=O,l.assertTokenAddressMatchesChain=Ae,l.assertTokenAddressMatchesChainAndSymbol=pn,l.assertTokenMatchesAmountSymbol=gn,l.assertTokenSymbolMatches=Sn,l.avalanche=H,l.avalancheTestnet=_,l.base=L,l.baseTestnet=F,l.bsc=$,l.celo=be,l.environment=B,l.ethereum=P,l.ethereumTestnet=V,l.getToken=v,l.getTokenAddress=An,l.getTokenDecimals=bn,l.hyperevm=K,l.isChainAlias=hn,l.isInternalChain=pe,l.linea=Ie,l.lisk=z,l.monad=W,l.monadTestnet=Y,l.optimism=j,l.optimismTestnet=G,l.polygon=X,l.starknet=q,l.starknetTestnet=J,l.toChainAlias=En,l.toInternalChain=un,l.unichain=Ue,l.worldchain=De,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/tokens/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIxC,oBAAY,SAAS;IACnB,GAAG,gCAAgC;IACnC,IAAI,4BAA4B;IAChC,IAAI,4BAA4B;IAChC,GAAG,2BAA2B;IAC9B,GAAG,2BAA2B;IAC9B,KAAK,6BAA6B;IAClC,IAAI,gCAAgC;IACpC,IAAI,4BAA4B;IAChC,IAAI,4BAA4B;IAChC,IAAI,4BAA4B;IAChC,GAAG,4BAA4B;CAChC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/tokens/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIxC,oBAAY,SAAS;IACnB,GAAG,gCAAgC;IACnC,IAAI,4BAA4B;IAChC,IAAI,4BAA4B;IAChC,GAAG,2BAA2B;IAC9B,GAAG,2BAA2B;IAC9B,KAAK,6BAA6B;IAClC,IAAI,gCAAgC;IACpC,IAAI,4BAA4B;IAChC,IAAI,4BAA4B;IAChC,IAAI,4BAA4B;IAChC,GAAG,4BAA4B;CAChC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,aA2dnB,CAAC;AACX;;;;GAIG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;CAWT,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tokens/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tokens/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC"}
|