Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to make rn-ldk run in Testnet #38

Open
sgiammy opened this issue Dec 15, 2021 · 2 comments
Open

how to make rn-ldk run in Testnet #38

sgiammy opened this issue Dec 15, 2021 · 2 comments

Comments

@sgiammy
Copy link

sgiammy commented Dec 15, 2021

I'd like to run the iOS example on testnet instead of mainnet.

Even after changing the network parameter in the ChannelManagerConstructor from LDKNetwork_Bitcoin to LDKNetwork_Testnet here, after clicking openChannelStep1, the generated address to fund is still a bitcoin one.

From my understanding the address is generated by the lightning dev kit binaries, so I was wondering what else should I do to make it generate a Testnet address.

@Overtorment
Copy link
Member

as seen here

return await this.script2address(funding.output_script);

result of channel opening is bitcoin script, not address.
Script is then turned into address via simple lambda function on server (
private async script2address(scriptHex: string): Promise<string> {
), but you can override that behaviour by injecting your own implementation (see provideScript2addressFunc)

@amitrana22
Copy link

I'd like to run the iOS example on testnet instead of mainnet.

Even after changing the network parameter in the ChannelManagerConstructor from LDKNetwork_Bitcoin to LDKNetwork_Testnet here, after clicking openChannelStep1, the generated address to fund is still a bitcoin one.

From my understanding the address is generated by the lightning dev kit binaries, so I was wondering what else should I do to make it generate a Testnet address.

please help if you got solution for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants