theta

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

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

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

func Init(api, key string) *Platform

func (*Platform) Coin

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

func (*Platform) GetTokenTxsByAddress

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

func (*Platform) GetTxsByAddress

func (p *Platform) GetTxsByAddress(address string) (types.Txs, 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