ltc

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: BlueOak-1.0.0 Imports: 45 Imported by: 3

Documentation

Index

Constants

View Source
const (

	// BipID is the BIP-0044 asset ID.
	BipID = 2
)
View Source
const (
	DefaultM uint64 = 784931 // From ltcutil. Used for gcs filters.

)

Variables

View Source
var (
	NetPorts = dexbtc.NetPorts{
		Mainnet: "9332",
		Testnet: "19332",
		Simnet:  "19443",
	}

	// WalletInfo defines some general information about a Litecoin wallet.
	WalletInfo = &asset.WalletInfo{
		Name:              "Litecoin",
		Version:           version,
		SupportedVersions: []uint32{version},
		UnitInfo:          dexltc.UnitInfo,
		AvailableWallets: []*asset.WalletDefinition{
			spvWalletDefinition,
			rpcWalletDefinition,
			electrumWalletDefinition,
		},
	}
)

Functions

func NewWallet

func NewWallet(cfg *asset.WalletConfig, logger dex.Logger, network dex.Network) (asset.Wallet, error)

NewWallet is the exported constructor by which the DEX will import the exchange wallet.

Types

type Driver

type Driver struct{}

Driver implements asset.Driver.

func (*Driver) Create added in v0.6.0

func (d *Driver) Create(params *asset.CreateWalletParams) error

Create creates a new SPV wallet.

func (*Driver) DecodeCoinID

func (d *Driver) DecodeCoinID(coinID []byte) (string, error)

DecodeCoinID creates a human-readable representation of a coin ID for Litecoin.

func (*Driver) Exists added in v0.6.0

func (d *Driver) Exists(walletType, dataDir string, settings map[string]string, net dex.Network) (bool, error)

Exists checks the existence of the wallet. Part of the Creator interface, so only used for wallets with WalletDefinition.Seeded = true.

func (*Driver) Info

func (d *Driver) Info() *asset.WalletInfo

Info returns basic information about the wallet and asset.

func (*Driver) Open added in v0.4.0

func (d *Driver) Open(cfg *asset.WalletConfig, logger dex.Logger, network dex.Network) (asset.Wallet, error)

Open creates the LTC exchange wallet. Start the wallet with its Run method.

Jump to

Keyboard shortcuts

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