Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@secux/app-bnb
Advanced tools
@secux/app-bnb
SecuX Hardware Wallet BNB API
import { SecuxBNB } from "@secux/app-bnb";
First, create instance of ITransport
const path = "m/44'/714'/0'/0/0";
const address = await device.getAddress(path);
/*
// transfer data to hardware wallet by custom transport layer
const data = SecuxBNB.prepareAddress(path);
const response = await device.Exchange(data);
const address = SecuxBNB.resolveAddress(response);
*/
const { raw_tx, signature } = await deivce.sign(
"m/44'/714'/0'/0/0",
{
to: "bnb17jr3n9xaxm92fp5dznuazql2c2x6ypw2gvuvmy",
amount: 1e18
}
);
/*
// transfer data to hardware wallet by custom transport layer
const data = SecuxBNB.prepareSign(
"m/44'/714'/0'/0/0",
{
from: "bnb1rcxjc3a6va0ldwzerx2t58g3sz6ss6x7cglwyc",
to: "bnb17jr3n9xaxm92fp5dznuazql2c2x6ypw2gvuvmy",
amount: 1e18
}
);
*/
BNB package for SecuX device
Kind: global class
communicationData
string
string
communicationData
string
communicationData
string
prepared
string
string
communicationData
Prepare data for address generation.
Returns: communicationData
- data for sending to device
Param | Type | Description |
---|---|---|
path | string | m/44'/714'/... |
string
Convert secp256k1 publickey to BNB address.
Returns: string
- BNB address
Param | Type | Description |
---|---|---|
publickey | string | Buffer | secp256k1 publickey |
string
Generate address from response data.
Returns: string
- BNB address
Param | Type | Description |
---|---|---|
response | communicationData | data from device |
communicationData
Prepare data for secp256k1 publickey.
Returns: communicationData
- data for sending to device
Param | Type | Description |
---|---|---|
path | string | m/44'/714'/... |
string
Resolve secp256k1 publickey from response data.
Returns: string
- secp256k1 publickey (hex string)
Param | Type | Description |
---|---|---|
response | communicationData | data from device |
communicationData
Prepare data for xpub.
Returns: communicationData
- data for sending to device
Param | Type | Description |
---|---|---|
path | string | m/44'/714'/... |
string
Resolve xpub from response data.
Returns: string
- xpub
Param | Type | Description |
---|---|---|
response | communicationData | data from device |
path | string | m/44'/714'/... |
prepared
Prepare data for signing.
Returns: prepared
- return object
Param | Type | Description |
---|---|---|
path | string | m/44'/714'/... |
content | txDetail | transaction object |
string
Resolve signature from response data
Returns: string
- signature (hex string)
Param | Type | Description |
---|---|---|
response | communicationData | data from device |
string
Resolve raw transaction for broadcasting
Returns: string
- signed raw transaction
Param | Type | Description |
---|---|---|
response | communicationData | data from device |
serialized | communicationData |
Properties
Name | Type | Description |
---|---|---|
publickey | string | Buffer | sender's publickey |
to | string | receiving address |
amount | number | BNB has 8 decimals |
[chainId] | string | use specific BNB network |
[accountNumber] | number | for replay protection |
[sequence] | number | for replay protection |
[memo] | string |
Properties
Name | Type | Description |
---|---|---|
commandData | communicationData | data for sending to device |
serialized | communicationData |
© 2018-21 SecuX Technology Inc.
authors:
andersonwu@secuxtech.com
FAQs
SecuX Hardware Wallet BNB API
We found that @secux/app-bnb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.