Skip to main content
Glama
baskcart

W3 Ledger MCP Server

by baskcart

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
NameRequiredDescriptionDefault
player_publickeyYesPublic key of the person claiming the card.
cardInfoYesGift card to claim (must include verification fields).

Implementation Reference

  • 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);
    }
  • 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'],
        },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/baskcart/w3-ledger-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server