0.1.0 • Published 7 months ago
@bankless-academy/sdk v0.1.0
Bankless Academy SDK
A React component library for displaying lessons from the Bankless Academy, built with vanilla CSS and Farcaster Frame Host.
Installation
npm install @bankless-academy/sdkPeer Dependencies
The SDK requires the following peer dependencies:
npm install @farcaster/frame-hostUsage
Lessons Component
The Lessons component displays a grid of lessons from the Bankless Academy API.
import { Lessons } from '@bankless-academy/sdk';
function MyComponent() {
return (
<Lessons lessonSlugs={["what-is-bitcoin", "ethereum-basics"]} />
);
}Props
| Prop | Type | Required | Description |
|---|---|---|---|
lessonSlugs | string[] | Yes | Array of lesson slugs to display |
Frame Component
The Frame component displays a single lesson from the Bankless Academy API using Farcaster Frame Host.
import { Frame } from '@bankless-academy/sdk';
function MyComponent() {
return (
<Frame url="https://app.banklessacademy.com/lessons/what-is-bitcoin" />
);
}Props
| Prop | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The URL of the lesson to display |
onClose | () => void | No | Optional callback when the lesson is closed |
Features
- Responsive grid layout for lesson cards
- Loading states and error handling
- Interactive lesson frames using Farcaster Frame Host
- TypeScript support
Development
Setup
- Clone the repository
Install dependencies:
npm install
Building
npm run buildTesting
npm testLicense
MIT
0.1.0
7 months ago