diff --git a/README.md b/README.md index df56464..147a045 100644 --- a/README.md +++ b/README.md @@ -124,9 +124,10 @@ Call the same client from TypeScript: ```ts import { createVapiClient } from "vapi-network"; -const vapi = await createVapiClient({ account: "researcher" }); +const vapi = await createVapiClient({ account: "main" }); const listings = await vapi.call.search("Base DEX volume"); -const result = await vapi.call.pay({ id: "base-dex-volume", maxPriceUsd: 0.05 }); +const [listing] = listings as Array<{ ref: string }>; +const result = await vapi.call.pay({ id: listing.ref, maxPriceUsd: 0.05 }); console.log(result.body); ``` diff --git a/docs/sdk.md b/docs/sdk.md index 345c46a..e2f0823 100644 --- a/docs/sdk.md +++ b/docs/sdk.md @@ -16,7 +16,7 @@ npm i vapi-network ```ts import { createVapiClient } from "vapi-network"; -const vapi = await createVapiClient({ account: "researcher" }); +const vapi = await createVapiClient({ account: "main" }); const reply = await vapi.router.chat({ model: "venice/claude-sonnet-5", messages: [{ role: "user", content: "Summarise Base DEX activity." }], @@ -25,7 +25,8 @@ console.log(reply.content); const listings = await vapi.call.search("Base DEX volume"); console.log(listings); -const result = await vapi.call.pay({ id: "base-dex-volume", maxPriceUsd: 0.05 }); +const [listing] = listings as Array<{ ref: string }>; +const result = await vapi.call.pay({ id: listing.ref, maxPriceUsd: 0.05 }); console.log(result.body); const purchase = await vapi.router.buy(5);