Transaction payload

Use the transaction payload field for application data within standard mempool limits.

With the high-level Wallet API, it is just another accountsSend() request field:

await wallet.accountsSend({
  accountId: account.accountId,
  walletSecret,
  priorityFeeSompi: 0n,
  destination: [{ address: recipient, amount: kaspaToSompi("10") }],
  // arbitrary data can be attached to a transaction
  payload: new TextEncoder().encode("order:1337"),
});

For standard mempool acceptance, the practical limit is about 25 KB if the payload dominates the transaction.

That comes from the transient-mass rule: standard transactions are capped at 100_000, and transient mass is calculated as serialized transaction size times 4.

The exact ceiling is lower once the transaction also includes inputs, outputs, signatures, and other fields, because they all contribute to the same serialized size.

Sources