@ledgerhq/hw-app-solana
TypeScript icon, indicating that this package has built-in type declarations

7.2.4 • Public • Published

GitHub, Ledger Devs Discord, Developer Portal

@ledgerhq/hw-app-solana

Ledger Hardware Wallet Solana JavaScript bindings.


Are you adding Ledger support to your software wallet?

You may be using this package to communicate with the Solana 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.

Notes

To run speculos-smoke test make sure Speculos running (apdu port 9999 and api rest endpoint http://0.0.0.0:5000) with Solana app installed on it. Then run the command from root workspace:

$ yarn run ts-node packages/hw-app-solana/tests/speculos-smoke.ts

Troubleshooting

If ledger returns error 6808 - enable blind signature in settings (not needed for unit testing).

API

Table of Contents

Solana

Solana API

Parameters

  • transport Transport a transport for sending commands to a device
  • scrambleKey string a scramble key (optional, default "solana_default_scramble_key")

Examples

import Solana from "@ledgerhq/hw-app-solana";
const solana = new Solana(transport);

getAddress

Get Solana address (public key) for a BIP32 path.

Because Solana uses Ed25519 keypairs, as per SLIP-0010 all derivation-path indexes will be promoted to hardened indexes.

Parameters
  • path string a BIP32 path
  • display boolean flag to show display (optional, default false)
Examples
solana.getAddress("44'/501'/0'").then(r => r.address)

Returns Promise<{address: Buffer}> an object with the address field

signTransaction

Sign a Solana transaction.

Parameters
  • path string a BIP32 path
  • txBuffer Buffer serialized transaction
Examples
solana.signTransaction("44'/501'/0'", txBuffer).then(r => r.signature)

Returns Promise<{signature: Buffer}> an object with the signature field

signOffchainMessage

Sign a Solana off-chain message.

Parameters
  • path string a BIP32 path
  • msgBuffer Buffer serialized off-chain message
Examples
solana.signOffchainMessage("44'/501'/0'", msgBuffer).then(r => r.signature)

Returns Promise<{signature: Buffer}> an object with the signature field

getAppConfiguration

Get application configuration.

Examples
solana.getAppConfiguration().then(r => r.version)

Returns Promise<AppConfig> application config object

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
7.2.47,785latest
7.2.4-next.110next
7.2.0-windows-certificate.02windows-certificate
7.1.4-wc-test.02wc-test
7.0.7-recover-staging.02recover-staging
7.0.7-recover-simu.02recover-simu
6.27.1-fts.62FTS
7.2.3-nightly.41nightly
7.2.2-hotfix.01hotfix
7.1.4-new-wc.01new-wc
7.1.4-new-wc-test.01new-wc-test
7.1.3-start-exchange.01start-exchange
7.1.2-custom-exchange.01custom-exchange
7.0.7-recover-beta.01recover-beta
7.0.6-ios-builds-improvement.01ios-builds-improvement
7.0.3-protect.11protect
7.0.14-tag-word.01tag-word
7.0.10-notarizer.01notarizer
7.0.1-ts-llm.01ts-llm
6.9.1-taproot.01taproot
6.27.3-arm-builds.01arm-builds
6.27.2-yolo.01yolo
6.25.1-alpha.31canary
6.24.2-monorepo.41monorepo

Version History

VersionDownloads (Last 7 Days)Published
7.2.47,785
7.2.4-next.110
7.2.4-next.02
7.2.32
7.2.3-nightly.41
7.2.3-next.01
7.2.3-nightly.31
7.2.3-nightly.22
7.2.3-nightly.12
7.2.3-nightly.01
7.2.2980
7.2.2-hotfix.01
7.2.12
7.2.1-nightly.21
7.2.1-next.01
7.2.1-nightly.11
7.2.1-nightly.01
7.2.055
7.2.0-next.01
7.2.0-nightly.31
7.2.0-nightly.21
7.2.0-windows-certificate.02
7.2.0-nightly.12
7.2.0-nightly.01
7.1.6111
7.1.6-next.02
7.1.6-nightly.01
7.1.5289
7.1.5-nightly.11
7.1.5-nightly.01
7.1.5-next.01
7.1.4-new-wc.01
7.1.4-new-wc-test.01
7.1.4290
7.1.4-wc-test.02
7.1.4-next.01
7.1.4-nightly.01
7.1.3-start-exchange.01
7.1.38,769
7.1.3-next.01
7.1.22
7.1.2-nightly.11
7.1.2-next.01
7.1.2-custom-exchange.01
7.1.2-nightly.01
7.1.11
7.1.1-next.01
7.1.1-nightly.01
7.1.0651
7.1.0-nightly.31
7.1.0-nightly.22
7.1.0-next.01
7.0.15-nightly.12
7.0.15-nightly.01
7.0.1419
7.0.14-nightly.32
7.0.14-next.01
7.0.14-nightly.21
7.0.14-tag-word.01
7.0.14-nightly.11
7.0.14-nightly.01
7.0.139
7.0.13-next.01
7.0.121
7.0.12-nightly.21
7.0.12-nightly.12
7.0.12-next.02
7.0.12-nightly.02
7.0.112
7.0.11-nightly.01
7.0.11-next.01
7.0.1044
7.0.10-notarizer.01
7.0.10-next.01
7.0.10-nightly.01
7.0.91
7.0.9-nightly.01
7.0.9-next.01
7.0.81
7.0.8-next.02
7.0.8-nightly.01
7.0.71
7.0.7-recover-beta.01
7.0.7-recover-simu.02
7.0.7-nightly.21
7.0.7-recover-staging.02
7.0.7-nightly.11
7.0.7-next.01
7.0.7-nightly.02
7.0.6-ios-builds-improvement.01
7.0.6-nightly.02
7.0.6-next.02
7.0.61
7.0.52
7.0.5-next.02
7.0.4145
7.0.4-next.01
7.0.4-nightly.21
7.0.4-nightly.11
7.0.4-nightly.01
7.0.32
7.0.3-protect.11
7.0.3-nightly.21
7.0.3-protect.01
7.0.3-nightly.11
7.0.3-next.02
7.0.3-nightly.01
7.0.27
7.0.2-next.01
7.0.2-nightly.02
7.0.11,064
7.0.1-next.01
7.0.1-nightly.32
7.0.1-nightly.22
7.0.1-nightly.11
7.0.1-ts-llm.01
7.0.1-nightly.02
7.0.02
7.0.0-next.02
6.27.6244
6.27.528
6.27.6-next.01
6.27.5-nightly.21
6.27.5-next.01
6.27.5-nightly.12
6.27.5-nightly.01
6.27.41
6.27.4-nightly.01
6.27.4-next.01
6.27.31
6.27.3-arm-builds.01
6.27.3-next.01
6.27.3-nightly.01
6.27.21
6.27.2-next.02
6.27.2-yolo.01
6.27.2-nightly.01
6.27.150
6.27.1-fts.62
6.27.01
6.24.2-monorepo.41
6.24.2-monorepo.31
6.24.2-monorepo.11
6.24.2-monorepo.01
6.26.04
6.25.1-alpha.31
6.24.11
6.20.0699
6.19.01
6.15.02
6.11.21
6.11.01
6.10.01
6.9.1-taproot.01
6.9.1-6.9.1-taproot.0.01
6.8.21

Package Sidebar

Install

npm i @ledgerhq/hw-app-solana

Weekly Downloads

3,996

Version

7.2.4

License

Apache-2.0

Unpacked Size

77.8 kB

Total Files

19

Last publish

Collaborators

  • ledger-releaser
  • thomas.coudray
  • ldg-github-ci
  • aboissiere
  • vbouzon
  • gbrahm-ledger
  • sergii-shkolin
  • phenry-ledger