transaction

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TransactionGoToCapn

func TransactionGoToCapn(seg *capn.Segment, src *Transaction) capnp.TransactionCapn

TransactionGoToCapn is a helper function to copy fields from a Transaction object to a TransactionCapn object

Types

type Transaction

type Transaction struct {
	Nonce     uint64   `capid:"0"`
	Value     *big.Int `capid:"1"`
	RcvAddr   []byte   `capid:"2"`
	SndAddr   []byte   `capid:"3"`
	GasPrice  uint64   `capid:"4"`
	GasLimit  uint64   `capid:"5"`
	Data      []byte   `capid:"6"`
	Signature []byte   `capid:"7"`
	Challenge []byte   `capid:"8"`
}

Transaction holds all the data needed for a value transfer

func TransactionCapnToGo

func TransactionCapnToGo(src capnp.TransactionCapn, dest *Transaction) *Transaction

TransactionCapnToGo is a helper function to copy fields from a TransactionCapn object to a Transaction object

func (*Transaction) Load

func (tx *Transaction) Load(r io.Reader) error

Load loads the data from the stream into a Transaction object through Capnp protocol

func (*Transaction) Save

func (tx *Transaction) Save(w io.Writer) error

Save saves the serialized data of a Transaction into a stream through Capnp protocol

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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