Versions in this module Expand all Collapse all v0 v0.2.2 May 2, 2020 v0.2.1 Nov 19, 2019 Changes in this version + var ErrBatchPackNotEnabled = errors.New("batch pack not enabled") + var ErrNodeStopped = errors.New("node not started") + func ReadTransaction(bc *chain.BlockChain, hash common.Hash) (*types.Transaction, common.Hash) + type AdminAPI struct + func NewAdminAPI(server *p2p.Server, ftl fractal) *AdminAPI + func (api *AdminAPI) AddBlack(url string) (bool, error) + func (api *AdminAPI) AddPeer(url string) (bool, error) + func (api *AdminAPI) AddTrustedPeer(url string) (bool, error) + func (api *AdminAPI) GenerateMiningKey(address common.Address) keys.MiningPubkey + func (api *AdminAPI) IsPacking() bool + func (api *AdminAPI) Mining() bool + func (api *AdminAPI) RemoveBlack(url string) (bool, error) + func (api *AdminAPI) RemovePeer(url string) (bool, error) + func (api *AdminAPI) RemoveTrustedPeer(url string) (bool, error) + func (api *AdminAPI) StartMining() error + func (api *AdminAPI) StartPacking(packerIndex uint32) + func (api *AdminAPI) StopMining() + func (api *AdminAPI) StopPacking() + type BlockChainAPI struct + func NewBlockChainAPI(ftl fractal) *BlockChainAPI + func (s *BlockChainAPI) BlockHeight() hexutil.Uint64 + func (s *BlockChainAPI) Genesis() *types.Block + func (s *BlockChainAPI) GetAncestorBlocks(fullHash common.Hash, num uint32) types.Blocks + func (s *BlockChainAPI) GetBackwardBlocks(fullHash common.Hash, num uint32) types.Blocks + func (s *BlockChainAPI) GetBalance(ctx context.Context, address common.Address, blockHashStr string) (*hexutil.Big, error) + func (s *BlockChainAPI) GetBlock(hash common.Hash) *types.Block + func (s *BlockChainAPI) GetBlockByHeight(height hexutil.Uint64) *types.Block + func (s *BlockChainAPI) GetCode(ctx context.Context, address common.Address, blockHashStr string) (hexutil.Bytes, error) + func (s *BlockChainAPI) GetContractOwner(ctx context.Context, contractAddress common.Address) (common.Address, error) + func (s *BlockChainAPI) GetDescendantBlocks(fullHash common.Hash, num uint32) types.Blocks + func (s *BlockChainAPI) GetNearbyBlocks(fullHash common.Hash, num uint32) types.Blocks + func (s *BlockChainAPI) GetStorageAt(ctx context.Context, address common.Address, table string, key hexutil.Bytes, ...) (hexutil.Bytes, error) + func (s *BlockChainAPI) GetTransferBlackList(ctx context.Context, blockHashStr string) (string, error) + func (s *BlockChainAPI) GetTransferWhiteList(ctx context.Context, blockHashStr string) (string, error) + func (s *BlockChainAPI) HeadBlock() *types.Block + func (s *BlockChainAPI) SubNewBlock(ctx context.Context) (*rpcserver.Subscription, error) + type CallResult struct + GasUsed hexutil.Uint64 + Logs []*types.Log + type FilterAPI struct + func NewFilterAPI(ftl fractal) *FilterAPI + type FilterCriteria struct + Addresses []common.Address + BlockHash *common.Hash + FromBlockHeight *big.Int + ToBlockHeight *big.Int + Topics [][]common.Hash + type FractalAPI struct + func NewFractalAPI(ftl fractal) *FractalAPI + func (s *FractalAPI) ChainId() hexutil.Uint64 + func (s *FractalAPI) Coinbase() common.Address + func (s *FractalAPI) ProtocolVersion() hexutil.Uint + type NetAPI struct + func NewNetAPI(server *p2p.Server, networkVersion uint64) *NetAPI + func (s *NetAPI) Listening() bool + func (s *NetAPI) NodeInfo() (*p2p.NodeInfo, error) + func (s *NetAPI) PeerCount() (hexutil.Uint, error) + func (s *NetAPI) PeerEvents(ctx context.Context) (*rpcserver.Subscription, error) + func (s *NetAPI) Peers() ([]*p2p.PeerInfo, error) + func (s *NetAPI) Version() string + type PackerAPI struct + func NewPackerAPI(chain *chain.BlockChain, packer packer.Packer) *PackerAPI + func (s *PackerAPI) GetTxPackageByHash(hash common.Hash) *types.TxPackage + func (s *PackerAPI) SendRawTransaction(ctx context.Context, encodedTx hexutil.Bytes) (common.Hash, error) + func (s *PackerAPI) SendRawTransactions(ctx context.Context, encodedTxs hexutil.Bytes) ([]string, error) + type RPCTransaction struct + BlockHash common.Hash + Broadcast bool + From common.Address + GasLimit hexutil.Uint64 + Hash common.Hash + Nonce hexutil.Uint64 + Payload hexutil.Bytes + Price *hexutil.Big + R *hexutil.Big + Receipt *types.Receipt + S *hexutil.Big + To *common.Address + V *hexutil.Big + Value *hexutil.Big + type SendTxArgs struct + Data *hexutil.Bytes + From common.Address + Gas *hexutil.Uint64 + GasPrice *hexutil.Big + Nonce *hexutil.Uint64 + To *common.Address + Value *hexutil.Big + type StatusResult struct + FastSyncMode string + FastSyncStatus string + Status string + type SynchronizerAPI struct + func NewSynchronizerAPI(ftl fractal) *SynchronizerAPI + func (s *SynchronizerAPI) Status() StatusResult + type SynchronizerTestAPI struct + func NewSynchronizerTestAPI(ftl fractal) *SynchronizerTestAPI + func (s *SynchronizerTestAPI) ChangeLongTimeOutOfFixPointFinish(time int) string + func (s *SynchronizerTestAPI) ChangeLongTimeOutOfFixPointPreBlock(time int) string + func (s *SynchronizerTestAPI) ChangeLongTimeOutOfFullfillLongList(time int) string + func (s *SynchronizerTestAPI) ChangeLongTimeOutOfIntevalList(time int) string + func (s *SynchronizerTestAPI) ChangeLongTimeOutOfLongList(time int) string + func (s *SynchronizerTestAPI) ChangeShortTimeOutOfShortLists(time int) string + func (s *SynchronizerTestAPI) ChangeShortTimeOutOfSyncVeryHigh(time int) string + type TxPoolAPI struct + func NewTxPoolAPI(ftl fractal, config *config.Config) *TxPoolAPI + func (s *TxPoolAPI) Call(args SendTxArgs) (CallResult, error) + func (s *TxPoolAPI) Content() map[string]map[string]map[string]*RPCTransaction + func (s *TxPoolAPI) EncodeAction(abi hexutil.Bytes, action string, args string) hexutil.Bytes + func (s *TxPoolAPI) GasPrice() *hexutil.Big + func (s *TxPoolAPI) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) *hexutil.Uint + func (s *TxPoolAPI) GetTransactionByHash(ctx context.Context, hash common.Hash) *RPCTransaction + func (s *TxPoolAPI) GetTransactionNonce(ctx context.Context, address common.Address) *hexutil.Uint64 + func (s *TxPoolAPI) Inspect() map[string]map[string]map[string]string + func (s *TxPoolAPI) PendingTransactions() types.Transactions + func (s *TxPoolAPI) SendRawTransaction(ctx context.Context, encodedTx hexutil.Bytes) (common.Hash, error) + func (s *TxPoolAPI) SendRawTransactionPeriodically(ctx context.Context, encodedTx hexutil.Bytes) (common.Hash, error) + func (s *TxPoolAPI) Status() map[string]hexutil.Uint