diff --git a/deltachat-jsonrpc/README.md b/deltachat-jsonrpc/README.md index fc02bd496..6554bcdd8 100644 --- a/deltachat-jsonrpc/README.md +++ b/deltachat-jsonrpc/README.md @@ -24,6 +24,21 @@ npm run build The JavaScript client is [published on NPM](https://www.npmjs.com/package/@deltachat/jsonrpc-client). +###### Usage + +```typescript +import { startDeltaChat } from "@deltachat/stdio-rpc-server"; +import { C } from "@deltachat/jsonrpc-client"; + +const dc = await startDeltaChat("deltachat-data"); +console.log(await dc.rpc.getSystemInfo()); +const accounts = await dc.rpc.getAllAccounts() +console.log('accounts', accounts) +dc.close() +``` + +##### Generate TypeScript/JavaScript documentation + A script is included to build autogenerated documentation, which includes all RPC methods: ```sh cd typescript