@kasarlabs/starknet-rpc-mcp 0.1.0

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.
Files changed (79) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +38 -0
  3. package/bin/starknet-rpc-mcp.js +14 -0
  4. package/build/index.d.ts +2 -0
  5. package/build/index.js +169 -0
  6. package/build/index.js.map +1 -0
  7. package/build/lib/types/index.d.ts +85 -0
  8. package/build/lib/types/index.js +51 -0
  9. package/build/lib/types/index.js.map +1 -0
  10. package/build/schemas/index.d.ts +88 -0
  11. package/build/schemas/index.js +78 -0
  12. package/build/schemas/index.js.map +1 -0
  13. package/build/tools/getBlockLatestAccepted.d.ts +10 -0
  14. package/build/tools/getBlockLatestAccepted.js +16 -0
  15. package/build/tools/getBlockLatestAccepted.js.map +1 -0
  16. package/build/tools/getBlockNumber.d.ts +10 -0
  17. package/build/tools/getBlockNumber.js +16 -0
  18. package/build/tools/getBlockNumber.js.map +1 -0
  19. package/build/tools/getBlockStateUpdate.d.ts +12 -0
  20. package/build/tools/getBlockStateUpdate.js +16 -0
  21. package/build/tools/getBlockStateUpdate.js.map +1 -0
  22. package/build/tools/getBlockTransactionCount.d.ts +12 -0
  23. package/build/tools/getBlockTransactionCount.js +16 -0
  24. package/build/tools/getBlockTransactionCount.js.map +1 -0
  25. package/build/tools/getBlockTransactionsTraces.d.ts +12 -0
  26. package/build/tools/getBlockTransactionsTraces.js +16 -0
  27. package/build/tools/getBlockTransactionsTraces.js.map +1 -0
  28. package/build/tools/getBlockWithReceipts.d.ts +12 -0
  29. package/build/tools/getBlockWithReceipts.js +16 -0
  30. package/build/tools/getBlockWithReceipts.js.map +1 -0
  31. package/build/tools/getBlockWithTxHashes.d.ts +12 -0
  32. package/build/tools/getBlockWithTxHashes.js +16 -0
  33. package/build/tools/getBlockWithTxHashes.js.map +1 -0
  34. package/build/tools/getBlockWithTxs.d.ts +12 -0
  35. package/build/tools/getBlockWithTxs.js +16 -0
  36. package/build/tools/getBlockWithTxs.js.map +1 -0
  37. package/build/tools/getChainId.d.ts +10 -0
  38. package/build/tools/getChainId.js +16 -0
  39. package/build/tools/getChainId.js.map +1 -0
  40. package/build/tools/getClass.d.ts +13 -0
  41. package/build/tools/getClass.js +16 -0
  42. package/build/tools/getClass.js.map +1 -0
  43. package/build/tools/getClassAt.d.ts +13 -0
  44. package/build/tools/getClassAt.js +16 -0
  45. package/build/tools/getClassAt.js.map +1 -0
  46. package/build/tools/getClassHash.d.ts +13 -0
  47. package/build/tools/getClassHash.js +16 -0
  48. package/build/tools/getClassHash.js.map +1 -0
  49. package/build/tools/getClassHashAt.d.ts +13 -0
  50. package/build/tools/getClassHashAt.js +16 -0
  51. package/build/tools/getClassHashAt.js.map +1 -0
  52. package/build/tools/getNonceForAddress.d.ts +13 -0
  53. package/build/tools/getNonceForAddress.js +16 -0
  54. package/build/tools/getNonceForAddress.js.map +1 -0
  55. package/build/tools/getSpecVersion.d.ts +10 -0
  56. package/build/tools/getSpecVersion.js +16 -0
  57. package/build/tools/getSpecVersion.js.map +1 -0
  58. package/build/tools/getStorageAt.d.ts +14 -0
  59. package/build/tools/getStorageAt.js +16 -0
  60. package/build/tools/getStorageAt.js.map +1 -0
  61. package/build/tools/getSyncingStats.d.ts +10 -0
  62. package/build/tools/getSyncingStats.js +16 -0
  63. package/build/tools/getSyncingStats.js.map +1 -0
  64. package/build/tools/getTransactionByBlockIdAndIndex.d.ts +13 -0
  65. package/build/tools/getTransactionByBlockIdAndIndex.js +16 -0
  66. package/build/tools/getTransactionByBlockIdAndIndex.js.map +1 -0
  67. package/build/tools/getTransactionByHash.d.ts +12 -0
  68. package/build/tools/getTransactionByHash.js +16 -0
  69. package/build/tools/getTransactionByHash.js.map +1 -0
  70. package/build/tools/getTransactionReceipt.d.ts +12 -0
  71. package/build/tools/getTransactionReceipt.js +16 -0
  72. package/build/tools/getTransactionReceipt.js.map +1 -0
  73. package/build/tools/getTransactionStatus.d.ts +12 -0
  74. package/build/tools/getTransactionStatus.js +16 -0
  75. package/build/tools/getTransactionStatus.js.map +1 -0
  76. package/build/tools/getTransactionTrace.d.ts +12 -0
  77. package/build/tools/getTransactionTrace.js +16 -0
  78. package/build/tools/getTransactionTrace.js.map +1 -0
  79. package/package.json +43 -0
@@ -0,0 +1,16 @@
1
+ export const getBlockStateUpdate = async (provider, params) => {
2
+ try {
3
+ const blockStateUpdate = await provider.getStateUpdate(params.blockId);
4
+ return {
5
+ status: 'success',
6
+ blockStateUpdate,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getBlockStateUpdate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBlockStateUpdate.js","sourceRoot":"","sources":["../../src/tools/getBlockStateUpdate.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,EACtC,QAAqB,EACrB,MAA2B,EAC3B,EAAE;IACF,IAAI,CAAC;QACH,MAAM,gBAAgB,GAAG,MAAM,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAEvE,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,gBAAgB;SACjB,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"}
@@ -0,0 +1,12 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getBlockTransactionCount: (provider: RpcProvider, params: {
3
+ blockId: string;
4
+ }) => Promise<{
5
+ status: string;
6
+ blockTransactionCount: number;
7
+ error?: undefined;
8
+ } | {
9
+ status: string;
10
+ error: string;
11
+ blockTransactionCount?: undefined;
12
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getBlockTransactionCount = async (provider, params) => {
2
+ try {
3
+ const blockTransactionCount = await provider.getBlockTransactionCount(params.blockId);
4
+ return {
5
+ status: 'success',
6
+ blockTransactionCount,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getBlockTransactionCount.js.map
@@ -0,0 +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"}
@@ -0,0 +1,12 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getBlockTransactionsTraces: (provider: RpcProvider, params: {
3
+ blockId: string;
4
+ }) => Promise<{
5
+ status: string;
6
+ blockTransactionsTraces: any;
7
+ error?: undefined;
8
+ } | {
9
+ status: string;
10
+ error: string;
11
+ blockTransactionsTraces?: undefined;
12
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getBlockTransactionsTraces = async (provider, params) => {
2
+ try {
3
+ const blockTransactionsTraces = await provider.getBlockTransactionsTraces(params.blockId);
4
+ return {
5
+ status: 'success',
6
+ blockTransactionsTraces: blockTransactionsTraces,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getBlockTransactionsTraces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBlockTransactionsTraces.js","sourceRoot":"","sources":["../../src/tools/getBlockTransactionsTraces.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,EAC7C,QAAqB,EACrB,MAA2B,EAC3B,EAAE;IACF,IAAI,CAAC;QACH,MAAM,uBAAuB,GAAG,MAAM,QAAQ,CAAC,0BAA0B,CACvE,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,uBAAuB,EAAE,uBAA8B;SACxD,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"}
@@ -0,0 +1,12 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getBlockWithReceipts: (provider: RpcProvider, params: {
3
+ blockId: string;
4
+ }) => Promise<{
5
+ status: string;
6
+ blockWithReceipts: any;
7
+ error?: undefined;
8
+ } | {
9
+ status: string;
10
+ error: string;
11
+ blockWithReceipts?: undefined;
12
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getBlockWithReceipts = async (provider, params) => {
2
+ try {
3
+ const blockWithReceipts = await provider.getBlockWithReceipts(params.blockId);
4
+ return {
5
+ status: 'success',
6
+ blockWithReceipts: blockWithReceipts,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getBlockWithReceipts.js.map
@@ -0,0 +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"}
@@ -0,0 +1,12 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getBlockWithTxHashes: (provider: RpcProvider, params: {
3
+ blockId: string;
4
+ }) => Promise<{
5
+ status: string;
6
+ blockWithTxHashes: any;
7
+ error?: undefined;
8
+ } | {
9
+ status: string;
10
+ error: string;
11
+ blockWithTxHashes?: undefined;
12
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getBlockWithTxHashes = async (provider, params) => {
2
+ try {
3
+ const blockWithTxHashes = await provider.getBlockWithTxHashes(params.blockId);
4
+ return {
5
+ status: 'success',
6
+ blockWithTxHashes: blockWithTxHashes,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getBlockWithTxHashes.js.map
@@ -0,0 +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"}
@@ -0,0 +1,12 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getBlockWithTxs: (provider: RpcProvider, params: {
3
+ blockId: string;
4
+ }) => Promise<{
5
+ status: string;
6
+ blockWithTxs: any;
7
+ error?: undefined;
8
+ } | {
9
+ status: string;
10
+ error: string;
11
+ blockWithTxs?: undefined;
12
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getBlockWithTxs = async (provider, params) => {
2
+ try {
3
+ const blockWithTxs = await provider.getBlockWithTxs(params.blockId);
4
+ return {
5
+ status: 'success',
6
+ blockWithTxs: blockWithTxs,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getBlockWithTxs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBlockWithTxs.js","sourceRoot":"","sources":["../../src/tools/getBlockWithTxs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAClC,QAAqB,EACrB,MAA2B,EAC3B,EAAE;IACF,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAEpE,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,YAAY,EAAE,YAAmB;SAClC,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"}
@@ -0,0 +1,10 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getChainId: (provider: RpcProvider) => Promise<{
3
+ status: string;
4
+ chainId: "0x534e5f4d41494e" | "0x534e5f5345504f4c4941";
5
+ error?: undefined;
6
+ } | {
7
+ status: string;
8
+ error: string;
9
+ chainId?: undefined;
10
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getChainId = async (provider) => {
2
+ try {
3
+ const chainId = await provider.getChainId();
4
+ return {
5
+ status: 'success',
6
+ chainId,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getChainId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getChainId.js","sourceRoot":"","sources":["../../src/tools/getChainId.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,QAAqB,EAAE,EAAE;IACxD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,UAAU,EAAE,CAAC;QAE5C,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,OAAO;SACR,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"}
@@ -0,0 +1,13 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getClass: (provider: RpcProvider, params: {
3
+ classHash: string;
4
+ blockId?: string;
5
+ }) => Promise<{
6
+ status: string;
7
+ contractClass: import("starknet").LegacyContractClass | Omit<import("starknet").CompiledSierra, "sierra_program_debug_info">;
8
+ error?: undefined;
9
+ } | {
10
+ status: string;
11
+ error: string;
12
+ contractClass?: undefined;
13
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getClass = async (provider, params) => {
2
+ try {
3
+ const contractClass = await provider.getClass(params.classHash, params.blockId);
4
+ return {
5
+ status: 'success',
6
+ contractClass,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getClass.js.map
@@ -0,0 +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"}
@@ -0,0 +1,13 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getClassAt: (provider: RpcProvider, params: {
3
+ contractAddress: string;
4
+ blockId?: string;
5
+ }) => Promise<{
6
+ status: string;
7
+ contractClass: import("starknet").LegacyContractClass | Omit<import("starknet").CompiledSierra, "sierra_program_debug_info">;
8
+ error?: undefined;
9
+ } | {
10
+ status: string;
11
+ error: string;
12
+ contractClass?: undefined;
13
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getClassAt = async (provider, params) => {
2
+ try {
3
+ const contractClass = await provider.getClassAt(params.contractAddress, params.blockId);
4
+ return {
5
+ status: 'success',
6
+ contractClass,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getClassAt.js.map
@@ -0,0 +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"}
@@ -0,0 +1,13 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getClassHash: (provider: RpcProvider, params: {
3
+ contractAddress: string;
4
+ blockId?: string;
5
+ }) => Promise<{
6
+ status: string;
7
+ classHash: string;
8
+ error?: undefined;
9
+ } | {
10
+ status: string;
11
+ error: string;
12
+ classHash?: undefined;
13
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getClassHash = async (provider, params) => {
2
+ try {
3
+ const classHash = await provider.getClassHashAt(params.contractAddress, params.blockId);
4
+ return {
5
+ status: 'success',
6
+ classHash,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getClassHash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getClassHash.js","sourceRoot":"","sources":["../../src/tools/getClassHash.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,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"}
@@ -0,0 +1,13 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getClassHashAt: (provider: RpcProvider, params: {
3
+ contractAddress: string;
4
+ blockId?: string;
5
+ }) => Promise<{
6
+ status: string;
7
+ classHash: string;
8
+ error?: undefined;
9
+ } | {
10
+ status: string;
11
+ error: string;
12
+ classHash?: undefined;
13
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getClassHashAt = async (provider, params) => {
2
+ try {
3
+ const classHash = await provider.getClassHashAt(params.contractAddress, params.blockId);
4
+ return {
5
+ status: 'success',
6
+ classHash,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getClassHashAt.js.map
@@ -0,0 +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"}
@@ -0,0 +1,13 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getNonceForAddress: (provider: RpcProvider, params: {
3
+ contractAddress: string;
4
+ blockId?: string;
5
+ }) => Promise<{
6
+ status: string;
7
+ nonce: string;
8
+ error?: undefined;
9
+ } | {
10
+ status: string;
11
+ error: string;
12
+ nonce?: undefined;
13
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getNonceForAddress = async (provider, params) => {
2
+ try {
3
+ const nonce = await provider.getNonceForAddress(params.contractAddress, params.blockId);
4
+ return {
5
+ status: 'success',
6
+ nonce,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getNonceForAddress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getNonceForAddress.js","sourceRoot":"","sources":["../../src/tools/getNonceForAddress.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,QAAqB,EACrB,MAAqD,EACrD,EAAE;IACF,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,kBAAkB,CAC7C,MAAM,CAAC,eAAe,EACtB,MAAM,CAAC,OAAO,CACf,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK;SACN,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"}
@@ -0,0 +1,10 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getSpecVersion: (provider: RpcProvider) => Promise<{
3
+ status: string;
4
+ specVersion: string;
5
+ error?: undefined;
6
+ } | {
7
+ status: string;
8
+ error: string;
9
+ specVersion?: undefined;
10
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getSpecVersion = async (provider) => {
2
+ try {
3
+ const specVersion = await provider.getSpecVersion();
4
+ return {
5
+ status: 'success',
6
+ specVersion,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getSpecVersion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSpecVersion.js","sourceRoot":"","sources":["../../src/tools/getSpecVersion.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,QAAqB,EAAE,EAAE;IAC5D,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,cAAc,EAAE,CAAC;QAEpD,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,WAAW;SACZ,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"}
@@ -0,0 +1,14 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getStorageAt: (provider: RpcProvider, params: {
3
+ contractAddress: string;
4
+ key: string;
5
+ blockId?: string;
6
+ }) => Promise<{
7
+ status: string;
8
+ storageValue: string;
9
+ error?: undefined;
10
+ } | {
11
+ status: string;
12
+ error: string;
13
+ storageValue?: undefined;
14
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getStorageAt = async (provider, params) => {
2
+ try {
3
+ const storageValue = await provider.getStorageAt(params.contractAddress, params.key, params.blockId);
4
+ return {
5
+ status: 'success',
6
+ storageValue,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getStorageAt.js.map
@@ -0,0 +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"}
@@ -0,0 +1,10 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getSyncingStats: (provider: RpcProvider) => Promise<{
3
+ status: string;
4
+ syncingStats: any;
5
+ error?: undefined;
6
+ } | {
7
+ status: string;
8
+ error: string;
9
+ syncingStats?: undefined;
10
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getSyncingStats = async (provider) => {
2
+ try {
3
+ const syncingStats = await provider.getSyncingStats();
4
+ return {
5
+ status: 'success',
6
+ syncingStats: syncingStats,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getSyncingStats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSyncingStats.js","sourceRoot":"","sources":["../../src/tools/getSyncingStats.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,QAAqB,EAAE,EAAE;IAC7D,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,eAAe,EAAE,CAAC;QAEtD,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,YAAY,EAAE,YAAmB;SAClC,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"}
@@ -0,0 +1,13 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getTransactionByBlockIdAndIndex: (provider: RpcProvider, params: {
3
+ blockId: string;
4
+ index: number;
5
+ }) => Promise<{
6
+ status: string;
7
+ transaction: any;
8
+ error?: undefined;
9
+ } | {
10
+ status: string;
11
+ error: string;
12
+ transaction?: undefined;
13
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getTransactionByBlockIdAndIndex = async (provider, params) => {
2
+ try {
3
+ const transaction = await provider.getTransactionByBlockIdAndIndex(params.blockId, params.index);
4
+ return {
5
+ status: 'success',
6
+ transaction: transaction,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getTransactionByBlockIdAndIndex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTransactionByBlockIdAndIndex.js","sourceRoot":"","sources":["../../src/tools/getTransactionByBlockIdAndIndex.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,+BAA+B,GAAG,KAAK,EAClD,QAAqB,EACrB,MAA0C,EAC1C,EAAE;IACF,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,+BAA+B,CAChE,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,KAAK,CACb,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,WAAW,EAAE,WAAkB;SAChC,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"}
@@ -0,0 +1,12 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getTransactionByHash: (provider: RpcProvider, params: {
3
+ transactionHash: string;
4
+ }) => Promise<{
5
+ status: string;
6
+ transaction: any;
7
+ error?: undefined;
8
+ } | {
9
+ status: string;
10
+ error: string;
11
+ transaction?: undefined;
12
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getTransactionByHash = async (provider, params) => {
2
+ try {
3
+ const transaction = await provider.getTransactionByHash(params.transactionHash);
4
+ return {
5
+ status: 'success',
6
+ transaction: transaction,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getTransactionByHash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTransactionByHash.js","sourceRoot":"","sources":["../../src/tools/getTransactionByHash.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EACvC,QAAqB,EACrB,MAAmC,EACnC,EAAE;IACF,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,oBAAoB,CACrD,MAAM,CAAC,eAAe,CACvB,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,WAAW,EAAE,WAAkB;SAChC,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"}
@@ -0,0 +1,12 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getTransactionReceipt: (provider: RpcProvider, params: {
3
+ transactionHash: string;
4
+ }) => Promise<{
5
+ status: string;
6
+ transactionReceipt: import("starknet").GetTransactionReceiptResponse<keyof import("starknet").TransactionStatusReceiptSets>;
7
+ error?: undefined;
8
+ } | {
9
+ status: string;
10
+ error: string;
11
+ transactionReceipt?: undefined;
12
+ }>;
@@ -0,0 +1,16 @@
1
+ export const getTransactionReceipt = async (provider, params) => {
2
+ try {
3
+ const transactionReceipt = await provider.getTransactionReceipt(params.transactionHash);
4
+ return {
5
+ status: 'success',
6
+ transactionReceipt,
7
+ };
8
+ }
9
+ catch (error) {
10
+ return {
11
+ status: 'failure',
12
+ error: error instanceof Error ? error.message : 'Unknown error',
13
+ };
14
+ }
15
+ };
16
+ //# sourceMappingURL=getTransactionReceipt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTransactionReceipt.js","sourceRoot":"","sources":["../../src/tools/getTransactionReceipt.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,EACxC,QAAqB,EACrB,MAAmC,EACnC,EAAE;IACF,IAAI,CAAC;QACH,MAAM,kBAAkB,GAAG,MAAM,QAAQ,CAAC,qBAAqB,CAC7D,MAAM,CAAC,eAAe,CACvB,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,kBAAkB;SACnB,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"}
@@ -0,0 +1,12 @@
1
+ import { RpcProvider } from 'starknet';
2
+ export declare const getTransactionStatus: (provider: RpcProvider, params: {
3
+ transactionHash: string;
4
+ }) => Promise<{
5
+ status: string;
6
+ transactionStatus: any;
7
+ error?: undefined;
8
+ } | {
9
+ status: string;
10
+ error: string;
11
+ transactionStatus?: undefined;
12
+ }>;