@okutrade/account-api
Version:
TypeScript client for OKU Account API using Connect-ES
405 lines (404 loc) • 11.9 kB
TypeScript
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv1";
import type { Timestamp } from "@bufbuild/protobuf/wkt";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file gfxcafe/oku/account/v1/rewards.proto.
*/
export declare const file_gfxcafe_oku_account_v1_rewards: GenFile;
/**
* ChainTimestampRequest for general rewards
*
* @generated from message gfxcafe.oku.account.v1.ChainTimestampRequest
*/
export type ChainTimestampRequest = Message<"gfxcafe.oku.account.v1.ChainTimestampRequest"> & {
/**
* Chain identifier (e.g., "linea", "bob")
*
* @generated from field: string chain = 1;
*/
chain: string;
/**
* Timestamp - if not provided, returns latest data
*
* @generated from field: google.protobuf.Timestamp timestamp = 2;
*/
timestamp?: Timestamp;
};
/**
* Describes the message gfxcafe.oku.account.v1.ChainTimestampRequest.
* Use `create(ChainTimestampRequestSchema)` to create a new message.
*/
export declare const ChainTimestampRequestSchema: GenMessage<ChainTimestampRequest>;
/**
* User asset TVL data
*
* @generated from message gfxcafe.oku.account.v1.UserAssetTvl
*/
export type UserAssetTvl = Message<"gfxcafe.oku.account.v1.UserAssetTvl"> & {
/**
* User address
*
* @generated from field: string user_address = 1;
*/
userAddress: string;
/**
* Token address
*
* @generated from field: string token_address = 2;
*/
tokenAddress: string;
/**
* Token balance
*
* @generated from field: string token_balance = 3;
*/
tokenBalance: string;
};
/**
* Describes the message gfxcafe.oku.account.v1.UserAssetTvl.
* Use `create(UserAssetTvlSchema)` to create a new message.
*/
export declare const UserAssetTvlSchema: GenMessage<UserAssetTvl>;
/**
* User TVL data
*
* @generated from message gfxcafe.oku.account.v1.UserTvl
*/
export type UserTvl = Message<"gfxcafe.oku.account.v1.UserTvl"> & {
/**
* User address
*
* @generated from field: string user_address = 1;
*/
userAddress: string;
/**
* Total value locked
*
* @generated from field: double tvl = 2;
*/
tvl: number;
};
/**
* Describes the message gfxcafe.oku.account.v1.UserTvl.
* Use `create(UserTvlSchema)` to create a new message.
*/
export declare const UserTvlSchema: GenMessage<UserTvl>;
/**
* ChainTimestampResponse with rewards data
*
* @generated from message gfxcafe.oku.account.v1.ChainTimestampResponse
*/
export type ChainTimestampResponse = Message<"gfxcafe.oku.account.v1.ChainTimestampResponse"> & {
/**
* List of user asset TVLs (for Linea)
*
* @generated from field: repeated gfxcafe.oku.account.v1.UserAssetTvl user_asset_tvls = 1;
*/
userAssetTvls: UserAssetTvl[];
/**
* List of user TVLs (for Bob)
*
* @generated from field: repeated gfxcafe.oku.account.v1.UserTvl user_tvls = 2;
*/
userTvls: UserTvl[];
};
/**
* Describes the message gfxcafe.oku.account.v1.ChainTimestampResponse.
* Use `create(ChainTimestampResponseSchema)` to create a new message.
*/
export declare const ChainTimestampResponseSchema: GenMessage<ChainTimestampResponse>;
/**
* SolvChainTimestampRequest for Solv rewards
*
* @generated from message gfxcafe.oku.account.v1.SolvChainTimestampRequest
*/
export type SolvChainTimestampRequest = Message<"gfxcafe.oku.account.v1.SolvChainTimestampRequest"> & {
/**
* Chain identifier (e.g., "bob", "rootstock")
*
* @generated from field: string chain = 1;
*/
chain: string;
/**
* Timestamp - if not provided, returns latest data
*
* @generated from field: google.protobuf.Timestamp timestamp = 2;
*/
timestamp?: Timestamp;
/**
* Optional pool address filter
*
* @generated from field: string pool = 3;
*/
pool: string;
};
/**
* Describes the message gfxcafe.oku.account.v1.SolvChainTimestampRequest.
* Use `create(SolvChainTimestampRequestSchema)` to create a new message.
*/
export declare const SolvChainTimestampRequestSchema: GenMessage<SolvChainTimestampRequest>;
/**
* Position data for Solv rewards
*
* @generated from message gfxcafe.oku.account.v1.SolvPosition
*/
export type SolvPosition = Message<"gfxcafe.oku.account.v1.SolvPosition"> & {
/**
* Block number
*
* @generated from field: uint64 block = 1;
*/
block: bigint;
/**
* Timestamp
*
* @generated from field: google.protobuf.Timestamp ts = 2;
*/
ts?: Timestamp;
/**
* User address
*
* @generated from field: string user_address = 3;
*/
userAddress: string;
/**
* Pool address
*
* @generated from field: string pool_address = 4;
*/
poolAddress: string;
/**
* Token ID (for NFT positions)
*
* @generated from field: int32 token_id = 5;
*/
tokenId: number;
/**
* Token addresses
*
* @generated from field: string token0 = 6;
*/
token0: string;
/**
* @generated from field: string token1 = 7;
*/
token1: string;
/**
* Token amounts
*
* @generated from field: double amount0 = 8;
*/
amount0: number;
/**
* @generated from field: double amount1 = 9;
*/
amount1: number;
};
/**
* Describes the message gfxcafe.oku.account.v1.SolvPosition.
* Use `create(SolvPositionSchema)` to create a new message.
*/
export declare const SolvPositionSchema: GenMessage<SolvPosition>;
/**
* SolvChainTimestampResponse with Solv rewards data
*
* @generated from message gfxcafe.oku.account.v1.SolvChainTimestampResponse
*/
export type SolvChainTimestampResponse = Message<"gfxcafe.oku.account.v1.SolvChainTimestampResponse"> & {
/**
* List of positions
*
* @generated from field: repeated gfxcafe.oku.account.v1.SolvPosition positions = 1;
*/
positions: SolvPosition[];
};
/**
* Describes the message gfxcafe.oku.account.v1.SolvChainTimestampResponse.
* Use `create(SolvChainTimestampResponseSchema)` to create a new message.
*/
export declare const SolvChainTimestampResponseSchema: GenMessage<SolvChainTimestampResponse>;
/**
* BedrockChainTimestampRequest for Bedrock rewards
*
* @generated from message gfxcafe.oku.account.v1.BedrockChainTimestampRequest
*/
export type BedrockChainTimestampRequest = Message<"gfxcafe.oku.account.v1.BedrockChainTimestampRequest"> & {
/**
* Chain identifier (e.g., "bob")
*
* @generated from field: string chain = 1;
*/
chain: string;
/**
* Timestamp - if not provided, returns latest data
*
* @generated from field: google.protobuf.Timestamp timestamp = 2;
*/
timestamp?: Timestamp;
};
/**
* Describes the message gfxcafe.oku.account.v1.BedrockChainTimestampRequest.
* Use `create(BedrockChainTimestampRequestSchema)` to create a new message.
*/
export declare const BedrockChainTimestampRequestSchema: GenMessage<BedrockChainTimestampRequest>;
/**
* User totals for Bedrock rewards
*
* @generated from message gfxcafe.oku.account.v1.UserTotal
*/
export type UserTotal = Message<"gfxcafe.oku.account.v1.UserTotal"> & {
/**
* User address
*
* @generated from field: string user = 1;
*/
user: string;
/**
* Total amount
*
* @generated from field: string amount = 2;
*/
amount: string;
};
/**
* Describes the message gfxcafe.oku.account.v1.UserTotal.
* Use `create(UserTotalSchema)` to create a new message.
*/
export declare const UserTotalSchema: GenMessage<UserTotal>;
/**
* BedrockChainTimestampResponse with Bedrock rewards data
*
* @generated from message gfxcafe.oku.account.v1.BedrockChainTimestampResponse
*/
export type BedrockChainTimestampResponse = Message<"gfxcafe.oku.account.v1.BedrockChainTimestampResponse"> & {
/**
* List of user totals
*
* @generated from field: repeated gfxcafe.oku.account.v1.UserTotal user_totals = 1;
*/
userTotals: UserTotal[];
};
/**
* Describes the message gfxcafe.oku.account.v1.BedrockChainTimestampResponse.
* Use `create(BedrockChainTimestampResponseSchema)` to create a new message.
*/
export declare const BedrockChainTimestampResponseSchema: GenMessage<BedrockChainTimestampResponse>;
/**
* VolumeChainRequest for user volume
*
* @generated from message gfxcafe.oku.account.v1.VolumeChainRequest
*/
export type VolumeChainRequest = Message<"gfxcafe.oku.account.v1.VolumeChainRequest"> & {
/**
* Chain identifier (e.g., "bob")
*
* @generated from field: string chain = 1;
*/
chain: string;
/**
* Start time
*
* @generated from field: google.protobuf.Timestamp start_time = 2;
*/
startTime?: Timestamp;
/**
* End time
*
* @generated from field: google.protobuf.Timestamp end_time = 3;
*/
endTime?: Timestamp;
};
/**
* Describes the message gfxcafe.oku.account.v1.VolumeChainRequest.
* Use `create(VolumeChainRequestSchema)` to create a new message.
*/
export declare const VolumeChainRequestSchema: GenMessage<VolumeChainRequest>;
/**
* User volume data
*
* @generated from message gfxcafe.oku.account.v1.UserVolume
*/
export type UserVolume = Message<"gfxcafe.oku.account.v1.UserVolume"> & {
/**
* User address
*
* @generated from field: string user = 1;
*/
user: string;
/**
* Volume
*
* @generated from field: double volume = 2;
*/
volume: number;
};
/**
* Describes the message gfxcafe.oku.account.v1.UserVolume.
* Use `create(UserVolumeSchema)` to create a new message.
*/
export declare const UserVolumeSchema: GenMessage<UserVolume>;
/**
* VolumeChainResponse with volume data
*
* @generated from message gfxcafe.oku.account.v1.VolumeChainResponse
*/
export type VolumeChainResponse = Message<"gfxcafe.oku.account.v1.VolumeChainResponse"> & {
/**
* List of user volumes
*
* @generated from field: repeated gfxcafe.oku.account.v1.UserVolume volumes = 1;
*/
volumes: UserVolume[];
};
/**
* Describes the message gfxcafe.oku.account.v1.VolumeChainResponse.
* Use `create(VolumeChainResponseSchema)` to create a new message.
*/
export declare const VolumeChainResponseSchema: GenMessage<VolumeChainResponse>;
/**
* RewardsService provides rewards data
*
* @generated from service gfxcafe.oku.account.v1.RewardsService
*/
export declare const RewardsService: GenService<{
/**
* Get Solv protocol rewards (/rewards/solv/{chain}/{timestamp})
*
* @generated from rpc gfxcafe.oku.account.v1.RewardsService.SolvChainTimestamp
*/
solvChainTimestamp: {
methodKind: "unary";
input: typeof SolvChainTimestampRequestSchema;
output: typeof SolvChainTimestampResponseSchema;
};
/**
* Get Bedrock rewards (/rewards/bedrock/{chain}/{timestamp})
*
* @generated from rpc gfxcafe.oku.account.v1.RewardsService.BedrockChainTimestamp
*/
bedrockChainTimestamp: {
methodKind: "unary";
input: typeof BedrockChainTimestampRequestSchema;
output: typeof BedrockChainTimestampResponseSchema;
};
/**
* Get general rewards data (/rewards/{chain}/{timestamp})
*
* @generated from rpc gfxcafe.oku.account.v1.RewardsService.ChainTimestamp
*/
chainTimestamp: {
methodKind: "unary";
input: typeof ChainTimestampRequestSchema;
output: typeof ChainTimestampResponseSchema;
};
/**
* Get user volume data (/rewards/volume/{chain})
*
* @generated from rpc gfxcafe.oku.account.v1.RewardsService.VolumeChain
*/
volumeChain: {
methodKind: "unary";
input: typeof VolumeChainRequestSchema;
output: typeof VolumeChainResponseSchema;
};
}>;