signature

package
v0.0.0-...-43db901 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2018 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSignedMessageString

func CreateSignedMessageString(message *message.Message, ga *blockchain.GladiusAccountManager) (string, error)

CreateSignedMessageString creates a signed state from the message where

Types

type SignedMessage

type SignedMessage struct {
	Message   *json.RawMessage `json:"message"`
	Hash      []byte           `json:"hash"`
	Signature []byte           `json:"signature"`
	Address   string           `json:"address"`
	// contains filtered or unexported fields
}

SignedMessage is a type representing a signed message

func CreateSignedMessage

func CreateSignedMessage(message *message.Message, ga *blockchain.GladiusAccountManager) (*SignedMessage, error)

func ParseSignedMessage

func ParseSignedMessage(message, hash, signature, address string) (*SignedMessage, error)

ParseSignedMessage returns a signed message to be passed into the VerifySignedMessage method

func (SignedMessage) GetAgeInSeconds

func (sm SignedMessage) GetAgeInSeconds() int64

func (SignedMessage) GetTimestamp

func (sm SignedMessage) GetTimestamp() int64

GetTimestamp gets the verified timestamp from the message

func (SignedMessage) IsInPoolAndVerified

func (sm SignedMessage) IsInPoolAndVerified() bool

func (SignedMessage) IsPoolManagerAndVerified

func (sm SignedMessage) IsPoolManagerAndVerified() bool

func (SignedMessage) IsVerified

func (sm SignedMessage) IsVerified() bool

IsVerified checks the internal status of the message and returns true if the message is verified

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL