Sign and Broadcast Transaction

To complete any operation on Monad, sign the unsigned transaction provided by the Staking API and broadcast it to the network.

1. Prepare the transaction

Retrieve an unsignedTransaction object from the relevant API endpoint, e.g., /stakes/delegations, /stakes/undelegations, /stakes/withdrawals, /stakes/compound-rewards, /stakes/claim-rewards.

2. Sign the transaction

Use the P2P Signer SDK to sign the unsigned data following protocol specific configuration.

3. Send the transaction

Broadcast the signed transaction to the Monad network by sending a POST request to /api/v2/monad/{network}/transactions.

Example request (for testnet network):

curl --request POST \
     --url https://api-test.p2p.org/api/v2/monad/testnet/transactions \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <token>' \
     --header 'content-type: application/json' \
     --data '
{
  "signedTransaction": "0x02f8758301e24004..."
}
'
  • signedTransaction — signed transaction in the hexadecimal format which needs to be broadcasted to the network.

Example response:

{
  "result": {
    "transactionHash": "0xdef456...789abc",
    "broadcastedAt": "2025-05-06T10:40:00.000Z"
  },
  "error": {}
}
  • transactionHash — hash of the transaction.
  • broadcastedAt — timestamp of the transaction in the ISO 8601 format.

What's next?