@secux/app-dash
SecuX Hardware Wallet DASH API
Usage
import { SecuxDASH } from "@secux/app-dash";
First, create instance of ITransport.
Examples
-
Get address by BIP32 path.
- native segwit address (default script: P2WPKH)
const path = "m/84'/5'/0'/0/0";
const address = await device.getAddress(path);
- segwit address (default script: P2SH_P2WPKH)
const address = await device.getAddress("m/49'/5'/0'/0/0");
- legacy address (default script: P2PKH)
const address = await device.getAddress("m/44'/5'/0'/0/0");
-
Sign transaction (support legacy transaction currently).
const inputs = [
{
hash: "d1471f2c9ab2b7d1814c80f18f270efa779a489d696ee8db2ee13360111e486d",
vout: 0,
satoshis: 100000,
path: "m/44'/5'/0'/0/0",
},
{
hash: "cfdf9cac901d2b58d94b5794f71505ad13ef54739174a46657a11b74013b63de",
vout: 0,
satoshis: 99504,
path: "m/44'/5'/2'/0/0",
}
];
const to = {
address: "XefQmd7TDrF8cMUqTBuP5FUfA1frnUc8pW",
satoshis: 99999
};
const utxo = {
path: "m/44'/5'/3'/0/4",
satoshis: 88888,
};
const { raw_tx } = await device.sign(inputs, { to, utxo });
API doc
Similar to @secux/app-btc.