@aave/client 4.0.0-next.33 → 4.0.0-next.34
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/{AaveClient-DGbooMqK.d.ts → AaveClient-BPNG2Fua.d.ts} +2 -6
- package/dist/{AaveClient-1SYnTlsS.d.cts → AaveClient-CYavo882.d.cts} +2 -6
- package/dist/actions/index.cjs +1 -1636
- package/dist/actions/index.cjs.map +1 -1
- package/dist/actions/index.d.cts +7 -7
- package/dist/actions/index.d.ts +7 -7
- package/dist/actions/index.js +1 -1
- package/dist/chunk-2UKLL54V.js +2 -0
- package/dist/chunk-2UKLL54V.js.map +1 -0
- package/dist/chunk-N4LXBTGY.js +2 -0
- package/dist/chunk-N4LXBTGY.js.map +1 -0
- package/dist/chunk-V34A7JGD.js +2 -0
- package/dist/chunk-V34A7JGD.js.map +1 -0
- package/dist/ethers.cjs +1 -2
- package/dist/ethers.cjs.map +1 -1
- package/dist/ethers.js +1 -1
- package/dist/ethers.js.map +1 -1
- package/dist/index.cjs +2 -1638
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/privy.cjs +1 -2
- package/dist/privy.cjs.map +1 -1
- package/dist/privy.js +1 -1
- package/dist/privy.js.map +1 -1
- package/dist/testing.d.ts +2 -8
- package/dist/testing.js +29 -1664
- package/dist/testing.js.map +1 -1
- package/dist/thirdweb.cjs +1 -1637
- package/dist/thirdweb.cjs.map +1 -1
- package/dist/thirdweb.d.cts +1 -1
- package/dist/thirdweb.d.ts +1 -1
- package/dist/thirdweb.js +1 -1
- package/dist/thirdweb.js.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/viem.cjs +1 -1637
- package/dist/viem.cjs.map +1 -1
- package/dist/viem.d.cts +1 -1
- package/dist/viem.d.ts +1 -1
- package/dist/viem.js +1 -1
- package/package.json +6 -6
- package/dist/chunk-5S5WCHVW.js +0 -2
- package/dist/chunk-5S5WCHVW.js.map +0 -1
- package/dist/chunk-COR3ZX64.js +0 -2
- package/dist/chunk-COR3ZX64.js.map +0 -1
- package/dist/chunk-I6P76ICW.js +0 -1637
- package/dist/chunk-I6P76ICW.js.map +0 -1
- package/dist/chunk-IANLBRJB.js +0 -3
- package/dist/chunk-IANLBRJB.js.map +0 -1
- package/dist/chunk-MGE343SH.js +0 -2
- package/dist/chunk-MGE343SH.js.map +0 -1
package/dist/viem.cjs
CHANGED
|
@@ -1,1638 +1,2 @@
|
|
|
1
|
-
'use strict';require('@urql/core'),require('@urql/core/internal'),require('graphql');var viem=require('viem'),actions=require('viem/actions'),chains=require('viem/chains');var _t={withStackTrace:false},Le=(e,t,r=_t)=>{let n=t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},a=r.withStackTrace?new Error().stack:void 0;return {data:n,message:e,stack:a}};function M(e,t,r,n){function a(o){return o instanceof r?o:new r(function(c){c(o);})}return new(r||(r=Promise))(function(o,c){function u(v){try{l(n.next(v));}catch(h){c(h);}}function p(v){try{l(n.throw(v));}catch(h){c(h);}}function l(v){v.done?o(v.value):a(v.value).then(u,p);}l((n=n.apply(e,[])).next());})}function He(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(e){return this instanceof $?(this.v=e,this):new $(e)}function Oe(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),a,o=[];return a=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",c),a[Symbol.asyncIterator]=function(){return this},a;function c(y){return function(k){return Promise.resolve(k).then(y,h)}}function u(y,k){n[y]&&(a[y]=function(S){return new Promise(function(R,W){o.push([y,S,R,W])>1||p(y,S);})},k&&(a[y]=k(a[y])));}function p(y,k){try{l(n[y](k));}catch(S){P(o[0][3],S);}}function l(y){y.value instanceof $?Promise.resolve(y.value.v).then(v,h):P(o[0][2],y);}function v(y){p("next",y);}function h(y){p("throw",y);}function P(y,k){y(k),o.shift(),o.length&&p(o[0][0],o[0][1]);}}function Ct(e){var t,r;return t={},n("next"),n("throw",function(a){throw a}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(a,o){t[a]=e[a]?function(c){return (r=!r)?{value:$(e[a](c)),done:false}:o?o(c):c}:o;}}function It(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof He=="function"?He(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(c){return new Promise(function(u,p){c=e[o](c),a(u,p,c.done,c.value);})};}function a(o,c,u,p){Promise.resolve(p).then(function(l){o({value:l,done:u});},c);}}var E=class e{constructor(t){this._promise=t;}static fromSafePromise(t){let r=t.then(n=>new _(n));return new e(r)}static fromPromise(t,r){let n=t.then(a=>new _(a)).catch(a=>new C(r(a)));return new e(n)}static fromThrowable(t,r){return (...n)=>new e(M(this,void 0,void 0,function*(){try{return new _(yield t(...n))}catch(a){return new C(r?r(a):a)}}))}static combine(t){return xt(t)}static combineWithAllErrors(t){return Nt(t)}map(t){return new e(this._promise.then(r=>M(this,void 0,void 0,function*(){return r.isErr()?new C(r.error):new _(yield t(r.value))})))}andThrough(t){return new e(this._promise.then(r=>M(this,void 0,void 0,function*(){if(r.isErr())return new C(r.error);let n=yield t(r.value);return n.isErr()?new C(n.error):new _(r.value)})))}andTee(t){return new e(this._promise.then(r=>M(this,void 0,void 0,function*(){if(r.isErr())return new C(r.error);try{yield t(r.value);}catch{}return new _(r.value)})))}orTee(t){return new e(this._promise.then(r=>M(this,void 0,void 0,function*(){if(r.isOk())return new _(r.value);try{yield t(r.error);}catch{}return new C(r.error)})))}mapErr(t){return new e(this._promise.then(r=>M(this,void 0,void 0,function*(){return r.isOk()?new _(r.value):new C(yield t(r.error))})))}andThen(t){return new e(this._promise.then(r=>{if(r.isErr())return new C(r.error);let n=t(r.value);return n instanceof e?n._promise:n}))}orElse(t){return new e(this._promise.then(r=>M(this,void 0,void 0,function*(){return r.isErr()?t(r.error):new _(r.value)})))}match(t,r){return this._promise.then(n=>n.match(t,r))}unwrapOr(t){return this._promise.then(r=>r.unwrapOr(t))}safeUnwrap(){return Oe(this,arguments,function*(){return yield $(yield $(yield*Ct(It(yield $(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return Oe(this,arguments,function*(){let r=yield $(this._promise);return r.isErr()&&(yield yield $(U(r.error))),yield $(r.value)})}};function Z(e){return new E(Promise.resolve(new _(e)))}function U(e){return new E(Promise.resolve(new C(e)))}var Ve=e=>{let t=H([]);for(let r of e)if(r.isErr()){t=I(r.error);break}else t.map(n=>n.push(r.value));return t},xt=e=>E.fromSafePromise(Promise.all(e)).andThen(Ve),Qe=e=>{let t=H([]);for(let r of e)r.isErr()&&t.isErr()?t.error.push(r.error):r.isErr()&&t.isOk()?t=I([r.error]):r.isOk()&&t.isOk()&&t.value.push(r.value);return t},Nt=e=>E.fromSafePromise(Promise.all(e)).andThen(Qe),be;(function(e){function t(a,o){return (...c)=>{try{let u=a(...c);return H(u)}catch(u){return I(o?o(u):u)}}}e.fromThrowable=t;function r(a){return Ve(a)}e.combine=r;function n(a){return Qe(a)}e.combineWithAllErrors=n;})(be||(be={}));function H(e){return new _(e)}function I(e){return new C(e)}var _=class{constructor(t){this.value=t;}isOk(){return true}isErr(){return !this.isOk()}map(t){return H(t(this.value))}mapErr(t){return H(this.value)}andThen(t){return t(this.value)}andThrough(t){return t(this.value).map(r=>this.value)}andTee(t){try{t(this.value);}catch{}return H(this.value)}orTee(t){return H(this.value)}orElse(t){return H(this.value)}asyncAndThen(t){return t(this.value)}asyncAndThrough(t){return t(this.value).map(()=>this.value)}asyncMap(t){return E.fromSafePromise(t(this.value))}unwrapOr(t){return this.value}match(t,r){return t(this.value)}safeUnwrap(){let t=this.value;return (function*(){return t})()}_unsafeUnwrap(t){return this.value}_unsafeUnwrapErr(t){throw Le("Called `_unsafeUnwrapErr` on an Ok",this,t)}*[Symbol.iterator](){return this.value}},C=class{constructor(t){this.error=t;}isOk(){return false}isErr(){return !this.isOk()}map(t){return I(this.error)}mapErr(t){return I(t(this.error))}andThrough(t){return I(this.error)}andTee(t){return I(this.error)}orTee(t){try{t(this.error);}catch{}return I(this.error)}andThen(t){return I(this.error)}orElse(t){return t(this.error)}asyncAndThen(t){return U(this.error)}asyncAndThrough(t){return U(this.error)}asyncMap(t){return U(this.error)}unwrapOr(t){return t}match(t,r){return r(this.error)}safeUnwrap(){let t=this.error;return (function*(){throw yield I(t),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(t){throw Le("Called `_unsafeUnwrap` on an Err",this,t)}_unsafeUnwrapErr(t){return this.error}*[Symbol.iterator](){let t=this;return yield t,t}};be.fromThrowable;var Ft=20,Ut=1,j=1e6,Me=1e6,$t=-7,Bt=21,Dt=false,te="[big.js] ",G=te+"Invalid ",se=G+"decimal places",Wt=G+"rounding mode",je=te+"Division by zero",f={},B=void 0,Ht=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Ge(){function e(t){var r=this;if(!(r instanceof e))return t===B&&arguments.length===0?Ge():new e(t);if(t instanceof e)r.s=t.s,r.e=t.e,r.c=t.c.slice();else {if(typeof t!="string"){if(e.strict===true&&typeof t!="bigint")throw TypeError(G+"value");t=t===0&&1/t<0?"-0":String(t);}Ot(r,t);}r.constructor=e;}return e.prototype=f,e.DP=Ft,e.RM=Ut,e.NE=$t,e.PE=Bt,e.strict=Dt,e.roundDown=0,e.roundHalfUp=1,e.roundHalfEven=2,e.roundUp=3,e}function Ot(e,t){var r,n,a;if(!Ht.test(t))throw Error(G+"number");for(e.s=t.charAt(0)=="-"?(t=t.slice(1),-1):1,(r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),a=t.length,n=0;n<a&&t.charAt(n)=="0";)++n;if(n==a)e.c=[e.e=0];else {for(;a>0&&t.charAt(--a)=="0";);for(e.e=r-n-1,e.c=[],r=0;n<=a;)e.c[r++]=+t.charAt(n++);}return e}function K(e,t,r,n){var a=e.c;if(r===B&&(r=e.constructor.RM),r!==0&&r!==1&&r!==2&&r!==3)throw Error(Wt);if(t<1)n=r===3&&(n||!!a[0])||t===0&&(r===1&&a[0]>=5||r===2&&(a[0]>5||a[0]===5&&(n||a[1]!==B))),a.length=1,n?(e.e=e.e-t+1,a[0]=1):a[0]=e.e=0;else if(t<a.length){if(n=r===1&&a[t]>=5||r===2&&(a[t]>5||a[t]===5&&(n||a[t+1]!==B||a[t-1]&1))||r===3&&(n||!!a[0]),a.length=t,n){for(;++a[--t]>9;)if(a[t]=0,t===0){++e.e,a.unshift(1);break}}for(t=a.length;!a[--t];)a.pop();}return e}function Y(e,t,r){var n=e.e,a=e.c.join(""),o=a.length;if(t)a=a.charAt(0)+(o>1?"."+a.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)a="0"+a;a="0."+a;}else if(n>0)if(++n>o)for(n-=o;n--;)a+="0";else n<o&&(a=a.slice(0,n)+"."+a.slice(n));else o>1&&(a=a.charAt(0)+"."+a.slice(1));return e.s<0&&r?"-"+a:a}f.abs=function(){var e=new this.constructor(this);return e.s=1,e};f.cmp=function(e){var t,r=this,n=r.c,a=(e=new r.constructor(e)).c,o=r.s,c=e.s,u=r.e,p=e.e;if(!n[0]||!a[0])return n[0]?o:a[0]?-c:0;if(o!=c)return o;if(t=o<0,u!=p)return u>p^t?1:-1;for(c=(u=n.length)<(p=a.length)?u:p,o=-1;++o<c;)if(n[o]!=a[o])return n[o]>a[o]^t?1:-1;return u==p?0:u>p^t?1:-1};f.div=function(e){var t=this,r=t.constructor,n=t.c,a=(e=new r(e)).c,o=t.s==e.s?1:-1,c=r.DP;if(c!==~~c||c<0||c>j)throw Error(se);if(!a[0])throw Error(je);if(!n[0])return e.s=o,e.c=[e.e=0],e;var u,p,l,v,h,P=a.slice(),y=u=a.length,k=n.length,S=n.slice(0,u),R=S.length,W=e,Pe=W.c=[],Re=0,ee=c+(W.e=t.e-e.e)+1;for(W.s=o,o=ee<0?0:ee,P.unshift(0);R++<u;)S.push(0);do{for(l=0;l<10;l++){if(u!=(R=S.length))v=u>R?1:-1;else for(h=-1,v=0;++h<u;)if(a[h]!=S[h]){v=a[h]>S[h]?1:-1;break}if(v<0){for(p=R==u?a:P;R;){if(S[--R]<p[R]){for(h=R;h&&!S[--h];)S[h]=9;--S[h],S[R]+=10;}S[R]-=p[R];}for(;!S[0];)S.shift();}else break}Pe[Re++]=v?l:++l,S[0]&&v?S[R]=n[y]||0:S=[n[y]];}while((y++<k||S[0]!==B)&&o--);return !Pe[0]&&Re!=1&&(Pe.shift(),W.e--,ee--),Re>ee&&K(W,ee,r.RM,S[0]!==B),W};f.eq=function(e){return this.cmp(e)===0};f.gt=function(e){return this.cmp(e)>0};f.gte=function(e){return this.cmp(e)>-1};f.lt=function(e){return this.cmp(e)<0};f.lte=function(e){return this.cmp(e)<1};f.minus=f.sub=function(e){var t,r,n,a,o=this,c=o.constructor,u=o.s,p=(e=new c(e)).s;if(u!=p)return e.s=-p,o.plus(e);var l=o.c.slice(),v=o.e,h=e.c,P=e.e;if(!l[0]||!h[0])return h[0]?e.s=-p:l[0]?e=new c(o):e.s=1,e;if(u=v-P){for((a=u<0)?(u=-u,n=l):(P=v,n=h),n.reverse(),p=u;p--;)n.push(0);n.reverse();}else for(r=((a=l.length<h.length)?l:h).length,u=p=0;p<r;p++)if(l[p]!=h[p]){a=l[p]<h[p];break}if(a&&(n=l,l=h,h=n,e.s=-e.s),(p=(r=h.length)-(t=l.length))>0)for(;p--;)l[t++]=0;for(p=t;r>u;){if(l[--r]<h[r]){for(t=r;t&&!l[--t];)l[t]=9;--l[t],l[r]+=10;}l[r]-=h[r];}for(;l[--p]===0;)l.pop();for(;l[0]===0;)l.shift(),--P;return l[0]||(e.s=1,l=[P=0]),e.c=l,e.e=P,e};f.mod=function(e){var t,r=this,n=r.constructor,a=r.s,o=(e=new n(e)).s;if(!e.c[0])throw Error(je);return r.s=e.s=1,t=e.cmp(r)==1,r.s=a,e.s=o,t?new n(r):(a=n.DP,o=n.RM,n.DP=n.RM=0,r=r.div(e),n.DP=a,n.RM=o,this.minus(r.times(e)))};f.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e};f.plus=f.add=function(e){var t,r,n,a=this,o=a.constructor;if(e=new o(e),a.s!=e.s)return e.s=-e.s,a.minus(e);var c=a.e,u=a.c,p=e.e,l=e.c;if(!u[0]||!l[0])return l[0]||(u[0]?e=new o(a):e.s=a.s),e;if(u=u.slice(),t=c-p){for(t>0?(p=c,n=l):(t=-t,n=u),n.reverse();t--;)n.push(0);n.reverse();}for(u.length-l.length<0&&(n=l,l=u,u=n),t=l.length,r=0;t;u[t]%=10)r=(u[--t]=u[t]+l[t]+r)/10|0;for(r&&(u.unshift(r),++p),t=u.length;u[--t]===0;)u.pop();return e.c=u,e.e=p,e};f.pow=function(e){var t=this,r=new t.constructor("1"),n=r,a=e<0;if(e!==~~e||e<-Me||e>Me)throw Error(G+"exponent");for(a&&(e=-e);e&1&&(n=n.times(t)),e>>=1,!!e;)t=t.times(t);return a?r.div(n):n};f.prec=function(e,t){if(e!==~~e||e<1||e>j)throw Error(G+"precision");return K(new this.constructor(this),e,t)};f.round=function(e,t){if(e===B)e=0;else if(e!==~~e||e<-j||e>j)throw Error(se);return K(new this.constructor(this),e+this.e+1,t)};f.sqrt=function(){var e,t,r,n=this,a=n.constructor,o=n.s,c=n.e,u=new a("0.5");if(!n.c[0])return new a(n);if(o<0)throw Error(te+"No square root");o=Math.sqrt(+Y(n,true,true)),o===0||o===1/0?(t=n.c.join(""),t.length+c&1||(t+="0"),o=Math.sqrt(t),c=((c+1)/2|0)-(c<0||c&1),e=new a((o==1/0?"5e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+c)):e=new a(o+""),c=e.e+(a.DP+=4);do r=e,e=u.times(r.plus(n.div(r)));while(r.c.slice(0,c).join("")!==e.c.slice(0,c).join(""));return K(e,(a.DP-=4)+e.e+1,a.RM)};f.times=f.mul=function(e){var t,r=this,n=r.constructor,a=r.c,o=(e=new n(e)).c,c=a.length,u=o.length,p=r.e,l=e.e;if(e.s=r.s==e.s?1:-1,!a[0]||!o[0])return e.c=[e.e=0],e;for(e.e=p+l,c<u&&(t=a,a=o,o=t,l=c,c=u,u=l),t=new Array(l=c+u);l--;)t[l]=0;for(p=u;p--;){for(u=0,l=c+p;l>p;)u=t[l]+o[p]*a[l-p-1]+u,t[l--]=u%10,u=u/10|0;t[l]=u;}for(u?++e.e:t.shift(),p=t.length;!t[--p];)t.pop();return e.c=t,e};f.toExponential=function(e,t){var r=this,n=r.c[0];if(e!==B){if(e!==~~e||e<0||e>j)throw Error(se);for(r=K(new r.constructor(r),++e,t);r.c.length<e;)r.c.push(0);}return Y(r,true,!!n)};f.toFixed=function(e,t){var r=this,n=r.c[0];if(e!==B){if(e!==~~e||e<0||e>j)throw Error(se);for(r=K(new r.constructor(r),e+r.e+1,t),e=e+r.e+1;r.c.length<e;)r.c.push(0);}return Y(r,false,!!n)};f.toJSON=f.toString=function(){var e=this,t=e.constructor;return Y(e,e.e<=t.NE||e.e>=t.PE,!!e.c[0])};typeof Symbol<"u"&&(f[Symbol.for("nodejs.util.inspect.custom")]=f.toJSON);f.toNumber=function(){var e=+Y(this,true,true);if(this.constructor.strict===true&&!this.eq(e.toString()))throw Error(te+"Imprecise conversion");return e};f.toPrecision=function(e,t){var r=this,n=r.constructor,a=r.c[0];if(e!==B){if(e!==~~e||e<1||e>j)throw Error(G+"precision");for(r=K(new n(r),e,t);r.c.length<e;)r.c.push(0);}return Y(r,e<=r.e||r.e<=n.NE||r.e>=n.PE,!!a)};f.valueOf=function(){var e=this,t=e.constructor;if(t.strict===true)throw Error(te+"valueOf disallowed");return Y(e,e.e<=t.NE||e.e>=t.PE,true)};var qe=Ge();var ue=class extends Error{name="InvariantError"};function O(e,t){if(!e)throw new ue(t)}function ce(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ke(e){return e.length===1}function Lt(e){return /^0x[a-fA-F0-9]+$/.test(e)}function Te(e){return O(Lt(e),`Expected a valid hex string, but got: ${e}`),e}function Vt(e){return O(e.length===42,`EvmAddress: invalid length ${e.length}`),Te(e)}var Ye=Te;var ke=Te;Vt("0x0000000000000000000000000000000000000000");var X=class extends Error{asResultAsync(){return U(this)}asResult(){return I(this)}static from(e){if(e instanceof Error){let t=this.formatMessage(e);return new this(t,{cause:e})}return ce(e)&&"message"in e?new this(String(e.message)):new this(String(e))}static is(e){return e instanceof this}static formatMessage(e){let t=[],r=e;for(;r instanceof Error;){if("errors"in r&&Array.isArray(r.errors)){let n=r.errors.map(a=>a instanceof Error?a.message:String(a));t.push(n.join(", "));}else t.push(r.message);r=r.cause;}return t.join(" due to ")}};qe.strict=true;var Qt=(e=>(e[e.Down=0]="Down",e[e.HalfUp=1]="HalfUp",e[e.HalfEven=2]="HalfEven",e[e.Up=3]="Up",e))(Qt||{});(class w{value;static MAX_VAL=w.new(Number.MAX_VALUE.toString());static MIN_VAL=w.new(Number.MIN_VALUE.toString());constructor(t){this.value=new qe(t);}valueOf(){try{return this.value.valueOf()}catch(t){throw new ue("BigDecimal cannot be converted to a number",{cause:t})}}toNumber(){throw new ue("BigDecimal cannot be converted to a number")}abs(){return new w(this.value.abs())}add(t){return new w(this.value.add(this.toBigSource(t)))}div(t){return new w(this.value.div(this.toBigSource(t)))}minus(t){return new w(this.value.minus(this.toBigSource(t)))}mod(t){return new w(this.value.mod(this.toBigSource(t)))}mul(t){return new w(this.value.mul(this.toBigSource(t)))}neg(){return new w(this.value.neg())}plus(t){return new w(this.value.plus(this.toBigSource(t)))}pow(t){return new w(this.value.pow(t))}prec(t,r){return new w(this.value.prec(t,r))}round(t,r){return new w(this.value.round(t,r))}sqrt(){return new w(this.value.sqrt())}sub(t){return new w(this.value.sub(this.toBigSource(t)))}times(t){return new w(this.value.times(this.toBigSource(t)))}cmp(t){return this.value.cmp(this.toBigSource(t))}eq(t){return this.value.eq(this.toBigSource(t))}gt(t){return this.value.gt(this.toBigSource(t))}gte(t){return this.value.gte(this.toBigSource(t))}lt(t){return this.value.lt(this.toBigSource(t))}lte(t){return this.value.lte(this.toBigSource(t))}toExponential(t,r){return this.value.toExponential(t,r)}toFixed(t,r){return this.value.toFixed(t,r)}toPrecision(t,r){return this.value.toPrecision(t,r)}toString(){return this.value.toString()}toJSON(){return this.value.toFixed()}rescale(t){return this.mul(10**t)}toDisplayString(t,r){let{rounding:n=1,minFractionDigits:a=0,trimTrailingZeros:o=false}=r??{};if(this.eq(0))return a>0?`0.${"0".repeat(a)}`:"0";let c=this.applyPrecisionWithMinFractionDigits(t,a,n);return this.formatDecimalString(c,a,o)}toApproximateNumber(){return this.gt(w.MAX_VAL)?Number.MAX_VALUE:this.lt(w.MAX_VAL.times(-1))?-Number.MAX_VALUE:this.abs().lt(w.MIN_VAL)?this.lt("0")?-0:0:Number(this.toString())}static new(t){try{return new w(t)}catch(r){throw new ue("Invalid value for BigDecimal",{cause:r})}}static isBigDecimal(t){return t instanceof w}static min(t,r,...n){return [r,...n].reduce((a,o)=>a.lt(o)?a:o,t)}static max(t,r,...n){return [r,...n].reduce((a,o)=>a.gt(o)?a:o,t)}toBigSource(t){switch(typeof t){case "bigint":return t.toString();case "number":return t.toString();case "string":return t;default:return t.toFixed()}}getIntegerDigitCount(){let t=this.abs().toFixed(),[r]=t.split(".");return r?.length??t.length}applyPrecisionWithMinFractionDigits(t,r,n){if(this.gte(1)&&r>0){let a=this.getIntegerDigitCount(),o=a+r,c=Math.max(t,o)-a;return this.round(c,n)}return this.applyAdaptivePrecision(t,n)}formatDecimalString(t,r,n){let a=t.toFixed();return r>0&&(a=this.ensureMinFractionDigits(a,r)),n&&a.includes(".")&&(a=a.replace(/\.?0+$/,"")),a}ensureMinFractionDigits(t,r){let[n,a=""]=t.split(".");return a.length<r?`${n}.${a.padEnd(r,"0")}`:t}applyAdaptivePrecision(t,r){if(this.abs().gte(1)){let n=this.getIntegerDigitCount(),a=Math.max(0,t-n);return this.round(a,r)}return this.prec(t,r)}});function _e(e){let t=Number(e);return O(Number.isInteger(t)&&t>=0,`Invalid ChainId: ${e}`),t}var Mt=(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))(Mt||{});var ze=class Je extends X{name="UnexpectedError";static upgradeRequired(t){return new Je(`${t}. Check for SDK updates.`)}},z=class extends X{name="SigningError"},Ze=class Xe extends X{name="TransactionError";txHash;constructor(t,r,n){super(t,{cause:n}),this.txHash=r;}static new(t){let{txHash:r,request:n,link:a}=t,o=a?`Transaction failed: ${r}
|
|
2
|
-
\u2192 View on explorer: ${a}`:`Transaction failed: ${r}`;return new Xe(o,r,n)}};var et=class tt extends X{constructor(t){super(t.__typename),this.cause=t;}name="ValidationError";static fromGqlNode(t){return new tt(t)}},re=class extends X{name="CancelError"};var ne={DOCUMENT:"Document",FRAGMENT_DEFINITION:"FragmentDefinition"};var Ce=class extends Error{constructor(t,r,n,a,o,c,u){super(t),this.name="GraphQLError",this.message=t,o&&(this.path=o),r&&(this.nodes=Array.isArray(r)?r:[r]),n&&(this.source=n),a&&(this.positions=a),c&&(this.originalError=c);var p=u;if(!p&&c){var l=c.extensions;l&&typeof l=="object"&&(p=l);}this.extensions=p||{};}toJSON(){return {...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return "GraphQLError"}},m,s;function b(e){return new Ce(`Syntax Error: Unexpected token at ${s} in ${e}`)}function rt(e){if(e.lastIndex=s,e.test(m))return m.slice(s,s=e.lastIndex)}var le=/ +(?=[^\s])/y;function jt(e){for(var t=e.split(`
|
|
3
|
-
`),r="",n=0,a=0,o=t.length-1,c=0;c<t.length;c++)le.lastIndex=0,le.test(t[c])&&(c&&(!n||le.lastIndex<n)&&(n=le.lastIndex),a=a||c,o=c);for(var u=a;u<=o;u++)u!==a&&(r+=`
|
|
4
|
-
`),r+=t[u].slice(n).replace(/\\"""/g,'"""');return r}function d(){for(var e=0|m.charCodeAt(s++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|m.charCodeAt(s++))if(e===35)for(;(e=m.charCodeAt(s++))!==10&&e!==13;);s--;}function Ie(){for(var e=s,t=0|m.charCodeAt(s++);t>=48&&t<=57||t>=65&&t<=90||t===95||t>=97&&t<=122;t=0|m.charCodeAt(s++));if(e===s-1)throw b("Name");var r=m.slice(e,--s);return d(),r}function q(){return {kind:"Name",value:Ie()}}var Gt=/(?:"""|(?:[\s\S]*?[^\\])""")/y,Kt=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function pe(e){var t;switch(m.charCodeAt(s)){case 91:s++,d();for(var r=[];m.charCodeAt(s)!==93;)r.push(pe(e));return s++,d(),{kind:"ListValue",values:r};case 123:s++,d();for(var n=[];m.charCodeAt(s)!==125;){var a=q();if(m.charCodeAt(s++)!==58)throw b("ObjectField");d(),n.push({kind:"ObjectField",name:a,value:pe(e)});}return s++,d(),{kind:"ObjectValue",fields:n};case 36:if(e)throw b("Variable");return s++,{kind:"Variable",name:q()};case 34:if(m.charCodeAt(s+1)===34&&m.charCodeAt(s+2)===34){if(s+=3,(t=rt(Gt))==null)throw b("StringValue");return d(),{kind:"StringValue",value:jt(t.slice(0,-3)),block:true}}else {var o=s,c;s++;var u=false;for(c=0|m.charCodeAt(s++);c===92&&(s++,u=true)||c!==10&&c!==13&&c!==34&&c;c=0|m.charCodeAt(s++));if(c!==34)throw b("StringValue");return t=m.slice(o,s),d(),{kind:"StringValue",value:u?JSON.parse(t):t.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=s++,l;(l=0|m.charCodeAt(s++))>=48&&l<=57;);var v=m.slice(p,--s);if((l=m.charCodeAt(s))===46||l===69||l===101){if((t=rt(Kt))==null)throw b("FloatValue");return d(),{kind:"FloatValue",value:v+t}}else return d(),{kind:"IntValue",value:v};case 110:if(m.charCodeAt(s+1)===117&&m.charCodeAt(s+2)===108&&m.charCodeAt(s+3)===108)return s+=4,d(),{kind:"NullValue"};break;case 116:if(m.charCodeAt(s+1)===114&&m.charCodeAt(s+2)===117&&m.charCodeAt(s+3)===101)return s+=4,d(),{kind:"BooleanValue",value:true};break;case 102:if(m.charCodeAt(s+1)===97&&m.charCodeAt(s+2)===108&&m.charCodeAt(s+3)===115&&m.charCodeAt(s+4)===101)return s+=5,d(),{kind:"BooleanValue",value:false};break}return {kind:"EnumValue",value:Ie()}}function at(e){if(m.charCodeAt(s)===40){var t=[];s++,d();do{var r=q();if(m.charCodeAt(s++)!==58)throw b("Argument");d(),t.push({kind:"Argument",name:r,value:pe(e)});}while(m.charCodeAt(s)!==41);return s++,d(),t}}function L(e){if(m.charCodeAt(s)===64){var t=[];do s++,t.push({kind:"Directive",name:q(),arguments:at(e)});while(m.charCodeAt(s)===64);return t}}function Yt(){for(var e=0;m.charCodeAt(s)===91;)e++,s++,d();var t={kind:"NamedType",name:q()};do if(m.charCodeAt(s)===33&&(s++,d(),t={kind:"NonNullType",type:t}),e){if(m.charCodeAt(s++)!==93)throw b("NamedType");d(),t={kind:"ListType",type:t};}while(e--);return t}function me(){if(m.charCodeAt(s++)!==123)throw b("SelectionSet");return d(),de()}function de(){var e=[];do if(m.charCodeAt(s)===46){if(m.charCodeAt(++s)!==46||m.charCodeAt(++s)!==46)throw b("SelectionSet");switch(s++,d(),m.charCodeAt(s)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:L(false),selectionSet:me()});break;case 111:m.charCodeAt(s+1)===110?(s+=2,d(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:q()},directives:L(false),selectionSet:me()})):e.push({kind:"FragmentSpread",name:q(),directives:L(false)});break;case 123:s++,d(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:de()});break;default:e.push({kind:"FragmentSpread",name:q(),directives:L(false)});}}else {var t=q(),r=void 0;m.charCodeAt(s)===58&&(s++,d(),r=t,t=q());var n=at(false),a=L(false),o=void 0;m.charCodeAt(s)===123&&(s++,d(),o=de()),e.push({kind:"Field",alias:r,name:t,arguments:n,directives:a,selectionSet:o});}while(m.charCodeAt(s)!==125);return s++,d(),{kind:"SelectionSet",selections:e}}function zt(){if(d(),m.charCodeAt(s)===40){var e=[];s++,d();do{if(m.charCodeAt(s++)!==36)throw b("Variable");var t=q();if(m.charCodeAt(s++)!==58)throw b("VariableDefinition");d();var r=Yt(),n=void 0;m.charCodeAt(s)===61&&(s++,d(),n=pe(true)),d(),e.push({kind:"VariableDefinition",variable:{kind:"Variable",name:t},type:r,defaultValue:n,directives:L(true)});}while(m.charCodeAt(s)!==41);return s++,d(),e}}function Jt(){var e=q();if(m.charCodeAt(s++)!==111||m.charCodeAt(s++)!==110)throw b("FragmentDefinition");return d(),{kind:"FragmentDefinition",name:e,typeCondition:{kind:"NamedType",name:q()},directives:L(false),selectionSet:me()}}function nt(){var e=[];do if(m.charCodeAt(s)===123)s++,d(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:de()});else {var t=Ie();switch(t){case "fragment":e.push(Jt());break;case "query":case "mutation":case "subscription":var r,n=void 0;(r=m.charCodeAt(s))!==40&&r!==64&&r!==123&&(n=q()),e.push({kind:"OperationDefinition",operation:t,name:n,variableDefinitions:zt(),directives:L(false),selectionSet:me()});break;default:throw b("Document")}}while(s<m.length);return e}function it(e,t){return m=e.body?e.body:e,s=0,d(),{kind:"Document",definitions:nt(),loc:{start:0,end:m.length,startToken:void 0,endToken:void 0,source:{body:m,name:"graphql.web",locationOffset:{line:1,column:1}}}}}var ot=0,xe=new Set;function Ne(){function e(t,r){var n=it(t).definitions,a=new Set;for(var o of r||[])for(var c of o.definitions)c.kind===ne.FRAGMENT_DEFINITION&&!a.has(c)&&(n.push(c),a.add(c));var u;(u=n[0].kind===ne.FRAGMENT_DEFINITION)&&n[0].directives&&(n[0].directives=n[0].directives.filter((l=>l.name.value!=="_unmask")));var p;return {kind:ne.DOCUMENT,definitions:n,get loc(){if(!p&&u){var l=t+(function(h){try{ot++;var P="";for(var y of h)if(!xe.has(y)){xe.add(y);var{loc:k}=y;k&&(P+=k.source.body);}return P}finally{--ot==0&&xe.clear();}})(r||[]);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(r,n){return n},e.persisted=function(r,n){return {kind:ne.DOCUMENT,definitions:n?n.definitions:[],documentId:r}},e}Ne();var Zt=(e=>(e.Asc="ASC",e.Desc="DESC",e))(Zt||{}),Xt=(e=>(e.Ten="TEN",e.Fifty="FIFTY",e))(Xt||{}),Fe=(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))(Fe||{}),er=(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))(er||{}),tr=(e=>(e.TESTNET_ONLY="TESTNET_ONLY",e.MAINNET_ONLY="MAINNET_ONLY",e.ALL="ALL",e))(tr||{}),rr=(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))(rr||{}),nr=(e=>(e.Highest="HIGHEST",e.Lowest="LOWEST",e.Average="AVERAGE",e))(nr||{}),ar=(e=>(e.Highest="HIGHEST",e.Lowest="LOWEST",e))(ar||{}),Ue=(e=>(e.Usd="USD",e.Eur="EUR",e.Gbp="GBP",e))(Ue||{}),ir=(e=>(e.Supply="SUPPLY",e.Borrow="BORROW",e.Collateral="COLLATERAL",e.All="ALL",e))(ir||{}),or=(e=>(e.Buy="BUY",e.Sell="SELL",e))(or||{}),sr=(e=>(e.Current="CURRENT",e.New="NEW",e))(sr||{}),ur=(e=>(e.Repay="REPAY",e.Supply="SUPPLY",e))(ur||{}),cr=(e=>(e.Current="CURRENT",e.New="NEW",e))(cr||{}),lr=(e=>(e.Withdraw="WITHDRAW",e.Buy="BUY",e))(lr||{}),pr=(e=>(e.Cancelled="CANCELLED",e.Expired="EXPIRED",e.Fulfilled="FULFILLED",e.Open="OPEN",e.PendingSignature="PENDING_SIGNATURE",e))(pr||{}),mr=(e=>(e.Stablecoin="STABLECOIN",e.EthCorrelated="ETH_CORRELATED",e))(mr||{}),dr=(e=>(e.AllDynamicConfig="ALL_DYNAMIC_CONFIG",e.JustRiskPremium="JUST_RISK_PREMIUM",e))(dr||{}),hr=(e=>(e.Fast="FAST",e.Accurate="ACCURATE",e))(hr||{}),i=Ne(),st=i(`fragment DomainData on DomainData {
|
|
5
|
-
name
|
|
6
|
-
version
|
|
7
|
-
chainId
|
|
8
|
-
verifyingContract
|
|
9
|
-
}`),D=i(`fragment DecimalNumber on DecimalNumber {
|
|
10
|
-
__typename
|
|
11
|
-
onChainValue
|
|
12
|
-
decimals
|
|
13
|
-
value
|
|
14
|
-
}`),g=i(`fragment PercentNumber on PercentNumber {
|
|
15
|
-
__typename
|
|
16
|
-
onChainValue
|
|
17
|
-
decimals
|
|
18
|
-
value
|
|
19
|
-
normalized
|
|
20
|
-
}`),fr=i(`fragment DecimalNumberWithChange on DecimalNumberWithChange {
|
|
21
|
-
__typename
|
|
22
|
-
current {
|
|
23
|
-
...DecimalNumber
|
|
24
|
-
}
|
|
25
|
-
change(window: $timeWindow) {
|
|
26
|
-
...PercentNumber
|
|
27
|
-
}
|
|
28
|
-
}`,[D,g]),x=i(`fragment ExchangeAmount on ExchangeAmount {
|
|
29
|
-
__typename
|
|
30
|
-
value
|
|
31
|
-
name
|
|
32
|
-
symbol
|
|
33
|
-
icon
|
|
34
|
-
decimals
|
|
35
|
-
}`),he=i(`fragment TokenInfo on TokenInfo {
|
|
36
|
-
__typename
|
|
37
|
-
id
|
|
38
|
-
name
|
|
39
|
-
symbol
|
|
40
|
-
icon
|
|
41
|
-
decimals
|
|
42
|
-
categories
|
|
43
|
-
}`),A=i(`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
|
-
}`,[he]),V=i(`fragment Erc20Token on Erc20Token {
|
|
59
|
-
__typename
|
|
60
|
-
info {
|
|
61
|
-
...TokenInfo
|
|
62
|
-
}
|
|
63
|
-
address
|
|
64
|
-
chain {
|
|
65
|
-
...Chain
|
|
66
|
-
}
|
|
67
|
-
isWrappedNativeToken
|
|
68
|
-
}`,[he,A]),ut=i(`fragment NativeToken on NativeToken {
|
|
69
|
-
__typename
|
|
70
|
-
info {
|
|
71
|
-
...TokenInfo
|
|
72
|
-
}
|
|
73
|
-
chain {
|
|
74
|
-
...Chain
|
|
75
|
-
}
|
|
76
|
-
}`,[he,A]),T=i(`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
|
-
}`,[V,D,x]),ct=i(`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
|
-
}`,[ut,D,x]),$e=i(`fragment TokenAmount on TokenAmount {
|
|
105
|
-
__typename
|
|
106
|
-
... on Erc20Amount {
|
|
107
|
-
...Erc20Amount
|
|
108
|
-
}
|
|
109
|
-
... on NativeAmount {
|
|
110
|
-
...NativeAmount
|
|
111
|
-
}
|
|
112
|
-
}`,[T,ct]),yr=i(`fragment Token on Token {
|
|
113
|
-
__typename
|
|
114
|
-
... on Erc20Token {
|
|
115
|
-
...Erc20Token
|
|
116
|
-
}
|
|
117
|
-
... on NativeToken {
|
|
118
|
-
...NativeToken
|
|
119
|
-
}
|
|
120
|
-
}`,[V,ut]),ae=i(`fragment ExchangeAmountWithChange on ExchangeAmountWithChange {
|
|
121
|
-
__typename
|
|
122
|
-
current {
|
|
123
|
-
...ExchangeAmount
|
|
124
|
-
}
|
|
125
|
-
change(window: $timeWindow){
|
|
126
|
-
...PercentNumber
|
|
127
|
-
}
|
|
128
|
-
}`,[x,g]),gr=i(`fragment PercentNumberWithChange on PercentNumberWithChange {
|
|
129
|
-
__typename
|
|
130
|
-
current {
|
|
131
|
-
...PercentNumber
|
|
132
|
-
}
|
|
133
|
-
change(window: $timeWindow){
|
|
134
|
-
...PercentNumber
|
|
135
|
-
}
|
|
136
|
-
}`,[g]),fe=i(`fragment PaginatedResultInfo on PaginatedResultInfo {
|
|
137
|
-
__typename
|
|
138
|
-
prev
|
|
139
|
-
next
|
|
140
|
-
}`),vr=i(`fragment PercentNumberVariation on PercentNumberVariation {
|
|
141
|
-
__typename
|
|
142
|
-
current {
|
|
143
|
-
...PercentNumber
|
|
144
|
-
}
|
|
145
|
-
after {
|
|
146
|
-
...PercentNumber
|
|
147
|
-
}
|
|
148
|
-
}`,[g]),Sr=i(`fragment ExchangeAmountVariation on ExchangeAmountVariation {
|
|
149
|
-
__typename
|
|
150
|
-
current {
|
|
151
|
-
...ExchangeAmount
|
|
152
|
-
}
|
|
153
|
-
after {
|
|
154
|
-
...ExchangeAmount
|
|
155
|
-
}
|
|
156
|
-
}`,[x]),wr=i(`fragment HealthFactorWithChange on HealthFactorWithChange {
|
|
157
|
-
__typename
|
|
158
|
-
current
|
|
159
|
-
change(window: $timeWindow) {
|
|
160
|
-
...PercentNumber
|
|
161
|
-
}
|
|
162
|
-
}`,[g]),Ar=i(`fragment HealthFactorVariation on HealthFactorVariation {
|
|
163
|
-
__typename
|
|
164
|
-
current
|
|
165
|
-
after
|
|
166
|
-
}`),Er=i(`fragment HealthFactorError on HealthFactorError {
|
|
167
|
-
__typename
|
|
168
|
-
reason
|
|
169
|
-
current
|
|
170
|
-
after
|
|
171
|
-
}`),Pr=i(`fragment HealthFactorResult on HealthFactorResult {
|
|
172
|
-
__typename
|
|
173
|
-
... on HealthFactorVariation {
|
|
174
|
-
...HealthFactorVariation
|
|
175
|
-
}
|
|
176
|
-
... on HealthFactorError {
|
|
177
|
-
...HealthFactorError
|
|
178
|
-
}
|
|
179
|
-
}`,[Ar,Er]),ie=i(`fragment InsufficientBalanceError on InsufficientBalanceError {
|
|
180
|
-
__typename
|
|
181
|
-
required {
|
|
182
|
-
...DecimalNumber
|
|
183
|
-
}
|
|
184
|
-
available {
|
|
185
|
-
...DecimalNumber
|
|
186
|
-
}
|
|
187
|
-
}`,[D]),Rr=i(`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
|
-
}`,[x,ae,g]),ye=i(`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
|
-
}`,[A,Rr]),br=i(`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
|
-
}`,[T,g]),qr=i(`fragment HubAssetSettings on HubAssetSettings {
|
|
239
|
-
__typename
|
|
240
|
-
feeReceiver
|
|
241
|
-
liquidityFee {
|
|
242
|
-
...PercentNumber
|
|
243
|
-
}
|
|
244
|
-
irStrategy
|
|
245
|
-
reinvestmentController
|
|
246
|
-
}`,[g]),Tr=i(`fragment HubAssetUserState on HubAssetUserState {
|
|
247
|
-
__typename
|
|
248
|
-
balance {
|
|
249
|
-
...Erc20Amount
|
|
250
|
-
}
|
|
251
|
-
}`,[T]),Be=i(`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
|
-
}`,[ye,V,br,qr,Tr]),kr=i(`fragment PermitTypedData on PermitTypedData {
|
|
271
|
-
__typename
|
|
272
|
-
types
|
|
273
|
-
primaryType
|
|
274
|
-
domain {
|
|
275
|
-
...DomainData
|
|
276
|
-
}
|
|
277
|
-
message
|
|
278
|
-
}`,[st]);var N=i(`fragment Spoke on Spoke {
|
|
279
|
-
__typename
|
|
280
|
-
id
|
|
281
|
-
name
|
|
282
|
-
address
|
|
283
|
-
chain {
|
|
284
|
-
...Chain
|
|
285
|
-
}
|
|
286
|
-
}`,[A]),_r=i(`fragment SpokePositionManager on SpokePositionManager {
|
|
287
|
-
__typename
|
|
288
|
-
address
|
|
289
|
-
active
|
|
290
|
-
name
|
|
291
|
-
}`),Cr=i(`fragment PaginatedSpokePositionManagerResult on PaginatedSpokePositionManagerResult {
|
|
292
|
-
__typename
|
|
293
|
-
items {
|
|
294
|
-
...SpokePositionManager
|
|
295
|
-
}
|
|
296
|
-
pageInfo {
|
|
297
|
-
...PaginatedResultInfo
|
|
298
|
-
}
|
|
299
|
-
}`,[_r,fe]),Ir=i(`fragment SpokeUserPositionManager on SpokeUserPositionManager {
|
|
300
|
-
__typename
|
|
301
|
-
address
|
|
302
|
-
approvedOn
|
|
303
|
-
active
|
|
304
|
-
name
|
|
305
|
-
}`),xr=i(`fragment PaginatedSpokeUserPositionManagerResult on PaginatedSpokeUserPositionManagerResult {
|
|
306
|
-
__typename
|
|
307
|
-
items {
|
|
308
|
-
...SpokeUserPositionManager
|
|
309
|
-
}
|
|
310
|
-
pageInfo {
|
|
311
|
-
...PaginatedResultInfo
|
|
312
|
-
}
|
|
313
|
-
}`,[Ir,fe]),Nr=i(`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
|
-
}`,[g]),Fr=i(`fragment ReserveStatus on ReserveStatus {
|
|
332
|
-
__typename
|
|
333
|
-
frozen
|
|
334
|
-
paused
|
|
335
|
-
active
|
|
336
|
-
}`),Ur=i(`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
|
-
}`,[T,g]),$r=i(`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
|
-
}`,[T,g]),ge=i(`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
|
-
}`,[N,A,Ur,Nr,Fr,$r,Be]),Q=i(`fragment ReserveInfo on ReserveInfo {
|
|
406
|
-
__typename
|
|
407
|
-
id
|
|
408
|
-
asset {
|
|
409
|
-
...HubAsset
|
|
410
|
-
}
|
|
411
|
-
}`,[Be]),F=i(`fragment TransactionRequest on TransactionRequest {
|
|
412
|
-
__typename
|
|
413
|
-
to
|
|
414
|
-
from
|
|
415
|
-
data
|
|
416
|
-
value
|
|
417
|
-
chainId
|
|
418
|
-
operations
|
|
419
|
-
}`),lt=i(`fragment Erc20Approval on Erc20Approval {
|
|
420
|
-
__typename
|
|
421
|
-
byTransaction {
|
|
422
|
-
...TransactionRequest
|
|
423
|
-
}
|
|
424
|
-
bySignature {
|
|
425
|
-
...PermitTypedData
|
|
426
|
-
}
|
|
427
|
-
}`,[F,kr]),pt=i(`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
|
-
}`,[F,lt,D]),Br=i(`fragment PreContractActionRequired on PreContractActionRequired {
|
|
443
|
-
__typename
|
|
444
|
-
transaction {
|
|
445
|
-
...TransactionRequest
|
|
446
|
-
}
|
|
447
|
-
reason
|
|
448
|
-
originalTransaction {
|
|
449
|
-
...TransactionRequest
|
|
450
|
-
}
|
|
451
|
-
}`,[F]),ve=i(`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
|
-
}`,[F,pt,Br,ie]),Dr=i(`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
|
-
}`,[$e]),Se=i(`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
|
-
}`,[g,$e,Dr]),we=i(`fragment SwapTypedData on SwapTypedData {
|
|
505
|
-
__typename
|
|
506
|
-
primaryType
|
|
507
|
-
types
|
|
508
|
-
domain {
|
|
509
|
-
...DomainData
|
|
510
|
-
}
|
|
511
|
-
message
|
|
512
|
-
}`,[st]),mt=i(`fragment PrepareSwapOrder on PrepareSwapOrder {
|
|
513
|
-
__typename
|
|
514
|
-
newQuoteId
|
|
515
|
-
data {
|
|
516
|
-
...SwapTypedData
|
|
517
|
-
}
|
|
518
|
-
}`,[we]),Wr=i(`fragment SwapByIntent on SwapByIntent {
|
|
519
|
-
__typename
|
|
520
|
-
quote {
|
|
521
|
-
...SwapQuote
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
}`,[Se]),Hr=i(`fragment SwapByIntentWithApprovalRequired on SwapByIntentWithApprovalRequired {
|
|
525
|
-
__typename
|
|
526
|
-
approvals {
|
|
527
|
-
...Erc20Approval
|
|
528
|
-
}
|
|
529
|
-
quote {
|
|
530
|
-
...SwapQuote
|
|
531
|
-
}
|
|
532
|
-
}`,[lt,Se]),Or=i(`fragment SwapByTransaction on SwapByTransaction {
|
|
533
|
-
__typename
|
|
534
|
-
quote {
|
|
535
|
-
...SwapQuote
|
|
536
|
-
}
|
|
537
|
-
}`,[Se]),dt=i(`fragment SwapReceipt on SwapReceipt {
|
|
538
|
-
__typename
|
|
539
|
-
id
|
|
540
|
-
explorerUrl
|
|
541
|
-
createdAt
|
|
542
|
-
}`),Lr=i(`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
|
-
}`,[Wr,Hr,Or]),Vr=i(`fragment PrepareTokenSwapResult on PrepareTokenSwapResult {
|
|
554
|
-
__typename
|
|
555
|
-
... on PrepareSwapOrder {
|
|
556
|
-
...PrepareSwapOrder
|
|
557
|
-
}
|
|
558
|
-
... on InsufficientBalanceError {
|
|
559
|
-
...InsufficientBalanceError
|
|
560
|
-
}
|
|
561
|
-
}`,[mt,ie]),Qr=i(`fragment SwapTransactionRequest on SwapTransactionRequest {
|
|
562
|
-
__typename
|
|
563
|
-
transaction {
|
|
564
|
-
...TransactionRequest
|
|
565
|
-
}
|
|
566
|
-
orderReceipt {
|
|
567
|
-
...SwapReceipt
|
|
568
|
-
}
|
|
569
|
-
}`,[F,dt]),Mr=i(`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
|
-
}`,[Qr,dt,ie]),ht=i(`fragment SwapCancelled on SwapCancelled {
|
|
581
|
-
__typename
|
|
582
|
-
swapId
|
|
583
|
-
createdAt
|
|
584
|
-
cancelledAt
|
|
585
|
-
explorerUrl
|
|
586
|
-
}`),jr=i(`fragment SwapExpired on SwapExpired {
|
|
587
|
-
__typename
|
|
588
|
-
swapId
|
|
589
|
-
createdAt
|
|
590
|
-
expiredAt
|
|
591
|
-
explorerUrl
|
|
592
|
-
}`),Gr=i(`fragment PositionAmount on PositionAmount {
|
|
593
|
-
__typename
|
|
594
|
-
reserve {
|
|
595
|
-
...ReserveInfo
|
|
596
|
-
}
|
|
597
|
-
amount {
|
|
598
|
-
...Erc20Amount
|
|
599
|
-
}
|
|
600
|
-
}`,[Q,T]),J=i(`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
|
-
}`,[Gr,ct,T]),Kr=i(`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
|
-
}`,[J]),Yr=i(`fragment SwapPendingSignature on SwapPendingSignature {
|
|
624
|
-
__typename
|
|
625
|
-
swapId
|
|
626
|
-
createdAt
|
|
627
|
-
deadline
|
|
628
|
-
explorerUrl
|
|
629
|
-
}`),zr=i(`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
|
-
}`,[J]),ft=i(`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
|
-
}`,[Kr,Yr,ht,jr,zr]),Jr=i(`fragment PrepareSwapCancelResult on PrepareSwapCancelResult {
|
|
667
|
-
__typename
|
|
668
|
-
data {
|
|
669
|
-
...SwapTypedData
|
|
670
|
-
}
|
|
671
|
-
}`,[we]),Zr=i(`fragment CancelSwapExecutionPlan on CancelSwapExecutionPlan {
|
|
672
|
-
__typename
|
|
673
|
-
... on TransactionRequest {
|
|
674
|
-
...TransactionRequest
|
|
675
|
-
}
|
|
676
|
-
... on SwapCancelled {
|
|
677
|
-
...SwapCancelled
|
|
678
|
-
}
|
|
679
|
-
}`,[F,ht]),Xr=i(`fragment PaginatedUserSwapsResult on PaginatedUserSwapsResult {
|
|
680
|
-
__typename
|
|
681
|
-
items {
|
|
682
|
-
...SwapStatus
|
|
683
|
-
}
|
|
684
|
-
pageInfo {
|
|
685
|
-
...PaginatedResultInfo
|
|
686
|
-
}
|
|
687
|
-
}`,[ft,fe]),en=i(`fragment PositionSwapAdapterContractApproval on PositionSwapAdapterContractApproval {
|
|
688
|
-
__typename
|
|
689
|
-
bySignature {
|
|
690
|
-
...SwapTypedData
|
|
691
|
-
}
|
|
692
|
-
}`,[we]),tn=i(`fragment PositionSwapPositionManagerApproval on PositionSwapPositionManagerApproval {
|
|
693
|
-
__typename
|
|
694
|
-
byTransaction {
|
|
695
|
-
...TransactionRequest
|
|
696
|
-
}
|
|
697
|
-
bySignature {
|
|
698
|
-
...SwapTypedData
|
|
699
|
-
}
|
|
700
|
-
}`,[F,we]),rn=i(`fragment PositionSwapApproval on PositionSwapApproval {
|
|
701
|
-
__typename
|
|
702
|
-
... on PositionSwapAdapterContractApproval {
|
|
703
|
-
...PositionSwapAdapterContractApproval
|
|
704
|
-
}
|
|
705
|
-
... on PositionSwapPositionManagerApproval {
|
|
706
|
-
...PositionSwapPositionManagerApproval
|
|
707
|
-
}
|
|
708
|
-
}`,[en,tn]),Ae=i(`fragment PositionSwapByIntentApprovalsRequired on PositionSwapByIntentApprovalsRequired {
|
|
709
|
-
__typename
|
|
710
|
-
quote {
|
|
711
|
-
...SwapQuote
|
|
712
|
-
}
|
|
713
|
-
approvals {
|
|
714
|
-
...PositionSwapApproval
|
|
715
|
-
}
|
|
716
|
-
}`,[Se,rn]),nn=i(`fragment SupplySwapQuoteResult on SupplySwapQuoteResult {
|
|
717
|
-
__typename
|
|
718
|
-
... on PositionSwapByIntentApprovalsRequired {
|
|
719
|
-
...PositionSwapByIntentApprovalsRequired
|
|
720
|
-
}
|
|
721
|
-
}`,[Ae]),an=i(`fragment BorrowSwapQuoteResult on BorrowSwapQuoteResult {
|
|
722
|
-
__typename
|
|
723
|
-
... on PositionSwapByIntentApprovalsRequired {
|
|
724
|
-
...PositionSwapByIntentApprovalsRequired
|
|
725
|
-
}
|
|
726
|
-
}`,[Ae]),on=i(`fragment RepayWithSupplyQuoteResult on RepayWithSupplyQuoteResult {
|
|
727
|
-
__typename
|
|
728
|
-
... on PositionSwapByIntentApprovalsRequired {
|
|
729
|
-
...PositionSwapByIntentApprovalsRequired
|
|
730
|
-
}
|
|
731
|
-
}`,[Ae]),sn=i(`fragment WithdrawSwapQuoteResult on WithdrawSwapQuoteResult {
|
|
732
|
-
__typename
|
|
733
|
-
... on PositionSwapByIntentApprovalsRequired {
|
|
734
|
-
...PositionSwapByIntentApprovalsRequired
|
|
735
|
-
}
|
|
736
|
-
}`,[Ae]),un=i(`fragment PreparePositionSwapResult on PreparePositionSwapResult {
|
|
737
|
-
__typename
|
|
738
|
-
... on PrepareSwapOrder {
|
|
739
|
-
...PrepareSwapOrder
|
|
740
|
-
}
|
|
741
|
-
... on InsufficientBalanceError {
|
|
742
|
-
...InsufficientBalanceError
|
|
743
|
-
}
|
|
744
|
-
}`,[mt,ie]),cn=i(`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
|
-
}`,[T,ge]),ln=i(`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
|
-
}`,[T,ge]),pn=i(`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
|
-
}`,[ae,x,g]),yt=i(`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
|
-
}`,[V,g]),mn=i(`fragment UserPositionRiskPremium on UserPositionRiskPremium {
|
|
814
|
-
__typename
|
|
815
|
-
current {
|
|
816
|
-
...PercentNumber
|
|
817
|
-
}
|
|
818
|
-
latest {
|
|
819
|
-
...PercentNumber
|
|
820
|
-
}
|
|
821
|
-
breakdown {
|
|
822
|
-
...UserRiskPremiumBreakdownItem
|
|
823
|
-
}
|
|
824
|
-
}`,[g,yt]),gt=i(`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
|
-
}`,[N,g,ae,x,gr,wr,mn]),dn=i(`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
|
-
}`,[he,D,$e,x,g]),hn=i(`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
|
-
}`,[x]),vt=i(`fragment ApySample on ApySample {
|
|
925
|
-
__typename
|
|
926
|
-
date
|
|
927
|
-
avgRate {
|
|
928
|
-
...PercentNumber
|
|
929
|
-
}
|
|
930
|
-
}`,[g]);i(`query Hub($request: HubRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
931
|
-
value: hub(request: $request) {
|
|
932
|
-
...Hub
|
|
933
|
-
}
|
|
934
|
-
}`,[ye]);i(`query Hubs($request: HubsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
935
|
-
value: hubs(request: $request) {
|
|
936
|
-
...Hub
|
|
937
|
-
}
|
|
938
|
-
}`,[ye]);i(`query HubAssets($request: HubAssetsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
939
|
-
value: hubAssets(request: $request) {
|
|
940
|
-
...HubAsset
|
|
941
|
-
}
|
|
942
|
-
}`,[Be]);var fn=i(`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
|
-
}`,[x,g]);i(`query HubSummaryHistory($request: HubSummaryHistoryRequest!) {
|
|
958
|
-
value: hubSummaryHistory(request: $request) {
|
|
959
|
-
...HubSummarySample
|
|
960
|
-
}
|
|
961
|
-
}`,[fn]);var St=i(`query Chain($request: ChainRequest!) {
|
|
962
|
-
value: chain(request: $request) {
|
|
963
|
-
...Chain
|
|
964
|
-
}
|
|
965
|
-
}`,[A]);i(`query Chains($request: ChainsRequest!) {
|
|
966
|
-
value: chains(request: $request) {
|
|
967
|
-
...Chain
|
|
968
|
-
}
|
|
969
|
-
}`,[A]);i(`query HasProcessedKnownTransaction($request: HasProcessedKnownTransactionRequest!) {
|
|
970
|
-
value: hasProcessedKnownTransaction(request: $request)
|
|
971
|
-
}`);i(`query Health {
|
|
972
|
-
value: health
|
|
973
|
-
}`);i(`query ExchangeRate($request: ExchangeRateRequest!) {
|
|
974
|
-
value: exchangeRate(request: $request) {
|
|
975
|
-
...ExchangeAmount
|
|
976
|
-
}
|
|
977
|
-
}`,[x]);var Sn=i(`fragment AssetPriceSample on AssetPriceSample {
|
|
978
|
-
__typename
|
|
979
|
-
date
|
|
980
|
-
price
|
|
981
|
-
}`),wt=i(`fragment AssetSampleBreakdown on AssetSampleBreakdown {
|
|
982
|
-
__typename
|
|
983
|
-
amount {
|
|
984
|
-
...DecimalNumber
|
|
985
|
-
}
|
|
986
|
-
apy {
|
|
987
|
-
...PercentNumber
|
|
988
|
-
}
|
|
989
|
-
hub {
|
|
990
|
-
...Hub
|
|
991
|
-
}
|
|
992
|
-
}`,[D,g,ye]),wn=i(`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
|
-
}`,[D,g,wt]),An=i(`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
|
-
}`,[D,g,wt]),En=i(`fragment AssetAmountWithChange on AssetAmountWithChange {
|
|
1029
|
-
__typename
|
|
1030
|
-
amount {
|
|
1031
|
-
...DecimalNumberWithChange
|
|
1032
|
-
}
|
|
1033
|
-
exchange(currency: $currency) {
|
|
1034
|
-
...ExchangeAmountWithChange
|
|
1035
|
-
}
|
|
1036
|
-
}`,[fr,ae]),Pn=i(`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
|
-
}`,[En,g]),Rn=i(`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
|
-
}`,[V,Pn,ae]);i(`query Asset($request: AssetRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1075
|
-
value: asset(request: $request) {
|
|
1076
|
-
...Asset
|
|
1077
|
-
}
|
|
1078
|
-
}`,[Rn]);i(`query AssetPriceHistory($request: AssetPriceHistoryRequest!) {
|
|
1079
|
-
value: assetPriceHistory(request: $request) {
|
|
1080
|
-
...AssetPriceSample
|
|
1081
|
-
}
|
|
1082
|
-
}`,[Sn]);i(`query AssetSupplyHistory($request: AssetSupplyHistoryRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1083
|
-
value: assetSupplyHistory(request: $request) {
|
|
1084
|
-
...AssetSupplySample
|
|
1085
|
-
}
|
|
1086
|
-
}`,[wn]);i(`query AssetBorrowHistory($request: AssetBorrowHistoryRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1087
|
-
value: assetBorrowHistory(request: $request) {
|
|
1088
|
-
...AssetBorrowSample
|
|
1089
|
-
}
|
|
1090
|
-
}`,[An]);var bn=i(`fragment ProtocolHistorySample on ProtocolHistorySample {
|
|
1091
|
-
__typename
|
|
1092
|
-
date
|
|
1093
|
-
deposits {
|
|
1094
|
-
...ExchangeAmount
|
|
1095
|
-
}
|
|
1096
|
-
borrows {
|
|
1097
|
-
...ExchangeAmount
|
|
1098
|
-
}
|
|
1099
|
-
}`,[x]);i(`query ProtocolHistory($request: ProtocolHistoryRequest!) {
|
|
1100
|
-
value: protocolHistory(request: $request) {
|
|
1101
|
-
...ProtocolHistorySample
|
|
1102
|
-
}
|
|
1103
|
-
}`,[bn]);i(`query BorrowApyHistory($request: BorrowApyHistoryRequest!) {
|
|
1104
|
-
value: borrowApyHistory(request: $request) {
|
|
1105
|
-
...ApySample
|
|
1106
|
-
}
|
|
1107
|
-
}`,[vt]);i(`query SupplyApyHistory($request: SupplyApyHistoryRequest!) {
|
|
1108
|
-
value: supplyApyHistory(request: $request) {
|
|
1109
|
-
...ApySample
|
|
1110
|
-
}
|
|
1111
|
-
}`,[vt]);i(`query Reserve($request: ReserveRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1112
|
-
value: reserve(request: $request) {
|
|
1113
|
-
...Reserve
|
|
1114
|
-
}
|
|
1115
|
-
}`,[ge]);i(`query Reserves($request: ReservesRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1116
|
-
value: reserves(request: $request) {
|
|
1117
|
-
...Reserve
|
|
1118
|
-
}
|
|
1119
|
-
}`,[ge]);i(`query Spoke($request: SpokeRequest!) {
|
|
1120
|
-
value: spoke(request: $request) {
|
|
1121
|
-
...Spoke
|
|
1122
|
-
}
|
|
1123
|
-
}`,[N]);i(`query Spokes($request: SpokesRequest!) {
|
|
1124
|
-
value: spokes(request: $request) {
|
|
1125
|
-
...Spoke
|
|
1126
|
-
}
|
|
1127
|
-
}`,[N]);i(`query SpokePositionManagers($request: SpokePositionManagersRequest!) {
|
|
1128
|
-
value: spokePositionManagers(request: $request) {
|
|
1129
|
-
...PaginatedSpokePositionManagerResult
|
|
1130
|
-
}
|
|
1131
|
-
}`,[Cr]);i(`query SpokeUserPositionManagers($request: SpokeUserPositionManagersRequest!) {
|
|
1132
|
-
value: spokeUserPositionManagers(request: $request) {
|
|
1133
|
-
...PaginatedSpokeUserPositionManagerResult
|
|
1134
|
-
}
|
|
1135
|
-
}`,[xr]);i(`query TokenSwapQuote($request: TokenSwapQuoteRequest!, $currency: Currency!) {
|
|
1136
|
-
value: tokenSwapQuote(request: $request) {
|
|
1137
|
-
...TokenSwapQuoteResult
|
|
1138
|
-
}
|
|
1139
|
-
}`,[Lr]);i(`query SwappableTokens($request: SwappableTokensRequest!) {
|
|
1140
|
-
value: swappableTokens(request: $request) {
|
|
1141
|
-
...Token
|
|
1142
|
-
}
|
|
1143
|
-
}`,[yr]);i(`query PrepareTokenSwap($request: PrepareTokenSwapRequest!) {
|
|
1144
|
-
value: prepareTokenSwap(request: $request) {
|
|
1145
|
-
...PrepareTokenSwapResult
|
|
1146
|
-
}
|
|
1147
|
-
}`,[Vr]);i(`query SwapStatus($request: SwapStatusRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1148
|
-
value: swapStatus(request: $request) {
|
|
1149
|
-
...SwapStatus
|
|
1150
|
-
}
|
|
1151
|
-
}`,[ft]);i(`mutation Swap($request: SwapRequest!) {
|
|
1152
|
-
value: swap(request: $request) {
|
|
1153
|
-
...SwapExecutionPlan
|
|
1154
|
-
}
|
|
1155
|
-
}`,[Mr]);i(`query PrepareSwapCancel($request: PrepareSwapCancelRequest!) {
|
|
1156
|
-
value: prepareSwapCancel(request: $request) {
|
|
1157
|
-
...PrepareSwapCancelResult
|
|
1158
|
-
}
|
|
1159
|
-
}`,[Jr]);i(`mutation CancelSwap($request: CancelSwapRequest!) {
|
|
1160
|
-
value: cancelSwap(request: $request) {
|
|
1161
|
-
...CancelSwapExecutionPlan
|
|
1162
|
-
}
|
|
1163
|
-
}`,[Zr]);i(`query UserSwaps($request: UserSwapsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1164
|
-
value: userSwaps(request: $request) {
|
|
1165
|
-
...PaginatedUserSwapsResult
|
|
1166
|
-
}
|
|
1167
|
-
}`,[Xr]);i(`query SupplySwapQuote($request: SupplySwapQuoteRequest!, $currency: Currency!) {
|
|
1168
|
-
value: supplySwapQuote(request: $request) {
|
|
1169
|
-
...SupplySwapQuoteResult
|
|
1170
|
-
}
|
|
1171
|
-
}`,[nn]);i(`query BorrowSwapQuote($request: BorrowSwapQuoteRequest!, $currency: Currency!) {
|
|
1172
|
-
value: borrowSwapQuote(request: $request) {
|
|
1173
|
-
...BorrowSwapQuoteResult
|
|
1174
|
-
}
|
|
1175
|
-
}`,[an]);i(`query RepayWithSupplyQuote($request: RepayWithSupplyQuoteRequest!, $currency: Currency!) {
|
|
1176
|
-
value: repayWithSupplyQuote(request: $request) {
|
|
1177
|
-
...RepayWithSupplyQuoteResult
|
|
1178
|
-
}
|
|
1179
|
-
}`,[on]);i(`query WithdrawSwapQuote($request: WithdrawSwapQuoteRequest!, $currency: Currency!) {
|
|
1180
|
-
value: withdrawSwapQuote(request: $request) {
|
|
1181
|
-
...WithdrawSwapQuoteResult
|
|
1182
|
-
}
|
|
1183
|
-
}`,[sn]);i(`query PreparePositionSwap($request: PreparePositionSwapRequest!) {
|
|
1184
|
-
value: preparePositionSwap(request: $request) {
|
|
1185
|
-
...PreparePositionSwapResult
|
|
1186
|
-
}
|
|
1187
|
-
}`,[un]);i(`query Borrow($request: BorrowRequest!) {
|
|
1188
|
-
value: borrow(request: $request) {
|
|
1189
|
-
...ExecutionPlan
|
|
1190
|
-
}
|
|
1191
|
-
}`,[ve]);i(`query Supply($request: SupplyRequest!) {
|
|
1192
|
-
value: supply(request: $request) {
|
|
1193
|
-
...ExecutionPlan
|
|
1194
|
-
}
|
|
1195
|
-
}`,[ve]);i(`query Repay($request: RepayRequest!) {
|
|
1196
|
-
value: repay(request: $request) {
|
|
1197
|
-
...ExecutionPlan
|
|
1198
|
-
}
|
|
1199
|
-
}`,[ve]);i(`query Withdraw($request: WithdrawRequest!) {
|
|
1200
|
-
value: withdraw(request: $request) {
|
|
1201
|
-
...ExecutionPlan
|
|
1202
|
-
}
|
|
1203
|
-
}`,[ve]);var qn=i(`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
|
-
}`,[F,pt,ie]);i(`query LiquidatePosition($request: LiquidatePositionRequest!) {
|
|
1215
|
-
value: liquidatePosition(request: $request) {
|
|
1216
|
-
...LiquidatePositionExecutionPlan
|
|
1217
|
-
}
|
|
1218
|
-
}`,[qn]);i(`query SetSpokeUserPositionManager($request: SetSpokeUserPositionManagerRequest!) {
|
|
1219
|
-
value: setSpokeUserPositionManager(request: $request) {
|
|
1220
|
-
...TransactionRequest
|
|
1221
|
-
}
|
|
1222
|
-
}`,[F]);i(`query SetUserSuppliesAsCollateral($request: SetUserSuppliesAsCollateralRequest!) {
|
|
1223
|
-
value: setUserSuppliesAsCollateral(request: $request) {
|
|
1224
|
-
...TransactionRequest
|
|
1225
|
-
}
|
|
1226
|
-
}`,[F]);i(`query RenounceSpokeUserPositionManager($request: RenounceSpokeUserPositionManagerRequest!) {
|
|
1227
|
-
value: renounceSpokeUserPositionManager(request: $request) {
|
|
1228
|
-
...TransactionRequest
|
|
1229
|
-
}
|
|
1230
|
-
}`,[F]);i(`query UpdateUserPositionConditions($request: UpdateUserPositionConditionsRequest!) {
|
|
1231
|
-
value: updateUserPositionConditions(request: $request) {
|
|
1232
|
-
...TransactionRequest
|
|
1233
|
-
}
|
|
1234
|
-
}`,[F]);var Tn=i(`fragment CollateralFactorVariation on CollateralFactorVariation {
|
|
1235
|
-
__typename
|
|
1236
|
-
reserveId
|
|
1237
|
-
token {
|
|
1238
|
-
...Erc20Token
|
|
1239
|
-
}
|
|
1240
|
-
current {
|
|
1241
|
-
...PercentNumber
|
|
1242
|
-
}
|
|
1243
|
-
after {
|
|
1244
|
-
...PercentNumber
|
|
1245
|
-
}
|
|
1246
|
-
}`,[V,g]),kn=i(`fragment LiquidationFeeVariation on LiquidationFeeVariation {
|
|
1247
|
-
__typename
|
|
1248
|
-
reserveId
|
|
1249
|
-
token {
|
|
1250
|
-
...Erc20Token
|
|
1251
|
-
}
|
|
1252
|
-
current {
|
|
1253
|
-
...PercentNumber
|
|
1254
|
-
}
|
|
1255
|
-
after {
|
|
1256
|
-
...PercentNumber
|
|
1257
|
-
}
|
|
1258
|
-
}`,[V,g]),_n=i(`fragment MaxLiquidationBonusVariation on MaxLiquidationBonusVariation {
|
|
1259
|
-
__typename
|
|
1260
|
-
reserveId
|
|
1261
|
-
token {
|
|
1262
|
-
...Erc20Token
|
|
1263
|
-
}
|
|
1264
|
-
current {
|
|
1265
|
-
...PercentNumber
|
|
1266
|
-
}
|
|
1267
|
-
after {
|
|
1268
|
-
...PercentNumber
|
|
1269
|
-
}
|
|
1270
|
-
}`,[V,g]),Cn=i(`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
|
-
}`,[Tn,kn,_n]),In=i(`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
|
-
}`,[Pr,vr,Sr,Cn]);i(`query Preview($request: PreviewRequest!, $currency: Currency! = USD) {
|
|
1309
|
-
value: preview(request: $request) {
|
|
1310
|
-
...PreviewUserPosition
|
|
1311
|
-
}
|
|
1312
|
-
}`,[In]);var At=i(`fragment PercentNumberChangeSnapshot on PercentNumberChangeSnapshot {
|
|
1313
|
-
__typename
|
|
1314
|
-
before {
|
|
1315
|
-
...PercentNumber
|
|
1316
|
-
}
|
|
1317
|
-
after {
|
|
1318
|
-
...PercentNumber
|
|
1319
|
-
}
|
|
1320
|
-
}`,[g]),xn=i(`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
|
-
}`,[N,T,Q,A]),Nn=i(`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
|
-
}`,[N,T,Q,A]),Fn=i(`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
|
-
}`,[N,T,Q,A]),Un=i(`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
|
-
}`,[N,T,Q,A]),$n=i(`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
|
-
}`,[N,T,Q,A]),Bn=i(`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
|
-
}`,[N,Q,A]),Dn=i(`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
|
-
}`,[N,Q,At,A]),Wn=i(`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
|
-
}`,[N,At,A]),Hn=i(`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
|
-
}`,[A,J]),On=i(`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
|
-
}`,[A,J]),Ln=i(`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
|
-
}`,[A,J]),Vn=i(`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
|
-
}`,[A,J]),Qn=i(`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
|
-
}`,[A,J]),Mn=i(`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
|
-
}`,[xn,Nn,Fn,Un,$n,Bn,Dn,Wn,Hn,On,Ln,Vn,Qn]),jn=i(`fragment PaginatedActivitiesResult on PaginatedActivitiesResult {
|
|
1594
|
-
__typename
|
|
1595
|
-
items {
|
|
1596
|
-
...ActivityItem
|
|
1597
|
-
}
|
|
1598
|
-
pageInfo {
|
|
1599
|
-
...PaginatedResultInfo
|
|
1600
|
-
}
|
|
1601
|
-
}`,[Mn,fe]);i(`query Activities($request: ActivitiesRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1602
|
-
value: activities(request: $request) {
|
|
1603
|
-
...PaginatedActivitiesResult
|
|
1604
|
-
}
|
|
1605
|
-
}`,[jn]);i(`query UserSupplies($request: UserSuppliesRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1606
|
-
value: userSupplies(request: $request) {
|
|
1607
|
-
...UserSupplyItem
|
|
1608
|
-
}
|
|
1609
|
-
}`,[cn]);i(`query UserBorrows($request: UserBorrowsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1610
|
-
value: userBorrows(request: $request) {
|
|
1611
|
-
...UserBorrowItem
|
|
1612
|
-
}
|
|
1613
|
-
}`,[ln]);i(`query UserSummary($request: UserSummaryRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1614
|
-
value: userSummary(request: $request) {
|
|
1615
|
-
...UserSummary
|
|
1616
|
-
}
|
|
1617
|
-
}`,[pn]);i(`query UserPositions($request: UserPositionsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1618
|
-
value: userPositions(request: $request) {
|
|
1619
|
-
...UserPosition
|
|
1620
|
-
}
|
|
1621
|
-
}`,[gt]);i(`query UserPosition($request: UserPositionRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1622
|
-
value: userPosition(request: $request) {
|
|
1623
|
-
...UserPosition
|
|
1624
|
-
}
|
|
1625
|
-
}`,[gt]);i(`query UserBalances($request: UserBalancesRequest!, $currency: Currency!) {
|
|
1626
|
-
value: userBalances(request: $request) {
|
|
1627
|
-
...UserBalance
|
|
1628
|
-
}
|
|
1629
|
-
}`,[dn]);i(`query UserSummaryHistory($request: UserSummaryHistoryRequest!, $currency: Currency!) {
|
|
1630
|
-
value: userSummaryHistory(request: $request) {
|
|
1631
|
-
...UserSummaryHistoryItem
|
|
1632
|
-
}
|
|
1633
|
-
}`,[hn]);i(`query UserRiskPremiumBreakdown($request: UserRiskPremiumBreakdownRequest!) {
|
|
1634
|
-
value: userRiskPremiumBreakdown(request: $request) {
|
|
1635
|
-
...UserRiskPremiumBreakdownItem
|
|
1636
|
-
}
|
|
1637
|
-
}`,[yt]);var Ee={currency:Ue.Usd,timeWindow:Fe.LastDay,requestPolicy:"cache-and-network",batch:true};function Et(e,t,{batch:r=Ee.batch,requestPolicy:n=Ee.requestPolicy}=Ee){return e.query(St,{request:t},{batch:r,requestPolicy:n})}function Gn(e){return typeof e=="object"&&e!==null&&"approvals"in e&&Array.isArray(e.approvals)}function Pt(e){return Gn(e)&&Ke(e.approvals)&&!!e.approvals[0].bySignature}function De(e){return ce(e)&&"code"in e&&"message"in e}function ea(e){return ce(e)&&"name"in e&&"message"in e&&"originalError"in e?De(e.originalError)&&"code"in e.originalError:true}function qt(e,t){return O(e.account,"Wallet account is required to sign typed data"),E.fromPromise(e.signTypedData({account:e.account,domain:t.domain,types:t.types,primaryType:t.primaryType,message:t.message}),r=>r instanceof viem.UserRejectedRequestError?re.from(r):z.from(r)).map(Ye)}function kt(e){switch(e.chainId){case _e(chains.mainnet.id):return chains.mainnet;case _e(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 no(e){return e.map(kt)}function ao(e,t,r){return E.fromPromise(t.getChainId(),n=>z.from(n)).andThen(n=>n===r.chainId?Z():Et(e,{chainId:r.chainId},{batch:false}).andThen(a=>(O(a,`Chain ${r.chainId} is not supported`),E.fromPromise(t.switchChain({id:r.chainId}),o=>z.from(o)).orElse(o=>(De(o.cause)?o.cause.code:ea(o.cause)?o.cause.data?.originalError?.code:void 0)===viem.SwitchChainError.code?E.fromPromise(t.addChain({chain:kt(a)}),u=>De(u)&&u.code===viem.UserRejectedRequestError.code?re.from(u):z.from(u)):o.asResultAsync()))))}function ta(e,t){return E.fromPromise(actions.estimateGas(e,{account:e.account,data:t.data,to:t.to,value:BigInt(t.value)}),r=>z.from(r)).map(r=>r*115n/100n)}function ra(e,t){return ta(e,t).andThen(r=>E.fromPromise(actions.sendTransaction(e,{account:e.account,data:t.data,to:t.to,value:BigInt(t.value),chain:e.chain,gas:r}),n=>{if(n instanceof viem.TransactionExecutionError){let a=n.walk(o=>o instanceof viem.UserRejectedRequestError);if(a)return re.from(a)}return z.from(n)})).map(ke)}function na(e){return e.account!==void 0}function aa(e,t){return O(na(e),"Wallet client with account is required"),ra(e,t)}function ia(e,t,r){let n=e?.blockExplorers?.default?.url,a=n&&new URL(`/tx/${t}`,n).toString();return Ze.new({txHash:t,request:r,link:a})}function oa(e,t,r){return E.fromPromise(actions.waitForTransactionReceipt(e,{hash:r,pollingInterval:100,retryCount:20,retryDelay:50}),n=>ze.from(n)).andThen(n=>{let a=ke(n.transactionHash);switch(n.status){case "reverted":return r!==a?U(re.from(`Transaction replaced by ${a}`)):U(ia(e.chain,a,t));case "success":return Z({txHash:a,operations:t.operations})}})}function oe(e,t){return aa(e,t).andThen(r=>oa(e,t,r))}function Tt(e,t){switch(t.__typename){case "TransactionRequest":return oe(e,t);case "Erc20ApprovalRequired":return t.approvals.reduce((r,n)=>r.andThen(()=>oe(e,n.byTransaction)),Z(void 0)).andThen(()=>oe(e,t.originalTransaction));case "PreContractActionRequired":return oe(e,t.transaction).andThen(()=>oe(e,t.originalTransaction));case "InsufficientBalanceError":return U(et.fromGqlNode(t))}}function io(e,t){return t?Tt(e,t):Tt.bind(null,e)}function sa(e,t){return t===void 0?qt.bind(null,e):qt(e,t)}function oo(e,t){return t().andThen(r=>{if(Pt(r)){let n=r.approvals[0].bySignature;return sa(e,n).map(a=>({deadline:n.message.deadline,value:a})).andThen(a=>t(a))}return Z(r)})}exports.ensureChain=ao;exports.permitWith=oo;exports.sendTransaction=aa;exports.sendWith=io;exports.signTypedDataWith=sa;exports.toViemChain=kt;exports.transactionError=ia;exports.viemChainsFrom=no;exports.waitForTransactionResult=oa;//# sourceMappingURL=viem.cjs.map
|
|
1
|
+
'use strict';var core=require('@aave/core'),types=require('@aave/types'),viem=require('viem'),actions=require('viem/actions'),chains=require('viem/chains'),graphql=require('@aave/graphql');var p={currency:graphql.Currency.Usd,timeWindow:graphql.TimeWindow.LastDay,requestPolicy:"cache-and-network",batch:true};function h(n,e,{batch:r=p.batch,requestPolicy:t=p.requestPolicy}=p){return n.query(graphql.ChainQuery,{request:e},{batch:r,requestPolicy:t})}function H(n){return typeof n=="object"&&n!==null&&"approvals"in n&&Array.isArray(n.approvals)}function E(n){return H(n)&&types.isOneEntryArray(n.approvals)&&!!n.approvals[0].bySignature}function m(n){return types.isObject(n)&&"code"in n&&"message"in n}function j(n){return types.isObject(n)&&"name"in n&&"message"in n&&"originalError"in n?m(n.originalError)&&"code"in n.originalError:true}function g(n,e){return types.invariant(n.account,"Wallet account is required to sign typed data"),types.ResultAsync.fromPromise(n.signTypedData({account:n.account,domain:e.domain,types:e.types,primaryType:e.primaryType,message:e.message}),r=>r instanceof viem.UserRejectedRequestError?core.CancelError.from(r):core.SigningError.from(r)).map(types.signatureFrom)}function W(n){switch(n.chainId){case types.chainId(chains.mainnet.id):return chains.mainnet;case types.chainId(chains.sepolia.id):return chains.sepolia}return viem.defineChain({id:n.chainId,name:n.name,nativeCurrency:{name:n.nativeInfo.name,symbol:n.nativeInfo.symbol,decimals:n.nativeInfo.decimals},rpcUrls:{default:{http:[n.rpcUrl]}},blockExplorers:{default:{name:`${n.name} Explorer`,url:n.explorerUrl}}})}function fn(n){return n.map(W)}function Tn(n,e,r){return types.ResultAsync.fromPromise(e.getChainId(),t=>core.SigningError.from(t)).andThen(t=>t===r.chainId?types.okAsync():h(n,{chainId:r.chainId},{batch:false}).andThen(a=>(types.invariant(a,`Chain ${r.chainId} is not supported`),types.ResultAsync.fromPromise(e.switchChain({id:r.chainId}),o=>core.SigningError.from(o)).orElse(o=>(m(o.cause)?o.cause.code:j(o.cause)?o.cause.data?.originalError?.code:void 0)===viem.SwitchChainError.code?types.ResultAsync.fromPromise(e.addChain({chain:W(a)}),u=>m(u)&&u.code===viem.UserRejectedRequestError.code?core.CancelError.from(u):core.SigningError.from(u)):o.asResultAsync()))))}function G(n,e){return types.ResultAsync.fromPromise(actions.estimateGas(n,{account:n.account,data:e.data,to:e.to,value:BigInt(e.value)}),r=>core.SigningError.from(r)).map(r=>r*115n/100n)}function K(n,e){return G(n,e).andThen(r=>types.ResultAsync.fromPromise(actions.sendTransaction(n,{account:n.account,data:e.data,to:e.to,value:BigInt(e.value),chain:n.chain,gas:r}),t=>{if(t instanceof viem.TransactionExecutionError){let a=t.walk(o=>o instanceof viem.UserRejectedRequestError);if(a)return core.CancelError.from(a)}return core.SigningError.from(t)})).map(types.txHash)}function L(n){return n.account!==void 0}function $(n,e){return types.invariant(L(n),"Wallet client with account is required"),K(n,e)}function N(n,e,r){let t=n?.blockExplorers?.default?.url,a=t&&new URL(`/tx/${e}`,t).toString();return core.TransactionError.new({txHash:e,request:r,link:a})}function Y(n,e,r){return types.ResultAsync.fromPromise(actions.waitForTransactionReceipt(n,{hash:r,pollingInterval:100,retryCount:20,retryDelay:50}),t=>core.UnexpectedError.from(t)).andThen(t=>{let a=types.txHash(t.transactionHash);switch(t.status){case "reverted":return r!==a?types.errAsync(core.CancelError.from(`Transaction replaced by ${a}`)):types.errAsync(N(n.chain,a,e));case "success":return types.okAsync({txHash:a,operations:e.operations})}})}function c(n,e){return $(n,e).andThen(r=>Y(n,e,r))}function A(n,e){switch(e.__typename){case "TransactionRequest":return c(n,e);case "Erc20ApprovalRequired":return e.approvals.reduce((r,t)=>r.andThen(()=>c(n,t.byTransaction)),types.okAsync(void 0)).andThen(()=>c(n,e.originalTransaction));case "PreContractActionRequired":return c(n,e.transaction).andThen(()=>c(n,e.originalTransaction));case "InsufficientBalanceError":return types.errAsync(core.ValidationError.fromGqlNode(e))}}function hn(n,e){return e?A(n,e):A.bind(null,n)}function z(n,e){return e===void 0?g.bind(null,n):g(n,e)}function En(n,e){return e().andThen(r=>{if(E(r)){let t=r.approvals[0].bySignature;return z(n,t).map(a=>({deadline:t.message.deadline,value:a})).andThen(a=>e(a))}return types.okAsync(r)})}exports.ensureChain=Tn;exports.permitWith=En;exports.sendTransaction=$;exports.sendWith=hn;exports.signTypedDataWith=z;exports.toViemChain=W;exports.transactionError=N;exports.viemChainsFrom=fn;exports.waitForTransactionResult=Y;//# sourceMappingURL=viem.cjs.map
|
|
1638
2
|
//# sourceMappingURL=viem.cjs.map
|