broadcast

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: MIT Imports: 27 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) PublishBalances

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

func (*Service) PublishBlock

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

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)

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