@okutrade/account-api
Version:
TypeScript client for OKU Account API using Connect-ES
401 lines (350 loc) • 10.9 kB
text/typescript
// @generated by protoc-gen-es v2.2.2 with parameter "target=ts,import_extension=.js"
// @generated from file gfxcafe/oku/account/v1/specialorders.proto (package gfxcafe.oku.account.v1, syntax proto3)
/* eslint-disable */
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
import { file_buf_validate_validate } from "../../../../buf/validate/validate_pb.js";
import type { Address } from "./common_pb.js";
import { file_gfxcafe_oku_account_v1_common } from "./common_pb.js";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file gfxcafe/oku/account/v1/specialorders.proto.
*/
export const file_gfxcafe_oku_account_v1_specialorders: GenFile = /*@__PURE__*/
fileDesc("CipnZnhjYWZlL29rdS9hY2NvdW50L3YxL3NwZWNpYWxvcmRlcnMucHJvdG8SFmdmeGNhZmUub2t1LmFjY291bnQudjEiYwoOSGlzdG9yeVJlcXVlc3QSPgoJYWRkcmVzc2VzGAEgAygLMh8uZ2Z4Y2FmZS5va3UuYWNjb3VudC52MS5BZGRyZXNzQgq6SAeSAQQIARAKEhEKCWNoYWluX2lkcxgCIAMoBSJWCg9IaXN0b3J5UmVzcG9uc2USNAoGb3JkZXJzGAEgAygLMiQuZ2Z4Y2FmZS5va3UuYWNjb3VudC52MS5TcGVjaWFsT3JkZXISDQoFdG90YWwYAiABKAUizAMKDFNwZWNpYWxPcmRlchIQCghjaGFpbl9pZBgBIAEoBRIUCgxjcmVhdGVkX3RpbWUYAiABKAUSDwoHdHhfaGFzaBgDIAEoCRI4CgpzZWxsX3Rva2VuGAQgASgLMiQuZ2Z4Y2FmZS5va3UuYWNjb3VudC52MS5Ub2tlbkRldGFpbHMSNwoJYnV5X3Rva2VuGAUgASgLMiQuZ2Z4Y2FmZS5va3UuYWNjb3VudC52MS5Ub2tlbkRldGFpbHMSEgoKaW5wdXRfc2lkZRgGI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VxdWVzdBonLmdmeGNhZmUub2t1LmFjY291bnQudjEuSGlzdG9yeVJlc3BvbnNlQjdaNWdmeC5jYWZlL29rdS9hY2NvdW50L2dlbi9nby9nZnhjYWZlL29rdS9hY2NvdW50L3YxO3YxYgZwcm90bzM", [file_buf_validate_validate, file_gfxcafe_oku_account_v1_common]);
/**
* HistoryRequest for querying order history
*
* @generated from message gfxcafe.oku.account.v1.HistoryRequest
*/
export type HistoryRequest = Message<"gfxcafe.oku.account.v1.HistoryRequest"> & {
/**
* List of addresses to query (max 10)
*
* @generated from field: repeated gfxcafe.oku.account.v1.Address addresses = 1;
*/
addresses: Address[];
/**
* Optional chain IDs to filter results
*
* @generated from field: repeated int32 chain_ids = 2;
*/
chainIds: number[];
};
/**
* Describes the message gfxcafe.oku.account.v1.HistoryRequest.
* Use `create(HistoryRequestSchema)` to create a new message.
*/
export const HistoryRequestSchema: GenMessage<HistoryRequest> = /*@__PURE__*/
messageDesc(file_gfxcafe_oku_account_v1_specialorders, 0);
/**
* HistoryResponse with order data
*
* @generated from message gfxcafe.oku.account.v1.HistoryResponse
*/
export type HistoryResponse = Message<"gfxcafe.oku.account.v1.HistoryResponse"> & {
/**
* List of special orders
*
* @generated from field: repeated gfxcafe.oku.account.v1.SpecialOrder orders = 1;
*/
orders: SpecialOrder[];
/**
* Total number of orders
*
* @generated from field: int32 total = 2;
*/
total: number;
};
/**
* Describes the message gfxcafe.oku.account.v1.HistoryResponse.
* Use `create(HistoryResponseSchema)` to create a new message.
*/
export const HistoryResponseSchema: GenMessage<HistoryResponse> = /*@__PURE__*/
messageDesc(file_gfxcafe_oku_account_v1_specialorders, 1);
/**
* SpecialOrder represents a unified order format
*
* @generated from message gfxcafe.oku.account.v1.SpecialOrder
*/
export type SpecialOrder = Message<"gfxcafe.oku.account.v1.SpecialOrder"> & {
/**
* Chain ID
*
* @generated from field: int32 chain_id = 1;
*/
chainId: number;
/**
* Created time (unix timestamp)
*
* @generated from field: int32 created_time = 2;
*/
createdTime: number;
/**
* Transaction hash
*
* @generated from field: string tx_hash = 3;
*/
txHash: string;
/**
* Sell token details
*
* @generated from field: gfxcafe.oku.account.v1.TokenDetails sell_token = 4;
*/
sellToken?: TokenDetails;
/**
* Buy token details
*
* @generated from field: gfxcafe.oku.account.v1.TokenDetails buy_token = 5;
*/
buyToken?: TokenDetails;
/**
* Input side (BUY/SELL)
*
* @generated from field: string input_side = 6;
*/
inputSide: string;
/**
* Order status
*
* @generated from field: string status = 7;
*/
status: string;
/**
* Order type (limit/market/special)
*
* @generated from field: string type = 8;
*/
type: string;
/**
* Price
*
* @generated from field: double price = 9;
*/
price: number;
/**
* Is price flipped
*
* @generated from field: bool is_flipped = 10;
*/
isFlipped: boolean;
/**
* Pool address (for limit orders)
*
* @generated from field: string pool = 11;
*/
pool: string;
/**
* Limit order details
*
* @generated from field: gfxcafe.oku.account.v1.BatchOrderViewData limit_order_full = 12;
*/
limitOrderFull?: BatchOrderViewData;
/**
* Amount filled
*
* @generated from field: string amount_filled = 13;
*/
amountFilled: string;
/**
* Total amount
*
* @generated from field: string amount_total = 14;
*/
amountTotal: string;
/**
* V2 order data
*
* @generated from field: gfxcafe.oku.account.v1.V2OrderData v2_order_data = 15;
*/
v2OrderData?: V2OrderData;
};
/**
* Describes the message gfxcafe.oku.account.v1.SpecialOrder.
* Use `create(SpecialOrderSchema)` to create a new message.
*/
export const SpecialOrderSchema: GenMessage<SpecialOrder> = /*@__PURE__*/
messageDesc(file_gfxcafe_oku_account_v1_specialorders, 2);
/**
* TokenDetails represents token information with amount
*
* @generated from message gfxcafe.oku.account.v1.TokenDetails
*/
export type TokenDetails = Message<"gfxcafe.oku.account.v1.TokenDetails"> & {
/**
* Token address
*
* @generated from field: string address = 1;
*/
address: string;
/**
* Token amount
*
* @generated from field: double amount = 2;
*/
amount: number;
};
/**
* Describes the message gfxcafe.oku.account.v1.TokenDetails.
* Use `create(TokenDetailsSchema)` to create a new message.
*/
export const TokenDetailsSchema: GenMessage<TokenDetails> = /*@__PURE__*/
messageDesc(file_gfxcafe_oku_account_v1_specialorders, 3);
/**
* BatchOrderViewData represents batch order details
*
* @generated from message gfxcafe.oku.account.v1.BatchOrderViewData
*/
export type BatchOrderViewData = Message<"gfxcafe.oku.account.v1.BatchOrderViewData"> & {
/**
* Order ID
*
* @generated from field: string id = 1;
*/
id: string;
/**
* Direction
*
* @generated from field: bool direction = 2;
*/
direction: boolean;
/**
* Upper tick
*
* @generated from field: int32 tick_upper = 3;
*/
tickUpper: number;
/**
* Lower tick
*
* @generated from field: int32 tick_lower = 4;
*/
tickLower: number;
/**
* User count
*
* @generated from field: uint64 user_count = 5;
*/
userCount: bigint;
/**
* Batch ID
*
* @generated from field: string batch_id = 6;
*/
batchId: string;
/**
* Token0 amount
*
* @generated from field: string token0_amount = 7;
*/
token0Amount: string;
/**
* Token1 amount
*
* @generated from field: string token1_amount = 8;
*/
token1Amount: string;
/**
* Head
*
* @generated from field: string head = 9;
*/
head: string;
/**
* Tail
*
* @generated from field: string tail = 10;
*/
tail: string;
/**
* Base currency
*
* @generated from field: string base_currency = 11;
*/
baseCurrency: string;
/**
* Quote currency
*
* @generated from field: string quote_currency = 12;
*/
quoteCurrency: string;
};
/**
* Describes the message gfxcafe.oku.account.v1.BatchOrderViewData.
* Use `create(BatchOrderViewDataSchema)` to create a new message.
*/
export const BatchOrderViewDataSchema: GenMessage<BatchOrderViewData> = /*@__PURE__*/
messageDesc(file_gfxcafe_oku_account_v1_specialorders, 4);
/**
* V2OrderData represents additional data for V2 orders
*
* @generated from message gfxcafe.oku.account.v1.V2OrderData
*/
export type V2OrderData = Message<"gfxcafe.oku.account.v1.V2OrderData"> & {
/**
* Order ID
*
* @generated from field: string order_id = 1;
*/
orderId: string;
/**
* Take profit price
*
* @generated from field: string take_profit_price = 2;
*/
takeProfitPrice: string;
/**
* Stop price
*
* @generated from field: string stop_price = 3;
*/
stopPrice: string;
/**
* Stop limit price
*
* @generated from field: string stop_limit_price = 4;
*/
stopLimitPrice: string;
/**
* Take profit slippage
*
* @generated from field: int32 take_profit_slippage = 5;
*/
takeProfitSlippage: number;
/**
* Stop loss slippage
*
* @generated from field: int32 stop_loss_slippage = 6;
*/
stopLossSlippage: number;
/**
* Amount out
*
* @generated from field: string amount_out = 7;
*/
amountOut: string;
};
/**
* Describes the message gfxcafe.oku.account.v1.V2OrderData.
* Use `create(V2OrderDataSchema)` to create a new message.
*/
export const V2OrderDataSchema: GenMessage<V2OrderData> = /*@__PURE__*/
messageDesc(file_gfxcafe_oku_account_v1_specialorders, 5);
/**
* SpecialOrdersService provides unified order history functionality
*
* @generated from service gfxcafe.oku.account.v1.SpecialOrdersService
*/
export const SpecialOrdersService: GenService<{
/**
* Get order history across multiple chains (/specialorders/history)
*
* @generated from rpc gfxcafe.oku.account.v1.SpecialOrdersService.History
*/
history: {
methodKind: "unary";
input: typeof HistoryRequestSchema;
output: typeof HistoryResponseSchema;
},
}> = /*@__PURE__*/
serviceDesc(file_gfxcafe_oku_account_v1_specialorders, 0);