/**
 * COSE_Sign1 structures (RFC 8152).
 *
 * @since 2.0.0
 * @category Message Signing
 */
import { Equal, Hash, Inspectable, Schema } from "effect";
import * as CBOR from "../CBOR.js";
import * as Ed25519Signature from "../Ed25519Signature.js";
import { Headers } from "./Header.js";
declare const COSESign1_base: Schema.Class<COSESign1, {
    headers: Schema.instanceOf<Headers>;
    payload: Schema.UndefinedOr<typeof Schema.Uint8ArrayFromSelf>;
    signature: Schema.instanceOf<Ed25519Signature.Ed25519Signature>;
}, Schema.Struct.Encoded<{
    headers: Schema.instanceOf<Headers>;
    payload: Schema.UndefinedOr<typeof Schema.Uint8ArrayFromSelf>;
    signature: Schema.instanceOf<Ed25519Signature.Ed25519Signature>;
}>, never, {
    readonly signature: Ed25519Signature.Ed25519Signature;
} & {
    readonly headers: Headers;
} & {
    readonly payload: Uint8Array<ArrayBufferLike> | undefined;
}, {}, {}>;
/**
 * COSE_Sign1 structure (RFC 8152) - signed message.
 *
 * @since 2.0.0
 * @category Model
 */
export declare class COSESign1 extends COSESign1_base {
    toJSON(): {
        _tag: "COSESign1";
        headers: {
            _tag: "Headers";
            protected: {
                _tag: "HeaderMap";
                headers: any[][];
            };
            unprotected: {
                _tag: "HeaderMap";
                headers: any[][];
            };
        };
        payload: string | undefined;
        signature: string;
    };
    toString(): string;
    [Inspectable.NodeInspectSymbol](): unknown;
    [Equal.symbol](that: unknown): boolean;
    [Hash.symbol](): number;
    /**
     * Get the signed data (Sig_structure as per RFC 8152).
     *
     * @since 2.0.0
     * @category Accessors
     */
    signedData(externalAad?: Uint8Array, externalPayload?: Uint8Array): Uint8Array;
    /**
     * Convert to user-facing encoding format (`cms_<base64url>`).
     * Includes checksum for data integrity verification.
     *
     * @since 2.0.0
     * @category Conversion
     */
    toUserFacingEncoding(): string;
    /**
     * Parse from user-facing encoding format (`cms_<base64url>`).
     *
     * @since 2.0.0
     * @category Conversion
     */
    static fromUserFacingEncoding(encoded: string): COSESign1;
}
/**
 * CBOR bytes transformation schema for COSESign1.
 *
 * @since 2.0.0
 * @category Schemas
 */
export declare const COSESign1FromCBORBytes: (options?: CBOR.CodecOptions) => Schema.transformOrFail<Schema.transformOrFail<typeof Schema.Uint8ArrayFromSelf, Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>, never>, Schema.SchemaClass<COSESign1, COSESign1, never>, never>;
/**
 * CBOR hex transformation schema for COSESign1.
 *
 * @since 2.0.0
 * @category Schemas
 */
export declare const COSESign1FromCBORHex: (options?: CBOR.CodecOptions) => Schema.transform<Schema.Schema<Uint8Array<ArrayBufferLike>, string, never>, Schema.transformOrFail<Schema.transformOrFail<typeof Schema.Uint8ArrayFromSelf, Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>, never>, Schema.SchemaClass<COSESign1, COSESign1, never>, never>>;
declare const COSESign1Builder_base: Schema.Class<COSESign1Builder, {
    externalAad: typeof Schema.Uint8ArrayFromSelf;
    hashPayload: typeof Schema.Boolean;
    headers: Schema.instanceOf<Headers>;
    isPayloadExternal: typeof Schema.Boolean;
    payload: typeof Schema.Uint8ArrayFromSelf;
}, Schema.Struct.Encoded<{
    externalAad: typeof Schema.Uint8ArrayFromSelf;
    hashPayload: typeof Schema.Boolean;
    headers: Schema.instanceOf<Headers>;
    isPayloadExternal: typeof Schema.Boolean;
    payload: typeof Schema.Uint8ArrayFromSelf;
}>, never, {
    readonly headers: Headers;
} & {
    readonly payload: Uint8Array<ArrayBufferLike>;
} & {
    readonly externalAad: Uint8Array<ArrayBufferLike>;
} & {
    readonly hashPayload: boolean;
} & {
    readonly isPayloadExternal: boolean;
}, {}, {}>;
/**
 * Builder for creating COSE_Sign1 structures.
 *
 * @since 2.0.0
 * @category Model
 */
export declare class COSESign1Builder extends COSESign1Builder_base {
    toJSON(): {
        _tag: "COSESign1Builder";
        externalAad: string;
        hashPayload: boolean;
        headers: {
            _tag: "Headers";
            protected: {
                _tag: "HeaderMap";
                headers: any[][];
            };
            unprotected: {
                _tag: "HeaderMap";
                headers: any[][];
            };
        };
        isPayloadExternal: boolean;
        payload: string;
    };
    toString(): string;
    [Inspectable.NodeInspectSymbol](): unknown;
    [Equal.symbol](that: unknown): boolean;
    [Hash.symbol](): number;
    /**
     * Set external additional authenticated data.
     *
     * @since 2.0.0
     * @category Mutators
     */
    setExternalAad(aad: Uint8Array): this;
    /**
     * Hash the payload with blake2b-224 and update headers.
     * Sets the "hashed" header to true in unprotected headers.
     *
     * @since 2.0.0
     * @category Mutators
     */
    hashPayloadWith224(): this;
    /**
     * Create the data that needs to be signed (Sig_structure).
     *
     * @since 2.0.0
     * @category Building
     */
    makeDataToSign(): Uint8Array;
    /**
     * Build the final COSESign1 structure with the provided signature.
     *
     * @since 2.0.0
     * @category Building
     */
    build(signature: Ed25519Signature.Ed25519Signature): COSESign1;
}
/**
 * Create a new COSESign1Builder.
 *
 * @since 2.0.0
 * @category Constructors
 */
export declare const coseSign1BuilderNew: (headers: Headers, payload: Uint8Array, isPayloadExternal: boolean) => COSESign1Builder;
/**
 * Decode COSESign1 from CBOR bytes.
 *
 * @since 2.0.0
 * @category Conversion
 */
export declare const coseSign1FromCBORBytes: (bytes: Uint8Array, options?: CBOR.CodecOptions) => COSESign1;
/**
 * Decode COSESign1 from CBOR hex.
 *
 * @since 2.0.0
 * @category Conversion
 */
export declare const coseSign1FromCBORHex: (hex: string, options?: CBOR.CodecOptions) => COSESign1;
/**
 * Encode COSESign1 to CBOR bytes.
 *
 * @since 2.0.0
 * @category Conversion
 */
export declare const coseSign1ToCBORBytes: (coseSign1: COSESign1, options?: CBOR.CodecOptions) => Uint8Array;
/**
 * Encode COSESign1 to CBOR hex.
 *
 * @since 2.0.0
 * @category Conversion
 */
export declare const coseSign1ToCBORHex: (coseSign1: COSESign1, options?: CBOR.CodecOptions) => string;
export {};
//# sourceMappingURL=Sign1.d.ts.map