Documentation
¶
Index ¶
- Constants
- Variables
- func GetDerivationNoAllocate(viewPublicKeyPoint *edwards25519.Point, txKey *edwards25519.Scalar) crypto.PublicKeyBytes
- func GetDerivationNoAllocateTable(viewPublicKeyTable *edwards25519.PrecomputedTable, txKey *edwards25519.Scalar) crypto.PublicKeyBytes
- func GetDeterministicTransactionPrivateKey(seed types.Hash, prevId types.Hash) crypto.PrivateKey
- func GetEphemeralPublicKey(a Interface, txKey crypto.PrivateKey, outputIndex uint64) crypto.PublicKey
- func GetEphemeralPublicKeyAndViewTag(a Interface, txKey crypto.PrivateKey, outputIndex uint64) (crypto.PublicKey, uint8)
- func GetEphemeralPublicKeyAndViewTagNoAllocate(spendPublicKeyPoint *edwards25519.Point, derivation crypto.PublicKeyBytes, ...) (crypto.PublicKeyBytes, uint8)
- func GetEphemeralPublicKeyAndViewTagWithViewKey(a Interface, txPubKey crypto.PublicKey, viewKey crypto.PrivateKey, ...) (crypto.PublicKey, uint8)
- func GetEphemeralPublicKeyWithViewKey(a Interface, txPubKey crypto.PublicKey, viewKey crypto.PrivateKey, ...) crypto.PublicKey
- func GetInProofV1(a Interface, txId types.Hash, viewKey crypto.PrivateKey, ...) string
- func GetInProofV2(a Interface, txId types.Hash, viewKey crypto.PrivateKey, ...) string
- func GetMessageHash(a Interface, message []byte, mode uint8) types.Hash
- func GetOutProofV1(a Interface, txId types.Hash, txKey crypto.PrivateKey, message string, ...) string
- func GetOutProofV2(a Interface, txId types.Hash, txKey crypto.PrivateKey, message string, ...) string
- func GetPublicKeyForSharedData(a Interface, sharedData crypto.PrivateKey) crypto.PublicKey
- func GetTxProofV1(a Interface, txId types.Hash, txKey crypto.PrivateKey, message string) string
- func GetTxProofV2(a Interface, txId types.Hash, txKey crypto.PrivateKey, message string) string
- type Address
- func (a *Address) BaseNetwork() uint8
- func (a *Address) Compare(b Interface) int
- func (a *Address) IsSubaddress() bool
- func (a *Address) MarshalJSON() ([]byte, error)
- func (a *Address) PublicKeys() (spend, view crypto.PublicKey)
- func (a *Address) SpendPublicKey() *crypto.PublicKeyBytes
- func (a *Address) ToAddress(network uint8, err ...error) *Address
- func (a *Address) ToBase58() []byte
- func (a *Address) ToPackedAddress() PackedAddress
- func (a *Address) UnmarshalJSON(b []byte) error
- func (a *Address) Valid() bool
- func (a *Address) ViewPublicKey() *crypto.PublicKeyBytes
- type Checksum
- type Interface
- type InterfaceSubaddress
- type PackedAddress
- func (p PackedAddress) Bytes() []byte
- func (p *PackedAddress) Compare(b Interface) int
- func (p *PackedAddress) ComparePacked(other *PackedAddress) int
- func (p *PackedAddress) PublicKeys() (spend, view crypto.PublicKey)
- func (p PackedAddress) Reference() *PackedAddress
- func (p *PackedAddress) SpendPublicKey() *crypto.PublicKeyBytes
- func (p *PackedAddress) ToAddress(typeNetwork uint8, err ...error) *Address
- func (p PackedAddress) ToBase58(typeNetwork uint8, err ...error) []byte
- func (p *PackedAddress) ToPackedAddress() PackedAddress
- func (p PackedAddress) Valid() bool
- func (p *PackedAddress) ViewPublicKey() *crypto.PublicKeyBytes
- type SignatureVerifyResult
Constants ¶
View Source
const ( ResultFail = SignatureVerifyResult(iota) ResultSuccessSpend ResultSuccessView )
View Source
const ChecksumLength = 4
View Source
const PackedAddressSpend = 0
View Source
const PackedAddressView = 1
Variables ¶
View Source
var PackedAddressGlobalNetwork uint8 = monero.MainNetwork
Functions ¶
func GetDerivationNoAllocate ¶
func GetDerivationNoAllocate(viewPublicKeyPoint *edwards25519.Point, txKey *edwards25519.Scalar) crypto.PublicKeyBytes
GetDerivationNoAllocate Special version
func GetDerivationNoAllocateTable ¶
func GetDerivationNoAllocateTable(viewPublicKeyTable *edwards25519.PrecomputedTable, txKey *edwards25519.Scalar) crypto.PublicKeyBytes
GetDerivationNoAllocateTable Special version but with table
func GetEphemeralPublicKey ¶
func GetEphemeralPublicKeyAndViewTagNoAllocate ¶
func GetEphemeralPublicKeyAndViewTagNoAllocate(spendPublicKeyPoint *edwards25519.Point, derivation crypto.PublicKeyBytes, outputIndex uint64, hasher *sha3.HasherState) (crypto.PublicKeyBytes, uint8)
GetEphemeralPublicKeyAndViewTagNoAllocate Special version of GetEphemeralPublicKeyAndViewTag
func GetEphemeralPublicKeyAndViewTagWithViewKey ¶ added in v4.6.0
func GetEphemeralPublicKeyWithViewKey ¶ added in v4.6.0
func GetInProofV1 ¶ added in v4.6.0
func GetInProofV2 ¶ added in v4.6.0
func GetOutProofV1 ¶ added in v4.6.0
func GetOutProofV1(a Interface, txId types.Hash, txKey crypto.PrivateKey, message string, additionalTxKeys ...crypto.PrivateKey) string
func GetOutProofV2 ¶ added in v4.6.0
func GetOutProofV2(a Interface, txId types.Hash, txKey crypto.PrivateKey, message string, additionalTxKeys ...crypto.PrivateKey) string
func GetPublicKeyForSharedData ¶
func GetPublicKeyForSharedData(a Interface, sharedData crypto.PrivateKey) crypto.PublicKey
func GetTxProofV1 ¶
GetTxProofV1 Deprecated
func GetTxProofV2 ¶
GetTxProofV2 Deprecated
Types ¶
type Address ¶
type Address struct {
SpendPub crypto.PublicKeyBytes
ViewPub crypto.PublicKeyBytes
TypeNetwork uint8
// contains filtered or unexported fields
}
func FromBase58 ¶
func (*Address) BaseNetwork ¶ added in v4.8.0
func (*Address) IsSubaddress ¶ added in v4.8.0
func (*Address) MarshalJSON ¶
func (*Address) PublicKeys ¶
func (*Address) SpendPublicKey ¶
func (a *Address) SpendPublicKey() *crypto.PublicKeyBytes
func (*Address) ToPackedAddress ¶
func (a *Address) ToPackedAddress() PackedAddress
func (*Address) UnmarshalJSON ¶
func (*Address) ViewPublicKey ¶
func (a *Address) ViewPublicKey() *crypto.PublicKeyBytes
type Checksum ¶
type Checksum [ChecksumLength]byte
type Interface ¶
type Interface interface {
Compare(b Interface) int
PublicKeys() (spend, view crypto.PublicKey)
SpendPublicKey() *crypto.PublicKeyBytes
ViewPublicKey() *crypto.PublicKeyBytes
ToAddress(network uint8, err ...error) *Address
ToPackedAddress() PackedAddress
}
func GetSubaddressFakeAddress ¶ added in v4.8.0
func GetSubaddressFakeAddress(sa InterfaceSubaddress, viewKey crypto.PrivateKey) Interface
type InterfaceSubaddress ¶ added in v4.8.0
type PackedAddress ¶
type PackedAddress [2]crypto.PublicKeyBytes
PackedAddress 0 = spend, 1 = view
var ZeroPrivateKeyAddress PackedAddress
ZeroPrivateKeyAddress Special address with private keys set to both zero. Useful to detect unsupported signatures from hardware wallets on Monero GUI
func NewPackedAddress ¶
func NewPackedAddress(spend, view crypto.PublicKey) (result PackedAddress)
func NewPackedAddressFromBytes ¶
func NewPackedAddressFromBytes(spend, view crypto.PublicKeyBytes) (result PackedAddress)
func (PackedAddress) Bytes ¶
func (p PackedAddress) Bytes() []byte
func (*PackedAddress) Compare ¶
func (p *PackedAddress) Compare(b Interface) int
Compare special consensus comparison
func (*PackedAddress) ComparePacked ¶
func (p *PackedAddress) ComparePacked(other *PackedAddress) int
func (*PackedAddress) PublicKeys ¶
func (p *PackedAddress) PublicKeys() (spend, view crypto.PublicKey)
func (PackedAddress) Reference ¶
func (p PackedAddress) Reference() *PackedAddress
func (*PackedAddress) SpendPublicKey ¶
func (p *PackedAddress) SpendPublicKey() *crypto.PublicKeyBytes
func (*PackedAddress) ToAddress ¶
func (p *PackedAddress) ToAddress(typeNetwork uint8, err ...error) *Address
func (PackedAddress) ToBase58 ¶
func (p PackedAddress) ToBase58(typeNetwork uint8, err ...error) []byte
func (*PackedAddress) ToPackedAddress ¶
func (p *PackedAddress) ToPackedAddress() PackedAddress
func (PackedAddress) Valid ¶ added in v4.9.1
func (p PackedAddress) Valid() bool
func (*PackedAddress) ViewPublicKey ¶
func (p *PackedAddress) ViewPublicKey() *crypto.PublicKeyBytes
type SignatureVerifyResult ¶
type SignatureVerifyResult int
const ( ResultFailZeroSpend SignatureVerifyResult = -2 ResultFailZeroView SignatureVerifyResult = -1 )
func VerifyMessage ¶
func VerifyMessage(a Interface, message []byte, signature string) SignatureVerifyResult
func VerifyMessageFallbackToZero ¶
func VerifyMessageFallbackToZero(a Interface, message []byte, signature string) SignatureVerifyResult
VerifyMessageFallbackToZero Check for Monero GUI behavior to generate wrong signatures on view-only wallets
Click to show internal directories.
Click to hide internal directories.