Documentation
¶
Overview ¶
Package secpfx wires luxfi/utxo/secp256k1fx into the atomic-tx subsystem behind a small adapter. The upstream Fx machinery requires a host VM that exposes Logger / Clock / CodecRegistry — the registry is luxfi/codec-typed, which would otherwise leak the legacy codec dependency back into plugin/evm/atomic/.
Keeping the glue here lets plugin/evm/atomic/* stay codec-free while preserving the structural Fx integration (semantic verification for atomic transfers).
Index ¶
- type Adapter
- func (a *Adapter) Bootstrapped() error
- func (a *Adapter) Bootstrapping() error
- func (a *Adapter) CreateOutput(amount uint64, controlGroup interface{}) (interface{}, error)
- func (a *Adapter) Initialize(interface{}) error
- func (a *Adapter) RecoverCache() secp256k1.RecoverCacheType
- func (a *Adapter) VerifyPermission(tx, in, cred, controlGroup interface{}) error
- func (a *Adapter) VerifyTransfer(tx, in, cred, utxo interface{}) error
- type Host
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 the no-op registry, and offers exactly the three operations the atomic-tx VM needs to drive the Fx through its lifecycle plus the VerifyTransfer call used in semantic verification.
func New ¶
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 ¶
Bootstrapped forwards to the underlying Fx.
func (*Adapter) Bootstrapping ¶
Bootstrapping forwards to the underlying Fx.
func (*Adapter) CreateOutput ¶
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 ¶
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 ¶
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 ¶
VerifyTransfer is the only Fx call the atomic-tx verifier needs.