tx

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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 New

func New(bitcoindrpcClient *bitcoindrpc.Client, mempoolapisClient *mempoolapis.Client, addressClient *address.Client) *Client

func (*Client) GetRawTx

func (c *Client) GetRawTx(ctx context.Context, txid string) ([]byte, error)

查询交易元数据: 优先使用bitcoindrpc, 如果没有再使用mempoolapis

func (*Client) GetTx

func (c *Client) GetTx(ctx context.Context, txid string) (*types.Tx, error)

按照types.Tx格式返回交易数据

func (*Client) SendBTCByPSBT

func (c *Client) SendBTCByPSBT(ctx context.Context, psbt string) (string, error)

接收OKX签名后的交易数据并广播

func (*Client) SendBTCByPSBTPreview

func (c *Client) SendBTCByPSBTPreview(ctx context.Context, inputParams *types.TxInputParams) (*psbt.BuildResult, error)

转账交易-PSBT预览: 通过输入数据根据发起转账钱包地址的类型创建对应的PSBT交易数据, 这个数据将提交给外部okx插件钱包等进行签名.

Jump to

Keyboard shortcuts

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