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
| Name | Required | Description | Default |
|---|---|---|---|
| sponsor_public_key | Yes | Public key of the sponsor funding the card. | |
| cardInfo | Yes | Sponsor card details. | |
| sponsor_location | Yes | GPS coordinates where the card can be claimed. | |
| signature | Yes | Sponsor transaction signature (EVM personal_sign). | |
| distributionSignature | Yes | Distribution account co-signature for dual signing. | |
| timestamp | Yes | ISO 8601 timestamp of the transaction. |
Implementation Reference
- src/tools.ts:412-415 (handler)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); } - src/tools.ts:195-270 (schema)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', },