
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@coolwallet/bsc
Advanced tools
Typescript library with support for the integration of BSC for third party application, include the functionalities of generation of addresses and signed transactions.
npm install @coolwallet/bsc
import BSC from '@coolwallet/bsc'
import { crypto } from '@coolwallet/core';
import { createTransport } from '@coolwallet/transport-web-ble';
const bsc = new BSC();
const transport = await createTransport();
const { privateKey: appPrivateKey } = crypto.key.generateKeyPair();
const appId = 'appId that had been registered by wallet';
const addressIndex = 0;
const address = await bsc.getAddress(transport, appPrivateKey, appId, addressIndex);
const transaction = {
nonce: "0x87",
gasPrice: "0x12a05f200",
gasLimit: "0xcf08",
to: "0x8A1628c2397F6cA75579A45E81EE3e17DF19720e",
value: "xe8d4a51000",
data: "",
chainId: 56
}
const signTxData = {
transport,
appPrivateKey,
appId,
transaction,
addressIndex
}
const normalTx = await bsc.signTransaction(signTxData);
const bep20Transaction = {
nonce: "0x87",
gasPrice: "0x12a05f200",
gasLimit: "0x5208",
to: "0x55d398326f99059ff775485246999027b3197955",
value: "0x0",
data: "0xa9059cbb000000000000000000000000BDCc4DBd6",
chainId: 56,
option: {
symbol: "USDT",
unit: "18"
}
}
const bep20SignTxData = {
transport,
appPrivateKey,
appId,
transaction: bep20Transaction,
addressIndex
}
const bep20Tx = await bsc.signBEP20Transaction(bep20SignTxData);
The address generated is compatible to BIP44 with account and change set to 0, which means calling getAddress with addressIndex = i will get the address of folllowing BIP44 path:
m/44'/60'/0'/0/{i}
In the design of current hardware, we only support path m/44'/60'/0'/0/{i} for speed optimization. This might change in the future and we will then open a more general interface to deal with custom path.
async getAddress(
transport: types.Transport,
appPrivateKey: string,
appId: string,
addressIndex: number
): Promise<string>
| Arg | Description | Type | Required |
|---|---|---|---|
| transport | Object to communicate with CoolWallet device | Transport | True |
| appPrivateKey | Private key for the connected application | string | True |
| appId | ID for the connected application | string | True |
| addressIndex | The from address index in BIP44 derivation | number | True |
Sign BSC Transaction. If the transaction has non-empty data field, the card will display SMART instead of transfering amount.
async signTransaction(signTxData: types.signTx)
| Arg | Description | Type | Required |
|---|---|---|---|
| transport | Object to communicate with CoolWallet device | Transport | True |
| appPrivateKey | Private key for the connected application | string | True |
| appId | ID for the connected application | string | True |
| transaction | Essential information/property for BSC Transaction | Transaction | True |
| addressIndex | The from address index in BIP44 derivation | number | True |
| publicKey | Public key of the from address | string | True |
| confirmCB | Callback of confirmation data to the connected application | Function | False |
| authorizedCB | Callback of authorized transaction data to the connected application | Function | False |
Perform BSC personal_sign.
async signMessage(signMsgData: types.signMsg): Promise<string>
| Arg | Description | Type | Required |
|---|---|---|---|
| transport | Object to communicate with CoolWallet device | Transport | True |
| appPrivateKey | Private key for the connected application | string | True |
| appId | ID for the connected application | string | True |
| message | Message to sign | string | True |
| addressIndex | The from address index in BIP44 derivation | number | True |
| confirmCB | Callback of confirmation data to the connected application | Function | False |
| authorizedCB | Callback of authorized data to the connected application | Function | False |
Perform BSC sign_typed_data.
async signTypedData(typedData: types.signTyped): Promise<string>
| Arg | Description | Type | Required |
|---|---|---|---|
| transport | Object to communicate with CoolWallet device | Transport | True |
| appPrivateKey | Private key for the connected application | string | True |
| appId | ID for the connected application | string | True |
| typedData | Typed structured data to be signed | any | True |
| addressIndex | The from address index in BIP44 derivation | number | True |
| confirmCB | Callback of confirmation data to the connected application | Function | False |
| authorizedCB | Callback of authorized data to the connected application | Function | False |
FAQs
Coolwallet BSC sdk
We found that @coolwallet/bsc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.