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.

32 lines (31 loc) 1.04 kB
import { ManagedObj } from './managedObj'; /** Represents a sub-address ID. * * Examples: * ```ts * const { SubAddrId } = require('navio-blsct') * const x = SubAddrId.generate(123, 456) * x * const ser = x.serialize() * const deser = SubAddrId.deserialize(ser) * ser === deser.serialize() // true * ``` */ export declare class SubAddrId extends ManagedObj { constructor(obj: any); /** Generates a new `SubAddrId` instance. * * @param account - The account for the sub-address. * @param address - The address for the sub-address. * @return A new `SubAddrId` instance with the specified account and address. */ static generate(account: number, address: number): SubAddrId; value(): any; serialize(): string; /** Deserializes a `SubAddrId` from its hexadecimal representation. * * @param hex - The hexadecimal string to deserialize. * @returns A new `SubAddrId` instance. */ static deserialize(this: new (obj: any) => SubAddrId, hex: string): SubAddrId; }