api

package
v1.4.4-beta Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: AGPL-3.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ErrCodeInternalServerError = "E01"
	ErrCodeInvalidJSON         = "E02"
	ErrCodeInvalidAPIKey       = "E03"
	ErrCodeValidationFailed    = "E04"
	ErrCodeAccountNotExists    = "E05"
	ErrJWTAuth                 = "E06"
	ErrNoRecordFound           = "E07"
	ErrBannedToken             = "E08"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountAddressParam

type AccountAddressParam struct {
	Address string `param:"address"  validate:"required,eth_addr_checksum"`
}

type ErrResponse

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

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required"`
}

type OKResponse

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

type OTXByAccountRequest

type OTXByAccountRequest struct {
	Address string `param:"address" validate:"required,eth_addr_checksum"`
	PerPage int    `query:"perPage" validate:"required,number,gt=0"`
	Cursor  int    `query:"cursor" validate:"number"`
	Next    bool   `query:"next"`
}

type PoolDepositRequest

type PoolDepositRequest struct {
	From         string `json:"from" validate:"required,eth_addr_checksum"`
	TokenAddress string `json:"tokenAddress" validate:"required,eth_addr_checksum"`
	PoolAddress  string `json:"poolAddress" validate:"required,eth_addr_checksum"`
	Amount       string `json:"amount" validate:"required,number,gt=0"`
}

type PoolSwapRequest

type PoolSwapRequest struct {
	From             string `json:"from" validate:"required,eth_addr_checksum"`
	FromTokenAddress string `json:"fromTokenAddress" validate:"required,eth_addr_checksum"`
	ToTokenAddress   string `json:"toTokenAddress" validate:"required,eth_addr_checksum"`
	PoolAddress      string `json:"poolAddress" validate:"required,eth_addr_checksum"`
	Amount           string `json:"amount" validate:"required,number,gt=0"`
}

type SweepRequest

type SweepRequest struct {
	From         string `json:"from" validate:"required,eth_addr_checksum"`
	To           string `json:"to" validate:"required,eth_addr_checksum"`
	TokenAddress string `json:"tokenAddress" validate:"required,eth_addr_checksum"`
}

type TrackingIDParam

type TrackingIDParam struct {
	TrackingID string `param:"trackingId"  validate:"required,uuid"`
}

type TransferRequest

type TransferRequest struct {
	From         string `json:"from" validate:"required,eth_addr_checksum"`
	To           string `json:"to" validate:"required,eth_addr_checksum"`
	TokenAddress string `json:"tokenAddress" validate:"required,eth_addr_checksum"`
	Amount       string `json:"amount" validate:"required,number,gt=0"`
}

Jump to

Keyboard shortcuts

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