httpwasm

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMockAllocationId

func GetMockAllocationId(allocation int) string

func GetMockBlobberId

func GetMockBlobberId(index int) string

func GetMockId

func GetMockId(allocation int) string

func RegisterDefaultHandlers

func RegisterDefaultHandlers(s *mux.Router)

func RegisterMinerHandlers

func RegisterMinerHandlers(s *mux.Router)

func RegisterSharderHandlers

func RegisterSharderHandlers(s *mux.Router)

Types

type Server

type Server struct {
	*httptest.Server
	*mux.Router
}

func NewDefaultServer

func NewDefaultServer() *Server

NewSharderServer create a local dev sharder server

func NewMinerServer

func NewMinerServer() *Server

NewMinerServer create a local dev miner server

func NewServer

func NewServer() *Server

func NewSharderServer

func NewSharderServer() *Server

NewSharderServer create a local dev sharder server

type StorageReadPoolConfig

type StorageReadPoolConfig struct {
	MinLock       common.Balance `json:"min_lock"`
	MinLockPeriod time.Duration  `json:"min_lock_period"`
	MaxLockPeriod time.Duration  `json:"max_lock_period"`
}

type StorageStakePoolConfig

type StorageStakePoolConfig struct {
	MinLock          common.Balance `json:"min_lock"`
	InterestRate     float64        `json:"interest_rate"`
	InterestInterval time.Duration  `json:"interest_interval"`
}

type StorageWritePoolConfig

type StorageWritePoolConfig struct {
	MinLock       common.Balance `json:"min_lock"`
	MinLockPeriod time.Duration  `json:"min_lock_period"`
	MaxLockPeriod time.Duration  `json:"max_lock_period"`
}

type Transaction

type Transaction struct {
	Hash              string `json:"hash,omitempty"`
	Version           string `json:"version,omitempty"`
	ClientID          string `json:"client_id,omitempty"`
	PublicKey         string `json:"public_key,omitempty"`
	ToClientID        string `json:"to_client_id,omitempty"`
	ChainID           string `json:"chain_id,omitempty"`
	TransactionData   string `json:"transaction_data,omitempty"`
	Value             int64  `json:"transaction_value,omitempty"`
	Signature         string `json:"signature,omitempty"`
	CreationDate      int64  `json:"creation_date,omitempty"`
	Fee               int64  `json:"transaction_fee,omitempty"`
	TransactionType   int    `json:"transaction_type,omitempty"`
	TransactionOutput string `json:"transaction_output,omitempty"`
	OutputHash        string `json:"txn_output_hash"`
	Status            int    `json:"transaction_status,omitempty"`
}

Jump to

Keyboard shortcuts

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