@liquidium/client 0.8.0 → 0.8.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/dist/index.d.cts CHANGED
@@ -1882,13 +1882,25 @@ interface SimpleLoanConfig {
1882
1882
  /** Principal text of the lending canister used by Simple Loans. */
1883
1883
  lendingCanisterId: string;
1884
1884
  }
1885
- /** Authentication metadata for warmed Simple Loans profiles. */
1886
- interface SimpleLoanAuthorization {
1885
+ /**
1886
+ * Legacy Ethereum-signature authentication metadata for a warmed Simple Loans profile.
1887
+ *
1888
+ * @deprecated New warmed profiles use `SimpleLoanIcpCallerAuthorization`. This
1889
+ * type remains supported for old canisters and existing profiles.
1890
+ */
1891
+ interface SimpleLoanEthSignatureAuthorization {
1887
1892
  type: "EthSignature";
1888
1893
  derivationIndex: Uint8Array;
1889
1894
  publicKey: Uint8Array;
1890
1895
  address: string;
1891
1896
  }
1897
+ /** Native IC caller authentication metadata for a warmed Simple Loans profile. */
1898
+ interface SimpleLoanIcpCallerAuthorization {
1899
+ type: "IcpCaller";
1900
+ subaccount: Uint8Array;
1901
+ }
1902
+ /** Authentication metadata for warmed Simple Loans profiles. */
1903
+ type SimpleLoanAuthorization = SimpleLoanEthSignatureAuthorization | SimpleLoanIcpCallerAuthorization;
1892
1904
  /** Warmed profile available for a future simple loan. */
1893
1905
  interface SimpleLoanWarmedProfile {
1894
1906
  id: bigint;
@@ -1951,7 +1963,12 @@ interface SimpleLoanStuckFundsWithdrawalRequestedEventType {
1951
1963
  poolId: string;
1952
1964
  amount: bigint;
1953
1965
  }
1954
- /** Profile-warmed event payload. */
1966
+ /**
1967
+ * Legacy Ethereum-signature profile-warmed event payload.
1968
+ *
1969
+ * @deprecated New profile warmups emit `SimpleLoanIcpProfileWarmedEventType`.
1970
+ * This type remains supported for historical events.
1971
+ */
1955
1972
  interface SimpleLoanProfileWarmedEventType {
1956
1973
  type: "ProfileWarmed";
1957
1974
  derivationIndex: Uint8Array;
@@ -1959,6 +1976,13 @@ interface SimpleLoanProfileWarmedEventType {
1959
1976
  ethAddress: string;
1960
1977
  profileId: string;
1961
1978
  }
1979
+ /** ICP-authorized profile-warmed event payload. */
1980
+ interface SimpleLoanIcpProfileWarmedEventType {
1981
+ type: "IcpProfileWarmed";
1982
+ subaccount: Uint8Array;
1983
+ warmedProfileId: bigint;
1984
+ profileId: string;
1985
+ }
1962
1986
  /** Repay-complete event payload. */
1963
1987
  interface SimpleLoanRepayCompleteEventType {
1964
1988
  type: "RepayComplete";
@@ -1973,7 +1997,7 @@ interface SimpleLoanDepositTimerStartedEventType {
1973
1997
  timestamp: bigint;
1974
1998
  }
1975
1999
  /** Direct canister event payload returned by Simple Loans event queries. */
1976
- type SimpleLoanEventType = SimpleLoanCreatedEventType | SimpleLoanFullLendWithdrawalRequestedEventType | SimpleLoanBorrowRequestedEventType | SimpleLoanDepositTimerExceededEventType | SimpleLoanStuckFundsWithdrawalRequestedEventType | SimpleLoanProfileWarmedEventType | SimpleLoanRepayCompleteEventType | SimpleLoanDepositTimerStartedEventType;
2000
+ type SimpleLoanEventType = SimpleLoanCreatedEventType | SimpleLoanFullLendWithdrawalRequestedEventType | SimpleLoanBorrowRequestedEventType | SimpleLoanDepositTimerExceededEventType | SimpleLoanStuckFundsWithdrawalRequestedEventType | SimpleLoanProfileWarmedEventType | SimpleLoanIcpProfileWarmedEventType | SimpleLoanRepayCompleteEventType | SimpleLoanDepositTimerStartedEventType;
1977
2001
  /** Fee-inclusive collateral deposit quote for one transfer target. */
1978
2002
  interface SimpleLoanInitialDepositTargetQuote {
1979
2003
  /** Full amount to send to the collateral deposit target, including fee. */
@@ -2428,4 +2452,4 @@ interface ExecuteWithOptions {
2428
2452
  */
2429
2453
  declare function executeWith(options: ExecuteWithOptions): <TResult>(action: WalletAction<TResult>) => Promise<TResult>;
2430
2454
 
2431
- export { ASSET_METADATA, AccountsModule, ActivitiesModule, type Activity, ActivityFilter, type ActivityStatusFoundResponse, type ActivityStatusNotFoundResponse, type ActivityTopUp, Asset, type AssetIdentifier, type AssetMetadata, type AssetPriceSnapshot, type AssetPrices, type BaseGetActivityStatusRequest, type BaseListActivitiesRequest, type BorrowAction, type BorrowOutflowDetails, type BorrowingPower, type BtcOnBtcAssetIdentifier, type BtcOnIcpAssetIdentifier, CK_ETH_DEPOSIT_CONTRACT_ADDRESS, type CalculateLtvRequest, type CanisterIdOverrides, type CanisterIds, Chain, type ChainAddressAccount, type ContractInteractionSupplyFlowRequest, type CreateAccountAction, type CreateAccountData, type CreateAccountRequest, type CreateBorrowData, type CreateBorrowRequest, type CreateProfileParams, type CreateSimpleLoanBorrow, type CreateSimpleLoanCollateral, type CreateSimpleLoanRefund, type CreateSimpleLoanRequest, type CreateTransferErc20TransactionParams, type CreateWithdrawData, type CreateWithdrawRequest, Environment, type EstimateInflowFeeRequest, type EthOnEthAssetIdentifier, type EthOnIcpAssetIdentifier, type EthTransactionRequest, type EvmContractTransaction, type EvmReadClient, EvmSupplyApprovalStrategy, type EvmSupplyContext, type ExecuteWithOptions, type FindPoolQuery, type FullWithdrawAmount, type GetActivityStatusByProfileRequest, type GetActivityStatusByShortRefRequest, type GetActivityStatusRequest, type GetActivityStatusResponse, type GetDepositAddressRequest, type GetEvmSupplyContextRequest, HEALTH_FACTOR_DECIMALS, HEALTH_FACTOR_SCALE, type HealthFactor, HistoryModule, INTEREST_YEAR_365_DAYS_SECONDS, type IcPrincipalAccount, type IcpAccountIdentifierAccount, type IcpOnIcpAssetIdentifier, type IcrcAccount, type IcrcTransferDetails, type InflowActivity, type InflowActivityOperation, type InflowActivityStatus, type InflowFeeEstimate, type InflowOperation, LendingModule, type LiquidiumAccount, type LiquidiumAccountInput, type LiquidiumAccountReference, LiquidiumAccountType, 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_DEPOSIT_AMOUNTS_BY_ASSET, MIN_WITHDRAW_AMOUNTS_BY_ASSET, type ManualTransferSupplyFlowRequest, MarketModule, type MaxRepayAmount, type MinimumBorrowAsset, type MinimumDepositAsset, type MinimumWithdrawAsset, type OutflowActivity, type OutflowActivityOperation, type OutflowActivityStatus, type OutflowDetails, OutflowType, type PaginatedResponse, type Pool, type PoolCanisterIds, type PoolRate, type Position, PositionsModule, type PrepareCreateProfileOptions, type ProtocolActivityEntry, type ProtocolActivityFeedFilters, type ProtocolActivityOperation, QuoteModule, type QuoteRequest, type QuoteResult, type QuoteValidationError, QuoteValidationErrorCode, type QuoteWarning, QuoteWarningCode, RATE_DECIMALS, RATE_SCALE, SUPPLY_COMPOUNDING_INTERVAL_15_SECONDS, type SendBtcTransactionRequest, type SendEthTransactionRequest, type SendIcrcTransferRequest, type SignMessageRequest, type SignMessageWalletAction, type SignatureInfo, type SigningChain, type SimpleLoan, type SimpleLoanAccount, type SimpleLoanAsset, type SimpleLoanAuthorization, type SimpleLoanBorrow, type SimpleLoanBorrowRequestedEventType, type SimpleLoanCollateral, type SimpleLoanConfig, SimpleLoanCreatedError, type SimpleLoanCreatedEventType, type SimpleLoanDepositTimerExceededEventType, type SimpleLoanDepositTimerStartedEventType, type SimpleLoanDestination, type SimpleLoanEvent, type SimpleLoanEventType, type SimpleLoanFindBorrow, type SimpleLoanFindCollateral, type SimpleLoanFindResult, type SimpleLoanFullLendWithdrawalRequestedEventType, type SimpleLoanGetByIdRequest, type SimpleLoanGetByRefRequest, type SimpleLoanGetRequest, type SimpleLoanInitialDeposit, type SimpleLoanInitialDepositTargetQuote, type SimpleLoanLeg, type SimpleLoanListEventsRequest, type SimpleLoanPositionSummary, type SimpleLoanProfileWarmedEventType, type SimpleLoanRepayCompleteEventType, type SimpleLoanRepayment, type SimpleLoanRepaymentTargetQuote, type SimpleLoanStuckFundsWithdrawalRequestedEventType, type SimpleLoanTerms, type SimpleLoanWarmedProfile, SimpleLoansModule, type SubmitInflowRequest, type SubmitInflowResponse, type SubmitSupplyFlowInflowRequest, SupplyAction, type SupplyFlow, type SupplyFlowRequest, SupplyPlanType, type SupplyTarget, type TransferSupplyFlowRequest, USDC_CONTRACT_ADDRESS, USDT_CONTRACT_ADDRESS, type UsdcOnEthAssetIdentifier, type UsdcOnIcpAssetIdentifier, type UsdtOnEthAssetIdentifier, type UsdtOnIcpAssetIdentifier, type UserHistoryEntry, type UserHistoryEntryApiItem, type UserHistoryOperation, type UserHistoryResponse, type UserLiquidationHistoryEntry, type UserLiquidationHistoryFilters, type UserLiquidationHistoryStatus, 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, createTransferErc20Transaction, estimateBorrowApy, estimateSupplyApy, executeWith, getAssetMetadata, getMinimumBorrowAmount, getMinimumDepositAmount, getMinimumWithdrawAmount, intFromPublicId, isAssetIdentifier, publicIdFromInt };
2455
+ export { ASSET_METADATA, AccountsModule, ActivitiesModule, type Activity, ActivityFilter, type ActivityStatusFoundResponse, type ActivityStatusNotFoundResponse, type ActivityTopUp, Asset, type AssetIdentifier, type AssetMetadata, type AssetPriceSnapshot, type AssetPrices, type BaseGetActivityStatusRequest, type BaseListActivitiesRequest, type BorrowAction, type BorrowOutflowDetails, type BorrowingPower, type BtcOnBtcAssetIdentifier, type BtcOnIcpAssetIdentifier, CK_ETH_DEPOSIT_CONTRACT_ADDRESS, type CalculateLtvRequest, type CanisterIdOverrides, type CanisterIds, Chain, type ChainAddressAccount, type ContractInteractionSupplyFlowRequest, type CreateAccountAction, type CreateAccountData, type CreateAccountRequest, type CreateBorrowData, type CreateBorrowRequest, type CreateProfileParams, type CreateSimpleLoanBorrow, type CreateSimpleLoanCollateral, type CreateSimpleLoanRefund, type CreateSimpleLoanRequest, type CreateTransferErc20TransactionParams, type CreateWithdrawData, type CreateWithdrawRequest, Environment, type EstimateInflowFeeRequest, type EthOnEthAssetIdentifier, type EthOnIcpAssetIdentifier, type EthTransactionRequest, type EvmContractTransaction, type EvmReadClient, EvmSupplyApprovalStrategy, type EvmSupplyContext, type ExecuteWithOptions, type FindPoolQuery, type FullWithdrawAmount, type GetActivityStatusByProfileRequest, type GetActivityStatusByShortRefRequest, type GetActivityStatusRequest, type GetActivityStatusResponse, type GetDepositAddressRequest, type GetEvmSupplyContextRequest, HEALTH_FACTOR_DECIMALS, HEALTH_FACTOR_SCALE, type HealthFactor, HistoryModule, INTEREST_YEAR_365_DAYS_SECONDS, type IcPrincipalAccount, type IcpAccountIdentifierAccount, type IcpOnIcpAssetIdentifier, type IcrcAccount, type IcrcTransferDetails, type InflowActivity, type InflowActivityOperation, type InflowActivityStatus, type InflowFeeEstimate, type InflowOperation, LendingModule, type LiquidiumAccount, type LiquidiumAccountInput, type LiquidiumAccountReference, LiquidiumAccountType, 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_DEPOSIT_AMOUNTS_BY_ASSET, MIN_WITHDRAW_AMOUNTS_BY_ASSET, type ManualTransferSupplyFlowRequest, MarketModule, type MaxRepayAmount, type MinimumBorrowAsset, type MinimumDepositAsset, type MinimumWithdrawAsset, type OutflowActivity, type OutflowActivityOperation, type OutflowActivityStatus, type OutflowDetails, OutflowType, type PaginatedResponse, type Pool, type PoolCanisterIds, type PoolRate, type Position, PositionsModule, type PrepareCreateProfileOptions, type ProtocolActivityEntry, type ProtocolActivityFeedFilters, type ProtocolActivityOperation, QuoteModule, type QuoteRequest, type QuoteResult, type QuoteValidationError, QuoteValidationErrorCode, type QuoteWarning, QuoteWarningCode, RATE_DECIMALS, RATE_SCALE, SUPPLY_COMPOUNDING_INTERVAL_15_SECONDS, type SendBtcTransactionRequest, type SendEthTransactionRequest, type SendIcrcTransferRequest, type SignMessageRequest, type SignMessageWalletAction, type SignatureInfo, type SigningChain, type SimpleLoan, type SimpleLoanAccount, type SimpleLoanAsset, type SimpleLoanAuthorization, type SimpleLoanBorrow, type SimpleLoanBorrowRequestedEventType, type SimpleLoanCollateral, type SimpleLoanConfig, SimpleLoanCreatedError, type SimpleLoanCreatedEventType, type SimpleLoanDepositTimerExceededEventType, type SimpleLoanDepositTimerStartedEventType, type SimpleLoanDestination, type SimpleLoanEthSignatureAuthorization, type SimpleLoanEvent, type SimpleLoanEventType, type SimpleLoanFindBorrow, type SimpleLoanFindCollateral, type SimpleLoanFindResult, type SimpleLoanFullLendWithdrawalRequestedEventType, type SimpleLoanGetByIdRequest, type SimpleLoanGetByRefRequest, type SimpleLoanGetRequest, type SimpleLoanIcpCallerAuthorization, type SimpleLoanIcpProfileWarmedEventType, type SimpleLoanInitialDeposit, type SimpleLoanInitialDepositTargetQuote, type SimpleLoanLeg, type SimpleLoanListEventsRequest, type SimpleLoanPositionSummary, type SimpleLoanProfileWarmedEventType, type SimpleLoanRepayCompleteEventType, type SimpleLoanRepayment, type SimpleLoanRepaymentTargetQuote, type SimpleLoanStuckFundsWithdrawalRequestedEventType, type SimpleLoanTerms, type SimpleLoanWarmedProfile, SimpleLoansModule, type SubmitInflowRequest, type SubmitInflowResponse, type SubmitSupplyFlowInflowRequest, SupplyAction, type SupplyFlow, type SupplyFlowRequest, SupplyPlanType, type SupplyTarget, type TransferSupplyFlowRequest, USDC_CONTRACT_ADDRESS, USDT_CONTRACT_ADDRESS, type UsdcOnEthAssetIdentifier, type UsdcOnIcpAssetIdentifier, type UsdtOnEthAssetIdentifier, type UsdtOnIcpAssetIdentifier, type UserHistoryEntry, type UserHistoryEntryApiItem, type UserHistoryOperation, type UserHistoryResponse, type UserLiquidationHistoryEntry, type UserLiquidationHistoryFilters, type UserLiquidationHistoryStatus, 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, createTransferErc20Transaction, estimateBorrowApy, estimateSupplyApy, executeWith, getAssetMetadata, getMinimumBorrowAmount, getMinimumDepositAmount, getMinimumWithdrawAmount, intFromPublicId, isAssetIdentifier, publicIdFromInt };
package/dist/index.d.ts CHANGED
@@ -1882,13 +1882,25 @@ interface SimpleLoanConfig {
1882
1882
  /** Principal text of the lending canister used by Simple Loans. */
1883
1883
  lendingCanisterId: string;
1884
1884
  }
1885
- /** Authentication metadata for warmed Simple Loans profiles. */
1886
- interface SimpleLoanAuthorization {
1885
+ /**
1886
+ * Legacy Ethereum-signature authentication metadata for a warmed Simple Loans profile.
1887
+ *
1888
+ * @deprecated New warmed profiles use `SimpleLoanIcpCallerAuthorization`. This
1889
+ * type remains supported for old canisters and existing profiles.
1890
+ */
1891
+ interface SimpleLoanEthSignatureAuthorization {
1887
1892
  type: "EthSignature";
1888
1893
  derivationIndex: Uint8Array;
1889
1894
  publicKey: Uint8Array;
1890
1895
  address: string;
1891
1896
  }
1897
+ /** Native IC caller authentication metadata for a warmed Simple Loans profile. */
1898
+ interface SimpleLoanIcpCallerAuthorization {
1899
+ type: "IcpCaller";
1900
+ subaccount: Uint8Array;
1901
+ }
1902
+ /** Authentication metadata for warmed Simple Loans profiles. */
1903
+ type SimpleLoanAuthorization = SimpleLoanEthSignatureAuthorization | SimpleLoanIcpCallerAuthorization;
1892
1904
  /** Warmed profile available for a future simple loan. */
1893
1905
  interface SimpleLoanWarmedProfile {
1894
1906
  id: bigint;
@@ -1951,7 +1963,12 @@ interface SimpleLoanStuckFundsWithdrawalRequestedEventType {
1951
1963
  poolId: string;
1952
1964
  amount: bigint;
1953
1965
  }
1954
- /** Profile-warmed event payload. */
1966
+ /**
1967
+ * Legacy Ethereum-signature profile-warmed event payload.
1968
+ *
1969
+ * @deprecated New profile warmups emit `SimpleLoanIcpProfileWarmedEventType`.
1970
+ * This type remains supported for historical events.
1971
+ */
1955
1972
  interface SimpleLoanProfileWarmedEventType {
1956
1973
  type: "ProfileWarmed";
1957
1974
  derivationIndex: Uint8Array;
@@ -1959,6 +1976,13 @@ interface SimpleLoanProfileWarmedEventType {
1959
1976
  ethAddress: string;
1960
1977
  profileId: string;
1961
1978
  }
1979
+ /** ICP-authorized profile-warmed event payload. */
1980
+ interface SimpleLoanIcpProfileWarmedEventType {
1981
+ type: "IcpProfileWarmed";
1982
+ subaccount: Uint8Array;
1983
+ warmedProfileId: bigint;
1984
+ profileId: string;
1985
+ }
1962
1986
  /** Repay-complete event payload. */
1963
1987
  interface SimpleLoanRepayCompleteEventType {
1964
1988
  type: "RepayComplete";
@@ -1973,7 +1997,7 @@ interface SimpleLoanDepositTimerStartedEventType {
1973
1997
  timestamp: bigint;
1974
1998
  }
1975
1999
  /** Direct canister event payload returned by Simple Loans event queries. */
1976
- type SimpleLoanEventType = SimpleLoanCreatedEventType | SimpleLoanFullLendWithdrawalRequestedEventType | SimpleLoanBorrowRequestedEventType | SimpleLoanDepositTimerExceededEventType | SimpleLoanStuckFundsWithdrawalRequestedEventType | SimpleLoanProfileWarmedEventType | SimpleLoanRepayCompleteEventType | SimpleLoanDepositTimerStartedEventType;
2000
+ type SimpleLoanEventType = SimpleLoanCreatedEventType | SimpleLoanFullLendWithdrawalRequestedEventType | SimpleLoanBorrowRequestedEventType | SimpleLoanDepositTimerExceededEventType | SimpleLoanStuckFundsWithdrawalRequestedEventType | SimpleLoanProfileWarmedEventType | SimpleLoanIcpProfileWarmedEventType | SimpleLoanRepayCompleteEventType | SimpleLoanDepositTimerStartedEventType;
1977
2001
  /** Fee-inclusive collateral deposit quote for one transfer target. */
1978
2002
  interface SimpleLoanInitialDepositTargetQuote {
1979
2003
  /** Full amount to send to the collateral deposit target, including fee. */
@@ -2428,4 +2452,4 @@ interface ExecuteWithOptions {
2428
2452
  */
2429
2453
  declare function executeWith(options: ExecuteWithOptions): <TResult>(action: WalletAction<TResult>) => Promise<TResult>;
2430
2454
 
2431
- export { ASSET_METADATA, AccountsModule, ActivitiesModule, type Activity, ActivityFilter, type ActivityStatusFoundResponse, type ActivityStatusNotFoundResponse, type ActivityTopUp, Asset, type AssetIdentifier, type AssetMetadata, type AssetPriceSnapshot, type AssetPrices, type BaseGetActivityStatusRequest, type BaseListActivitiesRequest, type BorrowAction, type BorrowOutflowDetails, type BorrowingPower, type BtcOnBtcAssetIdentifier, type BtcOnIcpAssetIdentifier, CK_ETH_DEPOSIT_CONTRACT_ADDRESS, type CalculateLtvRequest, type CanisterIdOverrides, type CanisterIds, Chain, type ChainAddressAccount, type ContractInteractionSupplyFlowRequest, type CreateAccountAction, type CreateAccountData, type CreateAccountRequest, type CreateBorrowData, type CreateBorrowRequest, type CreateProfileParams, type CreateSimpleLoanBorrow, type CreateSimpleLoanCollateral, type CreateSimpleLoanRefund, type CreateSimpleLoanRequest, type CreateTransferErc20TransactionParams, type CreateWithdrawData, type CreateWithdrawRequest, Environment, type EstimateInflowFeeRequest, type EthOnEthAssetIdentifier, type EthOnIcpAssetIdentifier, type EthTransactionRequest, type EvmContractTransaction, type EvmReadClient, EvmSupplyApprovalStrategy, type EvmSupplyContext, type ExecuteWithOptions, type FindPoolQuery, type FullWithdrawAmount, type GetActivityStatusByProfileRequest, type GetActivityStatusByShortRefRequest, type GetActivityStatusRequest, type GetActivityStatusResponse, type GetDepositAddressRequest, type GetEvmSupplyContextRequest, HEALTH_FACTOR_DECIMALS, HEALTH_FACTOR_SCALE, type HealthFactor, HistoryModule, INTEREST_YEAR_365_DAYS_SECONDS, type IcPrincipalAccount, type IcpAccountIdentifierAccount, type IcpOnIcpAssetIdentifier, type IcrcAccount, type IcrcTransferDetails, type InflowActivity, type InflowActivityOperation, type InflowActivityStatus, type InflowFeeEstimate, type InflowOperation, LendingModule, type LiquidiumAccount, type LiquidiumAccountInput, type LiquidiumAccountReference, LiquidiumAccountType, 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_DEPOSIT_AMOUNTS_BY_ASSET, MIN_WITHDRAW_AMOUNTS_BY_ASSET, type ManualTransferSupplyFlowRequest, MarketModule, type MaxRepayAmount, type MinimumBorrowAsset, type MinimumDepositAsset, type MinimumWithdrawAsset, type OutflowActivity, type OutflowActivityOperation, type OutflowActivityStatus, type OutflowDetails, OutflowType, type PaginatedResponse, type Pool, type PoolCanisterIds, type PoolRate, type Position, PositionsModule, type PrepareCreateProfileOptions, type ProtocolActivityEntry, type ProtocolActivityFeedFilters, type ProtocolActivityOperation, QuoteModule, type QuoteRequest, type QuoteResult, type QuoteValidationError, QuoteValidationErrorCode, type QuoteWarning, QuoteWarningCode, RATE_DECIMALS, RATE_SCALE, SUPPLY_COMPOUNDING_INTERVAL_15_SECONDS, type SendBtcTransactionRequest, type SendEthTransactionRequest, type SendIcrcTransferRequest, type SignMessageRequest, type SignMessageWalletAction, type SignatureInfo, type SigningChain, type SimpleLoan, type SimpleLoanAccount, type SimpleLoanAsset, type SimpleLoanAuthorization, type SimpleLoanBorrow, type SimpleLoanBorrowRequestedEventType, type SimpleLoanCollateral, type SimpleLoanConfig, SimpleLoanCreatedError, type SimpleLoanCreatedEventType, type SimpleLoanDepositTimerExceededEventType, type SimpleLoanDepositTimerStartedEventType, type SimpleLoanDestination, type SimpleLoanEvent, type SimpleLoanEventType, type SimpleLoanFindBorrow, type SimpleLoanFindCollateral, type SimpleLoanFindResult, type SimpleLoanFullLendWithdrawalRequestedEventType, type SimpleLoanGetByIdRequest, type SimpleLoanGetByRefRequest, type SimpleLoanGetRequest, type SimpleLoanInitialDeposit, type SimpleLoanInitialDepositTargetQuote, type SimpleLoanLeg, type SimpleLoanListEventsRequest, type SimpleLoanPositionSummary, type SimpleLoanProfileWarmedEventType, type SimpleLoanRepayCompleteEventType, type SimpleLoanRepayment, type SimpleLoanRepaymentTargetQuote, type SimpleLoanStuckFundsWithdrawalRequestedEventType, type SimpleLoanTerms, type SimpleLoanWarmedProfile, SimpleLoansModule, type SubmitInflowRequest, type SubmitInflowResponse, type SubmitSupplyFlowInflowRequest, SupplyAction, type SupplyFlow, type SupplyFlowRequest, SupplyPlanType, type SupplyTarget, type TransferSupplyFlowRequest, USDC_CONTRACT_ADDRESS, USDT_CONTRACT_ADDRESS, type UsdcOnEthAssetIdentifier, type UsdcOnIcpAssetIdentifier, type UsdtOnEthAssetIdentifier, type UsdtOnIcpAssetIdentifier, type UserHistoryEntry, type UserHistoryEntryApiItem, type UserHistoryOperation, type UserHistoryResponse, type UserLiquidationHistoryEntry, type UserLiquidationHistoryFilters, type UserLiquidationHistoryStatus, 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, createTransferErc20Transaction, estimateBorrowApy, estimateSupplyApy, executeWith, getAssetMetadata, getMinimumBorrowAmount, getMinimumDepositAmount, getMinimumWithdrawAmount, intFromPublicId, isAssetIdentifier, publicIdFromInt };
2455
+ export { ASSET_METADATA, AccountsModule, ActivitiesModule, type Activity, ActivityFilter, type ActivityStatusFoundResponse, type ActivityStatusNotFoundResponse, type ActivityTopUp, Asset, type AssetIdentifier, type AssetMetadata, type AssetPriceSnapshot, type AssetPrices, type BaseGetActivityStatusRequest, type BaseListActivitiesRequest, type BorrowAction, type BorrowOutflowDetails, type BorrowingPower, type BtcOnBtcAssetIdentifier, type BtcOnIcpAssetIdentifier, CK_ETH_DEPOSIT_CONTRACT_ADDRESS, type CalculateLtvRequest, type CanisterIdOverrides, type CanisterIds, Chain, type ChainAddressAccount, type ContractInteractionSupplyFlowRequest, type CreateAccountAction, type CreateAccountData, type CreateAccountRequest, type CreateBorrowData, type CreateBorrowRequest, type CreateProfileParams, type CreateSimpleLoanBorrow, type CreateSimpleLoanCollateral, type CreateSimpleLoanRefund, type CreateSimpleLoanRequest, type CreateTransferErc20TransactionParams, type CreateWithdrawData, type CreateWithdrawRequest, Environment, type EstimateInflowFeeRequest, type EthOnEthAssetIdentifier, type EthOnIcpAssetIdentifier, type EthTransactionRequest, type EvmContractTransaction, type EvmReadClient, EvmSupplyApprovalStrategy, type EvmSupplyContext, type ExecuteWithOptions, type FindPoolQuery, type FullWithdrawAmount, type GetActivityStatusByProfileRequest, type GetActivityStatusByShortRefRequest, type GetActivityStatusRequest, type GetActivityStatusResponse, type GetDepositAddressRequest, type GetEvmSupplyContextRequest, HEALTH_FACTOR_DECIMALS, HEALTH_FACTOR_SCALE, type HealthFactor, HistoryModule, INTEREST_YEAR_365_DAYS_SECONDS, type IcPrincipalAccount, type IcpAccountIdentifierAccount, type IcpOnIcpAssetIdentifier, type IcrcAccount, type IcrcTransferDetails, type InflowActivity, type InflowActivityOperation, type InflowActivityStatus, type InflowFeeEstimate, type InflowOperation, LendingModule, type LiquidiumAccount, type LiquidiumAccountInput, type LiquidiumAccountReference, LiquidiumAccountType, 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_DEPOSIT_AMOUNTS_BY_ASSET, MIN_WITHDRAW_AMOUNTS_BY_ASSET, type ManualTransferSupplyFlowRequest, MarketModule, type MaxRepayAmount, type MinimumBorrowAsset, type MinimumDepositAsset, type MinimumWithdrawAsset, type OutflowActivity, type OutflowActivityOperation, type OutflowActivityStatus, type OutflowDetails, OutflowType, type PaginatedResponse, type Pool, type PoolCanisterIds, type PoolRate, type Position, PositionsModule, type PrepareCreateProfileOptions, type ProtocolActivityEntry, type ProtocolActivityFeedFilters, type ProtocolActivityOperation, QuoteModule, type QuoteRequest, type QuoteResult, type QuoteValidationError, QuoteValidationErrorCode, type QuoteWarning, QuoteWarningCode, RATE_DECIMALS, RATE_SCALE, SUPPLY_COMPOUNDING_INTERVAL_15_SECONDS, type SendBtcTransactionRequest, type SendEthTransactionRequest, type SendIcrcTransferRequest, type SignMessageRequest, type SignMessageWalletAction, type SignatureInfo, type SigningChain, type SimpleLoan, type SimpleLoanAccount, type SimpleLoanAsset, type SimpleLoanAuthorization, type SimpleLoanBorrow, type SimpleLoanBorrowRequestedEventType, type SimpleLoanCollateral, type SimpleLoanConfig, SimpleLoanCreatedError, type SimpleLoanCreatedEventType, type SimpleLoanDepositTimerExceededEventType, type SimpleLoanDepositTimerStartedEventType, type SimpleLoanDestination, type SimpleLoanEthSignatureAuthorization, type SimpleLoanEvent, type SimpleLoanEventType, type SimpleLoanFindBorrow, type SimpleLoanFindCollateral, type SimpleLoanFindResult, type SimpleLoanFullLendWithdrawalRequestedEventType, type SimpleLoanGetByIdRequest, type SimpleLoanGetByRefRequest, type SimpleLoanGetRequest, type SimpleLoanIcpCallerAuthorization, type SimpleLoanIcpProfileWarmedEventType, type SimpleLoanInitialDeposit, type SimpleLoanInitialDepositTargetQuote, type SimpleLoanLeg, type SimpleLoanListEventsRequest, type SimpleLoanPositionSummary, type SimpleLoanProfileWarmedEventType, type SimpleLoanRepayCompleteEventType, type SimpleLoanRepayment, type SimpleLoanRepaymentTargetQuote, type SimpleLoanStuckFundsWithdrawalRequestedEventType, type SimpleLoanTerms, type SimpleLoanWarmedProfile, SimpleLoansModule, type SubmitInflowRequest, type SubmitInflowResponse, type SubmitSupplyFlowInflowRequest, SupplyAction, type SupplyFlow, type SupplyFlowRequest, SupplyPlanType, type SupplyTarget, type TransferSupplyFlowRequest, USDC_CONTRACT_ADDRESS, USDT_CONTRACT_ADDRESS, type UsdcOnEthAssetIdentifier, type UsdcOnIcpAssetIdentifier, type UsdtOnEthAssetIdentifier, type UsdtOnIcpAssetIdentifier, type UserHistoryEntry, type UserHistoryEntryApiItem, type UserHistoryOperation, type UserHistoryResponse, type UserLiquidationHistoryEntry, type UserLiquidationHistoryFilters, type UserLiquidationHistoryStatus, 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, createTransferErc20Transaction, estimateBorrowApy, estimateSupplyApy, executeWith, getAssetMetadata, getMinimumBorrowAmount, getMinimumDepositAmount, getMinimumWithdrawAmount, intFromPublicId, isAssetIdentifier, publicIdFromInt };
package/dist/index.js CHANGED
@@ -350,7 +350,14 @@ var idlFactory = ({ IDL }) => {
350
350
  "chain": Chains,
351
351
  "account": IDL.Text
352
352
  });
353
- const SignatureScheme = IDL.Variant({ "Wallet": SignatureInfo });
353
+ const IcpCallerAuth = IDL.Record({
354
+ "principal": IDL.Principal,
355
+ "subaccount": IDL.Opt(IDL.Vec(IDL.Nat8))
356
+ });
357
+ const SignatureScheme = IDL.Variant({
358
+ "Wallet": SignatureInfo,
359
+ "IcpCaller": IcpCallerAuth
360
+ });
354
361
  const AddAccountRequest = IDL.Record({
355
362
  "target_principal": IDL.Principal,
356
363
  "chain": WalletType,
@@ -363,12 +370,15 @@ var idlFactory = ({ IDL }) => {
363
370
  });
364
371
  const SignatureVerificationError = IDL.Variant({
365
372
  "InvalidEthSignature": IDL.Null,
373
+ "IcpCallerMismatch": IDL.Null,
366
374
  "UnsupportedChain": IDL.Null,
367
375
  "InvalidSolSignature": IDL.Null,
368
376
  "InvalidEthAddress": IDL.Null,
369
377
  "CouldNotDecode": IDL.Text,
370
378
  "ProfileNotFound": IDL.Null,
371
- "InvalidBtcSignature": IDL.Null
379
+ "InvalidBtcSignature": IDL.Null,
380
+ "AnonymousIcpCaller": IDL.Null,
381
+ "InvalidIcpSubaccount": IDL.Null
372
382
  });
373
383
  const ProtocolError = IDL.Variant({
374
384
  "PositionNotFound": IDL.Null,
@@ -936,6 +946,18 @@ var LENDING_CANISTER_SIGNATURE_VERIFICATION_ERROR_MAP = {
936
946
  InvalidBtcSignature: { code: LiquidiumErrorCode.INVALID_BTC_SIGNATURE },
937
947
  InvalidEthAddress: { code: LiquidiumErrorCode.INVALID_ETH_ADDRESS },
938
948
  UnsupportedChain: { code: LiquidiumErrorCode.UNSUPPORTED_CHAIN },
949
+ AnonymousIcpCaller: {
950
+ code: LiquidiumErrorCode.SIGNATURE_ERROR,
951
+ fallbackMessage: "Anonymous ICP caller"
952
+ },
953
+ InvalidIcpSubaccount: {
954
+ code: LiquidiumErrorCode.SIGNATURE_ERROR,
955
+ fallbackMessage: "Invalid ICP subaccount"
956
+ },
957
+ IcpCallerMismatch: {
958
+ code: LiquidiumErrorCode.SIGNATURE_ERROR,
959
+ fallbackMessage: "ICP caller mismatch"
960
+ },
939
961
  ProfileNotFound: { code: LiquidiumErrorCode.PROFILE_NOT_FOUND },
940
962
  CouldNotDecode: {
941
963
  code: LiquidiumErrorCode.SIGNATURE_ERROR,
@@ -1501,7 +1523,10 @@ var flexibleSimpleLoansIdlFactory = ({ IDL }) => {
1501
1523
  InvalidEthAddress: IDL.Null,
1502
1524
  CouldNotDecode: IDL.Text,
1503
1525
  ProfileNotFound: IDL.Null,
1504
- InvalidBtcSignature: IDL.Null
1526
+ InvalidBtcSignature: IDL.Null,
1527
+ AnonymousIcpCaller: IDL.Null,
1528
+ InvalidIcpSubaccount: IDL.Null,
1529
+ IcpCallerMismatch: IDL.Null
1505
1530
  });
1506
1531
  const ProtocolError = IDL.Variant({
1507
1532
  PositionNotFound: IDL.Null,
@@ -1621,6 +1646,11 @@ var flexibleSimpleLoansIdlFactory = ({ IDL }) => {
1621
1646
  eth_address: IDL.Text,
1622
1647
  lending_profile: IDL.Principal
1623
1648
  }),
1649
+ IcpProfileWarmed: IDL.Record({
1650
+ subaccount: IDL.Vec(IDL.Nat8),
1651
+ warmed_profile_id: IDL.Nat,
1652
+ lending_profile: IDL.Principal
1653
+ }),
1624
1654
  RepayComplete: CreateLoanResponse,
1625
1655
  DepositTimerStarted: IDL.Record({
1626
1656
  loan_id: IDL.Nat,
@@ -1638,6 +1668,9 @@ var flexibleSimpleLoansIdlFactory = ({ IDL }) => {
1638
1668
  derivation_index: IDL.Vec(IDL.Nat8),
1639
1669
  pubkey: IDL.Vec(IDL.Nat8),
1640
1670
  address: IDL.Text
1671
+ }),
1672
+ IcpCaller: IDL.Record({
1673
+ subaccount: IDL.Vec(IDL.Nat8)
1641
1674
  })
1642
1675
  });
1643
1676
  const Loan = IDL.Record({
@@ -7511,6 +7544,15 @@ function mapSimpleLoanEventType(eventType) {
7511
7544
  profileId: event.lending_profile.toText()
7512
7545
  };
7513
7546
  }
7547
+ if ("IcpProfileWarmed" in eventType) {
7548
+ const event = eventType.IcpProfileWarmed;
7549
+ return {
7550
+ type: "IcpProfileWarmed",
7551
+ subaccount: event.subaccount,
7552
+ warmedProfileId: event.warmed_profile_id,
7553
+ profileId: event.lending_profile.toText()
7554
+ };
7555
+ }
7514
7556
  if ("RepayComplete" in eventType) {
7515
7557
  return {
7516
7558
  type: "RepayComplete",
@@ -7533,6 +7575,12 @@ function mapWarmedProfile(profile) {
7533
7575
  };
7534
7576
  }
7535
7577
  function authorizationFromCanister(authorization) {
7578
+ if ("IcpCaller" in authorization) {
7579
+ return {
7580
+ type: "IcpCaller",
7581
+ subaccount: authorization.IcpCaller.subaccount
7582
+ };
7583
+ }
7536
7584
  return {
7537
7585
  type: "EthSignature",
7538
7586
  derivationIndex: authorization.EthSignature.derivation_index,