forked from ubiquity/rpc-handler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
56 lines (49 loc) · 1.08 KB
/
index.ts
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
export default async function getRPCHandler() {
let modulePath;
if (typeof window !== "undefined") {
modulePath = "./esm/index.js";
} else {
modulePath = "./cjs/index.js";
}
const { RPCHandler } = await import(modulePath);
return RPCHandler;
}
import {
NetworkId,
NetworkName,
HandlerConstructorConfig,
HandlerInterface,
NativeToken,
NetworkCurrencies,
NetworkExplorers,
NetworkRPCs,
Token,
ValidBlockData,
} from "./types/handler";
import {
LOCAL_HOST,
getNetworkName,
networkCurrencies,
networkExplorers,
networkIds,
networkNames,
networkRpcs,
nftAddress,
permit2Address,
getNetworkId,
} from "./types/constants";
import { RPCHandler } from "./types/rpc-handler";
export { LOCAL_HOST, getNetworkName, getNetworkId, networkCurrencies, networkExplorers, networkIds, networkNames, networkRpcs, nftAddress, permit2Address };
export type {
NetworkId,
NetworkName,
HandlerConstructorConfig,
HandlerInterface,
NativeToken,
NetworkCurrencies,
NetworkExplorers,
NetworkRPCs,
Token,
ValidBlockData,
};
export { RPCHandler };