BlueForge Docs

client.wallet.freeze

Freeze a workspace wallet (suspend spending)

Signature

class Client {
  wallet: {
    freeze(workspaceId: string, reason: string): Promise<{ success: boolean }>
  }
}

Parameters

NameTypeRequiredNotes
workspaceId
string
YesWorkspace ID
reason
string
YesFreeze reason

Throws

  • NotFoundError
    — workspace not found
  • AuthError
    — insufficient permissions

Examples

import { Client } from '@blueforge/client'

const bf = new Client({ apiKey: process.env.BF_API_KEY!, url: 'https://your-project.blueforge.dev' })

await bf.wallet.freeze('ws_abc', 'Security incident')

Pitfalls

  • Admin only — only workspace admins can freeze/unfreeze wallets

See also

  • client.wallet.unfreeze

Tested against

  • Unit:
    packages/client/src/__tests__/wallet.test.ts