@fatsolutions/privacy-pools-core-starknet-sdk 0.0.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 (81) hide show
  1. package/dist/abis/ERC20.abi.d.ts +404 -0
  2. package/dist/abis/ERC20.abi.js +553 -0
  3. package/dist/abis/ERC20.abi.js.map +1 -0
  4. package/dist/abis/EntryPoint.abi.d.ts +667 -0
  5. package/dist/abis/EntryPoint.abi.js +898 -0
  6. package/dist/abis/EntryPoint.abi.js.map +1 -0
  7. package/dist/abis/PrivacyPool.abi.d.ts +388 -0
  8. package/dist/abis/PrivacyPool.abi.js +530 -0
  9. package/dist/abis/PrivacyPool.abi.js.map +1 -0
  10. package/dist/abis/index.d.ts +2 -0
  11. package/dist/abis/index.js +8 -0
  12. package/dist/abis/index.js.map +1 -0
  13. package/dist/constants.d.ts +2 -0
  14. package/dist/constants.js +6 -0
  15. package/dist/constants.js.map +1 -0
  16. package/dist/contracts/contracts.service.d.ts +286 -0
  17. package/dist/contracts/contracts.service.js +205 -0
  18. package/dist/contracts/contracts.service.js.map +1 -0
  19. package/dist/contracts/index.d.ts +2 -0
  20. package/dist/contracts/index.js +19 -0
  21. package/dist/contracts/index.js.map +1 -0
  22. package/dist/contracts/transactionHandler.d.ts +3 -0
  23. package/dist/contracts/transactionHandler.js +27 -0
  24. package/dist/contracts/transactionHandler.js.map +1 -0
  25. package/dist/data.service.d.ts +44 -0
  26. package/dist/data.service.js +166 -0
  27. package/dist/data.service.js.map +1 -0
  28. package/dist/errors/contracts.errors.d.ts +27 -0
  29. package/dist/errors/contracts.errors.js +39 -0
  30. package/dist/errors/contracts.errors.js.map +1 -0
  31. package/dist/errors/index.d.ts +31 -0
  32. package/dist/errors/index.js +61 -0
  33. package/dist/errors/index.js.map +1 -0
  34. package/dist/garaga.d.ts +2 -0
  35. package/dist/garaga.js +52 -0
  36. package/dist/garaga.js.map +1 -0
  37. package/dist/index.d.ts +14 -0
  38. package/dist/index.js +47 -0
  39. package/dist/index.js.map +1 -0
  40. package/dist/sdk.d.ts +17 -0
  41. package/dist/sdk.js +35 -0
  42. package/dist/sdk.js.map +1 -0
  43. package/dist/types/conversions.d.ts +6 -0
  44. package/dist/types/conversions.js +52 -0
  45. package/dist/types/conversions.js.map +1 -0
  46. package/dist/types/entrypoint.d.ts +12 -0
  47. package/dist/types/entrypoint.js +15 -0
  48. package/dist/types/entrypoint.js.map +1 -0
  49. package/dist/types/garaga.d.ts +26 -0
  50. package/dist/types/garaga.js +3 -0
  51. package/dist/types/garaga.js.map +1 -0
  52. package/dist/types/index.d.ts +4 -0
  53. package/dist/types/index.js +21 -0
  54. package/dist/types/index.js.map +1 -0
  55. package/dist/types/snarkjs.d.ts +51 -0
  56. package/dist/types/snarkjs.js +3 -0
  57. package/dist/types/snarkjs.js.map +1 -0
  58. package/dist/utils.d.ts +10 -0
  59. package/dist/utils.js +49 -0
  60. package/dist/utils.js.map +1 -0
  61. package/package.json +44 -0
  62. package/src/abis/ERC20.abi.ts +549 -0
  63. package/src/abis/EntryPoint.abi.ts +894 -0
  64. package/src/abis/PrivacyPool.abi.ts +526 -0
  65. package/src/abis/index.ts +2 -0
  66. package/src/constants.ts +2 -0
  67. package/src/contracts/contracts.service.ts +415 -0
  68. package/src/contracts/index.ts +2 -0
  69. package/src/contracts/transactionHandler.ts +32 -0
  70. package/src/data.service.ts +218 -0
  71. package/src/errors/contracts.errors.ts +35 -0
  72. package/src/errors/index.ts +69 -0
  73. package/src/garaga.ts +20 -0
  74. package/src/index.ts +46 -0
  75. package/src/sdk.ts +44 -0
  76. package/src/types/conversions.ts +59 -0
  77. package/src/types/entrypoint.ts +23 -0
  78. package/src/types/garaga.ts +29 -0
  79. package/src/types/index.ts +4 -0
  80. package/src/types/snarkjs.ts +26 -0
  81. package/src/utils.ts +49 -0
@@ -0,0 +1,549 @@
1
+ export const ERC20ABI = [
2
+ {
3
+ "type": "struct",
4
+ "name": "core::integer::u256",
5
+ "members": [
6
+ {
7
+ "name": "low",
8
+ "type": "core::integer::u128"
9
+ },
10
+ {
11
+ "name": "high",
12
+ "type": "core::integer::u128"
13
+ }
14
+ ]
15
+ },
16
+ {
17
+ "type": "function",
18
+ "name": "burn",
19
+ "inputs": [
20
+ {
21
+ "name": "value",
22
+ "type": "core::integer::u256"
23
+ }
24
+ ],
25
+ "outputs": [],
26
+ "state_mutability": "external"
27
+ },
28
+ {
29
+ "type": "function",
30
+ "name": "mint",
31
+ "inputs": [
32
+ {
33
+ "name": "recipient",
34
+ "type": "core::starknet::contract_address::ContractAddress"
35
+ },
36
+ {
37
+ "name": "amount",
38
+ "type": "core::integer::u256"
39
+ }
40
+ ],
41
+ "outputs": [],
42
+ "state_mutability": "external"
43
+ },
44
+ {
45
+ "type": "impl",
46
+ "name": "UpgradeableImpl",
47
+ "interface_name": "openzeppelin_upgrades::interface::IUpgradeable"
48
+ },
49
+ {
50
+ "type": "interface",
51
+ "name": "openzeppelin_upgrades::interface::IUpgradeable",
52
+ "items": [
53
+ {
54
+ "type": "function",
55
+ "name": "upgrade",
56
+ "inputs": [
57
+ {
58
+ "name": "new_class_hash",
59
+ "type": "core::starknet::class_hash::ClassHash"
60
+ }
61
+ ],
62
+ "outputs": [],
63
+ "state_mutability": "external"
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ "type": "impl",
69
+ "name": "ERC20MixinImpl",
70
+ "interface_name": "openzeppelin_token::erc20::interface::IERC20Mixin"
71
+ },
72
+ {
73
+ "type": "enum",
74
+ "name": "core::bool",
75
+ "variants": [
76
+ {
77
+ "name": "False",
78
+ "type": "()"
79
+ },
80
+ {
81
+ "name": "True",
82
+ "type": "()"
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ "type": "struct",
88
+ "name": "core::byte_array::ByteArray",
89
+ "members": [
90
+ {
91
+ "name": "data",
92
+ "type": "core::array::Array::<core::bytes_31::bytes31>"
93
+ },
94
+ {
95
+ "name": "pending_word",
96
+ "type": "core::felt252"
97
+ },
98
+ {
99
+ "name": "pending_word_len",
100
+ "type": "core::integer::u32"
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ "type": "interface",
106
+ "name": "openzeppelin_token::erc20::interface::IERC20Mixin",
107
+ "items": [
108
+ {
109
+ "type": "function",
110
+ "name": "total_supply",
111
+ "inputs": [],
112
+ "outputs": [
113
+ {
114
+ "type": "core::integer::u256"
115
+ }
116
+ ],
117
+ "state_mutability": "view"
118
+ },
119
+ {
120
+ "type": "function",
121
+ "name": "balance_of",
122
+ "inputs": [
123
+ {
124
+ "name": "account",
125
+ "type": "core::starknet::contract_address::ContractAddress"
126
+ }
127
+ ],
128
+ "outputs": [
129
+ {
130
+ "type": "core::integer::u256"
131
+ }
132
+ ],
133
+ "state_mutability": "view"
134
+ },
135
+ {
136
+ "type": "function",
137
+ "name": "allowance",
138
+ "inputs": [
139
+ {
140
+ "name": "owner",
141
+ "type": "core::starknet::contract_address::ContractAddress"
142
+ },
143
+ {
144
+ "name": "spender",
145
+ "type": "core::starknet::contract_address::ContractAddress"
146
+ }
147
+ ],
148
+ "outputs": [
149
+ {
150
+ "type": "core::integer::u256"
151
+ }
152
+ ],
153
+ "state_mutability": "view"
154
+ },
155
+ {
156
+ "type": "function",
157
+ "name": "transfer",
158
+ "inputs": [
159
+ {
160
+ "name": "recipient",
161
+ "type": "core::starknet::contract_address::ContractAddress"
162
+ },
163
+ {
164
+ "name": "amount",
165
+ "type": "core::integer::u256"
166
+ }
167
+ ],
168
+ "outputs": [
169
+ {
170
+ "type": "core::bool"
171
+ }
172
+ ],
173
+ "state_mutability": "external"
174
+ },
175
+ {
176
+ "type": "function",
177
+ "name": "transfer_from",
178
+ "inputs": [
179
+ {
180
+ "name": "sender",
181
+ "type": "core::starknet::contract_address::ContractAddress"
182
+ },
183
+ {
184
+ "name": "recipient",
185
+ "type": "core::starknet::contract_address::ContractAddress"
186
+ },
187
+ {
188
+ "name": "amount",
189
+ "type": "core::integer::u256"
190
+ }
191
+ ],
192
+ "outputs": [
193
+ {
194
+ "type": "core::bool"
195
+ }
196
+ ],
197
+ "state_mutability": "external"
198
+ },
199
+ {
200
+ "type": "function",
201
+ "name": "approve",
202
+ "inputs": [
203
+ {
204
+ "name": "spender",
205
+ "type": "core::starknet::contract_address::ContractAddress"
206
+ },
207
+ {
208
+ "name": "amount",
209
+ "type": "core::integer::u256"
210
+ }
211
+ ],
212
+ "outputs": [
213
+ {
214
+ "type": "core::bool"
215
+ }
216
+ ],
217
+ "state_mutability": "external"
218
+ },
219
+ {
220
+ "type": "function",
221
+ "name": "name",
222
+ "inputs": [],
223
+ "outputs": [
224
+ {
225
+ "type": "core::byte_array::ByteArray"
226
+ }
227
+ ],
228
+ "state_mutability": "view"
229
+ },
230
+ {
231
+ "type": "function",
232
+ "name": "symbol",
233
+ "inputs": [],
234
+ "outputs": [
235
+ {
236
+ "type": "core::byte_array::ByteArray"
237
+ }
238
+ ],
239
+ "state_mutability": "view"
240
+ },
241
+ {
242
+ "type": "function",
243
+ "name": "decimals",
244
+ "inputs": [],
245
+ "outputs": [
246
+ {
247
+ "type": "core::integer::u8"
248
+ }
249
+ ],
250
+ "state_mutability": "view"
251
+ },
252
+ {
253
+ "type": "function",
254
+ "name": "totalSupply",
255
+ "inputs": [],
256
+ "outputs": [
257
+ {
258
+ "type": "core::integer::u256"
259
+ }
260
+ ],
261
+ "state_mutability": "view"
262
+ },
263
+ {
264
+ "type": "function",
265
+ "name": "balanceOf",
266
+ "inputs": [
267
+ {
268
+ "name": "account",
269
+ "type": "core::starknet::contract_address::ContractAddress"
270
+ }
271
+ ],
272
+ "outputs": [
273
+ {
274
+ "type": "core::integer::u256"
275
+ }
276
+ ],
277
+ "state_mutability": "view"
278
+ },
279
+ {
280
+ "type": "function",
281
+ "name": "transferFrom",
282
+ "inputs": [
283
+ {
284
+ "name": "sender",
285
+ "type": "core::starknet::contract_address::ContractAddress"
286
+ },
287
+ {
288
+ "name": "recipient",
289
+ "type": "core::starknet::contract_address::ContractAddress"
290
+ },
291
+ {
292
+ "name": "amount",
293
+ "type": "core::integer::u256"
294
+ }
295
+ ],
296
+ "outputs": [
297
+ {
298
+ "type": "core::bool"
299
+ }
300
+ ],
301
+ "state_mutability": "external"
302
+ }
303
+ ]
304
+ },
305
+ {
306
+ "type": "impl",
307
+ "name": "OwnableMixinImpl",
308
+ "interface_name": "openzeppelin_access::ownable::interface::OwnableABI"
309
+ },
310
+ {
311
+ "type": "interface",
312
+ "name": "openzeppelin_access::ownable::interface::OwnableABI",
313
+ "items": [
314
+ {
315
+ "type": "function",
316
+ "name": "owner",
317
+ "inputs": [],
318
+ "outputs": [
319
+ {
320
+ "type": "core::starknet::contract_address::ContractAddress"
321
+ }
322
+ ],
323
+ "state_mutability": "view"
324
+ },
325
+ {
326
+ "type": "function",
327
+ "name": "transfer_ownership",
328
+ "inputs": [
329
+ {
330
+ "name": "new_owner",
331
+ "type": "core::starknet::contract_address::ContractAddress"
332
+ }
333
+ ],
334
+ "outputs": [],
335
+ "state_mutability": "external"
336
+ },
337
+ {
338
+ "type": "function",
339
+ "name": "renounce_ownership",
340
+ "inputs": [],
341
+ "outputs": [],
342
+ "state_mutability": "external"
343
+ },
344
+ {
345
+ "type": "function",
346
+ "name": "transferOwnership",
347
+ "inputs": [
348
+ {
349
+ "name": "newOwner",
350
+ "type": "core::starknet::contract_address::ContractAddress"
351
+ }
352
+ ],
353
+ "outputs": [],
354
+ "state_mutability": "external"
355
+ },
356
+ {
357
+ "type": "function",
358
+ "name": "renounceOwnership",
359
+ "inputs": [],
360
+ "outputs": [],
361
+ "state_mutability": "external"
362
+ }
363
+ ]
364
+ },
365
+ {
366
+ "type": "constructor",
367
+ "name": "constructor",
368
+ "inputs": [
369
+ {
370
+ "name": "name",
371
+ "type": "core::byte_array::ByteArray"
372
+ },
373
+ {
374
+ "name": "symbol",
375
+ "type": "core::byte_array::ByteArray"
376
+ },
377
+ {
378
+ "name": "amount",
379
+ "type": "core::integer::u256"
380
+ },
381
+ {
382
+ "name": "recipient",
383
+ "type": "core::starknet::contract_address::ContractAddress"
384
+ },
385
+ {
386
+ "name": "owner",
387
+ "type": "core::starknet::contract_address::ContractAddress"
388
+ }
389
+ ]
390
+ },
391
+ {
392
+ "type": "event",
393
+ "name": "openzeppelin_token::erc20::erc20::ERC20Component::Transfer",
394
+ "kind": "struct",
395
+ "members": [
396
+ {
397
+ "name": "from",
398
+ "type": "core::starknet::contract_address::ContractAddress",
399
+ "kind": "key"
400
+ },
401
+ {
402
+ "name": "to",
403
+ "type": "core::starknet::contract_address::ContractAddress",
404
+ "kind": "key"
405
+ },
406
+ {
407
+ "name": "value",
408
+ "type": "core::integer::u256",
409
+ "kind": "data"
410
+ }
411
+ ]
412
+ },
413
+ {
414
+ "type": "event",
415
+ "name": "openzeppelin_token::erc20::erc20::ERC20Component::Approval",
416
+ "kind": "struct",
417
+ "members": [
418
+ {
419
+ "name": "owner",
420
+ "type": "core::starknet::contract_address::ContractAddress",
421
+ "kind": "key"
422
+ },
423
+ {
424
+ "name": "spender",
425
+ "type": "core::starknet::contract_address::ContractAddress",
426
+ "kind": "key"
427
+ },
428
+ {
429
+ "name": "value",
430
+ "type": "core::integer::u256",
431
+ "kind": "data"
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ "type": "event",
437
+ "name": "openzeppelin_token::erc20::erc20::ERC20Component::Event",
438
+ "kind": "enum",
439
+ "variants": [
440
+ {
441
+ "name": "Transfer",
442
+ "type": "openzeppelin_token::erc20::erc20::ERC20Component::Transfer",
443
+ "kind": "nested"
444
+ },
445
+ {
446
+ "name": "Approval",
447
+ "type": "openzeppelin_token::erc20::erc20::ERC20Component::Approval",
448
+ "kind": "nested"
449
+ }
450
+ ]
451
+ },
452
+ {
453
+ "type": "event",
454
+ "name": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
455
+ "kind": "struct",
456
+ "members": [
457
+ {
458
+ "name": "previous_owner",
459
+ "type": "core::starknet::contract_address::ContractAddress",
460
+ "kind": "key"
461
+ },
462
+ {
463
+ "name": "new_owner",
464
+ "type": "core::starknet::contract_address::ContractAddress",
465
+ "kind": "key"
466
+ }
467
+ ]
468
+ },
469
+ {
470
+ "type": "event",
471
+ "name": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
472
+ "kind": "struct",
473
+ "members": [
474
+ {
475
+ "name": "previous_owner",
476
+ "type": "core::starknet::contract_address::ContractAddress",
477
+ "kind": "key"
478
+ },
479
+ {
480
+ "name": "new_owner",
481
+ "type": "core::starknet::contract_address::ContractAddress",
482
+ "kind": "key"
483
+ }
484
+ ]
485
+ },
486
+ {
487
+ "type": "event",
488
+ "name": "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
489
+ "kind": "enum",
490
+ "variants": [
491
+ {
492
+ "name": "OwnershipTransferred",
493
+ "type": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
494
+ "kind": "nested"
495
+ },
496
+ {
497
+ "name": "OwnershipTransferStarted",
498
+ "type": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
499
+ "kind": "nested"
500
+ }
501
+ ]
502
+ },
503
+ {
504
+ "type": "event",
505
+ "name": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Upgraded",
506
+ "kind": "struct",
507
+ "members": [
508
+ {
509
+ "name": "class_hash",
510
+ "type": "core::starknet::class_hash::ClassHash",
511
+ "kind": "data"
512
+ }
513
+ ]
514
+ },
515
+ {
516
+ "type": "event",
517
+ "name": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Event",
518
+ "kind": "enum",
519
+ "variants": [
520
+ {
521
+ "name": "Upgraded",
522
+ "type": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Upgraded",
523
+ "kind": "nested"
524
+ }
525
+ ]
526
+ },
527
+ {
528
+ "type": "event",
529
+ "name": "erc20_oz100::erc20::MyToken::Event",
530
+ "kind": "enum",
531
+ "variants": [
532
+ {
533
+ "name": "ERC20Event",
534
+ "type": "openzeppelin_token::erc20::erc20::ERC20Component::Event",
535
+ "kind": "flat"
536
+ },
537
+ {
538
+ "name": "OwnableEvent",
539
+ "type": "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
540
+ "kind": "flat"
541
+ },
542
+ {
543
+ "name": "UpgradeableEvent",
544
+ "type": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Event",
545
+ "kind": "flat"
546
+ }
547
+ ]
548
+ }
549
+ ] as const;