Skip to main content
GRAIL will provide comprehensive APIs for Distribution Partners to integrate with their existing systems, supporting both Custodial and Self-Custody models:

User Management API

  • Create users with KYC-hashed identifiers.
  • For Self-Custody: Link user’s KYC hash with their public Web3 wallet address, potentially including a wallet ownership verification step.
  • Check user status, KYC linkage, and (for Custodial model) gold balances managed by the program.

Transaction API

  • Custodial Model:
    • Purchase gold for individual users (locked to their User PDA).
    • Purchase gold for the Distribution Partner’s reserves.
    • Withdraw unused USDC and unlocked gold from the central vault (Partner’s Withdrawal Authority).
  • Self-Custody Model:
    • Facilitate user-initiated gold purchases: Provide transaction details for user signing (USDC from user wallet, gold to user wallet), manage KYC checks.
    • Purchase gold for the Distribution Partner’s reserves.
    • Facilitate withdrawal of unused USDC and unlocked gold from their own reserves.
  • The API will clearly distinguish endpoints or parameters for Custodial versus Self-Custody operations where necessary.

Reporting & Balances API

  • Current gold prices and estimates.
  • Custodial Model: Distribution Partner’s central vault contents, User PDA gold balances.
  • Self-Custody Model: Distribution Partner’s operational vault contents. User gold balances are on their respective wallets, but the API can report on KYC-verified users and their transaction history through the platform.