proposit-core
    Preparing search index...

    Class ClaimLibrary<TClaim>

    Full management interface for a versioned claim library. Extends TClaimLookup with mutation, query, and snapshot methods.

    Type Parameters

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    • Type Parameters

      • TClaim extends {
            checksum: string;
            frozen: boolean;
            id: string;
            type: "normal" | "citation" | "axiomatic";
            version: number;
        } = {
            checksum: string;
            frozen: boolean;
            id: string;
            type: "normal" | "citation" | "axiomatic";
            version: number;
        }

      Parameters

      Returns ClaimLibrary<TClaim>

    Properties

    checksumConfig?: TCoreChecksumConfig
    checksumFieldsKey: "claimFields" = ...
    entities: Map<string, Map<number, TClaim>>
    entityLabel: "Claim"
    entityType: "claim" = ...
    frozenSuccessorCode: "CLAIM_FROZEN_NO_SUCCESSOR" = CLAIM_FROZEN_NO_SUCCESSOR
    schema: TObject<
        {
            checksum: TString;
            frozen: TBoolean;
            id: TString;
            type: TUnion<
                [TLiteral<"normal">, TLiteral<"citation">, TLiteral<"axiomatic">],
            >;
            version: TNumber;
        },
    > = CoreClaimSchema
    schemaInvalidCode: "CLAIM_SCHEMA_INVALID" = CLAIM_SCHEMA_INVALID

    Methods

    • Restores a claim library from a previously captured snapshot. Pre-screens for legacy (pre-v0.10.0) claim entries that lack the required type field and emits LEGACY_CLAIM_MISSING_TYPE so the caller gets a clear migration signal rather than a generic schema error.

      Type Parameters

      • TClaim extends {
            checksum: string;
            frozen: boolean;
            id: string;
            type: "normal" | "citation" | "axiomatic";
            version: number;
        } = {
            checksum: string;
            frozen: boolean;
            id: string;
            type: "normal" | "citation" | "axiomatic";
            version: number;
        }

      Parameters

      Returns ClaimLibrary<TClaim>