@liquidium/client 0.3.4 → 0.4.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/index.d.cts CHANGED
@@ -87,17 +87,10 @@ type SupplyAction = (typeof SupplyAction)[keyof typeof SupplyAction];
87
87
  declare const OutflowType: {
88
88
  readonly borrow: "borrow";
89
89
  readonly feeClaim: "feeClaim";
90
- readonly withdraw: "withdraw";
90
+ readonly withdrawal: "withdrawal";
91
91
  };
92
92
  /** Outflow operation reported by the lending canister. */
93
93
  type OutflowType = (typeof OutflowType)[keyof typeof OutflowType];
94
- /** Inflow submit type expected by the SDK API. */
95
- declare const InflowSubmitType: {
96
- readonly DEPOSIT: "DEPOSIT";
97
- readonly REPAY: "REPAY";
98
- };
99
- /** Inflow submit type expected by the SDK API. */
100
- type InflowSubmitType = (typeof InflowSubmitType)[keyof typeof InflowSubmitType];
101
94
  /** Wallet address and chain pair linked to a Liquidium profile. */
102
95
  interface Wallet {
103
96
  /** Chain where the wallet address is valid. */
@@ -113,16 +106,13 @@ interface CanisterContext {
113
106
 
114
107
  /** Asset transfer path used for wallet-executed actions. */
115
108
  declare const TransferMode: {
116
- readonly ck: "ck";
117
109
  readonly native: "native";
118
110
  };
119
111
  /** Asset transfer path used for wallet-executed actions. */
120
112
  type TransferMode = (typeof TransferMode)[keyof typeof TransferMode];
121
113
  /** Wallet capability required to execute a prepared SDK action. */
122
114
  declare const WalletExecutionKind: {
123
- readonly sendEthTransaction: "send-eth-transaction";
124
115
  readonly signMessage: "sign-message";
125
- readonly signPsbt: "sign-psbt";
126
116
  };
127
117
  /** Wallet capability required to execute a prepared SDK action. */
128
118
  type WalletExecutionKind = (typeof WalletExecutionKind)[keyof typeof WalletExecutionKind];
@@ -158,19 +148,6 @@ interface SignMessageRequest {
158
148
  /** Transfer path associated with the action. */
159
149
  transferMode: TransferMode;
160
150
  }
161
- /** PSBT-signing request passed to BTC wallet adapters. */
162
- interface SignPsbtRequest {
163
- /** BTC chain discriminator. */
164
- chain: Extract<Chain, "BTC">;
165
- /** Base64-encoded unsigned PSBT. */
166
- psbtBase64: string;
167
- /** Optional BTC account override. */
168
- account?: string;
169
- /** SDK action type that produced this request. */
170
- actionType: string;
171
- /** Transfer path associated with the action. */
172
- transferMode: TransferMode;
173
- }
174
151
  /** ETH transaction-sending request passed to wallet adapters. */
175
152
  interface SendEthTransactionRequest {
176
153
  /** ETH chain discriminator. */
@@ -205,13 +182,10 @@ interface SendBtcTransactionRequest {
205
182
  * - `signMessage` - account creation, borrow, withdraw
206
183
  * - `sendBtcTransaction` / `sendEthTransaction` - automated transfer-path supply
207
184
  * - `sendEthTransaction` - contract-interaction supply and ETH native sends
208
- * - `signPsbt` - reserved for PSBT-based actions when exposed
209
185
  */
210
186
  interface WalletAdapter {
211
187
  /** Signs an SDK plaintext message and returns the wallet signature. BTC adapters may return base64 BIP-322 or hex-encoded signature bytes. */
212
188
  signMessage?: (request: SignMessageRequest) => Promise<string>;
213
- /** Signs an SDK-provided BTC PSBT and returns the signed PSBT as base64. */
214
- signPsbt?: (request: SignPsbtRequest) => Promise<string>;
215
189
  /** Sends an EVM transaction and returns its transaction hash. */
216
190
  sendEthTransaction?: (request: SendEthTransactionRequest) => Promise<string>;
217
191
  /** Sends a BTC transaction and returns its transaction id. */
@@ -226,20 +200,10 @@ interface SignatureInfo {
226
200
  /** Account that produced the signature, when different from the action default. */
227
201
  account?: string;
228
202
  }
229
- /** Request submitted after a BTC PSBT has been signed. */
230
- interface SignPsbtSubmitRequest {
231
- /** Base64-encoded signed PSBT. */
232
- signedPsbtBase64: string;
233
- }
234
- /** Request submitted after an ETH transaction has been sent. */
235
- interface SendEthTransactionSubmitRequest {
236
- /** EVM transaction hash returned by the wallet. */
237
- txHash: string;
238
- }
239
203
  /** Prepared action that requires message signing before submit. */
240
204
  interface SignMessageWalletAction<TData, TResult> {
241
205
  /** Protocol action kind. */
242
- kind: string;
206
+ kind: WalletActionKind;
243
207
  /** Wallet capability required to execute the action. */
244
208
  executionKind: typeof WalletExecutionKind.signMessage;
245
209
  /** Adapter-facing action type. */
@@ -255,42 +219,8 @@ interface SignMessageWalletAction<TData, TResult> {
255
219
  /** Submits the signature and resolves the protocol result. */
256
220
  submit(signatureInfo: SignatureInfo): Promise<TResult>;
257
221
  }
258
- /** Prepared action that requires BTC PSBT signing before submit. */
259
- interface SignPsbtWalletAction<TResult> {
260
- /** Protocol action kind. */
261
- kind: string;
262
- /** Wallet capability required to execute the action. */
263
- executionKind: typeof WalletExecutionKind.signPsbt;
264
- /** Adapter-facing action type. */
265
- actionType: string;
266
- /** Transfer path associated with the action. */
267
- transferMode: TransferMode;
268
- /** Optional default account to pass to the wallet adapter. */
269
- account?: string;
270
- /** Base64-encoded unsigned PSBT. */
271
- psbtBase64: string;
272
- /** Submits the signed PSBT and resolves the protocol result. */
273
- submit(request: SignPsbtSubmitRequest): Promise<TResult>;
274
- }
275
- /** Prepared action that requires sending an ETH transaction before submit. */
276
- interface SendEthTransactionWalletAction<TResult> {
277
- /** Protocol action kind. */
278
- kind: string;
279
- /** Wallet capability required to execute the action. */
280
- executionKind: typeof WalletExecutionKind.sendEthTransaction;
281
- /** Adapter-facing action type. */
282
- actionType: string;
283
- /** Transfer path associated with the action. */
284
- transferMode: TransferMode;
285
- /** Optional default account to pass to the wallet adapter. */
286
- account?: string;
287
- /** EVM transaction request to send. */
288
- transaction: EthTransactionRequest;
289
- /** Submits the transaction hash and resolves the protocol result. */
290
- submit(request: SendEthTransactionSubmitRequest): Promise<TResult>;
291
- }
292
222
  /** Any prepared action returned by SDK methods and executable by {@link executeWith}. */
293
- type WalletAction<TResult> = SignMessageWalletAction<unknown, TResult> | SignPsbtWalletAction<TResult> | SendEthTransactionWalletAction<TResult>;
223
+ type WalletAction<TResult> = SignMessageWalletAction<unknown, TResult>;
294
224
 
295
225
  /** Options for preparing a profile-creation action. */
296
226
  interface PrepareCreateProfileOptions {
@@ -385,42 +315,30 @@ interface ApiClient {
385
315
  post<TResponse, TBody>(path: string, body: TBody): Promise<TResponse>;
386
316
  }
387
317
 
388
- /** Activity list state filter. */
318
+ /** Lifecycle operation represented by a Liquidium status. */
319
+ type LiquidiumOperation = "deposit" | "borrow" | "repayment" | "withdrawal" | "liquidation";
320
+ /** Lifecycle state represented by a Liquidium status. */
321
+ type LiquidiumState = "action_required" | "confirming" | "processing" | "active" | "completed" | "failed" | "expired";
322
+ /** Shared lifecycle status returned by SDK methods that expose flow state. */
323
+ interface LiquidiumStatus {
324
+ /** Operation currently represented by the status. */
325
+ operation: LiquidiumOperation;
326
+ /** Current lifecycle state for the operation. */
327
+ state: LiquidiumState;
328
+ /** Observed chain confirmations, or null when unavailable or not applicable. */
329
+ confirmations: number | null;
330
+ /** Required confirmations, or null when unavailable or not applicable. */
331
+ requiredConfirmations: number | null;
332
+ }
333
+
334
+ /** Activity list lifecycle filter. */
389
335
  declare const ActivityFilter: {
390
336
  readonly active: "active";
391
337
  readonly completed: "completed";
392
338
  readonly all: "all";
393
339
  };
394
- /** Activity list state filter. */
340
+ /** Activity list lifecycle filter. */
395
341
  type ActivityFilter = (typeof ActivityFilter)[keyof typeof ActivityFilter];
396
- /** Direction of value movement for an activity. */
397
- declare const ActivityDirection: {
398
- readonly inflow: "inflow";
399
- readonly outflow: "outflow";
400
- };
401
- /** Direction of value movement for an activity. */
402
- type ActivityDirection = (typeof ActivityDirection)[keyof typeof ActivityDirection];
403
- /** Consumer-facing activity kind. */
404
- declare const ActivityKind: {
405
- readonly deposit: "deposit";
406
- readonly repayment: "repayment";
407
- readonly borrow: "borrow";
408
- readonly withdraw: "withdraw";
409
- };
410
- /** Consumer-facing activity kind. */
411
- type ActivityKind = (typeof ActivityKind)[keyof typeof ActivityKind];
412
- /** Consumer-facing activity lifecycle status. */
413
- declare const ActivityStatus: {
414
- readonly requested: "requested";
415
- readonly pending: "pending";
416
- readonly detected: "detected";
417
- readonly processing: "processing";
418
- readonly sent: "sent";
419
- readonly confirmed: "confirmed";
420
- readonly failed: "failed";
421
- };
422
- /** Consumer-facing activity lifecycle status. */
423
- type ActivityStatus = (typeof ActivityStatus)[keyof typeof ActivityStatus];
424
342
  /** Fee top-up state for an inflow activity. */
425
343
  interface ActivityTopUp {
426
344
  /** Whether another transfer is needed before processing can continue. */
@@ -432,14 +350,16 @@ interface ActivityTopUp {
432
350
  /** Additional amount needed before processing can start. */
433
351
  shortfallAmount: bigint;
434
352
  }
435
- /** Activity kind emitted by deposit or repayment inflows. */
436
- type InflowActivityKind = typeof ActivityKind.deposit | typeof ActivityKind.repayment;
437
- /** Activity kind emitted by borrow or withdraw outflows. */
438
- type OutflowActivityKind = typeof ActivityKind.borrow | typeof ActivityKind.withdraw;
439
- /** Lifecycle status that can appear on an inflow activity. */
440
- type InflowActivityStatus = typeof ActivityStatus.requested | typeof ActivityStatus.pending | typeof ActivityStatus.detected | typeof ActivityStatus.processing | typeof ActivityStatus.confirmed | typeof ActivityStatus.failed;
441
- /** Lifecycle status that can appear on an outflow activity. */
442
- type OutflowActivityStatus = typeof ActivityStatus.requested | typeof ActivityStatus.pending | typeof ActivityStatus.sent | typeof ActivityStatus.confirmed | typeof ActivityStatus.failed;
353
+ /** Operation emitted by deposit or repayment inflows. */
354
+ type InflowActivityOperation = Extract<LiquidiumOperation, "deposit" | "repayment">;
355
+ /** Operation emitted by borrow or withdrawal outflows. */
356
+ type OutflowActivityOperation = Extract<LiquidiumOperation, "borrow" | "withdrawal">;
357
+ type InflowActivityStatus = LiquidiumStatus & {
358
+ operation: InflowActivityOperation;
359
+ };
360
+ type OutflowActivityStatus = LiquidiumStatus & {
361
+ operation: OutflowActivityOperation;
362
+ };
443
363
  interface BaseActivity {
444
364
  id: string;
445
365
  poolId: string;
@@ -447,29 +367,19 @@ interface BaseActivity {
447
367
  chain: Chain | null;
448
368
  amount: bigint;
449
369
  timestampMs: number;
450
- txid: string | null;
370
+ /** Chain transaction ids associated with the activity when available. */
451
371
  txids?: string[];
452
- confirmations: number | null;
453
- requiredConfirmations: number | null;
454
372
  }
455
373
  /** Deposit or repayment activity returned by the activity API. */
456
374
  interface InflowActivity extends BaseActivity {
457
- /** Direction discriminator. */
458
- direction: typeof ActivityDirection.inflow;
459
- /** Deposit or repayment kind. */
460
- kind: InflowActivityKind;
461
- /** Single consumer-facing lifecycle status. */
375
+ /** Shared consumer-facing lifecycle status. */
462
376
  status: InflowActivityStatus;
463
377
  /** Fee top-up state when the inflow is below the current processing fee. */
464
378
  topUp?: ActivityTopUp;
465
379
  }
466
- /** Borrow or withdraw activity returned by the activity API. */
380
+ /** Borrow or withdrawal activity returned by the activity API. */
467
381
  interface OutflowActivity extends BaseActivity {
468
- /** Direction discriminator. */
469
- direction: typeof ActivityDirection.outflow;
470
- /** Borrow or withdraw kind. */
471
- kind: OutflowActivityKind;
472
- /** Single consumer-facing lifecycle status. */
382
+ /** Shared consumer-facing lifecycle status. */
473
383
  status: OutflowActivityStatus;
474
384
  /** Outflows never carry top-up state. */
475
385
  topUp?: never;
@@ -478,7 +388,7 @@ interface OutflowActivity extends BaseActivity {
478
388
  type Activity = InflowActivity | OutflowActivity;
479
389
  /** Shared request fields for listing activities. */
480
390
  interface BaseListActivitiesRequest {
481
- /** Optional state filter; defaults to `all`. */
391
+ /** Optional lifecycle filter; defaults to `active`. */
482
392
  filter?: ActivityFilter;
483
393
  }
484
394
  /** Activity list request scoped to a Liquidium profile. */
@@ -533,11 +443,11 @@ declare class ActivitiesModule {
533
443
  private readonly canisterContext;
534
444
  constructor(apiClient: ApiClient | undefined, canisterContext: CanisterContext);
535
445
  /**
536
- * Lists profile activities. Defaults to all activities.
446
+ * Lists profile activities. Defaults to active activities.
537
447
  *
538
448
  * Uses the Liquidium SDK API.
539
449
  *
540
- * @param request - Profile id or instant-loan short reference plus optional state filter.
450
+ * @param request - Profile id or instant-loan short reference plus optional lifecycle filter.
541
451
  * @returns Activities owned by the resolved profile.
542
452
  */
543
453
  list(request: ListActivitiesRequest): Promise<Activity[]>;
@@ -554,23 +464,12 @@ declare class ActivitiesModule {
554
464
  private resolveProfileId;
555
465
  }
556
466
 
557
- /** Consumer-facing status for profile transaction history entries. */
558
- declare const UserHistoryStatus: {
559
- readonly requested: "requested";
560
- readonly pending: "pending";
561
- readonly confirmed: "confirmed";
562
- readonly failed: "failed";
563
- };
564
- /** Consumer-facing status for profile transaction history entries. */
565
- type UserHistoryStatus = (typeof UserHistoryStatus)[keyof typeof UserHistoryStatus];
566
- /** Uppercase status value used by SDK API responses. */
567
- type UserHistoryStatusApi = Uppercase<UserHistoryStatus>;
568
- /** User transaction kinds returned by profile transaction history. */
569
- type UserTransactionHistoryType = "supply" | "borrow" | "repay" | "withdraw";
570
- /** User liquidation history kind. */
571
- type UserLiquidationHistoryType = "liquidation";
572
- /** Any user history kind returned by the history API. */
573
- type UserHistoryType = UserTransactionHistoryType | UserLiquidationHistoryType;
467
+ /** User transaction operations returned by profile transaction history. */
468
+ type UserTransactionHistoryOperation = LiquidiumOperation;
469
+ /** Any user history operation returned by the history API. */
470
+ type UserHistoryOperation = UserTransactionHistoryOperation;
471
+ /** Lifecycle states accepted by profile transaction history filters. */
472
+ type UserTransactionHistoryState = Exclude<LiquidiumState, "active" | "expired">;
574
473
  interface BaseUserHistoryEntry {
575
474
  id: string;
576
475
  amount: bigint;
@@ -578,19 +477,15 @@ interface BaseUserHistoryEntry {
578
477
  timestamp: string;
579
478
  txids?: string[];
580
479
  }
581
- /** Supply, borrow, repay, or withdraw entry in user history. */
480
+ /** Deposit, borrow, repayment, withdrawal, or liquidation entry in user history. */
582
481
  interface UserTransactionHistoryEntry extends BaseUserHistoryEntry {
583
- /** Transaction history kind. */
584
- type: UserTransactionHistoryType;
585
482
  /** Current lifecycle status. */
586
- status: UserHistoryStatus;
483
+ status: LiquidiumStatus;
587
484
  }
588
485
  /** Liquidation entry in user history. */
589
486
  interface UserLiquidationHistoryEntry extends BaseUserHistoryEntry {
590
- /** Liquidation kind discriminator. */
591
- type: UserLiquidationHistoryType;
592
- /** Liquidations are only returned once confirmed. */
593
- status: typeof UserHistoryStatus.confirmed;
487
+ /** Current lifecycle status. */
488
+ status: LiquidiumStatus;
594
489
  }
595
490
  /** Any consumer-facing profile history entry. */
596
491
  type UserHistoryEntry = UserTransactionHistoryEntry | UserLiquidationHistoryEntry;
@@ -604,10 +499,10 @@ interface UserTransactionHistoryFilters {
604
499
  market?: string;
605
500
  /** Pool principal text filter. */
606
501
  poolId?: string;
607
- /** Transaction kind filters. */
608
- types?: UserTransactionHistoryType[];
609
- /** Status filters. */
610
- statuses?: UserHistoryEntry["status"][];
502
+ /** Transaction operation filters. */
503
+ operations?: UserTransactionHistoryOperation[];
504
+ /** Lifecycle state filters. */
505
+ states?: UserTransactionHistoryState[];
611
506
  /** Inclusive start timestamp filter accepted by the SDK API. */
612
507
  from?: string;
613
508
  /** Inclusive end timestamp filter accepted by the SDK API. */
@@ -628,131 +523,20 @@ interface UserLiquidationHistoryFilters {
628
523
  /** Inclusive end timestamp filter accepted by the SDK API. */
629
524
  to?: string;
630
525
  }
631
- /** Backwards-compatible alias for user transaction history filters. */
632
- type ActivitiesRequest = UserTransactionHistoryFilters;
633
- /** Time-window and pagination options for borrow APY history. */
634
- interface BorrowApyHistoryRequest {
635
- /** Pagination cursor from a previous response. */
636
- cursor?: string;
637
- /** Maximum number of samples to return. */
638
- limit?: number;
639
- /** Inclusive start timestamp filter accepted by the SDK API. */
640
- from?: string;
641
- /** Inclusive end timestamp filter accepted by the SDK API. */
642
- to?: string;
643
- }
644
- /** Time-window and pagination options for pool rate history. */
645
- type PoolHistoryRequest = BorrowApyHistoryRequest;
646
- /** Borrow APY sample returned to SDK consumers. */
647
- interface ApySample {
648
- /** Sample date from the SDK API. */
649
- date: string;
650
- /** Decimal scale for `avgRate`. */
651
- rateDecimals: bigint;
652
- /** Average borrow rate for the sample, scaled by `rateDecimals`. */
653
- avgRate: bigint;
654
- }
655
526
  /** Wire-format user history item returned by the SDK API. */
656
527
  interface UserHistoryEntryApiItem {
657
528
  id: string;
658
- type: UserHistoryType;
659
529
  amount: string;
660
530
  poolId: string;
661
531
  timestamp: string;
662
- status: UserHistoryStatusApi;
532
+ status: LiquidiumStatus;
663
533
  txids?: string[];
664
534
  }
665
535
  /** Wire-format user history page returned by the SDK API. */
666
536
  interface UserHistoryResponse {
667
- success: true;
668
537
  items: UserHistoryEntryApiItem[];
669
538
  nextCursor?: string;
670
539
  }
671
- /** Pool rate and utilization history entry returned to SDK consumers. */
672
- interface PoolHistoryEntry {
673
- /** Sample date from the SDK API. */
674
- date: string;
675
- /** Decimal scale for rate fields. */
676
- rateDecimals: bigint;
677
- /** Average borrow rate for the sample, scaled by `rateDecimals`. */
678
- avgBorrowRate: bigint;
679
- /** Average lend rate for the sample, scaled by `rateDecimals`. */
680
- avgLendRate: bigint;
681
- /** Average utilization rate for the sample, scaled by `rateDecimals`. */
682
- avgUtilizationRate: bigint;
683
- }
684
- /** Wire-format pool rate history item returned by the SDK API. */
685
- interface PoolHistoryEntryApiItem {
686
- date: string;
687
- rateDecimals: number;
688
- avgBorrowRate: string;
689
- avgLendRate: string;
690
- avgUtilizationRate: string;
691
- }
692
- /** Wire-format pool rate history page returned by the SDK API. */
693
- interface PoolHistoryResponse {
694
- success: true;
695
- items: PoolHistoryEntryApiItem[];
696
- nextCursor?: string;
697
- }
698
- /** Pool configuration snapshot returned to SDK consumers. */
699
- interface PoolConfigHistoryEntry {
700
- type: "configuration_change";
701
- poolId: string;
702
- asset: string;
703
- chain: string;
704
- timestamp: string;
705
- totalSupply: bigint;
706
- totalDebt: bigint;
707
- supplyCap?: bigint;
708
- borrowCap?: bigint;
709
- maxLtv: bigint;
710
- liquidationThreshold: bigint;
711
- liquidationBonus: bigint;
712
- protocolLiquidationFee: bigint;
713
- reserveFactor: bigint;
714
- baseRate: bigint;
715
- optimalUtilizationRate: bigint;
716
- rateSlopeBefore: bigint;
717
- rateSlopeAfter: bigint;
718
- lendingIndex: bigint;
719
- borrowIndex: bigint;
720
- sameAssetBorrowing: boolean;
721
- frozen: boolean;
722
- }
723
- /** Wire-format pool configuration history item returned by the SDK API. */
724
- interface PoolConfigHistoryEntryApiItem {
725
- type: "configuration_change";
726
- poolId: string;
727
- asset: string;
728
- chain: string;
729
- timestamp: string;
730
- totalSupply: string;
731
- totalDebt: string;
732
- supplyCap?: string;
733
- borrowCap?: string;
734
- maxLtv: string;
735
- liquidationThreshold: string;
736
- liquidationBonus: string;
737
- protocolLiquidationFee: string;
738
- reserveFactor: string;
739
- baseRate: string;
740
- optimalUtilizationRate: string;
741
- rateSlopeBefore: string;
742
- rateSlopeAfter: string;
743
- lendingIndex: string;
744
- borrowIndex: string;
745
- sameAssetBorrowing: boolean;
746
- frozen: boolean;
747
- }
748
- /** Wire-format pool configuration history page returned by the SDK API. */
749
- interface PoolConfigHistoryResponse {
750
- success: true;
751
- items: PoolConfigHistoryEntryApiItem[];
752
- nextCursor?: string;
753
- }
754
- /** Any history entry returned by history module methods. */
755
- type HistoryEntry = UserHistoryEntry | PoolHistoryEntry | PoolConfigHistoryEntry;
756
540
  /** Generic SDK API paginated response. */
757
541
  interface PaginatedResponse<T> {
758
542
  /** Items in the current page. */
@@ -761,44 +545,19 @@ interface PaginatedResponse<T> {
761
545
  nextCursor?: string;
762
546
  }
763
547
 
764
- /** Historical pool, rate, user transaction, and liquidation data helpers. */
548
+ /** Historical user transaction and liquidation data helpers. */
765
549
  declare class HistoryModule {
766
550
  private readonly apiClient;
767
551
  constructor(apiClient: ApiClient | undefined);
768
552
  private requireApi;
769
- /**
770
- * Returns paginated rate and utilization history for a pool.
771
- *
772
- * @param poolId - The pool principal text.
773
- * @param window - Optional time window with from/to timestamps and limit.
774
- * @returns A page of pool rate history entries and the next cursor when more results are available.
775
- */
776
- getPoolHistory(poolId: string, window?: PoolHistoryRequest): Promise<PaginatedResponse<PoolHistoryEntry>>;
777
- /**
778
- * Returns paginated configuration change history for a pool.
779
- *
780
- * @param poolId - The pool principal text.
781
- * @param cursor - An optional pagination cursor from a previous response.
782
- * @returns A page of pool configuration changes and the next cursor when more results are available.
783
- */
784
- getPoolConfigHistory(poolId: string, cursor?: string): Promise<PaginatedResponse<PoolConfigHistoryEntry>>;
785
- /**
786
- * Returns borrow rate history for a pool.
787
- *
788
- * @param poolId - The pool principal text.
789
- * @param window - Optional time window with from/to timestamps and limit.
790
- * @returns Paginated APY samples.
791
- */
792
- getBorrowRateHistory(poolId: string, window?: BorrowApyHistoryRequest): Promise<PaginatedResponse<ApySample>>;
793
553
  /**
794
554
  * Returns transaction history for a user.
795
555
  *
796
556
  * @param user - The Liquidium profile principal text.
797
- * @param filters - Optional pool, type, status, time range, and pagination filters.
557
+ * @param filters - Optional pool, operation, state, time range, and pagination filters.
798
558
  * @returns Paginated user history entries.
799
559
  */
800
560
  getUserTransactionHistory(user: string, filters?: UserTransactionHistoryFilters): Promise<PaginatedResponse<UserTransactionHistoryEntry>>;
801
- getUserTransactionHistory(user: string, market?: string, filters?: UserTransactionHistoryFilters): Promise<PaginatedResponse<UserTransactionHistoryEntry>>;
802
561
  /**
803
562
  * Returns liquidation history for a user.
804
563
  *
@@ -807,7 +566,6 @@ declare class HistoryModule {
807
566
  * @returns Paginated liquidation history entries.
808
567
  */
809
568
  getLiquidationHistory(user: string, filters?: UserLiquidationHistoryFilters): Promise<PaginatedResponse<UserLiquidationHistoryEntry>>;
810
- getLiquidationHistory(user: string, market?: string, filters?: UserLiquidationHistoryFilters): Promise<PaginatedResponse<UserLiquidationHistoryEntry>>;
811
569
  }
812
570
 
813
571
  /** Wallet execution dependencies for borrow and withdraw convenience methods. */
@@ -868,7 +626,7 @@ interface IcrcOutflowReceiver {
868
626
  account: string;
869
627
  }
870
628
  /**
871
- * Receipt for a borrow or withdraw submitted to the lending canister.
629
+ * Receipt for a borrow or withdrawal outflow submitted to the lending canister.
872
630
  *
873
631
  * `id` is the outflow reference to show users immediately. `txid` may be unset until
874
632
  * the protocol assigns a chain transaction id. `outflowRef` is an optional protocol reference.
@@ -876,7 +634,7 @@ interface IcrcOutflowReceiver {
876
634
  interface OutflowDetails {
877
635
  /** Protocol outflow id. */
878
636
  id: string;
879
- /** Borrow, withdraw, or fee-claim discriminator. */
637
+ /** Borrow, withdrawal, or fee-claim discriminator. */
880
638
  outflowType: OutflowType;
881
639
  /** Optional protocol outflow reference. */
882
640
  outflowRef?: string;
@@ -890,10 +648,14 @@ interface OutflowDetails {
890
648
  /** Borrow receipt. */
891
649
  type BorrowOutflowDetails = OutflowDetails & {
892
650
  outflowType: "borrow";
651
+ /** Shared lifecycle status for the borrow outflow receipt. */
652
+ status: LiquidiumStatus;
893
653
  };
894
654
  /** Withdraw receipt. */
895
655
  type WithdrawOutflowDetails = OutflowDetails & {
896
- outflowType: "withdraw";
656
+ outflowType: "withdrawal";
657
+ /** Shared lifecycle status for the withdraw outflow receipt. */
658
+ status: LiquidiumStatus;
897
659
  };
898
660
  /** Signature payload for submitting a prepared borrow action. */
899
661
  interface BorrowSubmitSignatureInfo extends SignatureInfo {
@@ -931,15 +693,16 @@ interface BorrowAction extends SignMessageWalletAction<CreateBorrowData, BorrowO
931
693
  /** Adapter-facing action type. */
932
694
  actionType: typeof WalletActionKind.createBorrow;
933
695
  }
934
- /**
935
- * Fields to build a withdraw request. `amount` is in the pool asset's base units.
936
- */
696
+ /** Fields to build a withdraw request. `amount` is in the pool asset's base units. */
937
697
  interface CreateWithdrawRequest {
938
698
  /** Liquidium profile principal text. */
939
699
  profileId: string;
940
700
  /** Pool principal text to withdraw from. */
941
701
  poolId: string;
942
- /** Amount to withdraw in the pool asset's base units. */
702
+ /**
703
+ * Amount to withdraw in the pool asset's base units. BTC withdrawals require
704
+ * at least 5,000 sats. USDC and USDT withdrawals require at least 1 token.
705
+ */
943
706
  amount: bigint;
944
707
  /** External-chain address that receives the withdrawn asset. Must match the pool chain. */
945
708
  receiverAddress: string;
@@ -1052,6 +815,8 @@ type SupplyFlowRequest = TransferSupplyFlowRequest | ContractInteractionSupplyFl
1052
815
  * (wallet-adapter path). When undefined, the caller is expected to broadcast
1053
816
  * themselves and call {@link SupplyFlow.submit} for flows that require txid
1054
817
  * registration.
818
+ * - If post-broadcast inflow registration fails after the SDK broadcasts the
819
+ * transaction, `txid` is still returned so callers can track the transaction.
1055
820
  * - `submit` registers a broadcast txid with the SDK API when needed. ETH
1056
821
  * stablecoin deposit-address transfers are indexed from ERC-20 transfer logs,
1057
822
  * so `submit` acknowledges the txid without posting it to the inflow endpoint.
@@ -1066,22 +831,27 @@ interface SupplyFlow {
1066
831
  target: SupplyTarget;
1067
832
  /** Transaction id when the SDK broadcast the transaction. */
1068
833
  txid?: string;
834
+ /** Shared lifecycle status for the supply flow. */
835
+ status: LiquidiumStatus;
1069
836
  /** Registers a broadcast transaction id when the flow requires an indexing hint. */
1070
- submit(request: SubmitInflowRequest): Promise<SubmitInflowResponse>;
837
+ submit(request: SubmitSupplyFlowInflowRequest): Promise<SubmitInflowResponse>;
1071
838
  }
1072
- /** Body for `SupplyFlow.submit` / `lending.submitInflow`. */
1073
- interface SubmitInflowRequest {
839
+ /** Canonical inflow operation accepted by direct inflow submission. */
840
+ type InflowOperation = Extract<LiquidiumOperation, "deposit" | "repayment">;
841
+ /** Body for `SupplyFlow.submit`. The supply flow supplies the inflow operation. */
842
+ interface SubmitSupplyFlowInflowRequest {
1074
843
  /** Broadcast transaction id or hash. */
1075
844
  txid: string;
1076
845
  /** Chain where the transaction was broadcast, when not implied by the flow. */
1077
846
  chain?: Chain;
1078
- /** Deposit or repayment submit type, when not implied by the flow. */
1079
- type?: InflowSubmitType;
847
+ }
848
+ /** Body for direct `lending.submitInflow`. */
849
+ interface SubmitInflowRequest extends SubmitSupplyFlowInflowRequest {
850
+ /** Deposit or repayment operation represented by the transaction. */
851
+ operation: InflowOperation;
1080
852
  }
1081
853
  /** Acknowledgement from the SDK API after submitting an inflow hint. */
1082
854
  interface SubmitInflowResponse {
1083
- /** Indicates the submit request was accepted by the SDK API. */
1084
- success: true;
1085
855
  /** Transaction id accepted by the SDK API. */
1086
856
  txid: string;
1087
857
  }
@@ -1131,8 +901,6 @@ declare const EvmSupplyApprovalStrategy: {
1131
901
  type EvmSupplyApprovalStrategy = (typeof EvmSupplyApprovalStrategy)[keyof typeof EvmSupplyApprovalStrategy];
1132
902
  /** ERC-20 supply planning data returned by `lending.getEvmSupplyContext(...)`. */
1133
903
  interface EvmSupplyContext {
1134
- /** Indicates the context was computed successfully. */
1135
- success: true;
1136
904
  /** Liquidium profile principal text. */
1137
905
  profileId: string;
1138
906
  /** Pool principal text receiving the inflow. */
@@ -1235,7 +1003,6 @@ declare class LendingModule {
1235
1003
  * @returns Locally computed {@link EvmSupplyContext} for approvals and deposit.
1236
1004
  */
1237
1005
  getEvmSupplyContext(request: GetEvmSupplyContextRequest): Promise<EvmSupplyContext>;
1238
- private getEvmSupplyContextForPool;
1239
1006
  /**
1240
1007
  * Returns the read-only deposit address for an ETH stablecoin inflow target.
1241
1008
  *
@@ -1257,17 +1024,12 @@ declare class LendingModule {
1257
1024
  */
1258
1025
  estimateInflowFee(request: EstimateInflowFeeRequest): Promise<InflowFeeEstimate>;
1259
1026
  private estimateBtcInflowFee;
1260
- private sendAndSubmitNativeSupplyInflow;
1261
- private submitSupplyFlowInflow;
1262
- private executeContractSupply;
1263
- private sendNativeSupplyTransaction;
1264
- private submitInflowWithRetry;
1265
1027
  /**
1266
1028
  * Submits an inflow transaction id for faster indexing.
1267
1029
  *
1268
1030
  * Uses the Liquidium SDK API.
1269
1031
  *
1270
- * @param request - Broadcast `txid` plus optional `chain` and inflow `type`.
1032
+ * @param request - Broadcast `txid` plus inflow `operation` and optional `chain`.
1271
1033
  * @returns Acknowledgement including the submitted `txid`.
1272
1034
  */
1273
1035
  submitInflow(request: SubmitInflowRequest): Promise<SubmitInflowResponse>;
@@ -1278,11 +1040,8 @@ declare class LendingModule {
1278
1040
  */
1279
1041
  isBorrowingDisabled(): Promise<boolean>;
1280
1042
  private requireApi;
1281
- private requireEvmReadClient;
1043
+ private createSupplyFlowExecutor;
1282
1044
  private getPoolById;
1283
- private normalizeOutflowReceiverAddress;
1284
- private sendEthContractTransaction;
1285
- private waitForExpectedAllowance;
1286
1045
  }
1287
1046
 
1288
1047
  /** Current protocol metadata and rate state for a lending pool. */
@@ -1366,12 +1125,13 @@ interface PoolRate {
1366
1125
  /** Pool metadata, prices, and current rate helpers. */
1367
1126
  declare class MarketModule {
1368
1127
  private readonly canisterContext;
1369
- private readonly apiClient;
1370
- constructor(canisterContext: CanisterContext, apiClient: ApiClient | undefined);
1128
+ constructor(canisterContext: CanisterContext);
1371
1129
  /**
1372
- * Lists all pools with their current rates.
1130
+ * Lists SDK-supported pools with their current rates.
1131
+ *
1132
+ * Unsupported asset or chain variants returned by the canister are omitted.
1373
1133
  *
1374
- * @returns All configured lending pools enriched with their current rate data.
1134
+ * @returns Supported lending pools enriched with their current rate data.
1375
1135
  */
1376
1136
  listPools(): Promise<Pool[]>;
1377
1137
  /**
@@ -1944,16 +1704,6 @@ interface InstantLoanPositionSummary {
1944
1704
  /** Borrowed principal plus accrued interest in base units, before repayment buffer. */
1945
1705
  totalDebtAmount: bigint;
1946
1706
  }
1947
- /** Simplified lifecycle status for consumer UIs. */
1948
- declare const InstantLoanStatus: {
1949
- readonly awaitingDeposit: "awaiting_deposit";
1950
- readonly depositDetected: "deposit_detected";
1951
- readonly active: "active";
1952
- readonly settling: "settling";
1953
- readonly closed: "closed";
1954
- readonly expired: "expired";
1955
- };
1956
- type InstantLoanStatus = (typeof InstantLoanStatus)[keyof typeof InstantLoanStatus];
1957
1707
  /** Immutable terms selected for an instant loan. */
1958
1708
  interface InstantLoanTerms {
1959
1709
  /** Maximum loan-to-value ratio in basis points. */
@@ -1995,8 +1745,8 @@ interface InstantLoan {
1995
1745
  loanId: bigint;
1996
1746
  /** Short user-facing reference derived from `loanId`. */
1997
1747
  ref: string;
1998
- /** Simplified lifecycle status for display and flow control. */
1999
- status: InstantLoanStatus;
1748
+ /** Shared lifecycle status for display and flow control. */
1749
+ status: LiquidiumStatus;
2000
1750
  /** Generated profile principal used by the instant loan. */
2001
1751
  profileId: string;
2002
1752
  /** Immutable loan terms. */
@@ -2019,9 +1769,10 @@ interface InstantLoan {
2019
1769
  declare class InstantLoansModule {
2020
1770
  private readonly canisterContext;
2021
1771
  private readonly apiClient;
1772
+ private readonly activities;
2022
1773
  private readonly lending;
2023
1774
  private readonly positions;
2024
- constructor(canisterContext: CanisterContext, apiClient: ApiClient | undefined, lending: LendingModule, positions: PositionsModule);
1775
+ constructor(canisterContext: CanisterContext, apiClient: ApiClient | undefined, activities: ActivitiesModule, lending: LendingModule, positions: PositionsModule);
2025
1776
  /**
2026
1777
  * Creates a profileless instant loan and returns canonical canister state plus
2027
1778
  * generated initial-deposit and repayment quote targets.
@@ -2389,6 +2140,20 @@ declare const RATE_SCALE = 1000000000000000000000000000n;
2389
2140
  /** Number of decimal places represented by {@link RATE_SCALE}. */
2390
2141
  declare const RATE_DECIMALS: bigint;
2391
2142
 
2143
+ /** Minimum withdraw amounts in each asset's base units. */
2144
+ declare const MIN_WITHDRAW_AMOUNTS_BY_ASSET: {
2145
+ readonly BTC: 5000n;
2146
+ readonly USDC: 1000000n;
2147
+ readonly USDT: 1000000n;
2148
+ };
2149
+ type MinimumWithdrawAsset = keyof typeof MIN_WITHDRAW_AMOUNTS_BY_ASSET;
2150
+ /**
2151
+ * Returns the minimum withdraw amount for an asset in base units.
2152
+ *
2153
+ * Assets without a configured product minimum return `0n`.
2154
+ */
2155
+ declare function getMinimumWithdrawAmount(asset: string): bigint;
2156
+
2392
2157
  /**
2393
2158
  * Wallet wiring for {@link executeWith}.
2394
2159
  *
@@ -2407,12 +2172,10 @@ interface ExecuteWithOptions {
2407
2172
  * Returns an async function that runs a {@link WalletAction} end-to-end.
2408
2173
  *
2409
2174
  * - `sign-message`: needs `walletAdapter.signMessage` and `options.chain`.
2410
- * - `sign-psbt`: needs `walletAdapter.signPsbt`.
2411
- * - `send-eth-transaction`: needs `walletAdapter.sendEthTransaction`.
2412
2175
  *
2413
2176
  * @param options - Adapter and optional chain/account overrides.
2414
2177
  * @returns A function that accepts a `WalletAction` and resolves with its submit result.
2415
2178
  */
2416
2179
  declare function executeWith(options: ExecuteWithOptions): <TResult>(action: WalletAction<TResult>) => Promise<TResult>;
2417
2180
 
2418
- export { type AccountIdentifierAccount, type AccountIdentifierOutflowReceiver, AccountsModule, ActivitiesModule, type ActivitiesRequest, type Activity, ActivityDirection, ActivityFilter, ActivityKind, ActivityStatus, type ActivityStatusFoundResponse, type ActivityStatusNotFoundResponse, type ActivityTopUp, type ApySample, Asset, type AssetPrices, type BaseGetActivityStatusRequest, type BaseListActivitiesRequest, type BorrowAction, type BorrowApyHistoryRequest, type BorrowOutflowDetails, type BorrowSubmitSignatureInfo, type BorrowingPower, CK_ETH_DEPOSIT_CONTRACT_ADDRESS, type CalculateLtvRequest, type CanisterIds, Chain, type ContractInteractionSupplyFlowRequest, type CreateAccountAction, type CreateAccountData, type CreateAccountRequest, type CreateBorrowData, type CreateBorrowRequest, type CreateInstantLoanRequest, type CreateProfileParams, type CreateTransferErc20TransactionParams, type CreateWithdrawData, type CreateWithdrawRequest, Environment, type EstimateInflowFeeRequest, type EthTransactionRequest, type EvmContractTransaction, type EvmReadClient, EvmSupplyApprovalStrategy, type EvmSupplyContext, type ExecuteWithOptions, type ExternalAccount, type ExternalOutflowReceiver, type FindPoolQuery, type FullWithdrawAmount, type GetActivityStatusByProfileRequest, type GetActivityStatusByShortRefRequest, type GetActivityStatusRequest, type GetActivityStatusResponse, type GetDepositAddressRequest, type GetEvmSupplyContextRequest, type HealthFactor, type HistoryEntry, HistoryModule, type IcrcAccount, type IcrcAccountSupplyTarget, type IcrcOutflowReceiver, type InflowActivity, type InflowActivityKind, type InflowActivityStatus, type InflowFeeEstimate, InflowSubmitType, type InstantLoan, type InstantLoanAccount, type InstantLoanAsset, type InstantLoanAuthorization, type InstantLoanBorrow, type InstantLoanBorrowRequestedEventType, type InstantLoanCollateral, type InstantLoanConfig, type InstantLoanCreatedEventType, type InstantLoanDepositTimerExceededEventType, type InstantLoanDepositTimerStartedEventType, type InstantLoanEvent, type InstantLoanEventType, type InstantLoanFindBorrow, type InstantLoanFindCollateral, type InstantLoanFindResult, type InstantLoanFullLendWithdrawalRequestedEventType, type InstantLoanGetByIdRequest, type InstantLoanGetByRefRequest, type InstantLoanGetRequest, type InstantLoanInitialDeposit, type InstantLoanLeg, type InstantLoanListEventsRequest, type InstantLoanPositionSummary, type InstantLoanProfileWarmedEventType, type InstantLoanRepayCompleteEventType, type InstantLoanRepayment, InstantLoanStatus, type InstantLoanStuckFundsWithdrawalRequestedEventType, type InstantLoanTerms, type InstantLoanWarmedProfile, InstantLoansModule, LendingModule, LiquidiumClient, type LiquidiumClientConfig, LiquidiumError, LiquidiumErrorCode, type LiquidiumErrorContext, type ListActivitiesByProfileRequest, type ListActivitiesByShortRefRequest, type ListActivitiesRequest, type LtvCalculation, MIN_BORROW_AMOUNTS_BY_ASSET, type ManualTransferSupplyFlowRequest, type MarketAsset, type MarketChain, MarketModule, type MaxRepayAmount, type MinimumBorrowAsset, type NativeAccount, type NativeAddressSupplyTarget, type NativeOutflowReceiver, type OutflowActivity, type OutflowActivityKind, type OutflowActivityStatus, type OutflowDetails, type OutflowReceiver, OutflowType, type PaginatedResponse, type Pool, type PoolConfigHistoryEntry, type PoolConfigHistoryEntryApiItem, type PoolConfigHistoryResponse, type PoolHistoryEntry, type PoolHistoryEntryApiItem, type PoolHistoryRequest, type PoolHistoryResponse, type PoolRate, type Position, PositionsModule, type PrepareCreateProfileOptions, QuoteModule, type QuoteRequest, type QuoteResult, type QuoteValidationError, QuoteValidationErrorCode, type QuoteWarning, QuoteWarningCode, RATE_DECIMALS, RATE_SCALE, type SendBtcTransactionRequest, type SendEthTransactionRequest, type SendEthTransactionSubmitRequest, type SendEthTransactionWalletAction, type SignMessageRequest, type SignMessageWalletAction, type SignPsbtRequest, type SignPsbtSubmitRequest, type SignPsbtWalletAction, type SignableAction, type SignatureInfo, type SubmitInflowRequest, type SubmitInflowResponse, SupplyAction, type SupplyFlow, type SupplyFlowRequest, SupplyPlanType, type SupplyTarget, TransferMode, type TransferSupplyFlowRequest, USDC_CONTRACT_ADDRESS, USDT_CONTRACT_ADDRESS, type UserHistoryEntry, type UserHistoryEntryApiItem, type UserHistoryResponse, UserHistoryStatus, type UserHistoryStatusApi, type UserHistoryType, type UserLiquidationHistoryEntry, type UserLiquidationHistoryFilters, type UserLiquidationHistoryType, type UserPositionSummary, type UserReserve, type UserStats, type UserTransactionHistoryEntry, type UserTransactionHistoryFilters, type UserTransactionHistoryType, type Wallet, type WalletAction, type WalletAdapter, WalletExecutionKind, type WalletExecutionParams, type WalletTransferSupplyFlowRequest, type WithdrawAction, type WithdrawOutflowDetails, type WithdrawSubmitSignatureInfo, createTransferErc20Transaction, executeWith, getMinimumBorrowAmount, intFromPublicId, publicIdFromInt };
2181
+ export { type AccountIdentifierAccount, type AccountIdentifierOutflowReceiver, AccountsModule, ActivitiesModule, type Activity, ActivityFilter, type ActivityStatusFoundResponse, type ActivityStatusNotFoundResponse, type ActivityTopUp, Asset, type AssetPrices, type BaseGetActivityStatusRequest, type BaseListActivitiesRequest, type BorrowAction, type BorrowOutflowDetails, type BorrowSubmitSignatureInfo, type BorrowingPower, CK_ETH_DEPOSIT_CONTRACT_ADDRESS, type CalculateLtvRequest, type CanisterIds, Chain, type ContractInteractionSupplyFlowRequest, type CreateAccountAction, type CreateAccountData, type CreateAccountRequest, type CreateBorrowData, type CreateBorrowRequest, type CreateInstantLoanRequest, type CreateProfileParams, type CreateTransferErc20TransactionParams, type CreateWithdrawData, type CreateWithdrawRequest, Environment, type EstimateInflowFeeRequest, type EthTransactionRequest, type EvmContractTransaction, type EvmReadClient, EvmSupplyApprovalStrategy, type EvmSupplyContext, type ExecuteWithOptions, type ExternalAccount, type ExternalOutflowReceiver, type FindPoolQuery, type FullWithdrawAmount, type GetActivityStatusByProfileRequest, type GetActivityStatusByShortRefRequest, type GetActivityStatusRequest, type GetActivityStatusResponse, type GetDepositAddressRequest, type GetEvmSupplyContextRequest, type HealthFactor, HistoryModule, type IcrcAccount, type IcrcAccountSupplyTarget, type IcrcOutflowReceiver, type InflowActivity, type InflowActivityOperation, type InflowActivityStatus, type InflowFeeEstimate, type InflowOperation, type InstantLoan, type InstantLoanAccount, type InstantLoanAsset, type InstantLoanAuthorization, type InstantLoanBorrow, type InstantLoanBorrowRequestedEventType, type InstantLoanCollateral, type InstantLoanConfig, type InstantLoanCreatedEventType, type InstantLoanDepositTimerExceededEventType, type InstantLoanDepositTimerStartedEventType, type InstantLoanEvent, type InstantLoanEventType, type InstantLoanFindBorrow, type InstantLoanFindCollateral, type InstantLoanFindResult, type InstantLoanFullLendWithdrawalRequestedEventType, type InstantLoanGetByIdRequest, type InstantLoanGetByRefRequest, type InstantLoanGetRequest, type InstantLoanInitialDeposit, type InstantLoanLeg, type InstantLoanListEventsRequest, type InstantLoanPositionSummary, type InstantLoanProfileWarmedEventType, type InstantLoanRepayCompleteEventType, type InstantLoanRepayment, type InstantLoanStuckFundsWithdrawalRequestedEventType, type InstantLoanTerms, type InstantLoanWarmedProfile, InstantLoansModule, LendingModule, LiquidiumClient, type LiquidiumClientConfig, LiquidiumError, LiquidiumErrorCode, type LiquidiumErrorContext, type LiquidiumOperation, type LiquidiumState, type LiquidiumStatus, type ListActivitiesByProfileRequest, type ListActivitiesByShortRefRequest, type ListActivitiesRequest, type LtvCalculation, MIN_BORROW_AMOUNTS_BY_ASSET, MIN_WITHDRAW_AMOUNTS_BY_ASSET, type ManualTransferSupplyFlowRequest, type MarketAsset, type MarketChain, MarketModule, type MaxRepayAmount, type MinimumBorrowAsset, type MinimumWithdrawAsset, type NativeAccount, type NativeAddressSupplyTarget, type NativeOutflowReceiver, type OutflowActivity, type OutflowActivityOperation, type OutflowActivityStatus, type OutflowDetails, type OutflowReceiver, OutflowType, type PaginatedResponse, type Pool, type PoolRate, type Position, PositionsModule, type PrepareCreateProfileOptions, QuoteModule, type QuoteRequest, type QuoteResult, type QuoteValidationError, QuoteValidationErrorCode, type QuoteWarning, QuoteWarningCode, RATE_DECIMALS, RATE_SCALE, type SendBtcTransactionRequest, type SendEthTransactionRequest, type SignMessageRequest, type SignMessageWalletAction, type SignableAction, type SignatureInfo, type SubmitInflowRequest, type SubmitInflowResponse, type SubmitSupplyFlowInflowRequest, SupplyAction, type SupplyFlow, type SupplyFlowRequest, SupplyPlanType, type SupplyTarget, TransferMode, type TransferSupplyFlowRequest, USDC_CONTRACT_ADDRESS, USDT_CONTRACT_ADDRESS, type UserHistoryEntry, type UserHistoryEntryApiItem, type UserHistoryOperation, type UserHistoryResponse, type UserLiquidationHistoryEntry, type UserLiquidationHistoryFilters, type UserPositionSummary, type UserReserve, type UserStats, type UserTransactionHistoryEntry, type UserTransactionHistoryFilters, type UserTransactionHistoryOperation, type UserTransactionHistoryState, type Wallet, type WalletAction, WalletActionKind, type WalletAdapter, WalletExecutionKind, type WalletExecutionParams, type WalletTransferSupplyFlowRequest, type WithdrawAction, type WithdrawOutflowDetails, type WithdrawSubmitSignatureInfo, createTransferErc20Transaction, executeWith, getMinimumBorrowAmount, getMinimumWithdrawAmount, intFromPublicId, publicIdFromInt };