Liking cljdoc? Tell your friends :D

pocketenv-io.api

Internal HTTP layer. Not part of the public API. Consumers should use pocketenv-io.pocketenv and pocketenv-io.sandbox.

Internal HTTP layer. Not part of the public API.
Consumers should use pocketenv-io.pocketenv and pocketenv-io.sandbox.
raw docstring

pocketenv-io.client

Low-level HTTP client for the Pocketenv XRPC API.

Configuration (resolved in priority order):

  • POCKETENV_API_URL env var (or default https://api.pocketenv.io)
  • POCKETENV_TOKEN env var
  • ~/.pocketenv/token.json file ({"token": "..."})
Low-level HTTP client for the Pocketenv XRPC API.

Configuration (resolved in priority order):
  - POCKETENV_API_URL env var   (or default https://api.pocketenv.io)
  - POCKETENV_TOKEN env var
  - ~/.pocketenv/token.json file ({"token": "..."})
raw docstring

pocketenv-io.crypto

Client-side encryption matching libsodium's crypto_box_seal (anonymous sealed box).

Algorithm:

  1. Generate ephemeral Curve25519 (X25519) keypair
  2. Derive nonce = BLAKE2b-24(eph_pk || recipient_pk) — matches libsodium exactly
  3. Encrypt with NaCl crypto_box(message, nonce, eph_sk, recipient_pk)
  4. Output = eph_pk (32 bytes) || ciphertext
  5. Base64url-encode without padding

The server's public key is resolved in order from:

  1. POCKETENV_PUBLIC_KEY environment variable
  2. The default production key
Client-side encryption matching libsodium's crypto_box_seal (anonymous sealed box).

Algorithm:
  1. Generate ephemeral Curve25519 (X25519) keypair
  2. Derive nonce = BLAKE2b-24(eph_pk || recipient_pk) — matches libsodium exactly
  3. Encrypt with NaCl crypto_box(message, nonce, eph_sk, recipient_pk)
  4. Output = eph_pk (32 bytes) || ciphertext
  5. Base64url-encode without padding

The server's public key is resolved in order from:
  1. POCKETENV_PUBLIC_KEY environment variable
  2. The default production key
raw docstring

pocketenv-io.pocketenv

Clojure SDK for the Pocketenv sandbox platform.

This namespace is the main entry point for the SDK. It returns Sandbox records that you pipe operations on using Clojure's threading macro:

(require '[pocketenv-io.pocketenv :as pocketenv] '[pocketenv-io.sandbox :as sandbox])

(-> (pocketenv/create-sandbox "my-box") (sandbox/start) (sandbox/wait-until-running) (sandbox/exec "clojure" ["-M:test"]))

Configuration

Set any of the following environment variables:

POCKETENV_TOKEN — bearer token POCKETENV_API_URL — API base URL (default: https://api.pocketenv.io) POCKETENV_PUBLIC_KEY — server public key (hex-encoded)

Or place a token in ~/.pocketenv/token.json: {"token": "..."}

Return values

All functions return {:ok value} on success or {:error reason} on failure. Sandbox operation functions also accept {:ok sandbox} as their first argument so you can chain them with the -> threading macro without unwrapping.

Clojure SDK for the Pocketenv sandbox platform.

This namespace is the main entry point for the SDK. It returns Sandbox
records that you pipe operations on using Clojure's threading macro:

  (require '[pocketenv-io.pocketenv :as pocketenv]
           '[pocketenv-io.sandbox :as sandbox])

  (-> (pocketenv/create-sandbox "my-box")
      (sandbox/start)
      (sandbox/wait-until-running)
      (sandbox/exec "clojure" ["-M:test"]))

## Configuration

Set any of the following environment variables:

  POCKETENV_TOKEN      — bearer token
  POCKETENV_API_URL    — API base URL (default: https://api.pocketenv.io)
  POCKETENV_PUBLIC_KEY — server public key (hex-encoded)

Or place a token in ~/.pocketenv/token.json: {"token": "..."}

## Return values

All functions return {:ok value} on success or {:error reason} on failure.
Sandbox operation functions also accept {:ok sandbox} as their first argument
so you can chain them with the -> threading macro without unwrapping.
raw docstring

pocketenv-io.sandbox

Sandbox record and pipe-safe operations.

The Sandbox record is the central type of the SDK. Obtain one from pocketenv-io.pocketenv/create-sandbox or get-sandbox, then pipe operations with Clojure's -> threading macro:

(-> (pocketenv/create-sandbox "my-box") (sandbox/start) (sandbox/wait-until-running) (sandbox/exec "clojure" ["-M:test"]))

Every operation accepts either a bare Sandbox record or an {:ok sandbox} result map, enabling seamless threading. Passing {:error reason} raises an exception, keeping error handling explicit.

Sandbox record and pipe-safe operations.

The Sandbox record is the central type of the SDK. Obtain one from
pocketenv-io.pocketenv/create-sandbox or get-sandbox, then pipe
operations with Clojure's -> threading macro:

  (-> (pocketenv/create-sandbox "my-box")
      (sandbox/start)
      (sandbox/wait-until-running)
      (sandbox/exec "clojure" ["-M:test"]))

Every operation accepts either a bare Sandbox record or an {:ok sandbox}
result map, enabling seamless threading. Passing {:error reason} raises
an exception, keeping error handling explicit.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close