Skip to main content
The SDK provides Gacha, Marketplace and Redeem clients through @renaiss-protocol/client.

Clients

Client construction makes no request. A public catalog client needs only an explicit baseUrl and the matching network. See authentication for frontend origins and session setup.

Use an existing wallet

For viem, adapt the wallet client your app already connected:
Other wallet libraries can implement RenaissSigner. Embedded and external EOA wallets use the same interface; the wallet provider decides when to show a confirmation. Safe signing is not supported by these clients.

Handle results

Expected request failures are returned as Result values. Check isFailed(result) before calling getValue(result). getError(result) exposes the SDK error’s code, HTTP status and detail.
Handle cancellation without automatically reopening the wallet. A network failure after submission needs reconciliation, because the action may already have succeeded. Each flow guide describes its recovery path.

Pagination

List methods are lazy. Call .firstPage() for one page or use for await to iterate pages. Each page is a separate Result with items, hasMore and an optional nextCursor.
For a Load more button, save nextCursor and call catalog.from(nextCursor).firstPage(). Treat cursors as opaque; keep the same filters and page size while using one.

Amounts and IDs

Use a decimal-aware utility such as viem’s parseUnits('10', 18) to create a token amount. Do not parse money with Number or assume USDT has six decimals. A missing price is not a zero price. The SDK’s TypeScript declarations contain the complete method and result types. Use the API reference for HTTP bodies, status codes and streaming events.