@nexus-cross/pop 1.3.10-beta.2 → 1.4.0-beta.2
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.
- package/AGENTS.md +35 -44
- package/README.md +54 -49
- package/dist/adapters/index.d.ts +375 -588
- package/dist/adapters/index.js +1 -1
- package/dist/chunk-SE2HF5WH.js +1 -0
- package/dist/{createSafeDrop-qoNG59jB.d.ts → createSafeDrop-CayUX4w_.d.ts} +266 -118
- package/dist/index.d.ts +10 -44
- package/dist/index.js +1 -1
- package/dist/react/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/infrastructure/openapi.json +836 -116
- package/dist/chunk-KEW4FB4S.js +0 -1
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"BearerAuth": []
|
|
18
18
|
}
|
|
19
19
|
],
|
|
20
|
-
"description": "Returns an EIP-712 ValidatorClaim signature bound to the SIWE-authenticated address as recipient. The caller must prove ownership of id via an X OAuth token in the body; recipient always comes from the bearer token, never the body. nonce/deadline are supplied by the caller (read from validatorNonceById on-chain).
|
|
20
|
+
"description": "Returns an EIP-712 ValidatorClaim signature bound to the SIWE-authenticated address as recipient, for withdrawUnmappedBatch / withdrawUnmappedBatchByKeys. The caller must prove ownership of id via an X OAuth token in the body; recipient always comes from the bearer token, never the body. id must be canonical (lowercase, no \"@\") — non-canonical ids are rejected with 400 (spec §5.4). nonce/deadline are supplied by the caller (read from validatorNonceById on-chain). NOTE (ONEpop): the nonce is consumed per successful call — one signature authorizes exactly one on-chain call; request a new signature (with the advanced nonce) for each subsequent batch.",
|
|
21
21
|
"consumes": [
|
|
22
22
|
"application/json"
|
|
23
23
|
],
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"tags": [
|
|
28
28
|
"batch-claim"
|
|
29
29
|
],
|
|
30
|
-
"summary": "Issue
|
|
30
|
+
"summary": "Issue an ONEpop batch-claim validator signature",
|
|
31
31
|
"parameters": [
|
|
32
32
|
{
|
|
33
33
|
"description": "batch-claim signature request",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"400": {
|
|
50
|
-
"description": "10001 INVALID_PARAM",
|
|
50
|
+
"description": "10001 INVALID_PARAM (incl. non-canonical id)",
|
|
51
51
|
"schema": {
|
|
52
52
|
"$ref": "#/definitions/handler.errorBody"
|
|
53
53
|
}
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"BearerAuth": []
|
|
81
81
|
}
|
|
82
82
|
],
|
|
83
|
-
"description": "Resolves the caller's handle from their active X connection (POST /x-connections) — no per-request X token. Senders with an active X connection carry handle/profile; others are address-only.
|
|
83
|
+
"description": "Resolves the caller's handle from their active X connection (POST /x-connections) — no per-request X token. Senders with an active X connection carry handle/profile; others are address-only. amount/total_amount are wei decimal strings. mapped_recipient/pending_change_to mirror the on-chain id→recipient mapping (empty string = unmapped/none); when mapped, deposits must use depositMapped and POST /wallets responds 409. items[].drop_key is the bytes32 id for withdrawMapped/withdrawUnmapped calls. has_claimed_before is derived from the mapping row.",
|
|
84
84
|
"produces": [
|
|
85
85
|
"application/json"
|
|
86
86
|
],
|
|
@@ -130,6 +130,82 @@
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
|
+
"/drops/metadata": {
|
|
134
|
+
"post": {
|
|
135
|
+
"security": [
|
|
136
|
+
{
|
|
137
|
+
"BearerAuth": []
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"description": "Records the sender-chosen envelope/message against a deposit tx hash. Call AFTER signing the deposit/depositMapped tx (the hash is fixed at signing) and BEFORE broadcasting, on every deposit path — this replaces the old message/envelope_id fields of POST /wallets. GET /drops and GET /histories join this record by the drop's deposit_tx_hash + sponsor. The record is keyed per (tx hash, sponsor): re-sending overwrites your own record (fix before broadcast, backfill after), and never touches anyone else's. envelope_id must be an active catalog entry (GET /envelopes) when present.",
|
|
141
|
+
"consumes": [
|
|
142
|
+
"application/json"
|
|
143
|
+
],
|
|
144
|
+
"produces": [
|
|
145
|
+
"application/json"
|
|
146
|
+
],
|
|
147
|
+
"tags": [
|
|
148
|
+
"drops"
|
|
149
|
+
],
|
|
150
|
+
"summary": "Record drop metadata for a deposit tx (envelope, message)",
|
|
151
|
+
"parameters": [
|
|
152
|
+
{
|
|
153
|
+
"type": "string",
|
|
154
|
+
"description": "deposit tx hash (0x + 64 hex)",
|
|
155
|
+
"name": "tx_hash",
|
|
156
|
+
"in": "query",
|
|
157
|
+
"required": true
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"description": "drop metadata",
|
|
161
|
+
"name": "request",
|
|
162
|
+
"in": "body",
|
|
163
|
+
"required": true,
|
|
164
|
+
"schema": {
|
|
165
|
+
"$ref": "#/definitions/types.DropMetadataReq"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"responses": {
|
|
170
|
+
"200": {
|
|
171
|
+
"description": "OK",
|
|
172
|
+
"schema": {
|
|
173
|
+
"$ref": "#/definitions/types.DropMetadataResp"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"400": {
|
|
177
|
+
"description": "10001 INVALID_PARAM",
|
|
178
|
+
"schema": {
|
|
179
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"401": {
|
|
183
|
+
"description": "20003 UNAUTHORIZED",
|
|
184
|
+
"schema": {
|
|
185
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"404": {
|
|
189
|
+
"description": "30004 ENVELOPE_NOT_FOUND",
|
|
190
|
+
"schema": {
|
|
191
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"429": {
|
|
195
|
+
"description": "10003 RATE_LIMITED",
|
|
196
|
+
"schema": {
|
|
197
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"500": {
|
|
201
|
+
"description": "10002 INTERNAL",
|
|
202
|
+
"schema": {
|
|
203
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
133
209
|
"/envelopes": {
|
|
134
210
|
"get": {
|
|
135
211
|
"description": "Public endpoint. Returns active envelopes within their display window, sorted. name resolves by locale with English fallback.",
|
|
@@ -166,14 +242,14 @@
|
|
|
166
242
|
},
|
|
167
243
|
"/events/subscribe": {
|
|
168
244
|
"get": {
|
|
169
|
-
"description": "Server-Sent Events stream broadcast to every connected client. Frames
|
|
245
|
+
"description": "Server-Sent Events stream broadcast to every connected client. Frames: \"deposited\", \"withdrawn\", \"moved\" (escrowed drop re-pointed to the mapped recipient), \"recipient_mapped\", \"recipient_changed\", \"recipient_reset\" — data matches the drop-event message (spec §5.2: event/drop_key/sponsor keys; temp_to/to_address are null when absent; amount is a wei decimal string). \": ping\" comments keep the connection alive. Delivery is best-effort — recovery via GET /drops and GET /histories.",
|
|
170
246
|
"produces": [
|
|
171
247
|
"text/event-stream"
|
|
172
248
|
],
|
|
173
249
|
"tags": [
|
|
174
250
|
"events"
|
|
175
251
|
],
|
|
176
|
-
"summary": "Subscribe to
|
|
252
|
+
"summary": "Subscribe to drop notifications (SSE)",
|
|
177
253
|
"responses": {
|
|
178
254
|
"200": {
|
|
179
255
|
"description": "SSE stream",
|
|
@@ -190,6 +266,82 @@
|
|
|
190
266
|
}
|
|
191
267
|
}
|
|
192
268
|
},
|
|
269
|
+
"/feedbacks": {
|
|
270
|
+
"put": {
|
|
271
|
+
"security": [
|
|
272
|
+
{
|
|
273
|
+
"BearerAuth": []
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
"description": "The caller must hold an active X connection. A claimed drop accepts feedback only from its claiming wallet (so a recycled handle's new owner cannot forge replies, and the claimer keeps access after renaming); an unresolved drop accepts feedback from the current holder of its identifier handle — this works right after an on-chain claim, before the scanner records it. One feedback per drop; re-sending overwrites (idempotent Try Again). message is trimmed and limited to 140 runes; refunded drops reject feedback. A drop that does not exist or belongs to someone else reports the same 40003. The message appears as \"feedback\" in GET /histories items.",
|
|
277
|
+
"consumes": [
|
|
278
|
+
"application/json"
|
|
279
|
+
],
|
|
280
|
+
"produces": [
|
|
281
|
+
"application/json"
|
|
282
|
+
],
|
|
283
|
+
"tags": [
|
|
284
|
+
"feedbacks"
|
|
285
|
+
],
|
|
286
|
+
"summary": "Leave a thank-you message on a drop (Figma \"SAY THANKS\")",
|
|
287
|
+
"parameters": [
|
|
288
|
+
{
|
|
289
|
+
"type": "integer",
|
|
290
|
+
"description": "drop id (from GET /drops items)",
|
|
291
|
+
"name": "drop_id",
|
|
292
|
+
"in": "query",
|
|
293
|
+
"required": true
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"description": "feedback message",
|
|
297
|
+
"name": "request",
|
|
298
|
+
"in": "body",
|
|
299
|
+
"required": true,
|
|
300
|
+
"schema": {
|
|
301
|
+
"$ref": "#/definitions/types.FeedbackReq"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
"responses": {
|
|
306
|
+
"200": {
|
|
307
|
+
"description": "OK",
|
|
308
|
+
"schema": {
|
|
309
|
+
"$ref": "#/definitions/types.FeedbackResp"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"400": {
|
|
313
|
+
"description": "10001 INVALID_PARAM",
|
|
314
|
+
"schema": {
|
|
315
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"401": {
|
|
319
|
+
"description": "20003 UNAUTHORIZED",
|
|
320
|
+
"schema": {
|
|
321
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"404": {
|
|
325
|
+
"description": "40002 X_CONNECTION_NOT_FOUND / 40003 DROP_NOT_FOUND",
|
|
326
|
+
"schema": {
|
|
327
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
"429": {
|
|
331
|
+
"description": "10003 RATE_LIMITED",
|
|
332
|
+
"schema": {
|
|
333
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"500": {
|
|
337
|
+
"description": "10002 INTERNAL",
|
|
338
|
+
"schema": {
|
|
339
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
},
|
|
193
345
|
"/histories": {
|
|
194
346
|
"get": {
|
|
195
347
|
"security": [
|
|
@@ -197,25 +349,26 @@
|
|
|
197
349
|
"BearerAuth": []
|
|
198
350
|
}
|
|
199
351
|
],
|
|
200
|
-
"description": "
|
|
352
|
+
"description": "Drops-based activity history. type=sent returns drops sponsored by the authenticated wallet; type=received returns drops addressed to the wallet's active X handle or already claimed by the wallet (an active, non-expired X connection is required — 404 40002 otherwise). Both tabs include every status (pending/claimed/refunded), newest first. Each item carries both parties: sender (sponsor wallet + mapped X profile) and receiver (drop identifier handle + claiming wallet once withdrawn + mapped X profile); unmapped sides keep empty profile fields. amount is wei as a decimal string. The queried wallet always comes from the bearer token.",
|
|
201
353
|
"produces": [
|
|
202
354
|
"application/json"
|
|
203
355
|
],
|
|
204
356
|
"tags": [
|
|
205
357
|
"histories"
|
|
206
358
|
],
|
|
207
|
-
"summary": "List the caller's
|
|
359
|
+
"summary": "List the caller's drop activity (sent / received)",
|
|
208
360
|
"parameters": [
|
|
209
361
|
{
|
|
210
|
-
"enum": [
|
|
211
|
-
"Deposited",
|
|
212
|
-
"Withdrawn",
|
|
213
|
-
"Refunded",
|
|
214
|
-
"BatchWithdrawn"
|
|
215
|
-
],
|
|
216
362
|
"type": "string",
|
|
217
|
-
"description": "
|
|
218
|
-
"name": "
|
|
363
|
+
"description": "sent | received",
|
|
364
|
+
"name": "type",
|
|
365
|
+
"in": "query",
|
|
366
|
+
"required": true
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"type": "string",
|
|
370
|
+
"description": "ERC20 token address filter (0x hex)",
|
|
371
|
+
"name": "token",
|
|
219
372
|
"in": "query"
|
|
220
373
|
},
|
|
221
374
|
{
|
|
@@ -250,6 +403,12 @@
|
|
|
250
403
|
"$ref": "#/definitions/handler.errorBody"
|
|
251
404
|
}
|
|
252
405
|
},
|
|
406
|
+
"404": {
|
|
407
|
+
"description": "40002 X_CONNECTION_NOT_FOUND",
|
|
408
|
+
"schema": {
|
|
409
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
410
|
+
}
|
|
411
|
+
},
|
|
253
412
|
"500": {
|
|
254
413
|
"description": "10002 INTERNAL",
|
|
255
414
|
"schema": {
|
|
@@ -261,14 +420,14 @@
|
|
|
261
420
|
},
|
|
262
421
|
"/leaderboards": {
|
|
263
422
|
"get": {
|
|
264
|
-
"description": "Returns
|
|
423
|
+
"description": "Returns identifiers ordered by pending (claimable) amount of the given ERC20 token, descending (identifier ascending as tiebreak), maintained from Deposited/Withdrawn/Refunded events. Paged via page/page_size; (page-1)*page_size must stay below 10000. identifier switches to exact-match search mode: one item (or none) with page/page_size fixed to 1, page and page_size ignored. Identifiers with zero pending balance are excluded from the board and from search results (negative balances — a data-corruption signal — stay visible). rank is the current 1-based position; previous_rank is the position in the latest periodic snapshot (null = new entrant or no snapshot yet). balance and last_deposit_amount are wei as decimal strings. profile_image_url is the identifier's active X profile image (empty string when the identifier has no active X connection). Public endpoint.",
|
|
265
424
|
"produces": [
|
|
266
425
|
"application/json"
|
|
267
426
|
],
|
|
268
427
|
"tags": [
|
|
269
428
|
"leaderboards"
|
|
270
429
|
],
|
|
271
|
-
"summary": "
|
|
430
|
+
"summary": "Per-token pending-balance leaderboard",
|
|
272
431
|
"parameters": [
|
|
273
432
|
{
|
|
274
433
|
"type": "string",
|
|
@@ -276,6 +435,24 @@
|
|
|
276
435
|
"name": "token",
|
|
277
436
|
"in": "query",
|
|
278
437
|
"required": true
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"type": "integer",
|
|
441
|
+
"description": "1-based page (default 1)",
|
|
442
|
+
"name": "page",
|
|
443
|
+
"in": "query"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"type": "integer",
|
|
447
|
+
"description": "page size (default 10, max 100)",
|
|
448
|
+
"name": "page_size",
|
|
449
|
+
"in": "query"
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
"type": "string",
|
|
453
|
+
"description": "exact-match identifier search",
|
|
454
|
+
"name": "identifier",
|
|
455
|
+
"in": "query"
|
|
279
456
|
}
|
|
280
457
|
],
|
|
281
458
|
"responses": {
|
|
@@ -300,40 +477,35 @@
|
|
|
300
477
|
}
|
|
301
478
|
}
|
|
302
479
|
},
|
|
303
|
-
"/
|
|
304
|
-
"
|
|
480
|
+
"/leaderboards/me": {
|
|
481
|
+
"get": {
|
|
305
482
|
"security": [
|
|
306
483
|
{
|
|
307
484
|
"BearerAuth": []
|
|
308
485
|
}
|
|
309
486
|
],
|
|
310
|
-
"description": "
|
|
311
|
-
"consumes": [
|
|
312
|
-
"application/json"
|
|
313
|
-
],
|
|
487
|
+
"description": "Returns the authenticated caller's own leaderboard entry for the token, resolved via their active X connection. A visible caller gets the live rank (same as the public search) and a visible-set previous_rank; a caller hidden via Reveal You gets the full-set rank recorded in the latest periodic snapshot with previous_rank null. rank is null when the caller is hidden with no snapshot, or has no balance yet. A caller whose balance is zero gets rank null with balance \"0\". balance and last_deposit_amount are wei as decimal strings. profile_image_url is the caller's X profile image.",
|
|
314
488
|
"produces": [
|
|
315
489
|
"application/json"
|
|
316
490
|
],
|
|
317
491
|
"tags": [
|
|
318
|
-
"
|
|
492
|
+
"leaderboards"
|
|
319
493
|
],
|
|
320
|
-
"summary": "
|
|
494
|
+
"summary": "Caller's own leaderboard row (works while hidden)",
|
|
321
495
|
"parameters": [
|
|
322
496
|
{
|
|
323
|
-
"
|
|
324
|
-
"
|
|
325
|
-
"
|
|
326
|
-
"
|
|
327
|
-
"
|
|
328
|
-
"$ref": "#/definitions/types.CreateReq"
|
|
329
|
-
}
|
|
497
|
+
"type": "string",
|
|
498
|
+
"description": "ERC20 token address (0x hex)",
|
|
499
|
+
"name": "token",
|
|
500
|
+
"in": "query",
|
|
501
|
+
"required": true
|
|
330
502
|
}
|
|
331
503
|
],
|
|
332
504
|
"responses": {
|
|
333
|
-
"
|
|
334
|
-
"description": "
|
|
505
|
+
"200": {
|
|
506
|
+
"description": "OK",
|
|
335
507
|
"schema": {
|
|
336
|
-
"$ref": "#/definitions/types.
|
|
508
|
+
"$ref": "#/definitions/types.LeaderboardMeResp"
|
|
337
509
|
}
|
|
338
510
|
},
|
|
339
511
|
"400": {
|
|
@@ -343,25 +515,13 @@
|
|
|
343
515
|
}
|
|
344
516
|
},
|
|
345
517
|
"401": {
|
|
346
|
-
"description": "20003 UNAUTHORIZED
|
|
347
|
-
"schema": {
|
|
348
|
-
"$ref": "#/definitions/handler.errorBody"
|
|
349
|
-
}
|
|
350
|
-
},
|
|
351
|
-
"403": {
|
|
352
|
-
"description": "30003 SEND_BLOCKED",
|
|
518
|
+
"description": "20003 UNAUTHORIZED",
|
|
353
519
|
"schema": {
|
|
354
520
|
"$ref": "#/definitions/handler.errorBody"
|
|
355
521
|
}
|
|
356
522
|
},
|
|
357
523
|
"404": {
|
|
358
|
-
"description": "
|
|
359
|
-
"schema": {
|
|
360
|
-
"$ref": "#/definitions/handler.errorBody"
|
|
361
|
-
}
|
|
362
|
-
},
|
|
363
|
-
"409": {
|
|
364
|
-
"description": "30005 PENDING_LIMIT_EXCEEDED",
|
|
524
|
+
"description": "40002 X_CONNECTION_NOT_FOUND",
|
|
365
525
|
"schema": {
|
|
366
526
|
"$ref": "#/definitions/handler.errorBody"
|
|
367
527
|
}
|
|
@@ -375,9 +535,14 @@
|
|
|
375
535
|
}
|
|
376
536
|
}
|
|
377
537
|
},
|
|
378
|
-
"/
|
|
538
|
+
"/recipient-change-signature": {
|
|
379
539
|
"post": {
|
|
380
|
-
"
|
|
540
|
+
"security": [
|
|
541
|
+
{
|
|
542
|
+
"BearerAuth": []
|
|
543
|
+
}
|
|
544
|
+
],
|
|
545
|
+
"description": "Returns an EIP-712 ChangeRecipient signature binding id to the SIWE-authenticated address as the new recipient (new_recipient never comes from the body). The caller proves ownership of id via an X OAuth token in the body. id must be canonical (lowercase, no \"@\") — non-canonical ids are rejected with 400. nonce = changeNonceById(id) read on-chain by the caller; it is consumed per successful completeRecipientChange call.",
|
|
381
546
|
"consumes": [
|
|
382
547
|
"application/json"
|
|
383
548
|
],
|
|
@@ -385,17 +550,17 @@
|
|
|
385
550
|
"application/json"
|
|
386
551
|
],
|
|
387
552
|
"tags": [
|
|
388
|
-
"
|
|
553
|
+
"recipient"
|
|
389
554
|
],
|
|
390
|
-
"summary": "
|
|
555
|
+
"summary": "Issue an ONEpop recipient-change validator signature",
|
|
391
556
|
"parameters": [
|
|
392
557
|
{
|
|
393
|
-
"description": "
|
|
558
|
+
"description": "recipient-change signature request",
|
|
394
559
|
"name": "request",
|
|
395
560
|
"in": "body",
|
|
396
561
|
"required": true,
|
|
397
562
|
"schema": {
|
|
398
|
-
"$ref": "#/definitions/types.
|
|
563
|
+
"$ref": "#/definitions/types.RecipientChangeSignReq"
|
|
399
564
|
}
|
|
400
565
|
}
|
|
401
566
|
],
|
|
@@ -403,23 +568,17 @@
|
|
|
403
568
|
"200": {
|
|
404
569
|
"description": "OK",
|
|
405
570
|
"schema": {
|
|
406
|
-
"$ref": "#/definitions/types.
|
|
571
|
+
"$ref": "#/definitions/types.RecipientChangeSignResp"
|
|
407
572
|
}
|
|
408
573
|
},
|
|
409
574
|
"400": {
|
|
410
|
-
"description": "10001 INVALID_PARAM",
|
|
575
|
+
"description": "10001 INVALID_PARAM (incl. non-canonical id)",
|
|
411
576
|
"schema": {
|
|
412
577
|
"$ref": "#/definitions/handler.errorBody"
|
|
413
578
|
}
|
|
414
579
|
},
|
|
415
580
|
"401": {
|
|
416
|
-
"description": "
|
|
417
|
-
"schema": {
|
|
418
|
-
"$ref": "#/definitions/handler.errorBody"
|
|
419
|
-
}
|
|
420
|
-
},
|
|
421
|
-
"404": {
|
|
422
|
-
"description": "30001 WALLET_NOT_FOUND",
|
|
581
|
+
"description": "20003 UNAUTHORIZED",
|
|
423
582
|
"schema": {
|
|
424
583
|
"$ref": "#/definitions/handler.errorBody"
|
|
425
584
|
}
|
|
@@ -431,7 +590,7 @@
|
|
|
431
590
|
}
|
|
432
591
|
},
|
|
433
592
|
"500": {
|
|
434
|
-
"description": "10002 INTERNAL",
|
|
593
|
+
"description": "10002 INTERNAL (enclave error)",
|
|
435
594
|
"schema": {
|
|
436
595
|
"$ref": "#/definitions/handler.errorBody"
|
|
437
596
|
}
|
|
@@ -439,40 +598,307 @@
|
|
|
439
598
|
}
|
|
440
599
|
}
|
|
441
600
|
},
|
|
442
|
-
"/
|
|
443
|
-
"
|
|
444
|
-
"
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
}
|
|
601
|
+
"/recipient-reset-signature": {
|
|
602
|
+
"post": {
|
|
603
|
+
"description": "Returns an EIP-712 ResetRecipient signature for id. No SIWE — the mapped wallet's key is assumed lost and any address may relay resetRecipient; ownership of id is proven via the X OAuth token only. Issued only while an id → recipient mapping currently exists (unmapped ids get 30007): resetRecipient's nonce (changeNonceById) is not consumed by mapping creation, so pre-mapping issuance would enable a replay once the mapping appears. id must be canonical (lowercase, no \"@\").",
|
|
604
|
+
"consumes": [
|
|
605
|
+
"application/json"
|
|
448
606
|
],
|
|
449
607
|
"produces": [
|
|
450
608
|
"application/json"
|
|
451
609
|
],
|
|
452
610
|
"tags": [
|
|
453
|
-
"
|
|
611
|
+
"recipient"
|
|
612
|
+
],
|
|
613
|
+
"summary": "Issue an ONEpop recipient-reset validator signature",
|
|
614
|
+
"parameters": [
|
|
615
|
+
{
|
|
616
|
+
"description": "recipient-reset signature request",
|
|
617
|
+
"name": "request",
|
|
618
|
+
"in": "body",
|
|
619
|
+
"required": true,
|
|
620
|
+
"schema": {
|
|
621
|
+
"$ref": "#/definitions/types.RecipientResetSignReq"
|
|
622
|
+
}
|
|
623
|
+
}
|
|
454
624
|
],
|
|
455
|
-
"summary": "Get the caller's active X connection",
|
|
456
625
|
"responses": {
|
|
457
626
|
"200": {
|
|
458
627
|
"description": "OK",
|
|
459
628
|
"schema": {
|
|
460
|
-
"$ref": "#/definitions/types.
|
|
629
|
+
"$ref": "#/definitions/types.RecipientResetSignResp"
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
"400": {
|
|
633
|
+
"description": "10001 INVALID_PARAM (incl. non-canonical id)",
|
|
634
|
+
"schema": {
|
|
635
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
461
636
|
}
|
|
462
637
|
},
|
|
463
638
|
"401": {
|
|
464
|
-
"description": "20003 UNAUTHORIZED",
|
|
639
|
+
"description": "20001 INVALID_OAUTH_TOKEN / 20003 UNAUTHORIZED",
|
|
465
640
|
"schema": {
|
|
466
641
|
"$ref": "#/definitions/handler.errorBody"
|
|
467
642
|
}
|
|
468
643
|
},
|
|
469
644
|
"404": {
|
|
470
|
-
"description": "
|
|
645
|
+
"description": "30007 IDENTIFIER_NOT_MAPPED",
|
|
471
646
|
"schema": {
|
|
472
647
|
"$ref": "#/definitions/handler.errorBody"
|
|
473
648
|
}
|
|
474
649
|
},
|
|
475
|
-
"
|
|
650
|
+
"429": {
|
|
651
|
+
"description": "10003 RATE_LIMITED",
|
|
652
|
+
"schema": {
|
|
653
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
"500": {
|
|
657
|
+
"description": "10002 INTERNAL (enclave error)",
|
|
658
|
+
"schema": {
|
|
659
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
"/reveal-you": {
|
|
666
|
+
"put": {
|
|
667
|
+
"security": [
|
|
668
|
+
{
|
|
669
|
+
"BearerAuth": []
|
|
670
|
+
}
|
|
671
|
+
],
|
|
672
|
+
"description": "Turns the caller's leaderboard exposure on or off. Requires an active X connection. The setting belongs to the X account and keeps applying after disconnect/expiry or a handle change: a hidden user stays hidden until they reconnect and turn it back on. Users who never connected are always visible.",
|
|
673
|
+
"consumes": [
|
|
674
|
+
"application/json"
|
|
675
|
+
],
|
|
676
|
+
"produces": [
|
|
677
|
+
"application/json"
|
|
678
|
+
],
|
|
679
|
+
"tags": [
|
|
680
|
+
"reveal-you"
|
|
681
|
+
],
|
|
682
|
+
"summary": "Set the caller's leaderboard visibility (Reveal You)",
|
|
683
|
+
"parameters": [
|
|
684
|
+
{
|
|
685
|
+
"description": "reveal_you value",
|
|
686
|
+
"name": "request",
|
|
687
|
+
"in": "body",
|
|
688
|
+
"required": true,
|
|
689
|
+
"schema": {
|
|
690
|
+
"$ref": "#/definitions/types.RevealYouReq"
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
],
|
|
694
|
+
"responses": {
|
|
695
|
+
"200": {
|
|
696
|
+
"description": "OK",
|
|
697
|
+
"schema": {
|
|
698
|
+
"$ref": "#/definitions/types.RevealYouResp"
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
"400": {
|
|
702
|
+
"description": "10001 INVALID_PARAM",
|
|
703
|
+
"schema": {
|
|
704
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
"401": {
|
|
708
|
+
"description": "20003 UNAUTHORIZED",
|
|
709
|
+
"schema": {
|
|
710
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
"404": {
|
|
714
|
+
"description": "40002 X_CONNECTION_NOT_FOUND",
|
|
715
|
+
"schema": {
|
|
716
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
717
|
+
}
|
|
718
|
+
},
|
|
719
|
+
"500": {
|
|
720
|
+
"description": "10002 INTERNAL",
|
|
721
|
+
"schema": {
|
|
722
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
"/wallets": {
|
|
729
|
+
"post": {
|
|
730
|
+
"security": [
|
|
731
|
+
{
|
|
732
|
+
"BearerAuth": []
|
|
733
|
+
}
|
|
734
|
+
],
|
|
735
|
+
"description": "Generates a secp256k1 keypair for (sender_address, oauth_type, identifier), stores the AES-256-GCM-encrypted private key, and returns the new wallet address. Multiple pending wallets may exist for the same combination (a sender may create multiple drops to the same recipient). Drop metadata (message, envelope) is recorded separately via POST /drops/metadata. The response identifier is the normalized canonical id — pass it verbatim as the id argument of deposit/depositMapped. When the identifier already has an on-chain recipient mapping, no temp wallet is created: the response is 200 with is_mapped=true and address = the mapped recipient (advisory/display only — the actual recipient is decided by the on-chain mapping at tx time; deposit must use depositMapped).",
|
|
736
|
+
"consumes": [
|
|
737
|
+
"application/json"
|
|
738
|
+
],
|
|
739
|
+
"produces": [
|
|
740
|
+
"application/json"
|
|
741
|
+
],
|
|
742
|
+
"tags": [
|
|
743
|
+
"wallets"
|
|
744
|
+
],
|
|
745
|
+
"summary": "Create a temporary wallet",
|
|
746
|
+
"parameters": [
|
|
747
|
+
{
|
|
748
|
+
"description": "wallet creation request",
|
|
749
|
+
"name": "request",
|
|
750
|
+
"in": "body",
|
|
751
|
+
"required": true,
|
|
752
|
+
"schema": {
|
|
753
|
+
"$ref": "#/definitions/types.CreateReq"
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
],
|
|
757
|
+
"responses": {
|
|
758
|
+
"200": {
|
|
759
|
+
"description": "is_mapped=true — id is mapped, address is the mapped recipient (advisory)",
|
|
760
|
+
"schema": {
|
|
761
|
+
"$ref": "#/definitions/types.CreateResp"
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
"201": {
|
|
765
|
+
"description": "Created",
|
|
766
|
+
"schema": {
|
|
767
|
+
"$ref": "#/definitions/types.CreateResp"
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
"400": {
|
|
771
|
+
"description": "10001 INVALID_PARAM",
|
|
772
|
+
"schema": {
|
|
773
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
"401": {
|
|
777
|
+
"description": "20003 UNAUTHORIZED (missing/invalid token, or sender_address not owned by the token)",
|
|
778
|
+
"schema": {
|
|
779
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
780
|
+
}
|
|
781
|
+
},
|
|
782
|
+
"403": {
|
|
783
|
+
"description": "30003 SEND_BLOCKED",
|
|
784
|
+
"schema": {
|
|
785
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
"409": {
|
|
789
|
+
"description": "30005 PENDING_LIMIT_EXCEEDED",
|
|
790
|
+
"schema": {
|
|
791
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
"500": {
|
|
795
|
+
"description": "10002 INTERNAL",
|
|
796
|
+
"schema": {
|
|
797
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
"/wallets/private-key": {
|
|
804
|
+
"post": {
|
|
805
|
+
"description": "Identifies the caller through the X OAuth token (the token owner's username is the wallet identifier) and returns the decrypted private key of the pending wallet selected by address — the temp claim wallet of one specific drop (GET /drops items[].claim_address). The address only selects which drop; entitlement is proven per request by the OAuth token. A wallet that does not exist, belongs to someone else, or is already claimed reports the same 30001. oauth_token must be an X OAuth 2.0 user-context access token issued with the tweet.read and users.read scopes (app-only bearer tokens are rejected). Point of no return: once returned, key custody is the client's responsibility. When the caller's id is mapped on-chain, the response is 200 with is_mapped=true and empty address/private_key — claim via withdrawMapped / batchWithdrawMapped instead.",
|
|
806
|
+
"consumes": [
|
|
807
|
+
"application/json"
|
|
808
|
+
],
|
|
809
|
+
"produces": [
|
|
810
|
+
"application/json"
|
|
811
|
+
],
|
|
812
|
+
"tags": [
|
|
813
|
+
"wallets"
|
|
814
|
+
],
|
|
815
|
+
"summary": "Retrieve a pending wallet's private key",
|
|
816
|
+
"parameters": [
|
|
817
|
+
{
|
|
818
|
+
"description": "private key retrieval request",
|
|
819
|
+
"name": "request",
|
|
820
|
+
"in": "body",
|
|
821
|
+
"required": true,
|
|
822
|
+
"schema": {
|
|
823
|
+
"$ref": "#/definitions/types.RetrievePrivateKeyReq"
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
],
|
|
827
|
+
"responses": {
|
|
828
|
+
"200": {
|
|
829
|
+
"description": "OK",
|
|
830
|
+
"schema": {
|
|
831
|
+
"$ref": "#/definitions/types.RetrievePrivateKeyResp"
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
"400": {
|
|
835
|
+
"description": "10001 INVALID_PARAM",
|
|
836
|
+
"schema": {
|
|
837
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
"401": {
|
|
841
|
+
"description": "20001 INVALID_OAUTH_TOKEN",
|
|
842
|
+
"schema": {
|
|
843
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
"404": {
|
|
847
|
+
"description": "30001 WALLET_NOT_FOUND",
|
|
848
|
+
"schema": {
|
|
849
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
"429": {
|
|
853
|
+
"description": "10003 RATE_LIMITED",
|
|
854
|
+
"schema": {
|
|
855
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
"500": {
|
|
859
|
+
"description": "10002 INTERNAL",
|
|
860
|
+
"schema": {
|
|
861
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
"/x-connections": {
|
|
868
|
+
"get": {
|
|
869
|
+
"security": [
|
|
870
|
+
{
|
|
871
|
+
"BearerAuth": []
|
|
872
|
+
}
|
|
873
|
+
],
|
|
874
|
+
"description": "Returns the active connection plus the scanner-mirrored on-chain id -\u003e recipient mapping for the connected handle (onchain_mapped / mapped_recipient; advisory, lag windows exist).",
|
|
875
|
+
"produces": [
|
|
876
|
+
"application/json"
|
|
877
|
+
],
|
|
878
|
+
"tags": [
|
|
879
|
+
"x-connections"
|
|
880
|
+
],
|
|
881
|
+
"summary": "Get the caller's active X connection",
|
|
882
|
+
"responses": {
|
|
883
|
+
"200": {
|
|
884
|
+
"description": "OK",
|
|
885
|
+
"schema": {
|
|
886
|
+
"$ref": "#/definitions/types.XConnectionResp"
|
|
887
|
+
}
|
|
888
|
+
},
|
|
889
|
+
"401": {
|
|
890
|
+
"description": "20003 UNAUTHORIZED",
|
|
891
|
+
"schema": {
|
|
892
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
"404": {
|
|
896
|
+
"description": "40002 X_CONNECTION_NOT_FOUND",
|
|
897
|
+
"schema": {
|
|
898
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
899
|
+
}
|
|
900
|
+
},
|
|
901
|
+
"500": {
|
|
476
902
|
"description": "10002 INTERNAL",
|
|
477
903
|
"schema": {
|
|
478
904
|
"$ref": "#/definitions/handler.errorBody"
|
|
@@ -486,7 +912,7 @@
|
|
|
486
912
|
"BearerAuth": []
|
|
487
913
|
}
|
|
488
914
|
],
|
|
489
|
-
"description": "Verifies the X OAuth token server-side (GET /2/users/me) and upserts the x_user_id -\u003e wallet mapping (latest connection wins). The wallet is always the SIWE-authenticated address.",
|
|
915
|
+
"description": "Verifies the X OAuth token server-side (GET /2/users/me) and upserts the x_user_id -\u003e wallet mapping (latest connection wins). The wallet is always the SIWE-authenticated address. The response includes the account's stored reveal_you (default true on first connect, preserved on re-connect), and the leaderboard-visibility denylist is synced in the same transaction. The response also reports the scanner-mirrored on-chain id -\u003e recipient mapping for the connected handle (onchain_mapped / mapped_recipient; advisory, lag windows exist).",
|
|
490
916
|
"consumes": [
|
|
491
917
|
"application/json"
|
|
492
918
|
],
|
|
@@ -527,6 +953,12 @@
|
|
|
527
953
|
"$ref": "#/definitions/handler.errorBody"
|
|
528
954
|
}
|
|
529
955
|
},
|
|
956
|
+
"404": {
|
|
957
|
+
"description": "40002 X_CONNECTION_NOT_FOUND",
|
|
958
|
+
"schema": {
|
|
959
|
+
"$ref": "#/definitions/handler.errorBody"
|
|
960
|
+
}
|
|
961
|
+
},
|
|
530
962
|
"429": {
|
|
531
963
|
"description": "10003 RATE_LIMITED",
|
|
532
964
|
"schema": {
|
|
@@ -646,20 +1078,10 @@
|
|
|
646
1078
|
"sender_address"
|
|
647
1079
|
],
|
|
648
1080
|
"properties": {
|
|
649
|
-
"envelope_id": {
|
|
650
|
-
"description": "EnvelopeID selects the card design (GET /envelopes).",
|
|
651
|
-
"type": "string",
|
|
652
|
-
"example": "classic-coral"
|
|
653
|
-
},
|
|
654
1081
|
"identifier": {
|
|
655
1082
|
"type": "string",
|
|
656
1083
|
"example": "@theo_13303"
|
|
657
1084
|
},
|
|
658
|
-
"message": {
|
|
659
|
-
"description": "Message is shown to the recipient at claim (\u003c= 140 runes).\nStored server-side only — the contract has no message field.",
|
|
660
|
-
"type": "string",
|
|
661
|
-
"example": "Happy birthday!"
|
|
662
|
-
},
|
|
663
1085
|
"oauth_type": {
|
|
664
1086
|
"type": "string",
|
|
665
1087
|
"example": "x"
|
|
@@ -674,8 +1096,19 @@
|
|
|
674
1096
|
"type": "object",
|
|
675
1097
|
"properties": {
|
|
676
1098
|
"address": {
|
|
1099
|
+
"description": "Address is the new temp claim wallet (unmapped path), or the\non-chain mapped recipient when is_mapped=true. The mapped value\nis ADVISORY (display only): it mirrors the scanner-maintained\ncache (change/reset lag windows exist), and depositMapped takes\nno address argument — the actual recipient is decided by the\non-chain mapping at tx time.",
|
|
677
1100
|
"type": "string",
|
|
678
1101
|
"example": "0x2222222222222222222222222222222222222222"
|
|
1102
|
+
},
|
|
1103
|
+
"identifier": {
|
|
1104
|
+
"description": "Identifier is the normalized canonical id. The FE must pass this\nexact value as the id argument of deposit/depositMapped (base\nspec §5.4 — on-chain state keys on keccak256 of the raw string).",
|
|
1105
|
+
"type": "string",
|
|
1106
|
+
"example": "theo_13303"
|
|
1107
|
+
},
|
|
1108
|
+
"is_mapped": {
|
|
1109
|
+
"description": "IsMapped: the id already has an on-chain recipient mapping — no\ntemp key was created; the FE must deposit via depositMapped.",
|
|
1110
|
+
"type": "boolean",
|
|
1111
|
+
"example": false
|
|
679
1112
|
}
|
|
680
1113
|
}
|
|
681
1114
|
},
|
|
@@ -694,10 +1127,20 @@
|
|
|
694
1127
|
"deposited_at": {
|
|
695
1128
|
"type": "string"
|
|
696
1129
|
},
|
|
1130
|
+
"drop_key": {
|
|
1131
|
+
"description": "DropKey is the on-chain bytes32 drop id (0x hex) — required for\nONEpop withdrawMapped / withdrawUnmapped / batch ByKeys calls.",
|
|
1132
|
+
"type": "string",
|
|
1133
|
+
"example": "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
1134
|
+
},
|
|
697
1135
|
"envelope_id": {
|
|
698
1136
|
"type": "string",
|
|
699
1137
|
"example": "classic-coral"
|
|
700
1138
|
},
|
|
1139
|
+
"id": {
|
|
1140
|
+
"description": "ID is the drops row id — the FE keys the post-claim feedback\ncall (PUT /feedbacks?drop_id=) on it.",
|
|
1141
|
+
"type": "integer",
|
|
1142
|
+
"example": 123
|
|
1143
|
+
},
|
|
701
1144
|
"message": {
|
|
702
1145
|
"type": "string",
|
|
703
1146
|
"example": "Happy birthday!"
|
|
@@ -711,6 +1154,35 @@
|
|
|
711
1154
|
}
|
|
712
1155
|
}
|
|
713
1156
|
},
|
|
1157
|
+
"types.DropMetadataReq": {
|
|
1158
|
+
"type": "object",
|
|
1159
|
+
"properties": {
|
|
1160
|
+
"envelope_id": {
|
|
1161
|
+
"description": "EnvelopeID selects the card design (GET /envelopes); optional.",
|
|
1162
|
+
"type": "string",
|
|
1163
|
+
"example": "classic-coral"
|
|
1164
|
+
},
|
|
1165
|
+
"message": {
|
|
1166
|
+
"description": "Message is shown to the recipient at claim (\u003c= 140 runes); optional.",
|
|
1167
|
+
"type": "string",
|
|
1168
|
+
"example": "Happy birthday!"
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
},
|
|
1172
|
+
"types.DropMetadataResp": {
|
|
1173
|
+
"type": "object",
|
|
1174
|
+
"properties": {
|
|
1175
|
+
"envelope_id": {
|
|
1176
|
+
"description": "EnvelopeID/Message echo the stored values.",
|
|
1177
|
+
"type": "string",
|
|
1178
|
+
"example": "classic-coral"
|
|
1179
|
+
},
|
|
1180
|
+
"message": {
|
|
1181
|
+
"type": "string",
|
|
1182
|
+
"example": "Happy birthday!"
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
714
1186
|
"types.DropSender": {
|
|
715
1187
|
"type": "object",
|
|
716
1188
|
"properties": {
|
|
@@ -741,7 +1213,7 @@
|
|
|
741
1213
|
"example": 3
|
|
742
1214
|
},
|
|
743
1215
|
"has_claimed_before": {
|
|
744
|
-
"description": "HasClaimedBefore gates the batch-claim CTA (
|
|
1216
|
+
"description": "HasClaimedBefore gates the batch-claim CTA. Derived from the\nidentifier_recipients mapping row (row exists == a first batch\nclaim recorded the mapping on-chain).",
|
|
745
1217
|
"type": "boolean",
|
|
746
1218
|
"example": true
|
|
747
1219
|
},
|
|
@@ -751,6 +1223,16 @@
|
|
|
751
1223
|
"$ref": "#/definitions/types.DropItem"
|
|
752
1224
|
}
|
|
753
1225
|
},
|
|
1226
|
+
"mapped_recipient": {
|
|
1227
|
+
"description": "MappedRecipient is the on-chain mapped recipient address (0x hex);\nempty string when unmapped. When set, FE deposits must use\ndepositMapped (POST /wallets responds 409).",
|
|
1228
|
+
"type": "string",
|
|
1229
|
+
"example": "0x5555555555555555555555555555555555555555"
|
|
1230
|
+
},
|
|
1231
|
+
"pending_change_to": {
|
|
1232
|
+
"description": "PendingChangeTo is the address of an in-flight recipient change\nrequest; empty string when none.",
|
|
1233
|
+
"type": "string",
|
|
1234
|
+
"example": ""
|
|
1235
|
+
},
|
|
754
1236
|
"total_amount": {
|
|
755
1237
|
"description": "TotalAmount is the pending sum in wei as a decimal string.",
|
|
756
1238
|
"type": "string",
|
|
@@ -794,56 +1276,108 @@
|
|
|
794
1276
|
}
|
|
795
1277
|
}
|
|
796
1278
|
},
|
|
1279
|
+
"types.FeedbackReq": {
|
|
1280
|
+
"type": "object",
|
|
1281
|
+
"required": [
|
|
1282
|
+
"message"
|
|
1283
|
+
],
|
|
1284
|
+
"properties": {
|
|
1285
|
+
"message": {
|
|
1286
|
+
"type": "string",
|
|
1287
|
+
"example": "Thanks so much for this! 🐶"
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
},
|
|
1291
|
+
"types.FeedbackResp": {
|
|
1292
|
+
"type": "object",
|
|
1293
|
+
"properties": {
|
|
1294
|
+
"message": {
|
|
1295
|
+
"description": "Message echoes the stored (trimmed) value.",
|
|
1296
|
+
"type": "string",
|
|
1297
|
+
"example": "Thanks so much for this! 🐶"
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
},
|
|
797
1301
|
"types.HistoryItem": {
|
|
798
1302
|
"type": "object",
|
|
799
1303
|
"properties": {
|
|
800
1304
|
"amount": {
|
|
801
|
-
"description": "Amount is wei as a decimal string (JS number precision safety).",
|
|
802
1305
|
"type": "string",
|
|
803
|
-
"example": "
|
|
1306
|
+
"example": "12043000000000000000000"
|
|
804
1307
|
},
|
|
805
|
-
"
|
|
806
|
-
"type": "
|
|
807
|
-
"example":
|
|
1308
|
+
"claim_address": {
|
|
1309
|
+
"type": "string",
|
|
1310
|
+
"example": "0x2222222222222222222222222222222222222222"
|
|
808
1311
|
},
|
|
809
|
-
"
|
|
1312
|
+
"deposit_tx_hash": {
|
|
810
1313
|
"type": "string",
|
|
811
|
-
"example": "
|
|
1314
|
+
"example": "0x9f2c..."
|
|
812
1315
|
},
|
|
813
|
-
"
|
|
1316
|
+
"deposited_at": {
|
|
814
1317
|
"type": "string"
|
|
815
1318
|
},
|
|
816
|
-
"
|
|
1319
|
+
"envelope_id": {
|
|
817
1320
|
"type": "string",
|
|
818
|
-
"example": "
|
|
1321
|
+
"example": "classic-coral"
|
|
819
1322
|
},
|
|
820
|
-
"
|
|
821
|
-
"description": "
|
|
1323
|
+
"feedback": {
|
|
1324
|
+
"description": "Feedback is the recipient's thank-you message (Figma \"SAY\nTHANKS\"); null until one is left.",
|
|
822
1325
|
"type": "string",
|
|
823
|
-
"example": "
|
|
1326
|
+
"example": "Thanks so much for this!"
|
|
824
1327
|
},
|
|
825
|
-
"
|
|
1328
|
+
"id": {
|
|
1329
|
+
"type": "integer",
|
|
1330
|
+
"example": 123
|
|
1331
|
+
},
|
|
1332
|
+
"message": {
|
|
826
1333
|
"type": "string",
|
|
827
|
-
"example": "
|
|
1334
|
+
"example": "Loved your latest post!"
|
|
828
1335
|
},
|
|
829
|
-
"
|
|
830
|
-
"
|
|
831
|
-
"example": 0
|
|
1336
|
+
"receiver": {
|
|
1337
|
+
"$ref": "#/definitions/types.HistoryParty"
|
|
832
1338
|
},
|
|
833
|
-
"
|
|
834
|
-
"type": "
|
|
1339
|
+
"resolved_at": {
|
|
1340
|
+
"type": "string"
|
|
835
1341
|
},
|
|
836
|
-
"
|
|
1342
|
+
"resolved_tx_hash": {
|
|
837
1343
|
"type": "string",
|
|
838
|
-
"example": "
|
|
1344
|
+
"example": "0x8a1b..."
|
|
1345
|
+
},
|
|
1346
|
+
"sender": {
|
|
1347
|
+
"$ref": "#/definitions/types.HistoryParty"
|
|
839
1348
|
},
|
|
840
|
-
"
|
|
1349
|
+
"status": {
|
|
841
1350
|
"type": "string",
|
|
842
|
-
"example": "
|
|
1351
|
+
"example": "pending"
|
|
843
1352
|
},
|
|
844
|
-
"
|
|
1353
|
+
"token": {
|
|
1354
|
+
"type": "string",
|
|
1355
|
+
"example": "0x3333333333333333333333333333333333333333"
|
|
1356
|
+
},
|
|
1357
|
+
"type": {
|
|
845
1358
|
"type": "string",
|
|
846
|
-
"example": "
|
|
1359
|
+
"example": "sent"
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
},
|
|
1363
|
+
"types.HistoryParty": {
|
|
1364
|
+
"type": "object",
|
|
1365
|
+
"properties": {
|
|
1366
|
+
"address": {
|
|
1367
|
+
"type": "string",
|
|
1368
|
+
"example": "0x1111111111111111111111111111111111111111"
|
|
1369
|
+
},
|
|
1370
|
+
"display_name": {
|
|
1371
|
+
"type": "string",
|
|
1372
|
+
"example": "Amy Ryoon"
|
|
1373
|
+
},
|
|
1374
|
+
"handle": {
|
|
1375
|
+
"type": "string",
|
|
1376
|
+
"example": "amyhryoon"
|
|
1377
|
+
},
|
|
1378
|
+
"profile_image_url": {
|
|
1379
|
+
"type": "string",
|
|
1380
|
+
"example": "https://pbs.twimg.com/..."
|
|
847
1381
|
}
|
|
848
1382
|
}
|
|
849
1383
|
},
|
|
@@ -886,6 +1420,50 @@
|
|
|
886
1420
|
"description": "LastDepositAmount is the most recent Deposited amount in wei.",
|
|
887
1421
|
"type": "string",
|
|
888
1422
|
"example": "1200000000000000000000"
|
|
1423
|
+
},
|
|
1424
|
+
"previous_rank": {
|
|
1425
|
+
"description": "PreviousRank is the position in the latest snapshot; null\nwhen the identifier was absent (new entrant) or no snapshot exists\nyet. The frontend derives the delta (previous_rank - rank).",
|
|
1426
|
+
"type": "integer",
|
|
1427
|
+
"example": 9
|
|
1428
|
+
},
|
|
1429
|
+
"profile_image_url": {
|
|
1430
|
+
"description": "ProfileImageURL is the identifier's active X profile image; empty\nwhen the identifier has no active X connection.",
|
|
1431
|
+
"type": "string",
|
|
1432
|
+
"example": "https://pbs.twimg.com/..."
|
|
1433
|
+
},
|
|
1434
|
+
"rank": {
|
|
1435
|
+
"description": "Rank is the current 1-based leaderboard position.",
|
|
1436
|
+
"type": "integer",
|
|
1437
|
+
"example": 11
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
},
|
|
1441
|
+
"types.LeaderboardMeResp": {
|
|
1442
|
+
"type": "object",
|
|
1443
|
+
"properties": {
|
|
1444
|
+
"balance": {
|
|
1445
|
+
"type": "string",
|
|
1446
|
+
"example": "12043000000000000000000"
|
|
1447
|
+
},
|
|
1448
|
+
"identifier": {
|
|
1449
|
+
"type": "string",
|
|
1450
|
+
"example": "theo_13303"
|
|
1451
|
+
},
|
|
1452
|
+
"last_deposit_amount": {
|
|
1453
|
+
"type": "string",
|
|
1454
|
+
"example": "1200000000000000000000"
|
|
1455
|
+
},
|
|
1456
|
+
"previous_rank": {
|
|
1457
|
+
"type": "integer",
|
|
1458
|
+
"example": 9
|
|
1459
|
+
},
|
|
1460
|
+
"profile_image_url": {
|
|
1461
|
+
"description": "ProfileImageURL is the caller's X profile image.",
|
|
1462
|
+
"type": "string"
|
|
1463
|
+
},
|
|
1464
|
+
"rank": {
|
|
1465
|
+
"type": "integer",
|
|
1466
|
+
"example": 11
|
|
889
1467
|
}
|
|
890
1468
|
}
|
|
891
1469
|
},
|
|
@@ -897,17 +1475,118 @@
|
|
|
897
1475
|
"items": {
|
|
898
1476
|
"$ref": "#/definitions/types.LeaderboardItem"
|
|
899
1477
|
}
|
|
1478
|
+
},
|
|
1479
|
+
"page": {
|
|
1480
|
+
"type": "integer",
|
|
1481
|
+
"example": 1
|
|
1482
|
+
},
|
|
1483
|
+
"page_size": {
|
|
1484
|
+
"type": "integer",
|
|
1485
|
+
"example": 10
|
|
1486
|
+
},
|
|
1487
|
+
"total": {
|
|
1488
|
+
"type": "integer",
|
|
1489
|
+
"example": 123
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
},
|
|
1493
|
+
"types.RecipientChangeSignReq": {
|
|
1494
|
+
"type": "object",
|
|
1495
|
+
"required": [
|
|
1496
|
+
"deadline",
|
|
1497
|
+
"id",
|
|
1498
|
+
"nonce",
|
|
1499
|
+
"oauth_token"
|
|
1500
|
+
],
|
|
1501
|
+
"properties": {
|
|
1502
|
+
"deadline": {
|
|
1503
|
+
"type": "string"
|
|
1504
|
+
},
|
|
1505
|
+
"id": {
|
|
1506
|
+
"type": "string"
|
|
1507
|
+
},
|
|
1508
|
+
"nonce": {
|
|
1509
|
+
"type": "string"
|
|
1510
|
+
},
|
|
1511
|
+
"oauth_token": {
|
|
1512
|
+
"type": "string"
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
},
|
|
1516
|
+
"types.RecipientChangeSignResp": {
|
|
1517
|
+
"type": "object",
|
|
1518
|
+
"properties": {
|
|
1519
|
+
"deadline": {
|
|
1520
|
+
"type": "string"
|
|
1521
|
+
},
|
|
1522
|
+
"id": {
|
|
1523
|
+
"type": "string"
|
|
1524
|
+
},
|
|
1525
|
+
"new_recipient": {
|
|
1526
|
+
"type": "string"
|
|
1527
|
+
},
|
|
1528
|
+
"nonce": {
|
|
1529
|
+
"type": "string"
|
|
1530
|
+
},
|
|
1531
|
+
"signature": {
|
|
1532
|
+
"type": "string"
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
},
|
|
1536
|
+
"types.RecipientResetSignReq": {
|
|
1537
|
+
"type": "object",
|
|
1538
|
+
"required": [
|
|
1539
|
+
"deadline",
|
|
1540
|
+
"id",
|
|
1541
|
+
"nonce",
|
|
1542
|
+
"oauth_token"
|
|
1543
|
+
],
|
|
1544
|
+
"properties": {
|
|
1545
|
+
"deadline": {
|
|
1546
|
+
"type": "string"
|
|
1547
|
+
},
|
|
1548
|
+
"id": {
|
|
1549
|
+
"type": "string"
|
|
1550
|
+
},
|
|
1551
|
+
"nonce": {
|
|
1552
|
+
"type": "string"
|
|
1553
|
+
},
|
|
1554
|
+
"oauth_token": {
|
|
1555
|
+
"type": "string"
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
},
|
|
1559
|
+
"types.RecipientResetSignResp": {
|
|
1560
|
+
"type": "object",
|
|
1561
|
+
"properties": {
|
|
1562
|
+
"deadline": {
|
|
1563
|
+
"type": "string"
|
|
1564
|
+
},
|
|
1565
|
+
"id": {
|
|
1566
|
+
"type": "string"
|
|
1567
|
+
},
|
|
1568
|
+
"nonce": {
|
|
1569
|
+
"type": "string"
|
|
1570
|
+
},
|
|
1571
|
+
"signature": {
|
|
1572
|
+
"type": "string"
|
|
900
1573
|
}
|
|
901
1574
|
}
|
|
902
1575
|
},
|
|
903
1576
|
"types.RetrievePrivateKeyReq": {
|
|
904
1577
|
"type": "object",
|
|
905
1578
|
"required": [
|
|
1579
|
+
"address",
|
|
906
1580
|
"oauth_token",
|
|
907
1581
|
"oauth_type",
|
|
908
1582
|
"sender_address"
|
|
909
1583
|
],
|
|
910
1584
|
"properties": {
|
|
1585
|
+
"address": {
|
|
1586
|
+
"description": "Address selects WHICH pending wallet to retrieve — the temp claim\nwallet of the target drop (GET /drops items[].claim_address).\nOwnership is still proven per request via OAuthToken; the address\nalone never authorizes retrieval.",
|
|
1587
|
+
"type": "string",
|
|
1588
|
+
"example": "0x2222222222222222222222222222222222222222"
|
|
1589
|
+
},
|
|
911
1590
|
"oauth_token": {
|
|
912
1591
|
"description": "OAuthToken is an X OAuth 2.0 USER-context access token. The client\n(frontend) must request the `tweet.read` and `users.read` scopes\nwhen issuing it — GET /2/users/me rejects tokens without them.\nApp-only bearer tokens do not work (401/403).",
|
|
913
1592
|
"type": "string"
|
|
@@ -929,12 +1608,38 @@
|
|
|
929
1608
|
"type": "string",
|
|
930
1609
|
"example": "0x2222222222222222222222222222222222222222"
|
|
931
1610
|
},
|
|
1611
|
+
"is_mapped": {
|
|
1612
|
+
"description": "IsMapped: the caller's id is mapped on-chain — no temp key is\nreturned (address is the zero address, private_key empty); claim\nvia withdrawMapped / batchWithdrawMapped instead.",
|
|
1613
|
+
"type": "boolean",
|
|
1614
|
+
"example": false
|
|
1615
|
+
},
|
|
932
1616
|
"private_key": {
|
|
933
1617
|
"type": "string",
|
|
934
1618
|
"example": "0x11223344556677889900aabbccddeeff11223344556677889900aabbccddeeff"
|
|
935
1619
|
}
|
|
936
1620
|
}
|
|
937
1621
|
},
|
|
1622
|
+
"types.RevealYouReq": {
|
|
1623
|
+
"type": "object",
|
|
1624
|
+
"required": [
|
|
1625
|
+
"reveal_you"
|
|
1626
|
+
],
|
|
1627
|
+
"properties": {
|
|
1628
|
+
"reveal_you": {
|
|
1629
|
+
"type": "boolean",
|
|
1630
|
+
"example": false
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
},
|
|
1634
|
+
"types.RevealYouResp": {
|
|
1635
|
+
"type": "object",
|
|
1636
|
+
"properties": {
|
|
1637
|
+
"reveal_you": {
|
|
1638
|
+
"type": "boolean",
|
|
1639
|
+
"example": false
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
},
|
|
938
1643
|
"types.XConnectReq": {
|
|
939
1644
|
"type": "object",
|
|
940
1645
|
"required": [
|
|
@@ -958,10 +1663,25 @@
|
|
|
958
1663
|
"type": "string",
|
|
959
1664
|
"example": "theo_13303"
|
|
960
1665
|
},
|
|
1666
|
+
"mapped_recipient": {
|
|
1667
|
+
"description": "MappedRecipient is the mapped on-chain recipient (0x hex);\nempty string when unmapped. Same convention as\nDropsResp.MappedRecipient.",
|
|
1668
|
+
"type": "string",
|
|
1669
|
+
"example": "0x5555555555555555555555555555555555555555"
|
|
1670
|
+
},
|
|
1671
|
+
"onchain_mapped": {
|
|
1672
|
+
"description": "OnchainMapped: the connected handle has an on-chain\nid -\u003e recipient mapping (scanner-mirrored, advisory).",
|
|
1673
|
+
"type": "boolean",
|
|
1674
|
+
"example": true
|
|
1675
|
+
},
|
|
961
1676
|
"profile_image_url": {
|
|
962
1677
|
"type": "string",
|
|
963
1678
|
"example": "https://pbs.twimg.com/..."
|
|
964
1679
|
},
|
|
1680
|
+
"reveal_you": {
|
|
1681
|
+
"description": "RevealYou is the leaderboard visibility setting (default true).",
|
|
1682
|
+
"type": "boolean",
|
|
1683
|
+
"example": true
|
|
1684
|
+
},
|
|
965
1685
|
"wallet_address": {
|
|
966
1686
|
"type": "string",
|
|
967
1687
|
"example": "0x1111111111111111111111111111111111111111"
|