stellar

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize added in v1.0.0

func Normalize(payment *Payment, nativeCoinIndex uint) (tx blockatlas.Tx, ok bool)

Normalize converts a Stellar-based transaction into the generic model

Types

type Client added in v1.0.0

type Client struct {
	HTTP *http.Client
	API  string
}

func (*Client) GetTxsOfAddress added in v1.0.0

func (c *Client) GetTxsOfAddress(address string) (txs []Payment, err error)

type Payment added in v1.0.0

type Payment struct {
	ID          string `json:"id"`
	Type        string `json:"type"`
	PagingToken string `json:"paging_token"`

	Links struct {
		Effects struct {
			Href string `json:"href"`
		} `json:"effects"`
		Transaction struct {
			Href string `json:"href"`
		} `json:"transaction"`
	} `json:"_links"`

	SourceAccount string `json:"source_account"`
	CreatedAt     string `json:"created_at"`

	// create_account and account_merge field
	Account string `json:"account"`

	// create_account fields
	Funder          string `json:"funder"`
	StartingBalance string `json:"starting_balance"`

	// account_merge fields
	Into string `json:"into"`

	// payment/path_payment fields
	From        string `json:"from"`
	To          string `json:"to"`
	AssetType   string `json:"asset_type"`
	AssetCode   string `json:"asset_code"`
	AssetIssuer string `json:"asset_issuer"`
	Amount      string `json:"amount"`

	// transaction fields
	TransactionHash string `json:"transaction_hash"`
	Memo            struct {
		Type  string `json:"memo_type"`
		Value string `json:"memo"`
	}
}

Payment model returned by Horizon

type PaymentsPage added in v1.0.0

type PaymentsPage struct {
	Embedded struct {
		Records []Payment
	} `json:"_embedded"`
}

PaymentsPage of payments returned by Horizon

type Platform added in v1.0.0

type Platform struct {
	CoinIndex uint
	HandleStr string
	// contains filtered or unexported fields
}

func (*Platform) Coin added in v1.0.0

func (p *Platform) Coin() coin.Coin

func (*Platform) Handle added in v1.0.0

func (p *Platform) Handle() string

func (*Platform) Init added in v1.0.0

func (p *Platform) Init() error

func (*Platform) RegisterRoutes added in v1.0.0

func (p *Platform) RegisterRoutes(router gin.IRouter)

Jump to

Keyboard shortcuts

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