@okutrade/account-api
Version:
TypeScript client for OKU Account API using Connect-ES
213 lines (212 loc) • 5.36 kB
TypeScript
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
import type { Address } from "./common_pb.js";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file gfxcafe/oku/account/v1/canoe.proto.
*/
export declare const file_gfxcafe_oku_account_v1_canoe: GenFile;
/**
* SwapRequest for recording swap quotes
*
* @generated from message gfxcafe.oku.account.v1.SwapRequest
*/
export type SwapRequest = Message<"gfxcafe.oku.account.v1.SwapRequest"> & {
/**
* Quote ID
*
* @generated from field: string id = 1;
*/
id: string;
/**
* Router/market name
*
* @generated from field: string market = 2;
*/
market: string;
/**
* Chain ID
*
* @generated from field: int32 chain_id = 3;
*/
chainId: number;
/**
* Input token address
*
* @generated from field: gfxcafe.oku.account.v1.Address in_token = 4;
*/
inToken?: Address;
/**
* Output token address
*
* @generated from field: gfxcafe.oku.account.v1.Address out_token = 5;
*/
outToken?: Address;
/**
* Input amount
*
* @generated from field: string in_amount = 6;
*/
inAmount: string;
/**
* Output amount
*
* @generated from field: string out_amount = 7;
*/
outAmount: string;
/**
* Input USD value
*
* @generated from field: double in_usd_value = 8;
*/
inUsdValue: number;
/**
* Output USD value
*
* @generated from field: double out_usd_value = 9;
*/
outUsdValue: number;
/**
* Sender address
*
* @generated from field: gfxcafe.oku.account.v1.Address sender = 10;
*/
sender?: Address;
/**
* Transaction calldata
*
* @generated from field: string calldata = 11;
*/
calldata: string;
};
/**
* Describes the message gfxcafe.oku.account.v1.SwapRequest.
* Use `create(SwapRequestSchema)` to create a new message.
*/
export declare const SwapRequestSchema: GenMessage<SwapRequest>;
/**
* SwapResponse (empty)
*
* @generated from message gfxcafe.oku.account.v1.SwapResponse
*/
export type SwapResponse = Message<"gfxcafe.oku.account.v1.SwapResponse"> & {};
/**
* Describes the message gfxcafe.oku.account.v1.SwapResponse.
* Use `create(SwapResponseSchema)` to create a new message.
*/
export declare const SwapResponseSchema: GenMessage<SwapResponse>;
/**
* BridgeRequest for recording bridge quotes
*
* @generated from message gfxcafe.oku.account.v1.BridgeRequest
*/
export type BridgeRequest = Message<"gfxcafe.oku.account.v1.BridgeRequest"> & {
/**
* Quote ID
*
* @generated from field: string id = 1;
*/
id: string;
/**
* Input chain ID
*
* @generated from field: int32 in_chain_id = 2;
*/
inChainId: number;
/**
* Output chain ID
*
* @generated from field: int32 out_chain_id = 3;
*/
outChainId: number;
/**
* Input token address
*
* @generated from field: gfxcafe.oku.account.v1.Address in_token = 4;
*/
inToken?: Address;
/**
* Output token address
*
* @generated from field: gfxcafe.oku.account.v1.Address out_token = 5;
*/
outToken?: Address;
/**
* Input amount
*
* @generated from field: string in_amount = 6;
*/
inAmount: string;
/**
* Output amount
*
* @generated from field: string out_amount = 7;
*/
outAmount: string;
/**
* Input USD value
*
* @generated from field: double in_usd_value = 8;
*/
inUsdValue: number;
/**
* Output USD value
*
* @generated from field: double out_usd_value = 9;
*/
outUsdValue: number;
/**
* Bridge name
*
* @generated from field: string bridge = 10;
*/
bridge: string;
/**
* Sender address
*
* @generated from field: gfxcafe.oku.account.v1.Address sender = 11;
*/
sender?: Address;
};
/**
* Describes the message gfxcafe.oku.account.v1.BridgeRequest.
* Use `create(BridgeRequestSchema)` to create a new message.
*/
export declare const BridgeRequestSchema: GenMessage<BridgeRequest>;
/**
* BridgeResponse (empty)
*
* @generated from message gfxcafe.oku.account.v1.BridgeResponse
*/
export type BridgeResponse = Message<"gfxcafe.oku.account.v1.BridgeResponse"> & {};
/**
* Describes the message gfxcafe.oku.account.v1.BridgeResponse.
* Use `create(BridgeResponseSchema)` to create a new message.
*/
export declare const BridgeResponseSchema: GenMessage<BridgeResponse>;
/**
* CanoeService provides quote tracking functionality
*
* @generated from service gfxcafe.oku.account.v1.CanoeService
*/
export declare const CanoeService: GenService<{
/**
* Record a swap quote (/canoe/swap)
*
* @generated from rpc gfxcafe.oku.account.v1.CanoeService.Swap
*/
swap: {
methodKind: "unary";
input: typeof SwapRequestSchema;
output: typeof SwapResponseSchema;
};
/**
* Record a bridge quote (/canoe/bridge)
*
* @generated from rpc gfxcafe.oku.account.v1.CanoeService.Bridge
*/
bridge: {
methodKind: "unary";
input: typeof BridgeRequestSchema;
output: typeof BridgeResponseSchema;
};
}>;