Documentation
¶
Index ¶
- Constants
- Variables
- func AccountCreateStr(password string) string
- func AccountRecoverStr(mncode, password string) string
- func AesDecrypt(keystring, cryptoText string) string
- func AesEncrypt(keystring, text string) string
- func Int2Byte(in int64) []byte
- func JQInvestAd(QOSchainId, QSCchainId, articleHash, coins, privatekey string) string
- func PubAddrRetrievalStr(s string) string
- func QOSCommitResultCheck(txhash, height string) string
- func QOSQueryAccountGet(addr string) string
- func QSCKVStoreGetQuery(k string) string
- func QSCKVStoreSetPost(k, v, privkey, chain string) (result string)
- func QSCQueryAccountGet(addr string) string
- func QSCtransferSendStr(addrto, coinstr, privkey, chainid string) string
- func RegisterAmino(cdc *amino.Codec)
- func RegisterCodec(cdc *amino.Codec)
- func SetBlockchainEntrance(qstarshost, qmoonhost string)
- type Address
- type BaseAccount
- type BaseCoin
- type BaseCoins
- type BigInt
- func (i BigInt) Add(i2 BigInt) (res BigInt)
- func (i BigInt) Int64() int64
- func (bi BigInt) IsNil() bool
- func (i BigInt) MarshalAmino() (string, error)
- func (i BigInt) MarshalJSON() ([]byte, error)
- func (i BigInt) NilToZero() BigInt
- func (i BigInt) String() string
- func (i *BigInt) UnmarshalAmino(text string) error
- func (i *BigInt) UnmarshalJSON(bz []byte) error
- type Codec
- type Coin
- type Coins
- type ITx
- type Int
- type InvestTx
- type PrivkeyAmino
- type PubAddrRetrieval
- type PubkeyAmino
- type QOSAccount
- type QSCs
- type ResultCreateAccount
- type ResultInvest
- type Signature
- type TransItem
- type TxStd
- type TxTransfer
Constants ¶
View Source
const ( // Bech32 prefixes //Bech32PrefixAccPub = "cosmosaccpub" AccountResultType = "local" )
View Source
const PREF_ADD = "address"
Variables ¶
View Source
var ( Shost string Mhost string QSCAccounturl string QOSAccounturl string Accounturl string KVurl string QResulturl string )
IP initialization
Functions ¶
func AccountCreateStr ¶
convert the output to json string format
func AccountRecoverStr ¶
func AesDecrypt ¶
func AesEncrypt ¶
func JQInvestAd ¶
func PubAddrRetrievalStr ¶
func QOSCommitResultCheck ¶
for QOSCommitResultCheck Restful interface
func QOSQueryAccountGet ¶
for QOS account query function
func QSCKVStoreGetQuery ¶
func QSCKVStoreSetPost ¶
func QSCQueryAccountGet ¶
func QSCtransferSendStr ¶
only need the following arguments, it`s enough!
func RegisterAmino ¶
func RegisterAmino(cdc *amino.Codec)
RegisterAmino registers all crypto related types in the given (amino) codec.
func RegisterCodec ¶
func RegisterCodec(cdc *amino.Codec)
func SetBlockchainEntrance ¶
func SetBlockchainEntrance(qstarshost, qmoonhost string)
set Block Chain entrance hosts for both Qstars and Qmoon
Types ¶
type Address ¶
type Address []byte
func (Address) MarshalJSON ¶
func (*Address) UnmarshalJSON ¶
将Bech32编码的地址Json进行UnMarshal
type BaseAccount ¶
type BaseAccount struct { AccountAddress Address `json:"account_address"` // account address Publickey ed25519local.PubKey `json:"public_key"` // public key Nonce int64 `json:"nonce"` // identifies tx_status of an account }
type BigInt ¶
type BigInt struct {
// contains filtered or unexported fields
}
func (BigInt) MarshalAmino ¶
MarshalAmino defines custom encoding scheme
func (BigInt) MarshalJSON ¶
MarshalJSON defines custom encoding scheme
func (*BigInt) UnmarshalAmino ¶
UnmarshalAmino defines custom decoding scheme
func (*BigInt) UnmarshalJSON ¶
UnmarshalJSON defines custom decoding scheme
type Codec ¶
type Codec = amino.Codec
import (
"github.com/QOSGroup/qbase/account" "github.com/QOSGroup/qbase/baseabci" "github.com/QOSGroup/qbase/context" "github.com/QOSGroup/qbase/mapper" "github.com/QOSGroup/qbase/txs" "github.com/tendermint/go-amino" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" cmn "github.com/tendermint/tendermint/libs/common" "log" "reflect"
)
var Cdc *Codec
type Int ¶
type Int struct {
// contains filtered or unexported fields
}
type InvestTx ¶
func (InvestTx) GetSignData ¶
type PrivkeyAmino ¶
type PubAddrRetrieval ¶
type PubkeyAmino ¶
type QOSAccount ¶
type QOSAccount struct { BaseAccount `json:"base_account"` QOS BigInt `json:"qos"` // coins in public chain QSCs QSCs `json:"qscs"` // varied QSCs }
type ResultCreateAccount ¶
type ResultCreateAccount struct { PubKey string `json:"pubKey"` PrivKey string `json:"privKey"` Addr string `json:"addr"` Mnemonic string `json:"mnemonic"` Type string `json:"type"` }
func AccountCreate ¶
func AccountCreate(password string) *ResultCreateAccount
type ResultInvest ¶
type ResultInvest struct { Code string `json:"code"` Reason string `json:"reason,omitempty"` Result json.RawMessage `json:"result,omitempty"` }
func InternalError ¶
func InternalError(reason string) ResultInvest
func (ResultInvest) Marshal ¶
func (ri ResultInvest) Marshal() string
type Signature ¶
type Signature struct { Pubkey ed25519local.PubKey `json:"pubkey"` //可选 Signature []byte `json:"signature"` //签名内容 Nonce int64 `json:"nonce"` //nonce的值 }
type TxStd ¶
type TxStd struct { ITx ITx `json:"itx"` //ITx接口,将被具体Tx结构实例化 Signature []Signature `json:"sigature"` //签名数组 ChainID string `json:"chainid"` //ChainID: 执行ITx.exec方法的链ID MaxGas BigInt `json:"maxgas"` //Gas消耗的最大值 }
func (*TxStd) BuildSignatureBytes ¶
func (*TxStd) GetSignData ¶
type TxTransfer ¶
Click to show internal directories.
Click to hide internal directories.