})\r
\r
describe('block signing tests using official test vectors', async () => {\r
+ it('should create a valid signature for an open block', async () => {\r
+ const block = new ReceiveBlock(\r
+ NANO_TEST_VECTORS.OPEN_BLOCK.account,\r
+ NANO_TEST_VECTORS.OPEN_BLOCK.balance,\r
+ NANO_TEST_VECTORS.OPEN_BLOCK.link,\r
+ '0',\r
+ NANO_TEST_VECTORS.OPEN_BLOCK.representative,\r
+ NANO_TEST_VECTORS.OPEN_BLOCK.previous,\r
+ NANO_TEST_VECTORS.OPEN_BLOCK.work\r
+ )\r
+ await block.sign(NANO_TEST_VECTORS.OPEN_BLOCK.key)\r
+ assert.equal(block.signature, NANO_TEST_VECTORS.OPEN_BLOCK.signature)\r
+ })\r
+\r
it('should create a valid signature for a receive block', async () => {\r
const block = new ReceiveBlock(\r
NANO_TEST_VECTORS.RECEIVE_BLOCK.account,\r