-
Notifications
You must be signed in to change notification settings - Fork 524
Expand file tree
/
Copy pathinit.ts
More file actions
30 lines (28 loc) · 1.06 KB
/
init.ts
File metadata and controls
30 lines (28 loc) · 1.06 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
import { Router } from "@keplr-wallet/router";
import { KeyRingEthereumService } from "./service";
import {
RequestJsonRpcToEvmMsg,
RequestSignEthereumMsg,
GetNewCurrentChainIdForEVMMsg,
CheckNeedEnableAccessForEVMMsg,
UpgradeSmartAccountMsg,
DowngradeSmartAccountMsg,
GetEthereumAddressForVaultMsg,
} from "./messages";
import { ROUTE } from "./constants";
import { getHandler } from "./handler";
import { PermissionInteractiveService } from "../permission-interactive";
export function init(
router: Router,
service: KeyRingEthereumService,
permissionInteractionService: PermissionInteractiveService
): void {
router.registerMessage(RequestSignEthereumMsg);
router.registerMessage(RequestJsonRpcToEvmMsg);
router.registerMessage(GetNewCurrentChainIdForEVMMsg);
router.registerMessage(CheckNeedEnableAccessForEVMMsg);
router.registerMessage(UpgradeSmartAccountMsg);
router.registerMessage(DowngradeSmartAccountMsg);
router.registerMessage(GetEthereumAddressForVaultMsg);
router.addHandler(ROUTE, getHandler(service, permissionInteractionService));
}