types

package
v0.0.0-...-6d31ec0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultOrderAddress   = "0xEF3137050f3a49ECAe2D2Bae0154B895310D9Dc4"
	DefaultConduitKey     = "0x0000000000000000000000000000000000000000000000000000000000000000"
	RequestURL            = "wss://dev.api.aori.io/"
	MarketFeedURL         = "wss://dev.beta.feed.aori.io/"
	DefaultZoneHash       = "0x0000000000000000000000000000000000000000000000000000000000000000"
	SeaportAddress        = "0x00000000000000adc04c56bf30ac9d3c0aaf14dc"
	CurrentSeaportVersion = "1.5"
)

Variables

View Source
var Eip712OrderType = apitypes.Types{
	"EIP712Domain": {
		{
			Name: "name",
			Type: "string",
		},
		{
			Name: "version",
			Type: "string",
		},
		{
			Name: "chainId",
			Type: "uint256",
		},
		{
			Name: "verifyingContract",
			Type: "address",
		},
	},
	"OrderComponents": {
		{
			Name: "offerer",
			Type: "address",
		},
		{
			Name: "zone",
			Type: "address",
		},
		{
			Name: "offer",
			Type: "OfferItem[]",
		},
		{
			Name: "consideration",
			Type: "ConsiderationItem[]",
		},
		{
			Name: "orderType",
			Type: "uint8",
		},
		{
			Name: "startTime",
			Type: "uint256",
		},
		{
			Name: "endTime",
			Type: "uint256",
		},
		{
			Name: "zoneHash",
			Type: "bytes32",
		},
		{
			Name: "salt",
			Type: "uint256",
		},
		{
			Name: "conduitKey",
			Type: "bytes32",
		},
		{
			Name: "counter",
			Type: "uint256",
		},
	},
	"OfferItem": {
		{
			Name: "itemType",
			Type: "uint8",
		},
		{
			Name: "token",
			Type: "address",
		},
		{
			Name: "identifierOrCriteria",
			Type: "uint256",
		},
		{
			Name: "startAmount",
			Type: "uint256",
		},
		{
			Name: "endAmount",
			Type: "uint256",
		},
	},
	"ConsiderationItem": {
		{
			Name: "itemType",
			Type: "uint8",
		},
		{
			Name: "token",
			Type: "address",
		},
		{
			Name: "identifierOrCriteria",
			Type: "uint256",
		},
		{
			Name: "startAmount",
			Type: "uint256",
		},
		{
			Name: "endAmount",
			Type: "uint256",
		},
		{
			Name: "recipient",
			Type: "address",
		},
	},
}

Functions

This section is empty.

Types

type AccountOrdersParams

type AccountOrdersParams struct {
	Offerer   string `json:"offerer"`
	Signature string `json:"signature,omitempty"`
	ApiKey    string `json:"apiKey,omitempty"`
}

type AccountOrdersRequest

type AccountOrdersRequest struct {
	Id      int                   `json:"id"`
	JsonRPC string                `json:"jsonrpc"`
	Method  string                `json:"method"`
	Params  []AccountOrdersParams `json:"params"`
}

type AccountOrdersResponse

type AccountOrdersResponse struct {
	ID     int                 `json:"id"`
	Result AccountOrdersResult `json:"result"`
}

type AccountOrdersResult

type AccountOrdersResult struct {
	Orders []OrderCreatedData `json:"orders"`
}

type AoriEvent

type AoriEvent struct {
	Subscribed     string              `json:"Subscribed"`
	OrderCancelled *OrderCancelledData `json:"OrderCancelled"`
	OrderCreated   *OrderCreatedData   `json:"OrderCreated"`
	OrderTaken     *OrderTakenData     `json:"OrderTaken"`
}

type AoriOrderStatusData

type AoriOrderStatusData struct {
	Order OrderCreatedData `json:"order"`
}

type AoriOrderStatusResponse

type AoriOrderStatusResponse struct {
	ID     int                 `json:"id"`
	Result AoriOrderStatusData `json:"result"`
}

type AoriOrderbookData

type AoriOrderbookData struct {
	Orders []OrderCreatedData `json:"orders"`
}

type AoriResponse

type AoriResponse struct {
	ID     *uint64   `json:"id"`
	Result AoriEvent `json:"result"`
}

type AoriViewOrderbookResponse

type AoriViewOrderbookResponse struct {
	ID     int               `json:"id"`
	Result AoriOrderbookData `json:"result"`
}

type AuthWalletData

type AuthWalletData struct {
	Auth string `json:"auth"`
}

type AuthWalletParams

type AuthWalletParams struct {
	Address   string `json:"address"`
	Signature string `json:"signature"`
}

type AuthWalletRequest

type AuthWalletRequest struct {
	Id      int                `json:"id"`
	JsonRPC string             `json:"jsonrpc"`
	Method  string             `json:"method"`
	Params  []AuthWalletParams `json:"params"`
}

type AuthWalletResponse

type AuthWalletResponse struct {
	ID     int            `json:"id"`
	Result AuthWalletData `json:"result"`
}

type CancelAllOrdersParams

type CancelAllOrdersParams struct {
	Offerer   string `json:"offerer"`
	Signature string `json:"signature,omitempty"`
}

type CancelAllOrdersRequest

type CancelAllOrdersRequest struct {
	Id      int                     `json:"id"`
	JsonRPC string                  `json:"jsonrpc"`
	Method  string                  `json:"method"`
	Params  []CancelAllOrdersParams `json:"params"`
}

type CancelOrderParams

type CancelOrderParams struct {
	OrderId   string `json:"orderId"`
	Signature string `json:"signature"`
	ApiKey    string `json:"apiKey"`
}

type CancelOrderRequest

type CancelOrderRequest struct {
	Id      int                 `json:"id"`
	JsonRPC string              `json:"jsonrpc"`
	Method  string              `json:"method"`
	Params  []CancelOrderParams `json:"params"`
}

type CheckAuthParams

type CheckAuthParams struct {
	Auth string `json:"auth"`
}

type CheckAuthRequest

type CheckAuthRequest struct {
	Id      int               `json:"id"`
	JsonRPC string            `json:"jsonrpc"`
	Method  string            `json:"method"`
	Params  []CheckAuthParams `json:"params"`
}

type ConsiderationItem

type ConsiderationItem struct {
	ItemType             ItemType `json:"itemType"`
	Token                string   `json:"token"`
	IdentifierOrCriteria string   `json:"identifierOrCriteria"`
	StartAmount          string   `json:"startAmount"`
	EndAmount            string   `json:"endAmount"`
	Recipient            string   `json:"recipient"`
}

type ItemType

type ItemType int
const (
	Native ItemType = iota
	ERC20
	ERC721
	ERC1155
	ERC721WithCriteria
	ERC1155WithCriteria
)

type MakeOrderInput

type MakeOrderInput struct {
	SellToken  string
	SellAmount string
	BuyToken   string
	BuyAmount  string
}

type MakeOrderParams

type MakeOrderParams struct {
	Order    MakeOrderQuery `json:"order"`
	IsPublic bool           `json:"isPublic"`
	ChainId  int            `json:"chainId"`
}

type MakeOrderQuery

type MakeOrderQuery struct {
	Signature  string          `json:"signature"`
	Parameters OrderParameters `json:"parameters"`
}

type MakeOrderRequest

type MakeOrderRequest struct {
	Id      int               `json:"id"`
	JsonRPC string            `json:"jsonrpc"`
	Method  string            `json:"method"`
	Params  []MakeOrderParams `json:"params"`
}

type MakeOrderResponse

type MakeOrderResponse struct {
	ID     int             `json:"id"`
	Result MakeOrderResult `json:"result"`
}

type MakeOrderResult

type MakeOrderResult struct {
	Order OrderCreatedData `json:"order"`
}

type OfferItem

type OfferItem struct {
	ItemType             ItemType `json:"itemType"`
	Token                string   `json:"token"`
	IdentifierOrCriteria string   `json:"identifierOrCriteria"`
	StartAmount          string   `json:"startAmount"`
	EndAmount            string   `json:"endAmount"`
}

type OrderCancelledData

type OrderCancelledData struct {
	Order         OrderCreationData `json:"order"`
	OrderHash     string            `json:"orderHash"`
	InputToken    string            `json:"inputToken"`
	OutputToken   string            `json:"outputToken"`
	InputAmount   uint64            `json:"inputAmount"`
	OutputAmount  uint64            `json:"outputAmount"`
	ChainID       int64             `json:"chainId"`
	Active        bool              `json:"active"`
	CreatedAt     uint64            `json:"createdAt"`
	LastUpdatedAt uint64            `json:"lastUpdatedAt"`
	IsPublic      bool              `json:"isPublic"`
}

type OrderCreatedData

type OrderCreatedData struct {
	Order         OrderCreationData `json:"order"`
	OrderHash     string            `json:"orderHash"`
	InputToken    string            `json:"inputToken"`
	OutputToken   string            `json:"outputToken"`
	InputAmount   string            `json:"inputAmount"`
	OutputAmount  string            `json:"outputAmount"`
	ChainID       int64             `json:"chainId"`
	Active        bool              `json:"active"`
	CreatedAt     int               `json:"createdAt"`
	LastUpdatedAt int               `json:"lastUpdatedAt"`
	IsPublic      bool              `json:"isPublic"`
	Rate          *float64          `json:"rate,omitempty"`
}

type OrderCreationData

type OrderCreationData struct {
	Parameters OrderParameters `json:"parameters"`
	Signature  string          `json:"signature"`
}

type OrderParameters

type OrderParameters struct {
	Offerer                         string              `json:"offerer"`
	Zone                            string              `json:"zone"`
	Offer                           []OfferItem         `json:"offer"`
	Consideration                   []ConsiderationItem `json:"consideration"`
	OrderType                       OrderType           `json:"orderType"`
	StartTime                       string              `json:"startTime"`
	EndTime                         string              `json:"endTime"`
	ZoneHash                        string              `json:"zoneHash"`
	Salt                            string              `json:"salt"`
	ConduitKey                      string              `json:"conduitKey"`
	TotalOriginalConsiderationItems int16               `json:"totalOriginalConsiderationItems"`
	Counter                         string              `json:"counter"`
}

type OrderStatusParams

type OrderStatusParams struct {
	OrderHash string `json:"orderHash"`
}

type OrderStatusRequest

type OrderStatusRequest struct {
	Id      int                 `json:"id"`
	JsonRPC string              `json:"jsonrpc"`
	Method  string              `json:"method"`
	Params  []OrderStatusParams `json:"params"`
}

type OrderStatusResponse

type OrderStatusResponse struct {
	ID     int               `json:"id"`
	Result OrderStatusResult `json:"result"`
}

type OrderStatusResult

type OrderStatusResult struct {
	Order OrderCreatedData `json:"order"`
}

type OrderTakenData

type OrderTakenData struct {
	Order         OrderCreationData `json:"order"`
	OrderHash     string            `json:"orderHash"`
	InputToken    string            `json:"inputToken"`
	OutputToken   string            `json:"outputToken"`
	InputAmount   uint64            `json:"inputAmount"`
	OutputAmount  uint64            `json:"outputAmount"`
	ChainID       int64             `json:"chainId"`
	Active        bool              `json:"active"`
	CreatedAt     uint64            `json:"createdAt"`
	LastUpdatedAt uint64            `json:"lastUpdatedAt"`
	IsPublic      bool              `json:"isPublic"`
	TakenAt       uint64            `json:"takenAt"`
}

type OrderType

type OrderType int
const (
	FullOpen OrderType = iota
	PartialOpen
	FullRestricted
	PartialRestricted
	Contract
)

type PingRequest

type PingRequest struct {
	Id      int      `json:"id"`
	JsonRPC string   `json:"jsonrpc"`
	Method  string   `json:"method"`
	Params  []string `json:"params"`
}

type SubscribeFulfilledOrderResponse

type SubscribeFulfilledOrderResponse struct {
	ID     int                           `json:"id"`
	Result SubscribeFulfilledOrderResult `json:"result"`
}

SubscribeFulfilledOrderResponse For OrderFulfilled

type SubscribeFulfilledOrderResult

type SubscribeFulfilledOrderResult struct {
	Type string `json:"type"`
	Data string `json:"data"`
}

type SubscribeOrderToExecuteEvent

type SubscribeOrderToExecuteEvent struct {
	// Relevant order details
	MakerOrderHash  string          `json:"makerOrderHash"`
	MakerParameters OrderParameters `json:"makerParameters"`
	TakerOrderHash  string          `json:"takerOrderHash"`
	TakerParameters OrderParameters `json:"takerParameters"`
	MatchingHash    string          `json:"matchingHash"`

	// Verification
	ChainID       int    `json:"chainId"`
	To            string `json:"to"`
	Value         int    `json:"value"`
	Data          string `json:"data"`
	BlockDeadline int    `json:"blockDeadline"`

	// Vanity
	Maker        string `json:"maker"`
	InputToken   string `json:"inputToken"`
	InputAmount  string `json:"inputAmount"`
	OutputToken  string `json:"outputToken"`
	OutputAmount string `json:"outputAmount"`
}

type SubscribeOrderToExecuteResponse

type SubscribeOrderToExecuteResponse struct {
	ID     int                           `json:"id"`
	Result SubscribeOrderToExecuteResult `json:"result"`
}

SubscribeOrderToExecuteResponse For OrderToExecute

type SubscribeOrderToExecuteResult

type SubscribeOrderToExecuteResult struct {
	Type string                       `json:"type"`
	Data SubscribeOrderToExecuteEvent `json:"data"`
}

type SubscribeOrderViewResponse

type SubscribeOrderViewResponse struct {
	ID     int                      `json:"id"`
	Result SubscribeOrderViewResult `json:"result"`
}

SubscribeOrderViewResponse For OrderCreated and OrderCancelled

type SubscribeOrderViewResult

type SubscribeOrderViewResult struct {
	Type string           `json:"type"`
	Data OrderCreatedData `json:"data"`
}

type SubscribeOrderbookRequest

type SubscribeOrderbookRequest struct {
	Id      int      `json:"id"`
	JsonRPC string   `json:"jsonrpc"`
	Method  string   `json:"method"`
	Params  []string `json:"params"`
}

type SubscribeQuoteRequestedEvent

type SubscribeQuoteRequestedEvent struct {
	InputToken   string `json:"inputToken"`
	OutputToken  string `json:"outputToken"`
	InputAmount  string `json:"inputAmount,omitempty"`
	OutputAmount string `json:"outputAmount,omitempty"`
	ChainID      int    `json:"chainId"`
}

type SubscribeQuoteRequestedResponse

type SubscribeQuoteRequestedResponse struct {
	ID     int                           `json:"id"`
	Result SubscribeQuoteRequestedResult `json:"result"`
}

SubscribeQuoteRequestedResponse For QuoteRequested

type SubscribeQuoteRequestedResult

type SubscribeQuoteRequestedResult struct {
	Type string                       `json:"type"`
	Data SubscribeQuoteRequestedEvent `json:"data"`
}

type SubscribeTakeOrderResponse

type SubscribeTakeOrderResponse struct {
	ID     int                      `json:"id"`
	Result SubscribeTakeOrderResult `json:"result"`
}

SubscribeTakeOrderResponse For OrderTaken

type SubscribeTakeOrderResult

type SubscribeTakeOrderResult struct {
	Type string           `json:"type"`
	Data OrderCreatedData `json:"data"`
}

type SubscriptionEvent

type SubscriptionEvent string
const (
	OrderCreated   SubscriptionEvent = "OrderCreated"
	OrderCancelled SubscriptionEvent = "OrderCancelled"
	OrderTaken     SubscriptionEvent = "OrderTaken"
	OrderFulfilled SubscriptionEvent = "OrderFulfilled"
	OrderToExecute SubscriptionEvent = "OrderToExecute"
	QuoteRequested SubscriptionEvent = "QuoteRequested"
)

type TakeOrderParams

type TakeOrderParams struct {
	Order   TakeOrderQuery `json:"order"`
	OrderId string         `json:"orderId"`
	SeatId  int            `json:"seatId"`
	ChainId int            `json:"chainId"`
}

type TakeOrderQuery

type TakeOrderQuery struct {
	Signature  string          `json:"signature"`
	Parameters OrderParameters `json:"parameters"`
}

type TakeOrderRequest

type TakeOrderRequest struct {
	Id      int               `json:"id"`
	JsonRPC string            `json:"jsonrpc"`
	Method  string            `json:"method"`
	Params  []TakeOrderParams `json:"params"`
}

type ViewOrderbookParams

type ViewOrderbookParams struct {
	ChainId      int                `json:"chainId,omitempty"`
	Query        ViewOrderbookQuery `json:"query,omitempty"`
	Side         string             `json:"side,omitempty"`
	SortBy       string             `json:"sortBy,omitempty"`
	InputAmount  string             `json:"inputAmount,omitempty"`
	OutputAmount string             `json:"outputAmount,omitempty"`
}

type ViewOrderbookQuery

type ViewOrderbookQuery struct {
	Base  string `json:"base"`
	Quote string `json:"quote"`
}

type ViewOrderbookRequest

type ViewOrderbookRequest struct {
	Id      int                   `json:"id"`
	JsonRPC string                `json:"jsonrpc"`
	Method  string                `json:"method"`
	Params  []ViewOrderbookParams `json:"params"`
}

Jump to

Keyboard shortcuts

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