From fc1357aa384dd58f51ff10bda8146613e8991c97 Mon Sep 17 00:00:00 2001 From: JoeGruff Date: Mon, 28 Jun 2021 14:40:00 +0900 Subject: [PATCH] docs/api: Add setaltsig details. --- docs/api.md | 35 +++++++++++++++++++++++++++++++++- docs/two-way-accountability.md | 3 ++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/docs/api.md b/docs/api.md index 362cf3c..ada7b1d 100644 --- a/docs/api.md +++ b/docs/api.md @@ -41,7 +41,7 @@ when a VSP is closed will result in an error. No request body. Response: - + ```json { "apiversions":[3], @@ -65,6 +65,39 @@ when a VSP is closed will result in an error. **Registering a ticket is a two step process. The VSP will not add a ticket to its voting wallets unless both of these calls have succeeded.** +#### Step Zero (optional) + +Set an alternate signing address for a ticket. The ticket must be valid and will +be transmitted to the network if not found. If set, for all future requests +involving this ticket, the vsp will check that a signature is good for this +address and fallback to the commitment address if not. The address must be valid +for the network and a pay to secp256k1 ECDSA pubkey hash script. The address can +only be set once. Further requests to set a new address will be rejected. + +- `POST /api/v3/setaltsig` + + Request: + + ```json + { + "timestamp":1590509066, + "tickethash":"1b9f5dc3b4872c47f66b148b0633647458123d72a0f0623a90890cc51a668737", + "tickethex":"0100000001a8...bfa6e4bf9c5ec1", + "parenthex":"0100000022a7...580771a3064710", + "altsigaddress":"Tsfkn6k9AoYgVZRV6ZzcgmuVSgCdJQt9JY2" + } + + ``` + + Response: + + ```json + { + "timestamp":1590509066, + "request": {""} + } + ``` + #### Step One Request fee amount and address for a ticket. The fee amount is only valid until diff --git a/docs/two-way-accountability.md b/docs/two-way-accountability.md index 53e5dff..acde130 100644 --- a/docs/two-way-accountability.md +++ b/docs/two-way-accountability.md @@ -10,7 +10,8 @@ are signed by with a private key known only by the server. Every client request which references a ticket should include a HTTP header `VSP-Client-Signature`. The value of this header must be a signature of the -request body, signed with the commitment address of the referenced ticket. +request body, signed with the commitment address of the referenced ticket, or +the alternate signature address if set. ### Client Accountability Example