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