@nktkas/hyperliquid
Version:
Hyperliquid API SDK for all major JS runtimes, written in TypeScript.
62 lines • 1.94 kB
JavaScript
;
// Copyright 2018-2025 the Deno authors. MIT license.
// This module is browser compatible.
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
* This module provides functions to encode and decode MessagePack.
*
* MessagePack is an efficient binary serialization format that is language
* agnostic. It is like JSON, but generally produces much smaller payloads.
* {@link https://msgpack.org/ | Learn more about MessagePack}.
*
* ```ts
* import { decode, encode } from "@std/msgpack";
* import { assertEquals } from "@std/assert";
*
* const obj = {
* str: "deno",
* arr: [1, 2, 3],
* bool: true,
* nil: null,
* map: {
* foo: "bar"
* }
* };
*
* const encoded = encode(obj);
* assertEquals(encoded.length, 42);
*
* const decoded = decode(encoded);
* assertEquals(decoded, obj);
* ```
*
* MessagePack supports encoding and decoding the following types:
*
* - `number`
* - `bigint`
* - `string`
* - `boolean`
* - `null`
* - `Uint8Array`
* - arrays of values of these types
* - objects with string or number keys, and values of these types
*
* @module
*/
__exportStar(require("./decode.js"), exports);
__exportStar(require("./encode.js"), exports);
//# sourceMappingURL=mod.js.map