+// SPDX-FileCopyrightText: 2024 Chris Duncan <chris@zoso.dev>\r
+// SPDX-License-Identifier: GPL-3.0-or-later\r
+\r
+import blake2b from 'blake2b'\r
+\r
(function(nacl) {\r
'use strict';\r
\r
//\r
// Implementation derived from TweetNaCl version 20140427.\r
// See for details: http://tweetnacl.cr.yp.to/\r
+ //\r
+ // Modified in 2024 by Chris Duncan to hash secret key to public key using\r
+ // BLAKE2b instead of SHA-512 as specified in the documentation for Nano\r
+ // cryptocurrency.\r
+ // See for details: https://docs.nano.org/integration-guides/the-basics/\r
+ // Original source commit: https://github.com/dchest/tweetnacl-js/blob/71df1d6a1d78236ca3e9f6c788786e21f5a651a6/nacl-fast.js\r
\r
var gf = function(init) {\r
var i, r = new Float64Array(16);\r