module license import { ModuleRpcCommon } from '../../common' ; import { ModuleRpcClient } from '../../client' ; import { ModuleRpcContextCommon } from '../common' ; export class TimestampClientContextConnector implements ModuleRpcClient . ClientContextConnector < ModuleRpcContextCommon . TimestampResponseContext > { async provideRequestContext ( ) { return { } ; } async decodeResponseContext ( encodedResponseContext ) { const date = encodedResponseContext [ ModuleRpcContextCommon . timestampContextKeys . serverTimestamp ] ; if ( ! date ) { throw new ModuleRpcClient . ResponseContextDecodingError ( `${ ModuleRpcContextCommon . timestampContextKeys . serverTimestamp } context key is required` ) ; } return { date , } ; } }