types

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type INonceStorage

type INonceStorage interface {
	Store(n *NonceSerializable) error
	Load(chainId uint64, address string, contract *string) (*NonceSerializable, error)
}

type IWalletStorage

type IWalletStorage interface {
	Store(ws *WalletSerializable) error
	Load(address string, apiKeyHashed string) (*WalletSerializable, error)
}

type NonceSerializable

type NonceSerializable struct {
	Address        string         `json:"address"`
	Contract       *string        `json:"contract,omitempty"`
	ChainId        uint64         `json:"chainId"`
	Nonce          uint64         `json:"nonce"`
	ReturnedNonces SortedNonceArr `json:"returnedNonces"`
	LastUsed       int64          `json:"lastUsed"`
}

type SortedNonceArr

type SortedNonceArr []uint64

func (SortedNonceArr) Len

func (arr SortedNonceArr) Len() int

func (SortedNonceArr) Less

func (arr SortedNonceArr) Less(i, j int) bool

func (SortedNonceArr) Swap

func (arr SortedNonceArr) Swap(i, j int)

type WalletSerializable

type WalletSerializable struct {
	ApiKeyHashed string `json:"apiKeyHashed"`
	PublicKey    string `json:"publicKey"`
	PrivateKey   string `json:"privateKey"`
}

Jump to

Keyboard shortcuts

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