xeth

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2014 License: LGPL-2.1-or-later Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToJSMessages

func ToJSMessages(messages state.Messages) *ethutil.List

Types

type Config

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

func (*Config) Exist

func (self *Config) Exist() bool

func (*Config) Get

func (self *Config) Get(name string) *Object

type JSBlock

type JSBlock struct {
	Size         string        `json:"size"`
	Number       int           `json:"number"`
	Hash         string        `json:"hash"`
	Transactions *ethutil.List `json:"transactions"`
	Uncles       *ethutil.List `json:"uncles"`
	Time         int64         `json:"time"`
	Coinbase     string        `json:"coinbase"`
	Name         string        `json:"name"`
	GasLimit     string        `json:"gasLimit"`
	GasUsed      string        `json:"gasUsed"`
	PrevHash     string        `json:"prevHash"`
	Bloom        string        `json:"bloom"`
	Raw          string        `json:"raw"`
	// contains filtered or unexported fields
}

Block interface exposed to QML

func NewJSBlock

func NewJSBlock(block *types.Block) *JSBlock

Creates a new QML Block from a chain block

func (*JSBlock) GetTransaction

func (self *JSBlock) GetTransaction(hash string) *JSTransaction

func (*JSBlock) ToString

func (self *JSBlock) ToString() string

type JSKey

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

func NewJSKey

func NewJSKey(key *crypto.KeyPair) *JSKey

type JSMessage

type JSMessage struct {
	To        string `json:"to"`
	From      string `json:"from"`
	Input     string `json:"input"`
	Output    string `json:"output"`
	Path      int32  `json:"path"`
	Origin    string `json:"origin"`
	Timestamp int32  `json:"timestamp"`
	Coinbase  string `json:"coinbase"`
	Block     string `json:"block"`
	Number    int32  `json:"number"`
	Value     string `json:"value"`
}

func NewJSMessage

func NewJSMessage(message *state.Message) JSMessage

type JSObject

type JSObject struct {
	*Object
}

func NewJSObject

func NewJSObject(object *Object) *JSObject

type JSPeer

type JSPeer 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"`
	Caps         string `json:"caps"`
	// contains filtered or unexported fields
}

func NewJSPeer

func NewJSPeer(peer core.Peer) *JSPeer

type JSReceipt

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

func NewJSReciept

func NewJSReciept(contractCreation bool, creationAddress, hash, address []byte) *JSReceipt

type JSTransaction

type JSTransaction 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 NewJSTx

func NewJSTx(tx *types.Transaction, state *state.StateDB) *JSTransaction

func (*JSTransaction) ToString

func (self *JSTransaction) ToString() string

type JSXEth

type JSXEth struct {
	*XEth
}

func NewJSXEth

func NewJSXEth(eth core.EthManager) *JSXEth

func (*JSXEth) BalanceAt

func (self *JSXEth) BalanceAt(addr string) string

func (*JSXEth) Block

func (self *JSXEth) Block(v interface{}) *JSBlock

func (*JSXEth) BlockByHash

func (self *JSXEth) BlockByHash(strHash string) *JSBlock

func (*JSXEth) BlockByNumber

func (self *JSXEth) BlockByNumber(num int32) *JSBlock

func (*JSXEth) CodeAt

func (self *JSXEth) CodeAt(address string) string

func (*JSXEth) CoinBase

func (self *JSXEth) CoinBase() string

func (*JSXEth) CompileMutan

func (self *JSXEth) CompileMutan(code string) string

func (*JSXEth) EachStorage

func (self *JSXEth) EachStorage(addr string) string

func (*JSXEth) Execute

func (self *JSXEth) Execute(addr, value, gas, price, data string) (string, error)

func (*JSXEth) FindInConfig

func (self *JSXEth) FindInConfig(str string) string

func (*JSXEth) FromAscii

func (self *JSXEth) FromAscii(str string) string

func (*JSXEth) FromNumber

func (self *JSXEth) FromNumber(str string) string

func (*JSXEth) IsContract

func (self *JSXEth) IsContract(address string) bool

func (*JSXEth) IsListening

func (self *JSXEth) IsListening() bool

func (*JSXEth) IsMining

func (self *JSXEth) IsMining() bool

func (*JSXEth) Key

func (self *JSXEth) Key() *JSKey

func (*JSXEth) NumberToHuman

func (self *JSXEth) NumberToHuman(balance string) string

func (*JSXEth) PeerCount

func (self *JSXEth) PeerCount() int

func (*JSXEth) Peers

func (self *JSXEth) Peers() []JSPeer

func (*JSXEth) PushTx

func (self *JSXEth) PushTx(txStr string) (*JSReceipt, error)

func (*JSXEth) SecretToAddress

func (self *JSXEth) SecretToAddress(key string) string

func (*JSXEth) StateObject

func (self *JSXEth) StateObject(addr string) *JSObject

func (*JSXEth) StorageAt

func (self *JSXEth) StorageAt(addr, storageAddr string) string

func (*JSXEth) ToAscii

func (self *JSXEth) ToAscii(str string) string

func (*JSXEth) Transact

func (self *JSXEth) Transact(key, toStr, valueStr, gasStr, gasPriceStr, codeStr string) (string, error)

func (*JSXEth) TxCountAt

func (self *JSXEth) TxCountAt(address string) int

type KeyVal

type KeyVal struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Object

type Object struct {
	*state.StateObject
}

func (*Object) Storage

func (self *Object) Storage(addr []byte) *ethutil.Value

func (*Object) StorageString

func (self *Object) StorageString(str string) *ethutil.Value

func (*Object) StorageValue

func (self *Object) StorageValue(addr *ethutil.Value) *ethutil.Value

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 VMEnv

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

func NewEnv

func NewEnv(state *state.StateDB, block *types.Block, value *big.Int, sender []byte) *VMEnv

func (*VMEnv) AddLog

func (self *VMEnv) AddLog(log state.Log)

func (*VMEnv) BlockHash

func (self *VMEnv) BlockHash() []byte

func (*VMEnv) BlockNumber

func (self *VMEnv) BlockNumber() *big.Int

func (*VMEnv) Call

func (self *VMEnv) Call(me vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error)

func (*VMEnv) CallCode

func (self *VMEnv) CallCode(me vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error)

func (*VMEnv) Coinbase

func (self *VMEnv) Coinbase() []byte

func (*VMEnv) Create

func (self *VMEnv) Create(me vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ClosureRef)

func (*VMEnv) Depth

func (self *VMEnv) Depth() int

func (*VMEnv) Difficulty

func (self *VMEnv) Difficulty() *big.Int

func (*VMEnv) GasLimit

func (self *VMEnv) GasLimit() *big.Int

func (*VMEnv) Origin

func (self *VMEnv) Origin() []byte

func (*VMEnv) PrevHash

func (self *VMEnv) PrevHash() []byte

func (*VMEnv) SetDepth

func (self *VMEnv) SetDepth(i int)

func (*VMEnv) State

func (self *VMEnv) State() *state.StateDB

func (*VMEnv) Time

func (self *VMEnv) Time() int64

func (*VMEnv) Transfer

func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error

func (*VMEnv) Value

func (self *VMEnv) Value() *big.Int

type VmVars

type VmVars struct {
	State *state.StateDB
}

type World

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

func NewWorld

func NewWorld(pipe *XEth) *World

func (*World) Coinbase

func (self *World) Coinbase() *state.StateObject

func (*World) Config

func (self *World) Config() *Config

func (*World) Get

func (self *World) Get(addr []byte) *Object

func (*World) IsListening

func (self *World) IsListening() bool

func (*World) IsMining

func (self *World) IsMining() bool

func (*World) Peers

func (self *World) Peers() *list.List

func (*World) SafeGet

func (self *World) SafeGet(addr []byte) *Object

func (*World) State

func (self *World) State() *state.StateDB

type XEth

type XEth struct {
	Vm VmVars
	// contains filtered or unexported fields
}

func New

func New(obj core.EthManager) *XEth

func (*XEth) Balance

func (self *XEth) Balance(addr []byte) *ethutil.Value

* State / Account accessors

func (*XEth) Block

func (self *XEth) Block(hash []byte) *types.Block

func (*XEth) CompileMutan

func (self *XEth) CompileMutan(code string) ([]byte, error)

func (*XEth) Execute

func (self *XEth) Execute(addr []byte, data []byte, value, gas, price *ethutil.Value) ([]byte, error)

* Execution helpers

func (*XEth) ExecuteObject

func (self *XEth) ExecuteObject(object *Object, data []byte, value, gas, price *ethutil.Value) ([]byte, error)

func (*XEth) Exists

func (self *XEth) Exists(addr []byte) bool

func (*XEth) Nonce

func (self *XEth) Nonce(addr []byte) uint64

func (*XEth) PushTx

func (self *XEth) PushTx(tx *types.Transaction) ([]byte, error)

func (*XEth) Storage

func (self *XEth) Storage(addr, storageAddr []byte) *ethutil.Value

func (*XEth) ToAddress

func (self *XEth) ToAddress(priv []byte) []byte

Converts the given private key to an address

func (*XEth) Transact

func (self *XEth) Transact(key *crypto.KeyPair, to []byte, value, gas, price *ethutil.Value, data []byte) (*types.Transaction, error)

func (*XEth) TransactString

func (self *XEth) TransactString(key *crypto.KeyPair, rec string, value, gas, price *ethutil.Value, data []byte) (*types.Transaction, error)

* Transactional methods

func (*XEth) World

func (self *XEth) World() *World

Jump to

Keyboard shortcuts

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