Mock mode
Every preview in these docs runs against the seeded mock kit or fixtures observed in recorded live runs — no wallet or chain. The label names the source, and mock is never a failure fallback.
No preview in these docs touches a wallet, a chain or testnet funds. The
operation surfaces run on createMockKit() — a real seeded state machine —
and the read surfaces render fixtures observed in recorded live runs, so
what you see is either the machine running or a value a chain actually
returned. Nothing is authored for the screenshot.
A seeded state machine#
The mock reproduces the full operation lifecycle. It is seeded, so the same seed gives the same trace every time — which is what makes it usable in tests as well as in docs.
import { createMockKit } from '@flarekit-dev/core'
const kit = createMockKit({ seed: 'demo', scenario: 'happy' })
// Drive it exactly like a live kit.
const record = kit.start({
amountXrp: '25.000000',
recipient: '0xDeaDbeefDeAdbeefdEadbEEFdeadbeEFdEaDbeeF',
xrplAccount: 'rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe',
})
// Every state the operation passes through, in order.
const trace = kit.trace(record)Scenarios#
Each scenario is a real path the operation can take, not a cosmetic flag:
happy— the operation settles.executor-late— the executor is slow; the mint is recoverable, not failed.large-delayed— a large amount takes the long road.protocol-unavailable— a source is down, so the outcome is unknown, not failed.
Always labelled, never a fallback#
Every preview carries a label naming what drove it — mock kit for the state
machine, observed fixtures for values recorded from live runs, registry constants where a table reads the package itself. Mock mode is explicit — it
is never triggered by a failure, and a mock value is never dressed up as a
live chain result. That rule is why a screenshot from these docs can be
trusted.
Swap to live#
The provider takes a kit and asks nothing else of it, so moving from mock to live is a change of construction, not a rewrite of any screen.
import { FlareProvider } from '@flarekit-dev/react'
import { createMockKit } from '@flarekit-dev/core'
// Mock: no wallet, no chain.
const kit = createMockKit({ seed: 'demo' })
export function App({ children }) {
return <FlareProvider kit={kit}>{children}</FlareProvider>
}Build against the mock, then hand FlareProvider a live kit — createFlareKit,
pointed at Coston2 or Flare mainnet — instead. The components never branch on
which one they were given.