This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Transaction } = require('bitcore-lib') | |
const { decrypt } = require('bip38') | |
const encryptedKey = '<private key beginning with 6>' | |
const password = '<private key password>' | |
const privateKey = decrypt(encryptedKey, password).privateKey | |
// Check UTXO info at https://insight.bitpay.com/api/addr/<origin address>/utxo | |
const utxo = { |