Versions in this module Expand all Collapse all v1 v1.11.11 Aug 6, 2024 Changes in this version + const CodecVersion + var ErrNilFxOperation = errors.New("nil fx operation is not valid") + var ErrNilFxOutput = errors.New("nil feature extension output is not valid") + var ErrNilInitialState = errors.New("nil initial state is not valid") + var ErrNilOperation = errors.New("nil operation is not valid") + var ErrNotSortedAndUniqueUTXOIDs = errors.New("utxo IDs not sorted and unique") + var ErrOutputsNotSorted = errors.New("outputs not sorted") + var ErrUnknownFx = errors.New("unknown feature extension") + func IsSortedAndUniqueOperations(ops []*Operation, c codec.Manager) bool + func SortOperations(ops []*Operation, c codec.Manager) + func SortOperationsWithSigners(ops []*Operation, signers [][]*secp256k1.PrivateKey, codec codec.Manager) + type BaseTx struct + func (t *BaseTx) Bytes() []byte + func (t *BaseTx) InitCtx(ctx *snow.Context) + func (t *BaseTx) InputIDs() set.Set[ids.ID] + func (t *BaseTx) SetBytes(bytes []byte) + func (t *BaseTx) Visit(v Visitor) error + type CreateAssetTx struct + Denomination byte + Name string + States []*InitialState + Symbol string + func (t *CreateAssetTx) InitCtx(ctx *snow.Context) + func (t *CreateAssetTx) InitialStates() []*InitialState + func (t *CreateAssetTx) Visit(v Visitor) error + type ExportTx struct + DestinationChain ids.ID + ExportedOuts []*avax.TransferableOutput + func (t *ExportTx) InitCtx(ctx *snow.Context) + func (t *ExportTx) Visit(v Visitor) error + type ImportTx struct + ImportedIns []*avax.TransferableInput + SourceChain ids.ID + func (t *ImportTx) InputIDs() set.Set[ids.ID] + func (t *ImportTx) InputUTXOs() []*avax.UTXOID + func (t *ImportTx) NumCredentials() int + func (t *ImportTx) Visit(v Visitor) error + type InitialState struct + FxID ids.ID + FxIndex uint32 + Outs []verify.State + func (is *InitialState) Compare(other *InitialState) int + func (is *InitialState) InitCtx(ctx *snow.Context) + func (is *InitialState) Sort(c codec.Manager) + func (is *InitialState) Verify(c codec.Manager, numFxs int) error + type MockUnsignedTx struct + func NewMockUnsignedTx(ctrl *gomock.Controller) *MockUnsignedTx + func (m *MockUnsignedTx) Bytes() []byte + func (m *MockUnsignedTx) EXPECT() *MockUnsignedTxMockRecorder + func (m *MockUnsignedTx) InitCtx(ctx *snow.Context) + func (m *MockUnsignedTx) InputIDs() set.Set[ids.ID] + func (m *MockUnsignedTx) InputUTXOs() []*avax.UTXOID + func (m *MockUnsignedTx) NumCredentials() int + func (m *MockUnsignedTx) SetBytes(unsignedBytes []byte) + func (m *MockUnsignedTx) Visit(visitor Visitor) error + type MockUnsignedTxMockRecorder struct + func (mr *MockUnsignedTxMockRecorder) Bytes() *gomock.Call + func (mr *MockUnsignedTxMockRecorder) InitCtx(ctx any) *gomock.Call + func (mr *MockUnsignedTxMockRecorder) InputIDs() *gomock.Call + func (mr *MockUnsignedTxMockRecorder) InputUTXOs() *gomock.Call + func (mr *MockUnsignedTxMockRecorder) NumCredentials() *gomock.Call + func (mr *MockUnsignedTxMockRecorder) SetBytes(unsignedBytes any) *gomock.Call + func (mr *MockUnsignedTxMockRecorder) Visit(visitor any) *gomock.Call + type Operation struct + FxID ids.ID + Op fxs.FxOperation + UTXOIDs []*avax.UTXOID + func (op *Operation) Verify() error + type OperationTx struct + Ops []*Operation + func (t *OperationTx) InitCtx(ctx *snow.Context) + func (t *OperationTx) InputIDs() set.Set[ids.ID] + func (t *OperationTx) InputUTXOs() []*avax.UTXOID + func (t *OperationTx) NumCredentials() int + func (t *OperationTx) Operations() []*Operation + func (t *OperationTx) Visit(v Visitor) error + type Parser interface + Codec func() codec.Manager + CodecRegistry func() codec.Registry + GenesisCodec func() codec.Manager + GenesisCodecRegistry func() codec.Registry + ParseGenesisTx func(bytes []byte) (*Tx, error) + ParseTx func(bytes []byte) (*Tx, error) + func NewCustomParser(typeToFxIndex map[reflect.Type]int, clock *mockable.Clock, log logging.Logger, ...) (Parser, error) + func NewParser(fxs []fxs.Fx) (Parser, error) + type Tx struct + Creds []*fxs.FxCredential + TxID ids.ID + Unsigned UnsignedTx + func (t *Tx) Bytes() []byte + func (t *Tx) GossipID() ids.ID + func (t *Tx) ID() ids.ID + func (t *Tx) Initialize(c codec.Manager) error + func (t *Tx) InputIDs() set.Set[ids.ID] + func (t *Tx) SetBytes(unsignedBytes, signedBytes []byte) + func (t *Tx) SignNFTFx(c codec.Manager, signers [][]*secp256k1.PrivateKey) error + func (t *Tx) SignPropertyFx(c codec.Manager, signers [][]*secp256k1.PrivateKey) error + func (t *Tx) SignSECP256K1Fx(c codec.Manager, signers [][]*secp256k1.PrivateKey) error + func (t *Tx) Size() int + func (t *Tx) UTXOs() []*avax.UTXO + type UnsignedTx interface + Bytes func() []byte + InputIDs func() set.Set[ids.ID] + InputUTXOs func() []*avax.UTXOID + NumCredentials func() int + SetBytes func(unsignedBytes []byte) + Visit func(visitor Visitor) error + type Visitor interface + BaseTx func(*BaseTx) error + CreateAssetTx func(*CreateAssetTx) error + ExportTx func(*ExportTx) error + ImportTx func(*ImportTx) error + OperationTx func(*OperationTx) error