sdk

package module
v0.0.0-...-1cbeec2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

README

TrueBlocks SDKs

IMPORTANT NOTE

While we fully intend to support this portion of our repo in the future, we are currently focused on the core TrueBlocks code. We are not currently accepting PR's or issues on this repo. We will be back to this repo soon. Use at your own risk.

Table of Contents

Introduction

This repo holds auto-generated SDKs based on the TrueBlocks API. This SDK is intended for use by the core developers of TrueBlocks as we develop our own applications, and is therefore purposefully not well documented. This is so we do not create an unwanted support burden for our team. You are welcome to use the SDK, but we will do not provide technical support.

However, we do welcome issues and PR's (particularly documentation) from the community.

The SDKs

There are two SDKs so far:

Docker version

These SDKs are easiest to use with our docker version which is in a separate repo. Please see that repo for information on running with Docker.

Documentation

The TrueBlocks documentation repo builds the TrueBlocks website. See our website for the best available documentation.

Contributing

We love contributors. Please see information about our work flow before proceeding.

  1. Fork this repository into your own repo.
  2. Create a branch: git checkout -b <branch_name>.
  3. Make changes to your local branch and commit them to your forked repo: git commit -m '<commit_message>'
  4. Push back to the original branch: git push origin TrueBlocks/trueblocks-core
  5. Create the pull request.

Contact

If you have questions, comments, or complaints, please join the discussion on our discord server which is linked from our website.

List of Contributors

Thanks to the following people who have contributed to this project:

Documentation

Index

Constants

View Source
const (
	NoBF   BlocksFlow = 0
	BFFrom            = 1 << iota
	BFTo
	BFReward
)
View Source
const (
	NoCHM      ChunksMode = 0
	CMManifest            = 1 << iota
	CMIndex
	CMBlooms
	CMPins
	CMAddresses
	CMAppearances
	CMStats
)
View Source
const (
	NoCOM  ConfigMode = 0
	CMShow            = 1 << iota
	CMEdit
)
View Source
const (
	NoDA  DaemonApi = 0
	DAOff           = 1 << iota
	DAOn
)
View Source
const (
	NoDS  DaemonScrape = 0
	DSOff              = 1 << iota
	DSBlooms
	DSIndex
)
View Source
const (
	NoEF ExportFlow = 0
	EFIn            = 1 << iota
	EFOut
	EFZero
)
View Source
const (
	NoSLP SlurpParts = 0
	SPExt            = 1 << iota
	SPInt
	SPToken
	SPNfts
	SP1155
	SPMiner
	SPUncles
	SPWithdrawals
	SLPSome = SPExt | SPInt | SPToken | SPNfts
	SLPAll  = SPExt | SPInt | SPToken | SPNfts | SP1155 | SPMiner | SPUncles | SPWithdrawals
)
View Source
const (
	NoSS        SlurpSource = 0
	SSEtherscan             = 1 << iota
	SSKey
	SSCovalent
	SSAlchemy
)
View Source
const (
	NoSTP     StateParts = 0
	SPBalance            = 1 << iota
	SPNonce
	SPCode
	SPProxy
	SPDeployed
	SPAccttype
	STPSome = SPBalance | SPProxy | SPDeployed | SPAccttype
	STPAll  = SPBalance | SPNonce | SPCode | SPProxy | SPDeployed | SPAccttype
)
View Source
const (
	NoSM    StatusModes = 0
	SMIndex             = 1 << iota
	SMBlooms
	SMBlocks
	SMTransactions
	SMTraces
	SMLogs
	SMStatements
	SMResults
	SMState
	SMTokens
	SMMonitors
	SMNames
	SMAbis
	SMSlurps
	SMStaging
	SMUnripe
	SMMaps
	SMSome = SMIndex | SMBlooms | SMBlocks | SMTransactions
	SMAll  = SMIndex | SMBlooms | SMBlocks | SMTransactions | SMTraces | SMLogs | SMStatements | SMResults | SMState | SMTokens | SMMonitors | SMNames | SMAbis | SMSlurps | SMStaging | SMUnripe | SMMaps
)
View Source
const (
	NoTP   TokensParts = 0
	TPName             = 1 << iota
	TPSymbol
	TPDecimals
	TPTotalSupply
	TPVersion
	TPSome = TPName | TPSymbol | TPDecimals | TPTotalSupply
	TPAll  = TPName | TPSymbol | TPDecimals | TPTotalSupply | TPVersion
)
View Source
const (
	NoTF   TransactionsFlow = 0
	TFFrom                  = 1 << iota
	TFTo
)

Variables

This section is empty.

Functions

func GetAbisOptions

func GetAbisOptions(args []string) (*abisOptionsInternal, error)

GetAbisOptions returns a filled-in options instance given a string array of arguments.

func GetBlocksOptions

func GetBlocksOptions(args []string) (*blocksOptionsInternal, error)

GetBlocksOptions returns a filled-in options instance given a string array of arguments.

func GetChunksOptions

func GetChunksOptions(args []string) (*chunksOptionsInternal, error)

GetChunksOptions returns a filled-in options instance given a string array of arguments.

func GetConfigOptions

func GetConfigOptions(args []string) (*configOptionsInternal, error)

GetConfigOptions returns a filled-in options instance given a string array of arguments.

func GetDaemonOptions

func GetDaemonOptions(args []string) (*daemonOptionsInternal, error)

GetDaemonOptions returns a filled-in options instance given a string array of arguments.

func GetExportOptions

func GetExportOptions(args []string) (*exportOptionsInternal, error)

GetExportOptions returns a filled-in options instance given a string array of arguments.

func GetInitOptions

func GetInitOptions(args []string) (*initOptionsInternal, error)

GetInitOptions returns a filled-in options instance given a string array of arguments.

func GetListOptions

func GetListOptions(args []string) (*listOptionsInternal, error)

GetListOptions returns a filled-in options instance given a string array of arguments.

func GetLogsOptions

func GetLogsOptions(args []string) (*logsOptionsInternal, error)

GetLogsOptions returns a filled-in options instance given a string array of arguments.

func GetMetaData

func GetMetaData(chain string) (*types.MetaData, error)

func GetMonitorsOptions

func GetMonitorsOptions(args []string) (*monitorsOptionsInternal, error)

GetMonitorsOptions returns a filled-in options instance given a string array of arguments.

func GetNamesOptions

func GetNamesOptions(args []string) (*namesOptionsInternal, error)

GetNamesOptions returns a filled-in options instance given a string array of arguments.

func GetReceiptsOptions

func GetReceiptsOptions(args []string) (*receiptsOptionsInternal, error)

GetReceiptsOptions returns a filled-in options instance given a string array of arguments.

func GetSlurpOptions

func GetSlurpOptions(args []string) (*slurpOptionsInternal, error)

GetSlurpOptions returns a filled-in options instance given a string array of arguments.

func GetStateOptions

func GetStateOptions(args []string) (*stateOptionsInternal, error)

GetStateOptions returns a filled-in options instance given a string array of arguments.

func GetStatusOptions

func GetStatusOptions(args []string) (*statusOptionsInternal, error)

GetStatusOptions returns a filled-in options instance given a string array of arguments.

func GetTokensOptions

func GetTokensOptions(args []string) (*tokensOptionsInternal, error)

GetTokensOptions returns a filled-in options instance given a string array of arguments.

func GetTracesOptions

func GetTracesOptions(args []string) (*tracesOptionsInternal, error)

GetTracesOptions returns a filled-in options instance given a string array of arguments.

func GetTransactionsOptions

func GetTransactionsOptions(args []string) (*transactionsOptionsInternal, error)

GetTransactionsOptions returns a filled-in options instance given a string array of arguments.

func GetWhenOptions

func GetWhenOptions(args []string) (*whenOptionsInternal, error)

GetWhenOptions returns a filled-in options instance given a string array of arguments.

Types

type AbisOptions

type AbisOptions struct {
	Addrs    []string     `json:"addrs,omitempty"`
	Known    bool         `json:"known,omitempty"`
	ProxyFor base.Address `json:"proxyFor,omitempty"`
	Hint     []string     `json:"hint,omitempty"`
	Globals
}

func (*AbisOptions) Abis

func (opts *AbisOptions) Abis() ([]types.Function, *types.MetaData, error)

Abis implements the chifra abis command.

func (*AbisOptions) AbisEncode

func (opts *AbisOptions) AbisEncode(val string) ([]types.Function, *types.MetaData, error)

AbisEncode implements the chifra abis --encode command.

func (*AbisOptions) AbisFind

func (opts *AbisOptions) AbisFind(val []string) ([]types.Function, *types.MetaData, error)

AbisFind implements the chifra abis --find command.

func (AbisOptions) String

func (opts AbisOptions) String() string

String implements the stringer interface

type BlocksFlow

type BlocksFlow int

func (BlocksFlow) String

func (v BlocksFlow) String() string

type BlocksOptions

type BlocksOptions struct {
	BlockIds    []string   `json:"blocks,omitempty"`
	Flow        BlocksFlow `json:"flow,omitempty"`
	Emitter     []string   `json:"emitter,omitempty"`
	Topic       []string   `json:"topic,omitempty"`
	Articulate  bool       `json:"articulate,omitempty"`
	CacheTxs    bool       `json:"cacheTxs,omitempty"`
	CacheTraces bool       `json:"cacheTraces,omitempty"`
	Globals
}

func (*BlocksOptions) Blocks

func (opts *BlocksOptions) Blocks() ([]types.Block, *types.MetaData, error)

Blocks implements the chifra blocks command.

func (*BlocksOptions) BlocksCount

func (opts *BlocksOptions) BlocksCount() ([]types.BlockCount, *types.MetaData, error)

BlocksCount implements the chifra blocks --count command.

func (*BlocksOptions) BlocksHashes

func (opts *BlocksOptions) BlocksHashes() ([]types.LightBlock, *types.MetaData, error)

BlocksHashes implements the chifra blocks --hashes command.

func (*BlocksOptions) BlocksLogs

func (opts *BlocksOptions) BlocksLogs() ([]types.Log, *types.MetaData, error)

BlocksLogs implements the chifra blocks --logs command.

func (*BlocksOptions) BlocksTraces

func (opts *BlocksOptions) BlocksTraces() ([]types.Trace, *types.MetaData, error)

BlocksTraces implements the chifra blocks --traces command.

func (*BlocksOptions) BlocksUncles

func (opts *BlocksOptions) BlocksUncles() ([]types.LightBlock, *types.MetaData, error)

BlocksUncles implements the chifra blocks --uncles command.

func (*BlocksOptions) BlocksUniq

func (opts *BlocksOptions) BlocksUniq() ([]types.Appearance, *types.MetaData, error)

BlocksUniq implements the chifra blocks --uniq command.

func (*BlocksOptions) BlocksWithdrawals

func (opts *BlocksOptions) BlocksWithdrawals() ([]types.Withdrawal, *types.MetaData, error)

BlocksWithdrawals implements the chifra blocks --withdrawals command.

func (BlocksOptions) String

func (opts BlocksOptions) String() string

String implements the stringer interface

type CacheOp

type CacheOp uint8
const (
	CacheOn CacheOp = iota
	CacheOff
	Decache
)

type Cacher

type Cacher interface {
	Caching(op CacheOp)
}

type ChunksMode

type ChunksMode int

func (ChunksMode) String

func (v ChunksMode) String() string

type ChunksOptions

type ChunksOptions struct {
	BlockIds   []string     `json:"blocks,omitempty"`
	Check      bool         `json:"check,omitempty"`
	Pin        bool         `json:"pin,omitempty"`
	Publish    bool         `json:"publish,omitempty"`
	Publisher  base.Address `json:"publisher,omitempty"`
	Remote     bool         `json:"remote,omitempty"`
	Belongs    []string     `json:"belongs,omitempty"`
	FirstBlock base.Blknum  `json:"firstBlock,omitempty"`
	LastBlock  base.Blknum  `json:"lastBlock,omitempty"`
	MaxAddrs   uint64       `json:"maxAddrs,omitempty"`
	Deep       bool         `json:"deep,omitempty"`
	Rewrite    bool         `json:"rewrite,omitempty"`
	List       bool         `json:"list,omitempty"`
	Unpin      bool         `json:"unpin,omitempty"`
	Count      bool         `json:"count,omitempty"`
	Sleep      float64      `json:"sleep,omitempty"`
	Globals
}

func (*ChunksOptions) ChunksAddresses

func (opts *ChunksOptions) ChunksAddresses() ([]types.ChunkAddress, *types.MetaData, error)

ChunksAddresses implements the chifra chunks addresses command.

func (*ChunksOptions) ChunksAppearances

func (opts *ChunksOptions) ChunksAppearances() ([]types.ChunkAppearance, *types.MetaData, error)

ChunksAppearances implements the chifra chunks appearances command.

func (*ChunksOptions) ChunksBlooms

func (opts *ChunksOptions) ChunksBlooms() ([]types.ChunkBloom, *types.MetaData, error)

ChunksBlooms implements the chifra chunks blooms command.

func (*ChunksOptions) ChunksDiff

func (opts *ChunksOptions) ChunksDiff() ([]types.Message, *types.MetaData, error)

ChunksDiff implements the chifra chunks --diff command.

func (*ChunksOptions) ChunksIndex

func (opts *ChunksOptions) ChunksIndex() ([]types.ChunkIndex, *types.MetaData, error)

ChunksIndex implements the chifra chunks index command.

func (*ChunksOptions) ChunksManifest

func (opts *ChunksOptions) ChunksManifest() ([]types.ChunkManifest, *types.MetaData, error)

ChunksManifest implements the chifra chunks manifest command.

func (*ChunksOptions) ChunksPins

func (opts *ChunksOptions) ChunksPins() ([]types.ChunkPin, *types.MetaData, error)

ChunksPins implements the chifra chunks pins command.

func (*ChunksOptions) ChunksStats

func (opts *ChunksOptions) ChunksStats() ([]types.ChunkStats, *types.MetaData, error)

ChunksStats implements the chifra chunks stats command.

func (*ChunksOptions) ChunksTag

func (opts *ChunksOptions) ChunksTag(val string) ([]types.Message, *types.MetaData, error)

ChunksTag implements the chifra chunks --tag command.

func (*ChunksOptions) ChunksTruncate

func (opts *ChunksOptions) ChunksTruncate(val base.Blknum) ([]types.Message, *types.MetaData, error)

ChunksTruncate implements the chifra chunks --truncate command.

func (ChunksOptions) String

func (opts ChunksOptions) String() string

String implements the stringer interface

type ConfigMode

type ConfigMode int

func (ConfigMode) String

func (v ConfigMode) String() string

type ConfigOptions

type ConfigOptions struct {
	Mode ConfigMode `json:"mode,omitempty"`
	Globals
}

func (*ConfigOptions) ConfigPaths

func (opts *ConfigOptions) ConfigPaths() ([]types.CacheItem, *types.MetaData, error)

ConfigPaths implements the chifra config --paths command.

func (ConfigOptions) String

func (opts ConfigOptions) String() string

String implements the stringer interface

type DaemonApi

type DaemonApi int

func (DaemonApi) String

func (v DaemonApi) String() string

type DaemonOptions

type DaemonOptions struct {
	Url     string       `json:"url,omitempty"`
	Api     DaemonApi    `json:"api,omitempty"`
	Scrape  DaemonScrape `json:"scrape,omitempty"`
	Monitor bool         `json:"monitor,omitempty"`
	Grpc    bool         `json:"grpc,omitempty"`
	Silent  bool         `json:"silent,omitempty"`
	Globals
}

func NewDaemon

func NewDaemon(url string) *DaemonOptions

func (*DaemonOptions) Start

func (opts *DaemonOptions) Start(ready chan<- bool)

EXISTING_CODE

func (DaemonOptions) String

func (opts DaemonOptions) String() string

String implements the stringer interface

type DaemonScrape

type DaemonScrape int

func (DaemonScrape) String

func (v DaemonScrape) String() string

type ExportFlow

type ExportFlow int

func (ExportFlow) String

func (v ExportFlow) String() string

type ExportOptions

type ExportOptions struct {
	Addrs       []string    `json:"addrs,omitempty"`
	Topics      []string    `json:"topics,omitempty"`
	Fourbytes   []string    `json:"fourbytes,omitempty"`
	Accounting  bool        `json:"accounting,omitempty"`
	Articulate  bool        `json:"articulate,omitempty"`
	CacheTraces bool        `json:"cacheTraces,omitempty"`
	FirstRecord uint64      `json:"firstRecord,omitempty"`
	MaxRecords  uint64      `json:"maxRecords,omitempty"`
	Relevant    bool        `json:"relevant,omitempty"`
	Emitter     []string    `json:"emitter,omitempty"`
	Topic       []string    `json:"topic,omitempty"`
	Reverted    bool        `json:"reverted,omitempty"`
	Asset       []string    `json:"asset,omitempty"`
	Flow        ExportFlow  `json:"flow,omitempty"`
	Factory     bool        `json:"factory,omitempty"`
	Unripe      bool        `json:"unripe,omitempty"`
	Reversed    bool        `json:"reversed,omitempty"`
	NoZero      bool        `json:"noZero,omitempty"`
	FirstBlock  base.Blknum `json:"firstBlock,omitempty"`
	LastBlock   base.Blknum `json:"lastBlock,omitempty"`
	Globals
}

func (*ExportOptions) Export

func (opts *ExportOptions) Export() ([]types.Transaction, *types.MetaData, error)

Export implements the chifra export command.

func (*ExportOptions) ExportAppearances

func (opts *ExportOptions) ExportAppearances() ([]types.Appearance, *types.MetaData, error)

ExportAppearances implements the chifra export --appearances command.

func (*ExportOptions) ExportBalances

func (opts *ExportOptions) ExportBalances() ([]types.State, *types.MetaData, error)

ExportBalances implements the chifra export --balances command.

func (*ExportOptions) ExportCount

func (opts *ExportOptions) ExportCount() ([]types.Monitor, *types.MetaData, error)

ExportCount implements the chifra export --count command.

func (*ExportOptions) ExportLogs

func (opts *ExportOptions) ExportLogs() ([]types.Log, *types.MetaData, error)

ExportLogs implements the chifra export --logs command.

func (*ExportOptions) ExportNeighbors

func (opts *ExportOptions) ExportNeighbors() ([]types.Message, *types.MetaData, error)

ExportNeighbors implements the chifra export --neighbors command.

func (*ExportOptions) ExportReceipts

func (opts *ExportOptions) ExportReceipts() ([]types.Receipt, *types.MetaData, error)

ExportReceipts implements the chifra export --receipts command.

func (*ExportOptions) ExportStatements

func (opts *ExportOptions) ExportStatements() ([]types.Statement, *types.MetaData, error)

ExportStatements implements the chifra export --statements command.

func (*ExportOptions) ExportTraces

func (opts *ExportOptions) ExportTraces() ([]types.Trace, *types.MetaData, error)

ExportTraces implements the chifra export --traces command.

func (*ExportOptions) ExportWithdrawals

func (opts *ExportOptions) ExportWithdrawals() ([]types.Withdrawal, *types.MetaData, error)

ExportWithdrawals implements the chifra export --withdrawals command.

func (ExportOptions) String

func (opts ExportOptions) String() string

String implements the stringer interface

type Globals

type Globals struct {
	Ether   bool   `json:"ether,omitempty"`
	Cache   bool   `json:"cache,omitempty"`
	Decache bool   `json:"decache,omitempty"`
	Verbose bool   `json:"verbose,omitempty"`
	Chain   string `json:"chain,omitempty"`
	Output  string `json:"output,omitempty"`
	Append  bool   `json:"append,omitempty"`
}

Globals is a subset of globally available options from the command line that make sense in the SDK context

func (*Globals) Caching

func (g *Globals) Caching(op CacheOp)

func (Globals) String

func (g Globals) String() string

type InitOptions

type InitOptions struct {
	Publisher  base.Address `json:"publisher,omitempty"`
	FirstBlock base.Blknum  `json:"firstBlock,omitempty"`
	Sleep      float64      `json:"sleep,omitempty"`
	Globals
}

func (*InitOptions) InitAll

func (opts *InitOptions) InitAll() ([]types.Message, *types.MetaData, error)

InitAll implements the chifra init --all command.

func (*InitOptions) InitDryRun

func (opts *InitOptions) InitDryRun() ([]types.Message, *types.MetaData, error)

InitDryRun implements the chifra init --dryrun command.

func (*InitOptions) InitExample

func (opts *InitOptions) InitExample(val string) ([]types.Message, *types.MetaData, error)

InitExample implements the chifra init --example command.

func (InitOptions) String

func (opts InitOptions) String() string

String implements the stringer interface

type ListOptions

type ListOptions struct {
	Addrs       []string     `json:"addrs,omitempty"`
	NoZero      bool         `json:"noZero,omitempty"`
	Unripe      bool         `json:"unripe,omitempty"`
	Silent      bool         `json:"silent,omitempty"`
	FirstRecord uint64       `json:"firstRecord,omitempty"`
	MaxRecords  uint64       `json:"maxRecords,omitempty"`
	Reversed    bool         `json:"reversed,omitempty"`
	Publisher   base.Address `json:"publisher,omitempty"`
	FirstBlock  base.Blknum  `json:"firstBlock,omitempty"`
	LastBlock   base.Blknum  `json:"lastBlock,omitempty"`
	Globals
}

func (*ListOptions) List

func (opts *ListOptions) List() ([]types.Appearance, *types.MetaData, error)

List implements the chifra list command.

func (*ListOptions) ListBounds

func (opts *ListOptions) ListBounds() ([]types.Bounds, *types.MetaData, error)

ListBounds implements the chifra list --bounds command.

func (*ListOptions) ListCount

func (opts *ListOptions) ListCount() ([]types.Monitor, *types.MetaData, error)

ListCount implements the chifra list --count command.

func (ListOptions) String

func (opts ListOptions) String() string

String implements the stringer interface

type LogsOptions

type LogsOptions struct {
	TransactionIds []string `json:"transactions,omitempty"`
	Emitter        []string `json:"emitter,omitempty"`
	Topic          []string `json:"topic,omitempty"`
	Articulate     bool     `json:"articulate,omitempty"`
	Globals
}

func (*LogsOptions) Logs

func (opts *LogsOptions) Logs() ([]types.Log, *types.MetaData, error)

Logs implements the chifra logs command.

func (LogsOptions) String

func (opts LogsOptions) String() string

String implements the stringer interface

type MonitorsOptions

type MonitorsOptions struct {
	Addrs     []string `json:"addrs,omitempty"`
	Delete    bool     `json:"delete,omitempty"`
	Undelete  bool     `json:"undelete,omitempty"`
	Remove    bool     `json:"remove,omitempty"`
	Watch     bool     `json:"watch,omitempty"`
	Watchlist string   `json:"watchlist,omitempty"`
	Commands  string   `json:"commands,omitempty"`
	BatchSize uint64   `json:"batchSize,omitempty"`
	RunCount  uint64   `json:"runCount,omitempty"`
	Sleep     float64  `json:"sleep,omitempty"`
	Globals
}

func (*MonitorsOptions) Monitors

func (opts *MonitorsOptions) Monitors() ([]types.Message, *types.MetaData, error)

Monitors implements the chifra monitors command.

func (*MonitorsOptions) MonitorsClean

func (opts *MonitorsOptions) MonitorsClean() ([]types.MonitorClean, *types.MetaData, error)

MonitorsClean implements the chifra monitors --clean command.

func (*MonitorsOptions) MonitorsList

func (opts *MonitorsOptions) MonitorsList() ([]types.Monitor, *types.MetaData, error)

MonitorsList implements the chifra monitors --list command.

func (MonitorsOptions) String

func (opts MonitorsOptions) String() string

String implements the stringer interface

type NamesOptions

type NamesOptions struct {
	Terms     []string `json:"terms,omitempty"`
	Expand    bool     `json:"expand,omitempty"`
	MatchCase bool     `json:"matchCase,omitempty"`
	All       bool     `json:"all,omitempty"`
	Custom    bool     `json:"custom,omitempty"`
	Prefund   bool     `json:"prefund,omitempty"`
	Regular   bool     `json:"regular,omitempty"`
	DryRun    bool     `json:"dryRun,omitempty"`
	Globals
}

func (*NamesOptions) Names

func (opts *NamesOptions) Names() ([]types.Name, *types.MetaData, error)

Names implements the chifra names command.

func (*NamesOptions) NamesAddr

func (opts *NamesOptions) NamesAddr() ([]types.Name, *types.MetaData, error)

NamesAddr implements the chifra names --addr command.

func (*NamesOptions) NamesAutoname

func (opts *NamesOptions) NamesAutoname(val base.Address) ([]types.Message, *types.MetaData, error)

NamesAutoname implements the chifra names --autoname command.

func (*NamesOptions) NamesClean

func (opts *NamesOptions) NamesClean() ([]types.Message, *types.MetaData, error)

NamesClean implements the chifra names --clean command.

func (*NamesOptions) NamesCreate

func (opts *NamesOptions) NamesCreate() ([]types.Name, *types.MetaData, error)

NamesCreate implements the chifra names --create command.

func (*NamesOptions) NamesDelete

func (opts *NamesOptions) NamesDelete() ([]types.Name, *types.MetaData, error)

NamesDelete implements the chifra names --delete command.

func (*NamesOptions) NamesRemove

func (opts *NamesOptions) NamesRemove() ([]types.Name, *types.MetaData, error)

NamesRemove implements the chifra names --remove command.

func (*NamesOptions) NamesTags

func (opts *NamesOptions) NamesTags() ([]types.Name, *types.MetaData, error)

NamesTags implements the chifra names --tags command.

func (*NamesOptions) NamesUndelete

func (opts *NamesOptions) NamesUndelete() ([]types.Name, *types.MetaData, error)

NamesUndelete implements the chifra names --undelete command.

func (*NamesOptions) NamesUpdate

func (opts *NamesOptions) NamesUpdate() ([]types.Name, *types.MetaData, error)

NamesUpdate implements the chifra names --update command.

func (NamesOptions) String

func (opts NamesOptions) String() string

String implements the stringer interface

type ParseFunc

type ParseFunc func(target any, key, value string) (bool, error)

ParseFunc is a function that takes a key/value pair and returns `true,nil` if the key/value pair was parsed and the value is valid. If the key is found, but the value is invalid, it returns `false, error` with a non-nil error. If it doesn't recognize the key, it returns `false, nil`.

type ReceiptsOptions

type ReceiptsOptions struct {
	TransactionIds []string `json:"transactions,omitempty"`
	Articulate     bool     `json:"articulate,omitempty"`
	Globals
}

func (*ReceiptsOptions) Receipts

func (opts *ReceiptsOptions) Receipts() ([]types.Receipt, *types.MetaData, error)

Receipts implements the chifra receipts command.

func (ReceiptsOptions) String

func (opts ReceiptsOptions) String() string

String implements the stringer interface

type Result

type Result[T any] struct {
	Data []T            `json:"data"`
	Meta types.MetaData `json:"meta"`
}

type SlurpOptions

type SlurpOptions struct {
	Addrs      []string    `json:"addrs,omitempty"`
	BlockIds   []string    `json:"blocks,omitempty"`
	Parts      SlurpParts  `json:"parts,omitempty"`
	Articulate bool        `json:"articulate,omitempty"`
	Source     SlurpSource `json:"source,omitempty"`
	Page       uint64      `json:"page,omitempty"`
	PageId     string      `json:"pageId,omitempty"`
	PerPage    uint64      `json:"perPage,omitempty"`
	Sleep      float64     `json:"sleep,omitempty"`
	Globals
}

func (*SlurpOptions) Slurp

func (opts *SlurpOptions) Slurp() ([]types.Slurp, *types.MetaData, error)

Slurp implements the chifra slurp command.

func (*SlurpOptions) SlurpAppearances

func (opts *SlurpOptions) SlurpAppearances() ([]types.Appearance, *types.MetaData, error)

SlurpAppearances implements the chifra slurp --appearances command.

func (*SlurpOptions) SlurpCount

func (opts *SlurpOptions) SlurpCount() ([]types.Monitor, *types.MetaData, error)

SlurpCount implements the chifra slurp --count command.

func (SlurpOptions) String

func (opts SlurpOptions) String() string

String implements the stringer interface

type SlurpParts

type SlurpParts int

func (SlurpParts) String

func (v SlurpParts) String() string

type SlurpSource

type SlurpSource int

func (SlurpSource) String

func (v SlurpSource) String() string

type StateOptions

type StateOptions struct {
	Addrs      []string     `json:"addrs,omitempty"`
	BlockIds   []string     `json:"blocks,omitempty"`
	Parts      StateParts   `json:"parts,omitempty"`
	Changes    bool         `json:"changes,omitempty"`
	NoZero     bool         `json:"noZero,omitempty"`
	Articulate bool         `json:"articulate,omitempty"`
	ProxyFor   base.Address `json:"proxyFor,omitempty"`
	Globals
}

func (*StateOptions) State

func (opts *StateOptions) State() ([]types.State, *types.MetaData, error)

State implements the chifra state command.

func (*StateOptions) StateCall

func (opts *StateOptions) StateCall(val string) ([]types.Result, *types.MetaData, error)

StateCall implements the chifra state --call command.

func (StateOptions) String

func (opts StateOptions) String() string

String implements the stringer interface

type StateParts

type StateParts int

func (StateParts) String

func (v StateParts) String() string

type StatusModes

type StatusModes int

func (StatusModes) String

func (v StatusModes) String() string

type StatusOptions

type StatusOptions struct {
	FirstRecord uint64 `json:"firstRecord,omitempty"`
	MaxRecords  uint64 `json:"maxRecords,omitempty"`
	Chains      bool   `json:"chains,omitempty"`
	Globals
}

func (*StatusOptions) Status

func (opts *StatusOptions) Status() ([]types.Status, *types.MetaData, error)

EXISTING_CODE Status implements the chifra status command.

func (*StatusOptions) StatusAbis

func (opts *StatusOptions) StatusAbis() ([]types.Status, *types.MetaData, error)

StatusAbis implements the chifra status abis command.

func (*StatusOptions) StatusAll

func (opts *StatusOptions) StatusAll() ([]types.Status, *types.MetaData, error)

StatusAll implements the chifra status all command.

func (*StatusOptions) StatusBlocks

func (opts *StatusOptions) StatusBlocks() ([]types.Status, *types.MetaData, error)

StatusBlocks implements the chifra status blocks command.

func (*StatusOptions) StatusBlooms

func (opts *StatusOptions) StatusBlooms() ([]types.Status, *types.MetaData, error)

StatusBlooms implements the chifra status blooms command.

func (*StatusOptions) StatusDiagnose

func (opts *StatusOptions) StatusDiagnose() ([]types.Status, *types.MetaData, error)

StatusDiagnose implements the chifra status --diagnose command.

func (*StatusOptions) StatusHealthcheck

func (opts *StatusOptions) StatusHealthcheck() ([]types.Status, *types.MetaData, error)

StatusHealthcheck implements the chifra status --healthcheck command.

func (*StatusOptions) StatusIndex

func (opts *StatusOptions) StatusIndex() ([]types.Status, *types.MetaData, error)

StatusIndex implements the chifra status index command.

func (*StatusOptions) StatusLogs

func (opts *StatusOptions) StatusLogs() ([]types.Status, *types.MetaData, error)

StatusLogs implements the chifra status logs command.

func (*StatusOptions) StatusMaps

func (opts *StatusOptions) StatusMaps() ([]types.Status, *types.MetaData, error)

StatusMaps implements the chifra status maps command.

func (*StatusOptions) StatusMonitors

func (opts *StatusOptions) StatusMonitors() ([]types.Status, *types.MetaData, error)

StatusMonitors implements the chifra status monitors command.

func (*StatusOptions) StatusNames

func (opts *StatusOptions) StatusNames() ([]types.Status, *types.MetaData, error)

StatusNames implements the chifra status names command.

func (*StatusOptions) StatusResults

func (opts *StatusOptions) StatusResults() ([]types.Status, *types.MetaData, error)

StatusResults implements the chifra status results command.

func (*StatusOptions) StatusSlurps

func (opts *StatusOptions) StatusSlurps() ([]types.Status, *types.MetaData, error)

StatusSlurps implements the chifra status slurps command.

func (*StatusOptions) StatusSome

func (opts *StatusOptions) StatusSome() ([]types.Status, *types.MetaData, error)

StatusSome implements the chifra status some command.

func (*StatusOptions) StatusStaging

func (opts *StatusOptions) StatusStaging() ([]types.Status, *types.MetaData, error)

StatusStaging implements the chifra status staging command.

func (*StatusOptions) StatusState

func (opts *StatusOptions) StatusState() ([]types.Status, *types.MetaData, error)

StatusState implements the chifra status state command.

func (*StatusOptions) StatusStatements

func (opts *StatusOptions) StatusStatements() ([]types.Status, *types.MetaData, error)

StatusStatements implements the chifra status statements command.

func (*StatusOptions) StatusTokens

func (opts *StatusOptions) StatusTokens() ([]types.Status, *types.MetaData, error)

StatusTokens implements the chifra status tokens command.

func (*StatusOptions) StatusTraces

func (opts *StatusOptions) StatusTraces() ([]types.Status, *types.MetaData, error)

StatusTraces implements the chifra status traces command.

func (*StatusOptions) StatusTransactions

func (opts *StatusOptions) StatusTransactions() ([]types.Status, *types.MetaData, error)

StatusTransactions implements the chifra status transactions command.

func (*StatusOptions) StatusUnripe

func (opts *StatusOptions) StatusUnripe() ([]types.Status, *types.MetaData, error)

StatusUnripe implements the chifra status unripe command.

func (StatusOptions) String

func (opts StatusOptions) String() string

String implements the stringer interface

type TokensOptions

type TokensOptions struct {
	Addrs    []string    `json:"addrs,omitempty"`
	BlockIds []string    `json:"blocks,omitempty"`
	Parts    TokensParts `json:"parts,omitempty"`
	ByAcct   bool        `json:"byAcct,omitempty"`
	Changes  bool        `json:"changes,omitempty"`
	NoZero   bool        `json:"noZero,omitempty"`
	Globals
}

func (TokensOptions) String

func (opts TokensOptions) String() string

String implements the stringer interface

func (*TokensOptions) Tokens

func (opts *TokensOptions) Tokens() ([]types.Token, *types.MetaData, error)

Tokens implements the chifra tokens command.

type TokensParts

type TokensParts int

func (TokensParts) String

func (v TokensParts) String() string

type TracesOptions

type TracesOptions struct {
	TransactionIds []string `json:"transactions,omitempty"`
	Articulate     bool     `json:"articulate,omitempty"`
	Filter         string   `json:"filter,omitempty"`
	Globals
}

func (TracesOptions) String

func (opts TracesOptions) String() string

String implements the stringer interface

func (*TracesOptions) Traces

func (opts *TracesOptions) Traces() ([]types.Trace, *types.MetaData, error)

Traces implements the chifra traces command.

func (*TracesOptions) TracesCount

func (opts *TracesOptions) TracesCount() ([]types.TraceCount, *types.MetaData, error)

TracesCount implements the chifra traces --count command.

type TransactionsFlow

type TransactionsFlow int

func (TransactionsFlow) String

func (v TransactionsFlow) String() string

type TransactionsOptions

type TransactionsOptions struct {
	TransactionIds []string         `json:"transactions,omitempty"`
	Articulate     bool             `json:"articulate,omitempty"`
	Flow           TransactionsFlow `json:"flow,omitempty"`
	Emitter        []string         `json:"emitter,omitempty"`
	Topic          []string         `json:"topic,omitempty"`
	CacheTraces    bool             `json:"cacheTraces,omitempty"`
	Globals
}

func (TransactionsOptions) String

func (opts TransactionsOptions) String() string

String implements the stringer interface

func (*TransactionsOptions) Transactions

func (opts *TransactionsOptions) Transactions() ([]types.Transaction, *types.MetaData, error)

Transactions implements the chifra transactions command.

func (*TransactionsOptions) TransactionsLogs

func (opts *TransactionsOptions) TransactionsLogs() ([]types.Log, *types.MetaData, error)

TransactionsLogs implements the chifra transactions --logs command.

func (*TransactionsOptions) TransactionsTraces

func (opts *TransactionsOptions) TransactionsTraces() ([]types.Trace, *types.MetaData, error)

TransactionsTraces implements the chifra transactions --traces command.

func (*TransactionsOptions) TransactionsUniq

func (opts *TransactionsOptions) TransactionsUniq() ([]types.Appearance, *types.MetaData, error)

TransactionsUniq implements the chifra transactions --uniq command.

type WhenOptions

type WhenOptions struct {
	BlockIds []string    `json:"blocks,omitempty"`
	Truncate base.Blknum `json:"truncate,omitempty"`
	Repair   bool        `json:"repair,omitempty"`
	Check    bool        `json:"check,omitempty"`
	Update   bool        `json:"update,omitempty"`
	Deep     bool        `json:"deep,omitempty"`
	Globals
}

func (WhenOptions) String

func (opts WhenOptions) String() string

String implements the stringer interface

func (*WhenOptions) When

func (opts *WhenOptions) When() ([]types.NamedBlock, *types.MetaData, error)

When implements the chifra when command.

func (*WhenOptions) WhenCount

func (opts *WhenOptions) WhenCount() ([]types.TimestampCount, *types.MetaData, error)

WhenCount implements the chifra when --count command.

func (*WhenOptions) WhenList

func (opts *WhenOptions) WhenList() ([]types.NamedBlock, *types.MetaData, error)

WhenList implements the chifra when --list command.

func (*WhenOptions) WhenTimestamps

func (opts *WhenOptions) WhenTimestamps() ([]types.Timestamp, *types.MetaData, error)

WhenTimestamps implements the chifra when --timestamps command.

Jump to

Keyboard shortcuts

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