Chris Duncan [Tue, 8 Oct 2024 09:02:56 +0000 (02:02 -0700)]
Return bigint directly from account properties to let consumers do math on the raw amounts since they can call toString() if necessary. Allow bigint to be passed to denomination converter and explicitly check its amount type.
Chris Duncan [Thu, 3 Oct 2024 09:10:17 +0000 (02:10 -0700)]
libname: A reimagining of the nanocurrency-web package.
Greater Changes
* Completely replace crypto-js dependency with the browser native Web Crypto API.
* Overhaul wallet system to align more with object-oriented design and to consolidate related but separated functionality.
* Add support for Ledger hardware wallets.
* Encrypt wallet secrets by default on initialization, and add lock/unlock feature to encrypt/decrypt on-demand.
* Add rolodex feature to enable contact management including signature verification using contact name associated with a public key in your rolodex.
* Add online functions to interact with nodes like fetching account info, generating PoW, and sending blocks for processing.
* Add sweep feature similar to the offering from Nault which sends all funds in a specified range of accounts in a wallet to a specific address.
* Refactor key derivation functions to align closer with spec as designed in the relevant BIPs.
* Adopt GPLv3 license and achieve REUSE compliance.
Lesser Changes
* Refactor as ESM instead of CJS and build for ESMNext target to enable more modern browser features.
* Utilize browser native features like bigint instead of bignumber.js dependency.
* Deprecate 'box' feature and with it the dependency on byte-base64.
* Replace chai/mocha test framework with built-in Node.js test runner, and add tons of tests.
* Replace webpack (and dependency ts-loader) with esbuild which offers faster builds and minification.
* Add online function to get the next unopened account of a wallet with the idea that a business could distribute addresses to customers in a custodial manner.
* Add tons of type checking to validate inputs and outputs.
* Deprecate lots of unused code or replace with native features.
Chris Duncan [Sat, 31 Aug 2024 20:13:26 +0000 (13:13 -0700)]
Fix module imports. Replace arrow functions on 'describe' calls since they mess up 'this' and prevent test data setup. Set mocha 'slow' to zero in order to report all test durations.
* Added new functionality to encrypt/decrypt strings with Diffie-Hellman
key exchange with Nano addresses and private keys by converting the keys
to Curve25519 keys suitable for encryption and using Box functionality
from NaCl. The library will generate a random nonce to each encryption
and pass the nonce along with the encrypted message encoded in Base64
* Some code refactoring (use static classes and make sure ed25519 and
curve classes are always freshly created)
* New feature: verify signatures with the public key
* New feature: convert nano address to a public key
* Add documentation about how to verify ownership of user's Nano address
by doing a signature challenge
* npm audit fix
Miro Metsänheimo [Tue, 12 Jan 2021 20:30:58 +0000 (22:30 +0200)]
Version 1.3.0
* Add the possibility to generate legacy seeds and mnemonics
* Add the possibility to import legacy mnemonic phrases
* Stop throwing errors if given an upper case hex as input
* Return mnemonic also when creating wallet with a legacy seed
* npm audit fix
* Small refactoring
Miro Metsänheimo [Wed, 27 May 2020 20:03:12 +0000 (23:03 +0300)]
Version 1.2.1
* Fixed an issue where address importer threw an error on mnemonic words
that had a checksum hex value with a leading zero
* Added the possibility to validate mnemonic words and nano addresses
* Separate block signer to it's own class
* Add JSDOC to some functions
* Renamed converter to tools
* Added the ability to sign any strings with the private key
* Generate random entropy
* BIP39 mnemonic phrase and seed from entropy
* Mnemonic phrase importing and validation
* BIP32 key derivation from seed
* Nano address encoding and validation
* Nano unit converter
* Modified ed25519 curve for Nano
* Block signing for receive and send blocks