forked from Nethereum/Nethereum
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
34 lines (28 loc) · 1.09 KB
/
Program.cs
File metadata and controls
34 lines (28 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using MudBlazor.Services;
using Nethereum.Reown.AppKit.Blazor;
using NethereumReownAppKitBlazor;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");
var projectId = "97d8fb2db9753c13645fd37d6920b2cc";
if (string.IsNullOrEmpty(projectId)) {
throw new InvalidOperationException("Set your Reown project ID from https://cloud.reown.com/sign-in");
}
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddMudServices();
builder.Services.AddAppKit(new() {
Networks = NetworkConstants.Networks.All,
ProjectId = projectId,
Name = "AppKit Example",
Description = "An example project to showcase Reown AppKit",
Url = builder.HostEnvironment.BaseAddress,
Icons = ["https://reown.com/favicon.ico"],
Swaps = true,
Onramp = true,
History = true,
Debug = true,
ThemeMode = ThemeModeOptions.light,
});
await builder.Build().RunAsync();