docs/api: Add setaltsig details.
This commit is contained in:
parent
b868b828f1
commit
fc1357aa38
35
docs/api.md
35
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": {"<Copy of request body>"}
|
||||
}
|
||||
```
|
||||
|
||||
#### Step One
|
||||
|
||||
Request fee amount and address for a ticket. The fee amount is only valid until
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user