crypto-sdk-ledger
v1.0.35
Published
## Node js
Downloads
6
Readme
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();