Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) GetBridgeByDepositCount(ctx context.Context, networkID uint32, depositCount uint32) (*types.BridgeResponse, error)
- func (c *Client) GetBridges(ctx context.Context, params GetBridgesParams) (*types.BridgesResult, error)
- func (c *Client) GetBridgesByContent(ctx context.Context, params GetBridgesByContentParams) (*types.BridgesByContentResult, error)
- func (c *Client) GetClaimProof(ctx context.Context, networkID, leafIndex, depositCount uint32) (*types.ClaimProof, error)
- func (c *Client) GetClaims(ctx context.Context, params GetClaimsParams) (*types.ClaimsResult, error)
- func (c *Client) GetClaimsByGER(ctx context.Context, networkID uint32, ger string) (*types.ClaimsByGERResult, error)
- func (c *Client) GetInjectedL1InfoLeaf(ctx context.Context, networkID, leafIndex int) (*types.L1InfoTreeLeafResponse, error)
- func (c *Client) GetL1InfoTreeIndex(ctx context.Context, networkID, depositCount int) (uint32, error)
- func (c *Client) GetLastReorgEvent(ctx context.Context, networkID int) (*bridgesync.LastReorg, error)
- func (c *Client) GetLegacyTokenMigrations(ctx context.Context, params GetLegacyTokenMigrationsParams) (*types.LegacyTokenMigrationsResult, error)
- func (c *Client) GetRemoveGEREvents(ctx context.Context, params GetRemoveGEREventsParams) (*types.RemoveGEREventsResult, error)
- func (c *Client) GetSetClaims(ctx context.Context, params GetSetClaimsParams) (*types.SetClaimsResult, error)
- func (c *Client) GetSyncStatus(ctx context.Context) (*types.SyncStatus, error)
- func (c *Client) GetTokenMappings(ctx context.Context, params GetTokenMappingsParams) (*types.TokenMappingsResult, error)
- func (c *Client) GetUnsetClaims(ctx context.Context, params GetUnsetClaimsParams) (*types.UnsetClaimsResult, error)
- func (c *Client) HealthCheck(ctx context.Context) (*types.HealthCheckResponse, error)
- type Config
- type GetBridgesByContentParams
- type GetBridgesParams
- type GetClaimsParams
- type GetLegacyTokenMigrationsParams
- type GetRemoveGEREventsParams
- type GetSetClaimsParams
- type GetTokenMappingsParams
- type GetUnsetClaimsParams
Constants ¶
const ( // DefaultTimeout is the default HTTP client timeout DefaultTimeout = 30 * time.Second )
Variables ¶
var ErrNotFound = errors.New("not found")
ErrNotFound is returned when a resource is not found (HTTP 404)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for the bridgeservice REST API
func (*Client) GetBridgeByDepositCount ¶
func (c *Client) GetBridgeByDepositCount( ctx context.Context, networkID uint32, depositCount uint32, ) (*types.BridgeResponse, error)
GetBridgeByDepositCount retrieves the bridge for the given network and deposit count. Returns ErrNotFound if the bridge does not exist in bridge or bridge_archive.
func (*Client) GetBridges ¶
func (c *Client) GetBridges(ctx context.Context, params GetBridgesParams) (*types.BridgesResult, error)
GetBridges retrieves paginated bridge events
func (*Client) GetBridgesByContent ¶
func (c *Client) GetBridgesByContent( ctx context.Context, params GetBridgesByContentParams, ) (*types.BridgesByContentResult, error)
GetBridgesByContent retrieves bridges matching the given content fields for the specified network.
func (*Client) GetClaimProof ¶
func (c *Client) GetClaimProof( ctx context.Context, networkID, leafIndex, depositCount uint32, ) (*types.ClaimProof, error)
GetClaimProof retrieves Merkle proofs for claim verification
func (*Client) GetClaims ¶
func (c *Client) GetClaims(ctx context.Context, params GetClaimsParams) (*types.ClaimsResult, error)
GetClaims retrieves paginated claims
func (*Client) GetClaimsByGER ¶
func (c *Client) GetClaimsByGER(ctx context.Context, networkID uint32, ger string) (*types.ClaimsByGERResult, error)
GetClaimsByGER retrieves all claims matching the given global exit root (0x-prefixed hex hash) for the specified network (0 for L1, L2 network ID otherwise).
func (*Client) GetInjectedL1InfoLeaf ¶
func (c *Client) GetInjectedL1InfoLeaf( ctx context.Context, networkID, leafIndex int, ) (*types.L1InfoTreeLeafResponse, error)
GetInjectedL1InfoLeaf retrieves an injected L1 info tree leaf
func (*Client) GetL1InfoTreeIndex ¶
func (c *Client) GetL1InfoTreeIndex(ctx context.Context, networkID, depositCount int) (uint32, error)
GetL1InfoTreeIndex retrieves the L1 Info Tree index for a bridge
func (*Client) GetLastReorgEvent ¶
func (c *Client) GetLastReorgEvent(ctx context.Context, networkID int) (*bridgesync.LastReorg, error)
GetLastReorgEvent retrieves the last reorganization event
func (*Client) GetLegacyTokenMigrations ¶
func (c *Client) GetLegacyTokenMigrations( ctx context.Context, params GetLegacyTokenMigrationsParams, ) (*types.LegacyTokenMigrationsResult, error)
GetLegacyTokenMigrations retrieves legacy token migrations
func (*Client) GetRemoveGEREvents ¶
func (c *Client) GetRemoveGEREvents( ctx context.Context, params GetRemoveGEREventsParams, ) (*types.RemoveGEREventsResult, error)
GetRemoveGEREvents retrieves removed GER (Global Exit Root) events
func (*Client) GetSetClaims ¶
func (c *Client) GetSetClaims(ctx context.Context, params GetSetClaimsParams) (*types.SetClaimsResult, error)
GetSetClaims retrieves set claims (L2 only)
func (*Client) GetSyncStatus ¶
GetSyncStatus retrieves the bridge synchronization status
func (*Client) GetTokenMappings ¶
func (c *Client) GetTokenMappings( ctx context.Context, params GetTokenMappingsParams, ) (*types.TokenMappingsResult, error)
GetTokenMappings retrieves token mappings
func (*Client) GetUnsetClaims ¶
func (c *Client) GetUnsetClaims(ctx context.Context, params GetUnsetClaimsParams) (*types.UnsetClaimsResult, error)
GetUnsetClaims retrieves unset claims (L2 only)
func (*Client) HealthCheck ¶
HealthCheck performs a health check
type GetBridgesByContentParams ¶
type GetBridgesByContentParams struct {
NetworkID uint32
LeafType uint8
OriginAddress string
DestinationNetwork uint32
DestinationAddress string
Amount *big.Int
Metadata []byte
}
GetBridgesByContentParams holds the content fields for GetBridgesByContent
type GetBridgesParams ¶
type GetBridgesParams struct {
NetworkID uint32
PageNumber *uint32
PageSize *uint32
DepositCount *uint64
FromAddress *string
NetworkIDs []uint32
}
GetBridgesParams contains parameters for GetBridges
type GetClaimsParams ¶
type GetClaimsParams struct {
NetworkID uint32
PageNumber *uint32
PageSize *uint32
NetworkIDs []uint32
IncludeAllFields *bool
GlobalIndex *big.Int
}
GetClaimsParams contains parameters for GetClaims
type GetLegacyTokenMigrationsParams ¶
GetLegacyTokenMigrationsParams contains parameters for GetLegacyTokenMigrations
type GetRemoveGEREventsParams ¶
GetRemoveGEREventsParams contains parameters for GetRemoveGEREvents
type GetSetClaimsParams ¶
GetSetClaimsParams contains parameters for GetSetClaims