@vultisig/cli 0.22.7 → 0.23.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @vultisig/cli
2
2
 
3
+ ## 0.23.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#464](https://github.com/vultisig/vultisig-sdk/pull/464) [`a6db82f`](https://github.com/vultisig/vultisig-sdk/commit/a6db82fd103ea8eea01a084cc8fbd787367db437) Thanks [@neavra](https://github.com/neavra)! - feat(sdk/vault): `signMsgDeposit` for THORChain/MayaChain LP add/remove; sdk-cli dispatches LP memos through it
8
+
9
+ Adds `vault.signMsgDeposit({chain, amountBaseUnits, memo})` to `VaultBase`, building a `THORChainDeposit` cosmos message via the existing keysign pipeline (passes `isDeposit: true` through `getChainSpecific`). Memo is opaque pass-through — LP add (`+:POOL[:PAIRED]`), LP remove (`-:POOL:BPS[:ASSET]`), and any future deposit-style intent flow through the same surface.
10
+
11
+ sdk-cli's `signNonEvmServerTx` now dispatches THORChain/MayaChain MsgDeposit envelopes by memo prefix: `=:` continues to route through `vault.swap` (Phase D), `+:` and `-:` route through the new `signThorMsgDepositLp` → `vault.signMsgDeposit`. Unsupported prefixes (LOAN, BOND, etc.) throw `NotImplemented` with the offending memo in the error message. Phase E in the envelope-parity progression; previously these memos threw at `parseThorSwapMemo`.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [[`fde60dc`](https://github.com/vultisig/vultisig-sdk/commit/fde60dcc9f9822e21c2dbaeaacb9afb45cff0955), [`a6db82f`](https://github.com/vultisig/vultisig-sdk/commit/a6db82fd103ea8eea01a084cc8fbd787367db437)]:
16
+ - @vultisig/sdk@0.23.0
17
+ - @vultisig/client-shared@0.2.7
18
+ - @vultisig/rujira@18.0.0
19
+
3
20
  ## 0.22.7
4
21
 
5
22
  ### Patch Changes
package/dist/index.js CHANGED
@@ -6435,7 +6435,17 @@ var AgentExecutor = class {
6435
6435
  );
6436
6436
  }
6437
6437
  if (txArgs.msg_type === "deposit" && (chain === Chain10.THORChain || chain === Chain10.MayaChain)) {
6438
- return this.signThorMsgDepositSwap(serverTxData, chain);
6438
+ const memo = typeof txArgs.memo === "string" ? txArgs.memo : "";
6439
+ if (memo.startsWith("=:")) {
6440
+ return this.signThorMsgDepositSwap(serverTxData, chain);
6441
+ }
6442
+ if (memo.startsWith("+:") || memo.startsWith("-:")) {
6443
+ return this.signThorMsgDepositLp(serverTxData, chain);
6444
+ }
6445
+ throw new VaultError3(
6446
+ VaultErrorCode3.NotImplemented,
6447
+ `signNonEvmServerTx: MsgDeposit memo prefix not supported on ${chain}: '${memo}'. Supported prefixes: '=:' (swap), '+:' (LP add), '-:' (LP remove). Loan / validator ops are out of scope.`
6448
+ );
6439
6449
  }
6440
6450
  const args = parseNonEvmEnvelope(serverTxData, chain);
6441
6451
  if (this.verbose)
@@ -6546,6 +6556,49 @@ var AgentExecutor = class {
6546
6556
  explorer_url: explorerUrl
6547
6557
  };
6548
6558
  }
6559
+ /**
6560
+ * Sign and broadcast a THORChain / MayaChain MsgDeposit envelope whose
6561
+ * memo is an LP add (`+:POOL[:PAIRED]`) or remove (`-:POOL:BPS[:ASSET]`).
6562
+ *
6563
+ * The agent emits the same `cosmos-msg / msg_type: deposit` envelope as
6564
+ * the swap path; only the memo prefix differs. The memo is opaque
6565
+ * pass-through — sdk-cli doesn't parse pool / paired address / bps
6566
+ * because the SDK doesn't need to, the on-chain handler does.
6567
+ *
6568
+ * Uses `vault.signMsgDeposit` which builds a THORChainDeposit cosmos
6569
+ * message via the SDK's keysign payload pipeline. Amount is consumed
6570
+ * as base units directly (no decimal conversion) since the agent
6571
+ * already emits RUNE / CACAO in base units.
6572
+ */
6573
+ async signThorMsgDepositLp(serverTxData, chain) {
6574
+ const txArgs = serverTxData?.txArgs ?? {};
6575
+ const memo = typeof txArgs.memo === "string" ? txArgs.memo : "";
6576
+ const amountRaw = typeof txArgs.amount === "string" ? txArgs.amount : void 0;
6577
+ if (!amountRaw) {
6578
+ throw new VaultError3(
6579
+ VaultErrorCode3.InvalidConfig,
6580
+ `signThorMsgDepositLp: missing or non-string 'amount' field on ${chain} envelope`
6581
+ );
6582
+ }
6583
+ if (amountRaw.length > MAX_AMOUNT_DIGITS) {
6584
+ throw new VaultError3(
6585
+ VaultErrorCode3.InvalidAmount,
6586
+ `signThorMsgDepositLp: amount '${amountRaw}' for ${chain} exceeds ${MAX_AMOUNT_DIGITS}-digit safety bound. Likely a quote-side bug. Refusing to sign.`
6587
+ );
6588
+ }
6589
+ if (this.verbose)
6590
+ process.stderr.write(`[sign_thor_msg_deposit_lp] chain=${chain}, memo='${memo}', amountBaseUnits=${amountRaw}
6591
+ `);
6592
+ const result = await this.vault.signMsgDeposit({ chain, amountBaseUnits: amountRaw, memo });
6593
+ this.pendingPayloads.clear();
6594
+ const explorerUrl = VultisigSdk.getTxExplorerUrl(chain, result.txHash);
6595
+ return {
6596
+ tx_hash: result.txHash,
6597
+ chain: chain.toString(),
6598
+ status: "pending",
6599
+ explorer_url: explorerUrl
6600
+ };
6601
+ }
6549
6602
  /**
6550
6603
  * Sign and broadcast a server-built EVM transaction (raw EVM tx from
6551
6604
  * tx_ready SSE). Uses vault.prepareSendTx with memo field to carry the
@@ -7278,7 +7331,7 @@ function parseThorSwapMemo(memo) {
7278
7331
  if (!memo.startsWith("=:")) {
7279
7332
  throw new VaultError3(
7280
7333
  VaultErrorCode3.NotImplemented,
7281
- `parseThorSwapMemo: only swap memos (=:CHAIN.ASSET:DEST...) supported on this path; got memo='${memo}'. LP / non-swap MsgDeposit flows route through different SDK helpers (Phase E follow-up).`
7334
+ `parseThorSwapMemo: only swap memos (=:CHAIN.ASSET:DEST...) supported on this path; got memo='${memo}'. LP memos (+:/-:) route through signThorMsgDepositLp; loan / validator ops out of scope.`
7282
7335
  );
7283
7336
  }
7284
7337
  const memoBody = memo.slice(2);
@@ -8677,7 +8730,7 @@ var cachedVersion = null;
8677
8730
  function getVersion() {
8678
8731
  if (cachedVersion) return cachedVersion;
8679
8732
  if (true) {
8680
- cachedVersion = "0.22.7";
8733
+ cachedVersion = "0.23.0";
8681
8734
  return cachedVersion;
8682
8735
  }
8683
8736
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vultisig/cli",
3
- "version": "0.22.7",
3
+ "version": "0.23.0",
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": {
@@ -73,10 +73,10 @@
73
73
  "@cosmjs/stargate": "^0.38.1",
74
74
  "@napi-rs/keyring": "^1.3.0",
75
75
  "@noble/hashes": "^2.0.1",
76
- "@vultisig/client-shared": "^0.2.6",
76
+ "@vultisig/client-shared": "^0.2.7",
77
77
  "@vultisig/core-chain": "^1.7.1",
78
- "@vultisig/rujira": "^17.0.1",
79
- "@vultisig/sdk": "^0.22.7",
78
+ "@vultisig/rujira": "^18.0.0",
79
+ "@vultisig/sdk": "^0.23.0",
80
80
  "chalk": "^5.6.2",
81
81
  "cli-table3": "^0.6.5",
82
82
  "commander": "^14.0.3",