@ecency/wallets 1.3.11 → 1.3.12

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 CHANGED
@@ -10,6 +10,7 @@ Utilities for managing Hive blockchain wallets and external cryptocurrency walle
10
10
  - `signTxAndBroadcast` – sign a transaction and immediately broadcast it
11
11
  - `signExternalTx` – sign transactions for external chains like BTC or ETH
12
12
  - `signExternalTxAndBroadcast` – sign and broadcast transactions on external networks
13
+ - `buildExternalTx` – construct transactions or PSBTs for external chains
13
14
  - `encryptMemoWithKeys` / `decryptMemoWithKeys` – encrypt or decrypt memos using explicit keys
14
15
  - `encryptMemoWithAccounts` / `decryptMemoWithAccounts` – encrypt or decrypt memos by looking up account memo keys
15
16
  - `useGetExternalWalletBalanceQuery` – retrieve balances for external wallets such as BTC, ETH, SOL, TRX, TON, ATOM, or APT
@@ -31,6 +32,8 @@ import {
31
32
  signTxAndBroadcast,
32
33
  signExternalTx,
33
34
  signExternalTxAndBroadcast,
35
+ buildExternalTx,
36
+ buildPsbt,
34
37
  encryptMemoWithKeys,
35
38
  encryptMemoWithAccounts,
36
39
  decryptMemoWithKeys,
@@ -45,6 +48,8 @@ const client = new Client('https://api.hive.blog');
45
48
  const signature = signDigest('deadbeef', privateWif);
46
49
  const signedTx = signTx(tx, privateWif, customChainId);
47
50
  await signTxAndBroadcast(client, tx, privateWif);
51
+ const btcBuildParams = { /* inputs, outputs, etc. */ };
52
+ const btcPsbt = buildExternalTx(EcencyWalletCurrency.BTC, btcBuildParams);
48
53
  await signExternalTx(EcencyWalletCurrency.ETH, ethSignParams);
49
54
  await signExternalTxAndBroadcast(EcencyWalletCurrency.BTC, btcSignParams);
50
55