Chris Duncan [Mon, 11 Nov 2024 09:27:33 +0000 (01:27 -0800)]
Move polyfills into separate file from test vectors, and redesign them as side effect imports.
Chris Duncan [Mon, 11 Nov 2024 05:35:13 +0000 (21:35 -0800)]
Performance test does not show a huge improvement (half a second over a million records) using Promise.all so revert to simpler implementation.
Chris Duncan [Sun, 10 Nov 2024 22:12:12 +0000 (14:12 -0800)]
Throw if Ledger account derivation fails so that null result can be removed. Derive accounts in parallel with Promise.all.
Chris Duncan [Sun, 10 Nov 2024 21:25:59 +0000 (13:25 -0800)]
Fix BLAKE2b ckd using 16-bit index instead of 32-bit.
Chris Duncan [Sun, 10 Nov 2024 21:25:03 +0000 (13:25 -0800)]
Test additional accounts when deriving from BLAKE2b wallet. Test more BLAKE2b wallet seeds. Use Trezor wallet password instead of Nano password for consistency with Trezor test vectors.
Chris Duncan [Sun, 10 Nov 2024 21:23:14 +0000 (13:23 -0800)]
Adjust test vector names to accomodate broader data set.
Chris Duncan [Sun, 10 Nov 2024 21:06:41 +0000 (13:06 -0800)]
Document test vector sources.
Chris Duncan [Sun, 10 Nov 2024 21:04:02 +0000 (13:04 -0800)]
Indicate algorithm for test vectors instead of source.
Chris Duncan [Sun, 10 Nov 2024 10:42:30 +0000 (02:42 -0800)]
Refactor pool and ckd.
Chris Duncan [Sat, 9 Nov 2024 09:27:34 +0000 (01:27 -0800)]
w
Chris Duncan [Sat, 9 Nov 2024 08:53:33 +0000 (00:53 -0800)]
w
Chris Duncan [Sat, 9 Nov 2024 02:26:36 +0000 (18:26 -0800)]
t
Chris Duncan [Fri, 8 Nov 2024 20:03:58 +0000 (12:03 -0800)]
Skip sweep test until it can be debugged better.
Chris Duncan [Fri, 8 Nov 2024 18:48:00 +0000 (10:48 -0800)]
Revert promisification of serialize functions in BIP-32 ckd algorithm. Add type guards to serialization functions and log actual value instead of binary representation on errors. Simplify byte array construction and return now that convert methods accept padding values.
Chris Duncan [Fri, 8 Nov 2024 18:43:39 +0000 (10:43 -0800)]
Break up sweep statements for legibility.
Chris Duncan [Fri, 8 Nov 2024 17:06:16 +0000 (09:06 -0800)]
Promisify BIP-44 serialization methods.
Chris Duncan [Fri, 8 Nov 2024 17:03:59 +0000 (09:03 -0800)]
Add stress test for deriving 2^15 accounts which is skipped by default.
Chris Duncan [Wed, 6 Nov 2024 07:09:30 +0000 (23:09 -0800)]
Update version.
Chris Duncan [Wed, 6 Nov 2024 07:08:21 +0000 (23:08 -0800)]
Nano spec indicates account derivation should use index in unsigned 32-bit big endian format. This is opposite of many processor architectures, so add a check for endianness for BLAKE2b wallet accounts. Also move function to be in alphabetical order.
Chris Duncan [Wed, 6 Nov 2024 07:05:43 +0000 (23:05 -0800)]
Fix test vector constant references.
Chris Duncan [Wed, 6 Nov 2024 06:01:46 +0000 (22:01 -0800)]
Remove unnecessary argument.
Chris Duncan [Wed, 6 Nov 2024 06:01:12 +0000 (22:01 -0800)]
Fix test vectors.
Chris Duncan [Wed, 6 Nov 2024 05:31:15 +0000 (21:31 -0800)]
Tabs not spaces.
Chris Duncan [Wed, 6 Nov 2024 04:48:12 +0000 (20:48 -0800)]
Add test vector data from publicly available tool at https://tools.nanos.cc/?tool=seed
Chris Duncan [Sat, 2 Nov 2024 08:36:58 +0000 (01:36 -0700)]
Update version.
Chris Duncan [Sat, 2 Nov 2024 08:36:02 +0000 (01:36 -0700)]
Add option to restore LedgerWallet from a wallet ID.
Chris Duncan [Sat, 2 Nov 2024 06:03:08 +0000 (23:03 -0700)]
Update version.
Chris Duncan [Sat, 2 Nov 2024 05:59:29 +0000 (22:59 -0700)]
Using 'Node" as class name interferes with browser Node class, so revert it to 'Rpc'.
Chris Duncan [Sat, 2 Nov 2024 05:52:22 +0000 (22:52 -0700)]
Update Node types.
Chris Duncan [Fri, 1 Nov 2024 05:18:33 +0000 (22:18 -0700)]
Update version.
Chris Duncan [Fri, 1 Nov 2024 05:18:04 +0000 (22:18 -0700)]
Fix global assignment.
Chris Duncan [Fri, 1 Nov 2024 04:40:09 +0000 (21:40 -0700)]
Update version.
Chris Duncan [Fri, 1 Nov 2024 04:38:58 +0000 (21:38 -0700)]
Add separate file option to allow importing to the global namespace.
Chris Duncan [Sat, 26 Oct 2024 03:37:31 +0000 (20:37 -0700)]
Update version.
Chris Duncan [Sat, 26 Oct 2024 03:35:42 +0000 (20:35 -0700)]
Fix lock and unlock when account indices are skipped and update relevant test.
Chris Duncan [Fri, 25 Oct 2024 23:13:42 +0000 (16:13 -0700)]
Update version.
Chris Duncan [Fri, 25 Oct 2024 23:11:10 +0000 (16:11 -0700)]
Ship source map for debugging.
Chris Duncan [Mon, 21 Oct 2024 13:20:21 +0000 (06:20 -0700)]
Update version.
Chris Duncan [Mon, 21 Oct 2024 13:07:57 +0000 (06:07 -0700)]
Update esbuild script to target browsers.
Chris Duncan [Mon, 14 Oct 2024 10:55:24 +0000 (03:55 -0700)]
Update version.
Chris Duncan [Mon, 14 Oct 2024 10:51:49 +0000 (03:51 -0700)]
Add wallet properties to get locked or unlocked status.
Chris Duncan [Mon, 14 Oct 2024 09:55:16 +0000 (02:55 -0700)]
Update version.
Chris Duncan [Mon, 14 Oct 2024 09:43:05 +0000 (02:43 -0700)]
Session storage operations are synchronous, so wrap them in Promises to at least try and not block other processes.
Chris Duncan [Mon, 14 Oct 2024 09:25:13 +0000 (02:25 -0700)]
Rename wallet import to restore which better reflects that it is being retrieved from existing storage. Add tests for wallet restore.
Chris Duncan [Mon, 14 Oct 2024 09:24:08 +0000 (02:24 -0700)]
Fix parameter name for consistency.
Chris Duncan [Mon, 14 Oct 2024 09:23:07 +0000 (02:23 -0700)]
Check for existing global session storage prior to mocking in tests.
Chris Duncan [Sun, 13 Oct 2024 09:26:23 +0000 (02:26 -0700)]
Update version.
Chris Duncan [Sun, 13 Oct 2024 09:18:08 +0000 (02:18 -0700)]
Fix typo removing argument from sessionStorage length mock.
Chris Duncan [Sun, 13 Oct 2024 09:15:55 +0000 (02:15 -0700)]
Fix length and add clear properties to sessionStorage mock.
Chris Duncan [Sun, 13 Oct 2024 09:11:46 +0000 (02:11 -0700)]
Update Safe to use browser session storage. Mock global sessionStorage in tests. Update wallet to pack ID and both secrets in one JSON object when locking and unpack it all when unlocking.
Chris Duncan [Sun, 13 Oct 2024 03:37:11 +0000 (20:37 -0700)]
Update version.
Chris Duncan [Sun, 13 Oct 2024 03:36:37 +0000 (20:36 -0700)]
Test new wallet ID getter.
Chris Duncan [Sun, 13 Oct 2024 03:33:50 +0000 (20:33 -0700)]
Fix reference to account balance type in test.
Chris Duncan [Sun, 13 Oct 2024 03:21:18 +0000 (20:21 -0700)]
Expose internal wallet hexadecimal ID through getter.
Chris Duncan [Thu, 10 Oct 2024 23:46:16 +0000 (16:46 -0700)]
Update version.
Chris Duncan [Thu, 10 Oct 2024 23:45:05 +0000 (16:45 -0700)]
Update dependencies.
Chris Duncan [Thu, 10 Oct 2024 23:40:27 +0000 (16:40 -0700)]
Add package keyword.
Chris Duncan [Thu, 10 Oct 2024 23:37:48 +0000 (16:37 -0700)]
Revert accidental change to documentation. Add tests for new getAllNames method.
Chris Duncan [Thu, 10 Oct 2024 22:10:12 +0000 (15:10 -0700)]
Sanitize rolodex entry names and validate it and address as strings.
Chris Duncan [Tue, 8 Oct 2024 16:40:29 +0000 (09:40 -0700)]
Update version.
Chris Duncan [Tue, 8 Oct 2024 16:40:03 +0000 (09:40 -0700)]
Add test for converting small amounts of raw to fractional nano. Fix issue found with said test.
Chris Duncan [Tue, 8 Oct 2024 09:05:57 +0000 (02:05 -0700)]
Update version.
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 [Tue, 8 Oct 2024 07:15:41 +0000 (00:15 -0700)]
Update version.
Chris Duncan [Tue, 8 Oct 2024 07:13:00 +0000 (00:13 -0700)]
Update remaining pending nomenclature.
Chris Duncan [Tue, 8 Oct 2024 06:43:44 +0000 (23:43 -0700)]
Update version.
Chris Duncan [Tue, 8 Oct 2024 06:37:13 +0000 (23:37 -0700)]
Rename Account properties to current Nano terminology, that is, pending is now receivable.
Chris Duncan [Mon, 7 Oct 2024 20:06:07 +0000 (13:06 -0700)]
Revert fix for repo URL.
Chris Duncan [Mon, 7 Oct 2024 19:53:54 +0000 (12:53 -0700)]
Update version.
Chris Duncan [Mon, 7 Oct 2024 19:53:11 +0000 (12:53 -0700)]
Update bug reporting.
Chris Duncan [Mon, 7 Oct 2024 19:44:53 +0000 (12:44 -0700)]
Fix failing test due to locked test wallet.
Chris Duncan [Mon, 7 Oct 2024 19:44:31 +0000 (12:44 -0700)]
Fix wallet CKD documentation. Add documentation to Ledger lock and unlock methods to indicate that the default behavior is overridden.
Chris Duncan [Mon, 7 Oct 2024 19:19:11 +0000 (12:19 -0700)]
Get pending transactions and vote weight from account_info RPC when refreshing an Account.
Chris Duncan [Thu, 3 Oct 2024 20:41:53 +0000 (13:41 -0700)]
Fix repo link.
Chris Duncan [Thu, 3 Oct 2024 19:58:52 +0000 (12:58 -0700)]
Export Safe class for external usage.
Chris Duncan [Thu, 3 Oct 2024 09:18:38 +0000 (02:18 -0700)]
Fix optional parameter typing in overloaded functions. Fix dependency in package lockfile.
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:25:32 +0000 (13:25 -0700)]
Test legacy account derivation. Test hardened indices. Increase derivation count to stress test.
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.
Chris Duncan [Sat, 31 Aug 2024 19:51:11 +0000 (12:51 -0700)]
Rename test file to enable module features.
Zosoled [Tue, 30 Jul 2024 06:33:29 +0000 (23:33 -0700)]
Update dependencies.
Zosoled [Sun, 16 Jun 2024 22:39:14 +0000 (15:39 -0700)]
Update package lockfile.
Zosoled [Sun, 16 Jun 2024 22:38:47 +0000 (15:38 -0700)]
Update all dependency versions.
Zosoled [Sun, 16 Jun 2024 22:35:30 +0000 (15:35 -0700)]
Fix CVE-2023-28154.
Zosoled [Sun, 16 Jun 2024 22:34:22 +0000 (15:34 -0700)]
Fix CVE-2023-46233.
Miro Metsänheimo [Wed, 27 Apr 2022 19:13:08 +0000 (22:13 +0300)]
Version 1.4.3
* Revert back a change regarding entropy length
Miro Metsänheimo [Sun, 24 Apr 2022 19:59:00 +0000 (22:59 +0300)]
Version 1.4.2
* Fix encrypting and decrypting emojis
Miro Metsänheimo [Sun, 24 Apr 2022 18:51:45 +0000 (21:51 +0300)]
Version 1.4.1
* Fix for legacy wallet creation presented in 1.4.0
Miro Metsänheimo [Sun, 24 Apr 2022 18:29:56 +0000 (21:29 +0300)]
Merge pull request #13 from numsu/encryption
Version 1.4.0
Miro Metsänheimo [Fri, 22 Apr 2022 20:54:27 +0000 (23:54 +0300)]
Version 1.4.0
* 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)
Miro Metsänheimo [Fri, 4 Feb 2022 22:06:04 +0000 (00:06 +0200)]
Version 1.3.6
* Upgraded dependencies
Miro Metsänheimo [Sat, 18 Sep 2021 20:00:42 +0000 (23:00 +0300)]
Version 1.3.5
* Expose the blake2b hashing function
* Expose the public key to address function
Miro Metsänheimo [Tue, 8 Jun 2021 15:09:10 +0000 (18:09 +0300)]
Version 1.3.4
* Updated dependencies
* Improved documentation, JSDoc and typings
Miro Metsänheimo [Thu, 3 Jun 2021 20:19:08 +0000 (23:19 +0300)]
Version 1.3.3
* 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, 30 Mar 2021 19:08:42 +0000 (22:08 +0300)]
Version 1.3.2
* Allow work to be omitted since it's not required for the signature
* npm audit fix
Miro Metsänheimo [Sun, 7 Mar 2021 14:13:24 +0000 (16:13 +0200)]
Version 1.3.1
* generateLegacy seed is now optional
Miro Metsänheimo [Sun, 7 Mar 2021 14:11:17 +0000 (16:11 +0200)]
Merge pull request #8 from aspic/support-optional-seed
Let seed be optional since this is supported in the library
Kjetil Mehl [Sun, 7 Mar 2021 12:53:51 +0000 (13:53 +0100)]
Makes seed be optional since this is supported in the library
Miro Metsänheimo [Fri, 22 Jan 2021 21:31:42 +0000 (23:31 +0200)]
Update README.md
Miro Metsänheimo [Thu, 14 Jan 2021 06:55:23 +0000 (08:55 +0200)]
Update README.md