rpcserver

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: BlueOak-1.0.0 Imports: 32 Imported by: 5

Documentation

Overview

Package rpcserver provides a JSON RPC to communicate with the client core.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListCommands

func ListCommands(includePasswords bool) string

ListCommands prints a short usage string for every route available to the rpcserver.

func SetLogger

func SetLogger(logger dex.Logger)

SetLogger sets the logger for the RPCServer package.

Types

type Config

type Config struct {
	Core                        clientCore
	MarketMaker                 *mm.MarketMaker
	Addr, User, Pass, Cert, Key string
	BWVersion                   *SemVersion
	CertHosts                   []string
}

Config holds variables needed to create a new RPC Server.

type RPCServer

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

RPCServer is a single-client http and websocket server enabling a JSON interface to Bison Wallet.

func New

func New(cfg *Config) (*RPCServer, error)

New is the constructor for an RPCServer.

func (*RPCServer) Connect

func (s *RPCServer) Connect(ctx context.Context) (*sync.WaitGroup, error)

Connect starts the RPC server. Satisfies the dex.Connector interface.

type RawParams

type RawParams struct {
	PWArgs []encode.PassBytes `json:"PWArgs"`
	Args   []string           `json:"args"`
}

RawParams is used for all server requests.

type SemVersion added in v0.5.0

type SemVersion struct {
	VersionString string `json:"versionString"`
	Major         uint32 `json:"major"`
	Minor         uint32 `json:"minor"`
	Patch         uint32 `json:"patch"`
	Prerelease    string `json:"prerelease,omitempty"`
	BuildMetadata string `json:"buildMetadata,omitempty"`
}

SemVersion holds a semver version JSON object.

type VersionResponse added in v0.5.0

type VersionResponse struct {
	RPCServerVer *dex.Semver `json:"rpcServerVersion"`
	BWVersion    *SemVersion `json:"dexcVersion"`
}

VersionResponse holds bisonw and bisonw rpc server version.

Jump to

Keyboard shortcuts

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