Appearance
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
| Field | Onchain type | Description |
|---|---|---|
registration_date | uint256 | Unix timestamp of registration |
delivery_correlative | String[10] | Short delivery / batch identifier |
participant_names | String[100] | Participant first name(s) |
participant_last_names | String[100] | Participant last name(s) |
course_name | String[100] | Course title |
hours_number | uint256 | Total course hours |
sessions_number | uint256 | Number of sessions |
issuing_institution | String[100] | Issuing institution name |
image_url | String[256] | Image URL for metadata |
certificate_url | String[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:
| Argument | Max length (chars) |
|---|---|
name_ | 25 |
symbol_ | 5 |
base_uri_ | 80 |
Choose base_uri_ so tokenURI aligns with your metadata host (see NFT metadata).