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

feat: add NWC payKeysend method #163

Merged
merged 3 commits into from
Dec 14, 2023
Merged

feat: add NWC payKeysend method #163

merged 3 commits into from
Dec 14, 2023

Conversation

im-adithya
Copy link
Member

Description

Adds keysend method to NWC provider

Extracted from #152

examples/nwc/pay-keysend.js Outdated Show resolved Hide resolved
Copy link
Contributor

@rolznz rolznz left a comment

Choose a reason for hiding this comment

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

tACK

amount: +args.amount * 1000, // NIP-47 uses msat
pubkey: args.destination,
tlv_records: args.customRecords
? Object.entries(args.customRecords).map((v) => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to do this because in the spec the TLV records are formatted as {type: number, value: string}

@rolznz rolznz merged commit ce3fedc into master Dec 14, 2023
1 check passed
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