zilliqa

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const HRP string = "zil"

Variables

This section is empty.

Functions

func EncodeKeyHashToAddress added in v1.0.37

func EncodeKeyHashToAddress(keyHash []byte) string

func EncodePublicKeyToAddress added in v1.0.37

func EncodePublicKeyToAddress(hexString string) string

func Normalize

func Normalize(srcTx *Tx) (tx blockatlas.Tx)

Types

type BlockTxRpc added in v1.1.0

type BlockTxRpc struct {
	JsonRpc string               `json:"jsonrpc"`
	Error   *blockatlas.RpcError `json:"error,omitempty"`
	Result  BlockTxs             `json:"result,omitempty"`
	Id      string               `json:"id,omitempty"`
}

type BlockTxs added in v1.1.0

type BlockTxs [][]string

type ChainInfo added in v1.0.37

type ChainInfo struct {
	NumTxBlocks string `json:"NumTxBlocks"`
}

type Client

type Client struct {
	blockatlas.Request
}

func (*Client) GetTxsOfAddress

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

func (*Client) LookupName added in v1.0.37

func (c *Client) LookupName(name string) (response ZNSResponse, err error)

type HashesResponse added in v1.1.6

type HashesResponse struct {
	ID      int        `json:"id"`
	Jsonrpc string     `json:"jsonrpc"`
	Result  [][]string `json:"result"`
}

func (HashesResponse) Txs added in v1.1.6

func (h HashesResponse) Txs() []string

type Platform

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

func Init added in v1.1.0

func Init(api, apiKey, rpc, udClient string) *Platform

func (*Platform) CanHandle added in v1.1.4

func (p *Platform) CanHandle(name string) bool

func (*Platform) Coin

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

func (*Platform) CurrentBlockNumber added in v1.0.37

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

func (*Platform) GetBlockByNumber added in v1.0.37

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

func (*Platform) GetTxsByAddress

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

func (*Platform) Lookup added in v1.0.37

func (p *Platform) Lookup(coins []uint64, name string) ([]blockatlas.Resolved, error)

type RpcClient added in v1.0.37

type RpcClient struct {
	blockatlas.Request
}

func (*RpcClient) GetBlockByNumber added in v1.1.0

func (c *RpcClient) GetBlockByNumber(number int64) ([]string, error)

func (*RpcClient) GetBlockchainInfo added in v1.0.37

func (c *RpcClient) GetBlockchainInfo() (info *ChainInfo, err error)

func (*RpcClient) GetTx added in v1.0.37

func (c *RpcClient) GetTx(hash string) (tx TxRPC, err error)

func (*RpcClient) GetTxInBlock added in v1.0.37

func (c *RpcClient) GetTxInBlock(number int64) ([]Tx, error)

type Tx

type Tx struct {
	Hash           string      `json:"hash"`
	BlockHeight    uint64      `json:"blockHeight"`
	From           string      `json:"from"`
	To             string      `json:"to"`
	Value          string      `json:"value"`
	Fee            string      `json:"fee"`
	Timestamp      int64       `json:"timestamp"`
	Signature      string      `json:"signature"`
	Nonce          interface{} `json:"nonce"`
	ReceiptSuccess bool        `json:"receiptSuccess"`
}

func (Tx) NonceValue added in v1.0.37

func (tx Tx) NonceValue() uint64

type TxRPC added in v1.0.37

type TxRPC struct {
	ID           string    `json:"ID"`
	Amount       string    `json:"amount"`
	GasLimit     string    `json:"gasLimit"`
	GasPrice     string    `json:"gasPrice"`
	Nonce        string    `json:"nonce"`
	Receipt      TxReceipt `json:"receipt"`
	SenderPubKey string    `json:"senderPubKey"`
	Signature    string    `json:"signature"`
	ToAddr       string    `json:"toAddr"`
	Version      string    `json:"version"`
}

type TxReceipt added in v1.0.37

type TxReceipt struct {
	CumulativeGas string `json:"cumulative_gas"`
	EpochNum      string `json:"epoch_num"`
	Success       bool   `json:"success"`
}

type ZNSResponse added in v1.0.37

type ZNSResponse struct {
	Addresses map[string]string
}

Jump to

Keyboard shortcuts

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