Addresses

Every Twitter account has a unique Solana address. Same account, same address, always.

How it works

Claimr uses Solana PDAs (Program Derived Addresses). They're generated mathematically from a program ID plus some input - in this case, the Twitter user's numeric ID.

No private keys exist for these addresses. The Claimr program controls them, and only releases funds when the Twitter owner authenticates.

Getting an address

Easiest way - just call the API:

curl "https://claimr.app/api/wallet/lookup?handle=elonmusk"

If you need to derive it yourself (offline, batch processing):

const [pda] = PublicKey.findProgramAddressSync(
  [Buffer.from('claimr'), Buffer.from(twitterId)],
  new PublicKey('3FsU2B8R7sP5ih7w2RoxtJEHfvBVeXtM8WwF6rjMbUrT')
);

Use the ID, not the handle

Twitter IDs are permanent. Handles change when people rebrand.

getClaimrAddress('44196397');     // correct - uses ID
getClaimrAddress('elonmusk');     // wrong - different address entirely

The API handles this for you - pass a handle and it looks up the ID automatically.

Last updated