Commit 502e5138 authored by harrylee's avatar harrylee

update chain33-sdk-go

parent c29f9964
package client
const (
Chain33_Lock = "Chain33.Lock"
Chain33_UnLock = "Chain33.UnLock"
Chain33_SetPasswd = "Chain33.SetPasswd"
Chain33_SetLabel = "Chain33.SetLabel"
Chain33_NewAccount = "Chain33.NewAccount"
Chain33_GetAccounts = "Chain33.GetAccounts"
Chain33_MergeBalance = "Chain33.MergeBalance"
Chain33_SetTxFee = "Chain33.SetTxFee"
Chain33_SendToAddress = "Chain33.SendToAddress"
Chain33_ImportPrivKey = "Chain33.ImportPrivKey"
Chain33_WalletTransactionList = "Chain33.WalletTransactionList"
Chain33_GetTicketCount = "Chain33.GetTicketCount"
Chain33_DumpPrivkey = "Chain33.DumpPrivkey"
Chain33_SignRawTx = "Chain33.SignRawTx"
Chain33_GetMempool = "Chain33.GetMempool"
Chain33_SendTransaction = "Chain33.SendTransaction"
Chain33_CreateRawTransaction = "Chain33.CreateRawTransaction"
Chain33_SendRawTransaction = "Chain33.SendRawTransaction"
Chain33_QueryTransaction = "Chain33.QueryTransaction"
Chain33_GetTxByAddr = "Chain33.GetTxByAddr"
Chain33_GetTxByHashes = "Chain33.GetTxByHashes"
Chain33_GetHexTxByHash = "Chain33.GetHexTxByHash"
Chain33_GetAddrOverview = "Chain33.GetAddrOverview"
Chain33_Version = "Chain33.Version"
Chain33_GetBlocks = "Chain33.GetBlocks"
Chain33_GetLastHeader = "Chain33.GetLastHeader"
Chain33_GetHeaders = "Chain33.GetHeaders"
Chain33_GetBlockHash = "Chain33.GetBlockHash"
Chain33_GetBlockOverview = "Chain33.GetBlockOverview"
Chain33_GetPeerInfo = "Chain33.GetPeerInfo"
Chain33_GetNetInfo = "Chain33.GetNetInfo"
Chain33_GenSeed = "Chain33.GenSeed"
Chain33_SaveSeed = "Chain33.SaveSeed"
Chain33_GetSeed = "Chain33.GetSeed"
Chain33_GetWalletStatus = "Chain33.GetWalletStatus"
Chain33_GetBalance = "Chain33.GetBalance"
Chain33_GetTokenBalance = "Chain33.GetTokenBalance"
Chain33_Query = "Chain33.Query"
Para_IsSync = "paracross.IsSync"
Chain33_IsSync = "Chain33.IsSync"
)
\ No newline at end of file
...@@ -11,7 +11,14 @@ import ( ...@@ -11,7 +11,14 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
sdk "github.com/33cn/chain33-sdk-go"
"github.com/33cn/chain33-sdk-go/crypto"
"github.com/33cn/chain33-sdk-go/dapp/broker"
"github.com/33cn/chain33-sdk-go/dapp/storage"
"github.com/33cn/chain33-sdk-go/event"
"github.com/33cn/chain33-sdk-go/types"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
"time"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
...@@ -120,9 +127,10 @@ func (client *JSONClient) Call(method string, params, resp interface{}) error { ...@@ -120,9 +127,10 @@ func (client *JSONClient) Call(method string, params, resp interface{}) error {
return json.Unmarshal(*cresp.Result, resp) return json.Unmarshal(*cresp.Result, resp)
} }
type ParseFunc func(result json.RawMessage) (interface{},error) type ParseFunc func(result json.RawMessage) (interface{}, error)
//回调函数,用于自定义解析返回得result数据 //回调函数,用于自定义解析返回得result数据
func (client *JSONClient) CallBack(method string, params interface{},parseFunc ParseFunc) (interface{}, error) { func (client *JSONClient) CallBack(method string, params interface{}, parseFunc ParseFunc) (interface{}, error) {
method = addPrefix(client.prefix, method) method = addPrefix(client.prefix, method)
req := &clientRequest{} req := &clientRequest{}
req.Method = method req.Method = method
...@@ -176,16 +184,334 @@ func (client *JSONClient) SendTransaction(signedTx string) (string, error) { ...@@ -176,16 +184,334 @@ func (client *JSONClient) SendTransaction(signedTx string) (string, error) {
return res, nil return res, nil
} }
//SendTransactionSync
func (client *JSONClient) SendTransactionSync(privkey string,tx *types.Transaction) (*Response, error) {
//签名
hexbytes, _ := types.FromHex(privkey)
sdk.Sign(tx, hexbytes, crypto.SECP256K1, nil)
signedTx := types.ToHexPrefix(types.Encode(tx))
var res string
send := &RawParm{
Token: "BTY",
Data: signedTx,
}
err := client.Call("Chain33.SendTransactionSync", send, &res)
if err != nil {
return nil, err
}
return &Response{OK:true,Message:res,Data:types.Encode(tx)}, nil
}
// 查询交易 // 查询交易
func (client *JSONClient) QueryTransaction(hash string) (*TransactionDetail, error) { func (client *JSONClient) QueryTransaction(hash string) (*TransactionDetail, error) {
query := QueryParm{ query := QueryParm{
Hash: hash, Hash: hash,
} }
var detail TransactionDetail var detail TransactionDetail
err := client.Call("Chain33.QueryTransaction", query, &detail) err := client.Call(Chain33_QueryTransaction, query, &detail)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return &detail, nil return &detail, nil
} }
func (client *JSONClient) QueryLastHeader() (*Header, error) {
var res Header
err := client.Call(Chain33_GetLastHeader, nil, &res)
if err != nil {
return nil, err
}
return &res, nil
}
func (client *JSONClient) QueryBlockHash(height int64) (*ReplyHash, error) {
var res ReplyHash
params := types.ReqInt{
Height: height,
}
err := client.Call(Chain33_GetBlockHash, params, &res)
if err != nil {
return nil, err
}
return &res, nil
}
func (client *JSONClient) QueryHeadersByHeight(height int64) (*Headers, error) {
var res Headers
params := BlockParam{
Start: height - 1,
End: height - 1,
Isdetail: false,
}
err := client.Call(Chain33_GetHeaders, params, &res)
if err != nil {
return nil, err
}
return &res, nil
}
func (client *JSONClient) QueryIsSync() (bool, error) {
var res bool
err := client.Call(Para_IsSync, nil, &res)
if err != nil {
return false, err
}
return res, nil
}
func (client *JSONClient) QueryMainNetIsSync() (bool, error) {
var res bool
err := client.Call(Chain33_IsSync, nil, &res)
if err != nil {
return false, err
}
return res, nil
}
func (client *JSONClient) QueryNetInfo() (*NodeNetinfo, error) {
var res NodeNetinfo
params := types.ReqNil{}
err := client.Call(Chain33_GetNetInfo, params, &res)
if err != nil {
return nil, err
}
return &res, nil
}
func (client *JSONClient) QueryMempool(jrpcURl string) (*ReplyTxList, error) {
var res ReplyTxList
params := types.ReqNil{}
err := client.Call(Chain33_GetMempool, params, &res)
if err != nil {
return nil, err
}
return &res, nil
}
//获取区块信息
func (client *JSONClient) QueryBlockInfo(start, end int64, isDetail bool) (*BlockDetails, error) {
var res BlockDetails
params := BlockParam{Start: start, End: end, Isdetail: isDetail}
err := client.Call(Chain33_GetBlocks, params, &res)
if err != nil {
return nil, err
}
return &res, nil
}
//调用chaincode
func (client *JSONClient) Invoke(requst *Request,privateKey string) (*Response, error) {
//FIXME 这里需完善
if requst.Exec == storage.StorageX{
switch requst.Fcn {
case "set","ContentStorage":
tx,err:=storage.CreateContentStorageTx(client.prefix,0,string(requst.Args[0]),nil,string(requst.Args[1]))
if err!=nil {
return nil,err
}
return client.SendTransactionSync(privateKey,tx)
}
}
return nil, fmt.Errorf("not matching execution or method!")
}
// TODO 执行请求
func (client *JSONClient) Execute(requst *Request) (*Response, error) {
//err := client.Call(Chain33_QueryTransaction, query, &detail)
//if err != nil {
// return nil, err
//}
//
//return &detail, nil
return nil, nil
}
// 简单实现交易时间监听功能,后面换成grpc长链接方式监听
func (client *JSONClient) RegisterTxEvent(start int64, ccID, eventFilter string) (chan<- event.Registration, <-chan *event.CCEvent, <-chan error) {
ch := make(chan *event.CCEvent)
resCh := make(chan event.Registration)
errCh := make(chan error)
//FIXME 这里实现是以联盟链方式,联盟链没有回滚,所以这里暂时按高度拉去处理
go func(ch chan<- *event.CCEvent, closeCh <-chan event.Registration, errCh chan<- error) {
height := start
HERE:
header, err := client.QueryLastHeader()
if err != nil {
errCh <- err
return
}
lastHeight := header.Height
if lastHeight <= height {
time.Sleep(time.Second)
goto HERE
}
ticket := time.After(100 * time.Millisecond)
for {
select {
case <-ticket:
blockInfo, err := client.QueryBlockInfo(height, height, true)
if err != nil {
errCh <- err
return
}
for _, item := range blockInfo.Items {
for i, tx := range item.Block.Txs {
if tx.Execer == ccID && item.Receipts[i].Ty == types.ExecOk {
//todo 这里需要重新弄成通用处理
if tx.Execer == broker.BrokerX {
var brokerAction types.BrokerAction
err := types.Decode(tx.Payload, &brokerAction)
if err != nil {
errCh <- err
return
}
if brokerAction.Ty == broker.ActionMap[eventFilter] {
ccEvent := &event.CCEvent{Payload: types.Encode(brokerAction.GetEmitInterchainEvent()), CCID: tx.Execer, TxID: tx.Hash, EventName: eventFilter, BlockNumber: uint64(item.Block.Height)}
ch <- ccEvent
}
}
}
}
}
height++
goto HERE
case <-closeCh:
break
}
}
}(ch, resCh, errCh)
return resCh, ch, nil
}
func (client *JSONClient) PollingEvent(meta *types.Meta) (*types.InterChainEventList, error) {
jsonraw, err := json.Marshal(&types.PollingEvent{Meta: meta})
if err != nil {
return nil, err
}
query := Query4Jrpc{
Execer: client.prefix + broker.BrokerX,
FuncName: broker.FuncNamePollingEvent,
Payload: jsonraw,
}
var eventList types.InterChainEventList
err = client.Call("Chain33.Query", query, &eventList)
if err != nil {
return nil, err
}
return &eventList, nil
}
func (client *JSONClient) QueryInnerMeta() (*types.Meta, error) {
jsonraw, err := json.Marshal(&types.QueryInnerMeta{})
if err != nil {
return nil, err
}
query := Query4Jrpc{
Execer: client.prefix + broker.BrokerX,
FuncName: broker.FuncNameQueryInnerMeta,
Payload: jsonraw,
}
var meta types.Meta
err = client.Call("Chain33.Query", query, &meta)
if err != nil {
return nil, err
}
return &meta, nil
}
func (client *JSONClient) QueryOutterMeta() (*types.Meta, error) {
jsonraw, err := json.Marshal(&types.QueryOutterMeta{})
if err != nil {
return nil, err
}
query := Query4Jrpc{
Execer: client.prefix + broker.BrokerX,
FuncName: broker.FuncNameQueryOutterMeta,
Payload: jsonraw,
}
var meta types.Meta
err = client.Call("Chain33.Query", query, &meta)
if err != nil {
return nil, err
}
return &meta, nil
}
func (client *JSONClient) QueryCallBackMeta() (*types.Meta, error) {
jsonraw, err := json.Marshal(&types.QueryNilParam{})
if err != nil {
return nil, err
}
query := Query4Jrpc{
Execer: client.prefix + broker.BrokerX,
FuncName: broker.FuncNameQueryCallBackMeta,
Payload: jsonraw,
}
var meta types.Meta
err = client.Call("Chain33.Query", query, &meta)
if err != nil {
return nil, err
}
return &meta, nil
}
func (client *JSONClient) QueryOutMessage(inServicePair string, index uint64) (*types.Response, error) {
jsonraw, err := json.Marshal(&types.QueryOutMessage{InServicePair: inServicePair, SequenceNum: index})
if err != nil {
return nil, err
}
query := Query4Jrpc{
Execer: client.prefix + broker.BrokerX,
FuncName: broker.FuncNameQueryOutMessage,
Payload: jsonraw,
}
var resp types.Response
err = client.Call("Chain33.Query", query, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
func (client *JSONClient) QueryInMessage(inServicePair string, index uint64) (*types.Response, error) {
jsonraw, err := json.Marshal(&types.QueryInMessage{InServicePair: inServicePair, SequenceNum: index})
if err != nil {
return nil, err
}
query := Query4Jrpc{
Execer: client.prefix + broker.BrokerX,
FuncName: broker.FuncNameQueryInMessage,
Payload: jsonraw,
}
var resp types.Response
err = client.Call("Chain33.Query", query, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
func (client *JSONClient) QueryBrokerInfo() (*types.BrokerInfo, error) {
jsonraw, err := json.Marshal(&types.QueryNilParam{})
if err != nil {
return nil, err
}
query := Query4Jrpc{
Execer: client.prefix + broker.BrokerX,
FuncName: broker.FuncNameQueryBrokerInfo,
Payload: jsonraw,
}
var resp types.BrokerInfo
err = client.Call("Chain33.Query", query, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
...@@ -76,7 +76,65 @@ type TxProof struct { ...@@ -76,7 +76,65 @@ type TxProof struct {
RootHash string `json:"rootHash"` RootHash string `json:"rootHash"`
} }
// TransactionDetail transaction detail type TransParm struct {
Execer string `json:"execer"`
Payload string `json:"payload"`
Signature *Signature `json:"signature"`
Fee int64 `json:"fee"`
}
type SignedTx struct {
Unsign string `json:"unsignTx"`
Sign string `json:"sign"`
Pubkey string `json:"pubkey"`
Ty int32 `json:"ty"`
}
type BlockParam struct {
Start int64 `json:"start"`
End int64 `json:"end"`
Isdetail bool `json:"isDetail"`
}
type Header struct {
Version int64 `json:"version"`
ParentHash string `json:"parentHash"`
TxHash string `json:"txHash"`
StateHash string `json:"stateHash"`
Height int64 `json:"height"`
BlockTime int64 `json:"blockTime"`
TxCount int64 `json:"txCount"`
Hash string `json:"hash"`
}
type ReceiptLog struct {
Ty int32 `json:"ty"`
Log string `json:"log"`
}
type ReceiptData struct {
Ty int32 `json:"ty"`
Logs []*ReceiptLog `json:"logs"`
}
type Block struct {
Version int64 `json:"version"`
ParentHash string `json:"parentHash"`
TxHash string `json:"txHash"`
StateHash string `json:"stateHash"`
Height int64 `json:"height"`
BlockTime int64 `json:"blockTime"`
Txs []*Transaction `json:"txs"`
}
type BlockDetail struct {
Block *Block `json:"block"`
Receipts []*ReceiptDataResult `json:"recipts"`
}
type BlockDetails struct {
Items []*BlockDetail `json:"items"`
}
type TransactionDetail struct { type TransactionDetail struct {
Tx *Transaction `json:"tx"` Tx *Transaction `json:"tx"`
Receipt *ReceiptDataResult `json:"receipt"` Receipt *ReceiptDataResult `json:"receipt"`
...@@ -87,14 +145,209 @@ type TransactionDetail struct { ...@@ -87,14 +145,209 @@ type TransactionDetail struct {
Amount int64 `json:"amount"` Amount int64 `json:"amount"`
Fromaddr string `json:"fromAddr"` Fromaddr string `json:"fromAddr"`
ActionName string `json:"actionName"` ActionName string `json:"actionName"`
Assets []*Asset `json:"assets"`
TxProofs []*TxProof `json:"txProofs"`
FullHash string `json:"fullHash"`
} }
// Query4Jrpc query jrpc type ReplyTxInfos struct {
TxInfos []*ReplyTxInfo `protobuf:"bytes,1,rep,name=txInfos" json:"txInfos"`
}
type ReplyTxInfo struct {
Hash string `json:"hash"`
Height int64 `json:"height"`
Index int64 `json:"index"`
}
type TransactionDetails struct {
//Txs []*Transaction `json:"txs"`
Txs []*TransactionDetail `protobuf:"bytes,1,rep,name=txs" json:"txs"`
}
type ReplyTxList struct {
Txs []*Transaction `json:"txs"`
}
type ReplyHash struct {
Hash string `json:"hash"`
}
type ReplyHashes struct {
Hashes []string `json:"hashes"`
}
type PeerList struct {
Peers []*Peer `json:"peers"`
}
type Peer struct {
Addr string `json:"addr"`
Port int32 `json:"port"`
Name string `json:"name"`
MempoolSize int32 `json:"mempoolSize"`
Self bool `json:"self"`
Header *Header `json:"header"`
}
// Wallet Module
type WalletAccounts struct {
Wallets []*WalletAccount `protobuf:"bytes,1,rep,name=wallets" json:"wallets"`
}
type WalletAccount struct {
Acc *Account `protobuf:"bytes,1,opt,name=acc" json:"acc"`
Label string `protobuf:"bytes,2,opt,name=label" json:"label"`
}
type Account struct {
Currency int32 `protobuf:"varint,1,opt,name=currency" json:"currency"`
Balance int64 `protobuf:"varint,2,opt,name=balance" json:"balance"`
Frozen int64 `protobuf:"varint,3,opt,name=frozen" json:"frozen"`
Addr string `protobuf:"bytes,4,opt,name=addr" json:"addr"`
}
type Reply struct {
IsOk bool `protobuf:"varint,1,opt,name=isOk" json:"isOK"`
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg"`
}
type Headers struct {
Items []*Header `protobuf:"bytes,1,rep,name=items" json:"items"`
}
type ReqAddr struct {
Addr string `json:"addr"`
}
type ReqHashes struct {
Hashes []string `json:"hashes"`
DisableDetail bool `json:"disableDetail"`
}
type ReqWalletTransactionList struct {
FromTx string `json:"fromTx"`
Count int32 `json:"count"`
Direction int32 `json:"direction"`
}
type WalletTxDetails struct {
TxDetails []*WalletTxDetail `protobuf:"bytes,1,rep,name=txDetails" json:"txDetails"`
}
type WalletTxDetail struct {
Tx *Transaction `protobuf:"bytes,1,opt,name=tx" json:"tx"`
Receipt *ReceiptDataResult `protobuf:"bytes,2,opt,name=receipt" json:"receipt"`
Height int64 `protobuf:"varint,3,opt,name=height" json:"height"`
Index int64 `protobuf:"varint,4,opt,name=index" json:"index"`
BlockTime int64 `json:"blockTime"`
Amount int64 `json:"amount"`
FromAddr string `json:"fromAddr"`
TxHash string `json:"txHash"`
ActionName string `json:"actionName"`
}
type BlockOverview struct {
Head *Header `protobuf:"bytes,1,opt,name=head" json:"head"`
TxCount int64 `protobuf:"varint,2,opt,name=txCount" json:"txCount"`
TxHashes []string `protobuf:"bytes,3,rep,name=txHashes,proto3" json:"txHashes"`
}
type Query4Cli struct {
Execer string `protobuf:"bytes,1,opt,name=execer,proto3" json:"execer"`
FuncName string `protobuf:"bytes,2,opt,name=funcName" json:"funcName"`
Payload interface{} `protobuf:"bytes,3,opt,name=payload" json:"payload"`
}
type Query4Jrpc struct { type Query4Jrpc struct {
Execer string `json:"execer"` Execer string `protobuf:"bytes,1,opt,name=execer,proto3" json:"execer"`
FuncName string `json:"funcName"` FuncName string `protobuf:"bytes,2,opt,name=funcName" json:"funcName"`
Payload json.RawMessage `json:"payload"` Payload json.RawMessage `protobuf:"bytes,3,opt,name=payload" json:"payload"`
}
type WalletStatus struct {
IsWalletLock bool `json:"isWalletLock"`
IsAutoMining bool `json:"isAutoMining"`
IsHasSeed bool `json:"isHasSeed"`
IsTicketLock bool `json:"isTicketLock"`
}
// Token Transaction
type TokenPreCreateTx struct {
Price int64 `json:"price"`
Name string `json:"name"`
Symbol string `json:"symbol"`
Introduction string `json:"introduction"`
OwnerAddr string `json:"ownerAddr"`
Total int64 `json:"total"`
Fee int64 `json:"fee"`
}
type TokenFinishTx struct {
OwnerAddr string `json:"ownerAddr"`
Symbol string `json:"symbol"`
Fee int64 `json:"fee"`
}
type TokenRevokeTx struct {
OwnerAddr string `json:"ownerAddr"`
Symbol string `json:"symbol"`
Fee int64 `json:"fee"`
}
// Trade Transaction
type TradeSellTx struct {
TokenSymbol string `json:"tokenSymbol"`
AmountPerBoardlot int64 `json:"amountPerBoardlot"`
MinBoardlot int64 `json:"minBoardlot"`
PricePerBoardlot int64 `json:"pricePerBoardlot"`
TotalBoardlot int64 `json:"totalBoardlot"`
Fee int64 `json:"fee"`
}
type TradeBuyTx struct {
SellID string `json:"sellID"`
BoardlotCnt int64 `json:"boardlotCnt"`
Fee int64 `json:"fee"`
}
type TradeRevokeTx struct {
SellID string `json:"sellID,"`
Fee int64 `json:"fee"`
}
type TradeBuyLimitTx struct {
TokenSymbol string `json:"tokenSymbol"`
AmountPerBoardlot int64 `json:"amountPerBoardlot"`
MinBoardlot int64 `json:"minBoardlot"`
PricePerBoardlot int64 `json:"pricePerBoardlot"`
TotalBoardlot int64 `json:"totalBoardlot"`
Fee int64 `json:"fee"`
}
type TradeSellMarketTx struct {
BuyID string `json:"buyID"`
BoardlotCnt int64 `json:"boardlotCnt"`
Fee int64 `json:"fee"`
}
type TradeRevokeBuyTx struct {
BuyID string `json:"buyID,"`
Fee int64 `json:"fee"`
}
type NodeNetinfo struct {
Externaladdr string `json:"externalAddr"`
Localaddr string `json:"localAddr"`
Service bool `json:"service"`
Outbounds int32 `json:"outbounds"`
Inbounds int32 `json:"inbounds"`
}
//// BlockParam block parameter
//type BlockParam struct {
// Start int64 `json:"start"`
// End int64 `json:"end"`
// Isdetail bool `json:"isDetail"`
//}
type Request struct {
Exec string `json:"exec"`
Fcn string `json:"fcn"`
Args [][]byte `json:"args"`
}
type Response struct {
OK bool `json:"ok"`
Message string `json:"message"`
Data []byte `json:"data"`
} }
\ No newline at end of file
...@@ -2,22 +2,38 @@ package broker ...@@ -2,22 +2,38 @@ package broker
const ( const (
TyUnknowAction = iota + 100 TyUnknowAction = iota + 100
TyInitAction
TyRegisterAction TyRegisterAction
TyAuditAction TyAuditAction
TyUpdateIndexAction TyUpdateIndexAction
TyEmitInterchainEventAction TyEmitInterchainEventAction
//NameRegisterAction = "Register" NameInitAction = "Init"
//NameAuditAction = "Audit" NameRegisterAction = "Register"
//NameUpdateIndexAction = "UpdateIndex" NameAuditAction = "Audit"
//NameEmitInterchainEventAction = "EmitInterchainEvent" NameUpdateIndexAction = "UpdateIndex"
NameEmitInterchainEventAction = "EmitInterchainEvent"
FuncNamePollingEvent = "PollingEvent" FuncNamePollingEvent = "PollingEvent"
FuncNameQueryInnerMeta = "QueryInnerMeta" FuncNameQueryInnerMeta = "QueryInnerMeta"
FuncNameQueryOutterMeta = "QueryOutterMeta" FuncNameQueryOutterMeta = "QueryOutterMeta"
FuncNameQueryCallBackMeta = "QueryCallBackMeta"
FuncNameQueryInMessage = "QueryInMessage" FuncNameQueryInMessage = "QueryInMessage"
FuncNameQueryOutMessage = "QueryOutMessage" FuncNameQueryOutMessage = "QueryOutMessage"
FuncNameQueryBrokerInfo = "GetBrokerInfo"
) )
//BrokerX 执行器名称定义
const BrokerX = "broker" const BrokerX = "broker"
const Addr = "1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs" const Addr = "1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs"
var (
//定义actionMap
ActionMap = map[string]int32{
NameInitAction: TyInitAction,
NameRegisterAction: TyRegisterAction,
NameAuditAction: TyAuditAction,
NameUpdateIndexAction: TyUpdateIndexAction,
NameEmitInterchainEventAction: TyEmitInterchainEventAction,
}
)
package broker
import (
"encoding/json"
"github.com/33cn/chain33-sdk-go/client"
"github.com/33cn/chain33-sdk-go/types"
)
func PollingEvent(prefix, url string,meta *types.Meta) (*types.InterChainEventList, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.PollingEvent{Meta:meta})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNamePollingEvent,
Payload: jsonraw,
}
var eventList types.InterChainEventList
err = jsonClient.Call("Chain33.Query", query, &eventList)
if err != nil {
return nil, err
}
return &eventList, nil
}
func QueryInnerMeta(prefix, url string) (*types.Meta, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryInnerMeta{})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryInnerMeta,
Payload: jsonraw,
}
var meta types.Meta
err = jsonClient.Call("Chain33.Query", query, &meta)
if err != nil {
return nil, err
}
return &meta, nil
}
func QueryOutterMeta(prefix, url string) (*types.Meta, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryOutterMeta{})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryInnerMeta,
Payload: jsonraw,
}
var meta types.Meta
err = jsonClient.Call("Chain33.Query", query, &meta)
if err != nil {
return nil, err
}
return &meta, nil
}
func QueryOutMessage(prefix, url,inServicePair string,index uint64) (*types.Response, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryOutMessage{InServicePair:inServicePair,SequenceNum:index})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryOutMessage,
Payload: jsonraw,
}
var resp types.Response
err = jsonClient.Call("Chain33.Query", query, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
func QueryInMessage(prefix, url,inServicePair string,index uint64) (*types.Response, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryInMessage{InServicePair:inServicePair,SequenceNum:index})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryInMessage,
Payload: jsonraw,
}
var resp types.Response
err = jsonClient.Call("Chain33.Query", query, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
\ No newline at end of file
package storage package dapp
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
. "github.com/bitly/go-simplejson"
"github.com/33cn/chain33-sdk-go/client" "github.com/33cn/chain33-sdk-go/client"
. "github.com/33cn/chain33-sdk-go/dapp/broker"
"github.com/33cn/chain33-sdk-go/dapp/storage"
"github.com/33cn/chain33-sdk-go/types" "github.com/33cn/chain33-sdk-go/types"
. "github.com/bitly/go-simplejson"
) )
func QueryStorageByKey(prefix, url, key string) (*types.Storage, error) { func QueryStorageByKey(prefix, url, key string) (*types.Storage, error) {
...@@ -18,8 +21,8 @@ func QueryStorageByKey(prefix, url, key string) (*types.Storage, error) { ...@@ -18,8 +21,8 @@ func QueryStorageByKey(prefix, url, key string) (*types.Storage, error) {
return nil, err return nil, err
} }
query := client.Query4Jrpc{ query := client.Query4Jrpc{
Execer: prefix + StorageX, Execer: prefix + storage.StorageX,
FuncName: FuncNameQueryStorage, FuncName: storage.FuncNameQueryStorage,
Payload: jsonraw, Payload: jsonraw,
} }
//var storage types.Storage //var storage types.Storage
...@@ -42,7 +45,7 @@ func ParseStorage(raw json.RawMessage) (interface{}, error) { ...@@ -42,7 +45,7 @@ func ParseStorage(raw json.RawMessage) (interface{}, error) {
key, _ := contentStorge.Get("key").String() key, _ := contentStorge.Get("key").String()
value, _ := contentStorge.Get("value").String() value, _ := contentStorge.Get("value").String()
op, _ := contentStorge.Get("op").Int() op, _ := contentStorge.Get("op").Int()
storage := &types.Storage{Ty: TyContentStorageAction, Value: &types.Storage_ContentStorage{ContentStorage: &types.ContentOnlyNotaryStorage{ storage := &types.Storage{Ty: storage.TyContentStorageAction, Value: &types.Storage_ContentStorage{ContentStorage: &types.ContentOnlyNotaryStorage{
Content: content, Content: content,
Key: key, Key: key,
Op: int32(op), Op: int32(op),
...@@ -58,7 +61,7 @@ func ParseStorage(raw json.RawMessage) (interface{}, error) { ...@@ -58,7 +61,7 @@ func ParseStorage(raw json.RawMessage) (interface{}, error) {
link, _ := types.FromHex(linkHex) link, _ := types.FromHex(linkHex)
key, _ := linkStorge.Get("key").String() key, _ := linkStorge.Get("key").String()
value, _ := linkStorge.Get("value").String() value, _ := linkStorge.Get("value").String()
storage := &types.Storage{Ty: TyLinkStorageAction, Value: &types.Storage_LinkStorage{LinkStorage: &types.LinkNotaryStorage{ storage := &types.Storage{Ty: storage.TyLinkStorageAction, Value: &types.Storage_LinkStorage{LinkStorage: &types.LinkNotaryStorage{
Link: link, Link: link,
Key: key, Key: key,
Value: value, Value: value,
...@@ -73,7 +76,7 @@ func ParseStorage(raw json.RawMessage) (interface{}, error) { ...@@ -73,7 +76,7 @@ func ParseStorage(raw json.RawMessage) (interface{}, error) {
hash, _ := types.FromHex(hashHex) hash, _ := types.FromHex(hashHex)
key, _ := hashStorge.Get("key").String() key, _ := hashStorge.Get("key").String()
value, _ := hashStorge.Get("value").String() value, _ := hashStorge.Get("value").String()
storage := &types.Storage{Ty: TyHashStorageAction, Value: &types.Storage_HashStorage{HashStorage: &types.HashOnlyNotaryStorage{ storage := &types.Storage{Ty: storage.TyHashStorageAction, Value: &types.Storage_HashStorage{HashStorage: &types.HashOnlyNotaryStorage{
Hash: hash, Hash: hash,
Key: key, Key: key,
Value: value, Value: value,
...@@ -93,7 +96,7 @@ func ParseStorage(raw json.RawMessage) (interface{}, error) { ...@@ -93,7 +96,7 @@ func ParseStorage(raw json.RawMessage) (interface{}, error) {
nonce, _ := types.FromHex(nonceHex) nonce, _ := types.FromHex(nonceHex)
key, _ := encryptStorage.Get("key").String() key, _ := encryptStorage.Get("key").String()
value, _ := encryptStorage.Get("value").String() value, _ := encryptStorage.Get("value").String()
storage := &types.Storage{Ty: TyEncryptStorageAction, Value: &types.Storage_EncryptStorage{EncryptStorage: &types.EncryptNotaryStorage{ storage := &types.Storage{Ty: storage.TyEncryptStorageAction, Value: &types.Storage_EncryptStorage{EncryptStorage: &types.EncryptNotaryStorage{
EncryptContent: encryptContent, EncryptContent: encryptContent,
ContentHash: contentHash, ContentHash: contentHash,
Nonce: nonce, Nonce: nonce,
...@@ -114,7 +117,7 @@ func ParseStorage(raw json.RawMessage) (interface{}, error) { ...@@ -114,7 +117,7 @@ func ParseStorage(raw json.RawMessage) (interface{}, error) {
pubKey, _ := types.FromHex(pubKeyHex) pubKey, _ := types.FromHex(pubKeyHex)
key, _ := encryptStorage.Get("key").String() key, _ := encryptStorage.Get("key").String()
value, _ := encryptStorage.Get("value").String() value, _ := encryptStorage.Get("value").String()
storage := &types.Storage{Ty: TyEncryptShareStorageAction, Value: &types.Storage_EncryptShareStorage{EncryptShareStorage: &types.EncryptShareNotaryStorage{ storage := &types.Storage{Ty: storage.TyEncryptShareStorageAction, Value: &types.Storage_EncryptShareStorage{EncryptShareStorage: &types.EncryptShareNotaryStorage{
EncryptContent: encryptContent, EncryptContent: encryptContent,
ContentHash: contentHash, ContentHash: contentHash,
PubKey: pubKey, PubKey: pubKey,
...@@ -128,3 +131,157 @@ func ParseStorage(raw json.RawMessage) (interface{}, error) { ...@@ -128,3 +131,157 @@ func ParseStorage(raw json.RawMessage) (interface{}, error) {
} }
return nil, fmt.Errorf("unknow type!") return nil, fmt.Errorf("unknow type!")
} }
func PollingEvent(prefix, url string, meta *types.Meta) (*types.InterChainEventList, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.PollingEvent{Meta: meta})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNamePollingEvent,
Payload: jsonraw,
}
var eventList types.InterChainEventList
err = jsonClient.Call("Chain33.Query", query, &eventList)
if err != nil {
return nil, err
}
return &eventList, nil
}
func QueryInnerMeta(prefix, url string) (*types.Meta, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryInnerMeta{})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryInnerMeta,
Payload: jsonraw,
}
var meta types.Meta
err = jsonClient.Call("Chain33.Query", query, &meta)
if err != nil {
return nil, err
}
return &meta, nil
}
func QueryOutterMeta(prefix, url string) (*types.Meta, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryOutterMeta{})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryOutterMeta,
Payload: jsonraw,
}
var meta types.Meta
err = jsonClient.Call("Chain33.Query", query, &meta)
if err != nil {
return nil, err
}
return &meta, nil
}
func QueryCallBackMeta(prefix, url string) (*types.Meta, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryNilParam{})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryCallBackMeta,
Payload: jsonraw,
}
var meta types.Meta
err = jsonClient.Call("Chain33.Query", query, &meta)
if err != nil {
return nil, err
}
return &meta, nil
}
func QueryOutMessage(prefix, url, inServicePair string, index uint64) (*types.Response, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryOutMessage{InServicePair: inServicePair, SequenceNum: index})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryOutMessage,
Payload: jsonraw,
}
var resp types.Response
err = jsonClient.Call("Chain33.Query", query, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
func QueryInMessage(prefix, url, inServicePair string, index uint64) (*types.Response, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryInMessage{InServicePair: inServicePair, SequenceNum: index})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryInMessage,
Payload: jsonraw,
}
var resp types.Response
err = jsonClient.Call("Chain33.Query", query, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
func QueryBrokerInfo(prefix, url string) (*types.BrokerInfo, error) {
jsonClient, err := client.NewJSONClient(prefix, url)
if err != nil {
return nil, err
}
jsonraw, err := json.Marshal(&types.QueryNilParam{})
if err != nil {
return nil, err
}
query := client.Query4Jrpc{
Execer: prefix + BrokerX,
FuncName: FuncNameQueryBrokerInfo,
Payload: jsonraw,
}
var resp types.BrokerInfo
err = jsonClient.Call("Chain33.Query", query, &resp)
if err != nil {
return nil, err
}
return &resp, nil
}
...@@ -5,7 +5,9 @@ import ( ...@@ -5,7 +5,9 @@ import (
"github.com/33cn/chain33-sdk-go/client" "github.com/33cn/chain33-sdk-go/client"
"github.com/33cn/chain33-sdk-go/crypto" "github.com/33cn/chain33-sdk-go/crypto"
"github.com/33cn/chain33-sdk-go/types" "github.com/33cn/chain33-sdk-go/types"
. "github.com/33cn/chain33-sdk-go/dapp"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"testing" "testing"
"time" "time"
) )
......
package event
type CCEvent struct {
//交易哈希
TxID string
//执行器名称,也可能是合约地址
CCID string
//事件名称,go中表示actionName
EventName string
//信息载体
Payload []byte
//交易所在区块高度
BlockNumber uint64
}
type Registration interface{}
type EventService interface {
//注册区块监听
//RegisterBlockEvent(filter ...BlockFilter) (chan <-Registration, <-chan *BlockEvent, error)
//注册交易时间监听
RegisterTxEvent(ccID, eventFilter string) (chan <-Registration,<-chan *CCEvent, error)
}
\ No newline at end of file
...@@ -108,6 +108,9 @@ message QueryOutterMeta{ ...@@ -108,6 +108,9 @@ message QueryOutterMeta{
message QueryInnerMeta{ message QueryInnerMeta{
} }
message QueryNilParam{
}
message QueryInMessage{ message QueryInMessage{
string inServicePair = 1; string inServicePair = 1;
...@@ -123,7 +126,12 @@ message Meta { ...@@ -123,7 +126,12 @@ message Meta {
map<string,uint64> meta = 1; map<string,uint64> meta = 1;
} }
message BrokerInfo {
//跨链协议版本ID
string bxhId =1;
//应用链ID
string appChainId = 2;
}
message Response{ message Response{
// A status code that should follow the HTTP status codes. // A status code that should follow the HTTP status codes.
int32 status = 1; int32 status = 1;
......
syntax = "proto3";
package types;
//option go_package = "github.com/33cn/chain33/types";
message Reply {
bool isOk = 1;
bytes msg = 2;
}
message ReqString {
string data = 1;
}
message ReplyString {
string data = 1;
}
message ReplyStrings {
repeated string datas = 1;
}
message ReqInt {
int64 height = 1;
}
message Int64 {
int64 data = 1;
}
message ReqHash {
bytes hash = 1;
bool upgrade = 2;
}
message ReplyHash {
bytes hash = 1;
}
message ReqNil {}
message ReqHashes {
repeated bytes hashes = 1;
}
message ReplyHashes {
repeated bytes hashes = 1;
}
message KeyValue {
bytes key = 1;
bytes value = 2;
}
message TxHash {
string hash = 1;
}
message TimeStatus {
string ntpTime = 1;
string localTime = 2;
int64 diff = 3;
}
message ReqKey {
bytes key = 1;
}
message ReqRandHash {
string execName = 1;
int64 height = 2;
int64 blockNum = 3;
bytes hash = 4;
}
/**
*当前软件版本信息
*/
message VersionInfo {
string title = 1;
string app = 2;
string chain33 = 3;
string localDb = 4;
int32 chainID = 5;
}
...@@ -739,6 +739,37 @@ func (m *QueryInnerMeta) XXX_DiscardUnknown() { ...@@ -739,6 +739,37 @@ func (m *QueryInnerMeta) XXX_DiscardUnknown() {
var xxx_messageInfo_QueryInnerMeta proto.InternalMessageInfo var xxx_messageInfo_QueryInnerMeta proto.InternalMessageInfo
type QueryNilParam struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryNilParam) Reset() { *m = QueryNilParam{} }
func (m *QueryNilParam) String() string { return proto.CompactTextString(m) }
func (*QueryNilParam) ProtoMessage() {}
func (*QueryNilParam) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{11}
}
func (m *QueryNilParam) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryNilParam.Unmarshal(m, b)
}
func (m *QueryNilParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryNilParam.Marshal(b, m, deterministic)
}
func (m *QueryNilParam) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryNilParam.Merge(m, src)
}
func (m *QueryNilParam) XXX_Size() int {
return xxx_messageInfo_QueryNilParam.Size(m)
}
func (m *QueryNilParam) XXX_DiscardUnknown() {
xxx_messageInfo_QueryNilParam.DiscardUnknown(m)
}
var xxx_messageInfo_QueryNilParam proto.InternalMessageInfo
type QueryInMessage struct { type QueryInMessage struct {
InServicePair string `protobuf:"bytes,1,opt,name=inServicePair,proto3" json:"inServicePair,omitempty"` InServicePair string `protobuf:"bytes,1,opt,name=inServicePair,proto3" json:"inServicePair,omitempty"`
SequenceNum uint64 `protobuf:"varint,2,opt,name=sequenceNum,proto3" json:"sequenceNum,omitempty"` SequenceNum uint64 `protobuf:"varint,2,opt,name=sequenceNum,proto3" json:"sequenceNum,omitempty"`
...@@ -751,7 +782,7 @@ func (m *QueryInMessage) Reset() { *m = QueryInMessage{} } ...@@ -751,7 +782,7 @@ func (m *QueryInMessage) Reset() { *m = QueryInMessage{} }
func (m *QueryInMessage) String() string { return proto.CompactTextString(m) } func (m *QueryInMessage) String() string { return proto.CompactTextString(m) }
func (*QueryInMessage) ProtoMessage() {} func (*QueryInMessage) ProtoMessage() {}
func (*QueryInMessage) Descriptor() ([]byte, []int) { func (*QueryInMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{11} return fileDescriptor_f209535e190f2bed, []int{12}
} }
func (m *QueryInMessage) XXX_Unmarshal(b []byte) error { func (m *QueryInMessage) XXX_Unmarshal(b []byte) error {
...@@ -798,7 +829,7 @@ func (m *QueryOutMessage) Reset() { *m = QueryOutMessage{} } ...@@ -798,7 +829,7 @@ func (m *QueryOutMessage) Reset() { *m = QueryOutMessage{} }
func (m *QueryOutMessage) String() string { return proto.CompactTextString(m) } func (m *QueryOutMessage) String() string { return proto.CompactTextString(m) }
func (*QueryOutMessage) ProtoMessage() {} func (*QueryOutMessage) ProtoMessage() {}
func (*QueryOutMessage) Descriptor() ([]byte, []int) { func (*QueryOutMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{12} return fileDescriptor_f209535e190f2bed, []int{13}
} }
func (m *QueryOutMessage) XXX_Unmarshal(b []byte) error { func (m *QueryOutMessage) XXX_Unmarshal(b []byte) error {
...@@ -844,7 +875,7 @@ func (m *Meta) Reset() { *m = Meta{} } ...@@ -844,7 +875,7 @@ func (m *Meta) Reset() { *m = Meta{} }
func (m *Meta) String() string { return proto.CompactTextString(m) } func (m *Meta) String() string { return proto.CompactTextString(m) }
func (*Meta) ProtoMessage() {} func (*Meta) ProtoMessage() {}
func (*Meta) Descriptor() ([]byte, []int) { func (*Meta) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{13} return fileDescriptor_f209535e190f2bed, []int{14}
} }
func (m *Meta) XXX_Unmarshal(b []byte) error { func (m *Meta) XXX_Unmarshal(b []byte) error {
...@@ -872,6 +903,55 @@ func (m *Meta) GetMeta() map[string]uint64 { ...@@ -872,6 +903,55 @@ func (m *Meta) GetMeta() map[string]uint64 {
return nil return nil
} }
type BrokerInfo struct {
//跨链协议版本ID
BxhId string `protobuf:"bytes,1,opt,name=bxhId,proto3" json:"bxhId,omitempty"`
//应用链ID
AppChainId string `protobuf:"bytes,2,opt,name=appChainId,proto3" json:"appChainId,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BrokerInfo) Reset() { *m = BrokerInfo{} }
func (m *BrokerInfo) String() string { return proto.CompactTextString(m) }
func (*BrokerInfo) ProtoMessage() {}
func (*BrokerInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{15}
}
func (m *BrokerInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BrokerInfo.Unmarshal(m, b)
}
func (m *BrokerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BrokerInfo.Marshal(b, m, deterministic)
}
func (m *BrokerInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_BrokerInfo.Merge(m, src)
}
func (m *BrokerInfo) XXX_Size() int {
return xxx_messageInfo_BrokerInfo.Size(m)
}
func (m *BrokerInfo) XXX_DiscardUnknown() {
xxx_messageInfo_BrokerInfo.DiscardUnknown(m)
}
var xxx_messageInfo_BrokerInfo proto.InternalMessageInfo
func (m *BrokerInfo) GetBxhId() string {
if m != nil {
return m.BxhId
}
return ""
}
func (m *BrokerInfo) GetAppChainId() string {
if m != nil {
return m.AppChainId
}
return ""
}
type Response struct { type Response struct {
// A status code that should follow the HTTP status codes. // A status code that should follow the HTTP status codes.
Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
...@@ -888,7 +968,7 @@ func (m *Response) Reset() { *m = Response{} } ...@@ -888,7 +968,7 @@ func (m *Response) Reset() { *m = Response{} }
func (m *Response) String() string { return proto.CompactTextString(m) } func (m *Response) String() string { return proto.CompactTextString(m) }
func (*Response) ProtoMessage() {} func (*Response) ProtoMessage() {}
func (*Response) Descriptor() ([]byte, []int) { func (*Response) Descriptor() ([]byte, []int) {
return fileDescriptor_f209535e190f2bed, []int{14} return fileDescriptor_f209535e190f2bed, []int{16}
} }
func (m *Response) XXX_Unmarshal(b []byte) error { func (m *Response) XXX_Unmarshal(b []byte) error {
...@@ -942,10 +1022,12 @@ func init() { ...@@ -942,10 +1022,12 @@ func init() {
proto.RegisterType((*InterChainEventList)(nil), "types.InterChainEventList") proto.RegisterType((*InterChainEventList)(nil), "types.InterChainEventList")
proto.RegisterType((*QueryOutterMeta)(nil), "types.QueryOutterMeta") proto.RegisterType((*QueryOutterMeta)(nil), "types.QueryOutterMeta")
proto.RegisterType((*QueryInnerMeta)(nil), "types.QueryInnerMeta") proto.RegisterType((*QueryInnerMeta)(nil), "types.QueryInnerMeta")
proto.RegisterType((*QueryNilParam)(nil), "types.QueryNilParam")
proto.RegisterType((*QueryInMessage)(nil), "types.QueryInMessage") proto.RegisterType((*QueryInMessage)(nil), "types.QueryInMessage")
proto.RegisterType((*QueryOutMessage)(nil), "types.QueryOutMessage") proto.RegisterType((*QueryOutMessage)(nil), "types.QueryOutMessage")
proto.RegisterType((*Meta)(nil), "types.Meta") proto.RegisterType((*Meta)(nil), "types.Meta")
proto.RegisterMapType((map[string]uint64)(nil), "types.Meta.MetaEntry") proto.RegisterMapType((map[string]uint64)(nil), "types.Meta.MetaEntry")
proto.RegisterType((*BrokerInfo)(nil), "types.BrokerInfo")
proto.RegisterType((*Response)(nil), "types.Response") proto.RegisterType((*Response)(nil), "types.Response")
} }
...@@ -954,46 +1036,49 @@ func init() { ...@@ -954,46 +1036,49 @@ func init() {
} }
var fileDescriptor_f209535e190f2bed = []byte{ var fileDescriptor_f209535e190f2bed = []byte{
// 620 bytes of a gzipped FileDescriptorProto // 663 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0x4d, 0x6f, 0xd3, 0x4c, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0x4b, 0x4f, 0xdb, 0x4a,
0x10, 0x8e, 0x1d, 0x3b, 0x6d, 0x26, 0x79, 0xdb, 0xbe, 0xdb, 0x52, 0x59, 0x5c, 0x88, 0xac, 0x1e, 0x14, 0x8e, 0x93, 0x38, 0x90, 0x93, 0x40, 0xb8, 0x03, 0x17, 0x59, 0x77, 0x71, 0x6f, 0x34, 0x62,
0xca, 0x57, 0x91, 0x8a, 0x04, 0x88, 0x5b, 0x0a, 0x95, 0x52, 0xd4, 0x96, 0xb2, 0x7c, 0x08, 0x8e, 0xc1, 0xed, 0x83, 0x4a, 0x54, 0x6a, 0xab, 0xee, 0x42, 0x8b, 0x94, 0x54, 0x40, 0xe9, 0xf4, 0xa1,
0x5b, 0x67, 0x08, 0x4b, 0x13, 0xdb, 0xdd, 0x1d, 0x57, 0xf5, 0x8d, 0x03, 0xbf, 0x8b, 0x0b, 0x7f, 0x76, 0x39, 0xd8, 0x87, 0x30, 0x25, 0xb1, 0xcd, 0xcc, 0x18, 0xe1, 0x5d, 0x17, 0xfd, 0x5d, 0xdd,
0x0c, 0xed, 0x7a, 0x93, 0xb8, 0x01, 0xc4, 0xa5, 0xe2, 0xc2, 0xc5, 0xda, 0x79, 0xf6, 0xd9, 0x9d, 0xf4, 0x8f, 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8, 0xd6, 0xe9, 0xb2, 0x99, 0xb8, 0xbb, 0x0c,
0x2d, 0xf7, 0xd7, 0x3b, 0x69, 0xd9, 0xdf, 0xde, 0xc3, 0x6f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x77,
0x91, 0x72, 0x3e, 0x06, 0x07, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
......
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: common.proto
package types
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type Reply struct {
IsOk bool `protobuf:"varint,1,opt,name=isOk,proto3" json:"isOk,omitempty"`
Msg []byte `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Reply) Reset() { *m = Reply{} }
func (m *Reply) String() string { return proto.CompactTextString(m) }
func (*Reply) ProtoMessage() {}
func (*Reply) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{0}
}
func (m *Reply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Reply.Unmarshal(m, b)
}
func (m *Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Reply.Marshal(b, m, deterministic)
}
func (m *Reply) XXX_Merge(src proto.Message) {
xxx_messageInfo_Reply.Merge(m, src)
}
func (m *Reply) XXX_Size() int {
return xxx_messageInfo_Reply.Size(m)
}
func (m *Reply) XXX_DiscardUnknown() {
xxx_messageInfo_Reply.DiscardUnknown(m)
}
var xxx_messageInfo_Reply proto.InternalMessageInfo
func (m *Reply) GetIsOk() bool {
if m != nil {
return m.IsOk
}
return false
}
func (m *Reply) GetMsg() []byte {
if m != nil {
return m.Msg
}
return nil
}
type ReqString struct {
Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqString) Reset() { *m = ReqString{} }
func (m *ReqString) String() string { return proto.CompactTextString(m) }
func (*ReqString) ProtoMessage() {}
func (*ReqString) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{1}
}
func (m *ReqString) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqString.Unmarshal(m, b)
}
func (m *ReqString) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqString.Marshal(b, m, deterministic)
}
func (m *ReqString) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqString.Merge(m, src)
}
func (m *ReqString) XXX_Size() int {
return xxx_messageInfo_ReqString.Size(m)
}
func (m *ReqString) XXX_DiscardUnknown() {
xxx_messageInfo_ReqString.DiscardUnknown(m)
}
var xxx_messageInfo_ReqString proto.InternalMessageInfo
func (m *ReqString) GetData() string {
if m != nil {
return m.Data
}
return ""
}
type ReplyString struct {
Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReplyString) Reset() { *m = ReplyString{} }
func (m *ReplyString) String() string { return proto.CompactTextString(m) }
func (*ReplyString) ProtoMessage() {}
func (*ReplyString) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{2}
}
func (m *ReplyString) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyString.Unmarshal(m, b)
}
func (m *ReplyString) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReplyString.Marshal(b, m, deterministic)
}
func (m *ReplyString) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReplyString.Merge(m, src)
}
func (m *ReplyString) XXX_Size() int {
return xxx_messageInfo_ReplyString.Size(m)
}
func (m *ReplyString) XXX_DiscardUnknown() {
xxx_messageInfo_ReplyString.DiscardUnknown(m)
}
var xxx_messageInfo_ReplyString proto.InternalMessageInfo
func (m *ReplyString) GetData() string {
if m != nil {
return m.Data
}
return ""
}
type ReplyStrings struct {
Datas []string `protobuf:"bytes,1,rep,name=datas,proto3" json:"datas,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReplyStrings) Reset() { *m = ReplyStrings{} }
func (m *ReplyStrings) String() string { return proto.CompactTextString(m) }
func (*ReplyStrings) ProtoMessage() {}
func (*ReplyStrings) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{3}
}
func (m *ReplyStrings) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyStrings.Unmarshal(m, b)
}
func (m *ReplyStrings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReplyStrings.Marshal(b, m, deterministic)
}
func (m *ReplyStrings) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReplyStrings.Merge(m, src)
}
func (m *ReplyStrings) XXX_Size() int {
return xxx_messageInfo_ReplyStrings.Size(m)
}
func (m *ReplyStrings) XXX_DiscardUnknown() {
xxx_messageInfo_ReplyStrings.DiscardUnknown(m)
}
var xxx_messageInfo_ReplyStrings proto.InternalMessageInfo
func (m *ReplyStrings) GetDatas() []string {
if m != nil {
return m.Datas
}
return nil
}
type ReqInt struct {
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqInt) Reset() { *m = ReqInt{} }
func (m *ReqInt) String() string { return proto.CompactTextString(m) }
func (*ReqInt) ProtoMessage() {}
func (*ReqInt) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{4}
}
func (m *ReqInt) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqInt.Unmarshal(m, b)
}
func (m *ReqInt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqInt.Marshal(b, m, deterministic)
}
func (m *ReqInt) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqInt.Merge(m, src)
}
func (m *ReqInt) XXX_Size() int {
return xxx_messageInfo_ReqInt.Size(m)
}
func (m *ReqInt) XXX_DiscardUnknown() {
xxx_messageInfo_ReqInt.DiscardUnknown(m)
}
var xxx_messageInfo_ReqInt proto.InternalMessageInfo
func (m *ReqInt) GetHeight() int64 {
if m != nil {
return m.Height
}
return 0
}
type Int64 struct {
Data int64 `protobuf:"varint,1,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Int64) Reset() { *m = Int64{} }
func (m *Int64) String() string { return proto.CompactTextString(m) }
func (*Int64) ProtoMessage() {}
func (*Int64) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{5}
}
func (m *Int64) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Int64.Unmarshal(m, b)
}
func (m *Int64) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Int64.Marshal(b, m, deterministic)
}
func (m *Int64) XXX_Merge(src proto.Message) {
xxx_messageInfo_Int64.Merge(m, src)
}
func (m *Int64) XXX_Size() int {
return xxx_messageInfo_Int64.Size(m)
}
func (m *Int64) XXX_DiscardUnknown() {
xxx_messageInfo_Int64.DiscardUnknown(m)
}
var xxx_messageInfo_Int64 proto.InternalMessageInfo
func (m *Int64) GetData() int64 {
if m != nil {
return m.Data
}
return 0
}
type ReqHash struct {
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
Upgrade bool `protobuf:"varint,2,opt,name=upgrade,proto3" json:"upgrade,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqHash) Reset() { *m = ReqHash{} }
func (m *ReqHash) String() string { return proto.CompactTextString(m) }
func (*ReqHash) ProtoMessage() {}
func (*ReqHash) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{6}
}
func (m *ReqHash) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqHash.Unmarshal(m, b)
}
func (m *ReqHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqHash.Marshal(b, m, deterministic)
}
func (m *ReqHash) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqHash.Merge(m, src)
}
func (m *ReqHash) XXX_Size() int {
return xxx_messageInfo_ReqHash.Size(m)
}
func (m *ReqHash) XXX_DiscardUnknown() {
xxx_messageInfo_ReqHash.DiscardUnknown(m)
}
var xxx_messageInfo_ReqHash proto.InternalMessageInfo
func (m *ReqHash) GetHash() []byte {
if m != nil {
return m.Hash
}
return nil
}
func (m *ReqHash) GetUpgrade() bool {
if m != nil {
return m.Upgrade
}
return false
}
type ReplyHash struct {
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReplyHash) Reset() { *m = ReplyHash{} }
func (m *ReplyHash) String() string { return proto.CompactTextString(m) }
func (*ReplyHash) ProtoMessage() {}
func (*ReplyHash) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{7}
}
func (m *ReplyHash) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyHash.Unmarshal(m, b)
}
func (m *ReplyHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReplyHash.Marshal(b, m, deterministic)
}
func (m *ReplyHash) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReplyHash.Merge(m, src)
}
func (m *ReplyHash) XXX_Size() int {
return xxx_messageInfo_ReplyHash.Size(m)
}
func (m *ReplyHash) XXX_DiscardUnknown() {
xxx_messageInfo_ReplyHash.DiscardUnknown(m)
}
var xxx_messageInfo_ReplyHash proto.InternalMessageInfo
func (m *ReplyHash) GetHash() []byte {
if m != nil {
return m.Hash
}
return nil
}
type ReqNil struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqNil) Reset() { *m = ReqNil{} }
func (m *ReqNil) String() string { return proto.CompactTextString(m) }
func (*ReqNil) ProtoMessage() {}
func (*ReqNil) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{8}
}
func (m *ReqNil) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqNil.Unmarshal(m, b)
}
func (m *ReqNil) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqNil.Marshal(b, m, deterministic)
}
func (m *ReqNil) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqNil.Merge(m, src)
}
func (m *ReqNil) XXX_Size() int {
return xxx_messageInfo_ReqNil.Size(m)
}
func (m *ReqNil) XXX_DiscardUnknown() {
xxx_messageInfo_ReqNil.DiscardUnknown(m)
}
var xxx_messageInfo_ReqNil proto.InternalMessageInfo
type ReqHashes struct {
Hashes [][]byte `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqHashes) Reset() { *m = ReqHashes{} }
func (m *ReqHashes) String() string { return proto.CompactTextString(m) }
func (*ReqHashes) ProtoMessage() {}
func (*ReqHashes) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{9}
}
func (m *ReqHashes) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqHashes.Unmarshal(m, b)
}
func (m *ReqHashes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqHashes.Marshal(b, m, deterministic)
}
func (m *ReqHashes) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqHashes.Merge(m, src)
}
func (m *ReqHashes) XXX_Size() int {
return xxx_messageInfo_ReqHashes.Size(m)
}
func (m *ReqHashes) XXX_DiscardUnknown() {
xxx_messageInfo_ReqHashes.DiscardUnknown(m)
}
var xxx_messageInfo_ReqHashes proto.InternalMessageInfo
func (m *ReqHashes) GetHashes() [][]byte {
if m != nil {
return m.Hashes
}
return nil
}
type ReplyHashes struct {
Hashes [][]byte `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReplyHashes) Reset() { *m = ReplyHashes{} }
func (m *ReplyHashes) String() string { return proto.CompactTextString(m) }
func (*ReplyHashes) ProtoMessage() {}
func (*ReplyHashes) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{10}
}
func (m *ReplyHashes) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyHashes.Unmarshal(m, b)
}
func (m *ReplyHashes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReplyHashes.Marshal(b, m, deterministic)
}
func (m *ReplyHashes) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReplyHashes.Merge(m, src)
}
func (m *ReplyHashes) XXX_Size() int {
return xxx_messageInfo_ReplyHashes.Size(m)
}
func (m *ReplyHashes) XXX_DiscardUnknown() {
xxx_messageInfo_ReplyHashes.DiscardUnknown(m)
}
var xxx_messageInfo_ReplyHashes proto.InternalMessageInfo
func (m *ReplyHashes) GetHashes() [][]byte {
if m != nil {
return m.Hashes
}
return nil
}
type KeyValue struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *KeyValue) Reset() { *m = KeyValue{} }
func (m *KeyValue) String() string { return proto.CompactTextString(m) }
func (*KeyValue) ProtoMessage() {}
func (*KeyValue) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{11}
}
func (m *KeyValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KeyValue.Unmarshal(m, b)
}
func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic)
}
func (m *KeyValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_KeyValue.Merge(m, src)
}
func (m *KeyValue) XXX_Size() int {
return xxx_messageInfo_KeyValue.Size(m)
}
func (m *KeyValue) XXX_DiscardUnknown() {
xxx_messageInfo_KeyValue.DiscardUnknown(m)
}
var xxx_messageInfo_KeyValue proto.InternalMessageInfo
func (m *KeyValue) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
func (m *KeyValue) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
type TxHash struct {
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TxHash) Reset() { *m = TxHash{} }
func (m *TxHash) String() string { return proto.CompactTextString(m) }
func (*TxHash) ProtoMessage() {}
func (*TxHash) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{12}
}
func (m *TxHash) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TxHash.Unmarshal(m, b)
}
func (m *TxHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TxHash.Marshal(b, m, deterministic)
}
func (m *TxHash) XXX_Merge(src proto.Message) {
xxx_messageInfo_TxHash.Merge(m, src)
}
func (m *TxHash) XXX_Size() int {
return xxx_messageInfo_TxHash.Size(m)
}
func (m *TxHash) XXX_DiscardUnknown() {
xxx_messageInfo_TxHash.DiscardUnknown(m)
}
var xxx_messageInfo_TxHash proto.InternalMessageInfo
func (m *TxHash) GetHash() string {
if m != nil {
return m.Hash
}
return ""
}
type TimeStatus struct {
NtpTime string `protobuf:"bytes,1,opt,name=ntpTime,proto3" json:"ntpTime,omitempty"`
LocalTime string `protobuf:"bytes,2,opt,name=localTime,proto3" json:"localTime,omitempty"`
Diff int64 `protobuf:"varint,3,opt,name=diff,proto3" json:"diff,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TimeStatus) Reset() { *m = TimeStatus{} }
func (m *TimeStatus) String() string { return proto.CompactTextString(m) }
func (*TimeStatus) ProtoMessage() {}
func (*TimeStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{13}
}
func (m *TimeStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TimeStatus.Unmarshal(m, b)
}
func (m *TimeStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TimeStatus.Marshal(b, m, deterministic)
}
func (m *TimeStatus) XXX_Merge(src proto.Message) {
xxx_messageInfo_TimeStatus.Merge(m, src)
}
func (m *TimeStatus) XXX_Size() int {
return xxx_messageInfo_TimeStatus.Size(m)
}
func (m *TimeStatus) XXX_DiscardUnknown() {
xxx_messageInfo_TimeStatus.DiscardUnknown(m)
}
var xxx_messageInfo_TimeStatus proto.InternalMessageInfo
func (m *TimeStatus) GetNtpTime() string {
if m != nil {
return m.NtpTime
}
return ""
}
func (m *TimeStatus) GetLocalTime() string {
if m != nil {
return m.LocalTime
}
return ""
}
func (m *TimeStatus) GetDiff() int64 {
if m != nil {
return m.Diff
}
return 0
}
type ReqKey struct {
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqKey) Reset() { *m = ReqKey{} }
func (m *ReqKey) String() string { return proto.CompactTextString(m) }
func (*ReqKey) ProtoMessage() {}
func (*ReqKey) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{14}
}
func (m *ReqKey) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqKey.Unmarshal(m, b)
}
func (m *ReqKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqKey.Marshal(b, m, deterministic)
}
func (m *ReqKey) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqKey.Merge(m, src)
}
func (m *ReqKey) XXX_Size() int {
return xxx_messageInfo_ReqKey.Size(m)
}
func (m *ReqKey) XXX_DiscardUnknown() {
xxx_messageInfo_ReqKey.DiscardUnknown(m)
}
var xxx_messageInfo_ReqKey proto.InternalMessageInfo
func (m *ReqKey) GetKey() []byte {
if m != nil {
return m.Key
}
return nil
}
type ReqRandHash struct {
ExecName string `protobuf:"bytes,1,opt,name=execName,proto3" json:"execName,omitempty"`
Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
BlockNum int64 `protobuf:"varint,3,opt,name=blockNum,proto3" json:"blockNum,omitempty"`
Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqRandHash) Reset() { *m = ReqRandHash{} }
func (m *ReqRandHash) String() string { return proto.CompactTextString(m) }
func (*ReqRandHash) ProtoMessage() {}
func (*ReqRandHash) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{15}
}
func (m *ReqRandHash) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqRandHash.Unmarshal(m, b)
}
func (m *ReqRandHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqRandHash.Marshal(b, m, deterministic)
}
func (m *ReqRandHash) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqRandHash.Merge(m, src)
}
func (m *ReqRandHash) XXX_Size() int {
return xxx_messageInfo_ReqRandHash.Size(m)
}
func (m *ReqRandHash) XXX_DiscardUnknown() {
xxx_messageInfo_ReqRandHash.DiscardUnknown(m)
}
var xxx_messageInfo_ReqRandHash proto.InternalMessageInfo
func (m *ReqRandHash) GetExecName() string {
if m != nil {
return m.ExecName
}
return ""
}
func (m *ReqRandHash) GetHeight() int64 {
if m != nil {
return m.Height
}
return 0
}
func (m *ReqRandHash) GetBlockNum() int64 {
if m != nil {
return m.BlockNum
}
return 0
}
func (m *ReqRandHash) GetHash() []byte {
if m != nil {
return m.Hash
}
return nil
}
//*
//当前软件版本信息
type VersionInfo struct {
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
App string `protobuf:"bytes,2,opt,name=app,proto3" json:"app,omitempty"`
Chain33 string `protobuf:"bytes,3,opt,name=chain33,proto3" json:"chain33,omitempty"`
LocalDb string `protobuf:"bytes,4,opt,name=localDb,proto3" json:"localDb,omitempty"`
ChainID int32 `protobuf:"varint,5,opt,name=chainID,proto3" json:"chainID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VersionInfo) Reset() { *m = VersionInfo{} }
func (m *VersionInfo) String() string { return proto.CompactTextString(m) }
func (*VersionInfo) ProtoMessage() {}
func (*VersionInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{16}
}
func (m *VersionInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VersionInfo.Unmarshal(m, b)
}
func (m *VersionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VersionInfo.Marshal(b, m, deterministic)
}
func (m *VersionInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_VersionInfo.Merge(m, src)
}
func (m *VersionInfo) XXX_Size() int {
return xxx_messageInfo_VersionInfo.Size(m)
}
func (m *VersionInfo) XXX_DiscardUnknown() {
xxx_messageInfo_VersionInfo.DiscardUnknown(m)
}
var xxx_messageInfo_VersionInfo proto.InternalMessageInfo
func (m *VersionInfo) GetTitle() string {
if m != nil {
return m.Title
}
return ""
}
func (m *VersionInfo) GetApp() string {
if m != nil {
return m.App
}
return ""
}
func (m *VersionInfo) GetChain33() string {
if m != nil {
return m.Chain33
}
return ""
}
func (m *VersionInfo) GetLocalDb() string {
if m != nil {
return m.LocalDb
}
return ""
}
func (m *VersionInfo) GetChainID() int32 {
if m != nil {
return m.ChainID
}
return 0
}
func init() {
proto.RegisterType((*Reply)(nil), "types.Reply")
proto.RegisterType((*ReqString)(nil), "types.ReqString")
proto.RegisterType((*ReplyString)(nil), "types.ReplyString")
proto.RegisterType((*ReplyStrings)(nil), "types.ReplyStrings")
proto.RegisterType((*ReqInt)(nil), "types.ReqInt")
proto.RegisterType((*Int64)(nil), "types.Int64")
proto.RegisterType((*ReqHash)(nil), "types.ReqHash")
proto.RegisterType((*ReplyHash)(nil), "types.ReplyHash")
proto.RegisterType((*ReqNil)(nil), "types.ReqNil")
proto.RegisterType((*ReqHashes)(nil), "types.ReqHashes")
proto.RegisterType((*ReplyHashes)(nil), "types.ReplyHashes")
proto.RegisterType((*KeyValue)(nil), "types.KeyValue")
proto.RegisterType((*TxHash)(nil), "types.TxHash")
proto.RegisterType((*TimeStatus)(nil), "types.TimeStatus")
proto.RegisterType((*ReqKey)(nil), "types.ReqKey")
proto.RegisterType((*ReqRandHash)(nil), "types.ReqRandHash")
proto.RegisterType((*VersionInfo)(nil), "types.VersionInfo")
}
func init() {
proto.RegisterFile("common.proto", fileDescriptor_555bd8c177793206)
}
var fileDescriptor_555bd8c177793206 = []byte{
// 446 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0x5f, 0x8b, 0xd3, 0x40,
0x10, 0x27, 0xcd, 0xa5, 0x97, 0xcc, 0xe5, 0x41, 0x82, 0x48, 0x38, 0x0f, 0x8c, 0xab, 0x42, 0x5f,
0xf4, 0xc1, 0x8a, 0x7e, 0x81, 0x7b, 0xb0, 0x1c, 0x54, 0xd8, 0x3b, 0x0e, 0x5f, 0xb7, 0xe9, 0xa6,
0x59, 0x9a, 0x6c, 0x92, 0xee, 0x56, 0x2e, 0xcf, 0x7e, 0x71, 0x99, 0xe9, 0x26, 0x46, 0x8a, 0xfa,
0x36, 0xbf, 0x9d, 0x99, 0xfc, 0xfe, 0x0c, 0x81, 0x38, 0x6f, 0xea, 0xba, 0xd1, 0x1f, 0xda, 0x43,
0x63, 0x9b, 0x24, 0xb0, 0x7d, 0x2b, 0x0d, 0x7b, 0x0f, 0x01, 0x97, 0x6d, 0xd5, 0x27, 0x09, 0x5c,
0x28, 0xf3, 0x6d, 0x9f, 0x7a, 0x99, 0xb7, 0x08, 0x39, 0xd5, 0xc9, 0x33, 0xf0, 0x6b, 0xb3, 0x4b,
0x67, 0x99, 0xb7, 0x88, 0x39, 0x96, 0xec, 0x15, 0x44, 0x5c, 0x76, 0xf7, 0xf6, 0xa0, 0xf4, 0x0e,
0x57, 0xb6, 0xc2, 0x0a, 0x5a, 0x89, 0x38, 0xd5, 0xec, 0x35, 0x5c, 0xd1, 0xf7, 0xfe, 0x31, 0xf2,
0x16, 0xe2, 0xc9, 0x88,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1d, 0xda, 0xed, 0xb8,
0xd0, 0x5b, 0x12, 0x76, 0x0d, 0xa1, 0x7c, 0x92, 0xf9, 0x5a, 0x8c, 0xbc, 0x23, 0x9e, 0xdc, 0x75,
0x36, 0xbd, 0x2b, 0xee, 0x6c, 0xaa, 0x26, 0xdf, 0xaf, 0x8f, 0xb5, 0xa3, 0x1d, 0xf1, 0x68, 0xf4,
0x62, 0x72, 0x90, 0x9f, 0x1e, 0x5c, 0x3d, 0xca, 0x83, 0x51, 0x8d, 0x5e, 0xe9, 0xa2, 0xc1, 0xb0,
0xac, 0xb2, 0xd5, 0x40, 0x78, 0x02, 0x28, 0x55, 0xb4, 0xad, 0x33, 0x88, 0x25, 0x46, 0x92, 0x97,
0x42, 0xe9, 0xe5, 0x92, 0x68, 0x22, 0x3e, 0x40, 0xec, 0x50, 0x02, 0xb7, 0x1b, 0x22, 0x8a, 0xf8,
0x00, 0xc7, 0x9d, 0xd5, 0x6d, 0x1a, 0x64, 0xde, 0x22, 0xe0, 0x03, 0xdc, 0xcc, 0xe9, 0xb7, 0x5a,
0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x37, 0xd7, 0x1e, 0x69, 0x66, 0x03, 0x00, 0x00,
}
package util
func ToChaincodeArgs(args ...string) [][]byte {
bargs := make([][]byte, len(args))
for i, arg := range args {
bargs[i] = []byte(arg)
}
return bargs
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment