secpfx

package
v1.23.3 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: GPL-3.0, LGPL-3.0, LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package secpfx wires luxfi/utxo/secp256k1fx into the atomic-tx subsystem behind a small adapter. After luxfi/utxo dropped runtime codec.Registry from its secp256k1fx.VM contract (ZAP-native: wire schemas are compile-time static, see luxfi/utxo/secp256k1fx/vm.go), the Fx machinery only needs Clock + Logger from the host VM. This adapter provides exactly that — no codec dependency leaks back into plugin/evm/atomic/.

Wave 2G-Internal of the codec rip (#101): direct imports of github.com/luxfi/codec / linearcodec are gone; the adapter is codec-free in source as well as in semantics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter is the lifecycle facade returned by New. It owns the Fx and offers exactly the operations the atomic-tx VM needs to drive the Fx through its lifecycle plus the VerifyTransfer call used in semantic verification.

func New

func New(host Host) (*Adapter, error)

New constructs an Adapter wired to the given host. The fx is initialized eagerly so VerifyTransfer is callable as soon as New returns — atomic-tx accept/verify paths can rely on this.

func (*Adapter) Bootstrapped

func (a *Adapter) Bootstrapped() error

Bootstrapped forwards to the underlying Fx.

func (*Adapter) Bootstrapping

func (a *Adapter) Bootstrapping() error

Bootstrapping forwards to the underlying Fx.

func (*Adapter) CreateOutput

func (a *Adapter) CreateOutput(amount uint64, controlGroup interface{}) (interface{}, error)

CreateOutput forwards to the underlying Fx. Required by the luxfi/proto/p/fx.Fx interface but not exercised by atomic-tx flows.

func (*Adapter) Initialize

func (a *Adapter) Initialize(interface{}) error

Initialize is a no-op — the Adapter already initialized its wrapped Fx in New. It exists so the Adapter satisfies the luxfi/proto/p/fx.Fx interface that downstream verifiers depend on; calling Initialize a second time would re-run secp256k1fx.Fx.Initialize with the host VM reference, which is unsupported.

func (*Adapter) RecoverCache

func (a *Adapter) RecoverCache() secp256k1.RecoverCacheType

RecoverCache exposes the secp256k1 recover cache the host VM stashes next to the Adapter so transaction signature verification can reuse the cache between calls.

func (*Adapter) VerifyPermission

func (a *Adapter) VerifyPermission(tx, in, cred, controlGroup interface{}) error

VerifyPermission forwards to the underlying Fx. Required by the luxfi/proto/p/fx.Fx interface but not exercised by atomic-tx flows.

func (*Adapter) VerifyTransfer

func (a *Adapter) VerifyTransfer(tx, in, cred, utxo interface{}) error

VerifyTransfer is the only Fx call the atomic-tx verifier needs.

type Host

type Host interface {
	Clock() *mockable.Clock
	Logger() log.Logger
}

Host is the small surface the atomic-tx VM provides to the Fx. Matches secp256k1fx.VM exactly — Clock + Logger only. The legacy CodecRegistry method is gone from upstream and from this adapter in lock-step.

Jump to

Keyboard shortcuts

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