Skip to main content

Project Management

Projects are the top-level organisational unit in the ONE ecosystem. Each project has its own API keys, usage quotas, webhook subscriptions, and team members. You can manage projects through the dashboard UI or programmatically with the OneEngineClient.

Client Setup

All project management methods are available on OneEngineClient. Create an authenticated client before calling any of the methods below.

import { OneEngineClient } from '@one_deploy/sdk';

const engine = new OneEngineClient({
baseUrl: process.env.ONE_ENGINE_URL!,
clientId: process.env.ONE_CLIENT_ID!,
secretKey: process.env.ONE_SECRET_KEY!,
});

Methods

MethodDescription
getProjects(options?)List all projects for the authenticated account.
createProject(params)Create a new project.
getProject(projectId)Fetch a single project by ID.
updateProject(projectId, updates)Update project settings.
deleteProject(projectId)Permanently delete a project.
getProjectFeatures(projectId)Retrieve the feature flags for a project.
updateProjectFeatures(projectId, features)Enable or disable feature flags.

getProjects

List all projects belonging to the authenticated account. Supports optional filtering and pagination.

interface GetProjectsOptions {
page?: number; // 1-based page number (default: 1)
limit?: number; // Items per page (default: 20, max: 100)
status?: 'active' | 'archived';
}

const res = await engine.getProjects({ page: 1, limit: 10, status: 'active' });

if (res.success) {
for (const project of res.data) {
console.log(project.id, project.name, project.plan);
}
}

createProject

Create a new project and receive its credentials.

interface CreateProjectParams {
name: string; // Human-readable project name
networks: number[]; // Chain IDs to enable (e.g. [1, 137, 42161])
description?: string; // Optional project description
plan?: 'free' | 'pro' | 'enterprise'; // Defaults to 'free'
}

const res = await engine.createProject({
name: 'my-defi-app',
networks: [1, 137, 42161],
description: 'Production DeFi application',
plan: 'pro',
});

if (res.success) {
console.log('Project ID:', res.data.id);
console.log('Client ID:', res.data.clientId);
console.log('Secret Key:', res.data.secretKey);
// Store secretKey securely -- it is only shown once.
}
danger

The secretKey is displayed only once at creation time. Copy it immediately and store it in a secure location such as a secrets manager or environment variable. If you lose it, you must regenerate the key from the dashboard.

getProject

Fetch full details for a single project.

interface Project {
id: string;
name: string;
description?: string;
clientId: string;
networks: number[];
plan: 'free' | 'pro' | 'enterprise';
status: 'active' | 'archived';
createdAt: string; // ISO-8601
updatedAt: string; // ISO-8601
}

const res = await engine.getProject('proj_abc123');

if (res.success) {
const project: Project = res.data;
console.log('Name:', project.name);
console.log('Networks:', project.networks);
console.log('Plan:', project.plan);
console.log('Status:', project.status);
}

updateProject

Update one or more settings on an existing project.

interface UpdateProjectParams {
name?: string;
description?: string;
networks?: number[];
status?: 'active' | 'archived';
}

const res = await engine.updateProject('proj_abc123', {
name: 'my-defi-app-v2',
networks: [1, 137, 42161, 8453], // Added Base (8453)
});

if (res.success) {
console.log('Updated:', res.data.name);
console.log('Networks:', res.data.networks);
}

deleteProject

Permanently delete a project and revoke all associated API keys. This action cannot be undone.

const res = await engine.deleteProject('proj_abc123');

if (res.success) {
console.log('Project deleted successfully');
}
danger

Deleting a project is irreversible. All API keys, webhook subscriptions, usage history, and team memberships associated with the project will be permanently removed. Active integrations using this project's credentials will stop working immediately.

Project Features

Each project has a set of feature flags that control which SDK capabilities are enabled. Use getProjectFeatures to inspect the current flags and updateProjectFeatures to toggle them.

getProjectFeatures

interface ProjectFeatures {
wallet: boolean;
payments: boolean;
aiTrading: boolean;
forex: boolean;
contracts: boolean;
nfts: boolean;
webhooks: boolean;
adminApi: boolean;
}

const res = await engine.getProjectFeatures('proj_abc123');

if (res.success) {
const features: ProjectFeatures = res.data;
console.log('Wallet enabled:', features.wallet);
console.log('AI Trading enabled:', features.aiTrading);
console.log('Forex enabled:', features.forex);
}

updateProjectFeatures

Pass only the flags you want to change. Omitted flags keep their current value.

const res = await engine.updateProjectFeatures('proj_abc123', {
aiTrading: true,
forex: true,
webhooks: true,
});

if (res.success) {
console.log('Features updated:', res.data);
}

Full Example

The following script creates a project, enables features, and verifies the configuration.

setup-project.ts
import { OneEngineClient } from '@one_deploy/sdk';

const engine = new OneEngineClient({
baseUrl: process.env.ONE_ENGINE_URL!,
clientId: process.env.ONE_CLIENT_ID!,
secretKey: process.env.ONE_SECRET_KEY!,
});

async function setupProject() {
// 1. Create the project
const createRes = await engine.createProject({
name: 'trading-platform',
networks: [1, 137, 42161],
description: 'AI-powered trading platform',
plan: 'pro',
});

if (!createRes.success) {
console.error('Failed to create project:', createRes.error);
return;
}

const projectId = createRes.data.id;
console.log('Created project:', projectId);

// 2. Enable features
await engine.updateProjectFeatures(projectId, {
wallet: true,
payments: true,
aiTrading: true,
forex: true,
webhooks: true,
});

// 3. Verify
const projectRes = await engine.getProject(projectId);
const featuresRes = await engine.getProjectFeatures(projectId);

if (projectRes.success && featuresRes.success) {
console.log('Project name:', projectRes.data.name);
console.log('Networks:', projectRes.data.networks);
console.log('Features:', featuresRes.data);
}
}

setupProject();

Next Steps