ethProc

package
v0.1.43 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DbFlags map[string]bool

Functions

func ByteSliceToByte2

func ByteSliceToByte2(x []byte) (rv [2]byte)

func ByteSliceToByte32

func ByteSliceToByte32(x []byte) (rv [32]byte)

func CheckUserIsValid

func CheckUserIsValid(www http.ResponseWriter, req *http.Request, un, pw string) (user_id string, ok bool)

-------------------------------------------------------------------------------------------------------------------------------------------------------------

func ConnectToEthereum

func ConnectToEthereum() (err error)

func DecryptKeyFile

func DecryptKeyFile(keyFile, password string) (*keystore.Key, error)

DecryptKeyFile reads in a key file decrypt it with the password.

func DecryptKeyFileData

func DecryptKeyFileData(data, password string) (*keystore.Key, error)

DecryptKeyFileData takes keyfile data and decrypt it with the password.

func HandleDeleteKey

func HandleDeleteKey(www http.ResponseWriter, req *http.Request)

------------------------------------------------------------------------------------------------------------------------------------------------------------- mux.Handle("/api/key/DeleteKey", http.HandlerFunc(HandleDeleteKey)).AuthRequired().DocTag("<h2>/api/key/DeleteKey").Method("DELETE").Inputs([]*ymux.MuxInput{

func HandleKeyFile

func HandleKeyFile(www http.ResponseWriter, req *http.Request)

------------------------------------------------------------------------------------------------------------------------------------------------------------- {Name: "keyfile_password", Required: true, Label: "Password For Keyfile", MinLen: 1, Type: "s"},

func HandlePrivateKey

func HandlePrivateKey(www http.ResponseWriter, req *http.Request)

-------------------------------------------------------------------------------------------------------------------------------------------------------------

func HandleValidateKey

func HandleValidateKey(www http.ResponseWriter, req *http.Request)

mux.Handle("/api/key/ValidateKey", http.HandlerFunc(HandleValidateKey)).AuthRequired().DocTag("<h2>/api/key/ValidateKey").Method("GET").Inputs([]*ymux.MuxInput{

func RequiredParameters

func RequiredParameters(www http.ResponseWriter, req *http.Request, plist ...interface{}) bool

xyzzy - change params to have names/bool for this so can generate error messages.

func Setup

func Setup(dbf map[string]bool, lfp *os.File, ec *EthConfigData)

-------------------------------------------------------------------------------------------------------------------------------------------------------------

func SetupMux

func SetupMux(mux *ymux.ServeMux)

func SetupRealm

func SetupRealm(r string)

Types

type EthConfigData

type EthConfigData struct {
	ymux.BaseConfigType

	URL_8545        string            `json:"geth_rpc_8545" default:"http://127.0.0.1:7545"`      // example: "http://192.168.0.200:8545".
	ContractAddress map[string]string `json:"ContractAddress"`                                    // Contract names to contract addresses map
	FromAddress     string            `json:"FromAddress"`                                        // Address of account to pull funds from - this is the signing account
	KeyFilePassword string            `json:"key_file_password" default:"$ENV$Key_File_Password"` // Password to access KeyFile
	KeyFile         string            `json:"key_file" default:"$ENV$Key_File"`                   // File name for pub/priv key for Address
	UseEth          string            `json:"UseEth" default:"yes"`                               // Direclty call contract 'yes'

	Client *ethclient.Client `json:"-"` // used in secalling contract

	AccountKey *keystore.Key `json:"-"`
}

Jump to

Keyboard shortcuts

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