xud

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RetryDelay         = 3 * time.Second
	GrpcConnectTimeout = 3 * time.Second
)

Variables

View Source
var (
	NoClient     = errors.New("no client")
	NoInitClient = errors.New("no init client")
)

Functions

This section is empty.

Types

type CreateParams

type CreateParams struct {
	Password string `json:"password"`
}

type RestoreParams

type RestoreParams struct {
	Password     string `json:"password"`
	SeedMnemonic string `json:"seedMnemonic"`
	BackupDir    string `json:"backupDir"`
}

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) CreateNode

func (t *RpcClient) CreateNode(ctx context.Context, password string) (*pb.CreateNodeResponse, error)

func (*RpcClient) GetBalance

func (t *RpcClient) GetBalance(ctx context.Context, currency string) (*pb.GetBalanceResponse, error)

func (*RpcClient) GetInfo

func (t *RpcClient) GetInfo(ctx context.Context) (*pb.GetInfoResponse, error)

func (*RpcClient) GetTradeHistory

func (t *RpcClient) GetTradeHistory(ctx context.Context, limit uint32) (*pb.TradeHistoryResponse, error)

func (*RpcClient) GetTradingLimits

func (t *RpcClient) GetTradingLimits(ctx context.Context, currency string) (*pb.TradingLimitsResponse, error)

func (*RpcClient) RestoreNode

func (t *RpcClient) RestoreNode(ctx context.Context, password string, seedMnemonic []string, lndBackups map[string][]byte, xudDatabase []byte) (*pb.RestoreNodeResponse, error)

func (*RpcClient) UnlockNode

func (t *RpcClient) UnlockNode(ctx context.Context, password string) (*pb.UnlockNodeResponse, 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) GetStatus

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

type UnlockParams

type UnlockParams struct {
	Password string `json:"password"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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