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.
36 lines (29 loc) • 735 B
text/typescript
import { Scalar } from '../../scalar'
import { ChildKey } from '../../keys/childKey'
describe('KeyDerivation', () => {
test('ChildKey', () => {
const seed = new Scalar(12345)
new ChildKey(seed)
new ChildKey()
})
test('ChildKey -> blindingKey', () => {
const child = new ChildKey()
child.toBlindingKey()
})
test('ChildKey -> TokenKey', () => {
const child = new ChildKey()
child.toTokenKey()
})
test('ChildKey -> TxKey', () => {
const x = new ChildKey()
x.toTxKey()
})
test('TxKey -> SpendingKey', () => {
const x = new ChildKey()
x.toTxKey().toSpendingKey()
})
test('TxKey -> ViewKey', () => {
const x = new ChildKey()
x.toTxKey().toSpendingKey()
})
})