@ecency/wallets 1.3.11 → 1.3.13
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 +5 -0
- package/dist/ecency-sdk.es.js +2630 -2577
- package/dist/modules/wallets/mutations/save-wallet-information-to-metadata.d.ts +2 -1
- package/dist/modules/wallets/utils/build-external-transaction.d.ts +53 -0
- package/dist/modules/wallets/utils/index.d.ts +1 -0
- package/package.json +1 -1
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
|
|