@uniswap/client-data-api 0.0.136 → 0.0.138

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
2
  import { Message, proto3 } from "@bufbuild/protobuf";
3
3
  import { TimestampedValue, TokenType } from "../v1/types_pb.js";
4
+ import { ProtocolVersion } from "../v1/poolTypes_pb.js";
4
5
  /**
5
6
  * @generated from enum data.v2.TokensOrderBy
6
7
  */
@@ -204,6 +205,87 @@ export declare enum HistoryDuration {
204
205
  */
205
206
  MAX = 6
206
207
  }
208
+ /**
209
+ * @generated from enum data.v2.PoolsOrderBy
210
+ */
211
+ export declare enum PoolsOrderBy {
212
+ /**
213
+ * @generated from enum value: POOLS_ORDER_BY_UNSPECIFIED = 0;
214
+ */
215
+ UNSPECIFIED = 0,
216
+ /**
217
+ * default
218
+ *
219
+ * @generated from enum value: POOLS_ORDER_BY_TVL = 1;
220
+ */
221
+ TVL = 1,
222
+ /**
223
+ * @generated from enum value: POOLS_ORDER_BY_VOLUME_1D = 2;
224
+ */
225
+ VOLUME_1D = 2,
226
+ /**
227
+ * @generated from enum value: POOLS_ORDER_BY_VOLUME_30D = 3;
228
+ */
229
+ VOLUME_30D = 3,
230
+ /**
231
+ * fee revenue / TVL; excludes reward_apr
232
+ *
233
+ * @generated from enum value: POOLS_ORDER_BY_APR = 4;
234
+ */
235
+ APR = 4,
236
+ /**
237
+ * volume_1d / tvl; capital-efficiency proxy
238
+ *
239
+ * @generated from enum value: POOLS_ORDER_BY_VOLUME_1D_TVL_RATIO = 5;
240
+ */
241
+ VOLUME_1D_TVL_RATIO = 5
242
+ }
243
+ /**
244
+ * @generated from enum data.v2.PoolTokenLogicalOperator
245
+ */
246
+ export declare enum PoolTokenLogicalOperator {
247
+ /**
248
+ * treated as OR
249
+ *
250
+ * @generated from enum value: POOL_TOKEN_LOGICAL_OPERATOR_UNSPECIFIED = 0;
251
+ */
252
+ UNSPECIFIED = 0,
253
+ /**
254
+ * @generated from enum value: POOL_TOKEN_LOGICAL_OPERATOR_OR = 1;
255
+ */
256
+ OR = 1,
257
+ /**
258
+ * invalid with more than 2 tokens
259
+ *
260
+ * @generated from enum value: POOL_TOKEN_LOGICAL_OPERATOR_AND = 2;
261
+ */
262
+ AND = 2
263
+ }
264
+ /**
265
+ * @generated from enum data.v2.TransactionEventType
266
+ */
267
+ export declare enum TransactionEventType {
268
+ /**
269
+ * @generated from enum value: TRANSACTION_EVENT_TYPE_UNSPECIFIED = 0;
270
+ */
271
+ UNSPECIFIED = 0,
272
+ /**
273
+ * @generated from enum value: TRANSACTION_EVENT_TYPE_SWAP = 1;
274
+ */
275
+ SWAP = 1,
276
+ /**
277
+ * mint / positive modify_liquidity
278
+ *
279
+ * @generated from enum value: TRANSACTION_EVENT_TYPE_ADD = 2;
280
+ */
281
+ ADD = 2,
282
+ /**
283
+ * burn / negative modify_liquidity
284
+ *
285
+ * @generated from enum value: TRANSACTION_EVENT_TYPE_REMOVE = 3;
286
+ */
287
+ REMOVE = 3
288
+ }
207
289
  /**
208
290
  * Sort field for ListLaunches; UNSPECIFIED defaults to LAUNCHED_AT (newest first).
209
291
  *
@@ -719,6 +801,369 @@ export declare class MultichainToken extends Message<MultichainToken> {
719
801
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MultichainToken;
720
802
  static equals(a: MultichainToken | PlainMessage<MultichainToken> | undefined, b: MultichainToken | PlainMessage<MultichainToken> | undefined): boolean;
721
803
  }
804
+ /**
805
+ * @generated from message data.v2.PoolsSort
806
+ */
807
+ export declare class PoolsSort extends Message<PoolsSort> {
808
+ /**
809
+ * default: POOLS_ORDER_BY_TVL
810
+ *
811
+ * @generated from field: optional data.v2.PoolsOrderBy order_by = 1;
812
+ */
813
+ orderBy?: PoolsOrderBy;
814
+ /**
815
+ * default false (highest first)
816
+ *
817
+ * @generated from field: optional bool ascending = 2;
818
+ */
819
+ ascending?: boolean;
820
+ constructor(data?: PartialMessage<PoolsSort>);
821
+ static readonly runtime: typeof proto3;
822
+ static readonly typeName = "data.v2.PoolsSort";
823
+ static readonly fields: FieldList;
824
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PoolsSort;
825
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PoolsSort;
826
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PoolsSort;
827
+ static equals(a: PoolsSort | PlainMessage<PoolsSort> | undefined, b: PoolsSort | PlainMessage<PoolsSort> | undefined): boolean;
828
+ }
829
+ /**
830
+ * Ranking stats for a pool.
831
+ * apr = annualised fee revenue / TVL.
832
+ * reward_apr = Merkl incentive yield (not a valid sort key).
833
+ * total_apr = apr + reward_apr treating null as 0; only null if both are null.
834
+ *
835
+ * @generated from message data.v2.PoolRankStats
836
+ */
837
+ export declare class PoolRankStats extends Message<PoolRankStats> {
838
+ /**
839
+ * @generated from field: optional double tvl = 1;
840
+ */
841
+ tvl?: number;
842
+ /**
843
+ * @generated from field: optional double volume_1d = 2;
844
+ */
845
+ volume1d?: number;
846
+ /**
847
+ * @generated from field: optional double volume_30d = 3;
848
+ */
849
+ volume30d?: number;
850
+ /**
851
+ * @generated from field: optional double apr = 4;
852
+ */
853
+ apr?: number;
854
+ /**
855
+ * @generated from field: optional double reward_apr = 5;
856
+ */
857
+ rewardApr?: number;
858
+ /**
859
+ * @generated from field: optional double total_apr = 6;
860
+ */
861
+ totalApr?: number;
862
+ /**
863
+ * volume_1d / tvl; null if tvl is zero
864
+ *
865
+ * @generated from field: optional double volume_1d_tvl_ratio = 7;
866
+ */
867
+ volume1dTvlRatio?: number;
868
+ constructor(data?: PartialMessage<PoolRankStats>);
869
+ static readonly runtime: typeof proto3;
870
+ static readonly typeName = "data.v2.PoolRankStats";
871
+ static readonly fields: FieldList;
872
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PoolRankStats;
873
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PoolRankStats;
874
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PoolRankStats;
875
+ static equals(a: PoolRankStats | PlainMessage<PoolRankStats> | undefined, b: PoolRankStats | PlainMessage<PoolRankStats> | undefined): boolean;
876
+ }
877
+ /**
878
+ * A pool with its protocol identity and token pair. No stats — stats live on
879
+ * RankedPool.
880
+ *
881
+ * @generated from message data.v2.Pool
882
+ */
883
+ export declare class Pool extends Message<Pool> {
884
+ /**
885
+ * @generated from field: uint32 chain_id = 1;
886
+ */
887
+ chainId: number;
888
+ /**
889
+ * checksummed pool address (V4: pool id hash)
890
+ *
891
+ * @generated from field: string pool_id = 2;
892
+ */
893
+ poolId: string;
894
+ /**
895
+ * @generated from field: data.v2.Token token0 = 3;
896
+ */
897
+ token0?: Token;
898
+ /**
899
+ * @generated from field: data.v2.Token token1 = 4;
900
+ */
901
+ token1?: Token;
902
+ /**
903
+ * @generated from field: pools.v1.ProtocolVersion protocol_version = 5;
904
+ */
905
+ protocolVersion: ProtocolVersion;
906
+ /**
907
+ * @generated from field: optional int32 tick_spacing = 6;
908
+ */
909
+ tickSpacing?: number;
910
+ /**
911
+ * pips; absent for V2 (fixed 0.3%) and dynamic-fee pools
912
+ *
913
+ * @generated from field: optional uint32 fee_tier = 7;
914
+ */
915
+ feeTier?: number;
916
+ /**
917
+ * true for V4 pools with dynamic fees
918
+ *
919
+ * @generated from field: bool is_dynamic_fee = 8;
920
+ */
921
+ isDynamicFee: boolean;
922
+ /**
923
+ * V4 only
924
+ *
925
+ * @generated from field: optional string hook_address = 9;
926
+ */
927
+ hookAddress?: string;
928
+ constructor(data?: PartialMessage<Pool>);
929
+ static readonly runtime: typeof proto3;
930
+ static readonly typeName = "data.v2.Pool";
931
+ static readonly fields: FieldList;
932
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Pool;
933
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Pool;
934
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Pool;
935
+ static equals(a: Pool | PlainMessage<Pool> | undefined, b: Pool | PlainMessage<Pool> | undefined): boolean;
936
+ }
937
+ /**
938
+ * @generated from message data.v2.PoolTokenFilter
939
+ */
940
+ export declare class PoolTokenFilter extends Message<PoolTokenFilter> {
941
+ /**
942
+ * checksummed EVM addresses
943
+ *
944
+ * @generated from field: repeated string tokens = 1;
945
+ */
946
+ tokens: string[];
947
+ /**
948
+ * @generated from field: data.v2.PoolTokenLogicalOperator logical_operator = 2;
949
+ */
950
+ logicalOperator: PoolTokenLogicalOperator;
951
+ constructor(data?: PartialMessage<PoolTokenFilter>);
952
+ static readonly runtime: typeof proto3;
953
+ static readonly typeName = "data.v2.PoolTokenFilter";
954
+ static readonly fields: FieldList;
955
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PoolTokenFilter;
956
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PoolTokenFilter;
957
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PoolTokenFilter;
958
+ static equals(a: PoolTokenFilter | PlainMessage<PoolTokenFilter> | undefined, b: PoolTokenFilter | PlainMessage<PoolTokenFilter> | undefined): boolean;
959
+ }
960
+ /**
961
+ * @generated from message data.v2.PoolStatRangeFilter
962
+ */
963
+ export declare class PoolStatRangeFilter extends Message<PoolStatRangeFilter> {
964
+ /**
965
+ * @generated from field: optional double min = 1;
966
+ */
967
+ min?: number;
968
+ /**
969
+ * @generated from field: optional double max = 2;
970
+ */
971
+ max?: number;
972
+ constructor(data?: PartialMessage<PoolStatRangeFilter>);
973
+ static readonly runtime: typeof proto3;
974
+ static readonly typeName = "data.v2.PoolStatRangeFilter";
975
+ static readonly fields: FieldList;
976
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PoolStatRangeFilter;
977
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PoolStatRangeFilter;
978
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PoolStatRangeFilter;
979
+ static equals(a: PoolStatRangeFilter | PlainMessage<PoolStatRangeFilter> | undefined, b: PoolStatRangeFilter | PlainMessage<PoolStatRangeFilter> | undefined): boolean;
980
+ }
981
+ /**
982
+ * @generated from message data.v2.PoolStatsFilter
983
+ */
984
+ export declare class PoolStatsFilter extends Message<PoolStatsFilter> {
985
+ /**
986
+ * @generated from field: optional data.v2.PoolStatRangeFilter tvl = 1;
987
+ */
988
+ tvl?: PoolStatRangeFilter;
989
+ /**
990
+ * @generated from field: optional data.v2.PoolStatRangeFilter apr = 2;
991
+ */
992
+ apr?: PoolStatRangeFilter;
993
+ /**
994
+ * @generated from field: optional data.v2.PoolStatRangeFilter volume_1d = 3;
995
+ */
996
+ volume1d?: PoolStatRangeFilter;
997
+ /**
998
+ * @generated from field: optional data.v2.PoolStatRangeFilter volume_30d = 4;
999
+ */
1000
+ volume30d?: PoolStatRangeFilter;
1001
+ constructor(data?: PartialMessage<PoolStatsFilter>);
1002
+ static readonly runtime: typeof proto3;
1003
+ static readonly typeName = "data.v2.PoolStatsFilter";
1004
+ static readonly fields: FieldList;
1005
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PoolStatsFilter;
1006
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PoolStatsFilter;
1007
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PoolStatsFilter;
1008
+ static equals(a: PoolStatsFilter | PlainMessage<PoolStatsFilter> | undefined, b: PoolStatsFilter | PlainMessage<PoolStatsFilter> | undefined): boolean;
1009
+ }
1010
+ /**
1011
+ * Server-side filters applied before ranking and pagination.
1012
+ *
1013
+ * @generated from message data.v2.PoolListFilter
1014
+ */
1015
+ export declare class PoolListFilter extends Message<PoolListFilter> {
1016
+ /**
1017
+ * if empty, all protocol versions
1018
+ *
1019
+ * @generated from field: repeated pools.v1.ProtocolVersion protocol_versions = 1;
1020
+ */
1021
+ protocolVersions: ProtocolVersion[];
1022
+ /**
1023
+ * default false (spam excluded)
1024
+ *
1025
+ * @generated from field: optional bool include_spam = 2;
1026
+ */
1027
+ includeSpam?: boolean;
1028
+ /**
1029
+ * @generated from field: optional data.v2.PoolTokenFilter token_filter = 3;
1030
+ */
1031
+ tokenFilter?: PoolTokenFilter;
1032
+ /**
1033
+ * @generated from field: optional data.v2.PoolStatsFilter stats_filter = 4;
1034
+ */
1035
+ statsFilter?: PoolStatsFilter;
1036
+ /**
1037
+ * e.g. [500, 3000, 10000]; never matches V2 pools
1038
+ *
1039
+ * @generated from field: repeated uint32 fee_tiers = 5;
1040
+ */
1041
+ feeTiers: number[];
1042
+ constructor(data?: PartialMessage<PoolListFilter>);
1043
+ static readonly runtime: typeof proto3;
1044
+ static readonly typeName = "data.v2.PoolListFilter";
1045
+ static readonly fields: FieldList;
1046
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PoolListFilter;
1047
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PoolListFilter;
1048
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PoolListFilter;
1049
+ static equals(a: PoolListFilter | PlainMessage<PoolListFilter> | undefined, b: PoolListFilter | PlainMessage<PoolListFilter> | undefined): boolean;
1050
+ }
1051
+ /**
1052
+ * Returned by ListPools — wraps a Pool with its ranking stats.
1053
+ *
1054
+ * @generated from message data.v2.RankedPool
1055
+ */
1056
+ export declare class RankedPool extends Message<RankedPool> {
1057
+ /**
1058
+ * @generated from field: data.v2.Pool pool = 1;
1059
+ */
1060
+ pool?: Pool;
1061
+ /**
1062
+ * @generated from field: data.v2.PoolRankStats stats = 2;
1063
+ */
1064
+ stats?: PoolRankStats;
1065
+ constructor(data?: PartialMessage<RankedPool>);
1066
+ static readonly runtime: typeof proto3;
1067
+ static readonly typeName = "data.v2.RankedPool";
1068
+ static readonly fields: FieldList;
1069
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RankedPool;
1070
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RankedPool;
1071
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RankedPool;
1072
+ static equals(a: RankedPool | PlainMessage<RankedPool> | undefined, b: RankedPool | PlainMessage<RankedPool> | undefined): boolean;
1073
+ }
1074
+ /**
1075
+ * One token side of a pool event. amount is absolute (always positive).
1076
+ * amount_usd = |amount| * price; 0 when price or decimals are unavailable.
1077
+ *
1078
+ * @generated from message data.v2.TransactionTokenSide
1079
+ */
1080
+ export declare class TransactionTokenSide extends Message<TransactionTokenSide> {
1081
+ /**
1082
+ * @generated from field: data.v2.Token token = 1;
1083
+ */
1084
+ token?: Token;
1085
+ /**
1086
+ * decimal-adjusted absolute amount, full precision; absent when decimals unavailable
1087
+ *
1088
+ * @generated from field: optional string amount = 2;
1089
+ */
1090
+ amount?: string;
1091
+ /**
1092
+ * @generated from field: double amount_usd = 3;
1093
+ */
1094
+ amountUsd: number;
1095
+ constructor(data?: PartialMessage<TransactionTokenSide>);
1096
+ static readonly runtime: typeof proto3;
1097
+ static readonly typeName = "data.v2.TransactionTokenSide";
1098
+ static readonly fields: FieldList;
1099
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TransactionTokenSide;
1100
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TransactionTokenSide;
1101
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TransactionTokenSide;
1102
+ static equals(a: TransactionTokenSide | PlainMessage<TransactionTokenSide> | undefined, b: TransactionTokenSide | PlainMessage<TransactionTokenSide> | undefined): boolean;
1103
+ }
1104
+ /**
1105
+ * A single on-chain event from the global protocol feed.
1106
+ *
1107
+ * @generated from message data.v2.UniswapTransaction
1108
+ */
1109
+ export declare class UniswapTransaction extends Message<UniswapTransaction> {
1110
+ /**
1111
+ * @generated from field: uint32 chain_id = 1;
1112
+ */
1113
+ chainId: number;
1114
+ /**
1115
+ * @generated from field: string tx_hash = 2;
1116
+ */
1117
+ txHash: string;
1118
+ /**
1119
+ * Unix epoch milliseconds
1120
+ *
1121
+ * @generated from field: int64 timestamp_ms = 3;
1122
+ */
1123
+ timestampMs: bigint;
1124
+ /**
1125
+ * @generated from field: data.v2.TransactionEventType event_type = 4;
1126
+ */
1127
+ eventType: TransactionEventType;
1128
+ /**
1129
+ * @generated from field: pools.v1.ProtocolVersion protocol_version = 5;
1130
+ */
1131
+ protocolVersion: ProtocolVersion;
1132
+ /**
1133
+ * pool address (V2/V3) or pool_id (V4)
1134
+ *
1135
+ * @generated from field: string pool_id = 6;
1136
+ */
1137
+ poolId: string;
1138
+ /**
1139
+ * @generated from field: data.v2.TransactionTokenSide token0 = 7;
1140
+ */
1141
+ token0?: TransactionTokenSide;
1142
+ /**
1143
+ * @generated from field: data.v2.TransactionTokenSide token1 = 8;
1144
+ */
1145
+ token1?: TransactionTokenSide;
1146
+ /**
1147
+ * swap = avg of both sides; add/remove = sum
1148
+ *
1149
+ * @generated from field: double amount_usd = 9;
1150
+ */
1151
+ amountUsd: number;
1152
+ /**
1153
+ * checksummed EVM address (tx_from)
1154
+ *
1155
+ * @generated from field: string wallet_address = 10;
1156
+ */
1157
+ walletAddress: string;
1158
+ constructor(data?: PartialMessage<UniswapTransaction>);
1159
+ static readonly runtime: typeof proto3;
1160
+ static readonly typeName = "data.v2.UniswapTransaction";
1161
+ static readonly fields: FieldList;
1162
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UniswapTransaction;
1163
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UniswapTransaction;
1164
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UniswapTransaction;
1165
+ static equals(a: UniswapTransaction | PlainMessage<UniswapTransaction> | undefined, b: UniswapTransaction | PlainMessage<UniswapTransaction> | undefined): boolean;
1166
+ }
722
1167
  /**
723
1168
  * @generated from message data.v2.Token
724
1169
  */