anytx

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package anytx is the reference module: tm_anytx admits every output of every object, and ls_anytx answers by outpoint from the engine's storage.

It is the Go twin of the TypeScript host's default manager and the parity oracle's read side. It is deliberately trivial: the only reason two hosts fed the same objects may answer differently is then the thing under test, never an admission rule. It is not a template for a real overlay.

It manages every carried topic by default (the TypeScript host's default posture). module.Mount refuses two modules on one topic, so a host that mounts an application module beside it names anytx's own topics with OVERLAY_ANYTX_TOPICS.

Index

Constants

View Source
const LookupName = "ls_anytx"

LookupName is the lookup service this module mounts.

View Source
const MaxAll = 1000

MaxAll caps a `{all:true}` answer, as the engine's own lookup cap does on the TypeScript host.

View Source
const Name = "anytx"

Name is the module name in OVERLAY_MODULES.

Variables

This section is empty.

Functions

func New

func New(h module.Host) (module.Module, error)

New builds the module for a host.

Types

type Lookup

type Lookup struct {
	Storage engine.Storage
	Topics  []string
}

Lookup answers from the engine's storage at question time. It keeps no index, so there is nothing to rebuild on start and no second copy of the set for two hosts to disagree about.

func (*Lookup) GetDocumentation

func (*Lookup) GetDocumentation() string

GetDocumentation implements engine.LookupService.

func (*Lookup) GetMetaData

func (*Lookup) GetMetaData() *overlay.MetaData

GetMetaData implements engine.LookupService.

func (*Lookup) Lookup

Lookup implements engine.LookupService.

{"outpoint": "<txid>.<index>"}  that outpoint, while unspent on a carried topic
{"all": true, "limit": n}       unspent outpoints on carried topics, sorted, at most n (<= 1000)

func (*Lookup) OutputAdmittedByTopic

func (*Lookup) OutputAdmittedByTopic(context.Context, *engine.OutputAdmittedByTopic) error

OutputAdmittedByTopic implements engine.LookupService; nothing is indexed.

func (*Lookup) OutputBlockHeightUpdated

func (*Lookup) OutputBlockHeightUpdated(context.Context, *chainhash.Hash, uint32, uint64) error

OutputBlockHeightUpdated implements engine.LookupService.

func (*Lookup) OutputEvicted

func (*Lookup) OutputEvicted(context.Context, *transaction.Outpoint) error

OutputEvicted implements engine.LookupService.

func (*Lookup) OutputNoLongerRetainedInHistory

func (*Lookup) OutputNoLongerRetainedInHistory(context.Context, *transaction.Outpoint, string) error

OutputNoLongerRetainedInHistory implements engine.LookupService.

func (*Lookup) OutputSpent

func (*Lookup) OutputSpent(context.Context, *engine.OutputSpent) error

OutputSpent implements engine.LookupService.

type Manager

type Manager struct{ Topic string }

Manager admits every output of the submitted transaction.

func (Manager) GetDocumentation

func (m Manager) GetDocumentation() string

GetDocumentation implements engine.TopicManager.

func (Manager) GetMetaData

func (m Manager) GetMetaData() *overlay.MetaData

GetMetaData implements engine.TopicManager.

func (Manager) IdentifyAdmissibleOutputs

func (m Manager) IdentifyAdmissibleOutputs(_ context.Context, beef *transaction.Beef, txid *chainhash.Hash, _ []uint32) (overlay.AdmittanceInstructions, error)

IdentifyAdmissibleOutputs implements engine.TopicManager. A transaction it cannot find is an empty admission, never an error: the object came from an open plane, and whatever it is, it is the sender's problem.

func (Manager) IdentifyNeededInputs

func (Manager) IdentifyNeededInputs(context.Context, *transaction.Beef, *chainhash.Hash) ([]*transaction.Outpoint, error)

IdentifyNeededInputs implements engine.TopicManager: admission depends on no previous output.

Jump to

Keyboard shortcuts

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