stores

package
v0.0.0-...-b7c7d3f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a struct that holds the api client

func NewGridDB

func NewGridDB(url string) (*Client, error)

NewGridDB creates a new substrate api client

func (*Client) GetTwin

func (c *Client) GetTwin(twinID uint64) (Twin, error)

GetTwin gets a twin by id from storage

type MockStore

type MockStore struct{}

MockStore always returns a default key

func (MockStore) PeerID

func (m MockStore) PeerID(dtid uint64) (string, error)

PeerID implements pkg.PeerStore

func (MockStore) PublicKey

func (m MockStore) PublicKey(dtid uint64) ([pkg.PublicKeySize]byte, error)

PublicKey implements pkg.PeerStore

func (MockStore) SetPeerID

func (m MockStore) SetPeerID(dtid uint64, pid string)

SetPeerID implements pkg.PeerStore

type Twin

type Twin struct {
	TwinID   types.U64
	Pubkey   types.AccountID
	PeerID   []types.U8
	Entities []entityProof
}

Jump to

Keyboard shortcuts

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