Skip to content

SDK Overview

Welcome to the Drawn SDK โ€” a fully embeddable infrastructure layer for compliant lottery play.

This SDK is designed for digital wallets, retailers, and delivery platforms to integrate state-based lottery functionality without altering consumer behavior or violating local laws.


โœจ Key Features

  • Geo-Gated Play: Only offer play to users in eligible states.
  • Persistent Age Verification: One-time identity check, stored wallet-side.
  • Split-Tender Compliance: Enforce ACH or debit for lottery, allow mixed carts.
  • Auditable Submission: Every play is traceable to a user, game, and draw.
  • Redemption Handling: Supports below-threshold auto-payouts and high-value KYC retrieval.

๐Ÿ“ฆ Core Modules

Module Purpose
geoCheck Checks location + returns eligible games
ageVerify Manages age check with third-party provider
validateFunding Enforces legal funding sources
shouldShowPlayOption Returns whether play is allowed + why/why not
submitPlay Submits a validated play order

๐Ÿงช Test Coverage

All SDK logic is unit tested with Vitest.
Tests live in the /test directory, with 1:1 mapping to SDK methods.


๐Ÿง  Developer Workflow

  1. Clone the SDK repo:
    git clone https://github.com/kendrawnplatform/drawn-sdk.git

  2. Install dependencies:
    npm install

  3. Run tests:
    npm run test

  4. Build for distribution:
    npm run build


๐Ÿ”— Integration Pathways

This SDK is usable via:

  • Local npm link for simulator development
  • Direct copy (/lib/drawn-sdk) for embedded use in Next.js apps
  • Private or public NPM package (if published)

For production integration support, contact: ops@drawnplatform.com