Back to Documentation

API Reference

Complete API documentation and reference for PIPELINK SDK and backend services.

PipelineBuilder

Main class for creating and managing execution pipelines. Provides a fluent API for composing pipeline steps.

constructor(connection: Connection)

Creates a new PipelineBuilder instance connected to the specified Solana network.

const builder = new PipelineBuilder(connection);

addStep(name: string, config: object): PipelineBuilder

Adds a step to the pipeline. Returns the builder for chaining.

builder.addStep('swap', {}
tokenA: 'SOL',
tokenB: 'USDC',
amount: 1000000
});

addCondition(condition: Condition): PipelineBuilder

Adds a conditional check to the pipeline execution flow.

builder.addCondition({}
field: 'balance',
operator: '>=',
value: 1000000
});

build(): Pipeline

Builds and validates the pipeline configuration. Must be called before execution.

const pipeline = builder.build();

execute(signer: Keypair): Promise<string>

Executes the pipeline on the blockchain. Returns the transaction signature.

const signature = await pipeline.execute(keypair);

Step Interface

Definition for individual pipeline steps that are executed in sequence.

interface Step {
name: string;
program: PublicKey;
accounts: AccountMeta[];
data: Buffer;
signers?: Keypair[];
}

Backend API Endpoints

REST API endpoints for server-side operations and integrations.

POST/api/auth/verify

Verify a signed message to authenticate a wallet.

Request Body:
{
"message": "string",
"signature": "string",
"publicKey": "string"
}
GET/api/wallet/balance

Get the SOL balance for a wallet address.

Query Parameters:
address: string (required)
POST/api/pipeline/create

Create and store a new pipeline configuration.

Request Body:
{
"name": "string",
"owner": "string",
"steps": "Step[]"
}

Error Codes

Common error codes returned by the API.

INSUFFICIENT_FUNDS

Wallet has insufficient balance to complete the transaction.

INVALID_SIGNATURE

The provided signature is invalid or malformed.

PROGRAM_FAILED

The Solana program returned an error during execution.

INVALID_ACCOUNT

One or more accounts in the transaction are invalid.

NETWORK_ERROR

Network connectivity issue or RPC endpoint error.

TIMEOUT

Transaction confirmation timeout exceeded.