api

package
v1.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Oct 14, 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"
)

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 OKResponse

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

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 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