Documentation
¶
Index ¶
- Variables
- func ConvertBlockchain(bc wconstants.BlockchainType) commonv2.Blockchain
- type FindTransactionsParams
- type Service
- func (s *Service) AddressBalance(ctx context.Context, address, assetIdentifier string, ...) (decimal.Decimal, error)
- func (s *Service) AddressBalances(ctx context.Context, address string, blockchain wconstants.BlockchainType) ([]*models.Asset, error)
- func (s *Service) AddressesClient() addressesv2connect.AddressesServiceClient
- func (s *Service) AssetDecimals(ctx context.Context, blockchain wconstants.BlockchainType, ...) (int64, error)
- func (s *Service) AssetsClient() assetsv2connect.AssetsServiceClient
- func (s *Service) BTCLikeClient() btclikev2connect.BtcLikeServiceClient
- func (s *Service) BlocksClient() blocksv2connect.BlocksServiceClient
- func (s *Service) FindTransactions(ctx context.Context, blockchain wconstants.BlockchainType, ...) ([]*trxv2.Transaction, error)
- func (s *Service) GetTransactionInfo(ctx context.Context, blockchain wconstants.BlockchainType, hash string) (*trxv2.Transaction, error)
- func (s *Service) GetUTXO(ctx context.Context, blockchain wconstants.BlockchainType, address string) ([]*btclikev2.UTXOResponse_Item, error)
- func (s *Service) LastBlockNumber(ctx context.Context, blockchain wconstants.BlockchainType) (uint64, error)
- func (s *Service) TransactionsClient() transactionsv2connect.TransactionsServiceClient
- func (s *Service) TronClient() tronv1connect.TronServiceClient
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ConvertBlockchain ¶
func ConvertBlockchain(bc wconstants.BlockchainType) commonv2.Blockchain
ConvertBlockchain converts wconstants.BlockchainType to commonv1.Blockchain
Types ¶
type FindTransactionsParams ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
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 ¶
func (s *Service) TransactionsClient() transactionsv2connect.TransactionsServiceClient
TransactionsClient returns the transactions client
func (*Service) TronClient ¶
func (s *Service) TronClient() tronv1connect.TronServiceClient
TronClient returns the tron client