@liquidium/client 0.7.1 → 0.8.0
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/README.md +2 -0
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,6 +62,8 @@ Amounts use `bigint` values in each asset's smallest unit. Read pool decimals be
|
|
|
62
62
|
|
|
63
63
|
`Asset.ETH` supports native ETH on `Chain.ETH` and ckETH ICRC transfers on `Chain.ICP`. Both routes use 18 decimals, so amounts are expressed in wei (`0.005 ETH` is `5_000_000_000_000_000n`). For native ETH deposits and repayments, select `mechanism: "transfer"` to send ETH to a generated deposit address or `mechanism: "contractInteraction"` to send ETH through the payable deposit helper. Transfer is the default when `mechanism` is omitted. ckETH routes use the generated ICRC target.
|
|
64
64
|
|
|
65
|
+
Native ETH borrows and withdrawals do not support addresses with deployed contract bytecode, including smart contract wallets. The same restriction applies to Simple Loan borrow destinations and native ETH collateral refund destinations.
|
|
66
|
+
|
|
65
67
|
See the [quick start](https://liquidium-inc.github.io/liquidium-sdk/getting-started/quick-start/) for LTV validation, repayment, and recovery.
|
|
66
68
|
|
|
67
69
|
## Examples
|
package/dist/index.cjs
CHANGED
|
@@ -321,6 +321,12 @@ function appendErrorContext(message, context) {
|
|
|
321
321
|
return `${message} (${details.join(", ")})`;
|
|
322
322
|
}
|
|
323
323
|
function createCanisterContext(opts) {
|
|
324
|
+
if (opts.agent) {
|
|
325
|
+
return {
|
|
326
|
+
agent: opts.agent,
|
|
327
|
+
canisterIds: opts.canisterIds
|
|
328
|
+
};
|
|
329
|
+
}
|
|
324
330
|
const host = resolveHost(opts.icHost);
|
|
325
331
|
const agent$1 = agent.HttpAgent.createSync({
|
|
326
332
|
host,
|
|
@@ -7725,6 +7731,7 @@ var LiquidiumClient = class {
|
|
|
7725
7731
|
const canisterIds = resolveCanisterIds(environment, config.canisterIds);
|
|
7726
7732
|
const timeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
7727
7733
|
this.canisterContext = createCanisterContext({
|
|
7734
|
+
agent: config.agent,
|
|
7728
7735
|
icHost: config.icHost,
|
|
7729
7736
|
identity: config.identity,
|
|
7730
7737
|
canisterIds
|