@chainrails/sdk 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chainrails-sdk.es.js +379 -306
- package/dist/chainrails-sdk.es.mjs +379 -306
- package/dist/chainrails-sdk.umd.js +2 -2
- package/dist/src/Auth/index.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(m,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("ky")):typeof define=="function"&&define.amd?define(["exports","ky"],b):(m=typeof globalThis<"u"?globalThis:m||self,b(m.Chainrails={},m.Ky))})(this,(function(m,b){"use strict";const 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"},
|
|
2
|
-
`);super(i,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=a,this.docsPath=o,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=e,this.version=H}walk(e){return P(this,e)}}function P(s,e){return e?.(s)?s:s&&typeof s=="object"&&"cause"in s&&s.cause!==void 0?P(s.cause,e):e?null:s}class $ extends S{constructor({size:e,targetSize:n,type:a}){super(`${a.charAt(0).toUpperCase()}${a.slice(1).toLowerCase()} size (${e}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}function D(s,{dir:e,size:n=32}={}){return typeof s=="string"?ae(s,{dir:e,size:n}):oe(s,{dir:e,size:n})}function ae(s,{dir:e,size:n=32}={}){if(n===null)return s;const a=s.replace("0x","");if(a.length>n*2)throw new $({size:Math.ceil(a.length/2),targetSize:n,type:"hex"});return`0x${a[e==="right"?"padEnd":"padStart"](n*2,"0")}`}function oe(s,{dir:e,size:n=32}={}){if(n===null)return s;if(s.length>n)throw new $({size:s.length,targetSize:n,type:"bytes"});const a=new Uint8Array(n);for(let o=0;o<n;o++){const r=e==="right";a[r?o:n-o-1]=s[r?o:s.length-o-1]}return a}class ie extends S{constructor({max:e,min:n,signed:a,size:o,value:r}){super(`Number "${r}" is not in safe ${o?`${o*8}-bit ${a?"signed":"unsigned"} `:""}integer range ${e?`(${n} to ${e})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class re extends S{constructor({givenSize:e,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function B(s,{size:e}){if(F(s)>e)throw new re({givenSize:F(s),maxSize:e})}function ce(s,e={}){const{signed:n,size:a}=e,o=BigInt(s);let r;a?n?r=(1n<<BigInt(a)*8n-1n)-1n:r=2n**(BigInt(a)*8n)-1n:typeof s=="number"&&(r=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof r=="bigint"&&n?-r-1n:0;if(r&&o>r||o<i){const f=typeof s=="bigint"?"n":"";throw new ie({max:r?`${r}${f}`:void 0,min:`${i}${f}`,signed:n,size:a,value:`${s}${f}`})}const d=`0x${(n&&o<0?(1n<<BigInt(a*8))+BigInt(o):o).toString(16)}`;return a?D(d,{size:a}):d}const de=new TextEncoder;function le(s,e={}){return typeof s=="number"||typeof s=="bigint"?ge(s,e):typeof s=="boolean"?ue(s,e):R(s)?L(s,e):_(s,e)}function ue(s,e={}){const n=new Uint8Array(1);return n[0]=Number(s),typeof e.size=="number"?(B(n,{size:e.size}),D(n,{size:e.size})):n}const T={zero:48,nine:57,A:65,F:70,a:97,f:102};function z(s){if(s>=T.zero&&s<=T.nine)return s-T.zero;if(s>=T.A&&s<=T.F)return s-(T.A-10);if(s>=T.a&&s<=T.f)return s-(T.a-10)}function L(s,e={}){let n=s;e.size&&(B(n,{size:e.size}),n=D(n,{dir:"right",size:e.size}));let a=n.slice(2);a.length%2&&(a=`0${a}`);const o=a.length/2,r=new Uint8Array(o);for(let i=0,d=0;i<o;i++){const f=z(a.charCodeAt(d++)),p=z(a.charCodeAt(d++));if(f===void 0||p===void 0)throw new S(`Invalid byte sequence ("${a[d-2]}${a[d-1]}" in "${a}").`);r[i]=f*16+p}return r}function ge(s,e){const n=ce(s,e);return L(n)}function _(s,e={}){const n=de.encode(s);return typeof e.size=="number"?(B(n,{size:e.size}),D(n,{dir:"right",size:e.size})):n}const U=BigInt(2**32-1),j=BigInt(32);function he(s,e=!1){return e?{h:Number(s&U),l:Number(s>>j&U)}:{h:Number(s>>j&U)|0,l:Number(s&U)|0}}function me(s,e=!1){const n=s.length;let a=new Uint32Array(n),o=new Uint32Array(n);for(let r=0;r<n;r++){const{h:i,l:d}=he(s[r],e);[a[r],o[r]]=[i,d]}return[a,o]}const Ee=(s,e,n)=>s<<n|e>>>32-n,fe=(s,e,n)=>e<<n|s>>>32-n,Te=(s,e,n)=>e<<n-32|s>>>64-n,Se=(s,e,n)=>s<<n-32|e>>>64-n;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function pe(s){return s instanceof Uint8Array||ArrayBuffer.isView(s)&&s.constructor.name==="Uint8Array"}function K(s){if(!Number.isSafeInteger(s)||s<0)throw new Error("positive integer expected, got "+s)}function I(s,...e){if(!pe(s))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(s.length))throw new Error("Uint8Array expected of length "+e+", got length="+s.length)}function W(s,e=!0){if(s.destroyed)throw new Error("Hash instance has been destroyed");if(e&&s.finished)throw new Error("Hash#digest() has already been called")}function Ce(s,e){I(s);const n=e.outputLen;if(s.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function be(s){return new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4))}function V(...s){for(let e=0;e<s.length;e++)s[e].fill(0)}const Ae=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function De(s){return s<<24&4278190080|s<<8&16711680|s>>>8&65280|s>>>24&255}function Ue(s){for(let e=0;e<s.length;e++)s[e]=De(s[e]);return s}const Y=Ae?s=>s:Ue;function Ie(s){if(typeof s!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(s))}function q(s){return typeof s=="string"&&(s=Ie(s)),I(s),s}class ye{}function Re(s){const e=a=>s().update(q(a)).digest(),n=s();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>s(),e}const we=BigInt(0),A=BigInt(1),Be=BigInt(2),Ne=BigInt(7),ke=BigInt(256),ve=BigInt(113),G=[],X=[],Q=[];for(let s=0,e=A,n=1,a=0;s<24;s++){[n,a]=[a,(2*n+3*a)%5],G.push(2*(5*a+n)),X.push((s+1)*(s+2)/2%64);let o=we;for(let r=0;r<7;r++)e=(e<<A^(e>>Ne)*ve)%ke,e&Be&&(o^=A<<(A<<BigInt(r))-A);Q.push(o)}const J=me(Q,!0),xe=J[0],Me=J[1],Z=(s,e,n)=>n>32?Te(s,e,n):Ee(s,e,n),ee=(s,e,n)=>n>32?Se(s,e,n):fe(s,e,n);function Oe(s,e=24){const n=new Uint32Array(10);for(let a=24-e;a<24;a++){for(let i=0;i<10;i++)n[i]=s[i]^s[i+10]^s[i+20]^s[i+30]^s[i+40];for(let i=0;i<10;i+=2){const d=(i+8)%10,f=(i+2)%10,p=n[f],C=n[f+1],ts=Z(p,C,1)^n[d],as=ee(p,C,1)^n[d+1];for(let y=0;y<50;y+=10)s[i+y]^=ts,s[i+y+1]^=as}let o=s[2],r=s[3];for(let i=0;i<24;i++){const d=X[i],f=Z(o,r,d),p=ee(o,r,d),C=G[i];o=s[C],r=s[C+1],s[C]=f,s[C+1]=p}for(let i=0;i<50;i+=10){for(let d=0;d<10;d++)n[d]=s[i+d];for(let d=0;d<10;d++)s[i+d]^=~n[(d+2)%10]&n[(d+4)%10]}s[0]^=xe[a],s[1]^=Me[a]}V(n)}class N extends ye{constructor(e,n,a,o=!1,r=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=n,this.outputLen=a,this.enableXOF=o,this.rounds=r,K(a),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=be(this.state)}clone(){return this._cloneInto()}keccak(){Y(this.state32),Oe(this.state32,this.rounds),Y(this.state32),this.posOut=0,this.pos=0}update(e){W(this),e=q(e),I(e);const{blockLen:n,state:a}=this,o=e.length;for(let r=0;r<o;){const i=Math.min(n-this.pos,o-r);for(let d=0;d<i;d++)a[this.pos++]^=e[r++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:n,pos:a,blockLen:o}=this;e[a]^=n,(n&128)!==0&&a===o-1&&this.keccak(),e[o-1]^=128,this.keccak()}writeInto(e){W(this,!1),I(e),this.finish();const n=this.state,{blockLen:a}=this;for(let o=0,r=e.length;o<r;){this.posOut>=a&&this.keccak();const i=Math.min(a-this.posOut,r-o);e.set(n.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return K(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Ce(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,V(this.state)}_cloneInto(e){const{blockLen:n,suffix:a,outputLen:o,rounds:r,enableXOF:i}=this;return e||(e=new N(n,a,o,i,r)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=r,e.suffix=a,e.outputLen=o,e.enableXOF=i,e.destroyed=this.destroyed,e}}const Fe=(s,e,n)=>Re(()=>new N(e,s,n)),He=Fe(1,136,256/8);function Pe(s,e){return He(R(s,{strict:!1})?le(s):s)}class $e extends S{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class se extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const n=super.get(e);return super.has(e)&&n!==void 0&&(this.delete(e),super.set(e,n)),n}set(e,n){if(super.set(e,n),this.maxSize&&this.size>this.maxSize){const a=this.keys().next().value;a&&this.delete(a)}return this}}const k=new se(8192);function ne(s,e){if(k.has(`${s}.${e}`))return k.get(`${s}.${e}`);const n=s.substring(2).toLowerCase(),a=Pe(_(n)),o=n.split("");for(let i=0;i<40;i+=2)a[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(a[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());const r=`0x${o.join("")}`;return k.set(`${s}.${e}`,r),r}function h(s,e){if(!Le(s,{strict:!1}))throw new $e({address:s});return ne(s,e)}const ze=/^0x[a-fA-F0-9]{40}$/,v=new se(8192);function Le(s,e){const{strict:n=!0}=e??{},a=`${s}.${n}`;if(v.has(a))return v.get(a);const o=ze.test(s)?s.toLowerCase()===s?!0:n?ne(s)===s:!0:!1;return v.set(a,o),o}const t={USDC:"USDC",USDT:"USDT",DAI:"DAI",BUSD:"BUSD",EURC:"EURC",ETH:"ETH",WETH:"WETH",STRK:"STRK",BNB:"BNB",LORDS:"LORDS"};t.USDC;const E={[c.ARBITRUM]:{[t.DAI]:{address:h("0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"),symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:t.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[t.USDC]:{address:h("0xaf88d065e77c8cC2239327C5EDb3A432268e5831"),symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"},[t.USDT]:{address:h("0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"),symbol:t.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[t.WETH]:{address:h("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),symbol:t.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.ARBITRUM_TESTNET]:{[t.USDC]:{address:h("0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"),symbol:t.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.AVALANCHE]:{[t.DAI]:{address:"0xd586E7F844cEa2F87f50152665BCbc2C279D8d70",symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.USDC]:{address:h("0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"),symbol:t.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[t.USDT]:{address:"0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",symbol:t.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[t.WETH]:{address:"0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",symbol:t.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.AVALANCHE_TESTNET]:{[t.USDC]:{address:h("0x5425890298aed601595a70AB815c96711a31Bc65"),symbol:t.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.BASE]:{[t.DAI]:{address:"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:t.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[t.EURC]:{address:"0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",symbol:t.EURC,name:"Euro Coin",decimals:6,logoURI:"/images/tokens/eurc.png"},[t.USDC]:{address:h("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"),symbol:t.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[t.WETH]:{address:h("0x4200000000000000000000000000000000000006"),symbol:t.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.BASE_TESTNET]:{[t.USDC]:{address:h("0x036CbD53842c5426634e7929541eC2318f3dCF7e"),symbol:t.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.BSC]:{[t.BNB]:{address:"0x0000000000000000000000000000000000000000",symbol:t.BNB,name:"BNB",decimals:18,logoURI:"/images/chains/bsc.webp"},[t.BUSD]:{address:"0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",symbol:t.BUSD,name:"Binance USD",decimals:18,logoURI:"/images/tokens/busd.png"},[t.DAI]:{address:"0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3",symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.ETH]:{address:"0x2170Ed0880ac9A755fd29B2688956BD959F933F8",symbol:t.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[t.USDC]:{address:h("0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"),symbol:t.USDC,decimals:18,name:"USD Coin",logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[t.USDT]:{address:"0x55d398326f99059fF775485246999027B3197955",symbol:t.USDT,name:"Tether USD",decimals:18,logoURI:"/images/tokens/usdt.png"}},[c.ETHEREUM]:{[t.BUSD]:{address:"0x4Fabb145d64652a948d72533023f6E7A623C7C53",symbol:t.BUSD,name:"Binance USD",decimals:18,logoURI:"/images/tokens/busd.png"},[t.DAI]:{address:h("0x6B175474E89094C44Da98b954EedeAC495271d0F"),symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:t.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[t.EURC]:{address:"0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",symbol:t.EURC,name:"Euro Coin",decimals:6,logoURI:"/images/tokens/eurc.png"},[t.STRK]:{address:"0xCa14007Eff0dB1f8135f4C25B34De49AB0d42766",symbol:t.STRK,name:"Starknet Token",decimals:18,logoURI:"/images/chains/starknet.svg"},[t.USDC]:{address:h("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"),symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[t.USDT]:{address:h("0xdAC17F958D2ee523a2206206994597C13D831ec7"),symbol:t.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[t.WETH]:{address:h("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),symbol:t.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.ETHEREUM_TESTNET]:{[t.USDC]:{address:h("0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"),symbol:t.USDC,decimals:6,name:"USD Coin",logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.HYPEREVM]:{[t.USDC]:{address:"0xb88339CB7199b77E23DB6E890353E22632Ba630f",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.LISK]:{[t.USDC]:{address:"0xF242275d3a6527d877f2c927a82D9b057609cc71",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.MONAD]:{[t.USDC]:{address:"0x754704Bc059F8C67012fEd69BC8A327a5aafb603",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.MONAD_TESTNET]:{[t.USDC]:{address:"0x534b2f3A21130d7a60830c2Df862319e593943A3",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.OPTIMISM]:{[t.DAI]:{address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:t.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[t.USDC]:{address:"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"},[t.USDT]:{address:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",symbol:t.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[t.WETH]:{address:"0x4200000000000000000000000000000000000006",symbol:t.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.OPTIMISM_TESTNET]:{[t.USDC]:{address:"0x5fd84259d66Cd46123540766Be93DFE6D43130D7",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.POLYGON]:{[t.DAI]:{address:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.USDC]:{address:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"},[t.USDT]:{address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",symbol:t.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[t.WETH]:{address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",symbol:t.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.STARKNET]:{[t.DAI]:{address:"0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad",symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.ETH]:{address:"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",symbol:t.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[t.LORDS]:{address:"0x0124aeb495b947201f5faC96fD1138E326AD86195B98df6DEc9009158A533B49",symbol:t.LORDS,name:"LORDS Token",decimals:18,logoURI:"/images/tokens/lords.png"},[t.STRK]:{address:"0x04718f5a0Fc34cC1AF16A1cdee98fFB20C31f5cD61D6Ab07201858f4287c938D",symbol:t.STRK,name:"Starknet Token",decimals:18,logoURI:"/images/chains/starknet.svg"},[t.USDC]:{address:"0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[t.USDT]:{address:"0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",symbol:t.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"}},[c.STARKNET_TESTNET]:{[t.USDC]:{address:"0x0512feAc6339Ff7889822cb5aA2a86C848e9D392bB0E3E237C008674feeD8343",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}}},_e={ARBITRUM:E[c.ARBITRUM],ARBITRUM_TESTNET:E[c.ARBITRUM_TESTNET],AVALANCHE:E[c.AVALANCHE],AVALANCHE_TESTNET:E[c.AVALANCHE_TESTNET],BASE:E[c.BASE],BASE_TESTNET:E[c.BASE_TESTNET],BSC:E[c.BSC],ETHEREUM:E[c.ETHEREUM],ETHEREUM_TESTNET:E[c.ETHEREUM_TESTNET],STARKNET:E[c.STARKNET]},je=new Set(Object.values(c));function g(s){if(Ke(s))return s;const e=c[s];if(!e)throw new Error(`Invalid chain: ${s}. Chain must be a valid chain alias or internal chain value from Chains.`);return e}function Ke(s){return je.has(s)}function We(s,e){const n=e.toLowerCase().trim(),a=E[s];if(!a)throw new Error(`Chain not found: ${s}. The chain key must be a valid chain identifier.`);let o;for(const r in a){const i=a[r];if(i&&i.address.toLowerCase()===n.toLowerCase()){o=i;break}}if(!o)throw new Error(`Token address mismatch: address ${e} does not exist on chain ${s}. The token address must be a valid token address on the specified chain.`);return o}function x(s,e,n){const a=We(s,e);if(a.symbol!==n)throw new Error(`Token address and symbol mismatch: address ${e} on chain ${s} corresponds to token "${a.symbol}", but expected "${n}". The token address must correspond to a token with the expected symbol on the specified chain.`);return a}function Ve(s,e){return E[s]?.[e]}function Ye(s,e){return Ve(s,e)?.address}var M=(s=>(s.PRODUCTION="production",s.STAGING="staging",s))(M||{});class l{constructor({api_key:e,env:n,seesion_token:a,props:o}){this.api_key=e||"",this.sessionToken=a||"",this.env=n??M.PRODUCTION,this.props=o}static async config(e){if(!l.app){if(!e)throw new Error("Please provide an api_key");l.app=new l(e)}return e&&(e.api_key!==void 0&&(l.app.api_key=e.api_key),e.seesion_token!==void 0&&(l.app.sessionToken=e.seesion_token),e.env!==void 0&&(l.app.env=e.env),e.props!==void 0&&(l.app.props=e.props)),l.app}static getApiKey(){if(!l.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return l.app.api_key}static getSessionToken(){if(!l.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return l.app.sessionToken}static getProps(){if(!l.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return l.app.props}static getEnv(){if(!l.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return l.app.env==="internal"?"staging":l.app.env}static getBaseUrl(){if(!l.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");switch(l.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(e){if(!l.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");const n=l.app.env==="internal"?"https://chainrails-frontend-git-staging-horus-labs.vercel.app":"https://app.chainrails.io",a=Number(e),o=e&&!isNaN(Number(e))&&a>0?"/pay/":"/deposit/",r=`${e&&!isNaN(Number(e))&&a>0?a*100:""}`;return n+o+r}}let O=null;function qe(){O=b.create({prefixUrl:l.getBaseUrl(),headers:{"Content-Type":"application/json"},hooks:{beforeRequest:[s=>{const e=l.getSessionToken()||l.getApiKey();s.headers.set("Authorization",`Bearer ${e}`)}],afterResponse:[(s,e,n)=>n]},retry:{limit:2}})}function u(){return O||qe(),O}class Ge{async getById(e){return await u().get("intents/"+e).json()}async getForSender(e){return await u().get("intents/user/"+e).json()}async getForAddress(e){return await u().get("intents/address/"+e).json()}async getForSession(e){return await u().get("modal/sessions/intents/"+e).json()}async getAll(e){return await u().get("intents",{searchParams:e}).json()}async create(e){const n=g(e.source_chain),a=g(e.destination_chain);return await u().post("intents",{json:{...e,source_chain:n,destination_chain:a}}).json()}async createForSession(e){const n=g(e.sourceChain);return await u().post("modal/sessions/intents",{json:{...e,sourceChain:n}}).json()}async update(e,n){return await u().post("intents",{json:n}).json()}async triggerProcessing(e){return await u().post(`intents/${e}/trigger-processing`).json()}async triggerProcessingForSession(e){return await u().post(`modal/sessions/intents/${e}/process`).json()}}class Xe{async getFromSpecificBridge(e){const n=g(e.sourceChain);x(n,e.tokenIn,e.amountSymbol);const a=g(e.destinationChain);return await u().get("quotes/single",{searchParams:{...e,sourceChain:n,destinationChain:a}}).json()}async getFromAllBridges(e){const n=g(e.sourceChain);x(n,e.tokenIn,e.amountSymbol);const a=g(e.destinationChain);return await u().get("quotes/multiple",{searchParams:{...e,sourceChain:n,destinationChain:a}}).json()}async getBestAcrossBridges(e){const n=g(e.sourceChain);x(n,e.tokenIn,e.amountSymbol);const a=g(e.destinationChain);return await u().get("quotes/best",{searchParams:{...e,sourceChain:n,destinationChain:a}}).json()}async getAll(e){const n=g(e.destinationChain);return await u().get("quotes/multi-source",{searchParams:{...e,destinationChain:n}}).json()}async getAllForSession(e){return await u().get("modal/sessions/quotes",{searchParams:e}).json()}}class Qe{async getOptimalRoutes(e){const n=g(e.sourceChain),a=g(e.destinationChain);return await u().get("router/optimal-route",{searchParams:{...e,sourceChain:n,destinationChain:a}}).json()}async getAllSupportedBridges(){return await u().get("router/supported-bridges/all").json()}async getSupportedBridges(e){const n=g(e.sourceChain),a=g(e.destinationChain);return await u().get("router/supported-bridges/route",{searchParams:{...e,sourceChain:n,destinationChain:a}}).json()}async getSupportedRoutes(e,n){const a=g(n.sourceChain),o=g(n.destinationChain);return await u().get("router/supported-routes/bridge/"+e,{searchParams:{...n,sourceChain:a,destinationChain:o}}).json()}}class Je{async getSupported(e){return await u().get("chains",{searchParams:e}).json()}async getBalance(e){return await u().get(`chains/balances/${e.address}`,{searchParams:e}).json()}}class Ze{async getClientInfo(){return await u().get("client/auth/client-info").json()}async getClientInfoForSession(){return await u().get("modal/sessions/client").json()}}class es{async getSessionToken(e){const n=g(e.destinationChain),a={recipient:e.recipient,tokenOut:Ye(n,e.token),destinationChain:n,amount:e.amount};return u().post("modal/sessions",{json:a}).json().then(o=>({...o,amount:a.amount}))}}const ss={ACROSS:"ACROSS",CCTP:"CCTP",GATEWAY:"GATEWAY",RHINOFI:"RHINOFI"},ns={router:new Qe,quotes:new Xe,intents:new Ge,chains:new Je,client:new Ze,auth:new es};m.AmountSymbols=t,m.Bridges=ss,m.Chainrails=l,m.Chains=te,m.Tokens=_e,m.crapi=ns,m.environment=M,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(m,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("ky")):typeof define=="function"&&define.amd?define(["exports","ky"],b):(m=typeof globalThis<"u"?globalThis:m||self,b(m.Chainrails={},m.Ky))})(this,(function(m,b){"use strict";const 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"},ae={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"};function R(s,{strict:e=!0}={}){return!s||typeof s!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(s):s.startsWith("0x")}function F(s){return R(s,{strict:!1})?Math.ceil((s.length-2)/2):s.length}const H="2.43.4";let w={getDocsUrl:({docsBaseUrl:s,docsPath:e="",docsSlug:n})=>e?`${s??"https://viem.sh"}${e}${n?`#${n}`:""}`:void 0,version:`viem@${H}`};class S extends Error{constructor(e,n={}){const a=n.cause instanceof S?n.cause.details:n.cause?.message?n.cause.message:n.details,o=n.cause instanceof S&&n.cause.docsPath||n.docsPath,r=w.getDocsUrl?.({...n,docsPath:o}),i=[e||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...r?[`Docs: ${r}`]:[],...a?[`Details: ${a}`]:[],...w.version?[`Version: ${w.version}`]:[]].join(`
|
|
2
|
+
`);super(i,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=a,this.docsPath=o,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=e,this.version=H}walk(e){return $(this,e)}}function $(s,e){return e?.(s)?s:s&&typeof s=="object"&&"cause"in s&&s.cause!==void 0?$(s.cause,e):e?null:s}class P extends S{constructor({size:e,targetSize:n,type:a}){super(`${a.charAt(0).toUpperCase()}${a.slice(1).toLowerCase()} size (${e}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}function D(s,{dir:e,size:n=32}={}){return typeof s=="string"?oe(s,{dir:e,size:n}):ie(s,{dir:e,size:n})}function oe(s,{dir:e,size:n=32}={}){if(n===null)return s;const a=s.replace("0x","");if(a.length>n*2)throw new P({size:Math.ceil(a.length/2),targetSize:n,type:"hex"});return`0x${a[e==="right"?"padEnd":"padStart"](n*2,"0")}`}function ie(s,{dir:e,size:n=32}={}){if(n===null)return s;if(s.length>n)throw new P({size:s.length,targetSize:n,type:"bytes"});const a=new Uint8Array(n);for(let o=0;o<n;o++){const r=e==="right";a[r?o:n-o-1]=s[r?o:s.length-o-1]}return a}class re extends S{constructor({max:e,min:n,signed:a,size:o,value:r}){super(`Number "${r}" is not in safe ${o?`${o*8}-bit ${a?"signed":"unsigned"} `:""}integer range ${e?`(${n} to ${e})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class ce extends S{constructor({givenSize:e,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function B(s,{size:e}){if(F(s)>e)throw new ce({givenSize:F(s),maxSize:e})}function de(s,e={}){const{signed:n,size:a}=e,o=BigInt(s);let r;a?n?r=(1n<<BigInt(a)*8n-1n)-1n:r=2n**(BigInt(a)*8n)-1n:typeof s=="number"&&(r=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof r=="bigint"&&n?-r-1n:0;if(r&&o>r||o<i){const f=typeof s=="bigint"?"n":"";throw new re({max:r?`${r}${f}`:void 0,min:`${i}${f}`,signed:n,size:a,value:`${s}${f}`})}const d=`0x${(n&&o<0?(1n<<BigInt(a*8))+BigInt(o):o).toString(16)}`;return a?D(d,{size:a}):d}const le=new TextEncoder;function ue(s,e={}){return typeof s=="number"||typeof s=="bigint"?he(s,e):typeof s=="boolean"?ge(s,e):R(s)?L(s,e):_(s,e)}function ge(s,e={}){const n=new Uint8Array(1);return n[0]=Number(s),typeof e.size=="number"?(B(n,{size:e.size}),D(n,{size:e.size})):n}const T={zero:48,nine:57,A:65,F:70,a:97,f:102};function z(s){if(s>=T.zero&&s<=T.nine)return s-T.zero;if(s>=T.A&&s<=T.F)return s-(T.A-10);if(s>=T.a&&s<=T.f)return s-(T.a-10)}function L(s,e={}){let n=s;e.size&&(B(n,{size:e.size}),n=D(n,{dir:"right",size:e.size}));let a=n.slice(2);a.length%2&&(a=`0${a}`);const o=a.length/2,r=new Uint8Array(o);for(let i=0,d=0;i<o;i++){const f=z(a.charCodeAt(d++)),p=z(a.charCodeAt(d++));if(f===void 0||p===void 0)throw new S(`Invalid byte sequence ("${a[d-2]}${a[d-1]}" in "${a}").`);r[i]=f*16+p}return r}function he(s,e){const n=de(s,e);return L(n)}function _(s,e={}){const n=le.encode(s);return typeof e.size=="number"?(B(n,{size:e.size}),D(n,{dir:"right",size:e.size})):n}const U=BigInt(2**32-1),j=BigInt(32);function me(s,e=!1){return e?{h:Number(s&U),l:Number(s>>j&U)}:{h:Number(s>>j&U)|0,l:Number(s&U)|0}}function Ee(s,e=!1){const n=s.length;let a=new Uint32Array(n),o=new Uint32Array(n);for(let r=0;r<n;r++){const{h:i,l:d}=me(s[r],e);[a[r],o[r]]=[i,d]}return[a,o]}const fe=(s,e,n)=>s<<n|e>>>32-n,Te=(s,e,n)=>e<<n|s>>>32-n,Se=(s,e,n)=>e<<n-32|s>>>64-n,pe=(s,e,n)=>s<<n-32|e>>>64-n;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Ce(s){return s instanceof Uint8Array||ArrayBuffer.isView(s)&&s.constructor.name==="Uint8Array"}function K(s){if(!Number.isSafeInteger(s)||s<0)throw new Error("positive integer expected, got "+s)}function I(s,...e){if(!Ce(s))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(s.length))throw new Error("Uint8Array expected of length "+e+", got length="+s.length)}function W(s,e=!0){if(s.destroyed)throw new Error("Hash instance has been destroyed");if(e&&s.finished)throw new Error("Hash#digest() has already been called")}function be(s,e){I(s);const n=e.outputLen;if(s.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Ae(s){return new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4))}function V(...s){for(let e=0;e<s.length;e++)s[e].fill(0)}const De=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Ue(s){return s<<24&4278190080|s<<8&16711680|s>>>8&65280|s>>>24&255}function Ie(s){for(let e=0;e<s.length;e++)s[e]=Ue(s[e]);return s}const Y=De?s=>s:Ie;function ye(s){if(typeof s!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(s))}function q(s){return typeof s=="string"&&(s=ye(s)),I(s),s}class Re{}function we(s){const e=a=>s().update(q(a)).digest(),n=s();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>s(),e}const Be=BigInt(0),A=BigInt(1),Ne=BigInt(2),ke=BigInt(7),ve=BigInt(256),xe=BigInt(113),G=[],X=[],Q=[];for(let s=0,e=A,n=1,a=0;s<24;s++){[n,a]=[a,(2*n+3*a)%5],G.push(2*(5*a+n)),X.push((s+1)*(s+2)/2%64);let o=Be;for(let r=0;r<7;r++)e=(e<<A^(e>>ke)*xe)%ve,e&Ne&&(o^=A<<(A<<BigInt(r))-A);Q.push(o)}const J=Ee(Q,!0),Me=J[0],Oe=J[1],Z=(s,e,n)=>n>32?Se(s,e,n):fe(s,e,n),ee=(s,e,n)=>n>32?pe(s,e,n):Te(s,e,n);function Fe(s,e=24){const n=new Uint32Array(10);for(let a=24-e;a<24;a++){for(let i=0;i<10;i++)n[i]=s[i]^s[i+10]^s[i+20]^s[i+30]^s[i+40];for(let i=0;i<10;i+=2){const d=(i+8)%10,f=(i+2)%10,p=n[f],C=n[f+1],ts=Z(p,C,1)^n[d],as=ee(p,C,1)^n[d+1];for(let y=0;y<50;y+=10)s[i+y]^=ts,s[i+y+1]^=as}let o=s[2],r=s[3];for(let i=0;i<24;i++){const d=X[i],f=Z(o,r,d),p=ee(o,r,d),C=G[i];o=s[C],r=s[C+1],s[C]=f,s[C+1]=p}for(let i=0;i<50;i+=10){for(let d=0;d<10;d++)n[d]=s[i+d];for(let d=0;d<10;d++)s[i+d]^=~n[(d+2)%10]&n[(d+4)%10]}s[0]^=Me[a],s[1]^=Oe[a]}V(n)}class N extends Re{constructor(e,n,a,o=!1,r=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=n,this.outputLen=a,this.enableXOF=o,this.rounds=r,K(a),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=Ae(this.state)}clone(){return this._cloneInto()}keccak(){Y(this.state32),Fe(this.state32,this.rounds),Y(this.state32),this.posOut=0,this.pos=0}update(e){W(this),e=q(e),I(e);const{blockLen:n,state:a}=this,o=e.length;for(let r=0;r<o;){const i=Math.min(n-this.pos,o-r);for(let d=0;d<i;d++)a[this.pos++]^=e[r++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:n,pos:a,blockLen:o}=this;e[a]^=n,(n&128)!==0&&a===o-1&&this.keccak(),e[o-1]^=128,this.keccak()}writeInto(e){W(this,!1),I(e),this.finish();const n=this.state,{blockLen:a}=this;for(let o=0,r=e.length;o<r;){this.posOut>=a&&this.keccak();const i=Math.min(a-this.posOut,r-o);e.set(n.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return K(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(be(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,V(this.state)}_cloneInto(e){const{blockLen:n,suffix:a,outputLen:o,rounds:r,enableXOF:i}=this;return e||(e=new N(n,a,o,i,r)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=r,e.suffix=a,e.outputLen=o,e.enableXOF=i,e.destroyed=this.destroyed,e}}const He=(s,e,n)=>we(()=>new N(e,s,n)),$e=He(1,136,256/8);function Pe(s,e){return $e(R(s,{strict:!1})?ue(s):s)}class ze extends S{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class se extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const n=super.get(e);return super.has(e)&&n!==void 0&&(this.delete(e),super.set(e,n)),n}set(e,n){if(super.set(e,n),this.maxSize&&this.size>this.maxSize){const a=this.keys().next().value;a&&this.delete(a)}return this}}const k=new se(8192);function ne(s,e){if(k.has(`${s}.${e}`))return k.get(`${s}.${e}`);const n=s.substring(2).toLowerCase(),a=Pe(_(n)),o=n.split("");for(let i=0;i<40;i+=2)a[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(a[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());const r=`0x${o.join("")}`;return k.set(`${s}.${e}`,r),r}function h(s,e){if(!_e(s,{strict:!1}))throw new ze({address:s});return ne(s,e)}const Le=/^0x[a-fA-F0-9]{40}$/,v=new se(8192);function _e(s,e){const{strict:n=!0}=e??{},a=`${s}.${n}`;if(v.has(a))return v.get(a);const o=Le.test(s)?s.toLowerCase()===s?!0:n?ne(s)===s:!0:!1;return v.set(a,o),o}const t={USDC:"USDC",USDT:"USDT",DAI:"DAI",BUSD:"BUSD",EURC:"EURC",ETH:"ETH",WETH:"WETH",STRK:"STRK",BNB:"BNB",LORDS:"LORDS"};t.USDC;const E={[c.ARBITRUM]:{[t.DAI]:{address:h("0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"),symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:t.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[t.USDC]:{address:h("0xaf88d065e77c8cC2239327C5EDb3A432268e5831"),symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"},[t.USDT]:{address:h("0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"),symbol:t.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[t.WETH]:{address:h("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),symbol:t.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.ARBITRUM_TESTNET]:{[t.USDC]:{address:h("0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d"),symbol:t.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.AVALANCHE]:{[t.DAI]:{address:"0xd586E7F844cEa2F87f50152665BCbc2C279D8d70",symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.USDC]:{address:h("0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"),symbol:t.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[t.USDT]:{address:"0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7",symbol:t.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[t.WETH]:{address:"0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB",symbol:t.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.AVALANCHE_TESTNET]:{[t.USDC]:{address:h("0x5425890298aed601595a70AB815c96711a31Bc65"),symbol:t.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.BASE]:{[t.DAI]:{address:"0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:t.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[t.EURC]:{address:"0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",symbol:t.EURC,name:"Euro Coin",decimals:6,logoURI:"/images/tokens/eurc.png"},[t.USDC]:{address:h("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"),symbol:t.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[t.WETH]:{address:h("0x4200000000000000000000000000000000000006"),symbol:t.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.BASE_TESTNET]:{[t.USDC]:{address:h("0x036CbD53842c5426634e7929541eC2318f3dCF7e"),symbol:t.USDC,name:"USD Coin",fiatISO:"USD",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.BSC]:{[t.BNB]:{address:"0x0000000000000000000000000000000000000000",symbol:t.BNB,name:"BNB",decimals:18,logoURI:"/images/chains/bsc.webp"},[t.BUSD]:{address:"0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",symbol:t.BUSD,name:"Binance USD",decimals:18,logoURI:"/images/tokens/busd.png"},[t.DAI]:{address:"0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3",symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.ETH]:{address:"0x2170Ed0880ac9A755fd29B2688956BD959F933F8",symbol:t.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[t.USDC]:{address:h("0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"),symbol:t.USDC,decimals:18,name:"USD Coin",logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[t.USDT]:{address:"0x55d398326f99059fF775485246999027B3197955",symbol:t.USDT,name:"Tether USD",decimals:18,logoURI:"/images/tokens/usdt.png"},[t.WETH]:{address:"0x4db5a66e937a9f4473fa95b1caf1d1e1d62e29ea",symbol:t.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.ETHEREUM]:{[t.BUSD]:{address:"0x4Fabb145d64652a948d72533023f6E7A623C7C53",symbol:t.BUSD,name:"Binance USD",decimals:18,logoURI:"/images/tokens/busd.png"},[t.DAI]:{address:h("0x6B175474E89094C44Da98b954EedeAC495271d0F"),symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:t.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[t.EURC]:{address:"0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",symbol:t.EURC,name:"Euro Coin",decimals:6,logoURI:"/images/tokens/eurc.png"},[t.STRK]:{address:"0xCa14007Eff0dB1f8135f4C25B34De49AB0d42766",symbol:t.STRK,name:"Starknet Token",decimals:18,logoURI:"/images/chains/starknet.svg"},[t.USDC]:{address:h("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"),symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[t.USDT]:{address:h("0xdAC17F958D2ee523a2206206994597C13D831ec7"),symbol:t.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[t.WETH]:{address:h("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),symbol:t.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.ETHEREUM_TESTNET]:{[t.USDC]:{address:h("0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"),symbol:t.USDC,decimals:6,name:"USD Coin",logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"}},[c.HYPEREVM]:{[t.USDC]:{address:"0xb88339CB7199b77E23DB6E890353E22632Ba630f",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.LISK]:{[t.USDC]:{address:"0xF242275d3a6527d877f2c927a82D9b057609cc71",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.MONAD]:{[t.USDC]:{address:"0x754704Bc059F8C67012fEd69BC8A327a5aafb603",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.MONAD_TESTNET]:{[t.USDC]:{address:"0x534b2f3A21130d7a60830c2Df862319e593943A3",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.OPTIMISM]:{[t.DAI]:{address:"0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1",symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.ETH]:{address:"0x0000000000000000000000000000000000000000",symbol:t.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[t.USDC]:{address:"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"},[t.USDT]:{address:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",symbol:t.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[t.WETH]:{address:"0x4200000000000000000000000000000000000006",symbol:t.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.OPTIMISM_TESTNET]:{[t.USDC]:{address:"0x5fd84259d66Cd46123540766Be93DFE6D43130D7",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}},[c.POLYGON]:{[t.DAI]:{address:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.USDC]:{address:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"},[t.USDT]:{address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",symbol:t.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"},[t.WETH]:{address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",symbol:t.WETH,name:"Wrapped Ether",decimals:18,logoURI:"/images/tokens/weth.png"}},[c.STARKNET]:{[t.DAI]:{address:"0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad",symbol:t.DAI,name:"Dai Stablecoin",decimals:18,logoURI:"/images/tokens/dai.png"},[t.ETH]:{address:"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",symbol:t.ETH,name:"Ethereum",decimals:18,logoURI:"/images/chains/ethereum.svg"},[t.LORDS]:{address:"0x0124aeb495b947201f5faC96fD1138E326AD86195B98df6DEc9009158A533B49",symbol:t.LORDS,name:"LORDS Token",decimals:18,logoURI:"/images/tokens/lords.png"},[t.STRK]:{address:"0x04718f5a0Fc34cC1AF16A1cdee98fFB20C31f5cD61D6Ab07201858f4287c938D",symbol:t.STRK,name:"Starknet Token",decimals:18,logoURI:"/images/chains/starknet.svg"},[t.USDC]:{address:"0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg",logoSourceURI:"https://pay.daimo.com/coin-logos/usdc.png"},[t.USDT]:{address:"0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",symbol:t.USDT,name:"Tether USD",decimals:6,logoURI:"/images/tokens/usdt.png"}},[c.STARKNET_TESTNET]:{[t.USDC]:{address:"0x0512feAc6339Ff7889822cb5aA2a86C848e9D392bB0E3E237C008674feeD8343",symbol:t.USDC,name:"USD Coin",decimals:6,logoURI:"/images/tokens/usdc.svg"}}},je={ARBITRUM:E[c.ARBITRUM],ARBITRUM_TESTNET:E[c.ARBITRUM_TESTNET],AVALANCHE:E[c.AVALANCHE],AVALANCHE_TESTNET:E[c.AVALANCHE_TESTNET],BASE:E[c.BASE],BASE_TESTNET:E[c.BASE_TESTNET],BSC:E[c.BSC],ETHEREUM:E[c.ETHEREUM],ETHEREUM_TESTNET:E[c.ETHEREUM_TESTNET],STARKNET:E[c.STARKNET]},Ke=new Set(Object.values(c));function g(s){if(We(s))return s;const e=c[s];if(!e)throw new Error(`Invalid chain: ${s}. Chain must be a valid chain alias or internal chain value from Chains.`);return e}function We(s){return Ke.has(s)}function Ve(s,e){const n=e.toLowerCase().trim(),a=E[s];if(!a)throw new Error(`Chain not found: ${s}. The chain key must be a valid chain identifier.`);let o;for(const r in a){const i=a[r];if(i&&i.address.toLowerCase()===n.toLowerCase()){o=i;break}}if(!o)throw new Error(`Token address mismatch: address ${e} does not exist on chain ${s}. The token address must be a valid token address on the specified chain.`);return o}function x(s,e,n){const a=Ve(s,e);if(a.symbol!==n)throw new Error(`Token address and symbol mismatch: address ${e} on chain ${s} corresponds to token "${a.symbol}", but expected "${n}". The token address must correspond to a token with the expected symbol on the specified chain.`);return a}function Ye(s,e){return E[s]?.[e]}function te(s,e){return Ye(s,e)?.address}var M=(s=>(s.PRODUCTION="production",s.STAGING="staging",s))(M||{});class l{constructor({api_key:e,env:n,seesion_token:a,props:o}){this.api_key=e||"",this.sessionToken=a||"",this.env=n??M.PRODUCTION,this.props=o}static async config(e){if(!l.app){if(!e)throw new Error("Please provide an api_key");l.app=new l(e)}return e&&(e.api_key!==void 0&&(l.app.api_key=e.api_key),e.seesion_token!==void 0&&(l.app.sessionToken=e.seesion_token),e.env!==void 0&&(l.app.env=e.env),e.props!==void 0&&(l.app.props=e.props)),l.app}static getApiKey(){if(!l.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return l.app.api_key}static getSessionToken(){if(!l.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return l.app.sessionToken}static getProps(){if(!l.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return l.app.props}static getEnv(){if(!l.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");return l.app.env==="internal"?"staging":l.app.env}static getBaseUrl(){if(!l.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");switch(l.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(e){if(!l.app)throw new Error("Chainrails SDK not configured. Please call Chainrails.config() first.");const n=l.app.env==="internal"?"https://chainrails-frontend-git-staging-horus-labs.vercel.app":"https://app.chainrails.io",a=Number(e),o=e&&!isNaN(Number(e))&&a>0?"/pay/":"/deposit/",r=`${e&&!isNaN(Number(e))&&a>0?a*100:""}`;return n+o+r}}let O=null;function qe(){O=b.create({prefixUrl:l.getBaseUrl(),headers:{"Content-Type":"application/json"},hooks:{beforeRequest:[s=>{const e=l.getSessionToken()||l.getApiKey();s.headers.set("Authorization",`Bearer ${e}`)}],afterResponse:[(s,e,n)=>n]},retry:{limit:2}})}function u(){return O||qe(),O}class Ge{async getById(e){return await u().get("intents/"+e).json()}async getForSender(e){return await u().get("intents/user/"+e).json()}async getForAddress(e){return await u().get("intents/address/"+e).json()}async getForSession(e){return await u().get("modal/sessions/intents/"+e).json()}async getAll(e){return await u().get("intents",{searchParams:e}).json()}async create(e){const n=g(e.source_chain),a=g(e.destination_chain);return await u().post("intents",{json:{...e,source_chain:n,destination_chain:a}}).json()}async createForSession(e){const n=g(e.sourceChain);return await u().post("modal/sessions/intents",{json:{...e,sourceChain:n}}).json()}async update(e,n){return await u().post("intents",{json:n}).json()}async triggerProcessing(e){return await u().post(`intents/${e}/trigger-processing`).json()}async triggerProcessingForSession(e){return await u().post(`modal/sessions/intents/${e}/process`).json()}}class Xe{async getFromSpecificBridge(e){const n=g(e.sourceChain);x(n,e.tokenIn,e.amountSymbol);const a=g(e.destinationChain);return await u().get("quotes/single",{searchParams:{...e,sourceChain:n,destinationChain:a}}).json()}async getFromAllBridges(e){const n=g(e.sourceChain);x(n,e.tokenIn,e.amountSymbol);const a=g(e.destinationChain);return await u().get("quotes/multiple",{searchParams:{...e,sourceChain:n,destinationChain:a}}).json()}async getBestAcrossBridges(e){const n=g(e.sourceChain);x(n,e.tokenIn,e.amountSymbol);const a=g(e.destinationChain);return await u().get("quotes/best",{searchParams:{...e,sourceChain:n,destinationChain:a}}).json()}async getAll(e){const n=g(e.destinationChain);return await u().get("quotes/multi-source",{searchParams:{...e,destinationChain:n}}).json()}async getAllForSession(e){return await u().get("modal/sessions/quotes",{searchParams:e}).json()}}class Qe{async getOptimalRoutes(e){const n=g(e.sourceChain),a=g(e.destinationChain);return await u().get("router/optimal-route",{searchParams:{...e,sourceChain:n,destinationChain:a}}).json()}async getAllSupportedBridges(){return await u().get("router/supported-bridges/all").json()}async getSupportedBridges(e){const n=g(e.sourceChain),a=g(e.destinationChain);return await u().get("router/supported-bridges/route",{searchParams:{...e,sourceChain:n,destinationChain:a}}).json()}async getSupportedRoutes(e,n){const a=g(n.sourceChain),o=g(n.destinationChain);return await u().get("router/supported-routes/bridge/"+e,{searchParams:{...n,sourceChain:a,destinationChain:o}}).json()}}class Je{async getSupported(e){return await u().get("chains",{searchParams:e}).json()}async getBalance(e){return await u().get(`chains/balances/${e.address}`,{searchParams:e}).json()}}class Ze{async getClientInfo(){return await u().get("client/auth/client-info").json()}async getClientInfoForSession(){return await u().get("modal/sessions/client").json()}}class es{async getSessionToken(e){const n=g(e.destinationChain);let a=te(n,e.token);a||(console.error(`${e.token} on ${e.destinationChain} is currently unsupported, defaulting to usdc`),a=te(n,"USDC"));const o={recipient:e.recipient,tokenOut:a,destinationChain:n,amount:e.amount};return u().post("modal/sessions",{json:o}).json().then(r=>({...r,amount:o.amount}))}}const ss={ACROSS:"ACROSS",CCTP:"CCTP",GATEWAY:"GATEWAY",RHINOFI:"RHINOFI"},ns={router:new Qe,quotes:new Xe,intents:new Ge,chains:new Je,client:new Ze,auth:new es};m.AmountSymbols=t,m.Bridges=ss,m.Chainrails=l,m.Chains=ae,m.Tokens=je,m.crapi=ns,m.environment=M,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Auth/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAyB,MAAM,SAAS,CAAC;AAEtE,MAAM,CAAC,OAAO,OAAO,IAAI;IACjB,eAAe,CAAC,KAAK,EAAE,oBAAoB;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Auth/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAyB,MAAM,SAAS,CAAC;AAEtE,MAAM,CAAC,OAAO,OAAO,IAAI;IACjB,eAAe,CAAC,KAAK,EAAE,oBAAoB;;;;CAmBlD;AAED,cAAc,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainrails/sdk",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"main": "./dist/chainrails-sdk.umd.js",
|
|
6
6
|
"module": "./dist/chainrails-sdk.es.mjs",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@chainrails/common": "^0.3.
|
|
38
|
+
"@chainrails/common": "^0.3.1",
|
|
39
39
|
"ky": "^1.14.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|