skalenetwork / docs.skale.space

https://docs.skale.space/
MIT License
0 stars 2 forks source link

Using Ledger #30

Closed manuelbarbas closed 4 months ago

manuelbarbas commented 9 months ago

Ledger

It is a hardware wallet designed for secure cryptocurrency storage. It is a physical device that securely stores the user's private keys, which are essential for accessing and managing their cryptocurrencies. Ledger wallets are known for their emphasis on security, providing an offline storage solution to protect digital assets from online threats such as hacking and malware.

For more information check the following link https://developers.ledger.com/docs/transport/overview/

Implementation Example

NPM Packages

If you want to use a Ledger Nano S/X/S Plus with the USB protocol

npm install @ledgerhq/hw-transport-webusb

If you want to use a Ledger Nano S/X/S Plus with the HID protocol

npm install @ledgerhq/hw-transport-webhid

Implementation Code

import TransportWebUSB from '@ledgerhq/hw-transport-webusb'
import Eth from '@ledgerhq/hw-app-eth'

const transport = await TransportWebUSB.create();
const evm_ledger = new Eth(transport);

const path = "m/44'/60'/0'/0/0";

const result = await evm_ledger.getAddress(path, false, true);
console.log('Ledger Wallet Address:', result.address);
manuelbarbas commented 8 months ago

What is: Wallet Language: Javascript, Typescript Target: Web