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

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[AwareDatetime] = None
    """
    The date and time the proof was created 
    """
    expires: Optional[AwareDatetime] = None
    """
    dateTimeStamp string specifying when the proof expires. 
    """
    verificationMethod: AnyUrl
    """
    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: Optional[AwareDatetime] = None class-attribute instance-attribute

The date and time the proof was created

cryptosuite: str instance-attribute

fixme

expires: Optional[AwareDatetime] = None class-attribute instance-attribute

dateTimeStamp string specifying when the proof expires.

field_context: Optional[Any] = Field(None, alias='@context') class-attribute instance-attribute

Optional @context parameter

id: Optional[str] = None class-attribute instance-attribute

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: str instance-attribute

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 class-attribute instance-attribute

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

type: str instance-attribute

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: AnyUrl instance-attribute

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.

JrdData

Bases: BaseModel

See RFC 6415

Source code in bovine/bovine/models.py
class JrdData(BaseModel):
    """
    See [RFC 6415](https://www.packetizer.com/rfc/rfc6415/)
    """

    model_config = ConfigDict(
        extra="allow",
    )
    subject: Optional[AnyUrl] = None
    """
    The subject
    """
    expires: Optional[AwareDatetime] = None
    """
    expiration date time
    """
    aliases: Optional[List[AnyUrl]] = None
    """
    value a string array containing the values of each element in order
    """
    properties: Optional[Dict[str, Any]] = None
    """
    value an object with each element included as a name/value pair with the value of the type attribute as name, and element value included as a string value.
    """
    links: Optional[List[JrdLink]] = None
    """
     a single name/value pair with the name 'links', and value an array with each element included as an object
    """

aliases: Optional[List[AnyUrl]] = None class-attribute instance-attribute

value a string array containing the values of each element in order

expires: Optional[AwareDatetime] = None class-attribute instance-attribute

expiration date time

a single name/value pair with the name ‘links’, and value an array with each element included as an object

properties: Optional[Dict[str, Any]] = None class-attribute instance-attribute

value an object with each element included as a name/value pair with the value of the type attribute as name, and element value included as a string value.

subject: Optional[AnyUrl] = None class-attribute instance-attribute

The subject

Bases: BaseModel

See RFC 7033. The XRD Link

Source code in bovine/bovine/models.py
class JrdLink(BaseModel):
    """
    See [RFC 7033](https://www.rfc-editor.org/rfc/rfc7033.html).  The XRD Link
    """

    model_config = ConfigDict(
        extra="allow",
    )
    rel: Optional[str] = None
    """
    rel
    """
    type: Optional[str] = None
    """
    type
    """
    href: Optional[str] = None
    """
    when used with the 'href' attribute, conveys a link relation between the host described by the document and a common target URI
    """
    titles: Optional[Dict[str, Any]] = None
    """
    titles
    """
    properties: Optional[Dict[str, Any]] = None
    """
    properties
    """
    template: Optional[str] = None
    """
    template attribute conveys a relation whose context is an individual resource within the host-meta document scope,
    """

href: Optional[str] = None class-attribute instance-attribute

when used with the ‘href’ attribute, conveys a link relation between the host described by the document and a common target URI

properties: Optional[Dict[str, Any]] = None class-attribute instance-attribute

properties

rel: Optional[str] = None class-attribute instance-attribute

rel

template: Optional[str] = None class-attribute instance-attribute

template attribute conveys a relation whose context is an individual resource within the host-meta document scope,

titles: Optional[Dict[str, Any]] = None class-attribute instance-attribute

titles

type: Optional[str] = None class-attribute instance-attribute

type

Multikey

Bases: BaseModel

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

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[AwareDatetime] = None
    """
    dateTimeStamp string specifying when the key expires. 
    """
    revoked: Optional[AwareDatetime] = None
    """
    dateTimeStamp string specifying when the key was revoked. 
    """

controller: str instance-attribute

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

expires: Optional[AwareDatetime] = None class-attribute instance-attribute

dateTimeStamp string specifying when the key expires.

id: Optional[str] = None class-attribute instance-attribute

optional id

publicKeyMultibase: str instance-attribute

The public key encoded in base 58 with an appropriate prefix

revoked: Optional[AwareDatetime] = None class-attribute instance-attribute

dateTimeStamp string specifying when the key was revoked.

type: Type instance-attribute

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"