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 ¶
- 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 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 ¶
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.