Skip to main content
POST
/
prepare-transactions
Prepare Transactions
curl --request POST \
  --url https://api.sandbox.brickken.com/prepare-transactions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "method": "newTokenization",
  "signerAddress": "0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8b",
  "chainId": "aa36a7",
  "tokenizerEmail": "tokenizer@example.com",
  "name": "Example Token",
  "tokenSymbol": "EXMPL",
  "tokenType": "EQUITY",
  "supplyCap": "1000000",
  "url": "https://example.com/token-docs",
  "preMints": [
    {
      "amount": "1000"
    }
  ],
  "initialHolders": [
    {
      "walletAddress": "0x1111111111111111111111111111111111111111"
    }
  ]
}
'
{
  "transactions": [
    {
      "from": "0x1234567890abcdef1234567890abcdef12345678",
      "to": "0xabcdef1234567890abcdef1234567890abcdef12",
      "value": "0x00",
      "nonce": 3792,
      "chainId": 11155111,
      "data": "0xd362e8a70000000000000000000000000000000000000000000000000000000000000040...",
      "type": 2,
      "maxPriorityFeePerGas": "1150000",
      "maxFeePerGas": "1156037",
      "gasLimit": "0xccef"
    }
  ],
  "txId": "0x46adea7bdf49c576a760102e0d6bc9ecd650b3998588cd3d7f576a7973426aad",
  "info": {
    "tokenizerEmail": "tokenizer@example.com",
    "tokenSymbol": "EXMPL",
    "investorEmail": "investor@example.com"
  }
}
Prepares unsigned transactions for various blockchain operations. This endpoint supports multiple transaction methods for tokenization, STO management, token operations, and more.

Common Parameters

ParameterTypeRequiredDescription
chainIdstringYesBlockchain network identifier (hex format)
methodstringYesTransaction method type
signerAddressstringConditionalAddress that will sign the transaction. Most methods require it; newInvest and claimTokens can use investorAddress as the signer.

Supported Methods

MethodDescription
newTokenizationCreate a new tokenized asset.
mintTokenMint tokens to one or more investors.
whitelistWhitelist or blacklist investor wallets.
burnTokenBurn tokens from the signer balance.
transferFromTransfer tokens from an approved owner address.
transferToTransfer tokens from the signer address.
approveApprove token spending.
dividendDistributionDistribute payment-token dividends.
newStoCreate a Security Token Offering.
newInvestPrepare an STO investment.
claimTokensClaim tokens from a successful STO.
closeOfferClose an active STO.

Response Format

The response includes the transaction details, metadata, and a unique transaction ID that must be saved for use with the /send-transactions endpoint. Important: The txId is NOT a blockchain transaction hash - it’s an internal identifier used to link the prepared transactions with the send operation.

Response Fields

FieldTypeDescription
transactionsarrayArray of unsigned transaction objects ready for signing
infoobjectMetadata about the operation including emails and token symbol
txIdstringUnique identifier for this transaction batch (required for /send-transactions)
Next Steps:
  1. Sign each transaction in the transactions array
  2. Submit the signed transactions along with the txId to /send-transactions

Authorizations

x-api-key
string
header
required

Body

application/json
method
enum<string>
required

The operation to be performed. Includes standard tokenization methods and x402-eligible agentic methods. Agentic methods can also be addressed through /x402/... facade endpoints, where the method is derived from the path. newTokenizedAgent remains a legacy alias for direct /prepare-transactions calls and is not listed in x402scan discovery.

Available options:
newTokenization,
newSto,
newInvest,
claimTokens,
mintToken,
whitelist,
approve,
burnToken,
transferFrom,
transferTo,
dividendDistribution,
closeOffer,
newTokenizedAgent,
agentRegister,
agentSetURI,
agentSetMetadata,
agentSetWallet,
agentGiveFeedback,
agentRevokeFeedback,
agentAppendFeedbackResponse,
agentCreateToken,
agentMintToken,
agentBurnToken,
agentTransferToken,
agentTransferFromToken,
agentApproveToken
Example:

"newTokenization"

chainId
string
required

Required. Blockchain network identifier. Hex format is recommended, for example Sepolia aa36a7.

Example:

"aa36a7"

signerAddress
string

Optional. Wallet address that will sign the prepared transaction. If omitted, the API uses investorAddress for this method.

Example:

"0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8b"

tokenSymbol
string

Required. Token symbol. Must be 2 to 5 uppercase letters or numbers.

Example:

"EXMPL"

tokenType
enum<string>

Optional. Token type. Defaults to EQUITY when omitted.

Available options:
EQUITY,
DEBT,
BILL_FACTORING,
ICO,
STABLECOIN,
REVENUE_SHARE,
RWA_TOKEN,
PROFIT_SHARING
Example:

"EQUITY"

tokenizerEmail
string<email>

Optional. Tokenizer email. Required for newTokenization, newSto, and closeOffer.

Example:

"tokenizer@example.com"

acceptedCoin
string

Required. Accepted payment token symbol.

Example:

"USDT"

amount
string

Optional. Amount used by approve, burnToken, transferFrom, transferTo, and dividendDistribution.

Example:

"100"

endDate
string<date-time>

Required. STO end date.

Example:

"2026-12-31T23:59:59.000Z"

from
string

Optional. Source address required by transferFrom.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x1111111111111111111111111111111111111111"

gasLimit
string

Optional. Gas limit override. If omitted, the API estimates gas automatically.

Example:

"2000000"

initialHolders
object[]

Optional. Initial holders paired by index with preMints. Provide walletAddress directly, or email when a DFNS wallet can be resolved.

Example:
[
{
"walletAddress": "0x1111111111111111111111111111111111111111"
}
]
investmentAmount
string

Required. Payment-token amount to invest.

Example:

"1000"

investorAddress
string

Optional. Investor wallet address. Required for newInvest and claimTokens; optional for approve payment-token owner scope.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x1111111111111111111111111111111111111111"

investorEmail
string<email>

Optional. Investor email. Required for newInvest, claimTokens, burnToken, and each whitelist/mint recipient.

Example:

"investor@example.com"

maxInvestment
string

Required. Maximum investment amount.

Example:

"10000"

maxRaiseUSD
string

Required. Maximum raise amount in USD.

Example:

"100000"

minInvestment
string

Required. Minimum investment amount.

Example:

"100"

minRaiseUSD
string

Required. Minimum raise amount in USD.

Example:

"10000"

name
string

Required. Name of the tokenized asset.

Example:

"Example Token"

newInvestor
object

Optional. Default profile data used when creating missing investor users.

offeringName
string

Required. Name of the STO offering.

Example:

"Series A"

paymentTokenSymbol
string

Optional. Payment token symbol used by newInvest. If omitted, the chain default payment token is used.

Example:

"USDT"

preMints
object[]

Optional. Pre-mint amounts. If provided, initialHolders must also be provided with the same length.

Example:
[{ "amount": "1000" }]
privateRpcUrl
string

Optional. Private RPC URL override. If omitted, the API uses the configured RPC for chainId.

Example:

"https://rpc.example.com"

spenderAddress
string

Optional. Spender address required by approve.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x3333333333333333333333333333333333333333"

startDate
string<date-time>

Required. STO start date.

Example:

"2026-09-01T00:00:00.000Z"

supplyCap
string

Optional. Maximum token supply. Defaults to 0 when omitted.

Example:

"1000000"

to
string

Optional. Destination address required by transferFrom and transferTo.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x2222222222222222222222222222222222222222"

tokenAmount
string

Required. Number of tokens offered in the STO.

Example:

"1000"

tokenizerAddress
string

Optional. Tokenizer wallet address used by tokenization setup flows when provided.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x4444444444444444444444444444444444444444"

url
string

Optional. Token documentation URL. Defaults to an empty string when omitted.

Example:

"https://example.com/token-docs"

userToMint
object[]

Required. Users to mint tokens to.

Minimum array length: 1
Example:
[
{
"investorEmail": "investor@example.com",
"investorAddress": "0x1111111111111111111111111111111111111111",
"amount": "100",
"needWhitelist": true
}
]
userToWhitelist
object[]

Required. Users to whitelist or blacklist.

Minimum array length: 1
Example:
[
{
"investorAddress": "0x1111111111111111111111111111111111111111",
"investorEmail": "investor@example.com",
"whitelistStatus": true
}
]
ownerEmail
string

Tokenizer owner email used by agentic methods.

Example:

"owner@example.com"

email
string

Tracking email used by feedback and agent token methods.

Example:

"reviewer@example.com"

services
object[]

Agent service descriptors used by agentRegister.

metadata
object

Agent metadata stored in the registration file.

aiModelName
string

AI model name for agent registration or metadata updates.

Example:

"gpt-4o"

aiModelProvider
string

AI model provider stored in the agent profile.

Example:

"openai"

agentUuid
string

Internal tokenized agent UUID returned by agentRegister.

agentId

On-chain ERC-8004 agent ID.

metadataKey
string

Metadata key used by agentSetMetadata.

Example:

"modelName"

metadataValue
any

Metadata value used by agentSetMetadata.

metadataEncoding
enum<string>

Encoding mode for agentSetMetadata.

Available options:
string,
json,
hex
newWallet
string

Agent wallet assigned by agentSetWallet.

signature
string

Hex signature used by agentSetWallet.

deadline

Signature deadline used by agentSetWallet.

feedbackIndex

Feedback index used by reputation methods.

clientAddress
string

Reviewer/client address used by agentAppendFeedbackResponse.

responseURI
string

Off-chain response URI used by agentAppendFeedbackResponse.

feedbackURI
string

Off-chain feedback URI used by agentGiveFeedback.

feedbackHash
string

Optional 32-byte content hash for feedback.

responseHash
string

Optional 32-byte content hash for a feedback response.

agentWallet
string

Operational agent wallet used by agentCreateToken.

symbol
string

Agent token symbol used by agentCreateToken.

Example:

"MAT"

premint
string

Human-readable premint amount used by agentCreateToken.

decimals
number

Agent token decimals. Defaults to 18.

tokenAddress
string

Deployed agent token address used by agentMintToken and agentBurnToken.

x402Support
boolean

Whether the registered agent declares x402 support in its profile.

active
boolean

Whether the registered agent should appear active.

nonce
integer

Optional. Nonce override. If omitted, the API reads the pending nonce from the RPC.

Example:

12

paymentTokenAddress
string

Optional. Payment token contract address override. If omitted, the chain default payment token is used.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x5555555555555555555555555555555555555555"

Response

Successful response

transactions
object[]
required

Array of unsigned transaction objects ready for signing

txId
string
required

Unique identifier for this transaction batch (required for /send-transactions). This is NOT a blockchain transaction hash.

Example:

"0x46adea7bdf49c576a760102e0d6bc9ecd650b3998588cd3d7f576a7973426aad"

info
object

Metadata about the operation