@lifi/perps-types 4.2.0 → 5.0.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/cjs/asset.d.ts +0 -9
- package/dist/cjs/asset.d.ts.map +1 -1
- package/dist/cjs/providers.d.ts +1 -2
- package/dist/cjs/providers.d.ts.map +1 -1
- package/dist/esm/asset.d.ts +0 -36
- package/dist/esm/asset.d.ts.map +1 -1
- package/dist/esm/providers.d.ts +1 -12
- package/dist/esm/providers.d.ts.map +1 -1
- package/dist/types/asset.d.ts +0 -36
- package/dist/types/asset.d.ts.map +1 -1
- package/dist/types/providers.d.ts +1 -12
- package/dist/types/providers.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/asset.ts +0 -38
- package/src/providers.ts +1 -12
package/dist/cjs/asset.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Address } from './primitives.js';
|
|
2
1
|
export interface Asset {
|
|
3
2
|
providerId: string;
|
|
4
3
|
id: string;
|
|
@@ -8,14 +7,6 @@ export interface Asset {
|
|
|
8
7
|
tags?: string[];
|
|
9
8
|
aliases?: string[];
|
|
10
9
|
}
|
|
11
|
-
export interface DepositAsset {
|
|
12
|
-
chainId: number;
|
|
13
|
-
address: Address;
|
|
14
|
-
decimals: number;
|
|
15
|
-
displaySymbol: string;
|
|
16
|
-
logoURI: string;
|
|
17
|
-
displayName?: string;
|
|
18
|
-
}
|
|
19
10
|
export interface AssetsResponse {
|
|
20
11
|
assets: Asset[];
|
|
21
12
|
}
|
package/dist/cjs/asset.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../src/asset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../src/asset.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,KAAK;IACpB,UAAU,EAAE,MAAM,CAAA;IAQlB,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IAEf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB;AAGD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB"}
|
package/dist/cjs/providers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Asset
|
|
1
|
+
import type { Asset } from './asset.js';
|
|
2
2
|
import type { ActionType, PerpsSigner, SigningMethod } from './enums.js';
|
|
3
3
|
import type { OhlcvInterval } from './market.js';
|
|
4
4
|
export interface ParamOption {
|
|
@@ -49,7 +49,6 @@ export interface Provider {
|
|
|
49
49
|
funding?: ProviderFunding;
|
|
50
50
|
chainId?: number;
|
|
51
51
|
minDepositUsd?: number;
|
|
52
|
-
depositAssets?: DepositAsset[];
|
|
53
52
|
minOrderValueUsd?: number;
|
|
54
53
|
minReduceOrderValueUsd?: number;
|
|
55
54
|
minWithdrawalUsd?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAGhD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAOD,MAAM,WAAW,K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E,eAAe,CAAA;IAKzB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,aAAa,CAAC,EAAE,MAAM,CAAA;IAKtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAMzB,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAE/B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAKzB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,SAAS,CAAC,EAAE,MAAM,CAAA;IAMlB,kBAAkB,EAAE,aAAa,EAAE,CAAA;CACpC;AAGD,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,QAAQ,EAAE,CAAA;CACtB"}
|
package/dist/esm/asset.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Address } from './primitives.js';
|
|
2
1
|
/**
|
|
3
2
|
* Underlying token/registry entry. The base entity of the perps taxonomy:
|
|
4
3
|
* a tradable unit referenced by markets (as base/quote legs) and held by
|
|
@@ -23,41 +22,6 @@ export interface Asset {
|
|
|
23
22
|
/** Other venues' display symbols for the same real-world asset (e.g. Hyperliquid `SILVER` carries `['XAG']`). */
|
|
24
23
|
aliases?: string[];
|
|
25
24
|
}
|
|
26
|
-
/**
|
|
27
|
-
* An external, on-chain ERC-20 token a client bridges/swaps in to fund an
|
|
28
|
-
* account at a venue — the collateral currency, described by its canonical
|
|
29
|
-
* on-chain identity (a LI.FI-recognized token). The source token is arbitrary:
|
|
30
|
-
* LI.FI routes whatever the user holds into this one, so only the target
|
|
31
|
-
* currency is described here. How the venue represents the credited balance
|
|
32
|
-
* internally is deliberately not modeled — it surfaces in-venue once the
|
|
33
|
-
* deposit arrives.
|
|
34
|
-
*
|
|
35
|
-
* Distinct from a category's {@link ProviderCategory.quoteAsset} (the
|
|
36
|
-
* pricing/quote unit a market is denominated in): all live venues settle in
|
|
37
|
-
* USDC today so the two coincide, but they are different concepts and may
|
|
38
|
-
* diverge. Unlike {@link Asset} (a provider-native registry entry keyed by an
|
|
39
|
-
* opaque provider id), this carries full on-chain identity — chain, address,
|
|
40
|
-
* decimals.
|
|
41
|
-
* @public
|
|
42
|
-
*/
|
|
43
|
-
export interface DepositAsset {
|
|
44
|
-
/**
|
|
45
|
-
* The chain the ERC-20 contract lives on, aligned to `@lifi/types` `ChainId`
|
|
46
|
-
* values (documentation-level, not a type dependency). This is the token's
|
|
47
|
-
* on-chain home (e.g. Arbitrum for HL's USDC), NOT necessarily the LI.FI
|
|
48
|
-
* deposit route's `toChain`: some venues route to a distinct LI.FI venue
|
|
49
|
-
* chain (see the SDK's declared deposit assets), so the two may differ and
|
|
50
|
-
* the client maps between them.
|
|
51
|
-
*/
|
|
52
|
-
chainId: number;
|
|
53
|
-
/** ERC-20 contract address on {@link DepositAsset.chainId}. */
|
|
54
|
-
address: Address;
|
|
55
|
-
/** ERC-20 decimals, used to scale deposit amounts. */
|
|
56
|
-
decimals: number;
|
|
57
|
-
displaySymbol: string;
|
|
58
|
-
logoURI: string;
|
|
59
|
-
displayName?: string;
|
|
60
|
-
}
|
|
61
25
|
/** Response containing the provider's normalized asset registry. @public */
|
|
62
26
|
export interface AssetsResponse {
|
|
63
27
|
assets: Asset[];
|
package/dist/esm/asset.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../src/asset.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../src/asset.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,KAAK;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kGAAkG;IAClG,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,iHAAiH;IACjH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB;AAED,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB"}
|
package/dist/esm/providers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Asset
|
|
1
|
+
import type { Asset } from './asset.js';
|
|
2
2
|
import type { ActionType, PerpsSigner, SigningMethod } from './enums.js';
|
|
3
3
|
import type { OhlcvInterval } from './market.js';
|
|
4
4
|
/** A fixed option value presented for a provider action parameter. @public */
|
|
@@ -105,17 +105,6 @@ export interface Provider {
|
|
|
105
105
|
chainId?: number;
|
|
106
106
|
/** Absent means no minimum advertised. */
|
|
107
107
|
minDepositUsd?: number;
|
|
108
|
-
/**
|
|
109
|
-
* External on-chain tokens a client can bridge/swap in to fund an account at
|
|
110
|
-
* this venue — each the target of a LI.FI deposit route, carrying its own
|
|
111
|
-
* on-chain identity. Ordered; the first is the default a client preselects.
|
|
112
|
-
* v1 venues advertise a single token; multiple entries let a venue accept
|
|
113
|
-
* several deposit currencies. Distinct from a category's `quoteAsset` (the
|
|
114
|
-
* pricing unit): a venue whose collateral is not USDC changes only this
|
|
115
|
-
* field, not `quoteAsset`. Absent when the provider advertises no on-chain
|
|
116
|
-
* deposit token.
|
|
117
|
-
*/
|
|
118
|
-
depositAssets?: DepositAsset[];
|
|
119
108
|
/**
|
|
120
109
|
* Minimum order notional value in USD. Feeds the SDK's `validateMargin`
|
|
121
110
|
* `minMarginUsd` parameter. Absent means no minimum advertised.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/providers.ts"],"names":[],"mapp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 +1,3 @@
|
|
|
1
|
-
import type { Address } from './primitives.js';
|
|
2
1
|
/**
|
|
3
2
|
* Underlying token/registry entry. The base entity of the perps taxonomy:
|
|
4
3
|
* a tradable unit referenced by markets (as base/quote legs) and held by
|
|
@@ -23,41 +22,6 @@ export interface Asset {
|
|
|
23
22
|
/** Other venues' display symbols for the same real-world asset (e.g. Hyperliquid `SILVER` carries `['XAG']`). */
|
|
24
23
|
aliases?: string[];
|
|
25
24
|
}
|
|
26
|
-
/**
|
|
27
|
-
* An external, on-chain ERC-20 token a client bridges/swaps in to fund an
|
|
28
|
-
* account at a venue — the collateral currency, described by its canonical
|
|
29
|
-
* on-chain identity (a LI.FI-recognized token). The source token is arbitrary:
|
|
30
|
-
* LI.FI routes whatever the user holds into this one, so only the target
|
|
31
|
-
* currency is described here. How the venue represents the credited balance
|
|
32
|
-
* internally is deliberately not modeled — it surfaces in-venue once the
|
|
33
|
-
* deposit arrives.
|
|
34
|
-
*
|
|
35
|
-
* Distinct from a category's {@link ProviderCategory.quoteAsset} (the
|
|
36
|
-
* pricing/quote unit a market is denominated in): all live venues settle in
|
|
37
|
-
* USDC today so the two coincide, but they are different concepts and may
|
|
38
|
-
* diverge. Unlike {@link Asset} (a provider-native registry entry keyed by an
|
|
39
|
-
* opaque provider id), this carries full on-chain identity — chain, address,
|
|
40
|
-
* decimals.
|
|
41
|
-
* @public
|
|
42
|
-
*/
|
|
43
|
-
export interface DepositAsset {
|
|
44
|
-
/**
|
|
45
|
-
* The chain the ERC-20 contract lives on, aligned to `@lifi/types` `ChainId`
|
|
46
|
-
* values (documentation-level, not a type dependency). This is the token's
|
|
47
|
-
* on-chain home (e.g. Arbitrum for HL's USDC), NOT necessarily the LI.FI
|
|
48
|
-
* deposit route's `toChain`: some venues route to a distinct LI.FI venue
|
|
49
|
-
* chain (see the SDK's declared deposit assets), so the two may differ and
|
|
50
|
-
* the client maps between them.
|
|
51
|
-
*/
|
|
52
|
-
chainId: number;
|
|
53
|
-
/** ERC-20 contract address on {@link DepositAsset.chainId}. */
|
|
54
|
-
address: Address;
|
|
55
|
-
/** ERC-20 decimals, used to scale deposit amounts. */
|
|
56
|
-
decimals: number;
|
|
57
|
-
displaySymbol: string;
|
|
58
|
-
logoURI: string;
|
|
59
|
-
displayName?: string;
|
|
60
|
-
}
|
|
61
25
|
/** Response containing the provider's normalized asset registry. @public */
|
|
62
26
|
export interface AssetsResponse {
|
|
63
27
|
assets: Asset[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../src/asset.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../src/asset.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,KAAK;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kGAAkG;IAClG,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,iHAAiH;IACjH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB;AAED,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Asset
|
|
1
|
+
import type { Asset } from './asset.js';
|
|
2
2
|
import type { ActionType, PerpsSigner, SigningMethod } from './enums.js';
|
|
3
3
|
import type { OhlcvInterval } from './market.js';
|
|
4
4
|
/** A fixed option value presented for a provider action parameter. @public */
|
|
@@ -105,17 +105,6 @@ export interface Provider {
|
|
|
105
105
|
chainId?: number;
|
|
106
106
|
/** Absent means no minimum advertised. */
|
|
107
107
|
minDepositUsd?: number;
|
|
108
|
-
/**
|
|
109
|
-
* External on-chain tokens a client can bridge/swap in to fund an account at
|
|
110
|
-
* this venue — each the target of a LI.FI deposit route, carrying its own
|
|
111
|
-
* on-chain identity. Ordered; the first is the default a client preselects.
|
|
112
|
-
* v1 venues advertise a single token; multiple entries let a venue accept
|
|
113
|
-
* several deposit currencies. Distinct from a category's `quoteAsset` (the
|
|
114
|
-
* pricing unit): a venue whose collateral is not USDC changes only this
|
|
115
|
-
* field, not `quoteAsset`. Absent when the provider advertises no on-chain
|
|
116
|
-
* deposit token.
|
|
117
|
-
*/
|
|
118
|
-
depositAssets?: DepositAsset[];
|
|
119
108
|
/**
|
|
120
109
|
* Minimum order notional value in USD. Feeds the SDK's `validateMargin`
|
|
121
110
|
* `minMarginUsd` parameter. Absent means no minimum advertised.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,8EAA8E;AAC9E,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,KAAK;IACpB,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,QAAQ,CAAA;IACd,yFAAyF;IACzF,MAAM,CAAC,EAAE,WAAW,EAAE,CAAA;IACtB,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;GAOG;AACH,MAAM,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eAAe,CAAA;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,kBAAkB,EAAE,aAAa,EAAE,CAAA;CACpC;AAED,gFAAgF;AAChF,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,QAAQ,EAAE,CAAA;CACtB"}
|
package/package.json
CHANGED
package/src/asset.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { Address } from './primitives.js'
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Underlying token/registry entry. The base entity of the perps taxonomy:
|
|
5
3
|
* a tradable unit referenced by markets (as base/quote legs) and held by
|
|
@@ -25,42 +23,6 @@ export interface Asset {
|
|
|
25
23
|
aliases?: string[]
|
|
26
24
|
}
|
|
27
25
|
|
|
28
|
-
/**
|
|
29
|
-
* An external, on-chain ERC-20 token a client bridges/swaps in to fund an
|
|
30
|
-
* account at a venue — the collateral currency, described by its canonical
|
|
31
|
-
* on-chain identity (a LI.FI-recognized token). The source token is arbitrary:
|
|
32
|
-
* LI.FI routes whatever the user holds into this one, so only the target
|
|
33
|
-
* currency is described here. How the venue represents the credited balance
|
|
34
|
-
* internally is deliberately not modeled — it surfaces in-venue once the
|
|
35
|
-
* deposit arrives.
|
|
36
|
-
*
|
|
37
|
-
* Distinct from a category's {@link ProviderCategory.quoteAsset} (the
|
|
38
|
-
* pricing/quote unit a market is denominated in): all live venues settle in
|
|
39
|
-
* USDC today so the two coincide, but they are different concepts and may
|
|
40
|
-
* diverge. Unlike {@link Asset} (a provider-native registry entry keyed by an
|
|
41
|
-
* opaque provider id), this carries full on-chain identity — chain, address,
|
|
42
|
-
* decimals.
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
45
|
-
export interface DepositAsset {
|
|
46
|
-
/**
|
|
47
|
-
* The chain the ERC-20 contract lives on, aligned to `@lifi/types` `ChainId`
|
|
48
|
-
* values (documentation-level, not a type dependency). This is the token's
|
|
49
|
-
* on-chain home (e.g. Arbitrum for HL's USDC), NOT necessarily the LI.FI
|
|
50
|
-
* deposit route's `toChain`: some venues route to a distinct LI.FI venue
|
|
51
|
-
* chain (see the SDK's declared deposit assets), so the two may differ and
|
|
52
|
-
* the client maps between them.
|
|
53
|
-
*/
|
|
54
|
-
chainId: number
|
|
55
|
-
/** ERC-20 contract address on {@link DepositAsset.chainId}. */
|
|
56
|
-
address: Address
|
|
57
|
-
/** ERC-20 decimals, used to scale deposit amounts. */
|
|
58
|
-
decimals: number
|
|
59
|
-
displaySymbol: string
|
|
60
|
-
logoURI: string
|
|
61
|
-
displayName?: string
|
|
62
|
-
}
|
|
63
|
-
|
|
64
26
|
/** Response containing the provider's normalized asset registry. @public */
|
|
65
27
|
export interface AssetsResponse {
|
|
66
28
|
assets: Asset[]
|
package/src/providers.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Asset
|
|
1
|
+
import type { Asset } from './asset.js'
|
|
2
2
|
import type { ActionType, PerpsSigner, SigningMethod } from './enums.js'
|
|
3
3
|
import type { OhlcvInterval } from './market.js'
|
|
4
4
|
|
|
@@ -112,17 +112,6 @@ export interface Provider {
|
|
|
112
112
|
chainId?: number
|
|
113
113
|
/** Absent means no minimum advertised. */
|
|
114
114
|
minDepositUsd?: number
|
|
115
|
-
/**
|
|
116
|
-
* External on-chain tokens a client can bridge/swap in to fund an account at
|
|
117
|
-
* this venue — each the target of a LI.FI deposit route, carrying its own
|
|
118
|
-
* on-chain identity. Ordered; the first is the default a client preselects.
|
|
119
|
-
* v1 venues advertise a single token; multiple entries let a venue accept
|
|
120
|
-
* several deposit currencies. Distinct from a category's `quoteAsset` (the
|
|
121
|
-
* pricing unit): a venue whose collateral is not USDC changes only this
|
|
122
|
-
* field, not `quoteAsset`. Absent when the provider advertises no on-chain
|
|
123
|
-
* deposit token.
|
|
124
|
-
*/
|
|
125
|
-
depositAssets?: DepositAsset[]
|
|
126
115
|
/**
|
|
127
116
|
* Minimum order notional value in USD. Feeds the SDK's `validateMargin`
|
|
128
117
|
* `minMarginUsd` parameter. Absent means no minimum advertised.
|