-
-
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.
chore(minajs): remove scalar and add tests for klesia
- Loading branch information
Showing
9 changed files
with
166 additions
and
29 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 @@ | ||
# Roadmap | ||
|
||
```mermaid | ||
timeline | ||
section Q4 2024 | ||
MinaJS | ||
: @mina-js/connect Beta | ||
: @mina-js/provider Beta | ||
: @mina-js/accounts Beta | ||
Klesia | ||
: Klesia RPC Beta | ||
: @mina-js/klesia-sdk Beta | ||
section Q1 2025 | ||
MinaJS | ||
: Auro Wallet integration | ||
Klesia | ||
: Zeko integration | ||
: Protokit integration | ||
``` |
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 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,43 @@ | ||
import { expect, it } from "bun:test"; | ||
import { testClient } from "hono/testing"; | ||
import { klesiaRpcRoute } from "./"; | ||
|
||
const client = testClient(klesiaRpcRoute); | ||
|
||
it("returns result for mina_getTransactionCount", async () => { | ||
const response = await client.api.$post({ | ||
json: { | ||
method: "mina_getTransactionCount", | ||
params: ["B62qkYa1o6Mj6uTTjDQCob7FYZspuhkm4RRQhgJg9j4koEBWiSrTQrS"], | ||
}, | ||
}); | ||
const { result } = await response.json(); | ||
expect(result).toBeGreaterThan(0); | ||
}); | ||
|
||
it("returns result for mina_getBalance", async () => { | ||
const response = await client.api.$post({ | ||
json: { | ||
method: "mina_getBalance", | ||
params: ["B62qkYa1o6Mj6uTTjDQCob7FYZspuhkm4RRQhgJg9j4koEBWiSrTQrS"], | ||
}, | ||
}); | ||
const { result } = await response.json(); | ||
expect(BigInt(String(result))).toBeGreaterThan(0); | ||
}); | ||
|
||
it("returns result for mina_blockHash", async () => { | ||
const response = await client.api.$post({ | ||
json: { method: "mina_blockHash" }, | ||
}); | ||
const { result } = await response.json(); | ||
expect((result as unknown as string).length).toBeGreaterThan(0); | ||
}); | ||
|
||
it("returns result for mina_chainId", async () => { | ||
const response = await client.api.$post({ | ||
json: { method: "mina_chainId" }, | ||
}); | ||
const { result } = await response.json(); | ||
expect((result as unknown as string).length).toBeGreaterThan(0); | ||
}); |
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,24 @@ | ||
import { expect, it } from "bun:test"; | ||
import { mina } from "./mina"; | ||
|
||
const TEST_PKEY = "B62qkYa1o6Mj6uTTjDQCob7FYZspuhkm4RRQhgJg9j4koEBWiSrTQrS"; | ||
|
||
it("should return transactions count", async () => { | ||
const result = await mina.getTransactionCount({ publicKey: TEST_PKEY }); | ||
expect(result).toBeGreaterThan(0); | ||
}); | ||
|
||
it("should return balance", async () => { | ||
const result = await mina.getBalance({ publicKey: TEST_PKEY }); | ||
expect(BigInt(result)).toBeGreaterThan(0); | ||
}); | ||
|
||
it("should return block hash", async () => { | ||
const result = await mina.blockHash(); | ||
expect(result.length).toBeGreaterThan(0); | ||
}); | ||
|
||
it("should return chain id", async () => { | ||
const result = await mina.chainId(); | ||
expect(result.length).toBeGreaterThan(0); | ||
}); |
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