account

package
v0.0.0-...-d0dd730 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configurator

type Configurator struct {
	DB *db.DB

	ChannelMgr *channel.Manager
	// contains filtered or unexported fields
}

Configurator is responsible for configuring new Stellar accounts that participate in ICO.

func NewAccountConfigurator

func NewAccountConfigurator(DB *db.DB, cnf *config.Config, cm *channel.Manager) *Configurator

NewAccountConfigurator initialises the account configurator

func (*Configurator) CreateAccount

func (c *Configurator) CreateAccount(account string, order *m.UserOrder) error

CreateAccount create the user stellar account it uses the configured distribution account as source and uses autosequence of distribution account

func (*Configurator) ExecuteTransaction

func (c *Configurator) ExecuteTransaction(o *m.UserOrder, tx string) (string, error)

ExecuteTransaction checks the transaction, signs it and executes it

func (*Configurator) GetAccount

func (c *Configurator) GetAccount(account string) (horizon.Account, bool, error)

GetAccount returns the horizon-account for the given address or false if it does not exist

func (*Configurator) GetPaymentTransaction

func (c *Configurator) GetPaymentTransaction(o *m.UserOrder) (string, int64, error)

GetPaymentTransaction creates the transaction for a valid payment returns the transaction or an error code the transaction is signed with the pre-signer and must be signed againe with the postsigner on execute

Jump to

Keyboard shortcuts

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