From 4ce1e62d09ce177d545992946dae27f6f85a5e6a Mon Sep 17 00:00:00 2001 From: kenshin-samourai Date: Sat, 4 Jul 2020 17:37:26 +0200 Subject: [PATCH] complete pushtx docs --- doc/POST_pushtx.md | 5 +++-- doc/POST_pushtx_schedule.md | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/doc/POST_pushtx.md b/doc/POST_pushtx.md index e0ed61e..aa6de56 100644 --- a/doc/POST_pushtx.md +++ b/doc/POST_pushtx.md @@ -39,12 +39,13 @@ Status code 400 with JSON response: "error": "" } ``` -or + +or status code 200 with JSON response: ```json { "status": "error", "error": { - "message": [vouts], + "message": [], "code": "VIOLATION_STRICT_MODE_VOUTS" } } diff --git a/doc/POST_pushtx_schedule.md b/doc/POST_pushtx_schedule.md index 69d56b1..5ea4a55 100644 --- a/doc/POST_pushtx_schedule.md +++ b/doc/POST_pushtx_schedule.md @@ -29,6 +29,7 @@ If step A and step B have the same **hop** value, then they MAY HAVE different * The transaction MUST HAVE its nLockTime field filled with the height of a block. The height of the block MUST BE equal to the value of the **nlocktime** field of the ScriptStep object. +* **strict_mode_vouts** (optional) - `int[]` - An array of outpoints indices. A strict verification is enforced on these outpoints before the transaction is pushed. Strict mode checks that addresses associated to these outputs aren't reused. If verifications fail, the scheduled push is aborted and an error is returned. ### Examples @@ -45,7 +46,8 @@ Request Body (JSON-encoded) "script": [{ "hop": 0, "nlocktime": 549817, - "tx": "" + "tx": "", + "strict_mode_vouts": [0,1] }, { "hop": 1, "nlocktime": 549818, @@ -122,3 +124,18 @@ Status code 400 with JSON response: "error": "" } ``` + +or status code 200 with JSON response: +```json +{ + "status": "error", + "error": { + "message": [{ + "txid": "", + "hop": , + "vouts": [] + }, ...], + "code": "VIOLATION_STRICT_MODE_VOUTS" + } +} +```