@kasarlabs/starknet-rpc-mcp 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,69 +7,69 @@ export declare const contractAddressSchema: z.ZodObject<{
7
7
  contractAddress: string;
8
8
  }>;
9
9
  export declare const blockIdSchema: z.ZodObject<{
10
- blockId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
10
+ blockId: z.ZodString;
11
11
  }, "strip", z.ZodTypeAny, {
12
- blockId: string | number;
12
+ blockId: string;
13
13
  }, {
14
- blockId: string | number;
14
+ blockId: string;
15
15
  }>;
16
16
  export declare const blockIdAndContractAddressSchema: z.ZodObject<{
17
- blockId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
17
+ blockId: z.ZodString;
18
18
  classHash: z.ZodString;
19
19
  }, "strict", z.ZodTypeAny, {
20
+ blockId: string;
20
21
  classHash: string;
21
- blockId: string | number;
22
22
  }, {
23
+ blockId: string;
23
24
  classHash: string;
24
- blockId: string | number;
25
25
  }>;
26
26
  export declare const getStorageAtSchema: z.ZodObject<{
27
- blockId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
27
+ blockId: z.ZodString;
28
28
  contractAddress: z.ZodString;
29
29
  key: z.ZodString;
30
30
  }, "strip", z.ZodTypeAny, {
31
- key: string;
32
- blockId: string | number;
33
31
  contractAddress: string;
34
- }, {
32
+ blockId: string;
35
33
  key: string;
36
- blockId: string | number;
34
+ }, {
37
35
  contractAddress: string;
36
+ blockId: string;
37
+ key: string;
38
38
  }>;
39
39
  export declare const getClassAtSchema: z.ZodObject<{
40
- blockId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
40
+ blockId: z.ZodString;
41
41
  contractAddress: z.ZodString;
42
42
  key: z.ZodString;
43
43
  }, "strip", z.ZodTypeAny, {
44
- key: string;
45
- blockId: string | number;
46
44
  contractAddress: string;
47
- }, {
45
+ blockId: string;
48
46
  key: string;
49
- blockId: string | number;
47
+ }, {
50
48
  contractAddress: string;
49
+ blockId: string;
50
+ key: string;
51
51
  }>;
52
52
  export declare const getClassHashAtSchema: z.ZodObject<{
53
- blockId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
53
+ blockId: z.ZodString;
54
54
  contractAddress: z.ZodString;
55
55
  key: z.ZodString;
56
56
  }, "strip", z.ZodTypeAny, {
57
- key: string;
58
- blockId: string | number;
59
57
  contractAddress: string;
60
- }, {
58
+ blockId: string;
61
59
  key: string;
62
- blockId: string | number;
60
+ }, {
63
61
  contractAddress: string;
62
+ blockId: string;
63
+ key: string;
64
64
  }>;
65
65
  export declare const getTransactionByBlockIdAndIndexSchema: z.ZodObject<{
66
- blockId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
66
+ blockId: z.ZodString;
67
67
  transactionIndex: z.ZodNumber;
68
68
  }, "strip", z.ZodTypeAny, {
69
- blockId: string | number;
69
+ blockId: string;
70
70
  transactionIndex: number;
71
71
  }, {
72
- blockId: string | number;
72
+ blockId: string;
73
73
  transactionIndex: number;
74
74
  }>;
75
75
  export declare const transactionHashSchema: z.ZodObject<{
@@ -3,71 +3,51 @@ export const contractAddressSchema = z.object({
3
3
  contractAddress: z.string().describe('The address of the contract'),
4
4
  });
5
5
  export const blockIdSchema = z.object({
6
- blockId: z.union([
7
- z
8
- .string()
9
- .describe("The block identifier. Can be 'latest', 'pending', or a block hash."),
10
- z.number().describe('A block number.'),
11
- ]),
6
+ blockId: z
7
+ .string()
8
+ .describe("The block identifier. Can be 'latest', 'pending', a block hash, or a block number as string."),
12
9
  });
13
10
  export const blockIdAndContractAddressSchema = z
14
11
  .object({
15
- blockId: z.union([
16
- z
17
- .string()
18
- .describe("The block identifier. Can be 'latest', 'pending', or a block hash."),
19
- z.number().describe('A block number.'),
20
- ]),
12
+ blockId: z
13
+ .string()
14
+ .describe("The block identifier. Can be 'latest', 'pending', a block hash, or a block number as string."),
21
15
  classHash: z.string().describe('The class hash of the contract'),
22
16
  })
23
17
  .strict();
24
18
  export const getStorageAtSchema = z.object({
25
- blockId: z.union([
26
- z
27
- .string()
28
- .describe("The block identifier. Can be 'latest', 'pending', or a block hash."),
29
- z.number().describe('A block number.'),
30
- ]),
19
+ blockId: z
20
+ .string()
21
+ .describe("The block identifier. Can be 'latest', 'pending', a block hash, or a block number as string."),
31
22
  contractAddress: z.string().describe('The address of the contract'),
32
23
  key: z
33
24
  .string()
34
25
  .describe('The key to the storage value for the given contract'),
35
26
  });
36
27
  export const getClassAtSchema = z.object({
37
- blockId: z.union([
38
- z
39
- .string()
40
- .describe("The block identifier. Can be 'latest', 'pending', or a block hash."),
41
- z.number().describe('A block number.'),
42
- ]),
28
+ blockId: z
29
+ .string()
30
+ .describe("The block identifier. Can be 'latest', 'pending', a block hash, or a block number as string."),
43
31
  contractAddress: z.string().describe('The address of the contract'),
44
32
  key: z
45
33
  .string()
46
34
  .describe('The class for the given contract at the given block'),
47
35
  });
48
36
  export const getClassHashAtSchema = z.object({
49
- blockId: z.union([
50
- z
51
- .string()
52
- .describe("The block identifier. Can be 'latest', 'pending', or a block hash."),
53
- z.number().describe('A block number.'),
54
- ]),
37
+ blockId: z
38
+ .string()
39
+ .describe("The block identifier. Can be 'latest', 'pending', a block hash, or a block number as string."),
55
40
  contractAddress: z.string().describe('The address of the contract'),
56
41
  key: z
57
42
  .string()
58
43
  .describe('The class hash for the given contract at the given block need to be a real class hash'),
59
44
  });
60
45
  export const getTransactionByBlockIdAndIndexSchema = z.object({
61
- blockId: z.union([
62
- z
63
- .string()
64
- .describe("The block identifier. Can be 'latest', 'pending', or a block hash."),
65
- z.number().describe('A block number.'),
66
- ]),
46
+ blockId: z
47
+ .string()
48
+ .describe("The block identifier. Can be 'latest', 'pending', a block hash, or a block number as string."),
67
49
  transactionIndex: z
68
50
  .number()
69
- .int()
70
- .nonnegative()
71
51
  .describe('The index of the transaction within the block.'),
72
52
  });
73
53
  export const transactionHashSchema = z.object({
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","source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C,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACnE,GAAG,EAAE,CAAC;SACH,MAAM,EAAE;SACR,QAAQ,CAAC,qDAAqD,CAAC;CACnE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,CACP,8FAA8F,CAC/F;IACH,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACnE,GAAG,EAAE,CAAC;SACH,MAAM,EAAE;SACR,QAAQ,CACP,uFAAuF,CACxF;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,CACP,8FAA8F,CAC/F;IACH,gBAAgB,EAAE,CAAC;SAChB,MAAM,EAAE;SACR,QAAQ,CAAC,gDAAgD,CAAC;CAC9D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,eAAe,EAAE,CAAC;SACf,MAAM,EAAE;SACR,QAAQ,CAAC,wCAAwC,CAAC;CACtD,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { RpcProvider } from 'starknet';
2
- export declare const getBlockTransactionCount: (provider: RpcProvider, params: {
3
- blockId: string;
4
- }) => Promise<{
2
+ import { blockIdSchema } from '../schemas/index.js';
3
+ import { z } from 'zod';
4
+ export declare const getBlockTransactionCount: (provider: RpcProvider, params: z.infer<typeof blockIdSchema>) => Promise<{
5
5
  status: string;
6
6
  blockTransactionCount: number;
7
7
  error?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"getBlockTransactionCount.js","sourceRoot":"","sources":["../../src/tools/getBlockTransactionCount.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAC3C,QAAqB,EACrB,MAA2B,EAC3B,EAAE;IACF,IAAI,CAAC;QACH,MAAM,qBAAqB,GAAG,MAAM,QAAQ,CAAC,wBAAwB,CACnE,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,qBAAqB;SACtB,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"getBlockTransactionCount.js","sourceRoot":"","sources":["../../src/tools/getBlockTransactionCount.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAC3C,QAAqB,EACrB,MAAqC,EACrC,EAAE;IACF,IAAI,CAAC;QACH,MAAM,qBAAqB,GAAG,MAAM,QAAQ,CAAC,wBAAwB,CACnE,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,qBAAqB;SACtB,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { RpcProvider } from 'starknet';
2
- export declare const getBlockWithReceipts: (provider: RpcProvider, params: {
3
- blockId: string;
4
- }) => Promise<{
2
+ import { blockIdSchema } from '../schemas/index.js';
3
+ import { z } from 'zod';
4
+ export declare const getBlockWithReceipts: (provider: RpcProvider, params: z.infer<typeof blockIdSchema>) => Promise<{
5
5
  status: string;
6
6
  blockWithReceipts: any;
7
7
  error?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"getBlockWithReceipts.js","sourceRoot":"","sources":["../../src/tools/getBlockWithReceipts.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EACvC,QAAqB,EACrB,MAA2B,EAC3B,EAAE;IACF,IAAI,CAAC;QACH,MAAM,iBAAiB,GAAG,MAAM,QAAQ,CAAC,oBAAoB,CAC3D,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,iBAAiB,EAAE,iBAAwB;SAC5C,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"getBlockWithReceipts.js","sourceRoot":"","sources":["../../src/tools/getBlockWithReceipts.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EACvC,QAAqB,EACrB,MAAqC,EACrC,EAAE;IACF,IAAI,CAAC;QACH,MAAM,iBAAiB,GAAG,MAAM,QAAQ,CAAC,oBAAoB,CAC3D,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,iBAAiB,EAAE,iBAAwB;SAC5C,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { RpcProvider } from 'starknet';
2
- export declare const getBlockWithTxHashes: (provider: RpcProvider, params: {
3
- blockId: string;
4
- }) => Promise<{
2
+ import { blockIdSchema } from '../schemas/index.js';
3
+ import { z } from 'zod';
4
+ export declare const getBlockWithTxHashes: (provider: RpcProvider, params: z.infer<typeof blockIdSchema>) => Promise<{
5
5
  status: string;
6
6
  blockWithTxHashes: any;
7
7
  error?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"getBlockWithTxHashes.js","sourceRoot":"","sources":["../../src/tools/getBlockWithTxHashes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EACvC,QAAqB,EACrB,MAA2B,EAC3B,EAAE;IACF,IAAI,CAAC;QACH,MAAM,iBAAiB,GAAG,MAAM,QAAQ,CAAC,oBAAoB,CAC3D,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,iBAAiB,EAAE,iBAAwB;SAC5C,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"getBlockWithTxHashes.js","sourceRoot":"","sources":["../../src/tools/getBlockWithTxHashes.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EACvC,QAAqB,EACrB,MAAqC,EACrC,EAAE;IACF,IAAI,CAAC;QACH,MAAM,iBAAiB,GAAG,MAAM,QAAQ,CAAC,oBAAoB,CAC3D,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,iBAAiB,EAAE,iBAAwB;SAC5C,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,8 +1,7 @@
1
1
  import { RpcProvider } from 'starknet';
2
- export declare const getClass: (provider: RpcProvider, params: {
3
- classHash: string;
4
- blockId?: string;
5
- }) => Promise<{
2
+ import { blockIdAndContractAddressSchema } from '../schemas/index.js';
3
+ import { z } from 'zod';
4
+ export declare const getClass: (provider: RpcProvider, params: z.infer<typeof blockIdAndContractAddressSchema>) => Promise<{
6
5
  status: string;
7
6
  contractClass: import("starknet").LegacyContractClass | Omit<import("starknet").CompiledSierra, "sierra_program_debug_info">;
8
7
  error?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"getClass.js","sourceRoot":"","sources":["../../src/tools/getClass.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,EAC3B,QAAqB,EACrB,MAA+C,EAC/C,EAAE;IACF,IAAI,CAAC;QACH,MAAM,aAAa,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAC3C,MAAM,CAAC,SAAS,EAChB,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,aAAa;SACd,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"getClass.js","sourceRoot":"","sources":["../../src/tools/getClass.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,EAC3B,QAAqB,EACrB,MAAuD,EACvD,EAAE;IACF,IAAI,CAAC;QACH,MAAM,aAAa,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAC3C,MAAM,CAAC,SAAS,EAChB,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,aAAa;SACd,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,8 +1,7 @@
1
1
  import { RpcProvider } from 'starknet';
2
- export declare const getClassAt: (provider: RpcProvider, params: {
3
- contractAddress: string;
4
- blockId?: string;
5
- }) => Promise<{
2
+ import { getClassAtSchema } from '../schemas/index.js';
3
+ import { z } from 'zod';
4
+ export declare const getClassAt: (provider: RpcProvider, params: z.infer<typeof getClassAtSchema>) => Promise<{
6
5
  status: string;
7
6
  contractClass: import("starknet").LegacyContractClass | Omit<import("starknet").CompiledSierra, "sierra_program_debug_info">;
8
7
  error?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"getClassAt.js","sourceRoot":"","sources":["../../src/tools/getClassAt.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,QAAqB,EACrB,MAAqD,EACrD,EAAE;IACF,IAAI,CAAC;QACH,MAAM,aAAa,GAAG,MAAM,QAAQ,CAAC,UAAU,CAC7C,MAAM,CAAC,eAAe,EACtB,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,aAAa;SACd,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"getClassAt.js","sourceRoot":"","sources":["../../src/tools/getClassAt.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAC7B,QAAqB,EACrB,MAAwC,EACxC,EAAE;IACF,IAAI,CAAC;QACH,MAAM,aAAa,GAAG,MAAM,QAAQ,CAAC,UAAU,CAC7C,MAAM,CAAC,eAAe,EACtB,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,aAAa;SACd,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,8 +1,7 @@
1
1
  import { RpcProvider } from 'starknet';
2
- export declare const getClassHashAt: (provider: RpcProvider, params: {
3
- contractAddress: string;
4
- blockId?: string;
5
- }) => Promise<{
2
+ import { getClassHashAtSchema } from '../schemas/index.js';
3
+ import { z } from 'zod';
4
+ export declare const getClassHashAt: (provider: RpcProvider, params: z.infer<typeof getClassHashAtSchema>) => Promise<{
6
5
  status: string;
7
6
  classHash: string;
8
7
  error?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"getClassHashAt.js","sourceRoot":"","sources":["../../src/tools/getClassHashAt.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,QAAqB,EACrB,MAAqD,EACrD,EAAE;IACF,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,cAAc,CAC7C,MAAM,CAAC,eAAe,EACtB,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,SAAS;SACV,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"getClassHashAt.js","sourceRoot":"","sources":["../../src/tools/getClassHashAt.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,QAAqB,EACrB,MAA4C,EAC5C,EAAE;IACF,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,cAAc,CAC7C,MAAM,CAAC,eAAe,EACtB,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,SAAS;SACV,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,9 +1,7 @@
1
1
  import { RpcProvider } from 'starknet';
2
- export declare const getStorageAt: (provider: RpcProvider, params: {
3
- contractAddress: string;
4
- key: string;
5
- blockId?: string;
6
- }) => Promise<{
2
+ import { getStorageAtSchema } from '../schemas/index.js';
3
+ import { z } from 'zod';
4
+ export declare const getStorageAt: (provider: RpcProvider, params: z.infer<typeof getStorageAtSchema>) => Promise<{
7
5
  status: string;
8
6
  storageValue: string;
9
7
  error?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"getStorageAt.js","sourceRoot":"","sources":["../../src/tools/getStorageAt.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,QAAqB,EACrB,MAAkE,EAClE,EAAE;IACF,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,YAAY,CAC9C,MAAM,CAAC,eAAe,EACtB,MAAM,CAAC,GAAG,EACV,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,YAAY;SACb,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"getStorageAt.js","sourceRoot":"","sources":["../../src/tools/getStorageAt.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,QAAqB,EACrB,MAA0C,EAC1C,EAAE;IACF,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,YAAY,CAC9C,MAAM,CAAC,eAAe,EACtB,MAAM,CAAC,GAAG,EACV,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,YAAY;SACb,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { RpcProvider } from 'starknet';
2
- export declare const getTransactionStatus: (provider: RpcProvider, params: {
3
- transactionHash: string;
4
- }) => Promise<{
2
+ import { transactionHashSchema } from '../schemas/index.js';
3
+ import { z } from 'zod';
4
+ export declare const getTransactionStatus: (provider: RpcProvider, params: z.infer<typeof transactionHashSchema>) => Promise<{
5
5
  status: string;
6
6
  transactionStatus: any;
7
7
  error?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"getTransactionStatus.js","sourceRoot":"","sources":["../../src/tools/getTransactionStatus.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EACvC,QAAqB,EACrB,MAAmC,EACnC,EAAE;IACF,IAAI,CAAC;QACH,MAAM,iBAAiB,GAAG,MAAM,QAAQ,CAAC,oBAAoB,CAC3D,MAAM,CAAC,eAAe,CACvB,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,iBAAiB,EAAE,iBAAwB;SAC5C,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"getTransactionStatus.js","sourceRoot":"","sources":["../../src/tools/getTransactionStatus.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EACvC,QAAqB,EACrB,MAA6C,EAC7C,EAAE;IACF,IAAI,CAAC;QACH,MAAM,iBAAiB,GAAG,MAAM,QAAQ,CAAC,oBAAoB,CAC3D,MAAM,CAAC,eAAe,CACvB,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,iBAAiB,EAAE,iBAAwB;SAC5C,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kasarlabs/starknet-rpc-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "bin": {
@@ -39,5 +39,5 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "2239ec60f8e369abd318807cecd22fe97c0ab917"
42
+ "gitHead": "803a8f9ba4004c51c63ffa87f454803223380384"
43
43
  }