@lifi/perps-types 4.0.0 → 4.1.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/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.map +1 -1
- package/dist/cjs/enums.js.map +1 -1
- package/dist/cjs/errors.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/market.d.ts.map +1 -1
- package/dist/cjs/positionMargin.d.ts +4 -0
- package/dist/cjs/positionMargin.d.ts.map +1 -0
- package/dist/cjs/positionMargin.js +15 -0
- package/dist/cjs/positionMargin.js.map +1 -0
- 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 +194 -31
- 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 +34 -20
- package/dist/esm/enums.d.ts.map +1 -1
- package/dist/esm/enums.js +33 -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/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/market.d.ts +47 -14
- package/dist/esm/market.d.ts.map +1 -1
- package/dist/esm/positionMargin.d.ts +16 -0
- package/dist/esm/positionMargin.d.ts.map +1 -0
- package/dist/esm/positionMargin.js +23 -0
- package/dist/esm/positionMargin.js.map +1 -0
- 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 +194 -31
- 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 +34 -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/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/market.d.ts +47 -14
- package/dist/types/market.d.ts.map +1 -1
- package/dist/types/positionMargin.d.ts +16 -0
- package/dist/types/positionMargin.d.ts.map +1 -0
- 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 +194 -36
- package/src/action.ts +205 -37
- package/src/asset.ts +1 -4
- package/src/enums.ts +34 -20
- package/src/errors.ts +6 -1
- package/src/index.ts +1 -0
- package/src/market.ts +47 -14
- package/src/positionMargin.ts +29 -0
- 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
|
@@ -2,22 +2,43 @@ import type { Asset } from './asset.js';
|
|
|
2
2
|
import type { ActionType, ActivityType, FillClassification, FillStatus, LiquidityRole, MarginMode, OrderSide, OrderType, PositionSide } from './enums.js';
|
|
3
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
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;
|
|
20
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Margin allocated and reserved by this position as a decimal string,
|
|
40
|
+
* excluding unrealized PnL.
|
|
41
|
+
*/
|
|
21
42
|
marginUsed: string;
|
|
22
43
|
/**
|
|
23
44
|
* Exact initial margin the venue currently requires for this position.
|
|
@@ -38,20 +59,33 @@ export interface PositionMarginConstraints {
|
|
|
38
59
|
/** Smallest accepted margin amount, as an exact decimal string. */
|
|
39
60
|
amountIncrement: string;
|
|
40
61
|
}
|
|
41
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Normalized non-trigger order currently open at a provider.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
42
67
|
export interface OpenOrder {
|
|
43
68
|
orderId: string;
|
|
44
69
|
market: MarketDisplay;
|
|
45
70
|
side: OrderSide;
|
|
46
71
|
type: OrderType;
|
|
72
|
+
/** Remaining order quantity in base-asset units. */
|
|
47
73
|
size: string;
|
|
74
|
+
/** Limit/order price in quote-asset units. */
|
|
48
75
|
price: string;
|
|
76
|
+
/** Quantity already filled in base-asset units. */
|
|
49
77
|
filledSize: string;
|
|
50
78
|
reduceOnly: boolean;
|
|
51
79
|
label?: string;
|
|
80
|
+
/** ISO-8601 creation timestamp. */
|
|
52
81
|
createdAt: string;
|
|
53
82
|
}
|
|
54
|
-
/**
|
|
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
|
+
*/
|
|
55
89
|
export interface Balance {
|
|
56
90
|
/** Which category/venue this balance sits in — references a {@link ProviderCategory}. */
|
|
57
91
|
categoryId: string;
|
|
@@ -66,7 +100,12 @@ export interface Balance {
|
|
|
66
100
|
*/
|
|
67
101
|
collateralWeight?: number;
|
|
68
102
|
}
|
|
69
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* Account snapshot returned by a provider, including balances, positions,
|
|
105
|
+
* aggregate margin/PnL, and provider-specific configuration.
|
|
106
|
+
*
|
|
107
|
+
* @public
|
|
108
|
+
*/
|
|
70
109
|
export interface AccountResponse {
|
|
71
110
|
provider: string;
|
|
72
111
|
address: Address;
|
|
@@ -76,16 +115,27 @@ export interface AccountResponse {
|
|
|
76
115
|
collateralBalances: Balance[];
|
|
77
116
|
/** Open positions the snapshot already computed; equals the unfiltered `getPositions` output. */
|
|
78
117
|
positions: Position[];
|
|
118
|
+
/** Margin reserved across the account, represented as a decimal string. */
|
|
79
119
|
marginUsed: string;
|
|
120
|
+
/** Unrealized account PnL, represented as a decimal string. */
|
|
80
121
|
unrealizedPnl: string;
|
|
81
122
|
feeTier: FeeTier;
|
|
82
123
|
config: AccountConfig;
|
|
83
124
|
}
|
|
84
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* Aggregate account values for a provider stream or response. Monetary values
|
|
127
|
+
* are decimal strings in USD.
|
|
128
|
+
*
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
85
131
|
export interface AccountSummary {
|
|
132
|
+
/** Total account portfolio value in USD. */
|
|
86
133
|
portfolioValue: string;
|
|
134
|
+
/** Margin currently available for new orders in USD. */
|
|
87
135
|
availableMargin: string;
|
|
136
|
+
/** Margin currently reserved by open positions/orders in USD. */
|
|
88
137
|
marginUsed: string;
|
|
138
|
+
/** Aggregate unrealized PnL in USD. */
|
|
89
139
|
unrealizedPnl: string;
|
|
90
140
|
}
|
|
91
141
|
/**
|
|
@@ -98,31 +148,50 @@ export interface MarketSettings {
|
|
|
98
148
|
marginMode: MarginMode;
|
|
99
149
|
leverage: number;
|
|
100
150
|
}
|
|
101
|
-
/**
|
|
151
|
+
/**
|
|
152
|
+
* Normalized take-profit or stop-loss order waiting for its trigger condition.
|
|
153
|
+
*
|
|
154
|
+
* @public
|
|
155
|
+
*/
|
|
102
156
|
export interface TriggerOrder {
|
|
103
157
|
orderId: string;
|
|
104
158
|
market: MarketDisplay;
|
|
105
159
|
type: OrderType;
|
|
160
|
+
/** Triggered quantity in base-asset units. */
|
|
106
161
|
size: string;
|
|
162
|
+
/** Price at which the trigger activates, in quote-asset units. */
|
|
107
163
|
triggerPrice: string;
|
|
164
|
+
/** Optional limit price submitted after activation, in quote-asset units. */
|
|
108
165
|
limitPrice?: string;
|
|
109
166
|
label?: string;
|
|
110
167
|
createdAt: string;
|
|
111
168
|
}
|
|
112
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Paginated open-position response for one provider and account.
|
|
171
|
+
*
|
|
172
|
+
* @public
|
|
173
|
+
*/
|
|
113
174
|
export interface PositionsResponse {
|
|
114
175
|
provider: string;
|
|
115
176
|
positions: Position[];
|
|
116
177
|
pagination: Pagination;
|
|
117
178
|
}
|
|
118
|
-
/**
|
|
179
|
+
/**
|
|
180
|
+
* Paginated open-order response containing regular and trigger orders.
|
|
181
|
+
*
|
|
182
|
+
* @public
|
|
183
|
+
*/
|
|
119
184
|
export interface OrdersResponse {
|
|
120
185
|
provider: string;
|
|
121
186
|
openOrders: OpenOrder[];
|
|
122
187
|
triggerOrders: TriggerOrder[];
|
|
123
188
|
pagination: Pagination;
|
|
124
189
|
}
|
|
125
|
-
/**
|
|
190
|
+
/**
|
|
191
|
+
* Normalized execution/fill record for an order.
|
|
192
|
+
*
|
|
193
|
+
* @public
|
|
194
|
+
*/
|
|
126
195
|
export interface Fill {
|
|
127
196
|
id: string;
|
|
128
197
|
orderId: string;
|
|
@@ -144,46 +213,81 @@ export interface Fill {
|
|
|
144
213
|
startPosition?: string;
|
|
145
214
|
classification: FillClassification;
|
|
146
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. */
|
|
147
218
|
explorerLink?: string;
|
|
148
219
|
}
|
|
149
|
-
/**
|
|
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
|
+
*/
|
|
150
226
|
export interface Pagination {
|
|
151
227
|
limit: number;
|
|
152
228
|
hasMore: boolean;
|
|
153
229
|
cursor?: string;
|
|
154
230
|
nextUrl?: string;
|
|
155
231
|
}
|
|
156
|
-
/**
|
|
232
|
+
/**
|
|
233
|
+
* Paginated fill response for one provider and account.
|
|
234
|
+
*
|
|
235
|
+
* @public
|
|
236
|
+
*/
|
|
157
237
|
export interface FillsResponse {
|
|
158
238
|
provider: string;
|
|
159
239
|
items: Fill[];
|
|
160
240
|
pagination: Pagination;
|
|
161
241
|
}
|
|
162
|
-
/**
|
|
242
|
+
/**
|
|
243
|
+
* Common identity and timestamp fields shared by account activity records.
|
|
244
|
+
* `timestamp` is an ISO-8601 timestamp string.
|
|
245
|
+
*
|
|
246
|
+
* @public
|
|
247
|
+
*/
|
|
163
248
|
export interface BaseActivity {
|
|
164
249
|
id: string;
|
|
165
250
|
provider: string;
|
|
166
251
|
timestamp: string;
|
|
167
252
|
}
|
|
168
|
-
/**
|
|
253
|
+
/**
|
|
254
|
+
* Account activity representing a completed deposit.
|
|
255
|
+
*
|
|
256
|
+
* @public
|
|
257
|
+
*/
|
|
169
258
|
export interface DepositActivity extends BaseActivity {
|
|
170
259
|
type: ActivityType.DEPOSIT;
|
|
171
260
|
amount: string;
|
|
261
|
+
/** Fully-resolved block-explorer URL for the on-chain deposit tx. */
|
|
172
262
|
explorerLink?: string;
|
|
173
263
|
}
|
|
174
|
-
/**
|
|
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
|
+
*/
|
|
175
270
|
export interface WithdrawalActivity extends BaseActivity {
|
|
176
271
|
type: ActivityType.WITHDRAWAL;
|
|
177
272
|
amount: string;
|
|
178
273
|
fee: string;
|
|
274
|
+
/** Fully-resolved block-explorer URL for the on-chain withdrawal tx. */
|
|
179
275
|
explorerLink?: string;
|
|
180
276
|
}
|
|
181
|
-
/**
|
|
277
|
+
/**
|
|
278
|
+
* Position details attached to a liquidation activity.
|
|
279
|
+
*
|
|
280
|
+
* @public
|
|
281
|
+
*/
|
|
182
282
|
export interface LiquidatedPosition {
|
|
183
283
|
market: MarketDisplay;
|
|
184
284
|
size: string;
|
|
185
285
|
}
|
|
186
|
-
/**
|
|
286
|
+
/**
|
|
287
|
+
* Account activity representing a liquidation event.
|
|
288
|
+
*
|
|
289
|
+
* @public
|
|
290
|
+
*/
|
|
187
291
|
export interface LiquidationActivity extends BaseActivity {
|
|
188
292
|
type: ActivityType.LIQUIDATION;
|
|
189
293
|
liquidatedNotionalPosition: string;
|
|
@@ -191,7 +295,12 @@ export interface LiquidationActivity extends BaseActivity {
|
|
|
191
295
|
leverageType: string;
|
|
192
296
|
liquidatedPositions: LiquidatedPosition[];
|
|
193
297
|
}
|
|
194
|
-
/**
|
|
298
|
+
/**
|
|
299
|
+
* Account activity representing a periodic funding payment. Amount and rate
|
|
300
|
+
* retain provider precision as decimal strings.
|
|
301
|
+
*
|
|
302
|
+
* @public
|
|
303
|
+
*/
|
|
195
304
|
export interface FundingActivity extends BaseActivity {
|
|
196
305
|
type: ActivityType.FUNDING;
|
|
197
306
|
market: MarketDisplay;
|
|
@@ -199,13 +308,19 @@ export interface FundingActivity extends BaseActivity {
|
|
|
199
308
|
positionSize: string;
|
|
200
309
|
fundingRate: string;
|
|
201
310
|
}
|
|
202
|
-
/**
|
|
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
|
+
*/
|
|
203
317
|
export type TransferActivity = BaseActivity & {
|
|
204
318
|
type: ActivityType.TRANSFER;
|
|
205
319
|
direction: 'IN' | 'OUT';
|
|
206
320
|
asset: string;
|
|
207
321
|
amount: string;
|
|
208
322
|
meta?: Record<string, unknown>;
|
|
323
|
+
/** Fully-resolved block-explorer URL for the on-chain transfer tx. */
|
|
209
324
|
explorerLink?: string;
|
|
210
325
|
} & ({
|
|
211
326
|
counterpartyAccountIndex: number;
|
|
@@ -214,24 +329,45 @@ export type TransferActivity = BaseActivity & {
|
|
|
214
329
|
counterpartyAccountIndex?: number;
|
|
215
330
|
counterpartyAddress: string;
|
|
216
331
|
});
|
|
217
|
-
/**
|
|
332
|
+
/**
|
|
333
|
+
* Discriminated union of all activity records returned by a provider.
|
|
334
|
+
*
|
|
335
|
+
* @public
|
|
336
|
+
*/
|
|
218
337
|
export type ActivityItem = DepositActivity | WithdrawalActivity | LiquidationActivity | FundingActivity | TransferActivity;
|
|
219
|
-
/**
|
|
338
|
+
/**
|
|
339
|
+
* Paginated account-activity response for one provider and account.
|
|
340
|
+
*
|
|
341
|
+
* @public
|
|
342
|
+
*/
|
|
220
343
|
export interface ActivitiesResponse {
|
|
221
344
|
provider: string;
|
|
222
345
|
items: ActivityItem[];
|
|
223
346
|
pagination: Pagination;
|
|
224
347
|
}
|
|
225
|
-
/**
|
|
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
|
+
*/
|
|
226
354
|
export type HyperliquidAgent = Record<string, unknown>;
|
|
227
|
-
/**
|
|
355
|
+
/**
|
|
356
|
+
* Hyperliquid builder-fee approval state for an account.
|
|
357
|
+
*
|
|
358
|
+
* @public
|
|
359
|
+
*/
|
|
228
360
|
export interface HyperliquidBuilderFeeApproval {
|
|
229
361
|
builderAddress: string;
|
|
230
362
|
/** Basis points as a string. */
|
|
231
363
|
maxFeeRate: string;
|
|
232
364
|
approved: boolean;
|
|
233
365
|
}
|
|
234
|
-
/**
|
|
366
|
+
/**
|
|
367
|
+
* Hyperliquid account configuration returned in {@link AccountResponse.config}.
|
|
368
|
+
*
|
|
369
|
+
* @public
|
|
370
|
+
*/
|
|
235
371
|
export interface HyperliquidAccountConfig {
|
|
236
372
|
provider: 'hyperliquid';
|
|
237
373
|
/** `null` means abstraction has never been set. */
|
|
@@ -239,7 +375,11 @@ export interface HyperliquidAccountConfig {
|
|
|
239
375
|
agents: HyperliquidAgent[];
|
|
240
376
|
builderFeeApproval?: HyperliquidBuilderFeeApproval;
|
|
241
377
|
}
|
|
242
|
-
/**
|
|
378
|
+
/**
|
|
379
|
+
* Lighter spot-asset collateral setting for a single asset.
|
|
380
|
+
*
|
|
381
|
+
* @public
|
|
382
|
+
*/
|
|
243
383
|
export interface LighterAssetCollateral {
|
|
244
384
|
/** Provider-native spot asset id (matches `Asset.id`). */
|
|
245
385
|
assetId: string;
|
|
@@ -255,7 +395,12 @@ export interface LighterAssetCollateral {
|
|
|
255
395
|
* @public
|
|
256
396
|
*/
|
|
257
397
|
export type LighterProviderKey = 'lighter' | 'lighter-rh';
|
|
258
|
-
/**
|
|
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
|
+
*/
|
|
259
404
|
export interface LighterAccountConfig {
|
|
260
405
|
provider: LighterProviderKey;
|
|
261
406
|
accountIndex: number;
|
|
@@ -285,7 +430,12 @@ export interface LighterAccountConfig {
|
|
|
285
430
|
*/
|
|
286
431
|
referralPresent: boolean;
|
|
287
432
|
}
|
|
288
|
-
/**
|
|
433
|
+
/**
|
|
434
|
+
* Ondo account/session configuration returned in {@link AccountResponse.config}.
|
|
435
|
+
* Expiry values are Unix timestamps in seconds.
|
|
436
|
+
*
|
|
437
|
+
* @public
|
|
438
|
+
*/
|
|
289
439
|
export interface OndoAccountConfig {
|
|
290
440
|
provider: 'ondo';
|
|
291
441
|
loggedIn: boolean;
|
|
@@ -300,15 +450,28 @@ export interface OndoAccountConfig {
|
|
|
300
450
|
/** Canonical Ethereum USDC deposit address, or `null` when none is provisioned. */
|
|
301
451
|
depositAddress: string | null;
|
|
302
452
|
}
|
|
303
|
-
/**
|
|
453
|
+
/**
|
|
454
|
+
* Provider-specific account configuration discriminated by its `provider` key.
|
|
455
|
+
*
|
|
456
|
+
* @public
|
|
457
|
+
*/
|
|
304
458
|
export type AccountConfig = HyperliquidAccountConfig | LighterAccountConfig | OndoAccountConfig;
|
|
305
|
-
/**
|
|
459
|
+
/**
|
|
460
|
+
* Named account-configuration value exposed to clients.
|
|
461
|
+
*
|
|
462
|
+
* @public
|
|
463
|
+
*/
|
|
306
464
|
export interface AccountConfigValue {
|
|
307
465
|
name: string;
|
|
308
466
|
/** `null` means no current value — consumers fall back to the descriptor default. */
|
|
309
467
|
value: string | number | boolean | null;
|
|
310
468
|
}
|
|
311
|
-
/**
|
|
469
|
+
/**
|
|
470
|
+
* Account-configuration action and its available values, optionally including
|
|
471
|
+
* whether the setting is currently satisfied.
|
|
472
|
+
*
|
|
473
|
+
* @public
|
|
474
|
+
*/
|
|
312
475
|
export interface AccountConfigSetting {
|
|
313
476
|
type: ActionType;
|
|
314
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,kBAAkB,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