-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
162 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Promote Docker image to latest | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
dockerize_and_push: | ||
name: Tag latest and push to GHCR | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Tag image | ||
run: docker buildx imagetools create ghcr.io/palladians/klesia:$(git rev-parse --short HEAD) --tag ghcr.io/palladians/klesia:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Klesia [Missed Alchemy and Infura? Here's Klesia.] | ||
|
||
Klesia is a JSON-RPC wrapper over Mina Node's GraphQL API and TypeScript SDK to interact with it. It's similar to APIs like Alchemy and Infura. It's self hostable, so you can bring your own infrastructure. | ||
|
||
## Tools and Libraries | ||
|
||
- [Klesia JSON-RPC](/klesia/rpc) - JSON-RPC wrapper over Mina Node's GraphQL API. | ||
- [Klesia TypeScript SDK](/klesia/sdk) - TypeScript SDK to interact with Klesia JSON-RPC API with type-safe interfaces and properties auto-completion. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Klesia JSON-RPC | ||
|
||
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). | ||
|
||
## Endpoints | ||
|
||
There are two Klesia instances available. One for Mina Mainnet and the other for Mina Devnet. | ||
|
||
### Mina Mainnet | ||
|
||
``` | ||
https://mainnet.klesia.palladians.xyz/api | ||
``` | ||
|
||
### Mina Devnet | ||
|
||
``` | ||
https://devnet.klesia.palladians.xyz/api | ||
``` | ||
|
||
## RPC Methods | ||
|
||
Below you can find the complete list of RPC methods available on Klesia. | ||
|
||
--- | ||
|
||
### mina_getTransactionCount | ||
|
||
Returns the number of transactions sent from an address. Usually you may want to use this number to determine the nonce for the next transaction. | ||
|
||
#### Parameters | ||
|
||
Array of strings: | ||
- `publicKey` - Address to check for transaction count. | ||
|
||
--- | ||
|
||
### mina_getBalance | ||
|
||
Returns the balance of the account of given address. | ||
|
||
#### Parameters | ||
|
||
Array of strings: | ||
- `publicKey` - Address to check for transaction count. | ||
|
||
--- | ||
|
||
### mina_blockHash | ||
|
||
Returns the hash of the most recent block. | ||
|
||
--- | ||
|
||
### mina_chainId | ||
|
||
Returns the currently configured chain ID. | ||
|
||
--- | ||
|
||
### mina_sendTransaction | ||
|
||
Broadcasts a signed transaction to the network. | ||
|
||
#### Parameters | ||
|
||
Array of strings: | ||
- `input` - Signed transaction or zkApp input. | ||
- `type` - Transaction type. Can be `payment`, `delegation`, or `zkapp`. | ||
|
||
## Self-hosting | ||
|
||
The application is open-source and available on GitHub. You can self-host it by following the instructions in the repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Klesia TypeScript SDK | ||
|
||
Klesia has a TypeScript SDK to interact with the JSON-RPC API. The SDK provides type-safe interfaces and properties auto-completion. | ||
|
||
## Installation | ||
|
||
```bash | ||
$ npm install @mina-js/klesia-sdk | ||
``` | ||
|
||
## Usage | ||
|
||
```typescript | ||
import { createClient } from '@mina-js/klesia-sdk' | ||
|
||
const client = createClient({ network: 'devnet' }) | ||
|
||
const { result } = await client.request({ | ||
method: 'mina_getTransactionCount', | ||
params: ['B62qkYa1o6Mj6uTTjDQCob7FYZspuhkm4RRQhgJg9j4koEBWiSrTQrS'] | ||
}) | ||
``` | ||
|
||
## Methods | ||
|
||
Refer to the [RPC Methods](/klesia/rpc#rpc-methods) page for a complete list of methods available on Klesia. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[start] | ||
cmd = "cd apps/klesia && npm run start" |