package
0.2.5
Repository: https://github.com/qosgroup/qbase.git
Documentation: pkg.go.dev

# README

基础类型定义

Address

版本: v0.1

日期: 2018年09月27日

简介

由公钥生成的唯一钱包地址 采用加密方法:ed25519

数据类型

byte数组

方法定义

  • byte和string类型转换
  • 判断空
  • 判断两个地址是否相等
  • Marshal返回byte数组/Unmashal设置地址值
  • MarshalJson/UnmarshalJson
  • 由公钥生成地址
  • 已知公钥和地址,地址是否由该公钥生成

Coin

版本: v0.1

日期: 2018年09月27日

简介

链上的代币

数据类型

QOS

QOS公链提供的统一代币体系

type QOS struct {
	Name 	string 	`json:"coin_name"`
	Amount 	BigInt	`json:"amount"`
}

QSC

供联盟链自定义的代币统称

type QSC struct {
	Name	string	`json:"coin_name"`
	Amount	BigInt	`json:"amount"`
}

方法定义

  • 成员变量的getters/setters

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
AddUint64Overflow performs the addition operation on two uint64 integers and returns a boolean on whether or not the result overflows.
appends a message to the head of the given error.
函数:bool 转化为 []byte.
功能:检查 QscName 的合法性 备注:合法(3-10个字符,数字-字母-下划线).
NOTE: Don't stringer this, we'll put better messages in later.
No description provided by the author
------------------------consensus address-----------------------.
No description provided by the author
No description provided by the author
Compare two KVstores, return either the first key/value pair at which they differ and whether or not they are equal, skipping value comparison for a set of provided prefixes.
EmptyEvents returns an empty slice of events.
No description provided by the author
No description provided by the author
No description provided by the author
nolint.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Formats a time.Time into a []byte that can be sorted.
No description provided by the author
No description provided by the author
No description provided by the author
get ConsAddress from pubkey.
No description provided by the author
GetFromBech32 decodes a bytestring from a Bech32 encoded string.
No description provided by the author
No description provided by the author
InclusiveEndBytes returns the []byte that would end a range query such that the input would be included.
函数:int64 转化为 []byte.
intended to be used with require/assert: require.True(IntEq(...)).
Iterator over all the keys with a certain prefix in ascending order.
Iterator over all the keys with a certain prefix in descending order.
Return the minimum of the ints.
Return the minimum of the Uints.
No description provided by the author
No description provided by the author
MustSortJSON is like SortJSON but panic if an error occurs, e.g., if the passed JSON isn't valid.
No description provided by the author
NewAttribute returns a new key/value Attribute object.
No description provided by the author
NewError - create an error.
NewEvent creates a new Event object with a given type and slice of one or more attributes.
No description provided by the author
nolint - reexport.
nolint - reexport.
NewInt constructs BigInt from int64.
No description provided by the author
NewIntFromBigInt constructs BigInt from big.BigInt.
NewIntFromString constructs BigInt from string.
NewIntWithDecimal constructs BigInt with decimal Result value is n*10^dec.
NewKVStoreKey returns a new pointer to a KVStoreKey.
NewResponseFormatBroadcastTx returns a TxResponse given a ResultBroadcastTx from tendermint.
NewResponseFormatBroadcastTxCommit returns a TxResponse given a ResultBroadcastTxCommit from tendermint.
NewResponseResultTx returns a TxResponse given a ResultTx from tendermint.
No description provided by the author
Constructs new TransientStoreKey Must return a pointer according to the ocap principle.
NewUint constructs Uint from int64.
NewUintFromBigUint constructs Uint from big.Uint.
NewUintFromString constructs Uint from string.
NewUintWithDecimal constructs Uint with decimal Result value is n*10^dec.
OneInt returns BigInt value with one.
OneUint returns Uint value with one.
ParseABCILogs attempts to parse a stringified ABCI tx log into a slice of ABCIMessageLog types.
No description provided by the author
Parses a []byte encoded using FormatTimeKey back into a time.Time.
PrefixEndBytes returns the []byte that would end a range query for all []byte with a certain prefix Deals with last byte of prefix being FF without overflowing.
No description provided by the author
SortedJSON takes any JSON and returns it sorted by keys.
StringifyEvent converts an Event object to a StringEvent object.
StringifyEvents converts a slice of Event objects into a slice of StringEvent objects.
UintOverflow returns true if a given unsigned integer overflows and false otherwise.
ValAddressFromBech32 creates a ValAddress from a Bech32 string.
No description provided by the author
No description provided by the author
ZeroInt returns BigInt value with zero.
ZeroUint returns Uint value with zero.

# Constants

No description provided by the author
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
Base error codes.
SDK error codes.
SDK error codes.
CodespaceRoot is a codespace for error codes in this file only.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
SDK error codes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Slight modification of the RFC3339Nano but it right pads all zeros and drops the time zone info.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.

# Variables

Common event types and attribute keys.
Common event types and attribute keys.
Common event types and attribute keys.
Common event types and attribute keys.

# Structs

ABCIMessageLog defines a structure containing an indexed tx ABCI message log.
No description provided by the author
No description provided by the author
No description provided by the author
BigInt wraps integer with 256 bit range bound Checks overflow, underflow and division by zero Exists in range from -(2^255-1) to 2^255-1.
EventManager implements a simple wrapper around a slice of Event objects that can be emitted from.
app_state in genesis.json.
QCP配置.
Result is the union of ResponseFormat and ResponseCheckTx.
SearchTxsResult defines a structure for querying txs pageable.
No description provided by the author
TxResponse defines a structure containing relevant tx data and metadata.
BigInt wraps integer with 256 bit range bound Checks overflow, underflow and division by zero Exists in range from 0 to 2^256-1.

# Interfaces

No description provided by the author
币的通用接口.
sdk Error type.
Tx: 对stdTx及qcpTx类型的封装.

# Type aliases

ABCIMessageLogs represents a slice of ABCIMessageLog.
AccAddress: common user address.
BaseCoin集合.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
CodespaceType - codespace identifier.
CodeType - ABCI code identifier within codespace.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
consensus address.
nolint - reexport.
nolint - reexport.
No description provided by the author
No description provided by the author
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
key-value result for iterator queries.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
nolint - reexport.
No description provided by the author
TraceContext contains TraceKVStore context data.
nolint - reexport.
validator address.