meta

package
v0.0.0-...-bd458c8 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package meta provides helpers for processing the metadata that is produced by stellar-core while processing transactions.

Index

Constants

This section is empty.

Variables

View Source
var ErrMetaNotFound = errors.New("meta: no changes found")

ErrMetaNotFound is returned when no meta that matches a provided filter can be found.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	FeeMeta         xdr.LedgerEntryChanges
	TransactionMeta xdr.TransactionMeta
}

Bundle represents all of the metadata emitted from the application of a single stellar transaction; Both fee meta and result meta is included.

func (*Bundle) Changes

func (b *Bundle) Changes(target xdr.LedgerKey) (ret []xdr.LedgerEntryChange)

Changes returns any changes within the bundle that apply to the entry identified by `key`.

func (*Bundle) InitialState

func (b *Bundle) InitialState(key xdr.LedgerKey) (*xdr.LedgerEntry, error)

InitialState returns the initial state of the LedgerEntry identified by `key` just prior to the application of the transaction the produced `b`. Returns nil if the ledger entry did not exist prior to the bundle.

func (*Bundle) OperationsMetas

func (b *Bundle) OperationsMetas() []xdr.OperationMeta

OperationMetas retrieves all operation metas from a transaction bundle

func (*Bundle) StateAfter

func (b *Bundle) StateAfter(key xdr.LedgerKey, opidx int) (*xdr.LedgerEntry, error)

StateAfter returns the state of entry `key` after the application of the operation at `opidx`

func (*Bundle) StateBefore

func (b *Bundle) StateBefore(key xdr.LedgerKey, opidx int) (*xdr.LedgerEntry, error)

StateBefore returns the state of entry `key` just prior to the application of the operation at `opidx`

Jump to

Keyboard shortcuts

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