eth

package
v0.0.0-...-f4f6315 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePostRequest

func CreatePostRequest(url string, command []byte) string

CreatePostRequest create a http POST request to a host with a command body.

func Reverse

func Reverse(s string) string

Types

type EtherConfig

type EtherConfig struct {
	//Geth RPC endpoint url that we can use to connect to
	EndpointURL string `toml:"geth_rpc_endpoint_url"`
	//Ethereum Account address that is used to send transaction
	//This account should have enough gas to spent on transaction
	//format: hex string
	AccountAddress string `toml:"eth_account_address"`
	//Ethereum contract address that we will send transaction to
	//format: hex string
	TrusternityContractAddress string `toml:"trusternity_contract_address"`
	// contains filtered or unexported fields
}

A EtherConfig contains configuration values which are read at initialization time from a TOML format configuration file.

type Trusternity

type Trusternity struct {
	// contains filtered or unexported fields
}

A Trusternity object contains all auditing logics using Ethereum. When running CONIKS server with eth parameter, we create a new Trusternity object with configurations regarding the local Ethereum wallet and the RPC server.

func NewTrusternityObject

func NewTrusternityObject(configFile string) *Trusternity

NewTrusternityObject Initialize an Trusternity object

func (*Trusternity) AuditSTR

func (trusternityObject *Trusternity) AuditSTR(epoch uint64) string

AuditSTR query STR from the corresponding account address of the Trusternity object

func (*Trusternity) GetIPName

func (trusternityObject *Trusternity) GetIPName(id, address string) string

GetIPName comment

func (*Trusternity) GetSTR

func (trusternityObject *Trusternity) GetSTR(id string, epoch uint64, address string) string

GetSTR comment

func (*Trusternity) PublishSTR

func (trusternityObject *Trusternity) PublishSTR(str *protocol.DirSTR)

PublishSTR get the latest STR and publish to Ethereum This function should be called periodically after directory update at every Epoch

Jump to

Keyboard shortcuts

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