POST
/
BuildMintTransaction
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"
  }
}

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

Response

200 - application/json

Successful response

The response is of type object.