ar.io Logoar.io Documentation
ar.io SDKANT Contracts

Spawn

ANT.spawn()

Static factory that mints a new MPL Core asset and initializes the ario-ant PDAs in a single transaction. Returns { processId, mint, signature }.

import { ANT } from '@ar.io/sdk';

const { processId, signature } = await ANT.spawn({
  rpc,
  rpcSubscriptions,
  signer,
  state: {
    name: 'My ANT',
    ticker: 'MYANT',
    description: 'My ANT token',
    uri: 'ar://\<metadata-tx-id\>',
  },
});

CLI Usage:

ar.io spawn-ant \
  --wallet-file wallet.json \
  --name "My ANT" \
  --ticker "MYANT" \
  --metadata-uri "ar://\<metadata-tx-id\>"

Parameters:

  • state.name: string — display name of the ANT
  • state.ticker?: string — ticker symbol
  • state.description?: string — short description
  • state.uri: stringar:// URI of the Metaplex Core asset's JSON metadata. Build via buildAntMetadata from @ar.io/sdk and upload to Arweave (e.g. via @ardrive/turbo-sdk).
  • state.keywords?: string[]
  • state.logo?: string — Arweave TX ID of the logo
  • state.transactionId?: string — initial @ record target

Returns:

{
  processId: string;  // the MPL Core asset mint pubkey
  mint: Address;
  signature: string;  // the Solana tx signature
}

How is this guide?

On this page