package
0.28.0
Repository: https://github.com/ten-protocol/go-ten.git
Documentation: pkg.go.dev

# Functions

CalculateUserID calculates userID from a public key (we truncate it, because we want it to have length 20).
CalculateUserIDHex CalculateUserID calculates userID from a public key (we truncate it, because we want it to have length 20) and encode to hex strings.
CheckSignature checks if signature is valid for provided encryptionToken and chainID and return address or nil if not valid.
CheckSignatureAndReturnAccountAddress checks if the signature is valid for hash of the message and checks if signer is an address provided to the function.
GenerateMessage generates a message for the given encryptionToken, chainID, version and signatureType.
GenerateViewingKeyForWallet takes an account wallet, generates a viewing key and signs the key with the acc's private key.
GetBestFormat returns the best format for a message based on available formats that are supported by the user.
GetMessageHash returns the hash of the message based on the signature type.
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RPCSignedViewingKey - used for transporting a minimalist viewing key via every RPC request to a sensitive method, including Log subscriptions.
ViewingKey encapsulates the signed viewing key for an account for use in encrypted communication with an enclave.

# Interfaces

No description provided by the author
MessageHash is an interface for getting the hash of the message.
SignatureChecker is an interface for checking if signature is valid for provided encryptionToken and chainID and return singing address or nil if not valid.

# Type aliases

SignatureType is used to differentiate between different signature types (string is used, because int is not RLP-serializable).