@xitadel-fi/sdk
v0.2.4
Published
SDK for interacting with the Xitadel program
Readme
Xitadel SDK
This SDK provides a TypeScript interface for interacting with the Xitadel program on Solana.
Current Status
The SDK is currently set up for local development with the Anchor workspace. To use it:
- First, build the Anchor program to generate types:
anchor build- Link the SDK locally:
cd sdk
npm link- In your project:
npm link @xitadel/sdkDevelopment Setup
- The SDK uses path aliases to import Anchor-generated types:
import type { Xitadel } from "@program/xitadel";- TypeScript is configured to resolve these imports in
tsconfig.json:
{
"paths": {
"@program/*": ["../target/types/*"]
}
}- Make sure to build the Anchor program before working on the SDK:
anchor buildKnown Issues
The current setup has some type issues with the Anchor workspace that need to be resolved. We're tracking these issues and will update the SDK once they're fixed.
For now, you can use the SDK by importing the workspace directly in your tests:
import { Program } from "@coral-xyz/anchor";
import { Xitadel } from "../target/types/xitadel";
const program = anchor.workspace.Xitadel as Program<Xitadel>;Next Steps
- Resolve type issues with Anchor workspace integration
- Add proper error handling and type definitions
- Add more instruction handlers
- Add comprehensive tests
- Publish to npm
Contributing
- Build the program:
anchor build- Install dependencies:
npm install- Build the SDK:
npm run build- Run tests:
npm testLicense
ISC
