Help us shape the future of Go! Take the 2026 Go Developer Survey

tx

package
v0.0.0-...-450f598 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProvider      = errors.New("unknown provider")
	ErrAddress       = errors.New("invalid address")
	ErrProperty      = errors.New("invalid property value")
	ErrInvalidRequst = errors.New("provider can't handle request")
)

Errors

Functions

func RawTransaction

func RawTransaction(providerName string, key key.Key, request interface{}, property Property) ([]byte, string, error)

RawTransaction .

func RegisterProvider

func RegisterProvider(provider Provider)

RegisterProvider register provider

Types

type BnbTxRequest

type BnbTxRequest struct {
	To          string
	GasPrice    uint64
	GasLimits   uint64
	Value       uint64
	Script      []byte
	ChainID     string
	AccSequence int64
	AccNumber   int64
	Denom       string
	Memo        string
}

BnbTxRequest .

type EthTxRequest

type EthTxRequest struct {
	Nonce     uint64
	To        string
	GasPrice  *fixed.Number
	GasLimits *big.Int
	Value     *fixed.Number
	Script    []byte
}

EthTxRequest .

type OntTxRequest

type OntTxRequest struct {
	// From      *ont.Account
	To        string
	GasPrice  uint64
	GasLimits uint64
	Value     uint64
	Script    []byte
}

OntTxRequest .

type Property

type Property map[string]interface{}

Property .

type Provider

type Provider interface {
	Name() string                                                                               // provider offical name
	RawTransaction(key key.Key, request interface{}, property Property) ([]byte, string, error) // transfer global asset
}

Provider .

type TrxTxRequest

type TrxTxRequest struct {
	To          string
	Value       uint64
	Script      []byte
	Transaction trx.CreateTransactionResponse
}

TrxTxRequest .

Directories

Path Synopsis
internal
rlp
Package rlp implements the RLP serialization format.
Package rlp implements the RLP serialization format.
bnb
eth
ont
trx

Jump to

Keyboard shortcuts

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