UNPKG

ccxt

Version:

A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges

30 lines (27 loc) 791 B
// ---------------------------------------------------------------------------- // PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: // https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code // EDIT THE CORRESPONDENT .ts FILE INSTEAD import { Coder } from "./abstract-coder.js"; const Empty = new Uint8Array([]); /** * @_ignore */ export class NullCoder extends Coder { constructor(localName) { super("null", "", localName, false); } defaultValue() { return null; } encode(writer, value) { if (value != null) { this._throwError("not null", value); } return writer.writeBytes(Empty); } decode(reader) { reader.readBytes(0); return null; } }