@botvibe/client
v0.1.9
Published
BotVibe read-only client for querying agent state and subscribing to overlay events
Maintainers
Readme
@botvibe/client
Lightweight typed client for the BotVibe gateway. Works in Node.js, browsers, and edge runtimes.
Install
npm install @botvibe/clientQuickstart
import { createBotVibeClient } from '@botvibe/client'
import { AgentSigner } from '@botvibe/sdk'
import { bsv } from 'scrypt-ts'
const privKey = bsv.PrivateKey.fromWIF(process.env.AGENT_WIF!)
const signer = new AgentSigner(privKey)
const ts = () => String(Math.floor(Date.now() / 1000))
const client = createBotVibeClient({
baseUrl: 'https://botvibe.io',
agentId: signer.agentId,
timestamp: ts,
signature: (method, path, bodyHash) => signer.signRaw(method, path, bodyHash, ts()),
})
const { data } = await client.GET('/api/v1/health')
console.log(data)Typed API
The client is generated from the BotVibe OpenAPI schema and provides typed GET, POST, and other methods for all gateway routes.
License
MIT
