boltz

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MacaroonCredential

type MacaroonCredential struct {
	Admin string
}

MacaroonCredential implements the credentials.PerRPCCredentials interface.

func (*MacaroonCredential) GetRequestMetadata

func (t *MacaroonCredential) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)

GetRequestMetadata implements the PerRPCCredentials interface. This method is required in order to pass the wrapped macaroon into the gRPC context. With this, the macaroon will be available within the request handling scope of the ultimate gRPC server implementation.

func (*MacaroonCredential) RequireTransportSecurity

func (t *MacaroonCredential) RequireTransportSecurity() bool

RequireTransportSecurity implements the PerRPCCredentials interface.

type Node

type Node string
const (
	BTC Node = "btc"
	LTC Node = "ltc"
)

type NodeStatus

type NodeStatus struct {
	Status string
	IsUp   bool
}

type RpcClient

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

func NewRpcClient

func NewRpcClient(config config.RpcConfig, service *core.SingleContainerService) *RpcClient

func (*RpcClient) Close

func (t *RpcClient) Close() error

func (*RpcClient) Deposit

func (t *RpcClient) Deposit(ctx context.Context, currency string, inboundLiquidity uint32) (*pb.DepositResponse, error)

func (*RpcClient) GetServiceInfo

func (t *RpcClient) GetServiceInfo(ctx context.Context, currency string) (*pb.GetServiceInfoResponse, error)

func (*RpcClient) Withdraw

func (t *RpcClient) Withdraw(ctx context.Context, currency string, amount int64, address string) (*pb.CreateReverseSwapResponse, error)

type Service

type Service struct {
	*core.SingleContainerService
	*RpcClient
}

func New

func New(
	name string,
	services map[string]core.Service,
	containerName string,
	dockerClient *docker.Client,
	rpcConfig config.RpcConfig,
) *Service

func (*Service) Close

func (t *Service) Close() error

func (*Service) ConfigureRouter

func (t *Service) ConfigureRouter(r *gin.RouterGroup)

func (*Service) GetInfo

func (t *Service) GetInfo(node Node) (map[string]interface{}, error)

func (*Service) GetStatus

func (t *Service) GetStatus(ctx context.Context) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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