veilix-sdk 0.0.1 → 0.0.3

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