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 GetMessageHash(a Interface, message []byte, mode uint8) types.Hash
- 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) Compare(b Interface) int
- 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) ViewPublicKey() *crypto.PublicKeyBytes
- type Checksum
- type Interface
- 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(network uint8, err ...error) *Address
- func (p PackedAddress) ToBase58(network uint8, err ...error) []byte
- func (p *PackedAddress) ToPackedAddress() PackedAddress
- 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 GetPublicKeyForSharedData ¶
func GetPublicKeyForSharedData(a Interface, sharedData crypto.PrivateKey) crypto.PublicKey
func GetTxProofV1 ¶
func GetTxProofV2 ¶
Types ¶
type Address ¶
type Address struct { SpendPub crypto.PublicKeyBytes ViewPub crypto.PublicKeyBytes Network uint8 // contains filtered or unexported fields }
func FromBase58 ¶
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 }
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(network uint8, err ...error) *Address
func (*PackedAddress) ToPackedAddress ¶
func (p *PackedAddress) ToPackedAddress() PackedAddress
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.