rpc

package
v1.68.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: BSD-3-Clause Imports: 39 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCfg

func InitCfg(rcfg *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

Types

type Chain33

type Chain33 struct {
	// contains filtered or unexported fields
}

Chain33 a channel client

func (*Chain33) AddBlacklist added in v1.65.3

func (c *Chain33) AddBlacklist(in *types.BlackPeer, result *interface{}) error

AddBlacklist add peer to blacklist ,time deadline:10 years

func (*Chain33) AddPushSubscribe added in v1.65.0

func (c *Chain33) AddPushSubscribe(in *types.PushSubscribeReq, result *interface{}) error

AddPushSubscribe add Seq CallBack

func (*Chain33) ClosePeer added in v1.65.3

func (c *Chain33) ClosePeer(in *types.SetPeer, result *interface{}) error

ClosePeer close the specified peer

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) DelBlacklist added in v1.65.3

func (c *Chain33) DelBlacklist(in *types.BlackPeer, result *interface{}) error

DelBlacklist delete peer from blacklist

func (*Chain33) DialPeer added in v1.65.3

func (c *Chain33) DialPeer(in *types.SetPeer, result *interface{}) error

DialPeer dial the specified peer

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

DumpPrivkeysFile dumps private key to file.

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) GetAccount added in v1.65.0

func (c *Chain33) GetAccount(in *types.ReqGetAccount, result *interface{}) error

GetAccount getAddress by lable

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) GetAddressDrivers added in v1.67.1

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

GetAddressDrivers 获取系统已注册地址插件

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) GetBlockBySeq added in v1.65.1

func (c *Chain33) GetBlockBySeq(in *types.Int64, result *interface{}) error

GetBlockBySeq get block by seq

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) GetChainConfig added in v1.65.3

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

GetChainConfig 获取chain config 参数

func (*Chain33) GetChainID added in v1.65.3

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

GetChainID 获取chain ID

func (*Chain33) GetCoinSymbol

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

GetCoinSymbol get coin symbol

func (*Chain33) GetCryptoList added in v1.65.3

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

GetCryptoList 获取加密列表

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) GetParaTxByHeight added in v1.65.1

func (c *Chain33) GetParaTxByHeight(req *types.ReqParaTxByHeight, result *interface{}) error

GetParaTxByHeight get paraTx by block height

func (*Chain33) GetParaTxByTitle added in v1.65.1

func (c *Chain33) GetParaTxByTitle(req *types.ReqParaTxByTitle, result *interface{}) error

GetParaTxByTitle get paraTx by title

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) GetPushSeqLastNum added in v1.65.0

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

GetPushSeqLastNum Get Seq Call Back Last Num

func (*Chain33) GetSeed

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

GetSeed get seed

func (*Chain33) GetSequenceByHash added in v1.65.1

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

GetSequenceByHash get sequcen by hashes

func (*Chain33) GetServerTime added in v1.65.1

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

GetServerTime get server time

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) GetWalletRecoverAddress added in v1.65.3

func (c *Chain33) GetWalletRecoverAddress(req *types.ReqGetWalletRecoverAddr, result *interface{}) error

GetWalletRecoverAddress get wallet recover chain33 addr

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

ImportPrivkeysFile imports private key from file.

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) ListPushes added in v1.65.0

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

ListPushes List Seq CallBack

func (*Chain33) LoadParaTxByTitle added in v1.65.1

func (c *Chain33) LoadParaTxByTitle(req *types.ReqHeightByTitle, result *interface{}) error

LoadParaTxByTitle load paratx by title

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) NetProtocols added in v1.65.0

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

NetProtocols get net information

func (*Chain33) NewAccount

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

NewAccount new a account

func (*Chain33) NewRandAccount added in v1.65.3

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

NewRandAccount rand new a account

func (*Chain33) PubKeyToAddr added in v1.65.3

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

PubKeyToAddr pubkey to addr

func (*Chain33) Query

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

Query query

func (*Chain33) QueryChain added in v1.65.1

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

QueryChain querychain by chain executor

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) SendDelayTransaction added in v1.65.3

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

SendDelayTransaction send delay tx

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) SendTransactionSync added in v1.65.1

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

SendTransactionSync send transaction and wait reply

func (*Chain33) SendTransactions added in v1.65.3

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

SendTransactions send tx batch

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) ShowBlacklist added in v1.65.3

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

ShowBlacklist show all peers from blacklist

func (*Chain33) SignRawTx

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

SignRawTx signature the rawtransaction

func (*Chain33) SignWalletRecoverTx added in v1.65.3

func (c *Chain33) SignWalletRecoverTx(req *types.ReqSignWalletRecoverTx, result *interface{}) error

SignWalletRecoverTx sign wallet recover transaction

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) AddPushSubscribe added in v1.66.1

func (g *Grpc) AddPushSubscribe(ctx context.Context, in *pb.PushSubscribeReq) (*pb.ReplySubscribePush, error)

AddPushSubscribe ...

func (*Grpc) CloseQueue

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

CloseQueue close queue

func (*Grpc) ConvertExectoAddr added in v1.66.1

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

ConvertExectoAddr 根据执行器的名字创建地址

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)

DumpPrivkeysFile dumps private key to file.

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) GetAccount added in v1.65.0

func (g *Grpc) GetAccount(ctx context.Context, in *pb.ReqGetAccount) (*pb.WalletAccount, error)

GetAccount 通过地址标签获取账户地址以及账户余额信息

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) GetAddressDrivers added in v1.67.1

func (g *Grpc) GetAddressDrivers(ctx context.Context, in *pb.ReqNil) (*pb.AddressDrivers, error)

GetAddressDrivers 获取已注册地址插件

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) GetBlockSequences added in v1.66.1

func (g *Grpc) GetBlockSequences(ctx context.Context, in *pb.ReqBlocks) (*pb.BlockSequences, error)

GetBlockSequences ...

func (*Grpc) GetBlocks

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

GetBlocks get blocks by grpc

func (*Grpc) GetChainConfig added in v1.65.3

func (g *Grpc) GetChainConfig(ctx context.Context, in *pb.ReqNil) (*pb.ChainConfigInfo, error)

GetChainConfig 获取chain config 参数

func (*Grpc) GetCoinSymbol added in v1.66.1

func (g *Grpc) GetCoinSymbol(ctx context.Context, in *pb.ReqNil) (*pb.ReplyString, error)

GetCoinSymbol get coin symbol

func (*Grpc) GetCryptoList added in v1.65.3

func (g *Grpc) GetCryptoList(ctx context.Context, in *pb.ReqNil) (*pb.CryptoList, error)

GetCryptoList 获取加密算法列表

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) GetPushSeqLastNum added in v1.66.1

func (g *Grpc) GetPushSeqLastNum(ctx context.Context, in *pb.ReqString) (*pb.Int64, error)

GetPushSeqLastNum Get Seq Call Back Last Num

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) GetServerTime added in v1.65.1

func (g *Grpc) GetServerTime(ctx context.Context, in *pb.ReqNil) (*pb.ServerTime, error)

GetServerTime get server time

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) GetWalletRecoverAddress added in v1.65.3

func (g *Grpc) GetWalletRecoverAddress(ctx context.Context, in *pb.ReqGetWalletRecoverAddr) (*pb.ReplyString, error)

GetWalletRecoverAddress get recover addr

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)

ImportPrivkeysFile imports private key from file.

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) ListPushes added in v1.66.1

func (g *Grpc) ListPushes(ctx context.Context, in *pb.ReqNil) (*pb.PushSubscribes, error)

ListPushes 列举推送服务

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) ReWriteTx added in v1.66.1

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

ReWriteTx 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) SendDelayTransaction added in v1.65.3

func (g *Grpc) SendDelayTransaction(ctx context.Context, in *pb.DelayTx) (*pb.Reply, error)

SendDelayTransaction send delay tx

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) SendTransactionSync added in v1.65.1

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

SendTransactionSync send transaction by network and query

func (*Grpc) SendTransactions added in v1.65.3

func (g *Grpc) SendTransactions(ctx context.Context, in *pb.Transactions) (*pb.Replies, error)

SendTransactions 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) SignWalletRecoverTx added in v1.65.3

func (g *Grpc) SignWalletRecoverTx(ctx context.Context, in *pb.ReqSignWalletRecoverTx) (*pb.ReplySignRawTx, error)

SignWalletRecoverTx sign wallet recover tx

func (*Grpc) SubEvent added in v1.66.1

func (g *Grpc) SubEvent(in *pb.ReqSubscribe, resp pb.Chain33_SubEventServer) error

SubEvent 订阅消息推送服务

func (*Grpc) UnLock

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

UnLock wallet unlock

func (*Grpc) UnSubEvent added in v1.68.0

func (g *Grpc) UnSubEvent(ctx context.Context, in *pb.ReqString) (*pb.Reply, error)

UnSubEvent 取消订阅

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 PushType added in v1.66.1

type PushType int32

PushType ...

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, port3, port4 int)

Listen rpc listen,http port,grpc port,ethrpc port,ethrpc websocket port

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

Directories

Path Synopsis
Package client ...
Package client ...
eth
net
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