btc

package
v0.0.0-...-93b2285 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddressGeneratorContext

func NewAddressGeneratorContext(
	currency domain.CryptoCurrency,
	userId uint32,
) *domain.AddressGeneratorContext

Types

type BIP32AddrGenerator

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

func NewBIP32AddrGenerator

func NewBIP32AddrGenerator(
	cfg config.Crypto,
	net *chaincfg.Params,
) *BIP32AddrGenerator

NewBIP32AddrGenerator creates BIP32 HD key generator

func (*BIP32AddrGenerator) Generate

Generate generates address for user

type CryptoAddress

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

func NewCryptoAddress

func NewCryptoAddress(key *btcec.PrivateKey, net *chaincfg.Params, uid uint32) (*CryptoAddress, error)

func (*CryptoAddress) Pub

func (a *CryptoAddress) Pub() string

func (*CryptoAddress) Uid

func (a *CryptoAddress) Uid() uint32

func (*CryptoAddress) Wif

func (a *CryptoAddress) Wif() string

type CryptoAddressAssigner

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

func NewCryptoAddressAssigner

func NewCryptoAddressAssigner(
	generator domain.CryptoAddressGenerator,
	log *zap.SugaredLogger,
	cryptoRepo domain.CryptoRepository,
) *CryptoAddressAssigner

func (*CryptoAddressAssigner) AssignBtc

func (c *CryptoAddressAssigner) AssignBtc(user *domain2.User)

Jump to

Keyboard shortcuts

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