Files
zeekayandHanzo Dev b1cc108c9f gofmt
Co-authored-by: Hanzo Dev <[email protected]>
2026-09-08 01:51:51 -07:00

38 lines
1.0 KiB
Go

// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package txs
import (
"github.com/luxfi/ids"
"github.com/luxfi/math/set"
"github.com/luxfi/runtime"
lux "github.com/luxfi/utxo"
"github.com/luxfi/utxo/secp256k1fx"
)
// RuntimeInitializable defines the interface for initializing context
type RuntimeInitializable interface {
InitRuntime(rt *runtime.Runtime)
}
// UnsignedTx is an unsigned transaction
type UnsignedTx interface {
// RuntimeInitializable is required for both platformvm and exchangevm
// transaction types to share initialization logic.
RuntimeInitializable
secp256k1fx.UnsignedTx
SetBytes(unsignedBytes []byte)
// InputIDs returns the set of inputs this transaction consumes
InputIDs() set.Set[ids.ID]
Outputs() []*lux.TransferableOutput
// Attempts to verify this transaction without any provided state.
SyntacticVerify(rt *runtime.Runtime) error
// Visit calls [visitor] with this transaction's concrete type
Visit(visitor Visitor) error
}