@argent/x-shared 1.36.0 → 1.37.0
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/{bips-zBtnMbia.mjs → bips-DKbEGvGl.mjs} +9 -9
- package/dist/{bips-CP71ZN9a.js → bips-DxN0hSiY.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +210 -208
- package/dist/simulation.js +1 -1
- package/dist/simulation.mjs +13 -13
- package/dist/swap.js +1 -1
- package/dist/swap.mjs +2 -2
- package/dist/tokens/service/implementation.d.ts +192 -12
- package/dist/tokens/service/types/backend.model.d.ts +7562 -555
- package/dist/tokens/service/types/defiPosition.model.d.ts +11 -11
- package/dist/tokens/service/types/defiPositionType.model.d.ts +1 -1
- package/dist/{transactionVersion-CaRQ5Df4.js → transactionVersion-C7p_qk9x.js} +1 -1
- package/dist/{transactionVersion-CACUj2ch.mjs → transactionVersion-Cjoucwcx.mjs} +7 -7
- package/dist/utils/schemas.d.ts +8 -0
- package/dist/webToken.model-5HUiR8ER.js +1 -0
- package/dist/{webToken.model-Cl4dvcmj.mjs → webToken.model-CpudLBp0.mjs} +646 -614
- package/package.json +1 -1
- package/dist/webToken.model-Dsd8Rd3e.js +0 -1
package/dist/simulation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./transactionVersion-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./transactionVersion-C7p_qk9x.js"),p=require("lodash-es"),d=require("./webToken.model-5HUiR8ER.js");require("starknet");require("zod");require("@scure/base");require("react");require("object-hash");require("swr");function l(e){return e.error?e.error:e.message&&e.code?`${e.code}: ${e.message}`:"Unknown error"}function g(e){if(!e)return;const s=e.transactions.flatMap(u=>n.isTransactionSimulationError(u)?u.simulationError:!1),t=s==null?void 0:s[s.length-1];if(!t)return;const i=l(t),r=t.message||t.error,c=n.getPrettyRpcError(r),o=c||t.label;return{message:c?r:i,label:o}}const f=e=>e.map(m),m=e=>{var i,r,c,o;if(n.isActivitySummary(e))return n.activitySummarySchema.parse(e);const s=!!e.sent;if(e.token.type!=="ERC20"){const a={asset:{type:"nft",tokenAddress:e.token.address,tokenId:e.tokenId?parseInt(e.tokenId):0,amount:e.value,collectionName:e.token.name,collectionPreviewImage:(i=e.token.imageUrls)==null?void 0:i.preview,nftName:(r=e.tokenIdDetails)==null?void 0:r.name,nftPreviewImage:(o=(c=e.tokenIdDetails)==null?void 0:c.imageUrls)==null?void 0:o.preview},sent:s};return n.activitySummarySchema.parse(a)}const t={asset:{type:"token",tokenAddress:e.token.address,amount:e.value,fiatAmount:{currency:"USD",currencyAmount:e.usdValue||"0"}},sent:s};return n.activitySummarySchema.parse(t)};function A(e){var i,r;const s=(r=(i=e.transactions)==null?void 0:i[0].reviewOfTransaction)==null?void 0:r.reviews;return s?s.map(c=>c.action):void 0}function k({simulateAndReview:e,...s}){var i,r;const t={type:n.NativeActivityTypeNative,...s};if(e&&!p.isEmpty(e.transactions)){const c=e.transactions[e.transactions.length-1],o=(i=c.simulation)==null?void 0:i.summary;if(o){const h=f(o);t.transferSummary=h}const a=(r=c.reviewOfTransaction)==null?void 0:r.targetedDapp;a&&(t.dapp=a);const u=A(e);u&&(t.actions=u)}return n.nativeActivitySchema.parse(t)}function v(e){const s=T(e),t=E(e);return s||t}const T=e=>{var o;if(!((o=e.actions)!=null&&o.length))return!1;const s=e.actions[0];if(s.name!=="ERC20_transfer")return!1;let t,i,r,c;return s.defaultProperties&&s.defaultProperties.forEach(a=>{a.type==="token_address"&&a.token.address===n.ETH_TOKEN_ADDRESS&&(i=!0),a.type==="calldata"&&(t=a.calldata[0])}),s.properties.length>1&&s.properties.forEach(a=>{a.type==="amount"&&a.label==="ERC20_transfer_amount"&&a.amount==="0"&&(r=!0),a.type==="address"&&a.label==="ERC20_transfer_recipient"&&d.isEqualAddress(a.address,t)&&(c=!0)}),i&&r&&c},E=e=>{var s,t;return!!("meta"in e&&(t=(s=e.meta)==null?void 0:s.title)!=null&&t.includes("On-chain rejection"))};function y(e,s=!1){var t,i;if(e.type===n.NativeActivityTypeNative){if(s&&((t=e.meta)!=null&&t.shortTitle))return e.meta.shortTitle;if((i=e.meta)!=null&&i.title)return e.meta.title}else{if(v(e))return"On-chain rejection";if(e.title)return e.title}return"Contract interaction"}function N(e){return y(e,!0)}function D(e){return e.map(i=>i.lastModified).sort().pop()}const O=e=>{var t,i;return!!((i=(t=e.details)==null?void 0:t.calls)==null?void 0:i.some(r=>{var c,o,a;return(o=(c=r==null?void 0:r.details)==null?void 0:c.function)!=null&&o.name?((a=r==null?void 0:r.details)==null?void 0:a.function.name)==="lock_and_delegate_by_sig":!1}))},S=e=>{var s;return e.type==="multicall"&&"calls"in e.details&&((s=e.details.calls)==null?void 0:s.some(t=>{var i;return((i=t==null?void 0:t.details)==null?void 0:i.type)==="deploy"&&d.isEqualAddress((t==null?void 0:t.details.contractAddress)||"",e.wallet)}))};function w(e){const s=M(e),t=R(e);return s||t}const M=e=>{var t;if(!((t=e.actions)!=null&&t.length))return!1;const s=e.actions[0];if(s.name!=="account_upgrade")return!1;s.defaultProperties&&s.defaultProperties.forEach(i=>{if(i.type==="calldata"&&i.entrypoint==="upgrade")return!0})},R=e=>{var s,t;return!!("meta"in e&&(t=(s=e.meta)==null?void 0:s.title)!=null&&t.includes("Upgrade account"))};function _({activities:e,accountAddressesOnNetwork:s}){const t={};return e.forEach(i=>{const r=i.wallet,c=i.type==="deploy"?i.type:i.details.type==="security"?i.details.action:void 0;i.group==="security"&&d.includesAddress(r,s)&&c&&(t[c]=t[c]||[],d.includesAddress(r,t[c])||(t[c]=d.ensureArray(t[c]).concat(r))),S(i)&&(t.deploy=d.ensureArray(t.deploy).concat(r))}),t}function j({activities:e,accountAddressesOnNetwork:s,tokenAddressesOnNetwork:t}){const i={tokenActivity:{accountAddresses:[],tokenAddresses:[],newTokenAddresses:[]},nftActivity:{accountAddresses:[],tokenAddresses:[]}};return e.forEach(r=>{if(r.group==="finance"&&r.relatedAddresses){const c=r.transfers.some(o=>o.asset.type==="token");r.relatedAddresses.forEach(({type:o,address:a})=>{o==="token"?d.includesAddress(a,t)&&(d.includesAddress(a,i.tokenActivity.tokenAddresses)||i.tokenActivity.tokenAddresses.push(a)):o==="wallet"&&d.includesAddress(a,s)&&(c?d.includesAddress(a,i.tokenActivity.accountAddresses)||i.tokenActivity.accountAddresses.push(a):d.includesAddress(a,i.nftActivity.accountAddresses)||i.nftActivity.accountAddresses.push(a))}),r.transfers.forEach(o=>{if(o.asset.type==="token"){const a=o.asset.tokenAddress;!d.includesAddress(a,t)&&!d.includesAddress(a,i.tokenActivity.newTokenAddresses)&&i.tokenActivity.newTokenAddresses.push(a)}else if(o.asset.type==="nft"){const a=o.asset.tokenAddress;d.includesAddress(a,i.nftActivity.tokenAddresses)||i.nftActivity.tokenAddresses.push(a)}})}}),i}const q=e=>{if(e.length===0)return null;const s=["critical","high","caution","info"];return e.reduce((t,i)=>{const r=s.indexOf(i.severity),c=s.indexOf(t.severity);return r<c?i:t},e[0])};exports.NativeActivityStatusCancelled=n.NativeActivityStatusCancelled;exports.NativeActivityStatusQueued=n.NativeActivityStatusQueued;exports.NativeActivityStatusRejected=n.NativeActivityStatusRejected;exports.NativeActivityTypeNative=n.NativeActivityTypeNative;exports.actionSchema=n.actionSchema;exports.activitiesSchema=n.activitiesSchema;exports.activityDappSchema=n.activityDappSchema;exports.activityDetailsSchema=n.activityDetailsSchema;exports.activityResponseSchema=n.activityResponseSchema;exports.activitySchema=n.activitySchema;exports.activitySummarySchema=n.activitySummarySchema;exports.activityTransferSchema=n.activityTransferSchema;exports.assessmentSchema=n.assessmentSchema;exports.enrichedSimulateAndReviewSchema=n.enrichedSimulateAndReviewSchema;exports.estimatedFeeSchema=n.estimatedFeeSchema;exports.estimatedFeesSchema=n.estimatedFeesSchema;exports.feeEstimationSchema=n.feeEstimationSchema;exports.feeSchema=n.feeSchema;exports.isActivityDetailsAction=n.isActivityDetailsAction;exports.isActivitySummary=n.isActivitySummary;exports.isNftActivitySummary=n.isNftActivitySummary;exports.isNotTransactionSimulationError=n.isNotTransactionSimulationError;exports.isTokenActivitySummary=n.isTokenActivitySummary;exports.isTransactionSimulationError=n.isTransactionSimulationError;exports.nativeActivityMetaSchema=n.nativeActivityMetaSchema;exports.nativeActivitySchema=n.nativeActivitySchema;exports.propertySchema=n.propertySchema;exports.reasonsSchema=n.reasonsSchema;exports.reviewSchema=n.reviewSchema;exports.severitySchema=n.severitySchema;exports.simulateAndReviewSchema=n.simulateAndReviewSchema;exports.targetedDappSchema=n.targetedDappSchema;exports.warningDetailsSchema=n.warningDetailsSchema;exports.warningSchema=n.warningSchema;exports.createNativeActivity=k;exports.getAnyActivityShortTitle=N;exports.getAnyActivityTitle=y;exports.getErrorMessageAndLabelFromSimulation=g;exports.getHighestSeverity=q;exports.getMessageFromSimulationError=l;exports.getOverallLastModified=D;exports.hasDelegationActivity=O;exports.isMulticallWithDeploymentActivity=S;exports.isRejectOnChainActivity=v;exports.isUpgradeActivity=w;exports.normalizeActions=A;exports.normalizeActivitySummary=m;exports.normalizeActivitySummaryCollection=f;exports.parseAccountActivities=_;exports.parseFinanceActivities=j;
|
package/dist/simulation.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as m, K as h, O as v, P as f, Q as l, U as
|
|
2
|
-
import { a0 as J, a1 as I, $ as ee, aa as te, a2 as se, X as ne, W as ae, a3 as ie, Z as re, V as oe, ab as ce, ag as de, a7 as fe, a8 as ue, f as le, Y as pe, a4 as Ae, a6 as me, ah as he, a5 as ve, _ as
|
|
3
|
-
import { isEmpty as
|
|
4
|
-
import { h as p,
|
|
1
|
+
import { i as m, K as h, O as v, P as f, Q as l, U as S, E as g } from "./transactionVersion-Cjoucwcx.mjs";
|
|
2
|
+
import { a0 as J, a1 as I, $ as ee, aa as te, a2 as se, X as ne, W as ae, a3 as ie, Z as re, V as oe, ab as ce, ag as de, a7 as fe, a8 as ue, f as le, Y as pe, a4 as Ae, a6 as me, ah as he, a5 as ve, _ as Se, a9 as ge, aj as ye, ae as ke, ai as Te, s as Ee, af as Oe, ac as we, ad as De } from "./transactionVersion-Cjoucwcx.mjs";
|
|
3
|
+
import { isEmpty as y } from "lodash-es";
|
|
4
|
+
import { h as p, S as c, G as u } from "./webToken.model-CpudLBp0.mjs";
|
|
5
5
|
import "starknet";
|
|
6
6
|
import "zod";
|
|
7
7
|
import "@scure/base";
|
|
@@ -69,7 +69,7 @@ function $({ simulateAndReview: e, ...n }) {
|
|
|
69
69
|
type: l,
|
|
70
70
|
...n
|
|
71
71
|
};
|
|
72
|
-
if (e && !
|
|
72
|
+
if (e && !y(e.transactions)) {
|
|
73
73
|
const r = e.transactions[e.transactions.length - 1], o = (s = r.simulation) == null ? void 0 : s.summary;
|
|
74
74
|
if (o) {
|
|
75
75
|
const A = T(o);
|
|
@@ -80,7 +80,7 @@ function $({ simulateAndReview: e, ...n }) {
|
|
|
80
80
|
const d = O(e);
|
|
81
81
|
d && (t.actions = d);
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return S.parse(t);
|
|
84
84
|
}
|
|
85
85
|
function w(e) {
|
|
86
86
|
const n = D(e), t = M(e);
|
|
@@ -95,7 +95,7 @@ const D = (e) => {
|
|
|
95
95
|
return !1;
|
|
96
96
|
let t, s, i, r;
|
|
97
97
|
return n.defaultProperties && n.defaultProperties.forEach((a) => {
|
|
98
|
-
a.type === "token_address" && a.token.address ===
|
|
98
|
+
a.type === "token_address" && a.token.address === g && (s = !0), a.type === "calldata" && (t = a.calldata[0]);
|
|
99
99
|
}), n.properties.length > 1 && n.properties.forEach((a) => {
|
|
100
100
|
a.type === "amount" && a.label === "ERC20_transfer_amount" && a.amount === "0" && (i = !0), a.type === "address" && a.label === "ERC20_transfer_recipient" && p(a.address, t) && (r = !0);
|
|
101
101
|
}), s && i && r;
|
|
@@ -192,7 +192,7 @@ function q({ activities: e, accountAddressesOnNetwork: n, tokenAddressesOnNetwor
|
|
|
192
192
|
}
|
|
193
193
|
}), s;
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const G = (e) => {
|
|
196
196
|
if (e.length === 0)
|
|
197
197
|
return null;
|
|
198
198
|
const n = ["critical", "high", "caution", "info"];
|
|
@@ -224,7 +224,7 @@ export {
|
|
|
224
224
|
H as getAnyActivityShortTitle,
|
|
225
225
|
R as getAnyActivityTitle,
|
|
226
226
|
W as getErrorMessageAndLabelFromSimulation,
|
|
227
|
-
|
|
227
|
+
G as getHighestSeverity,
|
|
228
228
|
k as getMessageFromSimulationError,
|
|
229
229
|
K as getOverallLastModified,
|
|
230
230
|
Q as hasDelegationActivity,
|
|
@@ -237,15 +237,15 @@ export {
|
|
|
237
237
|
ve as isTokenActivitySummary,
|
|
238
238
|
m as isTransactionSimulationError,
|
|
239
239
|
V as isUpgradeActivity,
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
Se as nativeActivityMetaSchema,
|
|
241
|
+
S as nativeActivitySchema,
|
|
242
242
|
O as normalizeActions,
|
|
243
243
|
E as normalizeActivitySummary,
|
|
244
244
|
T as normalizeActivitySummaryCollection,
|
|
245
245
|
Z as parseAccountActivities,
|
|
246
246
|
q as parseFinanceActivities,
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
ge as propertySchema,
|
|
248
|
+
ye as reasonsSchema,
|
|
249
249
|
ke as reviewSchema,
|
|
250
250
|
Te as severitySchema,
|
|
251
251
|
Ee as simulateAndReviewSchema,
|
package/dist/swap.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./webToken.model-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./webToken.model-5HUiR8ER.js"),e=require("zod");require("starknet");require("lodash-es");require("@scure/base");const s=require("./bips-DxN0hSiY.js");var y;(function(r){r.NO_SWAP_URL="Swap base url not provided",r.INVALID_QUOTE_RESPONSE="Invalid quote response",r.NO_NETWORK_FOR_SWAP="Network for swap not found",r.INVALID_SWAP_TOKENS="Invalid swap tokens",r.INVALID_SWAP_ORDER_RESPONSE="Invalid swap order response"})(y||(y={}));class p extends o.BaseError{constructor(n){super(n,y),this.name="SwapError"}}const m=e.z.object({quoteId:e.z.string()}),d=e.z.lazy(()=>e.z.object({name:e.z.string(),percent:e.z.number(),sellToken:o.addressSchema,buyToken:o.addressSchema,routes:e.z.array(d)})),S=e.z.object({sellToken:o.addressSchema,sellAmount:e.z.string(),sellAmountInCurrency:e.z.string(),buyToken:o.addressSchema,buyAmount:e.z.string(),buyAmountInCurrency:e.z.string(),expiresAt:e.z.number(),expiresIn:e.z.number(),dexCount:e.z.number(),routes:e.z.array(d),providerName:e.z.string(),providerFee:e.z.string(),providerFeeInCurrency:e.z.string(),providerFeePercentage:e.z.number(),argentFee:e.z.string(),argentFeeInCurrency:e.z.string(),argentFeePercentage:e.z.number(),feeToken:o.addressSchema,data:m}),T=e.z.object({chain:e.z.literal("starknet"),sellToken:o.addressSchema,buyToken:o.addressSchema,sellAmount:e.z.string(),buyAmount:e.z.string(),accountAddress:o.addressSchema,slippage:e.z.number().transform(r=>r.toString()),data:m}),A=e.z.object({calls:e.z.array(o.callSchema)});exports.TradeType=void 0;(function(r){r.EXACT_PAY="EXACT_PAY",r.EXACT_RECEIVE="EXACT_RECEIVE"})(exports.TradeType||(exports.TradeType={}));const g=e.z.nativeEnum(exports.TradeType),h=e.z.object({payToken:o.webTokenSchema,receiveToken:o.webTokenSchema,tradeType:g.default(exports.TradeType.EXACT_PAY),payAmount:e.z.string(),receiveAmount:e.z.string(),payAmountInCurrency:e.z.string(),receiveAmountInCurrency:e.z.string(),totalFee:e.z.string(),totalFeeInCurrency:e.z.string().optional(),totalFeePercentage:e.z.number(),expiresAt:e.z.number(),expiresIn:e.z.number(),route:d,data:m});function I(r){const n=BigInt(r.providerFee)+BigInt(r.argentFee),t=s.add(s.parseCurrency(r.argentFeeInCurrency),s.parseCurrency(r.providerFeeInCurrency)),a=s.formatCurrency(t.value),c=r.argentFeePercentage+r.providerFeePercentage;return{totalFee:n.toString(),totalFeePercentage:c,totalFeeInCurrency:a}}function z(r,n){const t=s.bipsToPercent(n),a={value:BigInt(r.payAmount),decimals:r.payToken.decimals};if(r.tradeType===exports.TradeType.EXACT_PAY||t.value<=0n)return a;const c=s.add(s.ONE,t);return s.mul(a,c)}function w(r,n){const t=s.bipsToPercent(n),a={value:BigInt(r.receiveAmount),decimals:r.receiveToken.decimals};if(r.tradeType===exports.TradeType.EXACT_RECEIVE)return a;const c=s.add(s.ONE,t);return s.div(a,c)}class b{constructor(n,t){if(this.httpService=n,!t)throw new p({code:"NO_SWAP_URL"});this.swapQuoteUrl=o.urlJoin(t,"/quote"),this.swapOrderUrl=o.urlJoin(t,"/order")}async getSwapQuoteForPay(n,t,a,c,u="USD"){const i=s.urlWithQuery(this.swapQuoteUrl,{accountAddress:c,currency:u,chain:"starknet",sellToken:n,buyToken:t,sellAmount:a});try{const l=await this.httpService.get(i);return await S.parseAsync(l)}catch(l){throw console.error(l),new p({code:"INVALID_QUOTE_RESPONSE"})}}async getSwapTradeFromQuote(n,t,a){if(!t||!a)throw new p({code:"INVALID_SWAP_TOKENS"});const{totalFee:c,totalFeeInCurrency:u,totalFeePercentage:i}=I(n);return h.parse({payToken:t,receiveToken:a,payAmount:n.sellAmount,receiveAmount:n.buyAmount,payAmountInCurrency:n.sellAmountInCurrency,receiveAmountInCurrency:n.buyAmountInCurrency,totalFee:c,totalFeeInCurrency:u,totalFeePercentage:i,expiresAt:n.expiresAt,expiresIn:n.expiresIn,route:n.routes[0],data:n.data})}async getSwapOrderFromTrade(n,t,a){const c=T.parse({chain:"starknet",sellToken:t.payToken.address,buyToken:t.receiveToken.address,sellAmount:t.payAmount,buyAmount:t.receiveAmount,accountAddress:n,slippage:a/1e4,data:t.data});try{const u=await this.httpService.post(this.swapOrderUrl,{body:JSON.stringify(c),headers:{"Content-Type":"application/json"}});return await A.parseAsync(u)}catch(u){throw console.error(u),new p({code:"INVALID_SWAP_ORDER_RESPONSE"})}}}exports.SharedSwapService=b;exports.SwapDataSchema=m;exports.SwapOrderRequestSchema=T;exports.SwapOrderResponseSchema=A;exports.SwapQuoteResponseSchema=S;exports.SwapQuoteRouteSchema=d;exports.TradeSchema=h;exports.TradeTypeSchema=g;exports.calculateTotalFee=I;exports.maximumAmountInForTrade=z;exports.minimumAmountOutFromTrade=w;
|
package/dist/swap.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a8 as b, t as s, c as w, ar as g, u as I } from "./webToken.model-CpudLBp0.mjs";
|
|
2
2
|
import { z as e } from "zod";
|
|
3
3
|
import "starknet";
|
|
4
4
|
import "lodash-es";
|
|
5
5
|
import "@scure/base";
|
|
6
|
-
import { c as d, p as T, f as v, x as S, O as h, n as C, d as F, w as E } from "./bips-
|
|
6
|
+
import { c as d, p as T, f as v, x as S, O as h, n as C, d as F, w as E } from "./bips-DKbEGvGl.mjs";
|
|
7
7
|
var l;
|
|
8
8
|
(function(r) {
|
|
9
9
|
r.NO_SWAP_URL = "Swap base url not provided", r.INVALID_QUOTE_RESPONSE = "Invalid quote response", r.NO_NETWORK_FOR_SWAP = "Network for swap not found", r.INVALID_SWAP_TOKENS = "Invalid swap tokens", r.INVALID_SWAP_ORDER_RESPONSE = "Invalid swap order response";
|
|
@@ -28,11 +28,112 @@ export declare class TokenServiceWeb implements ITokenServiceWeb {
|
|
|
28
28
|
fetchAddressTokenBalancesFromBackend(address: string, network: ArgentBackendNetworkId, opts?: retry.Options): Promise<WebBaseTokenWithBalance[]>;
|
|
29
29
|
fetchDefiDecomposition(address: Address): Promise<{
|
|
30
30
|
dappId: string;
|
|
31
|
-
products: {
|
|
32
|
-
name:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
products: import('zod').objectOutputType<{
|
|
32
|
+
name: import('zod').ZodString;
|
|
33
|
+
manageUrl: import('zod').ZodString;
|
|
34
|
+
type: import('zod').ZodUnion<[import('zod').ZodLiteral<"concentratedLiquidityPosition">, import('zod').ZodLiteral<"collateralizedDebtPosition">, import('zod').ZodLiteral<"staking">]>;
|
|
35
|
+
groups: import('zod').ZodOptional<import('zod').ZodRecord<import('zod').ZodString, import('zod').ZodObject<{
|
|
36
|
+
name: import('zod').ZodOptional<import('zod').ZodString>;
|
|
37
|
+
healthRatio: import('zod').ZodOptional<import('zod').ZodString>;
|
|
38
|
+
}, "strip", import('zod').ZodTypeAny, {
|
|
39
|
+
name?: string | undefined;
|
|
40
|
+
healthRatio?: string | undefined;
|
|
41
|
+
}, {
|
|
42
|
+
name?: string | undefined;
|
|
43
|
+
healthRatio?: string | undefined;
|
|
44
|
+
}>>>;
|
|
45
|
+
positions: import('zod').ZodArray<import('zod').ZodUnion<[import('zod').ZodUnion<[import('zod').ZodObject<import("zod").objectUtil.extendShape<{
|
|
46
|
+
tokenAddress: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodPipeline<import('zod').ZodString, import('zod').ZodEffects<import('zod').ZodString, string, string>>, `0x${string}`, string>>;
|
|
47
|
+
totalBalances: import('zod').ZodRecord<import('zod').ZodString, import('zod').ZodString>;
|
|
48
|
+
}, {
|
|
49
|
+
tokenId: import('zod').ZodString;
|
|
50
|
+
data: import('zod').ZodObject<{
|
|
51
|
+
poolFeePercentage: import('zod').ZodString;
|
|
52
|
+
tickSpacingPercentage: import('zod').ZodOptional<import('zod').ZodString>;
|
|
53
|
+
token0: import('zod').ZodObject<{
|
|
54
|
+
tokenAddress: import('zod').ZodEffects<import('zod').ZodString, `0x${string}`, string>;
|
|
55
|
+
principal: import('zod').ZodString;
|
|
56
|
+
accruedFees: import('zod').ZodString;
|
|
57
|
+
minPrice: import('zod').ZodString;
|
|
58
|
+
maxPrice: import('zod').ZodString;
|
|
59
|
+
currentPrice: import('zod').ZodString;
|
|
60
|
+
}, "strip", import('zod').ZodTypeAny, {
|
|
61
|
+
tokenAddress: `0x${string}`;
|
|
62
|
+
principal: string;
|
|
63
|
+
accruedFees: string;
|
|
64
|
+
minPrice: string;
|
|
65
|
+
maxPrice: string;
|
|
66
|
+
currentPrice: string;
|
|
67
|
+
}, {
|
|
68
|
+
tokenAddress: string;
|
|
69
|
+
principal: string;
|
|
70
|
+
accruedFees: string;
|
|
71
|
+
minPrice: string;
|
|
72
|
+
maxPrice: string;
|
|
73
|
+
currentPrice: string;
|
|
74
|
+
}>;
|
|
75
|
+
token1: import('zod').ZodObject<{
|
|
76
|
+
tokenAddress: import('zod').ZodEffects<import('zod').ZodString, `0x${string}`, string>;
|
|
77
|
+
principal: import('zod').ZodString;
|
|
78
|
+
accruedFees: import('zod').ZodString;
|
|
79
|
+
minPrice: import('zod').ZodString;
|
|
80
|
+
maxPrice: import('zod').ZodString;
|
|
81
|
+
currentPrice: import('zod').ZodString;
|
|
82
|
+
}, "strip", import('zod').ZodTypeAny, {
|
|
83
|
+
tokenAddress: `0x${string}`;
|
|
84
|
+
principal: string;
|
|
85
|
+
accruedFees: string;
|
|
86
|
+
minPrice: string;
|
|
87
|
+
maxPrice: string;
|
|
88
|
+
currentPrice: string;
|
|
89
|
+
}, {
|
|
90
|
+
tokenAddress: string;
|
|
91
|
+
principal: string;
|
|
92
|
+
accruedFees: string;
|
|
93
|
+
minPrice: string;
|
|
94
|
+
maxPrice: string;
|
|
95
|
+
currentPrice: string;
|
|
96
|
+
}>;
|
|
97
|
+
}, "strip", import('zod').ZodTypeAny, {
|
|
98
|
+
poolFeePercentage: string;
|
|
99
|
+
token0: {
|
|
100
|
+
tokenAddress: `0x${string}`;
|
|
101
|
+
principal: string;
|
|
102
|
+
accruedFees: string;
|
|
103
|
+
minPrice: string;
|
|
104
|
+
maxPrice: string;
|
|
105
|
+
currentPrice: string;
|
|
106
|
+
};
|
|
107
|
+
token1: {
|
|
108
|
+
tokenAddress: `0x${string}`;
|
|
109
|
+
principal: string;
|
|
110
|
+
accruedFees: string;
|
|
111
|
+
minPrice: string;
|
|
112
|
+
maxPrice: string;
|
|
113
|
+
currentPrice: string;
|
|
114
|
+
};
|
|
115
|
+
tickSpacingPercentage?: string | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
poolFeePercentage: string;
|
|
118
|
+
token0: {
|
|
119
|
+
tokenAddress: string;
|
|
120
|
+
principal: string;
|
|
121
|
+
accruedFees: string;
|
|
122
|
+
minPrice: string;
|
|
123
|
+
maxPrice: string;
|
|
124
|
+
currentPrice: string;
|
|
125
|
+
};
|
|
126
|
+
token1: {
|
|
127
|
+
tokenAddress: string;
|
|
128
|
+
principal: string;
|
|
129
|
+
accruedFees: string;
|
|
130
|
+
minPrice: string;
|
|
131
|
+
maxPrice: string;
|
|
132
|
+
currentPrice: string;
|
|
133
|
+
};
|
|
134
|
+
tickSpacingPercentage?: string | undefined;
|
|
135
|
+
}>;
|
|
136
|
+
}>, "strip", import('zod').ZodTypeAny, {
|
|
36
137
|
data: {
|
|
37
138
|
poolFeePercentage: string;
|
|
38
139
|
token0: {
|
|
@@ -56,7 +157,54 @@ export declare class TokenServiceWeb implements ITokenServiceWeb {
|
|
|
56
157
|
totalBalances: Record<string, string>;
|
|
57
158
|
tokenId: string;
|
|
58
159
|
tokenAddress?: `0x${string}` | undefined;
|
|
59
|
-
}
|
|
160
|
+
}, {
|
|
161
|
+
data: {
|
|
162
|
+
poolFeePercentage: string;
|
|
163
|
+
token0: {
|
|
164
|
+
tokenAddress: string;
|
|
165
|
+
principal: string;
|
|
166
|
+
accruedFees: string;
|
|
167
|
+
minPrice: string;
|
|
168
|
+
maxPrice: string;
|
|
169
|
+
currentPrice: string;
|
|
170
|
+
};
|
|
171
|
+
token1: {
|
|
172
|
+
tokenAddress: string;
|
|
173
|
+
principal: string;
|
|
174
|
+
accruedFees: string;
|
|
175
|
+
minPrice: string;
|
|
176
|
+
maxPrice: string;
|
|
177
|
+
currentPrice: string;
|
|
178
|
+
};
|
|
179
|
+
tickSpacingPercentage?: string | undefined;
|
|
180
|
+
};
|
|
181
|
+
totalBalances: Record<string, string>;
|
|
182
|
+
tokenId: string;
|
|
183
|
+
tokenAddress?: string | undefined;
|
|
184
|
+
}>, import('zod').ZodObject<import("zod").objectUtil.extendShape<{
|
|
185
|
+
tokenAddress: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodPipeline<import('zod').ZodString, import('zod').ZodEffects<import('zod').ZodString, string, string>>, `0x${string}`, string>>;
|
|
186
|
+
totalBalances: import('zod').ZodRecord<import('zod').ZodString, import('zod').ZodString>;
|
|
187
|
+
}, {
|
|
188
|
+
data: import('zod').ZodObject<{
|
|
189
|
+
apy: import('zod').ZodOptional<import('zod').ZodString>;
|
|
190
|
+
group: import('zod').ZodOptional<import('zod').ZodNumber>;
|
|
191
|
+
collateral: import('zod').ZodBoolean;
|
|
192
|
+
debt: import('zod').ZodBoolean;
|
|
193
|
+
lending: import('zod').ZodBoolean;
|
|
194
|
+
}, "strip", import('zod').ZodTypeAny, {
|
|
195
|
+
collateral: boolean;
|
|
196
|
+
debt: boolean;
|
|
197
|
+
lending: boolean;
|
|
198
|
+
apy?: string | undefined;
|
|
199
|
+
group?: number | undefined;
|
|
200
|
+
}, {
|
|
201
|
+
collateral: boolean;
|
|
202
|
+
debt: boolean;
|
|
203
|
+
lending: boolean;
|
|
204
|
+
apy?: string | undefined;
|
|
205
|
+
group?: number | undefined;
|
|
206
|
+
}>;
|
|
207
|
+
}>, "strip", import('zod').ZodTypeAny, {
|
|
60
208
|
data: {
|
|
61
209
|
collateral: boolean;
|
|
62
210
|
debt: boolean;
|
|
@@ -66,11 +214,43 @@ export declare class TokenServiceWeb implements ITokenServiceWeb {
|
|
|
66
214
|
};
|
|
67
215
|
totalBalances: Record<string, string>;
|
|
68
216
|
tokenAddress?: `0x${string}` | undefined;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
217
|
+
}, {
|
|
218
|
+
data: {
|
|
219
|
+
collateral: boolean;
|
|
220
|
+
debt: boolean;
|
|
221
|
+
lending: boolean;
|
|
222
|
+
apy?: string | undefined;
|
|
223
|
+
group?: number | undefined;
|
|
224
|
+
};
|
|
225
|
+
totalBalances: Record<string, string>;
|
|
226
|
+
tokenAddress?: string | undefined;
|
|
227
|
+
}>]>, import('zod').ZodObject<import("zod").objectUtil.extendShape<{
|
|
228
|
+
tokenAddress: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodPipeline<import('zod').ZodString, import('zod').ZodEffects<import('zod').ZodString, string, string>>, `0x${string}`, string>>;
|
|
229
|
+
totalBalances: import('zod').ZodRecord<import('zod').ZodString, import('zod').ZodString>;
|
|
230
|
+
}, {
|
|
231
|
+
data: import('zod').ZodObject<{
|
|
232
|
+
apy: import('zod').ZodString;
|
|
233
|
+
}, "strip", import('zod').ZodTypeAny, {
|
|
234
|
+
apy: string;
|
|
235
|
+
}, {
|
|
236
|
+
apy: string;
|
|
237
|
+
}>;
|
|
238
|
+
investmentId: import('zod').ZodOptional<import('zod').ZodString>;
|
|
239
|
+
}>, "strip", import('zod').ZodTypeAny, {
|
|
240
|
+
data: {
|
|
241
|
+
apy: string;
|
|
242
|
+
};
|
|
243
|
+
totalBalances: Record<string, string>;
|
|
244
|
+
tokenAddress?: `0x${string}` | undefined;
|
|
245
|
+
investmentId?: string | undefined;
|
|
246
|
+
}, {
|
|
247
|
+
data: {
|
|
248
|
+
apy: string;
|
|
249
|
+
};
|
|
250
|
+
totalBalances: Record<string, string>;
|
|
251
|
+
tokenAddress?: string | undefined;
|
|
252
|
+
investmentId?: string | undefined;
|
|
253
|
+
}>]>, "many">;
|
|
254
|
+
}, import('zod').ZodTypeAny, "passthrough">[];
|
|
75
255
|
}[]>;
|
|
76
256
|
}
|