A Demos instance to communicate with the RPC.
The payload to add the identity to.
OptionalreferralCode: stringThe response from the RPC call.
Add a github identity to the GCR.
A Demos instance to communicate with the RPC.
The payload to add the identity to.
OptionalreferralCode: stringThe response from the RPC call.
Add a telegram identity to the GCR. This method is designed to work with telegram bot attestations.
A Demos instance to communicate with the RPC.
The telegram identity payload containing user and bot signatures.
OptionalreferralCode: stringOptional referral code for incentive points.
The response from the RPC call.
Add a twitter identity to the GCR.
A Demos instance to communicate with the RPC.
The payload to add the identity to.
OptionalreferralCode: stringThe response from the RPC call.
Add an Unstoppable Domain identity to the GCR.
Flow:
A Demos instance to communicate with the RPC
The UD domain (e.g., "brad.crypto")
The address used to sign (from domain's authorized addresses)
Signature from the signing address
The challenge message that was signed
OptionalreferralCode: stringOptional referral code
The response from the RPC call
const identities = new Identities()
// Get signable addresses for the domain
const addresses = await identities.getUDSignableAddresses("brad.crypto")
const signingAddress = addresses[0].address // User selects address
// Generate challenge with selected address
const challenge = identities.generateUDChallenge(demos.publicKey, signingAddress)
// User signs challenge (EVM example with MetaMask)
const signature = await ethereum.request({
method: 'personal_sign',
params: [challenge, signingAddress]
})
await identities.addUnstoppableDomainIdentity(
demos,
"brad.crypto",
signingAddress,
signature,
challenge
)
Create a web2 proof payload for use with web2 identity inference.
The web2 proof payload string.
Generate a challenge message for Unstoppable Domain ownership verification.
The user must sign this challenge with one of their domain's authorized addresses using MetaMask (EVM) or Phantom (Solana) wallet.
The user's Demos public key (hex string)
The address that will sign the challenge (from domain's authorized addresses)
Challenge message to be signed
Get demos accounts by linked discord identity.
A Demos instance to communicate with the RPC.
The username to get the account for.
OptionaluserId: stringThe user id to get the account for.
The account associated with the identity.
Get demos accounts by linked github identity.
A Demos instance to communicate with the RPC.
The username to get the account for.
OptionaluserId: stringThe user id to get the account for.
The account associated with the identity.
Get demos accounts by linked web2 or web3 identity.
A Demos instance to communicate with the RPC.
The identity to get the account for.
The account associated with the identity.
Get demos accounts by linked telegram identity.
A Demos instance to communicate with the RPC.
The username to get the account for.
OptionaluserId: stringThe user id to get the account for.
The account associated with the identity.
Get demos accounts by linked twitter identity.
A Demos instance to communicate with the RPC.
The username to get the account for.
OptionaluserId: stringThe account associated with the username.
Get demos accounts by linked web2 identity.
A Demos instance to communicate with the RPC.
The context of the identity to get the account for.
The username to get the account for.
OptionaluserId: stringThe user id to get the account for.
The account associated with the identity.
Get demos accounts by linked web3 identity.
A Demos instance to communicate with the RPC.
The chain as a string containing the chain and subchain separated by a period (eg. "eth.mainnet" | "solana.mainnet", etc.)
The address to get the account for.
The account associated with the identity.
Get the identities associated with an address.
A Demos instance to communicate with the RPC.
Optionaladdress: stringThe address to get identities for.
The identities associated with the address.
Get referral information for an address.
A Demos instance to communicate with the RPC.
Optionaladdress: stringThe address to get referral info for. Defaults to the connected wallet's address.
The referral information associated with the address.
Get all signable addresses for a UD domain.
This method resolves the domain and extracts all addresses from domain records that can be used to sign challenges (EVM and Solana addresses).
The UD domain (e.g., "brad.crypto")
Array of signable addresses with their types
const identities = new Identities()
const addresses = await identities.getUDSignableAddresses("brad.crypto")
console.log(addresses)
// [
// { address: "0x1234...", recordKey: "crypto.ETH.address", signatureType: "evm" },
// { address: "ABC123...", recordKey: "crypto.SOL.address", signatureType: "solana" }
// ]
Get the points associated with an identity
A Demos instance to communicate with the RPC
Optionaladdress: stringThe address to get points for. Defaults to the connected wallet's address.
The points data for the identity
Get the web2 identities associated with an address.
A Demos instance to communicate with the RPC.
Optionaladdress: stringThe address to get identities for.
The identities associated with the address.
Get the crosschain identities associated with an address.
A Demos instance to communicate with the RPC.
Optionaladdress: stringThe address to get identities for.
The identities associated with the address.
Infer a web2 identity from a proof payload.
A Demos instance to communicate with the RPC.
The payload to infer the identity from.
The validity data of the identity transaction.
Infer a crosschain identity from a signature.
A Demos instance to communicate with the RPC.
The payload to infer the identity from.
OptionalreferralCode: stringThe validity data of the identity transaction.
Remove a web2 identity from the network.
A Demos instance to communicate with the RPC.
The payload to remove the identity.
The response from the RPC call.
Remove a crosschain identity from the network.
A Demos instance to communicate with the RPC.
The payload to remove the identity.
The response from the RPC call.
Validate a referral code to check if it exists and is valid.
A Demos instance to communicate with the RPC.
The referral code to validate.
The validation result containing validity status, referrer public key, and message.
Add a discord identity to the GCR.