Passer au contenu principal
POST
/
v1
/
wallets
/
{walletId}
/
contracts
/
write
/
sign
Master Wallet Write Sign-Only
curl --request POST \
  --url https://api.blockradar.co/v1/wallets/{walletId}/contracts/write/sign \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "calls": [
    {
      "abi": [
        {
          "constant": false,
          "inputs": [
            {
              "name": "_to",
              "type": "address"
            },
            {
              "name": "_value",
              "type": "uint256"
            }
          ],
          "name": "transfer",
          "outputs": [],
          "payable": false,
          "stateMutability": "nonpayable",
          "type": "function"
        }
      ],
      "address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
      "method": "transfer",
      "parameters": [
        "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
        "10000"
      ]
    },
    {
      "abi": [
        {
          "constant": false,
          "inputs": [
            {
              "name": "_to",
              "type": "address"
            },
            {
              "name": "_value",
              "type": "uint256"
            }
          ],
          "name": "transfer",
          "outputs": [],
          "payable": false,
          "stateMutability": "nonpayable",
          "type": "function"
        }
      ],
      "address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
      "method": "transfer",
      "parameters": [
        "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
        "10000"
      ]
    }
  ]
}
'
{
"data": {
"amlScreening": {},
"amount": null,
"amountPaid": null,
"amountUSD": "0.00",
"asset": null,
"assetSwept": null,
"assetSweptAmount": null,
"assetSweptAt": null,
"assetSweptGasFee": null,
"assetSweptHash": null,
"assetSweptRecipientAddress": null,
"assetSweptSenderAddress": null,
"blockHash": null,
"blockNumber": null,
"blockchain": {
"createdAt": "2024-05-27T14:31:14.966Z",
"derivationPath": "m/44'/60'/0'/0",
"id": "74733889-4ecd-403e-9840-94e87c043f24",
"isActive": true,
"isEvmCompatible": true,
"isL2": true,
"name": "base",
"slug": "base",
"symbol": "eth",
"tokenStandard": null,
"updatedAt": "2024-11-26T20:04:13.945Z"
},
"chainId": null,
"confirmations": null,
"confirmed": true,
"createdAt": "2025-08-11T22:21:56.077Z",
"currency": "USD",
"fee": null,
"feeHash": null,
"gasFee": null,
"gasPrice": null,
"gasUsed": null,
"hash": "0x229d811ef34a9f12454e89f12e06945dfc8122538a0af6369ec3f2a2f9aa8cbb",
"id": "fe2d8c39-a6ba-41cb-99e7-05c4dcee6c94",
"metadata": null,
"network": "testnet",
"note": null,
"rate": null,
"rateUSD": "0.00",
"reason": "{\"method\":\"transfer\",\"parameters\":[\"0x451dEFC27B45808078e875556AF06bCFdC697BA4\",\"10000\"],\"abi\":{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}}",
"recipientAddress": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"reference": "xvLz7CIFoD",
"senderAddress": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"signedTransaction": "0xf8ab3e83124fc08301623d94036cbd53842c5426634e7929541ec2318f3dcf7e80b844a9059cbb000000000000000000000000451defc27b45808078e875556af06bcfdc697ba400000000000000000000000000000000000000000000000000000000000027108302948ca0c86783ba50374a959907d9174c2a0b5cd3a87d55336e6c9a6420fde0dd07303ea019a93dad742a9bed4c6d1f514f7fe26777e8f17fe090967a9719afddaa281d64",
"status": "SUCCESS",
"toAmount": null,
"toCurrency": null,
"tokenAddress": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"type": "SIGNED",
"updatedAt": "2025-08-11T22:21:56.077Z",
"wallet": {
"address": "0x947514e4B803e312C312da0F1B41fEDdbe15ae7a",
"configurations": null,
"createdAt": "2024-08-22T16:05:46.167Z",
"derivationPath": "m/44'/60'/0'/0/0",
"description": "This is Base wallet",
"id": "e17dea25-6c01-4b3a-a4ae-51f411bf69cd",
"isActive": true,
"name": "Base Wallet",
"network": "testnet",
"status": "ACTIVE",
"updatedAt": "2024-08-22T16:05:46.167Z"
}
},
"message": "Contract write signed successfully",
"statusCode": 200
}

Batch Operations

This endpoint supports batch operations, allowing you to sign multiple contract write operations without broadcasting them. This is useful for offline signing or preparing transactions for later submission.

Batch Request Format

To sign multiple transactions, use the calls array:
{
  "calls": [
    {
      "address": "0xTokenContract...",
      "method": "approve",
      "parameters": ["0xSpender...", "1000000000000000000"],
      "abi": [...],
      "reference": "approve-tx"
    },
    {
      "address": "0xProtocolContract...",
      "method": "deposit",
      "parameters": ["1000000000000000000"],
      "abi": [...],
      "reference": "deposit-tx"
    }
  ],
  "code": "123456"
}

Batch Response Format

Returns signed transactions without broadcasting:
{
  "message": "Batch contract write signed successfully",
  "statusCode": 200,
  "data": {
    "success": [
      { "index": 0, "method": "approve", "signedTransaction": "0x..." },
      { "index": 1, "method": "deposit", "signedTransaction": "0x..." }
    ],
    "errors": []
  }
}

Validation Rules

RuleValue
Max batch size20 operations
Min batch size1 operation
2FA requiredYes

Use Cases

  • Offline signing: Sign transactions for later broadcast
  • Transaction preparation: Prepare multiple transactions in advance
  • Multi-signature workflows: Generate signed payloads for multi-sig wallets

Autorisations

x-api-key
string
header
requis

Paramètres de chemin

walletId
string
requis
Exemple:

"YOUR_WALLET_ID"

Corps

application/json
calls
object[]
Exemple:
[
{
"abi": [
{
"constant": false,
"inputs": [
{ "name": "_to", "type": "address" },
{ "name": "_value", "type": "uint256" }
],
"name": "transfer",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"method": "transfer",
"parameters": [
"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"10000"
]
},
{
"abi": [
{
"constant": false,
"inputs": [
{ "name": "_to", "type": "address" },
{ "name": "_value", "type": "uint256" }
],
"name": "transfer",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"address": "0x337610d27c682E347C9cD60BD4b3b107C9d34dDd",
"method": "transfer",
"parameters": [
"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
"10000"
]
}
]

Réponse

200 - application/json

Ethereum / Tron / Ethereum (Batch) / Tron (Batch)

data
object
message
string
Exemple:

"Contract write signed successfully"

statusCode
number
Exemple:

200