crypto-sdk-ledger

1.0.35 • Public • Published

Examples

Node js

ETH

import {signSdk} from "crypto-sdk-ledger";

const signEthWithLedger = async () => {
  const dataToSign = {hashedInput, domainSeperator}

  const signatures = await signSdk.signAsync("ETH", dataToSign);

  return signatures;
};

main();

BTC


import {signSdk} from "crypto-sdk-ledger";

const signBtcWithLedger = async () => {
  const redeemScript = // Replace with redeemScript
  const outputIndex = // Replace with outputIndex
  const txHex = // Replace with txHex
  const associatedKeysets = // Replace with associatedKeysets of respective signer
  const newTxToHex = // Replace with newTxToHex

  const dataToSign = {redeemScript, outputIndex, txHex, associatedKeysets, newTxToHex}

  const signatures = await signSdk.signAsync("BTC", dataToSign);

  return signatures;
};

main();

/crypto-sdk-ledger/

    Package Sidebar

    Install

    npm i crypto-sdk-ledger

    Weekly Downloads

    3

    Version

    1.0.35

    License

    ISC

    Unpacked Size

    6.66 kB

    Total Files

    6

    Last publish

    Collaborators

    • ghadifoo