import { RpcSerializer } from "../rpc" ; export class BufferSerializer implements RpcSerializer { serialize ( value ) { return value . toString ( 'base64' ) ; } deserialize ( serialized ) { return Buffer . from ( serialized , 'base64' ) ; } }