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.
26 lines (25 loc) • 837 B
TypeScript
import { ManagedObj } from './managedObj';
/** Represents the transaction ID of a CMutableTransaction
*
* Examples:
* ```ts
* const { CTxId, CTX_ID_SIZE } = require('navio-blsct')
* const { randomBytes } = require('crypto')
* const cTxIdHex = randomBytes(CTX_ID_SIZE).toString('hex')
* const cTxId = CTxId.deserialize(cTxIdHex)
* const ser = cTxId.serialize()
* const deser = CTxId.deserialize(ser)
* ser === deser.serialize() // true
* ```
*/
export declare class CTxId extends ManagedObj {
constructor(obj: any);
value(): any;
serialize(): string;
/** Deserializes a `CTxId` from its hexadecimal representation.
*
* * @param hex - The hexadecimal string to deserialize.
* * @returns A new `CTxId` instance.
*/
static deserialize(this: new (obj: any) => CTxId, hex: string): CTxId;
}