@vultisig/cli 0.22.0 → 0.22.3
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/CHANGELOG.md +15 -0
- package/dist/index.js +10 -82
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @vultisig/cli
|
|
2
2
|
|
|
3
|
+
## 0.22.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#405](https://github.com/vultisig/vultisig-sdk/pull/405) [`441f5bb`](https://github.com/vultisig/vultisig-sdk/commit/441f5bb9022321023a65d28a5941717ac7542bee) Thanks [@gomesalexandre](https://github.com/gomesalexandre)! - fix(ustc): dynamic burn-tax for TerraClassic USTC sends, case-insensitive coin id check
|
|
8
|
+
|
|
9
|
+
Replaces the hardcoded 1,000,000 uusd fee surcharge with a live LCD `tax_rate` + optional `tax_cap` query for TerraClassic USTC (uusd) sends.
|
|
10
|
+
- `computeUstcBurnTaxAmount()` fetches on-chain rate and cap, returns '0' when rate is zero (current post-UST-collapse governance state)
|
|
11
|
+
- Fail-open on LCD outage: falls back to '0' so sends are never blocked when burn tax is zero; ante handler rejects if rate is non-zero and LCD is down
|
|
12
|
+
- Case-insensitive `coin.id?.toLowerCase() === 'uusd'` guard to match `areEqualCoins` behavior
|
|
13
|
+
- 5 unit tests covering: rate=0, rate=1.2%, rate+cap, LCD outage, LUNC non-USTC exclusion
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`441f5bb`](https://github.com/vultisig/vultisig-sdk/commit/441f5bb9022321023a65d28a5941717ac7542bee)]:
|
|
16
|
+
- @vultisig/sdk@0.22.3
|
|
17
|
+
|
|
3
18
|
## 0.22.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -6015,7 +6015,6 @@ var AgentClient = class {
|
|
|
6015
6015
|
}
|
|
6016
6016
|
const result = {
|
|
6017
6017
|
fullText: "",
|
|
6018
|
-
actions: [],
|
|
6019
6018
|
suggestions: [],
|
|
6020
6019
|
transactions: [],
|
|
6021
6020
|
message: null
|
|
@@ -6107,14 +6106,6 @@ var AgentClient = class {
|
|
|
6107
6106
|
if (typeof title === "string") callbacks.onTitle?.(title);
|
|
6108
6107
|
break;
|
|
6109
6108
|
}
|
|
6110
|
-
case "actions": {
|
|
6111
|
-
if (this.verbose) process.stderr.write(`[SSE:actions] raw: ${data.slice(0, 1e3)}
|
|
6112
|
-
`);
|
|
6113
|
-
const actions = v1Data?.actions ?? parsed.actions ?? [];
|
|
6114
|
-
result.actions.push(...actions);
|
|
6115
|
-
callbacks.onActions?.(actions);
|
|
6116
|
-
break;
|
|
6117
|
-
}
|
|
6118
6109
|
case "suggestions": {
|
|
6119
6110
|
const suggestions = v1Data?.suggestions ?? parsed.suggestions ?? [];
|
|
6120
6111
|
result.suggestions.push(...suggestions);
|
|
@@ -6170,8 +6161,6 @@ var AgentClient = class {
|
|
|
6170
6161
|
return "tool_progress";
|
|
6171
6162
|
case "data-title":
|
|
6172
6163
|
return "title";
|
|
6173
|
-
case "data-actions":
|
|
6174
|
-
return "actions";
|
|
6175
6164
|
case "data-suggestions":
|
|
6176
6165
|
return "suggestions";
|
|
6177
6166
|
case "data-tx_ready":
|
|
@@ -6380,7 +6369,7 @@ function getNativeTokenDecimals(chain) {
|
|
|
6380
6369
|
}
|
|
6381
6370
|
|
|
6382
6371
|
// src/agent/executor.ts
|
|
6383
|
-
import { Chain as Chain10, evmCall,
|
|
6372
|
+
import { Chain as Chain10, evmCall, Vultisig as VultisigSdk } from "@vultisig/sdk";
|
|
6384
6373
|
|
|
6385
6374
|
// ../../node_modules/viem/_esm/index.js
|
|
6386
6375
|
init_formatUnits();
|
|
@@ -6550,7 +6539,6 @@ var AUTO_EXECUTE_ACTIONS = /* @__PURE__ */ new Set([
|
|
|
6550
6539
|
"address_book_remove",
|
|
6551
6540
|
"get_address_book",
|
|
6552
6541
|
"get_balances",
|
|
6553
|
-
"get_portfolio",
|
|
6554
6542
|
"search_token",
|
|
6555
6543
|
"list_vaults",
|
|
6556
6544
|
"build_swap_tx",
|
|
@@ -6703,8 +6691,6 @@ var AgentExecutor = class _AgentExecutor {
|
|
|
6703
6691
|
switch (action.type) {
|
|
6704
6692
|
case "get_balances":
|
|
6705
6693
|
return this.getBalances(params);
|
|
6706
|
-
case "get_portfolio":
|
|
6707
|
-
return this.getPortfolio(params);
|
|
6708
6694
|
case "add_chain":
|
|
6709
6695
|
return this.addChain(params);
|
|
6710
6696
|
case "remove_chain":
|
|
@@ -6775,35 +6761,6 @@ var AgentExecutor = class _AgentExecutor {
|
|
|
6775
6761
|
}
|
|
6776
6762
|
return { balances: entries };
|
|
6777
6763
|
}
|
|
6778
|
-
async getPortfolio(params) {
|
|
6779
|
-
const currencyRaw = String(params.currency ?? "USD").trim().toLowerCase();
|
|
6780
|
-
const fiatCurrency = fiatCurrencies3.includes(currencyRaw) ? currencyRaw : "usd";
|
|
6781
|
-
const portfolio = await this.vault.portfolio(fiatCurrency);
|
|
6782
|
-
const chainFilter = params.chain;
|
|
6783
|
-
const tickerFilter = params.ticker;
|
|
6784
|
-
let rows = portfolio.balances.map((b) => ({
|
|
6785
|
-
chain: b.chainId || "",
|
|
6786
|
-
symbol: b.symbol || "",
|
|
6787
|
-
amount: b.formattedAmount || b.amount?.toString() || "0",
|
|
6788
|
-
decimals: b.decimals ?? 18,
|
|
6789
|
-
raw_amount: b.amount,
|
|
6790
|
-
fiatValue: b.fiatValue,
|
|
6791
|
-
fiatCurrency: b.fiatCurrency ?? portfolio.currency
|
|
6792
|
-
}));
|
|
6793
|
-
if (chainFilter) {
|
|
6794
|
-
const chain = resolveChain(chainFilter);
|
|
6795
|
-
if (!chain) throw new Error(`Unknown chain: ${chainFilter}`);
|
|
6796
|
-
rows = rows.filter((r) => r.chain.toLowerCase() === chain.toLowerCase());
|
|
6797
|
-
}
|
|
6798
|
-
if (tickerFilter) {
|
|
6799
|
-
rows = rows.filter((r) => r.symbol.toLowerCase() === String(tickerFilter).toLowerCase());
|
|
6800
|
-
}
|
|
6801
|
-
return {
|
|
6802
|
-
balances: rows,
|
|
6803
|
-
totalValue: portfolio.totalValue,
|
|
6804
|
-
currency: portfolio.currency
|
|
6805
|
-
};
|
|
6806
|
-
}
|
|
6807
6764
|
// ============================================================================
|
|
6808
6765
|
// Chain & Token Management
|
|
6809
6766
|
// ============================================================================
|
|
@@ -7640,7 +7597,7 @@ var AgentExecutor = class _AgentExecutor {
|
|
|
7640
7597
|
const nextNonce = this.stateStore.getNextEvmNonce(chain, rpcNonce);
|
|
7641
7598
|
if (nextNonce !== rpcNonce) {
|
|
7642
7599
|
const lastBroadcast = this.evmLastBroadcast.get(chain.toString()) ?? 0;
|
|
7643
|
-
if (Date.now() - lastBroadcast <
|
|
7600
|
+
if (Date.now() - lastBroadcast < 3e4) {
|
|
7644
7601
|
if (this.verbose)
|
|
7645
7602
|
process.stderr.write(
|
|
7646
7603
|
`[nonce] Keeping local nonce ${nextNonce} for ${chain} (broadcast ${Date.now() - lastBroadcast}ms ago)
|
|
@@ -8640,8 +8597,6 @@ var AgentSession = class {
|
|
|
8640
8597
|
},
|
|
8641
8598
|
onTitle: (_title) => {
|
|
8642
8599
|
},
|
|
8643
|
-
onActions: (_actions) => {
|
|
8644
|
-
},
|
|
8645
8600
|
onSuggestions: (suggestions) => {
|
|
8646
8601
|
ui.onSuggestions(suggestions);
|
|
8647
8602
|
},
|
|
@@ -8694,37 +8649,6 @@ var AgentSession = class {
|
|
|
8694
8649
|
if (displayText) {
|
|
8695
8650
|
ui.onAssistantMessage(displayText);
|
|
8696
8651
|
}
|
|
8697
|
-
const legacyActions = streamResult.actions.filter((a) => a.type !== "sign_tx");
|
|
8698
|
-
if (legacyActions.length > 0) {
|
|
8699
|
-
const results = await this.executeActions(legacyActions, ui);
|
|
8700
|
-
const hasBuildSuccess = results.some((r) => r.success && r.action.startsWith("build_"));
|
|
8701
|
-
if (hasBuildSuccess && this.executor.hasPendingTransaction()) {
|
|
8702
|
-
if (this.config.verbose)
|
|
8703
|
-
process.stderr.write(`[session] build_* action produced pending tx, auto-signing client-side
|
|
8704
|
-
`);
|
|
8705
|
-
const signAction = {
|
|
8706
|
-
id: `tx_sign_${Date.now()}`,
|
|
8707
|
-
type: "sign_tx",
|
|
8708
|
-
title: "Sign transaction",
|
|
8709
|
-
params: {},
|
|
8710
|
-
auto_execute: true
|
|
8711
|
-
};
|
|
8712
|
-
const signResults = await this.executeActions([signAction], ui);
|
|
8713
|
-
const signResult = signResults[0];
|
|
8714
|
-
if (signResult) {
|
|
8715
|
-
this.pendingToolResults.push(actionResultToRecentAction(signResult));
|
|
8716
|
-
await this.processMessageLoop(null, ui, depth + 1);
|
|
8717
|
-
return;
|
|
8718
|
-
}
|
|
8719
|
-
}
|
|
8720
|
-
if (results.length > 0) {
|
|
8721
|
-
for (const result of results) {
|
|
8722
|
-
this.pendingToolResults.push(actionResultToRecentAction(result));
|
|
8723
|
-
}
|
|
8724
|
-
await this.processMessageLoop(null, ui, depth + 1);
|
|
8725
|
-
return;
|
|
8726
|
-
}
|
|
8727
|
-
}
|
|
8728
8652
|
if (serverTxStoredFromStream > 0) {
|
|
8729
8653
|
if (this.config.verbose)
|
|
8730
8654
|
process.stderr.write(
|
|
@@ -9453,7 +9377,7 @@ var cachedVersion = null;
|
|
|
9453
9377
|
function getVersion() {
|
|
9454
9378
|
if (cachedVersion) return cachedVersion;
|
|
9455
9379
|
if (true) {
|
|
9456
|
-
cachedVersion = "0.22.
|
|
9380
|
+
cachedVersion = "0.22.3";
|
|
9457
9381
|
return cachedVersion;
|
|
9458
9382
|
}
|
|
9459
9383
|
try {
|
|
@@ -10071,7 +9995,7 @@ var EventBuffer = class {
|
|
|
10071
9995
|
};
|
|
10072
9996
|
|
|
10073
9997
|
// src/interactive/session.ts
|
|
10074
|
-
import { fiatCurrencies as
|
|
9998
|
+
import { fiatCurrencies as fiatCurrencies3 } from "@vultisig/sdk";
|
|
10075
9999
|
import chalk13 from "chalk";
|
|
10076
10000
|
import ora3 from "ora";
|
|
10077
10001
|
import * as readline3 from "readline";
|
|
@@ -10889,9 +10813,9 @@ Error: ${error2.message}`));
|
|
|
10889
10813
|
i++;
|
|
10890
10814
|
}
|
|
10891
10815
|
}
|
|
10892
|
-
if (!
|
|
10816
|
+
if (!fiatCurrencies3.includes(currency)) {
|
|
10893
10817
|
console.log(chalk13.red(`Invalid currency: ${currency}`));
|
|
10894
|
-
console.log(chalk13.yellow(`Supported currencies: ${
|
|
10818
|
+
console.log(chalk13.yellow(`Supported currencies: ${fiatCurrencies3.join(", ")}`));
|
|
10895
10819
|
return;
|
|
10896
10820
|
}
|
|
10897
10821
|
const raw = args.includes("--raw");
|
|
@@ -11534,6 +11458,10 @@ async function init(vaultOverride, unlockPassword, passwordTTL) {
|
|
|
11534
11458
|
if (vault) {
|
|
11535
11459
|
await ctx.setActiveVault(vault);
|
|
11536
11460
|
setupVaultEvents(vault);
|
|
11461
|
+
if (unlockPassword) {
|
|
11462
|
+
cachePassword(vault.id, unlockPassword);
|
|
11463
|
+
if (vault.name) cachePassword(vault.name, unlockPassword);
|
|
11464
|
+
}
|
|
11537
11465
|
}
|
|
11538
11466
|
}
|
|
11539
11467
|
return ctx;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vultisig/cli",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.3",
|
|
4
4
|
"description": "The self-custody MPC wallet CLI for AI coding agents (Claude Code, Cursor, OpenCode). Natural-language agent mode, 36+ chains, DKLS23 threshold signatures. Seedless.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
"@napi-rs/keyring": "^1.2.0",
|
|
75
75
|
"@noble/hashes": "^2.0.1",
|
|
76
76
|
"@vultisig/client-shared": "^0.2.6",
|
|
77
|
-
"@vultisig/core-chain": "^1.
|
|
77
|
+
"@vultisig/core-chain": "^1.5.1",
|
|
78
78
|
"@vultisig/rujira": "^17.0.0",
|
|
79
|
-
"@vultisig/sdk": "^0.22.
|
|
79
|
+
"@vultisig/sdk": "^0.22.3",
|
|
80
80
|
"chalk": "^5.6.2",
|
|
81
81
|
"cli-table3": "^0.6.5",
|
|
82
82
|
"commander": "^14.0.3",
|