|
28 | 28 | description: Events related operations |
29 | 29 | - name: explore |
30 | 30 | description: Explore related operations |
| 31 | +- name: rewards |
| 32 | + description: Rewards related operations |
31 | 33 | paths: |
32 | 34 | /challenges/undisbursed: |
33 | 35 | get: |
@@ -3573,6 +3575,31 @@ paths: |
3573 | 3575 | application/json: |
3574 | 3576 | schema: |
3575 | 3577 | $ref: '#/components/schemas/coin_members_response' |
| 3578 | + /rewards/claim: |
| 3579 | + post: |
| 3580 | + tags: |
| 3581 | + - rewards |
| 3582 | + description: Claims all the filtered undisbursed rewards for a user |
| 3583 | + operationId: Claim Rewards |
| 3584 | + requestBody: |
| 3585 | + required: true |
| 3586 | + content: |
| 3587 | + application/json: |
| 3588 | + schema: |
| 3589 | + $ref: '#/components/schemas/claim_rewards_request' |
| 3590 | + responses: |
| 3591 | + "200": |
| 3592 | + description: Success |
| 3593 | + content: |
| 3594 | + application/json: |
| 3595 | + schema: |
| 3596 | + $ref: '#/components/schemas/claim_rewards_response' |
| 3597 | + "400": |
| 3598 | + description: Bad request - No rewards to claim or invalid parameters |
| 3599 | + content: {} |
| 3600 | + "500": |
| 3601 | + description: Server error |
| 3602 | + content: {} |
3576 | 3603 |
|
3577 | 3604 | components: |
3578 | 3605 | schemas: |
@@ -5460,6 +5487,55 @@ components: |
5460 | 5487 | properties: |
5461 | 5488 | data: |
5462 | 5489 | $ref: '#/components/schemas/user_coin_with_accounts' |
| 5490 | + claim_rewards_response: |
| 5491 | + type: object |
| 5492 | + required: |
| 5493 | + - data |
| 5494 | + properties: |
| 5495 | + data: |
| 5496 | + type: array |
| 5497 | + items: |
| 5498 | + type: object |
| 5499 | + properties: |
| 5500 | + challengeId: |
| 5501 | + type: string |
| 5502 | + description: The challenge ID |
| 5503 | + example: "u" |
| 5504 | + specifier: |
| 5505 | + type: string |
| 5506 | + description: The challenge specifier |
| 5507 | + example: "7eP5n" |
| 5508 | + amount: |
| 5509 | + type: string |
| 5510 | + description: The reward amount |
| 5511 | + example: "1000000000" |
| 5512 | + signatures: |
| 5513 | + type: array |
| 5514 | + items: |
| 5515 | + type: string |
| 5516 | + description: Transaction signatures |
| 5517 | + example: ["5j7s1QjmRKFuDbCWMRVRNibSV2VAAEcNKP6HWU7GwPdXkBZvhz8n4vQl7bBq8tN4Rz9x1Kj3mP5wQ8rT2Y6zA"] |
| 5518 | + error: |
| 5519 | + type: string |
| 5520 | + description: Error message if claim failed |
| 5521 | + example: "Insufficient balance" |
| 5522 | + claim_rewards_request: |
| 5523 | + type: object |
| 5524 | + required: |
| 5525 | + - userId |
| 5526 | + properties: |
| 5527 | + challengeId: |
| 5528 | + type: string |
| 5529 | + description: The challenge ID to filter rewards (optional) |
| 5530 | + example: "u" |
| 5531 | + specifier: |
| 5532 | + type: string |
| 5533 | + description: The specifier to filter rewards (optional) |
| 5534 | + example: "7eP5n" |
| 5535 | + userId: |
| 5536 | + type: string |
| 5537 | + description: The user ID to claim rewards for |
| 5538 | + example: "7eP5n" |
5463 | 5539 | responses: |
5464 | 5540 | ParseError: |
5465 | 5541 | description: When a mask can't be parsed |
|
0 commit comments