rpcclient

package
v0.0.0-...-a426c1c Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBatchBlockAheadOfProvider = errors.New("the BatchBlock's internal state is ahead of the provider")
)

Functions

This section is empty.

Types

type BatchBlock

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

func NewBatchBlock

func NewBatchBlock(rpcClient *WalletChainAccountClient, fromHeader *BlockHeader, confDepth *big.Int) *BatchBlock

func (*BatchBlock) LastTraversedHeader

func (f *BatchBlock) LastTraversedHeader() *BlockHeader

func (*BatchBlock) LatestHeader

func (f *BatchBlock) LatestHeader() *BlockHeader

func (*BatchBlock) NextHeaders

func (f *BatchBlock) NextHeaders(maxSize uint64) ([]BlockHeader, error)

type BlockHeader

type BlockHeader struct {
	Hash       common.Hash
	ParentHash common.Hash
	Number     *big.Int
	Timestamp  uint64
}

type WalletChainAccountClient

type WalletChainAccountClient struct {
	Ctx             context.Context
	ChainName       string
	AccountRpClient account.WalletAccountServiceClient
}

func (*WalletChainAccountClient) ExportAddressByPubKey

func (wac *WalletChainAccountClient) ExportAddressByPubKey(typeOrVersion, publicKey string) string

func (*WalletChainAccountClient) GetAccount

func (wac *WalletChainAccountClient) GetAccount(address string) (int, int, int)

func (*WalletChainAccountClient) GetAccountAccountNumber

func (wac *WalletChainAccountClient) GetAccountAccountNumber(address string) (int, error)

func (*WalletChainAccountClient) GetBlockHeader

func (wac *WalletChainAccountClient) GetBlockHeader(number *big.Int) (*BlockHeader, error)

func (*WalletChainAccountClient) GetBlockInfo

func (wac *WalletChainAccountClient) GetBlockInfo(blockNumber *big.Int) ([]*account.BlockInfoTransactionList, error)

func (*WalletChainAccountClient) GetTransactionByHash

func (wac *WalletChainAccountClient) GetTransactionByHash(hash string) (*account.TxMessage, error)

func (*WalletChainAccountClient) SendTx

func (wac *WalletChainAccountClient) SendTx(rawTx string) (string, error)

Directories

Path Synopsis
chain-account

Jump to

Keyboard shortcuts

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