Documentation ¶
Index ¶
- Variables
- func OMNIInit()
- func RegisterPropertyGetter(callback func(name string) string)
- type OmniHandler
- func (h *OmniHandler) BuildUnsignedTransaction(fromAddress, fromPublicKey, toAddress string, amount *big.Int, ...) (transaction interface{}, digests []string, err error)
- func (h *OmniHandler) GetAddressBalance(address string, jsonstring string) (balance types.Balance, err error)
- func (h *OmniHandler) GetDefaultFee() types.Value
- func (h *OmniHandler) GetTransactionInfo(txhash string) (fromAddress string, txOutputs []types.TxOutput, jsonstring string, ...)
- func (h *OmniHandler) IsToken() bool
- func (h *OmniHandler) MakeSignedTransaction(rsv []string, transaction interface{}) (signedTransaction interface{}, err error)
- func (h *OmniHandler) PublicKeyToAddress(pubKeyHex string) (address string, err error)
- func (h *OmniHandler) SignTransaction(hash []string, wif interface{}) (rsv []string, err error)
- func (h *OmniHandler) SubmitTransaction(signedTransaction interface{}) (ret string, err error)
- type OmniTx
- type RpcResult
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 RegisterPropertyGetter ¶
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 (*OmniHandler) GetAddressBalance ¶
func (*OmniHandler) GetDefaultFee ¶
func (h *OmniHandler) GetDefaultFee() types.Value
func (*OmniHandler) GetTransactionInfo ¶
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) 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
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 ¶
Click to show internal directories.
Click to hide internal directories.