npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@secux/app-doge

v3.0.0

Published

SecuX Hardware Wallet DOGE API

Downloads

16

Readme

@secux/app-doge

SecuX Hardware Wallet DOGE API

Usage

import { SecuxDOGE, ScriptType } from "@secux/app-doge";

First, create instance of ITransport.

Examples

  1. 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);
      
      /*
      
      // transfer data to hardware wallet by custom transport layer.
      const data = SecuxDOGE.prepareAddress(path);
      const response = await device.Exchange(data);
      const address = SecuxDOGE.resolveAddress(response, 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");
  2. Sign transaction (support legacy transaction currently).

const inputs = [
    {
        hash: "d518fa4c4c0ebbfec834a2bee55687656f5e8ab87ec91b0929e34bf4f9a97c2c",
        vout: 0,
        satoshis: 500000000,
        path: "m/44'/3'/1'/0/3",
        // for custom transport layer, each utxo need publickey.
        // publickey: "035e4e31aec14a962972bdf97030586929f898927e2fb271d0174df3e4c8f81f47"
    },
    {
        hash: "a1acc8dd173fb4d2b010a60883752a60e5b27f1dc3e940ad5542781715522ca5",
        vout: 0,
        satoshis: 2052800000,
        path: "m/44'/3'/0'/0/4",
        // for custom transport layer, each utxo need publickey.
        // publickey: "03b4b21789f999f8c268d77ff0f6ed80884ec088ddd1b2d10055981d6bc393308a"
    },
    {
        hash: "8e4e5084caa1382d755ac11a8f9cdb7a5e2f903703ef51bf2910c3eea2696ea8",
        vout: 0,
        satoshis: 300000000,
        path: "m/44'/3'/0'/0/0",
        // for custom transport layer, each utxo need publickey.
        // publickey: "02cc6b0dc33aabcf3a23643e5e2919a80c50fb3dd2129ce409bbc5f0d4643d05e0"
    }
];

const to = {
    address: "DKiNgqGMrFXrPDSLmpnsxNAqJ3WUQX376f",
    satoshis: 8888888
};

const utxo = {
    path: "m/44'/3'/0'/0/0",
    satoshis: 700000000,
    // for custom transport layer, each utxo need publickey.
    // publickey: "02cc6b0dc33aabcf3a23643e5e2919a80c50fb3dd2129ce409bbc5f0d4643d05e0"
};

const { raw_tx } = await device.sign(inputs, { to, utxo });

/*

// transfer data to hardware wallet by custom transport layer.
const { commandData, rawTx } = SecuxDOGE.prepareSign(inputs, { to, utxo });
const response = await device.Exchange(commandData);
const signed = SecuxDOGE.resloveTransaction(response, rawTx, inputs.map(x => x.publickey));

*/

API doc

Similar to @secux/app-btc.