Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ledgerhq/hw-transport-node-speculos-http

Package Overview
Dependencies
Maintainers
18
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ledgerhq/hw-transport-node-speculos-http - npm Package Compare versions

Comparing version 6.26.1-monorepo.4 to 6.27.0

LICENSE

19

package.json
{
"name": "@ledgerhq/hw-transport-node-speculos-http",
"version": "6.26.1-monorepo.4",
"version": "6.27.0",
"description": "Ledger Hardware Wallet communication layer with speculos Nano simulator using the http api",

@@ -31,8 +31,7 @@ "keywords": [

"dependencies": {
"@ledgerhq/errors": "^6.10.1-monorepo.4",
"@ledgerhq/hw-transport": "^6.24.2-monorepo.4",
"@ledgerhq/logs": "^6.10.1-monorepo.4",
"axios": "^0.26.0"
"@ledgerhq/errors": "^6.10.0",
"@ledgerhq/hw-transport": "^6.24.1",
"@ledgerhq/logs": "^6.10.0",
"axios": "^0.26.1"
},
"gitHead": "dd0dea64b58e5a9125c8a422dcffd29e5ef6abec",
"scripts": {

@@ -42,7 +41,5 @@ "clean": "bash ../../script/clean.sh",

"watch": "bash ../../script/watch.sh",
"doc": "bash ../../script/doc.sh",
"lint": "eslint ./src --no-error-on-unmatched-pattern --ext .ts,.tsx",
"test": "jest"
"doc": "bash ../../script/doc.sh"
},
"readme": "<img src=\"https://user-images.githubusercontent.com/211411/34776833-6f1ef4da-f618-11e7-8b13-f0697901d6a8.png\" height=\"100\" />\n\n## @ledgerhq/hw-transport-node-speculos-http\n\nA transport for <https://github.com/LedgerHQ/speculos> Nano simulator using it's http api.\n\n[Github](https://github.com/LedgerHQ/ledgerjs/),\n[Ledger Devs Slack](https://ledger-dev.slack.com/)\n\n### Getting started\n\n* Install <https://github.com/LedgerHQ/speculos>\n* Make sure to have a speculos running with an api port (default port is 5000).\n\n```js\nimport SpeculosTransport from \"@ledgerhq/hw-transport-node-speculos-http\";\n\nasync function exampleSimple() {\n const transport = await SpeculosTransport.open();\n const res = await transport.send(0xE0, 0x01, 0x00, 0x00);\n}\n\nasync function exampleAdvanced() {\n const transport = await SpeculosTransport.open({ baseURL: \"http://localhost:5000\" });\n transport.eventStream.once(\"data\", {\n // we will click right when the display changes\n transport.button(\"right\");\n });\n // we can also use eventStream.on and match the data buffer with the expected display before taking action\n // derivate btc address and ask for device verification\n const res = await transport.send(0xE0, 0x40, 0x01, 0x00, Buffer.from(\"058000002c8000000080000000000000000000000f\"));\n}\n```\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n#### Table of Contents\n\n* [SpeculosHttpTransport](#speculoshttptransport)\n * [Parameters](#parameters)\n * [Examples](#examples)\n * [button](#button)\n * [Parameters](#parameters-1)\n\n### SpeculosHttpTransport\n\n**Extends Transport**\n\nSpeculos TCP transport implementation\n\n#### Parameters\n\n* `instance` **AxiosInstance** \n* `opts` **SpeculosHttpTransportOpts** \n\n#### Examples\n\n```javascript\nimport SpeculosHttpTransport from \"@ledgerhq/hw-transport-node-speculos-http\";\nconst transport = await SpeculosHttpTransport.open();\nconst res = await transport.send(0xE0, 0x01, 0, 0);\n```\n\n#### button\n\nPress and release button\nbuttons available: left, right, both\n\n##### Parameters\n\n* `but` **any** \n\nReturns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\\<void>** \n"
}
"gitHead": "f3ccaba5a7af7e7790408e7c833a711d97422ffb"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc