Provider

<StridgeProvider /> configures the Kit's built-in flows. Mount it once at your app's root for the configured dialogs, widgets, hooks, and event subscriptions. The controller-backed Activity flow also needs a resolved owner; bare Activity compounds can instead use host-owned data through their own ActivitySourceProvider.

import { StridgeProvider } from "@stridge/gateway-kit"

<StridgeProvider
  gatewayKey={process.env.NEXT_PUBLIC_STRIDGE_GATEWAY_KEY!}
  asset={{ networkId: "9001", symbol: "USDC" }}
  flows={{ deposit: { destination: { address: treasury } } }}
  appearance={{ theme: "dark", accent: "oklch(64.51% 0.19 274.49)", radius: "rounded" }}
>
  <YourApp />
</StridgeProvider>

Props at a glance

PropTypeRequiredNotes
gatewayKeystringyesBrowser-safe gateway key from Dashboard → Developer → Gateway Kit.
environment"production" | "staging"noWhich Stridge API host to talk to. Defaults to "production"; leave it unset.
asset{ networkId: string; symbol: string }yesSettlement asset for both flows.
flows{ deposit?: …; withdraw?: … }yesAt least one flow must be configured.
appearanceStridgeAppearancenoTheme, accent, radius, direction, attribution, presentation.
i18nGatewayKitI18nConfignoLocale + message catalogs.
storageStridgeStorageConfignoPersistence backend for kit-internal state.
devStridgeDevConfignoDevelopment-only overrides.
supportSupportConfignoCustomer-support entry point override.
termsTermsConfignoTerms-link override.
prefetchtrue | ("deposit" | "withdraw" | "activity")[]noEager-bootstrap the driver(s) at mount.
connectWalletConnectWalletConfignoHost-supplied "Connect wallet" CTA.
classNamestringnoApplied to the Kit's root scope <div>.

gatewayKey

The gateway key the Kit sends on every request to the Stridge gateway: the ID of a live API key with the Gateway scope. Copy it from the Dashboard (opens in a new tab) under Developer → Gateway Kit, where each kit shows its Gateway key. See Get a gateway key.

The key is not a secret: it is designed to ship in the bundle. Its security comes from the Referrer whitelist and Destination control you set in the kit's Settings. See Gateway Kit security for the full model.

environment

environment?: "production" | "staging"

Picks which Stridge API host the Kit talks to. Default "production" (api.stridge.com) — leave it unset. "staging" is reserved for Stridge's own pre-release testing and does not accept your workspace's keys.

The gateway works with live keys only: a sandbox key (sk_sbx_…) gets 403, so there is no sandbox mode for the Kit. Test your server-side flows in the sandbox instead.

asset

The single source of truth for the settlement asset. Deposit settles into this (networkId, symbol) at the configured destination; withdraw sources from the user's balance of the same (networkId, symbol).

asset: {
  networkId: string   // e.g. "9001" (Arbitrum One), "9006" (BSC), "966" (Polygon)
  symbol: string      // e.g. "USDC", "USDT", "ETH"
}

networkId is the Stridge network id — the wire value the gateway routes against. The Kit forwards it to gateway/start verbatim and ships no chain catalogue, so any network the backend supports works without a Kit release.

See Supported networks for the full mapping (Stridge id ↔ EIP-155 id ↔ display name).

flows

At least one of deposit / withdraw must be set. Set both to power a single provider that opens either dialog.

flows.deposit

flows.deposit?: {
  destination: { address: `0x${string}` }   // required
  owner?: { address: `0x${string}` }        // optional
  minAmountUsd?: number
  maxAmountUsd?: number
  metadata?: Record<string, unknown>
  methods?: {
    wallet?: { disabled?: boolean; disabledHint?: string }
    transfer?: { disabled?: boolean; disabledHint?: string }
    onrampRail?: { enabled?: boolean; disabled?: boolean }
  }
}
FieldNotes
destination.addressWhere deposited funds land. For same-owner integrations, pass the connected user's wallet. For treasury patterns, pass your treasury address.
ownerIdentifier passed to gateway/start.owner. Optional — falls back to the connected wagmi wallet, then to dev.userAddressOverride.
minAmountUsdLower USD bound. Drives the asset-picker's "Low Balance" pill, prefills the amount-entry hero, and gates the confirm CTA.
maxAmountUsdUpper USD bound. The effective ceiling is min(walletBalanceUsd, maxAmountUsd).
metadataPersisted on the UDA at gateway/start time, echoed back on gateway/{owner}.
methods.wallet / methods.transferPer-method disable lever. Disabled tiles stay visible (preserves "I can see my options" UX) and render natively disabled with disabledHint as the meta line.
methods.onrampRailThe Cash (onramp) rail. On by default — set enabled: false (or disabled: true) to hide it for a crypto-only experience.
Note

If the kit has Require same owner on, destination.address must equal owner.address (or the resolved wagmi address). The check happens on the gateway, not in the Kit.

flows.withdraw

flows.withdraw?: {
  owner: { address: `0x${string}` }   // required
  minAmountUsd?: number
  maxAmountUsd?: number
  metadata?: Record<string, unknown>
}
FieldNotes
owner.addressRequired. The withdraw flow has no wagmi fallback because the business broadcasts the source-chain transfer to the UDA, not the end user.
minAmountUsd / maxAmountUsdHard bounds on the typed amount. Below the floor or above the cap, the form blocks submit with a localised "Min $X" / "Max $X" CTA.
metadataPersisted on every UDA the withdraw flow provisions.

The host wires <WithdrawDialog onSubmit={…} balance={…} /> to broadcast the source-chain transfer and feed the live balance — see Drop-in dialogs.

Activity owner

Activity has no flows.activity setting. The built-in useActivity() controller, ActivityDialog, and orchestrated Activity widgets use an Activity driver only when a Deposit or Withdraw flow is configured and its owner resolves. Neither money flow needs to be open or to have completed a transaction.

For an enabled Deposit flow, the owner is flows.deposit.owner.address, then the usable active source-wallet address, then dev.userAddressOverride. Activity uses that Deposit owner before an enabled Withdraw flow's flows.withdraw.owner.address. This is precedence, not whichever owner resolves first: an explicit empty Deposit owner is selected before Withdraw, then prevents Activity-driver creation because it is falsy.

Without a resolved Activity owner, required Activity hooks and <ActivityDialog /> throw when mounted. Guard both with useOptionalActivity(); hiding only the open button does not protect the dialog mount. Bare Activity compounds are a separate host-data integration and do not require either configured money flow. See Compound components.

appearance

appearance?: {
  theme?: "dark" | "light"                          // default "dark"
  accent?: string                                   // any CSS color
  radius?: "sharp" | "subtle" | "rounded" | "pill"  // default "rounded"
  direction?: "ltr" | "rtl"                         // auto-derived from locale otherwise
  attribution?: "visible" | "hidden"                // default "visible"
  presentation?: "auto" | "dialog" | "drawer"       // default "auto"; or { mode, breakpoint }
}

The visual values flow into CSS variables on the Kit's scope <div>. The provider doesn't restyle anything else — every consumer of --stridge-gk-* (every primitive, every compound part, every dialog) inherits the change automatically.

FieldEffect
themeSets data-stridge-theme="<value>" on the scope. Switches the entire color palette.
accentInlined as --stridge-gk-primary: <value> on the scope. Drives every CTA, focus ring, and progress affordance.
radiusSets data-stridge-radius="<value>". Retunes the base radius token; all per-primitive radii scale in lockstep.
directionSets dir="rtl" or dir="ltr" and data-stridge-flip-on-rtl markers on chevron / arrow icons. Auto-derived from locale if omitted.
attribution"hidden" removes the "Powered by Stridge" row from every dialog.
presentationGlobal surface for the gateway dialogs — "auto" (default) renders a centred dialog on wide containers and a bottom-sheet drawer below the breakpoint; "dialog" / "drawer" force one; { mode, breakpoint } tunes the px threshold (default 600). A per-dialog presentation prop overrides it. See Responsive presentation.

See Theming & CSS variables for the full token list and how to override variables directly.

i18n

i18n?: {
  locale?: string                                    // BCP-47, e.g. "en", "fr", "ar"
  messages?: Record<string, GatewayKitMessageCatalog>       // locale → catalog map
}

Per-locale catalogs ship at @stridge/gateway-kit/i18n/locales/<code> — tree-shakeable, so you only bundle what you load. Pass messages to mount catalogs at runtime; the Kit will fall back to source-key English if the active locale isn't mounted.

import { messages as fr } from "@stridge/gateway-kit/i18n/locales/fr"

<StridgeProvider i18n={{ locale: "fr", messages: { fr } }} />

RTL locales (ar, fa, he, ur) auto-derive direction: "rtl" unless appearance.direction is set explicitly. See Internationalization for defineMessages, partial overrides, and adding unsupported locales.

storage

storage?: {
  driver?: "session" | "local" | "memory"   // default "session"
  namespace?: string                        // default "stridge-kit:storage:v1"
}

Where the Kit persists per-tab UI state (settlement-banner acks, future kit-wide features).

DriverSurvivesUse when
"session"Tab sessionDefault; resets on tab close.
"local"RestartsYou want acks to outlive a tab.
"memory"In-process onlySSR-only, tests, embedded preview frames.

dev

dev?: {
  userAddressOverride?: `0x${string}`
}

Production integrations never need this. userAddressOverride lets demos and previews bootstrap the Kit against a pasted EOA without firing up a wallet — wagmi-connected addresses always win.

support

Override the in-dialog "Get help" entry point.

support?: {
  url?: string                       // open this URL on click
  onOpen?: () => void                // or run this callback
}

Omit entirely to use Stridge Intercom (Stridge support handles your users). Provide either field to switch to merchant-owned support; passing one or both opts the Kit out of Stridge's messenger globals so they never instantiate alongside yours.

terms

Override the Kit's terms link.

terms?: {
  url: string         // your terms URL
  label?: string      // optional link label (default falls back to Kit copy)
}

Omit to point at Stridge's terms page.

prefetch

prefetch?: true | ReadonlyArray<"deposit" | "withdraw" | "activity">

Eager-bootstrap the driver(s) at mount instead of waiting for a flow's open() or prefetch hook to do it. Two shapes:

  • true — arm every enabled driver at mount, including activity.
  • ["deposit"] / ["withdraw"] / ["activity"] — arm only the listed surfaces. Listing "deposit" or "withdraw" implicitly arms "activity" too, since Activity is cross-flow history. Use ["activity"] to prefetch only Activity when a Deposit or Withdraw flow is configured and its owner resolves, even if its money-flow dialog never opens.
Note

Default is unset (no eager arm). Reach for prefetch only when the host knows the dialog will open — a checkout page whose entire purpose is the gateway widget. For every other integration, lazy bootstrap is the right call; flipping the prop "just to be safe" re-creates the eager-load problem at a different layer.

connectWallet

connectWallet?: {
  label?: string             // optional button label
  onClick: () => void        // open your wallet-connect modal
}

Rendered by the dialog's wallet-required state when deposit is enabled but no owner can be resolved (no flows.deposit.owner, no wagmi connection, no dev.userAddressOverride). Omit to show the prompt without an actionable button — useful when the host surfaces a connect affordance elsewhere.

className

Applied to the Kit's scope <div>. Use it to position the wrapper if needed; the wrapper has no styles of its own beyond the scope attributes.

Two-flow example

<StridgeProvider
  gatewayKey={process.env.NEXT_PUBLIC_STRIDGE_GATEWAY_KEY!}
  asset={{ networkId: "9001", symbol: "USDC" }}
  flows={{
    deposit:  { destination: { address: userWallet }, minAmountUsd: 5 },
    withdraw: { owner: { address: userWallet }, maxAmountUsd: 50_000 },
  }}
  appearance={{ theme: "dark", accent: "oklch(78% 0.15 240)", radius: "subtle" }}
  i18n={{ locale: "en" }}
  prefetch={["deposit"]}
  connectWallet={{ onClick: openConnectModal, label: "Connect wallet" }}
>
  <App />
</StridgeProvider>

Next

Was this page helpful?