Documentation ¶
Index ¶
- Constants
- Variables
- func CancelRequestSignOverData(signer string, txID uint64) []byte
- func EstimateMinGas(blobSizes []uint32) uint64
- func SubmitRequestSignOverData(namespace []byte, blobs [][]byte) []byte
- func WithdrawRequestSignOverData(signer string, balance, amount, timestamp uint64) []byte
- type Config
- func (cfg *Config) GenerateKey() (sdk.AccAddress, string, error)
- func (cfg *Config) GetRecord() (*keyring.Record, error)
- func (cfg *Config) HomeDir() string
- func (cfg *Config) ImportKey(mnemonic string) (sdk.AccAddress, error)
- func (cfg *Config) Keyring() (keyring.Keyring, error)
- func (cfg *Config) KeyringDir() string
- func (cfg *Config) NewServer(ctx context.Context) (*Server, error)
- func (c *Config) Save(path string) error
- func (cfg *Config) StoreDir() string
- func (cfg *Config) WithDir(dir string) *Config
- func (cfg *Config) WithKeyring(kr keyring.Keyring) *Config
- type Server
- func (s *Server) AccountInfo(ctx context.Context, req *maelstrom.AccountInfoRequest) (*maelstrom.AccountInfoResponse, error)
- func (s *Server) Balance(ctx context.Context, req *maelstrom.BalanceRequest) (*maelstrom.BalanceResponse, error)
- func (s *Server) BroadcastTx(ctx context.Context, req *maelstrom.BroadcastTxRequest) (*maelstrom.BroadcastTxResponse, error)
- func (s *Server) Cancel(ctx context.Context, req *maelstrom.CancelRequest) (*maelstrom.CancelResponse, error)
- func (s *Server) Info(ctx context.Context, req *maelstrom.InfoRequest) (*maelstrom.InfoResponse, error)
- func (s *Server) PendingWithdrawal(ctx context.Context, req *maelstrom.PendingWithdrawalRequest) (*maelstrom.PendingWithdrawalResponse, error)
- func (s *Server) Serve(ctx context.Context) error
- func (s *Server) SetLogger(log zerolog.Logger)
- func (s *Server) Status(ctx context.Context, req *maelstrom.StatusRequest) (*maelstrom.StatusResponse, error)
- func (s *Server) Submit(ctx context.Context, req *maelstrom.SubmitRequest) (*maelstrom.SubmitResponse, error)
- func (s *Server) WaitUntilReady(ctx context.Context) error
- func (s *Server) Withdraw(ctx context.Context, req *maelstrom.WithdrawRequest) (*maelstrom.WithdrawResponse, error)
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 EstimateMinGas ¶
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"` StartHeight uint64 `toml:"start_height"` // contains filtered or unexported fields }
func DefaultConfig ¶
func DefaultConfig() *Config
func LoadConfig ¶
func (*Config) GenerateKey ¶
func (cfg *Config) GenerateKey() (sdk.AccAddress, string, error)
func (*Config) KeyringDir ¶
type Server ¶
type Server struct { maelstrom.UnimplementedMaelstromServer // contains filtered or unexported fields }
func (*Server) AccountInfo ¶
func (s *Server) AccountInfo(ctx context.Context, req *maelstrom.AccountInfoRequest) (*maelstrom.AccountInfoResponse, error)
func (*Server) Balance ¶
func (s *Server) Balance(ctx context.Context, req *maelstrom.BalanceRequest) (*maelstrom.BalanceResponse, error)
func (*Server) BroadcastTx ¶
func (s *Server) BroadcastTx(ctx context.Context, req *maelstrom.BroadcastTxRequest) (*maelstrom.BroadcastTxResponse, error)
BroadcastTx broadcast transaction.
func (*Server) Cancel ¶
func (s *Server) Cancel(ctx context.Context, req *maelstrom.CancelRequest) (*maelstrom.CancelResponse, error)
func (*Server) Info ¶
func (s *Server) Info(ctx context.Context, req *maelstrom.InfoRequest) (*maelstrom.InfoResponse, error)
func (*Server) PendingWithdrawal ¶
func (s *Server) PendingWithdrawal(ctx context.Context, req *maelstrom.PendingWithdrawalRequest) (*maelstrom.PendingWithdrawalResponse, error)
func (*Server) SetLogger ¶
SetLogger sets the logger for the server. Must be called prior to starting the server
func (*Server) Status ¶
func (s *Server) Status(ctx context.Context, req *maelstrom.StatusRequest) (*maelstrom.StatusResponse, error)
func (*Server) Submit ¶
func (s *Server) Submit(ctx context.Context, req *maelstrom.SubmitRequest) (*maelstrom.SubmitResponse, error)
func (*Server) Withdraw ¶
func (s *Server) Withdraw(ctx context.Context, req *maelstrom.WithdrawRequest) (*maelstrom.WithdrawResponse, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.