agorix
AirdropMarketsCollectionsLeaderboardActivity
Agorix · Decentralized Marketplace
Independent · Resilient · Community-Run

A cross-chain marketplace, run by the community.

Discover, list, and trade across Bitcoin, Ethereum, and Solana on an open, community-run network.

Marketplace
CollectionsMarketsLeaderboardActivity
Network
GovernanceExplorerAirdropDocs
Account
ProfileSettings
Legal
Terms of ServicePrivacy PolicyYour Privacy Choices
agorix.io — Lasting Access
CID: 0xA60R1X · v0.1
AirdropMarketsCollections
D
Protocol Docs
Marketplace OverviewAtomic Buy LocksDatabase ArchitectureProfiles & AuthenticationCollections & RoyaltiesCreator Royalty SystemMedia Cache & OptimizationModeration & ReputationSearch & DiscoveryCollection Rarity AlgorithmsLive Activity & LeaderboardsCollection Preseed Queue
Docs/Marketplace/Profiles & Authentication
Marketplace

Profiles & Authentication

Wallet-based identity system. Challenge-response authentication, multi-chain wallet linking, session management, social verification, and multi-device approval flows.

#Profiles & Authentication

Agorix uses wallet-based authentication. Usernames are public profile aliases; your identity and account access are still anchored to wallet signatures.

#Challenge-Response Authentication

Authentication follows a two-step challenge-response flow:

Step 1: Issue Challenge

The client calls issueChallenge with:

  • chain: BTC, ETH, or SOL
  • address: The wallet address to authenticate
  • purpose: SESSION_BOOTSTRAP (new session) or LINK_WALLET (add wallet to existing profile)

The server generates a profileLinkChallenges record containing a random nonce and a human-readable message to sign. Challenges expire after 10-15 minutes.

Step 2: Verify Signature

The client signs the challenge message using the wallet's private key and submits:

  • challengeId: Which challenge to verify
  • signature: The wallet signature
  • deviceLabel: Optional device identifier

The server verifies the signature against the wallet address using verifyProof (protocol-level verification). On success:

  • For SESSION_BOOTSTRAP: Creates a new profile (if first wallet) and a new profileSessions record. Returns a session token.
  • For LINK_WALLET: Creates a profileWalletLinks record connecting the wallet to the existing profile.

#Session Management

Sessions are stored in the profileSessions table:

FieldPurpose
tokenHashSHA-256 hash of the session token (token never stored in plaintext)
actingWalletChain / actingWalletAddressWhich wallet this session authenticated with
statusACTIVE, REVOKED, or EXPIRED
deviceLabel / userAgentDevice metadata for session management
lastSeenAtUpdated on every authenticated request
expiresAtSession expiration timestamp

Protected API endpoints use a protectedProfileProcedure that validates the session token from request headers and injects profileId, sessionId, and db into the handler context.

#Multi-Chain Wallet Linking

A single profile can link wallets from multiple chains:

Wallet FieldPurpose
walletChainBTC, ETH, or SOL
walletAddressActual wallet address
addressHashDeterministic hash for lookups (prevents duplicates)
rolePRIMARY (first wallet), ADMIN (elevated), or MEMBER (read-only)
visibilityPUBLIC (discoverable by address) or PRIVATE (hidden)
proofSignature / proofMessage / proofSchemeStored challenge proof for verification

Each (walletChain, addressHash) pair is unique -- a wallet can only be linked to one profile. Wallets can be unlinked via soft-delete (removedAt timestamp).

#Social Verification

Profiles can verify ownership of social accounts across platforms:

PlatformVerification Flow
X (Twitter)Post challenge text, community votes to verify
InstagramPost challenge text, community votes
GitHubCreate gist with challenge text
YouTube, TikTok, FacebookPost challenge text
WebsitePlace challenge text at well-known URL

The flow:

  • User calls createProfileSocialLink with platform and handle
  • System generates a verificationHash challenge text to post publicly
  • Community members vote (verifyVotes / rejectVotes) to confirm ownership
  • Once threshold reached: status moves from PENDING to VERIFIED

Each (profileId, platform, normalizedHandle) combination is unique.

#Multi-Device Approval

For linking new devices to an existing profile:

  • New device calls createDeviceLinkRequest -- generates a one-time requestTokenHash
  • Existing device approves via approveDeviceLinkRequest (requires active session)
  • System creates an encrypted session (issuedSessionEncrypted) for the new device
  • New device consumes the request via consumeDeviceLinkRequest

Requests expire and can be rejected. Status flow: PENDING -> APPROVED -> CONSUMED (or REJECTED / EXPIRED).

#Profile Discovery

  • resolvePublicProfileByAddress: Look up a profile by chain + wallet address (only returns PUBLIC wallets)
  • Returns: linked wallets, verified social links, display name
  • Private wallets are never exposed through discovery endpoints

#Notification Settings

Each profile has a profileNotificationSettings record with a JSONB settings field for custom notification preferences. Changes are tracked by updatedBySessionId for audit purposes.

PreviousDatabase ArchitectureNext Collections & Royalties

On this page

  • Profiles & Authentication
  • Challenge-Response Authentication
  • Session Management
  • Multi-Chain Wallet Linking
  • Social Verification
  • Multi-Device Approval
  • Profile Discovery
  • Notification Settings