Skip to main content
POST
/
create-token-transaction
Create new token transaction
curl --request POST \
  --url https://yppncslmsswqydhhgygz.supabase.co/functions/v1/create-token-transaction \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "My Cool Token",
  "symbol": "MCT",
  "description": "A revolutionary new token",
  "image": "https://example.com/logo.png or data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
  "banner": "https://example.com/banner.png or data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
  "video": "https://example.com/promo.mp4 or data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC",
  "links": {
    "website": "https://example.com",
    "twitter": "https://twitter.com/example",
    "youtube": "https://youtube.com/@example",
    "discord": "https://discord.gg/example",
    "telegram": "https://t.me/example"
  },
  "chainSlug": "base-sepolia",
  "userAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "tags": [
    "defi",
    "meme"
  ],
  "type": "coin"
}'
{
  "success": true,
  "executed": true,
  "transactionHash": "<string>",
  "chainId": 84532,
  "transaction": {
    "to": "<string>",
    "data": "<string>",
    "value": "<string>",
    "gasLimit": "<string>"
  },
  "metadata": {
    "tokenUri": "<string>",
    "tokenId": "<string>",
    "name": "<string>",
    "symbol": "<string>",
    "slug": "<string>",
    "description": "<string>",
    "hubUrl": "https://onthrust.com/hub/my-cool-token",
    "addresses": {
      "evm": "<string>",
      "solana": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

JWT token or API key

Body

application/json
name
string
required

Token name

Minimum length: 1
Example:

"My Cool Token"

symbol
string
required

Token symbol (ticker)

Required string length: 1 - 10
Example:

"MCT"

description
string
required

Token description

Minimum length: 1
Example:

"A revolutionary new token"

image
string
required

Token logo image - can be either a URL or base64-encoded image data (data:image/...)

Minimum length: 1
Example:

"https://example.com/logo.png or data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="

chainSlug
enum<string>
required

Blockchain identifier

Available options:
base,
base-sepolia
Example:

"base-sepolia"

banner
string

Banner image - can be either a URL or base64-encoded image data (data:image/...)

Minimum length: 1
Example:

"https://example.com/banner.png or data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="

video
string

Promotional video - can be either a URL or base64-encoded video data (data:video/...)

Minimum length: 1
Example:

"https://example.com/promo.mp4 or data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC"

Optional social media and website links

userAddress
string

User wallet address (optional - if not provided, will use user's Privy wallet from user_wallets table)

Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"

tags
string[]

Optional hashtags/tags for the token

Example:
["defi", "meme"]
type
enum<string>
default:coin

Transaction type (currently only "coin" is supported - placeholder for future integration)

Available options:
coin
Example:

"coin"

Response

Successful response

success
boolean
required
executed
boolean
transactionHash
string
chainId
integer

Numeric chain ID for the transaction

Example:

84532

transaction
object
metadata
object