api

package
v0.0.0-...-8220f0d Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddFundsRequest

type AddFundsRequest struct {
	Wallet string  `json:"wallet"`
	Amount float64 `json:"amount,string"`

	Signature string `json:"signature"`

	Mappings map[string]string `json:"mappings"`
}

AddFundsRequest is the payload expected by the AddFunds endpoint Signature over the 2 first field of the request as json: {"wallet": "...", "value": 42} -> sign this string

type CheckerResponse

type CheckerResponse struct {
	Success bool `json:"success"`
}

CheckerResponse ...

type CreateWalletRequest

type CreateWalletRequest struct {
	Address string `json:"address"`
	PubKey  string `json:"pubKey"`

	InitObject string `json:"initObject"`

	Mappings map[string]string `json:"mappings"`
}

CreateWalletRequest is the payload expected by the CreateWallet endpoint

type InitRequest

type InitRequest struct {
	Address string `json:"address"`
}

InitRequest is the payload expected by the Init endpoint

type InitResponse

type InitResponse struct {
	Error      string `json:"error,omitempty"`
	InitObject string `json:"initObject,omitempty"`
}

type Response

type Response struct {
	Error       string              `json:"error,omitempty"`
	Transaction sbacapi.Transaction `json:"transaction,omitempty"`
}

Response returned by all the methods

type Router

type Router struct {
	*gin.Engine
	// contains filtered or unexported fields
}

func New

func New() *Router

func (*Router) TransferFundsChecker

func (r *Router) TransferFundsChecker(c *gin.Context)

type TransferFundsRequest

type TransferFundsRequest struct {
	FromWallet string  `json:"fromWallet"`
	ToWallet   string  `json:"toWallet"`
	Amount     float64 `json:"amount,string"`

	Signature string `json:"signature"`

	Mappings map[string]string `json:"mappings"`
}

AddFundsRequest is the payload expected by the TransferFunds endpoint Signature over the 3 first field of the request as json: {"fromWallet": "...", "toWallet": "..." "value": 42} -> sign this string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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