api

package
v0.0.0-...-131be4c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCommissioner

func RegisterCommissioner(server *otohttp.Server, commissioner Commissioner)

Types

type CastVoteRequest

type CastVoteRequest struct {
	Election   string `json:"election"`
	Voter      string `json:"voter"`
	SigningKey Key    `json:"signingKey"`
	Candidate  string `json:"candidate"`
}

type CastVoteResponse

type CastVoteResponse struct {
	ID    string `json:"id"`
	Error string `json:"error,omitempty"`
}

type CreateElectionRequest

type CreateElectionRequest struct {
}

type CreateElectionResponse

type CreateElectionResponse struct {
	ID              string `json:"id"`
	PolicyID        string `json:"policyID"`
	VerificationKey Key    `json:"verificationKey"`
	Error           string `json:"error,omitempty"`
}

type CreateMinterRequest

type CreateMinterRequest struct {
	SigningKey      Key    `json:"signingKey"`
	VerificationKey Key    `json:"verificationKey"`
	Address         string `json:"address"`
}

type CreateMinterResponse

type CreateMinterResponse struct {
	ID    string `json:"id"`
	Error string `json:"error,omitempty"`
}

type CreateVoterRequest

type CreateVoterRequest struct {
}

type CreateVoterResponse

type CreateVoterResponse struct {
	SigningKey      Key    `json:"signingKey"`
	VerificationKey Key    `json:"verificationKey"`
	Address         string `json:"address"`
	Error           string `json:"error,omitempty"`
}

type Key

type Key struct {
	Type        string `json:"type"`
	Description string `json:"description"`
	CborHex     string `json:"cborHex"`
}

type MintVoteRequest

type MintVoteRequest struct {
	Election string `json:"election"`
	Voter    string `json:"voter"`
	Minter   string `json:"minter"`
}

type MintVoteResponse

type MintVoteResponse struct {
	ID    string `json:"id"`
	Asset string `json:"asset"`
	Error string `json:"error,omitempty"`
}

type QueryAddressRequest

type QueryAddressRequest struct {
	Address string `json:"address"`
}

type QueryAddressResponse

type QueryAddressResponse struct {
	UnspentTransactions []*UnspentTransaction `json:"unspentTransactions"`
	Error               string                `json:"error,omitempty"`
}

type UnspentTransaction

type UnspentTransaction struct {
	TxHash   string `json:"txHash"`
	TxIx     int    `json:"txIx"`
	Lovelace int    `json:"lovelace"`
	Balance  string `json:"balance"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL