semux

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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Handle = "semux"

Variables

This section is empty.

Functions

func Normalize

func Normalize(srcTx *Tx) (tx blockatlas.Tx, err error)

Normalize converts a semux transaction into the generic model

Types

type Account

type Account struct {
	Available               blockatlas.Amount `json:"available"`
	Locked                  blockatlas.Amount `json:"locked"`
	Nonce                   string            `json:"nonce"`
	PendingTransactionCount uint64            `json:"pendingTransactionCount"`
	TransactionCount        uint64            `json:"transactionCount"`
}

type Client

type Client struct {
	BaseURL string
	// contains filtered or unexported fields
}

func (*Client) GetAccount

func (c *Client) GetAccount(address string) (account Account, err error)

func (*Client) GetTxsOfAddress

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

func (*Client) Init

func (c *Client) Init()

type GetAccountResponse

type GetAccountResponse struct {
	Result Account `json:"result"`
}

type GetAccountTransactionsResponse

type GetAccountTransactionsResponse struct {
	Result []Tx `json:"result"`
}

type Platform

type Platform struct {
	// contains filtered or unexported fields
}

func (*Platform) Coin

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

func (*Platform) GetTxsByAddress

func (p *Platform) GetTxsByAddress(address string) (blockatlas.TxPage, error)

func (*Platform) Handle

func (p *Platform) Handle() string

func (*Platform) Init

func (p *Platform) Init() error

type Tx

type Tx struct {
	BlockNumber string            `json:"blockNumber"`
	Data        string            `json:"data"`
	Fee         blockatlas.Amount `json:"fee"`
	From        string            `json:"from"`
	Hash        string            `json:"hash"`
	Nonce       string            `json:"nonce"`
	Timestamp   string            `json:"timestamp"`
	To          string            `json:"to"`
	Type        string            `json:"type"`
	Value       blockatlas.Amount `json:"value"`
}

Jump to

Keyboard shortcuts

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