memory

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAccountNotFound = errors.New("account not found")
	ErrAssetNotFound   = errors.New("asset not found")
	ErrProofNotFound   = errors.New("proof not found")
)

Functions

This section is empty.

Types

type Account

type Account struct {
	Address       sdk.AccAddress `json:"address"`
	AccountNumber int64          `json:"account_number"`
	Coins         sdk.Coins      `json:"coins,omitempty"`
}

type MemoryStore

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

MemoryStore implements store.Store.

func NewMemoryStore

func NewMemoryStore(proofsPath string) (*MemoryStore, error)

func (*MemoryStore) Close

func (ss *MemoryStore) Close() error

Close implements store.Store.

func (*MemoryStore) CountAccountAssetProofs

func (ss *MemoryStore) CountAccountAssetProofs() (count int64, err error)

CountAccountAssetProofs implements store.Store.

func (*MemoryStore) GetAccountAssetProof

func (ss *MemoryStore) GetAccountAssetProof(address types.AccAddress, symbol string) (*store.Proof, error)

GetAccountProofs implements store.Store.

type Proof

type Proof struct {
	Address sdk.AccAddress `json:"address"`
	Coin    sdk.Coin       `json:"coin"`
	Proof   [][]byte       `json:"proof"`
}

Proof is a merkle proof of an account

func (*Proof) UnmarshalJSON

func (p *Proof) UnmarshalJSON(data []byte) error

type Proofs

type Proofs []*Proof

Proofs is a list of account to merkle proof

Jump to

Keyboard shortcuts

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