module

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 34 Imported by: 0 modules, 1 package

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 module is the bsecret overlay module in Go: `tm_bsecret_<crypt>` for each configured crypt and `ls_bsecret` for all of them, written to bcommon's engine-neutral contract (github.com/lightwebinc/bcommon/module) so that any Go overlay host that carries the adapter mounts it. It is the twin of the TypeScript module under host/src (frozen), built from the Go core: the admission rules are secrec.Admit, the index rules secrec's folds, listings and rows, and the questions secrec's classes.

Configuration is the TypeScript module's, read from the environment when the host calls the factory (docs/host.md): BSECRET_CRYPTS, BSECRET_STATE_DIR, BSECRET_HEADERS_URL, BSECRET_RETENTION_DAYS, BSECRET_UNHELD_HOURS, BSECRET_MAX_BEEF, BSECRET_MAX_SWEEP_INPUTS, BSECRET_SPEND_TABLE, BSECRET_LISTEN, BSECRET_PRICES, BSECRET_PAYEE_KEY, BSECRET_SESSIONS, BSECRET_SESSION_TTL, the handshake and response budgets, BSECRET_PRIVATE, BSECRET_HALL_URL, BSECRET_MEMBER_TTL, BSECRET_ARCADE_URL, BSECRET_ASSET_URL and the BSECRET_ACCEPT_* rule, and one of its own, BSECRET_JOURNAL_SYNC_MS (the rows journal's group commit window). Every mistake is an error, and the host refuses to start.

Index

Constants

View Source
const (
	FloorDays        = 31
	FloorUnheldHours = 24
	MinSpendTable    = 65536
	DefaultMemberTTL = 60
	MinMemberTTL     = 1
)

The floors an operator cannot go under (docs/spec.md sections 11.1 and 11.3).

View Source
const (
	DefaultJournalSyncMs = 100
	MaxJournalSyncMs     = 60_000
)

The rows journal's group commit window (BSECRET_JOURNAL_SYNC_MS): lines are written at once and fsynced together this often, off the lookup service's lock; 0 fsyncs each line before the admission goes on. The default and the bound are a timed write-ahead log's usual ones.

View Source
const (
	// MaxPerSeq is how many tokens are kept at one seq of one vault: rooted
	// before others, then the lowest txids.
	MaxPerSeq = 8
	// RecentTurned is how many commitments turned away are remembered, in
	// memory, to count each once.
	RecentTurned = 4096
	// PerVersion is how many carriers are answered for one version of one
	// secret.
	PerVersion = 8
	// ChoiceTTL is how long a choice between two rooted tokens at one seq
	// is reused.
	ChoiceTTL = time.Minute
)

The index's bounds (spec section 11.2).

View Source
const (
	PruneEvery = time.Hour
	TickEvery  = 30 * time.Second
)

PruneEvery is how often retention runs; TickEvery how often the background tick runs (the payment watch; retention every PruneEvery).

View Source
const (
	// MaxMembers is the most askers whose membership is kept at once.
	MaxMembers = 10000
	// HallTimeout is how long a hall host is given to answer.
	HallTimeout = 5 * time.Second
	// MaxHallAnswer is the most bytes of a hall host's answer read.
	MaxHallAnswer = 16 << 20
)

Private crypts (docs/host.md): a crypt this host serves only to the organizations BSECRET_PRIVATE names for it and to the members of their groups, every class through the terms route over BRC-104. The host's own /lookup refuses every question about such a crypt, and so does the route for an asker it cannot place. Who is a member is borg's: the hosts of the halls the organization's vaults in the crypt name (BSECRET_HALL_URL) are asked borg's member-of class for the asker. An answer is kept for BSECRET_MEMBER_TTL; a host that does not answer refuses the asker until one does. The asker is the identity key the route verified the request under, carried in ctx (termsroute.Caller).

View Source
const JournalFile = "bsecret-rows.jsonl"

JournalFile is the journal's file name in the state directory.

View Source
const Name = "bsecret"

Name is the module's name, as a host's module list names it.

View Source
const RecentAdmissions = 4096

RecentAdmissions is how many admitted txids a manager remembers to count each once.

Variables

View Source
var AdmitKinds = []string{"secret", "vault-token", "sweep"}

AdmitKinds are what an admitted transaction was.

View Source
var Build = "unversioned"

Build is the version the host logs; a binary sets it.

View Source
var Classes = func() []termsroute.PricedClass {
	out := make([]termsroute.PricedClass, len(secrec.Classes))
	for i, c := range secrec.Classes {
		out[i] = termsroute.PricedClass{Name: c.Name, Free: c.Free}
	}
	return out
}()

Classes are the lookup classes as the route prices them.

View Source
var ErrNoSubmission = errors.New("bsecret: the host did not hand the manager the submission's bytes (bcommon module.WithSubmission)")

ErrNoSubmission is a host that hands the manager a parsed BEEF without the submission's bytes (bcommon module.WithSubmission): the manager decides on the wire form, which a parsed and merged BEEF no longer shows.

View Source
var KindsReplayed = []string{replay.KindToken, "carrier", "sweep"}

KindsReplayed are the kinds a walk answers objects as.

View Source
var PrivateResults = []string{"served", "unauthenticated", "refused", "unknown"}

PrivateResults are the results the gate counts in bsecret_private_total.

View Source
var Reasons = []string{
	"too-large", "cbor", "key-type", "magic", "missing", "type", "range", "identity", "crypt", "hall", "name", "label", "list", "entry",
	"chain", "count", "debt", "content", "transition", "epoch", "shape", "beef", "mineable", "unlock", "lock", "signature", "funding",
	"unmined", "token-input", "vault-id", "not-bsecret",
}

Reasons are every label a host counts a refused submission by: the record rules of spec section 3.1, the transition rules of section 4.2 and the transaction rules of section 11.1.

TokenStatuses are the token statuses the index reports, each counted.

Functions

func CheckNoSync

func CheckNoSync(raw string) error

CheckNoSync refuses a host configured to synchronize a tm_bsecret_ topic with a peer (OVERLAY_SYNC_PEERS, topic=url,...;topic=...): such a synchronisation carries only unspent outputs, so it never carries a chain's spent tokens, and it drops what a topic manager refuses without retrying it. A crypt is joined by replay (spec section 11.6).

func ParseCrypts

func ParseCrypts(raw string) ([]string, error)

ParseCrypts parses BSECRET_CRYPTS: crypt identifiers, once each.

func ParseHallURLs

func ParseHallURLs(raw string) ([]string, error)

ParseHallURLs parses BSECRET_HALL_URL: a comma list of http or https base URLs.

func ParsePrivate

func ParsePrivate(raw string, carried []string) (map[string]map[string]bool, error)

ParsePrivate parses BSECRET_PRIVATE: <crypt>=<org>[,<org>...] entries separated by ;, each crypt one this host carries, each organization an identity key.

Types

type Access

type Access func(ctx context.Context, crypt string) error

Access refuses, by an error, a question about a crypt that is not served to the asker in ctx (private crypts); nil serves every crypt the host carries to everyone.

type Classified

type Classified struct {
	Q      *secrec.Question
	Priced bool
}

Classified is a question, validated, and whether this host prices it.

type Config

type Config struct {
	Crypts         []string
	StateDir       string
	HeadersURL     string
	RetentionDays  int
	UnheldHours    int
	MaxBEEF        int
	MaxSweepInputs int
	SpendTable     int
	// JournalSync is the rows journal's group commit window; 0 syncs every
	// line.
	JournalSync time.Duration
	// Listen is the terms route's host:port; empty for none.
	Listen   string
	Prices   map[string]uint64
	PayeeKey *ec.PrivateKey
	Sessions termsroute.SessionBound
	Budget   termsroute.BudgetConfig
	Response termsroute.ResponseBudgetConfig
	Accept   termsroute.AcceptConfig
	// Private are the private crypts and the organizations each is served
	// to; HallURLs the borg hosts asked who is a member; MemberTTL how long
	// an answer is kept.
	Private   map[string]map[string]bool
	HallURLs  []string
	MemberTTL time.Duration
}

Config is the module's configuration.

func ParseConfig

func ParseConfig(getenv func(string) string) (*Config, error)

ParseConfig reads the whole configuration through getenv.

type Counts

type Counts struct {
	Vaults, Tokens, PendingTokens, Carriers, Sweeps, Rows, Table, PendingDeletes int
}

Counts are the gauges' values.

type Deleter

type Deleter interface {
	DeleteOutput(ctx context.Context, outpoint *transaction.Outpoint, topic string) error
}

Deleter is a storage that can delete an output: what retention and the outpoint rows need beyond the contract's RestoreStorage. A host whose storage cannot delete keeps what the index dropped, unanswered.

type FileJournal

type FileJournal struct {
	Path string
	// SyncEvery is the group commit window; zero syncs every line.
	SyncEvery time.Duration
	// OnSync, when set, is called after each timed fsync with the lines it
	// covered, how long it took and its error. It runs on the timer's
	// goroutine, holding no lock of the journal's.
	OnSync func(lines int, took time.Duration, err error)
	// contains filtered or unexported fields
}

FileJournal is the journal as a file, bsecret-rows.jsonl in a directory. Each line is written to the file before Append returns, so a process that dies loses nothing (the line is in the page cache). When it reaches the disk is SyncEvery: zero flushes each line before Append returns; more is a group commit, one fsync for every line written in the window, run by a timer off the caller's path, so a power loss loses at most the window (the posture of a store that syncs its write-ahead log on a timer). Close flushes. A last line cut short by a crash is cut off on load; any other line that does not parse stops the load, because a row silently skipped could let a swept or superseded carrier be answered again.

func NewFileJournal

func NewFileJournal(dir string) (*FileJournal, error)

NewFileJournal makes the directory and names the file. The journal syncs every line until SyncEvery is set.

func (*FileJournal) Append

func (j *FileJournal) Append(l Line) error

Append implements Journal: the line is in the file when it returns, and on disk too when SyncEvery is zero; otherwise a timed fsync takes it there within SyncEvery. An error of an earlier timed fsync is returned once, by the next Append, after its line is written.

func (*FileJournal) Close

func (j *FileJournal) Close() error

Close flushes what is pending and closes the file. A later Append opens it again.

func (*FileJournal) Load

func (j *FileJournal) Load() ([]Line, error)

Load implements Journal.

func (*FileJournal) Sync

func (j *FileJournal) Sync() error

Sync flushes every line written so far to disk now.

type Formula

type Formula struct {
	Txid    string
	Vout    uint32
	Context []byte
}

Formula is one output an answer names, with its context when the class gives one.

type Front

type Front struct {
	*termsroute.Front
	Addr string
}

Front is the terms route and where it listens.

type Journal

type Journal interface {
	Load() ([]Line, error)
	Append(l Line) error
}

Journal is where the rows live. Append is durable when it returns or within the journal's sync window (FileJournal.SyncEvery).

type Line

type Line struct {
	K     string `json:"k"`
	Op    string `json:"op,omitempty"`
	C     string `json:"c,omitempty"`
	Crypt string `json:"crypt,omitempty"`
	At    *int64 `json:"at,omitempty"`
	W     *bool  `json:"w,omitempty"`
	S     string `json:"s,omitempty"`
	H     *int64 `json:"h,omitempty"`
	Txid  string `json:"txid,omitempty"`
	Vout  *int64 `json:"vout,omitempty"`
}

Line is one journal line: what ls_bsecret keeps for the host's life beside the engine's storage (docs/host.md, the state directory), as an append-only journal. One JSON object a line:

{"k":"c","op":"<txid>.<vout>","c":"<C>","crypt":"...","at":<s>}
{"k":"m","op":"..."}
{"k":"d","op":"...","c":"<C>","w":true}
{"k":"s","op":"...","s":"<sweep txid>","crypt":"...","h":<height>,"at":<s>}
{"k":"t","txid":"<txid>","vout":<n>,"crypt":"...","at":<s>}
{"k":"w","txid":"<sweep txid>","crypt":"..."}

c lines are the carriers a funding outpoint's row took in, each with the outpoint it spent; an m line counts a carrier the row did not keep, without its commitment; d lines are drops, w when the dropped carrier was its outpoint's winner; s lines are admitted sweeps' spends of outpoints a carrier spent; t lines are vault tokens; a w line names a held sweep whose tombstone an admitted transaction spent. Commitments are in hash byte order and txids in display order, both lowercase hex; at is the host's time of first sight in Unix seconds. The bytes are the TypeScript module's, key for key, so one journal reads under either.

type Members

type Members struct {
	// contains filtered or unexported fields
}

Members is who a private crypt is served to.

func NewMembers

func NewMembers(o MembersOptions) *Members

NewMembers makes the gate.

func (*Members) Any

func (m *Members) Any() bool

Any is whether the host has any private crypt.

func (*Members) Check

func (m *Members) Check(ctx context.Context, crypt string) error

Check refuses a question about a private crypt from anyone it is not served to: by the host's own /lookup (no asker), and by the route for an asker that is neither one of the crypt's organizations nor a member of their groups. An asker the route verified is primed first.

func (*Members) IsPrivate

func (m *Members) IsPrivate(crypt string) bool

IsPrivate is whether crypt is private.

func (*Members) Prime

func (m *Members) Prime(ctx context.Context, identity string)

Prime settles which private crypts identity is served, unless what is known of it is younger than the TTL.

func (*Members) Size

func (m *Members) Size() int

Size is how many askers are known.

type MembersOptions

type MembersOptions struct {
	// Crypts are the private crypts and the organizations each is served to.
	Crypts map[string]map[string]bool
	// HallURLs are borg hosts, asked member-of.
	HallURLs []string
	// Halls are the halls an organization's vaults in a crypt name, from
	// the index.
	Halls func(crypt, org string) []string
	Host  bmodule.Host
	TTL   time.Duration
	// Client asks the hall hosts; http.DefaultClient with HallTimeout when nil.
	Client *http.Client
	Now    func() time.Time
}

MembersOptions build Members.

type MemoryJournal

type MemoryJournal struct {
	Lines []Line
	// contains filtered or unexported fields
}

MemoryJournal is a journal in memory, for tests and for a host that accepts losing it.

func (*MemoryJournal) Append

func (m *MemoryJournal) Append(l Line) error

Append implements Journal.

func (*MemoryJournal) Load

func (m *MemoryJournal) Load() ([]Line, error)

Load implements Journal.

type Mounted

type Mounted struct {
	Module bmodule.Module
	LS     *Service
	// Members is who the private crypts are served to, when there are any.
	Members *Members
	// Front is the terms route, when configured.
	Front *Front
	// contains filtered or unexported fields
}

Mounted is the module for one configuration: the contract's Module, the lookup service, and what Start runs.

func Mount

func Mount(host bmodule.Host, c *Config, overlayTopics []string, journal Journal, hdrs chaintracker.ChainTracker, now func() time.Time) (*Mounted, error)

Mount builds the module for c. overlayTopics is OVERLAY_TOPICS, when known; journal replaces the state directory's, hdrs the configured header source and now the host's clock, for tests.

func New

func New(host bmodule.Host, getenv func(string) string) (*Mounted, error)

New is the factory a host calls: the configuration from getenv, checked against OVERLAY_TOPICS and OVERLAY_SYNC_PEERS.

func (*Mounted) Close

func (m *Mounted) Close() error

Close flushes the rows journal and closes it (Start does when its context ends). A host that stops without it leaves at most the last sync window's lines in the page cache: written, not yet on disk.

func (*Mounted) Start

func (m *Mounted) Start(ctx context.Context) error

Start serves the terms route (when configured) until ctx ends, and runs the background tick: the payment watch every TickEvery and retention every PruneEvery once the index is restored. It returns when ctx ends, after closing the rows journal (Close).

type Options

type Options struct {
	Crypts  []string
	Host    bmodule.Host
	Journal Journal
	// Priced are the priceable classes this host prices: asked through the
	// engine, they are refused.
	Priced map[string]bool
	// RetentionDays is how long a host keeps a carrier it no longer
	// answers; UnheldHours the same for a carrier of a vault the host holds
	// no rooted chain of; SpendTable the bound on spends of outpoints no
	// carrier used. The floors are held where an operator sets them.
	RetentionDays int
	UnheldHours   int
	SpendTable    int
	// Headers are the host's block headers: they choose between two rooted
	// tokens at one seq.
	Headers chaintracker.ChainTracker
	// Now is the host's clock; time.Now when nil.
	Now    func() time.Time
	Access Access
	// Trees is the chain view a replay reads a vault's first token's
	// parent from (Replay); nil when the host has none.
	Trees replay.TreeSource
	// MaxBEEF and MaxSweepInputs are the topic managers' bounds, which a
	// replay holds a token it assembles to; secrec's defaults when zero.
	MaxBEEF, MaxSweepInputs int
}

Options build a Service.

type OutpointRowView

type OutpointRowView struct {
	Winner  string
	Others  []string
	More    uint64
	Dropped bool
	Sweeps  []string
}

OutpointRowView is the outpoint row of op as the contract describes it.

type OutputList

type OutputList struct {
	Type    string       `json:"type"`
	Outputs []outputJSON `json:"outputs"`
}

OutputList is the engine's lookup answer as JSON.

type Refused

type Refused struct {
	Reason string
	Detail string
}

Refused is raised for every refusal. The engine counts it as a failed topic for this submission and stores nothing.

func (*Refused) Error

func (r *Refused) Error() string

type RouteAnswerer

type RouteAnswerer struct{ LS *Service }

RouteAnswerer is ls_bsecret as the terms route asks its questions: a priced answer is hydrated as the engine hydrates one.

func (RouteAnswerer) Answer

Answer implements termsroute.Answerer: the asker's identity, when the route verified one, is in ctx.

func (RouteAnswerer) Classify

Classify implements termsroute.Answerer: the asker's identity, when the route verified one, is in ctx, so a private crypt refuses before any price.

func (RouteAnswerer) Restored

func (r RouteAnswerer) Restored() bool

Restored implements termsroute.Answerer.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is ls_bsecret: one lookup service for every crypt a host carries (spec sections 10.2, 11.2 to 11.5). Two stores back it. The engine's storage holds the outputs the host keeps: vault tokens, secret carriers and sweep tombstones, which the service indexes in memory and rebuilds from storage on start. The journal holds what the host keeps for its life beside them: one row per funding outpoint any admitted carrier spent, and the first sight of every token. Spends of outpoints no carrier used live only in a bounded table, oldest dropped first.

Every status is a function of what the host holds, never of arrival order, with the one exception the contract states (a sweep that left the bounded table before its carrier arrived).

func NewService

func NewService(o Options) (*Service, error)

NewService builds ls_bsecret and loads the journal.

func (*Service) AdmissionMode

func (*Service) AdmissionMode() bmodule.AdmissionMode

AdmissionMode implements module.LookupService: the whole transaction, because a carrier's funding outpoint, a token's predecessor and a sweep's spends are its inputs.

func (*Service) Answer

func (s *Service) Answer(ctx context.Context, c *Classified, paid bool) ([]Formula, error)

Answer answers a validated question. paid says the question was paid for (or asked where no payment is due); a class this host prices is refused otherwise.

func (*Service) Classify

func (s *Service) Classify(ctx context.Context, service string, query []byte) (*Classified, error)

Classify validates a question and names its class, as the terms route and the engine ask it. A question for another service, one no class has, one naming a crypt the host does not carry, or one about a private crypt the asker is not served is an error.

func (*Service) Counts

func (s *Service) Counts() Counts

Counts reads the gauges.

func (*Service) GetDocumentation

func (*Service) GetDocumentation() string

GetDocumentation implements module.LookupService.

func (*Service) GetMetaData

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

GetMetaData implements module.LookupService.

func (*Service) HallsOf

func (s *Service) HallsOf(crypt, org string) []string

HallsOf are the halls the rooted tokens of org's vaults in crypt name, ascending.

func (*Service) Holds

func (s *Service) Holds(c string) bool

Holds is whether the host holds the carrier with commitment c.

func (*Service) Hydrate

func (s *Service) Hydrate(ctx context.Context, formulas []Formula) ([]bmodule.HydratedOutput, error)

Hydrate is an answer with each output's BEEF, as the engine hydrates one, read from the host's storage. A context rides along.

func (*Service) Lookup

Lookup implements module.LookupService: asked through the engine, a class the host prices is refused here. The answer is hydrated here and carries each output's context (bcommon module.HydratedOutput).

func (*Service) OutpointRow

func (s *Service) OutpointRow(op string) (OutpointRowView, bool)

OutpointRow is the row of op, when the host has one.

func (*Service) OutputAdmittedByTopic

func (s *Service) OutputAdmittedByTopic(ctx context.Context, p *bmodule.OutputAdmittedByTopic) error

OutputAdmittedByTopic implements module.LookupService: it indexes an admitted output, then reads back tokens whose predecessor is rooted now and deletes what was dropped from storage.

func (*Service) OutputEvicted

func (s *Service) OutputEvicted(_ context.Context, outpoint *transaction.Outpoint) error

OutputEvicted implements module.LookupService.

func (*Service) OutputNoLongerRetainedInHistory

func (s *Service) OutputNoLongerRetainedInHistory(_ context.Context, outpoint *transaction.Outpoint, topic string) error

OutputNoLongerRetainedInHistory implements module.RetentionListener.

func (*Service) Prune

func (s *Service) Prune(ctx context.Context) int

Prune applies retention at the host's time and deletes what was dropped from storage. Kept for the host's life: tokens, outpoint rows and the sweeps they record. A listed carrier is kept while the answered set holds its version, and for the retention period after the host first saw the token that replaced or retired it. Any other carrier is kept for the retention period after the host first saw it (after the sweep, for a retracted one) where the host holds the vault's rooted chain, and for the shorter period where it does not. Dropping an outpoint's winner closes the outpoint: nothing on it is answered again. It returns how many carriers were dropped.

func (*Service) Replay

Replay implements bcommon module.Replayer for tm_bsecret_ topics.

func (*Service) Restore

func (s *Service) Restore(ctx context.Context, outputs []bmodule.Output, storage bmodule.RestoreStorage) (int, error)

Restore implements module.Restorer (spec section 11.4): it rebuilds the index. The rows from the journal, then every output of this module's topics the host hands over (a row handed without its BEEF is read again from storage with it), then every token, carrier and sweep the journal names that the unspent rows did not carry (a token its successor spent, say), and then each held token's predecessors, read through the input that spends them. A token is read as the engine stores it, so a predecessor is the token the host holds at seq - 1, never a BEEF's. Sweeps are taken in storage's order, so the bounded table keeps the newest. Chains are rooted and folded from seq 0 whatever order storage returns rows in, and each seq is held to its bound only once every token's descent is known. A storage failure propagates: a restore that skipped a sweep would answer retracted carriers.

func (*Service) Restored

func (s *Service) Restored() bool

Restored is whether the index was rebuilt from storage.

func (*Service) Rooted

func (s *Service) Rooted(txid string) bool

Rooted is whether the token with txid (display order) is rooted.

func (*Service) SpendNotificationMode

func (*Service) SpendNotificationMode() bmodule.SpendNotificationMode

SpendNotificationMode implements module.LookupService: spends are read from admitted transactions, never from the engine's notices.

func (*Service) Status

func (s *Service) Status(ctx context.Context, c string) (string, bool)

Status is the status of the carrier with commitment c (hash byte order hex), when the host holds it.

func (*Service) TokenStatus

func (s *Service) TokenStatus(txid string) (string, bool)

TokenStatus is the status of the token with txid (display order), when the host holds it.

type TopicManager

type TopicManager struct {
	Topic string
	Crypt string
	// contains filtered or unexported fields
}

TopicManager is tm_bsecret_<crypt>: the topic manager of one crypt (spec section 11.1). The rules are secrec.Admit's; this is the engine seam: it runs them on the submission and turns the verdict into admittance instructions. Every refusal is raised, so the engine records nothing and marks nothing spent: a refused transaction offered again is decided again. No rule reads another topic, another record or anything this topic holds.

func NewTopicManager

func NewTopicManager(topic string, host bmodule.Host, headers chaintracker.ChainTracker, maxBEEF, maxSweepInputs int) (*TopicManager, error)

NewTopicManager makes the manager of one topic. The floors are held where an operator sets the bounds (ParseConfig); a test may name smaller ones.

func (*TopicManager) Admit

func (t *TopicManager) Admit(ctx context.Context, raw []byte, held []int) (overlay.AdmittanceInstructions, error)

Admit applies the rules to the submission's bytes with the held inputs, as the TypeScript manager's identifyAdmissibleOutputs does.

func (*TopicManager) GetDocumentation

func (t *TopicManager) GetDocumentation() string

GetDocumentation implements module.TopicManager.

func (*TopicManager) GetMetaData

func (t *TopicManager) GetMetaData() *overlay.MetaData

GetMetaData implements module.TopicManager.

func (*TopicManager) IdentifyAdmissibleOutputs

func (t *TopicManager) IdentifyAdmissibleOutputs(ctx context.Context, _ *transaction.Beef, _ *chainhash.Hash, previousCoins []uint32) (overlay.AdmittanceInstructions, error)

IdentifyAdmissibleOutputs implements bcommon's module.TopicManager over the submission's bytes in ctx.

Jump to

Keyboard shortcuts

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