///
///
/**
* Buffers are converted to the format of {type:'Buffer', data:xxxxx }
* If an object has a toJSON() method then that will be used - as this uses
* serialize() from @gala-chain/sdk
*
*/
export default class GalaJSONSerializer {
/** Takes the result and produces a buffer that matches this serialization format
* @param {Object} result to be converted
* @return {Buffer} container the encoded data
*/
toBuffer(result: any, schema?: {
type?: string;
}, loggerPrefix?: string): Buffer | undefined;
/**
* Inflates the data to the object or other type
*
* If on inflation the object has a type field that will throw
* an error if it is not 'Buffer'
*
* @param {Buffer} data byte buffer containing the data
* @return {Object} the resulting type
*
*/
fromBuffer(data: any, fullschema: any, loggerPrefix: any): {
value: any;
jsonForValidation: any;
};
_fromString(stringData: string, fullschema: any, loggerPrefix: any): {
value: any;
jsonForValidation: any;
};
}
//# sourceMappingURL=GalaJSONSerializer.d.ts.map