globe-pointerQuickstart

Checklist:

This section helps developers quickly set up the essential components of the PromptHub protocol. It includes building the smart contract layer, initializing SDKs, and launching a local web interface for testing and development.

Prerequisites

Before you begin, ensure your development environment meets these requirements:

# Required system dependencies
$ node -v  # Required: v16.0.0 or higher
$ npm -v   # Required: v8.0.0 or higher
$ solana --version  # Required: v1.14.0 or higher
$ anchor --version  # Required: v0.26.0 or higher

# Set up Solana development environment if needed
$ sh -c "$(curl -sSfL https://release.solana.com/v1.14.2/install)"
$ solana-keygen new  # Generate a new keypair if you don't have one

1. Core Protocol Setup

# Clone and initialize the core protocol repository
$ git clone https://github.com/PromptHubLabs/prompthub-protocol.git
$ cd prompthub-protocol
$ npm install

# Configure your development environment
$ cp .env.example .env
$ nano .env  # Edit with your Solana keypair path and RPC provider

# Build Solana smart contracts
$ anchor build
$ anchor keys sync  # Sync program IDs with declaration file

# Start local validator (optional for testnet)
$ solana-test-validator

# Deploy contracts to localnet/devnet
$ anchor deploy --provider.cluster devnet  # For devnet deployment
# OR
$ anchor deploy  # For local development (default)

# Verify deployment
$ solana program show --output json <PROGRAM_ID>

2. SDK Integration

The SDK exposes the following core interfaces:

3. Frontend Application

The frontend application provides:

  • A visual PromptDSL editor with schema validation

  • PromptVault explorer for browsing public prompts

  • DAG Builder interface for creating multi-step workflows

  • Wallet integration for on-chain transactions

4. Common Issues and Troubleshooting

Problem: Anchor build fails with Rust errorsSolution: Ensure you have Rust toolchain installed: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Problem: Transaction errors during prompt registrationSolution: Check SOL balance: solana balance. Airdrop if needed: solana airdrop 2

Problem: SDK connection issuesSolution: Verify RPC endpoint is correct and responsive: curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"getHealth"}' https://your-rpc-endpoint

Once initialized, developers can:

  • Register new prompts via the frontend

  • Browse the PromptVault and Asset Store

  • Visualize prompt DAGs

  • Simulate prompt invocation with model-compatible agents

These tools together form a full-stack developer environment for building on PromptHub.

Last updated