types

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesInt64

func BytesInt64(bs []byte) (x int64, err error)

BytesInt64 Int64 转换

func CreateCompleteCodec added in v0.0.3

func CreateCompleteCodec() *amino.Codec

CreateCompleteCodec 创建完整(包括:联盟链,公链,中继)amino编码器

func Int64Bytes

func Int64Bytes(in int64) []byte

Int64Bytes int64 与 byte 数组转换

func KV2map added in v0.1.0

func KV2map(kvs []common.KVPair) (
	tags map[string]string, err error)

KV2map returns map

func Key4InChainSequence

func Key4InChainSequence(chain string) string

Key4InChainSequence 输出队列交易序号查询接口key值组装方法

func Key4OutChainSequence

func Key4OutChainSequence(outChain string) string

Key4OutChainSequence 输出队列交易序号查询接口key值组装方法

func Key4OutChainTx

func Key4OutChainTx(outChain string, sequence int64) string

Key4OutChainTx 输出队列交易查询接口key值组装方法

func ParseAddrs added in v0.0.3

func ParseAddrs(address string) (protocol string, addrs []string)

ParseAddrs parse protocol and addrs

func ParseHeight added in v0.1.0

func ParseHeight(height string) (int64, error)

ParseHeight parse height in string to int64

func ParseSequence added in v0.0.3

func ParseSequence(seq string) (int64, error)

ParseSequence parse sequence in string to int64

func RegisterCassiniTypesAmino

func RegisterCassiniTypesAmino(cdc *amino.Codec)

RegisterCassiniTypesAmino 注册中继自定义类型

Types

type CassiniEventDataTx

type CassiniEventDataTx struct {
	From      string `json:"from"` //qsc name 或 qos
	To        string `json:"to"`   //qsc name 或 qos
	Height    int64  `json:"height"`
	Sequence  int64  `json:"sequence"`
	HashBytes []byte `json:"hashBytes"` //TxQcp 做 sha256
}

CassiniEventDataTx holds tx event tags

func (*CassiniEventDataTx) ConstructFromTags

func (c *CassiniEventDataTx) ConstructFromTags(tags map[string]string) (err error)

ConstructFromTags parse tx event tags

type Event

type Event struct {
	NodeAddress        string               `json:"node"` //event 源地址
	CassiniEventDataTx `json:"eventDataTx"` //event 事件
}

Event cache tx event tags and node info

Jump to

Keyboard shortcuts

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