Documentation ¶
Index ¶
- func RandomSigningGroup(size int) []common.Address
- type Chain
- type Signature
- type TBTCLocalChain
- func (lc TBTCLocalChain) Address() common.Address
- func (lc TBTCLocalChain) AuthorizeOperator(operator common.Address)
- func (lc TBTCLocalChain) BalanceMonitor() (chain.BalanceMonitor, error)
- func (lc TBTCLocalChain) BlockCounter() chain.BlockCounter
- func (lc TBTCLocalChain) BlockTimestamp(blockNumber *big.Int) (uint64, error)
- func (lc TBTCLocalChain) CloseKeep(keepAddress common.Address) error
- func (tlc *TBTCLocalChain) CreateDeposit(depositAddress string, signers []common.Address)
- func (tlc *TBTCLocalChain) CurrentState(depositAddress string) (chain.DepositState, error)
- func (tlc *TBTCLocalChain) DepositPubkey(depositAddress string) ([]byte, error)
- func (tlc *TBTCLocalChain) DepositRedemptionFee(depositAddress string) (*big.Int, error)
- func (tlc *TBTCLocalChain) DepositRedemptionProof(depositAddress string) (*TxProof, error)
- func (tlc *TBTCLocalChain) DepositRedemptionSignature(depositAddress string) (*Signature, error)
- func (lc TBTCLocalChain) GetHonestThreshold(keepAddress common.Address) (uint64, error)
- func (lc TBTCLocalChain) GetKeepAtIndex(keepIndex *big.Int) (common.Address, error)
- func (lc TBTCLocalChain) GetKeepCount() (*big.Int, error)
- func (lc TBTCLocalChain) GetMembers(keepAddress common.Address) ([]common.Address, error)
- func (lc TBTCLocalChain) GetOpenedTimestamp(keepAddress common.Address) (time.Time, error)
- func (lc TBTCLocalChain) GetPublicKey(keepAddress common.Address) ([]uint8, error)
- func (tlc *TBTCLocalChain) IncreaseRedemptionFee(depositAddress string, previousOutputValueBytes [8]uint8, ...) error
- func (lc TBTCLocalChain) IsActive(keepAddress common.Address) (bool, error)
- func (lc TBTCLocalChain) IsAwaitingSignature(keepAddress common.Address, digest [32]byte) (bool, error)
- func (lc TBTCLocalChain) IsEligibleForApplication(application common.Address) (bool, error)
- func (lc TBTCLocalChain) IsOperatorAuthorized(operator common.Address) (bool, error)
- func (lc TBTCLocalChain) IsRegisteredForApplication(application common.Address) (bool, error)
- func (lc TBTCLocalChain) IsStatusUpToDateForApplication(application common.Address) (bool, error)
- func (tlc *TBTCLocalChain) KeepAddress(depositAddress string) (string, error)
- func (lc TBTCLocalChain) LatestDigest(keepAddress common.Address) ([32]byte, error)
- func (tlc *TBTCLocalChain) Logger() *localChainLogger
- func (lc TBTCLocalChain) OnBondedECDSAKeepCreated(handler func(event *eth.BondedECDSAKeepCreatedEvent)) subscription.EventSubscription
- func (lc TBTCLocalChain) OnConflictingPublicKeySubmitted(keepAddress common.Address, ...) (subscription.EventSubscription, error)
- func (tlc *TBTCLocalChain) OnDepositCreated(handler func(depositAddress string)) (subscription.EventSubscription, error)
- func (tlc *TBTCLocalChain) OnDepositGotRedemptionSignature(handler func(depositAddress string)) (subscription.EventSubscription, error)
- func (tlc *TBTCLocalChain) OnDepositRedeemed(handler func(depositAddress string)) (subscription.EventSubscription, error)
- func (tlc *TBTCLocalChain) OnDepositRedemptionRequested(handler func(depositAddress string)) (subscription.EventSubscription, error)
- func (tlc *TBTCLocalChain) OnDepositRegisteredPubkey(handler func(depositAddress string)) (subscription.EventSubscription, error)
- func (lc TBTCLocalChain) OnKeepClosed(keepAddress common.Address, handler func(event *eth.KeepClosedEvent)) (subscription.EventSubscription, error)
- func (lc TBTCLocalChain) OnKeepTerminated(keepAddress common.Address, handler func(event *eth.KeepTerminatedEvent)) (subscription.EventSubscription, error)
- func (lc TBTCLocalChain) OnPublicKeyPublished(keepAddress common.Address, handler func(event *eth.PublicKeyPublishedEvent)) (subscription.EventSubscription, error)
- func (lc TBTCLocalChain) OnSignatureRequested(keepAddress common.Address, handler func(event *eth.SignatureRequestedEvent)) (subscription.EventSubscription, error)
- func (lc TBTCLocalChain) OpenKeep(keepAddress common.Address, members []common.Address)
- func (tlc *TBTCLocalChain) PastDepositRedemptionRequestedEvents(startBlock uint64, depositAddress string) ([]*chain.DepositRedemptionRequestedEvent, error)
- func (lc TBTCLocalChain) PastSignatureSubmittedEvents(keepAddress string, startBlock uint64) ([]*eth.SignatureSubmittedEvent, error)
- func (tlc *TBTCLocalChain) ProvideRedemptionProof(depositAddress string, txVersion [4]uint8, txInputVector []uint8, ...) error
- func (tlc *TBTCLocalChain) ProvideRedemptionSignature(depositAddress string, v uint8, r [32]uint8, s [32]uint8) error
- func (tlc *TBTCLocalChain) RedeemDeposit(depositAddress string) error
- func (lc TBTCLocalChain) RegisterAsMemberCandidate(application common.Address) error
- func (tlc *TBTCLocalChain) RetrieveSignerPubkey(depositAddress string) error
- func (tlc *TBTCLocalChain) SetAlwaysFailingTransactions(transactions ...string)
- func (lc TBTCLocalChain) SignatureRequestedBlock(keepAddress common.Address, digest [32]byte) (uint64, error)
- func (lc TBTCLocalChain) Signing() chain.Signing
- func (lc TBTCLocalChain) StakeMonitor() (chain.StakeMonitor, error)
- func (lc TBTCLocalChain) SubmitKeepPublicKey(keepAddress common.Address, publicKey [64]byte) error
- func (lc TBTCLocalChain) SubmitSignature(keepAddress common.Address, signature *ecdsa.Signature) error
- func (lc TBTCLocalChain) TerminateKeep(keepAddress common.Address) error
- func (lc TBTCLocalChain) UpdateStatusForApplication(application common.Address) error
- type TxProof
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomSigningGroup ¶ added in v1.5.0
Types ¶
type Chain ¶
type Chain interface { eth.Handle OpenKeep(keepAddress common.Address, members []common.Address) CloseKeep(keepAddress common.Address) error TerminateKeep(keepAddress common.Address) error AuthorizeOperator(operatorAddress common.Address) }
Chain is an extention of eth.Handle interface which exposes additional functions useful for testing.
type TBTCLocalChain ¶ added in v1.5.0
type TBTCLocalChain struct {
// contains filtered or unexported fields
}
func NewTBTCLocalChain ¶ added in v1.5.0
func NewTBTCLocalChain(ctx context.Context) *TBTCLocalChain
func (TBTCLocalChain) AuthorizeOperator ¶ added in v1.5.0
func (TBTCLocalChain) BalanceMonitor ¶ added in v1.5.0
func (lc TBTCLocalChain) BalanceMonitor() (chain.BalanceMonitor, error)
func (TBTCLocalChain) BlockCounter ¶ added in v1.5.0
func (lc TBTCLocalChain) BlockCounter() chain.BlockCounter
func (TBTCLocalChain) BlockTimestamp ¶ added in v1.5.0
func (*TBTCLocalChain) CreateDeposit ¶ added in v1.5.0
func (tlc *TBTCLocalChain) CreateDeposit( depositAddress string, signers []common.Address, )
func (*TBTCLocalChain) CurrentState ¶ added in v1.5.0
func (tlc *TBTCLocalChain) CurrentState( depositAddress string, ) (chain.DepositState, error)
func (*TBTCLocalChain) DepositPubkey ¶ added in v1.5.0
func (tlc *TBTCLocalChain) DepositPubkey( depositAddress string, ) ([]byte, error)
func (*TBTCLocalChain) DepositRedemptionFee ¶ added in v1.5.0
func (tlc *TBTCLocalChain) DepositRedemptionFee( depositAddress string, ) (*big.Int, error)
func (*TBTCLocalChain) DepositRedemptionProof ¶ added in v1.5.0
func (tlc *TBTCLocalChain) DepositRedemptionProof( depositAddress string, ) (*TxProof, error)
func (*TBTCLocalChain) DepositRedemptionSignature ¶ added in v1.5.0
func (tlc *TBTCLocalChain) DepositRedemptionSignature( depositAddress string, ) (*Signature, error)
func (TBTCLocalChain) GetHonestThreshold ¶ added in v1.5.0
func (TBTCLocalChain) GetKeepAtIndex ¶ added in v1.5.0
func (TBTCLocalChain) GetKeepCount ¶ added in v1.5.0
func (TBTCLocalChain) GetMembers ¶ added in v1.5.0
func (TBTCLocalChain) GetOpenedTimestamp ¶ added in v1.5.0
func (TBTCLocalChain) GetPublicKey ¶ added in v1.5.0
func (*TBTCLocalChain) IncreaseRedemptionFee ¶ added in v1.5.0
func (tlc *TBTCLocalChain) IncreaseRedemptionFee( depositAddress string, previousOutputValueBytes [8]uint8, newOutputValueBytes [8]uint8, ) error
func (TBTCLocalChain) IsActive ¶ added in v1.5.0
IsActive checks for current state of a keep on-chain.
func (TBTCLocalChain) IsAwaitingSignature ¶ added in v1.5.0
func (lc TBTCLocalChain) 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 (TBTCLocalChain) IsEligibleForApplication ¶ added in v1.5.0
func (TBTCLocalChain) IsOperatorAuthorized ¶ added in v1.5.0
func (TBTCLocalChain) IsRegisteredForApplication ¶ added in v1.5.0
func (TBTCLocalChain) IsStatusUpToDateForApplication ¶ added in v1.5.0
func (*TBTCLocalChain) KeepAddress ¶ added in v1.5.0
func (tlc *TBTCLocalChain) KeepAddress(depositAddress string) (string, error)
func (TBTCLocalChain) LatestDigest ¶ added in v1.5.0
func (*TBTCLocalChain) Logger ¶ added in v1.5.0
func (tlc *TBTCLocalChain) Logger() *localChainLogger
func (TBTCLocalChain) OnBondedECDSAKeepCreated ¶ added in v1.5.0
func (lc TBTCLocalChain) OnBondedECDSAKeepCreated( handler func(event *eth.BondedECDSAKeepCreatedEvent), ) subscription.EventSubscription
OnBondedECDSAKeepCreated is a callback that is invoked when an on-chain notification of a new ECDSA keep creation is seen.
func (TBTCLocalChain) OnConflictingPublicKeySubmitted ¶ added in v1.5.0
func (lc TBTCLocalChain) OnConflictingPublicKeySubmitted( keepAddress common.Address, handler func(event *eth.ConflictingPublicKeySubmittedEvent), ) (subscription.EventSubscription, error)
func (*TBTCLocalChain) OnDepositCreated ¶ added in v1.5.0
func (tlc *TBTCLocalChain) OnDepositCreated( handler func(depositAddress string), ) (subscription.EventSubscription, error)
func (*TBTCLocalChain) OnDepositGotRedemptionSignature ¶ added in v1.5.0
func (tlc *TBTCLocalChain) OnDepositGotRedemptionSignature( handler func(depositAddress string), ) (subscription.EventSubscription, error)
func (*TBTCLocalChain) OnDepositRedeemed ¶ added in v1.5.0
func (tlc *TBTCLocalChain) OnDepositRedeemed( handler func(depositAddress string), ) (subscription.EventSubscription, error)
func (*TBTCLocalChain) OnDepositRedemptionRequested ¶ added in v1.5.0
func (tlc *TBTCLocalChain) OnDepositRedemptionRequested( handler func(depositAddress string), ) (subscription.EventSubscription, error)
func (*TBTCLocalChain) OnDepositRegisteredPubkey ¶ added in v1.5.0
func (tlc *TBTCLocalChain) OnDepositRegisteredPubkey( handler func(depositAddress string), ) (subscription.EventSubscription, error)
func (TBTCLocalChain) OnKeepClosed ¶ added in v1.5.0
func (lc TBTCLocalChain) OnKeepClosed( keepAddress common.Address, handler func(event *eth.KeepClosedEvent), ) (subscription.EventSubscription, error)
func (TBTCLocalChain) OnKeepTerminated ¶ added in v1.5.0
func (lc TBTCLocalChain) OnKeepTerminated( keepAddress common.Address, handler func(event *eth.KeepTerminatedEvent), ) (subscription.EventSubscription, error)
func (TBTCLocalChain) OnPublicKeyPublished ¶ added in v1.5.0
func (lc TBTCLocalChain) OnPublicKeyPublished( keepAddress common.Address, handler func(event *eth.PublicKeyPublishedEvent), ) (subscription.EventSubscription, error)
func (TBTCLocalChain) OnSignatureRequested ¶ added in v1.5.0
func (lc TBTCLocalChain) OnSignatureRequested( keepAddress common.Address, handler func(event *eth.SignatureRequestedEvent), ) (subscription.EventSubscription, error)
OnSignatureRequested is a callback that is invoked on-chain when a keep's signature is requested.
func (*TBTCLocalChain) PastDepositRedemptionRequestedEvents ¶ added in v1.5.0
func (tlc *TBTCLocalChain) PastDepositRedemptionRequestedEvents( startBlock uint64, depositAddress string, ) ([]*chain.DepositRedemptionRequestedEvent, error)
func (TBTCLocalChain) PastSignatureSubmittedEvents ¶ added in v1.5.0
func (lc TBTCLocalChain) PastSignatureSubmittedEvents( keepAddress string, startBlock uint64, ) ([]*eth.SignatureSubmittedEvent, error)
func (*TBTCLocalChain) ProvideRedemptionProof ¶ added in v1.5.0
func (*TBTCLocalChain) ProvideRedemptionSignature ¶ added in v1.5.0
func (*TBTCLocalChain) RedeemDeposit ¶ added in v1.5.0
func (tlc *TBTCLocalChain) RedeemDeposit(depositAddress string) error
func (TBTCLocalChain) RegisterAsMemberCandidate ¶ added in v1.5.0
RegisterAsMemberCandidate registers client as a candidate to be selected to a keep.
func (*TBTCLocalChain) RetrieveSignerPubkey ¶ added in v1.5.0
func (tlc *TBTCLocalChain) RetrieveSignerPubkey(depositAddress string) error
func (*TBTCLocalChain) SetAlwaysFailingTransactions ¶ added in v1.5.0
func (tlc *TBTCLocalChain) SetAlwaysFailingTransactions(transactions ...string)
func (TBTCLocalChain) SignatureRequestedBlock ¶ added in v1.5.0
func (TBTCLocalChain) StakeMonitor ¶ added in v1.5.0
func (lc TBTCLocalChain) StakeMonitor() (chain.StakeMonitor, error)
func (TBTCLocalChain) SubmitKeepPublicKey ¶ added in v1.5.0
func (lc TBTCLocalChain) SubmitKeepPublicKey( keepAddress common.Address, publicKey [64]byte, ) error
SubmitKeepPublicKey checks if public key has been already submitted for given keep address, if not it stores the key in a map.
func (TBTCLocalChain) SubmitSignature ¶ added in v1.5.0
func (lc TBTCLocalChain) SubmitSignature( keepAddress common.Address, signature *ecdsa.Signature, ) error
SubmitSignature submits a signature to a keep contract deployed under a given address.