Skip to content

Certificate data model

The Certificate struct is the same logical record whether you read it onchain, send it in JSON to the HTTP API, or encode it as a tuple for mint_certificate.

Field reference

FieldOnchain typeDescription
registration_dateuint256Unix timestamp of registration
delivery_correlativeString[10]Short delivery / batch identifier
participant_namesString[100]Participant first name(s)
participant_last_namesString[100]Participant last name(s)
course_nameString[100]Course title
hours_numberuint256Total course hours
sessions_numberuint256Number of sessions
issuing_institutionString[100]Issuing institution name
image_urlString[256]Image URL for metadata
certificate_urlString[256]PDF or landing page for the credential

JSON (HTTP API)

Request bodies use snake_case keys. Numeric fields may be sent as integers or decimal strings; responses return registration_date, hours_number, and sessions_number as decimal strings for JSON safety.

See Certificate metadata fields in the API reference.

Onchain tuple order

When encoding data_ for mint_certificate, use the table order top to bottom (matches ABI tuple ordering).

Python-style example

python
factory.mint_certificate(
    certificate_address,
    (
        1734567890,
        "DLV-001",
        "John",
        "Doe",
        "EBG Course",
        40,
        10,
        "EBG Academy",
        "https://example.com/img.png",
        "https://example.com/cert.pdf",
    ),
    recipient_address,
)

Collection deployment strings

Factory create_certificate uses separate limits:

ArgumentMax length (chars)
name_25
symbol_5
base_uri_80

Choose base_uri_ so tokenURI aligns with your metadata host (see NFT metadata).

Released under License.