broadcast

package
v2.14.14 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TransformTxData

func TransformTxData(tx models.Transaction) resource.Interface

Types

type Check

type Check struct {
	RawCheck string
	Proof    string
	Check    CheckData
}

type CheckData

type CheckData struct {
	Coin     models.Coin
	GasCoin  models.Coin
	Nonce    []byte
	Value    *big.Int
	Sender   string
	DueBlock uint64
}

type RedeemCheck

type RedeemCheck struct {
	RawCheck string    `json:"raw_check"`
	Proof    string    `json:"proof"`
	Check    CheckData `json:"check"`
}

func (RedeemCheck) Transform

type Service

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

func NewService

func NewService(env *env.ExtenderEnvironment, addressRepository *address.Repository, coinRepository *coin.Repository,
	nodeClient *grpc_client.Client, logger *logrus.Entry) *Service

func (*Service) BalanceChannel added in v2.12.0

func (s *Service) BalanceChannel() chan []*models.Balance

func (*Service) BlockChannel added in v2.12.0

func (s *Service) BlockChannel() chan models.Block

func (*Service) CommissionsChannel added in v2.12.0

func (s *Service) CommissionsChannel() chan api.Event

func (*Service) Manager added in v2.12.0

func (s *Service) Manager()

func (*Service) PublishBalances

func (s *Service) PublishBalances(balances []*models.Balance)

func (*Service) PublishBlock

func (s *Service) PublishBlock(b models.Block)

func (*Service) PublishCommissions added in v2.12.0

func (s *Service) PublishCommissions(data api.Event)

func (*Service) PublishStake added in v2.12.0

func (s *Service) PublishStake(tx *api_pb.TransactionResponse)

func (*Service) PublishStatus

func (s *Service) PublishStatus()

func (*Service) PublishTransactions

func (s *Service) PublishTransactions(transactions []*models.Transaction)

func (*Service) SetChasingMode

func (s *Service) SetChasingMode(chasingMode bool)

func (*Service) StakeChannel added in v2.12.0

func (s *Service) StakeChannel() chan *api_pb.TransactionResponse

func (*Service) TransactionsChannel added in v2.12.0

func (s *Service) TransactionsChannel() chan []*models.Transaction

type TransactionResource

type TransactionResource struct {
	Txn       uint64                 `json:"txn"`
	Hash      string                 `json:"hash"`
	Nonce     uint64                 `json:"nonce"`
	Block     uint64                 `json:"height"`
	Timestamp string                 `json:"timestamp"`
	Gas       string                 `json:"gas"`
	GasPrice  uint64                 `json:"gas_price"`
	Fee       string                 `json:"fee"`
	Type      uint8                  `json:"type"`
	Payload   string                 `json:"payload"`
	From      string                 `json:"from"`
	Data      resource.ItemInterface `json:"data"`
	RawTx     string                 `json:"raw_tx"`
}

func (TransactionResource) Transform

type TransformTxConfig

type TransformTxConfig struct {
	Model    resource.ItemInterface
	Resource resource.Interface
}

Jump to

Keyboard shortcuts

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