theta

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SendTransaction = 2
)

THETA transaction types https://github.com/thetatoken/theta-mainnet-integration-guide/blob/master/docs/api.md#getblock

Variables

This section is empty.

Functions

func Normalize

func Normalize(trx *Tx, address, token string) (tx types.Tx, ok bool)

Types

type AccountTxList

type AccountTxList struct {
	Body []Tx `json:"body"`
}

Response from Explorer

type Client

type Client struct {
	client.Request
}

func (*Client) FetchAddressTransactions

func (c *Client) FetchAddressTransactions(address string) ([]Tx, error)

type Data

type Data struct {
	Fee     Fee      `json:"fee"`
	Inputs  []Input  `json:"inputs"`
	Outputs []Output `json:"outputs"`
}

type Fee

type Fee struct {
	Thetawei string `json:"thetawei"`
	Tfuelwei string `json:"tfuelwei"`
}

type Input added in v1.1.0

type Input struct {
	Address  string `json:"address"`
	Sequence string `json:"sequence"`
}

type Output

type Output struct {
	Address string `json:"address"`
	Coins   Fee    `json:"coins"`
}

type Platform

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

func Init added in v1.1.0

func Init(api string) *Platform

func (*Platform) Coin

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

func (*Platform) GetTokenTxsByAddress added in v1.0.37

func (p *Platform) GetTokenTxsByAddress(address, token string) (types.TxPage, error)

func (*Platform) GetTxsByAddress added in v1.0.37

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

type Tx

type Tx struct {
	Hash        string `json:"hash"`
	Type        int    `json:"type"`
	Data        Data   `json:"data"`
	BlockHeight string `json:"block_height"`
	Timestamp   string `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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