tapd

package
v0.0.0-...-73df3ec Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TAPD_CLIENT_TYPE = "tapd"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SubscribeReceiveAssetEventWrapper

type SubscribeReceiveAssetEventWrapper interface {
	Recv() (*tapdevrpc.ReceiveAssetEvent, error)
}

type SubscribeSendAssetEventWrapper

type SubscribeSendAssetEventWrapper interface {
	Recv() (*tapdevrpc.SendAssetEvent, error)
}

type TAPDOptions

type TAPDOptions struct {
	Address      string
	CertFile     string
	CertHex      string
	MacaroonFile string
	MacaroonHex  string
}

Several items to address * should there be some abstract struct (?)/interface that creates a logical tie between tapd and lnd? * should there be some struct that simply carries both, if there is enough calls that require both

type TAPDWrapper

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

func NewTAPDClient

func NewTAPDClient(tapdOptions TAPDOptions, ctx context.Context) (*TAPDWrapper, error)

func (*TAPDWrapper) GetAssetStats

func (wrapper *TAPDWrapper) GetAssetStats(ctx context.Context, req *universerpc.AssetStatsQuery, options ...grpc.CallOption) (*universerpc.UniverseAssetStats, error)

func (*TAPDWrapper) GetDecodedAddress

func (wrapper *TAPDWrapper) GetDecodedAddress(ctx context.Context, req *taprpc.DecodeAddrRequest, options ...grpc.CallOption) (*taprpc.Addr, error)

func (*TAPDWrapper) GetInfo

func (wrapper *TAPDWrapper) GetInfo(ctx context.Context, req *taprpc.GetInfoRequest, options ...grpc.CallOption) (*taprpc.GetInfoResponse, error)

func (*TAPDWrapper) GetUniverseAssets

func (wrapper *TAPDWrapper) GetUniverseAssets(ctx context.Context, req *universerpc.AssetRootRequest, options ...grpc.CallOption) (*universerpc.AssetRootResponse, error)

func (*TAPDWrapper) ListAssets

func (wrapper *TAPDWrapper) ListAssets(ctx context.Context, req *taprpc.ListAssetRequest, options ...grpc.CallOption) (*taprpc.ListAssetResponse, error)

func (*TAPDWrapper) ListBalances

func (wrapper *TAPDWrapper) ListBalances(ctx context.Context, req *taprpc.ListBalancesRequest, options ...grpc.CallOption) (*taprpc.ListBalancesResponse, error)

func (*TAPDWrapper) NewAddress

func (wrapper *TAPDWrapper) NewAddress(ctx context.Context, req *taprpc.NewAddrRequest, options ...grpc.CallOption) (*taprpc.Addr, error)

func (*TAPDWrapper) SendAsset

func (wrapper *TAPDWrapper) SendAsset(ctx context.Context, req *taprpc.SendAssetRequest, options ...grpc.CallOption) (*taprpc.SendAssetResponse, error)

func (*TAPDWrapper) SubscribeSendAssetEvent

type TapdClientWrapper

func InitTAPDClient

func InitTAPDClient(c *TapdConfig, logger *lecho.Logger, ctx context.Context) (TapdClientWrapper, error)

type TapdConfig

type TapdConfig struct {
	TAPDClientType   string `envconfig:"TAPD_CLIENT_TYPE" default:"tapd"`
	TAPDAddress      string `envconfig:"TAPD_ADDRESS" required:"true"`
	TAPDMacaroonFile string `envconfig:"TAPD_MACAROON_FILE"`
	TAPDCertFile     string `envconfig:"TAPD_CERT_FILE"`
	TAPDMacaroonHex  string `envconfig:"TAPD_MACAROON_HEX"`
	TAPDCertHex      string `envconfig:"TAPD_CERT_HEX"`
}

/ TODO do we need to import anything from lnd.config ?

func LoadConfig

func LoadConfig() (c *TapdConfig, err error)

Jump to

Keyboard shortcuts

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