clients

package
v0.0.0-...-dd16f27 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrClientUnavailable = errors.New("offline mode: client is not available")

Functions

This section is empty.

Types

type CoordinatorClient

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

func NewCoordinatorClient

func NewCoordinatorClient(cfg *CoordinatorClientConfig) (*CoordinatorClient, error)

func (*CoordinatorClient) GetCoordinatorApproval

func (c *CoordinatorClient) GetCoordinatorApproval(
	ctx context.Context,
	tx *zeroex.SignedTransaction,
	txOrigin common.Address,
) (approvals [][]byte, expiryAt time.Time, err error)

func (*CoordinatorClient) SendCoordinatorSoftCancelTransaction

func (c *CoordinatorClient) SendCoordinatorSoftCancelTransaction(
	ctx context.Context,
	tx *zeroex.SignedTransaction,
	txOrigin common.Address,
) (cancellationSigs []string, err error)

type CoordinatorClientConfig

type CoordinatorClientConfig struct {
	Endpoint string
	Timeout  time.Duration
	Debug    bool
}

type DebugClient

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

func NewDebugClient

func NewDebugClient(cfg *DebugClientConfig) (*DebugClient, error)

func (*DebugClient) Version

func (c *DebugClient) Version(ctx context.Context) (string, error)

type DebugClientConfig

type DebugClientConfig struct {
	Endpoint string
	Timeout  time.Duration
	Debug    bool
}

type RESTClient

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

func NewRESTClient

func NewRESTClient(cfg *RESTClientConfig) (*RESTClient, error)

func (*RESTClient) DerivativeMarkets

func (c *RESTClient) DerivativeMarkets(ctx context.Context) ([]*restAPI.DerivativeMarket, error)

func (*RESTClient) Order

func (c *RESTClient) Order(ctx context.Context, orderHash string) (*restAPI.Order, error)

func (*RESTClient) Orders

func (c *RESTClient) Orders(ctx context.Context, tradePairHash string) ([]*restAPI.Order, error)

func (*RESTClient) TradePairs

func (c *RESTClient) TradePairs(ctx context.Context) ([]*restAPI.TradePair, error)

type RESTClientConfig

type RESTClientConfig struct {
	Endpoint string
	Timeout  time.Duration
	Debug    bool
}

type SDAClient

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

func NewSDAClient

func NewSDAClient(restClient *RESTClient, cfg *SDAClientConfig) (*SDAClient, error)

func (*SDAClient) PostOrder

func (c *SDAClient) PostOrder(
	ctx context.Context,
	order *zeroex.SignedOrder,
) (string, error)

type SDAClientConfig

type SDAClientConfig struct {
	Endpoint string
	Timeout  time.Duration
	Debug    bool
}

type SRAClient

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

func NewSRAClient

func NewSRAClient(restClient *RESTClient, cfg *SRAClientConfig) (*SRAClient, error)

func (*SRAClient) DerivativeOrders

func (c *SRAClient) DerivativeOrders(
	ctx context.Context,
	assetData string,
) (bids, asks []*sraAPI.OrderRecord, err error)

func (*SRAClient) FeeRecipients

func (c *SRAClient) FeeRecipients(ctx context.Context) (feeRecipients []common.Address, err error)

func (*SRAClient) Order

func (c *SRAClient) Order(ctx context.Context, orderHash string) (*sraAPI.Order, error)

func (*SRAClient) Orderbook

func (c *SRAClient) Orderbook(
	ctx context.Context,
	pairName string,
) (bids, asks []*sraAPI.OrderRecord, err error)

func (*SRAClient) PostOrder

func (c *SRAClient) PostOrder(
	ctx context.Context,
	order *zeroex.SignedOrder,
) (string, error)

type SRAClientConfig

type SRAClientConfig struct {
	Endpoint string
	Timeout  time.Duration
	Debug    bool
}

Jump to

Keyboard shortcuts

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