Documentation ¶
Index ¶
- Constants
- type BridgeClientInterface
- type BridgeEndpoints
- func (b *BridgeEndpoints) ClaimProof(networkID uint32, depositCount uint32, l1InfoTreeIndex uint32) (interface{}, rpc.Error)
- func (b *BridgeEndpoints) GetSponsoredClaimStatus(globalIndex *big.Int) (interface{}, rpc.Error)
- func (b *BridgeEndpoints) InjectedInfoAfterIndex(networkID uint32, l1InfoTreeIndex uint32) (interface{}, rpc.Error)
- func (b *BridgeEndpoints) L1InfoTreeIndexForBridge(networkID uint32, depositCount uint32) (interface{}, rpc.Error)
- func (b *BridgeEndpoints) SponsorClaim(claim claimsponsor.Claim) (interface{}, rpc.Error)
- type ClaimProof
- type Client
- func (c *Client) ClaimProof(networkID uint32, depositCount uint32, l1InfoTreeIndex uint32) (*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 ¶
const (
// BRIDGE is the namespace of the bridge service
BRIDGE = "bridge"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BridgeClientInterface ¶ added in v0.1.0
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) (*ClaimProof, error) SponsorClaim(claim claimsponsor.Claim) error GetSponsoredClaimStatus(globalIndex *big.Int) (claimsponsor.ClaimStatus, error) }
type BridgeEndpoints ¶
type BridgeEndpoints struct {
// contains filtered or unexported fields
}
BridgeEndpoints contains implementations for the "bridge" RPC endpoints
func NewBridgeEndpoints ¶
func NewBridgeEndpoints( logger *log.Logger, writeTimeout time.Duration, readTimeout time.Duration, networkID uint32, sponsor *claimsponsor.ClaimSponsor, l1InfoTree *l1infotreesync.L1InfoTreeSync, l1Bridge2Index *l1bridge2infoindexsync.L1Bridge2InfoIndexSync, injectedGERs *lastgersync.LastGERSync, bridgeL1 *bridgesync.BridgeSync, bridgeL2 *bridgesync.BridgeSync, ) *BridgeEndpoints
NewBridgeEndpoints returns InteropEndpoints
func (*BridgeEndpoints) ClaimProof ¶
func (b *BridgeEndpoints) ClaimProof( networkID uint32, depositCount uint32, l1InfoTreeIndex uint32, ) (interface{}, rpc.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 (*BridgeEndpoints) GetSponsoredClaimStatus ¶
func (b *BridgeEndpoints) GetSponsoredClaimStatus(globalIndex *big.Int) (interface{}, rpc.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 (*BridgeEndpoints) InjectedInfoAfterIndex ¶
func (b *BridgeEndpoints) InjectedInfoAfterIndex(networkID uint32, l1InfoTreeIndex uint32) (interface{}, rpc.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 (*BridgeEndpoints) L1InfoTreeIndexForBridge ¶
func (b *BridgeEndpoints) L1InfoTreeIndexForBridge(networkID uint32, depositCount uint32) (interface{}, rpc.Error)
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 (*BridgeEndpoints) SponsorClaim ¶
func (b *BridgeEndpoints) SponsorClaim(claim claimsponsor.Claim) (interface{}, rpc.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 ClaimProof ¶ added in v0.1.0
type ClaimProof struct { ProofLocalExitRoot [32]common.Hash ProofRollupExitRoot [32]common.Hash L1InfoTreeLeaf l1infotreesync.L1InfoTreeLeaf }
type Client ¶ added in v0.1.0
type Client struct {
// contains filtered or unexported fields
}
Client wraps all the available endpoints of the data abailability committee node server
func (*Client) ClaimProof ¶ added in v0.1.0
func (c *Client) ClaimProof(networkID uint32, depositCount uint32, l1InfoTreeIndex uint32) (*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 ¶ added in v0.1.0
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 ¶ added in v0.1.0
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 ¶ added in v0.1.0
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 ¶ added in v0.1.0
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 ¶ added in v0.1.0
type ClientFactory struct{}
ClientFactory is the implementation of the data committee client factory
func (*ClientFactory) NewClient ¶ added in v0.1.0
func (f *ClientFactory) NewClient(url string) ClientInterface
NewClient returns an implementation of the data committee node client
type ClientFactoryInterface ¶ added in v0.1.0
type ClientFactoryInterface interface {
NewClient(url string) ClientInterface
}
ClientFactoryInterface interface for the client factory
type ClientInterface ¶ added in v0.1.0
type ClientInterface interface { BridgeClientInterface }
ClientInterface is the interface that defines the implementation of all the endpoints