evt

package
v0.0.0-...-eb4c3ac Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EVTInit

func EVTInit()

func HexToPubKey

func HexToPubKey(pubKeyHex string) (ecc.PublicKey, error)

func PubKeyToHex

func PubKeyToHex(pk string) (pubKeyHex string, _ error)

Types

type ActionType

type ActionType struct {
	Name        string        `json:"name"`
	Threshold   int           `json:"threshold"`
	Authorizers []Authorizers `json:"authorizers"`
}

type Args

type Args struct {
	Name        string     `json:"name,omitempty"`
	Creator     string     `json:"creator,omitempty"`
	Issue       ActionType `json:"issue,omitempty"`
	Transfer    ActionType `json:"transfer,omitempty"`
	Manage      ActionType `json:"manage,omitempty"`
	TotalSupply int64      `json:"total_supply,omitempty"`
	From        string     `json:"from,omitempty"`
	To          string     `json:"to,omitempty"`
	Number      string     `json:"number,omitempty"`
	Memo        string     `json:"memo,omitempty"`
}

type Authorizers

type Authorizers struct {
	Ref    string `json:"ref"`
	Weight int    `json:"weight"`
}

type EvtHandler

type EvtHandler struct {
	TokenId uint
}

func NewEvtHandler

func NewEvtHandler(tokenId string) *EvtHandler

只支持fungible token EVT币是id=1的token, 用EVT1表示, 其他token表示成EVTid, 比如: EVT2, EVT3

func (*EvtHandler) BuildUnsignedTransaction

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

func (*EvtHandler) GetAddressBalance

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

func (*EvtHandler) GetDefaultFee

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

func (*EvtHandler) GetTransactionInfo

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

func (*EvtHandler) IsToken

func (h *EvtHandler) IsToken() bool

func (*EvtHandler) MakeSignedTransaction

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

func (*EvtHandler) PublicKeyToAddress

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

EVT地址就是EVT格式的pubkey

func (*EvtHandler) SubmitTransaction

func (h *EvtHandler) SubmitTransaction(signedTransaction interface{}) (txhash string, err error)

Jump to

Keyboard shortcuts

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