api

package
v0.8.0-beta Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CELO_COIN = 2147525868

	AddrSignature      string = "0x3b3b57de"
	MulticoinSignature string = "0xf1cb7e06"
)

Variables

View Source
var (
	ErrUnsupportedFunction = errors.New("unsupported function")
	ErrNameValidation      = errors.New("could not validate encoded name in inner data")
)

Functions

This section is empty.

Types

type API

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

func New

func New(o APIOpts) *API

func (*API) Start

func (a *API) Start() error

func (*API) Stop

func (a *API) Stop(ctx context.Context) error

type APIOpts

type APIOpts struct {
	CCIPOnly      bool
	EnableMetrics bool
	ListenAddress string
	ETHRPCURL     string
	VerifyingKey  crypto.PublicKey
	Store         store.Store
	Logg          *slog.Logger
	ENSProvider   *ens.ENS
}

type CCIPErrResponse

type CCIPErrResponse struct {
	Message string `json:"message"`
}

type CCIPOKResponse

type CCIPOKResponse struct {
	Data string `json:"data"`
}

type CCIPParams

type CCIPParams struct {
	Sender string
	Data   string
}

type ErrResponse

type ErrResponse struct {
	Ok          bool   `json:"ok"`
	Description string `json:"description"`
}

type JWTCustomClaims

type JWTCustomClaims struct {
	PublicKey string `json:"publicKey"`
	Service   bool   `json:"service"`
	jwt.RegisteredClaims
}

type OKResponse

type OKResponse struct {
	Ok          bool           `json:"ok"`
	Description string         `json:"description"`
	Result      map[string]any `json:"result"`
}

type PublicAddressParam

type PublicAddressParam struct {
	Address string `validate:"required,eth_addr_checksum"`
}

type RegisterRequest

type RegisterRequest struct {
	Address string `json:"address" validate:"required,eth_addr_checksum"`
	Hint    string `json:"hint" validate:"required,fqdn"`
}

type UpdateRequest

type UpdateRequest struct {
	Name    string `json:"name" validate:"required,fqdn"`
	Address string `json:"address" validate:"required,eth_addr_checksum"`
}

type UpsertRequest

type UpsertRequest struct {
	Name    string `json:"name" validate:"required,fqdn"`
	Address string `json:"address" validate:"required,eth_addr_checksum"`
}

Jump to

Keyboard shortcuts

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