ethpub

package
v0.5.22 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2014 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EthereumConfig

func EthereumConfig(stateManager *ethchain.StateManager) helper

func FindAddressInNameReg

func FindAddressInNameReg(stateManager *ethchain.StateManager, name string) []byte

func FindNameInNameReg

func FindNameInNameReg(stateManager *ethchain.StateManager, addr []byte) string

Types

type KeyVal

type KeyVal struct {
	Key   string
	Value string
}

type PBlock

type PBlock struct {
	Number       int    `json:"number"`
	Hash         string `json:"hash"`
	Transactions string `json:"transactions"`
	Time         int64  `json:"time"`
	Coinbase     string `json:"coinbase"`
	Name         string `json:"name"`
	GasLimit     string `json:"gasLimit"`
	GasUsed      string `json:"gasUsed"`
	// contains filtered or unexported fields
}

Block interface exposed to QML

func NewPBlock

func NewPBlock(block *ethchain.Block) *PBlock

Creates a new QML Block from a chain block

func (*PBlock) GetTransaction

func (self *PBlock) GetTransaction(hash string) *PTx

func (*PBlock) ToString

func (self *PBlock) ToString() string

type PEthereum

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

func NewPEthereum

func NewPEthereum(manager ethchain.EthManager) *PEthereum

func (*PEthereum) Create

func (lib *PEthereum) Create(key, valueStr, gasStr, gasPriceStr, script string) (*PReceipt, error)

func (*PEthereum) GetBlock

func (lib *PEthereum) GetBlock(hexHash string) *PBlock

func (*PEthereum) GetCoinBase

func (lib *PEthereum) GetCoinBase() string

func (*PEthereum) GetIsListening

func (lib *PEthereum) GetIsListening() bool

func (*PEthereum) GetIsMining

func (lib *PEthereum) GetIsMining() bool

func (*PEthereum) GetKey

func (lib *PEthereum) GetKey() *PKey

func (*PEthereum) GetPeerCount

func (lib *PEthereum) GetPeerCount() int

func (*PEthereum) GetPeers

func (lib *PEthereum) GetPeers() []PPeer

func (*PEthereum) GetStateObject

func (lib *PEthereum) GetStateObject(address string) *PStateObject

func (*PEthereum) GetStorage

func (lib *PEthereum) GetStorage(address, storageAddress string) string

func (*PEthereum) GetTransactionsFor

func (lib *PEthereum) GetTransactionsFor(address string, asJson bool) interface{}

func (*PEthereum) GetTxCountAt

func (lib *PEthereum) GetTxCountAt(address string) int

func (*PEthereum) IsContract

func (lib *PEthereum) IsContract(address string) bool

func (*PEthereum) SecretToAddress

func (lib *PEthereum) SecretToAddress(key string) string

func (*PEthereum) Transact

func (lib *PEthereum) Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr string) (*PReceipt, error)

type PKey

type PKey struct {
	Address    string `json:"address"`
	PrivateKey string `json:"privateKey"`
	PublicKey  string `json:"publicKey"`
}

func NewPKey

func NewPKey(key *ethcrypto.KeyPair) *PKey

type PPeer

type PPeer struct {
	Inbound      bool   `json:"isInbound"`
	LastSend     int64  `json:"lastSend"`
	LastPong     int64  `json:"lastPong"`
	Ip           string `json:"ip"`
	Port         int    `json:"port"`
	Version      string `json:"version"`
	LastResponse string `json:"lastResponse"`
	Latency      string `json:"latency"`
	// contains filtered or unexported fields
}

func NewPPeer

func NewPPeer(peer ethchain.Peer) *PPeer

type PReceipt

type PReceipt struct {
	CreatedContract bool   `json:"createdContract"`
	Address         string `json:"address"`
	Hash            string `json:"hash"`
	Sender          string `json:"sender"`
}

func NewPReciept

func NewPReciept(contractCreation bool, creationAddress, hash, address []byte) *PReceipt

type PStateObject

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

func NewPStateObject

func NewPStateObject(object *ethchain.StateObject) *PStateObject

func (*PStateObject) Address

func (c *PStateObject) Address() string

func (*PStateObject) EachStorage

func (self *PStateObject) EachStorage(cb ethtrie.EachCallback)

func (*PStateObject) GetStorage

func (c *PStateObject) GetStorage(address string) string

func (*PStateObject) HexScript

func (c *PStateObject) HexScript() string

func (*PStateObject) IsContract

func (c *PStateObject) IsContract() bool

func (*PStateObject) Nonce

func (c *PStateObject) Nonce() int

func (*PStateObject) Root

func (c *PStateObject) Root() string

func (*PStateObject) Script

func (c *PStateObject) Script() string

func (*PStateObject) StateKeyVal

func (c *PStateObject) StateKeyVal(asJson bool) interface{}

func (*PStateObject) Value

func (c *PStateObject) Value() string

type PStorageState

type PStorageState struct {
	StateAddress string
	Address      string
	Value        string
}

func NewPStorageState

func NewPStorageState(storageObject *ethchain.StorageState) *PStorageState

type PTx

type PTx struct {
	Value           string `json:"value"`
	Gas             string `json:"gas"`
	GasPrice        string `json:"gasPrice"`
	Hash            string `json:"hash"`
	Address         string `json:"address"`
	Sender          string `json:"sender"`
	RawData         string `json:"rawData"`
	Data            string `json:"data"`
	Contract        bool   `json:"isContract"`
	CreatesContract bool   `json:"createsContract"`
	Confirmations   int    `json:"confirmations"`
	// contains filtered or unexported fields
}

func NewPTx

func NewPTx(tx *ethchain.Transaction) *PTx

func (*PTx) ToString

func (self *PTx) ToString() string

Jump to

Keyboard shortcuts

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