@mistcash/config 0.2.1 → 0.5.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.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { TypedContractV2 } from 'starknet';
2
2
 
3
- declare const CHAMBER_ADDR_MAINNET = "0x063eab2f19523fc8578c66a3ddf248d72094c65154b6dd7680b6e05a64845277";
3
+ declare const CHAMBER_ADDR_MAINNET: `0x${string}`;
4
4
  declare const CHAMBER_ABI: readonly [{
5
5
  readonly type: "impl";
6
6
  readonly name: "UpgradeableImpl";
@@ -21,7 +21,7 @@ declare const CHAMBER_ABI: readonly [{
21
21
  }, {
22
22
  readonly type: "impl";
23
23
  readonly name: "IChamberImpl";
24
- readonly interface_name: "contracts::multi_asset::IChamber";
24
+ readonly interface_name: "contracts::chamber::IChamber";
25
25
  }, {
26
26
  readonly type: "struct";
27
27
  readonly name: "core::integer::u256";
@@ -34,7 +34,7 @@ declare const CHAMBER_ABI: readonly [{
34
34
  }];
35
35
  }, {
36
36
  readonly type: "struct";
37
- readonly name: "contracts::multi_asset::Asset";
37
+ readonly name: "contracts::chamber::Asset";
38
38
  readonly members: readonly [{
39
39
  readonly name: "amount";
40
40
  readonly type: "core::integer::u256";
@@ -56,9 +56,26 @@ declare const CHAMBER_ABI: readonly [{
56
56
  readonly name: "snapshot";
57
57
  readonly type: "@core::array::Array::<core::felt252>";
58
58
  }];
59
+ }, {
60
+ readonly type: "enum";
61
+ readonly name: "core::bool";
62
+ readonly variants: readonly [{
63
+ readonly name: "False";
64
+ readonly type: "()";
65
+ }, {
66
+ readonly name: "True";
67
+ readonly type: "()";
68
+ }];
69
+ }, {
70
+ readonly type: "struct";
71
+ readonly name: "verifier_contracts::groth16_verifier::IGroth16VerifierBN254Dispatcher";
72
+ readonly members: readonly [{
73
+ readonly name: "contract_address";
74
+ readonly type: "core::starknet::contract_address::ContractAddress";
75
+ }];
59
76
  }, {
60
77
  readonly type: "interface";
61
- readonly name: "contracts::multi_asset::IChamber";
78
+ readonly name: "contracts::chamber::IChamber";
62
79
  readonly items: readonly [{
63
80
  readonly type: "function";
64
81
  readonly name: "deposit";
@@ -67,7 +84,7 @@ declare const CHAMBER_ABI: readonly [{
67
84
  readonly type: "core::integer::u256";
68
85
  }, {
69
86
  readonly name: "asset";
70
- readonly type: "contracts::multi_asset::Asset";
87
+ readonly type: "contracts::chamber::Asset";
71
88
  }];
72
89
  readonly outputs: readonly [];
73
90
  readonly state_mutability: "external";
@@ -82,7 +99,7 @@ declare const CHAMBER_ABI: readonly [{
82
99
  readonly type: "core::starknet::contract_address::ContractAddress";
83
100
  }, {
84
101
  readonly name: "asset";
85
- readonly type: "contracts::multi_asset::Asset";
102
+ readonly type: "contracts::chamber::Asset";
86
103
  }, {
87
104
  readonly name: "proof";
88
105
  readonly type: "core::array::Span::<core::integer::u256>";
@@ -100,7 +117,7 @@ declare const CHAMBER_ABI: readonly [{
100
117
  readonly type: "core::starknet::contract_address::ContractAddress";
101
118
  }, {
102
119
  readonly name: "asset";
103
- readonly type: "contracts::multi_asset::Asset";
120
+ readonly type: "contracts::chamber::Asset";
104
121
  }, {
105
122
  readonly name: "proof";
106
123
  readonly type: "core::array::Span::<core::integer::u256>";
@@ -138,6 +155,76 @@ declare const CHAMBER_ABI: readonly [{
138
155
  readonly type: "core::integer::u256";
139
156
  }];
140
157
  readonly state_mutability: "view";
158
+ }, {
159
+ readonly type: "function";
160
+ readonly name: "merkle_proof";
161
+ readonly inputs: readonly [{
162
+ readonly name: "index";
163
+ readonly type: "core::integer::u32";
164
+ }];
165
+ readonly outputs: readonly [{
166
+ readonly type: "core::array::Span::<core::integer::u256>";
167
+ }];
168
+ readonly state_mutability: "external";
169
+ }, {
170
+ readonly type: "function";
171
+ readonly name: "merkle_leaves";
172
+ readonly inputs: readonly [{
173
+ readonly name: "height";
174
+ readonly type: "core::integer::u32";
175
+ }];
176
+ readonly outputs: readonly [{
177
+ readonly type: "core::array::Array::<core::integer::u256>";
178
+ }];
179
+ readonly state_mutability: "external";
180
+ }, {
181
+ readonly type: "function";
182
+ readonly name: "assets_from_secret";
183
+ readonly inputs: readonly [{
184
+ readonly name: "tx_secret";
185
+ readonly type: "core::integer::u256";
186
+ }];
187
+ readonly outputs: readonly [{
188
+ readonly type: "contracts::chamber::Asset";
189
+ }];
190
+ readonly state_mutability: "view";
191
+ }, {
192
+ readonly type: "function";
193
+ readonly name: "nullifiers_spent";
194
+ readonly inputs: readonly [{
195
+ readonly name: "nullifiers";
196
+ readonly type: "core::array::Array::<core::integer::u256>";
197
+ }];
198
+ readonly outputs: readonly [{
199
+ readonly type: "core::array::Array::<core::bool>";
200
+ }];
201
+ readonly state_mutability: "view";
202
+ }, {
203
+ readonly type: "function";
204
+ readonly name: "transactions_exist";
205
+ readonly inputs: readonly [{
206
+ readonly name: "transactions";
207
+ readonly type: "core::array::Array::<core::integer::u256>";
208
+ }];
209
+ readonly outputs: readonly [{
210
+ readonly type: "core::array::Array::<core::bool>";
211
+ }];
212
+ readonly state_mutability: "view";
213
+ }, {
214
+ readonly type: "function";
215
+ readonly name: "setVerifierAddress";
216
+ readonly inputs: readonly [{
217
+ readonly name: "verifier";
218
+ readonly type: "verifier_contracts::groth16_verifier::IGroth16VerifierBN254Dispatcher";
219
+ }];
220
+ readonly outputs: readonly [];
221
+ readonly state_mutability: "external";
222
+ }, {
223
+ readonly type: "function";
224
+ readonly name: "recalculate_merkle_root";
225
+ readonly inputs: readonly [];
226
+ readonly outputs: readonly [];
227
+ readonly state_mutability: "external";
141
228
  }];
142
229
  }, {
143
230
  readonly type: "impl";
@@ -185,13 +272,6 @@ declare const CHAMBER_ABI: readonly [{
185
272
  readonly outputs: readonly [];
186
273
  readonly state_mutability: "external";
187
274
  }];
188
- }, {
189
- readonly type: "struct";
190
- readonly name: "verifier_contracts::honk_verifier::IUltraStarknetZKHonkVerifierDispatcher";
191
- readonly members: readonly [{
192
- readonly name: "contract_address";
193
- readonly type: "core::starknet::contract_address::ContractAddress";
194
- }];
195
275
  }, {
196
276
  readonly type: "constructor";
197
277
  readonly name: "constructor";
@@ -200,34 +280,8 @@ declare const CHAMBER_ABI: readonly [{
200
280
  readonly type: "core::starknet::contract_address::ContractAddress";
201
281
  }, {
202
282
  readonly name: "verifier";
203
- readonly type: "verifier_contracts::honk_verifier::IUltraStarknetZKHonkVerifierDispatcher";
204
- }];
205
- }, {
206
- readonly type: "function";
207
- readonly name: "read_tx";
208
- readonly inputs: readonly [{
209
- readonly name: "tx_hash";
210
- readonly type: "core::integer::u256";
211
- }];
212
- readonly outputs: readonly [{
213
- readonly type: "contracts::multi_asset::Asset";
214
- }];
215
- readonly state_mutability: "view";
216
- }, {
217
- readonly type: "function";
218
- readonly name: "setVerifierAddress";
219
- readonly inputs: readonly [{
220
- readonly name: "verifier";
221
- readonly type: "verifier_contracts::honk_verifier::IUltraStarknetZKHonkVerifierDispatcher";
283
+ readonly type: "verifier_contracts::groth16_verifier::IGroth16VerifierBN254Dispatcher";
222
284
  }];
223
- readonly outputs: readonly [];
224
- readonly state_mutability: "external";
225
- }, {
226
- readonly type: "function";
227
- readonly name: "recalculate_merkle_root";
228
- readonly inputs: readonly [];
229
- readonly outputs: readonly [];
230
- readonly state_mutability: "external";
231
285
  }, {
232
286
  readonly type: "event";
233
287
  readonly name: "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred";
@@ -287,7 +341,7 @@ declare const CHAMBER_ABI: readonly [{
287
341
  }];
288
342
  }, {
289
343
  readonly type: "event";
290
- readonly name: "contracts::multi_asset::Chamber::Event";
344
+ readonly name: "contracts::chamber::Chamber::Event";
291
345
  readonly kind: "enum";
292
346
  readonly variants: readonly [{
293
347
  readonly name: "OwnableEvent";
@@ -541,139 +595,6 @@ declare const ERC20_ABI: readonly [{
541
595
  }];
542
596
  type ChamberTypedContract = TypedContractV2<typeof CHAMBER_ABI>;
543
597
 
544
- interface Asset {
545
- amount: string;
546
- addr: string;
547
- }
548
- interface WitnessData {
549
- claiming_key: string;
550
- recipient: string;
551
- asset: Asset;
552
- proof: string[];
553
- root: string;
554
- new_tx_secret: string;
555
- new_tx_amount: string;
556
- }
557
- declare const withdrawCircuit: {
558
- noir_version: string;
559
- hash: string;
560
- abi: {
561
- parameters: ({
562
- name: string;
563
- type: {
564
- kind: string;
565
- path?: undefined;
566
- fields?: undefined;
567
- length?: undefined;
568
- type?: undefined;
569
- };
570
- visibility: string;
571
- } | {
572
- name: string;
573
- type: {
574
- kind: string;
575
- path: string;
576
- fields: {
577
- name: string;
578
- type: {
579
- kind: string;
580
- };
581
- }[];
582
- length?: undefined;
583
- type?: undefined;
584
- };
585
- visibility: string;
586
- } | {
587
- name: string;
588
- type: {
589
- kind: string;
590
- length: number;
591
- type: {
592
- kind: string;
593
- };
594
- path?: undefined;
595
- fields?: undefined;
596
- };
597
- visibility: string;
598
- })[];
599
- return_type: {
600
- abi_type: {
601
- kind: string;
602
- path: string;
603
- fields: ({
604
- name: string;
605
- type: {
606
- kind: string;
607
- path?: undefined;
608
- fields?: undefined;
609
- };
610
- } | {
611
- name: string;
612
- type: {
613
- kind: string;
614
- path: string;
615
- fields: {
616
- name: string;
617
- type: {
618
- kind: string;
619
- };
620
- }[];
621
- };
622
- })[];
623
- };
624
- visibility: string;
625
- };
626
- error_types: {
627
- "6447708754588225487": {
628
- error_kind: string;
629
- string: string;
630
- };
631
- "6485997221020871071": {
632
- error_kind: string;
633
- string: string;
634
- };
635
- "15432385079647219375": {
636
- error_kind: string;
637
- string: string;
638
- };
639
- "17843811134343075018": {
640
- error_kind: string;
641
- string: string;
642
- };
643
- };
644
- };
645
- bytecode: string;
646
- debug_symbols: string;
647
- file_map: {
648
- "17": {
649
- source: string;
650
- path: string;
651
- };
652
- "18": {
653
- source: string;
654
- path: string;
655
- };
656
- "50": {
657
- source: string;
658
- path: string;
659
- };
660
- "54": {
661
- source: string;
662
- path: string;
663
- };
664
- "55": {
665
- source: string;
666
- path: string;
667
- };
668
- "56": {
669
- source: string;
670
- path: string;
671
- };
672
- };
673
- names: string[];
674
- brillig_names: string[];
675
- };
676
-
677
598
  interface Token {
678
599
  id: string;
679
600
  name: string;
@@ -687,4 +608,4 @@ declare const tokensMap: {
687
608
  [key: string]: Token;
688
609
  };
689
610
 
690
- export { type Asset, CHAMBER_ABI, CHAMBER_ADDR_MAINNET, type ChamberTypedContract, ERC20_ABI, type Token, type WitnessData, tokensData, tokensMap, withdrawCircuit };
611
+ export { CHAMBER_ABI, CHAMBER_ADDR_MAINNET, type ChamberTypedContract, ERC20_ABI, type Token, tokensData, tokensMap };