Documentation ¶
Index ¶
- func GenerateNonce() string
- type ExpiredMessage
- type InvalidMessage
- type InvalidSignature
- type Message
- func (m *Message) GetAddress() common.Address
- func (m *Message) GetChainID() int
- func (m *Message) GetDomain() string
- func (m *Message) GetExpirationTime() *string
- func (m *Message) GetIssuedAt() string
- func (m *Message) GetNonce() string
- func (m *Message) GetNotBefore() *string
- func (m *Message) GetRequestID() *string
- func (m *Message) GetResources() []url.URL
- func (m *Message) GetStatement() *string
- func (m *Message) GetURI() url.URL
- func (m *Message) GetVersion() string
- func (m *Message) String() string
- func (m *Message) ValidAt(when time.Time) (bool, error)
- func (m *Message) ValidNow() (bool, error)
- func (m *Message) Verify(signature string, domain *string, nonce *string, timestamp *time.Time) (*ecdsa.PublicKey, error)
- func (m *Message) VerifyEIP191(signature string) (*ecdsa.PublicKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNonce ¶
func GenerateNonce() string
Types ¶
type ExpiredMessage ¶
type ExpiredMessage struct {
// contains filtered or unexported fields
}
func (*ExpiredMessage) Error ¶
func (m *ExpiredMessage) Error() string
type InvalidMessage ¶
type InvalidMessage struct {
// contains filtered or unexported fields
}
func (*InvalidMessage) Error ¶
func (m *InvalidMessage) Error() string
type InvalidSignature ¶
type InvalidSignature struct {
// contains filtered or unexported fields
}
func (*InvalidSignature) Error ¶
func (m *InvalidSignature) Error() string
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func InitMessage ¶
func InitMessage(domain, address, uri, nonce string, options map[string]interface{}) (*Message, error)
InitMessage creates a Message object with the provided parameters
func ParseMessage ¶
ParseMessage returns a Message object by parsing an EIP-4361 formatted string
func (*Message) GetAddress ¶
func (*Message) GetChainID ¶
func (*Message) GetExpirationTime ¶
func (*Message) GetIssuedAt ¶
func (*Message) GetNotBefore ¶
func (*Message) GetRequestID ¶
func (*Message) GetResources ¶
func (*Message) GetStatement ¶
func (*Message) GetVersion ¶
func (*Message) ValidAt ¶
ValidAt validates the time constraints of the message at a specific point in time.
Click to show internal directories.
Click to hide internal directories.