common

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes2HexStr

func Bytes2HexStr(bytes []byte) string

Bytes2HexStr 字节数组转换为16 进制字符串

func HashTx

func HashTx(tx *txs.TxQcp) []byte

HashTx 交易哈希算法,用以验证交易

func KeepRunning

func KeepRunning(callback func(sig os.Signal))

KeepRunning 保持程序运行,监听系统信号,触发回调函数

func ParseUrls added in v0.0.3

func ParseUrls(firstURL, secondURL string) (fus, sus []url.URL, err error)

ParseUrls parse URLs

func SignTxQcp

func SignTxQcp(tx *txs.TxQcp, prikey string, cdc *amino.Codec) error

SignTxQcp Sign Tx data for chain

func StringTx added in v0.0.3

func StringTx(tx *txs.TxQcp) string

StringTx 将交易转换为字符串,用于日志记录,非完全序列化

func Transform

func Transform(tx *txs.TxQcp) (*tmtypes.EventDataTx, error)

Transform 将交易转换为交易事件

func UnmarshalKey added in v0.0.3

func UnmarshalKey(base64key string) (*ed25519.PrivKeyEd25519, error)

UnmarshalKey returns the key ed25519.PrivKeyEd25519

Types

This section is empty.

Jump to

Keyboard shortcuts

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