-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathparams.ts
More file actions
39 lines (35 loc) · 1.25 KB
/
params.ts
File metadata and controls
39 lines (35 loc) · 1.25 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
35
36
37
38
39
import { Network } from "@stakingbrain/common";
import type { ApiParams } from "@stakingbrain/brain";
export const beaconchaApiParamsMap = new Map<string, Omit<ApiParams, "host">>([
["mainnet", { baseUrl: "https://beaconcha.in", apiPath: "/api/v1/" }],
["prater", { baseUrl: "https://prater.beaconcha.in", apiPath: "/api/v1/" }],
["gnosis", { baseUrl: "https://gnosischa.in", apiPath: "/api/v1/" }],
[
"lukso",
{
baseUrl: "https://explorer.consensus.mainnet.lukso.network",
apiPath: "/api/v1/"
}
],
["holesky", { baseUrl: "https://holesky.beaconcha.in", apiPath: "/api/v1/" }],
["hoodi", { baseUrl: "https://hoodi.beaconcha.in", apiPath: "/api/v1/" }]
]);
export interface AppParams {
network: string;
signerUrl: string;
signerAuthToken?: string;
consensusClient?: string;
executionClient?: string;
}
export const getSmoothUrlByNetwork = (network: Network): string => {
if (network == "hoodi") {
return "https://smooth-hoodi.dappnode.io/";
} else if (network == "mainnet") {
return "https://smooth.dappnode.io/";
} else {
return "";
}
};
export const getStakersLink = (network: Network): string => {
return network === "prater" ? "http://my.dappnode/stakers/prater" : "http://my.dappnode/stakers/ethereum";
};