types

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: CC0-1.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue chan int64

Queue is a simple type alias for a (buffered) channel of block heights.

func NewQueue

func NewQueue(size int) Queue

type Signature

type Signature struct {
	auth.StdSignature
	Address string `json:"address,omitempty"`
}

Signature wraps auth.StdSignature adding the address of the signer

type Tx

type Tx struct {
	sdk.TxResponse
	Messages   []sdk.Msg   `json:"messages"`
	Fee        auth.StdFee `json:"fee"`
	Signatures []Signature `json:"signatures"`
	Memo       string      `json:"memo"`
}

Tx represents an already existing blockchain transaction

func NewTx

func NewTx(txResponse sdk.TxResponse) (*Tx, error)

NewTx allows to create a new Tx instance from the given txResponse

func (Tx) FindAttributeByKey

func (tx Tx) FindAttributeByKey(event sdk.StringEvent, attrKey string) (string, error)

FindAttributeByKey searches inside the specified event of the given tx to find the attribute having the given key. If the specified event does not contain a such attribute, returns an error instead.

func (Tx) FindEventByType

func (tx Tx) FindEventByType(index int, eventType string) (sdk.StringEvent, error)

FindEventByType searches inside the given tx events for the message having the specified index, in order to find the event having the given type, and returns it. If no such event is found, returns an error instead.

func (Tx) Successful

func (tx Tx) Successful() bool

Successful tells whether this tx is successful or not

Jump to

Keyboard shortcuts

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