Cashu-TS - v4.13.0
    Preparing search index...

    Type Alias SigAllApiExperimental

    Helpers for SigAll multi-party signing coordination.

    type SigAllApi = {
        computeDigests: (
            inputs: Pick<Proof, "secret" | "C">[],
            outputs: SerializedBlindedMessage[],
            quoteId?: string,
        ) => SigAllDigests;
        deserializePackage: (input: string) => SigAllSigningPackage;
        extractMeltPackage: <TQuote extends Pick<MeltQuoteBaseResponse, "quote">>(
            preview: MeltPreview<TQuote>,
        ) => SigAllSigningPackage;
        extractSwapPackage: (preview: SwapPreview) => SigAllSigningPackage;
        mergeMeltPackage: <TQuote extends Pick<MeltQuoteBaseResponse, "quote">>(
            pkg: SigAllSigningPackage,
            preview: MeltPreview<TQuote>,
        ) => MeltPreview<TQuote>;
        mergeSwapPackage: (
            pkg: SigAllSigningPackage,
            preview: SwapPreview,
        ) => SwapPreview;
        serializePackage: (pkg: SigAllSigningPackage) => string;
        signDigest: (hexDigest: string, privkey: string) => string;
        signPackage: (
            pkg: SigAllSigningPackage,
            privkey: string,
        ) => SigAllSigningPackage;
    }
    Index

    Properties

    computeDigests: (
        inputs: Pick<Proof, "secret" | "C">[],
        outputs: SerializedBlindedMessage[],
        quoteId?: string,
    ) => SigAllDigests

    Computes the SIG_ALL digests for a transaction, keyed by transcript version.

    Type Declaration

    deserializePackage: (input: string) => SigAllSigningPackage

    Accepts a sigallA-prefixed base64url string and rehydrates it into a SigAllSigningPackage. Only known fields survive the round trip.

    extractMeltPackage: <TQuote extends Pick<MeltQuoteBaseResponse, "quote">>(
        preview: MeltPreview<TQuote>,
    ) => SigAllSigningPackage

    Extracts a signing package from a MeltPreview for multi-party SIG_ALL coordination.

    Type Declaration

    extractSwapPackage: (preview: SwapPreview) => SigAllSigningPackage

    Extracts a signing package from a SwapPreview for multi-party SIG_ALL coordination.

    Type Declaration

    This creates a minimal, serializable package that can be passed to other signers. Secrets and blinding factors are NOT included - only what's needed to reconstruct the exact SIG_ALL message and produce signatures.

    mergeMeltPackage: <TQuote extends Pick<MeltQuoteBaseResponse, "quote">>(
        pkg: SigAllSigningPackage,
        preview: MeltPreview<TQuote>,
    ) => MeltPreview<TQuote>

    Merges signatures from a signing package back into a MeltPreview.

    Type Declaration

    mergeSwapPackage: (
        pkg: SigAllSigningPackage,
        preview: SwapPreview,
    ) => SwapPreview

    Merges signatures from a signing package back into a SwapPreview.

    Type Declaration

    Injects collected signatures into the first proof's witness for mint submission. Call this after all parties have signed.

    serializePackage: (pkg: SigAllSigningPackage) => string

    Type Declaration

    Produces a deterministic JSON representation, base64url-encodes it and prefixes with sigallA for transport.

    • Field order is fixed and version field is always included for compatibility.
    • This enables consistent hashing and verification of package integrity.
    signDigest: (hexDigest: string, privkey: string) => string

    Signs a hex-encoded digest with a Schnorr key.

    signPackage: (
        pkg: SigAllSigningPackage,
        privkey: string,
    ) => SigAllSigningPackage

    Signs a SigAllSigningPackage and returns it with signatures attached.

    Type Declaration

    Signs the SIG_ALL transcripts recomputed from the package's own inputs, outputs and quote. Multiple parties can call this sequentially to aggregate signatures for multi-party signing.

    CTSError If the inputs are not a valid SIG_ALL set, a C or B_ is not a compressed point, the melt quote id is not a UUID, the private key is not 64 hex characters, the witness is already at its signature limit, or the lock does not currently name the signing key. That last case includes an expired lock with no refund keys (nothing to sign) and a P2BK lock, whose keys are blinded: derive the blinded key before signing.