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

Add Spendable Outputs Kotlin example #245

Merged

Conversation

ConorOkus
Copy link
Contributor

No description provided.

@ConorOkus ConorOkus requested a review from tnull January 19, 2024 02:29
Copy link

netlify bot commented Jan 19, 2024

Deploy Preview for lightningdevkit ready!

Name Link
🔨 Latest commit dd3a4ae
🔍 Latest deploy log https://app.netlify.com/sites/lightningdevkit/deploys/65b810d4d7b1330008f17067
😎 Deploy Preview https://deploy-preview-245--lightningdevkit.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good I think.

I assume you tested the code in uMlando?

@OptIn(ExperimentalUnsignedTypes::class)
override fun get_destination_script(): Result_CVec_u8ZNoneZ {
val address = ldkkeysManager!!.wallet.getAddress(AddressIndex.New)
return Result_CVec_u8ZNoneZ.ok(address.address.scriptPubkey().toBytes().toUByteArray().toByteArray())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if there is an easier way for this conversion rather than .toBytes().toUByteArray().toByteArray()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not entirely sure either, in a production codebase would probably wrap this in some type of utility function

@ConorOkus ConorOkus merged commit fa2dd91 into lightningdevkit:main Jan 29, 2024
5 checks passed
@ConorOkus ConorOkus deleted the spending-on-chain-funds-kotlin branch January 29, 2024 21:27
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

Successfully merging this pull request may close these issues.

2 participants