Skip to main content

What you need

  • Solana wallet with some SOL for transaction fees
  • Know how to sign transactions with your wallet

Step 1: Check the API is up

curl -X GET https://api.zcombinator.io/health
Expected response:
{
  "status": "healthy",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "environment": {
    "hasRPC": true,
    "hasConfig": true,
    "hasDB": true
  }
}

Step 2: Create your token

Send your token details to get an unsigned transaction:
const launchData = {
  name: "My Token",
  symbol: "MTK",
  description: "A test token for demonstration",
  image: "https://example.com/token-image.png",
  website: "https://example.com",
  twitter: "https://twitter.com/mytoken",
  caEnding: "MTK", // Optional: vanity address ending
  payerPublicKey: "YOUR_WALLET_PUBLIC_KEY",
  quoteToken: "SOL" // Optional: "SOL" (default) or "ZC" (native launchpad token)
};

const response = await fetch('https://api.zcombinator.io/launch', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(launchData)
});

const result = await response.json();

Step 3: Sign it

We give you back an unsigned transaction. Sign it with your wallet:
import { Transaction } from '@solana/web3.js';
import bs58 from 'bs58';

// Deserialize the transaction
const transactionBuffer = bs58.decode(result.transaction);
const transaction = Transaction.from(transactionBuffer);

// Sign with your wallet (example using Phantom)
const signedTransaction = await window.solana.signTransaction(transaction);
const signedTransactionBase58 = bs58.encode(signedTransaction.serialize());

Step 4: Send it back

Send the signed transaction back to us and we’ll put it on Solana:
const confirmData = {
  signedTransaction: signedTransactionBase58,
  baseMint: result.baseMint,
  metadataUrl: result.metadataUrl,
  name: "My Token",
  symbol: "MTK",
  payerPublicKey: "YOUR_WALLET_PUBLIC_KEY"
};

const confirmResponse = await fetch('https://api.zcombinator.io/confirm-launch', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(confirmData)
});

const confirmResult = await confirmResponse.json();
console.log('Token launched!', confirmResult.transactionSignature);

Step 5: Check it worked

const verifyResponse = await fetch(`https://api.zcombinator.io/verify-token/${confirmResult.baseMint}`);
const verification = await verifyResponse.json();

if (verification.exists) {
  console.log('Token launched!');
} else {
  console.log('Something went wrong');
}

What’s next

I