xud

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 ChangepasswordParams added in v1.3.0

type ChangepasswordParams struct {
	NewPassword string `json: "newPassword"`
	OldPassword string `json: "oldPassword"`
}

type Clients added in v1.3.0

type Clients struct {
	Client     pb.XudClient
	InitClient pb.XudInitClient
}

type CreateParams

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

type ListOrdersParams added in v1.3.0

type ListOrdersParams struct {
	PairId         string `form:"pairId" json:"pairId"`
	Owner          uint32 `form:"owner" json:"owner"`
	Limit          uint32 `form:"limit" json:"limit"`
	IncludeAliases bool   `form:"includeAliases" json:"includeAliases"`
}

type OrderBookParams added in v1.3.0

type OrderBookParams struct {
	PairId    string `form:"pairId" json:"pairId"`
	Precision int32  `form:"precision" json:"precision"`
	Limit     uint32 `form:"limit" json:"limit"`
}

type PlaceOrderParams added in v1.3.0

type PlaceOrderParams struct {
	Price             float64      `json: "price"`
	Quantity          uint64       `json: "quantity"`
	PairId            string       `json: "pairId"`
	OrderId           string       `json: "orderId"`
	Side              pb.OrderSide `json: "side"`
	ReplaceOrderId    string       `json: "replaceOrderId"`
	ImmediateOrCancel bool         `json: "immediateOrCancel"`
}

type RemoveOrderParams added in v1.3.0

type RemoveOrderParams struct {
	OrderId  string `json: "orderId"`
	Quantity uint64 `json: "quantity"`
}

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) ChangePassword added in v1.3.0

func (t *RpcClient) ChangePassword(ctx context.Context, newPassword string, oldPassword string) (*pb.ChangePasswordResponse, error)

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) GetMnemonic added in v1.3.0

func (t *RpcClient) GetMnemonic(ctx context.Context) (*pb.GetMnemonicResponse, 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) ListOrders added in v1.3.0

func (t *RpcClient) ListOrders(ctx context.Context, pairId string, owner pb.ListOrdersRequest_Owner, limit uint32, includeAliases bool) (*pb.ListOrdersResponse, error)

func (*RpcClient) ListPairs added in v1.3.0

func (t *RpcClient) ListPairs(ctx context.Context) (*pb.ListPairsResponse, error)

func (*RpcClient) OrderBook added in v1.3.0

func (t *RpcClient) OrderBook(ctx context.Context, pairId string, precision int32, limit uint32) (*pb.OrderBookResponse, error)

func (*RpcClient) PlaceOrder added in v1.3.0

func (t *RpcClient) PlaceOrder(ctx context.Context, pairId string, side pb.OrderSide, price float64, quantity uint64, orderId string, replaceOrderId string, immediateOrCancel bool) (*pb.PlaceOrderResponse, error)

func (*RpcClient) RemoveOrder added in v1.3.0

func (t *RpcClient) RemoveOrder(ctx context.Context, orderId string, quantity uint64) (*pb.RemoveOrderResponse, 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