@layr-labs/hourglass-performer
Version:
TypeScript SDK for building Hourglass AVS performers
33 lines • 972 B
TypeScript
/**
* Convert a string to Uint8Array for protobuf bytes fields
*/
export declare function stringToBytes(str: string): Uint8Array;
/**
* Convert Uint8Array to string from protobuf bytes fields
*/
export declare function bytesToString(bytes: Uint8Array): string;
/**
* Convert a hex string to Uint8Array
*/
export declare function hexToBytes(hex: string): Uint8Array;
/**
* Convert Uint8Array to hex string
*/
export declare function bytesToHex(bytes: Uint8Array): string;
/**
* Convert a number to Uint8Array (big-endian)
*/
export declare function numberToBytes(num: number): Uint8Array;
/**
* Convert Uint8Array to number (big-endian)
*/
export declare function bytesToNumber(bytes: Uint8Array): number;
/**
* Convert JSON object to Uint8Array
*/
export declare function jsonToBytes(obj: any): Uint8Array;
/**
* Convert Uint8Array to JSON object
*/
export declare function bytesToJson<T = any>(bytes: Uint8Array): T;
//# sourceMappingURL=protobuf.d.ts.map