Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sign ¶
func Sign(p *ecdsa.PrivateKey, msg []byte) ([]byte, error)
Sign signs message using WalletConnect API. The returned signature contains RFC6979 signature and 16-byte salt.
func VerifyMessage ¶
func VerifyMessage(p *ecdsa.PublicKey, m SignedMessage) bool
VerifyMessage verifies message with a private key and returns structure similar to `verifyMessage` of WalletConnect API. https://github.com/CityOfZion/wallet-connect-sdk/blob/89c236b/packages/wallet-connect-sdk-core/src/index.ts#L515 https://github.com/CityOfZion/neon-wallet/blob/1174a9388480e6bbc4f79eb13183c2a573f67ca8/app/context/WalletConnect/helpers.js#L147
Types ¶
type SignedMessage ¶
SignedMessage contains mirrors `SignedMessage` struct from the WalletConnect API. https://neon.coz.io/wksdk/core/modules.html#SignedMessage
func SignMessage ¶
func SignMessage(p *ecdsa.PrivateKey, msg []byte) (SignedMessage, error)
SignMessage signs message with a private key and returns structure similar to `signMessage` of the WalletConnect API. https://github.com/CityOfZion/wallet-connect-sdk/blob/89c236b/packages/wallet-connect-sdk-core/src/index.ts#L496 https://github.com/CityOfZion/neon-wallet/blob/1174a9388480e6bbc4f79eb13183c2a573f67ca8/app/context/WalletConnect/helpers.js#L133