Documentation ¶
Overview ¶
Package rpc turingchain RPC模块包含JSONRpc以及grpc
Index ¶
- func InitCfg(cfg *types.RPC)
- func InitFilterPrintFuncBlacklist()
- func InitGrpcFuncBlacklist(cfg *types.RPC)
- func InitGrpcFuncWhitelist(cfg *types.RPC)
- func InitIPWhitelist(cfg *types.RPC)
- func InitJrpcFuncBlacklist(cfg *types.RPC)
- func InitJrpcFuncWhitelist(cfg *types.RPC)
- type Grpc
- func (g *Grpc) CloseQueue(ctx context.Context, in *pb.ReqNil) (*pb.Reply, error)
- func (g *Grpc) CreateNoBalanceTransaction(ctx context.Context, in *pb.NoBalanceTx) (*pb.ReplySignRawTx, error)
- func (g *Grpc) CreateNoBalanceTxs(ctx context.Context, in *pb.NoBalanceTxs) (*pb.ReplySignRawTx, error)
- func (g *Grpc) CreateRawTransaction(ctx context.Context, in *pb.CreateTx) (*pb.UnsignTx, error)
- func (g *Grpc) CreateRawTxGroup(ctx context.Context, in *pb.CreateTransactionGroup) (*pb.UnsignTx, error)
- func (g *Grpc) CreateTransaction(ctx context.Context, in *pb.CreateTxIn) (*pb.UnsignTx, error)
- func (g *Grpc) DumpPrivkey(ctx context.Context, in *pb.ReqString) (*pb.ReplyString, error)
- func (g *Grpc) DumpPrivkeysFile(ctx context.Context, in *pb.ReqPrivkeysFile) (*pb.Reply, error)
- func (g *Grpc) ExecWallet(ctx context.Context, in *pb.ChainExecutor) (*pb.Reply, error)
- func (g *Grpc) GenSeed(ctx context.Context, in *pb.GenSeedLang) (*pb.ReplySeed, error)
- func (g *Grpc) GetAccount(ctx context.Context, in *pb.ReqGetAccount) (*pb.WalletAccount, error)
- func (g *Grpc) GetAccounts(ctx context.Context, in *pb.ReqNil) (*pb.WalletAccounts, error)
- func (g *Grpc) GetAddrOverview(ctx context.Context, in *pb.ReqAddr) (*pb.AddrOverview, error)
- func (g *Grpc) GetAllExecBalance(ctx context.Context, in *pb.ReqAllExecBalance) (*pb.AllExecBalance, error)
- func (g *Grpc) GetBalance(ctx context.Context, in *pb.ReqBalance) (*pb.Accounts, error)
- func (g *Grpc) GetBlockByHashes(ctx context.Context, in *pb.ReqHashes) (*pb.BlockDetails, error)
- func (g *Grpc) GetBlockBySeq(ctx context.Context, in *pb.Int64) (*pb.BlockSeq, error)
- func (g *Grpc) GetBlockHash(ctx context.Context, in *pb.ReqInt) (*pb.ReplyHash, error)
- func (g *Grpc) GetBlockOverview(ctx context.Context, in *pb.ReqHash) (*pb.BlockOverview, error)
- func (g *Grpc) GetBlocks(ctx context.Context, in *pb.ReqBlocks) (*pb.Reply, error)
- func (g *Grpc) GetFatalFailure(ctx context.Context, in *pb.ReqNil) (*pb.Int32, error)
- func (g *Grpc) GetFork(ctx context.Context, in *pb.ReqKey) (*pb.Int64, error)
- func (g *Grpc) GetHeaders(ctx context.Context, in *pb.ReqBlocks) (*pb.Headers, error)
- func (g *Grpc) GetHexTxByHash(ctx context.Context, in *pb.ReqHash) (*pb.HexTx, error)
- func (g *Grpc) GetLastBlockSequence(ctx context.Context, in *pb.ReqNil) (*pb.Int64, error)
- func (g *Grpc) GetLastHeader(ctx context.Context, in *pb.ReqNil) (*pb.Header, error)
- func (g *Grpc) GetLastMemPool(ctx context.Context, in *pb.ReqNil) (*pb.ReplyTxList, error)
- func (g *Grpc) GetMemPool(ctx context.Context, in *pb.ReqGetMempool) (*pb.ReplyTxList, error)
- func (g *Grpc) GetParaTxByHeight(ctx context.Context, in *pb.ReqParaTxByHeight) (*pb.ParaTxDetails, error)
- func (g *Grpc) GetParaTxByTitle(ctx context.Context, in *pb.ReqParaTxByTitle) (*pb.ParaTxDetails, error)
- func (g *Grpc) GetPeerInfo(ctx context.Context, req *pb.P2PGetPeerReq) (*pb.PeerList, error)
- func (g *Grpc) GetProperFee(ctx context.Context, in *pb.ReqProperFee) (*pb.ReplyProperFee, error)
- func (g *Grpc) GetSeed(ctx context.Context, in *pb.GetSeedByPw) (*pb.ReplySeed, error)
- func (g *Grpc) GetSequenceByHash(ctx context.Context, in *pb.ReqHash) (*pb.Int64, error)
- func (g *Grpc) GetServerTime(ctx context.Context, in *pb.ReqNil) (*pb.ServerTime, error)
- func (g *Grpc) GetTransactionByAddr(ctx context.Context, in *pb.ReqAddr) (*pb.ReplyTxInfos, error)
- func (g *Grpc) GetTransactionByHashes(ctx context.Context, in *pb.ReqHashes) (*pb.TransactionDetails, error)
- func (g *Grpc) GetWalletStatus(ctx context.Context, in *pb.ReqNil) (*pb.WalletStatus, error)
- func (g *Grpc) ImportPrivkey(ctx context.Context, in *pb.ReqWalletImportPrivkey) (*pb.WalletAccount, error)
- func (g *Grpc) ImportPrivkeysFile(ctx context.Context, in *pb.ReqPrivkeysFile) (*pb.Reply, error)
- func (g *Grpc) IsNtpClockSync(ctx context.Context, in *pb.ReqNil) (*pb.Reply, error)
- func (g *Grpc) IsSync(ctx context.Context, in *pb.ReqNil) (*pb.Reply, error)
- func (g *Grpc) LoadParaTxByTitle(ctx context.Context, in *pb.ReqHeightByTitle) (*pb.ReplyHeightByTitle, error)
- func (g *Grpc) Lock(ctx context.Context, in *pb.ReqNil) (*pb.Reply, error)
- func (g *Grpc) MergeBalance(ctx context.Context, in *pb.ReqWalletMergeBalance) (*pb.ReplyHashes, error)
- func (g *Grpc) NetInfo(ctx context.Context, in *pb.P2PGetNetInfoReq) (*pb.NodeNetInfo, error)
- func (g *Grpc) NewAccount(ctx context.Context, in *pb.ReqNewAccount) (*pb.WalletAccount, error)
- func (g *Grpc) QueryChain(ctx context.Context, in *pb.ChainExecutor) (*pb.Reply, error)
- func (g *Grpc) QueryConsensus(ctx context.Context, in *pb.ChainExecutor) (*pb.Reply, error)
- func (g *Grpc) QueryRandNum(ctx context.Context, in *pb.ReqRandHash) (*pb.ReplyHash, error)
- func (g *Grpc) QueryTransaction(ctx context.Context, in *pb.ReqHash) (*pb.TransactionDetail, error)
- func (g *Grpc) ReWriteRawTx(ctx context.Context, in *pb.ReWriteRawTx) (*pb.UnsignTx, error)
- func (g *Grpc) SaveSeed(ctx context.Context, in *pb.SaveSeedByPw) (*pb.Reply, error)
- func (g *Grpc) SendToAddress(ctx context.Context, in *pb.ReqWalletSendToAddress) (*pb.ReplyHash, error)
- func (g *Grpc) SendTransaction(ctx context.Context, in *pb.Transaction) (*pb.Reply, error)
- func (g *Grpc) SendTransactionSync(ctx context.Context, in *pb.Transaction) (*pb.Reply, error)
- func (g *Grpc) SetLabl(ctx context.Context, in *pb.ReqWalletSetLabel) (*pb.WalletAccount, error)
- func (g *Grpc) SetPasswd(ctx context.Context, in *pb.ReqWalletSetPasswd) (*pb.Reply, error)
- func (g *Grpc) SetTxFee(ctx context.Context, in *pb.ReqWalletSetFee) (*pb.Reply, error)
- func (g *Grpc) SignRawTx(ctx context.Context, in *pb.ReqSignRawTx) (*pb.ReplySignRawTx, error)
- func (g *Grpc) UnLock(ctx context.Context, in *pb.WalletUnLock) (*pb.Reply, error)
- func (g *Grpc) Version(ctx context.Context, in *pb.ReqNil) (*pb.VersionInfo, error)
- func (g *Grpc) WalletTransactionList(ctx context.Context, in *pb.ReqWalletTransactionList) (*pb.WalletTxDetails, error)
- type Grpcserver
- type HTTPConn
- type JSONRPCServer
- type RPC
- func (r *RPC) Close()
- func (r *RPC) GRPC() *grpc.Server
- func (r *RPC) GetQueueClient() queue.Client
- func (r *RPC) JRPC() *rpc.Server
- func (r *RPC) Listen() (port1 int, port2 int)
- func (r *RPC) SetAPI(api client.QueueProtocolAPI)
- func (r *RPC) SetQueueClient(c queue.Client)
- func (r *RPC) SetQueueClientNoListen(c queue.Client)
- type Turingchain
- func (c *Turingchain) AddPushSubscribe(in *types.PushSubscribeReq, result *interface{}) error
- func (c *Turingchain) CloseQueue(in *types.ReqNil, result *interface{}) error
- func (c *Turingchain) ConvertExectoAddr(in rpctypes.ExecNameParm, result *string) error
- func (c *Turingchain) CreateNoBalanceTransaction(in *types.NoBalanceTx, result *string) error
- func (c *Turingchain) CreateNoBlanaceTxs(in *types.NoBalanceTxs, result *string) error
- func (c *Turingchain) CreateRawTransaction(in *rpctypes.CreateTx, result *interface{}) error
- func (c *Turingchain) CreateRawTxGroup(in *types.CreateTransactionGroup, result *interface{}) error
- func (c *Turingchain) CreateTransaction(in *rpctypes.CreateTxIn, result *interface{}) error
- func (c *Turingchain) DecodeRawTransaction(in *types.ReqDecodeRawTransaction, result *interface{}) error
- func (c *Turingchain) DumpPrivkey(in types.ReqString, result *interface{}) error
- func (c *Turingchain) DumpPrivkeysFile(in types.ReqPrivkeysFile, result *interface{}) error
- func (c *Turingchain) ExecWallet(in *rpctypes.ChainExecutor, result *interface{}) error
- func (c *Turingchain) GenSeed(in types.GenSeedLang, result *interface{}) error
- func (c *Turingchain) GetAccount(in types.ReqGetAccount, result *interface{}) error
- func (c *Turingchain) GetAccounts(in *types.ReqAccountList, result *interface{}) error
- func (c *Turingchain) GetAccountsV2(in *types.ReqNil, result *interface{}) error
- func (c *Turingchain) GetAddrOverview(in types.ReqAddr, result *interface{}) error
- func (c *Turingchain) GetAllExecBalance(in types.ReqAllExecBalance, result *interface{}) error
- func (c *Turingchain) GetBalance(in types.ReqBalance, result *interface{}) error
- func (c *Turingchain) GetBlockByHashes(in rpctypes.ReqHashes, result *interface{}) error
- func (c *Turingchain) GetBlockBySeq(in types.Int64, result *interface{}) error
- func (c *Turingchain) GetBlockHash(in types.ReqInt, result *interface{}) error
- func (c *Turingchain) GetBlockOverview(in rpctypes.QueryParm, result *interface{}) error
- func (c *Turingchain) GetBlockSequences(in rpctypes.BlockParam, result *interface{}) error
- func (c *Turingchain) GetBlocks(in rpctypes.BlockParam, result *interface{}) error
- func (c *Turingchain) GetCoinSymbol(in types.ReqNil, result *interface{}) error
- func (c *Turingchain) GetExecBalance(in *types.ReqGetExecBalance, result *interface{}) error
- func (c *Turingchain) GetFatalFailure(in *types.ReqNil, result *interface{}) error
- func (c *Turingchain) GetHeaders(in types.ReqBlocks, result *interface{}) error
- func (c *Turingchain) GetHexTxByHash(in rpctypes.QueryParm, result *interface{}) error
- func (c *Turingchain) GetLastBlockSequence(in *types.ReqNil, result *interface{}) error
- func (c *Turingchain) GetLastHeader(in *types.ReqNil, result *interface{}) error
- func (c *Turingchain) GetLastMemPool(in types.ReqNil, result *interface{}) error
- func (c *Turingchain) GetMempool(in *types.ReqGetMempool, result *interface{}) error
- func (c *Turingchain) GetNetInfo(in types.P2PGetNetInfoReq, result *interface{}) error
- func (c *Turingchain) GetParaTxByHeight(req types.ReqParaTxByHeight, result *interface{}) error
- func (c *Turingchain) GetParaTxByTitle(req types.ReqParaTxByTitle, result *interface{}) error
- func (c *Turingchain) GetPeerInfo(in types.P2PGetPeerReq, result *interface{}) error
- func (c *Turingchain) GetProperFee(in types.ReqProperFee, result *interface{}) error
- func (c *Turingchain) GetPushSeqLastNum(in *types.ReqString, result *interface{}) error
- func (c *Turingchain) GetSeed(in types.GetSeedByPw, result *interface{}) error
- func (c *Turingchain) GetSequenceByHash(in rpctypes.ReqHashes, result *interface{}) error
- func (c *Turingchain) GetServerTime(in *types.ReqNil, result *interface{}) error
- func (c *Turingchain) GetTimeStatus(in *types.ReqNil, result *interface{}) error
- func (c *Turingchain) GetTotalCoins(in *types.ReqGetTotalCoins, result *interface{}) error
- func (c *Turingchain) GetTxByAddr(in types.ReqAddr, result *interface{}) error
- func (c *Turingchain) GetTxByHashes(in rpctypes.ReqHashes, result *interface{}) error
- func (c *Turingchain) GetWalletStatus(in types.ReqNil, result *interface{}) error
- func (c *Turingchain) ImportPrivkey(in types.ReqWalletImportPrivkey, result *interface{}) error
- func (c *Turingchain) ImportPrivkeysFile(in types.ReqPrivkeysFile, result *interface{}) error
- func (c *Turingchain) IsNtpClockSync(in *types.ReqNil, result *interface{}) error
- func (c *Turingchain) IsSync(in *types.ReqNil, result *interface{}) error
- func (c *Turingchain) ListPushes(in *types.ReqNil, result *interface{}) error
- func (c *Turingchain) LoadParaTxByTitle(req types.ReqHeightByTitle, result *interface{}) error
- func (c *Turingchain) Lock(in types.ReqNil, result *interface{}) error
- func (c *Turingchain) MergeBalance(in types.ReqWalletMergeBalance, result *interface{}) error
- func (c *Turingchain) NetProtocols(in types.ReqNil, result *interface{}) error
- func (c *Turingchain) NewAccount(in types.ReqNewAccount, result *interface{}) error
- func (c *Turingchain) Query(in rpctypes.Query4Jrpc, result *interface{}) error
- func (c *Turingchain) QueryChain(in rpctypes.ChainExecutor, result *interface{}) error
- func (c *Turingchain) QueryTotalFee(in *types.LocalDBGet, result *interface{}) error
- func (c *Turingchain) QueryTransaction(in rpctypes.QueryParm, result *interface{}) error
- func (c *Turingchain) ReWriteRawTx(in *rpctypes.ReWriteRawTx, result *interface{}) error
- func (c *Turingchain) SaveSeed(in types.SaveSeedByPw, result *interface{}) error
- func (c *Turingchain) SendToAddress(in types.ReqWalletSendToAddress, result *interface{}) error
- func (c *Turingchain) SendTransaction(in rpctypes.RawParm, result *interface{}) error
- func (c *Turingchain) SendTransactionSync(in rpctypes.RawParm, result *interface{}) error
- func (c *Turingchain) SetLabl(in types.ReqWalletSetLabel, result *interface{}) error
- func (c *Turingchain) SetPasswd(in types.ReqWalletSetPasswd, result *interface{}) error
- func (c *Turingchain) SetTxFee(in types.ReqWalletSetFee, result *interface{}) error
- func (c *Turingchain) SignRawTx(in *types.ReqSignRawTx, result *interface{}) error
- func (c *Turingchain) UnLock(in types.WalletUnLock, result *interface{}) error
- func (c *Turingchain) Version(in *types.ReqNil, result *interface{}) error
- func (c *Turingchain) WalletTxList(in rpctypes.ReqWalletTransactionList, result *interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitFilterPrintFuncBlacklist ¶
func InitFilterPrintFuncBlacklist()
InitFilterPrintFuncBlacklist rpc模块打印requet信息时需要过滤掉一些敏感接口的入参打印,比如钱包密码相关的
func InitGrpcFuncBlacklist ¶
InitGrpcFuncBlacklist init grpc function blacklist
func InitGrpcFuncWhitelist ¶
InitGrpcFuncWhitelist init grpc function whitelist
func InitJrpcFuncBlacklist ¶
InitJrpcFuncBlacklist init jrpc function blacklist
func InitJrpcFuncWhitelist ¶
InitJrpcFuncWhitelist init jrpc function whitelist
Types ¶
type Grpc ¶
type Grpc struct {
// contains filtered or unexported fields
}
Grpc a channelClient
func (*Grpc) CloseQueue ¶
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 ¶
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 ¶
CreateTransaction create transaction of grpc
func (*Grpc) DumpPrivkey ¶
DumpPrivkey dump Privkey
func (*Grpc) DumpPrivkeysFile ¶
DumpPrivkeysFile dumps private key to file.
func (*Grpc) ExecWallet ¶
ExecWallet exec wallet
func (*Grpc) GetAccount ¶
func (g *Grpc) GetAccount(ctx context.Context, in *pb.ReqGetAccount) (*pb.WalletAccount, error)
GetAccount 通过地址标签获取账户地址以及账户余额信息
func (*Grpc) GetAccounts ¶
GetAccounts get accounts
func (*Grpc) GetAddrOverview ¶
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 ¶
GetBalance get balance
func (*Grpc) GetBlockByHashes ¶
GetBlockByHashes get block by hashes
func (*Grpc) GetBlockBySeq ¶
GetBlockBySeq get block with hash by seq
func (*Grpc) GetBlockHash ¶
GetBlockHash get block hash
func (*Grpc) GetBlockOverview ¶
GetBlockOverview get block overview GetBlockOverview(parm *types.ReqHash) (*types.BlockOverview, error) //add by hyb
func (*Grpc) GetFatalFailure ¶
GetFatalFailure return fatal of failure
func (*Grpc) GetHeaders ¶
GetHeaders return headers
func (*Grpc) GetHexTxByHash ¶
GetHexTxByHash get hex transaction by hash
func (*Grpc) GetLastBlockSequence ¶
GetLastBlockSequence get last block sequence
func (*Grpc) GetLastHeader ¶
GetLastHeader get lastheader information
func (*Grpc) GetLastMemPool ¶
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 ¶
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) GetSequenceByHash ¶
GetSequenceByHash get block sequece by hash
func (*Grpc) GetServerTime ¶
GetServerTime get server time
func (*Grpc) GetTransactionByAddr ¶
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 ¶
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 ¶
ImportPrivkeysFile imports private key from file.
func (*Grpc) IsNtpClockSync ¶
IsNtpClockSync is ntp clock sync
func (*Grpc) LoadParaTxByTitle ¶
func (g *Grpc) LoadParaTxByTitle(ctx context.Context, in *pb.ReqHeightByTitle) (*pb.ReplyHeightByTitle, error)
LoadParaTxByTitle //获取拥有此title交易的区块高度
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 ¶
QueryChain query chain
func (*Grpc) QueryConsensus ¶
QueryConsensus query consensus
func (*Grpc) QueryRandNum ¶
QueryRandNum query randHash from ticket
func (*Grpc) QueryTransaction ¶
QueryTransaction query transaction by grpc
func (*Grpc) ReWriteRawTx ¶
ReWriteRawTx re-write raw tx parameters of grpc
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 ¶
SendTransaction send transaction by network
func (*Grpc) SendTransactionSync ¶
SendTransactionSync send transaction by network and query
func (*Grpc) SetLabl ¶
func (g *Grpc) SetLabl(ctx context.Context, in *pb.ReqWalletSetLabel) (*pb.WalletAccount, error)
SetLabl set labl
func (*Grpc) SignRawTx ¶
func (g *Grpc) SignRawTx(ctx context.Context, in *pb.ReqSignRawTx) (*pb.ReplySignRawTx, error)
SignRawTx signature rawtransaction
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
type HTTPConn ¶
type HTTPConn struct {
// contains filtered or unexported fields
}
HTTPConn adapt HTTP connection to ReadWriteCloser
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) 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 (*RPC) GetQueueClient ¶
GetQueueClient get queue client
func (*RPC) SetQueueClient ¶
SetQueueClient set queue client
func (*RPC) SetQueueClientNoListen ¶
SetQueueClientNoListen set queue client with no listen
type Turingchain ¶
type Turingchain struct {
// contains filtered or unexported fields
}
Turingchain a channel client
func (*Turingchain) AddPushSubscribe ¶
func (c *Turingchain) AddPushSubscribe(in *types.PushSubscribeReq, result *interface{}) error
AddPushSubscribe add Seq CallBack
func (*Turingchain) CloseQueue ¶
func (c *Turingchain) CloseQueue(in *types.ReqNil, result *interface{}) error
CloseQueue close queue
func (*Turingchain) ConvertExectoAddr ¶
func (c *Turingchain) ConvertExectoAddr(in rpctypes.ExecNameParm, result *string) error
ConvertExectoAddr convert exec to address
func (*Turingchain) CreateNoBalanceTransaction ¶
func (c *Turingchain) CreateNoBalanceTransaction(in *types.NoBalanceTx, result *string) error
CreateNoBalanceTransaction create transaction with no balance
func (*Turingchain) CreateNoBlanaceTxs ¶
func (c *Turingchain) CreateNoBlanaceTxs(in *types.NoBalanceTxs, result *string) error
CreateNoBlanaceTxs create multiple transaction with no balance
func (*Turingchain) CreateRawTransaction ¶
func (c *Turingchain) CreateRawTransaction(in *rpctypes.CreateTx, result *interface{}) error
CreateRawTransaction create rawtransaction by jrpc
func (*Turingchain) CreateRawTxGroup ¶
func (c *Turingchain) CreateRawTxGroup(in *types.CreateTransactionGroup, result *interface{}) error
CreateRawTxGroup create rawtransaction with group
func (*Turingchain) CreateTransaction ¶
func (c *Turingchain) CreateTransaction(in *rpctypes.CreateTxIn, result *interface{}) error
CreateTransaction create transaction
func (*Turingchain) DecodeRawTransaction ¶
func (c *Turingchain) DecodeRawTransaction(in *types.ReqDecodeRawTransaction, result *interface{}) error
DecodeRawTransaction 考虑交易组的解析统一返回ReplyTxList列表
func (*Turingchain) DumpPrivkey ¶
func (c *Turingchain) DumpPrivkey(in types.ReqString, result *interface{}) error
DumpPrivkey dump privkey
func (*Turingchain) DumpPrivkeysFile ¶
func (c *Turingchain) DumpPrivkeysFile(in types.ReqPrivkeysFile, result *interface{}) error
DumpPrivkeysFile dumps private key to file.
func (*Turingchain) ExecWallet ¶
func (c *Turingchain) ExecWallet(in *rpctypes.ChainExecutor, result *interface{}) error
ExecWallet exec wallet
func (*Turingchain) GenSeed ¶
func (c *Turingchain) GenSeed(in types.GenSeedLang, result *interface{}) error
GenSeed seed
func (*Turingchain) GetAccount ¶
func (c *Turingchain) GetAccount(in types.ReqGetAccount, result *interface{}) error
GetAccount getAddress by lable
func (*Turingchain) GetAccounts ¶
func (c *Turingchain) GetAccounts(in *types.ReqAccountList, result *interface{}) error
GetAccounts get accounts
func (*Turingchain) GetAccountsV2 ¶
func (c *Turingchain) GetAccountsV2(in *types.ReqNil, result *interface{}) error
GetAccountsV2 get accounts for version 2
func (*Turingchain) GetAddrOverview ¶
func (c *Turingchain) GetAddrOverview(in types.ReqAddr, result *interface{}) error
GetAddrOverview get overview of address
func (*Turingchain) GetAllExecBalance ¶
func (c *Turingchain) GetAllExecBalance(in types.ReqAllExecBalance, result *interface{}) error
GetAllExecBalance get all balance of exec
func (*Turingchain) GetBalance ¶
func (c *Turingchain) GetBalance(in types.ReqBalance, result *interface{}) error
GetBalance get balance
func (*Turingchain) GetBlockByHashes ¶
func (c *Turingchain) GetBlockByHashes(in rpctypes.ReqHashes, result *interface{}) error
GetBlockByHashes get block information by hashes
func (*Turingchain) GetBlockBySeq ¶
func (c *Turingchain) GetBlockBySeq(in types.Int64, result *interface{}) error
GetBlockBySeq get block by seq
func (*Turingchain) GetBlockHash ¶
func (c *Turingchain) GetBlockHash(in types.ReqInt, result *interface{}) error
GetBlockHash get block hash
func (*Turingchain) GetBlockOverview ¶
func (c *Turingchain) GetBlockOverview(in rpctypes.QueryParm, result *interface{}) error
GetBlockOverview get overview of block GetBlockOverview(parm *types.ReqHash) (*types.BlockOverview, error)
func (*Turingchain) GetBlockSequences ¶
func (c *Turingchain) GetBlockSequences(in rpctypes.BlockParam, result *interface{}) error
GetBlockSequences get the block loading sequence number information for the specified interval
func (*Turingchain) GetBlocks ¶
func (c *Turingchain) GetBlocks(in rpctypes.BlockParam, result *interface{}) error
GetBlocks get block information
func (*Turingchain) GetCoinSymbol ¶
func (c *Turingchain) GetCoinSymbol(in types.ReqNil, result *interface{}) error
GetCoinSymbol get coin symbol
func (*Turingchain) GetExecBalance ¶
func (c *Turingchain) GetExecBalance(in *types.ReqGetExecBalance, result *interface{}) error
GetExecBalance get balance exec
func (*Turingchain) GetFatalFailure ¶
func (c *Turingchain) GetFatalFailure(in *types.ReqNil, result *interface{}) error
GetFatalFailure return fatal failure
func (*Turingchain) GetHeaders ¶
func (c *Turingchain) GetHeaders(in types.ReqBlocks, result *interface{}) error
GetHeaders get headers
func (*Turingchain) GetHexTxByHash ¶
func (c *Turingchain) GetHexTxByHash(in rpctypes.QueryParm, result *interface{}) error
GetHexTxByHash get hex transaction by hash
func (*Turingchain) GetLastBlockSequence ¶
func (c *Turingchain) GetLastBlockSequence(in *types.ReqNil, result *interface{}) error
GetLastBlockSequence get sequence last block
func (*Turingchain) GetLastHeader ¶
func (c *Turingchain) GetLastHeader(in *types.ReqNil, result *interface{}) error
GetLastHeader get last header
func (*Turingchain) GetLastMemPool ¶
func (c *Turingchain) GetLastMemPool(in types.ReqNil, result *interface{}) error
GetLastMemPool get contents in last mempool
func (*Turingchain) GetMempool ¶
func (c *Turingchain) GetMempool(in *types.ReqGetMempool, result *interface{}) error
GetMempool get mempool information
func (*Turingchain) GetNetInfo ¶
func (c *Turingchain) GetNetInfo(in types.P2PGetNetInfoReq, result *interface{}) error
GetNetInfo get net information
func (*Turingchain) GetParaTxByHeight ¶
func (c *Turingchain) GetParaTxByHeight(req types.ReqParaTxByHeight, result *interface{}) error
GetParaTxByHeight get paraTx by block height
func (*Turingchain) GetParaTxByTitle ¶
func (c *Turingchain) GetParaTxByTitle(req types.ReqParaTxByTitle, result *interface{}) error
GetParaTxByTitle get paraTx by title
func (*Turingchain) GetPeerInfo ¶
func (c *Turingchain) GetPeerInfo(in types.P2PGetPeerReq, result *interface{}) error
GetPeerInfo get peer information
func (*Turingchain) GetProperFee ¶
func (c *Turingchain) GetProperFee(in types.ReqProperFee, result *interface{}) error
GetProperFee get contents in proper fee
func (*Turingchain) GetPushSeqLastNum ¶
func (c *Turingchain) GetPushSeqLastNum(in *types.ReqString, result *interface{}) error
GetPushSeqLastNum Get Seq Call Back Last Num
func (*Turingchain) GetSeed ¶
func (c *Turingchain) GetSeed(in types.GetSeedByPw, result *interface{}) error
GetSeed get seed
func (*Turingchain) GetSequenceByHash ¶
func (c *Turingchain) GetSequenceByHash(in rpctypes.ReqHashes, result *interface{}) error
GetSequenceByHash get sequcen by hashes
func (*Turingchain) GetServerTime ¶
func (c *Turingchain) GetServerTime(in *types.ReqNil, result *interface{}) error
GetServerTime get server time
func (*Turingchain) GetTimeStatus ¶
func (c *Turingchain) GetTimeStatus(in *types.ReqNil, result *interface{}) error
GetTimeStatus get status of time
func (*Turingchain) GetTotalCoins ¶
func (c *Turingchain) GetTotalCoins(in *types.ReqGetTotalCoins, result *interface{}) error
GetTotalCoins get total coins
func (*Turingchain) GetTxByAddr ¶
func (c *Turingchain) GetTxByAddr(in types.ReqAddr, result *interface{}) error
GetTxByAddr get transaction by address GetTxByAddr(parm *types.ReqAddr) (*types.ReplyTxInfo, error)
func (*Turingchain) GetTxByHashes ¶
func (c *Turingchain) 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 (*Turingchain) GetWalletStatus ¶
func (c *Turingchain) GetWalletStatus(in types.ReqNil, result *interface{}) error
GetWalletStatus get status of wallet
func (*Turingchain) ImportPrivkey ¶
func (c *Turingchain) ImportPrivkey(in types.ReqWalletImportPrivkey, result *interface{}) error
ImportPrivkey import privkey of wallet
func (*Turingchain) ImportPrivkeysFile ¶
func (c *Turingchain) ImportPrivkeysFile(in types.ReqPrivkeysFile, result *interface{}) error
ImportPrivkeysFile imports private key from file.
func (*Turingchain) IsNtpClockSync ¶
func (c *Turingchain) IsNtpClockSync(in *types.ReqNil, result *interface{}) error
IsNtpClockSync is ntp clock sync
func (*Turingchain) IsSync ¶
func (c *Turingchain) IsSync(in *types.ReqNil, result *interface{}) error
IsSync is sync or not
func (*Turingchain) ListPushes ¶
func (c *Turingchain) ListPushes(in *types.ReqNil, result *interface{}) error
ListPushes List Seq CallBack
func (*Turingchain) LoadParaTxByTitle ¶
func (c *Turingchain) LoadParaTxByTitle(req types.ReqHeightByTitle, result *interface{}) error
LoadParaTxByTitle load paratx by title
func (*Turingchain) Lock ¶
func (c *Turingchain) Lock(in types.ReqNil, result *interface{}) error
Lock wallet lock
func (*Turingchain) MergeBalance ¶
func (c *Turingchain) MergeBalance(in types.ReqWalletMergeBalance, result *interface{}) error
MergeBalance merge balance
func (*Turingchain) NetProtocols ¶
func (c *Turingchain) NetProtocols(in types.ReqNil, result *interface{}) error
NetProtocols get net information
func (*Turingchain) NewAccount ¶
func (c *Turingchain) NewAccount(in types.ReqNewAccount, result *interface{}) error
NewAccount new a account
func (*Turingchain) Query ¶
func (c *Turingchain) Query(in rpctypes.Query4Jrpc, result *interface{}) error
Query query
func (*Turingchain) QueryChain ¶
func (c *Turingchain) QueryChain(in rpctypes.ChainExecutor, result *interface{}) error
QueryChain querychain by chain executor
func (*Turingchain) QueryTotalFee ¶
func (c *Turingchain) QueryTotalFee(in *types.LocalDBGet, result *interface{}) error
QueryTotalFee query total fee
func (*Turingchain) QueryTransaction ¶
func (c *Turingchain) QueryTransaction(in rpctypes.QueryParm, result *interface{}) error
QueryTransaction query transaction
func (*Turingchain) ReWriteRawTx ¶
func (c *Turingchain) ReWriteRawTx(in *rpctypes.ReWriteRawTx, result *interface{}) error
ReWriteRawTx re-write raw tx by jrpc
func (*Turingchain) SaveSeed ¶
func (c *Turingchain) SaveSeed(in types.SaveSeedByPw, result *interface{}) error
SaveSeed save seed
func (*Turingchain) SendToAddress ¶
func (c *Turingchain) SendToAddress(in types.ReqWalletSendToAddress, result *interface{}) error
SendToAddress send to address of coins
func (*Turingchain) SendTransaction ¶
func (c *Turingchain) SendTransaction(in rpctypes.RawParm, result *interface{}) error
SendTransaction send transaction
func (*Turingchain) SendTransactionSync ¶
func (c *Turingchain) SendTransactionSync(in rpctypes.RawParm, result *interface{}) error
SendTransactionSync send transaction and wait reply
func (*Turingchain) SetLabl ¶
func (c *Turingchain) SetLabl(in types.ReqWalletSetLabel, result *interface{}) error
SetLabl set lable
func (*Turingchain) SetPasswd ¶
func (c *Turingchain) SetPasswd(in types.ReqWalletSetPasswd, result *interface{}) error
SetPasswd set password
func (*Turingchain) SetTxFee ¶
func (c *Turingchain) SetTxFee(in types.ReqWalletSetFee, result *interface{}) error
SetTxFee set tx fee
func (*Turingchain) SignRawTx ¶
func (c *Turingchain) SignRawTx(in *types.ReqSignRawTx, result *interface{}) error
SignRawTx signature the rawtransaction
func (*Turingchain) UnLock ¶
func (c *Turingchain) UnLock(in types.WalletUnLock, result *interface{}) error
UnLock wallet unlock
func (*Turingchain) Version ¶
func (c *Turingchain) Version(in *types.ReqNil, result *interface{}) error
Version get software version
func (*Turingchain) WalletTxList ¶
func (c *Turingchain) WalletTxList(in rpctypes.ReqWalletTransactionList, result *interface{}) error
WalletTxList transaction list of wallet
Directories ¶
Path | Synopsis |
---|---|
Package jsonclient 实现JSON rpc客户端请求功能
|
Package jsonclient 实现JSON rpc客户端请求功能 |
Package types rpc相关的一些结构体定义以及转化函数
|
Package types rpc相关的一些结构体定义以及转化函数 |