API Reference
Get a handle with vault(name) from @alienplatform/sdk (TypeScript) or alien_bindings::Bindings::from_env()?.vault(name).await? (Rust).
get
Retrieves a secret by name. Throws if the secret does not exist.
const value: string = await vault.get(name)
const config: T = await vault.getJson<T>(name)| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The secret name. |
put / putJson
Creates or updates a secret (upsert).
await vault.put(name, "sk_live_abc123")
await vault.putJson(name, { retryCount: 3 }) // JSON-serialized| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The secret name. |
value | string (put) / any (putJson) | Yes | Max 25 KB. |
delete
Deletes a secret.
await vault.delete(name)list
Lists the names of all secrets in the vault.
const names: string[] = await vault.list()