github.com/MetalBlockchain/metalgo@v1.11.9/vms/platformvm/txs/unsigned_tx.go (about) 1 // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. 2 // See the file LICENSE for licensing terms. 3 4 package txs 5 6 import ( 7 "github.com/MetalBlockchain/metalgo/ids" 8 "github.com/MetalBlockchain/metalgo/snow" 9 "github.com/MetalBlockchain/metalgo/utils/set" 10 "github.com/MetalBlockchain/metalgo/vms/components/avax" 11 "github.com/MetalBlockchain/metalgo/vms/secp256k1fx" 12 ) 13 14 // UnsignedTx is an unsigned transaction 15 type UnsignedTx interface { 16 // TODO: Remove this initialization pattern from both the platformvm and the 17 // avm. 18 snow.ContextInitializable 19 secp256k1fx.UnsignedTx 20 SetBytes(unsignedBytes []byte) 21 22 // InputIDs returns the set of inputs this transaction consumes 23 InputIDs() set.Set[ids.ID] 24 25 Outputs() []*avax.TransferableOutput 26 27 // Attempts to verify this transaction without any provided state. 28 SyntacticVerify(ctx *snow.Context) error 29 30 // Visit calls [visitor] with this transaction's concrete type 31 Visit(visitor Visitor) error 32 }