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==",
  "chainSlug": "base-sepolia",
  "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"
  },
  "destinationChains": [
    "base-sepolia",
    "bnb-testnet",
    "solana-devnet"
  ],
  "poolType": "meme",
  "userAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "builder": {
    "code": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
    "fee": 50
  },
  "token_referral": "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>"
    },
    "token_layer_id": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
  }
}

Authorizations

Authorization
string
header
required

JWT token or API key

Body

application/json
name
string
required

Token name

Minimum string 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 string 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 string length: 1
Example:

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

chainSlug
enum<string>
required

Blockchain identifier. Supported chains: solana, solana-devnet, arbitrum, base, base-sepolia, avalanche, op-bnb, bnb, bnb-testnet, ethereum, monad, unichain, unichain-testnet, abstract, polygon, zksync, zksync-testnet

Available options:
solana,
solana-devnet,
arbitrum,
base,
base-sepolia,
avalanche,
op-bnb,
bnb,
bnb-testnet,
ethereum,
monad,
unichain,
unichain-testnet,
abstract,
polygon,
zksync,
zksync-testnet
Example:

"base-sepolia"

banner
string

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

Minimum string 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 string length: 1
Example:

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

Optional social media and website links

destinationChains
enum<string>[]

Optional array of destination chain slugs for cross-chain token deployment and migration endpoints. Defaults to [base-sepolia, bnb-testnet, solana-devnet]. The initial chain will be automatically excluded from migration endpoints.

Blockchain identifier. Supported chains: solana, solana-devnet, arbitrum, base, base-sepolia, avalanche, op-bnb, bnb, bnb-testnet, ethereum, monad, unichain, unichain-testnet, abstract, polygon, zksync, zksync-testnet

Available options:
solana,
solana-devnet,
arbitrum,
base,
base-sepolia,
avalanche,
op-bnb,
bnb,
bnb-testnet,
ethereum,
monad,
unichain,
unichain-testnet,
abstract,
polygon,
zksync,
zksync-testnet
Example:
[
"base-sepolia",
"bnb-testnet",
"solana-devnet"
]
poolType
enum<string>

Type of token pool. Defaults to "meme". Maps to: meme=7, startup-preseed=8

Available options:
meme,
startup-preseed,
test
Example:

"meme"

userAddress
string

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

Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"

builder
object

Builder attribution information (optional). Includes address and fee in bps.

token_referral
string

Token referral address for attribution (optional - defaults to zero address). Used to attribute referral fees to a specific address.

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
enum<boolean>
required
Available options:
true,
false
executed
boolean
transactionHash
string
chainId
integer

Numeric chain ID for the transaction

Example:

84532

transaction
object
metadata
object