Skip to main content

Sol Mate API

Base URL: https://sol-mate-trust-api-production.up.railway.app
Auth: JWT Bearer (wallet challenge-response)
Chain: Solana devnet
Source: github.com/AINative-Studio/sol-mate-trust-api

Sol Mate is a trust-based social dApp. Users stake USDC to DM, match, and meet. No-shows get slashed. Reputation decays with inactivity.

Auth Model

Sol Mate uses wallet-signature JWTs — not AINative API keys. Authentication is wallet-based (Solana Ed25519 signature). AINative API keys are not accepted on protected endpoints.

Public Endpoints (No Auth Required)

These endpoints are live and accessible without any token:

MethodPathDescription
POST/v1/users/challengeRequest nonce (query param)
POST/v1/users/onboardRegister / login with wallet signature
GET/v1/roomsList all public rooms
GET/v1/rooms/discoverNearby rooms (lat, lng, radius_km)
GET/v1/rooms/{id}Room details
GET/v1/reputation/persona/{id}Public reputation score
GET/healthHealth check

Authentication

1. Request Nonce

curl -X POST "https://sol-mate-trust-api-production.up.railway.app/v1/users/challenge?wallet_address=7xKXtg2..."

wallet_address is a query parameter (not a request body). Returns {"nonce": "abc123", "expires_at": "..."} — sign with your Solana wallet.

2. Onboard / Login

POST /v1/users/onboard
Content-Type: application/json

{
"wallet_address": "7xKXtg2...",
"signature": "<base58-ed25519>",
"nonce": "abc123"
}

Returns {"access_token": "...", "user": {...}}.

3. Use Token

Authorization: Bearer <access_token>

All other endpoints require this wallet-issued JWT. Protected routes return 403 with no token, 401 with an invalid token.


Users & Personas

MethodPathDescription
GET/v1/users/meCurrent user profile
PATCH/v1/users/meUpdate email, privacy_mode
POST/v1/personasCreate persona (display_name, intent_mode, visibility_scope)
GET/v1/personas/meList my personas
DELETE/v1/personas/{id}Deactivate persona

intent_mode values: social, dating, networking, professional


Rooms

Geo-located social spaces. Discovery is proximity-based.

MethodPathDescription
POST/v1/roomsCreate room (name, type, lat/lng, stake_required)
GET/v1/roomsList rooms (filter: type, lat, lng, radius_km)
GET/v1/rooms/discoverNearby rooms (lat, lng, radius_km required)
GET/v1/rooms/{id}Room details
POST/v1/rooms/{id}/joinJoin room (persona_id + stake_tx_hash)
POST/v1/rooms/{id}/leaveLeave room
GET/v1/rooms/{id}/membersList members

Stakes

USDC locked on Solana before interactions. Types: dm (0.50 USDC), room_entry (1.00), meetup (5.00).

MethodPathDescription
POST/v1/stakesCreate stake (stake_type, amount_usdc, tx_hash)
GET/v1/stakes/meMy active stakes
POST/v1/stakes/{id}/refundRefund stake
POST/v1/stakes/{id}/slashSlash stake (reason ≥10 chars)
POST/v1/escrow/meetupCreate meetup escrow
POST/v1/escrow/{id}/confirmConfirm escrow
POST/v1/escrow/{id}/disputeDispute escrow (reason ≥20 chars)

Slash amounts: 50% first offense → +0.5x per offense (3x cap). Harassment = 100%.


Matches & Messages

MethodPathDescription
POST/v1/matches/requestRequest match (target_persona_id, stake_id)
POST/v1/matches/{id}/acceptAccept match
POST/v1/matches/{id}/rejectReject match
GET/v1/matches/meMy matches (skip/limit)
POST/v1/messagesSend message (match_id, content, stake_id)
GET/v1/messages/{match_id}Get message thread

Attestations

GPS-verified proof that two people met in person.

MethodPathDescription
POST/v1/attestations/meetup/initiateStart attestation (lat, lng, method)
POST/v1/attestations/meetup/{id}/confirmCounterparty confirms (token, lat, lng)
POST/v1/attestations/proximityCheck proximity
GET/v1/attestations/meMy attestations

Confirmed attestations anchor an event to Hedera HCS.


Reputation

5-dimension scoring with time decay.

MethodPathDescription
GET/v1/reputation/meMy reputation
GET/v1/reputation/persona/{id}Persona reputation
POST/v1/reputation/feedbackSubmit feedback
POST/v1/reputation/attestation-scoreUpdate from attestation

Dimensions: reliability, safety, response, meetup_completion, consent_confirmation


Safety

MethodPathDescription
POST/v1/safety/reportFile safety report
POST/v1/safety/blockBlock user
GET/v1/safety/reportsReports against me
POST/v1/safety/reports/{id}/resolveResolve report

AI Matchmaking

768-dim BAAI/bge-base-en-v1.5 embeddings + llama-3.3-70b for intro generation.

MethodPathDescription
POST/v1/ai/match-agent/preferencesUpdate preferences
GET/v1/ai/match-agent/suggestionsGet match suggestions
POST/v1/ai/match-agent/introGenerate intro message
POST/v1/ai/match-agent/filterApply vibe filter

NFTs & Transfers

MethodPathDescription
POST/v1/nfts/mint-momentMint Moment NFT (requires confirmed attestation)
GET/v1/nfts/momentsMy Moment NFTs
POST/v1/transfersSOL gift (recipient_wallet, amount_sol)

Full Developer Guide

See the complete guide with all request/response schemas, error codes, and rate limits:
docs/WEB3_DEVELOPER_GUIDE.md

Open Source SDKs

pip install solmate-stake-sdk    # Stake-gated access for any Solana dApp
pip install solmate-reputation # Reputation engine + HCS anchoring
pip install solmate-x402 # x402 USDC payment middleware