Documentation
¶
Index ¶
- Constants
- type SubscribeReceiveAssetEventWrapper
- type SubscribeSendAssetEventWrapper
- type TAPDOptions
- type TAPDWrapper
- func (wrapper *TAPDWrapper) GetAssetStats(ctx context.Context, req *universerpc.AssetStatsQuery, ...) (*universerpc.UniverseAssetStats, error)
- func (wrapper *TAPDWrapper) GetDecodedAddress(ctx context.Context, req *taprpc.DecodeAddrRequest, options ...grpc.CallOption) (*taprpc.Addr, error)
- func (wrapper *TAPDWrapper) GetInfo(ctx context.Context, req *taprpc.GetInfoRequest, options ...grpc.CallOption) (*taprpc.GetInfoResponse, error)
- func (wrapper *TAPDWrapper) GetUniverseAssets(ctx context.Context, req *universerpc.AssetRootRequest, ...) (*universerpc.AssetRootResponse, error)
- func (wrapper *TAPDWrapper) ListAssets(ctx context.Context, req *taprpc.ListAssetRequest, options ...grpc.CallOption) (*taprpc.ListAssetResponse, error)
- func (wrapper *TAPDWrapper) ListBalances(ctx context.Context, req *taprpc.ListBalancesRequest, ...) (*taprpc.ListBalancesResponse, error)
- func (wrapper *TAPDWrapper) NewAddress(ctx context.Context, req *taprpc.NewAddrRequest, options ...grpc.CallOption) (*taprpc.Addr, error)
- func (wrapper *TAPDWrapper) SendAsset(ctx context.Context, req *taprpc.SendAssetRequest, options ...grpc.CallOption) (*taprpc.SendAssetResponse, error)
- func (wrapper *TAPDWrapper) SubscribeReceiveAssetEvent(ctx context.Context, req *tapdevrpc.SubscribeReceiveAssetEventNtfnsRequest, ...) (SubscribeReceiveAssetEventWrapper, error)
- func (wrapper *TAPDWrapper) SubscribeSendAssetEvent(ctx context.Context, req *tapdevrpc.SubscribeSendAssetEventNtfnsRequest, ...) (SubscribeSendAssetEventWrapper, error)
- type TapdClientWrapper
- type TapdConfig
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) SubscribeReceiveAssetEvent ¶
func (wrapper *TAPDWrapper) SubscribeReceiveAssetEvent(ctx context.Context, req *tapdevrpc.SubscribeReceiveAssetEventNtfnsRequest, options ...grpc.CallOption) (SubscribeReceiveAssetEventWrapper, error)
func (*TAPDWrapper) SubscribeSendAssetEvent ¶
func (wrapper *TAPDWrapper) SubscribeSendAssetEvent(ctx context.Context, req *tapdevrpc.SubscribeSendAssetEventNtfnsRequest, options ...grpc.CallOption) (SubscribeSendAssetEventWrapper, error)
type TapdClientWrapper ¶
type TapdClientWrapper interface {
GetInfo(ctx context.Context, req *taprpc.GetInfoRequest, options ...grpc.CallOption) (*taprpc.GetInfoResponse, error)
ListAssets(ctx context.Context, req *taprpc.ListAssetRequest, options ...grpc.CallOption) (*taprpc.ListAssetResponse, error)
ListBalances(ctx context.Context, req *taprpc.ListBalancesRequest, options ...grpc.CallOption) (*taprpc.ListBalancesResponse, error)
NewAddress(ctx context.Context, req *taprpc.NewAddrRequest, options ...grpc.CallOption) (*taprpc.Addr, error)
GetUniverseAssets(ctx context.Context, req *universerpc.AssetRootRequest, options ...grpc.CallOption) (*universerpc.AssetRootResponse, error)
GetAssetStats(ctx context.Context, req *universerpc.AssetStatsQuery, options ...grpc.CallOption) (*universerpc.UniverseAssetStats, error)
GetDecodedAddress(ctx context.Context, req *taprpc.DecodeAddrRequest, options ...grpc.CallOption) (*taprpc.Addr, error)
SendAsset(ctx context.Context, req *taprpc.SendAssetRequest, options ...grpc.CallOption) (*taprpc.SendAssetResponse, error)
SubscribeReceiveAssetEvent(ctx context.Context, req *tapdevrpc.SubscribeReceiveAssetEventNtfnsRequest, options ...grpc.CallOption) (SubscribeReceiveAssetEventWrapper, error)
SubscribeSendAssetEvent(ctx context.Context, req *tapdevrpc.SubscribeSendAssetEventNtfnsRequest, options ...grpc.CallOption) (SubscribeSendAssetEventWrapper, error)
}
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)
Click to show internal directories.
Click to hide internal directories.