{"id":15886234,"url":"https://github.com/kybarg/ssp","last_synced_at":"2025-03-20T08:32:10.588Z","repository":{"id":236121434,"uuid":"791286157","full_name":"kybarg/ssp","owner":"kybarg","description":"Node.JS implementation of Encrypted Smiley ® Secure Protocol (eSSP, SSP)","archived":false,"fork":false,"pushed_at":"2025-02-03T07:19:55.000Z","size":96,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T04:18:50.107Z","etag":null,"topics":["bv100","bv20","bv50","encrypted-smiley-secure-protocol","essp","itl","nv10usb","nv11","nv200","nv22","nv9","nv9usb","smart-hopper","smart-payout","smiley-secure-protocol","ssp"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kybarg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"kybarg","custom":null}},"created_at":"2024-04-24T12:48:32.000Z","updated_at":"2025-02-03T07:18:49.000Z","dependencies_parsed_at":"2024-05-09T14:14:41.642Z","dependency_job_id":"119b460a-7156-4b0b-b765-ff3164c3553b","html_url":"https://github.com/kybarg/ssp","commit_stats":null,"previous_names":["kybarg/ssp"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kybarg%2Fssp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kybarg%2Fssp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kybarg%2Fssp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kybarg%2Fssp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kybarg","download_url":"https://codeload.github.com/kybarg/ssp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971213,"owners_count":20376784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bv100","bv20","bv50","encrypted-smiley-secure-protocol","essp","itl","nv10usb","nv11","nv200","nv22","nv9","nv9usb","smart-hopper","smart-payout","smiley-secure-protocol","ssp"],"created_at":"2024-10-06T05:23:44.172Z","updated_at":"2025-03-20T08:32:10.003Z","avatar_url":"https://github.com/kybarg.png","language":"JavaScript","funding_links":["https://buymeacoffee.com/kybarg"],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n[![NPM Version](https://img.shields.io/npm/v/%40kybarg%2Fssp)](https://npmjs.com/@kybarg/ssp) [![Codecov](https://img.shields.io/codecov/c/github/kybarg/ssp)](https://codecov.io/gh/kybarg/ssp) [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/kybarg/ssp/.github%2Fworkflows%2Ftest.yml)\n](https://github.com/kybarg/ssp/actions/workflows/node.js.yml) [![GitHub License](https://img.shields.io/github/license/kybarg/ssp)](https://github.com/kybarg/ssp/blob/main/LICENSE)\n\n# @kybarg/ssp\n\nNode.JS implemenation of Encrypted Smiley ® Secure Protocol (eSSP, SSP)\n\n**Supported devices:** NV9USB, NV10USB, BV20, BV50, BV100, NV200, NV200 Spectral, SMART Hopper, SMART Payout, NV11, NV22\n\n\u003e [!WARNING]\n\u003e\n\u003e **NV11** is not fully tested and supported. Maintainer is required.\n\n## Table of Contents\n\n1. [Basis usage](#basis-usage)\n2. [Methods](#methods)\n3. [Documentation](docs/readme.md)\n\n## Basis usage\n\n```js\nconst sspLib = require('@kybarg/ssp')\n\nlet eSSP = new sspLib({\n  id: 0x00,\n  timeout: 3000,\n  fixedKey: '0123456701234567',\n})\n\neSSP.on('READ_NOTE', result =\u003e {\n  console.log('READ_NOTE', result)\n})\n\neSSP.command('GET_SERIAL_NUMBER').then(result =\u003e {\n  console.log('Serial number:', result.info.serial_number)\n  return\n})\n\nconst portOptions = { baudRate: 9600 }\n\neSSP.open('COM1', portOptions)\n```\n\n## Config values\n\n```javascript\nconst options = {\n  fixedKey: '123', // device internal encryption key\n  encryptAllCommand: true, // should command commands also be encrypted\n  id: 0, // device id in case multiple acceptors connected to the host\n  timeout: 1000, // command response timeout after wich command considered failed\n  commandRetries: 20, // how many time to retry before throwing error or emitting ERROR event\n  pollingInterval: 300, // interval between poll messages\n}\n```\n\n## Methods\n\nAll methods return Promise\n\n- `eSSP.open('COM1')` - Connect device\n- `eSSP.close()` - Disconnect device\n- `eSSP.initEncryption()` - Initializing Diffie-Hellman key exchange and enable encryption\n- `eSSP.enable()` - Enable device and start listen events\n- `eSSP.disable()` - Disable device and stop listen events\n- `eSSP.poll()` - Start/Stop polling the device\n- `eSSP.command('COMMAND_NAME')` - Execute command and get answer\n\n\u003c!-- LICENSE --\u003e\n\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkybarg%2Fssp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkybarg%2Fssp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkybarg%2Fssp/lists"}