chain

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: BlueOak-1.0.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterChainConstructor

func RegisterChainConstructor(chainID uint32, c ChainConstructor)

RegisterChainConstructor is called by chain backends to register their ChainConstructors.

Types

type BadQueryError

type BadQueryError error

type Chain

type Chain interface {
	Connect(context.Context) (*sync.WaitGroup, error)
	// Query may be needed if clients are the auditors, since some clients might
	// not have e.g. txindex enabled for utxo-based assets.
	// Query(context.Context, Query) (Result, error)
	Connected() bool
	CheckBond(*tanka.Bond) error
}

Chain is an interface that must be implemented by every blockchain backend.

func New

func New(chainID uint32, cfg json.RawMessage, log dex.Logger, net dex.Network) (Chain, error)

New is used by the caller to construct a new Chain.

type ChainConfig

type ChainConfig struct {
	ConfigPath string
}

type ChainConstructor

type ChainConstructor func(config json.RawMessage, log dex.Logger, net dex.Network) (Chain, error)

ChainConstructor is a constructor for a Chain.

type FeeRater

type FeeRater interface {
	FeeChannel() <-chan uint64
}

FeeRater is an optional interface that should be implemented by backends for which the network transaction fee rates are variable. The Tatanka Mesh provides a oracle service for these chains.

type Result

type Result json.RawMessage

type Query json.RawMessage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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