domain

package
v0.0.0-...-a24b8d5 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AddressMaxLength = 42
View Source
const (
	WalletSignatureMessage = "Sign\n        \n        Nonce: %s"
)

Variables

View Source
var (
	ErrAddressInvalid = errors.New("address: must start with '0x'")
	ErrAddressTooLong = fmt.Errorf(
		"address: must be up to %d characters",
		AddressMaxLength,
	)
	ErrSigVerifyECRecoverFailed    = errors.New("address: ecrecover failed")
	ErrSigVerifyAddressMismatch    = errors.New("address: address mismatch")
	ErrSigVerifyVerificationFailed = errors.New("address: signature verification failed")
	ErrSigVerifyFailed             = errors.New("address: verify signature failed")
)

Functions

This section is empty.

Types

type Account

type Account struct {
	// contains filtered or unexported fields
}

func NewAccount

func NewAccount(userName string, walletAddresses []string) Account

func (*Account) Name

func (a *Account) Name() string

func (*Account) WalletAddresses

func (a *Account) WalletAddresses() []Address

type AccountRepository

type AccountRepository interface {
	GetAccountByAddress(ctx context.Context, walletAddress Address) (*Account, error)
}

type Address

type Address string

func NewAddress

func NewAddress(v string) (Address, error)

func (Address) Equal

func (a Address) Equal(b Address) bool

func (Address) Has

func (a Address) Has(addresses []Address) bool

func (Address) SigVerify

func (a Address) SigVerify(message string, signature string) error

Jump to

Keyboard shortcuts

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