Skip to main content
The SDK calls an experimental protocol’s API. Follow the Terms, treat indexed reads as potentially delayed and revalidate before wallet transactions.
@vibechain/sdk is the official TypeScript client for the vibe.market API. Every documented operation is typed from the same OpenAPI schema this site publishes, so paths, parameters, request bodies and responses are checked by the compiler.

Install

First request

Register your own key first; see authentication and limits. The SDK sends it as the API-KEY header.
A key identifies application quota. It never replaces wallet consent, and a key shipped in browser code is visible to that browser’s user.

Discover the graph, then read

GET and POST take the literal paths from the API reference. The client picks the correct host for each operation: website discovery routes go to https://vibechain.com/api/vibemarket2, runtime and creator routes to https://build.vibechain.com/api/vibemarket2.
Do not hardcode the newest runtime or move an existing pack to another graph. The rules in reading the market and developer integration apply unchanged when you call through the SDK. The generated paths, operations and components types are exported for your own models:
Blockchain integers and wei stay strings; use BigInt or exact decimal arithmetic. Keep opaque next cursors intact and scoped to the same graph, resource and wallet.

Errors and request budgets

Successful calls return { data, response }. Any non-2xx status throws VibechainApiError, whose body is unknown because a gateway can answer with JSON, HTML or plain text.
The SDK makes exactly one request per call. It does not retry, reconnect, poll or send telemetry. Read the rate-limit headers, honor Retry-After and add bounded backoff where your application needs it. Pass an AbortSignal to bound each wait. Redirects are not followed, so your key is never sent to an artwork or CDN host. A redirect raises VibechainApiError; validate its Location header yourself and fetch the public image without the key.

Uploads and creator actions

Binary form fields are typed as Blob. Use the exported toFormData serializer for the multipart operations and let fetch set the boundary.
Signed creator releases use POST /releases with the body described in the creator guide. Construct and sign the action exactly as that guide requires; the SDK serializes it without reordering fields.

Live updates

Request the stream route with parseAs: "stream" to receive raw server-sent-event bytes. Event parsing, resume IDs, reset handling and reconnect backoff belong to your application. Stream events are not transaction finality.

What the SDK does not do

  • It contains no wallet, signer or contract client. It cannot buy packs, launch pools, approve allowances, open cards or transfer assets.
  • It does not register API keys or make chain-RPC calls.
  • It covers only the public vibe.market API in this reference. First-party account, chat and moderation APIs are not included.
For contract interfaces, see the contract ABI guide.

Building for VibeMarket OS instead?

Apps and games that run inside VibeMarket OS use a different package, @vibechain/os. Its reference is at vibechain.com/os/docs.