Skip to content

Commit e25e977

Browse files
committed
chore(repo): ignore .turbo
1 parent 8d932ac commit e25e977

File tree

10 files changed

+20
-97
lines changed

10 files changed

+20
-97
lines changed

apps/klesia/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"start": "bun dist/index.js"
88
},
99
"dependencies": {
10+
"@mina-js/shared": "workspace:*",
1011
"@hono/zod-openapi": "^0.16.0",
1112
"@scalar/hono-api-reference": "^0.5.143",
1213
"@urql/core": "^5.0.6",

apps/klesia/src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { match } from "ts-pattern";
55
import { mina } from "./methods/mina";
66
import { RpcMethodSchema, RpcResponseSchema } from "./schema";
77
import { buildResponse } from "./utils/build-response";
8+
import { PublicKeySchema } from "@mina-js/shared";
89

910
const api = new OpenAPIHono();
1011

@@ -41,12 +42,12 @@ api.openapi(rpcRoute, async ({ req, json }) => {
4142
return match(body)
4243
.with({ method: "mina_getTransactionCount" }, async ({ params }) => {
4344
const [publicKey] = params;
44-
const result = await mina.getTransactionCount({ publicKey });
45+
const result = await mina.getTransactionCount({ publicKey: PublicKeySchema.parse(publicKey) });
4546
return json(buildResponse(result), 200);
4647
})
4748
.with({ method: "mina_getBalance" }, async ({ params }) => {
4849
const [publicKey] = params;
49-
const result = await mina.getBalance({ publicKey });
50+
const result = await mina.getBalance({ publicKey: PublicKeySchema.parse(publicKey) });
5051
return json(buildResponse(result), 200);
5152
})
5253
.with({ method: "mina_blockHash" }, async () => {

apps/klesia/src/methods/mina.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { gql } from "@urql/core";
22
import { match } from "ts-pattern";
33
import { getNodeClient } from "../utils/node";
4+
import { SignedTransactionSchema } from "@mina-js/shared";
45

56
const getTransactionCount = async ({ publicKey }: { publicKey: string }) => {
67
const client = getNodeClient();
@@ -75,7 +76,7 @@ const sendTransaction = async ({
7576
const client = getNodeClient();
7677
return match(type)
7778
.with("payment", async () => {
78-
const { signature, data: input } = signedTransaction;
79+
const { signature, data: input } = SignedTransactionSchema.parse(signedTransaction)
7980
const { data } = await client.mutation(
8081
gql`
8182
mutation {
@@ -91,7 +92,7 @@ const sendTransaction = async ({
9192
return data.sendPayment.payment.hash;
9293
})
9394
.with("delegation", async () => {
94-
const { signature, data: input } = signedTransaction;
95+
const { signature, data: input } = SignedTransactionSchema.parse(signedTransaction)
9596
const { data } = await client.mutation(
9697
gql`
9798
mutation {

apps/klesia/src/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { PublicKeySchema } from "@mina-js/shared";
12
import { z } from "zod";
23

3-
export const PublicKeySchema = z.string().length(55);
44
export const PublicKeyParamsSchema = z.array(PublicKeySchema).length(1);
55
export const EmptyParamsSchema = z.array(z.string()).length(0).optional();
66
export const SendTransactionSchema = z.array(z.any(), z.string()).length(2);

bun.lockb

32 Bytes
Binary file not shown.

packages/accounts/.turbo/turbo-build.log

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/connect/.turbo/turbo-build.log

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/providers/.turbo/turbo-build.log

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/shared/.turbo/turbo-build.log

Lines changed: 0 additions & 20 deletions
This file was deleted.

turbo.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"$schema": "https://turbo.build/schema.json",
3-
"tasks": {
4-
"build": {
5-
"dependsOn": ["^build"],
6-
"outputs": ["dist/**"]
7-
},
8-
"cleanup": {},
9-
"dev": {
10-
"persistent": true,
11-
"cache": false
12-
}
13-
}
2+
"$schema": "https://turbo.build/schema.json",
3+
"tasks": {
4+
"build": {
5+
"dependsOn": ["^build"],
6+
"outputs": ["dist/**"]
7+
},
8+
"cleanup": {},
9+
"dev": {
10+
"persistent": true,
11+
"cache": false
12+
}
13+
}
1414
}

0 commit comments

Comments
 (0)