@chainrails/common 0.2.3 → 0.2.5

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(l,u){typeof exports=="object"&&typeof module<"u"?u(exports):typeof define=="function"&&define.amd?define(["exports"],u):(l=typeof globalThis<"u"?globalThis:l||self,u(l.Chainrails={}))})(this,(function(l){"use strict";var u=(e=>(e.USDC="USDC",e))(u||{});const H={type:"evm",chainId:42161,name:"Arbitrum",cctpDomain:3,logoURI:"/images/chains/arbitrum.svg"},P={type:"evm",chainId:421614,name:"Arbitrum Sepolia",cctpDomain:3,logoURI:"/images/chains/arbitrum.svg"},_={type:"evm",chainId:8453,name:"Base",cctpDomain:6,logoURI:"/images/chains/base.webp"},F={type:"evm",chainId:84532,name:"Base Sepolia",cctpDomain:6,logoURI:"/images/chains/base.webp"},j={type:"evm",chainId:56,name:"BNB Chain",cctpDomain:null,logoURI:"/images/chains/bsc.webp"},K={type:"evm",chainId:1,name:"Ethereum",cctpDomain:0,logoURI:"/images/chains/ethereum.svg"},V={type:"evm",chainId:11155111,name:"Ethereum Sepolia",cctpDomain:0,logoURI:"/images/chains/ethereum.svg"},X={type:"evm",chainId:43114,name:"Avalanche",cctpDomain:1,logoURI:"/images/chains/avalanche.svg"},G={type:"evm",chainId:43113,name:"Avalanche Fuji",cctpDomain:1,logoURI:"/images/chains/avalanche.svg"},q={type:"starknet",chainId:"0x534e5f4d41494e",name:"Starknet",cctpDomain:null,logoURI:"/images/chains/starknet.svg"};function U(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function W(e){return U(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const J="2.43.4";let T={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${J}`};class p extends Error{constructor(t,n={}){const s=n.cause instanceof p?n.cause.details:n.cause?.message?n.cause.message:n.details,i=n.cause instanceof p&&n.cause.docsPath||n.docsPath,r=T.getDocsUrl?.({...n,docsPath:i}),o=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...r?[`Docs: ${r}`]:[],...s?[`Details: ${s}`]:[],...T.version?[`Version: ${T.version}`]:[]].join(`
2
- `);super(o,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=s,this.docsPath=i,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=J}walk(t){return Q(this,t)}}function Q(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?Q(e.cause,t):t?null:e}class Y extends p{constructor({size:t,targetSize:n,type:s}){super(`${s.charAt(0).toUpperCase()}${s.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}function I(e,{dir:t,size:n=32}={}){return typeof e=="string"?Ee(e,{dir:t,size:n}):ye(e,{dir:t,size:n})}function Ee(e,{dir:t,size:n=32}={}){if(n===null)return e;const s=e.replace("0x","");if(s.length>n*2)throw new Y({size:Math.ceil(s.length/2),targetSize:n,type:"hex"});return`0x${s[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function ye(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new Y({size:e.length,targetSize:n,type:"bytes"});const s=new Uint8Array(n);for(let i=0;i<n;i++){const r=t==="right";s[r?i:n-i-1]=e[r?i:e.length-i-1]}return s}class Se extends p{constructor({max:t,min:n,signed:s,size:i,value:r}){super(`Number "${r}" is not in safe ${i?`${i*8}-bit ${s?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class Ae extends p{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function w(e,{size:t}){if(W(e)>t)throw new Ae({givenSize:W(e),maxSize:t})}function Ue(e,t={}){const{signed:n,size:s}=t,i=BigInt(e);let r;s?n?r=(1n<<BigInt(s)*8n-1n)-1n:r=2n**(BigInt(s)*8n)-1n:typeof e=="number"&&(r=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof r=="bigint"&&n?-r-1n:0;if(r&&i>r||i<o){const d=typeof e=="bigint"?"n":"";throw new Se({max:r?`${r}${d}`:void 0,min:`${o}${d}`,signed:n,size:s,value:`${e}${d}`})}const c=`0x${(n&&i<0?(1n<<BigInt(s*8))+BigInt(i):i).toString(16)}`;return s?I(c,{size:s}):c}const Te=new TextEncoder;function we(e,t={}){return typeof e=="number"||typeof e=="bigint"?De(e,t):typeof e=="boolean"?xe(e,t):U(e)?ee(e,t):te(e,t)}function xe(e,t={}){const n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?(w(n,{size:t.size}),I(n,{size:t.size})):n}const f={zero:48,nine:57,A:65,F:70,a:97,f:102};function Z(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 ee(e,t={}){let n=e;t.size&&(w(n,{size:t.size}),n=I(n,{dir:"right",size:t.size}));let s=n.slice(2);s.length%2&&(s=`0${s}`);const i=s.length/2,r=new Uint8Array(i);for(let o=0,c=0;o<i;o++){const d=Z(s.charCodeAt(c++)),g=Z(s.charCodeAt(c++));if(d===void 0||g===void 0)throw new p(`Invalid byte sequence ("${s[c-2]}${s[c-1]}" in "${s}").`);r[o]=d*16+g}return r}function De(e,t){const n=Ue(e,t);return ee(n)}function te(e,t={}){const n=Te.encode(e);return typeof t.size=="number"?(w(n,{size:t.size}),I(n,{dir:"right",size:t.size})):n}const E=BigInt(2**32-1),ne=BigInt(32);function Ce(e,t=!1){return t?{h:Number(e&E),l:Number(e>>ne&E)}:{h:Number(e>>ne&E)|0,l:Number(e&E)|0}}function ve(e,t=!1){const n=e.length;let s=new Uint32Array(n),i=new Uint32Array(n);for(let r=0;r<n;r++){const{h:o,l:c}=Ce(e[r],t);[s[r],i[r]]=[o,c]}return[s,i]}const Ne=(e,t,n)=>e<<n|t>>>32-n,ke=(e,t,n)=>t<<n|e>>>32-n,Be=(e,t,n)=>t<<n-32|e>>>64-n,Re=(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 se(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function y(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 ie(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 Me(e,t){y(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Oe(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function oe(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}const ze=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Le(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function He(e){for(let t=0;t<e.length;t++)e[t]=Le(e[t]);return e}const re=ze?e=>e:He;function Pe(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function ce(e){return typeof e=="string"&&(e=Pe(e)),y(e),e}class _e{}function Fe(e){const t=s=>e().update(ce(s)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const je=BigInt(0),b=BigInt(1),Ke=BigInt(2),Ve=BigInt(7),Xe=BigInt(256),Ge=BigInt(113),ae=[],ue=[],le=[];for(let e=0,t=b,n=1,s=0;e<24;e++){[n,s]=[s,(2*n+3*s)%5],ae.push(2*(5*s+n)),ue.push((e+1)*(e+2)/2%64);let i=je;for(let r=0;r<7;r++)t=(t<<b^(t>>Ve)*Ge)%Xe,t&Ke&&(i^=b<<(b<<BigInt(r))-b);le.push(i)}const de=ve(le,!0),qe=de[0],We=de[1],fe=(e,t,n)=>n>32?Be(e,t,n):Ne(e,t,n),he=(e,t,n)=>n>32?Re(e,t,n):ke(e,t,n);function Je(e,t=24){const n=new Uint32Array(10);for(let s=24-t;s<24;s++){for(let o=0;o<10;o++)n[o]=e[o]^e[o+10]^e[o+20]^e[o+30]^e[o+40];for(let o=0;o<10;o+=2){const c=(o+8)%10,d=(o+2)%10,g=n[d],m=n[d+1],ct=fe(g,m,1)^n[c],at=he(g,m,1)^n[c+1];for(let A=0;A<50;A+=10)e[o+A]^=ct,e[o+A+1]^=at}let i=e[2],r=e[3];for(let o=0;o<24;o++){const c=ue[o],d=fe(i,r,c),g=he(i,r,c),m=ae[o];i=e[m],r=e[m+1],e[m]=d,e[m+1]=g}for(let o=0;o<50;o+=10){for(let c=0;c<10;c++)n[c]=e[o+c];for(let c=0;c<10;c++)e[o+c]^=~n[(c+2)%10]&n[(c+4)%10]}e[0]^=qe[s],e[1]^=We[s]}oe(n)}class x extends _e{constructor(t,n,s,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=s,this.enableXOF=i,this.rounds=r,se(s),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=Oe(this.state)}clone(){return this._cloneInto()}keccak(){re(this.state32),Je(this.state32,this.rounds),re(this.state32),this.posOut=0,this.pos=0}update(t){ie(this),t=ce(t),y(t);const{blockLen:n,state:s}=this,i=t.length;for(let r=0;r<i;){const o=Math.min(n-this.pos,i-r);for(let c=0;c<o;c++)s[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:s,blockLen:i}=this;t[s]^=n,(n&128)!==0&&s===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){ie(this,!1),y(t),this.finish();const n=this.state,{blockLen:s}=this;for(let i=0,r=t.length;i<r;){this.posOut>=s&&this.keccak();const o=Math.min(s-this.posOut,r-i);t.set(n.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return se(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Me(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,oe(this.state)}_cloneInto(t){const{blockLen:n,suffix:s,outputLen:i,rounds:r,enableXOF:o}=this;return t||(t=new x(n,s,i,o,r)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=r,t.suffix=s,t.outputLen=i,t.enableXOF=o,t.destroyed=this.destroyed,t}}const Qe=(e,t,n)=>Fe(()=>new x(t,e,n)),Ye=Qe(1,136,256/8);function Ze(e,t){return Ye(U(e,{strict:!1})?we(e):e)}class et extends p{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 pe 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 s=this.keys().next().value;s&&this.delete(s)}return this}}const D=new pe(8192);function ge(e,t){if(D.has(`${e}.${t}`))return D.get(`${e}.${t}`);const n=e.substring(2).toLowerCase(),s=Ze(te(n)),i=n.split("");for(let o=0;o<40;o+=2)s[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(s[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());const r=`0x${i.join("")}`;return D.set(`${e}.${t}`,r),r}function h(e,t){if(!nt(e,{strict:!1}))throw new et({address:e});return ge(e,t)}const tt=/^0x[a-fA-F0-9]{40}$/,C=new pe(8192);function nt(e,t){const{strict:n=!0}=t??{},s=`${e}.${n}`;if(C.has(s))return C.get(s);const i=tt.test(e)?e.toLowerCase()===e?!0:n?ge(e)===e:!0:!1;return C.set(s,i),i}const v={chainId:P.chainId,address:h("0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"),symbol:"USDC",fiatISO:"USD",decimals:6,logoURI:"https://pay.daimo.com/coin-logos/usdc.png",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},N={chainId:H.chainId,address:h("0xaf88d065e77c8cC2239327C5EDb3A432268e5831"),symbol:"USDC",name:"USD Coin",decimals:6,logoURI:"https://pay.daimo.com/coin-logos/usdc.png"},k={chainId:G.chainId,address:h("0x5425890298aed601595a70ab815c96711a31bc65"),symbol:"USDC",fiatISO:"USD",decimals:6,logoURI:"https://pay.daimo.com/coin-logos/usdc.png",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},B={chainId:X.chainId,address:h("0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"),symbol:"USDC",fiatISO:"USD",decimals:6,logoURI:"https://pay.daimo.com/coin-logos/usdc.png",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},R={chainId:F.chainId,address:h("0x036CbD53842c5426634e7929541eC2318f3dCF7e"),symbol:"USDC",fiatISO:"USD",decimals:6,logoURI:"https://pay.daimo.com/coin-logos/usdc.png",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},$={chainId:_.chainId,address:h("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"),symbol:"USDC",fiatISO:"USD",decimals:6,logoURI:"https://pay.daimo.com/coin-logos/usdc.png",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},M={chainId:j.chainId,address:h("0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"),symbol:"USDC",decimals:18,logoURI:"https://pay.daimo.com/coin-logos/usdc.png",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},O={chainId:V.chainId,address:h("0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"),symbol:"USDC",decimals:6,logoURI:"https://pay.daimo.com/coin-logos/usdc.png",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},z={chainId:K.chainId,address:h("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"),symbol:"USDC",decimals:6,logoURI:"https://pay.daimo.com/coin-logos/usdc.png",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},st={chainId:q.chainId,address:"0x053C91253BC9682c04929cA02ED00b3E423f6710D2ee7e0D5EBB06F3eCF368A8",symbol:"USDC",decimals:6,logoURI:"https://pay.daimo.com/coin-logos/usdc.png",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},it={[v.chainId]:v,[N.chainId]:N,[k.chainId]:k,[B.chainId]:B,[R.chainId]:R,[$.chainId]:$,[O.chainId]:O,[z.chainId]:z,[M.chainId]:M},S={ARBITRUM_MAINNET:{...H,tokens:{[u.USDC]:N},explorer:"https://arbiscan.io"},ARBITRUM_TESTNET:{...P,explorer:"https://sepolia.arbiscan.io",tokens:{[u.USDC]:v}},AVALANCHE_MAINNET:{...X,tokens:{[u.USDC]:B},explorer:"https://snowtrace.io"},AVALANCHE_TESTNET:{...G,tokens:{[u.USDC]:k},explorer:"https://testnet.snowtrace.io"},BASE_MAINNET:{..._,tokens:{[u.USDC]:$},explorer:"https://basescan.org"},BASE_TESTNET:{...F,tokens:{[u.USDC]:R},explorer:"https://sepolia.basescan.org"},BSC_MAINNET:{...j,tokens:{[u.USDC]:M},explorer:"https://bscscan.com"},ETHEREUM_MAINNET:{...K,tokens:{[u.USDC]:z},explorer:"https://etherscan.io"},ETHEREUM_TESTNET:{...V,tokens:{[u.USDC]:O},explorer:"https://sepolia.etherscan.io"},STARKNET_MAINNET:{...q,tokens:{[u.USDC]:st},explorer:""}};var me=(e=>(e.ARBITRUM="ARBITRUM_MAINNET",e.ARBITRUM_TESTNET="ARBITRUM_TESTNET",e.AVALANCHE="AVALANCHE_MAINNET",e.AVALANCHE_TESTNET="AVALANCHE_TESTNET",e.BASE="BASE_MAINNET",e.BASE_TESTNET="BASE_TESTNET",e.BSC="BSC_MAINNET",e.ETHEREUM="ETHEREUM_MAINNET",e.ETHEREUM_TESTNET="ETHEREUM_TESTNET",e.STARKNET="STARKNET_MAINNET",e))(me||{}),be=(e=>(e.USDC="USDC",e))(be||{});function ot(e){return it[S[e||""].chainId]?.decimals||6}const Ie=e=>{const t=e?.trim().toUpperCase();if(S[t])return S[t]};function rt(e,t){return Ie(e)?.tokens[t]?.address}var L=(e=>(e.PRODUCTION="production",e.STAGING="staging",e))(L||{});class a{constructor({api_key:t,env:n,seesion_token:s,props:i}){this.api_key=t||"",this.sessionToken=s||"",this.env=n??L.PRODUCTION,this.props=i}static async config(t){if(!a.app){if(!t)throw new Error("Please provide an api_key");a.app=new a(t)}return t&&(t.api_key!==void 0&&(a.app.api_key=t.api_key),t.seesion_token!==void 0&&(a.app.sessionToken=t.seesion_token),t.env!==void 0&&(a.app.env=t.env),t.props!==void 0&&(a.app.props=t.props)),a.app}static getApiKey(){if(!a.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return a.app.api_key}static getSessionToken(){if(!a.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return a.app.sessionToken}static getProps(){if(!a.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return a.app.props}static getEnv(){if(!a.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return a.app.env==="internal"?"staging":a.app.env}static getBaseUrl(){if(!a.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");switch(a.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(!a.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");const n=a.app.env==="internal"?"https://chainrails-frontend-git-staging-horus-labs.vercel.app":"https://app.chainrails.io",s=Number(t),i=t&&!isNaN(Number(t))&&s>0?"/pay/":"/deposit/",r=`${t&&!isNaN(Number(t))&&s>0?s*100:""}`;return n+i+r}}l.Chainrails=a,l.allChains=S,l.chains=me,l.environment=L,l.getChainByChainEnum=Ie,l.getTokenAddress=rt,l.getTokenDecimals=ot,l.tokens=be,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(d,u){typeof exports=="object"&&typeof module<"u"?u(exports):typeof define=="function"&&define.amd?define(["exports"],u):(d=typeof globalThis<"u"?globalThis:d||self,u(d.Chainrails={}))})(this,(function(d){"use strict";const u={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={type:u.EVM,chainId:42161,name:"Arbitrum",cctpDomain:3,logoURI:"/images/chains/arbitrum.svg",explorer:"https://arbiscan.io"},v={type:u.EVM,chainId:421614,name:"Arbitrum Sepolia",cctpDomain:3,logoURI:"/images/chains/arbitrum.svg",explorer:"https://sepolia.arbiscan.io"},O={type:u.EVM,chainId:43114,name:"Avalanche",cctpDomain:1,logoURI:"/images/chains/avalanche.svg",explorer:"https://snowtrace.io"},H={type:u.EVM,chainId:43113,name:"Avalanche Fuji",cctpDomain:1,logoURI:"/images/chains/avalanche.svg",explorer:"https://testnet.snowtrace.io"},_={type:u.EVM,chainId:8453,name:"Base",cctpDomain:6,logoURI:"/images/chains/base.webp",explorer:"https://basescan.org"},F={type:u.EVM,chainId:84532,name:"Base Sepolia",cctpDomain:6,logoURI:"/images/chains/base.webp",explorer:"https://sepolia.basescan.org"},L={type:u.EVM,chainId:56,name:"BNB Chain",cctpDomain:null,logoURI:"/images/chains/bsc.webp",explorer:"https://bscscan.com"},be={type:u.EVM,chainId:42220,name:"Celo",cctpDomain:null,logoURI:"/images/chains/celo.svg",explorer:"https://celoscan.io"},$={type:u.EVM,chainId:1,name:"Ethereum",cctpDomain:0,logoURI:"/images/chains/ethereum.svg",explorer:"https://etherscan.io"},P={type:u.EVM,chainId:11155111,name:"Ethereum Sepolia",cctpDomain:0,logoURI:"/images/chains/ethereum.svg",explorer:"https://sepolia.etherscan.io"},V={type:u.EVM,chainId:999,name:"HyperEVM",cctpDomain:19,logoURI:"/images/chains/hyperevm.webp",explorer:"https://liquidscan.io"},Se={type:u.EVM,chainId:59144,name:"Linea",cctpDomain:11,logoURI:"/images/chains/linea.svg",explorer:"https://lineascan.build"},K={type:u.EVM,chainId:1135,name:"Lisk",cctpDomain:null,logoURI:"/images/chains/lisk.png",explorer:"https://blockscout.lisk.com"},z={type:u.EVM,chainId:15,name:"Monad",cctpDomain:7,logoURI:"/images/chains/monad.png",explorer:"https://monadvision.com"},W={type:u.EVM,chainId:10143,name:"Monad Testnet",cctpDomain:null,logoURI:"/images/chains/monad.png",explorer:"https://testnet.monadvision.com"},j={type:u.EVM,chainId:10,name:"Optimism",cctpDomain:2,logoURI:"/images/chains/optimism.svg",explorer:"https://optimistic.etherscan.io"},Y={type:u.EVM,chainId:11155420,name:"Optimism Testnet",cctpDomain:2,logoURI:"/images/chains/optimism.svg",explorer:"https://testnet-explorer.optimism.io"},G={type:u.EVM,chainId:137,name:"Polygon",cctpDomain:7,logoURI:"/images/chains/polygon.svg",explorer:"https://polygonscan.com"},X={type:u.STARKNET,chainId:"0x534e5f4d41494e",name:"Starknet",cctpDomain:25,logoURI:"/images/chains/starknet.svg",explorer:""},q={type:u.STARKNET,chainId:"0x534e5f5345504f4c4941",name:"Starknet Testnet",cctpDomain:null,logoURI:"/images/chains/starknet.svg",explorer:""},Ae={type:u.EVM,chainId:130,name:"Unichain",cctpDomain:10,logoURI:"/images/chains/unichain.webp",explorer:""},Ue={type:u.EVM,chainId:480,name:"Worldchain",cctpDomain:14,logoURI:"/images/chains/worldchain.svg",explorer:""};function y(e,{strict:s=!0}={}){return!e||typeof e!="string"?!1:s?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function J(e){return y(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}const Q="2.43.4";let C={getDocsUrl:({docsBaseUrl:e,docsPath:s="",docsSlug:t})=>s?`${e??"https://viem.sh"}${s}${t?`#${t}`:""}`:void 0,version:`viem@${Q}`};class T extends Error{constructor(s,t={}){const o=t.cause instanceof T?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof T&&t.cause.docsPath||t.docsPath,r=C.getDocsUrl?.({...t,docsPath:i}),a=[s||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...r?[`Docs: ${r}`]:[],...o?[`Details: ${o}`]:[],...C.version?[`Version: ${C.version}`]:[]].join(`
2
+ `);super(a,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=i,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=s,this.version=Q}walk(s){return Z(this,s)}}function Z(e,s){return s?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?Z(e.cause,s):s?null:e}class ee extends T{constructor({size:s,targetSize:t,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${s}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function A(e,{dir:s,size:t=32}={}){return typeof e=="string"?De(e,{dir:s,size:t}):Ie(e,{dir:s,size:t})}function De(e,{dir:s,size:t=32}={}){if(t===null)return e;const o=e.replace("0x","");if(o.length>t*2)throw new ee({size:Math.ceil(o.length/2),targetSize:t,type:"hex"});return`0x${o[s==="right"?"padEnd":"padStart"](t*2,"0")}`}function Ie(e,{dir:s,size:t=32}={}){if(t===null)return e;if(e.length>t)throw new ee({size:e.length,targetSize:t,type:"bytes"});const o=new Uint8Array(t);for(let i=0;i<t;i++){const r=s==="right";o[r?i:t-i-1]=e[r?i:e.length-i-1]}return o}class ye extends T{constructor({max:s,min:t,signed:o,size:i,value:r}){super(`Number "${r}" is not in safe ${i?`${i*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${s?`(${t} to ${s})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class Ce extends T{constructor({givenSize:s,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${s} bytes.`,{name:"SizeOverflowError"})}}function R(e,{size:s}){if(J(e)>s)throw new Ce({givenSize:J(e),maxSize:s})}function Re(e,s={}){const{signed:t,size:o}=s,i=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 a=typeof r=="bigint"&&t?-r-1n:0;if(r&&i>r||i<a){const f=typeof e=="bigint"?"n":"";throw new ye({max:r?`${r}${f}`:void 0,min:`${a}${f}`,signed:t,size:o,value:`${e}${f}`})}const m=`0x${(t&&i<0?(1n<<BigInt(o*8))+BigInt(i):i).toString(16)}`;return o?A(m,{size:o}):m}const Ne=new TextEncoder;function ke(e,s={}){return typeof e=="number"||typeof e=="bigint"?Be(e,s):typeof e=="boolean"?Me(e,s):y(e)?te(e,s):ne(e,s)}function Me(e,s={}){const t=new Uint8Array(1);return t[0]=Number(e),typeof s.size=="number"?(R(t,{size:s.size}),A(t,{size:s.size})):t}const E={zero:48,nine:57,A:65,F:70,a:97,f:102};function se(e){if(e>=E.zero&&e<=E.nine)return e-E.zero;if(e>=E.A&&e<=E.F)return e-(E.A-10);if(e>=E.a&&e<=E.f)return e-(E.a-10)}function te(e,s={}){let t=e;s.size&&(R(t,{size:s.size}),t=A(t,{dir:"right",size:s.size}));let o=t.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 f=se(o.charCodeAt(m++)),p=se(o.charCodeAt(m++));if(f===void 0||p===void 0)throw new T(`Invalid byte sequence ("${o[m-2]}${o[m-1]}" in "${o}").`);r[a]=f*16+p}return r}function Be(e,s){const t=Re(e,s);return te(t)}function ne(e,s={}){const t=Ne.encode(e);return typeof s.size=="number"?(R(t,{size:s.size}),A(t,{dir:"right",size:s.size})):t}const U=BigInt(2**32-1),oe=BigInt(32);function xe(e,s=!1){return s?{h:Number(e&U),l:Number(e>>oe&U)}:{h:Number(e>>oe&U)|0,l:Number(e&U)|0}}function we(e,s=!1){const t=e.length;let o=new Uint32Array(t),i=new Uint32Array(t);for(let r=0;r<t;r++){const{h:a,l:m}=xe(e[r],s);[o[r],i[r]]=[a,m]}return[o,i]}const ve=(e,s,t)=>e<<t|s>>>32-t,Oe=(e,s,t)=>s<<t|e>>>32-t,He=(e,s,t)=>s<<t-32|e>>>64-t,_e=(e,s,t)=>e<<t-32|s>>>64-t;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Fe(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 D(e,...s){if(!Fe(e))throw new Error("Uint8Array expected");if(s.length>0&&!s.includes(e.length))throw new Error("Uint8Array expected of length "+s+", got length="+e.length)}function ae(e,s=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(s&&e.finished)throw new Error("Hash#digest() has already been called")}function Le(e,s){D(e);const t=s.outputLen;if(e.length<t)throw new Error("digestInto() expects output buffer of length at least "+t)}function $e(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function re(...e){for(let s=0;s<e.length;s++)e[s].fill(0)}const Pe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Ve(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Ke(e){for(let s=0;s<e.length;s++)e[s]=Ve(e[s]);return e}const ce=Pe?e=>e:Ke;function ze(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=ze(e)),D(e),e}class We{}function je(e){const s=o=>e().update(de(o)).digest(),t=e();return s.outputLen=t.outputLen,s.blockLen=t.blockLen,s.create=()=>e(),s}const Ye=BigInt(0),S=BigInt(1),Ge=BigInt(2),Xe=BigInt(7),qe=BigInt(256),Je=BigInt(113),le=[],me=[],ue=[];for(let e=0,s=S,t=1,o=0;e<24;e++){[t,o]=[o,(2*t+3*o)%5],le.push(2*(5*o+t)),me.push((e+1)*(e+2)/2%64);let i=Ye;for(let r=0;r<7;r++)s=(s<<S^(s>>Xe)*Je)%qe,s&Ge&&(i^=S<<(S<<BigInt(r))-S);ue.push(i)}const he=we(ue,!0),Qe=he[0],Ze=he[1],ge=(e,s,t)=>t>32?He(e,s,t):ve(e,s,t),fe=(e,s,t)=>t>32?_e(e,s,t):Oe(e,s,t);function es(e,s=24){const t=new Uint32Array(10);for(let o=24-s;o<24;o++){for(let a=0;a<10;a++)t[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,f=(a+2)%10,p=t[f],b=t[f+1],fs=ge(p,b,1)^t[m],Es=fe(p,b,1)^t[m+1];for(let I=0;I<50;I+=10)e[a+I]^=fs,e[a+I+1]^=Es}let i=e[2],r=e[3];for(let a=0;a<24;a++){const m=me[a],f=ge(i,r,m),p=fe(i,r,m),b=le[a];i=e[b],r=e[b+1],e[b]=f,e[b+1]=p}for(let a=0;a<50;a+=10){for(let m=0;m<10;m++)t[m]=e[a+m];for(let m=0;m<10;m++)e[a+m]^=~t[(m+2)%10]&t[(m+4)%10]}e[0]^=Qe[o],e[1]^=Ze[o]}re(t)}class N extends We{constructor(s,t,o,i=!1,r=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=s,this.suffix=t,this.outputLen=o,this.enableXOF=i,this.rounds=r,ie(o),!(0<s&&s<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=$e(this.state)}clone(){return this._cloneInto()}keccak(){ce(this.state32),es(this.state32,this.rounds),ce(this.state32),this.posOut=0,this.pos=0}update(s){ae(this),s=de(s),D(s);const{blockLen:t,state:o}=this,i=s.length;for(let r=0;r<i;){const a=Math.min(t-this.pos,i-r);for(let m=0;m<a;m++)o[this.pos++]^=s[r++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:s,suffix:t,pos:o,blockLen:i}=this;s[o]^=t,(t&128)!==0&&o===i-1&&this.keccak(),s[i-1]^=128,this.keccak()}writeInto(s){ae(this,!1),D(s),this.finish();const t=this.state,{blockLen:o}=this;for(let i=0,r=s.length;i<r;){this.posOut>=o&&this.keccak();const a=Math.min(o-this.posOut,r-i);s.set(t.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return s}xofInto(s){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(s)}xof(s){return ie(s),this.xofInto(new Uint8Array(s))}digestInto(s){if(Le(s,this),this.finished)throw new Error("digest() was already called");return this.writeInto(s),this.destroy(),s}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,re(this.state)}_cloneInto(s){const{blockLen:t,suffix:o,outputLen:i,rounds:r,enableXOF:a}=this;return s||(s=new N(t,o,i,a,r)),s.state32.set(this.state32),s.pos=this.pos,s.posOut=this.posOut,s.finished=this.finished,s.rounds=r,s.suffix=o,s.outputLen=i,s.enableXOF=a,s.destroyed=this.destroyed,s}}const ss=(e,s,t)=>je(()=>new N(s,e,t)),ts=ss(1,136,256/8);function ns(e,s){return ts(y(e,{strict:!1})?ke(e):e)}class os extends T{constructor({address:s}){super(`Address "${s}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class Ee extends Map{constructor(s){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=s}get(s){const t=super.get(s);return super.has(s)&&t!==void 0&&(this.delete(s),super.set(s,t)),t}set(s,t){if(super.set(s,t),this.maxSize&&this.size>this.maxSize){const o=this.keys().next().value;o&&this.delete(o)}return this}}const k=new Ee(8192);function Te(e,s){if(k.has(`${e}.${s}`))return k.get(`${e}.${s}`);const t=e.substring(2).toLowerCase(),o=ns(ne(t)),i=t.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 k.set(`${e}.${s}`,r),r}function g(e,s){if(!as(e,{strict:!1}))throw new os({address:e});return Te(e,s)}const is=/^0x[a-fA-F0-9]{40}$/,M=new Ee(8192);function as(e,s){const{strict:t=!0}=s??{},o=`${e}.${t}`;if(M.has(o))return M.get(o);const i=is.test(e)?e.toLowerCase()===e?!0:t?Te(e)===e:!0:!1;return M.set(o,i),i}const n={USDC:"USDC",USDT:"USDT",DAI:"DAI",BUSD:"BUSD",EURC:"EURC",ETH:"ETH",WETH:"WETH",STRK:"STRK",BNB:"BNB",LORDS:"LORDS"},rs=n.USDC,l={[c.ARBITRUM]:{[n.DAI]:{address:g("0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"),symbol:n.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[n.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:n.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[n.USDC]:{address:g("0xaf88d065e77c8cC2239327C5EDb3A432268e5831"),symbol:n.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"},[n.USDT]:{address:g("0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"),symbol:n.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[n.WETH]:{address:g("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),symbol:n.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.ARBITRUM_TESTNET]:{[n.USDC]:{address:g("0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"),symbol:n.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.AVALANCHE]:{[n.DAI]:{address:"0xd586E7F844cEa2F87f50152665BCbc2C279D8d70",symbol:n.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[n.USDC]:{address:g("0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"),symbol:n.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[n.USDT]:{address:"0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",symbol:n.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[n.WETH]:{address:"0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",symbol:n.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.AVALANCHE_TESTNET]:{[n.USDC]:{address:g("0x5425890298aed601595a70AB815c96711a31Bc65"),symbol:n.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.BASE]:{[n.DAI]:{address:"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",symbol:n.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[n.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:n.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[n.EURC]:{address:"0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",symbol:n.EURC,name:"Euro Coin",decimals:6,logoURI:"/images/tokens/eurc.png"},[n.USDC]:{address:g("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"),symbol:n.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[n.WETH]:{address:g("0x4200000000000000000000000000000000000006"),symbol:n.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.BASE_TESTNET]:{[n.USDC]:{address:g("0x036CbD53842c5426634e7929541eC2318f3dCF7e"),symbol:n.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.BSC]:{[n.BNB]:{address:"0x0000000000000000000000000000000000000000",symbol:n.BNB,name:"BNB",decimals:18,logoURI:"/images/chains/bsc.webp"},[n.BUSD]:{address:"0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",symbol:n.BUSD,name:"Binance USD",decimals:18,logoURI:"/images/tokens/busd.png"},[n.DAI]:{address:"0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3",symbol:n.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[n.ETH]:{address:"0x2170Ed0880ac9A755fd29B2688956BD959F933F8",symbol:n.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[n.USDC]:{address:g("0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"),symbol:n.USDC,decimals:18,name:"USD Coin",logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[n.USDT]:{address:"0x55d398326f99059fF775485246999027B3197955",symbol:n.USDT,name:"Tether USD",decimals:18,logoURI:"/images/tokens/usdt.png"}},[c.ETHEREUM]:{[n.BUSD]:{address:"0x4Fabb145d64652a948d72533023f6E7A623C7C53",symbol:n.BUSD,name:"Binance USD",decimals:18,logoURI:"/images/tokens/busd.png"},[n.DAI]:{address:g("0x6B175474E89094C44Da98b954EedeAC495271d0F"),symbol:n.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[n.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:n.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[n.EURC]:{address:"0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",symbol:n.EURC,name:"Euro Coin",decimals:6,logoURI:"/images/tokens/eurc.png"},[n.STRK]:{address:"0xCa14007Eff0dB1f8135f4C25B34De49AB0d42766",symbol:n.STRK,name:"Starknet Token",decimals:18,logoURI:"/images/chains/starknet.svg"},[n.USDC]:{address:g("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"),symbol:n.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[n.USDT]:{address:g("0xdAC17F958D2ee523a2206206994597C13D831ec7"),symbol:n.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[n.WETH]:{address:g("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),symbol:n.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.ETHEREUM_TESTNET]:{[n.USDC]:{address:g("0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"),symbol:n.USDC,decimals:6,name:"USD Coin",logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.HYPEREVM]:{[n.USDC]:{address:"0xb88339CB7199b77E23DB6E890353E22632Ba630f",symbol:n.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.LISK]:{[n.USDC]:{address:"0xF242275d3a6527d877f2c927a82D9b057609cc71",symbol:n.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.MONAD]:{[n.USDC]:{address:"0x754704Bc059F8C67012fEd69BC8A327a5aafb603",symbol:n.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.MONAD_TESTNET]:{[n.USDC]:{address:"0x534b2f3A21130d7a60830c2Df862319e593943A3",symbol:n.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.OPTIMISM]:{[n.DAI]:{address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",symbol:n.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[n.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:n.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[n.USDC]:{address:"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",symbol:n.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"},[n.USDT]:{address:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",symbol:n.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[n.WETH]:{address:"0x4200000000000000000000000000000000000006",symbol:n.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.OPTIMISM_TESTNET]:{[n.USDC]:{address:"0x5fd84259d66Cd46123540766Be93DFE6D43130D7",symbol:n.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.POLYGON]:{[n.DAI]:{address:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",symbol:n.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[n.USDC]:{address:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",symbol:n.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"},[n.USDT]:{address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",symbol:n.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[n.WETH]:{address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",symbol:n.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.STARKNET]:{[n.DAI]:{address:"0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad",symbol:n.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[n.ETH]:{address:"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",symbol:n.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[n.LORDS]:{address:"0x0124aeb495b947201f5faC96fD1138E326AD86195B98df6DEc9009158A533B49",symbol:n.LORDS,name:"LORDS Token",decimals:18,logoURI:"/images/tokens/lords.png"},[n.STRK]:{address:"0x04718f5a0Fc34cC1AF16A1cdee98fFB20C31f5cD61D6Ab07201858f4287c938D",symbol:n.STRK,name:"Starknet Token",decimals:18,logoURI:"/images/chains/starknet.svg"},[n.USDC]:{address:"0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb",symbol:n.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[n.USDT]:{address:"0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",symbol:n.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"}},[c.STARKNET_TESTNET]:{[n.USDC]:{address:"0x0512feAc6339Ff7889822cb5aA2a86C848e9D392bB0E3E237C008674feeD8343",symbol:n.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}}},cs={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]},ds={ARBITRUM_MAINNET:{...w,tokens:l[c.ARBITRUM]},ARBITRUM_TESTNET:{...v,tokens:l[c.ARBITRUM_TESTNET]},AVALANCHE_MAINNET:{...O,tokens:l[c.AVALANCHE]},AVALANCHE_TESTNET:{...H,tokens:l[c.AVALANCHE_TESTNET]},BASE_MAINNET:{..._,tokens:l[c.BASE]},BASE_TESTNET:{...F,tokens:l[c.BASE_TESTNET]},BSC_MAINNET:{...L,tokens:l[c.BSC]},ETHEREUM_MAINNET:{...$,tokens:l[c.ETHEREUM]},ETHEREUM_TESTNET:{...P,tokens:l[c.ETHEREUM_TESTNET]},HYPEREVM_MAINNET:{...V,tokens:l[c.HYPEREVM]},LISK_MAINNET:{...K,tokens:l[c.LISK]},MONAD_MAINNET:{...z,tokens:l[c.MONAD]},MONAD_TESTNET:{...W,tokens:l[c.MONAD_TESTNET]},OPTIMISM_MAINNET:{...j,tokens:l[c.OPTIMISM]},OPTIMISM_TESTNET:{...Y,tokens:l[c.OPTIMISM_TESTNET]},POLYGON_MAINNET:{...G,tokens:l[c.POLYGON]},STARKNET_MAINNET:{...X,tokens:l[c.STARKNET]},STARKNET_TESTNET:{...q,tokens:l[c.STARKNET_TESTNET]}};function ls(e,s){if(e.symbol!==s)throw new Error(`Token symbol mismatch: token is ${e.symbol}, tokenSymbol is ${s}. The token symbol must match the tokenSymbol parameter.`)}function pe(e,s){const t=s.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()===t.toLowerCase()){i=a;break}}if(!i)throw new Error(`Token address mismatch: address ${s} does not exist on chain ${e}. The token address must be a valid token address on the specified chain.`);return i}function ms(e,s){if(e.symbol!==s)throw new Error(`Token symbol mismatch: token symbol is "${e.symbol}", expected "${s}". The token symbol must match the expected token symbol.`)}function us(e,s,t){const o=pe(e,s);if(o.symbol!==t)throw new Error(`Token address and symbol mismatch: address ${s} 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 B(e,s){return l[e]?.[s]}function hs(e,s){return B(e,s)?.address}function gs(e,s){return B(e,s)?.decimals}var x=(e=>(e.PRODUCTION="production",e.STAGING="staging",e))(x||{});class h{constructor({api_key:s,env:t,seesion_token:o,props:i}){this.api_key=s||"",this.sessionToken=o||"",this.env=t??x.PRODUCTION,this.props=i}static async config(s){if(!h.app){if(!s)throw new Error("Please provide an api_key");h.app=new h(s)}return s&&(s.api_key!==void 0&&(h.app.api_key=s.api_key),s.seesion_token!==void 0&&(h.app.sessionToken=s.seesion_token),s.env!==void 0&&(h.app.env=s.env),s.props!==void 0&&(h.app.props=s.props)),h.app}static getApiKey(){if(!h.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return h.app.api_key}static getSessionToken(){if(!h.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return h.app.sessionToken}static getProps(){if(!h.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return h.app.props}static getEnv(){if(!h.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return h.app.env==="internal"?"staging":h.app.env}static getBaseUrl(){if(!h.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");switch(h.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(s){if(!h.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");const t=h.app.env==="internal"?"https://chainrails-frontend-git-staging-horus-labs.vercel.app":"https://app.chainrails.io",o=Number(s),i=s&&!isNaN(Number(s))&&o>0?"/pay/":"/deposit/",r=`${s&&!isNaN(Number(s))&&o>0?o*100:""}`;return t+i+r}}d.AmountSymbols=n,d.ChainTypes=u,d.Chainrails=h,d.Chains=c,d.DEFAULT_AMOUNT_SYMBOL=rs,d.TOKEN_REGISTRY=l,d.Tokens=cs,d.allChains=ds,d.arbitrum=w,d.arbitrumTestnet=v,d.assertTokenAddressMatchesChain=pe,d.assertTokenAddressMatchesChainAndSymbol=us,d.assertTokenMatchesAmountSymbol=ls,d.assertTokenSymbolMatches=ms,d.avalanche=O,d.avalancheTestnet=H,d.base=_,d.baseTestnet=F,d.bsc=L,d.celo=be,d.environment=x,d.ethereum=$,d.ethereumTestnet=P,d.getToken=B,d.getTokenAddress=hs,d.getTokenDecimals=gs,d.hyperevm=V,d.linea=Se,d.lisk=K,d.monad=z,d.monadTestnet=W,d.optimism=j,d.optimismTestnet=Y,d.polygon=G,d.starknet=X,d.starknetTestnet=q,d.unichain=Ae,d.worldchain=Ue,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { chains, allChains } from "./src/chains";
2
- export { tokens, getTokenDecimals } from "./src/tokens";
3
- export { getChainByChainEnum, getTokenAddress } from "./src/tokenAddresses";
1
+ export * from "./src/chains";
2
+ export * from "./src/tokens";
4
3
  export { environment } from "./src/environment";
5
4
  export { Chainrails } from "./src/app";
5
+ export * from "./src/amountSymbols";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare const AmountSymbols: {
2
+ readonly USDC: "USDC";
3
+ readonly USDT: "USDT";
4
+ readonly DAI: "DAI";
5
+ readonly BUSD: "BUSD";
6
+ readonly EURC: "EURC";
7
+ readonly ETH: "ETH";
8
+ readonly WETH: "WETH";
9
+ readonly STRK: "STRK";
10
+ readonly BNB: "BNB";
11
+ readonly LORDS: "LORDS";
12
+ };
13
+ export type AmountSymbol = keyof typeof AmountSymbols;
14
+ export declare const DEFAULT_AMOUNT_SYMBOL: "USDC";
15
+ //# sourceMappingURL=constant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../../src/amountSymbols/constant.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;CAWhB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,aAAa,CAAC;AAEtD,eAAO,MAAM,qBAAqB,QAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./constant";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/amountSymbols/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -1,5 +1,3 @@
1
- import { chainData } from "./types";
2
- export declare const allChains: {
3
- [k: string]: chainData;
4
- };
1
+ import { Chain, ChainData } from "./types";
2
+ export declare const allChains: Record<Chain, ChainData>;
5
3
  //# sourceMappingURL=all.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../../src/chains/all.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AA4BpC,eAAO,MAAM,SAAS,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAuE/C,CAAC"}
1
+ {"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../../src/chains/all.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AA0B3C,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,CAyE9C,CAAC"}
@@ -1,25 +1,48 @@
1
- import { Chain } from "./types";
2
- export declare enum TokenEnum {
3
- USDC = "USDC"
4
- }
5
- export declare const arbitrum: Chain;
6
- export declare const arbitrumTestnet: Chain;
7
- export declare const base: Chain;
8
- export declare const baseTestnet: Chain;
9
- export declare const bsc: Chain;
10
- export declare const celo: Chain;
11
- export declare const ethereum: Chain;
12
- export declare const ethereumTestnet: Chain;
13
- export declare const linea: Chain;
14
- export declare const optimism: Chain;
15
- export declare const polygon: Chain;
16
- export declare const unichain: Chain;
17
- export declare const avalanche: Chain;
18
- export declare const avalancheTestnet: Chain;
19
- export declare const starknet: Chain;
20
- export declare const worldchain: Chain;
21
- export declare const lisk: Chain;
22
- export declare const hyperevm: Chain;
23
- export declare const supportedChains: Chain[];
24
- export declare const featuredChains: Chain[];
1
+ import { ChainItem } from "./types";
2
+ export declare const ChainTypes: {
3
+ readonly EVM: "EVM";
4
+ readonly STARKNET: "STARKNET";
5
+ };
6
+ export declare const Chains: {
7
+ readonly ARBITRUM: "ARBITRUM_MAINNET";
8
+ readonly ARBITRUM_TESTNET: "ARBITRUM_TESTNET";
9
+ readonly AVALANCHE: "AVALANCHE_MAINNET";
10
+ readonly AVALANCHE_TESTNET: "AVALANCHE_TESTNET";
11
+ readonly BASE: "BASE_MAINNET";
12
+ readonly BASE_TESTNET: "BASE_TESTNET";
13
+ readonly BSC: "BSC_MAINNET";
14
+ readonly ETHEREUM: "ETHEREUM_MAINNET";
15
+ readonly ETHEREUM_TESTNET: "ETHEREUM_TESTNET";
16
+ readonly HYPEREVM: "HYPEREVM_MAINNET";
17
+ readonly LISK: "LISK_MAINNET";
18
+ readonly MONAD: "MONAD_MAINNET";
19
+ readonly MONAD_TESTNET: "MONAD_TESTNET";
20
+ readonly OPTIMISM: "OPTIMISM_MAINNET";
21
+ readonly OPTIMISM_TESTNET: "OPTIMISM_TESTNET";
22
+ readonly POLYGON: "POLYGON_MAINNET";
23
+ readonly STARKNET: "STARKNET_MAINNET";
24
+ readonly STARKNET_TESTNET: "STARKNET_TESTNET";
25
+ };
26
+ export declare const arbitrum: ChainItem;
27
+ export declare const arbitrumTestnet: ChainItem;
28
+ export declare const avalanche: ChainItem;
29
+ export declare const avalancheTestnet: ChainItem;
30
+ export declare const base: ChainItem;
31
+ export declare const baseTestnet: ChainItem;
32
+ export declare const bsc: ChainItem;
33
+ export declare const celo: ChainItem;
34
+ export declare const ethereum: ChainItem;
35
+ export declare const ethereumTestnet: ChainItem;
36
+ export declare const hyperevm: ChainItem;
37
+ export declare const linea: ChainItem;
38
+ export declare const lisk: ChainItem;
39
+ export declare const monad: ChainItem;
40
+ export declare const monadTestnet: ChainItem;
41
+ export declare const optimism: ChainItem;
42
+ export declare const optimismTestnet: ChainItem;
43
+ export declare const polygon: ChainItem;
44
+ export declare const starknet: ChainItem;
45
+ export declare const starknetTestnet: ChainItem;
46
+ export declare const unichain: ChainItem;
47
+ export declare const worldchain: ChainItem;
25
48
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/chains/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,oBAAY,SAAS;IACnB,IAAI,SAAS;CACd;AAED,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAM7B,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,KAMjB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAM7B,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAM9B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,EAkBlC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,EAA+B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/chains/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,UAAU;;;CAGb,CAAC;AAGX,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;CAmBT,CAAC;AAGX,eAAO,MAAM,QAAQ,EAAE,SAOtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SAO7B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAOvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,SAO9B,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,SAOlB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,SAOzB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,SAOjB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,SAOlB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,SAOtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SAO7B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,SAOtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,SAOnB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,SAOlB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,SAOnB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,SAO1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,SAOtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SAO7B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,SAOrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,SAOtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SAO7B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,SAOtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,SAOxB,CAAC"}
@@ -1,14 +1,4 @@
1
- export declare enum chains {
2
- ARBITRUM = "ARBITRUM_MAINNET",
3
- ARBITRUM_TESTNET = "ARBITRUM_TESTNET",
4
- AVALANCHE = "AVALANCHE_MAINNET",
5
- AVALANCHE_TESTNET = "AVALANCHE_TESTNET",
6
- BASE = "BASE_MAINNET",
7
- BASE_TESTNET = "BASE_TESTNET",
8
- BSC = "BSC_MAINNET",
9
- ETHEREUM = "ETHEREUM_MAINNET",
10
- ETHEREUM_TESTNET = "ETHEREUM_TESTNET",
11
- STARKNET = "STARKNET_MAINNET"
12
- }
13
- export { allChains } from "./all";
1
+ export * from "./constants";
2
+ export * from "./types";
3
+ export * from "./all";
14
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chains/index.ts"],"names":[],"mappings":"AAAA,oBAAY,MAAM;IAChB,QAAQ,qBAAqB;IAC7B,gBAAgB,qBAAqB;IACrC,SAAS,sBAAsB;IAC/B,iBAAiB,sBAAsB;IACvC,IAAI,iBAAiB;IACrB,YAAY,iBAAiB;IAC7B,GAAG,gBAAgB;IACnB,QAAQ,qBAAqB;IAC7B,gBAAgB,qBAAqB;IACrC,QAAQ,qBAAqB;CAC9B;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chains/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC"}
@@ -1,14 +1,17 @@
1
- import { Token, tokens } from "src/tokens";
2
- export type ChainType = "evm" | "starknet";
3
- export type Chain = {
1
+ import { Token } from "src/tokens";
2
+ import { AmountSymbol } from "src/amountSymbols";
3
+ import { Chains, ChainTypes } from "./constants";
4
+ export type ChainType = (typeof ChainTypes)[keyof typeof ChainTypes];
5
+ export type Chain = typeof Chains[keyof typeof Chains];
6
+ export type ChainItem = {
4
7
  type: ChainType;
5
8
  chainId: number | string;
6
9
  name: string;
7
10
  cctpDomain: number | null;
8
11
  logoURI: string;
9
- };
10
- export type chainData = Chain & {
11
- tokens: Partial<Record<tokens, Token>>;
12
12
  explorer: string;
13
13
  };
14
+ export type ChainData = ChainItem & {
15
+ tokens: Partial<Record<AmountSymbol, Token>>;
16
+ };
14
17
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/chains/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,UAAU,CAAC;AAE3C,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG;IAC9B,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/chains/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGjD,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAErE,MAAM,MAAM,KAAK,GAAG,OAAO,MAAM,CAAC,MAAM,OAAO,MAAM,CAAC,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG;IAClC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;CAC9C,CAAC"}
@@ -1,15 +1,5 @@
1
- export type Token = {
2
- chainId: number | string;
3
- address: `0x${string}` | string;
4
- name?: string;
5
- symbol: string;
6
- decimals: number;
7
- fiatISO?: string;
8
- logoURI: string;
9
- logoSourceURI?: string;
10
- };
11
- export declare enum tokens {
12
- USDC = "USDC"
13
- }
14
- export declare function getTokenDecimals(chain: string): number;
1
+ export { Tokens, TOKEN_REGISTRY } from "./registry";
2
+ export * from "./types";
3
+ export * from "./validation";
4
+ export * from "./utils";
15
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tokens/index.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,EAAE,KAAK,MAAM,EAAE,GAAG,MAAM,CAAC;IAChC,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;CACxB,CAAC;AAEF,oBAAY,MAAM;IAChB,IAAI,SAAS;CACd;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,UAE7C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tokens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACpD,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { TokenRegistry } from "./types";
2
+ export declare enum TokenLogo {
3
+ ETH = "/images/chains/ethereum.svg",
4
+ USDC = "/images/tokens/usdc.svg",
5
+ USDT = "/images/tokens/usdt.png",
6
+ DAI = "/images/tokens/dai.png",
7
+ SOL = "/images/tokens/sol.png",
8
+ LORDS = "/images/tokens/lords.png",
9
+ STRK = "/images/chains/starknet.svg",
10
+ WETH = "/images/tokens/weth.png",
11
+ BUSD = "/images/tokens/busd.png",
12
+ EURC = "/images/tokens/eurc.png",
13
+ BNB = "/images/chains/bsc.webp"
14
+ }
15
+ /**
16
+ * Centralized token registry
17
+ * Structure: TOKEN_REGISTRY[chain][symbol] -> Token
18
+ *
19
+ * This registry contains all tokens across all supported chains.
20
+ * Tokens are organized by chain, then by symbol for easy lookup.
21
+ * @internal - This is an internal registry and should not be exported.
22
+ */
23
+ export declare const TOKEN_REGISTRY: TokenRegistry;
24
+ /**
25
+ * Token registry with friendly aliases
26
+ * Provides easy access like Tokens.ETHEREUM.USDC.address
27
+ * Maps ETHEREUM -> ETHEREUM_MAINNET, and includes all testnet keys directly
28
+ */
29
+ export declare const Tokens: {
30
+ readonly ARBITRUM: Partial<Record<"USDC" | "USDT" | "DAI" | "BUSD" | "EURC" | "ETH" | "WETH" | "STRK" | "BNB" | "LORDS", import("./types").Token>>;
31
+ readonly ARBITRUM_TESTNET: Partial<Record<"USDC" | "USDT" | "DAI" | "BUSD" | "EURC" | "ETH" | "WETH" | "STRK" | "BNB" | "LORDS", import("./types").Token>>;
32
+ readonly AVALANCHE: Partial<Record<"USDC" | "USDT" | "DAI" | "BUSD" | "EURC" | "ETH" | "WETH" | "STRK" | "BNB" | "LORDS", import("./types").Token>>;
33
+ readonly AVALANCHE_TESTNET: Partial<Record<"USDC" | "USDT" | "DAI" | "BUSD" | "EURC" | "ETH" | "WETH" | "STRK" | "BNB" | "LORDS", import("./types").Token>>;
34
+ readonly BASE: Partial<Record<"USDC" | "USDT" | "DAI" | "BUSD" | "EURC" | "ETH" | "WETH" | "STRK" | "BNB" | "LORDS", import("./types").Token>>;
35
+ readonly BASE_TESTNET: Partial<Record<"USDC" | "USDT" | "DAI" | "BUSD" | "EURC" | "ETH" | "WETH" | "STRK" | "BNB" | "LORDS", import("./types").Token>>;
36
+ readonly BSC: Partial<Record<"USDC" | "USDT" | "DAI" | "BUSD" | "EURC" | "ETH" | "WETH" | "STRK" | "BNB" | "LORDS", import("./types").Token>>;
37
+ readonly ETHEREUM: Partial<Record<"USDC" | "USDT" | "DAI" | "BUSD" | "EURC" | "ETH" | "WETH" | "STRK" | "BNB" | "LORDS", import("./types").Token>>;
38
+ readonly ETHEREUM_TESTNET: Partial<Record<"USDC" | "USDT" | "DAI" | "BUSD" | "EURC" | "ETH" | "WETH" | "STRK" | "BNB" | "LORDS", import("./types").Token>>;
39
+ readonly STARKNET: Partial<Record<"USDC" | "USDT" | "DAI" | "BUSD" | "EURC" | "ETH" | "WETH" | "STRK" | "BNB" | "LORDS", import("./types").Token>>;
40
+ };
41
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +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,aAsanB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;CAWT,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { Chain } from "../chains/types";
2
+ import { AmountSymbol } from "../amountSymbols";
3
+ /**
4
+ * Token type representing any token on a chain
5
+ */
6
+ export type Token = {
7
+ address: `0x${string}`;
8
+ name?: string;
9
+ symbol: string;
10
+ decimals: number;
11
+ fiatISO?: string;
12
+ logoURI: string;
13
+ logoSourceURI?: string;
14
+ };
15
+ /**
16
+ * Chain key type - all valid chain enum values (e.g., "ARBITRUM_MAINNET", "ETHEREUM_MAINNET")
17
+ */
18
+ /**
19
+ * Token registry structure
20
+ * Maps chain -> symbol -> Token
21
+ * Using Record to allow partial token coverage per chain
22
+ */
23
+ export type TokenRegistry = Record<Chain, Partial<Record<AmountSymbol, Token>>>;
24
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tokens/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,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;CACxB,CAAC;AAEF;;GAEG;AAGH;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { Token } from "./types";
2
+ import { Chain } from "../chains/types";
3
+ import { AmountSymbol } from "../amountSymbols";
4
+ /**
5
+ * Get token by chain and symbol
6
+ *
7
+ * @param chain - The chain key (e.g., chains.ETHEREUM)
8
+ * @param symbol - The token symbol (e.g., "USDC", "ETH")
9
+ * @returns Token object or undefined if not found
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * const usdc = getToken(chains.ETHEREUM, "USDC");
14
+ * const eth = getToken(chains.ETHEREUM, "ETH");
15
+ * ```
16
+ */
17
+ export declare function getToken(chain: Chain, symbol: AmountSymbol): Token | undefined;
18
+ /**
19
+ * Get token address by chain and symbol
20
+ * Backward compatible function that returns just the address string
21
+ *
22
+ * @param chain - The chain key (e.g., chains.ETHEREUM)
23
+ * @param symbol - The token symbol (e.g., "USDC", "ETH")
24
+ * @returns Token address string or undefined if not found
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * const usdcAddress = getTokenAddress(chains.ETHEREUM, "USDC");
29
+ * ```
30
+ */
31
+ export declare function getTokenAddress(chain: Chain, symbol: AmountSymbol): `0x${string}` | undefined;
32
+ /**
33
+ * Get token decimals for a given chain
34
+ * Legacy function kept for backward compatibility
35
+ *
36
+ * @param chain - The chain string identifier
37
+ * @returns Token decimals (defaults to 6 for USDC)
38
+ */
39
+ export declare function getTokenDecimals(chain: Chain, symbol: AmountSymbol): number | undefined;
40
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/tokens/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,GAAG,KAAK,GAAG,SAAS,CAE9E;AAGD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,GAAG,KAAK,MAAM,EAAE,GAAG,SAAS,CAG7F;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,sBAGlE"}
@@ -0,0 +1,56 @@
1
+ import { AmountSymbol } from "../amountSymbols";
2
+ import { Token } from "./types";
3
+ import { Chain } from "../chains/types";
4
+ export declare function assertTokenMatchesAmountSymbol(token: Token, tokenSymbol: AmountSymbol): asserts token is Token;
5
+ /**
6
+ * Asserts that a token address exists on the specified chain.
7
+ *
8
+ * @param chainKey - The chain key (e.g., "ETHEREUM_MAINNET")
9
+ * @param tokenAddress - The token address to validate
10
+ * @returns The token object if found
11
+ * @throws Error if the address does not exist on the specified chain
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * const token = assertTokenAddressMatchesChain(chains.ETHEREUM, "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48");
16
+ * ```
17
+ */
18
+ export declare function assertTokenAddressMatchesChain(chainKey: Chain, tokenAddress: string): Token;
19
+ /**
20
+ * Asserts that a token's symbol matches the expected token symbol.
21
+ *
22
+ * @param token - The token object to validate
23
+ * @param tokenSymbol - The expected token symbol
24
+ * @throws Error if the token symbol does not match
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * const token = getToken(chains.ETHEREUM, "USDC");
29
+ * assertTokenSymbolMatches(token, "USDC");
30
+ * ```
31
+ */
32
+ export declare function assertTokenSymbolMatches(token: Token, tokenSymbol: AmountSymbol): asserts token is Token;
33
+ /**
34
+ * Asserts that a token address exists on the specified chain AND matches the expected token symbol.
35
+ * This is a combined validation that checks both conditions and provides clear error messages.
36
+ *
37
+ * @param chainKey - The chain key (e.g., "ETHEREUM_MAINNET")
38
+ * @param tokenAddress - The token address to validate
39
+ * @param tokenSymbol - The expected token symbol
40
+ * @returns The token object if both validations pass
41
+ * @throws Error with specific message if:
42
+ * - Chain is not found
43
+ * - Address does not exist on the chain
44
+ * - Address exists but token symbol doesn't match
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * const token = assertTokenAddressMatchesChainAndSymbol(
49
+ * chains.ETHEREUM,
50
+ * "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
51
+ * "USDC"
52
+ * );
53
+ * ```
54
+ */
55
+ export declare function assertTokenAddressMatchesChainAndSymbol(chainKey: Chain, tokenAddress: string, tokenSymbol: AmountSymbol): Token;
56
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/tokens/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,YAAY,GACxB,OAAO,CAAC,KAAK,IAAI,KAAK,CAOxB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,KAAK,EACf,YAAY,EAAE,MAAM,GACnB,KAAK,CAkCP;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,YAAY,GACxB,OAAO,CAAC,KAAK,IAAI,KAAK,CAOxB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,uCAAuC,CACrD,QAAQ,EAAE,KAAK,EACf,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,YAAY,GACxB,KAAK,CAcP"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chainrails/common",
3
3
  "sideEffects": false,
4
- "version": "0.2.3",
4
+ "version": "0.2.5",
5
5
  "main": "./dist/chainrails-common.umd.js",
6
6
  "module": "./dist/chainrails-common.es.mjs",
7
7
  "license": "MIT",
@@ -1,8 +0,0 @@
1
- import { chains } from "../chains";
2
- import { allChains } from "../chains/all";
3
- import { chainData } from "../chains/types";
4
- import { tokens } from "../tokens";
5
- /** @description Get a chain by chain enum */
6
- export declare const getChainByChainEnum: (chainEnum: keyof typeof allChains) => chainData | undefined;
7
- export declare function getTokenAddress(destinationChain: keyof typeof chains, destinationToken: keyof typeof tokens): string | undefined;
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tokenAddresses/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAS,MAAM,EAAE,MAAM,WAAW,CAAC;AAE1C,6CAA6C;AAC7C,eAAO,MAAM,mBAAmB,cAAe,MAAM,OAAO,SAAS,KAAG,SAAS,GAAG,SAMnF,CAAC;AAEF,wBAAgB,eAAe,CAAC,gBAAgB,EAAE,MAAM,OAAO,MAAM,EAAE,gBAAgB,EAAE,MAAM,OAAO,MAAM,sBAI3G"}
@@ -1,35 +0,0 @@
1
- import { Token } from ".";
2
- export declare enum TokenLogo {
3
- ETH = "https://pay.daimo.com/chain-logos/ethereum.png",
4
- WETH = "https://pay.daimo.com/coin-logos/weth.png",
5
- USDC = "https://pay.daimo.com/coin-logos/usdc.png",
6
- EURC = "https://pay.daimo.com/coin-logos/eurc.png",
7
- USDT = "https://pay.daimo.com/coin-logos/usdt.png",
8
- DAI = "https://pay.daimo.com/coin-logos/dai.png",
9
- POL = "https://pay.daimo.com/coin-logos/pol.png",
10
- AVAX = "https://pay.daimo.com/coin-logos/avax.png",
11
- BNB = "https://pay.daimo.com/coin-logos/bnb.png",
12
- SOL = "https://pay.daimo.com/coin-logos/sol.png",
13
- WLD = "https://pay.daimo.com/coin-logos/wld.jpeg",
14
- USDB = "https://pay.daimo.com/coin-logos/usdb.png",
15
- BLAST = "https://pay.daimo.com/coin-logos/blast.jpg",
16
- WBTC = "https://pay.daimo.com/coin-logos/wbtc.png",
17
- MNT = "https://pay.daimo.com/coin-logos/mnt.png",
18
- CELO = "https://pay.daimo.com/coin-logos/celo.png",
19
- cUSD = "https://pay.daimo.com/coin-logos/cusd.png"
20
- }
21
- export declare const arbitrumTestnetUSDC: Token;
22
- export declare const arbitrumUSDC: Token;
23
- export declare const avalancheTestnetUSDC: Token;
24
- export declare const avalancheUSDC: Token;
25
- export declare const baseTestnetUSDC: Token;
26
- export declare const baseUSDC: Token;
27
- export declare const bscUSDC: Token;
28
- export declare const ethereumTestnetUSDC: Token;
29
- export declare const ethereumUSDC: Token;
30
- export declare const starknetUSDC: Token;
31
- export declare const supportedTokens: Token[];
32
- export declare const EVM_USDC_TOKENS: {
33
- [x: string]: Token;
34
- };
35
- //# sourceMappingURL=all.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"all.d.ts","sourceRoot":"","sources":["../../../src/tokens/all.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE1B,oBAAY,SAAS;IACnB,GAAG,mDAAmD;IACtD,IAAI,8CAA8C;IAClD,IAAI,8CAA8C;IAClD,IAAI,8CAA8C;IAClD,IAAI,8CAA8C;IAClD,GAAG,6CAA6C;IAChD,GAAG,6CAA6C;IAChD,IAAI,8CAA8C;IAClD,GAAG,6CAA6C;IAChD,GAAG,6CAA6C;IAChD,GAAG,8CAA8C;IACjD,IAAI,8CAA8C;IAClD,KAAK,+CAA+C;IACpD,IAAI,8CAA8C;IAClD,GAAG,6CAA6C;IAChD,IAAI,8CAA8C;IAClD,IAAI,8CAA8C;CACnD;AAED,eAAO,MAAM,mBAAmB,EAAE,KAQjC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAQlC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAQ7B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAOjC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,EAWlC,CAAC;AAEF,eAAO,MAAM,eAAe;;CAU3B,CAAC"}