import { Router } from "@keplr-wallet/router" ; import { PermissionService } from "./service" ; import { AddPermissionOrigin , EnableAccessMsg , GetOriginPermittedChainsMsg , GetPermissionOriginsMsg , RemovePermissionOrigin , } from "./messages" ; import { ROUTE } from "./constants" ; import { getHandler } from "./handler" ; export function init ( router , service ) { router . registerMessage ( EnableAccessMsg ) ; router . registerMessage ( GetPermissionOriginsMsg ) ; router . registerMessage ( GetOriginPermittedChainsMsg ) ; router . registerMessage ( AddPermissionOrigin ) ; router . registerMessage ( RemovePermissionOrigin ) ; router . addHandler ( ROUTE , getHandler ( service ) ) ; }