near-hydra-core
v0.5.0
Published
Core library for near-hydra: NEAR client, Chain Signatures wrappers, NEAR Intents 1Click client.
Maintainers
Readme
near-hydra-core
Core library for near-hydra — the unified CLI + MCP server for NEAR's chain-abstraction stack.
This package wires together NEAR's primitives (accounts, contract calls, FTs) with cross-chain MPC signing (chainsig.js) and NEAR Intents (@defuse-protocol/one-click-sdk-typescript) behind a single, agent-ergonomic API. It's the engine; you almost certainly want one of the consumer packages instead:
near-hydra— CLInear-hydra-mcp— MCP server for Claude Code, Cursor, etc.
Install (library use)
npm install near-hydra-coreQuick example
import { loadConfig, deriveAddress, viewAccount } from "near-hydra-core";
const cfg = loadConfig(); // env-driven by default
const acct = await viewAccount(cfg, "near");
const btc = await deriveAddress(cfg, "bitcoin", "near", "bitcoin-1");
console.log(btc.address); // bc1qshk...Notes
- A
postinstallscript idempotently patches a knownchainsig.jsv1.1.14 ESM packaging bug. Safe to run multiple times. - Signing operations require
policy.readOnly = falseand a configured NEAR signer. See https://github.com/nikshepsvn/near-hydra/blob/main/SECURITY.md.
Full documentation
See https://github.com/nikshepsvn/near-hydra.
License
Apache-2.0
