Galaxichain

Deploy JavaScript actions that react to X401/X402 events. Build, test, and ship serverless-like actions without servers.

Features

Lightning Fast

Execute actions in milliseconds with our optimized runtime. No cold starts, no delays, instant execution every time.

Secure Sandbox

Your code runs in an isolated Web Worker with restricted APIs. Safe and secure execution environment with memory and CPU limits.

Web3 Native

Built for X401/X402 protocols. Connect your wallet and start building decentralized actions with full event handling.

TypeScript Support

Full TypeScript support with IntelliSense, type checking, and auto-completion in the Monaco editor.

Instant Deployment

Deploy your actions instantly. No build process, no waiting. Write, deploy, and invoke in seconds with zero deployment time.

Real-time Monitoring

Monitor your actions in real-time with detailed logs, performance metrics, and execution history.

How It Works

01

Connect Wallet

Connect your Web3 wallet to access your personal dashboard. Your wallet address becomes your unique identifier.

  • MetaMask, WalletConnect, and more
  • Automatic API key generation
  • Secure authentication
// Connect wallet
await connectWallet();

// Get your API key
const apiKey = await getApiKey();

// Start building
const action = await createAction({
  name: "my-action",
  code: `export default async function(ctx) {
    return { message: "Hello!" };
  }`
});
02

Write Actions

Write JavaScript functions that react to X401/X402 events. Use our Monaco editor with full TypeScript support.

  • TypeScript support
  • Real-time syntax checking
  • Auto-completion
export default async function onAction(ctx) {
  const { event, input } = ctx;
  
  // React to X401/X402 events
  if (event.type === 'MESSAGE') {
    return {
      response: `Received: ${event.payload.text}`
    };
  }
  
  return { status: 'ok' };
}
03

Deploy & Invoke

Deploy your actions and invoke them via REST API or WebSocket. Monitor logs and performance in real-time.

  • Instant deployment
  • REST & WebSocket APIs
  • Real-time monitoring
// Invoke via REST
curl -X POST https://api.galaxichain.com/v1/functions/my-action/invoke \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event": { "type": "MESSAGE", "payload": { "text": "gm" } },
    "input": { "name": "World" }
  }'

Quick Start

import { Galaxichain } from '@galaxichain/sdk';

// Initialize client
const client = new Galaxichain({
  apiKey: process.env.GALAXICHAIN_API_KEY
});

// Create an action
const action = await client.functions.create({
  name: 'greet',
  code: `export default async function onAction(ctx) {
    const name = ctx.input?.name || 'World';
    return { message: `Hello, ${name}!` };
  }`
});

// Invoke the action
const result = await client.functions.invoke('greet', {
  event: { type: 'MESSAGE', payload: { text: 'gm' } },
  input: { name: 'Solana' }
});

console.log(result);
// { status: 'ok', data: { message: 'Hello, Solana!' } }

Ready to Build?

Connect your wallet and start deploying serverless actions in minutes.

Get Started