Overview
The Membership API allows users to connect their wallets (EVM, Solana, or TON) and become members of Turtle. This API follows a secure three-step flow to ensure wallet ownership verification.Authentication Flow
1
Check Membership Status
Verify if a wallet address is already associated with a Turtle account
2
Request Signature Agreement
Generate a message that must be signed by the wallet to prove ownership
3
Create Membership
Submit the signed message to create a new user account and associate the wallet
Endpoints
Check Membership Status
The wallet address to check
The blockchain ecosystem. Supported values:
evm
, solana
, ton
Request Signature Agreement
The wallet address requesting membership
The blockchain ecosystem. Supported values:
evm
, solana
, ton
The URL of the application (used in the signature message)
The chain ID for EVM wallets. Not required for Solana or TON
Create Membership
The wallet address creating the membership
The blockchain ecosystem. Supported values:
evm
, solana
, ton
The signature of the message returned by the agreement endpoint
The nonce returned by the agreement endpoint
Complete Flow Example
Here’s a complete example of the membership creation flow:Error Handling
Common Errors
Invalid Wallet Ecosystem
Invalid Wallet Ecosystem
Status Code: 400 Bad RequestResponse:Solution: Use one of the supported ecosystems:
evm
, solana
, or ton
Invalid Wallet Address
Invalid Wallet Address
Status Code: 400 Bad RequestResponse:Solution: Ensure the wallet address is valid for the specified ecosystem
Wallet Already Exists
Wallet Already Exists
Status Code: 409 ConflictResponse:Solution: This wallet is already associated with an account. Is not necessary to create a new membership.
Invalid or Expired Nonce
Invalid or Expired Nonce
Status Code: 400 Bad RequestResponse:Solution: Request a new agreement and sign it promptly. Nonces expire after a short period
Security Considerations
Never share your private keys or seed phrases. The API only requires signatures, not private keys.
- Nonces are single-use and expire after a short period
- Messages follow the EIP-4361 standard for EVM wallets
- All signatures are verified server-side before creating accounts