superstack-wallet-sdk 0.5.2 → 0.5.4

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.
@@ -110,8 +110,9 @@ export interface IModalManager {
110
110
  enableGoogle?: boolean;
111
111
  enableTwitter?: boolean;
112
112
  enablePhantom?: boolean;
113
+ isBackup?: boolean;
113
114
  }) => Promise<void>;
114
- hideModal: () => void;
115
+ hideModal: (isBackup?: boolean) => void;
115
116
  }
116
117
  export interface MiddleAccountRequest {
117
118
  order_id: string;
@@ -186,3 +187,135 @@ export type BuildTransactionRequest = {
186
187
  export interface BuildTransactionResponse {
187
188
  raw_transaction: string;
188
189
  }
190
+ export type BigDecimalString = string;
191
+ export declare enum BorrowedAsset {
192
+ HypercorePerpsUSDC = "HypercorePerpsUSDC"
193
+ }
194
+ export declare enum CollateralAsset {
195
+ HypercoreSpotBTC = "HypercoreSpotBTC"
196
+ }
197
+ export declare enum CrossMarginPositionStatus {
198
+ Open = "Open",
199
+ Closed = "Closed",
200
+ PartiallyLiquidated = "PartiallyLiquidated",
201
+ AllLiquidated = "AllLiquidated"
202
+ }
203
+ export declare enum CrossMarginOperationType {
204
+ Borrow = "Borrow",
205
+ Repay = "Repay",
206
+ AddMargin = "AddMargin",
207
+ RemoveMargin = "RemoveMargin",
208
+ Liquidation = "Liquidation"
209
+ }
210
+ export interface CollateralAssetInfo {
211
+ amount: BigDecimalString;
212
+ contribution?: number;
213
+ liquidation_price?: number;
214
+ }
215
+ export interface CrossMarginBorrowQuoteRequest {
216
+ collateral_assets: Partial<Record<CollateralAsset, BigDecimalString>>;
217
+ }
218
+ export interface CrossMarginBorrowQuoteResponse {
219
+ quote_id: string;
220
+ collateral_asset_infos: Record<CollateralAsset, CollateralAssetInfo>;
221
+ total_collateral_value: number;
222
+ borrowed_asset: BorrowedAsset;
223
+ max_borrowed_amount: BigDecimalString;
224
+ max_borrowed_value: number;
225
+ created_at: number;
226
+ expires_at: number;
227
+ }
228
+ export interface CrossMarginBorrowRequest {
229
+ network: Network;
230
+ address: string;
231
+ quote_id: string;
232
+ collateral_assets: Partial<Record<CollateralAsset, BigDecimalString>>;
233
+ borrowed_asset: BorrowedAsset;
234
+ borrowed_amount: BigDecimalString;
235
+ }
236
+ export interface CrossMarginBorrowResponse {
237
+ position_id: string;
238
+ }
239
+ export interface CrossMarginRepayQuoteRequest {
240
+ position_id: string;
241
+ }
242
+ export interface CrossMarginRepayQuoteResponse {
243
+ quote_id: string;
244
+ repay_asset: BorrowedAsset;
245
+ borrowed_amount: BigDecimalString;
246
+ interest_cost: BigDecimalString;
247
+ repay_amount: BigDecimalString;
248
+ created_at: number;
249
+ expires_at: number;
250
+ }
251
+ export interface CrossMarginRepayRequest {
252
+ position_id: string;
253
+ quote_id: string;
254
+ repay_asset: BorrowedAsset;
255
+ repay_amount: BigDecimalString;
256
+ }
257
+ export interface CrossMarginRepayResponse {
258
+ position_id: string;
259
+ }
260
+ export interface CrossMarginAdjustMarginRequest {
261
+ position_id: string;
262
+ is_add_margin: boolean;
263
+ collateral_assets: Partial<Record<CollateralAsset, BigDecimalString>>;
264
+ }
265
+ export interface CrossMarginAdjustMarginResponse {
266
+ position_id: string;
267
+ }
268
+ export interface BorrowedAssetGeneralInfo {
269
+ interest_rate_hourly: number;
270
+ interest_rate_annual: number;
271
+ available_amount: number;
272
+ max_borrowable_amount: number;
273
+ }
274
+ export interface CollateralAssetGeneralInfo {
275
+ liquidation_threshold: number;
276
+ h_vol: number;
277
+ price: number;
278
+ }
279
+ export interface CrossMarginGeneralInfoResponse {
280
+ collateral_info: Record<CollateralAsset, CollateralAssetGeneralInfo>;
281
+ borrowed_info: Record<BorrowedAsset, BorrowedAssetGeneralInfo>;
282
+ }
283
+ export interface UserOpenPositionInfo {
284
+ position_id: string;
285
+ collateral_assets: Record<CollateralAsset, CollateralAssetInfo>;
286
+ borrowed_asset: BorrowedAsset;
287
+ borrowed_amount: BigDecimalString;
288
+ created_at: number;
289
+ updated_at: number;
290
+ current_ltv: number;
291
+ margin_call_ltv: number;
292
+ liquidation_ltv: number;
293
+ interest_cost: number;
294
+ }
295
+ export interface UserOpenPositionsResponse {
296
+ positions: UserOpenPositionInfo[];
297
+ }
298
+ export interface UserClosedPositionInfo {
299
+ position_id: string;
300
+ collateral_assets: Record<CollateralAsset, CollateralAssetInfo>;
301
+ borrowed_asset: BorrowedAsset;
302
+ borrowed_amount: BigDecimalString;
303
+ created_at: number;
304
+ closed_at: number;
305
+ interest_cost: number;
306
+ status: CrossMarginPositionStatus;
307
+ repaid_amount?: number;
308
+ }
309
+ export interface UserOperationInfo {
310
+ position_id: string;
311
+ operation_id: string;
312
+ created_at: number;
313
+ finished_at: number;
314
+ operation_type: CrossMarginOperationType;
315
+ amount: BigDecimalString;
316
+ symbol: string;
317
+ }
318
+ export interface UserHistoryResponse {
319
+ positions: UserClosedPositionInfo[];
320
+ operations: UserOperationInfo[];
321
+ }