Mint Endpoint
Mint new deeds with associated metadata and outputs.
Endpoint
POST /v1/mint
Purpose
Create (mint) a new deed. This request records the hashes of the output secrets, which are later used to validate swap requests.
Request Body
{
"metadata": "Funding deed for project Alpha",
"outputs": ["+100.PLACEHOLDER.mysecret"]
}
Parameters
-
metadata
(optional)- Type: string
- Constraints: Minimum length of 1 and maximum length of 1000 characters.
- Description: Optional metadata to associate with the deed.
-
outputs
(required)- Type: array of strings
- Format: Each string should follow the format:
+[[amount]].[[itemID placeholder]].[[secret]]
- Example:
+100.PLACEHOLDER.mysecret
- Note: The
PLACEHOLDER
text will be replaced by the actual deed ID generated by webdeeds.org in the response.
Response
Success Response (200 OK)
{
"itemId": "deed_2samLx0gNPgbb6o3JxKMSWSzz3E",
"outputs": ["+100.deed_2samLx0gNPgbb6o3JxKMSWSzz3E.mysecret"]
}
Parameters
-
itemId
- Type: string
- Description: The unique identifier of the minted deed.
-
outputs
- Type: array of strings
- Description: The outputs provided with the placeholder replaced by the actual deed ID.
Error Response (400 Bad Request)
Returned if the request body is missing required fields or does not conform to the expected format.
Example
Request
{
"metadata": "Funding deed for project Alpha",
"outputs": ["+100.PLACEHOLDER.mysecret"]
}
Response
{
"itemId": "deed_2samLx0gNPgbb6o3JxKMSWSzz3E",
"outputs": ["+100.deed_2samLx0gNPgbb6o3JxKMSWSzz3E.mysecret"]
}