Skip to content

Instantly share code, notes, and snippets.

@AaronDewes
Created March 17, 2022 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AaronDewes/b71e0196f31dd7a14e79f72a4d4372b9 to your computer and use it in GitHub Desktop.
Save AaronDewes/b71e0196f31dd7a14e79f72a4d4372b9 to your computer and use it in GitHub Desktop.
Opening a channel to zero fee routing from c-lightning.ts
import { RestApiClient } from "c-lightning.ts";
// Or:
// const { RestApiClient } = require("c-lightning.ts/cjs/index.cjs");
// Arguments are: API Url, hex encoded macaroon
const apiClient = new RestApiClient("127.0.0.1:8000", "hex encoded macaroon");
await apiClient.connect({
id: "038fe1bd966b5cb0545963490c631eaa1924e2c4c0ea4e7dcb5d4582a1e7f2f1a5@93.177.73.229:9735",
});
await apiClient.fundchannel({
id: "038fe1bd966b5cb0545963490c631eaa1924e2c4c0ea4e7dcb5d4582a1e7f2f1a5",
amount: 0,
request_amt: 10000000,
com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment