api

package
v0.5.1-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidJSON = errors.New("Invalid JSON structure.")
)

Functions

func HandleAccountCreate

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

HandleAccountCreate godoc @Summary Create a new custodial account. @Description Create a new custodial account. @Accept */* @Produce json @Success 200 {object} map[string]interface{} @Router / [post]

func HandleNetworkAccountStatus

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

func HandleSignTransfer

func HandleSignTransfer(cu *custodial.Custodial) func(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(cu *custodial.Custodial) func(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