Links
Comment on page

Post Lore (Markup text)

Post a lore with a signed Message and a Plain text Lore Object
Once you have generated a valid signature or signed Message, it time to post a lore.
Missed how to generate a signed message? Check out the guide below
Posting a lore essentially means Hyype under the hood verifies if the signing wallet owns the token or created the collection contract, and posting with a valid lore type. There can be as many lore types as possible (generally defined at a collection level by specific project teams).
post
https://api.hyy.pe/api/v1
/lore/create-lore
Create Lore

'lore' object breakdown

Here is an overview of what goes inside 'lore'
Field Name
Description
type
String. Valid type of lore being sent. e.g. Backstory or Collector Statement
tokenId
String. Token Id of the NFT e.g. 1003
contractAddress
String. contractAddress contains the Smart Contract Address of the specific collection the token belongs to
loreData
String.loreData is the markup data which builds the content of the lore. Currently supported types are <b>,<p>,<i>,<u>,<br>,<hr>,<h1> to <h6> and <img>
This is how the object would end up looking like
"lore": {
"type": "Backstory",
"tokenId": "227",
"contractAddress": "0xa76ebc37e23bc7f20d62156ad88f2f29bf1e0d3a",
"loreData": "<p><b>Paragraph</b><i>italic <b>italicBold </b> </i> </p> <h1> header1 </h1> <p>para 2</p><h2>header2</h2>"
}
----
Take a look at how you might want to pass the payload via curl:
cURL
curl -X 'POST' \
'https://api.hyy.pe/api/v1/lore/create-lore' \
-H 'accept: application/json' \
-H 'client-id: <YOUR_CLIENT_ID_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"signedMessage": "<signed_messages_goes_here>",
"walletAddress": "<signature_owner_address_goes_here>",
"lore": {
"type": "Backstory",
"tokenId": "227",
"contractAddress": "0xa76ebc37e23bc7f20d62156ad88f2f29bf1e0d3a",
"loreData": "<p><b>Paragraph</b><i>italic <b>italicBold </b> </i> </p> <h1> header1 </h1> <p>para 2</p><h2>header2</h2>"
}
}'

FAQ

What kind of html structures are supported in nested HTML data being passed in payload?
In our existing Iteration, only <b><i> and <u> tags are valid as nested HTML data . Let's visualise what that means
Example
Valid / Invalid
<p>
<b>Paragraph</b>
<i>
italic
<b>italicBold</b>
</i>
</p>
<h1>
header1
</h1>
<p>
para 2
</p>
<h2>
header2
</h2>
✔️
<p>
<p>Paragraph</p>
<h3>
italic
<b>italicBold</b>
</h3>
</p>
<h1>
header1
</h1>
<p>
para 2
</p>
<h2>
header2
</h2>
❌. Now here the data ends up being wrong because of the <h3></h3> tag nesting inside the <p></p> tag in the first section.