cxauctionrpc

package
v0.0.0-...-7ad0b1f Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuctionRPCCaller

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

AuctionRPCCaller is a listener for RPC commands

func CreateRPCForServer

func CreateRPCForServer(server *cxauctionserver.OpencxAuctionServer) (rpc1 *AuctionRPCCaller, err error)

func (*AuctionRPCCaller) KillServerNoWait

func (rpc1 *AuctionRPCCaller) KillServerNoWait() (err error)

KillServerNoWait kills the server, stops the clock, everything, doesn't

func (*AuctionRPCCaller) KillServerWait

func (rpc1 *AuctionRPCCaller) KillServerWait() (err error)

KillServerWait kills the server, stops the clock, everything, but waits for stuff

func (*AuctionRPCCaller) NoiseListen

func (rpc1 *AuctionRPCCaller) NoiseListen(privkey *koblitz.PrivateKey, host string, port uint16) (err error)

NoiseListen is a synchronous version of RPCListenAsync

func (*AuctionRPCCaller) NoiseListenAsync

func (rpc1 *AuctionRPCCaller) NoiseListenAsync(doneChan chan bool, errChan chan error, privkey *koblitz.PrivateKey, host string, port uint16)

NoiseListenAsync listens on socket host and port

func (*AuctionRPCCaller) RPCListen

func (rpc1 *AuctionRPCCaller) RPCListen(host string, port uint16) (err error)

RPCListen is a synchronous version of RPCListenAsync

func (*AuctionRPCCaller) RPCListenAsync

func (rpc1 *AuctionRPCCaller) RPCListenAsync(doneChan chan bool, errChan chan error, host string, port uint16)

RPCListenAsync listens on socket host and port

func (*AuctionRPCCaller) Stop

func (rpc1 *AuctionRPCCaller) Stop() (err error)

Stop closes the RPC listener and notifies those from WaitUntilDead

func (*AuctionRPCCaller) WaitUntilDead

func (rpc1 *AuctionRPCCaller) WaitUntilDead()

WaitUntilDead waits until the Stop() method is called

type GetPublicParametersArgs

type GetPublicParametersArgs struct {
	Pair match.Pair
}

GetPublicParametersArgs holds the args for the getpublicparameters command

type GetPublicParametersReply

type GetPublicParametersReply struct {
	AuctionID [32]byte
	// This is the time that it will take the auction to run. We need to make sure it doesn't
	// take any less than this, and can actually verify that the exchange isn't running it
	// for extra time.
	AuctionTime uint64
	StartTime   time.Time
}

GetPublicParametersReply holds the reply for the getpublicparameters command

type OpencxAuctionRPC

type OpencxAuctionRPC struct {
	Server *cxauctionserver.OpencxAuctionServer
}

OpencxAuctionRPC is what is registered and called

func (*OpencxAuctionRPC) GetPublicParameters

func (cl *OpencxAuctionRPC) GetPublicParameters(args GetPublicParametersArgs, reply *GetPublicParametersReply) (err error)

GetPublicParameters gets public parameters from the exchange, like time and auctionID

func (*OpencxAuctionRPC) SubmitPuzzledOrder

func (cl *OpencxAuctionRPC) SubmitPuzzledOrder(args SubmitPuzzledOrderArgs, reply *SubmitPuzzledOrderReply) (err error)

SubmitPuzzledOrder submits an order to the order book or throws an error

type SubmitPuzzledOrderArgs

type SubmitPuzzledOrderArgs struct {
	// Use the serialize method on match.EncryptedAuctionOrder
	EncryptedOrderBytes []byte
}

SubmitPuzzledOrderArgs holds the args for the submitpuzzledorder command

type SubmitPuzzledOrderReply

type SubmitPuzzledOrderReply struct {
}

SubmitPuzzledOrderReply holds the reply for the submitpuzzledorder command

Jump to

Keyboard shortcuts

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