blockchain

package
v0.0.0-...-56b0842 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Account        horizon.Account
	Keypair        keypair.KP
	AssetIssuers   []string
	ClientInstance *horizon.Client
}

Account represents an interface to interact with an account on the Stellar Network

func Build

func Build(kp keypair.KP) (*Account, error)

Build fetches information from the Stellar Network and returns an instance of Account

func (*Account) Authorized

func (a *Account) Authorized(kp keypair.KP) bool

Authorized confirms if the given keypair is added as a cosigner to account

func (*Account) Balance

func (a *Account) Balance(asset ...build.Asset) float64

Balance returns the balance for given asset

func (*Account) GetKeypair

func (a *Account) GetKeypair() keypair.KP

GetKeypair returns the keypair for account

func (*Account) Info

func (a *Account) Info() horizon.Account

Info returns the Account information

func (*Account) Reload

func (a *Account) Reload() *Account

Reload invalidates current account information

func (*Account) TrustLineExists

func (a *Account) TrustLineExists(asset ...build.Asset) bool

TrustLineExists returns true if a trustline exist for given asset, and limit is possitive

type Cosigner

type Cosigner struct{}

Cosigner represents a cosigner to add to an account

func (*Cosigner) Call

func (c *Cosigner) Call(kp, cosignerKeypair *keypair.Full, weight int) (horizon.TransactionSuccess, error)

type CreateTrustline

type CreateTrustline struct{}

CreateTrustline reprents a model for creating multiple trustline for a given asset

func (*CreateTrustline) Call

Jump to

Keyboard shortcuts

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