assets

package
v0.29.1-beta Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TapdClient

TapdClient is a client for the Tap daemon.

func NewTapdClient

func NewTapdClient(config *TapdConfig) (*TapdClient, error)

NewTapdClient returns a new taproot assets client.

func (*TapdClient) Close

func (c *TapdClient) Close()

Close closes the client connection to the server.

func (*TapdClient) GetAssetName

func (c *TapdClient) GetAssetName(ctx context.Context,
	assetId []byte) (string, error)

GetAssetName returns the human-readable name of the asset.

func (*TapdClient) GetRfqForAsset

func (c *TapdClient) GetRfqForAsset(ctx context.Context,
	satAmount btcutil.Amount, assetId, peerPubkey []byte,
	expiry int64, feeLimitMultiplier float64) (
	*rfqrpc.PeerAcceptedSellQuote, error)

GetRfqForAsset returns a RFQ for the given asset with the given amount and to the given peer.

type TapdConfig

type TapdConfig struct {
	Activate     bool          `long:"activate" description:"Activate the Tap daemon"`
	Host         string        `long:"host" description:"The host of the Tap daemon, in the format of host:port"`
	MacaroonPath string        `long:"macaroonpath" description:"Path to the admin macaroon"`
	TLSPath      string        `long:"tlspath" description:"Path to the TLS certificate"`
	RFQtimeout   time.Duration `long:"rfqtimeout" description:"The timeout we wait for tapd peer to accept RFQ"`
}

TapdConfig is a struct that holds the configuration options to connect to a taproot assets daemon.

func DefaultTapdConfig

func DefaultTapdConfig() *TapdConfig

DefaultTapdConfig returns a default configuration to connect to a taproot assets daemon.

Jump to

Keyboard shortcuts

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