@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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Liquidium
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  ![npm](https://img.shields.io/npm/v/@liquidium/client?label=%40liquidium%2Fclient)
2
- ![license](https://img.shields.io/npm/l/@liquidium/client)
2
+ ![license](https://img.shields.io/badge/license-MIT-blue)
3
3
 
4
4
  <p align="center">
5
- <img src="../../borrow.svg" alt="Liquidium borrow illustration" width="700" />
5
+ <img src="https://raw.githubusercontent.com/Liquidium-Inc/liquidium-sdk/main/sdk.svg" alt="Liquidium SDK illustration" width="700" />
6
6
  </p>
7
7
 
8
8
  <h1 align="center">Liquidium SDK</h1>
@@ -12,11 +12,18 @@
12
12
  </p>
13
13
 
14
14
  <p align="center">
15
+ <a href="https://liquidium-inc.github.io/liquidium-sdk/"><b>SDK Docs</b></a> ·
15
16
  <a href="https://github.com/Liquidium-Inc/liquidium-sdk/tree/main/examples/instant-loans-flow"><b>Instant Loan Example</b></a> ·
16
17
  <a href="https://github.com/Liquidium-Inc/liquidium-sdk/tree/main/examples/vite-react-dynamic"><b>SDK Method Query Example</b></a> ·
17
18
  <a href="#core-api"><b>Core API</b></a>
18
19
  </p>
19
20
 
21
+ ## Documentation
22
+
23
+ Use the SDK docs for setup, guides, API reference, and examples.
24
+
25
+ [Open the Liquidium SDK docs](https://liquidium-inc.github.io/liquidium-sdk/)
26
+
20
27
  ## Why Start With Instant Loans
21
28
 
22
29
  - **Accountless loan creation**: create instant loans without requiring a Liquidium profile.
@@ -27,7 +34,7 @@
27
34
 
28
35
  ## Integration Paths
29
36
 
30
- Liquidium supports two lending integration paths:
37
+ Liquidium supports two borrowing and lending integration paths:
31
38
 
32
39
  | Path | Use when | Main SDK calls |
33
40
  | --- | --- | --- |
package/dist/index.cjs CHANGED
@@ -2,9 +2,10 @@
2
2
 
3
3
  var viem = require('viem');
4
4
  var chains = require('viem/chains');
5
- var agent = require('@dfinity/agent');
6
- var principal = require('@dfinity/principal');
5
+ var agent = require('@icp-sdk/core/agent');
6
+ var principal = require('@icp-sdk/core/principal');
7
7
  var ledgerIcrc = require('@dfinity/ledger-icrc');
8
+ var principal$1 = require('@dfinity/principal');
8
9
 
9
10
  // src/client.ts
10
11
 
@@ -3054,7 +3055,7 @@ function getIcrcAccountSupplyTarget(profileId, request) {
3054
3055
  owner: poolPrincipal.toText(),
3055
3056
  subaccount,
3056
3057
  account: ledgerIcrc.encodeIcrcAccount({
3057
- owner: principal.Principal.fromText(poolPrincipal.toText()),
3058
+ owner: principal$1.Principal.fromText(poolPrincipal.toText()),
3058
3059
  subaccount
3059
3060
  })
3060
3061
  };
@@ -4209,7 +4210,7 @@ function createTransferErc20Transaction(params) {
4209
4210
  }
4210
4211
  function createDepositErc20Transaction(params) {
4211
4212
  const expectedDestinationAccount = ledgerIcrc.encodeIcrcAccount({
4212
- owner: principal.Principal.fromText(params.poolId),
4213
+ owner: principal$1.Principal.fromText(params.poolId),
4213
4214
  subaccount: encodeInflowSubaccount({
4214
4215
  action: params.action,
4215
4216
  principal: principal.Principal.fromText(params.profileId)
@@ -5647,7 +5648,7 @@ var PositionsModule = class {
5647
5648
  * Returns the per-reserve breakdown of a profile's supplies and borrows,
5648
5649
  * joined with pool metadata, rates, and current USD prices.
5649
5650
  *
5650
- * USD values are scaled to {@link USD_VALUE_SCALE_DECIMALS} (27).
5651
+ * USD values are scaled to 27 decimals.
5651
5652
  *
5652
5653
  * @param profileId - The Liquidium profile principal text.
5653
5654
  * @returns Per-reserve position rows joined with pool metadata and USD values.
@@ -5799,6 +5800,8 @@ function resolveEvmReadClient(config) {
5799
5800
  });
5800
5801
  }
5801
5802
 
5803
+ exports.AccountsModule = AccountsModule;
5804
+ exports.ActivitiesModule = ActivitiesModule;
5802
5805
  exports.ActivityDirection = ActivityDirection;
5803
5806
  exports.ActivityFilter = ActivityFilter;
5804
5807
  exports.ActivityKind = ActivityKind;
@@ -5808,12 +5811,18 @@ exports.CK_ETH_DEPOSIT_CONTRACT_ADDRESS = CK_ETH_DEPOSIT_CONTRACT_ADDRESS;
5808
5811
  exports.Chain = Chain;
5809
5812
  exports.Environment = Environment;
5810
5813
  exports.EvmSupplyApprovalStrategy = EvmSupplyApprovalStrategy;
5814
+ exports.HistoryModule = HistoryModule;
5811
5815
  exports.InflowSubmitType = InflowSubmitType;
5812
5816
  exports.InstantLoanStatus = InstantLoanStatus;
5817
+ exports.InstantLoansModule = InstantLoansModule;
5818
+ exports.LendingModule = LendingModule;
5813
5819
  exports.LiquidiumClient = LiquidiumClient;
5814
5820
  exports.LiquidiumError = LiquidiumError;
5815
5821
  exports.LiquidiumErrorCode = LiquidiumErrorCode;
5822
+ exports.MarketModule = MarketModule;
5816
5823
  exports.OutflowType = OutflowType;
5824
+ exports.PositionsModule = PositionsModule;
5825
+ exports.QuoteModule = QuoteModule;
5817
5826
  exports.QuoteValidationErrorCode = QuoteValidationErrorCode;
5818
5827
  exports.QuoteWarningCode = QuoteWarningCode;
5819
5828
  exports.RATE_DECIMALS = RATE_DECIMALS;