@nktkas/hyperliquid
Version:
Unofficial Hyperliquid API SDK for all major JS runtimes, written in TypeScript and provided with tests
13 lines (12 loc) • 608 B
JavaScript
/** Checks if the given value is an abstract ethers signer. */
export function isAbstractEthersSigner(client) {
return typeof client === "object" && client !== null &&
"signTypedData" in client && typeof client.signTypedData === "function" &&
client.signTypedData.length === 3;
}
/** Checks if the given value is an abstract ethers v5 signer. */
export function isAbstractEthersV5Signer(client) {
return typeof client === "object" && client !== null &&
"_signTypedData" in client && typeof client._signTypedData === "function" &&
client._signTypedData.length === 3;
}