Version: v6.4.0 Latest Latest

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

Go to latest
Published: May 18, 2020 License: BSD-3-Clause Imports: 34 Imported by: 0



Package rpc chain33 RPC模块包含JSONRpc以及grpc



This section is empty.


This section is empty.


func InitCfg

func InitCfg(cfg *types.RPC)

InitCfg interfaces

func InitFilterPrintFuncBlacklist

func InitFilterPrintFuncBlacklist()

InitFilterPrintFuncBlacklist rpc模块打印requet信息时需要过滤掉一些敏感接口的入参打印,比如钱包密码相关的

func InitGrpcFuncBlacklist

func InitGrpcFuncBlacklist(cfg *types.RPC)

InitGrpcFuncBlacklist init grpc function blacklist

func InitGrpcFuncWhitelist

func InitGrpcFuncWhitelist(cfg *types.RPC)

InitGrpcFuncWhitelist init grpc function whitelist

func InitIPWhitelist

func InitIPWhitelist(cfg *types.RPC)

InitIPWhitelist init ip whitelist

func InitJrpcFuncBlacklist

func InitJrpcFuncBlacklist(cfg *types.RPC)

InitJrpcFuncBlacklist init jrpc function blacklist

func InitJrpcFuncWhitelist

func InitJrpcFuncWhitelist(cfg *types.RPC)

InitJrpcFuncWhitelist init jrpc function whitelist


type Chain33

type Chain33 struct {
	// contains filtered or unexported fields

Chain33 a channel client

func (*Chain33) AddSeqCallBack

func (c *Chain33) AddSeqCallBack(in *types.BlockSeqCB, result *interface{}) error

AddSeqCallBack add Seq CallBack

func (*Chain33) CloseQueue

func (c *Chain33) CloseQueue(in *types.ReqNil, result *interface{}) error

CloseQueue close queue

func (*Chain33) ConvertExectoAddr

func (c *Chain33) ConvertExectoAddr(in rpctypes.ExecNameParm, result *string) error

ConvertExectoAddr convert exec to address

func (*Chain33) CreateNoBalanceTransaction

func (c *Chain33) CreateNoBalanceTransaction(in *types.NoBalanceTx, result *string) error

CreateNoBalanceTransaction create transaction with no balance

func (*Chain33) CreateNoBlanaceTxs

func (c *Chain33) CreateNoBlanaceTxs(in *types.NoBalanceTxs, result *string) error

CreateNoBlanaceTxs create multiple transaction with no balance

func (*Chain33) CreateRawTransaction

func (c *Chain33) CreateRawTransaction(in *rpctypes.CreateTx, result *interface{}) error

CreateRawTransaction create rawtransaction by jrpc

func (*Chain33) CreateRawTxGroup

func (c *Chain33) CreateRawTxGroup(in *types.CreateTransactionGroup, result *interface{}) error

CreateRawTxGroup create rawtransaction with group

func (*Chain33) CreateTransaction

func (c *Chain33) CreateTransaction(in *rpctypes.CreateTxIn, result *interface{}) error

CreateTransaction create transaction

func (*Chain33) DecodeRawTransaction

func (c *Chain33) DecodeRawTransaction(in *types.ReqDecodeRawTransaction, result *interface{}) error

DecodeRawTransaction 考虑交易组的解析统一返回ReplyTxList列表

func (*Chain33) DumpPrivkey

func (c *Chain33) DumpPrivkey(in types.ReqString, result *interface{}) error

DumpPrivkey dump privkey

func (*Chain33) DumpPrivkeysFile

func (c *Chain33) DumpPrivkeysFile(in types.ReqPrivkeysFile, result *interface{}) error

func (*Chain33) ExecWallet

func (c *Chain33) ExecWallet(in *rpctypes.ChainExecutor, result *interface{}) error

ExecWallet exec wallet

func (*Chain33) GenSeed

func (c *Chain33) GenSeed(in types.GenSeedLang, result *interface{}) error

GenSeed seed

func (*Chain33) GetAccounts

func (c *Chain33) GetAccounts(in *types.ReqAccountList, result *interface{}) error

GetAccounts get accounts

func (*Chain33) GetAccountsV2

func (c *Chain33) GetAccountsV2(in *types.ReqNil, result *interface{}) error

GetAccountsV2 get accounts for version 2

func (*Chain33) GetAddrOverview

func (c *Chain33) GetAddrOverview(in types.ReqAddr, result *interface{}) error

GetAddrOverview get overview of address

func (*Chain33) GetAllExecBalance

func (c *Chain33) GetAllExecBalance(in types.ReqAllExecBalance, result *interface{}) error

GetAllExecBalance get all balance of exec

func (*Chain33) GetBalance

func (c *Chain33) GetBalance(in types.ReqBalance, result *interface{}) error

GetBalance get balance

func (*Chain33) GetBlockByHashes

func (c *Chain33) GetBlockByHashes(in rpctypes.ReqHashes, result *interface{}) error

GetBlockByHashes get block information by hashes

func (*Chain33) GetBlockHash

func (c *Chain33) GetBlockHash(in types.ReqInt, result *interface{}) error

GetBlockHash get block hash

func (*Chain33) GetBlockOverview

func (c *Chain33) GetBlockOverview(in rpctypes.QueryParm, result *interface{}) error

GetBlockOverview get overview of block GetBlockOverview(parm *types.ReqHash) (*types.BlockOverview, error)

func (*Chain33) GetBlockSequences

func (c *Chain33) GetBlockSequences(in rpctypes.BlockParam, result *interface{}) error

GetBlockSequences get the block loading sequence number information for the specified interval

func (*Chain33) GetBlocks

func (c *Chain33) GetBlocks(in rpctypes.BlockParam, result *interface{}) error

GetBlocks get block information

func (*Chain33) GetCoinSymbol

func (c *Chain33) GetCoinSymbol(in types.ReqNil, result *interface{}) error

GetCoinSymbol get coin symbol

func (*Chain33) GetExecBalance

func (c *Chain33) GetExecBalance(in *types.ReqGetExecBalance, result *interface{}) error

GetExecBalance get balance exec

func (*Chain33) GetFatalFailure

func (c *Chain33) GetFatalFailure(in *types.ReqNil, result *interface{}) error

GetFatalFailure return fatal failure

func (*Chain33) GetHeaders

func (c *Chain33) GetHeaders(in types.ReqBlocks, result *interface{}) error

GetHeaders get headers

func (*Chain33) GetHexTxByHash

func (c *Chain33) GetHexTxByHash(in rpctypes.QueryParm, result *interface{}) error

GetHexTxByHash get hex transaction by hash

func (*Chain33) GetLastBlockSequence

func (c *Chain33) GetLastBlockSequence(in *types.ReqNil, result *interface{}) error

GetLastBlockSequence get sequence last block

func (*Chain33) GetLastHeader

func (c *Chain33) GetLastHeader(in *types.ReqNil, result *interface{}) error

GetLastHeader get last header

func (*Chain33) GetLastMemPool

func (c *Chain33) GetLastMemPool(in types.ReqNil, result *interface{}) error

GetLastMemPool get contents in last mempool

func (*Chain33) GetMempool

func (c *Chain33) GetMempool(in *types.ReqGetMempool, result *interface{}) error

GetMempool get mempool information

func (*Chain33) GetNetInfo

func (c *Chain33) GetNetInfo(in types.P2PGetNetInfoReq, result *interface{}) error

GetNetInfo get net information

func (*Chain33) GetPeerInfo

func (c *Chain33) GetPeerInfo(in types.P2PGetPeerReq, result *interface{}) error

GetPeerInfo get peer information

func (*Chain33) GetProperFee

func (c *Chain33) GetProperFee(in types.ReqProperFee, result *interface{}) error

GetProperFee get contents in proper fee

func (*Chain33) GetSeed

func (c *Chain33) GetSeed(in types.GetSeedByPw, result *interface{}) error

GetSeed get seed

func (*Chain33) GetSeqCallBackLastNum

func (c *Chain33) GetSeqCallBackLastNum(in *types.ReqString, result *interface{}) error

GetSeqCallBackLastNum Get Seq Call Back Last Num

func (*Chain33) GetTimeStatus

func (c *Chain33) GetTimeStatus(in *types.ReqNil, result *interface{}) error

GetTimeStatus get status of time

func (*Chain33) GetTotalCoins

func (c *Chain33) GetTotalCoins(in *types.ReqGetTotalCoins, result *interface{}) error

GetTotalCoins get total coins

func (*Chain33) GetTxByAddr

func (c *Chain33) GetTxByAddr(in types.ReqAddr, result *interface{}) error

GetTxByAddr get transaction by address GetTxByAddr(parm *types.ReqAddr) (*types.ReplyTxInfo, error)

func (*Chain33) GetTxByHashes

func (c *Chain33) GetTxByHashes(in rpctypes.ReqHashes, result *interface{}) error

GetTxByHashes get transaction by hashes

GetTxByHashes(parm *types.ReqHashes) (*types.TransactionDetails, error) GetMempool() (*types.ReplyTxList, error) GetAccounts() (*types.WalletAccounts, error)

func (*Chain33) GetWalletStatus

func (c *Chain33) GetWalletStatus(in types.ReqNil, result *interface{}) error

GetWalletStatus get status of wallet

func (*Chain33) ImportPrivkey

func (c *Chain33) ImportPrivkey(in types.ReqWalletImportPrivkey, result *interface{}) error

ImportPrivkey import privkey of wallet

func (*Chain33) ImportPrivkeysFile

func (c *Chain33) ImportPrivkeysFile(in types.ReqPrivkeysFile, result *interface{}) error

func (*Chain33) IsNtpClockSync

func (c *Chain33) IsNtpClockSync(in *types.ReqNil, result *interface{}) error

IsNtpClockSync is ntp clock sync

func (*Chain33) IsSync

func (c *Chain33) IsSync(in *types.ReqNil, result *interface{}) error

IsSync is sync or not

func (*Chain33) ListSeqCallBack

func (c *Chain33) ListSeqCallBack(in *types.ReqNil, result *interface{}) error

ListSeqCallBack List Seq CallBack

func (*Chain33) Lock

func (c *Chain33) Lock(in types.ReqNil, result *interface{}) error

Lock wallet lock

func (*Chain33) MergeBalance

func (c *Chain33) MergeBalance(in types.ReqWalletMergeBalance, result *interface{}) error

MergeBalance merge balance

func (*Chain33) NewAccount

func (c *Chain33) NewAccount(in types.ReqNewAccount, result *interface{}) error

NewAccount new a account

func (*Chain33) Query

func (c *Chain33) Query(in rpctypes.Query4Jrpc, result *interface{}) error

Query query

func (*Chain33) QueryTotalFee

func (c *Chain33) QueryTotalFee(in *types.LocalDBGet, result *interface{}) error

QueryTotalFee query total fee

func (*Chain33) QueryTransaction

func (c *Chain33) QueryTransaction(in rpctypes.QueryParm, result *interface{}) error

QueryTransaction query transaction

func (*Chain33) ReWriteRawTx

func (c *Chain33) ReWriteRawTx(in *rpctypes.ReWriteRawTx, result *interface{}) error

ReWriteRawTx re-write raw tx by jrpc

func (*Chain33) SaveSeed

func (c *Chain33) SaveSeed(in types.SaveSeedByPw, result *interface{}) error

SaveSeed save seed

func (*Chain33) SendToAddress

func (c *Chain33) SendToAddress(in types.ReqWalletSendToAddress, result *interface{}) error

SendToAddress send to address of coins

func (*Chain33) SendTransaction

func (c *Chain33) SendTransaction(in rpctypes.RawParm, result *interface{}) error

SendTransaction send transaction

func (*Chain33) SetLabl

func (c *Chain33) SetLabl(in types.ReqWalletSetLabel, result *interface{}) error

SetLabl set lable

func (*Chain33) SetPasswd

func (c *Chain33) SetPasswd(in types.ReqWalletSetPasswd, result *interface{}) error

SetPasswd set password

func (*Chain33) SetTxFee

func (c *Chain33) SetTxFee(in types.ReqWalletSetFee, result *interface{}) error

SetTxFee set tx fee

func (*Chain33) SignRawTx

func (c *Chain33) SignRawTx(in *types.ReqSignRawTx, result *interface{}) error

SignRawTx signature the rawtransaction

func (*Chain33) UnLock

func (c *Chain33) UnLock(in types.WalletUnLock, result *interface{}) error

UnLock wallet unlock

func (*Chain33) Version

func (c *Chain33) Version(in *types.ReqNil, result *interface{}) error

Version get software version

func (*Chain33) WalletTxList

func (c *Chain33) WalletTxList(in rpctypes.ReqWalletTransactionList, result *interface{}) error

WalletTxList transaction list of wallet

type Grpc

type Grpc struct {
	// contains filtered or unexported fields

Grpc a channelClient

func (*Grpc) CloseQueue

func (g *Grpc) CloseQueue(ctx context.Context, in *pb.ReqNil) (*pb.Reply, error)

CloseQueue close queue

func (*Grpc) CreateNoBalanceTransaction

func (g *Grpc) CreateNoBalanceTransaction(ctx context.Context, in *pb.NoBalanceTx) (*pb.ReplySignRawTx, error)

CreateNoBalanceTransaction create transaction with no balance

func (*Grpc) CreateNoBalanceTxs

func (g *Grpc) CreateNoBalanceTxs(ctx context.Context, in *pb.NoBalanceTxs) (*pb.ReplySignRawTx, error)

CreateNoBalanceTxs create multiple transaction with no balance

func (*Grpc) CreateRawTransaction

func (g *Grpc) CreateRawTransaction(ctx context.Context, in *pb.CreateTx) (*pb.UnsignTx, error)

CreateRawTransaction create rawtransaction of grpc

func (*Grpc) CreateRawTxGroup

func (g *Grpc) CreateRawTxGroup(ctx context.Context, in *pb.CreateTransactionGroup) (*pb.UnsignTx, error)

CreateRawTxGroup create rawtransaction for group

func (*Grpc) CreateTransaction

func (g *Grpc) CreateTransaction(ctx context.Context, in *pb.CreateTxIn) (*pb.UnsignTx, error)

CreateTransaction create transaction of grpc

func (*Grpc) DumpPrivkey

func (g *Grpc) DumpPrivkey(ctx context.Context, in *pb.ReqString) (*pb.ReplyString, error)

DumpPrivkey dump Privkey

func (*Grpc) DumpPrivkeysFile

func (g *Grpc) DumpPrivkeysFile(ctx context.Context, in *pb.ReqPrivkeysFile) (*pb.Reply, error)

func (*Grpc) ExecWallet

func (g *Grpc) ExecWallet(ctx context.Context, in *pb.ChainExecutor) (*pb.Reply, error)

ExecWallet exec wallet

func (*Grpc) GenSeed

func (g *Grpc) GenSeed(ctx context.Context, in *pb.GenSeedLang) (*pb.ReplySeed, error)

GenSeed seed

func (*Grpc) GetAccounts

func (g *Grpc) GetAccounts(ctx context.Context, in *pb.ReqNil) (*pb.WalletAccounts, error)

GetAccounts get accounts

func (*Grpc) GetAddrOverview

func (g *Grpc) GetAddrOverview(ctx context.Context, in *pb.ReqAddr) (*pb.AddrOverview, error)

GetAddrOverview get address overview

func (*Grpc) GetAllExecBalance

func (g *Grpc) GetAllExecBalance(ctx context.Context, in *pb.ReqAllExecBalance) (*pb.AllExecBalance, error)

GetAllExecBalance get balance of exec

func (*Grpc) GetBalance

func (g *Grpc) GetBalance(ctx context.Context, in *pb.ReqBalance) (*pb.Accounts, error)

GetBalance get balance

func (*Grpc) GetBlockByHashes

func (g *Grpc) GetBlockByHashes(ctx context.Context, in *pb.ReqHashes) (*pb.BlockDetails, error)

GetBlockByHashes get block by hashes

func (*Grpc) GetBlockBySeq

func (g *Grpc) GetBlockBySeq(ctx context.Context, in *pb.Int64) (*pb.BlockSeq, error)

GetBlockBySeq get block with hash by seq

func (*Grpc) GetBlockHash

func (g *Grpc) GetBlockHash(ctx context.Context, in *pb.ReqInt) (*pb.ReplyHash, error)

GetBlockHash get block hash

func (*Grpc) GetBlockOverview

func (g *Grpc) GetBlockOverview(ctx context.Context, in *pb.ReqHash) (*pb.BlockOverview, error)

GetBlockOverview get block overview GetBlockOverview(parm *types.ReqHash) (*types.BlockOverview, error) //add by hyb

func (*Grpc) GetBlocks

func (g *Grpc) GetBlocks(ctx context.Context, in *pb.ReqBlocks) (*pb.Reply, error)

GetBlocks get blocks by grpc

func (*Grpc) GetFatalFailure

func (g *Grpc) GetFatalFailure(ctx context.Context, in *pb.ReqNil) (*pb.Int32, error)

GetFatalFailure return fatal of failure

func (*Grpc) GetFork

func (g *Grpc) GetFork(ctx context.Context, in *pb.ReqKey) (*pb.Int64, error)

GetFork get fork height by fork key

func (*Grpc) GetHeaders

func (g *Grpc) GetHeaders(ctx context.Context, in *pb.ReqBlocks) (*pb.Headers, error)

GetHeaders return headers

func (*Grpc) GetHexTxByHash

func (g *Grpc) GetHexTxByHash(ctx context.Context, in *pb.ReqHash) (*pb.HexTx, error)

GetHexTxByHash get hex transaction by hash

func (*Grpc) GetLastBlockSequence

func (g *Grpc) GetLastBlockSequence(ctx context.Context, in *pb.ReqNil) (*pb.Int64, error)

GetLastBlockSequence get last block sequence

func (*Grpc) GetLastHeader

func (g *Grpc) GetLastHeader(ctx context.Context, in *pb.ReqNil) (*pb.Header, error)

GetLastHeader get lastheader information

func (*Grpc) GetLastMemPool

func (g *Grpc) GetLastMemPool(ctx context.Context, in *pb.ReqNil) (*pb.ReplyTxList, error)

GetLastMemPool return last mempool contents

func (*Grpc) GetMemPool

func (g *Grpc) GetMemPool(ctx context.Context, in *pb.ReqGetMempool) (*pb.ReplyTxList, error)

GetMemPool get mempool contents

func (*Grpc) GetParaTxByHeight

func (g *Grpc) GetParaTxByHeight(ctx context.Context, in *pb.ReqParaTxByHeight) (*pb.ParaTxDetails, error)

GetParaTxByHeight //通过区块高度列表+title获取平行链交易

func (*Grpc) GetParaTxByTitle

func (g *Grpc) GetParaTxByTitle(ctx context.Context, in *pb.ReqParaTxByTitle) (*pb.ParaTxDetails, error)

GetParaTxByTitle 通过seq以及title获取对应平行连的交易

func (*Grpc) GetPeerInfo

func (g *Grpc) GetPeerInfo(ctx context.Context, req *pb.P2PGetPeerReq) (*pb.PeerList, error)

GetPeerInfo get peer information

func (*Grpc) GetProperFee

func (g *Grpc) GetProperFee(ctx context.Context, in *pb.ReqProperFee) (*pb.ReplyProperFee, error)

GetProperFee return last mempool proper fee

func (*Grpc) GetSeed

func (g *Grpc) GetSeed(ctx context.Context, in *pb.GetSeedByPw) (*pb.ReplySeed, error)

GetSeed get seed

func (*Grpc) GetSequenceByHash

func (g *Grpc) GetSequenceByHash(ctx context.Context, in *pb.ReqHash) (*pb.Int64, error)

GetSequenceByHash get block sequece by hash

func (*Grpc) GetTransactionByAddr

func (g *Grpc) GetTransactionByAddr(ctx context.Context, in *pb.ReqAddr) (*pb.ReplyTxInfos, error)

GetTransactionByAddr get transaction by address

func (*Grpc) GetTransactionByHashes

func (g *Grpc) GetTransactionByHashes(ctx context.Context, in *pb.ReqHashes) (*pb.TransactionDetails, error)

GetTransactionByHashes get transaction by hashes

func (*Grpc) GetWalletStatus

func (g *Grpc) GetWalletStatus(ctx context.Context, in *pb.ReqNil) (*pb.WalletStatus, error)

GetWalletStatus get wallet status

func (*Grpc) ImportPrivkey

func (g *Grpc) ImportPrivkey(ctx context.Context, in *pb.ReqWalletImportPrivkey) (*pb.WalletAccount, error)

ImportPrivkey import privkey

func (*Grpc) ImportPrivkeysFile

func (g *Grpc) ImportPrivkeysFile(ctx context.Context, in *pb.ReqPrivkeysFile) (*pb.Reply, error)

func (*Grpc) IsNtpClockSync

func (g *Grpc) IsNtpClockSync(ctx context.Context, in *pb.ReqNil) (*pb.Reply, error)

IsNtpClockSync is ntp clock sync

func (*Grpc) IsSync

func (g *Grpc) IsSync(ctx context.Context, in *pb.ReqNil) (*pb.Reply, error)

IsSync is the sync

func (*Grpc) LoadParaTxByTitle

func (g *Grpc) LoadParaTxByTitle(ctx context.Context, in *pb.ReqHeightByTitle) (*pb.ReplyHeightByTitle, error)

LoadParaTxByTitle //获取拥有此title交易的区块高度

func (*Grpc) Lock

func (g *Grpc) Lock(ctx context.Context, in *pb.ReqNil) (*pb.Reply, error)

Lock wallet lock

func (*Grpc) MergeBalance

func (g *Grpc) MergeBalance(ctx context.Context, in *pb.ReqWalletMergeBalance) (*pb.ReplyHashes, error)

MergeBalance merge balance of wallet

func (*Grpc) NetInfo

func (g *Grpc) NetInfo(ctx context.Context, in *pb.P2PGetNetInfoReq) (*pb.NodeNetInfo, error)

NetInfo net information

func (*Grpc) NewAccount

func (g *Grpc) NewAccount(ctx context.Context, in *pb.ReqNewAccount) (*pb.WalletAccount, error)

NewAccount produce new account

func (*Grpc) QueryChain

func (g *Grpc) QueryChain(ctx context.Context, in *pb.ChainExecutor) (*pb.Reply, error)

QueryChain query chain

func (*Grpc) QueryConsensus

func (g *Grpc) QueryConsensus(ctx context.Context, in *pb.ChainExecutor) (*pb.Reply, error)

QueryConsensus query consensus

func (*Grpc) QueryRandNum

func (g *Grpc) QueryRandNum(ctx context.Context, in *pb.ReqRandHash) (*pb.ReplyHash, error)

QueryRandNum query randHash from ticket

func (*Grpc) QueryTransaction

func (g *Grpc) QueryTransaction(ctx context.Context, in *pb.ReqHash) (*pb.TransactionDetail, error)

QueryTransaction query transaction by grpc

func (*Grpc) ReWriteRawTx

func (g *Grpc) ReWriteRawTx(ctx context.Context, in *pb.ReWriteRawTx) (*pb.UnsignTx, error)

ReWriteRawTx re-write raw tx parameters of grpc

func (*Grpc) SaveSeed

func (g *Grpc) SaveSeed(ctx context.Context, in *pb.SaveSeedByPw) (*pb.Reply, error)

SaveSeed save seed

func (*Grpc) SendToAddress

func (g *Grpc) SendToAddress(ctx context.Context, in *pb.ReqWalletSendToAddress) (*pb.ReplyHash, error)

SendToAddress send to address of coins

func (*Grpc) SendTransaction

func (g *Grpc) SendTransaction(ctx context.Context, in *pb.Transaction) (*pb.Reply, error)

SendTransaction send transaction by network

func (*Grpc) SetLabl

func (g *Grpc) SetLabl(ctx context.Context, in *pb.ReqWalletSetLabel) (*pb.WalletAccount, error)

SetLabl set labl

func (*Grpc) SetPasswd

func (g *Grpc) SetPasswd(ctx context.Context, in *pb.ReqWalletSetPasswd) (*pb.Reply, error)

SetPasswd set password

func (*Grpc) SetTxFee

func (g *Grpc) SetTxFee(ctx context.Context, in *pb.ReqWalletSetFee) (*pb.Reply, error)

SetTxFee set tx fee

func (*Grpc) SignRawTx

func (g *Grpc) SignRawTx(ctx context.Context, in *pb.ReqSignRawTx) (*pb.ReplySignRawTx, error)

SignRawTx signature rawtransaction

func (*Grpc) UnLock

func (g *Grpc) UnLock(ctx context.Context, in *pb.WalletUnLock) (*pb.Reply, error)

UnLock wallet unlock

func (*Grpc) Version

func (g *Grpc) Version(ctx context.Context, in *pb.ReqNil) (*pb.VersionInfo, error)

Version version

func (*Grpc) WalletTransactionList

func (g *Grpc) WalletTransactionList(ctx context.Context, in *pb.ReqWalletTransactionList) (*pb.WalletTxDetails, error)

WalletTransactionList transaction list of wallet

type Grpcserver

type Grpcserver struct {
	// contains filtered or unexported fields

Grpcserver a object

func NewGRpcServer

func NewGRpcServer(c queue.Client, api client.QueueProtocolAPI) *Grpcserver

NewGRpcServer new grpcserver object

func NewGrpcServer

func NewGrpcServer() *Grpcserver

NewGrpcServer new GrpcServer object

func (*Grpcserver) Close

func (j *Grpcserver) Close()

Close grpcserver close

func (*Grpcserver) Listen

func (g *Grpcserver) Listen() (int, error)

Listen grpcserver listen

type HTTPConn

type HTTPConn struct {
	// contains filtered or unexported fields

HTTPConn adapt HTTP connection to ReadWriteCloser

func (*HTTPConn) Close

func (c *HTTPConn) Close() error

Close rewrite the close of http

func (*HTTPConn) Read

func (c *HTTPConn) Read(p []byte) (n int, err error)

Read rewrite the read of http

func (*HTTPConn) Write

func (c *HTTPConn) Write(d []byte) (n int, err error)

Write rewrite the write of http

type JSONRPCServer

type JSONRPCServer struct {
	// contains filtered or unexported fields

JSONRPCServer a json rpcserver object

func NewJSONRPCServer

func NewJSONRPCServer(c queue.Client, api client.QueueProtocolAPI) *JSONRPCServer

NewJSONRPCServer new json rpcserver object

func (*JSONRPCServer) Close

func (s *JSONRPCServer) Close()

Close json rpcserver close

func (*JSONRPCServer) Listen

func (j *JSONRPCServer) Listen() (int, error)

Listen jsonsever listen

type RPC

type RPC struct {
	// contains filtered or unexported fields

RPC a type object

func New

func New(cfg *types.Chain33Config) *RPC

New produce a rpc by cfg

func (*RPC) Close

func (r *RPC) Close()

Close rpc close

func (*RPC) GRPC

func (r *RPC) GRPC() *grpc.Server

GRPC return grpc rpc

func (*RPC) GetQueueClient

func (r *RPC) GetQueueClient() queue.Client

GetQueueClient get queue client

func (*RPC) JRPC

func (r *RPC) JRPC() *rpc.Server

JRPC return jrpc

func (*RPC) Listen

func (r *RPC) Listen() (port1 int, port2 int)

Listen rpc listen

func (*RPC) SetAPI

func (r *RPC) SetAPI(api client.QueueProtocolAPI)

SetAPI set api of rpc

func (*RPC) SetQueueClient

func (r *RPC) SetQueueClient(c queue.Client)

SetQueueClient set queue client

func (*RPC) SetQueueClientNoListen

func (r *RPC) SetQueueClientNoListen(c queue.Client)

SetQueueClientNoListen set queue client with no listen


Path Synopsis
Package jsonclient 实现JSON rpc客户端请求功能
Package jsonclient 实现JSON rpc客户端请求功能
Package types rpc相关的一些结构体定义以及转化函数
Package types rpc相关的一些结构体定义以及转化函数

Jump to

Keyboard shortcuts

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