Documentation Index
Fetch the complete documentation index at: https://docs.passage.coinlist.co/llms.txt
Use this file to discover all available pages before exploring further.
Breaking Changes
SessionStore.setSession is now optional
setSession has been changed from a required method to an optional one (setSession?). This formalises read-only store mode for execution contexts — such as Next.js Server Components — that can read cookies but cannot write them.Previously the only workaround was a no-op setSession: async () => {}, which silently discarded refreshed sessions after consuming the refresh token over the network, effectively causing a silent logout. Omitting setSession is now the explicit, safe contract: the SDK skips token refresh entirely, making no network calls and consuming no refresh tokens.Migration: if you currently pass a no-op setSession, remove it. If your store is writable, no change is needed.// Before — no-op workaround (caused silent logout bug)
createCoinListServer({
sessionStore: {
getSession: () => getServerSession(),
setSession: async () => {}, // ← remove this
},
});
// After — read-only store (safe, explicit)
createCoinListServer({
sessionStore: {
getSession: () => getServerSession(),
},
});
Added
WritableSessionStoreRequiredError
New error class exported from @coinlist-co/react/server. completeOAuth() and logout() throw this immediately when called on a read-only store (no setSession), before any network call is made.Fixed
No unnecessary network retries on expired tokens in read-only mode
Previously, when a request returned a 401 and the store was read-only, the SDK would retry the request with the same expired token — wasting a round-trip that always failed. The SDK now detects the read-only store and surfaces the 401 immediately without retrying.Breaking Changes
Client methods renamed: fetchAll* → fetch*
fetchAllOffers and fetchAllParticipations have been renamed on both CoinListClient and CoinListServer to drop the redundant All prefix.| Before | After |
|---|
CoinListClient.fetchAllOffers() | CoinListClient.fetchOffers() |
CoinListClient.fetchAllParticipations(offerId?) | CoinListClient.fetchParticipations(offerId?) |
CoinListServer.fetchAllOffers() | CoinListServer.fetchOffers() |
CoinListServer.fetchAllParticipations(offerId?) | CoinListServer.fetchParticipations(offerId?) |
Migration: do a global find-and-replace in your codebase:fetchAllOffers( → fetchOffers(
fetchAllParticipations( → fetchParticipations(
Hooks renamed: useCoinList* → use*
The CoinList infix has been dropped from all hook names and their associated option/result/reason types.| Before | After |
|---|
useCoinListOffers | useOffers |
UseCoinListOffersOptions | UseOffersOptions |
UseCoinListOffersResult | UseOffersResult |
useCoinListOfferDetails | useOfferDetails |
UseCoinListOfferDetailsOptions | UseOfferDetailsOptions |
UseCoinListOfferDetailsResult | UseOfferDetailsResult |
useCoinListRequirements | useRequirements |
UseCoinListRequirementsOptions | UseRequirementsOptions |
UseCoinListRequirementsResult | UseRequirementsResult |
useCompleteCoinListOAuth | useCompleteOAuth |
UseCompleteCoinListOAuthOptions | UseCompleteOAuthOptions |
CompleteCoinListOAuthFailureReason | CompleteOAuthFailureReason |
Migration: rename the hook calls and any imported types. Example:// Before
import { useCoinListOffers, useCoinListRequirements } from '@coinlist-co/react';
const { offersState } = useCoinListOffers({ serverOffers: data });
// After
import { useOffers, useRequirements } from '@coinlist-co/react';
const { offersState } = useOffers({ data });
SSR prop renamed: serverOffers / serverData → data
The SSR pre-fetch prop has been unified to data across all hooks and components that accept server-side data. The RequirementsServerData type is also renamed to RequirementsData.| Before | After |
|---|
UseOffersOptions.serverOffers | UseOffersOptions.data |
UseOfferDetailsOptions.serverData | UseOfferDetailsOptions.data |
UseParticipationsOptions.serverData | UseParticipationsOptions.data |
UseRequirementsOptions.serverData | UseRequirementsOptions.data |
OffersGrid prop serverOffers | OffersGrid prop data |
RequirementsChecklist prop serverData | RequirementsChecklist prop data |
RequirementsServerData type | RequirementsData type |
Migration: rename the prop/option to data wherever you pass pre-fetched server results.LoadRequirementsState CONTENT shape: requirementsByOptionId → requirements
If you read the CONTENT state returned by useRequirements (or previously useCoinListRequirements) directly, the field name has changed.// Before
if (requirementsState.type === 'CONTENT') {
const byOption = requirementsState.requirementsByOptionId;
}
// After
if (requirementsState.type === 'CONTENT') {
const byOption = requirementsState.requirements;
}
Base* components removed
BaseOffersGrid, BaseOffersGridProps, BaseRequirementsChecklist, and BaseRequirementsChecklistProps have been removed. The connected components (OffersGrid, RequirementsChecklist) now accept all the same customization props directly — including the optional data prop for pre-fetched server data — so there is no longer a need for a separate base variant.Migration: replace BaseOffersGrid and BaseRequirementsChecklist usage with the main components and pass the same props directly.Import paths restructured — new @coinlist-co/react/shared entry point
Sub-path exports (/client, /client/hooks, /client/components, /client/core) have been removed. The package now exposes three canonical entry points:| Entry point | Contents |
|---|
@coinlist-co/react | React client — components, hooks, CoinListClient |
@coinlist-co/react/server | Node/SSR — CoinListServer |
@coinlist-co/react/shared | New — isomorphic domain types (Offer, Participation, Requirement, errors, pagination, etc.) |
Domain types that were previously re-exported from both @coinlist-co/react and @coinlist-co/react/server are now the sole responsibility of @coinlist-co/react/shared. They remain re-exported from the client and server entry points as well, so most imports will continue to work without changes. However, if you were importing from the now-deleted sub-paths, update your imports:// Before (sub-path imports — no longer valid)
import { CoinListClient } from '@coinlist-co/react/client';
import { useOffers } from '@coinlist-co/react/client/hooks';
// After
import { CoinListClient, useOffers } from '@coinlist-co/react';
OffersGridProps type renamed from Props
The exported type for OffersGrid props was the generic name Props. It is now exported as OffersGridProps.// Before
import type { Props } from '@coinlist-co/react';
// After
import type { OffersGridProps } from '@coinlist-co/react';
Added
Server (@coinlist-co/react/server)
CoinListServer now exposes the full data-fetching surface previously only available on CoinListClient: fetchAllOffers(), fetchOffersPage(), fetchOfferDetails(), fetchAllParticipations(), fetchParticipationsPage(), fetchParticipation(), createParticipation(), fetchOfferRequirements(), and fetchRequirementStatuses(). Use these in Next.js Route Handlers and Server Components without shipping any client bundle.
@coinlist-co/react/server now re-exports all shared types — Offer, OfferDetail, Participation, Requirement, RequirementStatusInfo, pagination helpers, NotAuthenticatedError, and related types — so you no longer need to import them from the client entry.
Client (@coinlist-co/react, @coinlist-co/react/client)
useParticipations(offerId?) hook — loads all participations for the authenticated user with a LOADING / CONTENT / ERROR state machine, optionally filtered by offer. New exported types: UseParticipationsResult, LoadParticipationsState, LoadParticipationsReason.
handleRequirement(requirement) on CoinListClient — opens the corresponding CoinList page for completing a requirement in a new tab (/verify-identity, /wallet, etc.). No-op for jurisdiction requirements.
contactSupport() on CoinListClient — opens the CoinList support ticket page in a new tab.
Changed
Components
RequirementsChecklist: onRequirementAction and onContactSupport props have been renamed to onRequirementActionOverride and onContactSupportOverride. Both now default to CoinListClient#handleRequirement and CoinListClient#contactSupport respectively, so most integrations can omit them entirely. Pass null to disable the corresponding button/link.
RequirementItem: onAction and onContactSupport now accept null (in addition to undefined) to suppress rendering of action buttons.
Removed
Client (@coinlist-co/react, @coinlist-co/react/client)
sandbox option removed from ClientConfig. Sandbox offers are no longer toggled via the SDK config.
StaticRequirementsChecklistProps type removed. Use RequirementsChecklist with the connected API or BaseRequirementsChecklist for fully custom rendering.
Added
Client (@coinlist-co/react, @coinlist-co/react/client)
fetchOfferRequirements(offerId) on CoinListClient — returns requirements grouped by option ID (Record<OfferOptionId, Requirement[]>).
fetchRequirementStatuses(offerId) on CoinListClient — returns the authenticated user’s status for each requirement.
useCoinListRequirements(offerId) hook for loading requirements and statuses with a LOADING / CONTENT / ERROR state machine.
sandbox option on ClientConfig — when true, passes sandbox=true to offers API calls so sandbox offers are included.
- New exported types:
Requirement, RequirementId, RequirementType, RequirementStatusValue, RequirementStatusInfo, ParticipationsPaginationParams.
- New exported enums/constants:
RequirementVariant, RequirementStatus, ChecklistStatus.
- New hook types:
UseCoinListRequirementsResult, LoadRequirementsState, LoadRequirementsReason.
fetchAllParticipations(offerId?) and fetchParticipationsPage(params) now accept an optional offerId to fetch participations for a specific offer. fetchParticipationsPage takes the new ParticipationsPaginationParams type (superset of PaginationParams) which carries the offerId field.
Fixed
Components
- Fixed missing dark mode CSS variables in Next.js projects — prebuilt styles now include the full set of design-system tokens so components render correctly under
dark class or prefers-color-scheme: dark.
Added
Client (@coinlist-co/react, @coinlist-co/react/client)
fetchAllParticipations() on CoinListClient for fetching all participations across pages.
fetchParticipationsPage() on CoinListClient for paginated participation fetching.
fetchParticipation() on CoinListClient for fetching a single participation by id.
createParticipation() on CoinListClient for creating a new participation.
- New exported types:
Participation, ParticipationId, ParticipationStatus, CreateParticipationParams, Blockchain, WalletAddress.
Added
Client (@coinlist-co/react, @coinlist-co/react/client)
- Added support for passing
className and containerClassName to <OffersGrid />, <OfferCard />, and <CoinListSignInCard />.
Fixed
Client (@coinlist-co/react, @coinlist-co/react/client)
- Re-export offer, offer detail, and pagination types from the package root and client core entry so you can type against
Offer, OfferDetail, pagination params, and related helpers without reaching into internal modules.
- Export
BaseCoinListSignInCard and BaseCoinListSignInCardProps from @coinlist-co/react/client for custom sign-in layouts built on the same primitives as CoinListSignInCard.
Added
Client (@coinlist-co/react/client)
fetchAllOffers(), fetchOffersPage(), and fetchOfferDetails() on CoinListClient for fetching offers data.
<OffersGrid /> — batteries-included component that loads offers and displays them in a responsive grid, with <OfferCard /> for each tile.
useCoinListOffers() hook for loading offers when you want full control over layout instead of the grid.
useCoinListOfferDetails() hook for a single offer’s details.
useCompleteCoinListOAuth() hook to run the OAuth redirect callback once on mount.
- Optional
authorizationPageUrl on client config so you can point startOAuth() at a non-production authorization page.
Added
Client (@coinlist-co/react/client)
CoinListProvider and useCoinList() hook for React context-based SDK initialization.
createCoinListClient(config) factory for manual or non-React usage.
- OAuth 2.0 with PKCE via
startOAuth() and completeOAuth().
getAuthState() and logout().
Server (@coinlist-co/react/server)
createCoinListServer(config) factory for BFF / Next.js API routes.
completeOAuth(), accessToken() (auto-refreshing), and logout().
Components
CoinListSignInCard and CoinListSignInButton for OAuth sign-in flows.
RequirementsChecklist / RequirementItem — eligibility checklist with accordion UI.
PoweredByCoinList attribution badge.
- Prebuilt CSS — no
tailwindcss peer dependency required.
Infrastructure
- Subpath exports:
@coinlist-co/react, @coinlist-co/react/client, @coinlist-co/react/server.
- Requires React 18+.