SecureVote convenience API API Reference

An API provided for convenient functions via SecureVote. This includes fee-less voting and other such functions. While these operations aren't as trustless as interacting with a chain directly, they do provide very fast verifiability (by checking the txid, etc) and allow for a few features that cannot be done without 3rd parites. APIs exist at

API Endpoint
https://dev.api.secure.vote
Terms of Service: https://secure.vote
Contact: max@secure.vote
Schemes: https
Version: 0.1.0

Paths

Publish an Ed25519 -> Eth delegation (e.g. for onboarding voters from a stellar chain)

POST /sv/light/submitEd25519Delegation

Submit a signed and packed ed25519 delegation for an arbitrary actor to submit to the chain on your behalf

Request Content-Types: application/json
Request Example
{
  "signature": "",
  "publickey": "",
  "packed": ""
}

200 response

400 Bad Request

400 response

Response Content-Types: application/json
Response Example (200 OK)
{
  "txid": "0xdeadbeef1337",
  "from": "string",
  "to": "0xD386456eb1Af15A5918E7ECC57142bB2634bF9B9"
}
Response Example (400 Bad Request)
{
  "error": "Invalid request data."
}

OPTIONS /sv/light/submitEd25519Delegation

200 OK

200 response

Response Content-Types: application/json
Response Headers (200 OK)
Access-Control-Allow-Origin

undefined

string
Access-Control-Allow-Methods

undefined

string
Access-Control-Allow-Credentials

undefined

string
Access-Control-Allow-Headers

undefined

string

Publish a signed vote

POST /sv/light/submitProxyVote

Submit a signed and packed vote for an arbitrary actor to submit to the chain on your behalf

Request Content-Types: application/json
Request Example
{
  "proxyReq": [
    "0x32a28ff5895d200d3a518cc55a6cfdabe18623a29e8fb100a0b29b42a2111687",
    "0x3d8c990c44939c2a619db686542614a5410ee48a217e7e5b0ecec4c1fb50865f",
    "0x1c00000000000000000000000000000000000000000000000000000000000001",
    "0x0000000000000000053970000000000000000000000000000000000000000000",
    "0x4000000000000000000000000000000000000000000000000000000000000000"
  ],
  "extra": "0x",
  "democHash": "0x40e135c54ddfdc99585d5d8e723906ea75e8447ba731ed0679135c084ac8278f",
  "ballotId": "0x0000000000000000053970000000000000000000000000000000000000000000"
}

200 response

400 Bad Request

400 response

Response Content-Types: application/json
Response Example (200 OK)
{
  "address": "0xD386456eb1Af15A5918E7ECC57142bB2634bF9B9",
  "txid": "0xdeadbeef1337"
}
Response Example (400 Bad Request)
{
  "error": "Invalid request data."
}

OPTIONS /sv/light/submitProxyVote

200 OK

200 response

Response Content-Types: application/json
Response Headers (200 OK)
Access-Control-Allow-Origin

undefined

string
Access-Control-Allow-Methods

undefined

string
Access-Control-Allow-Credentials

undefined

string
Access-Control-Allow-Headers

undefined

string

Schema Definitions

EthAddress: string

An Ethereum address

Ed25519DelegationReq: object

An object composed of the ed25519 delegation and metadata about which democracy and subgroup it is for.

signature: HexString
publickey: HexString
packed: HexString
Example
{
  "signature": "",
  "publickey": "",
  "packed": ""
}

Ed25519DelegationResp: object

txid: HexString
from: string
to: EthAddress
Example
{
  "txid": "0xdeadbeef1337",
  "from": "string",
  "to": "0xD386456eb1Af15A5918E7ECC57142bB2634bF9B9"
}

HexString: string

A hex string in Ethereum format ('0x010203aabbcc...')

SubmitProxyVoteResp: object

address: EthAddress
txid: HexString
Example
{
  "address": "0xD386456eb1Af15A5918E7ECC57142bB2634bF9B9",
  "txid": "0xdeadbeef1337"
}

ErrTy: object

error: string
Example
{
  "error": "Invalid request data."
}

ProxyVoteInput: object

An object composed of the signed vote and metadata about which democracy and ballot it is for.

democHash: HexString
proxyReq: ProxyVoteReq
extra: HexString
ballotId: HexString
Example
{
  "proxyReq": [
    "0x32a28ff5895d200d3a518cc55a6cfdabe18623a29e8fb100a0b29b42a2111687",
    "0x3d8c990c44939c2a619db686542614a5410ee48a217e7e5b0ecec4c1fb50865f",
    "0x1c00000000000000000000000000000000000000000000000000000000000001",
    "0x0000000000000000053970000000000000000000000000000000000000000000",
    "0x4000000000000000000000000000000000000000000000000000000000000000"
  ],
  "extra": "0x",
  "democHash": "0x40e135c54ddfdc99585d5d8e723906ea75e8447ba731ed0679135c084ac8278f",
  "ballotId": "0x0000000000000000053970000000000000000000000000000000000000000000"
}

ProxyVoteReq: array

A tuple5 corresponding to the proxyReq object expected for proxy votes.

Example
[
  "'0x0102..1f20' (`r` param)",
  "'0x0102..1f20' (`s` param)",
  "'0x0102..1f20' (`v` param in byte1, 27 unused bytes, `sequenceNumber` last 4 bytes)",
  "'0x0102..1f20' (ballotId as hex)",
  "'0x0102..1f20' (voteData as hex)"
]