1.0.1 • Published 11 months ago

bitcoinly-ledger-sdk v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

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;
};

signEthWithLedger();

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;
};

signBtcWithLedger();