Documentation
¶
Index ¶
- type Client
- func (c *Client) CreatePSBT(ctx context.Context, inputParams *types.TxInputParams) (*psbt.BuildResult, error)
- func (c *Client) DecodeRawTx(ctx context.Context, rawtx []byte) (*types.Tx, error)
- func (c *Client) EstimateFeeRate(ctx context.Context, targetBlocks int) (float64, float64, error)
- func (c *Client) GetAddressBalanceBTC(ctx context.Context, addr string) (confirmed float64, mempool float64, err error)
- func (c *Client) GetAddressBalanceSats(ctx context.Context, addr string) (confirmed int64, mempool int64, err error)
- func (c *Client) GetAddressInfo(ctx context.Context, pkScript []byte) (*types.AddressInfo, error)
- func (c *Client) GetAddressScriptInfo(ctx context.Context, addr string) (*types.AddressScriptInfo, error)
- func (c *Client) GetAddressUTXOs(ctx context.Context, addr string) ([]types.TxUTXO, error)
- func (c *Client) GetTx(ctx context.Context, txid string) (*types.Tx, error)
- func (c *Client) GetTxRaw(ctx context.Context, txid string) ([]byte, error)
- func (c *Client) ImportAddressAndPublickey(ctx context.Context, address string, publickey string) error
- func (c *Client) SendBTCByPSBT(ctx context.Context, psbt string) (string, error)
- type TestClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreatePSBT ¶
func (c *Client) CreatePSBT(ctx context.Context, inputParams *types.TxInputParams) (*psbt.BuildResult, error)
创建PSBT预览交易数据(钱包未签名状态)
func (*Client) DecodeRawTx ¶
解析一笔交易元数据 => 适用于外部直接输入交易元数据解析结构
func (*Client) EstimateFeeRate ¶
EstimateFeeRate 估计手续费.
func (*Client) GetAddressBalanceBTC ¶
func (*Client) GetAddressBalanceSats ¶
func (c *Client) GetAddressBalanceSats(ctx context.Context, addr string) (confirmed int64, mempool int64, err error)
GetAddressBalance 返回地址的确认余额和未确认余额.
func (*Client) GetAddressInfo ¶
func (*Client) GetAddressScriptInfo ¶
func (c *Client) GetAddressScriptInfo(ctx context.Context, addr string) (*types.AddressScriptInfo, error)
GetAddressScriptInfo 返回地址的锁定脚本信息.
func (*Client) GetAddressUTXOs ¶
GetAddressUTXOs 返回地址拥有的UTXO.
type TestClient ¶
type TestClient struct {
// contains filtered or unexported fields
}
func NewTestClient ¶
func NewTestClient(client *Client) *TestClient
func (*TestClient) GetNetworkInfo ¶
func (c *TestClient) GetNetworkInfo(ctx context.Context) (bitcoindrpc.NetworkInfoDTO, error)
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
basic
command
Package main 基础使用示例
|
Package main 基础使用示例 |
|
bitcoind_fee
command
Package main Bitcoin Core费率估算示例
|
Package main Bitcoin Core费率估算示例 |
|
mempool_mix
command
Package main 混合后端使用示例
|
Package main 混合后端使用示例 |
|
txdump
command
|
|
|
internal
|
|
|
adapters/bitcoindrpc
Package bitcoindrpc 提供Bitcoin Core JSON-RPC客户端
|
Package bitcoindrpc 提供Bitcoin Core JSON-RPC客户端 |
|
adapters/mempoolapis
Package mempoolspace 提供mempool.space REST API客户端
|
Package mempoolspace 提供mempool.space REST API客户端 |
|
db
操作mysql
|
操作mysql |
|
decoders
提供一些通用的解析函数
|
提供一些通用的解析函数 |
|
psbt
Package psbt PSBT处理
|
Package psbt PSBT处理 |
|
types
示例代码备用参考: 锁定脚本/解锁脚本/自定义逻辑脚等
|
示例代码备用参考: 锁定脚本/解锁脚本/自定义逻辑脚等 |
Click to show internal directories.
Click to hide internal directories.