eth

package
v0.0.0-...-8af0f92 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisableIdCallData

type DisableIdCallData struct {
	// all in hex format, from js
	Mtp        string
	Id         string
	EthAddress string
	MsgHash    string
	Rsv        string
}

type EthService

type EthService struct {
	SampleContract       *samplecontract.SampleContract
	FullVerifierContract *fullverifiercontract.CheckFullCircuit
	WhitelistContract    *whitelistcontract.Whitelist
	Mimc7Contract        *disableid.DisableId
	Iden3HelpersContract *disableid.DisableId
	DisableIdContract    *disableid.DisableId

	KeyStore struct {
		Path     string
		Password string
	}
	// contains filtered or unexported fields
}

func NewEthService

func NewEthService(url string, ks *keystore.KeyStore, acc *accounts.Account, keystorePath, password string) *EthService

func (*EthService) Account

func (ethSrv *EthService) Account() *accounts.Account

func (*EthService) Client

func (ethSrv *EthService) Client() *ethclient.Client

func (*EthService) DeployDisableIdContract

func (ethSrv *EthService) DeployDisableIdContract(iden3HelpersAddress common.Address) (*common.Address, *types.Transaction, error)

func (*EthService) DeployFullVerifierContract

func (ethSrv *EthService) DeployFullVerifierContract(smRootCommitsAddr, smWhitelistAddr common.Address, idCertifier, idStorer [31]byte) (*common.Address, *types.Transaction, *common.Address, *types.Transaction, error)

func (*EthService) DeployIden3HelpersContract

func (ethSrv *EthService) DeployIden3HelpersContract(mimc7Address common.Address) (*common.Address, *types.Transaction, error)

func (*EthService) DeployMimc7Contract

func (ethSrv *EthService) DeployMimc7Contract() (*common.Address, *types.Transaction, error)

func (*EthService) DeployRootCommitsContract

func (ethSrv *EthService) DeployRootCommitsContract(mimc7Addr common.Address) (*common.Address, *types.Transaction, error)

func (*EthService) DeploySampleContract

func (ethSrv *EthService) DeploySampleContract() (*common.Address, *types.Transaction, error)

func (*EthService) DeployWhitelistContract

func (ethSrv *EthService) DeployWhitelistContract() (*common.Address, *types.Transaction, error)

func (*EthService) DisableIdContractAddress

func (ethSrv *EthService) DisableIdContractAddress() common.Address

func (*EthService) ForwardTxToDisableIdContract

func (ethSrv *EthService) ForwardTxToDisableIdContract(d DisableIdCallData) (*types.Transaction, error)

func (*EthService) ForwardTxToFullVerifierContract

func (ethSrv *EthService) ForwardTxToFullVerifierContract(d FullVerifierCallData) (*types.Transaction, error)

func (*EthService) ForwardTxToSampleContract

func (ethSrv *EthService) ForwardTxToSampleContract(d SampleCallData) (*types.Transaction, error)

func (*EthService) FullVerifierContractAddress

func (ethSrv *EthService) FullVerifierContractAddress() common.Address

func (*EthService) GetAuth

func (ethSrv *EthService) GetAuth() (*bind.TransactOpts, error)

func (*EthService) GetBalance

func (ethSrv *EthService) GetBalance(address common.Address) (*big.Float, error)

func (*EthService) GetIdInWhitelist

func (ethSrv *EthService) GetIdInWhitelist(ethAddr common.Address) (bool, error)

func (*EthService) GetTx

func (ethSrv *EthService) GetTx(txHash common.Hash) (*types.Transaction, *types.Receipt, bool, error)

func (*EthService) Iden3HelpersContractAddress

func (ethSrv *EthService) Iden3HelpersContractAddress() common.Address

func (*EthService) LoadDisableIdContract

func (ethSrv *EthService) LoadDisableIdContract(contractAddr common.Address)

func (*EthService) LoadFullVerifierContract

func (ethSrv *EthService) LoadFullVerifierContract(contractAddr common.Address)

func (*EthService) LoadSampleContract

func (ethSrv *EthService) LoadSampleContract(contractAddr common.Address)

func (*EthService) LoadWhitelistContract

func (ethSrv *EthService) LoadWhitelistContract(contractAddr common.Address)

func (*EthService) Mimc7ContractAddress

func (ethSrv *EthService) Mimc7ContractAddress() common.Address

func (*EthService) SampleContractAddress

func (ethSrv *EthService) SampleContractAddress() common.Address

type FullVerifierCallData

type FullVerifierCallData struct {
	A      [2]string    `json:"a"`
	B      [2][2]string `json:"b"`
	C      [2]string    `json:"c"`
	Inputs [10]string   `json:"inputs"`
}

type SampleCallData

type SampleCallData struct {
	Addr string `json:"addr"`
	Data string `json:"dataHex"`
}

Directories

Path Synopsis
contracts

Jump to

Keyboard shortcuts

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