attestation

package
v0.1.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

Package attestation contains attestation REST API handling for the relayer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CCTPAPI

type CCTPAPI interface {
	GetAttestation(context.Context, string) ([]byte, error)
}

CCTPAPI is the interface for the Attestation API.

type CircleAPI

type CircleAPI struct {
	// contains filtered or unexported fields
}

CircleAPI is a wrapper for Circle's REST API.

func NewCircleAPI

func NewCircleAPI(url string) CircleAPI

NewCircleAPI creates a new CircleAPI.

func (CircleAPI) GetAttestation

func (c CircleAPI) GetAttestation(ctx context.Context, txHash string) (attestation []byte, err error)

GetAttestation is a wrapper for GET /attestations/{txHash}.

type MockCircleAPI

type MockCircleAPI struct {
	// contains filtered or unexported fields
}

MockCircleAPI is a mock CircleAPI for testing.

func NewMockCircleAPI

func NewMockCircleAPI() *MockCircleAPI

NewMockCircleAPI creates a new MockCircleAPI.

func (*MockCircleAPI) GetAttestation

func (m *MockCircleAPI) GetAttestation(ctx context.Context, txHash string) (attestation []byte, err error)

GetAttestation is a mock GetAttestation.

func (*MockCircleAPI) SetGetAttestation

func (m *MockCircleAPI) SetGetAttestation(attestFunc func(context.Context, string) ([]byte, error))

SetGetAttestation overrides the attestFunc.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL