import { httpService } from "../httpService"; export class SeService { constructor(private readonly rpcUrl: string) {} public getCurrentOffsetTime = (): Promise => { return httpService.post(`${this.rpcUrl}/se/time-delta`).then(res => Number(res.data)); }; public setTimeOffset = (offsetInSeconds: number): Promise => { return httpService .post(`${this.rpcUrl}/se/increase-time?delta=${offsetInSeconds.toString()}`) .then(() => this.getCurrentOffsetTime()); }; public resetTimeOffset = () => { return httpService.post(`${this.rpcUrl}/se/reset-time`).then(() => this.getCurrentOffsetTime()); }; }