Help us shape the future of Go! Take the 2026 Go Developer Survey

txstest

package
v1.36.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWallet

func NewWallet(
	t testing.TB,
	rt *runtime.Runtime,
	cfg *config.Config,
	state state.State,
	kc *secp256k1fx.Keychain,
	ownedNetworkIDs []ids.ID,
	validationIDs []ids.ID,
	importSourceChainIDs []ids.ID,
) wallet.Wallet

NewWallet creates a test wallet for P-chain transactions.

Parameters:

  • ownedNetworkIDs: Network IDs (L1 validator sets) that the keychain owns (for GetNetOwner lookups)
  • validationIDs: L1 validator IDs for deactivation owner lookups
  • importSourceChainIDs: Chain IDs to check for importable atomic UTXOs

func NewWalletWithOptions added in v1.16.56

func NewWalletWithOptions(
	t testing.TB,
	rt *runtime.Runtime,
	wCfg WalletConfig,
	state state.State,
	kc *secp256k1fx.Keychain,
	ownedNetworkIDs []ids.ID,
	validationIDs []ids.ID,
	importSourceChainIDs []ids.ID,
) wallet.Wallet

Types

type Backend added in v1.1.11

type Backend struct {
	// contains filtered or unexported fields
}

func (*Backend) GetNetOwner added in v1.16.56

func (b *Backend) GetNetOwner(_ context.Context, netID ids.ID) (fx.Owner, error)

func (*Backend) GetOwner added in v1.16.56

func (b *Backend) GetOwner(_ context.Context, ownerID ids.ID) (fx.Owner, error)

func (*Backend) GetUTXO added in v1.1.11

func (b *Backend) GetUTXO(_ context.Context, chainID, utxoID ids.ID) (*lux.UTXO, error)

func (*Backend) UTXOs added in v1.1.11

func (b *Backend) UTXOs(_ context.Context, sourceChainID ids.ID) ([]*lux.UTXO, error)

type WalletConfig added in v1.16.56

type WalletConfig struct {
	Config      *config.Config
	InternalCfg *config.Internal // Optional: for dynamic fees
}

type WalletFactory added in v1.1.11

type WalletFactory struct {
	// contains filtered or unexported fields
}

func NewWalletFactory added in v1.1.11

func NewWalletFactory(
	rt *runtime.Runtime,
	cfg *config.Config,
	state state.State,
) *WalletFactory

func NewWalletFactoryWithAssets added in v1.16.56

func NewWalletFactoryWithAssets(
	rt *runtime.Runtime,
	cfg *config.Config,
	state state.State,
	utxoAssetID ids.ID,
) *WalletFactory

NewWalletFactoryWithAssets creates a wallet factory with explicit asset IDs

func (*WalletFactory) NewWallet added in v1.1.11

func (w *WalletFactory) NewWallet(keys ...*secp256k1.PrivateKey) (builder.Builder, signer.Signer)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL