@tokenflight/fiat-storage-d1
v0.0.1
Published
Cloudflare D1 state store for @tokenflight/fiat
Readme
@tokenflight/fiat-storage-d1
Cloudflare D1 implementation of the @tokenflight/fiat state store: orders, idempotency nonces, webhook dedup, and leased settlement jobs.
import { createFiat } from "@tokenflight/fiat";
import { createD1FiatState } from "@tokenflight/fiat-storage-d1";
const fiat = createFiat({ state: createD1FiatState(env.DB) /* … */ });Versioned SQL migrations ship in this package under migrations/; apply them with wrangler d1 execute <db> --file node_modules/@tokenflight/fiat-storage-d1/migrations/<n>.sql (or copy them into your own migration pipeline).
The store passes runStateStoreConformance from @tokenflight/fiat-testkit — the same suite to run against any custom store.
© Khalani Labs, Ltd. All rights reserved.
