Documentation
¶
Overview ¶
Package ethereum contains implementation of ethereum chain interface.
Index ¶
- Constants
- func Connect(accountKey *keystore.Key, config *ethereum.Config) (eth.Handle, error)
- type EthereumChain
- func (ec *EthereumChain) Address() common.Address
- func (ec *EthereumChain) BalanceOf(address common.Address) (*big.Int, error)
- func (ec *EthereumChain) BlockCounter() chain.BlockCounter
- func (ec *EthereumChain) HasMinimumStake(address common.Address) (bool, error)
- func (ec *EthereumChain) IsActive(keepAddress common.Address) (bool, error)
- func (ec *EthereumChain) IsAwaitingSignature(keepAddress common.Address, digest [32]byte) (bool, error)
- func (ec *EthereumChain) IsEligibleForApplication(application common.Address) (bool, error)
- func (ec *EthereumChain) IsRegisteredForApplication(application common.Address) (bool, error)
- func (ec *EthereumChain) IsStatusUpToDateForApplication(application common.Address) (bool, error)
- func (ec *EthereumChain) LatestDigest(keepAddress common.Address) ([32]byte, error)
- func (ec *EthereumChain) OnBondedECDSAKeepCreated(handler func(event *eth.BondedECDSAKeepCreatedEvent)) (subscription.EventSubscription, error)
- func (ec *EthereumChain) OnConflictingPublicKeySubmitted(keepAddress common.Address, ...) (subscription.EventSubscription, error)
- func (ec *EthereumChain) OnKeepClosed(keepAddress common.Address, handler func(event *eth.KeepClosedEvent)) (subscription.EventSubscription, error)
- func (ec *EthereumChain) OnKeepTerminated(keepAddress common.Address, handler func(event *eth.KeepTerminatedEvent)) (subscription.EventSubscription, error)
- func (ec *EthereumChain) OnPublicKeyPublished(keepAddress common.Address, handler func(event *eth.PublicKeyPublishedEvent)) (subscription.EventSubscription, error)
- func (ec *EthereumChain) OnSignatureRequested(keepAddress common.Address, handler func(event *eth.SignatureRequestedEvent)) (subscription.EventSubscription, error)
- func (ec *EthereumChain) RegisterAsMemberCandidate(application common.Address) error
- func (ec *EthereumChain) StakeMonitor() (chain.StakeMonitor, error)
- func (ec *EthereumChain) SubmitKeepPublicKey(keepAddress common.Address, publicKey [64]byte) error
- func (ec *EthereumChain) SubmitSignature(keepAddress common.Address, signature *ecdsa.Signature) error
- func (ec *EthereumChain) UpdateStatusForApplication(application common.Address) error
Constants ¶
const (
BondedECDSAKeepFactoryContractName = "BondedECDSAKeepFactory"
)
Definitions of contract names.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EthereumChain ¶
type EthereumChain struct {
// contains filtered or unexported fields
}
EthereumChain is an implementation of ethereum blockchain interface.
func (*EthereumChain) Address ¶
func (ec *EthereumChain) Address() common.Address
Address returns client's ethereum address.
func (*EthereumChain) BlockCounter ¶
func (ec *EthereumChain) BlockCounter() chain.BlockCounter
func (*EthereumChain) HasMinimumStake ¶
func (ec *EthereumChain) HasMinimumStake(address common.Address) (bool, error)
HasMinimumStake returns true if the specified address is staked. False will be returned if not staked. If err != nil then it was not possible to determine if the address is staked or not.
func (*EthereumChain) IsActive ¶
func (ec *EthereumChain) IsActive(keepAddress common.Address) (bool, error)
IsActive checks for current state of a keep on-chain.
func (*EthereumChain) IsAwaitingSignature ¶
func (ec *EthereumChain) IsAwaitingSignature(keepAddress common.Address, digest [32]byte) (bool, error)
IsAwaitingSignature checks if the keep is waiting for a signature to be calculated for the given digest.
func (*EthereumChain) IsEligibleForApplication ¶
func (ec *EthereumChain) IsEligibleForApplication(application common.Address) (bool, error)
func (*EthereumChain) IsRegisteredForApplication ¶
func (ec *EthereumChain) IsRegisteredForApplication(application common.Address) (bool, error)
func (*EthereumChain) IsStatusUpToDateForApplication ¶
func (ec *EthereumChain) IsStatusUpToDateForApplication(application common.Address) (bool, error)
func (*EthereumChain) LatestDigest ¶
func (ec *EthereumChain) LatestDigest(keepAddress common.Address) ([32]byte, error)
func (*EthereumChain) OnBondedECDSAKeepCreated ¶
func (ec *EthereumChain) OnBondedECDSAKeepCreated( handler func(event *eth.BondedECDSAKeepCreatedEvent), ) (subscription.EventSubscription, error)
OnBondedECDSAKeepCreated installs a callback that is invoked when an on-chain notification of a new ECDSA keep creation is seen.
func (*EthereumChain) OnConflictingPublicKeySubmitted ¶
func (ec *EthereumChain) OnConflictingPublicKeySubmitted( keepAddress common.Address, handler func(event *eth.ConflictingPublicKeySubmittedEvent), ) (subscription.EventSubscription, error)
OnConflictingPublicKeySubmitted installs a callback that is invoked when an on-chain notification of a conflicting public key submission is seen.
func (*EthereumChain) OnKeepClosed ¶
func (ec *EthereumChain) OnKeepClosed( keepAddress common.Address, handler func(event *eth.KeepClosedEvent), ) (subscription.EventSubscription, error)
OnKeepClosed installs a callback that is invoked on-chain when keep is closed.
func (*EthereumChain) OnKeepTerminated ¶
func (ec *EthereumChain) OnKeepTerminated( keepAddress common.Address, handler func(event *eth.KeepTerminatedEvent), ) (subscription.EventSubscription, error)
OnKeepTerminated installs a callback that is invoked on-chain when keep is terminated.
func (*EthereumChain) OnPublicKeyPublished ¶
func (ec *EthereumChain) OnPublicKeyPublished( keepAddress common.Address, handler func(event *eth.PublicKeyPublishedEvent), ) (subscription.EventSubscription, error)
OnPublicKeyPublished installs a callback that is invoked when an on-chain event of a published public key was emitted.
func (*EthereumChain) OnSignatureRequested ¶
func (ec *EthereumChain) OnSignatureRequested( keepAddress common.Address, handler func(event *eth.SignatureRequestedEvent), ) (subscription.EventSubscription, error)
OnSignatureRequested installs a callback that is invoked on-chain when a keep's signature is requested.
func (*EthereumChain) RegisterAsMemberCandidate ¶
func (ec *EthereumChain) RegisterAsMemberCandidate(application common.Address) error
RegisterAsMemberCandidate registers client as a candidate to be selected to a keep.
func (*EthereumChain) StakeMonitor ¶
func (ec *EthereumChain) StakeMonitor() (chain.StakeMonitor, error)
func (*EthereumChain) SubmitKeepPublicKey ¶
func (ec *EthereumChain) SubmitKeepPublicKey( keepAddress common.Address, publicKey [64]byte, ) error
SubmitKeepPublicKey submits a public key to a keep contract deployed under a given address.
func (*EthereumChain) SubmitSignature ¶
func (ec *EthereumChain) SubmitSignature( keepAddress common.Address, signature *ecdsa.Signature, ) error
SubmitSignature submits a signature to a keep contract deployed under a given address.
func (*EthereumChain) UpdateStatusForApplication ¶
func (ec *EthereumChain) UpdateStatusForApplication(application common.Address) error