query

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2018 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrBadAfter means malformed pagination parameter.
	ErrBadAfter = errors.New("malformed pagination parameter after")
	//ErrParameterCountMismatch means wrong number of parameters to query.
	ErrParameterCountMismatch = errors.New("wrong number of parameters to query")
)

Functions

func ValidateTransactionFilter added in v0.2.0

func ValidateTransactionFilter(filt string) error

ValidateTransactionFilter verify txfeed filter validity.

Types

type AccountKey

type AccountKey struct {
	RootXPub              chainkd.XPub         `json:"root_xpub"`
	AccountXPub           chainkd.XPub         `json:"account_xpub"`
	AccountDerivationPath []chainjson.HexBytes `json:"account_derivation_path"`
}

AccountKey means an account key.

type AnnotatedAccount

type AnnotatedAccount struct {
	ID     string           `json:"id"`
	Alias  string           `json:"alias,omitempty"`
	Keys   []*AccountKey    `json:"keys"`
	Quorum int              `json:"quorum"`
	Tags   *json.RawMessage `json:"tags"`
}

AnnotatedAccount means an annotated account.

type AnnotatedAsset

type AnnotatedAsset struct {
	ID              bc.AssetID         `json:"id"`
	Alias           string             `json:"alias,omitempty"`
	IssuanceProgram chainjson.HexBytes `json:"issuance_program"`
	Keys            []*AssetKey        `json:"keys"`
	Quorum          int                `json:"quorum"`
	Definition      *json.RawMessage   `json:"definition"`
	Tags            *json.RawMessage   `json:"tags"`
}

AnnotatedAsset means an annotated asset.

type AnnotatedInput

type AnnotatedInput struct {
	Type            string             `json:"type"`
	AssetID         bc.AssetID         `json:"asset_id"`
	AssetAlias      string             `json:"asset_alias,omitempty"`
	AssetDefinition *json.RawMessage   `json:"asset_definition"`
	Amount          uint64             `json:"amount"`
	IssuanceProgram chainjson.HexBytes `json:"issuance_program,omitempty"`
	ControlProgram  chainjson.HexBytes `json:"-"`
	SpentOutputID   *bc.Hash           `json:"spent_output_id,omitempty"`
	AccountID       string             `json:"account_id,omitempty"`
	AccountAlias    string             `json:"account_alias,omitempty"`
	ReferenceData   *json.RawMessage   `json:"reference_data"`
	Arbitrary       chainjson.HexBytes `json:"arbitrary,omitempty"`
}

AnnotatedInput means an annotated transaction input.

type AnnotatedOutput

type AnnotatedOutput struct {
	Type            string             `json:"type"`
	OutputID        bc.Hash            `json:"id"`
	TransactionID   *bc.Hash           `json:"transaction_id,omitempty"`
	Position        int                `json:"position"`
	AssetID         bc.AssetID         `json:"asset_id"`
	AssetAlias      string             `json:"asset_alias,omitempty"`
	AssetDefinition *json.RawMessage   `json:"asset_definition"`
	Amount          uint64             `json:"amount"`
	AccountID       string             `json:"account_id,omitempty"`
	AccountAlias    string             `json:"account_alias,omitempty"`
	ControlProgram  chainjson.HexBytes `json:"control_program"`
	ReferenceData   *json.RawMessage   `json:"reference_data"`
}

AnnotatedOutput means an annotated transaction output.

type AnnotatedTx

type AnnotatedTx struct {
	ID                     bc.Hash            `json:"id"`
	Timestamp              time.Time          `json:"timestamp"`
	BlockID                bc.Hash            `json:"block_id"`
	BlockHeight            uint64             `json:"block_height"`
	Position               uint32             `json:"position"`
	BlockTransactionsCount uint32             `json:"block_transactions_count,omitempty"`
	ReferenceData          *json.RawMessage   `json:"reference_data"`
	Inputs                 []*AnnotatedInput  `json:"inputs"`
	Outputs                []*AnnotatedOutput `json:"outputs"`
	StatusFail             bool               `json:"status_fail"`
}

AnnotatedTx means an annotated transaction.

type AssetKey

type AssetKey struct {
	RootXPub            chainkd.XPub         `json:"root_xpub"`
	AssetPubkey         chainjson.HexBytes   `json:"asset_pubkey"`
	AssetDerivationPath []chainjson.HexBytes `json:"asset_derivation_path"`
}

AssetKey means an asset key.

type TxAfter

type TxAfter struct {
	// FromBlockHeight and FromPosition uniquely identify the last transaction returned
	// by a list-transactions query.
	//
	// If list-transactions is called with a time range instead of an `after`, these fields
	// are populated with the position of the transaction at the start of the time range.
	FromBlockHeight uint64 // exclusive
	FromPosition    uint32 // exclusive

	// StopBlockHeight identifies the last block that should be included in a transaction
	// list. It is used when list-transactions is called with a time range instead
	// of an `after`.
	StopBlockHeight uint64 // inclusive
}

TxAfter means the last query block by a list-transactions query.

func DecodeTxAfter

func DecodeTxAfter(str string) (c TxAfter, err error)

DecodeTxAfter decode tx from the last block.

func (TxAfter) String

func (after TxAfter) String() string

Directories

Path Synopsis
Package filter parses and evaluates Chain filter expressions.
Package filter parses and evaluates Chain filter expressions.

Jump to

Keyboard shortcuts

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