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

Experiment with Bolt12 #46

Open
rolznz opened this issue Jun 24, 2024 · 9 comments
Open

Experiment with Bolt12 #46

rolznz opened this issue Jun 24, 2024 · 9 comments
Assignees

Comments

@rolznz
Copy link
Contributor

rolznz commented Jun 24, 2024

See #47

@rolznz rolznz self-assigned this Jun 24, 2024
@im-adithya im-adithya transferred this issue from getAlby/nostr-wallet-connect-next Jul 5, 2024
@itstomekk
Copy link
Contributor

I hear it more often from users, signaling demand! :)

https://feedback.getalby.com/-alby-hub-request-a-feature/posts/bolt-12-support-

@rolznz
Copy link
Contributor Author

rolznz commented Oct 16, 2024

There's an open PR here: #307

It needs a bit more work and planning. We will do a BOLT 12 hackday in the future and can maybe get some minimal BOLT-12 features in

@redimongo
Copy link

Would love to see Bolt12 be available as this could allow us to offer subscription services for paid content without a new invoice having to be generated each month.

@rolznz
Copy link
Contributor Author

rolznz commented Oct 31, 2024

@redimongo note that this is not limited to Bolt12 - you can already do this with lightning addresses or NWC. Bolt12 simply allows the invoice to be requested over the lightning network, rather than using an external protocol.

@redimongo
Copy link

@rolznz oh I did not know, we are using the following code to generate our invoices at the moment

 // Initialize the NWC client with the connectionSecret
    const nwcClient = new nwc.NWCClient({ nostrWalletConnectUrl: connection.connectionSecret });

    // Create a new invoice
    const transaction = await nwcClient.makeInvoice({
      amount: +amount,
      description, // Use the sanitized description
    });

Would love to know how we make them a monthly subscription so that we can offer this an option.

Thanks

@rolznz
Copy link
Contributor Author

rolznz commented Oct 31, 2024

@redimongo as long as you have the connection secret of the user's wallet, you can create an invoice from your own wallet, and pay it with the user's wallet.

We have an example app that does scheduled payments based on this idea:

https://zapplanner.albylabs.com/

Most of the complexity is setting up the scheduling to actually make payments on time. ZapPlanner also has some support for setting up subscriptions with some data attached to them. e.g. this link

Source: https://github.com/getAlby/ZapPlanner

@redimongo
Copy link

@rolznz yes that will kinda work, however that has to be done on the player side am guessing (without looking into atm) this wont allow us to use a L402.

So the client (listener) is on a podcast app like truefans.fm
The product is on PodToo the current L402 works with Macaroons and BOT11.

Might have to look into it more, as when the person stops paying for it, we want to stop feeding them the paid content. I can see it being able to be done on the player side, but ideally I need to do the first part on our side so we know exactly the amount a person is paying.

But thanks, I'll dig around the code.

@rolznz
Copy link
Contributor Author

rolznz commented Oct 31, 2024

@redimongo NWC should work for all your requirements. As long as you keep track of paid invoices for users in your system, you can tell how much each user has paid.

@aChrisYouKnow
Copy link

It would be great to generate a static payment identifier Bolt12 offer that I could share. Even better if my friends & family sub accounts could get their own static payment identifier.

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

4 participants