Documentation ¶
Index ¶
- func CalculatePresignSighash(sighash []byte, authType stacks.AuthType, fee uint64, nonce uint64) []byte
- func CalculateSighash(serializedTx []byte) []byte
- func CalculateStacksAddress(pubKey []byte, network stacks.ChainID) (string, error)
- func DeriveStxPrivateKey(mnemonic string, index uint32) ([]byte, error)
- func GetAddressFromPrivateKey(privateKey []byte, network stacks.ChainID) (string, error)
- func GetPublicKeyFromPrivate(privateKey []byte) []byte
- func Hash160(b []byte) []byte
- func VerifySignature(messageHash string, signature MessageSignature, publicKey []byte) (bool, error)
- type MessageSignature
- type StacksMessageType
- type StacksPrivateKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculatePresignSighash ¶
func CalculateSighash ¶
func CalculateStacksAddress ¶ added in v0.2.0
func GetAddressFromPrivateKey ¶ added in v0.2.0
func GetPublicKeyFromPrivate ¶
func VerifySignature ¶
func VerifySignature(messageHash string, signature MessageSignature, publicKey []byte) (bool, error)
Types ¶
type MessageSignature ¶
type MessageSignature struct { Type StacksMessageType Data string }
func CreateMessageSignature ¶
func CreateMessageSignature(signature string) (MessageSignature, error)
func SignWithKey ¶
func SignWithKey(privateKey []byte, messageHash string) (MessageSignature, error)
type StacksMessageType ¶
type StacksMessageType int
const ( Address StacksMessageType = iota MessageSignatureType )
type StacksPrivateKey ¶
Click to show internal directories.
Click to hide internal directories.