GitHub, Ledger Devs Discord, Developer Portal
Ledger Hardware Wallet Helium JavaScript bindings.
You may be using this package to communicate with the Helium Nano App.
For a smooth and quick integration:
- See the developers’ documentation on the Developer Portal and
- Go on Discord to chat with developer support and the developer community.
- Helium
Helium API
-
transport
Transport a transport for sending commands to a device -
scrambleKey
a scramble key (optional, default"helium_default_scramble_key"
)
import Helium from "@ledgerhq/hw-app-helium";
const helium = new Helium(transport);
Get application version.
helium.getVersion().then(r => r.version)
Returns Promise<{version: string}> version object
Get Helium address (public key) for a BIP32 path.
-
path
string a BIP32 path -
display
boolean? flag to show display -
accountIndex
index of account address (optional, default0
)
helium.getAddress("44'/904'/0'/0'/0'").then(r => r.address)
Returns Promise<{index: number, address: string, publicKey: string}> an object with the address field
Sign a Helium PaymentV2
transaction.
-
txn
PaymentV2 a PaymentV2 transaction -
accountIndex
index of account address (optional, default0
)
import { PaymentV2 } from '@helium/transactions'
const txn = new PaymentV2({ ... })
helium.signTransaction(txn).then(r => r.signature)
Returns Promise<{signature: Buffer, txn: PaymentV2}> an object with the signed transaction and signature
Sign a Helium TokenBurnV1
transaction.
-
txn
TokenBurnV1 a TokenBurnV1 transaction -
accountIndex
index of account address (optional, default0
)
import { TokenBurnV1 } from '@helium/transactions'
const txn = new TokenBurnV1({ ... })
helium.signTransaction(txn).then(r => r.signature)
Returns Promise<{signature: Buffer, txn: TokenBurnV1}> an object with the signed transaction and signature
Sign a Helium StakeValidatorV1
transaction.
-
txn
StakeValidatorV1 a StakeValidatorV1 transaction -
accountIndex
index of account address (optional, default0
)
import { StakeValidatorV1 } from '@helium/transactions'
const txn = new StakeValidatorV1({ ... })
helium.signTransaction(txn).then(r => r.signature)
Returns Promise<{signature: Buffer, txn: StakeValidatorV1}> an object with the signed transaction and signature
Sign a Helium UnstakeValidatorV1
transaction.
-
txn
UnstakeValidatorV1 a UnstakeValidatorV1 transaction -
accountIndex
index of account address (optional, default0
)
import { UnstakeValidatorV1 } from '@helium/transactions'
const txn = new UnstakeValidatorV1({ ... })
helium.signTransaction(txn).then(r => r.signature)
Returns Promise<{signature: Buffer, txn: UnstakeValidatorV1}> an object with the signed transaction and signature
Sign a Helium TransferValidatorStakeV1
transaction.
-
txn
TransferValidatorStakeV1 a TransferValidatorStakeV1 transaction -
ownerType
("old"
|"new"
) whether to sign as the old or new owner in the transfer -
accountIndex
index of account address (optional, default0
)
import { TransferValidatorStakeV1 } from '@helium/transactions'
const txn = new TransferValidatorStakeV1({ ... }, 'old')
helium.signTransaction(txn).then(r => r.signature)
Returns Promise<{signature: Buffer, txn: TransferValidatorStakeV1}> an object with the signed transaction and signature
Sign a Helium SecurityExchangeV1
transaction.
-
txn
SecurityExchangeV1 a SecurityExchangeV1 transaction -
accountIndex
index of account address (optional, default0
)
import { SecurityExchangeV1 } from '@helium/transactions'
const txn = new SecurityExchangeV1({ ... })
helium.signTransaction(txn).then(r => r.signature)
Returns Promise<{signature: Buffer, txn: SecurityExchangeV1}> an object with the signed transaction and signature