blockchain

package
v0.0.0-...-c02a99c Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckContractValid

func CheckContractValid(url string, contractAddress string) bool

func GetContractInfo

func GetContractInfo(url string, address string) response.BIFContractGetInfoResponse

Types

type BIFBlockService

type BIFBlockService interface {
	// GetBlockNumber 查询最新的区块高度
	GetBlockNumber() response.BIFBlockGetNumberResponse
	// GetTransactions 查询指定区块高度下的所有交易
	GetTransactions(bifBlockGetTransactionsRequest request.BIFBlockGetTransactionsRequest) response.BIFBlockGetTransactionsResponse
	// GetBlockInfo 获取指定区块信息
	GetBlockInfo(bifBlockGetInfoRequest request.BIFBlockGetInfoRequest) response.BIFBlockGetInfoResponse
	// GetBlockLatestInfo 获取最新区块信息
	GetBlockLatestInfo() response.BIFBlockGetLatestInfoResponse
	// GetValidators 获取指定区块中所有验证节点数
	GetValidators(bifBlockGetValidatorsRequest request.BIFBlockGetValidatorsRequest) response.BIFBlockGetValidatorsResponse
	// GetLatestValidators 获取最新区块中所有验证节点数
	GetLatestValidators() response.BIFBlockGetLatestValidatorsResponse
}

BIFBlockService block interface

type BIFPrivateTransactionService

type BIFPrivateTransactionService interface {
	// Send 私有化交易合约内容
	Send(request.BIFPrivateTransactionSendRequest) response.BIFPrivateTransactionSendResponse
}

type BIFTransactionService

type BIFTransactionService interface {
	// GasSend 发送交易
	GasSend(r request.BIFTransactionGasSendRequest) response.BIFTransactionGasSendResponse
	// PrivateContractCreate 私有化交易-合约创建
	PrivateContractCreate(r request.BIFTransactionPrivateContractCreateRequest) response.BIFTransactionPrivateContractCreateResponse
	// PrivateContractCall 私有化交易-合约调用
	PrivateContractCall(r request.BIFTransactionPrivateContractCallRequest) response.BIFTransactionPrivateContractCallResponse
	// GetTransactionInfo 根据交易hash查询交易
	GetTransactionInfo(r request.BIFTransactionGetInfoRequest) response.BIFTransactionGetInfoResponse
	// EvaluateFee 交易的费用评估
	EvaluateFee(r request.BIFTransactionEvaluateFeeRequest) response.BIFTransactionEvaluateFeeResponse
	// BIFSubmit 交易提交
	BIFSubmit(r request.BIFTransactionSubmitRequest) response.BIFTransactionSubmitResponse
	// GetTxCacheSize 获取交易池中交易条数
	GetTxCacheSize() response.BIFTransactionGetTxCacheSizeResponse
	// GetTxCacheData 获取交易池交易数据
	GetTxCacheData(r request.BIFTransactionCacheRequest) response.BIFTransactionCacheResponse
	// BatchGasSend 批量转账
	BatchGasSend(r request.BIFBatchGasSendRequest) response.BIFTransactionGasSendResponse
}

BIFTransactionService ...

type BlockService

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

BlockService ...

func GetBlockInstance

func GetBlockInstance(url string) *BlockService

func (*BlockService) GetBlockLatestInfo

func (bs *BlockService) GetBlockLatestInfo() response.BIFBlockGetLatestInfoResponse

func (*BlockService) GetBlockNumber

func (bs *BlockService) GetBlockNumber() response.BIFBlockGetNumberResponse

func (*BlockService) GetLatestValidators

func (bs *BlockService) GetLatestValidators() response.BIFBlockGetLatestValidatorsResponse

func (*BlockService) GetTransactions

GetTransactions 获取指定块内的交易列表

type OperationService

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

OperationService ...

func GetOperationInstance

func GetOperationInstance(url string) *OperationService

func (*OperationService) GasSendOperation

func (*OperationService) GetOperations

func (os *OperationService) GetOperations(operation interface{}, transSourceAddress string) ([]*proto.Operation, response.BIFBaseResponse)

GetOperations ...

type PrivateTransactionService

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

PrivateTransactionService ...

func GetPrivateTransactionInstance

func GetPrivateTransactionInstance(url string) *PrivateTransactionService

type TransactionService

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

TransactionService ...

func GetTransactionInstance

func GetTransactionInstance(url string) *TransactionService

func (*TransactionService) BIFSerializable

BIFSerializable 交易序列化

func (*TransactionService) BIFSubmit

BIFSubmit 交易提交

func (*TransactionService) EvaluateFee

EvaluateFee 交易的费用评估

func (*TransactionService) GetBidByHash

func (*TransactionService) GetTxCacheSize

func (*TransactionService) ParseBlob

func (*TransactionService) RadioTransaction

RadioTransaction 广播交易

Jump to

Keyboard shortcuts

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