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.
35 lines (34 loc) • 1.14 kB
TypeScript
import { Scalar } from '../scalar';
import { TxKey } from './txKey';
/** Represents a child key. A child key is a Scalar and introduces no new functionality; it serves purely as a semantic alias. BlindingKey, TokenKey and TxKey are exclusively derived from a ChildKey.
*
* Examples:
* ```ts
* const { Scalar, ChildKey } = require('navio-blsct')
* const s = Scalar.random()
* const ck = new ChildKey(s)
* ck.toBlindingKey()
* ck.toTokenKey()
* ck.toTxKey()
* ```
*/
export declare class ChildKey extends Scalar {
/**
* Creates a new `ChildKey` derived from the given `Scalar`.
*
* @param obj - The `Scalar` to derive the `ChildKey` from.
*/
constructor(obj?: Scalar);
/** Derives a ChildKey from a Scalar.
* @returns A new ChildKey instance derived from the provided Scalar.
*/
toBlindingKey(): Scalar;
/** Derives a TokenKey from a ChildKey.
* @returns A new TokenKey instance derived from the ChildKey.
*/
toTokenKey(): Scalar;
/** Derives a TxKey from a ChildKey.
* @returns A new TxKey instance derived from the ChildKey.
*/
toTxKey(): TxKey;
}