api

package
v0.2.8-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EthChecksumValidator

func EthChecksumValidator(fl validator.FieldLevel) bool

func HandleAccountCreate

func HandleAccountCreate(c echo.Context) error

CreateAccountHandler route. POST: /api/account/create Returns the public key.

func HandleSignTransfer

func HandleSignTransfer(c echo.Context) error

HandleSignTransfer route. POST: /api/sign/transfer JSON Body: from -> ETH address to -> ETH address voucherAddress -> ETH address amount -> int (6 d.p. precision) e.g. 1000000 = 1 VOUCHER Returns the task id.

func HandleTrackTx

func HandleTrackTx(c echo.Context) error

HandleTxStatus route. GET: /api/track/:trackingId Route param: trackingId -> tracking UUID Returns array of tx status.

func NewBadRequestError

func NewBadRequestError(message ...interface{}) *echo.HTTPError

Types

type ErrResp

type ErrResp struct {
	Ok      bool   `json:"ok"`
	Message string `json:"message"`
}

type H

type H map[string]any

type OkResp

type OkResp struct {
	Ok     bool `json:"ok"`
	Result H    `json:"result"`
}

type Validator

type Validator struct {
	ValidatorProvider *validator.Validate
}

func (*Validator) Validate

func (v *Validator) Validate(i interface{}) error

Jump to

Keyboard shortcuts

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