Skip to content

Send a Transaction

Create, approve, and broadcast a transaction using the Tholos API.

This guide covers the complete transaction flow for Flex vaults — from creating a transfer to confirmation on-chain.

Before creating a transaction, estimate the network fee:

Terminal window
curl -X POST https://api.tholos.app/transaction/estimate-fee \
-H "Authorization: Bearer $THOLOS_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"vaultId": 123,
"chain": "ethereum",
"to": "0xRecipient...",
"amount": "1000000000000000000"
}'
Terminal window
curl -X POST https://api.tholos.app/transaction/transfer \
-H "Authorization: Bearer $THOLOS_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"vaultId": 123,
"chain": "ethereum",
"to": "0xRecipient...",
"amount": "1000000000000000000",
"tokenAddress": null,
"note": "Monthly treasury distribution"
}'

The response includes the new transaction with state DRAFT or SUBMITTED depending on your vault configuration.

Vault signers need to approve the transaction. The approval flow uses an MPC challenge-response.

Get a challenge — the signer requests a challenge for the transaction:

Terminal window
curl https://api.tholos.app/transaction/{txId}/challenge \
-H "Authorization: Bearer $SIGNER_TOKEN"

Approve — the signer submits their approval:

Terminal window
curl -X POST https://api.tholos.app/transaction/{txId}/approve \
-H "Authorization: Bearer $SIGNER_TOKEN"

Repeat until the vault’s approval threshold is met.

Once the threshold number of approvals is reached:

  1. The server automatically signs the transaction using MPC
  2. The signed transaction is broadcast to the blockchain
  3. The state updates to SUCCEEDED when confirmed on-chain
Terminal window
curl https://api.tholos.app/transaction/{txId} \
-H "Authorization: Bearer $THOLOS_API_TOKEN"
Terminal window
curl -X POST https://api.tholos.app/transaction/message \
-H "Authorization: Bearer $THOLOS_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"vaultId": 123,
"chain": "ethereum",
"message": "Hello from Tholos"
}'
Terminal window
curl -X POST https://api.tholos.app/transaction/contract-interaction \
-H "Authorization: Bearer $THOLOS_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"vaultId": 123,
"chain": "ethereum",
"to": "0xContractAddress...",
"data": "0xCalldata...",
"value": "0"
}'
Terminal window
curl -X POST https://api.tholos.app/transaction/erc20-approve \
-H "Authorization: Bearer $THOLOS_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"vaultId": 123,
"chain": "ethereum",
"tokenAddress": "0xTokenAddress...",
"spender": "0xSpenderAddress...",
"amount": "1000000000000000000"
}'

Any signer can reject a pending transaction:

Terminal window
curl -X POST https://api.tholos.app/transaction/{txId}/reject \
-H "Authorization: Bearer $SIGNER_TOKEN"