Documentation ¶
Index ¶
- Variables
- type AggLayerClient
- func (c *AggLayerClient) GetCertificateHeader(certificateHash common.Hash) (*CertificateHeader, error)
- func (c *AggLayerClient) GetEpochConfiguration() (*ClockConfiguration, error)
- func (c *AggLayerClient) GetLatestKnownCertificateHeader(networkID uint32) (*CertificateHeader, error)
- func (c *AggLayerClient) SendCertificate(certificate *SignedCertificate) (common.Hash, error)
- func (c *AggLayerClient) SendTx(signedTx SignedTx) (common.Hash, error)
- func (c *AggLayerClient) WaitTxToBeMined(hash common.Hash, ctx context.Context) error
- type AggLayerClientGetEpochConfiguration
- type AgglayerClientInterface
- type AgglayerClientMock
- func (_m *AgglayerClientMock) EXPECT() *AgglayerClientMock_Expecter
- func (_m *AgglayerClientMock) GetCertificateHeader(certificateHash common.Hash) (*CertificateHeader, error)
- func (_m *AgglayerClientMock) GetEpochConfiguration() (*ClockConfiguration, error)
- func (_m *AgglayerClientMock) GetLatestKnownCertificateHeader(networkID uint32) (*CertificateHeader, error)
- func (_m *AgglayerClientMock) SendCertificate(certificate *SignedCertificate) (common.Hash, error)
- func (_m *AgglayerClientMock) SendTx(signedTx SignedTx) (common.Hash, error)
- func (_m *AgglayerClientMock) WaitTxToBeMined(hash common.Hash, ctx context.Context) error
- type AgglayerClientMock_Expecter
- func (_e *AgglayerClientMock_Expecter) GetCertificateHeader(certificateHash interface{}) *AgglayerClientMock_GetCertificateHeader_Call
- func (_e *AgglayerClientMock_Expecter) GetEpochConfiguration() *AgglayerClientMock_GetEpochConfiguration_Call
- func (_e *AgglayerClientMock_Expecter) GetLatestKnownCertificateHeader(networkID interface{}) *AgglayerClientMock_GetLatestKnownCertificateHeader_Call
- func (_e *AgglayerClientMock_Expecter) SendCertificate(certificate interface{}) *AgglayerClientMock_SendCertificate_Call
- func (_e *AgglayerClientMock_Expecter) SendTx(signedTx interface{}) *AgglayerClientMock_SendTx_Call
- func (_e *AgglayerClientMock_Expecter) WaitTxToBeMined(hash interface{}, ctx interface{}) *AgglayerClientMock_WaitTxToBeMined_Call
- type AgglayerClientMock_GetCertificateHeader_Call
- func (_c *AgglayerClientMock_GetCertificateHeader_Call) Return(_a0 *CertificateHeader, _a1 error) *AgglayerClientMock_GetCertificateHeader_Call
- func (_c *AgglayerClientMock_GetCertificateHeader_Call) Run(run func(certificateHash common.Hash)) *AgglayerClientMock_GetCertificateHeader_Call
- func (_c *AgglayerClientMock_GetCertificateHeader_Call) RunAndReturn(run func(common.Hash) (*CertificateHeader, error)) *AgglayerClientMock_GetCertificateHeader_Call
- type AgglayerClientMock_GetEpochConfiguration_Call
- func (_c *AgglayerClientMock_GetEpochConfiguration_Call) Return(_a0 *ClockConfiguration, _a1 error) *AgglayerClientMock_GetEpochConfiguration_Call
- func (_c *AgglayerClientMock_GetEpochConfiguration_Call) Run(run func()) *AgglayerClientMock_GetEpochConfiguration_Call
- func (_c *AgglayerClientMock_GetEpochConfiguration_Call) RunAndReturn(run func() (*ClockConfiguration, error)) *AgglayerClientMock_GetEpochConfiguration_Call
- type AgglayerClientMock_GetLatestKnownCertificateHeader_Call
- func (_c *AgglayerClientMock_GetLatestKnownCertificateHeader_Call) Return(_a0 *CertificateHeader, _a1 error) *AgglayerClientMock_GetLatestKnownCertificateHeader_Call
- func (_c *AgglayerClientMock_GetLatestKnownCertificateHeader_Call) Run(run func(networkID uint32)) *AgglayerClientMock_GetLatestKnownCertificateHeader_Call
- func (_c *AgglayerClientMock_GetLatestKnownCertificateHeader_Call) RunAndReturn(run func(uint32) (*CertificateHeader, error)) *AgglayerClientMock_GetLatestKnownCertificateHeader_Call
- type AgglayerClientMock_SendCertificate_Call
- func (_c *AgglayerClientMock_SendCertificate_Call) Return(_a0 common.Hash, _a1 error) *AgglayerClientMock_SendCertificate_Call
- func (_c *AgglayerClientMock_SendCertificate_Call) Run(run func(certificate *SignedCertificate)) *AgglayerClientMock_SendCertificate_Call
- func (_c *AgglayerClientMock_SendCertificate_Call) RunAndReturn(run func(*SignedCertificate) (common.Hash, error)) *AgglayerClientMock_SendCertificate_Call
- type AgglayerClientMock_SendTx_Call
- func (_c *AgglayerClientMock_SendTx_Call) Return(_a0 common.Hash, _a1 error) *AgglayerClientMock_SendTx_Call
- func (_c *AgglayerClientMock_SendTx_Call) Run(run func(signedTx SignedTx)) *AgglayerClientMock_SendTx_Call
- func (_c *AgglayerClientMock_SendTx_Call) RunAndReturn(run func(SignedTx) (common.Hash, error)) *AgglayerClientMock_SendTx_Call
- type AgglayerClientMock_WaitTxToBeMined_Call
- func (_c *AgglayerClientMock_WaitTxToBeMined_Call) Return(_a0 error) *AgglayerClientMock_WaitTxToBeMined_Call
- func (_c *AgglayerClientMock_WaitTxToBeMined_Call) Run(run func(hash common.Hash, ctx context.Context)) *AgglayerClientMock_WaitTxToBeMined_Call
- func (_c *AgglayerClientMock_WaitTxToBeMined_Call) RunAndReturn(run func(common.Hash, context.Context) error) *AgglayerClientMock_WaitTxToBeMined_Call
- type BridgeExit
- type Certificate
- type CertificateHeader
- type CertificateStatus
- type Claim
- type ClaimFromMainnnet
- type ClaimFromRollup
- type ClockConfiguration
- type GenericError
- type GlobalIndex
- type ImportedBridgeExit
- type L1InfoTreeLeaf
- type L1InfoTreeLeafInner
- type LeafType
- type MerkleProof
- type Signature
- type SignedCertificate
- type SignedTx
- type TokenInfo
- type Tx
- type ZKP
Constants ¶
This section is empty.
Variables ¶
var ( NonSettledStatuses = []CertificateStatus{Pending, Candidate, Proven} ClosedStatuses = []CertificateStatus{Settled, InError} )
var (
ErrAgglayerRateLimitExceeded = fmt.Errorf("agglayer rate limit exceeded")
)
Functions ¶
This section is empty.
Types ¶
type AggLayerClient ¶
type AggLayerClient struct {
// contains filtered or unexported fields
}
AggLayerClient is the client that will be used to interact with the AggLayer
func NewAggLayerClient ¶
func NewAggLayerClient(url string) *AggLayerClient
NewAggLayerClient returns a client ready to be used
func (*AggLayerClient) GetCertificateHeader ¶
func (c *AggLayerClient) GetCertificateHeader(certificateHash common.Hash) (*CertificateHeader, error)
GetCertificateHeader returns the certificate header associated to the hash
func (*AggLayerClient) GetEpochConfiguration ¶
func (c *AggLayerClient) GetEpochConfiguration() (*ClockConfiguration, error)
GetEpochConfiguration returns the clock configuration of AggLayer
func (*AggLayerClient) GetLatestKnownCertificateHeader ¶ added in v0.5.0
func (c *AggLayerClient) GetLatestKnownCertificateHeader(networkID uint32) (*CertificateHeader, error)
GetLatestKnownCertificateHeader returns the last certificate header submitted by networkID
func (*AggLayerClient) SendCertificate ¶
func (c *AggLayerClient) SendCertificate(certificate *SignedCertificate) (common.Hash, error)
SendCertificate sends a certificate to the AggLayer
func (*AggLayerClient) SendTx ¶
func (c *AggLayerClient) SendTx(signedTx SignedTx) (common.Hash, error)
SendTx sends a signed transaction to the AggLayer
func (*AggLayerClient) WaitTxToBeMined ¶
WaitTxToBeMined waits for a transaction to be mined
type AggLayerClientGetEpochConfiguration ¶
type AggLayerClientGetEpochConfiguration interface {
GetEpochConfiguration() (*ClockConfiguration, error)
}
type AgglayerClientInterface ¶
type AgglayerClientInterface interface { SendTx(signedTx SignedTx) (common.Hash, error) WaitTxToBeMined(hash common.Hash, ctx context.Context) error SendCertificate(certificate *SignedCertificate) (common.Hash, error) GetCertificateHeader(certificateHash common.Hash) (*CertificateHeader, error) GetLatestKnownCertificateHeader(networkID uint32) (*CertificateHeader, error) AggLayerClientGetEpochConfiguration }
AgglayerClientInterface is the interface that defines the methods that the AggLayerClient will implement
type AgglayerClientMock ¶
AgglayerClientMock is an autogenerated mock type for the AgglayerClientInterface type
func NewAgglayerClientMock ¶
func NewAgglayerClientMock(t interface { mock.TestingT Cleanup(func()) }) *AgglayerClientMock
NewAgglayerClientMock creates a new instance of AgglayerClientMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*AgglayerClientMock) EXPECT ¶
func (_m *AgglayerClientMock) EXPECT() *AgglayerClientMock_Expecter
func (*AgglayerClientMock) GetCertificateHeader ¶
func (_m *AgglayerClientMock) GetCertificateHeader(certificateHash common.Hash) (*CertificateHeader, error)
GetCertificateHeader provides a mock function with given fields: certificateHash
func (*AgglayerClientMock) GetEpochConfiguration ¶
func (_m *AgglayerClientMock) GetEpochConfiguration() (*ClockConfiguration, error)
GetEpochConfiguration provides a mock function with given fields:
func (*AgglayerClientMock) GetLatestKnownCertificateHeader ¶ added in v0.5.0
func (_m *AgglayerClientMock) GetLatestKnownCertificateHeader(networkID uint32) (*CertificateHeader, error)
GetLatestKnownCertificateHeader provides a mock function with given fields: networkID
func (*AgglayerClientMock) SendCertificate ¶
func (_m *AgglayerClientMock) SendCertificate(certificate *SignedCertificate) (common.Hash, error)
SendCertificate provides a mock function with given fields: certificate
func (*AgglayerClientMock) SendTx ¶
func (_m *AgglayerClientMock) SendTx(signedTx SignedTx) (common.Hash, error)
SendTx provides a mock function with given fields: signedTx
func (*AgglayerClientMock) WaitTxToBeMined ¶
WaitTxToBeMined provides a mock function with given fields: hash, ctx
type AgglayerClientMock_Expecter ¶
type AgglayerClientMock_Expecter struct {
// contains filtered or unexported fields
}
func (*AgglayerClientMock_Expecter) GetCertificateHeader ¶
func (_e *AgglayerClientMock_Expecter) GetCertificateHeader(certificateHash interface{}) *AgglayerClientMock_GetCertificateHeader_Call
GetCertificateHeader is a helper method to define mock.On call
- certificateHash common.Hash
func (*AgglayerClientMock_Expecter) GetEpochConfiguration ¶
func (_e *AgglayerClientMock_Expecter) GetEpochConfiguration() *AgglayerClientMock_GetEpochConfiguration_Call
GetEpochConfiguration is a helper method to define mock.On call
func (*AgglayerClientMock_Expecter) GetLatestKnownCertificateHeader ¶ added in v0.5.0
func (_e *AgglayerClientMock_Expecter) GetLatestKnownCertificateHeader(networkID interface{}) *AgglayerClientMock_GetLatestKnownCertificateHeader_Call
GetLatestKnownCertificateHeader is a helper method to define mock.On call
- networkID uint32
func (*AgglayerClientMock_Expecter) SendCertificate ¶
func (_e *AgglayerClientMock_Expecter) SendCertificate(certificate interface{}) *AgglayerClientMock_SendCertificate_Call
SendCertificate is a helper method to define mock.On call
- certificate *SignedCertificate
func (*AgglayerClientMock_Expecter) SendTx ¶
func (_e *AgglayerClientMock_Expecter) SendTx(signedTx interface{}) *AgglayerClientMock_SendTx_Call
SendTx is a helper method to define mock.On call
- signedTx SignedTx
func (*AgglayerClientMock_Expecter) WaitTxToBeMined ¶
func (_e *AgglayerClientMock_Expecter) WaitTxToBeMined(hash interface{}, ctx interface{}) *AgglayerClientMock_WaitTxToBeMined_Call
WaitTxToBeMined is a helper method to define mock.On call
- hash common.Hash
- ctx context.Context
type AgglayerClientMock_GetCertificateHeader_Call ¶
AgglayerClientMock_GetCertificateHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCertificateHeader'
func (*AgglayerClientMock_GetCertificateHeader_Call) Return ¶
func (_c *AgglayerClientMock_GetCertificateHeader_Call) Return(_a0 *CertificateHeader, _a1 error) *AgglayerClientMock_GetCertificateHeader_Call
func (*AgglayerClientMock_GetCertificateHeader_Call) Run ¶
func (_c *AgglayerClientMock_GetCertificateHeader_Call) Run(run func(certificateHash common.Hash)) *AgglayerClientMock_GetCertificateHeader_Call
func (*AgglayerClientMock_GetCertificateHeader_Call) RunAndReturn ¶
func (_c *AgglayerClientMock_GetCertificateHeader_Call) RunAndReturn(run func(common.Hash) (*CertificateHeader, error)) *AgglayerClientMock_GetCertificateHeader_Call
type AgglayerClientMock_GetEpochConfiguration_Call ¶
AgglayerClientMock_GetEpochConfiguration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEpochConfiguration'
func (*AgglayerClientMock_GetEpochConfiguration_Call) Return ¶
func (_c *AgglayerClientMock_GetEpochConfiguration_Call) Return(_a0 *ClockConfiguration, _a1 error) *AgglayerClientMock_GetEpochConfiguration_Call
func (*AgglayerClientMock_GetEpochConfiguration_Call) Run ¶
func (_c *AgglayerClientMock_GetEpochConfiguration_Call) Run(run func()) *AgglayerClientMock_GetEpochConfiguration_Call
func (*AgglayerClientMock_GetEpochConfiguration_Call) RunAndReturn ¶
func (_c *AgglayerClientMock_GetEpochConfiguration_Call) RunAndReturn(run func() (*ClockConfiguration, error)) *AgglayerClientMock_GetEpochConfiguration_Call
type AgglayerClientMock_GetLatestKnownCertificateHeader_Call ¶ added in v0.5.0
AgglayerClientMock_GetLatestKnownCertificateHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestKnownCertificateHeader'
func (*AgglayerClientMock_GetLatestKnownCertificateHeader_Call) Return ¶ added in v0.5.0
func (_c *AgglayerClientMock_GetLatestKnownCertificateHeader_Call) Return(_a0 *CertificateHeader, _a1 error) *AgglayerClientMock_GetLatestKnownCertificateHeader_Call
func (*AgglayerClientMock_GetLatestKnownCertificateHeader_Call) Run ¶ added in v0.5.0
func (_c *AgglayerClientMock_GetLatestKnownCertificateHeader_Call) Run(run func(networkID uint32)) *AgglayerClientMock_GetLatestKnownCertificateHeader_Call
func (*AgglayerClientMock_GetLatestKnownCertificateHeader_Call) RunAndReturn ¶ added in v0.5.0
func (_c *AgglayerClientMock_GetLatestKnownCertificateHeader_Call) RunAndReturn(run func(uint32) (*CertificateHeader, error)) *AgglayerClientMock_GetLatestKnownCertificateHeader_Call
type AgglayerClientMock_SendCertificate_Call ¶
AgglayerClientMock_SendCertificate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendCertificate'
func (*AgglayerClientMock_SendCertificate_Call) Return ¶
func (_c *AgglayerClientMock_SendCertificate_Call) Return(_a0 common.Hash, _a1 error) *AgglayerClientMock_SendCertificate_Call
func (*AgglayerClientMock_SendCertificate_Call) Run ¶
func (_c *AgglayerClientMock_SendCertificate_Call) Run(run func(certificate *SignedCertificate)) *AgglayerClientMock_SendCertificate_Call
func (*AgglayerClientMock_SendCertificate_Call) RunAndReturn ¶
func (_c *AgglayerClientMock_SendCertificate_Call) RunAndReturn(run func(*SignedCertificate) (common.Hash, error)) *AgglayerClientMock_SendCertificate_Call
type AgglayerClientMock_SendTx_Call ¶
AgglayerClientMock_SendTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendTx'
func (*AgglayerClientMock_SendTx_Call) Return ¶
func (_c *AgglayerClientMock_SendTx_Call) Return(_a0 common.Hash, _a1 error) *AgglayerClientMock_SendTx_Call
func (*AgglayerClientMock_SendTx_Call) Run ¶
func (_c *AgglayerClientMock_SendTx_Call) Run(run func(signedTx SignedTx)) *AgglayerClientMock_SendTx_Call
func (*AgglayerClientMock_SendTx_Call) RunAndReturn ¶
func (_c *AgglayerClientMock_SendTx_Call) RunAndReturn(run func(SignedTx) (common.Hash, error)) *AgglayerClientMock_SendTx_Call
type AgglayerClientMock_WaitTxToBeMined_Call ¶
AgglayerClientMock_WaitTxToBeMined_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitTxToBeMined'
func (*AgglayerClientMock_WaitTxToBeMined_Call) Return ¶
func (_c *AgglayerClientMock_WaitTxToBeMined_Call) Return(_a0 error) *AgglayerClientMock_WaitTxToBeMined_Call
func (*AgglayerClientMock_WaitTxToBeMined_Call) Run ¶
func (_c *AgglayerClientMock_WaitTxToBeMined_Call) Run(run func(hash common.Hash, ctx context.Context)) *AgglayerClientMock_WaitTxToBeMined_Call
func (*AgglayerClientMock_WaitTxToBeMined_Call) RunAndReturn ¶
func (_c *AgglayerClientMock_WaitTxToBeMined_Call) RunAndReturn(run func(common.Hash, context.Context) error) *AgglayerClientMock_WaitTxToBeMined_Call
type BridgeExit ¶
type BridgeExit struct { LeafType LeafType `json:"leaf_type"` TokenInfo *TokenInfo `json:"token_info"` DestinationNetwork uint32 `json:"dest_network"` DestinationAddress common.Address `json:"dest_address"` Amount *big.Int `json:"amount"` IsMetadataHashed bool `json:"-"` Metadata []byte `json:"metadata"` }
BridgeExit represents a token bridge exit
func (*BridgeExit) Hash ¶
func (b *BridgeExit) Hash() common.Hash
Hash returns a hash that uniquely identifies the bridge exit
func (*BridgeExit) MarshalJSON ¶
func (b *BridgeExit) MarshalJSON() ([]byte, error)
MarshalJSON is the implementation of the json.Marshaler interface
func (*BridgeExit) String ¶
func (b *BridgeExit) String() string
type Certificate ¶
type Certificate struct { NetworkID uint32 `json:"network_id"` Height uint64 `json:"height"` PrevLocalExitRoot common.Hash `json:"prev_local_exit_root"` NewLocalExitRoot common.Hash `json:"new_local_exit_root"` BridgeExits []*BridgeExit `json:"bridge_exits"` ImportedBridgeExits []*ImportedBridgeExit `json:"imported_bridge_exits"` Metadata common.Hash `json:"metadata"` }
Certificate is the data structure that will be sent to the agglayer
func (*Certificate) Brief ¶ added in v0.5.0
func (c *Certificate) Brief() string
Brief returns a string with a brief cert
func (*Certificate) Hash ¶
func (c *Certificate) Hash() common.Hash
Hash returns a hash that uniquely identifies the certificate
func (*Certificate) HashToSign ¶
func (c *Certificate) HashToSign() common.Hash
HashToSign is the actual hash that needs to be signed by the aggsender as expected by the agglayer
type CertificateHeader ¶
type CertificateHeader struct { NetworkID uint32 `json:"network_id"` Height uint64 `json:"height"` EpochNumber *uint64 `json:"epoch_number"` CertificateIndex *uint64 `json:"certificate_index"` CertificateID common.Hash `json:"certificate_id"` PreviousLocalExitRoot *common.Hash `json:"prev_local_exit_root,omitempty"` NewLocalExitRoot common.Hash `json:"new_local_exit_root"` Status CertificateStatus `json:"status"` Metadata common.Hash `json:"metadata"` Error error `json:"-"` }
CertificateHeader is the structure returned by the interop_getCertificateHeader RPC call
func (*CertificateHeader) ID ¶ added in v0.5.0
func (c *CertificateHeader) ID() string
ID returns a string with the ident of this cert (height/certID)
func (*CertificateHeader) String ¶
func (c *CertificateHeader) String() string
func (*CertificateHeader) UnmarshalJSON ¶
func (c *CertificateHeader) UnmarshalJSON(data []byte) error
type CertificateStatus ¶
type CertificateStatus int
const ( Pending CertificateStatus = iota Proven Candidate InError Settled )
func (CertificateStatus) IsClosed ¶ added in v0.5.0
func (c CertificateStatus) IsClosed() bool
IsClosed returns true if the certificate is closed (settled or inError)
func (CertificateStatus) IsInError ¶ added in v0.5.0
func (c CertificateStatus) IsInError() bool
IsInError returns true if the certificate is in error
func (CertificateStatus) IsOpen ¶ added in v0.5.0
func (c CertificateStatus) IsOpen() bool
IsOpen returns true if the certificate is open (pending, candidate or proven)
func (CertificateStatus) IsSettled ¶ added in v0.5.0
func (c CertificateStatus) IsSettled() bool
IsSettled returns true if the certificate is settled
func (CertificateStatus) String ¶
func (c CertificateStatus) String() string
String representation of the enum
func (*CertificateStatus) UnmarshalJSON ¶
func (c *CertificateStatus) UnmarshalJSON(rawStatus []byte) error
UnmarshalJSON is the implementation of the json.Unmarshaler interface
type Claim ¶
type Claim interface { Type() string Hash() common.Hash MarshalJSON() ([]byte, error) String() string }
Claim is the interface that will be implemented by the different types of claims
type ClaimFromMainnnet ¶
type ClaimFromMainnnet struct { ProofLeafMER *MerkleProof `json:"proof_leaf_mer"` ProofGERToL1Root *MerkleProof `json:"proof_ger_l1root"` L1Leaf *L1InfoTreeLeaf `json:"l1_leaf"` }
ClaimFromMainnnet represents a claim originating from the mainnet
func (*ClaimFromMainnnet) Hash ¶
func (c *ClaimFromMainnnet) Hash() common.Hash
Hash is the implementation of Claim interface
func (*ClaimFromMainnnet) MarshalJSON ¶
func (c *ClaimFromMainnnet) MarshalJSON() ([]byte, error)
MarshalJSON is the implementation of Claim interface
func (*ClaimFromMainnnet) String ¶
func (c *ClaimFromMainnnet) String() string
func (ClaimFromMainnnet) Type ¶
func (c ClaimFromMainnnet) Type() string
Type is the implementation of Claim interface
type ClaimFromRollup ¶
type ClaimFromRollup struct { ProofLeafLER *MerkleProof `json:"proof_leaf_ler"` ProofLERToRER *MerkleProof `json:"proof_ler_rer"` ProofGERToL1Root *MerkleProof `json:"proof_ger_l1root"` L1Leaf *L1InfoTreeLeaf `json:"l1_leaf"` }
ClaimFromRollup represents a claim originating from a rollup
func (*ClaimFromRollup) Hash ¶
func (c *ClaimFromRollup) Hash() common.Hash
Hash is the implementation of Claim interface
func (*ClaimFromRollup) MarshalJSON ¶
func (c *ClaimFromRollup) MarshalJSON() ([]byte, error)
MarshalJSON is the implementation of Claim interface
func (*ClaimFromRollup) String ¶
func (c *ClaimFromRollup) String() string
func (ClaimFromRollup) Type ¶
func (c ClaimFromRollup) Type() string
Type is the implementation of Claim interface
type ClockConfiguration ¶
type ClockConfiguration struct { EpochDuration uint64 `json:"epoch_duration"` GenesisBlock uint64 `json:"genesis_block"` }
ClockConfiguration represents the configuration of the epoch clock returned by the interop_GetEpochConfiguration RPC call
func (ClockConfiguration) String ¶
func (c ClockConfiguration) String() string
type GenericError ¶ added in v0.5.0
func (*GenericError) Error ¶ added in v0.5.0
func (p *GenericError) Error() string
type GlobalIndex ¶
type GlobalIndex struct { MainnetFlag bool `json:"mainnet_flag"` RollupIndex uint32 `json:"rollup_index"` LeafIndex uint32 `json:"leaf_index"` }
GlobalIndex represents the global index of an imported bridge exit
func (*GlobalIndex) Hash ¶
func (g *GlobalIndex) Hash() common.Hash
func (*GlobalIndex) String ¶
func (g *GlobalIndex) String() string
String returns a string representation of the GlobalIndex struct
func (*GlobalIndex) UnmarshalFromMap ¶
func (g *GlobalIndex) UnmarshalFromMap(data map[string]interface{}) error
type ImportedBridgeExit ¶
type ImportedBridgeExit struct { BridgeExit *BridgeExit `json:"bridge_exit"` ClaimData Claim `json:"claim_data"` GlobalIndex *GlobalIndex `json:"global_index"` }
ImportedBridgeExit represents a token bridge exit originating on another network but claimed on the current network.
func (*ImportedBridgeExit) Hash ¶
func (c *ImportedBridgeExit) Hash() common.Hash
Hash returns a hash that uniquely identifies the imported bridge exit
func (*ImportedBridgeExit) String ¶
func (c *ImportedBridgeExit) String() string
type L1InfoTreeLeaf ¶
type L1InfoTreeLeaf struct { L1InfoTreeIndex uint32 `json:"l1_info_tree_index"` RollupExitRoot common.Hash `json:"rer"` MainnetExitRoot common.Hash `json:"mer"` Inner *L1InfoTreeLeafInner `json:"inner"` }
L1InfoTreeLeaf represents the leaf of the L1 info tree
func (*L1InfoTreeLeaf) Hash ¶
func (l *L1InfoTreeLeaf) Hash() common.Hash
Hash returns the hash of the L1InfoTreeLeaf struct
func (*L1InfoTreeLeaf) String ¶
func (l *L1InfoTreeLeaf) String() string
type L1InfoTreeLeafInner ¶
type L1InfoTreeLeafInner struct { GlobalExitRoot common.Hash `json:"global_exit_root"` BlockHash common.Hash `json:"block_hash"` Timestamp uint64 `json:"timestamp"` }
L1InfoTreeLeafInner represents the inner part of the L1 info tree leaf
func (*L1InfoTreeLeafInner) Hash ¶
func (l *L1InfoTreeLeafInner) Hash() common.Hash
Hash returns the hash of the L1InfoTreeLeafInner struct
func (*L1InfoTreeLeafInner) String ¶
func (l *L1InfoTreeLeafInner) String() string
type MerkleProof ¶
type MerkleProof struct { Root common.Hash `json:"root"` Proof [types.DefaultHeight]common.Hash `json:"proof"` }
MerkleProof represents an inclusion proof of a leaf in a Merkle tree
func (*MerkleProof) Hash ¶
func (m *MerkleProof) Hash() common.Hash
Hash returns the hash of the Merkle proof struct
func (*MerkleProof) MarshalJSON ¶
func (m *MerkleProof) MarshalJSON() ([]byte, error)
MarshalJSON is the implementation of the json.Marshaler interface
func (*MerkleProof) String ¶
func (m *MerkleProof) String() string
type Signature ¶
type Signature struct { R common.Hash `json:"r"` S common.Hash `json:"s"` OddParity bool `json:"odd_y_parity"` }
Signature is the data structure that will hold the signature of the given certificate
type SignedCertificate ¶
type SignedCertificate struct { *Certificate Signature *Signature `json:"signature"` }
SignedCertificate is the struct that contains the certificate and the signature of the signer
func (*SignedCertificate) Brief ¶ added in v0.5.0
func (s *SignedCertificate) Brief() string
func (*SignedCertificate) CopyWithDefaulting ¶
func (s *SignedCertificate) CopyWithDefaulting() *SignedCertificate
CopyWithDefaulting returns a shallow copy of the signed certificate
type TokenInfo ¶
type TokenInfo struct { OriginNetwork uint32 `json:"origin_network"` OriginTokenAddress common.Address `json:"origin_token_address"` }
TokenInfo encapsulates the information to uniquely identify a token on the origin network.
type Tx ¶
type Tx struct { RollupID uint32 LastVerifiedBatch types.ArgUint64 `json:"lastVerifiedBatch"` NewVerifiedBatch types.ArgUint64 `json:"newVerifiedBatch"` ZKP ZKP `json:"ZKP"` }
Tx is the struct that contains the verified batch transaction