entity.identity.credential_builder
CredentialBuilder Objects
class CredentialBuilder()
Helps construct credentials by specifying various attributes.
__init__
def __init__(issuer: Issuer, schema_id: str, holder_did: str, expiration: int,
version: int, config_data: ConfigData) -> None
Creates a new CredentialBuilder instance with the specified parameters.
with_string_attribute
def with_string_attribute(key: str, value: str) -> CredentialBuilder
Adds a string attribute to the CredentialBuilder.
with_integer_attribute
def with_integer_attribute(key: str, value: int) -> CredentialBuilder
Adds an integer attribute to the CredentialBuilder.
with_decimal_attribute
def with_decimal_attribute(key: str, value: float) -> CredentialBuilder
Adds a decimal attribute to the CredentialBuilder.
with_boolean_attribute
def with_boolean_attribute(key: str, value: bool) -> CredentialBuilder
Adds a boolean attribute to the CredentialBuilder.
with_date_attribute
def with_date_attribute(key: str, value: datetime.date) -> CredentialBuilder
Adds a date attribute to the CredentialBuilder.
with_datetime_attribute
def with_datetime_attribute(key: str,
value: datetime.datetime) -> CredentialBuilder
Adds a datetime attribute to the CredentialBuilder.
build
def build() -> CredentialReceipt
Creates and returns a Credential using the specified attributes.