Skip to content

bovine.models

DataIntegrityProof

Bases: BaseModel

A data integrity proof provides information about the proof mechanism, parameters required to verify that proof, and the proof value itself. See https://www.w3.org/TR/vc-data-integrity/#proofs

Parameters:

Name Type Description Default
field_context Any | None
None
id str | None
None
type str
required
cryptosuite str
required
created datetime | None
None
expires datetime | None
None
verificationMethod str
required
proofPurpose str
required
proofValue str | None
None
nonce str | None
None
domain str | List[str] | None
None
challenge str | None
None
previousProof str | List[str] | None
None
Source code in bovine/bovine/models.py
class DataIntegrityProof(BaseModel):
    """
    A data integrity proof provides information about the proof mechanism, parameters required to verify that proof, and the proof value itself. See https://www.w3.org/TR/vc-data-integrity/#proofs
    """

    model_config = ConfigDict(
        extra="forbid",
    )
    field_context: Optional[Any] = Field(None, alias="@context")
    """
    Optional `@context` parameter
    """
    id: Optional[str] = None
    """
    An optional identifier for the proof, which MUST be a URL, such as a UUID as a URN (urn:uuid:6a1676b8-b51f-11ed-937b-d76685a20ff5).
    """
    type: str
    """
    The specific proof type used for the cryptographic proof MUST be specified as a string that maps to a URL. Examples of proof types include DataIntegrityProof and Ed25519Signature2020. Proof types determine what other fields are required to secure and verify the proof. 
    """
    cryptosuite: str
    """
    fixme
    """
    created: Optional[datetime] = None
    """
    The date and time the proof was created 
    """
    expires: Optional[datetime] = None
    """
    dateTimeStamp string specifying when the proof expires. 
    """
    verificationMethod: str
    """
    The means and information needed to verify the proof MUST be specified as a string that maps to a URL. An example of a verification method is a link to a public key which includes cryptographic material that is used by a verifier during the verification process. 
    """
    proofPurpose: str
    """
    The proof purpose acts as a safeguard to prevent the proof from being misused by being applied to a purpose other than the one that was intended. 
    """
    proofValue: Optional[str] = None
    """
    A string value that contains the base-encoded binary data necessary to verify the digital proof using the verificationMethod specified. 
    """
    nonce: Optional[str] = None
    domain: Optional[Union[str, List[str]]] = None
    challenge: Optional[str] = None
    previousProof: Optional[Union[str, List[str]]] = None

created class-attribute instance-attribute

created: Optional[datetime] = None

The date and time the proof was created

cryptosuite instance-attribute

cryptosuite: str

fixme

expires class-attribute instance-attribute

expires: Optional[datetime] = None

dateTimeStamp string specifying when the proof expires.

field_context class-attribute instance-attribute

field_context: Optional[Any] = Field(None, alias="@context")

Optional @context parameter

id class-attribute instance-attribute

id: Optional[str] = None

An optional identifier for the proof, which MUST be a URL, such as a UUID as a URN (urn:uuid:6a1676b8-b51f-11ed-937b-d76685a20ff5).

proofPurpose instance-attribute

proofPurpose: str

The proof purpose acts as a safeguard to prevent the proof from being misused by being applied to a purpose other than the one that was intended.

proofValue class-attribute instance-attribute

proofValue: Optional[str] = None

A string value that contains the base-encoded binary data necessary to verify the digital proof using the verificationMethod specified.

type instance-attribute

type: str

The specific proof type used for the cryptographic proof MUST be specified as a string that maps to a URL. Examples of proof types include DataIntegrityProof and Ed25519Signature2020. Proof types determine what other fields are required to secure and verify the proof.

verificationMethod instance-attribute

verificationMethod: str

The means and information needed to verify the proof MUST be specified as a string that maps to a URL. An example of a verification method is a link to a public key which includes cryptographic material that is used by a verifier during the verification process.

Model

Bases: RootModel[Any]

Parameters:

Name Type Description Default
root Any
required
Source code in bovine/bovine/models.py
class Model(RootModel[Any]):
    root: Any

Multikey

Bases: BaseModel

Representation of a cryptographic identifier as specified by Verifiable Credentials Data Integrity here

Parameters:

Name Type Description Default
field_context Any | None
None
id str | None
None
type Type
required
controller str
required
publicKeyMultibase str
required
expires datetime | None
None
revoked datetime | None
None
Source code in bovine/bovine/models.py
class Multikey(BaseModel):
    """
    Representation of a cryptographic identifier as specified by Verifiable Credentials Data Integrity [here](https://www.w3.org/TR/vc-data-integrity/#multikey)
    """

    model_config = ConfigDict(
        extra="forbid",
    )
    field_context: Optional[Any] = Field(None, alias="@context")
    id: Optional[str] = None
    """
    optional id
    """
    type: Type
    """
    The type, must be Multikey
    """
    controller: str
    """
    The controller, i.e. the person holding the corresponding secret
    """
    publicKeyMultibase: str
    """
    The public key encoded in base 58 with an appropriate prefix
    """
    expires: Optional[datetime] = None
    """
    dateTimeStamp string specifying when the key expires. 
    """
    revoked: Optional[datetime] = None
    """
    dateTimeStamp string specifying when the key was revoked. 
    """

controller instance-attribute

controller: str

The controller, i.e. the person holding the corresponding secret

expires class-attribute instance-attribute

expires: Optional[datetime] = None

dateTimeStamp string specifying when the key expires.

id class-attribute instance-attribute

id: Optional[str] = None

optional id

publicKeyMultibase instance-attribute

publicKeyMultibase: str

The public key encoded in base 58 with an appropriate prefix

revoked class-attribute instance-attribute

revoked: Optional[datetime] = None

dateTimeStamp string specifying when the key was revoked.

type instance-attribute

type: Type

The type, must be Multikey

Type

Bases: Enum

The type, must be Multikey

Source code in bovine/bovine/models.py
class Type(Enum):
    """
    The type, must be Multikey
    """

    Multikey = "Multikey"