export namespace SIGNATURE_TYPE { let SECP256K1: 1; let BLS: 2; } export const SIGNATURE_CODE: { readonly 1: "SECP256K1"; readonly 2: "BLS"; }; export namespace Schemas { let lotusSignature: z.ZodObject<{ Type: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>; Data: z.ZodString; }, z.core.$strip>; let signature: z.ZodObject<{ type: z.ZodEnum<{ SECP256K1: "SECP256K1"; BLS: "BLS"; }>; data: z.ZodCustom, Uint8Array>; }, z.core.$strip>; } /** * @typedef {keyof typeof SIGNATURE_TYPE} SignatureType * @typedef {(typeof SIGNATURE_TYPE)[SignatureType]} SignatureCode * @typedef {z.infer} LotusSignature * @typedef {z.infer} SignatureObj */ /** * Signature Class */ export class Signature { /** * * @param {LotusSignature} json */ static fromLotus(json: LotusSignature): Signature; /** * Signature from Lotus-style hex encoded string * * Lotus adds 0x01 or 0x02 to the signature depending on the type. * * @param {string} str - Hex encoded signature */ static fromLotusHex(str: string): Signature; /** * * @param {SignatureObj} sig */ constructor(sig: SignatureObj); type: "SECP256K1" | "BLS"; data: Uint8Array; get code(): 2 | 1; /** * Encodes the signature as a JSON object in the Lotus RPC format. * * @returns {LotusSignature} */ toLotus(): LotusSignature; /** * Encodes the signature as a Lotus-style hex encoded string * * Lotus adds 0x01 or 0x02 to the signature depending on the type. * * @returns {string} Hex encoded signature */ toLotusHex(): string; } export type SignatureType = keyof typeof SIGNATURE_TYPE; export type SignatureCode = (typeof SIGNATURE_TYPE)[SignatureType]; export type LotusSignature = z.infer; export type SignatureObj = z.infer; import { z } from 'zod'; //# sourceMappingURL=signature.d.ts.map