Versions in this module Expand all Collapse all v1 v1.9.8 Jun 28, 2023 Changes in this version + const MaxMemoSize + var ErrWrongNetworkID = errors.New("tx has wrong network ID") + func GetBalance(db UTXOReader, addrs set.Set[ids.ShortID]) (uint64, error) + func IsSortedTransferableOutputs(outs []*TransferableOutput, c codec.Manager) bool + func ParseLocalAddresses(a AddressManager, addrStrs []string) (set.Set[ids.ShortID], error) + func ParseServiceAddress(a AddressManager, addrStr string) (ids.ShortID, error) + func ParseServiceAddresses(a AddressManager, addrStrs []string) (set.Set[ids.ShortID], error) + func SortTransferableInputsWithSigners(ins []*TransferableInput, signers [][]*crypto.PrivateKeySECP256K1R) + func SortTransferableOutputs(outs []*TransferableOutput, c codec.Manager) + func VerifyTx(feeAmount uint64, feeAssetID ids.ID, allIns [][]*TransferableInput, ...) error + type AddressManager interface + FormatAddress func(chainID ids.ID, addr ids.ShortID) (string, error) + FormatLocalAddress func(addr ids.ShortID) (string, error) + ParseAddress func(addrStr string) (ids.ID, ids.ShortID, error) + ParseLocalAddress func(addrStr string) (ids.ShortID, error) + func NewAddressManager(ctx *snow.Context) AddressManager + type Addressable interface + Addresses func() [][]byte + type Amounter interface + Amount func() uint64 + type Asset struct + ID ids.ID + func (asset *Asset) AssetID() ids.ID + func (asset *Asset) Verify() error + type AtomicUTXOManager interface + GetAtomicUTXOs func(chainID ids.ID, addrs set.Set[ids.ShortID], startAddr ids.ShortID, ...) ([]*UTXO, ids.ShortID, ids.ID, error) + func NewAtomicUTXOManager(sm atomic.SharedMemory, codec codec.Manager) AtomicUTXOManager + type BaseTx struct + BlockchainID ids.ID + Ins []*TransferableInput + Memo types.JSONByteSlice + NetworkID uint32 + Outs []*TransferableOutput + func (t *BaseTx) AssetIDs() set.Set[ids.ID] + func (t *BaseTx) ConsumedAssetIDs() set.Set[ids.ID] + func (t *BaseTx) InputUTXOs() []*UTXOID + func (t *BaseTx) NumCredentials() int + func (t *BaseTx) Verify(ctx *snow.Context) error + type Coster interface + Cost func() (uint64, error) + type FlowChecker struct + func NewFlowChecker() *FlowChecker + func (fc *FlowChecker) Consume(assetID ids.ID, amount uint64) + func (fc *FlowChecker) Produce(assetID ids.ID, amount uint64) + func (fc *FlowChecker) Verify() error + type Metadata struct + func (md *Metadata) Bytes() []byte + func (md *Metadata) ID() ids.ID + func (md *Metadata) Initialize(unsignedBytes, bytes []byte) + func (md *Metadata) SignedBytes() []byte + func (md *Metadata) Verify() error + type MockTransferableIn struct + func NewMockTransferableIn(ctrl *gomock.Controller) *MockTransferableIn + func (m *MockTransferableIn) Amount() uint64 + func (m *MockTransferableIn) Cost() (uint64, error) + func (m *MockTransferableIn) EXPECT() *MockTransferableInMockRecorder + func (m *MockTransferableIn) InitCtx(arg0 *snow.Context) + func (m *MockTransferableIn) Verify() error + type MockTransferableInMockRecorder struct + func (mr *MockTransferableInMockRecorder) Amount() *gomock.Call + func (mr *MockTransferableInMockRecorder) Cost() *gomock.Call + func (mr *MockTransferableInMockRecorder) InitCtx(arg0 interface{}) *gomock.Call + func (mr *MockTransferableInMockRecorder) Verify() *gomock.Call + type MockTransferableOut struct + func NewMockTransferableOut(ctrl *gomock.Controller) *MockTransferableOut + func (m *MockTransferableOut) Amount() uint64 + func (m *MockTransferableOut) EXPECT() *MockTransferableOutMockRecorder + func (m *MockTransferableOut) InitCtx(arg0 *snow.Context) + func (m *MockTransferableOut) Verify() error + func (m *MockTransferableOut) VerifyState() error + type MockTransferableOutMockRecorder struct + func (mr *MockTransferableOutMockRecorder) Amount() *gomock.Call + func (mr *MockTransferableOutMockRecorder) InitCtx(arg0 interface{}) *gomock.Call + func (mr *MockTransferableOutMockRecorder) Verify() *gomock.Call + func (mr *MockTransferableOutMockRecorder) VerifyState() *gomock.Call + type TestAddressable struct + Addrs [][]byte + func (a *TestAddressable) Addresses() [][]byte + type TestTransferable struct + Val uint64 + func (*TestTransferable) Cost() (uint64, error) + func (*TestTransferable) InitCtx(*snow.Context) + func (t *TestTransferable) Amount() uint64 + type TestVerifiable struct + Err error + func (*TestVerifiable) InitCtx(*snow.Context) + func (v *TestVerifiable) Verify() error + func (v *TestVerifiable) VerifyState() error + type TransferableIn interface + type TransferableInput struct + FxID ids.ID + In TransferableIn + func (in *TransferableInput) Input() TransferableIn + func (in *TransferableInput) Less(other *TransferableInput) bool + func (in *TransferableInput) Verify() error + type TransferableOut interface + type TransferableOutput struct + FxID ids.ID + Out TransferableOut + func (out *TransferableOutput) InitCtx(ctx *snow.Context) + func (out *TransferableOutput) Output() TransferableOut + func (out *TransferableOutput) Verify() error + type UTXO struct + Out verify.State + func GetAllUTXOs(db UTXOReader, addrs set.Set[ids.ShortID]) ([]*UTXO, error) + func GetPaginatedUTXOs(db UTXOReader, addrs set.Set[ids.ShortID], lastAddr ids.ShortID, ...) ([]*UTXO, ids.ShortID, ids.ID, error) + func (utxo *UTXO) Verify() error + type UTXOGetter interface + GetUTXO func(utxoID ids.ID) (*UTXO, error) + type UTXOID struct + OutputIndex uint32 + Symbol bool + TxID ids.ID + func UTXOIDFromString(s string) (*UTXOID, error) + func (utxo *UTXOID) InputID() ids.ID + func (utxo *UTXOID) InputSource() (ids.ID, uint32) + func (utxo *UTXOID) Less(other *UTXOID) bool + func (utxo *UTXOID) String() string + func (utxo *UTXOID) Symbolic() bool + func (utxo *UTXOID) Verify() error + type UTXOReader interface + UTXOIDs func(addr []byte, previous ids.ID, limit int) ([]ids.ID, error) + type UTXOState interface + func NewMeteredUTXOState(db database.Database, codec codec.Manager, metrics prometheus.Registerer) (UTXOState, error) + func NewUTXOState(db database.Database, codec codec.Manager) UTXOState + type UTXOWriter interface + DeleteUTXO func(utxoID ids.ID) error + PutUTXO func(utxo *UTXO) error v1.9.8-rc.9 Jun 28, 2023