omni

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetProperty func(name string) string

返回property id

View Source
var OMNI_DEFAULT_FEE, _ = new(big.Int).SetString("10", 10)
View Source
var Properties map[string]string = map[string]string{
	"OMNIOmni":      "1",
	"OMNITest Omni": "2",
	"OMNITetherUS":  "112",
}

Functions

func OMNIInit

func OMNIInit()

func RegisterPropertyGetter

func RegisterPropertyGetter(callback func(name string) string)

Types

type OmniHandler

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

func NewOMNIHandler

func NewOMNIHandler() *OmniHandler

func NewOMNIPropertyHandler

func NewOMNIPropertyHandler(propertyname string) *OmniHandler

func (*OmniHandler) BuildUnsignedTransaction

func (h *OmniHandler) BuildUnsignedTransaction(fromAddress, fromPublicKey, toAddress string, amount *big.Int, jsonstring string, memo string) (transaction interface{}, digests []string, err error)

func (*OmniHandler) FiltTransaction

func (h *OmniHandler) FiltTransaction(blocknumber uint64, filter types.Filter) (txhashes []string, err error)

func (*OmniHandler) GetAddressBalance

func (h *OmniHandler) GetAddressBalance(address string, jsonstring string) (balance types.Balance, err error)

func (*OmniHandler) GetDefaultFee

func (h *OmniHandler) GetDefaultFee() types.Value

func (*OmniHandler) GetTransactionInfo

func (h *OmniHandler) GetTransactionInfo(txhash string) (*types.TransactionInfo, error)

func (h *OmniHandler) GetTransactionInfo(txhash string) (fromAddress string, txOutputs []types.TxOutput, jsonstring string, confirmed bool, fee types.Value, err error) {

func (*OmniHandler) IsToken

func (h *OmniHandler) IsToken() bool

func (*OmniHandler) MakeSignedTransaction

func (h *OmniHandler) MakeSignedTransaction(rsv []string, transaction interface{}) (signedTransaction interface{}, err error)

NOT completed, may or not work

func (*OmniHandler) MakeSignedTransactionByJson

func (h *OmniHandler) MakeSignedTransactionByJson(rsv []string, txjson string) (signedTransaction interface{}, err error)

func (*OmniHandler) PublicKeyToAddress

func (h *OmniHandler) PublicKeyToAddress(pubKeyHex string) (address string, err error)

func (*OmniHandler) SignTransaction

func (h *OmniHandler) SignTransaction(hash []string, wif interface{}) (rsv []string, err error)

NOT completed, may or not work

func (*OmniHandler) SubmitTransaction

func (h *OmniHandler) SubmitTransaction(signedTransaction interface{}) (ret string, err error)

NOT completed, may or not work

func (*OmniHandler) SubmitTransactionByJson

func (h *OmniHandler) SubmitTransactionByJson(txjson string) (txhash string, err error)

type OmniTx

type OmniTx struct {
	Confirmations int64  `json:"confirmations"`
	Fee           string `json:"fee"`
	Valid         bool   `json:"valid"`
	From          string `json:"sendingaddress"`
	To            string `json:"referenceaddress"`
	AmountString  string `json:"amount"`
	Amount        *big.Int
	Type          string  `json:"type"`
	PropertyName  string  `json:"propertyname"`
	PropertyId    float64 `json:"propertyid"`
	Error         error
}

func DecodeOmniTx

func DecodeOmniTx(ret string) *OmniTx

type RpcResult

type RpcResult struct {
	Result OmniTx `json:"result"`
	Error  string `json:"error"`
}

Jump to

Keyboard shortcuts

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