oasis

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeTx

func NormalizeTx(srcTx Transaction) types.Tx

func NormalizeTxs

func NormalizeTxs(srcTxs []Transaction) types.Txs

Types

type Block

type Block struct {
	Height    int64  `json:"height"`
	Hash      string `json:"hash"`
	Timestamp int64  `json:"timestamp"`
}

type BlockRequest

type BlockRequest struct {
	BlockIdentifier int64 `json:"block_identifier"`
}

type Client

type Client struct {
	client.Request
}

func (*Client) GetBlockByNumber

func (c *Client) GetBlockByNumber(num int64) (*[]Transaction, error)

func (*Client) GetCurrentBlock

func (c *Client) GetCurrentBlock() (int64, error)

func (*Client) GetTrxOfAddress

func (c *Client) GetTrxOfAddress(address string) (*[]Transaction, error)

type Platform

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

func Init

func Init(api string) *Platform

func (*Platform) Coin

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

func (*Platform) CurrentBlockNumber

func (p *Platform) CurrentBlockNumber() (int64, error)

func (*Platform) GetBlockByNumber

func (p *Platform) GetBlockByNumber(num int64) (*types.Block, error)

func (*Platform) GetTxsByAddress

func (p *Platform) GetTxsByAddress(address string) (types.Txs, error)

type Transaction

type Transaction struct {
	Hash     string `json:"tx_hash"`
	From     string `json:"from"`
	To       string `json:"to"`
	Amount   string `json:"amount"`
	Fee      string `json:"fee"`
	Date     int64  `json:"date"`
	Block    uint64 `json:"block"`
	Success  bool   `json:"success"`
	ErrorMsg string `json:"error_message,omitempty"`
	Sequence uint64 `json:"sequence"`
}

type TransactionsByAddressRequest

type TransactionsByAddressRequest struct {
	Address string `json:"address"`
}

Jump to

Keyboard shortcuts

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