Documentation
¶
Index ¶
- Constants
- func EstimateFee(outputs []*wire.TxOut, feeRatePerKb ltcutil.Amount, includeChange bool) uint64
- func NewPegin(value uint64, kernel *wire.MwebKernel) *wire.TxOut
- func VerifyHeader(mwebHeader *wire.MsgMwebHeader) error
- func VerifyLeafset(mwebHeader *wire.MsgMwebHeader, mwebLeafset *wire.MsgMwebLeafset) error
- func VerifyUtxos(mwebHeader *wire.MwebHeader, leafset *Leafset, mwebUtxos *wire.MsgMwebUtxos) bool
- type Coin
- type Keychain
- type Leafset
- type Recipient
Constants ¶
View Source
const ( BaseMwebFee = 100 BaseKernelWeight = 2 StealthExcessWeight = 1 KernelWithStealthWeight = BaseKernelWeight + StealthExcessWeight BaseOutputWeight = 17 StandardOutputFieldsWeight = 1 StandardOutputWeight = BaseOutputWeight + StandardOutputFieldsWeight // For any extra data added to inputs, outputs or kernels BytesPerWeight = 42 )
Variables ¶
This section is empty.
Functions ¶
func EstimateFee ¶
func VerifyHeader ¶
func VerifyHeader(mwebHeader *wire.MsgMwebHeader) error
func VerifyLeafset ¶
func VerifyLeafset(mwebHeader *wire.MsgMwebHeader, mwebLeafset *wire.MsgMwebLeafset) error
func VerifyUtxos ¶
func VerifyUtxos(mwebHeader *wire.MwebHeader, leafset *Leafset, mwebUtxos *wire.MsgMwebUtxos) bool
Types ¶
type Coin ¶
type Coin struct {
// The private key needed in order to spend the coin.
// Will be nil for watch-only wallets.
// May be nil for locked wallets. Upon unlock, SpendKey will get populated.
SpendKey *mw.SecretKey
// The blinding factor of the coin's output.
// May be nil for watch-only wallets.
Blind *mw.BlindingFactor
// The output amount in litoshis.
// Typically positive, but could be 0 in the future
// when we start using decoys to improve privacy.
Value uint64
// The output's ID (hash).
OutputId *chainhash.Hash
// The ephemeral private key used by the sender to create the output.
// This will only be populated when the coin has flag HAS_SENDER_INFO.
SenderKey *mw.SecretKey
// The StealthAddress the coin was sent to.
// This will only be populated when the coin has flag HAS_SENDER_INFO.
Address *mw.StealthAddress
// By storing this, we are able to postpone calculation of the spend key.
// This allows us to scan for outputs while wallet is locked, and recalculate
// the output key once the wallet becomes unlocked.
SharedSecret *mw.SecretKey
}
Represents an output owned by the wallet, or one sent by the wallet.
func NewTransaction ¶
func RewindOutput ¶
func (*Coin) CalculateOutputKey ¶
type Leafset ¶
type Leafset struct {
Bits []byte
Size uint64
Height uint32
Block *wire.BlockHeader
}
type Recipient ¶
type Recipient struct {
Value uint64
Address *mw.StealthAddress
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.