
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@waves/ledger
Advanced tools
$ npm install --save @waves/ledger
const WavesLedger = require('@Waves/ledger');
const ledger = new WavesLedger();
WavesLedger
can have optional arguments.
import TransportNodeHid from '@ledgerhq/hw-transport-node-u2f';
const options = {
debug: true, //boolean,
openTimeout: 3000, //number,
listenTimeout: 30000, //number,
exchangeTimeout: 30000, //number,
networkCode: 87, //number,
transport: TransportNodeHid
};
const ledger = new WavesLedger(options);
debug
enable or not logs of the binary exchange.
openTimeout
is a delay number in ms for waiting connection.
listenTimeout
is a delay number in ms for waiting listen request to U2F device.
exchangeTimeout
is a timeout (in milliseconds) for the exchange call. Only some transport might implement it. (e.g. U2F).
networkCode
is Waves network code (87 - for mainet)
transport
is U2F Transport implementation. (hw-transport-u2f by default)
probeDevice(): Promise. If device available and ready, Promise returned true.
const canIUse = async () => {
return await ledger.probeDevice();
}
tryConnect(): Promise<>. reconnect to Transport and init ledger libs.
const isLedgerReady = async () => {
try {
return await ledger.tryConnect();
} catch (e) {
///...error handlers
}
};
getUserDataById(id): Promise. Get user from ledger, where user is:
{ id: number, path: string, wavesAddress: string, publicKey: string }
id - is number from 0
path - is string in internal ledger format
wavesAddress - is string in base58 format
publicKey - is string in base58 format
ledger.getUserDataById(id)
.then(
(user) => {...},
(err) => {...}
);
Sign waves transaction bytes (ledger show detailed transaction info)
ledger.signTransaction(userId, asset, data)
userId - number
data - Array number form 0 to 255
asset - {precision: number, ...}
Result is Promise with signature string in base58 format
Sign any bytes (ledger can't show detail info)
ledger.signSomeData(userId, data)
userId - number
data - Array number form 0 to 255
Result is Promise with signature string in base58 format
Sign any bytes (ledger can't show detail info)
ledger.signRequest(userId, data)
userId - number
data - Array number form 0 to 255
Result is Promise with signature string in base58 format
Sign any string (ledger can't show detail info)
ledger.signMessage(userId, data)
userId - number
data - string
Result is Promise with signature string in base58 format
FAQs
Waves ladger lib for browser
We found that @waves/ledger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?
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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.