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.

29 lines (25 loc) 628 B
import { calcPrivSpendingKey, } from '../blsct' import { Scalar } from '../scalar' import { PublicKey } from './publicKey' import { SpendingKey } from './childKeyDesc/txKeyDesc/spendingKey' import { ViewKey } from './childKeyDesc/txKeyDesc/viewKey' export class PrivSpendingKey extends Scalar { constructor( blindingPubKey: PublicKey, viewKey: ViewKey, spendingKey: SpendingKey, account: number, address: number ) { const blsctPsk = calcPrivSpendingKey( blindingPubKey.value(), viewKey.value(), spendingKey.value(), account, address ) super(blsctPsk) } }