@nktkas/hyperliquid
Version:
Unofficial Hyperliquid API SDK for all major JS runtimes, written in TypeScript and provided with tests
20 lines (19 loc) • 859 B
JavaScript
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isAbstractViemWalletClient = isAbstractViemWalletClient;
/** Checks if the given value is an abstract viem wallet. */
function isAbstractViemWalletClient(client) {
return typeof client === "object" && client !== null &&
"signTypedData" in client && typeof client.signTypedData === "function" &&
(client.signTypedData.length === 1 || client.signTypedData.length === 2);
}
});