import { Requester } from "../requester" ; import { NullableError } from "../error" ; export class EventRepository { constructor ( protected readonly requester ) { } public async subscribe ( eventName ) { return this . requester . executeAsync ( { method : "event/subscribe" , params : { eventName : eventName } , } ) ; } public async unsubscribe ( eventName ) { return this . requester . executeAsync ( { method : "event/unsubscribe" , params : { eventName : eventName } , } ) ; } }