Skip to main content
Glama
baskcart

W3 Ledger MCP Server

by baskcart

create_sponsor_card

Create a location-based sponsor card by debiting the sponsor's DAH balance with dual signatures, enabling users near the sponsor location to claim it.

Instructions

Create a location-based sponsor card by debiting the sponsor's DAH balance. Requires dual signatures. The card can be claimed by users near the sponsor location.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sponsor_public_keyYesPublic key of the sponsor funding the card.
cardInfoYesSponsor card details.
sponsor_locationYesGPS coordinates where the card can be claimed.
signatureYesSponsor transaction signature (EVM personal_sign).
distributionSignatureYesDistribution account co-signature for dual signing.
timestampYesISO 8601 timestamp of the transaction.

Implementation Reference

  • The implementation of the tool 'create_sponsor_card' in the executeTool function, which sends a POST request to the '/sponsor-card' endpoint.
    case 'create_sponsor_card': {
        const res = await client.post('/sponsor-card', args);
        return toResult(res.data, !res.ok);
    }
  • The schema definition and registration for the 'create_sponsor_card' tool.
    {
        name: 'create_sponsor_card',
        description:
            'Create a location-based sponsor card by debiting the sponsor\'s DAH balance. ' +
            'Requires dual signatures. The card can be claimed by users near the sponsor location.',
        inputSchema: {
            type: 'object',
            properties: {
                sponsor_public_key: {
                    type: 'string',
                    description: 'Public key of the sponsor funding the card.',
                },
                cardInfo: {
                    type: 'object',
                    description: 'Sponsor card details.',
                    properties: {
                        sponsor_name: {
                            type: 'string',
                            description: 'Name of the sponsor (max 100 chars).',
                        },
                        message: {
                            type: 'string',
                            description: 'Sponsor message (max 500 chars).',
                        },
                        cardValue: {
                            type: 'number',
                            description: 'Value in DAH tokens (max 10,000).',
                            minimum: 0.01,
                            maximum: 10000,
                        },
                    },
                    required: ['sponsor_name', 'message', 'cardValue'],
                },
                sponsor_location: {
                    type: 'object',
                    description: 'GPS coordinates where the card can be claimed.',
                    properties: {
                        lat: {
                            type: 'number',
                            description: 'Latitude (-90 to 90).',
                            minimum: -90,
                            maximum: 90,
                        },
                        lng: {
                            type: 'number',
                            description: 'Longitude (-180 to 180).',
                            minimum: -180,
                            maximum: 180,
                        },
                    },
                    required: ['lat', 'lng'],
                },
                signature: {
                    type: 'string',
                    description: 'Sponsor transaction signature (EVM personal_sign).',
                },
                distributionSignature: {
                    type: 'string',
                    description: 'Distribution account co-signature for dual signing.',
                },
                timestamp: {
                    type: 'string',
                    description: 'ISO 8601 timestamp of the transaction.',
                },
            },
            required: [
                'sponsor_public_key',
                'cardInfo',
                'sponsor_location',
                'signature',
                'distributionSignature',
                'timestamp',
            ],
        },
        access: 'write',
    },

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