claim_gift_card
Claim a gift card to credit the claimer's DAH balance. Use this tool to process gift cards with ISSUED status by providing the player's public key and card information.
Instructions
Claim a gift card and credit the claimer's DAH balance. Only cards with status ISSUED can be claimed.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| player_publickey | Yes | Public key of the person claiming the card. | |
| cardInfo | Yes | Gift card to claim (must include verification fields). |
Implementation Reference
- src/tools.ts:407-410 (handler)The handler logic for 'claim_gift_card' which uses the RolledgeClient to make a POST request to '/claimGift'.
case 'claim_gift_card': { const res = await client.post('/claimGift', args); return toResult(res.data, !res.ok); } - src/tools.ts:141-190 (schema)The input schema definition for 'claim_gift_card', defining the required player_publickey and cardInfo object structure.
{ name: 'claim_gift_card', description: 'Claim a gift card and credit the claimer\'s DAH balance. ' + 'Only cards with status ISSUED can be claimed.', inputSchema: { type: 'object', properties: { player_publickey: { type: 'string', description: 'Public key of the person claiming the card.', }, cardInfo: { type: 'object', description: 'Gift card to claim (must include verification fields).', properties: { card_id: { type: 'string', description: 'Unique gift card ID.' }, card_public_key: { type: 'string', description: 'Card\'s public key for verification.', }, digital_signature: { type: 'string', description: 'Card\'s digital signature.', }, message: { type: 'string', description: 'Gift card message.' }, cardValue: { type: 'number', description: 'Card value.' }, selected_merchant: { type: 'string', description: 'Merchant the card is for.', }, status: { type: 'string', description: 'Must be ISSUED.', enum: ['ISSUED'], }, }, required: [ 'card_id', 'card_public_key', 'digital_signature', 'message', 'cardValue', 'selected_merchant', 'status', ], }, }, required: ['player_publickey', 'cardInfo'], },