This document provides detailed instructions for implementing the Pre-Inscribed Launchpad API, covering the steps required to create a launchpad and make offers.
1. Creating a Pre-Inscribed Launchpad
Overview
The Pre-Inscribed Launchpad API enables you to create and manage pre-inscribed launchpads for pre inscribed inscriptions.
Here is a sequence of API calls for creating a Launchpad:
Implementation Steps
Step 1: Create Launchpad
Make an API call to create a new Pre-Inscribed Launchpad:
POST https://api.ordinalsbot.com/marketplace/launchpads/create
Request body:
{
"slug": "satoshibles-the-ordinals",
"makerPaymentAddress": "2N6ZePLQrKtix9bJBfznsykxKX1XtirnbKL",
"makerPaymentPublicKey": "033528dc4c9fd062e63d2a8d5f8b2e3c3b8312ae7c1d3c4a41a9dc4eefa4205c05",
"makerOrdinalAddress": "bc1q...",
"makerOrdinalPublicKey": "e581edf3a948470930171a3e676490a8f7953a3698044c14b4d75ffeabc88a26",
"data": [
{
"id": "8e7ba76e0c06ff5f43f50371bce849ae4e88dd36e1c0629e1a6f4383d1b0e679i0",
"meta": {
"attributes": [
{
"trait_type": "background",
"value": "orange"
}
],
"name": "Satoshibles: The Ordinals #1"
}
}
],
"meta": {
"description": "Satoshi has come home to Bitcoin! The Ordinals collection by OG NFT project Satoshibles are a limited edition collection of 100 ordinals, featuring all new traits from the original artist Ayyoub Bouzerda. This collection is a tribute to Satoshi and the enduring legacy of Bitcoin. Don't miss your chance to own a piece of history!",
"discord_link": "https://discord.com/invite/7Wm9Jg8MkW",
"icon": "https://turbo.ordinalswallet.com/inscription/preview/3542f12dbe5fe3bd7fd622d1bb54994432e9a9184d24ff62ceb83234383b558ei0",
"inscription_icon": "https://example.com/icon.png",
"name": "Satoshibles: The Ordinals",
"slug": "satoshibles-the-ordinals",
"twitter_link": "https://twitter.com/satoshibles",
"website_link": "https://satoshibles.com",
"banner_image": "https://example.com/banner.png"
},
"phases": [
{
"name": "Whitelist Sale",
"startDate": 1712044800,
"endDate": 1712131200,
"price": 100000,
"isPublic": false,
"allowList": [
{
"address": "bc1q...",
"allocation": 5
}
]
}
]
}
Response:
{
"launchpadId": 123
}
Step 2: Monitor Launchpad Status by calling launchpad info endpoint /launchpads/{id}
Poll the Launchpad info API until the launchpad status changes:
"initializing": Lanchpad creation has started and still in progress
"pending_psbt_signature": All inscriptions processed and all PSBTs ready for requires signature
"active": No pending PSBTs to sign
"failed": Creation process failed failed_reason will have reason for failure
GET https://api.ordinalsbot.com/marketplace/launchpads/{id}
Poll launchpad info till the status changes to "pending_psbt_signature", this indicates that all inscriptions have been processed. A set of PSBTs have been created and need to be signed.
Step 4: Fetch PSBT Details
Use the psbt id for each PSBT object from launchpad if. Call the /marketplace/launchpads/psbt/{id} API endpoint to fetch PSBT details for each psbt id:
GET https://api.ordinalsbot.com/marketplace/launchpads/psbt/{id}