UNPKG

navio-blsct

Version:

TypeScript bindings for the `libblsct` library used by the [Navio](https://nav.io/) blockchain to construct confidential transactions based on the BLS12-381 curve.

18 lines (11 loc) 333 B
import { SCRIPT_SIZE, } from '../blsct' import * as crypto from 'crypto' import { Script } from '../script' test('serialize and deserialize', () => { const org_hex = crypto.randomBytes(SCRIPT_SIZE).toString('hex') const a = Script.deserialize(org_hex) const rec_hex = a.serialize() expect(org_hex).toBe(rec_hex) })