Starter Grant
New wallets start with no native COTI, which means they cannot pay gas for their first transaction. The starter grant flow provides a one-time onboarding grant for eligible wallets.
Overview
The starter grant is handled through an external service that works with the private messaging SDK and MCP server.
each wallet can claim only once
the flow is challenge-based
the challenge is intentionally lightweight
the SDK can complete the full request-and-claim cycle in one call
Quick flow
The recommended path is requestStarterGrant().
The SDK-level starter-grant helpers default to the deployed service, so url is optional unless you want to override it:
import { requestStarterGrant } from "@coti-io/coti-sdk-private-messaging";
const claimA = await requestStarterGrant(client);
const claimB = await requestStarterGrant(client, {
timeoutMs: 20000
});
const result = await requestStarterGrant(client, {
url: "http://other-service:8787",
timeoutMs: 15000
});This helper:
requests a challenge
solves the lightweight prompt
signs the claim payload with the configured wallet
submits the final claim
The result includes:
statuswalletAddresstransactionHashamountWeipromptexpiresAt
Manual flow
If you want tighter control over the onboarding sequence, use the three-step flow:
Call
getStarterGrantStatus()to check whether the wallet iseligible,challenge_pending, orclaimed.Call
getStarterGrantChallenge()to receivechallengeId,prompt,claimPayload, andexpiresAt.Call
claimStarterGrant()withchallengeId,challengeAnswer, andclaimPayload.
Service configuration
The starter grant helpers can use the deployed default service with no explicit configuration:
You can also pass optional overrides:
authTokeninstallIdPathtimeoutMsurl
Use url only when you want to override the default deployed service.
For MCP server deployments, the matching environment variables are:
STARTER_GRANT_SERVICE_URLSTARTER_GRANT_SERVICE_TIMEOUT_MSSTARTER_GRANT_SERVICE_AUTH_TOKENSTARTER_GRANT_INSTALL_ID_PATH
Common failures
Typical failures include:
the starter grant service is not configured
the wallet has already claimed the one-time grant
the challenge expired before it was submitted
the local install ID state is missing or inconsistent
Important notes
the grant is one-time per wallet address
the wallet must exist before the claim flow starts
the service uses an install ID as a soft local deduplication signal
after a successful claim, the wallet usually has enough COTI for initial testnet activity such as messaging and contract interaction
Last updated
Was this helpful?