andreashuber69/lightning-node-operator

View on GitHub
src/lightning/getNode.ts

Summary

Maintainability
A
0 mins
Test Coverage
// https://github.com/andreashuber69/lightning-node-operator/develop/README.md
import type { GetNodeArgs } from "lightning";
import { getNode as lndGetNode } from "lightning";
import { pick } from "./pick.js";

const properties = ["alias", "channels"] as const;

export const getNode = async (args: GetNodeArgs) => pick(await lndGetNode(args), properties);

export type Node = Awaited<ReturnType<typeof getNode>>;