Documentation ¶
Index ¶
- type BridgeClientInterface
- type Client
- func (c *Client) ClaimProof(networkID uint32, depositCount uint32, l1InfoTreeIndex uint32) (*types.ClaimProof, error)
- func (c *Client) GetSponsoredClaimStatus(globalIndex *big.Int) (claimsponsor.ClaimStatus, error)
- func (c *Client) InjectedInfoAfterIndex(networkID uint32, l1InfoTreeIndex uint32) (*l1infotreesync.L1InfoTreeLeaf, error)
- func (c *Client) L1InfoTreeIndexForBridge(networkID uint32, depositCount uint32) (uint32, error)
- func (c *Client) SponsorClaim(claim claimsponsor.Claim) error
- type ClientFactory
- type ClientFactoryInterface
- type ClientInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BridgeClientInterface ¶
type BridgeClientInterface interface { L1InfoTreeIndexForBridge(networkID uint32, depositCount uint32) (uint32, error) InjectedInfoAfterIndex(networkID uint32, l1InfoTreeIndex uint32) (*l1infotreesync.L1InfoTreeLeaf, error) ClaimProof(networkID uint32, depositCount uint32, l1InfoTreeIndex uint32) (*types.ClaimProof, error) SponsorClaim(claim claimsponsor.Claim) error GetSponsoredClaimStatus(globalIndex *big.Int) (claimsponsor.ClaimStatus, error) }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps all the available endpoints of the data abailability committee node server
func (*Client) ClaimProof ¶
func (c *Client) ClaimProof(networkID uint32, depositCount uint32, l1InfoTreeIndex uint32) (*types.ClaimProof, error)
ClaimProof returns the proofs needed to claim a bridge. NetworkID and depositCount refere to the bridge origin while globalExitRoot should be already injected on the destination network. This call needs to be done to a client of the same network were the bridge tx was sent
func (*Client) GetSponsoredClaimStatus ¶
func (c *Client) GetSponsoredClaimStatus(globalIndex *big.Int) (claimsponsor.ClaimStatus, error)
GetSponsoredClaimStatus returns the status of a claim that has been previously requested to be sponsored. This call needs to be done to the same client were it was requested to be sponsored
func (*Client) InjectedInfoAfterIndex ¶
func (c *Client) InjectedInfoAfterIndex( networkID uint32, l1InfoTreeIndex uint32, ) (*l1infotreesync.L1InfoTreeLeaf, error)
InjectedInfoAfterIndex return the first GER injected onto the network that is linked to the given index or greater. This call is useful to understand when a bridge is ready to be claimed on its destination network
func (*Client) L1InfoTreeIndexForBridge ¶
L1InfoTreeIndexForBridge returns the first L1 Info Tree index in which the bridge was included. networkID represents the origin network. This call needs to be done to a client of the same network were the bridge tx was sent
func (*Client) SponsorClaim ¶
func (c *Client) SponsorClaim(claim claimsponsor.Claim) error
SponsorClaim sends a claim tx on behalf of the user. This call needs to be done to a client of the same network were the claim is going to be sent (bridge destination)
type ClientFactory ¶
type ClientFactory struct{}
ClientFactory is the implementation of the data committee client factory
func (*ClientFactory) NewClient ¶
func (f *ClientFactory) NewClient(url string) ClientInterface
NewClient returns an implementation of the data committee node client
type ClientFactoryInterface ¶
type ClientFactoryInterface interface {
NewClient(url string) ClientInterface
}
ClientFactoryInterface interface for the client factory
type ClientInterface ¶
type ClientInterface interface { BridgeClientInterface }
ClientInterface is the interface that defines the implementation of all the endpoints