Versions in this module Expand all Collapse all v1 v1.0.0 Apr 24, 2026 Changes in this version + const Version + func GenerateNonce() string + func IsEIP6492Signature(sigHex string) bool + type ContractSignatureVerifier interface + VerifyContractSignature func(ctx context.Context, address common.Address, hash common.Hash, sig []byte, ...) (bool, error) + type Error struct + Expected string + Received string + Type ErrorType + func (e *Error) Error() string + func (e *Error) Is(target error) bool + type ErrorType string + const ErrChainIDMismatch + const ErrDomainMismatch + const ErrExpiredMessage + const ErrInvalidAddress + const ErrInvalidDomain + const ErrInvalidMessageVersion + const ErrInvalidNonce + const ErrInvalidParams + const ErrInvalidRequestID + const ErrInvalidSignature + const ErrInvalidSignatureChain + const ErrInvalidStatement + const ErrInvalidTimeFormat + const ErrInvalidURI + const ErrMalformedMessage + const ErrMissingChainID + const ErrMissingDomain + const ErrMissingNonce + const ErrMissingURI + const ErrNonceMismatch + const ErrNotYetValidMessage + const ErrRequestIDMismatch + const ErrSchemeMismatch + const ErrURIMismatch + const ErrUnableToParseMessage + type EthCaller interface + CallContract func(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) + ChainID func(ctx context.Context) (*big.Int, error) + type EthCallerVerifier struct + Caller EthCaller + func NewEthCallerVerifier(caller EthCaller) *EthCallerVerifier + func (v *EthCallerVerifier) VerifyContractSignature(ctx context.Context, address common.Address, hash common.Hash, sig []byte, ...) (bool, error) + type Message struct + Address common.Address + AddressRaw *string + ChainID int + Domain string + ExpirationTime *string + IssuedAt string + Nonce string + NotBefore *string + RequestID *string + Resources []string + Scheme *string + Statement *string + URI string + Version string + Warnings []string + func InitMessage(domain, address, uri, nonce string, options map[string]interface{}) (*Message, error) + func NewMessage(domain, address, uri, nonce string, options map[string]interface{}) (*Message, error) + func ParseMessage(s string) (*Message, error) + func (m *Message) ClearResources() + func (m *Message) EIP191Hash() common.Hash + 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() []string + func (m *Message) GetScheme() *string + func (m *Message) GetStatement() *string + func (m *Message) GetURI() string + func (m *Message) GetVersion() string + func (m *Message) PrepareMessage() string + func (m *Message) SetResources(r []string) + func (m *Message) String() string + func (m *Message) ValidAt(when time.Time) (bool, error) + func (m *Message) ValidNow() (bool, error) + func (m *Message) Validate() error + func (m *Message) VerifyEIP191(signature string) (*ecdsa.PublicKey, error) + func (m *Message) VerifyWith(ctx context.Context, signature string, params VerifyParams, opts VerifyOptions) (*VerifyResult, error) + type VerifyOptions struct + ContractVerifier ContractSignatureVerifier + type VerifyParams struct + ChainID *int + Domain *string + Nonce *string + RequestID *string + Scheme *string + Time *time.Time + URI *string + type VerifyResult struct + ContractVerified bool + ECDSAPublicKey *ecdsa.PublicKey