contracts_release
Closes an active escrow contract, either completing the deal normally or terminating it by burning all escrowed coins.
This call is made by side A (normally the buyer). It signs and broadcasts one of the release templates prepared when the contract was accepted. The contract must be in state 2 (contract accepted) or state 5 (cancel proposal sent) — releasing from state 5 overrides a cancellation request that side B has not accepted yet.
Request
{
"jsonrpc": "2.0",
"id": 0,
"method": "contracts_release",
"params": {
"contract_id": "b6f2c3d18e47a05b9c2d4e6f81a30b57cd94e2f16a8b0c37d5e19f4a2b6c08d3",
"release_type": "REL_N"
}
}
Request parameters
- contract_id - string; hex-encoded identifier of the contract being closed, as reported by
contracts_get_all. - release_type - string; how the escrowed coins are to be disposed of. Only two values are accepted:
REL_N— normal release. The deal is treated as successfully completed:to_paygoes to side B and both pledges are returned to their owners. The contract moves to state3(contract released normally).REL_B— burn release. The deal is terminated: the payment and both pledges are destroyed and nobody receives anything back. The contract moves to state4(contract released burned). This is the punitive option used when the parties cannot reach agreement; it is irreversible.
Any other value is rejected with an error. The fee for this transaction is not passed here — it was reserved inside the escrow template as b_fee when the proposal was sent.
Response
{
"id": 0,
"jsonrpc": "2.0",
"result": {}
}
Response information
The result object is empty. A successful call means the release transaction was fully signed and broadcast; failures are reported as a JSON-RPC error. Poll contracts_get_all to see the contract settle into state 3 or 4.