@candledottv/cli 0.11.36 → 0.11.37
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 +1 -1
- package/dist/index.js +1 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @candledottv/cli
|
|
2
2
|
|
|
3
|
-
The Candle CLI (current version 0.11.
|
|
3
|
+
The Candle CLI (current version 0.11.37): authorize a device from your browser, keep your own keys
|
|
4
4
|
in an encrypted vault on this machine, hand an agent a TEE wallet it can trade, and manage API
|
|
5
5
|
keys, wallets, and setup health from the terminal. Zero runtime dependencies; the whole thing is
|
|
6
6
|
one self-contained `dist/index.js` that runs under plain Node.
|
package/dist/index.js
CHANGED
|
@@ -70366,7 +70366,7 @@ init_render();
|
|
|
70366
70366
|
init_secret_store();
|
|
70367
70367
|
|
|
70368
70368
|
// src/version.ts
|
|
70369
|
-
var CLI_VERSION = "0.11.
|
|
70369
|
+
var CLI_VERSION = "0.11.37";
|
|
70370
70370
|
|
|
70371
70371
|
// src/commands/auth.ts
|
|
70372
70372
|
init_keys_embedded_wallet();
|
|
@@ -90482,7 +90482,6 @@ var CANDLE_PERPS_WITHDRAW_PINS = {
|
|
|
90482
90482
|
depositories: ["0x66cf0aace1b4e562593bec10ec7868fba9932224"],
|
|
90483
90483
|
amountForm: "fixed6"
|
|
90484
90484
|
};
|
|
90485
|
-
var RELAY_API_URL = "https://api.relay.link";
|
|
90486
90485
|
var ZERO = "0x0000000000000000000000000000000000000000";
|
|
90487
90486
|
var EVM_ADDRESS_RE5 = /^0x[0-9a-fA-F]{40}$/;
|
|
90488
90487
|
var BYTES32_RE = /^0x[0-9a-fA-F]{64}$/;
|
|
@@ -90633,24 +90632,6 @@ function verifyWithdrawSendAsset(authorization, expect) {
|
|
|
90633
90632
|
}
|
|
90634
90633
|
return { ok: true };
|
|
90635
90634
|
}
|
|
90636
|
-
async function relayRecipientProblem(fetchImpl, requestId, recipient, relayUrl = RELAY_API_URL) {
|
|
90637
|
-
let body;
|
|
90638
|
-
try {
|
|
90639
|
-
const res = await fetchImpl(`${relayUrl}/requests/v3?id=${encodeURIComponent(requestId)}`, { method: "GET" });
|
|
90640
|
-
if (!res.ok)
|
|
90641
|
-
return `Relay's record of the request could not be read (HTTP ${res.status})`;
|
|
90642
|
-
body = await res.json();
|
|
90643
|
-
} catch (error) {
|
|
90644
|
-
return `Relay's record of the request could not be read (${error instanceof Error ? error.message : "unknown"})`;
|
|
90645
|
-
}
|
|
90646
|
-
const requests = isObject(body) && Array.isArray(body.requests) ? body.requests : [];
|
|
90647
|
-
const match = requests.find((r) => isObject(r) && r.id === requestId);
|
|
90648
|
-
if (!isObject(match))
|
|
90649
|
-
return "Relay does not list this request";
|
|
90650
|
-
const named = match.recipient;
|
|
90651
|
-
const same = recipient.startsWith("0x") ? sameEvm(named, recipient) : named === recipient;
|
|
90652
|
-
return same ? null : `Relay's request pays ${String(named)}, not this key's wallet ${recipient}`;
|
|
90653
|
-
}
|
|
90654
90635
|
|
|
90655
90636
|
// src/commands/perps-withdraw.ts
|
|
90656
90637
|
init_render();
|
|
@@ -90771,9 +90752,6 @@ async function perpsWithdraw(args, ctx) {
|
|
|
90771
90752
|
});
|
|
90772
90753
|
if (!mapping.ok)
|
|
90773
90754
|
throw refused2(mapping.reason);
|
|
90774
|
-
const recipient = await relayRecipientProblem(ctx.deps.fetch, build.relayRequestId, build.to.address);
|
|
90775
|
-
if (recipient)
|
|
90776
|
-
throw refused2(recipient);
|
|
90777
90755
|
const output = ctx.json ? ctx.deps.stderr : ctx.deps.stdout;
|
|
90778
90756
|
output.write(`Withdraw ${formatWithdrawAmount(amountMicros)} USDC from Hyperliquid account ${safeText(wallet3.address)} through Relay.
|
|
90779
90757
|
`);
|
package/package.json
CHANGED