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
-
Clone the SDK repo:
git clone https://github.com/kendrawnplatform/drawn-sdk.git -
Install dependencies:
npm install -
Run tests:
npm run test -
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