OpenAPI TypeScript types and client for JoinMarket-NG (jmwalletd).
This package generates TypeScript models, a fetch client, and React Query hooks based on the JoinMarket-NG OpenAPI specification.
npm installBy default, the package includes pre-generated client files. If you want to update the schema from a running jmwalletd daemon:
# Fetch schema using the default local endpoint (https://127.0.0.1:28183/openapi.json)
npm run openapi-ts:fetch-schema
# Or specify a custom URL using JM_NG_OPENAPI_URL
JM_NG_OPENAPI_URL=https://127.0.0.1:28183/openapi.json npm run openapi-ts:fetch-schemaThis will write the schema to:
Generate the fetch client and React Query hooks from the fetched OpenAPI schema:
npm run openapi-tsThis creates the generated files under src/generated/client/.
Compile the code with tsup:
npm run buildIf you have a local jmwalletd running, you can run the example script:
npm run exampleThe client and types are generated from the JoinMarket-NG OpenAPI schema files:
The project is licensed under the MIT License. See LICENSE for details.
- JoinMarket-NG: joinmarket-ng/joinmarket-ng
- Jam WebUI: joinmarket-webui/jam
- Hey API (openapi-ts): heyapi.dev/openapi-ts
- @hey-api/client-fetch: heyapi.dev/openapi-ts/clients/fetch
- @tanstack/react-query: TanStack/query