Created
March 17, 2022 15:40
-
-
Save AaronDewes/b71e0196f31dd7a14e79f72a4d4372b9 to your computer and use it in GitHub Desktop.
Opening a channel to zero fee routing from c-lightning.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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