btc

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBtc

func NewBtc(cluster []*config.NodeCluster, blockchain int64, xlog *xlog.XLog) blockchain.API

Types

type Btc

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

func (*Btc) Balance

func (e *Btc) Balance(chainCode int64, address string, tag string) (string, error)

func (*Btc) BalanceCluster

func (e *Btc) BalanceCluster(trace bool) *config.NodeCluster

func (*Btc) GetAddressType

func (e *Btc) GetAddressType(chainCode int64, address string) (string, error)

func (*Btc) GetBlockByHash

func (e *Btc) GetBlockByHash(chainCode int64, hash string, flag bool) (string, error)

func (*Btc) GetBlockByNumber

func (e *Btc) GetBlockByNumber(chainCode int64, number string, flag bool) (string, error)

func (*Btc) GetBlockReceiptByBlockHash

func (e *Btc) GetBlockReceiptByBlockHash(chainCode int64, hash string) (string, error)

func (*Btc) GetBlockReceiptByBlockNumber

func (e *Btc) GetBlockReceiptByBlockNumber(chainCode int64, number string) (string, error)

func (*Btc) GetCode

func (e *Btc) GetCode(chainCode int64, address string) (string, error)

func (*Btc) GetTransactionReceiptByHash

func (e *Btc) GetTransactionReceiptByHash(chainCode int64, hash string) (string, error)

func (*Btc) GetTxByHash

func (e *Btc) GetTxByHash(chainCode int64, hash string) (string, error)

func (*Btc) LatestBlock

func (e *Btc) LatestBlock(chainCode int64) (string, error)

func (*Btc) MonitorCluster

func (e *Btc) MonitorCluster() any

func (*Btc) Nonce

func (e *Btc) Nonce(chainCode int64, address string, tag string) (string, error)

func (*Btc) SendJsonRpc

func (e *Btc) SendJsonRpc(chainCode int64, req string) (string, error)

func (*Btc) SendRawTransaction

func (e *Btc) SendRawTransaction(chainCode int64, signedTx string) (string, error)

func (*Btc) SendReq

func (e *Btc) SendReq(blockChain int64, reqBody string, trace bool) (resp string, err error)

func (*Btc) SendReqByWs

func (e *Btc) SendReqByWs(blockChain int64, receiverCh chan string, sendCh chan string) (string, error)

func (*Btc) StartWDT

func (e *Btc) StartWDT()

func (*Btc) SubscribeLogs

func (e *Btc) SubscribeLogs(chainCode int64, address string, topics []string, receiverCh chan string, sendCh chan string) (string, error)

SubscribeLogs {"jsonrpc":"2.0","id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}]}

func (*Btc) SubscribePendingTx

func (e *Btc) SubscribePendingTx(chainCode int64, receiverCh chan string, sendCh chan string) (string, error)

func (*Btc) Token

func (e *Btc) Token(chainCode int64, contractAddr string, abi string, eip string) (string, error)

func (*Btc) TokenBalance

func (e *Btc) TokenBalance(chainCode int64, address string, contractAddr string, abi string) (string, error)

func (*Btc) UnSubscribe

func (e *Btc) UnSubscribe(chainCode int64, subId string) (string, error)

type UTXO

type UTXO struct {
	Address       string `json:"address" gorm:"column:address"`
	TxId          string `json:"txid" gorm:"column:txid"`
	Index         string `json:"index" gorm:"column:index"`
	BlockTime     string `json:"blockTime" gorm:"column:blockTime"`
	UnspentAmount string `json:"unspentAmount" gorm:"column:unspentAmount"`
	Height        string `json:"height" gorm:"column:height"`
}

func GetBalance

func GetBalance(uri, token string, address string) ([]*UTXO, error)

func GetBalanceEx

func GetBalanceEx(uris []string, address string) ([]*UTXO, error)

Jump to

Keyboard shortcuts

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