@ampvaleo/x402-hyperliquid-core
v0.1.0
Published
Types, EIP-712, and encoding for x402 on Hyperliquid HyperCore
Downloads
48
Readme
@ampvaleo/x402-hyperliquid-core
Types, Hyperliquid chain constants, canonical EIP-712 HyperliquidTransaction:SendAsset helpers, and Base64 JSON helpers for the X-PAYMENT header.
import { buildSendAssetTypedData, testnet } from "@ampvaleo/x402-hyperliquid-core";
const typed = buildSendAssetTypedData({
chainId: testnet.chainId,
message: {
hyperliquidChain: "Testnet",
destination: "0x…",
sourceDex: "spot",
destinationDex: "spot",
token: "USDC:0x…",
amount: "0.01",
fromSubAccount: "",
nonce: 1_700_000_000_000n,
},
});See the root README for context.
