veilix-sdk 0.0.1 → 0.0.2

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.js CHANGED
@@ -1781,14 +1781,1783 @@ var veilix_devnet_default = {
1781
1781
  ]
1782
1782
  };
1783
1783
 
1784
+ // src/idl/veilix.json
1785
+ var veilix_default = {
1786
+ address: "5z8MqQhw3sV2npfCgQrtzKrCUi5nmozoawbZnhoBwWwg",
1787
+ metadata: {
1788
+ name: "veilix",
1789
+ version: "0.2.0",
1790
+ spec: "0.1.0",
1791
+ description: "Veilix Contract"
1792
+ },
1793
+ instructions: [
1794
+ {
1795
+ name: "add_pool",
1796
+ discriminator: [
1797
+ 115,
1798
+ 230,
1799
+ 212,
1800
+ 211,
1801
+ 175,
1802
+ 49,
1803
+ 39,
1804
+ 169
1805
+ ],
1806
+ accounts: [
1807
+ {
1808
+ name: "authority",
1809
+ writable: true,
1810
+ signer: true
1811
+ },
1812
+ {
1813
+ name: "network_state",
1814
+ pda: {
1815
+ seeds: [
1816
+ {
1817
+ kind: "const",
1818
+ value: [
1819
+ 99,
1820
+ 111,
1821
+ 110,
1822
+ 102,
1823
+ 105,
1824
+ 103
1825
+ ]
1826
+ }
1827
+ ]
1828
+ }
1829
+ },
1830
+ {
1831
+ name: "pool",
1832
+ writable: true
1833
+ },
1834
+ {
1835
+ name: "system_program",
1836
+ address: "11111111111111111111111111111111"
1837
+ }
1838
+ ],
1839
+ args: [
1840
+ {
1841
+ name: "denomination",
1842
+ type: "u64"
1843
+ },
1844
+ {
1845
+ name: "levels",
1846
+ type: "u32"
1847
+ }
1848
+ ]
1849
+ },
1850
+ {
1851
+ name: "add_token_pool",
1852
+ discriminator: [
1853
+ 114,
1854
+ 143,
1855
+ 210,
1856
+ 73,
1857
+ 96,
1858
+ 115,
1859
+ 1,
1860
+ 228
1861
+ ],
1862
+ accounts: [
1863
+ {
1864
+ name: "authority",
1865
+ writable: true,
1866
+ signer: true
1867
+ },
1868
+ {
1869
+ name: "network_state",
1870
+ pda: {
1871
+ seeds: [
1872
+ {
1873
+ kind: "const",
1874
+ value: [
1875
+ 99,
1876
+ 111,
1877
+ 110,
1878
+ 102,
1879
+ 105,
1880
+ 103
1881
+ ]
1882
+ }
1883
+ ]
1884
+ }
1885
+ },
1886
+ {
1887
+ name: "pool",
1888
+ writable: true
1889
+ },
1890
+ {
1891
+ name: "treasury",
1892
+ pda: {
1893
+ seeds: [
1894
+ {
1895
+ kind: "const",
1896
+ value: [
1897
+ 116,
1898
+ 114,
1899
+ 101,
1900
+ 97,
1901
+ 115,
1902
+ 117,
1903
+ 114,
1904
+ 121
1905
+ ]
1906
+ }
1907
+ ]
1908
+ }
1909
+ },
1910
+ {
1911
+ name: "treasury_ata",
1912
+ writable: true,
1913
+ pda: {
1914
+ seeds: [
1915
+ {
1916
+ kind: "account",
1917
+ path: "treasury"
1918
+ },
1919
+ {
1920
+ kind: "account",
1921
+ path: "token_program"
1922
+ },
1923
+ {
1924
+ kind: "account",
1925
+ path: "mint"
1926
+ }
1927
+ ],
1928
+ program: {
1929
+ kind: "const",
1930
+ value: [
1931
+ 140,
1932
+ 151,
1933
+ 37,
1934
+ 143,
1935
+ 78,
1936
+ 36,
1937
+ 137,
1938
+ 241,
1939
+ 187,
1940
+ 61,
1941
+ 16,
1942
+ 41,
1943
+ 20,
1944
+ 142,
1945
+ 13,
1946
+ 131,
1947
+ 11,
1948
+ 90,
1949
+ 19,
1950
+ 153,
1951
+ 218,
1952
+ 255,
1953
+ 16,
1954
+ 132,
1955
+ 4,
1956
+ 142,
1957
+ 123,
1958
+ 216,
1959
+ 219,
1960
+ 233,
1961
+ 248,
1962
+ 89
1963
+ ]
1964
+ }
1965
+ }
1966
+ },
1967
+ {
1968
+ name: "mint"
1969
+ },
1970
+ {
1971
+ name: "token_program"
1972
+ },
1973
+ {
1974
+ name: "associated_token_program",
1975
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1976
+ },
1977
+ {
1978
+ name: "system_program",
1979
+ address: "11111111111111111111111111111111"
1980
+ }
1981
+ ],
1982
+ args: [
1983
+ {
1984
+ name: "denomination",
1985
+ type: "u64"
1986
+ },
1987
+ {
1988
+ name: "levels",
1989
+ type: "u32"
1990
+ }
1991
+ ]
1992
+ },
1993
+ {
1994
+ name: "backup_notes",
1995
+ discriminator: [
1996
+ 49,
1997
+ 223,
1998
+ 25,
1999
+ 28,
2000
+ 239,
2001
+ 170,
2002
+ 71,
2003
+ 27
2004
+ ],
2005
+ accounts: [
2006
+ {
2007
+ name: "user",
2008
+ writable: true,
2009
+ signer: true
2010
+ },
2011
+ {
2012
+ name: "notes",
2013
+ writable: true,
2014
+ pda: {
2015
+ seeds: [
2016
+ {
2017
+ kind: "const",
2018
+ value: [
2019
+ 110,
2020
+ 111,
2021
+ 116,
2022
+ 101,
2023
+ 115,
2024
+ 95,
2025
+ 118,
2026
+ 50
2027
+ ]
2028
+ },
2029
+ {
2030
+ kind: "account",
2031
+ path: "user"
2032
+ }
2033
+ ]
2034
+ }
2035
+ },
2036
+ {
2037
+ name: "system_program",
2038
+ address: "11111111111111111111111111111111"
2039
+ }
2040
+ ],
2041
+ args: [
2042
+ {
2043
+ name: "encrypted_notes",
2044
+ type: {
2045
+ vec: "bytes"
2046
+ }
2047
+ }
2048
+ ]
2049
+ },
2050
+ {
2051
+ name: "deposit",
2052
+ discriminator: [
2053
+ 242,
2054
+ 35,
2055
+ 198,
2056
+ 137,
2057
+ 82,
2058
+ 225,
2059
+ 242,
2060
+ 182
2061
+ ],
2062
+ accounts: [
2063
+ {
2064
+ name: "sender",
2065
+ writable: true,
2066
+ signer: true
2067
+ },
2068
+ {
2069
+ name: "pool",
2070
+ writable: true
2071
+ },
2072
+ {
2073
+ name: "treasury",
2074
+ writable: true,
2075
+ pda: {
2076
+ seeds: [
2077
+ {
2078
+ kind: "const",
2079
+ value: [
2080
+ 116,
2081
+ 114,
2082
+ 101,
2083
+ 97,
2084
+ 115,
2085
+ 117,
2086
+ 114,
2087
+ 121
2088
+ ]
2089
+ }
2090
+ ]
2091
+ }
2092
+ },
2093
+ {
2094
+ name: "commitment_account",
2095
+ writable: true,
2096
+ pda: {
2097
+ seeds: [
2098
+ {
2099
+ kind: "const",
2100
+ value: [
2101
+ 99,
2102
+ 111,
2103
+ 109,
2104
+ 109,
2105
+ 105,
2106
+ 116,
2107
+ 109,
2108
+ 101,
2109
+ 110,
2110
+ 116
2111
+ ]
2112
+ },
2113
+ {
2114
+ kind: "arg",
2115
+ path: "commitment"
2116
+ }
2117
+ ]
2118
+ }
2119
+ },
2120
+ {
2121
+ name: "queue",
2122
+ address: "A43DyUGA7s8eXPxqEjJY6EBu1KKbNgfxF8h17VAHn13w"
2123
+ },
2124
+ {
2125
+ name: "slot_hashes",
2126
+ address: "SysvarS1otHashes111111111111111111111111111"
2127
+ },
2128
+ {
2129
+ name: "instructions",
2130
+ address: "Sysvar1nstructions1111111111111111111111111"
2131
+ },
2132
+ {
2133
+ name: "system_program",
2134
+ address: "11111111111111111111111111111111"
2135
+ }
2136
+ ],
2137
+ args: [
2138
+ {
2139
+ name: "commitment",
2140
+ type: {
2141
+ array: [
2142
+ "u8",
2143
+ 32
2144
+ ]
2145
+ }
2146
+ }
2147
+ ]
2148
+ },
2149
+ {
2150
+ name: "init_network",
2151
+ discriminator: [
2152
+ 104,
2153
+ 231,
2154
+ 73,
2155
+ 121,
2156
+ 240,
2157
+ 0,
2158
+ 5,
2159
+ 148
2160
+ ],
2161
+ accounts: [
2162
+ {
2163
+ name: "payer",
2164
+ writable: true,
2165
+ signer: true
2166
+ },
2167
+ {
2168
+ name: "network_state",
2169
+ writable: true,
2170
+ pda: {
2171
+ seeds: [
2172
+ {
2173
+ kind: "const",
2174
+ value: [
2175
+ 99,
2176
+ 111,
2177
+ 110,
2178
+ 102,
2179
+ 105,
2180
+ 103
2181
+ ]
2182
+ }
2183
+ ]
2184
+ }
2185
+ },
2186
+ {
2187
+ name: "system_program",
2188
+ address: "11111111111111111111111111111111"
2189
+ }
2190
+ ],
2191
+ args: [
2192
+ {
2193
+ name: "config_authority",
2194
+ type: "pubkey"
2195
+ },
2196
+ {
2197
+ name: "wallets",
2198
+ type: {
2199
+ vec: {
2200
+ defined: {
2201
+ name: "Wallet"
2202
+ }
2203
+ }
2204
+ }
2205
+ }
2206
+ ]
2207
+ },
2208
+ {
2209
+ name: "init_notes",
2210
+ discriminator: [
2211
+ 214,
2212
+ 94,
2213
+ 178,
2214
+ 116,
2215
+ 131,
2216
+ 89,
2217
+ 247,
2218
+ 17
2219
+ ],
2220
+ accounts: [
2221
+ {
2222
+ name: "user",
2223
+ writable: true,
2224
+ signer: true
2225
+ },
2226
+ {
2227
+ name: "notes",
2228
+ writable: true,
2229
+ pda: {
2230
+ seeds: [
2231
+ {
2232
+ kind: "const",
2233
+ value: [
2234
+ 110,
2235
+ 111,
2236
+ 116,
2237
+ 101,
2238
+ 115,
2239
+ 95,
2240
+ 118,
2241
+ 50
2242
+ ]
2243
+ },
2244
+ {
2245
+ kind: "account",
2246
+ path: "user"
2247
+ }
2248
+ ]
2249
+ }
2250
+ },
2251
+ {
2252
+ name: "system_program",
2253
+ address: "11111111111111111111111111111111"
2254
+ }
2255
+ ],
2256
+ args: []
2257
+ },
2258
+ {
2259
+ name: "init_notes_legacy",
2260
+ discriminator: [
2261
+ 36,
2262
+ 80,
2263
+ 253,
2264
+ 226,
2265
+ 249,
2266
+ 248,
2267
+ 7,
2268
+ 20
2269
+ ],
2270
+ accounts: [
2271
+ {
2272
+ name: "user",
2273
+ writable: true,
2274
+ signer: true
2275
+ },
2276
+ {
2277
+ name: "notes",
2278
+ writable: true,
2279
+ pda: {
2280
+ seeds: [
2281
+ {
2282
+ kind: "const",
2283
+ value: [
2284
+ 110,
2285
+ 111,
2286
+ 116,
2287
+ 101,
2288
+ 115
2289
+ ]
2290
+ },
2291
+ {
2292
+ kind: "account",
2293
+ path: "user"
2294
+ }
2295
+ ]
2296
+ }
2297
+ },
2298
+ {
2299
+ name: "system_program",
2300
+ address: "11111111111111111111111111111111"
2301
+ }
2302
+ ],
2303
+ args: []
2304
+ },
2305
+ {
2306
+ name: "token_deposit",
2307
+ discriminator: [
2308
+ 117,
2309
+ 255,
2310
+ 154,
2311
+ 71,
2312
+ 245,
2313
+ 58,
2314
+ 95,
2315
+ 89
2316
+ ],
2317
+ accounts: [
2318
+ {
2319
+ name: "sender",
2320
+ writable: true,
2321
+ signer: true
2322
+ },
2323
+ {
2324
+ name: "sender_ata",
2325
+ writable: true,
2326
+ pda: {
2327
+ seeds: [
2328
+ {
2329
+ kind: "account",
2330
+ path: "sender"
2331
+ },
2332
+ {
2333
+ kind: "account",
2334
+ path: "token_program"
2335
+ },
2336
+ {
2337
+ kind: "account",
2338
+ path: "mint"
2339
+ }
2340
+ ],
2341
+ program: {
2342
+ kind: "const",
2343
+ value: [
2344
+ 140,
2345
+ 151,
2346
+ 37,
2347
+ 143,
2348
+ 78,
2349
+ 36,
2350
+ 137,
2351
+ 241,
2352
+ 187,
2353
+ 61,
2354
+ 16,
2355
+ 41,
2356
+ 20,
2357
+ 142,
2358
+ 13,
2359
+ 131,
2360
+ 11,
2361
+ 90,
2362
+ 19,
2363
+ 153,
2364
+ 218,
2365
+ 255,
2366
+ 16,
2367
+ 132,
2368
+ 4,
2369
+ 142,
2370
+ 123,
2371
+ 216,
2372
+ 219,
2373
+ 233,
2374
+ 248,
2375
+ 89
2376
+ ]
2377
+ }
2378
+ }
2379
+ },
2380
+ {
2381
+ name: "pool",
2382
+ writable: true
2383
+ },
2384
+ {
2385
+ name: "treasury",
2386
+ pda: {
2387
+ seeds: [
2388
+ {
2389
+ kind: "const",
2390
+ value: [
2391
+ 116,
2392
+ 114,
2393
+ 101,
2394
+ 97,
2395
+ 115,
2396
+ 117,
2397
+ 114,
2398
+ 121
2399
+ ]
2400
+ }
2401
+ ]
2402
+ }
2403
+ },
2404
+ {
2405
+ name: "treasury_ata",
2406
+ writable: true,
2407
+ pda: {
2408
+ seeds: [
2409
+ {
2410
+ kind: "account",
2411
+ path: "treasury"
2412
+ },
2413
+ {
2414
+ kind: "account",
2415
+ path: "token_program"
2416
+ },
2417
+ {
2418
+ kind: "account",
2419
+ path: "mint"
2420
+ }
2421
+ ],
2422
+ program: {
2423
+ kind: "const",
2424
+ value: [
2425
+ 140,
2426
+ 151,
2427
+ 37,
2428
+ 143,
2429
+ 78,
2430
+ 36,
2431
+ 137,
2432
+ 241,
2433
+ 187,
2434
+ 61,
2435
+ 16,
2436
+ 41,
2437
+ 20,
2438
+ 142,
2439
+ 13,
2440
+ 131,
2441
+ 11,
2442
+ 90,
2443
+ 19,
2444
+ 153,
2445
+ 218,
2446
+ 255,
2447
+ 16,
2448
+ 132,
2449
+ 4,
2450
+ 142,
2451
+ 123,
2452
+ 216,
2453
+ 219,
2454
+ 233,
2455
+ 248,
2456
+ 89
2457
+ ]
2458
+ }
2459
+ }
2460
+ },
2461
+ {
2462
+ name: "commitment_account",
2463
+ writable: true,
2464
+ pda: {
2465
+ seeds: [
2466
+ {
2467
+ kind: "const",
2468
+ value: [
2469
+ 99,
2470
+ 111,
2471
+ 109,
2472
+ 109,
2473
+ 105,
2474
+ 116,
2475
+ 109,
2476
+ 101,
2477
+ 110,
2478
+ 116
2479
+ ]
2480
+ },
2481
+ {
2482
+ kind: "arg",
2483
+ path: "commitment"
2484
+ }
2485
+ ]
2486
+ }
2487
+ },
2488
+ {
2489
+ name: "queue",
2490
+ address: "A43DyUGA7s8eXPxqEjJY6EBu1KKbNgfxF8h17VAHn13w"
2491
+ },
2492
+ {
2493
+ name: "slot_hashes",
2494
+ address: "SysvarS1otHashes111111111111111111111111111"
2495
+ },
2496
+ {
2497
+ name: "instructions",
2498
+ address: "Sysvar1nstructions1111111111111111111111111"
2499
+ },
2500
+ {
2501
+ name: "mint"
2502
+ },
2503
+ {
2504
+ name: "token_program"
2505
+ },
2506
+ {
2507
+ name: "system_program",
2508
+ address: "11111111111111111111111111111111"
2509
+ }
2510
+ ],
2511
+ args: [
2512
+ {
2513
+ name: "commitment",
2514
+ type: {
2515
+ array: [
2516
+ "u8",
2517
+ 32
2518
+ ]
2519
+ }
2520
+ }
2521
+ ]
2522
+ },
2523
+ {
2524
+ name: "token_withdraw",
2525
+ discriminator: [
2526
+ 63,
2527
+ 223,
2528
+ 42,
2529
+ 59,
2530
+ 15,
2531
+ 128,
2532
+ 102,
2533
+ 66
2534
+ ],
2535
+ accounts: [
2536
+ {
2537
+ name: "relayer",
2538
+ writable: true,
2539
+ signer: true
2540
+ },
2541
+ {
2542
+ name: "relayer_ata",
2543
+ writable: true,
2544
+ pda: {
2545
+ seeds: [
2546
+ {
2547
+ kind: "account",
2548
+ path: "relayer"
2549
+ },
2550
+ {
2551
+ kind: "account",
2552
+ path: "token_program"
2553
+ },
2554
+ {
2555
+ kind: "account",
2556
+ path: "mint"
2557
+ }
2558
+ ],
2559
+ program: {
2560
+ kind: "const",
2561
+ value: [
2562
+ 140,
2563
+ 151,
2564
+ 37,
2565
+ 143,
2566
+ 78,
2567
+ 36,
2568
+ 137,
2569
+ 241,
2570
+ 187,
2571
+ 61,
2572
+ 16,
2573
+ 41,
2574
+ 20,
2575
+ 142,
2576
+ 13,
2577
+ 131,
2578
+ 11,
2579
+ 90,
2580
+ 19,
2581
+ 153,
2582
+ 218,
2583
+ 255,
2584
+ 16,
2585
+ 132,
2586
+ 4,
2587
+ 142,
2588
+ 123,
2589
+ 216,
2590
+ 219,
2591
+ 233,
2592
+ 248,
2593
+ 89
2594
+ ]
2595
+ }
2596
+ }
2597
+ },
2598
+ {
2599
+ name: "pool"
2600
+ },
2601
+ {
2602
+ name: "treasury",
2603
+ pda: {
2604
+ seeds: [
2605
+ {
2606
+ kind: "const",
2607
+ value: [
2608
+ 116,
2609
+ 114,
2610
+ 101,
2611
+ 97,
2612
+ 115,
2613
+ 117,
2614
+ 114,
2615
+ 121
2616
+ ]
2617
+ }
2618
+ ]
2619
+ }
2620
+ },
2621
+ {
2622
+ name: "treasury_ata",
2623
+ writable: true,
2624
+ pda: {
2625
+ seeds: [
2626
+ {
2627
+ kind: "account",
2628
+ path: "treasury"
2629
+ },
2630
+ {
2631
+ kind: "account",
2632
+ path: "token_program"
2633
+ },
2634
+ {
2635
+ kind: "account",
2636
+ path: "mint"
2637
+ }
2638
+ ],
2639
+ program: {
2640
+ kind: "const",
2641
+ value: [
2642
+ 140,
2643
+ 151,
2644
+ 37,
2645
+ 143,
2646
+ 78,
2647
+ 36,
2648
+ 137,
2649
+ 241,
2650
+ 187,
2651
+ 61,
2652
+ 16,
2653
+ 41,
2654
+ 20,
2655
+ 142,
2656
+ 13,
2657
+ 131,
2658
+ 11,
2659
+ 90,
2660
+ 19,
2661
+ 153,
2662
+ 218,
2663
+ 255,
2664
+ 16,
2665
+ 132,
2666
+ 4,
2667
+ 142,
2668
+ 123,
2669
+ 216,
2670
+ 219,
2671
+ 233,
2672
+ 248,
2673
+ 89
2674
+ ]
2675
+ }
2676
+ }
2677
+ },
2678
+ {
2679
+ name: "recipient"
2680
+ },
2681
+ {
2682
+ name: "recipient_ata",
2683
+ writable: true,
2684
+ pda: {
2685
+ seeds: [
2686
+ {
2687
+ kind: "account",
2688
+ path: "recipient"
2689
+ },
2690
+ {
2691
+ kind: "account",
2692
+ path: "token_program"
2693
+ },
2694
+ {
2695
+ kind: "account",
2696
+ path: "mint"
2697
+ }
2698
+ ],
2699
+ program: {
2700
+ kind: "const",
2701
+ value: [
2702
+ 140,
2703
+ 151,
2704
+ 37,
2705
+ 143,
2706
+ 78,
2707
+ 36,
2708
+ 137,
2709
+ 241,
2710
+ 187,
2711
+ 61,
2712
+ 16,
2713
+ 41,
2714
+ 20,
2715
+ 142,
2716
+ 13,
2717
+ 131,
2718
+ 11,
2719
+ 90,
2720
+ 19,
2721
+ 153,
2722
+ 218,
2723
+ 255,
2724
+ 16,
2725
+ 132,
2726
+ 4,
2727
+ 142,
2728
+ 123,
2729
+ 216,
2730
+ 219,
2731
+ 233,
2732
+ 248,
2733
+ 89
2734
+ ]
2735
+ }
2736
+ }
2737
+ },
2738
+ {
2739
+ name: "nullifier_account",
2740
+ writable: true,
2741
+ pda: {
2742
+ seeds: [
2743
+ {
2744
+ kind: "const",
2745
+ value: [
2746
+ 110,
2747
+ 117,
2748
+ 108,
2749
+ 108,
2750
+ 105,
2751
+ 102,
2752
+ 105,
2753
+ 101,
2754
+ 114
2755
+ ]
2756
+ },
2757
+ {
2758
+ kind: "arg",
2759
+ path: "nullifier_hash"
2760
+ }
2761
+ ]
2762
+ }
2763
+ },
2764
+ {
2765
+ name: "network_state",
2766
+ pda: {
2767
+ seeds: [
2768
+ {
2769
+ kind: "const",
2770
+ value: [
2771
+ 99,
2772
+ 111,
2773
+ 110,
2774
+ 102,
2775
+ 105,
2776
+ 103
2777
+ ]
2778
+ }
2779
+ ]
2780
+ }
2781
+ },
2782
+ {
2783
+ name: "mint"
2784
+ },
2785
+ {
2786
+ name: "token_program"
2787
+ },
2788
+ {
2789
+ name: "associated_token_program",
2790
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
2791
+ },
2792
+ {
2793
+ name: "system_program",
2794
+ address: "11111111111111111111111111111111"
2795
+ }
2796
+ ],
2797
+ args: [
2798
+ {
2799
+ name: "proof",
2800
+ type: {
2801
+ array: [
2802
+ "u8",
2803
+ 256
2804
+ ]
2805
+ }
2806
+ },
2807
+ {
2808
+ name: "root",
2809
+ type: {
2810
+ array: [
2811
+ "u8",
2812
+ 32
2813
+ ]
2814
+ }
2815
+ },
2816
+ {
2817
+ name: "nullifier_hash",
2818
+ type: {
2819
+ array: [
2820
+ "u8",
2821
+ 32
2822
+ ]
2823
+ }
2824
+ },
2825
+ {
2826
+ name: "fee",
2827
+ type: "u64"
2828
+ },
2829
+ {
2830
+ name: "refund",
2831
+ type: "u64"
2832
+ }
2833
+ ]
2834
+ },
2835
+ {
2836
+ name: "update_network",
2837
+ discriminator: [
2838
+ 39,
2839
+ 115,
2840
+ 188,
2841
+ 77,
2842
+ 162,
2843
+ 232,
2844
+ 216,
2845
+ 161
2846
+ ],
2847
+ accounts: [
2848
+ {
2849
+ name: "authority",
2850
+ writable: true,
2851
+ signer: true
2852
+ },
2853
+ {
2854
+ name: "network_state",
2855
+ writable: true,
2856
+ pda: {
2857
+ seeds: [
2858
+ {
2859
+ kind: "const",
2860
+ value: [
2861
+ 99,
2862
+ 111,
2863
+ 110,
2864
+ 102,
2865
+ 105,
2866
+ 103
2867
+ ]
2868
+ }
2869
+ ]
2870
+ }
2871
+ },
2872
+ {
2873
+ name: "system_program",
2874
+ address: "11111111111111111111111111111111"
2875
+ }
2876
+ ],
2877
+ args: [
2878
+ {
2879
+ name: "config_authority",
2880
+ type: "pubkey"
2881
+ },
2882
+ {
2883
+ name: "wallets",
2884
+ type: {
2885
+ vec: {
2886
+ defined: {
2887
+ name: "Wallet"
2888
+ }
2889
+ }
2890
+ }
2891
+ }
2892
+ ]
2893
+ },
2894
+ {
2895
+ name: "withdraw",
2896
+ discriminator: [
2897
+ 183,
2898
+ 18,
2899
+ 70,
2900
+ 156,
2901
+ 148,
2902
+ 109,
2903
+ 161,
2904
+ 34
2905
+ ],
2906
+ accounts: [
2907
+ {
2908
+ name: "relayer",
2909
+ writable: true,
2910
+ signer: true
2911
+ },
2912
+ {
2913
+ name: "pool"
2914
+ },
2915
+ {
2916
+ name: "treasury",
2917
+ writable: true,
2918
+ pda: {
2919
+ seeds: [
2920
+ {
2921
+ kind: "const",
2922
+ value: [
2923
+ 116,
2924
+ 114,
2925
+ 101,
2926
+ 97,
2927
+ 115,
2928
+ 117,
2929
+ 114,
2930
+ 121
2931
+ ]
2932
+ }
2933
+ ]
2934
+ }
2935
+ },
2936
+ {
2937
+ name: "recipient",
2938
+ writable: true
2939
+ },
2940
+ {
2941
+ name: "nullifier_account",
2942
+ writable: true,
2943
+ pda: {
2944
+ seeds: [
2945
+ {
2946
+ kind: "const",
2947
+ value: [
2948
+ 110,
2949
+ 117,
2950
+ 108,
2951
+ 108,
2952
+ 105,
2953
+ 102,
2954
+ 105,
2955
+ 101,
2956
+ 114
2957
+ ]
2958
+ },
2959
+ {
2960
+ kind: "arg",
2961
+ path: "nullifier_hash"
2962
+ }
2963
+ ]
2964
+ }
2965
+ },
2966
+ {
2967
+ name: "network_state",
2968
+ pda: {
2969
+ seeds: [
2970
+ {
2971
+ kind: "const",
2972
+ value: [
2973
+ 99,
2974
+ 111,
2975
+ 110,
2976
+ 102,
2977
+ 105,
2978
+ 103
2979
+ ]
2980
+ }
2981
+ ]
2982
+ }
2983
+ },
2984
+ {
2985
+ name: "system_program",
2986
+ address: "11111111111111111111111111111111"
2987
+ }
2988
+ ],
2989
+ args: [
2990
+ {
2991
+ name: "proof",
2992
+ type: {
2993
+ array: [
2994
+ "u8",
2995
+ 256
2996
+ ]
2997
+ }
2998
+ },
2999
+ {
3000
+ name: "root",
3001
+ type: {
3002
+ array: [
3003
+ "u8",
3004
+ 32
3005
+ ]
3006
+ }
3007
+ },
3008
+ {
3009
+ name: "nullifier_hash",
3010
+ type: {
3011
+ array: [
3012
+ "u8",
3013
+ 32
3014
+ ]
3015
+ }
3016
+ },
3017
+ {
3018
+ name: "fee",
3019
+ type: "u64"
3020
+ },
3021
+ {
3022
+ name: "refund",
3023
+ type: "u64"
3024
+ }
3025
+ ]
3026
+ }
3027
+ ],
3028
+ accounts: [
3029
+ {
3030
+ name: "Commitment",
3031
+ discriminator: [
3032
+ 61,
3033
+ 112,
3034
+ 129,
3035
+ 128,
3036
+ 24,
3037
+ 147,
3038
+ 77,
3039
+ 87
3040
+ ]
3041
+ },
3042
+ {
3043
+ name: "NetworkState",
3044
+ discriminator: [
3045
+ 212,
3046
+ 237,
3047
+ 148,
3048
+ 56,
3049
+ 97,
3050
+ 245,
3051
+ 51,
3052
+ 169
3053
+ ]
3054
+ },
3055
+ {
3056
+ name: "Notes",
3057
+ discriminator: [
3058
+ 105,
3059
+ 126,
3060
+ 200,
3061
+ 34,
3062
+ 252,
3063
+ 93,
3064
+ 84,
3065
+ 168
3066
+ ]
3067
+ },
3068
+ {
3069
+ name: "NotesV2",
3070
+ discriminator: [
3071
+ 79,
3072
+ 74,
3073
+ 187,
3074
+ 134,
3075
+ 129,
3076
+ 227,
3077
+ 58,
3078
+ 250
3079
+ ]
3080
+ },
3081
+ {
3082
+ name: "Nullifier",
3083
+ discriminator: [
3084
+ 18,
3085
+ 56,
3086
+ 142,
3087
+ 165,
3088
+ 181,
3089
+ 158,
3090
+ 187,
3091
+ 133
3092
+ ]
3093
+ },
3094
+ {
3095
+ name: "Pool",
3096
+ discriminator: [
3097
+ 241,
3098
+ 154,
3099
+ 109,
3100
+ 4,
3101
+ 17,
3102
+ 177,
3103
+ 109,
3104
+ 188
3105
+ ]
3106
+ }
3107
+ ],
3108
+ events: [
3109
+ {
3110
+ name: "DepositEvent",
3111
+ discriminator: [
3112
+ 120,
3113
+ 248,
3114
+ 61,
3115
+ 83,
3116
+ 31,
3117
+ 142,
3118
+ 107,
3119
+ 144
3120
+ ]
3121
+ },
3122
+ {
3123
+ name: "TokenDepositEvent",
3124
+ discriminator: [
3125
+ 27,
3126
+ 43,
3127
+ 27,
3128
+ 81,
3129
+ 3,
3130
+ 244,
3131
+ 105,
3132
+ 252
3133
+ ]
3134
+ },
3135
+ {
3136
+ name: "TokenWithdrawalEvent",
3137
+ discriminator: [
3138
+ 79,
3139
+ 12,
3140
+ 16,
3141
+ 21,
3142
+ 174,
3143
+ 112,
3144
+ 21,
3145
+ 95
3146
+ ]
3147
+ },
3148
+ {
3149
+ name: "WithdrawalEvent",
3150
+ discriminator: [
3151
+ 161,
3152
+ 53,
3153
+ 185,
3154
+ 18,
3155
+ 98,
3156
+ 254,
3157
+ 54,
3158
+ 165
3159
+ ]
3160
+ }
3161
+ ],
3162
+ errors: [
3163
+ {
3164
+ code: 6e3,
3165
+ name: "AlreadyUsed",
3166
+ msg: "Nullifier has already been used"
3167
+ },
3168
+ {
3169
+ code: 6001,
3170
+ name: "FeedMismatch",
3171
+ msg: "Feed hash mismatch - oracle feed does not match expected configuration"
3172
+ },
3173
+ {
3174
+ code: 6002,
3175
+ name: "HashFailed",
3176
+ msg: "Poseidon hash operation failed"
3177
+ },
3178
+ {
3179
+ code: 6003,
3180
+ name: "InsufficientAmount",
3181
+ msg: "Amount less than fee"
3182
+ },
3183
+ {
3184
+ code: 6004,
3185
+ name: "InvalidAccounts",
3186
+ msg: "Invalid accounts"
3187
+ },
3188
+ {
3189
+ code: 6005,
3190
+ name: "InvalidAuthority",
3191
+ msg: "Configuration authority cannot be the default public key"
3192
+ },
3193
+ {
3194
+ code: 6006,
3195
+ name: "InvalidDenomination",
3196
+ msg: "Pool denomination must be greater than zero"
3197
+ },
3198
+ {
3199
+ code: 6007,
3200
+ name: "InvalidFeeAmount",
3201
+ msg: "Invalid fee amount"
3202
+ },
3203
+ {
3204
+ code: 6008,
3205
+ name: "InvalidLevels",
3206
+ msg: "Invalid levels"
3207
+ },
3208
+ {
3209
+ code: 6009,
3210
+ name: "InvalidProof",
3211
+ msg: "Invalid zero-knowledge proof"
3212
+ },
3213
+ {
3214
+ code: 6010,
3215
+ name: "InvalidRoot",
3216
+ msg: "Invalid root"
3217
+ },
3218
+ {
3219
+ code: 6011,
3220
+ name: "InvalidRefund",
3221
+ msg: "Refund must be zero for SOL-only mixer"
3222
+ },
3223
+ {
3224
+ code: 6012,
3225
+ name: "InvalidWallets",
3226
+ msg: "Invalid wallets"
3227
+ },
3228
+ {
3229
+ code: 6013,
3230
+ name: "MerkleTreeFull",
3231
+ msg: "Merkle tree is full"
3232
+ },
3233
+ {
3234
+ code: 6014,
3235
+ name: "NoOracleFeeds",
3236
+ msg: "No oracle feeds available"
3237
+ },
3238
+ {
3239
+ code: 6015,
3240
+ name: "RiskTooHigh",
3241
+ msg: "Risk score exceeds allowed threshold"
3242
+ },
3243
+ {
3244
+ code: 6016,
3245
+ name: "StaleQuote",
3246
+ msg: "Stale quote - the quote is too old"
3247
+ },
3248
+ {
3249
+ code: 6017,
3250
+ name: "TooManyWallets",
3251
+ msg: "Too many wallets"
3252
+ },
3253
+ {
3254
+ code: 6018,
3255
+ name: "QuoteVerificationFailed",
3256
+ msg: "Quote verification failed"
3257
+ }
3258
+ ],
3259
+ types: [
3260
+ {
3261
+ name: "Commitment",
3262
+ type: {
3263
+ kind: "struct"
3264
+ }
3265
+ },
3266
+ {
3267
+ name: "Configuration",
3268
+ type: {
3269
+ kind: "struct",
3270
+ fields: [
3271
+ {
3272
+ name: "authority",
3273
+ type: "pubkey"
3274
+ },
3275
+ {
3276
+ name: "wallets",
3277
+ type: {
3278
+ option: {
3279
+ vec: {
3280
+ defined: {
3281
+ name: "Wallet"
3282
+ }
3283
+ }
3284
+ }
3285
+ }
3286
+ }
3287
+ ]
3288
+ }
3289
+ },
3290
+ {
3291
+ name: "DepositEvent",
3292
+ type: {
3293
+ kind: "struct",
3294
+ fields: [
3295
+ {
3296
+ name: "denomination",
3297
+ type: "u64"
3298
+ },
3299
+ {
3300
+ name: "commitment",
3301
+ type: {
3302
+ array: [
3303
+ "u8",
3304
+ 32
3305
+ ]
3306
+ }
3307
+ },
3308
+ {
3309
+ name: "index",
3310
+ type: "u32"
3311
+ },
3312
+ {
3313
+ name: "timestamp",
3314
+ type: "u64"
3315
+ }
3316
+ ]
3317
+ }
3318
+ },
3319
+ {
3320
+ name: "NetworkState",
3321
+ type: {
3322
+ kind: "struct",
3323
+ fields: [
3324
+ {
3325
+ name: "config",
3326
+ type: {
3327
+ defined: {
3328
+ name: "Configuration"
3329
+ }
3330
+ }
3331
+ }
3332
+ ]
3333
+ }
3334
+ },
3335
+ {
3336
+ name: "Notes",
3337
+ type: {
3338
+ kind: "struct",
3339
+ fields: [
3340
+ {
3341
+ name: "entries",
3342
+ type: {
3343
+ vec: "string"
3344
+ }
3345
+ }
3346
+ ]
3347
+ }
3348
+ },
3349
+ {
3350
+ name: "NotesV2",
3351
+ type: {
3352
+ kind: "struct",
3353
+ fields: [
3354
+ {
3355
+ name: "entries",
3356
+ type: {
3357
+ vec: "bytes"
3358
+ }
3359
+ }
3360
+ ]
3361
+ }
3362
+ },
3363
+ {
3364
+ name: "Nullifier",
3365
+ type: {
3366
+ kind: "struct"
3367
+ }
3368
+ },
3369
+ {
3370
+ name: "Pool",
3371
+ type: {
3372
+ kind: "struct",
3373
+ fields: [
3374
+ {
3375
+ name: "denomination",
3376
+ type: "u64"
3377
+ },
3378
+ {
3379
+ name: "merkle_tree",
3380
+ type: {
3381
+ defined: {
3382
+ name: "PoseidonMerkleTree"
3383
+ }
3384
+ }
3385
+ }
3386
+ ]
3387
+ }
3388
+ },
3389
+ {
3390
+ name: "PoseidonMerkleTree",
3391
+ type: {
3392
+ kind: "struct",
3393
+ fields: [
3394
+ {
3395
+ name: "levels",
3396
+ type: "u32"
3397
+ },
3398
+ {
3399
+ name: "filled_subtrees",
3400
+ type: {
3401
+ vec: {
3402
+ array: [
3403
+ "u8",
3404
+ 32
3405
+ ]
3406
+ }
3407
+ }
3408
+ },
3409
+ {
3410
+ name: "roots",
3411
+ type: {
3412
+ vec: {
3413
+ array: [
3414
+ "u8",
3415
+ 32
3416
+ ]
3417
+ }
3418
+ }
3419
+ },
3420
+ {
3421
+ name: "current_root_index",
3422
+ type: "u32"
3423
+ },
3424
+ {
3425
+ name: "next_index",
3426
+ type: "u32"
3427
+ }
3428
+ ]
3429
+ }
3430
+ },
3431
+ {
3432
+ name: "TokenDepositEvent",
3433
+ type: {
3434
+ kind: "struct",
3435
+ fields: [
3436
+ {
3437
+ name: "mint",
3438
+ type: "pubkey"
3439
+ },
3440
+ {
3441
+ name: "denomination",
3442
+ type: "u64"
3443
+ },
3444
+ {
3445
+ name: "commitment",
3446
+ type: {
3447
+ array: [
3448
+ "u8",
3449
+ 32
3450
+ ]
3451
+ }
3452
+ },
3453
+ {
3454
+ name: "index",
3455
+ type: "u32"
3456
+ },
3457
+ {
3458
+ name: "timestamp",
3459
+ type: "u64"
3460
+ }
3461
+ ]
3462
+ }
3463
+ },
3464
+ {
3465
+ name: "TokenWithdrawalEvent",
3466
+ type: {
3467
+ kind: "struct",
3468
+ fields: [
3469
+ {
3470
+ name: "mint",
3471
+ type: "pubkey"
3472
+ },
3473
+ {
3474
+ name: "denomination",
3475
+ type: "u64"
3476
+ },
3477
+ {
3478
+ name: "recipient",
3479
+ type: "pubkey"
3480
+ },
3481
+ {
3482
+ name: "nullifier_hash",
3483
+ type: {
3484
+ array: [
3485
+ "u8",
3486
+ 32
3487
+ ]
3488
+ }
3489
+ },
3490
+ {
3491
+ name: "relayer",
3492
+ type: "pubkey"
3493
+ },
3494
+ {
3495
+ name: "fee",
3496
+ type: "u64"
3497
+ }
3498
+ ]
3499
+ }
3500
+ },
3501
+ {
3502
+ name: "Wallet",
3503
+ type: {
3504
+ kind: "struct",
3505
+ fields: [
3506
+ {
3507
+ name: "address",
3508
+ type: "pubkey"
3509
+ },
3510
+ {
3511
+ name: "fee_split",
3512
+ type: "u16"
3513
+ }
3514
+ ]
3515
+ }
3516
+ },
3517
+ {
3518
+ name: "WithdrawalEvent",
3519
+ type: {
3520
+ kind: "struct",
3521
+ fields: [
3522
+ {
3523
+ name: "denomination",
3524
+ type: "u64"
3525
+ },
3526
+ {
3527
+ name: "recipient",
3528
+ type: "pubkey"
3529
+ },
3530
+ {
3531
+ name: "nullifier_hash",
3532
+ type: {
3533
+ array: [
3534
+ "u8",
3535
+ 32
3536
+ ]
3537
+ }
3538
+ },
3539
+ {
3540
+ name: "relayer",
3541
+ type: "pubkey"
3542
+ },
3543
+ {
3544
+ name: "fee",
3545
+ type: "u64"
3546
+ }
3547
+ ]
3548
+ }
3549
+ }
3550
+ ]
3551
+ };
3552
+
1784
3553
  // src/config/constants.ts
1785
- var MAINNET_PROGRAM_ID = veilix_devnet_default.address;
3554
+ var MAINNET_PROGRAM_ID = veilix_default.address;
1786
3555
  var DEVNET_PROGRAM_ID = veilix_devnet_default.address;
1787
3556
  function getProgramIdForNetwork(network) {
1788
3557
  return network === "devnet" ? DEVNET_PROGRAM_ID : MAINNET_PROGRAM_ID;
1789
3558
  }
1790
3559
  function getIdlForNetwork(network) {
1791
- return veilix_devnet_default;
3560
+ return network === "devnet" ? veilix_devnet_default : veilix_default;
1792
3561
  }
1793
3562
  var MAINNET_INDEXER_URL = "https://idx.veilixprivacy.com";
1794
3563
  var DEVNET_INDEXER_URL = "https://indexer.veilixprivacy.com";
@@ -1815,7 +3584,7 @@ var MAINNET_TOKEN_MINTS = {
1815
3584
  USDC: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
1816
3585
  };
1817
3586
  var DEVNET_TOKEN_MINTS = {
1818
- Veilix: "ARCxcL6oX2pd4bKmUxhdoARaaHdKU6TJrTTthPANPQtQ",
3587
+ Veilix: "GAFN64LvtCBoc5BHncVn3JEJGpq42rUzQjPmvMK2UhZH",
1819
3588
  Bitcoin: "",
1820
3589
  Ethereum: "",
1821
3590
  USDC: "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"
@@ -2022,7 +3791,7 @@ async function createRuntimeConfig(options) {
2022
3791
  commitment: "confirmed"
2023
3792
  });
2024
3793
  setProvider(provider);
2025
- const program = new Program(getIdlForNetwork(), provider);
3794
+ const program = new Program(getIdlForNetwork(network), provider);
2026
3795
  const circuitPaths = options.circuitPathsBase !== void 0 ? resolveCircuitPathsFromBase(options.circuitPathsBase) : resolveBrowserCircuitPaths() ?? void 0;
2027
3796
  return {
2028
3797
  rangeApiKey: options.rangeApiKey,