{"id":50767464,"url":"https://github.com/numsu/nanocurrency-web-js","last_synced_at":"2026-06-11T15:01:31.109Z","repository":{"id":35162478,"uuid":"213945390","full_name":"numsu/nanocurrency-web-js","owner":"numsu","description":"Toolkit for Nano cryptocurrency client side offline integrations without requiring NodeJS functions","archived":false,"fork":false,"pushed_at":"2024-06-17T06:07:25.000Z","size":270,"stargazers_count":71,"open_issues_count":3,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-19T18:57:53.224Z","etag":null,"topics":["blockchain","cryptocurrency","cryptography","nano","nanocurrency"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/numsu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-09T14:48:56.000Z","updated_at":"2025-05-02T08:23:20.000Z","dependencies_parsed_at":"2022-07-24T18:17:38.179Z","dependency_job_id":null,"html_url":"https://github.com/numsu/nanocurrency-web-js","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/numsu/nanocurrency-web-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numsu%2Fnanocurrency-web-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numsu%2Fnanocurrency-web-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numsu%2Fnanocurrency-web-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numsu%2Fnanocurrency-web-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/numsu","download_url":"https://codeload.github.com/numsu/nanocurrency-web-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numsu%2Fnanocurrency-web-js/sbom","scorecard":{"id":698686,"data":{"date":"2025-08-11","repo":{"name":"github.com/numsu/nanocurrency-web-js","commit":"8ceb7d7ee544596a03261b2fc3ec0340343ec96a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-3w3w-pxmm-2w2j","Warn: Project is vulnerable to: GHSA-xwcq-pm8m-c4vf","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T04:31:53.792Z","repository_id":35162478,"created_at":"2025-08-22T04:31:53.792Z","updated_at":"2025-08-22T04:31:53.792Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34204180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blockchain","cryptocurrency","cryptography","nano","nanocurrency"],"created_at":"2026-06-11T15:00:28.792Z","updated_at":"2026-06-11T15:01:31.088Z","avatar_url":"https://github.com/numsu.png","language":"TypeScript","funding_links":["https://github.com/sponsors/numsu"],"categories":[],"sub_categories":[],"readme":"# nanocurrency-web\n\n[![Build Status](https://travis-ci.org/numsu/nanocurrency-web-js.svg?branch=master)](https://travis-ci.org/numsu/nanocurrency-web-js)\n[![npm version](https://badge.fury.io/js/nanocurrency-web.svg)](https://badge.fury.io/js/nanocurrency-web)\n[![GitHub license](https://img.shields.io/github/license/numsu/nanocurrency-web-js)](https://github.com/numsu/nanocurrency-web-js/blob/master/LICENSE)\n\nToolkit for Nano cryptocurrency client side offline implementations allowing you to build web- and mobile applications using Nano without ever compromising the user's keys by sending them out of their own device.\n\nThe toolkit supports creating and importing wallets and signing blocks on-device. Meaning that the user's keys should never be required to leave the device. And much more!\n\n## Features\n\n* Generate new HD wallets (BIP32/44 hierarchical deterministic) with a BIP39 mnemonic phrase (Used in Ledger hardware wallet)\n* Generate new \"legacy\" Nano wallets with mnemonic phrases (Used in the Natrium wallet)\n* Import HD wallets with a mnemonic phrase or a seed\n* Import \"legacy\" wallets with the Nano mnemonic phrase or seed\n* Sign send-, receive- and change (representative) blocks with a private key\n* Convert Nano units\n* Verify the signature of a block\n* Sign any strings with the private key\n* Verify the signature of any string with the public key\n* Validate addresses and mnemonic words\n* Runs in all web browsers and mobile frameworks built with Javascript (doesn't require server-side NodeJS functions)\n\n---\n\n## Installation\n### From NPM\n\n```console\nnpm install nanocurrency-web\n```\n### In web\n\n```html\n\u003cscript src=\"https://unpkg.com/nanocurrency-web@2.0.0\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\"\u003e\n    NanocurrencyWeb.wallet.generate(...);\n\u003c/script\u003e\n```\n\n## Usage\n\n| WARNING: do not use any of the keys or addresses listed below to send real assets! |\n| --- |\n\n### Wallets and accounts\nThe wallet is a hexadecimal string called a seed. From this seed you can deterministically derive millions of unique accounts. The first account in a wallet starts at index 0.\n\nThe library is able to generate, import and derive accounts for HD wallets and \"legacy\" Nano wallets. A HD wallet seed length is 128 hexadecimal characters while a \"legacy\" Nano wallet seed is 64 characters long.\n\nThese are the two most common wallet formats used in different applications. A good default is to support both of them. For example, when a user wants to import a wallet, you could generate both wallets and check if either wallet's account at index 0 has a frontier using [the accounts_frontiers RPC](https://docs.nano.org/commands/rpc-protocol/#accounts_frontiers) command.\n\n```javascript\nimport { wallet } from 'nanocurrency-web'\n\n// Generates a new wallet with a mnemonic phrase, seed and an account\n// You can also generate your own entropy for the mnemonic or set a seed password.\n// Custom entropy must be a 64 character hexadecimal string (32 bytes).\n// If secure randomness is unavailable in the runtime, this call throws and you must\n// provide custom entropy yourself.\n// Notice, that losing the password will make the mnemonic phrase void\nconst wallet = wallet.generate(entropy?, password?)\n\n// Generates a legacy wallet with a mnemonic phrase, seed and an account\n// You can provide your own seed to be used instead.\n// Custom seed must be a 64 character hexadecimal string (32 bytes).\n// If secure randomness is unavailable in the runtime, this call throws and you must\n// provide a custom seed yourself.\nconst wallet = wallet.generateLegacy(seed?)\n\n// Import a wallet with the mnemonic phrase\n// Words must be separated by spaces.\nconst wallet = wallet.fromMnemonic(mnemonic, seedPassword?)\n\n// Import a wallet with the legacy mnemonic phrase\n// Words must be separated by spaces.\nconst wallet = wallet.fromLegacyMnemonic(mnemonic)\n\n// Import a wallet with a seed, the mnemonic phrase will be undefined since it's not possible to infer it from the seed\n// The seed must be a 128 character hexadecimal string (64 bytes).\nconst wallet = wallet.fromSeed(seed)\n\n// Import a wallet with a legacy seed\n// The seed must be a 64 character hexadecimal string (32 bytes).\nconst wallet = wallet.fromLegacySeed(seed)\n\n// Derive private keys for a seed, from and to are number indexes. The seed must be a\n// 128 character hexadecimal string (64 bytes). The first account index is 0.\nconst accounts = wallet.accounts(seed, from, to)\n\n// Derive private keys for a legacy seed, from and to are number indexes. The seed must be a\n// 64 character hexadecimal string (32 bytes). The first account index is 0.\nconst accounts = wallet.legacyAccounts(seed, from, to)\n```\n\n```javascript\n// The returned wallet JSON format is as follows. The mnemonic phrase will be undefined when importing with a seed, unless it's imported with a legacy seed\n{\n    mnemonic: 'edge defense waste choose enrich upon flee junk siren film clown finish luggage leader kid quick brick print evidence swap drill paddle truly occur',\n    seed: '0dc285fde768f7ff29b66ce7252d56ed92fe003b605907f7a4f683c3dc8586d34a914d3c71fc099bb38ee4a59e5b081a3497b7a323e90cc68f67b5837690310c',\n    accounts: [\n        {\n            accountIndex: 0,\n            privateKey: '3be4fc2ef3f3b7374e6fc4fb6e7bb153f8a2998b3b3dab50853eabe128024143',\n            publicKey: '5b65b0e8173ee0802c2c3e6c9080d1a16b06de1176c938a924f58670904e82c4',\n            address: 'nano_1pu7p5n3ghq1i1p4rhmek41f5add1uh34xpb94nkbxe8g4a6x1p69emk8y1d'\n        }\n    ]\n}\n```\n\n### Blocks\nThere are three different types of blocks; send, receive and change. While all of these are called \"state\" blocks, they are interpreted differently based on the data they contain.\n\nA send block means that the amount of Nano decreases in the account while a receive block means that the amount increases. If the amount stays the same, it's interpreted as a change (representative) block. You are able to change the representative also at the same time when sending or receiving. All blocks are signed with the account's private key.\n\nThe functions are designed to have user friendly usage, but they will return the block exactly the way as the network accepts them. All that is left is to publish the block to the network with the [process RPC command](https://docs.nano.org/commands/rpc-protocol/#process).\n\nAlways fetch the most up to date information for the account from the network using the [account_info RPC command](https://docs.nano.org/commands/rpc-protocol/#account_info).\n\nIf the account hasn't been opened yet (this is the first block), you will need to use the \"genesis\" as frontier: `0000000000000000000000000000000000000000000000000000000000000000`.\n\n#### Signing a send block\n\n```javascript\nimport { block } from 'nanocurrency-web'\n\nconst privateKey = '781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3'\nconst data = {\n    // Current balance from account info\n    walletBalanceRaw: '5618869000000000000000000000000',\n\n    // Your wallet address\n    fromAddress: 'nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx',\n\n    // The address to send to\n    toAddress: 'nano_1q3hqecaw15cjt7thbtxu3pbzr1eihtzzpzxguoc37bj1wc5ffoh7w74gi6p',\n\n    // From account info\n    representativeAddress: 'nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou',\n\n    // Previous block, from account info\n    frontier: '92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D',\n\n    // The amount to send in RAW\n    amountRaw: '2000000000000000000000000000000',\n\n    // Generate work on server-side or with a DPOW service\n    // This is optional, you don't have to generate work before signing the transaction\n    work: 'fbffed7c73b61367',\n}\n\n// Returns a correctly formatted and signed block ready to be sent to the blockchain\nconst signedBlock = block.send(data, privateKey)\n```\n\n#### Signing a receive block\n```javascript\nimport { block } from 'nanocurrency-web'\n\nconst privateKey = '781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3'\nconst data = {\n    // Your current balance in RAW from account info\n    walletBalanceRaw: '18618869000000000000000000000000',\n\n    // Your address\n    toAddress: 'nano_3kyb49tqpt39ekc49kbej51ecsjqnimnzw1swxz4boix4ctm93w517umuiw8',\n\n    // From account info\n    representativeAddress: 'nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou',\n\n    // From account info\n    frontier: '92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D',\n\n    // From the pending transaction\n    transactionHash: 'CBC911F57B6827649423C92C88C0C56637A4274FF019E77E24D61D12B5338783',\n\n    // From the pending transaction in RAW\n    amountRaw: '7000000000000000000000000000000',\n\n    // Generate the work server-side or with a DPOW service\n    // This is optional, you don't have to generate work before signing the transaction\n    work: 'c5cf86de24b24419',\n}\n\n// Returns a correctly formatted and signed block ready to be sent to the blockchain\nconst signedBlock = block.receive(data, privateKey)\n```\n\n#### Signing a change (representative) block\n```javascript\nimport { block } from 'nanocurrency-web'\n\nconst privateKey = '781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3'\nconst data = {\n    // Your current balance, from account info\n    walletBalanceRaw: '3000000000000000000000000000000',\n\n    // Your wallet address\n    address: 'nano_3igf8hd4sjshoibbbkeitmgkp1o6ug4xads43j6e4gqkj5xk5o83j8ja9php',\n\n    // The new representative\n    representativeAddress: 'nano_1anrzcuwe64rwxzcco8dkhpyxpi8kd7zsjc1oeimpc3ppca4mrjtwnqposrs',\n\n    // Previous block, from account info\n    frontier: '128106287002E595F479ACD615C818117FCB3860EC112670557A2467386249D4',\n\n    // Generate work on the server side or with a DPOW service\n    // This is optional, you don't have to generate work before signing the transaction\n    work: '0000000000000000',\n}\n\n// Returns a correctly formatted and signed block ready to be sent to the blockchain\nconst signedBlock = block.representative(data, privateKey)\n```\n### Tools\n\n#### Converting Nano units\n\nSupported unit values are `RAW` and `NANO`.\n\n```javascript\nimport { tools } from 'nanocurrency-web'\n\n// Convert 1 Nano to RAW\nconst converted = tools.convert('1', 'NANO', 'RAW')\n\n// Convert 1 RAW to Nano\nconst converted = tools.convert('1000000000000000000000000000000', 'RAW', 'NANO')\n```\n\n#### Verifying signatures and signing anything with the private key\nCryptocurrencies rely on asymmetric cryptography. This means that you can use the public key to validate the signature of a block or message that was signed with the private key.\n\nFor example implementing client side login with the password being the user's e-mail signed with their private key:\n\n```javascript\nimport { tools } from 'nanocurrency-web'\n\nconst privateKey = '781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3'\nconst signed = tools.sign(privateKey, 'foo@bar.com')\n\n// On the backend, verify the signature against the original UTF-8 string\n```\n\nYou can also validate Nano blocks:\n```javascript\nimport { tools } from 'nanocurrency-web'\n\nconst valid = tools.verifyBlock(publicKey, block)\n```\n\nYou can challenge a user to prove ownership of a Nano address by making the user sign any UTF-8 string with the private key and then validating the signature with the public key. You can also derive the public key from the Nano address.\n```javascript\nimport { tools } from 'nanocurrency-web'\n\nconst nanoAddress = 'nano_1pu7p5n3ghq1i1p4rhmek41f5add1uh34xpb94nkbxe8g4a6x1p69emk8y1d'\nconst privateKey = '3be4fc2ef3f3b7374e6fc4fb6e7bb153f8a2998b3b3dab50853eabe128024143'\nconst data = 'sign this'\n\n// Make the user sign the data\nconst signature = tools.sign(privateKey, data)\n\n// Infer the user's public key from the address (if not already known)\nconst publicKey = tools.addressToPublicKey(nanoAddress)\n\n// Verify the signature using the public key, the signature and the original data\nconst validSignature = tools.verify(publicKey, signature, data)\n```\n\n#### Validating values\nYou are able to validate Nano addresses and mnemonic words.\n\n```javascript\nimport { tools } from 'nanocurrency-web'\n\n// Validate Nano address\nconst valid = tools.validateAddress('nano_1pu7p5n3ghq1i1p4rhmek41f5add1uh34xpb94nkbxe8g4a6x1p69emk8y1d')\n\n// Validate mnemonic phrases\nconst valid = tools.validateMnemonic('edge defense waste choose enrich upon flee junk siren film clown finish luggage leader kid quick brick print evidence swap drill paddle truly occur')\n```\n\n#### Encrypting and decrypting strings\nYou can encrypt and decrypt UTF-8 strings to implement end-to-end encryption using the Nano address and private key. The public and private keys are converted to Curve25519 keys inside the library, and the encrypted output is returned as Base64. You may also provide a custom nonce as a 48 character hexadecimal string (24 bytes).\n\n```javascript\nimport { box } from 'nanocurrency-web'\n\n// Encrypt on device 1\n// If you do not provide a custom nonce, this throws if the runtime does not provide\n// a secure random implementation for nonce generation.\nconst encrypted = box.encrypt(message, recipientAddress, senderPrivateKey)\n\n// Encrypt with a custom nonce\nconst encryptedWithCustomNonce = box.encrypt(\n  message,\n  recipientAddress,\n  senderPrivateKey,\n  nonce,\n)\n\n// Send the encrypted message to the recipient and decrypt on device 2\nconst decrypted = box.decrypt(encrypted, senderAddress, recipientPrivateKey)\n```\n\n## Contributions\n\nYou are welcome to contribute to the module. To develop, use the following commands.\n\n* `npm install` to install dependencies\n* `npm run build` to build and pack the code\n* `npm run test` to run tests\n\nFork the project, make your changes and request them to be merged with a pull request. Issues are also welcome. If you have any questions, you can find me lurking around the Nano discord server.\n\n## Donations\n\nIf this helped you in your endeavours and you feel like supporting the developer, please donate some Nano:\n\n`nano_1iic4ggaxy3eyg89xmswhj1r5j9uj66beka8qjcte11bs6uc3wdwr7i9hepm`\n\nIf you prefer the old fashioned way, I also have a [GitHub Sponsors account](https://github.com/sponsors/numsu).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumsu%2Fnanocurrency-web-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnumsu%2Fnanocurrency-web-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumsu%2Fnanocurrency-web-js/lists"}