@floorlaunchpad/sdk 0.3.2 → 0.4.1

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/README.md +16 -0
  3. package/dist/abi/evm.gen.js +6 -1
  4. package/dist/abi/solana.gen.js +1 -1
  5. package/dist/client/evm/index.js +16 -2
  6. package/dist/client/solana/index.js +31 -14
  7. package/dist/config/generated.js +26864 -402
  8. package/dist/config/registry.gen.js +33 -2
  9. package/dist/evm/chains.js +85 -16
  10. package/dist/evm/floor/abi.gen.js +1 -1
  11. package/dist/evm/floor/events.js +9 -1
  12. package/dist/evm/floor/legacy-events.js +25 -0
  13. package/dist/evm/router.js +25 -1
  14. package/dist/evm/squid.js +9 -9
  15. package/dist/evm/zap.js +148 -35
  16. package/dist/indexer/bodies.js +96 -17
  17. package/dist/indexer/client.js +36 -14
  18. package/dist/indexer/contract.js +178 -28
  19. package/dist/indexer/partners.js +3 -2
  20. package/dist/indexer/paths.js +87 -29
  21. package/dist/indexer/read.js +30 -15
  22. package/dist/indexer/search.js +130 -0
  23. package/dist/indexer/stack-edge.js +35 -0
  24. package/dist/indexer/stream.js +70 -23
  25. package/dist/math/v2/split.js +11 -3
  26. package/dist/solana/floor/events.js +1 -1
  27. package/dist/solana/floor/genesis.js +9 -3
  28. package/dist/solana/floor/instructions.js +14 -5
  29. package/dist/solana/floor/registry.js +4 -0
  30. package/dist/v2/devbuy.js +6 -4
  31. package/dist/v2/presetRowEvm.js +21 -2
  32. package/dist/v2/solana.js +17 -2
  33. package/dist/v2/tx/solana.js +1 -1
  34. package/docs/aggregator.md +22 -0
  35. package/docs/bot.md +44 -1
  36. package/docs/cursor-pages.md +58 -0
  37. package/docs/floor-line.md +9 -4
  38. package/docs/frontend.md +2 -0
  39. package/docs/wallet.md +2 -0
  40. package/examples/floor-line.html +6 -6
  41. package/package.json +1 -1
  42. package/src/abi/evm.gen.ts +6 -1
  43. package/src/abi/solana.gen.ts +1 -1
  44. package/src/client/evm/index.ts +16 -2
  45. package/src/client/solana/index.ts +31 -14
  46. package/src/client/types.ts +1 -1
  47. package/src/config/generated.ts +26864 -402
  48. package/src/config/index.ts +9 -2
  49. package/src/config/registry.gen.ts +33 -2
  50. package/src/events/types.gen.ts +2 -1
  51. package/src/evm/chains.ts +94 -15
  52. package/src/evm/floor/abi.gen.ts +1 -1
  53. package/src/evm/floor/events.ts +11 -1
  54. package/src/evm/floor/legacy-events.ts +27 -0
  55. package/src/evm/router.ts +26 -1
  56. package/src/evm/squid.ts +9 -9
  57. package/src/evm/zap.ts +185 -36
  58. package/src/indexer/bodies.ts +106 -17
  59. package/src/indexer/client.ts +56 -30
  60. package/src/indexer/contract.ts +197 -29
  61. package/src/indexer/partners.ts +3 -2
  62. package/src/indexer/paths.ts +131 -29
  63. package/src/indexer/read.ts +36 -17
  64. package/src/indexer/search.ts +138 -0
  65. package/src/indexer/stack-edge.ts +46 -0
  66. package/src/indexer/stream.ts +78 -24
  67. package/src/math/v2/split.ts +11 -3
  68. package/src/solana/floor/events.ts +1 -1
  69. package/src/solana/floor/genesis.ts +8 -2
  70. package/src/solana/floor/instructions.ts +13 -5
  71. package/src/solana/floor/registry.ts +4 -0
  72. package/src/v2/devbuy.ts +6 -4
  73. package/src/v2/presetRowEvm.ts +21 -2
  74. package/src/v2/solana.ts +20 -3
  75. package/src/v2/tx/solana.ts +1 -1
@@ -3,7 +3,8 @@
3
3
  import { unknown } from "./decode.js";
4
4
  import * as B from "./bodies.js";
5
5
  import * as P from "./partners.js";
6
- import { FIRSTS_MAX, IDS_MAX, LAUNCHES_PAGE_MAX, LAUNCH_SORTS, STREAM_STATE_MAX } from "./paths.js";
6
+ import { CANDLES_MANY_IDS_MAX, CANDLES_MANY_LIMIT_DEFAULT, CANDLES_MANY_ROWS_MAX, FIRSTS_MAX, IDS_MAX, LAUNCH_LISTS_QUOTES_MAX, LAUNCH_LISTS_ROWS_MAX, INBOX_PAGE_DEFAULT, INBOX_PAGE_MAX, LAUNCHES_PAGE_DEFAULT, LAUNCHES_PAGE_MAX, LAUNCH_CURSOR_MAX, LAUNCH_SORTS, PRESET_FILTER_MAX, STREAM_STATE_MAX, WALLET_CURSOR_MAX, WALLET_PAGE_DEFAULT, WALLET_PAGE_MAX } from "./paths.js";
7
+ import { SEARCH_PAGE_DEFAULT, SEARCH_PAGE_MAX, SEARCH_Q_MAX } from "./search.js";
7
8
 
8
9
  export const UNITS = {
9
10
  site: "raw quote base units, token math units (6 dp), Q64.64 prices, unix s; bigint as decimal strings; USD as decimal strings",
@@ -64,6 +65,15 @@ const limit = (dflt , max ) => ({ kind: "limit", limit: { default:
64
65
  const cursor = (dflt , max ) => ({ kind: "cursor", limit: { default: dflt, max }, cursor: "before", next: "next" }) ;
65
66
  const LIMIT = (dflt , max ) => ({ kind: "int", doc: "rows", min: 1, max, default: dflt });
66
67
  const BEFORE = { kind: "cursor", doc: "a block, or a row id <block>:<txnIndex>:<eventIndex> (a page's next): rows strictly before it" };
68
+ const keyset = (dflt , max ) => ({ kind: "keyset", limit: { default: dflt, max }, cursor: "cursor", next: "next" }) ;
69
+ const PRESETS = { kind: "list", doc: "only launches of these presets (ids 0..255)", max: PRESET_FILTER_MAX, item: { kind: "int", min: 0, max: 255 } } ;
70
+
71
+ const WALLET_PAGE = { kind: "keyset", limit: { default: WALLET_PAGE_DEFAULT, max: WALLET_PAGE_MAX }, cursor: "cursor", next: "next", optIn: true } ;
72
+ const WALLET_PAGE_KEYS = (cursorDoc ) => ({
73
+ limit: { kind: "int", doc: "rows (asks a page)", min: 1, max: WALLET_PAGE_MAX, default: WALLET_PAGE_DEFAULT },
74
+ cursor: { kind: "string", doc: `a page's next (asks a page): ${cursorDoc}`, max: WALLET_CURSOR_MAX },
75
+ });
76
+ const KEYSET_CURSOR = (without ) => ({ kind: "string", doc: "a page's next: the rows after its last one (opaque)", max: LAUNCH_CURSOR_MAX, ...(without.length > 0 ? { without } : {}) });
67
77
  const WINDOW = { kind: "enum", doc: "the volume window", values: B.TRADER_WINDOWS, default: "24h" };
68
78
 
69
79
  const GATED = ["not_ready", "upstream"] ;
@@ -97,7 +107,16 @@ export const INDEXER_CONTRACT = {
97
107
  }),
98
108
  quotes: site({ pattern: "/floor-amm/quotes", body: B.QUOTES }),
99
109
  summary: site({ pattern: "/floor-amm/summary", aliases: ["/floor-amm/v2/summary"], body: B.SUMMARY }),
100
- floorRouted: site({ pattern: "/floor-amm/floor-routed", aliases: ["/floor-amm/v2/floor-routed"], body: B.FLOOR_ROUTED }),
110
+ floorRouted: site({
111
+ pattern: "/floor-amm/floor-routed",
112
+ aliases: ["/floor-amm/v2/floor-routed"],
113
+ query: {
114
+ limit: LIMIT(LAUNCHES_PAGE_DEFAULT, LAUNCHES_PAGE_MAX),
115
+ cursor: { kind: "string", doc: "a page's next: the launches after this launch id, in create order", max: LAUNCH_CURSOR_MAX },
116
+ },
117
+ page: keyset(LAUNCHES_PAGE_DEFAULT, LAUNCHES_PAGE_MAX),
118
+ body: B.FLOOR_ROUTED,
119
+ }),
101
120
  events: site({
102
121
  pattern: "/floor-amm/events",
103
122
  aliases: ["/events", "/v2/dex/events"],
@@ -113,19 +132,57 @@ export const INDEXER_CONTRACT = {
113
132
  query: {
114
133
  sort: { kind: "enum", doc: "the order (larger first with order=desc)", values: LAUNCH_SORTS, default: "created" },
115
134
  order: { kind: "enum", doc: "asc or desc", values: ["asc", "desc"], default: "desc" },
116
- q: { kind: "string", doc: "name or symbol contains, or an id, token or creator equals" },
135
+ q: { kind: "string", doc: "name or symbol contains, or an id, token or creator equals", max: SEARCH_Q_MAX },
117
136
  ids: { kind: "list", doc: "these launches (ids or tokens), in the order asked without sort", max: IDS_MAX },
118
137
  quote: { kind: "string", doc: "launches quoted in this coin" },
119
138
  creator: { kind: "string", doc: "launches by this creator" },
120
139
  rankable: { kind: "bool", doc: "true (or 1) listed only, false (or 0) unlisted only" },
121
140
  graduated: { kind: "bool", doc: "graduated or not (true / false, or 1 / 0)" },
122
- limit: LIMIT(LAUNCHES_PAGE_MAX, LAUNCHES_PAGE_MAX),
123
- offset: { kind: "int", doc: "rows skipped", min: 0, default: 0 },
141
+ preset: PRESETS,
142
+ limit: LIMIT(LAUNCHES_PAGE_DEFAULT, LAUNCHES_PAGE_MAX),
143
+ cursor: KEYSET_CURSOR(["offset", "ids"]),
144
+ offset: { kind: "int", doc: "rows skipped (with total: an offset page)", min: 0, default: 0 },
124
145
  },
125
- page: { kind: "offset", limit: { default: LAUNCHES_PAGE_MAX, max: LAUNCHES_PAGE_MAX }, total: "total" },
146
+
147
+ page: keyset(LAUNCHES_PAGE_DEFAULT, LAUNCHES_PAGE_MAX),
126
148
  errors: [...GATED, "bad_query"],
127
149
  body: B.LAUNCHES,
128
150
  }),
151
+
152
+ launchLists: site({
153
+ pattern: "/floor-amm/launch-lists",
154
+ v2: true,
155
+ query: {
156
+ quotes: { kind: "list", doc: "one list per quote coin, in this order (no repeat)", required: true, min: 1, max: LAUNCH_LISTS_QUOTES_MAX },
157
+ cursors: { kind: "list", doc: "parallel to quotes, one each: that list's page next (- = its first page)", max: LAUNCH_LISTS_QUOTES_MAX },
158
+ sort: { kind: "enum", doc: "the order (larger first with order=desc)", values: LAUNCH_SORTS, default: "created" },
159
+ order: { kind: "enum", doc: "asc or desc", values: ["asc", "desc"], default: "desc" },
160
+ creator: { kind: "string", doc: "launches by this creator" },
161
+ rankable: { kind: "bool", doc: "true (or 1) listed only, false (or 0) unlisted only" },
162
+ graduated: { kind: "bool", doc: "graduated or not (true / false, or 1 / 0)" },
163
+ preset: PRESETS,
164
+ limit: LIMIT(LAUNCHES_PAGE_DEFAULT, LAUNCHES_PAGE_MAX),
165
+ },
166
+ page: limit(LAUNCHES_PAGE_DEFAULT, LAUNCHES_PAGE_MAX),
167
+ errors: [...GATED, "bad_query"],
168
+ body: B.LAUNCH_LISTS,
169
+ }),
170
+ search: site({
171
+ pattern: "/floor-amm/search",
172
+ v2: true,
173
+ query: {
174
+ q: { kind: "string", doc: "the search: symbol, name or token (tiers 0-4, search.ts)", required: true, max: SEARCH_Q_MAX },
175
+ limit: LIMIT(SEARCH_PAGE_DEFAULT, SEARCH_PAGE_MAX),
176
+ cursor: KEYSET_CURSOR([]),
177
+ rankable: { kind: "bool", doc: "true (or 1) listed only, false (or 0) unlisted only" },
178
+ graduated: { kind: "bool", doc: "graduated or not (true / false, or 1 / 0)" },
179
+ quote: { kind: "string", doc: "launches quoted in this coin" },
180
+ preset: PRESETS,
181
+ },
182
+ page: keyset(SEARCH_PAGE_DEFAULT, SEARCH_PAGE_MAX),
183
+ errors: [...GATED, "bad_query"],
184
+ body: B.LAUNCH_SEARCH,
185
+ }),
129
186
  launch: site({ pattern: "/floor-amm/launches/<launch>", v2: true, errors: LAUNCH_ERR, body: B.LAUNCH_ONE }),
130
187
  launchState: site({ pattern: "/floor-amm/launches/<launch>/state", v2: true, errors: ["not_ready", "unknown_launch"], body: B.LAUNCH_STATE }),
131
188
  milestones: site({ pattern: "/floor-amm/launches/<launch>/milestones", v2: true, errors: LAUNCH_ERR, body: B.LAUNCH_MILESTONES }),
@@ -138,16 +195,16 @@ export const INDEXER_CONTRACT = {
138
195
  errors: [...LAUNCH_ERR, "bad_query"],
139
196
  body: B.TRADES,
140
197
  }),
141
- launchClaims: site({ pattern: "/floor-amm/launches/<launch>/claims", v2: true, query: { claimer: { kind: "string", doc: "only this claimer's rows" } }, errors: LAUNCH_ERR, body: B.LAUNCH_CLAIMS }),
142
- devBuys: site({ pattern: "/floor-amm/launches/<launch>/dev-buys", v2: true, errors: LAUNCH_ERR, body: B.DEV_BUYS }),
198
+ launchClaims: site({ pattern: "/floor-amm/launches/<launch>/claims", v2: true, query: { limit: LIMIT(100, 500), before: BEFORE, claimer: { kind: "string", doc: "only this claimer's rows" } }, page: cursor(100, 500), errors: [...LAUNCH_ERR, "bad_query"], body: B.LAUNCH_CLAIMS }),
199
+ devBuys: site({ pattern: "/floor-amm/launches/<launch>/dev-buys", v2: true, query: { limit: LIMIT(100, 500), before: BEFORE }, page: cursor(100, 500), errors: [...LAUNCH_ERR, "bad_query"], body: B.DEV_BUYS }),
143
200
 
144
- memberSold: site({ pattern: "/floor-amm/launches/<launch>/member-sold", v2: true, errors: LAUNCH_ERR, body: B.MEMBER_SOLD }),
201
+ memberSold: site({ pattern: "/floor-amm/launches/<launch>/member-sold", v2: true, query: { limit: LIMIT(100, 500), before: BEFORE }, page: cursor(100, 500), errors: [...LAUNCH_ERR, "bad_query"], body: B.MEMBER_SOLD }),
145
202
 
146
203
  launchAccount: site({ pattern: "/floor-amm/launches/<launch>/account", v2: true, errors: LAUNCH_ERR, body: B.LAUNCH_ACCOUNT }),
147
204
  traders: site({ pattern: "/floor-amm/launches/<launch>/traders", v2: true, query: { window: WINDOW, limit: LIMIT(100, 500) }, page: limit(100, 500), errors: [...LAUNCH_ERR, "bad_query"], body: B.LAUNCH_TRADERS }),
148
205
  quoteChain: site({ pattern: "/floor-amm/launches/<launch>/chain", v2: true, errors: LAUNCH_ERR, body: B.QUOTE_CHAIN }),
149
206
  devTrades: site({ pattern: "/floor-amm/launches/<launch>/dev", v2: true, query: { limit: LIMIT(100, 500) }, page: limit(100, 500), errors: [...LAUNCH_ERR, "bad_query"], body: B.DEV_TRADES }),
150
- burns: site({ pattern: "/floor-amm/launches/<launch>/burns", v2: true, errors: LAUNCH_ERR, body: B.BURNS }),
207
+ burns: site({ pattern: "/floor-amm/launches/<launch>/burns", v2: true, query: { limit: LIMIT(100, 500), before: BEFORE }, page: cursor(100, 500), errors: [...LAUNCH_ERR, "bad_query"], body: B.BURNS }),
151
208
  launchLocks: site({ pattern: "/floor-amm/launches/<launch>/locks", v2: true, errors: LAUNCH_ERR, body: B.LAUNCH_LOCKS }),
152
209
  marks: site({
153
210
  pattern: "/floor-amm/launches/<launch>/marks",
@@ -181,6 +238,20 @@ export const INDEXER_CONTRACT = {
181
238
  errors: [...GATED, "bad_query", "unknown_launch", "not_found"],
182
239
  body: B.CANDLES,
183
240
  }),
241
+
242
+ candlesMany: site({
243
+ pattern: "/floor-amm/candles/many",
244
+ aliases: ["/floor-amm/v2/candles/many"],
245
+ query: {
246
+ ids: { kind: "list", doc: "these launches (ids or tokens), one series each in the order asked", required: true, min: 1, max: CANDLES_MANY_IDS_MAX },
247
+ interval: { kind: "enum", doc: "the bucket", values: B.CANDLE_INTERVALS, default: "1h" },
248
+ before: { kind: "unix", doc: "the newest limit traded buckets starting before it (absent: past the indexed head)" },
249
+ limit: { kind: "int", doc: "buckets per launch", min: 1, max: B.CANDLES_MAX, default: CANDLES_MANY_LIMIT_DEFAULT },
250
+ },
251
+ page: limit(CANDLES_MANY_LIMIT_DEFAULT, B.CANDLES_MAX),
252
+ errors: [...GATED, "bad_query"],
253
+ body: B.CANDLES_MANY,
254
+ }),
184
255
  candleBundle: site({
185
256
  pattern: "/floor-amm/launches/<launch>/candle-bundle",
186
257
  v2: true,
@@ -201,17 +272,44 @@ export const INDEXER_CONTRACT = {
201
272
  errors: [...WALLET_ERR, "unknown_launch"],
202
273
  body: B.WALLET_TRADES,
203
274
  }),
204
- positions: site({ pattern: "/floor-amm/wallets/<wallet>/positions", v2: true, errors: WALLET_ERR, body: B.POSITIONS }),
205
- inbox: site({ pattern: "/floor-amm/wallets/<wallet>/inbox", v2: true, query: { limit: LIMIT(1_000, 1_000) }, page: limit(1_000, 1_000), errors: WALLET_ERR, body: B.INBOX }),
206
- walletLocks: site({ pattern: "/floor-amm/wallets/<wallet>/locks", v2: true, errors: WALLET_ERR, body: B.WALLET_LOCKS }),
207
- claimHistory: site({ pattern: "/floor-amm/wallets/<wallet>/claims", errors: WALLET_ERR, body: B.CLAIM_HISTORY }),
275
+
276
+ tonActivity: site({
277
+ pattern: "/floor-amm/wallets/<wallet>/ton-activity",
278
+ query: { limit: LIMIT(100, 200), before: BEFORE },
279
+ page: cursor(100, 200),
280
+ errors: WALLET_ERR,
281
+ body: B.TON_ACTIVITY,
282
+ }),
283
+ tonOutcome: site({
284
+ pattern: "/floor-amm/wallets/<wallet>/ton-outcome",
285
+ query: { queryId: { kind: "string", doc: "the query id (uint64, decimal) the SDK message carried", required: true } },
286
+ errors: WALLET_ERR,
287
+ body: B.TON_OUTCOME,
288
+ }),
289
+
290
+ positions: site({ pattern: "/floor-amm/wallets/<wallet>/positions", v2: true, query: WALLET_PAGE_KEYS("opaque, launch create order"), page: WALLET_PAGE, errors: WALLET_ERR, body: B.POSITIONS }),
291
+
292
+ inbox: site({
293
+ pattern: "/floor-amm/wallets/<wallet>/inbox",
294
+ v2: true,
295
+ query: { limit: LIMIT(1_000, 1_000), before: { kind: "cursor", doc: "asks a page: empty = the newest; a page's next (opaque): items strictly before it" } },
296
+ page: { kind: "cursor", limit: { default: 1_000, max: 1_000 }, cursor: "before", next: "next", optIn: { default: INBOX_PAGE_DEFAULT, max: INBOX_PAGE_MAX } },
297
+ errors: WALLET_ERR,
298
+ body: B.INBOX,
299
+ }),
300
+ walletLocks: site({ pattern: "/floor-amm/wallets/<wallet>/locks", v2: true, query: WALLET_PAGE_KEYS("opaque, launch create order"), page: WALLET_PAGE, errors: WALLET_ERR, body: B.WALLET_LOCKS }),
301
+ claimHistory: site({ pattern: "/floor-amm/wallets/<wallet>/claims", query: WALLET_PAGE_KEYS("opaque, newest first"), page: WALLET_PAGE, errors: WALLET_ERR, body: B.CLAIM_HISTORY }),
208
302
  firsts: site({ pattern: "/floor-amm/wallets/<wallet>/firsts", errors: WALLET_ERR, body: B.FIRSTS }),
209
303
  firstsMany: site({ pattern: "/floor-amm/wallets/firsts", query: { wallets: { kind: "list", doc: "the wallets", required: true, min: 1, max: FIRSTS_MAX } }, errors: WALLET_ERR, body: B.FIRSTS_MANY }),
210
- claimView: site({ pattern: "/floor-amm/claims/<wallet>", errors: [...WALLET_ERR, "no_reader"], body: B.CLAIM_VIEW }),
211
- people: site({ pattern: "/floor-amm/referrals/<wallet>/people", errors: WALLET_ERR, body: B.PEOPLE }),
212
- roles: site({ pattern: "/floor-amm/roles/<wallet>", errors: WALLET_ERR, body: B.ROLES }),
304
+ claimView: site({ pattern: "/floor-amm/claims/<wallet>", query: WALLET_PAGE_KEYS("a page's next: the last row key (l:<launch>, r:<account>, p:<traderRef>, o:<quote>), string order"), page: WALLET_PAGE, errors: [...WALLET_ERR, "bad_query", "no_reader"], body: B.CLAIM_VIEW }),
305
+ people: site({ pattern: "/floor-amm/referrals/<wallet>/people", query: WALLET_PAGE_KEYS("opaque, referred wallet order"), page: WALLET_PAGE, errors: WALLET_ERR, body: B.PEOPLE }),
306
+ roles: site({ pattern: "/floor-amm/roles/<wallet>", query: WALLET_PAGE_KEYS("opaque, a page of launches in create order"), page: WALLET_PAGE, errors: WALLET_ERR, body: B.ROLES }),
213
307
 
214
- handlePlaces: site({ pattern: "/floor-amm/handles/<handle>/places", errors: WALLET_ERR, body: B.HANDLE_PLACES }),
308
+ handlePlaces: site({
309
+ pattern: "/floor-amm/handles/<handle>/places",
310
+ query: { limit: LIMIT(100, 500), cursor: { kind: "string", doc: "a page's next: <launch>:<place>, rows strictly after it", max: WALLET_CURSOR_MAX } },
311
+ page: keyset(100, 500),
312
+ errors: WALLET_ERR, body: B.HANDLE_PLACES }),
215
313
 
216
314
  traderBoard: site({ pattern: "/floor-amm/leaderboards/traders", v2: true, query: { window: WINDOW, limit: LIMIT(100, 500) }, page: limit(100, 500), errors: [...GATED, "bad_query"], body: B.TRADER_BOARD }),
217
315
  launcherBoard: site({ pattern: "/floor-amm/leaderboards/launchers", v2: true, query: { limit: LIMIT(100, 500) }, page: limit(100, 500), errors: [...GATED, "bad_query"], body: B.LAUNCHER_BOARD }),
@@ -236,12 +334,14 @@ export const INDEXER_CONTRACT = {
236
334
  query: {
237
335
  ticker_id: { kind: "string", doc: "<token>_<quote>", required: true },
238
336
  type: { kind: "enum", doc: "one side only", values: ["buy", "sell"] },
239
- limit: { kind: "int", doc: "rows per side (0: all)", min: 0 },
337
+ limit: { kind: "int", doc: "rows per side (absent: 500; 0: all, refused past 5000 rows in all: 413, page with before)", min: 0, max: 5000, default: 500 },
338
+ before: BEFORE,
240
339
  start_time: { kind: "unix", doc: "from (10^11 and over: milliseconds)" },
241
340
  end_time: { kind: "unix", doc: "to (10^11 and over: milliseconds)" },
242
341
  },
243
- page: { kind: "range", from: "start_time", to: "end_time" },
244
- errors: [...GATED, "bad_query", "not_found"],
342
+
343
+ page: cursor(500, 5000),
344
+ errors: [...GATED, "bad_query", "not_found", "too_many"],
245
345
  body: P.CG_HISTORICAL,
246
346
  }),
247
347
  llamaTvl: partner({ pattern: "/v2/defillama/tvl", errors: GATED, body: P.LLAMA_TVL }),
@@ -283,7 +383,7 @@ export const OPEN_ROUTES = {
283
383
 
284
384
  export function routeLimit(name ) {
285
385
  const p = INDEXER_CONTRACT[name].page;
286
- return p.kind === "limit" || p.kind === "offset" || p.kind === "cursor" ? p.limit : null;
386
+ return p.kind === "limit" || p.kind === "offset" || p.kind === "cursor" || p.kind === "keyset" ? p.limit : null;
287
387
  }
288
388
 
289
389
  export const LIMITS = Object.fromEntries(ROUTE_NAMES.flatMap((n) => {
@@ -291,9 +391,29 @@ export const LIMITS = Object.fromEntries(ROUTE_NAMES.flatMap((n) => {
291
391
  return l === null ? [] : [[n, l]];
292
392
  })) ;
293
393
 
294
- export function clampLimit(name , n ) {
295
- const l = routeLimit(name);
296
- return l === null ? n : Math.min(Math.max(1, Math.trunc(n)), l.max);
394
+ export function clampLimit(name , n , paged = false) {
395
+ const p = INDEXER_CONTRACT[name].page;
396
+ const l = paged && p.kind === "cursor" && p.optIn !== undefined ? p.optIn : routeLimit(name);
397
+
398
+ const lo = (INDEXER_CONTRACT[name].query ).limit?.min ?? 1;
399
+ return l === null ? n : Math.min(Math.max(lo, Math.trunc(n)), l.max);
400
+ }
401
+
402
+ export function pageAsked(name , _q ) {
403
+ const p = INDEXER_CONTRACT[name].page;
404
+
405
+ if (p.kind === "cursor" && p.optIn !== undefined) return true;
406
+ if (p.kind === "keyset" && p.optIn === true) return true;
407
+ return false;
408
+ }
409
+
410
+ export function pageLimit(name , q ) {
411
+ const p = INDEXER_CONTRACT[name].page;
412
+ if (p.kind === "cursor" && p.optIn !== undefined) {
413
+ const raw = q.get("limit");
414
+ return raw === null || raw === "" || !DIGITS.test(raw) ? p.optIn.default : Math.min(Math.max(1, Number(raw)), p.optIn.max);
415
+ }
416
+ return queryLimit(name, q);
297
417
  }
298
418
 
299
419
  const DIGITS = /^\d+$/;
@@ -309,7 +429,11 @@ export function queryRefusal(name , q )
309
429
  const spec = INDEXER_CONTRACT[name].query;
310
430
  for (const [key, k] of Object.entries(spec)) {
311
431
  const raw = q.get(key);
312
- if (raw === null || raw === "") continue;
432
+ if (raw === null || raw === "") {
433
+ if (k.required === true && TABLE_REQUIRED.has(name)) return `${key} is required`;
434
+ continue;
435
+ }
436
+ for (const w of k.without ?? []) if ((q.get(w) ?? "") !== "") return `${key} cannot be given with ${w}`;
313
437
  switch (k.kind) {
314
438
  case "int": {
315
439
  const lo = k.min ?? 0;
@@ -318,10 +442,15 @@ export function queryRefusal(name , q )
318
442
  break;
319
443
  }
320
444
  case "list": {
321
- const n = raw.split(",").filter((s) => s !== "").length;
322
- if (k.max !== undefined && n > k.max) return `at most ${k.max} ${key}`;
445
+ const parts = raw.split(",").filter((s) => s !== "");
446
+ if (k.max !== undefined && parts.length > k.max) return `at most ${k.max} ${key}`;
447
+ const it = k.item;
448
+ if (it !== undefined && parts.some((x) => !DIGITS.test(x) || Number(x) < it.min || Number(x) > it.max)) return `each ${key} must be an integer ${it.min}..${it.max}`;
323
449
  break;
324
450
  }
451
+ case "string":
452
+ if (k.max !== undefined && raw.length > k.max) return `${key} must be at most ${k.max} characters`;
453
+ break;
325
454
  case "enum":
326
455
  if (k.values !== undefined && !k.values.includes(raw)) return `${key} must be one of ${k.values.join(", ")}`;
327
456
  break;
@@ -332,9 +461,30 @@ export function queryRefusal(name , q )
332
461
  break;
333
462
  }
334
463
  }
464
+
465
+ const prod = ROWS_PRODUCT[name];
466
+ if (prod !== undefined) {
467
+ const n = (q.get(prod.list) ?? "").split(",").filter((s) => s !== "").length;
468
+ const raw = q.get("limit");
469
+ const lim = raw === null || raw === "" ? routeLimit(name) .default : Number(raw);
470
+ if (n * lim > prod.max) return `${prod.list} × limit must be at most ${prod.max} (asked ${n} × ${lim})`;
471
+ }
472
+
473
+ const pg = INDEXER_CONTRACT[name].page;
474
+ if (pg.kind === "cursor" && pg.optIn !== undefined && q.get(pg.cursor) !== null) {
475
+ const raw = q.get("limit");
476
+ if (raw !== null && raw !== "" && Number(raw) > pg.optIn.max) return `limit must be 1..${pg.optIn.max} with ${pg.cursor}`;
477
+ }
335
478
  return spanRefusal(name, q);
336
479
  }
337
480
 
481
+ const ROWS_PRODUCT = {
482
+ launchLists: { list: "quotes", max: LAUNCH_LISTS_ROWS_MAX },
483
+ candlesMany: { list: "ids", max: CANDLES_MANY_ROWS_MAX },
484
+ };
485
+
486
+ const TABLE_REQUIRED = new Set (["search", "launchLists", "candlesMany"]);
487
+
338
488
  const BOOLS = { true: true, false: false, 1: true, 0: false };
339
489
 
340
490
  export function queryArg(name , q , key ) {
@@ -47,7 +47,8 @@ export const DEX_SUMMARY = object({
47
47
  });
48
48
 
49
49
  export const DEX_PAIR = object({
50
- pair: object({ id: str, asset0Id: str, asset1Id: str, createdAtBlockNumber: int, createdAtBlockTimestamp: int, feeBps: nullable(num) }),
50
+ pair: object({ id: str, asset0Id: str, asset1Id: str, createdAtBlockNumber: int, createdAtBlockTimestamp: int, feeBps: nullable(num), dexKey: str, createdAtTxnId: optional(str), creator: str }),
51
+ launch: optional(object({ id: str, token: str })),
51
52
  });
52
53
 
53
54
  export const CG_PAIRS = array(object({ ticker_id: str, base: str, target: str, pool_id: str }));
@@ -74,7 +75,7 @@ export const CG_TICKERS = array(object({
74
75
 
75
76
  export const CG_TRADE = object({ trade_id: int, price: decimal, base_volume: decimal, target_volume: decimal, trade_timestamp: int, type: oneOf("buy", "sell") });
76
77
 
77
- export const CG_HISTORICAL = object({ buy: optional(array(CG_TRADE)), sell: optional(array(CG_TRADE)) });
78
+ export const CG_HISTORICAL = object({ buy: optional(array(CG_TRADE)), sell: optional(array(CG_TRADE)), next: optional(nullable(str)) });
78
79
 
79
80
  export const LLAMA_TVL = object({ mode: LIQUIDITY_MODE, tvl: record(big), launchTokens: array(str) });
80
81
 
@@ -6,49 +6,76 @@ export const INDEXER_ROUTES = {
6
6
  stream: { pattern: "/floor-amm/stream", keys: ["launch", "state", "lastEventId"] },
7
7
  quotes: { pattern: "/floor-amm/quotes", keys: [] },
8
8
  summary: { pattern: "/floor-amm/summary", keys: [] },
9
- floorRouted: { pattern: "/floor-amm/floor-routed", keys: [] },
9
+ floorRouted: { pattern: "/floor-amm/floor-routed", keys: ["limit", "cursor"] },
10
10
  events: { pattern: "/floor-amm/events", keys: ["fromBlock", "toBlock"] },
11
- launches: { pattern: "/floor-amm/launches", keys: ["sort", "order", "q", "ids", "quote", "creator", "rankable", "graduated", "limit", "offset"] },
11
+ launches: { pattern: "/floor-amm/launches", keys: ["sort", "order", "q", "ids", "quote", "creator", "rankable", "graduated", "preset", "limit", "cursor", "offset"] },
12
+ launchLists: { pattern: "/floor-amm/launch-lists", keys: ["quotes", "cursors", "sort", "order", "creator", "rankable", "graduated", "preset", "limit"] },
13
+ search: { pattern: "/floor-amm/search", keys: ["q", "limit", "cursor", "rankable", "graduated", "quote", "preset"] },
12
14
  launch: { pattern: "/floor-amm/launches/<launch>", keys: [] },
13
15
  launchState: { pattern: "/floor-amm/launches/<launch>/state", keys: [] },
14
16
  milestones: { pattern: "/floor-amm/launches/<launch>/milestones", keys: [] },
15
17
  holders: { pattern: "/floor-amm/launches/<launch>/holders", keys: ["limit"] },
16
18
  trades: { pattern: "/floor-amm/launches/<launch>/trades", keys: ["limit", "before", "traders"] },
17
- launchClaims: { pattern: "/floor-amm/launches/<launch>/claims", keys: ["claimer"] },
18
- devBuys: { pattern: "/floor-amm/launches/<launch>/dev-buys", keys: [] },
19
- memberSold: { pattern: "/floor-amm/launches/<launch>/member-sold", keys: [] },
19
+ launchClaims: { pattern: "/floor-amm/launches/<launch>/claims", keys: ["limit", "before", "claimer"] },
20
+ devBuys: { pattern: "/floor-amm/launches/<launch>/dev-buys", keys: ["limit", "before"] },
21
+ memberSold: { pattern: "/floor-amm/launches/<launch>/member-sold", keys: ["limit", "before"] },
20
22
  launchAccount: { pattern: "/floor-amm/launches/<launch>/account", keys: [] },
21
23
  traders: { pattern: "/floor-amm/launches/<launch>/traders", keys: ["window", "limit"] },
22
24
  quoteChain: { pattern: "/floor-amm/launches/<launch>/chain", keys: [] },
23
25
  devTrades: { pattern: "/floor-amm/launches/<launch>/dev", keys: ["limit"] },
24
- burns: { pattern: "/floor-amm/launches/<launch>/burns", keys: [] },
26
+ burns: { pattern: "/floor-amm/launches/<launch>/burns", keys: ["limit", "before"] },
25
27
  launchLocks: { pattern: "/floor-amm/launches/<launch>/locks", keys: [] },
26
28
  marks: { pattern: "/floor-amm/launches/<launch>/marks", keys: ["limit", "before"] },
27
29
  price: { pattern: "/floor-amm/launches/<launch>/price", keys: [] },
28
30
  highs: { pattern: "/floor-amm/launches/<launch>/highs", keys: ["atLeast", "limit"] },
29
31
  candleBundle: { pattern: "/floor-amm/launches/<launch>/candle-bundle", keys: ["intervals", "limit"] },
30
32
  candles: { pattern: "/floor-amm/candles", keys: ["launch", "interval", "from", "to", "before", "limit"] },
33
+ candlesMany: { pattern: "/floor-amm/candles/many", keys: ["ids", "interval", "before", "limit"] },
31
34
  walletTrades: { pattern: "/floor-amm/wallets/<wallet>/trades", keys: ["limit", "before", "launch"] },
32
- positions: { pattern: "/floor-amm/wallets/<wallet>/positions", keys: [] },
33
- inbox: { pattern: "/floor-amm/wallets/<wallet>/inbox", keys: ["limit"] },
34
- walletLocks: { pattern: "/floor-amm/wallets/<wallet>/locks", keys: [] },
35
- claimHistory: { pattern: "/floor-amm/wallets/<wallet>/claims", keys: [] },
35
+ tonActivity: { pattern: "/floor-amm/wallets/<wallet>/ton-activity", keys: ["limit", "before"] },
36
+ tonOutcome: { pattern: "/floor-amm/wallets/<wallet>/ton-outcome", keys: ["queryId"] },
37
+ positions: { pattern: "/floor-amm/wallets/<wallet>/positions", keys: ["limit", "cursor"] },
38
+ inbox: { pattern: "/floor-amm/wallets/<wallet>/inbox", keys: ["limit", "before"] },
39
+ walletLocks: { pattern: "/floor-amm/wallets/<wallet>/locks", keys: ["limit", "cursor"] },
40
+ claimHistory: { pattern: "/floor-amm/wallets/<wallet>/claims", keys: ["limit", "cursor"] },
36
41
  firsts: { pattern: "/floor-amm/wallets/<wallet>/firsts", keys: [] },
37
42
  firstsMany: { pattern: "/floor-amm/wallets/firsts", keys: ["wallets"] },
38
- claimView: { pattern: "/floor-amm/claims/<wallet>", keys: [] },
39
- people: { pattern: "/floor-amm/referrals/<wallet>/people", keys: [] },
40
- roles: { pattern: "/floor-amm/roles/<wallet>", keys: [] },
41
- handlePlaces: { pattern: "/floor-amm/handles/<handle>/places", keys: [] },
43
+ claimView: { pattern: "/floor-amm/claims/<wallet>", keys: ["limit", "cursor"] },
44
+ people: { pattern: "/floor-amm/referrals/<wallet>/people", keys: ["limit", "cursor"] },
45
+ roles: { pattern: "/floor-amm/roles/<wallet>", keys: ["limit", "cursor"] },
46
+ handlePlaces: { pattern: "/floor-amm/handles/<handle>/places", keys: ["limit", "cursor"] },
42
47
  traderBoard: { pattern: "/floor-amm/leaderboards/traders", keys: ["window", "limit"] },
43
48
  launcherBoard: { pattern: "/floor-amm/leaderboards/launchers", keys: ["limit"] },
44
49
  } ;
45
50
 
46
- export const LAUNCH_SORTS = ["created", "newest", "volume1h", "volume24h", "volume7d", "volume", "marketCap", "liquidity", "backed", "trades24h", "holders", "change1h", "change24h", "lastTrade", "nearFloor", "trending", "newHolders24h"] ;
51
+ export const LAUNCH_SORTS = ["created", "newest", "volume1h", "volume24h", "volume7d", "volume", "marketCap", "liquidity", "backed", "trades24h", "holders", "change1h", "change24h", "lastTrade", "nearFloor", "trending", "newHolders24h", "standingVolume", "standingMarketCap", "standingBacked", "maxloss"] ;
47
52
 
48
53
  export const IDS_MAX = 100;
49
54
 
50
55
  export const LAUNCHES_PAGE_MAX = 1_000;
51
56
 
57
+ export const LAUNCHES_PAGE_DEFAULT = 100;
58
+
59
+ export const LAUNCH_LISTS_QUOTES_MAX = 16;
60
+ export const LAUNCH_LISTS_ROWS_MAX = 1_000;
61
+
62
+ export const LAUNCH_LISTS_FIRST = "-";
63
+
64
+ export const CANDLES_MANY_IDS_MAX = 40;
65
+ export const CANDLES_MANY_LIMIT_DEFAULT = 1_000;
66
+ export const CANDLES_MANY_ROWS_MAX = 40_000;
67
+
68
+ export const LAUNCH_CURSOR_MAX = 512;
69
+
70
+ export const WALLET_PAGE_DEFAULT = 100;
71
+ export const WALLET_PAGE_MAX = 500;
72
+
73
+ export const WALLET_CURSOR_MAX = 256;
74
+ export const INBOX_PAGE_DEFAULT = 100;
75
+ export const INBOX_PAGE_MAX = 500;
76
+
77
+ export const PRESET_FILTER_MAX = 16;
78
+
52
79
  export const FIRSTS_MAX = 100;
53
80
 
54
81
  export const STREAM_STATE_MAX = 16;
@@ -69,9 +96,15 @@ const need = (s ) => {
69
96
  };
70
97
  const seg = (s ) => encodeURIComponent(need(s));
71
98
 
99
+ const presets = (p ) => (p === undefined || p.length === 0 ? undefined : p.map(String));
100
+
72
101
  const launchPath = (id , tail = "") => `/floor-amm/launches/${seg(id)}${tail}`;
73
102
  const walletPath = (w , tail ) => `/floor-amm/wallets/${seg(w)}${tail}`;
74
103
 
104
+    
105
+
106
+    
107
+
75
108
  export const indexerPath = {
76
109
  head: () => "/floor-amm/head",
77
110
  latestBlock: () => "/floor-amm/latest-block",
@@ -81,27 +114,40 @@ export const indexerPath = {
81
114
  },
82
115
  quotes: () => "/floor-amm/quotes",
83
116
  summary: () => "/floor-amm/summary",
84
- floorRouted: () => "/floor-amm/floor-routed",
117
+ floorRouted: (q = {}) => `/floor-amm/floor-routed${query({ limit: q.limit, cursor: q.cursor })}`,
85
118
  events: (fromBlock , toBlock ) => `/floor-amm/events${query({ fromBlock, toBlock })}`,
86
119
 
87
120
  launches: (q = {}) => {
88
121
  if (q.ids !== undefined && q.ids.length > IDS_MAX) throw new RangeError(`at most ${IDS_MAX} ids`);
89
122
  const sort = q.sort ?? (q.ids === undefined ? "created" : undefined);
90
- return `/floor-amm/launches${query({ sort, order: q.order, q: q.q, ids: q.ids, quote: q.quote, creator: q.creator, rankable: q.rankable, graduated: q.graduated, limit: q.limit, offset: q.offset })}`;
123
+ if (q.preset !== undefined && q.preset.length > PRESET_FILTER_MAX) throw new RangeError(`at most ${PRESET_FILTER_MAX} presets`);
124
+ return `/floor-amm/launches${query({ sort, order: q.order, q: q.q, ids: q.ids, quote: q.quote, creator: q.creator, rankable: q.rankable, graduated: q.graduated, preset: presets(q.preset), limit: q.limit, cursor: q.cursor, offset: q.offset })}`;
125
+ },
126
+ search: (q ) => {
127
+ if (q.q.trim() === "") throw new RangeError("an empty search");
128
+ if (q.preset !== undefined && q.preset.length > PRESET_FILTER_MAX) throw new RangeError(`at most ${PRESET_FILTER_MAX} presets`);
129
+ return `/floor-amm/search${query({ q: q.q, limit: q.limit, cursor: q.cursor, rankable: q.rankable, graduated: q.graduated, quote: q.quote, preset: presets(q.preset) })}`;
130
+ },
131
+ launchLists: (q ) => {
132
+ if (q.quotes.length < 1 || q.quotes.length > LAUNCH_LISTS_QUOTES_MAX) throw new RangeError(`1..${LAUNCH_LISTS_QUOTES_MAX} quotes`);
133
+ if (q.cursors !== undefined && q.cursors.length !== q.quotes.length) throw new RangeError("one cursor per quote");
134
+ if (q.preset !== undefined && q.preset.length > PRESET_FILTER_MAX) throw new RangeError(`at most ${PRESET_FILTER_MAX} presets`);
135
+ const cursors = q.cursors?.some((c) => c !== null && c !== "") ? q.cursors.map((c) => (c === null || c === "" ? LAUNCH_LISTS_FIRST : c)) : undefined;
136
+ return `/floor-amm/launch-lists${query({ quotes: q.quotes, cursors, sort: q.sort, order: q.order, creator: q.creator, rankable: q.rankable, graduated: q.graduated, preset: presets(q.preset), limit: q.limit })}`;
91
137
  },
92
138
  launch: (id ) => launchPath(id),
93
139
  launchState: (id ) => launchPath(id, "/state"),
94
140
  milestones: (id ) => launchPath(id, "/milestones"),
95
141
  holders: (id , q = {}) => launchPath(id, `/holders${query({ limit: q.limit })}`),
96
142
  trades: (id , q = {}) => launchPath(id, `/trades${query({ limit: q.limit, before: q.before, traders: q.traders?.length ? q.traders : undefined })}`),
97
- launchClaims: (id , q = {}) => launchPath(id, `/claims${query({ claimer: q.claimer })}`),
98
- devBuys: (id ) => launchPath(id, "/dev-buys"),
99
- memberSold: (id ) => launchPath(id, "/member-sold"),
143
+ launchClaims: (id , q = {}) => launchPath(id, `/claims${query({ limit: q.limit, before: q.before, claimer: q.claimer })}`),
144
+ devBuys: (id , q = {}) => launchPath(id, `/dev-buys${query({ limit: q.limit, before: q.before })}`),
145
+ memberSold: (id , q = {}) => launchPath(id, `/member-sold${query({ limit: q.limit, before: q.before })}`),
100
146
  launchAccount: (id ) => launchPath(id, "/account"),
101
147
  traders: (id , q = {}) => launchPath(id, `/traders${query({ window: q.window, limit: q.limit })}`),
102
148
  quoteChain: (id ) => launchPath(id, "/chain"),
103
149
  devTrades: (id , q = {}) => launchPath(id, `/dev${query({ limit: q.limit })}`),
104
- burns: (id ) => launchPath(id, "/burns"),
150
+ burns: (id , q = {}) => launchPath(id, `/burns${query({ limit: q.limit, before: q.before })}`),
105
151
  launchLocks: (id ) => launchPath(id, "/locks"),
106
152
  marks: (id , q = {}) => launchPath(id, `/marks${query({ limit: q.limit, before: q.before })}`),
107
153
  price: (id ) => launchPath(id, "/price"),
@@ -114,20 +160,32 @@ export const indexerPath = {
114
160
  if (q.limit !== undefined && q.before === undefined) throw new RangeError("limit is read only with before");
115
161
  return `/floor-amm/candles${query({ launch: need(q.launch), interval: q.interval, from: q.from, to: q.to, before: q.before, limit: q.limit })}`;
116
162
  },
163
+ candlesMany: (q ) => {
164
+ if (q.ids.length < 1 || q.ids.length > CANDLES_MANY_IDS_MAX) throw new RangeError(`1..${CANDLES_MANY_IDS_MAX} ids`);
165
+ return `/floor-amm/candles/many${query({ ids: q.ids, interval: q.interval, before: q.before, limit: q.limit })}`;
166
+ },
117
167
  walletTrades: (w , q = {}) => walletPath(w, `/trades${query({ limit: q.limit, before: q.before, launch: q.launch })}`),
118
- positions: (w ) => walletPath(w, "/positions"),
119
- inbox: (w , q = {}) => walletPath(w, `/inbox${query({ limit: q.limit })}`),
120
- walletLocks: (w ) => walletPath(w, "/locks"),
121
- claimHistory: (w ) => walletPath(w, "/claims"),
168
+
169
+ tonActivity: (w , q = {}) => walletPath(w, `/ton-activity${query({ limit: q.limit, before: q.before })}`),
170
+ tonOutcome: (w , queryId ) => walletPath(w, `/ton-outcome${query({ queryId: String(queryId) })}`),
171
+
172
+ positions: (w , q = {}) => walletPath(w, `/positions${query({ limit: q.limit, cursor: q.cursor })}`),
173
+
174
+ inbox: (w , q = {}) => walletPath(w, `/inbox${query({ limit: q.limit, before: q.before })}`),
175
+ walletLocks: (w , q = {}) => walletPath(w, `/locks${query({ limit: q.limit, cursor: q.cursor })}`),
176
+
177
+ claimHistory: (w , q = {}) => walletPath(w, `/claims${query({ limit: q.limit, cursor: q.cursor })}`),
122
178
  firsts: (w ) => walletPath(w, "/firsts"),
123
179
  firstsMany: (wallets ) => {
124
180
  if (wallets.length === 0 || wallets.length > FIRSTS_MAX) throw new RangeError(`1..${FIRSTS_MAX} wallets`);
125
181
  return `/floor-amm/wallets/firsts${query({ wallets })}`;
126
182
  },
127
- claimView: (w ) => `/floor-amm/claims/${seg(w)}`,
128
- people: (w ) => `/floor-amm/referrals/${seg(w)}/people`,
129
- roles: (w ) => `/floor-amm/roles/${seg(w)}`,
130
- handlePlaces: (handle ) => `/floor-amm/handles/${seg(handle)}/places`,
183
+ claimView: (w , q = {}) => `/floor-amm/claims/${seg(w)}${query({ limit: q.limit, cursor: q.cursor })}`,
184
+
185
+ people: (w , q = {}) => `/floor-amm/referrals/${seg(w)}/people${query({ limit: q.limit, cursor: q.cursor })}`,
186
+
187
+ roles: (w , q = {}) => `/floor-amm/roles/${seg(w)}${query({ limit: q.limit, cursor: q.cursor })}`,
188
+ handlePlaces: (handle , q = {}) => `/floor-amm/handles/${seg(handle)}/places${query({ limit: q.limit, cursor: q.cursor })}`,
131
189
  traderBoard: (q = {}) => `/floor-amm/leaderboards/traders${query({ window: q.window, limit: q.limit })}`,
132
190
  launcherBoard: (q = {}) => `/floor-amm/leaderboards/launchers${query({ limit: q.limit })}`,
133
191
  } ;