@lifi/perps-types 3.3.2 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/account.d.ts +11 -2
- package/dist/cjs/account.d.ts.map +1 -1
- package/dist/cjs/action.d.ts +1 -0
- package/dist/cjs/action.d.ts.map +1 -1
- package/dist/cjs/asset.d.ts.map +1 -1
- package/dist/cjs/enums.d.ts +5 -0
- package/dist/cjs/enums.d.ts.map +1 -1
- package/dist/cjs/enums.js +7 -1
- package/dist/cjs/enums.js.map +1 -1
- package/dist/cjs/errors.d.ts.map +1 -1
- package/dist/cjs/market.d.ts +4 -0
- package/dist/cjs/market.d.ts.map +1 -1
- package/dist/cjs/primitives.d.ts.map +1 -1
- package/dist/cjs/providers.d.ts.map +1 -1
- package/dist/cjs/subscriptions.d.ts.map +1 -1
- package/dist/cjs/typedData.d.ts.map +1 -1
- package/dist/cjs/vote.d.ts.map +1 -1
- package/dist/cjs/vote.js.map +1 -1
- package/dist/esm/account.d.ts +223 -32
- package/dist/esm/account.d.ts.map +1 -1
- package/dist/esm/action.d.ts +205 -37
- package/dist/esm/action.d.ts.map +1 -1
- package/dist/esm/asset.d.ts +1 -4
- package/dist/esm/asset.d.ts.map +1 -1
- package/dist/esm/enums.d.ts +43 -20
- package/dist/esm/enums.d.ts.map +1 -1
- package/dist/esm/enums.js +43 -19
- package/dist/esm/enums.js.map +1 -1
- package/dist/esm/errors.d.ts +6 -1
- package/dist/esm/errors.d.ts.map +1 -1
- package/dist/esm/market.d.ts +57 -15
- package/dist/esm/market.d.ts.map +1 -1
- package/dist/esm/primitives.d.ts +12 -2
- package/dist/esm/primitives.d.ts.map +1 -1
- package/dist/esm/providers.d.ts +19 -6
- package/dist/esm/providers.d.ts.map +1 -1
- package/dist/esm/quote.d.ts +2 -2
- package/dist/esm/quote.d.ts.map +1 -1
- package/dist/esm/subscriptions.d.ts +27 -19
- package/dist/esm/subscriptions.d.ts.map +1 -1
- package/dist/esm/typedData.d.ts +15 -5
- package/dist/esm/typedData.d.ts.map +1 -1
- package/dist/esm/vote.d.ts +1 -3
- package/dist/esm/vote.d.ts.map +1 -1
- package/dist/esm/vote.js.map +1 -1
- package/dist/types/account.d.ts +223 -32
- package/dist/types/account.d.ts.map +1 -1
- package/dist/types/action.d.ts +205 -37
- package/dist/types/action.d.ts.map +1 -1
- package/dist/types/asset.d.ts +1 -4
- package/dist/types/asset.d.ts.map +1 -1
- package/dist/types/enums.d.ts +43 -20
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/errors.d.ts +6 -1
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/market.d.ts +57 -15
- package/dist/types/market.d.ts.map +1 -1
- package/dist/types/primitives.d.ts +12 -2
- package/dist/types/primitives.d.ts.map +1 -1
- package/dist/types/providers.d.ts +19 -6
- package/dist/types/providers.d.ts.map +1 -1
- package/dist/types/quote.d.ts +2 -2
- package/dist/types/quote.d.ts.map +1 -1
- package/dist/types/subscriptions.d.ts +27 -19
- package/dist/types/subscriptions.d.ts.map +1 -1
- package/dist/types/typedData.d.ts +15 -5
- package/dist/types/typedData.d.ts.map +1 -1
- package/dist/types/vote.d.ts +1 -3
- package/dist/types/vote.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/account.ts +225 -37
- package/src/action.ts +205 -37
- package/src/asset.ts +1 -4
- package/src/enums.ts +44 -20
- package/src/errors.ts +6 -1
- package/src/market.ts +69 -16
- package/src/primitives.ts +12 -2
- package/src/providers.ts +19 -6
- package/src/quote.ts +2 -2
- package/src/subscriptions.ts +27 -19
- package/src/typedData.ts +15 -5
- package/src/vote.ts +1 -3
package/dist/esm/account.d.ts
CHANGED
|
@@ -1,39 +1,91 @@
|
|
|
1
1
|
import type { Asset } from './asset.js';
|
|
2
2
|
import type { ActionType, ActivityType, FillClassification, FillStatus, LiquidityRole, MarginMode, OrderSide, OrderType, PositionSide } from './enums.js';
|
|
3
|
-
import type { MarketDisplay } from './market.js';
|
|
3
|
+
import type { MarketDisplay, PerpsMarketDisplay } from './market.js';
|
|
4
4
|
import type { Address } from './primitives.js';
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Maker and taker fee rates for the account's current venue tier.
|
|
7
|
+
* Values are decimal fractions represented as strings (for example, `"0.0002"`).
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
6
11
|
export interface FeeTier {
|
|
12
|
+
/** Decimal fraction charged to maker fills, represented as a string. */
|
|
7
13
|
maker: string;
|
|
14
|
+
/** Decimal fraction charged to taker fills, represented as a string. */
|
|
8
15
|
taker: string;
|
|
9
16
|
}
|
|
10
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Normalized open perpetual position with prices, margin, and PnL expressed as
|
|
19
|
+
* decimal strings to preserve provider precision.
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
11
23
|
export interface Position {
|
|
12
|
-
market:
|
|
24
|
+
market: PerpsMarketDisplay;
|
|
13
25
|
side: PositionSide;
|
|
26
|
+
/** Position quantity in base-asset units. */
|
|
14
27
|
size: string;
|
|
28
|
+
/** Average entry price in quote-asset units. */
|
|
15
29
|
entryPrice: string;
|
|
30
|
+
/** Current provider mark price in quote-asset units. */
|
|
16
31
|
markPrice: string;
|
|
32
|
+
/** Estimated liquidation price in quote-asset units. */
|
|
17
33
|
liquidationPrice: string;
|
|
34
|
+
/** Unrealized PnL in quote-currency units. */
|
|
18
35
|
unrealizedPnl: string;
|
|
36
|
+
/** Position leverage as a numeric multiple. */
|
|
19
37
|
leverage: number;
|
|
38
|
+
/**
|
|
39
|
+
* Margin allocated and reserved by this position as a decimal string,
|
|
40
|
+
* excluding unrealized PnL.
|
|
41
|
+
*/
|
|
20
42
|
marginUsed: string;
|
|
43
|
+
/**
|
|
44
|
+
* Exact initial margin the venue currently requires for this position.
|
|
45
|
+
* Unlike `leverage`, this decimal string is safe for risk calculations.
|
|
46
|
+
*/
|
|
47
|
+
initialMarginRequirement: string;
|
|
21
48
|
marginMode: MarginMode;
|
|
22
49
|
}
|
|
23
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Exact provider-owned inputs for changing one position's dedicated margin.
|
|
52
|
+
* `undefined` from the provider means the position has no individual margin
|
|
53
|
+
* adjustment.
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export interface PositionMarginConstraints {
|
|
57
|
+
/** Exact margin the venue requires this position to retain. */
|
|
58
|
+
minimumMarginRequirement: string;
|
|
59
|
+
/** Smallest accepted margin amount, as an exact decimal string. */
|
|
60
|
+
amountIncrement: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Normalized non-trigger order currently open at a provider.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
24
67
|
export interface OpenOrder {
|
|
25
68
|
orderId: string;
|
|
26
69
|
market: MarketDisplay;
|
|
27
70
|
side: OrderSide;
|
|
28
71
|
type: OrderType;
|
|
72
|
+
/** Remaining order quantity in base-asset units. */
|
|
29
73
|
size: string;
|
|
74
|
+
/** Limit/order price in quote-asset units. */
|
|
30
75
|
price: string;
|
|
76
|
+
/** Quantity already filled in base-asset units. */
|
|
31
77
|
filledSize: string;
|
|
32
78
|
reduceOnly: boolean;
|
|
33
79
|
label?: string;
|
|
80
|
+
/** ISO-8601 creation timestamp. */
|
|
34
81
|
createdAt: string;
|
|
35
82
|
}
|
|
36
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* Asset balance normalized across providers. `units` and `valueUsd` are
|
|
85
|
+
* decimal strings; `valueUsd` is the balance's USD valuation.
|
|
86
|
+
*
|
|
87
|
+
* @public
|
|
88
|
+
*/
|
|
37
89
|
export interface Balance {
|
|
38
90
|
/** Which category/venue this balance sits in — references a {@link ProviderCategory}. */
|
|
39
91
|
categoryId: string;
|
|
@@ -48,7 +100,12 @@ export interface Balance {
|
|
|
48
100
|
*/
|
|
49
101
|
collateralWeight?: number;
|
|
50
102
|
}
|
|
51
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* Account snapshot returned by a provider, including balances, positions,
|
|
105
|
+
* aggregate margin/PnL, and provider-specific configuration.
|
|
106
|
+
*
|
|
107
|
+
* @public
|
|
108
|
+
*/
|
|
52
109
|
export interface AccountResponse {
|
|
53
110
|
provider: string;
|
|
54
111
|
address: Address;
|
|
@@ -58,43 +115,83 @@ export interface AccountResponse {
|
|
|
58
115
|
collateralBalances: Balance[];
|
|
59
116
|
/** Open positions the snapshot already computed; equals the unfiltered `getPositions` output. */
|
|
60
117
|
positions: Position[];
|
|
118
|
+
/** Margin reserved across the account, represented as a decimal string. */
|
|
61
119
|
marginUsed: string;
|
|
120
|
+
/** Unrealized account PnL, represented as a decimal string. */
|
|
62
121
|
unrealizedPnl: string;
|
|
63
122
|
feeTier: FeeTier;
|
|
64
123
|
config: AccountConfig;
|
|
65
124
|
}
|
|
66
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* Aggregate account values for a provider stream or response. Monetary values
|
|
127
|
+
* are decimal strings in USD.
|
|
128
|
+
*
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
67
131
|
export interface AccountSummary {
|
|
132
|
+
/** Total account portfolio value in USD. */
|
|
68
133
|
portfolioValue: string;
|
|
134
|
+
/** Margin currently available for new orders in USD. */
|
|
69
135
|
availableMargin: string;
|
|
136
|
+
/** Margin currently reserved by open positions/orders in USD. */
|
|
70
137
|
marginUsed: string;
|
|
138
|
+
/** Aggregate unrealized PnL in USD. */
|
|
71
139
|
unrealizedPnl: string;
|
|
72
140
|
}
|
|
73
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* The user's complete venue-side settings for one market: the margin mode
|
|
143
|
+
* and display leverage the next order on it will use. A provider returns
|
|
144
|
+
* `undefined` when it cannot read both values.
|
|
145
|
+
* @public
|
|
146
|
+
*/
|
|
147
|
+
export interface MarketSettings {
|
|
148
|
+
marginMode: MarginMode;
|
|
149
|
+
leverage: number;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Normalized take-profit or stop-loss order waiting for its trigger condition.
|
|
153
|
+
*
|
|
154
|
+
* @public
|
|
155
|
+
*/
|
|
74
156
|
export interface TriggerOrder {
|
|
75
157
|
orderId: string;
|
|
76
158
|
market: MarketDisplay;
|
|
77
159
|
type: OrderType;
|
|
160
|
+
/** Triggered quantity in base-asset units. */
|
|
78
161
|
size: string;
|
|
162
|
+
/** Price at which the trigger activates, in quote-asset units. */
|
|
79
163
|
triggerPrice: string;
|
|
164
|
+
/** Optional limit price submitted after activation, in quote-asset units. */
|
|
80
165
|
limitPrice?: string;
|
|
81
166
|
label?: string;
|
|
82
167
|
createdAt: string;
|
|
83
168
|
}
|
|
84
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Paginated open-position response for one provider and account.
|
|
171
|
+
*
|
|
172
|
+
* @public
|
|
173
|
+
*/
|
|
85
174
|
export interface PositionsResponse {
|
|
86
175
|
provider: string;
|
|
87
176
|
positions: Position[];
|
|
88
177
|
pagination: Pagination;
|
|
89
178
|
}
|
|
90
|
-
/**
|
|
179
|
+
/**
|
|
180
|
+
* Paginated open-order response containing regular and trigger orders.
|
|
181
|
+
*
|
|
182
|
+
* @public
|
|
183
|
+
*/
|
|
91
184
|
export interface OrdersResponse {
|
|
92
185
|
provider: string;
|
|
93
186
|
openOrders: OpenOrder[];
|
|
94
187
|
triggerOrders: TriggerOrder[];
|
|
95
188
|
pagination: Pagination;
|
|
96
189
|
}
|
|
97
|
-
/**
|
|
190
|
+
/**
|
|
191
|
+
* Normalized execution/fill record for an order.
|
|
192
|
+
*
|
|
193
|
+
* @public
|
|
194
|
+
*/
|
|
98
195
|
export interface Fill {
|
|
99
196
|
id: string;
|
|
100
197
|
orderId: string;
|
|
@@ -116,46 +213,81 @@ export interface Fill {
|
|
|
116
213
|
startPosition?: string;
|
|
117
214
|
classification: FillClassification;
|
|
118
215
|
createdAt: string;
|
|
216
|
+
/** Fully-resolved block-explorer URL for the settling on-chain tx. Absent when
|
|
217
|
+
* the fill has no on-chain settlement tx. */
|
|
119
218
|
explorerLink?: string;
|
|
120
219
|
}
|
|
121
|
-
/**
|
|
220
|
+
/**
|
|
221
|
+
* Cursor pagination metadata. `cursor` and `nextUrl` are provider-specific
|
|
222
|
+
* continuation values and are absent when no further page exists.
|
|
223
|
+
*
|
|
224
|
+
* @public
|
|
225
|
+
*/
|
|
122
226
|
export interface Pagination {
|
|
123
227
|
limit: number;
|
|
124
228
|
hasMore: boolean;
|
|
125
229
|
cursor?: string;
|
|
126
230
|
nextUrl?: string;
|
|
127
231
|
}
|
|
128
|
-
/**
|
|
232
|
+
/**
|
|
233
|
+
* Paginated fill response for one provider and account.
|
|
234
|
+
*
|
|
235
|
+
* @public
|
|
236
|
+
*/
|
|
129
237
|
export interface FillsResponse {
|
|
130
238
|
provider: string;
|
|
131
239
|
items: Fill[];
|
|
132
240
|
pagination: Pagination;
|
|
133
241
|
}
|
|
134
|
-
/**
|
|
242
|
+
/**
|
|
243
|
+
* Common identity and timestamp fields shared by account activity records.
|
|
244
|
+
* `timestamp` is an ISO-8601 timestamp string.
|
|
245
|
+
*
|
|
246
|
+
* @public
|
|
247
|
+
*/
|
|
135
248
|
export interface BaseActivity {
|
|
136
249
|
id: string;
|
|
137
250
|
provider: string;
|
|
138
251
|
timestamp: string;
|
|
139
252
|
}
|
|
140
|
-
/**
|
|
253
|
+
/**
|
|
254
|
+
* Account activity representing a completed deposit.
|
|
255
|
+
*
|
|
256
|
+
* @public
|
|
257
|
+
*/
|
|
141
258
|
export interface DepositActivity extends BaseActivity {
|
|
142
259
|
type: ActivityType.DEPOSIT;
|
|
143
260
|
amount: string;
|
|
261
|
+
/** Fully-resolved block-explorer URL for the on-chain deposit tx. */
|
|
144
262
|
explorerLink?: string;
|
|
145
263
|
}
|
|
146
|
-
/**
|
|
264
|
+
/**
|
|
265
|
+
* Account activity representing a completed withdrawal. `amount` and `fee`
|
|
266
|
+
* are decimal strings in the transferred asset's units.
|
|
267
|
+
*
|
|
268
|
+
* @public
|
|
269
|
+
*/
|
|
147
270
|
export interface WithdrawalActivity extends BaseActivity {
|
|
148
271
|
type: ActivityType.WITHDRAWAL;
|
|
149
272
|
amount: string;
|
|
150
273
|
fee: string;
|
|
274
|
+
/** Fully-resolved block-explorer URL for the on-chain withdrawal tx. */
|
|
151
275
|
explorerLink?: string;
|
|
152
276
|
}
|
|
153
|
-
/**
|
|
277
|
+
/**
|
|
278
|
+
* Position details attached to a liquidation activity.
|
|
279
|
+
*
|
|
280
|
+
* @public
|
|
281
|
+
*/
|
|
154
282
|
export interface LiquidatedPosition {
|
|
155
283
|
market: MarketDisplay;
|
|
156
284
|
size: string;
|
|
157
285
|
}
|
|
158
|
-
/**
|
|
286
|
+
/**
|
|
287
|
+
* Account activity representing a liquidation event.
|
|
288
|
+
*
|
|
289
|
+
* @public
|
|
290
|
+
*/
|
|
159
291
|
export interface LiquidationActivity extends BaseActivity {
|
|
160
292
|
type: ActivityType.LIQUIDATION;
|
|
161
293
|
liquidatedNotionalPosition: string;
|
|
@@ -163,7 +295,12 @@ export interface LiquidationActivity extends BaseActivity {
|
|
|
163
295
|
leverageType: string;
|
|
164
296
|
liquidatedPositions: LiquidatedPosition[];
|
|
165
297
|
}
|
|
166
|
-
/**
|
|
298
|
+
/**
|
|
299
|
+
* Account activity representing a periodic funding payment. Amount and rate
|
|
300
|
+
* retain provider precision as decimal strings.
|
|
301
|
+
*
|
|
302
|
+
* @public
|
|
303
|
+
*/
|
|
167
304
|
export interface FundingActivity extends BaseActivity {
|
|
168
305
|
type: ActivityType.FUNDING;
|
|
169
306
|
market: MarketDisplay;
|
|
@@ -171,13 +308,19 @@ export interface FundingActivity extends BaseActivity {
|
|
|
171
308
|
positionSize: string;
|
|
172
309
|
fundingRate: string;
|
|
173
310
|
}
|
|
174
|
-
/**
|
|
311
|
+
/**
|
|
312
|
+
* Account activity representing an inbound or outbound transfer. At least one
|
|
313
|
+
* counterparty identifier is required by the type-level union below.
|
|
314
|
+
*
|
|
315
|
+
* @public
|
|
316
|
+
*/
|
|
175
317
|
export type TransferActivity = BaseActivity & {
|
|
176
318
|
type: ActivityType.TRANSFER;
|
|
177
319
|
direction: 'IN' | 'OUT';
|
|
178
320
|
asset: string;
|
|
179
321
|
amount: string;
|
|
180
322
|
meta?: Record<string, unknown>;
|
|
323
|
+
/** Fully-resolved block-explorer URL for the on-chain transfer tx. */
|
|
181
324
|
explorerLink?: string;
|
|
182
325
|
} & ({
|
|
183
326
|
counterpartyAccountIndex: number;
|
|
@@ -186,24 +329,45 @@ export type TransferActivity = BaseActivity & {
|
|
|
186
329
|
counterpartyAccountIndex?: number;
|
|
187
330
|
counterpartyAddress: string;
|
|
188
331
|
});
|
|
189
|
-
/**
|
|
332
|
+
/**
|
|
333
|
+
* Discriminated union of all activity records returned by a provider.
|
|
334
|
+
*
|
|
335
|
+
* @public
|
|
336
|
+
*/
|
|
190
337
|
export type ActivityItem = DepositActivity | WithdrawalActivity | LiquidationActivity | FundingActivity | TransferActivity;
|
|
191
|
-
/**
|
|
338
|
+
/**
|
|
339
|
+
* Paginated account-activity response for one provider and account.
|
|
340
|
+
*
|
|
341
|
+
* @public
|
|
342
|
+
*/
|
|
192
343
|
export interface ActivitiesResponse {
|
|
193
344
|
provider: string;
|
|
194
345
|
items: ActivityItem[];
|
|
195
346
|
pagination: Pagination;
|
|
196
347
|
}
|
|
197
|
-
/**
|
|
348
|
+
/**
|
|
349
|
+
* Provider-specific Hyperliquid agent configuration. The record contents are
|
|
350
|
+
* provider-defined and intentionally left opaque to the shared type package.
|
|
351
|
+
*
|
|
352
|
+
* @public
|
|
353
|
+
*/
|
|
198
354
|
export type HyperliquidAgent = Record<string, unknown>;
|
|
199
|
-
/**
|
|
355
|
+
/**
|
|
356
|
+
* Hyperliquid builder-fee approval state for an account.
|
|
357
|
+
*
|
|
358
|
+
* @public
|
|
359
|
+
*/
|
|
200
360
|
export interface HyperliquidBuilderFeeApproval {
|
|
201
361
|
builderAddress: string;
|
|
202
362
|
/** Basis points as a string. */
|
|
203
363
|
maxFeeRate: string;
|
|
204
364
|
approved: boolean;
|
|
205
365
|
}
|
|
206
|
-
/**
|
|
366
|
+
/**
|
|
367
|
+
* Hyperliquid account configuration returned in {@link AccountResponse.config}.
|
|
368
|
+
*
|
|
369
|
+
* @public
|
|
370
|
+
*/
|
|
207
371
|
export interface HyperliquidAccountConfig {
|
|
208
372
|
provider: 'hyperliquid';
|
|
209
373
|
/** `null` means abstraction has never been set. */
|
|
@@ -211,7 +375,11 @@ export interface HyperliquidAccountConfig {
|
|
|
211
375
|
agents: HyperliquidAgent[];
|
|
212
376
|
builderFeeApproval?: HyperliquidBuilderFeeApproval;
|
|
213
377
|
}
|
|
214
|
-
/**
|
|
378
|
+
/**
|
|
379
|
+
* Lighter spot-asset collateral setting for a single asset.
|
|
380
|
+
*
|
|
381
|
+
* @public
|
|
382
|
+
*/
|
|
215
383
|
export interface LighterAssetCollateral {
|
|
216
384
|
/** Provider-native spot asset id (matches `Asset.id`). */
|
|
217
385
|
assetId: string;
|
|
@@ -227,7 +395,12 @@ export interface LighterAssetCollateral {
|
|
|
227
395
|
* @public
|
|
228
396
|
*/
|
|
229
397
|
export type LighterProviderKey = 'lighter' | 'lighter-rh';
|
|
230
|
-
/**
|
|
398
|
+
/**
|
|
399
|
+
* Lighter account configuration returned in {@link AccountResponse.config}.
|
|
400
|
+
* Numeric identifiers and account modes use the provider's wire values.
|
|
401
|
+
*
|
|
402
|
+
* @public
|
|
403
|
+
*/
|
|
231
404
|
export interface LighterAccountConfig {
|
|
232
405
|
provider: LighterProviderKey;
|
|
233
406
|
accountIndex: number;
|
|
@@ -257,7 +430,12 @@ export interface LighterAccountConfig {
|
|
|
257
430
|
*/
|
|
258
431
|
referralPresent: boolean;
|
|
259
432
|
}
|
|
260
|
-
/**
|
|
433
|
+
/**
|
|
434
|
+
* Ondo account/session configuration returned in {@link AccountResponse.config}.
|
|
435
|
+
* Expiry values are Unix timestamps in seconds.
|
|
436
|
+
*
|
|
437
|
+
* @public
|
|
438
|
+
*/
|
|
261
439
|
export interface OndoAccountConfig {
|
|
262
440
|
provider: 'ondo';
|
|
263
441
|
loggedIn: boolean;
|
|
@@ -272,15 +450,28 @@ export interface OndoAccountConfig {
|
|
|
272
450
|
/** Canonical Ethereum USDC deposit address, or `null` when none is provisioned. */
|
|
273
451
|
depositAddress: string | null;
|
|
274
452
|
}
|
|
275
|
-
/**
|
|
453
|
+
/**
|
|
454
|
+
* Provider-specific account configuration discriminated by its `provider` key.
|
|
455
|
+
*
|
|
456
|
+
* @public
|
|
457
|
+
*/
|
|
276
458
|
export type AccountConfig = HyperliquidAccountConfig | LighterAccountConfig | OndoAccountConfig;
|
|
277
|
-
/**
|
|
459
|
+
/**
|
|
460
|
+
* Named account-configuration value exposed to clients.
|
|
461
|
+
*
|
|
462
|
+
* @public
|
|
463
|
+
*/
|
|
278
464
|
export interface AccountConfigValue {
|
|
279
465
|
name: string;
|
|
280
466
|
/** `null` means no current value — consumers fall back to the descriptor default. */
|
|
281
467
|
value: string | number | boolean | null;
|
|
282
468
|
}
|
|
283
|
-
/**
|
|
469
|
+
/**
|
|
470
|
+
* Account-configuration action and its available values, optionally including
|
|
471
|
+
* whether the setting is currently satisfied.
|
|
472
|
+
*
|
|
473
|
+
* @public
|
|
474
|
+
*/
|
|
284
475
|
export interface AccountConfigSetting {
|
|
285
476
|
type: ActionType;
|
|
286
477
|
values: AccountConfigValue[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,UAAU,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACb,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,aAAa,EAAE,M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