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.

27 lines (26 loc) 929 B
import { PublicKey } from './keys/publicKey'; import { Scalar } from './scalar'; /** Represents a view tag derived from a blinding public key and a view key. The view tag is a 64-bit unsigned integer. * * Examples: * ```ts * const { ViewTag, PublicKey, ChildKey, Scalar } = require('navio-blsct') * const blindingPubKey = PublicKey.random() * const seed = Scalar.random() * const viewKey = new ChildKey(seed).toTxKey().toViewKey() * new ViewTag(blindingPubKey, viewKey) * ``` */ export declare class ViewTag { value: number; /** Constructs a new `ViewTag` instance. * * @param blindingPubKey - The public key used for blinding. * @param viewKey - The view key. */ constructor(blindingPubKey: PublicKey, viewKey: Scalar); /** Generates a random view tag. * @returns A new `ViewTag` instance with a random blinding public key and view key. */ static random(): ViewTag; }