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) • 331 B
text/typescript
import {
CTX_ID_SIZE,
} from '../blsct'
import * as crypto from 'crypto'
import { CTxId } from '../ctxId'
test('serialize and deserialize', () => {
const orgHex = crypto.randomBytes(CTX_ID_SIZE).toString('hex')
const ctxId = CTxId.deserialize(orgHex)
const recHex = ctxId.serialize()
expect(orgHex).toBe(recHex)
})