Documentation ¶
Index ¶
- Variables
- func EstimatedDifficulty(prefix string, caseSensitive, includeNetwork bool) uint64
- func IsValidPrefix(prefix string, network Network, initIndex int) bool
- func NeedOnlySpendKey(prefix string) bool
- type Key
- func (k1 *Key) Add(k2 *Key) *Key
- func (k *Key) Address(network Network) string
- func (k *Key) AddressWithAdditionalPublicKey(network Network, spendPub, viewPub *[32]byte) string
- func (k *Key) HalfAddress(network Network) string
- func (k *Key) HalfAddressWithAdditionalPublicKey(network Network, spendPub *[32]byte) string
- func (k *Key) HalfToFull()
- func (k *Key) PublicSpendKey() *[32]byte
- func (k *Key) PublicViewKey() *[32]byte
- func (k *Key) Seed() *[32]byte
- type Network
Constants ¶
This section is empty.
Variables ¶
var ( MoneroMainNetwork = Network{0x12} MoneroTestNetwork = Network{0x35} GraftMainNetwork = Network{0x5a} )
Functions ¶
func EstimatedDifficulty ¶
EstimatedDifficulty estimates the difficulty to generate a vanity address with given prefix
func IsValidPrefix ¶
IsValidPrefix checks if a given prefix is valid as per the given network.
func NeedOnlySpendKey ¶
NeedOnlySpendKey estimates if the generation of vanity address with given prefix can be done with brute force only the spend key.
Types ¶
type Key ¶
type Key struct {
SpendKey, ViewKey *[32]byte
}
Key consists of a ed25519 256-bit SpendKey and a ViewKey. In order to make the mnemonic seeds work, ViewKey is actually derived from SpendKey with Keccak256, also leading to SpendKey serving as the seed.
func HalfKeyFromSeed ¶
HalfKeyFromSeed construsts a half size of Key (i.e. only spend key) with given seed. This should only be used for vanity address generation, which it boosts up the generation speed.
func KeyFromSeed ¶
KeyFromSeed construsts a Key with given seed.
func (*Key) AddressWithAdditionalPublicKey ¶
AddressWithAdditionalPublicKey adds extra spendPub and viewPub to k in an ellipse curve sense (point add), returning the base58 encoded address of the sum.
func (*Key) HalfAddress ¶
HalfAddress encodes network and spend key only. This should only be used for vanity.
func (*Key) HalfAddressWithAdditionalPublicKey ¶
HalfAddressWithAdditionalPublicKey adds extra spendPub to k in an ellipse curve sense (point add), returning the base58 encoded address of the sum.
func (*Key) HalfToFull ¶
func (k *Key) HalfToFull()
HalfToFull transfroms a Key construsted by HalfKeyFromSeed to a full key. Basically, it triggers the derivation of its view key from spend key.