@aave/react 4.0.0-next.32 → 4.0.0-next.33
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/chunk-3TDVAQWZ.js +1664 -0
- package/dist/chunk-3TDVAQWZ.js.map +1 -0
- package/dist/chunk-6A77Z4MD.js +2 -0
- package/dist/chunk-6A77Z4MD.js.map +1 -0
- package/dist/chunk-PYBBLRVB.js +2 -0
- package/dist/chunk-PYBBLRVB.js.map +1 -0
- package/dist/chunk-Q5WBQO2R.js +2 -0
- package/dist/chunk-Q5WBQO2R.js.map +1 -0
- package/dist/chunk-SXNP4MR6.js +2 -0
- package/dist/chunk-SXNP4MR6.js.map +1 -0
- package/dist/ethers.cjs +1637 -1
- package/dist/ethers.cjs.map +1 -1
- package/dist/ethers.d.cts +2 -5
- package/dist/ethers.d.ts +2 -5
- package/dist/ethers.js +1 -1
- package/dist/ethers.js.map +1 -1
- package/dist/index.cjs +1663 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -20
- package/dist/index.d.ts +17 -20
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{misc-Bb3e3jZd.d.ts → misc-B5-hfFfF.d.ts} +4 -7
- package/dist/{misc-B2Lsewb5.d.cts → misc-B_3Pj33R.d.cts} +4 -7
- package/dist/privy.cjs +1637 -1
- package/dist/privy.cjs.map +1 -1
- package/dist/privy.d.cts +2 -5
- package/dist/privy.d.ts +2 -5
- package/dist/privy.js +1 -1
- package/dist/privy.js.map +1 -1
- package/dist/thirdweb.cjs +1637 -1
- package/dist/thirdweb.cjs.map +1 -1
- package/dist/thirdweb.d.cts +2 -5
- package/dist/thirdweb.d.ts +2 -5
- package/dist/thirdweb.js +1 -1
- package/dist/thirdweb.js.map +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +1 -1
- package/dist/utils.js.map +1 -1
- package/dist/viem/index.cjs +1637 -1
- package/dist/viem/index.cjs.map +1 -1
- package/dist/viem/index.d.cts +3 -6
- package/dist/viem/index.d.ts +3 -6
- package/dist/viem/index.js +1 -1
- package/dist/viem/index.js.map +1 -1
- package/dist/{writes-CcVGQGt5.d.cts → writes-d5YEXauI.d.cts} +1 -4
- package/dist/{writes-CcVGQGt5.d.ts → writes-d5YEXauI.d.ts} +1 -4
- package/package.json +2 -5
- package/dist/chunk-4GURAVFN.js +0 -2
- package/dist/chunk-4GURAVFN.js.map +0 -1
- package/dist/chunk-4NA4FB6K.js +0 -2
- package/dist/chunk-4NA4FB6K.js.map +0 -1
- package/dist/chunk-6REYOFJ4.js +0 -2
- package/dist/chunk-6REYOFJ4.js.map +0 -1
package/dist/privy.cjs
CHANGED
|
@@ -1,2 +1,1638 @@
|
|
|
1
|
-
'use strict';var client=require('@aave/client'),viem=require('@aave/client/viem'),types=require('@aave/types'),reactAuth=require('@privy-io/react-auth'),viem$1=require('viem'),v=require('react'),core=require('@aave/core'),actions=require('@aave/client/actions');require('@aave/graphql'),require('urql');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var v__default=/*#__PURE__*/_interopDefault(v);var l={Idle:()=>({called:false,loading:false,data:void 0,error:void 0}),Loading:e=>({called:true,loading:true,data:e,error:void 0}),Success:e=>({called:true,loading:false,data:e,error:void 0}),Failed:e=>({called:true,loading:false,data:void 0,error:e})};function u(e,t){let[r,s]=v.useState(l.Idle()),n=v.useRef(false),a=v.useCallback(e,t);return [v.useCallback(h=>{types.invariant(!n.current,"Cannot execute a task while another is in progress."),n.current=true;let d;s(o=>(d=o,{called:true,loading:true,data:o.data,error:void 0}));try{let o=a(h);return o.match(c=>{n.current=!1,s(l.Success(c));},c=>{n.current=!1,s(l.Failed(c));}),o}catch(o){throw n.current=false,s(types.nonNullable(d)),o}},[a]),r]}var i=class e{constructor(t){this.wait=t;}static isInstanceOf(t){return t instanceof e}static tryFrom(t){return e.isInstanceOf(t)?types.okAsync(t):core.UnexpectedError.from(t).asResultAsync()}};var b=v__default.default.createContext(null);function T(){let e=v.useContext(b);return types.invariant(e,"Could not find Aave SDK context, ensure your code is wrapped in a <AaveProvider>"),e}function g(){let e=T();return u(t=>actions.chain(e,t,{batch:false,requestPolicy:"cache-first"}),[e])}function fe(){let{wallets:e}=reactAuth.useWallets(),[t]=g();return u(r=>{let s=e.find(n=>n.address===r.from);return types.invariant(s,`Expected a connected wallet with address ${r.from} to be found.`),t({chainId:r.chainId}).map(n=>(types.invariant(n,`Chain ${r.chainId} is not supported`),viem.toViemChain(n))).andThen(n=>types.ResultAsync.fromPromise(s.switchChain(r.chainId),a=>client.UnexpectedError.from(a)).map(()=>s.getEthereumProvider()).map(a=>viem$1.createWalletClient({account:r.from,chain:n,transport:viem$1.custom(a)})).andThen(a=>viem.sendTransaction(a,r).map(p=>new i(()=>viem.waitForTransactionResult(a,r,p)))))},[e,t])}function me(){let{signTypedData:e}=reactAuth.useSignTypedData();return u(t=>types.ResultAsync.fromPromise(e({domain:t.domain,types:t.types,primaryType:t.primaryType,message:t.message}),r=>client.SigningError.from(r)).map(({signature:r})=>types.signatureFrom(r)),[e])}exports.useSendTransaction=fe;exports.useSignTypedData=me;//# sourceMappingURL=privy.cjs.map
|
|
1
|
+
'use strict';var viem=require('viem'),actions=require('viem/actions'),chains=require('viem/chains'),reactAuth=require('@privy-io/react-auth'),lu=require('react');require('urql');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var lu__default=/*#__PURE__*/_interopDefault(lu);var Fr={withStackTrace:false},ot=(e,n,a=Fr)=>{let t=n.isOk()?{type:"Ok",value:n.value}:{type:"Err",value:n.error},r=a.withStackTrace?new Error().stack:void 0;return {data:t,message:e,stack:r}};function _e(e,n,a,t){function r(i){return i instanceof a?i:new a(function(s){s(i);})}return new(a||(a=Promise))(function(i,s){function o(c){try{l(t.next(c));}catch(d){s(d);}}function p(c){try{l(t.throw(c));}catch(d){s(d);}}function l(c){c.done?i(c.value):r(c.value).then(o,p);}l((t=t.apply(e,[])).next());})}function rt(e){var n=typeof Symbol=="function"&&Symbol.iterator,a=n&&e[n],t=0;if(a)return a.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function ye(e){return this instanceof ye?(this.v=e,this):new ye(e)}function it(e,n,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=a.apply(e,n||[]),r,i=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(N){return function(h){return Promise.resolve(h).then(N,d)}}function o(N,h){t[N]&&(r[N]=function(g){return new Promise(function(L,P){i.push([N,g,L,P])>1||p(N,g);})},h&&(r[N]=h(r[N])));}function p(N,h){try{l(t[N](h));}catch(g){f(i[0][3],g);}}function l(N){N.value instanceof ye?Promise.resolve(N.value.v).then(c,d):f(i[0][2],N);}function c(N){p("next",N);}function d(N){p("throw",N);}function f(N,h){N(h),i.shift(),i.length&&p(i[0][0],i[0][1]);}}function Dr(e){var n,a;return n={},t("next"),t("throw",function(r){throw r}),t("return"),n[Symbol.iterator]=function(){return this},n;function t(r,i){n[r]=e[r]?function(s){return (a=!a)?{value:ye(e[r](s)),done:false}:i?i(s):s}:i;}}function $r(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e[Symbol.asyncIterator],a;return n?n.call(e):(e=typeof rt=="function"?rt(e):e[Symbol.iterator](),a={},t("next"),t("throw"),t("return"),a[Symbol.asyncIterator]=function(){return this},a);function t(i){a[i]=e[i]&&function(s){return new Promise(function(o,p){s=e[i](s),r(o,p,s.done,s.value);})};}function r(i,s,o,p){Promise.resolve(p).then(function(l){i({value:l,done:o});},s);}}var H=class te{constructor(n){this._promise=n;}static fromSafePromise(n){let a=n.then(t=>new re(t));return new te(a)}static fromPromise(n,a){let t=n.then(r=>new re(r)).catch(r=>new ie(a(r)));return new te(t)}static fromThrowable(n,a){return (...t)=>new te(_e(this,void 0,void 0,function*(){try{return new re(yield n(...t))}catch(r){return new ie(a?a(r):r)}}))}static combine(n){return Mr(n)}static combineWithAllErrors(n){return Qr(n)}map(n){return new te(this._promise.then(a=>_e(this,void 0,void 0,function*(){return a.isErr()?new ie(a.error):new re(yield n(a.value))})))}andThrough(n){return new te(this._promise.then(a=>_e(this,void 0,void 0,function*(){if(a.isErr())return new ie(a.error);let t=yield n(a.value);return t.isErr()?new ie(t.error):new re(a.value)})))}andTee(n){return new te(this._promise.then(a=>_e(this,void 0,void 0,function*(){if(a.isErr())return new ie(a.error);try{yield n(a.value);}catch{}return new re(a.value)})))}orTee(n){return new te(this._promise.then(a=>_e(this,void 0,void 0,function*(){if(a.isOk())return new re(a.value);try{yield n(a.error);}catch{}return new ie(a.error)})))}mapErr(n){return new te(this._promise.then(a=>_e(this,void 0,void 0,function*(){return a.isOk()?new re(a.value):new ie(yield n(a.error))})))}andThen(n){return new te(this._promise.then(a=>{if(a.isErr())return new ie(a.error);let t=n(a.value);return t instanceof te?t._promise:t}))}orElse(n){return new te(this._promise.then(a=>_e(this,void 0,void 0,function*(){return a.isErr()?n(a.error):new re(a.value)})))}match(n,a){return this._promise.then(t=>t.match(n,a))}unwrapOr(n){return this._promise.then(a=>a.unwrapOr(n))}safeUnwrap(){return it(this,arguments,function*(){return yield ye(yield ye(yield*Dr($r(yield ye(this._promise.then(n=>n.safeUnwrap()))))))})}then(n,a){return this._promise.then(n,a)}[Symbol.asyncIterator](){return it(this,arguments,function*(){let n=yield ye(this._promise);return n.isErr()&&(yield yield ye(me(n.error))),yield ye(n.value)})}};function Ue(e){return new H(Promise.resolve(new re(e)))}function me(e){return new H(Promise.resolve(new ie(e)))}var ut=e=>{let n=ve([]);for(let a of e)if(a.isErr()){n=se(a.error);break}else n.map(t=>t.push(a.value));return n},Mr=e=>H.fromSafePromise(Promise.all(e)).andThen(ut),pt=e=>{let n=ve([]);for(let a of e)a.isErr()&&n.isErr()?n.error.push(a.error):a.isErr()&&n.isOk()?n=se([a.error]):a.isOk()&&n.isOk()&&n.value.push(a.value);return n},Qr=e=>H.fromSafePromise(Promise.all(e)).andThen(pt),Ln;(function(e){function n(r,i){return (...s)=>{try{let o=r(...s);return ve(o)}catch(o){return se(i?i(o):o)}}}e.fromThrowable=n;function a(r){return ut(r)}e.combine=a;function t(r){return pt(r)}e.combineWithAllErrors=t;})(Ln||(Ln={}));function ve(e){return new re(e)}function se(e){return new ie(e)}var re=class{constructor(e){this.value=e;}isOk(){return true}isErr(){return !this.isOk()}map(e){return ve(e(this.value))}mapErr(e){return ve(this.value)}andThen(e){return e(this.value)}andThrough(e){return e(this.value).map(n=>this.value)}andTee(e){try{e(this.value);}catch{}return ve(this.value)}orTee(e){return ve(this.value)}orElse(e){return ve(this.value)}asyncAndThen(e){return e(this.value)}asyncAndThrough(e){return e(this.value).map(()=>this.value)}asyncMap(e){return H.fromSafePromise(e(this.value))}unwrapOr(e){return this.value}match(e,n){return e(this.value)}safeUnwrap(){let e=this.value;return (function*(){return e})()}_unsafeUnwrap(e){return this.value}_unsafeUnwrapErr(e){throw ot("Called `_unsafeUnwrapErr` on an Ok",this,e)}*[Symbol.iterator](){return this.value}},ie=class{constructor(e){this.error=e;}isOk(){return false}isErr(){return !this.isOk()}map(e){return se(this.error)}mapErr(e){return se(e(this.error))}andThrough(e){return se(this.error)}andTee(e){return se(this.error)}orTee(e){try{e(this.error);}catch{}return se(this.error)}andThen(e){return se(this.error)}orElse(e){return e(this.error)}asyncAndThen(e){return me(this.error)}asyncAndThrough(e){return me(this.error)}asyncMap(e){return me(this.error)}unwrapOr(e){return e}match(e,n){return n(this.error)}safeUnwrap(){let e=this.error;return (function*(){throw yield se(e),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(e){throw ot("Called `_unsafeUnwrap` on an Err",this,e)}_unsafeUnwrapErr(e){return this.error}*[Symbol.iterator](){let e=this;return yield e,e}};Ln.fromThrowable;var Kr=20,Gr=1,be=1e6,st=1e6,zr=-7,Yr=21,Zr=false,pn="[big.js] ",Re=pn+"Invalid ",Sn=Re+"decimal places",Xr=Re+"rounding mode",lt=pn+"Division by zero",R={},fe=void 0,ei=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function dt(){function e(n){var a=this;if(!(a instanceof e))return n===fe&&arguments.length===0?dt():new e(n);if(n instanceof e)a.s=n.s,a.e=n.e,a.c=n.c.slice();else {if(typeof n!="string"){if(e.strict===true&&typeof n!="bigint")throw TypeError(Re+"value");n=n===0&&1/n<0?"-0":String(n);}ni(a,n);}a.constructor=e;}return e.prototype=R,e.DP=Kr,e.RM=Gr,e.NE=zr,e.PE=Yr,e.strict=Zr,e.roundDown=0,e.roundHalfUp=1,e.roundHalfEven=2,e.roundUp=3,e}function ni(e,n){var a,t,r;if(!ei.test(n))throw Error(Re+"number");for(e.s=n.charAt(0)=="-"?(n=n.slice(1),-1):1,(a=n.indexOf("."))>-1&&(n=n.replace(".","")),(t=n.search(/e/i))>0?(a<0&&(a=t),a+=+n.slice(t+1),n=n.substring(0,t)):a<0&&(a=n.length),r=n.length,t=0;t<r&&n.charAt(t)=="0";)++t;if(t==r)e.c=[e.e=0];else {for(;r>0&&n.charAt(--r)=="0";);for(e.e=a-t-1,e.c=[],a=0;t<=r;)e.c[a++]=+n.charAt(t++);}return e}function qe(e,n,a,t){var r=e.c;if(a===fe&&(a=e.constructor.RM),a!==0&&a!==1&&a!==2&&a!==3)throw Error(Xr);if(n<1)t=a===3&&(t||!!r[0])||n===0&&(a===1&&r[0]>=5||a===2&&(r[0]>5||r[0]===5&&(t||r[1]!==fe))),r.length=1,t?(e.e=e.e-n+1,r[0]=1):r[0]=e.e=0;else if(n<r.length){if(t=a===1&&r[n]>=5||a===2&&(r[n]>5||r[n]===5&&(t||r[n+1]!==fe||r[n-1]&1))||a===3&&(t||!!r[0]),r.length=n,t){for(;++r[--n]>9;)if(r[n]=0,n===0){++e.e,r.unshift(1);break}}for(n=r.length;!r[--n];)r.pop();}return e}function Pe(e,n,a){var t=e.e,r=e.c.join(""),i=r.length;if(n)r=r.charAt(0)+(i>1?"."+r.slice(1):"")+(t<0?"e":"e+")+t;else if(t<0){for(;++t;)r="0"+r;r="0."+r;}else if(t>0)if(++t>i)for(t-=i;t--;)r+="0";else t<i&&(r=r.slice(0,t)+"."+r.slice(t));else i>1&&(r=r.charAt(0)+"."+r.slice(1));return e.s<0&&a?"-"+r:r}R.abs=function(){var e=new this.constructor(this);return e.s=1,e};R.cmp=function(e){var n,a=this,t=a.c,r=(e=new a.constructor(e)).c,i=a.s,s=e.s,o=a.e,p=e.e;if(!t[0]||!r[0])return t[0]?i:r[0]?-s:0;if(i!=s)return i;if(n=i<0,o!=p)return o>p^n?1:-1;for(s=(o=t.length)<(p=r.length)?o:p,i=-1;++i<s;)if(t[i]!=r[i])return t[i]>r[i]^n?1:-1;return o==p?0:o>p^n?1:-1};R.div=function(e){var n=this,a=n.constructor,t=n.c,r=(e=new a(e)).c,i=n.s==e.s?1:-1,s=a.DP;if(s!==~~s||s<0||s>be)throw Error(Sn);if(!r[0])throw Error(lt);if(!t[0])return e.s=i,e.c=[e.e=0],e;var o,p,l,c,d,f=r.slice(),N=o=r.length,h=t.length,g=t.slice(0,o),L=g.length,P=e,O=P.c=[],x=0,B=s+(P.e=n.e-e.e)+1;for(P.s=i,i=B<0?0:B,f.unshift(0);L++<o;)g.push(0);do{for(l=0;l<10;l++){if(o!=(L=g.length))c=o>L?1:-1;else for(d=-1,c=0;++d<o;)if(r[d]!=g[d]){c=r[d]>g[d]?1:-1;break}if(c<0){for(p=L==o?r:f;L;){if(g[--L]<p[L]){for(d=L;d&&!g[--d];)g[d]=9;--g[d],g[L]+=10;}g[L]-=p[L];}for(;!g[0];)g.shift();}else break}O[x++]=c?l:++l,g[0]&&c?g[L]=t[N]||0:g=[t[N]];}while((N++<h||g[0]!==fe)&&i--);return !O[0]&&x!=1&&(O.shift(),P.e--,B--),x>B&&qe(P,B,a.RM,g[0]!==fe),P};R.eq=function(e){return this.cmp(e)===0};R.gt=function(e){return this.cmp(e)>0};R.gte=function(e){return this.cmp(e)>-1};R.lt=function(e){return this.cmp(e)<0};R.lte=function(e){return this.cmp(e)<1};R.minus=R.sub=function(e){var n,a,t,r,i=this,s=i.constructor,o=i.s,p=(e=new s(e)).s;if(o!=p)return e.s=-p,i.plus(e);var l=i.c.slice(),c=i.e,d=e.c,f=e.e;if(!l[0]||!d[0])return d[0]?e.s=-p:l[0]?e=new s(i):e.s=1,e;if(o=c-f){for((r=o<0)?(o=-o,t=l):(f=c,t=d),t.reverse(),p=o;p--;)t.push(0);t.reverse();}else for(a=((r=l.length<d.length)?l:d).length,o=p=0;p<a;p++)if(l[p]!=d[p]){r=l[p]<d[p];break}if(r&&(t=l,l=d,d=t,e.s=-e.s),(p=(a=d.length)-(n=l.length))>0)for(;p--;)l[n++]=0;for(p=n;a>o;){if(l[--a]<d[a]){for(n=a;n&&!l[--n];)l[n]=9;--l[n],l[a]+=10;}l[a]-=d[a];}for(;l[--p]===0;)l.pop();for(;l[0]===0;)l.shift(),--f;return l[0]||(e.s=1,l=[f=0]),e.c=l,e.e=f,e};R.mod=function(e){var n,a=this,t=a.constructor,r=a.s,i=(e=new t(e)).s;if(!e.c[0])throw Error(lt);return a.s=e.s=1,n=e.cmp(a)==1,a.s=r,e.s=i,n?new t(a):(r=t.DP,i=t.RM,t.DP=t.RM=0,a=a.div(e),t.DP=r,t.RM=i,this.minus(a.times(e)))};R.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e};R.plus=R.add=function(e){var n,a,t,r=this,i=r.constructor;if(e=new i(e),r.s!=e.s)return e.s=-e.s,r.minus(e);var s=r.e,o=r.c,p=e.e,l=e.c;if(!o[0]||!l[0])return l[0]||(o[0]?e=new i(r):e.s=r.s),e;if(o=o.slice(),n=s-p){for(n>0?(p=s,t=l):(n=-n,t=o),t.reverse();n--;)t.push(0);t.reverse();}for(o.length-l.length<0&&(t=l,l=o,o=t),n=l.length,a=0;n;o[n]%=10)a=(o[--n]=o[n]+l[n]+a)/10|0;for(a&&(o.unshift(a),++p),n=o.length;o[--n]===0;)o.pop();return e.c=o,e.e=p,e};R.pow=function(e){var n=this,a=new n.constructor("1"),t=a,r=e<0;if(e!==~~e||e<-st||e>st)throw Error(Re+"exponent");for(r&&(e=-e);e&1&&(t=t.times(n)),e>>=1,!!e;)n=n.times(n);return r?a.div(t):t};R.prec=function(e,n){if(e!==~~e||e<1||e>be)throw Error(Re+"precision");return qe(new this.constructor(this),e,n)};R.round=function(e,n){if(e===fe)e=0;else if(e!==~~e||e<-be||e>be)throw Error(Sn);return qe(new this.constructor(this),e+this.e+1,n)};R.sqrt=function(){var e,n,a,t=this,r=t.constructor,i=t.s,s=t.e,o=new r("0.5");if(!t.c[0])return new r(t);if(i<0)throw Error(pn+"No square root");i=Math.sqrt(+Pe(t,true,true)),i===0||i===1/0?(n=t.c.join(""),n.length+s&1||(n+="0"),i=Math.sqrt(n),s=((s+1)/2|0)-(s<0||s&1),e=new r((i==1/0?"5e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+s)):e=new r(i+""),s=e.e+(r.DP+=4);do a=e,e=o.times(a.plus(t.div(a)));while(a.c.slice(0,s).join("")!==e.c.slice(0,s).join(""));return qe(e,(r.DP-=4)+e.e+1,r.RM)};R.times=R.mul=function(e){var n,a=this,t=a.constructor,r=a.c,i=(e=new t(e)).c,s=r.length,o=i.length,p=a.e,l=e.e;if(e.s=a.s==e.s?1:-1,!r[0]||!i[0])return e.c=[e.e=0],e;for(e.e=p+l,s<o&&(n=r,r=i,i=n,l=s,s=o,o=l),n=new Array(l=s+o);l--;)n[l]=0;for(p=o;p--;){for(o=0,l=s+p;l>p;)o=n[l]+i[p]*r[l-p-1]+o,n[l--]=o%10,o=o/10|0;n[l]=o;}for(o?++e.e:n.shift(),p=n.length;!n[--p];)n.pop();return e.c=n,e};R.toExponential=function(e,n){var a=this,t=a.c[0];if(e!==fe){if(e!==~~e||e<0||e>be)throw Error(Sn);for(a=qe(new a.constructor(a),++e,n);a.c.length<e;)a.c.push(0);}return Pe(a,true,!!t)};R.toFixed=function(e,n){var a=this,t=a.c[0];if(e!==fe){if(e!==~~e||e<0||e>be)throw Error(Sn);for(a=qe(new a.constructor(a),e+a.e+1,n),e=e+a.e+1;a.c.length<e;)a.c.push(0);}return Pe(a,false,!!t)};R.toJSON=R.toString=function(){var e=this,n=e.constructor;return Pe(e,e.e<=n.NE||e.e>=n.PE,!!e.c[0])};typeof Symbol<"u"&&(R[Symbol.for("nodejs.util.inspect.custom")]=R.toJSON);R.toNumber=function(){var e=+Pe(this,true,true);if(this.constructor.strict===true&&!this.eq(e.toString()))throw Error(pn+"Imprecise conversion");return e};R.toPrecision=function(e,n){var a=this,t=a.constructor,r=a.c[0];if(e!==fe){if(e!==~~e||e<1||e>be)throw Error(Re+"precision");for(a=qe(new t(a),e,n);a.c.length<e;)a.c.push(0);}return Pe(a,e<=a.e||a.e<=t.NE||a.e>=t.PE,!!r)};R.valueOf=function(){var e=this,n=e.constructor;if(n.strict===true)throw Error(pn+"valueOf disallowed");return Pe(e,e.e<=n.NE||e.e>=n.PE,true)};var ct=dt(),Qe=class extends Error{name="InvariantError"};function W(e,n){if(!e)throw new Qe(n)}function xe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function fa(e){if(e==null)throw new Qe("Value should not be null or undefined");return e}function Na(e){return /^0x[a-fA-F0-9]+$/.test(e)}function On(e){return W(Na(e),`Expected a valid hex string, but got: ${e}`),e}function wn(e){return W(e.length===42,`EvmAddress: invalid length ${e.length}`),On(e)}var Cn=On;var En=On;wn("0x0000000000000000000000000000000000000000");var je=class extends Error{asResultAsync(){return me(this)}asResult(){return se(this)}static from(e){if(e instanceof Error){let n=this.formatMessage(e);return new this(n,{cause:e})}return xe(e)&&"message"in e?new this(String(e.message)):new this(String(e))}static is(e){return e instanceof this}static formatMessage(e){let n=[],a=e;for(;a instanceof Error;){if("errors"in a&&Array.isArray(a.errors)){let t=a.errors.map(r=>r instanceof Error?r.message:String(r));n.push(t.join(", "));}else n.push(a.message);a=a.cause;}return n.join(" due to ")}};ct.strict=true;var yt=(e=>(e[e.Down=0]="Down",e[e.HalfUp=1]="HalfUp",e[e.HalfEven=2]="HalfEven",e[e.Up=3]="Up",e))(yt||{});(class F{value;static MAX_VAL=F.new(Number.MAX_VALUE.toString());static MIN_VAL=F.new(Number.MIN_VALUE.toString());constructor(n){this.value=new ct(n);}valueOf(){try{return this.value.valueOf()}catch(n){throw new Qe("BigDecimal cannot be converted to a number",{cause:n})}}toNumber(){throw new Qe("BigDecimal cannot be converted to a number")}abs(){return new F(this.value.abs())}add(n){return new F(this.value.add(this.toBigSource(n)))}div(n){return new F(this.value.div(this.toBigSource(n)))}minus(n){return new F(this.value.minus(this.toBigSource(n)))}mod(n){return new F(this.value.mod(this.toBigSource(n)))}mul(n){return new F(this.value.mul(this.toBigSource(n)))}neg(){return new F(this.value.neg())}plus(n){return new F(this.value.plus(this.toBigSource(n)))}pow(n){return new F(this.value.pow(n))}prec(n,a){return new F(this.value.prec(n,a))}round(n,a){return new F(this.value.round(n,a))}sqrt(){return new F(this.value.sqrt())}sub(n){return new F(this.value.sub(this.toBigSource(n)))}times(n){return new F(this.value.times(this.toBigSource(n)))}cmp(n){return this.value.cmp(this.toBigSource(n))}eq(n){return this.value.eq(this.toBigSource(n))}gt(n){return this.value.gt(this.toBigSource(n))}gte(n){return this.value.gte(this.toBigSource(n))}lt(n){return this.value.lt(this.toBigSource(n))}lte(n){return this.value.lte(this.toBigSource(n))}toExponential(n,a){return this.value.toExponential(n,a)}toFixed(n,a){return this.value.toFixed(n,a)}toPrecision(n,a){return this.value.toPrecision(n,a)}toString(){return this.value.toString()}toJSON(){return this.value.toFixed()}rescale(n){return this.mul(10**n)}toDisplayString(n,a){let{rounding:t=1,minFractionDigits:r=0,trimTrailingZeros:i=false}=a??{};if(this.eq(0))return r>0?`0.${"0".repeat(r)}`:"0";let s=this.applyPrecisionWithMinFractionDigits(n,r,t);return this.formatDecimalString(s,r,i)}toApproximateNumber(){return this.gt(F.MAX_VAL)?Number.MAX_VALUE:this.lt(F.MAX_VAL.times(-1))?-Number.MAX_VALUE:this.abs().lt(F.MIN_VAL)?this.lt("0")?-0:0:Number(this.toString())}static new(n){try{return new F(n)}catch(a){throw new Qe("Invalid value for BigDecimal",{cause:a})}}static isBigDecimal(n){return n instanceof F}static min(n,a,...t){return [a,...t].reduce((r,i)=>r.lt(i)?r:i,n)}static max(n,a,...t){return [a,...t].reduce((r,i)=>r.gt(i)?r:i,n)}toBigSource(n){switch(typeof n){case "bigint":return n.toString();case "number":return n.toString();case "string":return n;default:return n.toFixed()}}getIntegerDigitCount(){let n=this.abs().toFixed(),[a]=n.split(".");return a?.length??n.length}applyPrecisionWithMinFractionDigits(n,a,t){if(this.gte(1)&&a>0){let r=this.getIntegerDigitCount(),i=r+a,s=Math.max(n,i)-r;return this.round(s,t)}return this.applyAdaptivePrecision(n,t)}formatDecimalString(n,a,t){let r=n.toFixed();return a>0&&(r=this.ensureMinFractionDigits(r,a)),t&&r.includes(".")&&(r=r.replace(/\.?0+$/,"")),r}ensureMinFractionDigits(n,a){let[t,r=""]=n.split(".");return r.length<a?`${t}.${r.padEnd(a,"0")}`:n}applyAdaptivePrecision(n,a){if(this.abs().gte(1)){let t=this.getIntegerDigitCount(),r=Math.max(0,n-t);return this.round(r,a)}return this.prec(n,a)}});function Ke(e){let n=Number(e);return W(Number.isInteger(n)&&n>=0,`Invalid ChainId: ${e}`),n}var bt=(e=>(e.UNAUTHENTICATED="UNAUTHENTICATED",e.FORBIDDEN="FORBIDDEN",e.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",e.BAD_USER_INPUT="BAD_USER_INPUT",e.BAD_REQUEST="BAD_REQUEST",e))(bt||{});var Je=class Ut extends je{name="UnexpectedError";static upgradeRequired(n){return new Ut(`${n}. Check for SDK updates.`)}},nn=class extends je{name="SigningError"},Oa=class Rt extends je{name="TransactionError";txHash;constructor(n,a,t){super(n,{cause:t}),this.txHash=a;}static new(n){let{txHash:a,request:t,link:r}=n,i=r?`Transaction failed: ${a}
|
|
2
|
+
\u2192 View on explorer: ${r}`:`Transaction failed: ${a}`;return new Rt(i,a,t)}};var Fe=class extends je{name="CancelError"};var Dn={DOCUMENT:"Document",FRAGMENT_DEFINITION:"FragmentDefinition"},Ti=class extends Error{constructor(e,n,a,t,r,i,s){super(e),this.name="GraphQLError",this.message=e,r&&(this.path=r),n&&(this.nodes=Array.isArray(n)?n:[n]),a&&(this.source=a),t&&(this.positions=t),i&&(this.originalError=i);var o=s;if(!o&&i){var p=i.extensions;p&&typeof p=="object"&&(o=p);}this.extensions=o||{};}toJSON(){return {...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return "GraphQLError"}},T,m;function ee(e){return new Ti(`Syntax Error: Unexpected token at ${m} in ${e}`)}function qt(e){if(e.lastIndex=m,e.test(T))return T.slice(m,m=e.lastIndex)}var $n=/ +(?=[^\s])/y;function Ai(e){for(var n=e.split(`
|
|
3
|
+
`),a="",t=0,r=0,i=n.length-1,s=0;s<n.length;s++)$n.lastIndex=0,$n.test(n[s])&&(s&&(!t||$n.lastIndex<t)&&(t=$n.lastIndex),r=r||s,i=s);for(var o=r;o<=i;o++)o!==r&&(a+=`
|
|
4
|
+
`),a+=n[o].slice(t).replace(/\\"""/g,'"""');return a}function b(){for(var e=0|T.charCodeAt(m++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|T.charCodeAt(m++))if(e===35)for(;(e=T.charCodeAt(m++))!==10&&e!==13;);m--;}function Ea(){for(var e=m,n=0|T.charCodeAt(m++);n>=48&&n<=57||n>=65&&n<=90||n===95||n>=97&&n<=122;n=0|T.charCodeAt(m++));if(e===m-1)throw ee("Name");var a=T.slice(e,--m);return b(),a}function ne(){return {kind:"Name",value:Ea()}}var Li=/(?:"""|(?:[\s\S]*?[^\\])""")/y,Si=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function Wn(e){var n;switch(T.charCodeAt(m)){case 91:m++,b();for(var a=[];T.charCodeAt(m)!==93;)a.push(Wn(e));return m++,b(),{kind:"ListValue",values:a};case 123:m++,b();for(var t=[];T.charCodeAt(m)!==125;){var r=ne();if(T.charCodeAt(m++)!==58)throw ee("ObjectField");b(),t.push({kind:"ObjectField",name:r,value:Wn(e)});}return m++,b(),{kind:"ObjectValue",fields:t};case 36:if(e)throw ee("Variable");return m++,{kind:"Variable",name:ne()};case 34:if(T.charCodeAt(m+1)===34&&T.charCodeAt(m+2)===34){if(m+=3,(n=qt(Li))==null)throw ee("StringValue");return b(),{kind:"StringValue",value:Ai(n.slice(0,-3)),block:true}}else {var i=m,s;m++;var o=false;for(s=0|T.charCodeAt(m++);s===92&&(m++,o=true)||s!==10&&s!==13&&s!==34&&s;s=0|T.charCodeAt(m++));if(s!==34)throw ee("StringValue");return n=T.slice(i,m),b(),{kind:"StringValue",value:o?JSON.parse(n):n.slice(1,-1),block:false}}case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var p=m++,l;(l=0|T.charCodeAt(m++))>=48&&l<=57;);var c=T.slice(p,--m);if((l=T.charCodeAt(m))===46||l===69||l===101){if((n=qt(Si))==null)throw ee("FloatValue");return b(),{kind:"FloatValue",value:c+n}}else return b(),{kind:"IntValue",value:c};case 110:if(T.charCodeAt(m+1)===117&&T.charCodeAt(m+2)===108&&T.charCodeAt(m+3)===108)return m+=4,b(),{kind:"NullValue"};break;case 116:if(T.charCodeAt(m+1)===114&&T.charCodeAt(m+2)===117&&T.charCodeAt(m+3)===101)return m+=4,b(),{kind:"BooleanValue",value:true};break;case 102:if(T.charCodeAt(m+1)===97&&T.charCodeAt(m+2)===108&&T.charCodeAt(m+3)===115&&T.charCodeAt(m+4)===101)return m+=5,b(),{kind:"BooleanValue",value:false};break}return {kind:"EnumValue",value:Ea()}}function xt(e){if(T.charCodeAt(m)===40){var n=[];m++,b();do{var a=ne();if(T.charCodeAt(m++)!==58)throw ee("Argument");b(),n.push({kind:"Argument",name:a,value:Wn(e)});}while(T.charCodeAt(m)!==41);return m++,b(),n}}function Se(e){if(T.charCodeAt(m)===64){var n=[];do m++,n.push({kind:"Directive",name:ne(),arguments:xt(e)});while(T.charCodeAt(m)===64);return n}}function Oi(){for(var e=0;T.charCodeAt(m)===91;)e++,m++,b();var n={kind:"NamedType",name:ne()};do if(T.charCodeAt(m)===33&&(m++,b(),n={kind:"NonNullType",type:n}),e){if(T.charCodeAt(m++)!==93)throw ee("NamedType");b(),n={kind:"ListType",type:n};}while(e--);return n}function Vn(){if(T.charCodeAt(m++)!==123)throw ee("SelectionSet");return b(),Hn()}function Hn(){var e=[];do if(T.charCodeAt(m)===46){if(T.charCodeAt(++m)!==46||T.charCodeAt(++m)!==46)throw ee("SelectionSet");switch(m++,b(),T.charCodeAt(m)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:Se(false),selectionSet:Vn()});break;case 111:T.charCodeAt(m+1)===110?(m+=2,b(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:ne()},directives:Se(false),selectionSet:Vn()})):e.push({kind:"FragmentSpread",name:ne(),directives:Se(false)});break;case 123:m++,b(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:Hn()});break;default:e.push({kind:"FragmentSpread",name:ne(),directives:Se(false)});}}else {var n=ne(),a=void 0;T.charCodeAt(m)===58&&(m++,b(),a=n,n=ne());var t=xt(false),r=Se(false),i=void 0;T.charCodeAt(m)===123&&(m++,b(),i=Hn()),e.push({kind:"Field",alias:a,name:n,arguments:t,directives:r,selectionSet:i});}while(T.charCodeAt(m)!==125);return m++,b(),{kind:"SelectionSet",selections:e}}function wi(){if(b(),T.charCodeAt(m)===40){var e=[];m++,b();do{if(T.charCodeAt(m++)!==36)throw ee("Variable");var n=ne();if(T.charCodeAt(m++)!==58)throw ee("VariableDefinition");b();var a=Oi(),t=void 0;T.charCodeAt(m)===61&&(m++,b(),t=Wn(true)),b(),e.push({kind:"VariableDefinition",variable:{kind:"Variable",name:n},type:a,defaultValue:t,directives:Se(true)});}while(T.charCodeAt(m)!==41);return m++,b(),e}}function Ci(){var e=ne();if(T.charCodeAt(m++)!==111||T.charCodeAt(m++)!==110)throw ee("FragmentDefinition");return b(),{kind:"FragmentDefinition",name:e,typeCondition:{kind:"NamedType",name:ne()},directives:Se(false),selectionSet:Vn()}}function Ei(){var e=[];do if(T.charCodeAt(m)===123)m++,b(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:Hn()});else {var n=Ea();switch(n){case "fragment":e.push(Ci());break;case "query":case "mutation":case "subscription":var a,t=void 0;(a=T.charCodeAt(m))!==40&&a!==64&&a!==123&&(t=ne()),e.push({kind:"OperationDefinition",operation:n,name:t,variableDefinitions:wi(),directives:Se(false),selectionSet:Vn()});break;default:throw ee("Document")}}while(m<T.length);return e}function _i(e,n){return T=e.body?e.body:e,m=0,b(),{kind:"Document",definitions:Ei(),loc:{start:0,end:T.length,startToken:void 0,endToken:void 0,source:{body:T,name:"graphql.web",locationOffset:{line:1,column:1}}}}}var Pt=0,wa=new Set;function Bt(){function e(n,a){var t=_i(n).definitions,r=new Set;for(var i of a||[])for(var s of i.definitions)s.kind===Dn.FRAGMENT_DEFINITION&&!r.has(s)&&(t.push(s),r.add(s));var o;(o=t[0].kind===Dn.FRAGMENT_DEFINITION)&&t[0].directives&&(t[0].directives=t[0].directives.filter((l=>l.name.value!=="_unmask")));var p;return {kind:Dn.DOCUMENT,definitions:t,get loc(){if(!p&&o){var l=n+(function(c){try{Pt++;var d="";for(var f of c)if(!wa.has(f)){wa.add(f);var{loc:N}=f;N&&(d+=N.source.body);}return d}finally{--Pt==0&&wa.clear();}})(a||[]);return {start:0,end:l.length,source:{body:l,name:"GraphQLTada",locationOffset:{line:1,column:1}}}}return p},set loc(l){p=l;}}}return e.scalar=function(n,a){return a},e.persisted=function(n,a){return {kind:Dn.DOCUMENT,definitions:a?a.definitions:[],documentId:n}},e}Bt();var bi=(e=>(e.Asc="ASC",e.Desc="DESC",e))(bi||{}),Ui=(e=>(e.Ten="TEN",e.Fifty="FIFTY",e))(Ui||{}),It=(e=>(e.LastDay="LAST_DAY",e.LastWeek="LAST_WEEK",e.LastMonth="LAST_MONTH",e.LastSixMonths="LAST_SIX_MONTHS",e.LastYear="LAST_YEAR",e.All="ALL",e))(It||{}),Ri=(e=>(e.SpokeBorrow="SPOKE_BORROW",e.SpokeRepay="SPOKE_REPAY",e.SpokeSupply="SPOKE_SUPPLY",e.SpokeWithdraw="SPOKE_WITHDRAW",e.SpokeUpdateUserRiskPremium="SPOKE_UPDATE_USER_RISK_PREMIUM",e.SpokeUpdateUserDynamicConfig="SPOKE_UPDATE_USER_DYNAMIC_CONFIG",e.SpokeSetUserUsingAsCollateral="SPOKE_SET_USER_USING_AS_COLLATERAL",e.SpokeSetUserPositionManager="SPOKE_SET_USER_POSITION_MANAGER",e.RenounceSpokeUserPositionManager="RENOUNCE_SPOKE_USER_POSITION_MANAGER",e.Liquidation="LIQUIDATION",e))(Ri||{}),qi=(e=>(e.TESTNET_ONLY="TESTNET_ONLY",e.MAINNET_ONLY="MAINNET_ONLY",e.ALL="ALL",e))(qi||{}),Pi=(e=>(e.Borrow="BORROW",e.Supply="SUPPLY",e.Withdraw="WITHDRAW",e.Repay="REPAY",e.Liquidated="LIQUIDATED",e.SetAsCollateral="SET_AS_COLLATERAL",e.UpdatedDynamicConfig="UPDATED_DYNAMIC_CONFIG",e.UpdatedRiskPremium="UPDATED_RISK_PREMIUM",e.TokenToTokenSwap="TOKEN_TO_TOKEN_SWAP",e.SupplySwap="SUPPLY_SWAP",e.BorrowSwap="BORROW_SWAP",e.RepayWithSupply="REPAY_WITH_SUPPLY",e.WithdrawSwap="WITHDRAW_SWAP",e))(Pi||{}),xi=(e=>(e.Highest="HIGHEST",e.Lowest="LOWEST",e.Average="AVERAGE",e))(xi||{}),Bi=(e=>(e.Highest="HIGHEST",e.Lowest="LOWEST",e))(Bi||{}),Jt=(e=>(e.Usd="USD",e.Eur="EUR",e.Gbp="GBP",e))(Jt||{}),Ii=(e=>(e.Supply="SUPPLY",e.Borrow="BORROW",e.Collateral="COLLATERAL",e.All="ALL",e))(Ii||{}),Ji=(e=>(e.Buy="BUY",e.Sell="SELL",e))(Ji||{}),Fi=(e=>(e.Current="CURRENT",e.New="NEW",e))(Fi||{}),Di=(e=>(e.Repay="REPAY",e.Supply="SUPPLY",e))(Di||{}),$i=(e=>(e.Current="CURRENT",e.New="NEW",e))($i||{}),Wi=(e=>(e.Withdraw="WITHDRAW",e.Buy="BUY",e))(Wi||{}),Vi=(e=>(e.Cancelled="CANCELLED",e.Expired="EXPIRED",e.Fulfilled="FULFILLED",e.Open="OPEN",e.PendingSignature="PENDING_SIGNATURE",e))(Vi||{}),Hi=(e=>(e.Stablecoin="STABLECOIN",e.EthCorrelated="ETH_CORRELATED",e))(Hi||{}),Mi=(e=>(e.AllDynamicConfig="ALL_DYNAMIC_CONFIG",e.JustRiskPremium="JUST_RISK_PREMIUM",e))(Mi||{}),Qi=(e=>(e.Fast="FAST",e.Accurate="ACCURATE",e))(Qi||{}),u=Bt(),Ft=u(`fragment DomainData on DomainData {
|
|
5
|
+
name
|
|
6
|
+
version
|
|
7
|
+
chainId
|
|
8
|
+
verifyingContract
|
|
9
|
+
}`),Ae=u(`fragment DecimalNumber on DecimalNumber {
|
|
10
|
+
__typename
|
|
11
|
+
onChainValue
|
|
12
|
+
decimals
|
|
13
|
+
value
|
|
14
|
+
}`),I=u(`fragment PercentNumber on PercentNumber {
|
|
15
|
+
__typename
|
|
16
|
+
onChainValue
|
|
17
|
+
decimals
|
|
18
|
+
value
|
|
19
|
+
normalized
|
|
20
|
+
}`),ji=u(`fragment DecimalNumberWithChange on DecimalNumberWithChange {
|
|
21
|
+
__typename
|
|
22
|
+
current {
|
|
23
|
+
...DecimalNumber
|
|
24
|
+
}
|
|
25
|
+
change(window: $timeWindow) {
|
|
26
|
+
...PercentNumber
|
|
27
|
+
}
|
|
28
|
+
}`,[Ae,I]),oe=u(`fragment ExchangeAmount on ExchangeAmount {
|
|
29
|
+
__typename
|
|
30
|
+
value
|
|
31
|
+
name
|
|
32
|
+
symbol
|
|
33
|
+
icon
|
|
34
|
+
decimals
|
|
35
|
+
}`),Mn=u(`fragment TokenInfo on TokenInfo {
|
|
36
|
+
__typename
|
|
37
|
+
id
|
|
38
|
+
name
|
|
39
|
+
symbol
|
|
40
|
+
icon
|
|
41
|
+
decimals
|
|
42
|
+
categories
|
|
43
|
+
}`),V=u(`fragment Chain on Chain {
|
|
44
|
+
__typename
|
|
45
|
+
name
|
|
46
|
+
icon
|
|
47
|
+
chainId
|
|
48
|
+
rpcUrl
|
|
49
|
+
explorerUrl
|
|
50
|
+
isTestnet
|
|
51
|
+
isFork
|
|
52
|
+
nativeWrappedToken
|
|
53
|
+
nativeGateway
|
|
54
|
+
signatureGateway
|
|
55
|
+
nativeInfo {
|
|
56
|
+
...TokenInfo
|
|
57
|
+
}
|
|
58
|
+
}`,[Mn]),Oe=u(`fragment Erc20Token on Erc20Token {
|
|
59
|
+
__typename
|
|
60
|
+
info {
|
|
61
|
+
...TokenInfo
|
|
62
|
+
}
|
|
63
|
+
address
|
|
64
|
+
chain {
|
|
65
|
+
...Chain
|
|
66
|
+
}
|
|
67
|
+
isWrappedNativeToken
|
|
68
|
+
}`,[Mn,V]),Dt=u(`fragment NativeToken on NativeToken {
|
|
69
|
+
__typename
|
|
70
|
+
info {
|
|
71
|
+
...TokenInfo
|
|
72
|
+
}
|
|
73
|
+
chain {
|
|
74
|
+
...Chain
|
|
75
|
+
}
|
|
76
|
+
}`,[Mn,V]),ae=u(`fragment Erc20Amount on Erc20Amount {
|
|
77
|
+
__typename
|
|
78
|
+
token {
|
|
79
|
+
...Erc20Token
|
|
80
|
+
}
|
|
81
|
+
amount {
|
|
82
|
+
...DecimalNumber
|
|
83
|
+
}
|
|
84
|
+
exchange(currency: $currency){
|
|
85
|
+
...ExchangeAmount
|
|
86
|
+
}
|
|
87
|
+
exchangeRate(currency: $currency){
|
|
88
|
+
...DecimalNumber
|
|
89
|
+
}
|
|
90
|
+
}`,[Oe,Ae,oe]),$t=u(`fragment NativeAmount on NativeAmount {
|
|
91
|
+
__typename
|
|
92
|
+
token {
|
|
93
|
+
...NativeToken
|
|
94
|
+
}
|
|
95
|
+
amount {
|
|
96
|
+
...DecimalNumber
|
|
97
|
+
}
|
|
98
|
+
exchange(currency: $currency){
|
|
99
|
+
...ExchangeAmount
|
|
100
|
+
}
|
|
101
|
+
exchangeRate(currency: $currency){
|
|
102
|
+
...DecimalNumber
|
|
103
|
+
}
|
|
104
|
+
}`,[Dt,Ae,oe]),_a=u(`fragment TokenAmount on TokenAmount {
|
|
105
|
+
__typename
|
|
106
|
+
... on Erc20Amount {
|
|
107
|
+
...Erc20Amount
|
|
108
|
+
}
|
|
109
|
+
... on NativeAmount {
|
|
110
|
+
...NativeAmount
|
|
111
|
+
}
|
|
112
|
+
}`,[ae,$t]),Ki=u(`fragment Token on Token {
|
|
113
|
+
__typename
|
|
114
|
+
... on Erc20Token {
|
|
115
|
+
...Erc20Token
|
|
116
|
+
}
|
|
117
|
+
... on NativeToken {
|
|
118
|
+
...NativeToken
|
|
119
|
+
}
|
|
120
|
+
}`,[Oe,Dt]),dn=u(`fragment ExchangeAmountWithChange on ExchangeAmountWithChange {
|
|
121
|
+
__typename
|
|
122
|
+
current {
|
|
123
|
+
...ExchangeAmount
|
|
124
|
+
}
|
|
125
|
+
change(window: $timeWindow){
|
|
126
|
+
...PercentNumber
|
|
127
|
+
}
|
|
128
|
+
}`,[oe,I]),Gi=u(`fragment PercentNumberWithChange on PercentNumberWithChange {
|
|
129
|
+
__typename
|
|
130
|
+
current {
|
|
131
|
+
...PercentNumber
|
|
132
|
+
}
|
|
133
|
+
change(window: $timeWindow){
|
|
134
|
+
...PercentNumber
|
|
135
|
+
}
|
|
136
|
+
}`,[I]),Qn=u(`fragment PaginatedResultInfo on PaginatedResultInfo {
|
|
137
|
+
__typename
|
|
138
|
+
prev
|
|
139
|
+
next
|
|
140
|
+
}`),zi=u(`fragment PercentNumberVariation on PercentNumberVariation {
|
|
141
|
+
__typename
|
|
142
|
+
current {
|
|
143
|
+
...PercentNumber
|
|
144
|
+
}
|
|
145
|
+
after {
|
|
146
|
+
...PercentNumber
|
|
147
|
+
}
|
|
148
|
+
}`,[I]),Yi=u(`fragment ExchangeAmountVariation on ExchangeAmountVariation {
|
|
149
|
+
__typename
|
|
150
|
+
current {
|
|
151
|
+
...ExchangeAmount
|
|
152
|
+
}
|
|
153
|
+
after {
|
|
154
|
+
...ExchangeAmount
|
|
155
|
+
}
|
|
156
|
+
}`,[oe]),Zi=u(`fragment HealthFactorWithChange on HealthFactorWithChange {
|
|
157
|
+
__typename
|
|
158
|
+
current
|
|
159
|
+
change(window: $timeWindow) {
|
|
160
|
+
...PercentNumber
|
|
161
|
+
}
|
|
162
|
+
}`,[I]),Xi=u(`fragment HealthFactorVariation on HealthFactorVariation {
|
|
163
|
+
__typename
|
|
164
|
+
current
|
|
165
|
+
after
|
|
166
|
+
}`),es=u(`fragment HealthFactorError on HealthFactorError {
|
|
167
|
+
__typename
|
|
168
|
+
reason
|
|
169
|
+
current
|
|
170
|
+
after
|
|
171
|
+
}`),ns=u(`fragment HealthFactorResult on HealthFactorResult {
|
|
172
|
+
__typename
|
|
173
|
+
... on HealthFactorVariation {
|
|
174
|
+
...HealthFactorVariation
|
|
175
|
+
}
|
|
176
|
+
... on HealthFactorError {
|
|
177
|
+
...HealthFactorError
|
|
178
|
+
}
|
|
179
|
+
}`,[Xi,es]),cn=u(`fragment InsufficientBalanceError on InsufficientBalanceError {
|
|
180
|
+
__typename
|
|
181
|
+
required {
|
|
182
|
+
...DecimalNumber
|
|
183
|
+
}
|
|
184
|
+
available {
|
|
185
|
+
...DecimalNumber
|
|
186
|
+
}
|
|
187
|
+
}`,[Ae]),as=u(`fragment HubSummary on HubSummary {
|
|
188
|
+
__typename
|
|
189
|
+
totalBorrowed {
|
|
190
|
+
...ExchangeAmountWithChange
|
|
191
|
+
}
|
|
192
|
+
totalBorrowCap {
|
|
193
|
+
...ExchangeAmount
|
|
194
|
+
}
|
|
195
|
+
totalSupplied {
|
|
196
|
+
...ExchangeAmountWithChange
|
|
197
|
+
}
|
|
198
|
+
totalSupplyCap {
|
|
199
|
+
...ExchangeAmount
|
|
200
|
+
}
|
|
201
|
+
utilizationRate {
|
|
202
|
+
...PercentNumber
|
|
203
|
+
}
|
|
204
|
+
}`,[oe,dn,I]),jn=u(`fragment Hub on Hub {
|
|
205
|
+
__typename
|
|
206
|
+
id
|
|
207
|
+
name
|
|
208
|
+
address
|
|
209
|
+
chain {
|
|
210
|
+
...Chain
|
|
211
|
+
}
|
|
212
|
+
summary(currency: $currency) {
|
|
213
|
+
...HubSummary
|
|
214
|
+
}
|
|
215
|
+
}`,[V,as]),ts=u(`fragment HubAssetSummary on HubAssetSummary {
|
|
216
|
+
__typename
|
|
217
|
+
supplied {
|
|
218
|
+
...Erc20Amount
|
|
219
|
+
}
|
|
220
|
+
borrowed {
|
|
221
|
+
...Erc20Amount
|
|
222
|
+
}
|
|
223
|
+
availableLiquidity {
|
|
224
|
+
...Erc20Amount
|
|
225
|
+
}
|
|
226
|
+
supplyApy {
|
|
227
|
+
...PercentNumber
|
|
228
|
+
}
|
|
229
|
+
borrowApy {
|
|
230
|
+
...PercentNumber
|
|
231
|
+
}
|
|
232
|
+
netApy {
|
|
233
|
+
...PercentNumber
|
|
234
|
+
}
|
|
235
|
+
utilizationRate {
|
|
236
|
+
...PercentNumber
|
|
237
|
+
}
|
|
238
|
+
}`,[ae,I]),rs=u(`fragment HubAssetSettings on HubAssetSettings {
|
|
239
|
+
__typename
|
|
240
|
+
feeReceiver
|
|
241
|
+
liquidityFee {
|
|
242
|
+
...PercentNumber
|
|
243
|
+
}
|
|
244
|
+
irStrategy
|
|
245
|
+
reinvestmentController
|
|
246
|
+
}`,[I]),is=u(`fragment HubAssetUserState on HubAssetUserState {
|
|
247
|
+
__typename
|
|
248
|
+
balance {
|
|
249
|
+
...Erc20Amount
|
|
250
|
+
}
|
|
251
|
+
}`,[ae]),ba=u(`fragment HubAsset on HubAsset {
|
|
252
|
+
__typename
|
|
253
|
+
id
|
|
254
|
+
onchainAssetId
|
|
255
|
+
hub {
|
|
256
|
+
...Hub
|
|
257
|
+
}
|
|
258
|
+
underlying {
|
|
259
|
+
...Erc20Token
|
|
260
|
+
}
|
|
261
|
+
summary {
|
|
262
|
+
...HubAssetSummary
|
|
263
|
+
}
|
|
264
|
+
settings {
|
|
265
|
+
...HubAssetSettings
|
|
266
|
+
}
|
|
267
|
+
userState {
|
|
268
|
+
...HubAssetUserState
|
|
269
|
+
}
|
|
270
|
+
}`,[jn,Oe,ts,rs,is]),ss=u(`fragment PermitTypedData on PermitTypedData {
|
|
271
|
+
__typename
|
|
272
|
+
types
|
|
273
|
+
primaryType
|
|
274
|
+
domain {
|
|
275
|
+
...DomainData
|
|
276
|
+
}
|
|
277
|
+
message
|
|
278
|
+
}`,[Ft]);var ue=u(`fragment Spoke on Spoke {
|
|
279
|
+
__typename
|
|
280
|
+
id
|
|
281
|
+
name
|
|
282
|
+
address
|
|
283
|
+
chain {
|
|
284
|
+
...Chain
|
|
285
|
+
}
|
|
286
|
+
}`,[V]),os=u(`fragment SpokePositionManager on SpokePositionManager {
|
|
287
|
+
__typename
|
|
288
|
+
address
|
|
289
|
+
active
|
|
290
|
+
name
|
|
291
|
+
}`),us=u(`fragment PaginatedSpokePositionManagerResult on PaginatedSpokePositionManagerResult {
|
|
292
|
+
__typename
|
|
293
|
+
items {
|
|
294
|
+
...SpokePositionManager
|
|
295
|
+
}
|
|
296
|
+
pageInfo {
|
|
297
|
+
...PaginatedResultInfo
|
|
298
|
+
}
|
|
299
|
+
}`,[os,Qn]),ps=u(`fragment SpokeUserPositionManager on SpokeUserPositionManager {
|
|
300
|
+
__typename
|
|
301
|
+
address
|
|
302
|
+
approvedOn
|
|
303
|
+
active
|
|
304
|
+
name
|
|
305
|
+
}`),ls=u(`fragment PaginatedSpokeUserPositionManagerResult on PaginatedSpokeUserPositionManagerResult {
|
|
306
|
+
__typename
|
|
307
|
+
items {
|
|
308
|
+
...SpokeUserPositionManager
|
|
309
|
+
}
|
|
310
|
+
pageInfo {
|
|
311
|
+
...PaginatedResultInfo
|
|
312
|
+
}
|
|
313
|
+
}`,[ps,Qn]),ds=u(`fragment ReserveSettings on ReserveSettings {
|
|
314
|
+
__typename
|
|
315
|
+
collateralFactor {
|
|
316
|
+
...PercentNumber
|
|
317
|
+
}
|
|
318
|
+
maxLiquidationBonus {
|
|
319
|
+
...PercentNumber
|
|
320
|
+
}
|
|
321
|
+
liquidationFee {
|
|
322
|
+
...PercentNumber
|
|
323
|
+
}
|
|
324
|
+
collateralRisk {
|
|
325
|
+
...PercentNumber
|
|
326
|
+
}
|
|
327
|
+
borrowable
|
|
328
|
+
collateral
|
|
329
|
+
suppliable
|
|
330
|
+
latestDynamicConfigKey
|
|
331
|
+
}`,[I]),cs=u(`fragment ReserveStatus on ReserveStatus {
|
|
332
|
+
__typename
|
|
333
|
+
frozen
|
|
334
|
+
paused
|
|
335
|
+
active
|
|
336
|
+
}`),ys=u(`fragment ReserveSummary on ReserveSummary {
|
|
337
|
+
__typename
|
|
338
|
+
supplied {
|
|
339
|
+
...Erc20Amount
|
|
340
|
+
}
|
|
341
|
+
borrowed {
|
|
342
|
+
...Erc20Amount
|
|
343
|
+
}
|
|
344
|
+
supplyApy {
|
|
345
|
+
...PercentNumber
|
|
346
|
+
}
|
|
347
|
+
borrowApy {
|
|
348
|
+
...PercentNumber
|
|
349
|
+
}
|
|
350
|
+
}`,[ae,I]),ms=u(`fragment ReserveUserState on ReserveUserState {
|
|
351
|
+
__typename
|
|
352
|
+
balance {
|
|
353
|
+
...Erc20Amount
|
|
354
|
+
}
|
|
355
|
+
suppliable {
|
|
356
|
+
...Erc20Amount
|
|
357
|
+
}
|
|
358
|
+
borrowable {
|
|
359
|
+
...Erc20Amount
|
|
360
|
+
}
|
|
361
|
+
borrowApy {
|
|
362
|
+
...PercentNumber
|
|
363
|
+
}
|
|
364
|
+
collateralFactor {
|
|
365
|
+
...PercentNumber
|
|
366
|
+
}
|
|
367
|
+
maxLiquidationBonus {
|
|
368
|
+
...PercentNumber
|
|
369
|
+
}
|
|
370
|
+
liquidationFee {
|
|
371
|
+
...PercentNumber
|
|
372
|
+
}
|
|
373
|
+
dynamicConfigKey
|
|
374
|
+
}`,[ae,I]),Kn=u(`fragment Reserve on Reserve {
|
|
375
|
+
__typename
|
|
376
|
+
id
|
|
377
|
+
onChainId
|
|
378
|
+
spoke {
|
|
379
|
+
...Spoke
|
|
380
|
+
}
|
|
381
|
+
borrowCap
|
|
382
|
+
supplyCap
|
|
383
|
+
chain {
|
|
384
|
+
...Chain
|
|
385
|
+
}
|
|
386
|
+
summary {
|
|
387
|
+
...ReserveSummary
|
|
388
|
+
}
|
|
389
|
+
settings {
|
|
390
|
+
...ReserveSettings
|
|
391
|
+
}
|
|
392
|
+
status {
|
|
393
|
+
...ReserveStatus
|
|
394
|
+
}
|
|
395
|
+
canBorrow
|
|
396
|
+
canSupply
|
|
397
|
+
canUseAsCollateral
|
|
398
|
+
canSwapFrom
|
|
399
|
+
userState {
|
|
400
|
+
...ReserveUserState
|
|
401
|
+
}
|
|
402
|
+
asset {
|
|
403
|
+
...HubAsset
|
|
404
|
+
}
|
|
405
|
+
}`,[ue,V,ys,ds,cs,ms,ba]),we=u(`fragment ReserveInfo on ReserveInfo {
|
|
406
|
+
__typename
|
|
407
|
+
id
|
|
408
|
+
asset {
|
|
409
|
+
...HubAsset
|
|
410
|
+
}
|
|
411
|
+
}`,[ba]),pe=u(`fragment TransactionRequest on TransactionRequest {
|
|
412
|
+
__typename
|
|
413
|
+
to
|
|
414
|
+
from
|
|
415
|
+
data
|
|
416
|
+
value
|
|
417
|
+
chainId
|
|
418
|
+
operations
|
|
419
|
+
}`),Wt=u(`fragment Erc20Approval on Erc20Approval {
|
|
420
|
+
__typename
|
|
421
|
+
byTransaction {
|
|
422
|
+
...TransactionRequest
|
|
423
|
+
}
|
|
424
|
+
bySignature {
|
|
425
|
+
...PermitTypedData
|
|
426
|
+
}
|
|
427
|
+
}`,[pe,ss]),Vt=u(`fragment Erc20ApprovalRequired on Erc20ApprovalRequired {
|
|
428
|
+
__typename
|
|
429
|
+
approvals {
|
|
430
|
+
...Erc20Approval
|
|
431
|
+
}
|
|
432
|
+
reason
|
|
433
|
+
requiredAmount {
|
|
434
|
+
...DecimalNumber
|
|
435
|
+
}
|
|
436
|
+
currentAllowance {
|
|
437
|
+
...DecimalNumber
|
|
438
|
+
}
|
|
439
|
+
originalTransaction {
|
|
440
|
+
...TransactionRequest
|
|
441
|
+
}
|
|
442
|
+
}`,[pe,Wt,Ae]),fs=u(`fragment PreContractActionRequired on PreContractActionRequired {
|
|
443
|
+
__typename
|
|
444
|
+
transaction {
|
|
445
|
+
...TransactionRequest
|
|
446
|
+
}
|
|
447
|
+
reason
|
|
448
|
+
originalTransaction {
|
|
449
|
+
...TransactionRequest
|
|
450
|
+
}
|
|
451
|
+
}`,[pe]),Gn=u(`fragment ExecutionPlan on ExecutionPlan {
|
|
452
|
+
__typename
|
|
453
|
+
... on TransactionRequest {
|
|
454
|
+
...TransactionRequest
|
|
455
|
+
}
|
|
456
|
+
... on Erc20ApprovalRequired {
|
|
457
|
+
...Erc20ApprovalRequired
|
|
458
|
+
}
|
|
459
|
+
... on PreContractActionRequired {
|
|
460
|
+
...PreContractActionRequired
|
|
461
|
+
}
|
|
462
|
+
... on InsufficientBalanceError {
|
|
463
|
+
...InsufficientBalanceError
|
|
464
|
+
}
|
|
465
|
+
}`,[pe,Vt,fs,cn]),Ns=u(`fragment SwapQuoteCosts on SwapQuoteCosts {
|
|
466
|
+
__typename
|
|
467
|
+
networkCosts {
|
|
468
|
+
...TokenAmount
|
|
469
|
+
}
|
|
470
|
+
partnerFee {
|
|
471
|
+
...TokenAmount
|
|
472
|
+
}
|
|
473
|
+
flashloanFee {
|
|
474
|
+
...TokenAmount
|
|
475
|
+
}
|
|
476
|
+
providerFee {
|
|
477
|
+
...TokenAmount
|
|
478
|
+
}
|
|
479
|
+
}`,[_a]),zn=u(`fragment SwapQuote on SwapQuote {
|
|
480
|
+
__typename
|
|
481
|
+
accuracy
|
|
482
|
+
quoteId
|
|
483
|
+
suggestedSlippage {
|
|
484
|
+
...PercentNumber
|
|
485
|
+
}
|
|
486
|
+
selectedSlippage {
|
|
487
|
+
...PercentNumber
|
|
488
|
+
}
|
|
489
|
+
buy {
|
|
490
|
+
...TokenAmount
|
|
491
|
+
}
|
|
492
|
+
sell {
|
|
493
|
+
...TokenAmount
|
|
494
|
+
}
|
|
495
|
+
costs {
|
|
496
|
+
...SwapQuoteCosts
|
|
497
|
+
}
|
|
498
|
+
finalBuy {
|
|
499
|
+
...TokenAmount
|
|
500
|
+
}
|
|
501
|
+
finalSell {
|
|
502
|
+
...TokenAmount
|
|
503
|
+
}
|
|
504
|
+
}`,[I,_a,Ns]),Yn=u(`fragment SwapTypedData on SwapTypedData {
|
|
505
|
+
__typename
|
|
506
|
+
primaryType
|
|
507
|
+
types
|
|
508
|
+
domain {
|
|
509
|
+
...DomainData
|
|
510
|
+
}
|
|
511
|
+
message
|
|
512
|
+
}`,[Ft]),Ht=u(`fragment PrepareSwapOrder on PrepareSwapOrder {
|
|
513
|
+
__typename
|
|
514
|
+
newQuoteId
|
|
515
|
+
data {
|
|
516
|
+
...SwapTypedData
|
|
517
|
+
}
|
|
518
|
+
}`,[Yn]),hs=u(`fragment SwapByIntent on SwapByIntent {
|
|
519
|
+
__typename
|
|
520
|
+
quote {
|
|
521
|
+
...SwapQuote
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
}`,[zn]),ks=u(`fragment SwapByIntentWithApprovalRequired on SwapByIntentWithApprovalRequired {
|
|
525
|
+
__typename
|
|
526
|
+
approvals {
|
|
527
|
+
...Erc20Approval
|
|
528
|
+
}
|
|
529
|
+
quote {
|
|
530
|
+
...SwapQuote
|
|
531
|
+
}
|
|
532
|
+
}`,[Wt,zn]),gs=u(`fragment SwapByTransaction on SwapByTransaction {
|
|
533
|
+
__typename
|
|
534
|
+
quote {
|
|
535
|
+
...SwapQuote
|
|
536
|
+
}
|
|
537
|
+
}`,[zn]),Mt=u(`fragment SwapReceipt on SwapReceipt {
|
|
538
|
+
__typename
|
|
539
|
+
id
|
|
540
|
+
explorerUrl
|
|
541
|
+
createdAt
|
|
542
|
+
}`),vs=u(`fragment TokenSwapQuoteResult on TokenSwapQuoteResult {
|
|
543
|
+
__typename
|
|
544
|
+
... on SwapByIntent {
|
|
545
|
+
...SwapByIntent
|
|
546
|
+
}
|
|
547
|
+
... on SwapByIntentWithApprovalRequired {
|
|
548
|
+
...SwapByIntentWithApprovalRequired
|
|
549
|
+
}
|
|
550
|
+
... on SwapByTransaction {
|
|
551
|
+
...SwapByTransaction
|
|
552
|
+
}
|
|
553
|
+
}`,[hs,ks,gs]),Ts=u(`fragment PrepareTokenSwapResult on PrepareTokenSwapResult {
|
|
554
|
+
__typename
|
|
555
|
+
... on PrepareSwapOrder {
|
|
556
|
+
...PrepareSwapOrder
|
|
557
|
+
}
|
|
558
|
+
... on InsufficientBalanceError {
|
|
559
|
+
...InsufficientBalanceError
|
|
560
|
+
}
|
|
561
|
+
}`,[Ht,cn]),As=u(`fragment SwapTransactionRequest on SwapTransactionRequest {
|
|
562
|
+
__typename
|
|
563
|
+
transaction {
|
|
564
|
+
...TransactionRequest
|
|
565
|
+
}
|
|
566
|
+
orderReceipt {
|
|
567
|
+
...SwapReceipt
|
|
568
|
+
}
|
|
569
|
+
}`,[pe,Mt]),Ls=u(`fragment SwapExecutionPlan on SwapExecutionPlan {
|
|
570
|
+
__typename
|
|
571
|
+
... on SwapTransactionRequest {
|
|
572
|
+
...SwapTransactionRequest
|
|
573
|
+
}
|
|
574
|
+
... on SwapReceipt {
|
|
575
|
+
...SwapReceipt
|
|
576
|
+
}
|
|
577
|
+
... on InsufficientBalanceError {
|
|
578
|
+
...InsufficientBalanceError
|
|
579
|
+
}
|
|
580
|
+
}`,[As,Mt,cn]),Qt=u(`fragment SwapCancelled on SwapCancelled {
|
|
581
|
+
__typename
|
|
582
|
+
swapId
|
|
583
|
+
createdAt
|
|
584
|
+
cancelledAt
|
|
585
|
+
explorerUrl
|
|
586
|
+
}`),Ss=u(`fragment SwapExpired on SwapExpired {
|
|
587
|
+
__typename
|
|
588
|
+
swapId
|
|
589
|
+
createdAt
|
|
590
|
+
expiredAt
|
|
591
|
+
explorerUrl
|
|
592
|
+
}`),Os=u(`fragment PositionAmount on PositionAmount {
|
|
593
|
+
__typename
|
|
594
|
+
reserve {
|
|
595
|
+
...ReserveInfo
|
|
596
|
+
}
|
|
597
|
+
amount {
|
|
598
|
+
...Erc20Amount
|
|
599
|
+
}
|
|
600
|
+
}`,[we,ae]),De=u(`fragment SwapAmount on SwapAmount {
|
|
601
|
+
__typename
|
|
602
|
+
... on PositionAmount {
|
|
603
|
+
...PositionAmount
|
|
604
|
+
}
|
|
605
|
+
... on NativeAmount {
|
|
606
|
+
...NativeAmount
|
|
607
|
+
}
|
|
608
|
+
... on Erc20Amount {
|
|
609
|
+
...Erc20Amount
|
|
610
|
+
}
|
|
611
|
+
}`,[Os,$t,ae]),ws=u(`fragment SwapOpen on SwapOpen {
|
|
612
|
+
__typename
|
|
613
|
+
swapId
|
|
614
|
+
createdAt
|
|
615
|
+
deadline
|
|
616
|
+
explorerUrl
|
|
617
|
+
desiredSell {
|
|
618
|
+
...SwapAmount
|
|
619
|
+
}
|
|
620
|
+
desiredBuy {
|
|
621
|
+
...SwapAmount
|
|
622
|
+
}
|
|
623
|
+
}`,[De]),Cs=u(`fragment SwapPendingSignature on SwapPendingSignature {
|
|
624
|
+
__typename
|
|
625
|
+
swapId
|
|
626
|
+
createdAt
|
|
627
|
+
deadline
|
|
628
|
+
explorerUrl
|
|
629
|
+
}`),Es=u(`fragment SwapFulfilled on SwapFulfilled {
|
|
630
|
+
__typename
|
|
631
|
+
swapId
|
|
632
|
+
txHash
|
|
633
|
+
desiredSell {
|
|
634
|
+
...SwapAmount
|
|
635
|
+
}
|
|
636
|
+
desiredBuy {
|
|
637
|
+
...SwapAmount
|
|
638
|
+
}
|
|
639
|
+
sold {
|
|
640
|
+
...SwapAmount
|
|
641
|
+
}
|
|
642
|
+
bought {
|
|
643
|
+
...SwapAmount
|
|
644
|
+
}
|
|
645
|
+
createdAt
|
|
646
|
+
fulfilledAt
|
|
647
|
+
explorerUrl
|
|
648
|
+
refundTxHash
|
|
649
|
+
}`,[De]),jt=u(`fragment SwapStatus on SwapStatus {
|
|
650
|
+
__typename
|
|
651
|
+
... on SwapOpen {
|
|
652
|
+
...SwapOpen
|
|
653
|
+
}
|
|
654
|
+
... on SwapPendingSignature {
|
|
655
|
+
...SwapPendingSignature
|
|
656
|
+
}
|
|
657
|
+
... on SwapCancelled {
|
|
658
|
+
...SwapCancelled
|
|
659
|
+
}
|
|
660
|
+
... on SwapExpired {
|
|
661
|
+
...SwapExpired
|
|
662
|
+
}
|
|
663
|
+
... on SwapFulfilled {
|
|
664
|
+
...SwapFulfilled
|
|
665
|
+
}
|
|
666
|
+
}`,[ws,Cs,Qt,Ss,Es]),_s=u(`fragment PrepareSwapCancelResult on PrepareSwapCancelResult {
|
|
667
|
+
__typename
|
|
668
|
+
data {
|
|
669
|
+
...SwapTypedData
|
|
670
|
+
}
|
|
671
|
+
}`,[Yn]),bs=u(`fragment CancelSwapExecutionPlan on CancelSwapExecutionPlan {
|
|
672
|
+
__typename
|
|
673
|
+
... on TransactionRequest {
|
|
674
|
+
...TransactionRequest
|
|
675
|
+
}
|
|
676
|
+
... on SwapCancelled {
|
|
677
|
+
...SwapCancelled
|
|
678
|
+
}
|
|
679
|
+
}`,[pe,Qt]),Us=u(`fragment PaginatedUserSwapsResult on PaginatedUserSwapsResult {
|
|
680
|
+
__typename
|
|
681
|
+
items {
|
|
682
|
+
...SwapStatus
|
|
683
|
+
}
|
|
684
|
+
pageInfo {
|
|
685
|
+
...PaginatedResultInfo
|
|
686
|
+
}
|
|
687
|
+
}`,[jt,Qn]),Rs=u(`fragment PositionSwapAdapterContractApproval on PositionSwapAdapterContractApproval {
|
|
688
|
+
__typename
|
|
689
|
+
bySignature {
|
|
690
|
+
...SwapTypedData
|
|
691
|
+
}
|
|
692
|
+
}`,[Yn]),qs=u(`fragment PositionSwapPositionManagerApproval on PositionSwapPositionManagerApproval {
|
|
693
|
+
__typename
|
|
694
|
+
byTransaction {
|
|
695
|
+
...TransactionRequest
|
|
696
|
+
}
|
|
697
|
+
bySignature {
|
|
698
|
+
...SwapTypedData
|
|
699
|
+
}
|
|
700
|
+
}`,[pe,Yn]),Ps=u(`fragment PositionSwapApproval on PositionSwapApproval {
|
|
701
|
+
__typename
|
|
702
|
+
... on PositionSwapAdapterContractApproval {
|
|
703
|
+
...PositionSwapAdapterContractApproval
|
|
704
|
+
}
|
|
705
|
+
... on PositionSwapPositionManagerApproval {
|
|
706
|
+
...PositionSwapPositionManagerApproval
|
|
707
|
+
}
|
|
708
|
+
}`,[Rs,qs]),Zn=u(`fragment PositionSwapByIntentApprovalsRequired on PositionSwapByIntentApprovalsRequired {
|
|
709
|
+
__typename
|
|
710
|
+
quote {
|
|
711
|
+
...SwapQuote
|
|
712
|
+
}
|
|
713
|
+
approvals {
|
|
714
|
+
...PositionSwapApproval
|
|
715
|
+
}
|
|
716
|
+
}`,[zn,Ps]),xs=u(`fragment SupplySwapQuoteResult on SupplySwapQuoteResult {
|
|
717
|
+
__typename
|
|
718
|
+
... on PositionSwapByIntentApprovalsRequired {
|
|
719
|
+
...PositionSwapByIntentApprovalsRequired
|
|
720
|
+
}
|
|
721
|
+
}`,[Zn]),Bs=u(`fragment BorrowSwapQuoteResult on BorrowSwapQuoteResult {
|
|
722
|
+
__typename
|
|
723
|
+
... on PositionSwapByIntentApprovalsRequired {
|
|
724
|
+
...PositionSwapByIntentApprovalsRequired
|
|
725
|
+
}
|
|
726
|
+
}`,[Zn]),Is=u(`fragment RepayWithSupplyQuoteResult on RepayWithSupplyQuoteResult {
|
|
727
|
+
__typename
|
|
728
|
+
... on PositionSwapByIntentApprovalsRequired {
|
|
729
|
+
...PositionSwapByIntentApprovalsRequired
|
|
730
|
+
}
|
|
731
|
+
}`,[Zn]),Js=u(`fragment WithdrawSwapQuoteResult on WithdrawSwapQuoteResult {
|
|
732
|
+
__typename
|
|
733
|
+
... on PositionSwapByIntentApprovalsRequired {
|
|
734
|
+
...PositionSwapByIntentApprovalsRequired
|
|
735
|
+
}
|
|
736
|
+
}`,[Zn]),Fs=u(`fragment PreparePositionSwapResult on PreparePositionSwapResult {
|
|
737
|
+
__typename
|
|
738
|
+
... on PrepareSwapOrder {
|
|
739
|
+
...PrepareSwapOrder
|
|
740
|
+
}
|
|
741
|
+
... on InsufficientBalanceError {
|
|
742
|
+
...InsufficientBalanceError
|
|
743
|
+
}
|
|
744
|
+
}`,[Ht,cn]),Ds=u(`fragment UserSupplyItem on UserSupplyItem {
|
|
745
|
+
__typename
|
|
746
|
+
id
|
|
747
|
+
reserve {
|
|
748
|
+
...Reserve
|
|
749
|
+
}
|
|
750
|
+
interest {
|
|
751
|
+
...Erc20Amount
|
|
752
|
+
}
|
|
753
|
+
principal {
|
|
754
|
+
...Erc20Amount
|
|
755
|
+
}
|
|
756
|
+
withdrawable {
|
|
757
|
+
...Erc20Amount
|
|
758
|
+
}
|
|
759
|
+
isCollateral
|
|
760
|
+
createdAt
|
|
761
|
+
}`,[ae,Kn]),$s=u(`fragment UserBorrowItem on UserBorrowItem {
|
|
762
|
+
__typename
|
|
763
|
+
id
|
|
764
|
+
principal {
|
|
765
|
+
...Erc20Amount
|
|
766
|
+
}
|
|
767
|
+
interest {
|
|
768
|
+
...Erc20Amount
|
|
769
|
+
}
|
|
770
|
+
debt {
|
|
771
|
+
...Erc20Amount
|
|
772
|
+
}
|
|
773
|
+
reserve {
|
|
774
|
+
...Reserve
|
|
775
|
+
}
|
|
776
|
+
createdAt
|
|
777
|
+
}`,[ae,Kn]),Ws=u(`fragment UserSummary on UserSummary {
|
|
778
|
+
__typename
|
|
779
|
+
totalPositions
|
|
780
|
+
netBalance(currency: $currency) {
|
|
781
|
+
...ExchangeAmountWithChange
|
|
782
|
+
}
|
|
783
|
+
totalCollateral(currency: $currency) {
|
|
784
|
+
...ExchangeAmount
|
|
785
|
+
}
|
|
786
|
+
totalSupplied(currency: $currency) {
|
|
787
|
+
...ExchangeAmount
|
|
788
|
+
}
|
|
789
|
+
totalDebt(currency: $currency) {
|
|
790
|
+
...ExchangeAmount
|
|
791
|
+
}
|
|
792
|
+
netApy {
|
|
793
|
+
...PercentNumber
|
|
794
|
+
}
|
|
795
|
+
netAccruedInterest(currency: $currency) {
|
|
796
|
+
...ExchangeAmount
|
|
797
|
+
}
|
|
798
|
+
lowestHealthFactor
|
|
799
|
+
}`,[dn,oe,I]),Kt=u(`fragment UserRiskPremiumBreakdownItem on UserRiskPremiumBreakdownItem {
|
|
800
|
+
__typename
|
|
801
|
+
token {
|
|
802
|
+
...Erc20Token
|
|
803
|
+
}
|
|
804
|
+
currentRiskPremiumWeight {
|
|
805
|
+
...PercentNumber
|
|
806
|
+
}
|
|
807
|
+
latestRiskPremiumWeight {
|
|
808
|
+
...PercentNumber
|
|
809
|
+
}
|
|
810
|
+
collateral {
|
|
811
|
+
...PercentNumber
|
|
812
|
+
}
|
|
813
|
+
}`,[Oe,I]),Vs=u(`fragment UserPositionRiskPremium on UserPositionRiskPremium {
|
|
814
|
+
__typename
|
|
815
|
+
current {
|
|
816
|
+
...PercentNumber
|
|
817
|
+
}
|
|
818
|
+
latest {
|
|
819
|
+
...PercentNumber
|
|
820
|
+
}
|
|
821
|
+
breakdown {
|
|
822
|
+
...UserRiskPremiumBreakdownItem
|
|
823
|
+
}
|
|
824
|
+
}`,[I,Kt]),Gt=u(`fragment UserPosition on UserPosition {
|
|
825
|
+
__typename
|
|
826
|
+
id
|
|
827
|
+
spoke {
|
|
828
|
+
...Spoke
|
|
829
|
+
}
|
|
830
|
+
user
|
|
831
|
+
createdAt
|
|
832
|
+
netApy {
|
|
833
|
+
...PercentNumber
|
|
834
|
+
}
|
|
835
|
+
netCollateral(currency: $currency) {
|
|
836
|
+
...ExchangeAmountWithChange
|
|
837
|
+
}
|
|
838
|
+
netBalance(currency: $currency) {
|
|
839
|
+
...ExchangeAmountWithChange
|
|
840
|
+
}
|
|
841
|
+
netAccruedInterest(currency: $currency) {
|
|
842
|
+
...ExchangeAmount
|
|
843
|
+
}
|
|
844
|
+
totalCollateral(currency: $currency) {
|
|
845
|
+
...ExchangeAmountWithChange
|
|
846
|
+
}
|
|
847
|
+
totalSupplied(currency: $currency) {
|
|
848
|
+
...ExchangeAmountWithChange
|
|
849
|
+
}
|
|
850
|
+
totalDebt(currency: $currency) {
|
|
851
|
+
...ExchangeAmountWithChange
|
|
852
|
+
}
|
|
853
|
+
netSupplyApy {
|
|
854
|
+
...PercentNumberWithChange
|
|
855
|
+
}
|
|
856
|
+
netBorrowApy {
|
|
857
|
+
...PercentNumberWithChange
|
|
858
|
+
}
|
|
859
|
+
healthFactor {
|
|
860
|
+
...HealthFactorWithChange
|
|
861
|
+
}
|
|
862
|
+
riskPremium {
|
|
863
|
+
...UserPositionRiskPremium
|
|
864
|
+
}
|
|
865
|
+
liquidationPrice(currency: $currency) {
|
|
866
|
+
...ExchangeAmount
|
|
867
|
+
}
|
|
868
|
+
borrowingPower(currency: $currency) {
|
|
869
|
+
...ExchangeAmount
|
|
870
|
+
}
|
|
871
|
+
canUpdateDynamicConfig
|
|
872
|
+
netBalancePercentChange(window: $timeWindow) {
|
|
873
|
+
...PercentNumber
|
|
874
|
+
}
|
|
875
|
+
averageCollateralFactor {
|
|
876
|
+
...PercentNumber
|
|
877
|
+
}
|
|
878
|
+
}`,[ue,I,dn,oe,Gi,Zi,Vs]),Hs=u(`fragment UserBalance on UserBalance {
|
|
879
|
+
__typename
|
|
880
|
+
id
|
|
881
|
+
info {
|
|
882
|
+
...TokenInfo
|
|
883
|
+
}
|
|
884
|
+
totalAmount {
|
|
885
|
+
...DecimalNumber
|
|
886
|
+
}
|
|
887
|
+
balances {
|
|
888
|
+
...TokenAmount
|
|
889
|
+
}
|
|
890
|
+
exchange(currency: $currency) {
|
|
891
|
+
...ExchangeAmount
|
|
892
|
+
}
|
|
893
|
+
highestSupplyApy: supplyApy(metric: HIGHEST) {
|
|
894
|
+
...PercentNumber
|
|
895
|
+
}
|
|
896
|
+
highestBorrowApy: borrowApy(metric: HIGHEST) {
|
|
897
|
+
...PercentNumber
|
|
898
|
+
}
|
|
899
|
+
lowestSupplyApy: supplyApy(metric: LOWEST) {
|
|
900
|
+
...PercentNumber
|
|
901
|
+
}
|
|
902
|
+
lowestBorrowApy: borrowApy(metric: LOWEST) {
|
|
903
|
+
...PercentNumber
|
|
904
|
+
}
|
|
905
|
+
highestCollateralFactor: collateralFactor(metric: HIGHEST) {
|
|
906
|
+
...PercentNumber
|
|
907
|
+
}
|
|
908
|
+
lowestCollateralFactor: collateralFactor(metric: LOWEST) {
|
|
909
|
+
...PercentNumber
|
|
910
|
+
}
|
|
911
|
+
}`,[Mn,Ae,_a,oe,I]),Ms=u(`fragment UserSummaryHistoryItem on UserSummaryHistoryItem {
|
|
912
|
+
__typename
|
|
913
|
+
netBalance(currency: $currency) {
|
|
914
|
+
...ExchangeAmount
|
|
915
|
+
}
|
|
916
|
+
borrows(currency: $currency) {
|
|
917
|
+
...ExchangeAmount
|
|
918
|
+
}
|
|
919
|
+
supplies(currency: $currency) {
|
|
920
|
+
...ExchangeAmount
|
|
921
|
+
}
|
|
922
|
+
healthFactor
|
|
923
|
+
date
|
|
924
|
+
}`,[oe]),zt=u(`fragment ApySample on ApySample {
|
|
925
|
+
__typename
|
|
926
|
+
date
|
|
927
|
+
avgRate {
|
|
928
|
+
...PercentNumber
|
|
929
|
+
}
|
|
930
|
+
}`,[I]);u(`query Hub($request: HubRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
931
|
+
value: hub(request: $request) {
|
|
932
|
+
...Hub
|
|
933
|
+
}
|
|
934
|
+
}`,[jn]);u(`query Hubs($request: HubsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
935
|
+
value: hubs(request: $request) {
|
|
936
|
+
...Hub
|
|
937
|
+
}
|
|
938
|
+
}`,[jn]);u(`query HubAssets($request: HubAssetsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
939
|
+
value: hubAssets(request: $request) {
|
|
940
|
+
...HubAsset
|
|
941
|
+
}
|
|
942
|
+
}`,[ba]);var Qs=u(`fragment HubSummarySample on HubSummarySample {
|
|
943
|
+
__typename
|
|
944
|
+
date
|
|
945
|
+
deposits {
|
|
946
|
+
...ExchangeAmount
|
|
947
|
+
}
|
|
948
|
+
borrows {
|
|
949
|
+
...ExchangeAmount
|
|
950
|
+
}
|
|
951
|
+
availableLiquidity {
|
|
952
|
+
...ExchangeAmount
|
|
953
|
+
}
|
|
954
|
+
utilizationRate {
|
|
955
|
+
...PercentNumber
|
|
956
|
+
}
|
|
957
|
+
}`,[oe,I]);u(`query HubSummaryHistory($request: HubSummaryHistoryRequest!) {
|
|
958
|
+
value: hubSummaryHistory(request: $request) {
|
|
959
|
+
...HubSummarySample
|
|
960
|
+
}
|
|
961
|
+
}`,[Qs]);var zs=u(`query Chain($request: ChainRequest!) {
|
|
962
|
+
value: chain(request: $request) {
|
|
963
|
+
...Chain
|
|
964
|
+
}
|
|
965
|
+
}`,[V]);u(`query Chains($request: ChainsRequest!) {
|
|
966
|
+
value: chains(request: $request) {
|
|
967
|
+
...Chain
|
|
968
|
+
}
|
|
969
|
+
}`,[V]);u(`query HasProcessedKnownTransaction($request: HasProcessedKnownTransactionRequest!) {
|
|
970
|
+
value: hasProcessedKnownTransaction(request: $request)
|
|
971
|
+
}`);u(`query Health {
|
|
972
|
+
value: health
|
|
973
|
+
}`);u(`query ExchangeRate($request: ExchangeRateRequest!) {
|
|
974
|
+
value: exchangeRate(request: $request) {
|
|
975
|
+
...ExchangeAmount
|
|
976
|
+
}
|
|
977
|
+
}`,[oe]);var Ys=u(`fragment AssetPriceSample on AssetPriceSample {
|
|
978
|
+
__typename
|
|
979
|
+
date
|
|
980
|
+
price
|
|
981
|
+
}`),rr=u(`fragment AssetSampleBreakdown on AssetSampleBreakdown {
|
|
982
|
+
__typename
|
|
983
|
+
amount {
|
|
984
|
+
...DecimalNumber
|
|
985
|
+
}
|
|
986
|
+
apy {
|
|
987
|
+
...PercentNumber
|
|
988
|
+
}
|
|
989
|
+
hub {
|
|
990
|
+
...Hub
|
|
991
|
+
}
|
|
992
|
+
}`,[Ae,I,jn]),Zs=u(`fragment AssetSupplySample on AssetSupplySample {
|
|
993
|
+
__typename
|
|
994
|
+
date
|
|
995
|
+
amount {
|
|
996
|
+
...DecimalNumber
|
|
997
|
+
}
|
|
998
|
+
highestApy {
|
|
999
|
+
...PercentNumber
|
|
1000
|
+
}
|
|
1001
|
+
lowestApy {
|
|
1002
|
+
...PercentNumber
|
|
1003
|
+
}
|
|
1004
|
+
averageApy {
|
|
1005
|
+
...PercentNumber
|
|
1006
|
+
}
|
|
1007
|
+
breakdown {
|
|
1008
|
+
...AssetSampleBreakdown
|
|
1009
|
+
}
|
|
1010
|
+
}`,[Ae,I,rr]),Xs=u(`fragment AssetBorrowSample on AssetBorrowSample {
|
|
1011
|
+
__typename
|
|
1012
|
+
date
|
|
1013
|
+
amount {
|
|
1014
|
+
...DecimalNumber
|
|
1015
|
+
}
|
|
1016
|
+
highestApy {
|
|
1017
|
+
...PercentNumber
|
|
1018
|
+
}
|
|
1019
|
+
lowestApy {
|
|
1020
|
+
...PercentNumber
|
|
1021
|
+
}
|
|
1022
|
+
averageApy {
|
|
1023
|
+
...PercentNumber
|
|
1024
|
+
}
|
|
1025
|
+
breakdown {
|
|
1026
|
+
...AssetSampleBreakdown
|
|
1027
|
+
}
|
|
1028
|
+
}`,[Ae,I,rr]),eo=u(`fragment AssetAmountWithChange on AssetAmountWithChange {
|
|
1029
|
+
__typename
|
|
1030
|
+
amount {
|
|
1031
|
+
...DecimalNumberWithChange
|
|
1032
|
+
}
|
|
1033
|
+
exchange(currency: $currency) {
|
|
1034
|
+
...ExchangeAmountWithChange
|
|
1035
|
+
}
|
|
1036
|
+
}`,[ji,dn]),no=u(`fragment AssetSummary on AssetSummary {
|
|
1037
|
+
__typename
|
|
1038
|
+
totalSupplyCap {
|
|
1039
|
+
...AssetAmountWithChange
|
|
1040
|
+
}
|
|
1041
|
+
totalSupplied {
|
|
1042
|
+
...AssetAmountWithChange
|
|
1043
|
+
}
|
|
1044
|
+
totalSuppliable {
|
|
1045
|
+
...AssetAmountWithChange
|
|
1046
|
+
}
|
|
1047
|
+
totalBorrowCap {
|
|
1048
|
+
...AssetAmountWithChange
|
|
1049
|
+
}
|
|
1050
|
+
totalBorrowed {
|
|
1051
|
+
...AssetAmountWithChange
|
|
1052
|
+
}
|
|
1053
|
+
totalBorrowable {
|
|
1054
|
+
...AssetAmountWithChange
|
|
1055
|
+
}
|
|
1056
|
+
averageBorrowApy: borrowApy(metric: AVERAGE) {
|
|
1057
|
+
...PercentNumber
|
|
1058
|
+
}
|
|
1059
|
+
averageSupplyApy: supplyApy(metric: AVERAGE) {
|
|
1060
|
+
...PercentNumber
|
|
1061
|
+
}
|
|
1062
|
+
}`,[eo,I]),ao=u(`fragment Asset on Asset {
|
|
1063
|
+
__typename
|
|
1064
|
+
id
|
|
1065
|
+
token {
|
|
1066
|
+
...Erc20Token
|
|
1067
|
+
}
|
|
1068
|
+
summary {
|
|
1069
|
+
...AssetSummary
|
|
1070
|
+
}
|
|
1071
|
+
price(currency: $currency) {
|
|
1072
|
+
...ExchangeAmountWithChange
|
|
1073
|
+
}
|
|
1074
|
+
}`,[Oe,no,dn]);u(`query Asset($request: AssetRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1075
|
+
value: asset(request: $request) {
|
|
1076
|
+
...Asset
|
|
1077
|
+
}
|
|
1078
|
+
}`,[ao]);u(`query AssetPriceHistory($request: AssetPriceHistoryRequest!) {
|
|
1079
|
+
value: assetPriceHistory(request: $request) {
|
|
1080
|
+
...AssetPriceSample
|
|
1081
|
+
}
|
|
1082
|
+
}`,[Ys]);u(`query AssetSupplyHistory($request: AssetSupplyHistoryRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1083
|
+
value: assetSupplyHistory(request: $request) {
|
|
1084
|
+
...AssetSupplySample
|
|
1085
|
+
}
|
|
1086
|
+
}`,[Zs]);u(`query AssetBorrowHistory($request: AssetBorrowHistoryRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1087
|
+
value: assetBorrowHistory(request: $request) {
|
|
1088
|
+
...AssetBorrowSample
|
|
1089
|
+
}
|
|
1090
|
+
}`,[Xs]);var to=u(`fragment ProtocolHistorySample on ProtocolHistorySample {
|
|
1091
|
+
__typename
|
|
1092
|
+
date
|
|
1093
|
+
deposits {
|
|
1094
|
+
...ExchangeAmount
|
|
1095
|
+
}
|
|
1096
|
+
borrows {
|
|
1097
|
+
...ExchangeAmount
|
|
1098
|
+
}
|
|
1099
|
+
}`,[oe]);u(`query ProtocolHistory($request: ProtocolHistoryRequest!) {
|
|
1100
|
+
value: protocolHistory(request: $request) {
|
|
1101
|
+
...ProtocolHistorySample
|
|
1102
|
+
}
|
|
1103
|
+
}`,[to]);u(`query BorrowApyHistory($request: BorrowApyHistoryRequest!) {
|
|
1104
|
+
value: borrowApyHistory(request: $request) {
|
|
1105
|
+
...ApySample
|
|
1106
|
+
}
|
|
1107
|
+
}`,[zt]);u(`query SupplyApyHistory($request: SupplyApyHistoryRequest!) {
|
|
1108
|
+
value: supplyApyHistory(request: $request) {
|
|
1109
|
+
...ApySample
|
|
1110
|
+
}
|
|
1111
|
+
}`,[zt]);u(`query Reserve($request: ReserveRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1112
|
+
value: reserve(request: $request) {
|
|
1113
|
+
...Reserve
|
|
1114
|
+
}
|
|
1115
|
+
}`,[Kn]);u(`query Reserves($request: ReservesRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1116
|
+
value: reserves(request: $request) {
|
|
1117
|
+
...Reserve
|
|
1118
|
+
}
|
|
1119
|
+
}`,[Kn]);u(`query Spoke($request: SpokeRequest!) {
|
|
1120
|
+
value: spoke(request: $request) {
|
|
1121
|
+
...Spoke
|
|
1122
|
+
}
|
|
1123
|
+
}`,[ue]);u(`query Spokes($request: SpokesRequest!) {
|
|
1124
|
+
value: spokes(request: $request) {
|
|
1125
|
+
...Spoke
|
|
1126
|
+
}
|
|
1127
|
+
}`,[ue]);u(`query SpokePositionManagers($request: SpokePositionManagersRequest!) {
|
|
1128
|
+
value: spokePositionManagers(request: $request) {
|
|
1129
|
+
...PaginatedSpokePositionManagerResult
|
|
1130
|
+
}
|
|
1131
|
+
}`,[us]);u(`query SpokeUserPositionManagers($request: SpokeUserPositionManagersRequest!) {
|
|
1132
|
+
value: spokeUserPositionManagers(request: $request) {
|
|
1133
|
+
...PaginatedSpokeUserPositionManagerResult
|
|
1134
|
+
}
|
|
1135
|
+
}`,[ls]);u(`query TokenSwapQuote($request: TokenSwapQuoteRequest!, $currency: Currency!) {
|
|
1136
|
+
value: tokenSwapQuote(request: $request) {
|
|
1137
|
+
...TokenSwapQuoteResult
|
|
1138
|
+
}
|
|
1139
|
+
}`,[vs]);u(`query SwappableTokens($request: SwappableTokensRequest!) {
|
|
1140
|
+
value: swappableTokens(request: $request) {
|
|
1141
|
+
...Token
|
|
1142
|
+
}
|
|
1143
|
+
}`,[Ki]);u(`query PrepareTokenSwap($request: PrepareTokenSwapRequest!) {
|
|
1144
|
+
value: prepareTokenSwap(request: $request) {
|
|
1145
|
+
...PrepareTokenSwapResult
|
|
1146
|
+
}
|
|
1147
|
+
}`,[Ts]);u(`query SwapStatus($request: SwapStatusRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1148
|
+
value: swapStatus(request: $request) {
|
|
1149
|
+
...SwapStatus
|
|
1150
|
+
}
|
|
1151
|
+
}`,[jt]);u(`mutation Swap($request: SwapRequest!) {
|
|
1152
|
+
value: swap(request: $request) {
|
|
1153
|
+
...SwapExecutionPlan
|
|
1154
|
+
}
|
|
1155
|
+
}`,[Ls]);u(`query PrepareSwapCancel($request: PrepareSwapCancelRequest!) {
|
|
1156
|
+
value: prepareSwapCancel(request: $request) {
|
|
1157
|
+
...PrepareSwapCancelResult
|
|
1158
|
+
}
|
|
1159
|
+
}`,[_s]);u(`mutation CancelSwap($request: CancelSwapRequest!) {
|
|
1160
|
+
value: cancelSwap(request: $request) {
|
|
1161
|
+
...CancelSwapExecutionPlan
|
|
1162
|
+
}
|
|
1163
|
+
}`,[bs]);u(`query UserSwaps($request: UserSwapsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1164
|
+
value: userSwaps(request: $request) {
|
|
1165
|
+
...PaginatedUserSwapsResult
|
|
1166
|
+
}
|
|
1167
|
+
}`,[Us]);u(`query SupplySwapQuote($request: SupplySwapQuoteRequest!, $currency: Currency!) {
|
|
1168
|
+
value: supplySwapQuote(request: $request) {
|
|
1169
|
+
...SupplySwapQuoteResult
|
|
1170
|
+
}
|
|
1171
|
+
}`,[xs]);u(`query BorrowSwapQuote($request: BorrowSwapQuoteRequest!, $currency: Currency!) {
|
|
1172
|
+
value: borrowSwapQuote(request: $request) {
|
|
1173
|
+
...BorrowSwapQuoteResult
|
|
1174
|
+
}
|
|
1175
|
+
}`,[Bs]);u(`query RepayWithSupplyQuote($request: RepayWithSupplyQuoteRequest!, $currency: Currency!) {
|
|
1176
|
+
value: repayWithSupplyQuote(request: $request) {
|
|
1177
|
+
...RepayWithSupplyQuoteResult
|
|
1178
|
+
}
|
|
1179
|
+
}`,[Is]);u(`query WithdrawSwapQuote($request: WithdrawSwapQuoteRequest!, $currency: Currency!) {
|
|
1180
|
+
value: withdrawSwapQuote(request: $request) {
|
|
1181
|
+
...WithdrawSwapQuoteResult
|
|
1182
|
+
}
|
|
1183
|
+
}`,[Js]);u(`query PreparePositionSwap($request: PreparePositionSwapRequest!) {
|
|
1184
|
+
value: preparePositionSwap(request: $request) {
|
|
1185
|
+
...PreparePositionSwapResult
|
|
1186
|
+
}
|
|
1187
|
+
}`,[Fs]);u(`query Borrow($request: BorrowRequest!) {
|
|
1188
|
+
value: borrow(request: $request) {
|
|
1189
|
+
...ExecutionPlan
|
|
1190
|
+
}
|
|
1191
|
+
}`,[Gn]);u(`query Supply($request: SupplyRequest!) {
|
|
1192
|
+
value: supply(request: $request) {
|
|
1193
|
+
...ExecutionPlan
|
|
1194
|
+
}
|
|
1195
|
+
}`,[Gn]);u(`query Repay($request: RepayRequest!) {
|
|
1196
|
+
value: repay(request: $request) {
|
|
1197
|
+
...ExecutionPlan
|
|
1198
|
+
}
|
|
1199
|
+
}`,[Gn]);u(`query Withdraw($request: WithdrawRequest!) {
|
|
1200
|
+
value: withdraw(request: $request) {
|
|
1201
|
+
...ExecutionPlan
|
|
1202
|
+
}
|
|
1203
|
+
}`,[Gn]);var ro=u(`fragment LiquidatePositionExecutionPlan on LiquidatePositionExecutionPlan {
|
|
1204
|
+
__typename
|
|
1205
|
+
... on TransactionRequest {
|
|
1206
|
+
...TransactionRequest
|
|
1207
|
+
}
|
|
1208
|
+
... on Erc20ApprovalRequired {
|
|
1209
|
+
...Erc20ApprovalRequired
|
|
1210
|
+
}
|
|
1211
|
+
... on InsufficientBalanceError {
|
|
1212
|
+
...InsufficientBalanceError
|
|
1213
|
+
}
|
|
1214
|
+
}`,[pe,Vt,cn]);u(`query LiquidatePosition($request: LiquidatePositionRequest!) {
|
|
1215
|
+
value: liquidatePosition(request: $request) {
|
|
1216
|
+
...LiquidatePositionExecutionPlan
|
|
1217
|
+
}
|
|
1218
|
+
}`,[ro]);u(`query SetSpokeUserPositionManager($request: SetSpokeUserPositionManagerRequest!) {
|
|
1219
|
+
value: setSpokeUserPositionManager(request: $request) {
|
|
1220
|
+
...TransactionRequest
|
|
1221
|
+
}
|
|
1222
|
+
}`,[pe]);u(`query SetUserSuppliesAsCollateral($request: SetUserSuppliesAsCollateralRequest!) {
|
|
1223
|
+
value: setUserSuppliesAsCollateral(request: $request) {
|
|
1224
|
+
...TransactionRequest
|
|
1225
|
+
}
|
|
1226
|
+
}`,[pe]);u(`query RenounceSpokeUserPositionManager($request: RenounceSpokeUserPositionManagerRequest!) {
|
|
1227
|
+
value: renounceSpokeUserPositionManager(request: $request) {
|
|
1228
|
+
...TransactionRequest
|
|
1229
|
+
}
|
|
1230
|
+
}`,[pe]);u(`query UpdateUserPositionConditions($request: UpdateUserPositionConditionsRequest!) {
|
|
1231
|
+
value: updateUserPositionConditions(request: $request) {
|
|
1232
|
+
...TransactionRequest
|
|
1233
|
+
}
|
|
1234
|
+
}`,[pe]);var io=u(`fragment CollateralFactorVariation on CollateralFactorVariation {
|
|
1235
|
+
__typename
|
|
1236
|
+
reserveId
|
|
1237
|
+
token {
|
|
1238
|
+
...Erc20Token
|
|
1239
|
+
}
|
|
1240
|
+
current {
|
|
1241
|
+
...PercentNumber
|
|
1242
|
+
}
|
|
1243
|
+
after {
|
|
1244
|
+
...PercentNumber
|
|
1245
|
+
}
|
|
1246
|
+
}`,[Oe,I]),so=u(`fragment LiquidationFeeVariation on LiquidationFeeVariation {
|
|
1247
|
+
__typename
|
|
1248
|
+
reserveId
|
|
1249
|
+
token {
|
|
1250
|
+
...Erc20Token
|
|
1251
|
+
}
|
|
1252
|
+
current {
|
|
1253
|
+
...PercentNumber
|
|
1254
|
+
}
|
|
1255
|
+
after {
|
|
1256
|
+
...PercentNumber
|
|
1257
|
+
}
|
|
1258
|
+
}`,[Oe,I]),oo=u(`fragment MaxLiquidationBonusVariation on MaxLiquidationBonusVariation {
|
|
1259
|
+
__typename
|
|
1260
|
+
reserveId
|
|
1261
|
+
token {
|
|
1262
|
+
...Erc20Token
|
|
1263
|
+
}
|
|
1264
|
+
current {
|
|
1265
|
+
...PercentNumber
|
|
1266
|
+
}
|
|
1267
|
+
after {
|
|
1268
|
+
...PercentNumber
|
|
1269
|
+
}
|
|
1270
|
+
}`,[Oe,I]),uo=u(`fragment UserPositionConditionVariation on UserPositionConditionVariation {
|
|
1271
|
+
__typename
|
|
1272
|
+
... on CollateralFactorVariation {
|
|
1273
|
+
...CollateralFactorVariation
|
|
1274
|
+
}
|
|
1275
|
+
... on LiquidationFeeVariation {
|
|
1276
|
+
...LiquidationFeeVariation
|
|
1277
|
+
}
|
|
1278
|
+
... on MaxLiquidationBonusVariation {
|
|
1279
|
+
...MaxLiquidationBonusVariation
|
|
1280
|
+
}
|
|
1281
|
+
}`,[io,so,oo]),po=u(`fragment PreviewUserPosition on PreviewUserPosition {
|
|
1282
|
+
__typename
|
|
1283
|
+
id
|
|
1284
|
+
healthFactor {
|
|
1285
|
+
...HealthFactorResult
|
|
1286
|
+
}
|
|
1287
|
+
netApy {
|
|
1288
|
+
...PercentNumberVariation
|
|
1289
|
+
}
|
|
1290
|
+
riskPremium {
|
|
1291
|
+
...PercentNumberVariation
|
|
1292
|
+
}
|
|
1293
|
+
netCollateral(currency: $currency) {
|
|
1294
|
+
...ExchangeAmountVariation
|
|
1295
|
+
}
|
|
1296
|
+
netBalance(currency: $currency) {
|
|
1297
|
+
...ExchangeAmountVariation
|
|
1298
|
+
}
|
|
1299
|
+
projectedEarnings {
|
|
1300
|
+
...ExchangeAmountVariation
|
|
1301
|
+
}
|
|
1302
|
+
borrowingPower {
|
|
1303
|
+
...ExchangeAmountVariation
|
|
1304
|
+
}
|
|
1305
|
+
otherConditions {
|
|
1306
|
+
...UserPositionConditionVariation
|
|
1307
|
+
}
|
|
1308
|
+
}`,[ns,zi,Yi,uo]);u(`query Preview($request: PreviewRequest!, $currency: Currency! = USD) {
|
|
1309
|
+
value: preview(request: $request) {
|
|
1310
|
+
...PreviewUserPosition
|
|
1311
|
+
}
|
|
1312
|
+
}`,[po]);var ir=u(`fragment PercentNumberChangeSnapshot on PercentNumberChangeSnapshot {
|
|
1313
|
+
__typename
|
|
1314
|
+
before {
|
|
1315
|
+
...PercentNumber
|
|
1316
|
+
}
|
|
1317
|
+
after {
|
|
1318
|
+
...PercentNumber
|
|
1319
|
+
}
|
|
1320
|
+
}`,[I]),lo=u(`fragment BorrowActivity on BorrowActivity {
|
|
1321
|
+
__typename
|
|
1322
|
+
id
|
|
1323
|
+
user
|
|
1324
|
+
timestamp
|
|
1325
|
+
txHash
|
|
1326
|
+
spoke {
|
|
1327
|
+
...Spoke
|
|
1328
|
+
}
|
|
1329
|
+
reserve {
|
|
1330
|
+
...ReserveInfo
|
|
1331
|
+
}
|
|
1332
|
+
borrowed {
|
|
1333
|
+
...Erc20Amount
|
|
1334
|
+
}
|
|
1335
|
+
chain {
|
|
1336
|
+
...Chain
|
|
1337
|
+
}
|
|
1338
|
+
}`,[ue,ae,we,V]),co=u(`fragment SupplyActivity on SupplyActivity {
|
|
1339
|
+
__typename
|
|
1340
|
+
id
|
|
1341
|
+
user
|
|
1342
|
+
timestamp
|
|
1343
|
+
txHash
|
|
1344
|
+
spoke {
|
|
1345
|
+
...Spoke
|
|
1346
|
+
}
|
|
1347
|
+
reserve {
|
|
1348
|
+
...ReserveInfo
|
|
1349
|
+
}
|
|
1350
|
+
supplied {
|
|
1351
|
+
...Erc20Amount
|
|
1352
|
+
}
|
|
1353
|
+
chain {
|
|
1354
|
+
...Chain
|
|
1355
|
+
}
|
|
1356
|
+
}`,[ue,ae,we,V]),yo=u(`fragment WithdrawActivity on WithdrawActivity {
|
|
1357
|
+
__typename
|
|
1358
|
+
id
|
|
1359
|
+
user
|
|
1360
|
+
timestamp
|
|
1361
|
+
txHash
|
|
1362
|
+
spoke {
|
|
1363
|
+
...Spoke
|
|
1364
|
+
}
|
|
1365
|
+
reserve {
|
|
1366
|
+
...ReserveInfo
|
|
1367
|
+
}
|
|
1368
|
+
withdrawn {
|
|
1369
|
+
...Erc20Amount
|
|
1370
|
+
}
|
|
1371
|
+
chain {
|
|
1372
|
+
...Chain
|
|
1373
|
+
}
|
|
1374
|
+
}`,[ue,ae,we,V]),mo=u(`fragment RepayActivity on RepayActivity {
|
|
1375
|
+
__typename
|
|
1376
|
+
id
|
|
1377
|
+
user
|
|
1378
|
+
timestamp
|
|
1379
|
+
txHash
|
|
1380
|
+
spoke {
|
|
1381
|
+
...Spoke
|
|
1382
|
+
}
|
|
1383
|
+
reserve {
|
|
1384
|
+
...ReserveInfo
|
|
1385
|
+
}
|
|
1386
|
+
repaid {
|
|
1387
|
+
...Erc20Amount
|
|
1388
|
+
}
|
|
1389
|
+
chain {
|
|
1390
|
+
...Chain
|
|
1391
|
+
}
|
|
1392
|
+
}`,[ue,ae,we,V]),fo=u(`fragment LiquidatedActivity on LiquidatedActivity {
|
|
1393
|
+
__typename
|
|
1394
|
+
id
|
|
1395
|
+
user
|
|
1396
|
+
timestamp
|
|
1397
|
+
txHash
|
|
1398
|
+
spoke {
|
|
1399
|
+
...Spoke
|
|
1400
|
+
}
|
|
1401
|
+
collateralReserve {
|
|
1402
|
+
...ReserveInfo
|
|
1403
|
+
}
|
|
1404
|
+
debtReserve {
|
|
1405
|
+
...ReserveInfo
|
|
1406
|
+
}
|
|
1407
|
+
collateral {
|
|
1408
|
+
...Erc20Amount
|
|
1409
|
+
}
|
|
1410
|
+
debt {
|
|
1411
|
+
...Erc20Amount
|
|
1412
|
+
}
|
|
1413
|
+
liquidator
|
|
1414
|
+
chain {
|
|
1415
|
+
...Chain
|
|
1416
|
+
}
|
|
1417
|
+
}`,[ue,ae,we,V]),No=u(`fragment UsingAsCollateralActivity on UsingAsCollateralActivity {
|
|
1418
|
+
__typename
|
|
1419
|
+
id
|
|
1420
|
+
user
|
|
1421
|
+
timestamp
|
|
1422
|
+
txHash
|
|
1423
|
+
spoke {
|
|
1424
|
+
...Spoke
|
|
1425
|
+
}
|
|
1426
|
+
reserve {
|
|
1427
|
+
...ReserveInfo
|
|
1428
|
+
}
|
|
1429
|
+
enabledAsCollateral
|
|
1430
|
+
chain {
|
|
1431
|
+
...Chain
|
|
1432
|
+
}
|
|
1433
|
+
}`,[ue,we,V]),ho=u(`fragment UpdatedDynamicConfigActivity on UpdatedDynamicConfigActivity {
|
|
1434
|
+
__typename
|
|
1435
|
+
id
|
|
1436
|
+
user
|
|
1437
|
+
timestamp
|
|
1438
|
+
txHash
|
|
1439
|
+
spoke {
|
|
1440
|
+
...Spoke
|
|
1441
|
+
}
|
|
1442
|
+
reserve {
|
|
1443
|
+
...ReserveInfo
|
|
1444
|
+
}
|
|
1445
|
+
collateralFactor {
|
|
1446
|
+
...PercentNumberChangeSnapshot
|
|
1447
|
+
}
|
|
1448
|
+
maxLiquidationBonus {
|
|
1449
|
+
...PercentNumberChangeSnapshot
|
|
1450
|
+
}
|
|
1451
|
+
liquidationFee {
|
|
1452
|
+
...PercentNumberChangeSnapshot
|
|
1453
|
+
}
|
|
1454
|
+
chain {
|
|
1455
|
+
...Chain
|
|
1456
|
+
}
|
|
1457
|
+
}`,[ue,we,ir,V]),ko=u(`fragment UpdatedRiskPremiumActivity on UpdatedRiskPremiumActivity {
|
|
1458
|
+
__typename
|
|
1459
|
+
id
|
|
1460
|
+
user
|
|
1461
|
+
timestamp
|
|
1462
|
+
txHash
|
|
1463
|
+
spoke {
|
|
1464
|
+
...Spoke
|
|
1465
|
+
}
|
|
1466
|
+
premium {
|
|
1467
|
+
...PercentNumberChangeSnapshot
|
|
1468
|
+
}
|
|
1469
|
+
chain {
|
|
1470
|
+
...Chain
|
|
1471
|
+
}
|
|
1472
|
+
}`,[ue,ir,V]),go=u(`fragment TokenSwapActivity on TokenSwapActivity {
|
|
1473
|
+
__typename
|
|
1474
|
+
id
|
|
1475
|
+
user
|
|
1476
|
+
timestamp
|
|
1477
|
+
txHash
|
|
1478
|
+
chain {
|
|
1479
|
+
...Chain
|
|
1480
|
+
}
|
|
1481
|
+
sold {
|
|
1482
|
+
...SwapAmount
|
|
1483
|
+
}
|
|
1484
|
+
bought {
|
|
1485
|
+
...SwapAmount
|
|
1486
|
+
}
|
|
1487
|
+
explorerUrl
|
|
1488
|
+
}`,[V,De]),vo=u(`fragment SupplySwapActivity on SupplySwapActivity {
|
|
1489
|
+
__typename
|
|
1490
|
+
id
|
|
1491
|
+
user
|
|
1492
|
+
timestamp
|
|
1493
|
+
txHash
|
|
1494
|
+
chain {
|
|
1495
|
+
...Chain
|
|
1496
|
+
}
|
|
1497
|
+
sold {
|
|
1498
|
+
...SwapAmount
|
|
1499
|
+
}
|
|
1500
|
+
bought {
|
|
1501
|
+
...SwapAmount
|
|
1502
|
+
}
|
|
1503
|
+
explorerUrl
|
|
1504
|
+
}`,[V,De]),To=u(`fragment BorrowSwapActivity on BorrowSwapActivity {
|
|
1505
|
+
__typename
|
|
1506
|
+
id
|
|
1507
|
+
user
|
|
1508
|
+
timestamp
|
|
1509
|
+
txHash
|
|
1510
|
+
chain {
|
|
1511
|
+
...Chain
|
|
1512
|
+
}
|
|
1513
|
+
sold {
|
|
1514
|
+
...SwapAmount
|
|
1515
|
+
}
|
|
1516
|
+
bought {
|
|
1517
|
+
...SwapAmount
|
|
1518
|
+
}
|
|
1519
|
+
explorerUrl
|
|
1520
|
+
}`,[V,De]),Ao=u(`fragment RepayWithSupplyActivity on RepayWithSupplyActivity {
|
|
1521
|
+
__typename
|
|
1522
|
+
id
|
|
1523
|
+
user
|
|
1524
|
+
timestamp
|
|
1525
|
+
txHash
|
|
1526
|
+
chain {
|
|
1527
|
+
...Chain
|
|
1528
|
+
}
|
|
1529
|
+
debtRepaid {
|
|
1530
|
+
...SwapAmount
|
|
1531
|
+
}
|
|
1532
|
+
supplyUsed {
|
|
1533
|
+
...SwapAmount
|
|
1534
|
+
}
|
|
1535
|
+
explorerUrl
|
|
1536
|
+
}`,[V,De]),Lo=u(`fragment WithdrawSwapActivity on WithdrawSwapActivity {
|
|
1537
|
+
__typename
|
|
1538
|
+
id
|
|
1539
|
+
user
|
|
1540
|
+
timestamp
|
|
1541
|
+
txHash
|
|
1542
|
+
chain {
|
|
1543
|
+
...Chain
|
|
1544
|
+
}
|
|
1545
|
+
withdrawn {
|
|
1546
|
+
...SwapAmount
|
|
1547
|
+
}
|
|
1548
|
+
bought {
|
|
1549
|
+
...SwapAmount
|
|
1550
|
+
}
|
|
1551
|
+
explorerUrl
|
|
1552
|
+
}`,[V,De]),So=u(`fragment ActivityItem on ActivityItem {
|
|
1553
|
+
__typename
|
|
1554
|
+
... on BorrowActivity {
|
|
1555
|
+
...BorrowActivity
|
|
1556
|
+
}
|
|
1557
|
+
... on SupplyActivity {
|
|
1558
|
+
...SupplyActivity
|
|
1559
|
+
}
|
|
1560
|
+
... on WithdrawActivity {
|
|
1561
|
+
...WithdrawActivity
|
|
1562
|
+
}
|
|
1563
|
+
... on RepayActivity {
|
|
1564
|
+
...RepayActivity
|
|
1565
|
+
}
|
|
1566
|
+
... on LiquidatedActivity {
|
|
1567
|
+
...LiquidatedActivity
|
|
1568
|
+
}
|
|
1569
|
+
... on UsingAsCollateralActivity {
|
|
1570
|
+
...UsingAsCollateralActivity
|
|
1571
|
+
}
|
|
1572
|
+
... on UpdatedDynamicConfigActivity {
|
|
1573
|
+
...UpdatedDynamicConfigActivity
|
|
1574
|
+
}
|
|
1575
|
+
... on UpdatedRiskPremiumActivity {
|
|
1576
|
+
...UpdatedRiskPremiumActivity
|
|
1577
|
+
}
|
|
1578
|
+
... on TokenSwapActivity {
|
|
1579
|
+
...TokenSwapActivity
|
|
1580
|
+
}
|
|
1581
|
+
... on SupplySwapActivity {
|
|
1582
|
+
...SupplySwapActivity
|
|
1583
|
+
}
|
|
1584
|
+
... on BorrowSwapActivity {
|
|
1585
|
+
...BorrowSwapActivity
|
|
1586
|
+
}
|
|
1587
|
+
... on RepayWithSupplyActivity {
|
|
1588
|
+
...RepayWithSupplyActivity
|
|
1589
|
+
}
|
|
1590
|
+
... on WithdrawSwapActivity {
|
|
1591
|
+
...WithdrawSwapActivity
|
|
1592
|
+
}
|
|
1593
|
+
}`,[lo,co,yo,mo,fo,No,ho,ko,go,vo,To,Ao,Lo]),Oo=u(`fragment PaginatedActivitiesResult on PaginatedActivitiesResult {
|
|
1594
|
+
__typename
|
|
1595
|
+
items {
|
|
1596
|
+
...ActivityItem
|
|
1597
|
+
}
|
|
1598
|
+
pageInfo {
|
|
1599
|
+
...PaginatedResultInfo
|
|
1600
|
+
}
|
|
1601
|
+
}`,[So,Qn]);u(`query Activities($request: ActivitiesRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1602
|
+
value: activities(request: $request) {
|
|
1603
|
+
...PaginatedActivitiesResult
|
|
1604
|
+
}
|
|
1605
|
+
}`,[Oo]);u(`query UserSupplies($request: UserSuppliesRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1606
|
+
value: userSupplies(request: $request) {
|
|
1607
|
+
...UserSupplyItem
|
|
1608
|
+
}
|
|
1609
|
+
}`,[Ds]);u(`query UserBorrows($request: UserBorrowsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1610
|
+
value: userBorrows(request: $request) {
|
|
1611
|
+
...UserBorrowItem
|
|
1612
|
+
}
|
|
1613
|
+
}`,[$s]);u(`query UserSummary($request: UserSummaryRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1614
|
+
value: userSummary(request: $request) {
|
|
1615
|
+
...UserSummary
|
|
1616
|
+
}
|
|
1617
|
+
}`,[Ws]);u(`query UserPositions($request: UserPositionsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1618
|
+
value: userPositions(request: $request) {
|
|
1619
|
+
...UserPosition
|
|
1620
|
+
}
|
|
1621
|
+
}`,[Gt]);u(`query UserPosition($request: UserPositionRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1622
|
+
value: userPosition(request: $request) {
|
|
1623
|
+
...UserPosition
|
|
1624
|
+
}
|
|
1625
|
+
}`,[Gt]);u(`query UserBalances($request: UserBalancesRequest!, $currency: Currency!) {
|
|
1626
|
+
value: userBalances(request: $request) {
|
|
1627
|
+
...UserBalance
|
|
1628
|
+
}
|
|
1629
|
+
}`,[Hs]);u(`query UserSummaryHistory($request: UserSummaryHistoryRequest!, $currency: Currency!) {
|
|
1630
|
+
value: userSummaryHistory(request: $request) {
|
|
1631
|
+
...UserSummaryHistoryItem
|
|
1632
|
+
}
|
|
1633
|
+
}`,[Ms]);u(`query UserRiskPremiumBreakdown($request: UserRiskPremiumBreakdownRequest!) {
|
|
1634
|
+
value: userRiskPremiumBreakdown(request: $request) {
|
|
1635
|
+
...UserRiskPremiumBreakdownItem
|
|
1636
|
+
}
|
|
1637
|
+
}`,[Kt]);var Ca={currency:Jt.Usd,timeWindow:It.LastDay,requestPolicy:"cache-and-network",batch:true};function Ra(e,n,{batch:a=Ca.batch,requestPolicy:t=Ca.requestPolicy}=Ca){return e.query(zs,{request:n},{batch:a,requestPolicy:t})}function Za(e){switch(e.chainId){case Ke(chains.mainnet.id):return chains.mainnet;case Ke(chains.sepolia.id):return chains.sepolia}return viem.defineChain({id:e.chainId,name:e.name,nativeCurrency:{name:e.nativeInfo.name,symbol:e.nativeInfo.symbol,decimals:e.nativeInfo.decimals},rpcUrls:{default:{http:[e.rpcUrl]}},blockExplorers:{default:{name:`${e.name} Explorer`,url:e.explorerUrl}}})}function ru(e,n){return H.fromPromise(actions.estimateGas(e,{account:e.account,data:n.data,to:n.to,value:BigInt(n.value)}),a=>nn.from(a)).map(a=>a*115n/100n)}function iu(e,n){return ru(e,n).andThen(a=>H.fromPromise(actions.sendTransaction(e,{account:e.account,data:n.data,to:n.to,value:BigInt(n.value),chain:e.chain,gas:a}),t=>{if(t instanceof viem.TransactionExecutionError){let r=t.walk(i=>i instanceof viem.UserRejectedRequestError);if(r)return Fe.from(r)}return nn.from(t)})).map(En)}function su(e){return e.account!==void 0}function Xa(e,n){return W(su(e),"Wallet client with account is required"),iu(e,n)}function xr(e,n,a){let t=e?.blockExplorers?.default?.url,r=t&&new URL(`/tx/${n}`,t).toString();return Oa.new({txHash:n,request:a,link:r})}function et(e,n,a){return H.fromPromise(actions.waitForTransactionReceipt(e,{hash:a,pollingInterval:100,retryCount:20,retryDelay:50}),t=>Je.from(t)).andThen(t=>{let r=En(t.transactionHash);switch(t.status){case "reverted":return a!==r?me(Fe.from(`Transaction replaced by ${r}`)):me(xr(e.chain,r,n));case "success":return Ue({txHash:r,operations:n.operations})}})}var nt={Idle:()=>({called:false,loading:false,data:void 0,error:void 0}),Loading:e=>({called:true,loading:true,data:e,error:void 0}),Success:e=>({called:true,loading:false,data:e,error:void 0}),Failed:e=>({called:true,loading:false,data:void 0,error:e})};function Tn(e,n){let[a,t]=lu.useState(nt.Idle()),r=lu.useRef(false),i=lu.useCallback(e,n);return [lu.useCallback(o=>{W(!r.current,"Cannot execute a task while another is in progress."),r.current=true;let p;t(l=>(p=l,{called:true,loading:true,data:l.data,error:void 0}));try{let l=i(o);return l.match(c=>{r.current=!1,t(nt.Success(c));},c=>{r.current=!1,t(nt.Failed(c));}),l}catch(l){throw r.current=false,t(fa(p)),l}},[i]),a]}var ma=class e{constructor(n){this.wait=n;}static isInstanceOf(n){return n instanceof e}static tryFrom(n){return e.isInstanceOf(n)?Ue(n):Je.from(n).asResultAsync()}};var cu=lu__default.default.createContext(null);function Ir(){let e=lu.useContext(cu);return W(e,"Could not find Aave SDK context, ensure your code is wrapped in a <AaveProvider>"),e}function Jr(){let e=Ir();return Tn(n=>Ra(e,n,{batch:false,requestPolicy:"cache-first"}),[e])}function hu(e){if(e&&typeof e=="object"){if("code"in e&&e.code===4001)return true;if("message"in e&&typeof e.message=="string"){let n=e.message.toLowerCase();return n.includes("user rejected")||n.includes("user denied")||n.includes("rejected the request")}}return false}function sc(){let{wallets:e}=reactAuth.useWallets(),[n]=Jr();return Tn(a=>{let t=e.find(r=>r.address===a.from);return W(t,`Expected a connected wallet with address ${a.from} to be found.`),n({chainId:a.chainId}).map(r=>(W(r,`Chain ${a.chainId} is not supported`),Za(r))).andThen(r=>H.fromPromise(t.switchChain(a.chainId),i=>Je.from(i)).map(()=>t.getEthereumProvider()).map(i=>viem.createWalletClient({account:a.from,chain:r,transport:viem.custom(i)})).andThen(i=>Xa(i,a).map(s=>new ma(()=>et(i,a,s)))))},[e,n])}function oc(){let{signTypedData:e}=reactAuth.useSignTypedData();return Tn(n=>H.fromPromise(e({domain:n.domain,types:n.types,primaryType:n.primaryType,message:n.message}),a=>hu(a)?Fe.from(a):nn.from(a)).map(({signature:a})=>Cn(a)),[e])}exports.useSendTransaction=sc;exports.useSignTypedData=oc;//# sourceMappingURL=privy.cjs.map
|
|
2
1638
|
//# sourceMappingURL=privy.cjs.map
|