• Produces JSON-LD readable representations of KILT claims. This is done by implicitly or explicitly transforming property keys to globally unique predicates. Where possible these predicates are taken directly from the Verifiable Credentials vocabulary. Properties that are unique to a CType are transformed into predicates by prepending the CType[schema][$id].

    Returns

    An object which can be serialized into valid JSON-LD representing an IClaim.

    Parameters

    • claim: PartialClaim

      A (partial) IClaim from to build a JSON-LD representation from. The cTypeHash property is required.

    • expanded: boolean = true

      Return an expanded instead of a compacted representation. While property transformation is done explicitly in the expanded format, it is otherwise done implicitly via adding JSON-LD's reserved @context properties while leaving IClaim[contents] property keys untouched.

    Returns Record<string, unknown>