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