Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blooo/hw-app-klaytn

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blooo/hw-app-klaytn

Ledger Hardware Wallet Klaytn Application API

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Github

@blooo/hw-app-klaytn

Ledger Hardware Wallet Klaytn JavaScript bindings.

API

Table of Contents

Klaytn

Klaytn API

Parameters

  • transport. A transport for sending commands to a device
  • scrambleKey. A scramble key (optional, default "klaytn_default_scramble_key")
Examples
import Klaytn from "blooo/hw-app-klaytn";
const klaytn = new Klaytn(transport);

Basic Information methods

getVersion()

Get application version.

Examples
klaytn.getVersion().then((r) => r.version);

Returns Promise<{version: string}> version object

getAddress

Get Klaytn address (public key) for a BIP32 path.

Parameters
  • path string a BIP32 path without the address index
  • display boolean flag to show display (default)
  • accountIndex number index of account address (optional, default 0)
Examples
klaytn.getAddress("44'/8217'/0'/0/", false, 0).then((r) => r.address);

Returns Promise<{address: string, publicKey: string, chainCode: string | undefined}> an object with the address field

Transaction Signing Method

To sign a Klaytn transaction use the method: signTransaction .

Parameters
Examples
import Caver from "caver-js";

const caver = new Caver();

const accountIndex = 1;

const txn = caver.transaction.valueTransfer.create({
  from: "enter address here",
  to: "enter address here",
  value: 1,
  gasPrice: 50000000000,
  gas: 300000,
  nonce: 1,
  chainId: 1001,
});

klaytn.signTransaction(txn, accountIndex).then((r) => r.signature);

Returns Promise<{signature: [v,r,s], signedTxn: caver transaction.}> an object with the signed transaction and signature

Keywords

FAQs

Package last updated on 17 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc