api

package
v0.2.2-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INTERNAL_ERROR   = "ERR_INTERNAL"
	VALIDATION_ERROR = "ERR_VALIDATE"
	DUPLICATE_ERROR  = "ERR_DUPLICATE"
)

Variables

This section is empty.

Functions

func CreateAccountHandler

func CreateAccountHandler(cu *custodial.Custodial) func(echo.Context) error

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

func EthChecksumValidator

func EthChecksumValidator(fl validator.FieldLevel) bool

func SignTransferHandler

func SignTransferHandler(cu *custodial.Custodial) func(echo.Context) error

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

func TxStatus(store store.Store) func(echo.Context) error

Types

type ErrResp

type ErrResp struct {
	Ok      bool   `json:"ok"`
	Code    string `json:"errorCode"`
	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