address

package
v0.0.0-...-a5fc328 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorUnableToFindAddress          = errors.New("Unable to find the address on your account")
	ErrorUnableToDeleteAddress        = errors.New("Unable to delete the address")
	ErrorSpendingAddressAlreadyInUse  = errors.New("The spending address provided is already in use")
	ErrorUnableToSaveAddress          = errors.New("Unable to save the address")
	ErrorUnableToRetrieveTransactions = errors.New("Unable to retrieve transactions")
)

Functions

func CreateNewAddress

func CreateNewAddress(addressDto AddressDto, user account.User) (address *model.Address, err error)

func DeleteAddress

func DeleteAddress(id uuid.UUID, user account.User) (err error)

func GetAddress

func GetAddress(id uuid.UUID, user account.User) (address model.Address, err error)

func GetAddresses

func GetAddresses(user account.User) (addresses []model.Address, err error)

func GetPoolBalance

func GetPoolBalance() (balance float64, err error)

func GetStakingAddressesForUser

func GetStakingAddressesForUser(user account.User) (stakingAddresses []string, err error)

Types

type AddressDto

type AddressDto struct {
	Hash      string `json:"hash" binding:"required,len=34"`
	Signature string `json:"signature" binding:"required"`
}

type Controller

type Controller struct{}

func (*Controller) CreateAddress

func (controller *Controller) CreateAddress(c *gin.Context)

func (*Controller) DeleteAddress

func (controller *Controller) DeleteAddress(c *gin.Context)

func (*Controller) GetAddress

func (controller *Controller) GetAddress(c *gin.Context)

func (*Controller) GetAddresses

func (controller *Controller) GetAddresses(c *gin.Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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