eproxy

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHashIsRequired          = errors.New("hash is required")
	ErrAssetIdentifierRequired = errors.New("asset identifier is required")
	ErrAddressRequired         = errors.New("address is required")
)

Functions

func ConvertBlockchain

func ConvertBlockchain(bc wconstants.BlockchainType) commonv2.Blockchain

ConvertBlockchain converts wconstants.BlockchainType to commonv1.Blockchain

Types

type FindTransactionsParams

type FindTransactionsParams struct {
	BlockHeight *uint64
	Hash        *string
}

type Service

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

func New

func (*Service) AddressBalance

func (s *Service) AddressBalance(ctx context.Context, address, assetIdentifier string, blockchain wconstants.BlockchainType) (decimal.Decimal, error)

AddressBalance returns the balance of the address for the asset on the blockchain

func (*Service) AddressBalances

func (s *Service) AddressBalances(ctx context.Context, address string, blockchain wconstants.BlockchainType) ([]*models.Asset, error)

AddressBalances returns the balances of the address on the blockchain

func (*Service) AddressesClient

func (s *Service) AddressesClient() addressesv2connect.AddressesServiceClient

AddressesClient returns the addresses client

func (*Service) AssetDecimals

func (s *Service) AssetDecimals(ctx context.Context, blockchain wconstants.BlockchainType, assetIdentifier string) (int64, error)

AssetDecimals returns the number of decimals for the asset on the blockchain

func (*Service) AssetsClient

func (s *Service) AssetsClient() assetsv2connect.AssetsServiceClient

AssetsClient returns the assets client

func (*Service) BTCLikeClient

func (s *Service) BTCLikeClient() btclikev2connect.BtcLikeServiceClient

BTCLikeClient returns the bitcoin client

func (*Service) BlocksClient

func (s *Service) BlocksClient() blocksv2connect.BlocksServiceClient

BlocksClient returns the blocks client

func (*Service) FindTransactions

func (s *Service) FindTransactions(ctx context.Context, blockchain wconstants.BlockchainType, request FindTransactionsParams) ([]*trxv2.Transaction, error)

FindTransactions returns transactions by request on the blockchain

func (*Service) GetTransactionInfo

func (s *Service) GetTransactionInfo(ctx context.Context, blockchain wconstants.BlockchainType, hash string) (*trxv2.Transaction, error)

GetTransactionInfo returns transaction info by hash on the blockchain

func (*Service) GetUTXO

func (s *Service) GetUTXO(ctx context.Context, blockchain wconstants.BlockchainType, address string) ([]*btclikev2.UTXOResponse_Item, error)

GetUTXO returns the UTXO data for the given address.

func (*Service) LastBlockNumber

func (s *Service) LastBlockNumber(ctx context.Context, blockchain wconstants.BlockchainType) (uint64, error)

LastBlockNumber returns the last block number of the blockchain

func (*Service) TransactionsClient

TransactionsClient returns the transactions client

func (*Service) TronClient

func (s *Service) TronClient() tronv1connect.TronServiceClient

TronClient returns the tron client

Jump to

Keyboard shortcuts

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