Skip to main content

Transactions

Terminal endpoint of the write flow. Once the transaction returned by any POST /contract/... has been signed off-chain, it is sent to the blockchain using this endpoint.

sendSignedTransaction​

POST /api/v1/transactions/send

Receives the signed transaction and propagates it to the network. Returns the tx_hash and, if available, the receipt.

Body​

{
"signedRawTransaction": "0x01f9034c8281310e820fa0834c4b40..."
}
FieldTypeRequiredDescription
signedRawTransactionstringyesHex-encoded signed transaction (includes prefix 0x01 for EIP-2930, 0x02 for EIP-1559, etc.). This is the output of wallet.signTransaction(tx) in ethers.js, signed.raw_transaction.hex() in eth_account, or the equivalent command used to sign the raw transaction returned by the API.

Responses​

200 OK — Transaction mined​

{
"tx_hash": "0xb508e46adfc36822e48dde1d9f1f5d2122a1ce6852cf5e0afe6c978da04648c5",
"receipt": {
"_type": "TransactionReceipt",
"blockHash": "0x52afb6108087cdca826289da40cc7339a4e190922f8480afd924c0ddd9d31109",
"blockNumber": 3907283,
"contractAddress": null,
"cumulativeGasUsed": "221678",
"from": "0xAe0E493C67f75381b0954644836A3C16c79D0dFD",
"to": "0x00000000000000000000000000000000000015Be",
"gasUsed": "221678",
"hash": "0xb508e46adfc36822e48dde1d9f1f5d2122a1ce6852cf5e0afe6c978da04648c5",
"index": 0,
"logs": [
{
"_type": "log",
"address": "0x00000000000000000000000000000000000015Be",
"topics": ["0x78c431540f7778eb787241a03d7401cd2c95ddb232c918f172f86e4c804d5439"],
"blockNumber": 3907283
}
],
"status": 1
}
}

206 Partial Content — Transaction sent, receipt not available​

{
"tx_hash": "0xb508e46adfc36822e48dde1d9f1f5d2122a1ce6852cf5e0afe6c978da04648c5",
"receipt": null
}

The tx_hash is already valid. You can query the status later with an explorer or by retrying the DID resolution.

400 Bad Request​

Common causes:

  • The signature is incorrect (private key differs from the from EOA).
  • The nonce is obsolete (another transaction was sent in the meantime).
  • The EOA does not have funds to cover the gas.

500 Internal Server Error​

Generic API or blockchain network error.

Receipt status​

statusMeaning
1Transaction executed successfully. The change was reflected on-chain.
0Transaction executed but the contract reverted. The change was NOT applied. Review the authorization of from and the arguments.

Log Interpretation​

Log topics identify the emitted event. Some relevant ones:

topics[0]Event
0x78c431540f7778eb787241a03d7401cd2c95ddb232c918f172f86e4c804d5439VerificationMethodAdded
0xd43d365fd1f319ea103c6daa06d0ee46f5b3f535985f3313a9b5b6da774da67cVerificationRelationshipAdded

The full list of events is documented in the DID registry repository (isbe-identity-did-lib).

Example​

curl -X POST "https://did-registry.portal.redisbe.com/api/v1/transactions/send" \
-H "Content-Type: application/json" \
-d '{"signedRawTransaction": "0x01f9034c8281310e820fa0834c4b40..."}'
Retry after 206

If you receive a 206, wait ~5 seconds and query the DID with GET /api/v1/identifiers/{identifier}. If the change is already reflected, the transaction was mined successfully.