Skip to main content
POST
/
BuildMintTransaction
JavaScript
import { setOnchainKitConfig } from '@coinbase/onchainkit';
import { buildMintTransaction } from '@coinbase/onchainkit/api';

const response = await buildMintTransaction({
  mintAddress: '0x...',
  takerAddress: '0x...',
  tokenId: '1',
  quantity: 1,
  network: 'networks/base-mainnet',
});
{
  "call_data": {
    "from": "0x...",
    "to": "0x...",
    "data": "0x...",
    "value": "0x000000000001"
  }
}

Documentation Index

Fetch the complete documentation index at: https://base-a060aa97-pat-schemav2-docs.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The buildMintTransaction function is used to get an unsigned transaction for minting an NFT. Before using them, make sure to obtain a Client API Key from Coinbase Developer Platform.

Returns

Promise<BuildMintTransactionResponse>

Parameters

BuildMintTransactionParams

Types

Body

application/json
mintAddress
string
required

The NFT contract address to mint from

Example:

"0x123..."

takerAddress
string
required

The address of the NFT recipient

Example:

"0x456..."

tokenId
string
required

The token ID of the NFT to be minted

Example:

"1"

quantity
integer
required

The number of NFTs to mint

Example:

1

network
string
required

The network to mint on

Example:

"networks/base-mainnet"

Response

200 - application/json

Successful response

call_data
object