Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@douglas-agent/sandbank-cloud

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@douglas-agent/sandbank-cloud

Sandbank Cloud adapter with x402 payment support

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

@douglas-agent/sandbank-cloud

Sandbank Cloud adapter for Sandbank with built-in x402 payment support.

Connect to Sandbank Cloud — managed bare-metal KVM sandboxes with sub-second start times. Pay per sandbox with USDC via the x402 payment protocol, or use an API token for authenticated access.

Install

pnpm add @douglas-agent/sandbank-core @douglas-agent/sandbank-cloud

Usage

x402 Payment (pay-per-use)

import { createProvider } from '@douglas-agent/sandbank-core'
import { SandbankCloudAdapter } from '@douglas-agent/sandbank-cloud'

const provider = createProvider(
  new SandbankCloudAdapter({
    walletPrivateKey: process.env.WALLET_PRIVATE_KEY,
  })
)

const sandbox = await provider.create({
  image: 'codebox',
  resources: { cpu: 2, memory: 1024 },
  ports: [[0, 7681], [0, 8080]],
})

const { stdout } = await sandbox.exec('node -e "console.log(42)"')
console.log(stdout) // 42

await provider.destroy(sandbox.id)

API Token (authenticated access)

const provider = createProvider(
  new SandbankCloudAdapter({
    apiToken: process.env.SANDBANK_API_TOKEN,
  })
)

Configuration

OptionDescription
urlSandbank Cloud API URL (default: https://cloud.sandbank.dev)
walletPrivateKeyEVM wallet private key (hex, 0x prefix) for x402 USDC payments
apiTokenBearer token for authenticated (internal) access — bypasses x402

Capabilities

CapabilitySupported
exec.stream
port.expose

How x402 Payment Works

  • POST /v1/boxes returns HTTP 402 with payment requirements
  • The adapter signs a USDC payment on Base (eip155:8453) using your wallet
  • The request is retried with the payment signature header
  • The sandbox is created — $0.02 per sandbox (includes 10 min)

License

MIT

Keywords

sandbox

FAQs

Package last updated on 20 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts