server

package
v0.0.0-...-b4b7c53 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: GPL-3.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigFileName = "config.toml"
	KeyringDirName = "keys"
	DefaultKeyName = StoreName
	StoreName      = "maelstrom"
)

Variables

View Source
var ErrServerNotReady = errors.New("server not ready")

Functions

func CancelRequestSignOverData

func CancelRequestSignOverData(signer string, txID uint64) []byte

func EstimateMinGas

func EstimateMinGas(blobSizes []uint32) uint64

func SubmitRequestSignOverData

func SubmitRequestSignOverData(namespace []byte, blobs [][]byte) []byte

func WithdrawRequestSignOverData

func WithdrawRequestSignOverData(signer string, balance, amount, timestamp uint64) []byte

Types

type Config

type Config struct {
	GRPCServerAddress   string `toml:"grpc_server_address"`
	GRPCGatewayAddress  string `toml:"grpc_gateway_address"`
	CelestiaRPCAddress  string `toml:"celestia_rpc_address"`
	CelestiaGRPCAddress string `toml:"celestia_grpc_address"`

	KeyringName   string        `toml:"keyring_name"`
	TimeoutCommit time.Duration `toml:"timeout_commit"`
	// contains filtered or unexported fields
}

func DefaultConfig

func DefaultConfig() *Config

func LoadConfig

func LoadConfig(path string) (*Config, error)

func (*Config) GenerateKey

func (cfg *Config) GenerateKey() (sdk.AccAddress, string, error)

func (*Config) HomeDir

func (cfg *Config) HomeDir() string

func (*Config) ImportKey

func (cfg *Config) ImportKey(mnemonic string) (sdk.AccAddress, error)

func (*Config) Keyring

func (cfg *Config) Keyring() (keyring.Keyring, error)

func (*Config) KeyringDir

func (cfg *Config) KeyringDir() string

func (*Config) NewServer

func (cfg *Config) NewServer(ctx context.Context) (*Server, error)

func (*Config) Save

func (c *Config) Save(path string) error

func (*Config) StoreDir

func (cfg *Config) StoreDir() string

func (*Config) WithDir

func (cfg *Config) WithDir(dir string) *Config

func (*Config) WithKeyring

func (cfg *Config) WithKeyring(kr keyring.Keyring) *Config

type Server

type Server struct {
	maelstrom.UnimplementedBlobServer
	maelstrom.UnimplementedCosmosServer
	// contains filtered or unexported fields
}

func New

func New(
	log zerolog.Logger,
	config *Config,
	pool *tx.Pool,
	store *account.Store,
	keys keyring.Keyring,
	address sdk.AccAddress,
) *Server

func (*Server) Balance

func (*Server) BroadcastTx

BroadcastTx broadcast transaction.

func (*Server) Cancel

func (*Server) Info

func (*Server) Serve

func (s *Server) Serve(ctx context.Context) error

func (*Server) Status

func (*Server) Submit

func (*Server) WaitUntilReady

func (s *Server) WaitUntilReady(ctx context.Context) error

func (*Server) Withdraw

Directories

Path Synopsis
cmd
ms

Jump to

Keyboard shortcuts

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