starknet 6.9.0 → 6.10.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.
Files changed (315) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +1 -1
  3. package/README.md +5 -9
  4. package/dist/account/default.cjs +655 -0
  5. package/dist/account/default.d.ts +67 -0
  6. package/dist/account/default.mjs +652 -0
  7. package/dist/account/index.cjs +27 -0
  8. package/dist/account/index.d.ts +2 -0
  9. package/dist/account/index.mjs +2 -0
  10. package/dist/account/interface.cjs +9 -0
  11. package/dist/account/interface.d.ts +301 -0
  12. package/dist/account/interface.mjs +3 -0
  13. package/dist/channel/index.cjs +27 -0
  14. package/dist/channel/index.d.ts +3 -0
  15. package/dist/channel/index.mjs +3 -0
  16. package/dist/channel/rpc_0_6.cjs +607 -0
  17. package/dist/channel/rpc_0_6.d.ts +78 -0
  18. package/dist/channel/rpc_0_6.mjs +543 -0
  19. package/dist/channel/rpc_0_7.cjs +619 -0
  20. package/dist/channel/rpc_0_7.d.ts +81 -0
  21. package/dist/channel/rpc_0_7.mjs +561 -0
  22. package/dist/constants.cjs +76 -0
  23. package/dist/constants.d.ts +70 -0
  24. package/dist/constants.mjs +60 -0
  25. package/dist/contract/contractFactory.cjs +93 -0
  26. package/dist/contract/contractFactory.d.ts +46 -0
  27. package/dist/contract/contractFactory.mjs +83 -0
  28. package/dist/contract/default.cjs +269 -0
  29. package/dist/contract/default.d.ts +58 -0
  30. package/dist/contract/default.mjs +254 -0
  31. package/dist/contract/index.cjs +38 -0
  32. package/dist/contract/index.d.ts +3 -0
  33. package/dist/contract/index.mjs +3 -0
  34. package/dist/contract/interface.cjs +13 -0
  35. package/dist/contract/interface.d.ts +128 -0
  36. package/dist/contract/interface.mjs +6 -0
  37. package/dist/index.cjs +267 -0
  38. package/dist/index.d.ts +45 -5991
  39. package/dist/index.global.js +728 -609
  40. package/dist/index.global.js.map +1 -1
  41. package/dist/index.mjs +39 -7320
  42. package/dist/provider/errors.cjs +50 -0
  43. package/dist/provider/errors.d.ts +16 -0
  44. package/dist/provider/errors.mjs +35 -0
  45. package/dist/provider/extensions/default.cjs +11 -0
  46. package/dist/provider/extensions/default.d.ts +6 -0
  47. package/dist/provider/extensions/default.mjs +5 -0
  48. package/dist/provider/extensions/starknetId.cjs +174 -0
  49. package/dist/provider/extensions/starknetId.d.ts +10 -0
  50. package/dist/provider/extensions/starknetId.mjs +230 -0
  51. package/dist/provider/index.cjs +56 -0
  52. package/dist/provider/index.d.ts +6 -0
  53. package/dist/provider/index.mjs +6 -0
  54. package/dist/provider/interface.cjs +8 -0
  55. package/dist/provider/interface.d.ts +261 -0
  56. package/dist/provider/interface.mjs +2 -0
  57. package/dist/provider/rpc.cjs +301 -0
  58. package/dist/provider/rpc.d.ts +115 -0
  59. package/dist/provider/rpc.mjs +302 -0
  60. package/dist/service/types.cjs +1 -0
  61. package/dist/service/types.d.ts +5 -0
  62. package/dist/service/types.mjs +0 -0
  63. package/dist/signer/default.cjs +105 -0
  64. package/dist/signer/default.d.ts +12 -0
  65. package/dist/signer/default.mjs +102 -0
  66. package/dist/signer/ethSigner.cjs +123 -0
  67. package/dist/signer/ethSigner.d.ts +25 -0
  68. package/dist/signer/ethSigner.mjs +140 -0
  69. package/dist/signer/index.cjs +38 -0
  70. package/dist/signer/index.d.ts +3 -0
  71. package/dist/signer/index.mjs +3 -0
  72. package/dist/signer/interface.cjs +8 -0
  73. package/dist/signer/interface.d.ts +115 -0
  74. package/dist/signer/interface.mjs +2 -0
  75. package/dist/types/account.cjs +1 -0
  76. package/dist/types/account.d.ts +79 -0
  77. package/dist/types/account.mjs +0 -0
  78. package/dist/types/api/index.cjs +30 -0
  79. package/dist/types/api/index.d.ts +4 -0
  80. package/dist/types/api/index.mjs +4 -0
  81. package/dist/types/api/jsonrpc/index.cjs +1 -0
  82. package/dist/types/api/jsonrpc/index.d.ts +21 -0
  83. package/dist/types/api/jsonrpc/index.mjs +0 -0
  84. package/dist/types/api/rpcspec_0_6/components.cjs +1 -0
  85. package/dist/types/api/rpcspec_0_6/components.d.ts +541 -0
  86. package/dist/types/api/rpcspec_0_6/components.mjs +0 -0
  87. package/dist/types/api/rpcspec_0_6/contract.cjs +1 -0
  88. package/dist/types/api/rpcspec_0_6/contract.d.ts +85 -0
  89. package/dist/types/api/rpcspec_0_6/contract.mjs +0 -0
  90. package/dist/types/api/rpcspec_0_6/errors.cjs +1 -0
  91. package/dist/types/api/rpcspec_0_6/errors.d.ts +128 -0
  92. package/dist/types/api/rpcspec_0_6/errors.mjs +0 -0
  93. package/dist/types/api/rpcspec_0_6/index.cjs +45 -0
  94. package/dist/types/api/rpcspec_0_6/index.d.ts +8 -0
  95. package/dist/types/api/rpcspec_0_6/index.mjs +5 -0
  96. package/dist/types/api/rpcspec_0_6/methods.cjs +1 -0
  97. package/dist/types/api/rpcspec_0_6/methods.d.ts +207 -0
  98. package/dist/types/api/rpcspec_0_6/methods.mjs +0 -0
  99. package/dist/types/api/rpcspec_0_6/nonspec.cjs +65 -0
  100. package/dist/types/api/rpcspec_0_6/nonspec.d.ts +147 -0
  101. package/dist/types/api/rpcspec_0_6/nonspec.mjs +59 -0
  102. package/dist/types/cairoEnum.cjs +1 -0
  103. package/dist/types/cairoEnum.d.ts +2 -0
  104. package/dist/types/cairoEnum.mjs +0 -0
  105. package/dist/types/calldata.cjs +27 -0
  106. package/dist/types/calldata.d.ts +23 -0
  107. package/dist/types/calldata.mjs +21 -0
  108. package/dist/types/contract.cjs +1 -0
  109. package/dist/types/contract.d.ts +27 -0
  110. package/dist/types/contract.mjs +0 -0
  111. package/dist/types/helpers/valuesType.cjs +1 -0
  112. package/dist/types/helpers/valuesType.d.ts +1 -0
  113. package/dist/types/helpers/valuesType.mjs +0 -0
  114. package/dist/types/index.cjs +121 -0
  115. package/dist/types/index.d.ts +10 -0
  116. package/dist/types/index.mjs +10 -0
  117. package/dist/types/lib/contract/abi.cjs +1 -0
  118. package/dist/types/lib/contract/abi.d.ts +71 -0
  119. package/dist/types/lib/contract/abi.mjs +0 -0
  120. package/dist/types/lib/contract/index.cjs +50 -0
  121. package/dist/types/lib/contract/index.d.ts +26 -0
  122. package/dist/types/lib/contract/index.mjs +8 -0
  123. package/dist/types/lib/contract/legacy.cjs +1 -0
  124. package/dist/types/lib/contract/legacy.d.ts +33 -0
  125. package/dist/types/lib/contract/legacy.mjs +0 -0
  126. package/dist/types/lib/contract/sierra.cjs +1 -0
  127. package/dist/types/lib/contract/sierra.d.ts +52 -0
  128. package/dist/types/lib/contract/sierra.mjs +0 -0
  129. package/dist/types/lib/index.cjs +61 -0
  130. package/dist/types/lib/index.d.ts +259 -0
  131. package/dist/types/lib/index.mjs +36 -0
  132. package/dist/types/provider/configuration.cjs +1 -0
  133. package/dist/types/provider/configuration.d.ts +20 -0
  134. package/dist/types/provider/configuration.mjs +0 -0
  135. package/dist/types/provider/index.cjs +27 -0
  136. package/dist/types/provider/index.d.ts +2 -0
  137. package/dist/types/provider/index.mjs +2 -0
  138. package/dist/types/provider/response.cjs +30 -0
  139. package/dist/types/provider/response.d.ts +98 -0
  140. package/dist/types/provider/response.mjs +1 -0
  141. package/dist/types/provider/spec.cjs +1 -0
  142. package/dist/types/provider/spec.d.ts +49 -0
  143. package/dist/types/provider/spec.mjs +0 -0
  144. package/dist/types/signer.cjs +1 -0
  145. package/dist/types/signer.d.ts +49 -0
  146. package/dist/types/signer.mjs +0 -0
  147. package/dist/types/transactionReceipt.cjs +1 -0
  148. package/dist/types/transactionReceipt.d.ts +23 -0
  149. package/dist/types/transactionReceipt.mjs +0 -0
  150. package/dist/types/typedData.cjs +12 -0
  151. package/dist/types/typedData.d.ts +1 -0
  152. package/dist/types/typedData.mjs +3 -0
  153. package/dist/utils/address.cjs +44 -0
  154. package/dist/utils/address.d.ts +55 -0
  155. package/dist/utils/address.mjs +35 -0
  156. package/dist/utils/assert.cjs +11 -0
  157. package/dist/utils/assert.d.ts +12 -0
  158. package/dist/utils/assert.mjs +5 -0
  159. package/dist/utils/cairoDataTypes/felt.cjs +31 -0
  160. package/dist/utils/cairoDataTypes/felt.d.ts +6 -0
  161. package/dist/utils/cairoDataTypes/felt.mjs +27 -0
  162. package/dist/utils/cairoDataTypes/uint256.cjs +113 -0
  163. package/dist/utils/cairoDataTypes/uint256.d.ts +72 -0
  164. package/dist/utils/cairoDataTypes/uint256.mjs +103 -0
  165. package/dist/utils/cairoDataTypes/uint512.cjs +125 -0
  166. package/dist/utils/cairoDataTypes/uint512.d.ts +76 -0
  167. package/dist/utils/cairoDataTypes/uint512.mjs +123 -0
  168. package/dist/utils/calldata/byteArray.cjs +27 -0
  169. package/dist/utils/calldata/byteArray.d.ts +32 -0
  170. package/dist/utils/calldata/byteArray.mjs +20 -0
  171. package/dist/utils/calldata/cairo.cjs +114 -0
  172. package/dist/utils/calldata/cairo.d.ts +196 -0
  173. package/dist/utils/calldata/cairo.mjs +68 -0
  174. package/dist/utils/calldata/enum/CairoCustomEnum.cjs +55 -0
  175. package/dist/utils/calldata/enum/CairoCustomEnum.d.ts +38 -0
  176. package/dist/utils/calldata/enum/CairoCustomEnum.mjs +50 -0
  177. package/dist/utils/calldata/enum/CairoOption.cjs +55 -0
  178. package/dist/utils/calldata/enum/CairoOption.d.ts +37 -0
  179. package/dist/utils/calldata/enum/CairoOption.mjs +50 -0
  180. package/dist/utils/calldata/enum/CairoResult.cjs +54 -0
  181. package/dist/utils/calldata/enum/CairoResult.d.ts +36 -0
  182. package/dist/utils/calldata/enum/CairoResult.mjs +47 -0
  183. package/dist/utils/calldata/enum/index.cjs +38 -0
  184. package/dist/utils/calldata/enum/index.d.ts +3 -0
  185. package/dist/utils/calldata/enum/index.mjs +3 -0
  186. package/dist/utils/calldata/formatter.cjs +55 -0
  187. package/dist/utils/calldata/formatter.d.ts +9 -0
  188. package/dist/utils/calldata/formatter.mjs +58 -0
  189. package/dist/utils/calldata/index.cjs +272 -0
  190. package/dist/utils/calldata/index.d.ts +90 -0
  191. package/dist/utils/calldata/index.mjs +276 -0
  192. package/dist/utils/calldata/parser/index.cjs +29 -0
  193. package/dist/utils/calldata/parser/index.d.ts +5 -0
  194. package/dist/utils/calldata/parser/index.mjs +21 -0
  195. package/dist/utils/calldata/parser/interface.cjs +8 -0
  196. package/dist/utils/calldata/parser/interface.d.ts +20 -0
  197. package/dist/utils/calldata/parser/interface.mjs +2 -0
  198. package/dist/utils/calldata/parser/parser-0-1.1.0.cjs +38 -0
  199. package/dist/utils/calldata/parser/parser-0-1.1.0.d.ts +24 -0
  200. package/dist/utils/calldata/parser/parser-0-1.1.0.mjs +31 -0
  201. package/dist/utils/calldata/parser/parser-2.0.0.cjs +42 -0
  202. package/dist/utils/calldata/parser/parser-2.0.0.d.ts +23 -0
  203. package/dist/utils/calldata/parser/parser-2.0.0.mjs +37 -0
  204. package/dist/utils/calldata/propertyOrder.cjs +159 -0
  205. package/dist/utils/calldata/propertyOrder.d.ts +2 -0
  206. package/dist/utils/calldata/propertyOrder.mjs +189 -0
  207. package/dist/utils/calldata/requestParser.cjs +204 -0
  208. package/dist/utils/calldata/requestParser.d.ts +11 -0
  209. package/dist/utils/calldata/requestParser.mjs +231 -0
  210. package/dist/utils/calldata/responseParser.cjs +200 -0
  211. package/dist/utils/calldata/responseParser.d.ts +11 -0
  212. package/dist/utils/calldata/responseParser.mjs +201 -0
  213. package/dist/utils/calldata/tuple.cjs +106 -0
  214. package/dist/utils/calldata/tuple.d.ts +6 -0
  215. package/dist/utils/calldata/tuple.mjs +88 -0
  216. package/dist/utils/calldata/validate.cjs +241 -0
  217. package/dist/utils/calldata/validate.d.ts +6 -0
  218. package/dist/utils/calldata/validate.mjs +315 -0
  219. package/dist/utils/contract.cjs +40 -0
  220. package/dist/utils/contract.d.ts +37 -0
  221. package/dist/utils/contract.mjs +31 -0
  222. package/dist/utils/ec.cjs +12 -0
  223. package/dist/utils/ec.d.ts +2 -0
  224. package/dist/utils/ec.mjs +2 -0
  225. package/dist/utils/encode.cjs +78 -0
  226. package/dist/utils/encode.d.ts +207 -0
  227. package/dist/utils/encode.mjs +56 -0
  228. package/dist/utils/eth.cjs +22 -0
  229. package/dist/utils/eth.d.ts +22 -0
  230. package/dist/utils/eth.mjs +14 -0
  231. package/dist/utils/events/index.cjs +144 -0
  232. package/dist/utils/events/index.d.ts +84 -0
  233. package/dist/utils/events/index.mjs +136 -0
  234. package/dist/utils/fetchPonyfill.cjs +14 -0
  235. package/dist/utils/fetchPonyfill.d.ts +2 -0
  236. package/dist/utils/fetchPonyfill.mjs +5 -0
  237. package/dist/utils/hash/classHash.cjs +151 -0
  238. package/dist/utils/hash/classHash.d.ts +120 -0
  239. package/dist/utils/hash/classHash.mjs +168 -0
  240. package/dist/utils/hash/index.cjs +49 -0
  241. package/dist/utils/hash/index.d.ts +7 -0
  242. package/dist/utils/hash/index.mjs +4 -0
  243. package/dist/utils/hash/selector.cjs +37 -0
  244. package/dist/utils/hash/selector.d.ts +57 -0
  245. package/dist/utils/hash/selector.mjs +28 -0
  246. package/dist/utils/hash/transactionHash/index.cjs +38 -0
  247. package/dist/utils/hash/transactionHash/index.d.ts +81 -0
  248. package/dist/utils/hash/transactionHash/index.mjs +102 -0
  249. package/dist/utils/hash/transactionHash/v2.cjs +31 -0
  250. package/dist/utils/hash/transactionHash/v2.d.ts +34 -0
  251. package/dist/utils/hash/transactionHash/v2.mjs +57 -0
  252. package/dist/utils/hash/transactionHash/v3.cjs +45 -0
  253. package/dist/utils/hash/transactionHash/v3.d.ts +24 -0
  254. package/dist/utils/hash/transactionHash/v3.mjs +80 -0
  255. package/dist/utils/json.cjs +21 -0
  256. package/dist/utils/json.d.ts +50 -0
  257. package/dist/utils/json.mjs +10 -0
  258. package/dist/utils/merkle.cjs +118 -0
  259. package/dist/utils/merkle.d.ts +87 -0
  260. package/dist/utils/merkle.mjs +114 -0
  261. package/dist/utils/num.cjs +109 -0
  262. package/dist/utils/num.d.ts +283 -0
  263. package/dist/utils/num.mjs +86 -0
  264. package/dist/utils/provider.cjs +182 -0
  265. package/dist/utils/provider.d.ts +217 -0
  266. package/dist/utils/provider.mjs +158 -0
  267. package/dist/utils/responseParser/index.cjs +27 -0
  268. package/dist/utils/responseParser/index.d.ts +2 -0
  269. package/dist/utils/responseParser/index.mjs +2 -0
  270. package/dist/utils/responseParser/interface.cjs +8 -0
  271. package/dist/utils/responseParser/interface.d.ts +13 -0
  272. package/dist/utils/responseParser/interface.mjs +2 -0
  273. package/dist/utils/responseParser/rpc.cjs +83 -0
  274. package/dist/utils/responseParser/rpc.d.ts +19 -0
  275. package/dist/utils/responseParser/rpc.mjs +77 -0
  276. package/dist/utils/shortString.cjs +56 -0
  277. package/dist/utils/shortString.d.ts +116 -0
  278. package/dist/utils/shortString.mjs +39 -0
  279. package/dist/utils/stark.cjs +137 -0
  280. package/dist/utils/stark.d.ts +224 -0
  281. package/dist/utils/stark.mjs +109 -0
  282. package/dist/utils/starknetId.cjs +196 -0
  283. package/dist/utils/starknetId.d.ts +182 -0
  284. package/dist/utils/starknetId.mjs +185 -0
  285. package/dist/utils/transaction.cjs +115 -0
  286. package/dist/utils/transaction.d.ts +185 -0
  287. package/dist/utils/transaction.mjs +98 -0
  288. package/dist/utils/transactionReceipt.cjs +54 -0
  289. package/dist/utils/transactionReceipt.d.ts +33 -0
  290. package/dist/utils/transactionReceipt.mjs +49 -0
  291. package/dist/utils/typedData.cjs +285 -0
  292. package/dist/utils/typedData.d.ts +54 -0
  293. package/dist/utils/typedData.mjs +286 -0
  294. package/dist/utils/uint256.cjs +30 -0
  295. package/dist/utils/uint256.d.ts +45 -0
  296. package/dist/utils/uint256.mjs +11 -0
  297. package/dist/utils/url.cjs +35 -0
  298. package/dist/utils/url.d.ts +29 -0
  299. package/dist/utils/url.mjs +27 -0
  300. package/dist/wallet/account.cjs +115 -0
  301. package/dist/wallet/account.d.ts +31 -0
  302. package/dist/wallet/account.mjs +112 -0
  303. package/dist/wallet/connect.cjs +90 -0
  304. package/dist/wallet/connect.d.ts +82 -0
  305. package/dist/wallet/connect.mjs +64 -0
  306. package/dist/wallet/index.cjs +16 -0
  307. package/dist/wallet/index.d.ts +1 -0
  308. package/dist/wallet/index.mjs +1 -0
  309. package/dist/wallet/types.cjs +1 -0
  310. package/dist/wallet/types.d.ts +4 -0
  311. package/dist/wallet/types.mjs +0 -0
  312. package/package.json +13 -13
  313. package/dist/index.js +0 -7426
  314. package/dist/index.js.map +0 -1
  315. package/dist/index.mjs.map +0 -1
@@ -0,0 +1,128 @@
1
+ export interface FAILED_TO_RECEIVE_TXN {
2
+ code: 1;
3
+ message: 'Failed to write transaction';
4
+ }
5
+ export interface NO_TRACE_AVAILABLE {
6
+ code: 10;
7
+ message: 'No trace available for transaction';
8
+ data: {
9
+ status: 'RECEIVED' | 'REJECTED';
10
+ };
11
+ }
12
+ export interface CONTRACT_NOT_FOUND {
13
+ code: 20;
14
+ message: 'Contract not found';
15
+ }
16
+ export interface INVALID_MESSAGE_SELECTOR {
17
+ code: 21;
18
+ message: 'Invalid message selector';
19
+ }
20
+ export interface INVALID_CALL_DATA {
21
+ code: 22;
22
+ message: 'Invalid call data';
23
+ }
24
+ export interface BLOCK_NOT_FOUND {
25
+ code: 24;
26
+ message: 'Block not found';
27
+ }
28
+ export interface INVALID_BLOCK_HASH {
29
+ code: 26;
30
+ message: 'Invalid block hash';
31
+ }
32
+ export interface INVALID_TXN_INDEX {
33
+ code: 27;
34
+ message: 'Invalid transaction index in a block';
35
+ }
36
+ export interface CLASS_HASH_NOT_FOUND {
37
+ code: 28;
38
+ message: 'Class hash not found';
39
+ }
40
+ export interface TXN_HASH_NOT_FOUND {
41
+ code: 29;
42
+ message: 'Transaction hash not found';
43
+ }
44
+ export interface PAGE_SIZE_TOO_BIG {
45
+ code: 31;
46
+ message: 'Requested page size is too big';
47
+ }
48
+ export interface NO_BLOCKS {
49
+ code: 32;
50
+ message: 'There are no blocks';
51
+ }
52
+ export interface INVALID_CONTINUATION_TOKEN {
53
+ code: 33;
54
+ message: 'The supplied continuation token is invalid or unknown';
55
+ }
56
+ export interface TOO_MANY_KEYS_IN_FILTER {
57
+ code: 34;
58
+ message: 'Too many keys provided in a filter';
59
+ }
60
+ export interface CONTRACT_ERROR {
61
+ code: 40;
62
+ message: 'Contract error';
63
+ data: {
64
+ revert_error: string;
65
+ };
66
+ }
67
+ export interface TRANSACTION_EXECUTION_ERROR {
68
+ code: 41;
69
+ message: 'Transaction execution error';
70
+ data: {
71
+ transaction_index: number;
72
+ execution_error: string;
73
+ };
74
+ }
75
+ export interface CLASS_ALREADY_DECLARED {
76
+ code: 51;
77
+ message: 'Class already declared';
78
+ }
79
+ export interface INVALID_TRANSACTION_NONCE {
80
+ code: 52;
81
+ message: 'Invalid transaction nonce';
82
+ }
83
+ export interface INSUFFICIENT_MAX_FEE {
84
+ code: 53;
85
+ message: 'Max fee is smaller than the minimal transaction cost (validation plus fee transfer)';
86
+ }
87
+ export interface INSUFFICIENT_ACCOUNT_BALANCE {
88
+ code: 54;
89
+ message: "Account balance is smaller than the transaction's max_fee";
90
+ }
91
+ export interface VALIDATION_FAILURE {
92
+ code: 55;
93
+ message: 'Account validation failed';
94
+ data: string;
95
+ }
96
+ export interface COMPILATION_FAILED {
97
+ code: 56;
98
+ message: 'Compilation failed';
99
+ }
100
+ export interface CONTRACT_CLASS_SIZE_IS_TOO_LARGE {
101
+ code: 57;
102
+ message: 'Contract class size it too large';
103
+ }
104
+ export interface NON_ACCOUNT {
105
+ code: 58;
106
+ message: 'Sender address in not an account contract';
107
+ }
108
+ export interface DUPLICATE_TX {
109
+ code: 59;
110
+ message: 'A transaction with the same hash already exists in the mempool';
111
+ }
112
+ export interface COMPILED_CLASS_HASH_MISMATCH {
113
+ code: 60;
114
+ message: 'the compiled class hash did not match the one supplied in the transaction';
115
+ }
116
+ export interface UNSUPPORTED_TX_VERSION {
117
+ code: 61;
118
+ message: 'the transaction version is not supported';
119
+ }
120
+ export interface UNSUPPORTED_CONTRACT_CLASS_VERSION {
121
+ code: 62;
122
+ message: 'the contract class version is not supported';
123
+ }
124
+ export interface UNEXPECTED_ERROR {
125
+ code: 63;
126
+ message: 'An unexpected error occurred';
127
+ data: string;
128
+ }
File without changes
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ Methods: true,
8
+ ABI: true,
9
+ Errors: true,
10
+ SPEC: true
11
+ };
12
+ Object.defineProperty(exports, "ABI", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _contract.ABI;
16
+ }
17
+ });
18
+ exports.Errors = void 0;
19
+ Object.defineProperty(exports, "Methods", {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _methods.Methods;
23
+ }
24
+ });
25
+ exports.SPEC = void 0;
26
+ var _methods = require("./methods.cjs");
27
+ var _contract = require("./contract.cjs");
28
+ var _Errors = _interopRequireWildcard(require("./errors.cjs"));
29
+ exports.Errors = _Errors;
30
+ var _SPEC = _interopRequireWildcard(require("./components.cjs"));
31
+ exports.SPEC = _SPEC;
32
+ var _nonspec = require("./nonspec.cjs");
33
+ Object.keys(_nonspec).forEach(function (key) {
34
+ if (key === "default" || key === "__esModule") return;
35
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
36
+ if (key in exports && exports[key] === _nonspec[key]) return;
37
+ Object.defineProperty(exports, key, {
38
+ enumerable: true,
39
+ get: function () {
40
+ return _nonspec[key];
41
+ }
42
+ });
43
+ });
44
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
45
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * version 0.6.0
3
+ */
4
+ export { Methods } from './methods';
5
+ export { ABI } from './contract';
6
+ export * as Errors from './errors';
7
+ export * as SPEC from './components';
8
+ export * from './nonspec';
@@ -0,0 +1,5 @@
1
+ export { Methods } from "./methods.mjs";
2
+ export { ABI } from "./contract.mjs";
3
+ export * as Errors from "./errors.mjs";
4
+ export * as SPEC from "./components.mjs";
5
+ export * from "./nonspec.mjs";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,207 @@
1
+ import { ADDRESS, BLOCK_ID, BLOCK_NUMBER, BROADCASTED_DECLARE_TXN, BROADCASTED_DEPLOY_ACCOUNT_TXN, BROADCASTED_INVOKE_TXN, BROADCASTED_TXN, CHAIN_ID, EVENT_FILTER, FELT, FUNCTION_CALL, MSG_FROM_L1, RESULT_PAGE_REQUEST, SIMULATION_FLAG, SIMULATION_FLAG_FOR_ESTIMATE_FEE, STORAGE_KEY, TXN_HASH } from './components';
2
+ import * as Errors from './errors';
3
+ import { BlockHashAndNumber, BlockTransactionsTraces, BlockWithTxHashes, BlockWithTxs, ContractClass, DeclaredTransaction, DeployedAccountTransaction, Events, FeeEstimate, InvokedTransaction, Nonce, SimulateTransactionResponse, StateUpdate, Syncing, TransactionReceipt, TransactionStatus, TransactionTrace, TransactionWithHash } from './nonspec';
4
+ export type Methods = ReadMethods & WriteMethods & TraceMethods;
5
+ type ReadMethods = {
6
+ starknet_specVersion: {
7
+ params: [];
8
+ result: string;
9
+ };
10
+ starknet_getBlockWithTxHashes: {
11
+ params: {
12
+ block_id: BLOCK_ID;
13
+ };
14
+ result: BlockWithTxHashes;
15
+ errors: Errors.BLOCK_NOT_FOUND;
16
+ };
17
+ starknet_getBlockWithTxs: {
18
+ params: {
19
+ block_id: BLOCK_ID;
20
+ };
21
+ result: BlockWithTxs;
22
+ errors: Errors.BLOCK_NOT_FOUND;
23
+ };
24
+ starknet_getStateUpdate: {
25
+ params: {
26
+ block_id: BLOCK_ID;
27
+ };
28
+ result: StateUpdate;
29
+ errors: Errors.BLOCK_NOT_FOUND;
30
+ };
31
+ starknet_getStorageAt: {
32
+ params: {
33
+ contract_address: ADDRESS;
34
+ key: STORAGE_KEY;
35
+ block_id: BLOCK_ID;
36
+ };
37
+ result: FELT;
38
+ errors: Errors.CONTRACT_NOT_FOUND | Errors.BLOCK_NOT_FOUND;
39
+ };
40
+ starknet_getTransactionStatus: {
41
+ params: {
42
+ transaction_hash: TXN_HASH;
43
+ };
44
+ result: TransactionStatus;
45
+ errors: Errors.TXN_HASH_NOT_FOUND;
46
+ };
47
+ starknet_getTransactionByHash: {
48
+ params: {
49
+ transaction_hash: TXN_HASH;
50
+ };
51
+ result: TransactionWithHash;
52
+ errors: Errors.TXN_HASH_NOT_FOUND;
53
+ };
54
+ starknet_getTransactionByBlockIdAndIndex: {
55
+ params: {
56
+ block_id: BLOCK_ID;
57
+ index: number;
58
+ };
59
+ result: TransactionWithHash;
60
+ errors: Errors.BLOCK_NOT_FOUND | Errors.INVALID_TXN_INDEX;
61
+ };
62
+ starknet_getTransactionReceipt: {
63
+ params: {
64
+ transaction_hash: TXN_HASH;
65
+ };
66
+ result: TransactionReceipt;
67
+ errors: Errors.TXN_HASH_NOT_FOUND;
68
+ };
69
+ starknet_getClass: {
70
+ params: {
71
+ block_id: BLOCK_ID;
72
+ class_hash: FELT;
73
+ };
74
+ result: ContractClass;
75
+ errors: Errors.BLOCK_NOT_FOUND | Errors.CLASS_HASH_NOT_FOUND;
76
+ };
77
+ starknet_getClassHashAt: {
78
+ params: {
79
+ block_id: BLOCK_ID;
80
+ contract_address: ADDRESS;
81
+ };
82
+ result: FELT;
83
+ errors: Errors.BLOCK_NOT_FOUND | Errors.CONTRACT_NOT_FOUND;
84
+ };
85
+ starknet_getClassAt: {
86
+ params: {
87
+ block_id: BLOCK_ID;
88
+ contract_address: ADDRESS;
89
+ };
90
+ result: ContractClass;
91
+ errors: Errors.BLOCK_NOT_FOUND | Errors.CONTRACT_NOT_FOUND;
92
+ };
93
+ starknet_getBlockTransactionCount: {
94
+ params: {
95
+ block_id: BLOCK_ID;
96
+ };
97
+ result: number;
98
+ errors: Errors.BLOCK_NOT_FOUND;
99
+ };
100
+ starknet_call: {
101
+ params: {
102
+ request: FUNCTION_CALL;
103
+ block_id: BLOCK_ID;
104
+ };
105
+ result: FELT[];
106
+ errors: Errors.CONTRACT_NOT_FOUND | Errors.CONTRACT_ERROR | Errors.BLOCK_NOT_FOUND;
107
+ };
108
+ starknet_estimateFee: {
109
+ params: {
110
+ request: BROADCASTED_TXN[];
111
+ simulation_flags?: [SIMULATION_FLAG_FOR_ESTIMATE_FEE] | [];
112
+ block_id: BLOCK_ID;
113
+ };
114
+ result: FeeEstimate[];
115
+ errors: Errors.TRANSACTION_EXECUTION_ERROR | Errors.BLOCK_NOT_FOUND;
116
+ };
117
+ starknet_estimateMessageFee: {
118
+ params: {
119
+ message: MSG_FROM_L1;
120
+ block_id: BLOCK_ID;
121
+ };
122
+ result: FeeEstimate;
123
+ errors: Errors.CONTRACT_ERROR | Errors.BLOCK_NOT_FOUND;
124
+ };
125
+ starknet_blockNumber: {
126
+ params: [];
127
+ result: BLOCK_NUMBER;
128
+ errors: Errors.NO_BLOCKS;
129
+ };
130
+ starknet_blockHashAndNumber: {
131
+ params: [];
132
+ result: BlockHashAndNumber;
133
+ errors: Errors.NO_BLOCKS;
134
+ };
135
+ starknet_chainId: {
136
+ params: [];
137
+ result: CHAIN_ID;
138
+ };
139
+ starknet_syncing: {
140
+ params: [];
141
+ result: Syncing;
142
+ };
143
+ starknet_getEvents: {
144
+ params: {
145
+ filter: EVENT_FILTER & RESULT_PAGE_REQUEST;
146
+ };
147
+ result: Events;
148
+ errors: Errors.PAGE_SIZE_TOO_BIG | Errors.INVALID_CONTINUATION_TOKEN | Errors.BLOCK_NOT_FOUND | Errors.TOO_MANY_KEYS_IN_FILTER;
149
+ };
150
+ starknet_getNonce: {
151
+ params: {
152
+ block_id: BLOCK_ID;
153
+ contract_address: ADDRESS;
154
+ };
155
+ result: Nonce;
156
+ errors: Errors.BLOCK_NOT_FOUND | Errors.CONTRACT_NOT_FOUND;
157
+ };
158
+ };
159
+ type WriteMethods = {
160
+ starknet_addInvokeTransaction: {
161
+ params: {
162
+ invoke_transaction: BROADCASTED_INVOKE_TXN;
163
+ };
164
+ result: InvokedTransaction;
165
+ errors: Errors.INSUFFICIENT_ACCOUNT_BALANCE | Errors.INSUFFICIENT_MAX_FEE | Errors.INVALID_TRANSACTION_NONCE | Errors.VALIDATION_FAILURE | Errors.NON_ACCOUNT | Errors.DUPLICATE_TX | Errors.UNSUPPORTED_TX_VERSION | Errors.UNEXPECTED_ERROR;
166
+ };
167
+ starknet_addDeclareTransaction: {
168
+ params: {
169
+ declare_transaction: BROADCASTED_DECLARE_TXN;
170
+ };
171
+ result: DeclaredTransaction;
172
+ errors: Errors.CLASS_ALREADY_DECLARED | Errors.COMPILATION_FAILED | Errors.COMPILED_CLASS_HASH_MISMATCH | Errors.INSUFFICIENT_ACCOUNT_BALANCE | Errors.INSUFFICIENT_MAX_FEE | Errors.INVALID_TRANSACTION_NONCE | Errors.VALIDATION_FAILURE | Errors.NON_ACCOUNT | Errors.DUPLICATE_TX | Errors.CONTRACT_CLASS_SIZE_IS_TOO_LARGE | Errors.UNSUPPORTED_TX_VERSION | Errors.UNSUPPORTED_CONTRACT_CLASS_VERSION | Errors.UNEXPECTED_ERROR;
173
+ };
174
+ starknet_addDeployAccountTransaction: {
175
+ params: {
176
+ deploy_account_transaction: BROADCASTED_DEPLOY_ACCOUNT_TXN;
177
+ };
178
+ result: DeployedAccountTransaction;
179
+ errors: Errors.INSUFFICIENT_ACCOUNT_BALANCE | Errors.INSUFFICIENT_MAX_FEE | Errors.INVALID_TRANSACTION_NONCE | Errors.VALIDATION_FAILURE | Errors.NON_ACCOUNT | Errors.CLASS_HASH_NOT_FOUND | Errors.DUPLICATE_TX | Errors.UNSUPPORTED_TX_VERSION | Errors.UNEXPECTED_ERROR;
180
+ };
181
+ };
182
+ type TraceMethods = {
183
+ starknet_traceTransaction: {
184
+ params: {
185
+ transaction_hash: TXN_HASH;
186
+ };
187
+ result: TransactionTrace;
188
+ errors: Errors.TXN_HASH_NOT_FOUND | Errors.NO_TRACE_AVAILABLE;
189
+ };
190
+ starknet_traceBlockTransactions: {
191
+ params: {
192
+ block_id: BLOCK_ID;
193
+ };
194
+ result: BlockTransactionsTraces;
195
+ errors: Errors.BLOCK_NOT_FOUND;
196
+ };
197
+ starknet_simulateTransactions: {
198
+ params: {
199
+ block_id: BLOCK_ID;
200
+ transactions: Array<BROADCASTED_TXN>;
201
+ simulation_flags: Array<SIMULATION_FLAG>;
202
+ };
203
+ result: SimulateTransactionResponse;
204
+ errors: Errors.BLOCK_NOT_FOUND | Errors.TRANSACTION_EXECUTION_ERROR;
205
+ };
206
+ };
207
+ export {};
File without changes
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ETransactionVersion3 = exports.ETransactionVersion2 = exports.ETransactionVersion = exports.ETransactionType = exports.ETransactionStatus = exports.ETransactionFinalityStatus = exports.ETransactionExecutionStatus = exports.ESimulationFlag = exports.EDataAvailabilityMode = exports.EDAMode = exports.EBlockTag = void 0;
7
+ const ETransactionType = exports.ETransactionType = {
8
+ DECLARE: "DECLARE",
9
+ DEPLOY: "DEPLOY",
10
+ DEPLOY_ACCOUNT: "DEPLOY_ACCOUNT",
11
+ INVOKE: "INVOKE",
12
+ L1_HANDLER: "L1_HANDLER"
13
+ };
14
+ const ESimulationFlag = exports.ESimulationFlag = {
15
+ SKIP_VALIDATE: "SKIP_VALIDATE",
16
+ SKIP_FEE_CHARGE: "SKIP_FEE_CHARGE"
17
+ };
18
+ const ETransactionStatus = exports.ETransactionStatus = {
19
+ RECEIVED: "RECEIVED",
20
+ REJECTED: "REJECTED",
21
+ ACCEPTED_ON_L2: "ACCEPTED_ON_L2",
22
+ ACCEPTED_ON_L1: "ACCEPTED_ON_L1"
23
+ };
24
+ const ETransactionFinalityStatus = exports.ETransactionFinalityStatus = {
25
+ ACCEPTED_ON_L2: "ACCEPTED_ON_L2",
26
+ ACCEPTED_ON_L1: "ACCEPTED_ON_L1"
27
+ };
28
+ const ETransactionExecutionStatus = exports.ETransactionExecutionStatus = {
29
+ SUCCEEDED: "SUCCEEDED",
30
+ REVERTED: "REVERTED"
31
+ };
32
+ const EBlockTag = exports.EBlockTag = {
33
+ PENDING: "pending",
34
+ LATEST: "latest"
35
+ };
36
+ const EDataAvailabilityMode = exports.EDataAvailabilityMode = {
37
+ L1: "L1",
38
+ L2: "L2"
39
+ };
40
+ const EDAMode = exports.EDAMode = {
41
+ L1: 0,
42
+ L2: 1
43
+ };
44
+ const ETransactionVersion = exports.ETransactionVersion = {
45
+ V0: "0x0",
46
+ V1: "0x1",
47
+ V2: "0x2",
48
+ V3: "0x3",
49
+ F0: "0x100000000000000000000000000000000",
50
+ F1: "0x100000000000000000000000000000001",
51
+ F2: "0x100000000000000000000000000000002",
52
+ F3: "0x100000000000000000000000000000003"
53
+ };
54
+ const ETransactionVersion2 = exports.ETransactionVersion2 = {
55
+ V0: "0x0",
56
+ V1: "0x1",
57
+ V2: "0x2",
58
+ F0: "0x100000000000000000000000000000000",
59
+ F1: "0x100000000000000000000000000000001",
60
+ F2: "0x100000000000000000000000000000002"
61
+ };
62
+ const ETransactionVersion3 = exports.ETransactionVersion3 = {
63
+ V3: "0x3",
64
+ F3: "0x100000000000000000000000000000003"
65
+ };
@@ -0,0 +1,147 @@
1
+ /**
2
+ * Types that are not in spec but required for UX
3
+ */
4
+ import { ADDRESS, BLOCK_HASH, BLOCK_NUMBER, BLOCK_WITH_TXS, BLOCK_WITH_TX_HASHES, BROADCASTED_TXN, CHAIN_ID, CONTRACT_CLASS, CONTRACT_STORAGE_DIFF_ITEM, DEPRECATED_CONTRACT_CLASS, EMITTED_EVENT, EVENT, EVENTS_CHUNK, EVENT_FILTER, FEE_ESTIMATE, FEE_PAYMENT, FELT, MSG_FROM_L1, NONCE_UPDATE, PENDING_BLOCK_WITH_TXS, PENDING_BLOCK_WITH_TX_HASHES, PENDING_STATE_UPDATE, PENDING_TXN_RECEIPT, PRICE_UNIT, REPLACED_CLASS, RESOURCE_BOUNDS_MAPPING, RESULT_PAGE_REQUEST, SIMULATION_FLAG, STATE_UPDATE, SYNC_STATUS, TRANSACTION_TRACE, TXN, TXN_EXECUTION_STATUS, TXN_HASH, TXN_RECEIPT, TXN_STATUS } from './components';
5
+ import { ValuesType } from '../../helpers/valuesType';
6
+ export type ContractClass = CONTRACT_CLASS | DEPRECATED_CONTRACT_CLASS;
7
+ export type SimulateTransaction = {
8
+ transaction_trace: TRANSACTION_TRACE;
9
+ fee_estimation: FEE_ESTIMATE;
10
+ };
11
+ export type SimulateTransactionResponse = SimulateTransaction[];
12
+ export type FeeEstimate = FEE_ESTIMATE;
13
+ export type TransactionWithHash = TXN & {
14
+ transaction_hash: TXN_HASH;
15
+ };
16
+ export type BlockHashAndNumber = {
17
+ block_hash: BLOCK_HASH;
18
+ block_number: BLOCK_NUMBER;
19
+ };
20
+ export type BlockWithTxs = BLOCK_WITH_TXS | PENDING_BLOCK_WITH_TXS;
21
+ export type BlockWithTxHashes = BLOCK_WITH_TX_HASHES | PENDING_BLOCK_WITH_TX_HASHES;
22
+ export type StateUpdate = STATE_UPDATE | PENDING_STATE_UPDATE;
23
+ export type BlockTransactionsTraces = {
24
+ transaction_hash: FELT;
25
+ trace_root: TRANSACTION_TRACE;
26
+ }[];
27
+ export type Syncing = false | SYNC_STATUS;
28
+ export type Events = EVENTS_CHUNK;
29
+ export type EmittedEvent = EMITTED_EVENT;
30
+ export type Event = EVENT;
31
+ export type InvokedTransaction = {
32
+ transaction_hash: TXN_HASH;
33
+ };
34
+ export type DeclaredTransaction = {
35
+ transaction_hash: TXN_HASH;
36
+ class_hash: FELT;
37
+ };
38
+ export type DeployedAccountTransaction = {
39
+ transaction_hash: TXN_HASH;
40
+ contract_address: FELT;
41
+ };
42
+ export type ContractAddress = ADDRESS;
43
+ export type Felt = FELT;
44
+ export type Nonce = FELT;
45
+ export type TransactionHash = TXN_HASH;
46
+ export type TransactionTrace = TRANSACTION_TRACE;
47
+ export type BlockHash = BLOCK_HASH;
48
+ export type TransactionReceipt = TXN_RECEIPT | PENDING_TXN_RECEIPT;
49
+ export type Receipt = TXN_RECEIPT;
50
+ export type PendingReceipt = PENDING_TXN_RECEIPT;
51
+ export type EventFilter = EVENT_FILTER & RESULT_PAGE_REQUEST;
52
+ export type SimulationFlags = Array<SIMULATION_FLAG>;
53
+ export type L1Message = MSG_FROM_L1;
54
+ export type BaseTransaction = BROADCASTED_TXN;
55
+ export type ChainId = CHAIN_ID;
56
+ export type Transaction = TXN;
57
+ export type TransactionStatus = {
58
+ finality_status: TXN_STATUS;
59
+ execution_status?: TXN_EXECUTION_STATUS;
60
+ };
61
+ export type ResourceBounds = RESOURCE_BOUNDS_MAPPING;
62
+ export type FeePayment = FEE_PAYMENT;
63
+ export type PriceUnit = PRICE_UNIT;
64
+ export type StorageDiffs = Array<CONTRACT_STORAGE_DIFF_ITEM>;
65
+ export type DeprecatedDeclaredClasses = Array<FELT>;
66
+ export type NonceUpdates = NONCE_UPDATE[];
67
+ export type ReplacedClasses = REPLACED_CLASS[];
68
+ export declare const ETransactionType: {
69
+ readonly DECLARE: "DECLARE";
70
+ readonly DEPLOY: "DEPLOY";
71
+ readonly DEPLOY_ACCOUNT: "DEPLOY_ACCOUNT";
72
+ readonly INVOKE: "INVOKE";
73
+ readonly L1_HANDLER: "L1_HANDLER";
74
+ };
75
+ export type ETransactionType = ValuesType<typeof ETransactionType>;
76
+ export declare const ESimulationFlag: {
77
+ readonly SKIP_VALIDATE: "SKIP_VALIDATE";
78
+ readonly SKIP_FEE_CHARGE: "SKIP_FEE_CHARGE";
79
+ };
80
+ export type ESimulationFlag = ValuesType<typeof ESimulationFlag>;
81
+ export declare const ETransactionStatus: {
82
+ readonly RECEIVED: "RECEIVED";
83
+ readonly REJECTED: "REJECTED";
84
+ readonly ACCEPTED_ON_L2: "ACCEPTED_ON_L2";
85
+ readonly ACCEPTED_ON_L1: "ACCEPTED_ON_L1";
86
+ };
87
+ export type ETransactionStatus = ValuesType<typeof ETransactionStatus>;
88
+ export declare const ETransactionFinalityStatus: {
89
+ readonly ACCEPTED_ON_L2: "ACCEPTED_ON_L2";
90
+ readonly ACCEPTED_ON_L1: "ACCEPTED_ON_L1";
91
+ };
92
+ export type ETransactionFinalityStatus = ValuesType<typeof ETransactionFinalityStatus>;
93
+ export declare const ETransactionExecutionStatus: {
94
+ readonly SUCCEEDED: "SUCCEEDED";
95
+ readonly REVERTED: "REVERTED";
96
+ };
97
+ export type ETransactionExecutionStatus = ValuesType<typeof ETransactionExecutionStatus>;
98
+ export declare const EBlockTag: {
99
+ readonly PENDING: "pending";
100
+ readonly LATEST: "latest";
101
+ };
102
+ export type EBlockTag = ValuesType<typeof EBlockTag>;
103
+ export declare const EDataAvailabilityMode: {
104
+ readonly L1: "L1";
105
+ readonly L2: "L2";
106
+ };
107
+ export type EDataAvailabilityMode = ValuesType<typeof EDataAvailabilityMode>;
108
+ export declare const EDAMode: {
109
+ readonly L1: 0;
110
+ readonly L2: 1;
111
+ };
112
+ export type EDAMode = ValuesType<typeof EDAMode>;
113
+ /**
114
+ * V_ Transaction versions HexString
115
+ * F_ Fee Transaction Versions HexString (2 ** 128 + TRANSACTION_VERSION)
116
+ */
117
+ export declare const ETransactionVersion: {
118
+ readonly V0: "0x0";
119
+ readonly V1: "0x1";
120
+ readonly V2: "0x2";
121
+ readonly V3: "0x3";
122
+ readonly F0: "0x100000000000000000000000000000000";
123
+ readonly F1: "0x100000000000000000000000000000001";
124
+ readonly F2: "0x100000000000000000000000000000002";
125
+ readonly F3: "0x100000000000000000000000000000003";
126
+ };
127
+ export type ETransactionVersion = ValuesType<typeof ETransactionVersion>;
128
+ /**
129
+ * Old Transaction Versions
130
+ */
131
+ export declare const ETransactionVersion2: {
132
+ readonly V0: "0x0";
133
+ readonly V1: "0x1";
134
+ readonly V2: "0x2";
135
+ readonly F0: "0x100000000000000000000000000000000";
136
+ readonly F1: "0x100000000000000000000000000000001";
137
+ readonly F2: "0x100000000000000000000000000000002";
138
+ };
139
+ export type ETransactionVersion2 = ValuesType<typeof ETransactionVersion2>;
140
+ /**
141
+ * V3 Transaction Versions
142
+ */
143
+ export declare const ETransactionVersion3: {
144
+ readonly V3: "0x3";
145
+ readonly F3: "0x100000000000000000000000000000003";
146
+ };
147
+ export type ETransactionVersion3 = ValuesType<typeof ETransactionVersion3>;
@@ -0,0 +1,59 @@
1
+ export const ETransactionType = {
2
+ DECLARE: "DECLARE",
3
+ DEPLOY: "DEPLOY",
4
+ DEPLOY_ACCOUNT: "DEPLOY_ACCOUNT",
5
+ INVOKE: "INVOKE",
6
+ L1_HANDLER: "L1_HANDLER"
7
+ };
8
+ export const ESimulationFlag = {
9
+ SKIP_VALIDATE: "SKIP_VALIDATE",
10
+ SKIP_FEE_CHARGE: "SKIP_FEE_CHARGE"
11
+ };
12
+ export const ETransactionStatus = {
13
+ RECEIVED: "RECEIVED",
14
+ REJECTED: "REJECTED",
15
+ ACCEPTED_ON_L2: "ACCEPTED_ON_L2",
16
+ ACCEPTED_ON_L1: "ACCEPTED_ON_L1"
17
+ };
18
+ export const ETransactionFinalityStatus = {
19
+ ACCEPTED_ON_L2: "ACCEPTED_ON_L2",
20
+ ACCEPTED_ON_L1: "ACCEPTED_ON_L1"
21
+ };
22
+ export const ETransactionExecutionStatus = {
23
+ SUCCEEDED: "SUCCEEDED",
24
+ REVERTED: "REVERTED"
25
+ };
26
+ export const EBlockTag = {
27
+ PENDING: "pending",
28
+ LATEST: "latest"
29
+ };
30
+ export const EDataAvailabilityMode = {
31
+ L1: "L1",
32
+ L2: "L2"
33
+ };
34
+ export const EDAMode = {
35
+ L1: 0,
36
+ L2: 1
37
+ };
38
+ export const ETransactionVersion = {
39
+ V0: "0x0",
40
+ V1: "0x1",
41
+ V2: "0x2",
42
+ V3: "0x3",
43
+ F0: "0x100000000000000000000000000000000",
44
+ F1: "0x100000000000000000000000000000001",
45
+ F2: "0x100000000000000000000000000000002",
46
+ F3: "0x100000000000000000000000000000003"
47
+ };
48
+ export const ETransactionVersion2 = {
49
+ V0: "0x0",
50
+ V1: "0x1",
51
+ V2: "0x2",
52
+ F0: "0x100000000000000000000000000000000",
53
+ F1: "0x100000000000000000000000000000001",
54
+ F2: "0x100000000000000000000000000000002"
55
+ };
56
+ export const ETransactionVersion3 = {
57
+ V3: "0x3",
58
+ F3: "0x100000000000000000000000000000003"
59
+ };
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,2 @@
1
+ import { CairoCustomEnum, CairoOption, CairoResult } from '../utils/calldata/enum';
2
+ export type CairoEnum = CairoCustomEnum | CairoOption<any> | CairoResult<any, any>;
File without changes