nearda

package
v0.0.0-...-939ab4d Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountFlag  = "account"
	ContractFlag = "contract"
	KeyFlag      = "key"
	NetworkFlag  = "network"
	NsFlag       = "ns"
)

Variables

NearDAEnvFlags The env flag is like prefix_flag, with all letters in uppercase.

Functions

This section is empty.

Types

type INearDA

type INearDA interface {
	Store(data []byte) ([]byte, error)
	GetFromDA(frameRefBytes []byte, txIndex uint32) ([]byte, error)
}

func NewNearDAClient

func NewNearDAClient(nearconf *NearDAConfig) (INearDA, error)

type NearDAClient

type NearDAClient struct {
	*near.Config
}

func (*NearDAClient) GetFromDA

func (n *NearDAClient) GetFromDA(frameRefBytes []byte, txIndex uint32) ([]byte, error)

func (*NearDAClient) Store

func (n *NearDAClient) Store(data []byte) ([]byte, error)

type NearDAConfig

type NearDAConfig struct {
	Account  string `toml:"account"`
	Contract string `toml:"contract"`
	Key      string `toml:"key"`
	Network  string `toml:"network"` // nearDA only support "Mainnet", "Testnet", "Localnet"
	Ns       uint32 `toml:"ns"`
}

Jump to

Keyboard shortcuts

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