import * as Proto from '../grpc-api/v2/concordium/protocol-level-tokens.js'; import { HexString } from '../types.js'; export type JSON = HexString; /** * CBOR encoded data */ declare class Cbor { #private; /** The internal value of bytes */ readonly bytes: Uint8Array; constructor( /** The internal value of bytes */ bytes: Uint8Array); /** * Get a string representation of the cbor. * @returns {string} The string representation. */ toString(): string; /** * Get a JSON-serializable representation of the cbor. * @returns {HexString} The JSON-serializable representation. */ toJSON(): HexString; } /** * Converts a {@linkcode HexString} to CBOR data. * @param {HexString} json The JSON representation of the token event. * @returns {Cbor} The CBOR data. */ export declare function fromJSON(json: HexString): Cbor; /** * CBOR encoded data */ export type Type = Cbor; /** * Type predicate for {@linkcode Type} * * @param value value to check. * @returns whether `value` is of type {@linkcode Type} */ export declare function instanceOf(value: unknown): value is Cbor; /** * Create CBOR data type from a byte representation * @param buffer The byte representation * @returns {Cbor} The CBOR data */ export declare function fromBuffer(buffer: ArrayBuffer): Cbor; /** * Get byte representation of the CBOR data. * @param {Cbor} cbor The event. * @returns {Uint8Array} The CBOR bytes. */ export declare function toBuffer(cbor: Cbor): Uint8Array; /** * Create CBOR from a hex string. * @param {HexString} hex Hex encoded data. * @returns {Cbor} */ export declare function fromHexString(hex: HexString): Cbor; /** * Hex encode CBOR data. * @param {Cbor} cbor The CBOR data. * @returns {HexString} String containing the hex encoding. */ export declare function toHexString(cbor: Cbor): HexString; /** * Convert CBOR data from its protobuf encoding. * @param {Proto.Cbor} cbor The protobuf encoding. * @returns {Cbor} */ export declare function fromProto(cbor: Proto.Cbor): Cbor; /** * Convert CBOR data into its protobuf encoding. * @param {Cbor} cbor module event. * @returns {Proto.Cbor} The protobuf encoding. */ export declare function toProto(cbor: Cbor): Proto.Cbor; export { decode } from './decode.js'; /** * Encode a value into CBOR format. * @param {unknown} value - The value to encode. * @returns {Cbor} The CBOR encoded data. */ export declare function encode(value: unknown): Cbor;