@secux/app-doge
SecuX Hardware Wallet DOGE API
Usage
import { SecuxDOGE, ScriptType } from "@secux/app-doge";
First, create instance of ITransport.
Examples
-
Get address by purpose and script type.
- native segwit address (default script: P2WPKH)
const path = "m/84'/3'/0'/0/0";
const address = await device.getAddress(path);
- segwit address (default script: P2SH_P2WPKH)
const address = await device.getAddress("m/49'/3'/0'/0/0");
- legacy address (default script: P2PKH)
const address = await device.getAddress("m/44'/3'/0'/0/0");
-
Sign transaction (support legacy transaction currently).
const inputs = [
{
hash: "d518fa4c4c0ebbfec834a2bee55687656f5e8ab87ec91b0929e34bf4f9a97c2c",
vout: 0,
satoshis: 500000000,
path: "m/44'/3'/1'/0/3",
},
{
hash: "a1acc8dd173fb4d2b010a60883752a60e5b27f1dc3e940ad5542781715522ca5",
vout: 0,
satoshis: 2052800000,
path: "m/44'/3'/0'/0/4",
},
{
hash: "8e4e5084caa1382d755ac11a8f9cdb7a5e2f903703ef51bf2910c3eea2696ea8",
vout: 0,
satoshis: 300000000,
path: "m/44'/3'/0'/0/0",
}
];
const to = {
address: "DKiNgqGMrFXrPDSLmpnsxNAqJ3WUQX376f",
satoshis: 8888888
};
const utxo = {
path: "m/44'/3'/0'/0/0",
satoshis: 700000000,
};
const { raw_tx } = await device.sign(inputs, { to, utxo });
API doc
Similar to @secux/app-btc.