@liquidium/client 0.1.0 → 0.1.2
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/LICENSE +21 -0
- package/README.md +10 -3
- package/dist/index.cjs +14 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/package.json +10 -12
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Identity, HttpAgent } from '@
|
|
1
|
+
import { Identity, HttpAgent } from '@icp-sdk/core/agent';
|
|
2
2
|
import { PublicClient } from 'viem';
|
|
3
3
|
|
|
4
4
|
/** Minimal viem-compatible client shape required for SDK EVM read calls. */
|
|
@@ -12,7 +12,7 @@ type EvmReadClient = Pick<PublicClient, "readContract">;
|
|
|
12
12
|
interface LiquidiumClientConfig {
|
|
13
13
|
/** Preset canister IDs. Only `mainnet` is bundled. */
|
|
14
14
|
environment?: Environment;
|
|
15
|
-
/** ICP replica host override (defaults follow `@
|
|
15
|
+
/** ICP replica host override (defaults follow `@icp-sdk/core/agent`). */
|
|
16
16
|
icHost?: string;
|
|
17
17
|
/** Agent identity for signed canister calls. */
|
|
18
18
|
identity?: Identity;
|
|
@@ -321,7 +321,7 @@ type CreateProfileParams = {
|
|
|
321
321
|
};
|
|
322
322
|
/** Profile lifecycle and linked-wallet helpers. */
|
|
323
323
|
declare class AccountsModule {
|
|
324
|
-
readonly canisterContext
|
|
324
|
+
private readonly canisterContext;
|
|
325
325
|
constructor(canisterContext: CanisterContext);
|
|
326
326
|
/**
|
|
327
327
|
* Prepares a profile-creation action that can be signed and submitted later.
|
|
@@ -493,8 +493,8 @@ type GetActivityStatusResponse = {
|
|
|
493
493
|
|
|
494
494
|
/** Receipt-oriented activity list and status helpers. */
|
|
495
495
|
declare class ActivitiesModule {
|
|
496
|
-
readonly apiClient
|
|
497
|
-
readonly canisterContext
|
|
496
|
+
private readonly apiClient;
|
|
497
|
+
private readonly canisterContext;
|
|
498
498
|
constructor(apiClient: ApiClient | undefined, canisterContext: CanisterContext);
|
|
499
499
|
/**
|
|
500
500
|
* Lists profile activities. Defaults to all activities.
|
|
@@ -727,7 +727,7 @@ interface PaginatedResponse<T> {
|
|
|
727
727
|
|
|
728
728
|
/** Historical pool, rate, user transaction, and liquidation data helpers. */
|
|
729
729
|
declare class HistoryModule {
|
|
730
|
-
readonly apiClient
|
|
730
|
+
private readonly apiClient;
|
|
731
731
|
constructor(apiClient: ApiClient | undefined);
|
|
732
732
|
private requireApi;
|
|
733
733
|
/**
|
|
@@ -1080,9 +1080,9 @@ type WalletExecutionParams = {
|
|
|
1080
1080
|
};
|
|
1081
1081
|
/** Borrow, withdraw, supply, inflow reporting, and fee-estimation helpers. */
|
|
1082
1082
|
declare class LendingModule {
|
|
1083
|
-
readonly canisterContext
|
|
1084
|
-
readonly apiClient
|
|
1085
|
-
readonly evmReadClient
|
|
1083
|
+
private readonly canisterContext;
|
|
1084
|
+
private readonly apiClient;
|
|
1085
|
+
private readonly evmReadClient;
|
|
1086
1086
|
constructor(canisterContext: CanisterContext, apiClient: ApiClient | undefined, evmReadClient: EvmReadClient | undefined);
|
|
1087
1087
|
/**
|
|
1088
1088
|
* Prepares a withdraw action that can be signed and submitted later.
|
|
@@ -1283,8 +1283,8 @@ interface PoolRate {
|
|
|
1283
1283
|
|
|
1284
1284
|
/** Pool metadata, prices, and current rate helpers. */
|
|
1285
1285
|
declare class MarketModule {
|
|
1286
|
-
readonly canisterContext
|
|
1287
|
-
readonly apiClient
|
|
1286
|
+
private readonly canisterContext;
|
|
1287
|
+
private readonly apiClient;
|
|
1288
1288
|
constructor(canisterContext: CanisterContext, apiClient: ApiClient | undefined);
|
|
1289
1289
|
/**
|
|
1290
1290
|
* Lists all pools with their current rates.
|
|
@@ -1422,7 +1422,7 @@ interface MaxRepayAmount {
|
|
|
1422
1422
|
|
|
1423
1423
|
/** Profile position, health factor, and reserve valuation helpers. */
|
|
1424
1424
|
declare class PositionsModule {
|
|
1425
|
-
readonly canisterContext
|
|
1425
|
+
private readonly canisterContext;
|
|
1426
1426
|
readonly market: MarketModule;
|
|
1427
1427
|
constructor(canisterContext: CanisterContext, market: MarketModule);
|
|
1428
1428
|
/**
|
|
@@ -1470,7 +1470,7 @@ declare class PositionsModule {
|
|
|
1470
1470
|
* Returns the per-reserve breakdown of a profile's supplies and borrows,
|
|
1471
1471
|
* joined with pool metadata, rates, and current USD prices.
|
|
1472
1472
|
*
|
|
1473
|
-
* USD values are scaled to
|
|
1473
|
+
* USD values are scaled to 27 decimals.
|
|
1474
1474
|
*
|
|
1475
1475
|
* @param profileId - The Liquidium profile principal text.
|
|
1476
1476
|
* @returns Per-reserve position rows joined with pool metadata and USD values.
|
|
@@ -1831,10 +1831,10 @@ interface InstantLoanCandidate {
|
|
|
1831
1831
|
|
|
1832
1832
|
/** Accountless instant-loan creation, lookup, recovery, and canister query helpers. */
|
|
1833
1833
|
declare class InstantLoansModule {
|
|
1834
|
-
readonly canisterContext
|
|
1835
|
-
readonly apiClient
|
|
1836
|
-
readonly lending
|
|
1837
|
-
readonly positions
|
|
1834
|
+
private readonly canisterContext;
|
|
1835
|
+
private readonly apiClient;
|
|
1836
|
+
private readonly lending;
|
|
1837
|
+
private readonly positions;
|
|
1838
1838
|
constructor(canisterContext: CanisterContext, apiClient: ApiClient | undefined, lending: LendingModule, positions: PositionsModule);
|
|
1839
1839
|
/**
|
|
1840
1840
|
* Creates a profileless instant loan and returns canonical canister state plus
|
|
@@ -2213,4 +2213,4 @@ interface ExecuteWithOptions {
|
|
|
2213
2213
|
*/
|
|
2214
2214
|
declare function executeWith(options: ExecuteWithOptions): <TResult>(action: WalletAction<TResult>) => Promise<TResult>;
|
|
2215
2215
|
|
|
2216
|
-
export { type ActivitiesRequest, type Activity, ActivityDirection, ActivityFilter, ActivityKind, ActivityStatus, type ApySample, Asset, type AssetPrices, 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 CreateWithdrawData, type CreateWithdrawRequest, Environment, type EstimateInflowFeeRequest, type EthTransactionRequest, type EvmReadClient, EvmSupplyApprovalStrategy, type EvmSupplyContext, type ExecuteWithOptions, type ExternalAccount, type GetActivityStatusRequest, type GetActivityStatusResponse, type GetEvmSupplyContextRequest, type HealthFactor, type HistoryEntry, type IcrcAccountSupplyTarget, type InflowActivity, type InflowActivityKind, type InflowActivityStatus, type InflowFeeEstimate, InflowSubmitType, type InstantLoan, type InstantLoanAccount, type InstantLoanAsset, type InstantLoanCandidate, type InstantLoanGetRequest, InstantLoanStatus, LiquidiumClient, type LiquidiumClientConfig, LiquidiumError, LiquidiumErrorCode, type ListActivitiesRequest, type LtvCalculation, type MarketAsset, type MarketChain, type NativeAccount, type NativeAddressSupplyTarget, 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, type QuoteRequest, type QuoteResult, type QuoteValidationError, QuoteValidationErrorCode, type QuoteWarning, QuoteWarningCode, RATE_DECIMALS, RATE_SCALE, type SendEthTransactionRequest, type SendEthTransactionWalletAction, type SignMessageRequest, type SignMessageWalletAction, type SignPsbtRequest, 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 WithdrawAction, type WithdrawOutflowDetails, type WithdrawSubmitSignatureInfo, createTransferErc20Transaction, executeWith, intFromPublicId, publicIdFromInt };
|
|
2216
|
+
export { AccountsModule, ActivitiesModule, type ActivitiesRequest, type Activity, ActivityDirection, ActivityFilter, ActivityKind, ActivityStatus, type ActivityTopUp, type ApySample, Asset, type AssetPrices, 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 CreateWithdrawData, type CreateWithdrawRequest, Environment, type EstimateInflowFeeRequest, type EthTransactionRequest, type EvmReadClient, EvmSupplyApprovalStrategy, type EvmSupplyContext, type ExecuteWithOptions, type ExternalAccount, type FindPoolQuery, type GetActivityStatusRequest, type GetActivityStatusResponse, type GetEvmSupplyContextRequest, type HealthFactor, type HistoryEntry, HistoryModule, type IcrcAccountSupplyTarget, type InflowActivity, type InflowActivityKind, type InflowActivityStatus, type InflowFeeEstimate, InflowSubmitType, type InstantLoan, type InstantLoanAccount, type InstantLoanAsset, type InstantLoanAuthorization, type InstantLoanCandidate, type InstantLoanConfig, type InstantLoanEvent, type InstantLoanEventType, type InstantLoanGetRequest, type InstantLoanLeg, type InstantLoanListEventsRequest, type InstantLoanPositionSummary, type InstantLoanRepayment, InstantLoanStatus, type InstantLoanWarmedProfile, InstantLoansModule, LendingModule, LiquidiumClient, type LiquidiumClientConfig, LiquidiumError, LiquidiumErrorCode, type LiquidiumErrorContext, type ListActivitiesRequest, type LtvCalculation, type ManualTransferSupplyFlowRequest, type MarketAsset, type MarketChain, MarketModule, type MaxRepayAmount, type NativeAccount, type NativeAddressSupplyTarget, 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 SendEthTransactionWalletAction, type SignMessageRequest, type SignMessageWalletAction, type SignPsbtRequest, 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, intFromPublicId, publicIdFromInt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Identity, HttpAgent } from '@
|
|
1
|
+
import { Identity, HttpAgent } from '@icp-sdk/core/agent';
|
|
2
2
|
import { PublicClient } from 'viem';
|
|
3
3
|
|
|
4
4
|
/** Minimal viem-compatible client shape required for SDK EVM read calls. */
|
|
@@ -12,7 +12,7 @@ type EvmReadClient = Pick<PublicClient, "readContract">;
|
|
|
12
12
|
interface LiquidiumClientConfig {
|
|
13
13
|
/** Preset canister IDs. Only `mainnet` is bundled. */
|
|
14
14
|
environment?: Environment;
|
|
15
|
-
/** ICP replica host override (defaults follow `@
|
|
15
|
+
/** ICP replica host override (defaults follow `@icp-sdk/core/agent`). */
|
|
16
16
|
icHost?: string;
|
|
17
17
|
/** Agent identity for signed canister calls. */
|
|
18
18
|
identity?: Identity;
|
|
@@ -321,7 +321,7 @@ type CreateProfileParams = {
|
|
|
321
321
|
};
|
|
322
322
|
/** Profile lifecycle and linked-wallet helpers. */
|
|
323
323
|
declare class AccountsModule {
|
|
324
|
-
readonly canisterContext
|
|
324
|
+
private readonly canisterContext;
|
|
325
325
|
constructor(canisterContext: CanisterContext);
|
|
326
326
|
/**
|
|
327
327
|
* Prepares a profile-creation action that can be signed and submitted later.
|
|
@@ -493,8 +493,8 @@ type GetActivityStatusResponse = {
|
|
|
493
493
|
|
|
494
494
|
/** Receipt-oriented activity list and status helpers. */
|
|
495
495
|
declare class ActivitiesModule {
|
|
496
|
-
readonly apiClient
|
|
497
|
-
readonly canisterContext
|
|
496
|
+
private readonly apiClient;
|
|
497
|
+
private readonly canisterContext;
|
|
498
498
|
constructor(apiClient: ApiClient | undefined, canisterContext: CanisterContext);
|
|
499
499
|
/**
|
|
500
500
|
* Lists profile activities. Defaults to all activities.
|
|
@@ -727,7 +727,7 @@ interface PaginatedResponse<T> {
|
|
|
727
727
|
|
|
728
728
|
/** Historical pool, rate, user transaction, and liquidation data helpers. */
|
|
729
729
|
declare class HistoryModule {
|
|
730
|
-
readonly apiClient
|
|
730
|
+
private readonly apiClient;
|
|
731
731
|
constructor(apiClient: ApiClient | undefined);
|
|
732
732
|
private requireApi;
|
|
733
733
|
/**
|
|
@@ -1080,9 +1080,9 @@ type WalletExecutionParams = {
|
|
|
1080
1080
|
};
|
|
1081
1081
|
/** Borrow, withdraw, supply, inflow reporting, and fee-estimation helpers. */
|
|
1082
1082
|
declare class LendingModule {
|
|
1083
|
-
readonly canisterContext
|
|
1084
|
-
readonly apiClient
|
|
1085
|
-
readonly evmReadClient
|
|
1083
|
+
private readonly canisterContext;
|
|
1084
|
+
private readonly apiClient;
|
|
1085
|
+
private readonly evmReadClient;
|
|
1086
1086
|
constructor(canisterContext: CanisterContext, apiClient: ApiClient | undefined, evmReadClient: EvmReadClient | undefined);
|
|
1087
1087
|
/**
|
|
1088
1088
|
* Prepares a withdraw action that can be signed and submitted later.
|
|
@@ -1283,8 +1283,8 @@ interface PoolRate {
|
|
|
1283
1283
|
|
|
1284
1284
|
/** Pool metadata, prices, and current rate helpers. */
|
|
1285
1285
|
declare class MarketModule {
|
|
1286
|
-
readonly canisterContext
|
|
1287
|
-
readonly apiClient
|
|
1286
|
+
private readonly canisterContext;
|
|
1287
|
+
private readonly apiClient;
|
|
1288
1288
|
constructor(canisterContext: CanisterContext, apiClient: ApiClient | undefined);
|
|
1289
1289
|
/**
|
|
1290
1290
|
* Lists all pools with their current rates.
|
|
@@ -1422,7 +1422,7 @@ interface MaxRepayAmount {
|
|
|
1422
1422
|
|
|
1423
1423
|
/** Profile position, health factor, and reserve valuation helpers. */
|
|
1424
1424
|
declare class PositionsModule {
|
|
1425
|
-
readonly canisterContext
|
|
1425
|
+
private readonly canisterContext;
|
|
1426
1426
|
readonly market: MarketModule;
|
|
1427
1427
|
constructor(canisterContext: CanisterContext, market: MarketModule);
|
|
1428
1428
|
/**
|
|
@@ -1470,7 +1470,7 @@ declare class PositionsModule {
|
|
|
1470
1470
|
* Returns the per-reserve breakdown of a profile's supplies and borrows,
|
|
1471
1471
|
* joined with pool metadata, rates, and current USD prices.
|
|
1472
1472
|
*
|
|
1473
|
-
* USD values are scaled to
|
|
1473
|
+
* USD values are scaled to 27 decimals.
|
|
1474
1474
|
*
|
|
1475
1475
|
* @param profileId - The Liquidium profile principal text.
|
|
1476
1476
|
* @returns Per-reserve position rows joined with pool metadata and USD values.
|
|
@@ -1831,10 +1831,10 @@ interface InstantLoanCandidate {
|
|
|
1831
1831
|
|
|
1832
1832
|
/** Accountless instant-loan creation, lookup, recovery, and canister query helpers. */
|
|
1833
1833
|
declare class InstantLoansModule {
|
|
1834
|
-
readonly canisterContext
|
|
1835
|
-
readonly apiClient
|
|
1836
|
-
readonly lending
|
|
1837
|
-
readonly positions
|
|
1834
|
+
private readonly canisterContext;
|
|
1835
|
+
private readonly apiClient;
|
|
1836
|
+
private readonly lending;
|
|
1837
|
+
private readonly positions;
|
|
1838
1838
|
constructor(canisterContext: CanisterContext, apiClient: ApiClient | undefined, lending: LendingModule, positions: PositionsModule);
|
|
1839
1839
|
/**
|
|
1840
1840
|
* Creates a profileless instant loan and returns canonical canister state plus
|
|
@@ -2213,4 +2213,4 @@ interface ExecuteWithOptions {
|
|
|
2213
2213
|
*/
|
|
2214
2214
|
declare function executeWith(options: ExecuteWithOptions): <TResult>(action: WalletAction<TResult>) => Promise<TResult>;
|
|
2215
2215
|
|
|
2216
|
-
export { type ActivitiesRequest, type Activity, ActivityDirection, ActivityFilter, ActivityKind, ActivityStatus, type ApySample, Asset, type AssetPrices, 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 CreateWithdrawData, type CreateWithdrawRequest, Environment, type EstimateInflowFeeRequest, type EthTransactionRequest, type EvmReadClient, EvmSupplyApprovalStrategy, type EvmSupplyContext, type ExecuteWithOptions, type ExternalAccount, type GetActivityStatusRequest, type GetActivityStatusResponse, type GetEvmSupplyContextRequest, type HealthFactor, type HistoryEntry, type IcrcAccountSupplyTarget, type InflowActivity, type InflowActivityKind, type InflowActivityStatus, type InflowFeeEstimate, InflowSubmitType, type InstantLoan, type InstantLoanAccount, type InstantLoanAsset, type InstantLoanCandidate, type InstantLoanGetRequest, InstantLoanStatus, LiquidiumClient, type LiquidiumClientConfig, LiquidiumError, LiquidiumErrorCode, type ListActivitiesRequest, type LtvCalculation, type MarketAsset, type MarketChain, type NativeAccount, type NativeAddressSupplyTarget, 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, type QuoteRequest, type QuoteResult, type QuoteValidationError, QuoteValidationErrorCode, type QuoteWarning, QuoteWarningCode, RATE_DECIMALS, RATE_SCALE, type SendEthTransactionRequest, type SendEthTransactionWalletAction, type SignMessageRequest, type SignMessageWalletAction, type SignPsbtRequest, 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 WithdrawAction, type WithdrawOutflowDetails, type WithdrawSubmitSignatureInfo, createTransferErc20Transaction, executeWith, intFromPublicId, publicIdFromInt };
|
|
2216
|
+
export { AccountsModule, ActivitiesModule, type ActivitiesRequest, type Activity, ActivityDirection, ActivityFilter, ActivityKind, ActivityStatus, type ActivityTopUp, type ApySample, Asset, type AssetPrices, 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 CreateWithdrawData, type CreateWithdrawRequest, Environment, type EstimateInflowFeeRequest, type EthTransactionRequest, type EvmReadClient, EvmSupplyApprovalStrategy, type EvmSupplyContext, type ExecuteWithOptions, type ExternalAccount, type FindPoolQuery, type GetActivityStatusRequest, type GetActivityStatusResponse, type GetEvmSupplyContextRequest, type HealthFactor, type HistoryEntry, HistoryModule, type IcrcAccountSupplyTarget, type InflowActivity, type InflowActivityKind, type InflowActivityStatus, type InflowFeeEstimate, InflowSubmitType, type InstantLoan, type InstantLoanAccount, type InstantLoanAsset, type InstantLoanAuthorization, type InstantLoanCandidate, type InstantLoanConfig, type InstantLoanEvent, type InstantLoanEventType, type InstantLoanGetRequest, type InstantLoanLeg, type InstantLoanListEventsRequest, type InstantLoanPositionSummary, type InstantLoanRepayment, InstantLoanStatus, type InstantLoanWarmedProfile, InstantLoansModule, LendingModule, LiquidiumClient, type LiquidiumClientConfig, LiquidiumError, LiquidiumErrorCode, type LiquidiumErrorContext, type ListActivitiesRequest, type LtvCalculation, type ManualTransferSupplyFlowRequest, type MarketAsset, type MarketChain, MarketModule, type MaxRepayAmount, type NativeAccount, type NativeAddressSupplyTarget, 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 SendEthTransactionWalletAction, type SignMessageRequest, type SignMessageWalletAction, type SignPsbtRequest, 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, intFromPublicId, publicIdFromInt };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { encodeFunctionData,
|
|
1
|
+
import { encodeFunctionData, isAddress, getAddress, createPublicClient, http } from 'viem';
|
|
2
2
|
import { mainnet } from 'viem/chains';
|
|
3
|
-
import {
|
|
4
|
-
import { Principal } from '@
|
|
3
|
+
import { Actor, HttpAgent } from '@icp-sdk/core/agent';
|
|
4
|
+
import { Principal } from '@icp-sdk/core/principal';
|
|
5
5
|
import { encodeIcrcAccount } from '@dfinity/ledger-icrc';
|
|
6
|
+
import { Principal as Principal$1 } from '@dfinity/principal';
|
|
6
7
|
|
|
7
8
|
// src/client.ts
|
|
8
9
|
|
|
@@ -3052,7 +3053,7 @@ function getIcrcAccountSupplyTarget(profileId, request) {
|
|
|
3052
3053
|
owner: poolPrincipal.toText(),
|
|
3053
3054
|
subaccount,
|
|
3054
3055
|
account: encodeIcrcAccount({
|
|
3055
|
-
owner: Principal.fromText(poolPrincipal.toText()),
|
|
3056
|
+
owner: Principal$1.fromText(poolPrincipal.toText()),
|
|
3056
3057
|
subaccount
|
|
3057
3058
|
})
|
|
3058
3059
|
};
|
|
@@ -4207,7 +4208,7 @@ function createTransferErc20Transaction(params) {
|
|
|
4207
4208
|
}
|
|
4208
4209
|
function createDepositErc20Transaction(params) {
|
|
4209
4210
|
const expectedDestinationAccount = encodeIcrcAccount({
|
|
4210
|
-
owner: Principal.fromText(params.poolId),
|
|
4211
|
+
owner: Principal$1.fromText(params.poolId),
|
|
4211
4212
|
subaccount: encodeInflowSubaccount({
|
|
4212
4213
|
action: params.action,
|
|
4213
4214
|
principal: Principal.fromText(params.profileId)
|
|
@@ -5645,7 +5646,7 @@ var PositionsModule = class {
|
|
|
5645
5646
|
* Returns the per-reserve breakdown of a profile's supplies and borrows,
|
|
5646
5647
|
* joined with pool metadata, rates, and current USD prices.
|
|
5647
5648
|
*
|
|
5648
|
-
* USD values are scaled to
|
|
5649
|
+
* USD values are scaled to 27 decimals.
|
|
5649
5650
|
*
|
|
5650
5651
|
* @param profileId - The Liquidium profile principal text.
|
|
5651
5652
|
* @returns Per-reserve position rows joined with pool metadata and USD values.
|
|
@@ -5797,6 +5798,6 @@ function resolveEvmReadClient(config) {
|
|
|
5797
5798
|
});
|
|
5798
5799
|
}
|
|
5799
5800
|
|
|
5800
|
-
export { ActivityDirection, ActivityFilter, ActivityKind, ActivityStatus, Asset, CK_ETH_DEPOSIT_CONTRACT_ADDRESS, Chain, Environment, EvmSupplyApprovalStrategy, InflowSubmitType, InstantLoanStatus, LiquidiumClient, LiquidiumError, LiquidiumErrorCode, OutflowType, QuoteValidationErrorCode, QuoteWarningCode, RATE_DECIMALS, RATE_SCALE, SupplyAction, SupplyPlanType, TransferMode, USDC_CONTRACT_ADDRESS, USDT_CONTRACT_ADDRESS, UserHistoryStatus, WalletExecutionKind, createTransferErc20Transaction, executeWith, intFromPublicId, publicIdFromInt };
|
|
5801
|
+
export { AccountsModule, ActivitiesModule, ActivityDirection, ActivityFilter, ActivityKind, ActivityStatus, Asset, CK_ETH_DEPOSIT_CONTRACT_ADDRESS, Chain, Environment, EvmSupplyApprovalStrategy, HistoryModule, InflowSubmitType, InstantLoanStatus, InstantLoansModule, LendingModule, LiquidiumClient, LiquidiumError, LiquidiumErrorCode, MarketModule, OutflowType, PositionsModule, QuoteModule, QuoteValidationErrorCode, QuoteWarningCode, RATE_DECIMALS, RATE_SCALE, SupplyAction, SupplyPlanType, TransferMode, USDC_CONTRACT_ADDRESS, USDT_CONTRACT_ADDRESS, UserHistoryStatus, WalletExecutionKind, createTransferErc20Transaction, executeWith, intFromPublicId, publicIdFromInt };
|
|
5801
5802
|
//# sourceMappingURL=index.js.map
|
|
5802
5803
|
//# sourceMappingURL=index.js.map
|