Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitcoin ¶
type Bitcoin struct {
// contains filtered or unexported fields
}
func NewBitcoin ¶
func (*Bitcoin) GetTxStatus ¶
type Rpc ¶
type Rpc interface {
GetTxStatus(ctx context.Context, txHash string) (TxOnChainStatus, error)
}
type Solana ¶
type Solana struct {
// contains filtered or unexported fields
}
func (*Solana) GetTxStatus ¶
type THORChain ¶ added in v0.1.16
type THORChain struct {
// contains filtered or unexported fields
}
func NewTHORChain ¶ added in v0.1.16
func (*THORChain) GetTxStatus ¶ added in v0.1.16
type Tron ¶ added in v0.1.17
type Tron struct {
// contains filtered or unexported fields
}
func (*Tron) GetTxStatus ¶ added in v0.1.17
type TronReceipt ¶ added in v0.1.17
type TronReceipt struct {
Result string `json:"result,omitempty"` // "SUCCESS" or empty for success, "REVERT" or others for failure
NetFee int64 `json:"net_fee,omitempty"`
NetUsage int64 `json:"net_usage,omitempty"`
EnergyUsage int64 `json:"energy_usage,omitempty"`
EnergyUsageTotal int64 `json:"energy_usage_total,omitempty"`
}
type TronRequest ¶ added in v0.1.17
type TronRequest struct {
Value string `json:"value"`
}
type TronTransactionInfoResponse ¶ added in v0.1.17
type TronTransactionInfoResponse struct {
ID string `json:"id"`
BlockNumber int64 `json:"blockNumber"`
BlockTimeStamp int64 `json:"blockTimeStamp"`
ContractResult []string `json:"contractResult"`
Receipt TronReceipt `json:"receipt"`
Result string `json:"result,omitempty"` // "FAILED" if failed
}
TronTransactionInfoResponse represents the response from gettransactioninfobyid
type TxOnChainStatus ¶
type TxOnChainStatus string
const ( TxOnChainPending TxOnChainStatus = "PENDING" TxOnChainSuccess TxOnChainStatus = "SUCCESS" TxOnChainFail TxOnChainStatus = "FAIL" )
type Utxo ¶ added in v0.1.16
type Utxo struct {
// contains filtered or unexported fields
}
Utxo is a generic UTXO chain RPC client that uses Blockchair API. It supports any UTXO chain that Blockchair provides (litecoin, dogecoin, bitcoin-cash, etc.)
func NewBitcoinCash ¶ added in v0.1.16
NewBitcoinCash creates a Bitcoin Cash RPC client using Blockchair
func NewDogecoin ¶ added in v0.1.16
NewDogecoin creates a Dogecoin RPC client using Blockchair
func NewLitecoin ¶ added in v0.1.16
NewLitecoin creates a Litecoin RPC client using Blockchair
func NewUtxo ¶ added in v0.1.16
NewUtxo creates a new UTXO RPC client for the specified chain. chainPath should be the Blockchair API path for the chain (e.g., "litecoin", "dogecoin", "bitcoin-cash")
func (*Utxo) GetTxStatus ¶ added in v0.1.16
GetTxStatus retrieves the on-chain status of a transaction by its hash. Returns TxOnChainPending if the transaction is not yet confirmed or not found, TxOnChainSuccess if the transaction is confirmed with at least one confirmation, or an error if the HTTP request or response parsing fails.
type XRPRequest ¶
type XRPTransactionMeta ¶
type XRPTransactionMeta struct {
TransactionResult string `json:"TransactionResult"`
}
type XRPTransactionParams ¶
type XRPTransactionResponse ¶
type XRPTransactionResponse struct {
Result struct {
TransactionIndex int `json:"TransactionIndex"`
Meta XRPTransactionMeta `json:"meta"`
Transaction map[string]interface{} `json:"transaction"`
Validated bool `json:"validated"`
} `json:"result"`
Status string `json:"status"`
Type string `json:"type"`
Error interface{} `json:"error,omitempty"`
}
type Zcash ¶ added in v0.1.16
type Zcash struct {
// contains filtered or unexported fields
}
func (*Zcash) GetTxStatus ¶ added in v0.1.16
GetTxStatus retrieves the on-chain status of a Zcash transaction by its hash. Returns TxOnChainPending if the transaction is not yet confirmed or not found, TxOnChainSuccess if the transaction is confirmed with at least one confirmation, or an error if the HTTP request or response parsing fails.