@vultisig/sdk 2.15.0 → 2.16.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,29 @@
1
1
  # @vultisig/sdk
2
2
 
3
+ ## 2.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#984](https://github.com/vultisig/vultisig-sdk/pull/984) [`0147158`](https://github.com/vultisig/vultisig-sdk/commit/0147158ac6955aa420cdad2da704cba998e4a5f1) Thanks [@gomesalexandre](https://github.com/gomesalexandre)! - feat(utxo): OP_RETURN output in buildUtxoSendTx so UTXO THOR swaps carry the swap memo
8
+
9
+ Adds an optional `opReturnData` (UTF-8) to `BuildUtxoSendOptions`. When present,
10
+ `buildUtxoSendTx` appends a trailing 0-value OP_RETURN output carrying the memo,
11
+ enabling UTXO (DOGE/BTC/LTC/BCH) THORChain swaps: without the on-chain memo
12
+ THORChain cannot route the vaulted deposit, so the app currently fails closed on
13
+ these.
14
+
15
+ Fund-safety:
16
+
17
+ - The OP_RETURN is built inside `serializeOutputs`, so it feeds the outputs
18
+ digest every sighash variant consumes (BIP143 / legacy / Zcash). Every input
19
+ signature commits to the memo - it cannot be stripped or altered post-signing.
20
+ - The recipient (vault) output keeps the FULL amount; the OP_RETURN is a separate
21
+ 0-value output and its size is folded into the fee estimate, so the fee comes
22
+ from inputs/change, never by shaving the vault output.
23
+ - Payload is capped at the 80-byte standard-relay limit (direct push <= 75 bytes,
24
+ OP_PUSHDATA1 for 76..80); larger memos throw rather than build a non-standard,
25
+ unbroadcastable tx.
26
+
3
27
  ## 2.15.0
4
28
 
5
29
  ### Patch Changes
@@ -1864,6 +1864,15 @@ type BuildUtxoSendOptions = {
1864
1864
  * stale compiled fallback.
1865
1865
  */
1866
1866
  zcashBranchId?: number;
1867
+ /**
1868
+ * Optional UTF-8 data (typically a THORChain swap memo) embedded on-chain as
1869
+ * a trailing 0-value OP_RETURN output. Standard-relay policy caps this at 80
1870
+ * bytes; longer memos throw. The memo feeds the sighash outputs digest, so
1871
+ * every input signature commits to it — the signed tx cannot be rebroadcast
1872
+ * with the memo stripped or altered. Required for UTXO THORChain swaps
1873
+ * (DOGE/BTC/LTC/BCH): without it THORChain can't route the deposit.
1874
+ */
1875
+ opReturnData?: string;
1867
1876
  };
1868
1877
  type UtxoTxBuilderResult = {
1869
1878
  /** SHA-256d preimage hashes to sign, one per input, hex-encoded (no 0x prefix) */