vechain

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: 13 Imported by: 1

Documentation

Index

Constants

View Source
const Handle = "vechain"
View Source
const VeThorContract = "0x0000000000000000000000000000456E65726779"
View Source
const VeThorContractLow = "0x0000000000000000000000000000456e65726779"

Variables

This section is empty.

Functions

func NormalizeTokenTransfer

func NormalizeTokenTransfer(t *TokenTransfer) (tx blockatlas.Tx, ok bool)

func NormalizeTransfer

func NormalizeTransfer(receipt *TransferReceipt, clause *Clause) (tx blockatlas.Tx, ok bool)

Types

type Clause

type Clause struct {
	To    string `json:"to"`
	Value string `json:"value"`
}

type Client

type Client struct {
	HTTPClient *http.Client
	URL        string
}

func (*Client) GetAddressTransactions

func (c *Client) GetAddressTransactions(address string) (TransferTx, error)

func (*Client) GetTokenTransferTransactions

func (c *Client) GetTokenTransferTransactions(address string) (TokenTransferTxs, error)

func (*Client) GetTransactionReceipt

func (c *Client) GetTransactionReceipt(cn chan<- TransferReceipt, id string)

type Meta

type Meta struct {
	BlockID        string `json:"blockID"`
	BlockNumber    int    `json:"blockNumber"`
	BlockTimestamp int    `json:"blockTimestamp"`
	TxID           string `json:"txID"`
	TxOrigin       string `json:"txOrigin"`
}

type Platform

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

func (*Platform) Coin

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

func (*Platform) GetAddressTransactions

func (p *Platform) GetAddressTransactions(address string, token string) []blockatlas.Tx

func (*Platform) Handle

func (p *Platform) Handle() string

func (*Platform) Init

func (p *Platform) Init() error

func (*Platform) RegisterRoutes

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

type Receipt

type Receipt struct {
	Paid string `json:"paid"`
}

type TokenTransfer

type TokenTransfer struct {
	Amount          string `json:"amount"`
	Block           uint64 `json:"block"`
	ContractAddress string `json:"contractAddress"`
	Origin          string `json:"origin"`
	Receiver        string `json:"receiver"`
	Timestamp       int64  `json:"timestamp"`
	TxID            string `json:"txId"`
}

type TokenTransferTxs

type TokenTransferTxs struct {
	TokenTransfers []TokenTransfer `json:"tokenTransfers"`
}

type TransferReceipt

type TransferReceipt struct {
	Block     uint64   `json:"block"`
	Clauses   []Clause `json:"clauses"`
	ID        string   `json:"id"`
	Nonce     string   `json:"nonce"`
	Origin    string   `json:"origin"`
	Receipt   Receipt  `json:"receipt"`
	Timestamp uint64   `json:"timestamp"`
}

type TransferTx

type TransferTx struct {
	Transactions []Tx `json:"transactions"`
}

type Tx

type Tx struct {
	ID string `json:"id"`
}

Jump to

Keyboard shortcuts

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