import { NanoNaCl } from './nano-nacl.js'
import { Pool } from './pool.js'
import { Rpc } from './rpc.js'
-import Tools from './tools.js'
import { Pow } from './workers.js'
/**
dec.toHex(this.balance, 32),
this.link
]
- const hash = await Tools.hash(data, 'hex')
+ const hash = new Blake2b(32)
+ data.forEach(str => hash.update(hex.toBytes(str)))
+ const blockHash = hash.digest('hex').toUpperCase()
return NanoNaCl.verify(
- hex.toBytes(hash),
+ hex.toBytes(blockHash),
hex.toBytes(this.signature ?? ''),
hex.toBytes(key)
)