A comprehensive SDK and smart contract library for modular features. This repository provides Solidity smart contracts and a code-first SDK that exposes functional primitives (Match, Scores, App) for building on-chain applications.
You can test the features of contracts and SDK using tests and the e2e-test app.
- Node.js 18+
- npm or yarn
- Doppler
- Foundry - for Solidity development and local e2e-test app
curl -L https://foundry.paradigm.xyz | bash
foundryup./bin/setup./bin/startTo run the test app with Doppler (useful for api integration tests), use the optional --doppler flag:
./bin/start --doppler./bin/testnpx eslint --config eslint.config.mjs . # --fix
npx prettier . # --writePublish a new version of the SDK (patch|minor|major) with automated version bump, build, test, and git commit + push
npm login
./bin/publish patch "Some commit message"✅ Functional Primitives - Simple async functions instead of raw contract calls
✅ Type-Safe - Full TypeScript support with hierarchical context
✅ Automatic Address Management - Fetches contract addresses from backend
✅ No UI Lock-in - Build your own interface on top of primitives
✅ Server-Side Operations - Separate entry point for controller operations
✅ Secure by Default - API mode for production, optional encryption for dev/backend
ohara-ai-data/ for development. For production:
- Use Ohara API mode (recommended) - keys managed securely by Ohara infrastructure
- Or enable key encryption with
OHARA_KEY_ENCRYPTION_SECRETfor backend deployments - Never use local key storage in browser/frontend environments
- Never commit
ohara-ai-data/to version control
See sdk/README.md for detailed security guidance.
/
├── bin/ # Utility scripts
├── contracts/ # Solidity smart contracts
├── sdk/ # TypeScript SDK for on-chain features
├── scripts/ # Contracts -> SDK ABIs update script
└── e2e-test/ # End-to-end testing application (Next.js)
- Use
contracts/README.mdfor info on contracts development and use. - Use
sdk/README.mdfor info on SDK development and use. - Use
e2e-test/README.mdfor info on e2e-test app development and use.