Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,13 @@ toPublicKey(privKeyBytes)
```js
let keyUtils = {
getPrivateKey: async function (txInput, i) {
let opts = { version: "mainnet" };
let pkhBytes = DashKeys.utils.hexToBytes(txInput.pubKeyHash);
let address = await DashKeys.pkhToAddr(txInput.pubKeyHash);
let address = await DashKeys.pkhToAddr(pkhBytes, opts);

let yourKeyData = yourWalletKeyMapGoesHere[address];

let privKeyBytes = DashKeys.wifToPrivKey(yourKeyData.wif);
let privKeyBytes = await DashKeys.wifToPrivKey(yourKeyData.wif, opts);
return privKeyBytes;
},

Expand Down Expand Up @@ -490,8 +491,8 @@ Tx.createLegacyTx(coins, outputs, changeOutput);
* - `txDraft.change.address` MUST be set before signing the transaction
*
* BIP-69 Secure Sorting must be done AFTER setting each `address`
* - `Tx.sortInputs(txDraft.inputs)`
* - `Tx.sortOutputs(txDraft.outputs)`
* - `txDraft.inputs.sort(Tx.sortInputs)`
* - `txDraft.outputs.sort(Tx.sortOutputs)`
*/
let txDraft = tx.legacy.draftSingleOutput({ utxos, inputs, output });

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dashtx",
"version": "0.18.2",
"version": "0.18.3",
"description": "Create DASH Transactions with Vanilla JS (0 deps, cross-platform)",
"main": "dashtx.js",
"module": "dashtx.mjs",
Expand Down
Loading