@actioncodes/prefix-system
v1.0.1
Published
Prefix System Client for Action Codes Protocol
Maintainers
Readme
Prefix System SDK
A TypeScript SDK for interacting with the Prefix System Solana program. This SDK provides a clean, type-safe interface for managing prefix registrations, verifications, and administrative functions.
🚀 Quick Start
Installation
npm install @actioncodes/prefix-system
# or
yarn add @actioncodes/prefix-system
# or
pnpm add @actioncodes/prefix-systemBasic Usage
import { PrefixSystemClient } from "@actioncodes/prefix-system";
import { Connection, Keypair } from "@solana/web3.js";
// Initialize client
const connection = new Connection("https://api.mainnet-beta.solana.com");
const wallet = new Wallet(keypair);
const client = new PrefixSystemClient({
cluster: "mainnet-beta",
connection,
wallet,
});
// Submit a prefix
const signature = createEd25519Signature(owner, metadataHash);
const tx = await client.submitPrefixWithFee(
keypair.publicKey,
"MYAPP",
"https://example.com/metadata.json",
metadataHash,
signature,
authorityKeys
);
await connection.sendAndConfirmTransaction(tx, [keypair]);📚 Documentation
- Client API - Complete client reference
- Types - TypeScript type definitions
- Validation - Input validation utilities
- Errors - Error handling guide
🏗️ Architecture
The Prefix System SDK is built on top of the Anchor framework and provides:
- Type Safety: Full TypeScript support with generated types
- Error Handling: Comprehensive error types and utilities
- Validation: Client-side input validation
- Testing Support: Built-in testing utilities
🔧 Development
Building
# Build the program and copy IDL files
npm run build
# Copy IDL files only
npm run copy-idlTesting
# Run SDK tests
npm run test:sdk📦 Program IDs
| Environment | Program ID |
|-------------|------------|
| Mainnet | otac5xyDhtoUWRXi36R9QN8Q9rW89QNJfUQDrZyiidh |
| Devnet | otac5xyDhtoUWRXi36R9QN8Q9rW89QNJfUQDrZyiidh |
| Localnet | otac5xyDhtoUWRXi36R9QN8Q9rW89QNJfUQDrZyiidh |
🔗 Links
- Program: GitHub Repository
- Documentation: Action Codes Protocol
- Support: Trana Inc.
📄 License
Apache-2.0
