Page cover

Vestra Forge API Reference

Base URL (Demo): https://forge.vestralabs.xyz/api Version: v1 (semantic: MAJOR.MINOR.PATCH) Auth: Bearer token (JWT) for user endpoints + wallet signature for sensitive actions (deploy, publish). Networks: devnet, mainnet-beta Content-Type: application/json


Authentication

POST /v1/auth/login

Email/password or wallet challenge (both supported).

Body (email)

{ "email": "[email protected]", "password": "••••••" }

Body (wallet)

{ "address": "FAicX…Zjke", "signedMessage": "base64", "nonce": "uuid" }

Response

{
  "user": { "id": "usr_123", "email": "[email protected]" },
  "token": "jwt-token",
  "expiresIn": 3600
}

GET /v1/auth/nonce

Returns a nonce for wallet-based login/challenge.


Users & Workspaces

GET /v1/me

Returns profile, plan, and default workspace.

GET /v1/workspaces

List workspaces current user can access.

POST /v1/workspaces

Create a workspace.


Projects

GET /v1/projects?workspaceId=ws_123&status=draft|published&query=...&page=1&limit=20

Search & paginate projects.

Project Model

POST /v1/projects

GET /v1/projects/{projectId}

Retrieve project + last canvas snapshot.

PATCH /v1/projects/{projectId}

Rename, update network, labels, etc.

DELETE /v1/projects/{projectId}

Soft delete (archivable).


Canvas Graph

The canvas is a directed graph of nodes (modules) and edges (typed connections). Think: JSON IR that compiles to Anchor/Rust.

GET /v1/projects/{projectId}/canvas

Returns the current graph.

Canvas Schema

PUT /v1/projects/{projectId}/canvas

Replace entire graph (atomic).

PATCH /v1/projects/{projectId}/canvas

Partial update: add/remove nodes/edges, update params.

Operations

POST /v1/projects/{projectId}/canvas/validate

Static checks: schema, missing connections, account constraints, PDA seeds, Anchor IDLs.

Response


Module Library

GET /v1/modules?category=token|nft|core|governance&query=...

Return available modules with schema.

Module Schema


Code Generation

POST /v1/projects/{projectId}/generate

Generates code (Anchor workspace + IDL) from the canvas.

Body

Response

GET /v1/jobs/{jobId}

Track generate/compile/deploy jobs (shared status model).

Job Model


Build & Compile

POST /v1/projects/{projectId}/compile

Compiles Anchor program; returns job.

Body

Result Artifacts (so/dylib), size, warnings.


Simulation

POST /v1/projects/{projectId}/simulate

Dry-run instructions (no chain writes). Useful for account metas, rent, compute units.

Body

Response


Deploy

Security: Requires wallet signature via client; server verifies via X-Wallet-Address + SIWS (Sign-In With Solana) challenge.

POST /v1/projects/{projectId}/deploy

Deploys the compiled program to the selected network.

Body

Response

On success (job result)


Accounts & IDL

GET /v1/projects/{projectId}/idl

Latest IDL (generated or deployed).

GET /v1/programs/{programId}/accounts?network=devnet&type=Mint|TokenAccount|CustomType&limit=50&cursor=...

Indexed accounts for a deployed program.

POST /v1/programs/{programId}/rpc

Passthrough for selected read-only RPCs (server-side keyed, rate-limited):


Wallets

GET /v1/wallets

Linked wallets (Phantom, Solflare).

POST /v1/wallets/link

Server creates a challenge → client signs → server verifies → link.

DELETE /v1/wallets/{address}

Unlink.


WebSockets

  • wss://forge.vestralabs.xyz/ws/jobs/{jobId} → live logs & progress

  • wss://forge.vestralabs.xyz/ws/project/{projectId} → canvas presence, cursors, locks

Message Envelope


Webhooks (Enterprise)

POST /v1/webhooks

Create a webhook to receive events.

Events

  • job.succeeded, job.failed

  • project.published

  • deploy.succeeded, deploy.failed

Delivery


Errors

Consistent error envelope:

HTTP codes:

  • 400 validation, 401 auth, 403 permission, 404 not found

  • 409 conflict, 422 semantic, 429 rate limit

  • 5xx internal/RPC upstream


Pagination

Query params: page, limit or cursor (opaque).

Envelope


Rate Limits

  • Default: 60 req/min per token.

  • Headers: X-RateLimit-Limit, X-RateLimit-Remaining, Retry-After.


Example Workflows

1) Create Token Mint Flow (Devnet)

Create project

Add node + connect

Validate

Generate → Compile → Deploy

Track job


OpenAPI (Starter)


Security & Compliance

  • SIWS (Sign-In With Solana) for wallet auth challenges.

  • Per-tenant encryption for stored artifacts and IDLs.

  • RPC keys (Helius/Quicknode) kept server-side; no client leakage.

  • Strict CORS on write endpoints.

  • Build sandboxes with seccomp/AppArmor; no outbound except allow-list (crates.io, Solana RPCs).

Last updated