Documentation
¶
Index ¶
- type App
- func (a *App) Account() *blockchain.Account
- func (a *App) AppKeypair() keypair.KP
- func (a *App) Authorized() bool
- func (a *App) Balance() float64
- func (a *App) Charge(amount float64, destination ...string) (horizon.TransactionSuccess, error)
- func (a *App) GetUserAccount() *blockchain.Account
- func (a *App) Payout(amount float64, destination ...string) (horizon.TransactionSuccess, error)
- func (a *App) Transfer(amount float64, destination string) (horizon.TransactionSuccess, error)
- func (a *App) UserBalance() float64
- func (a *App) UserKeypair() keypair.KP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { AppAccount *blockchain.Account ClientInstance *horizon.Client UserAccount *blockchain.Account }
App defines an interface to the user in a DApp
func Build ¶
Build fetches information from the Stellar Network, and returns an instance of a connected DApp
func (*App) Account ¶
func (a *App) Account() *blockchain.Account
AppAccount returns the associated app account
func (*App) AppKeypair ¶
AppKeypair returns keypair associated with app account
func (*App) Authorized ¶
Authorized confirms the connected developer is authorized to use app
func (*App) Charge ¶
Charge charges specified amount from user account and then optionally transfers it from app account to a thrid party in same transaction
func (*App) GetUserAccount ¶
func (a *App) GetUserAccount() *blockchain.Account
GetUserAccount returns the user account authenticated to app
func (*App) UserBalance ¶
UserBalance reutrns the app user balance
func (*App) UserKeypair ¶
UserKeypair returns keypair associated with connected user
Click to show internal directories.
Click to hide internal directories.