Skip to content

Commit a84b61d

Browse files
committed
feat(minajs): add services breakdown
1 parent b9a266e commit a84b61d

File tree

9 files changed

+65
-10
lines changed

9 files changed

+65
-10
lines changed

apps/docs/docs/pages/about.mdx

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { Callout } from 'vocs/components'
2-
31
# About MinaJS [Learn about MinaJS and Klesia.]
42

5-
<Callout type="warning">As of September 2024, MinaJS is in early development. Don't use for production just yet.</Callout>
3+
:::warning
4+
As of September 2024, MinaJS is in early development. Don't use for production just yet.
5+
:::
66

77
MinaJS is a TypeScript interface for Mina Protocol. It provides a set of TypeScript types and utilities to interact with Mina Protocol. MinaJS is the missing piece for your smooth zkApp development on Mina.
88
It aims to remove the complexities, and allow developers to focus on building innovative zkApps on Mina.
@@ -17,6 +17,44 @@ MinaJS provides a set of services to interact with Mina Protocol. The services a
1717
- **Klesia** - A JSON-RPC wrapper over Mina Node's GraphQL API, similar to APIs like Alchemy and Infura. It's self hostable, so you can bring your own infrastructure.
1818
- **Klesia SDK** - A TypeScript SDK to interact with Klesia JSON-RPC API with type-safe interfaces and properties auto-completion.
1919

20+
## Services and interaction breakdown
21+
22+
```mermaid
23+
graph TD
24+
A[End user] -- uses --> B[zkApp]
25+
B[zkApp] -- provides feedback to --> A[End user]
26+
27+
B[zkApp] -- integrated with --> C[MinaJS Connect]
28+
C[MinaJS Connect] -- provides responses to --> B[zkApp]
29+
30+
C[MinaJS Connect] -- interacts with --> D[MinaJS Provider]
31+
D[MinaJS Provider] -- provides responses to --> C[MinaJS Connect]
32+
33+
D[MinaJS Provider] -- interacts with --> E[Mina Wallet]
34+
E[Mina Wallet] -- sends data to --> D[MinaJS Provider]
35+
36+
E[Mina Wallet] -- implements --> F[MinaJS Account]
37+
F[MinaJS Account] -- handles accounts and signing for --> E[Mina Wallet]
38+
39+
E[Mina Wallet] -- interacts with --> I[Klesia SDK]
40+
I[Klesia SDK] -- provides data to --> E[Mina Wallet]
41+
42+
G[Klesia] -- interacts with --> H[Mina Node]
43+
H[Mina Node] -- provides data to --> G[Klesia]
44+
45+
B[zkApp] -- uses --> I[Klesia SDK]
46+
I[Klesia SDK] -- provides data to --> B[zkApp]
47+
48+
I[Klesia SDK] -- interacts with --> G[Klesia]
49+
G[Klesia] -- provides data to --> I[Klesia SDK]
50+
51+
A[End user] -- uses --> E[Mina Wallet]
52+
E[Mina Wallet] -- provides data to --> A[End user]
53+
54+
G[Klesia] -- interacts with --> J[Fallback Mina Node]
55+
J[Fallback Mina Node] -- provides data to --> G[Klesia]
56+
```
57+
2058
## Supported Chains
2159

2260
- Mina Mainnet
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Getting Started [Start with MinaJS Connect.]
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
#TODO
1+
# MinaJS Connect [zkApps and Mina wallets living in piece.]
2+
3+
The Connect library is a centerpiece of connecting your zkApp with Mina Protocol wallets. It provides a set of utilities to discover wallets, and interact with them in a seamless way, complying to the latest specs of Mina.
4+
5+
## Purpose
6+
7+
With MinaJS Connect we try our best to comply to the latest Mina Protocol specs regarding zkApps and wallets, so you don't have to. The Connect library complies with [RFC-0008](https://github.com/MinaFoundation/Core-Grants/blob/main/RFCs/rfc-0008-wallet-provider-api.md).

apps/docs/docs/pages/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { GithubIcon } from 'lucide-react'
1919
</div>
2020
</header>
2121
<section>
22-
<iframe src="https://stackblitz.com/edit/minajs?embed=1&file=index.ts&hideExplorer=1&theme=dark&view=editor" className="w-full h-[500px] border-0 rounded-lg overflow-hidden" />
22+
<iframe src="https://stackblitz.com/edit/minajs?ctl=1&embed=1&file=index.ts&hideExplorer=1&theme=dark&view=editor" className="w-full h-[500px] border-0 rounded-lg overflow-hidden" />
2323
</section>
2424
<section className="card dark:bg-neutral bg-primary">
2525
<div className="card-body gap-8">

apps/docs/docs/pages/klesia/rpc.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import { Callout } from 'vocs/components'
2-
31
# Klesia JSON-RPC
42

5-
Klesia is accessible via HTTP JSON-RPC. You can use any HTTP client to interact with it, but if you're building o1js zkApps, we recommend using the [Klesia SDK](/klesia/sdk).
3+
Klesia is accessible via HTTP JSON-RPC. You can use any HTTP client to interact with it, but if you're building o1js zkApps, we recommend using the [Klesia SDK](/klesia/sdk). You can either use the version hosted by us, or follow [this guide](/klesia/rpc#self-hosting) to host your own instance.
64

75
## Endpoints
86

@@ -82,4 +80,6 @@ There are `amd64` and `arm64` Docker images available for self-hosting.
8280
docker pull ghcr.io/palladians/klesia:latest
8381
```
8482

85-
<Callout type="info">Make sure you map port 3000 and expose it.</Callout>
83+
:::info
84+
Make sure you map port 3000 and expose it.
85+
:::

apps/docs/docs/pages/klesia/sdk.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Klesia has a TypeScript SDK to interact with the JSON-RPC API. The SDK provides
88
$ npm install @mina-js/klesia-sdk
99
```
1010

11+
:::warning
12+
For now there are only [nightly builds](/klesia/sdk#nightly-builds) available. The stable version will be released soon™️.
13+
:::
14+
1115
## Usage
1216

1317
```typescript

apps/docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"preview": "bunx vocs preview"
99
},
1010
"dependencies": {
11+
"@theguild/remark-mermaid": "^0.1.2",
1112
"@types/react": "latest",
1213
"lucide-react": "^0.438.0",
1314
"react": "latest",

apps/docs/vocs.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { remarkMermaid } from "@theguild/remark-mermaid";
12
import { defineConfig } from "vocs";
23

34
export default defineConfig({
@@ -48,6 +49,7 @@ export default defineConfig({
4849
dark: "rose-pine",
4950
},
5051
},
52+
remarkPlugins: [remarkMermaid as never],
5153
},
5254
socials: [
5355
{ icon: "github", link: "https://github.com/palladians/mina-js" },
@@ -75,7 +77,10 @@ export default defineConfig({
7577
{
7678
text: "MinaJS Connect",
7779
link: "/connect",
78-
items: [{ text: "Introduction", link: "/connect" }],
80+
items: [
81+
{ text: "Introduction", link: "/connect" },
82+
{ text: "Getting Started", link: "/connect/getting-started" },
83+
],
7984
},
8085
{
8186
text: "MinaJS Accounts",

bun.lockb

34.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)