oneinch

package
v0.0.0-...-50d73db Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ChainId int64
	// contains filtered or unexported fields
}

func ReadOnly

func ReadOnly() (*Client, error)

func ReadWrite

func ReadWrite() (*Client, error)

func (*Client) GetOrdersV3

func (client *Client) GetOrdersV3() ([]OrderV3, error)

func (*Client) GetOrdersV4

func (client *Client) GetOrdersV4() ([]OrderV4, error)

func (*Client) PlaceOrderV3

func (client *Client) PlaceOrderV3(makerAsset, takerAsset string, makerAmount, takerAmount big.Float) error

func (*Client) PlaceOrderV4

func (client *Client) PlaceOrderV4(makerAsset, takerAsset string, makerAmount, takerAmount big.Float) error

type OrderDataV3

type OrderDataV3 struct {
	Salt          string `json:"salt"`
	MakerAsset    string `json:"makerAsset"`
	TakerAsset    string `json:"takerAsset"`
	Maker         string `json:"maker"`
	Receiver      string `json:"receiver"`
	AllowedSender string `json:"allowedSender"`
	MakingAmount  string `json:"makingAmount"`
	TakingAmount  string `json:"takingAmount"`
	Offsets       string `json:"offsets"`
	Interactions  string `json:"interactions"`
}

func (*OrderDataV3) GetMakerAmount

func (order *OrderDataV3) GetMakerAmount() (*big.Int, error)

func (*OrderDataV3) GetTakerAmount

func (order *OrderDataV3) GetTakerAmount() (*big.Int, error)

type OrderDataV4

type OrderDataV4 struct {
	Salt         string `json:"salt"`
	MakerAsset   string `json:"makerAsset"`
	TakerAsset   string `json:"takerAsset"`
	Maker        string `json:"maker"`
	Receiver     string `json:"receiver"`
	MakingAmount string `json:"makingAmount"`
	TakingAmount string `json:"takingAmount"`
	MakerTraits  string `json:"makerTraits"`
	Extension    string `json:"extension"`
}

func (*OrderDataV4) GetMakerAmount

func (order *OrderDataV4) GetMakerAmount() (*big.Int, error)

func (*OrderDataV4) GetTakerAmount

func (order *OrderDataV4) GetTakerAmount() (*big.Int, error)

type OrderV3

type OrderV3 struct {
	Signature string      `json:"signature"`
	OrderHash string      `json:"orderHash"`
	Data      OrderDataV3 `json:"data"`
}

type OrderV4

type OrderV4 struct {
	Signature string      `json:"signature"`
	OrderHash string      `json:"orderHash"`
	Data      OrderDataV4 `json:"data"`
}

Jump to

Keyboard shortcuts

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