Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeTransactionGasLimit ¶
ComputeTransactionGasLimit returns how many gas units a transaction wil consume
func GetTransaction ¶
GetTransaction returns transaction details for a given txhash
func SendMultipleTransactions ¶
SendMultipleTransactions will receive a number of transactions and will propagate them for processing
func SendTransaction ¶
SendTransaction will receive a transaction from the client and propagate it for processing
Types ¶
type MultipleTxRequest ¶
type MultipleTxRequest struct {
Receiver string `form:"receiver" json:"receiver"`
Value *big.Int `form:"value" json:"value"`
TxCount int `form:"txCount" json:"txCount"`
}
MultipleTxRequest represents the structure on which user input for generating a bulk of transactions will validate against
type SendTxRequest ¶
type SendTxRequest struct {
Sender string `form:"sender" json:"sender"`
Receiver string `form:"receiver" json:"receiver"`
Value string `form:"value" json:"value"`
Data []byte `form:"data" json:"data"`
Nonce uint64 `form:"nonce" json:"nonce"`
GasPrice uint64 `form:"gasPrice" json:"gasPrice"`
GasLimit uint64 `form:"gasLimit" json:"gasLimit"`
Signature string `form:"signature" json:"signature"`
}
SendTxRequest represents the structure that maps and validates user input for publishing a new transaction
type TxRequest ¶
type TxRequest struct {
Sender string `form:"sender" json:"sender"`
Receiver string `form:"receiver" json:"receiver"`
Value *big.Int `form:"value" json:"value"`
Data string `form:"data" json:"data"`
}
TxRequest represents the structure on which user input for generating a new transaction will validate against
type TxResponse ¶
type TxResponse struct {
SendTxRequest
ShardID uint32 `json:"shardId"`
Hash string `json:"hash"`
BlockNumber uint64 `json:"blockNumber"`
BlockHash string `json:"blockHash"`
Timestamp uint64 `json:"timestamp"`
}
TxResponse represents the structure on which the response will be validated against
type TxService ¶
type TxService interface {
CreateTransaction(nonce uint64, value string, receiver string, sender string, gasPrice uint64,
gasLimit uint64, data []byte, signatureHex string) (*transaction.Transaction, []byte, error)
ValidateTransaction(tx *transaction.Transaction) error
SendBulkTransactions([]*transaction.Transaction) (uint64, error)
GetTransaction(hash string) (*transaction.Transaction, error)
ComputeTransactionGasLimit(tx *transaction.Transaction) (uint64, error)
EncodeAddressPubkey(pk []byte) (string, error)
IsInterfaceNil() bool
}
TxService interface defines methods that can be used from `elrondFacade` context variable