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

Streaming podcast payments: add podcastindex_id #138

Open
satoshisstream opened this issue Mar 28, 2021 · 11 comments
Open

Streaming podcast payments: add podcastindex_id #138

satoshisstream opened this issue Mar 28, 2021 · 11 comments

Comments

@satoshisstream
Copy link

Please consider following

https://github.com/satoshisstream/satoshis.stream/blob/main/TLV_registry.md#field-7629169

for podcast payments. Specifically adding podcastindex_id would be great!

@Evanfeenstra
Copy link
Contributor

Interesting.. in Sphinx we have a very similar set of fields https://github.com/stakwork/sphinx-android/blob/1ee60c730bc3d5c6a8cab5168bf93db2b5a56172/src/store/feed.ts#L15

@satoshisstream
Copy link
Author

Cool! Looks good. You have even more fields.

I can't find how/where you translate them to data fields for the 7629169 record, and what keys/values you use.

Would be good to standardize :)

@Evanfeenstra
Copy link
Contributor

We send them on a TLV with key of 133773310. Im curious where you are getting 7629169 from? The keys and value types are listed in that typescript object.

yes it would be nice to find a way to standardize these things across apps!

@satoshisstream
Copy link
Author

satoshisstream commented Mar 28, 2021

Oh! 7629169 is what Breez uses!

This means satoshis.stream does not parse Sphinx payments now.

Should I be looking out for json encoded messages in 133773310 using below keys from code?

I have not received any 133773310 payment yet. Any chance you could also send 7629169 using the format from the spec on https://satoshis.stream/TLV_registry.html ?

What do you think?

https://github.com/stakwork/sphinx-android/blob/1ee60c730bc3d5c6a8cab5168bf93db2b5a56172/src/store/feed.ts#L15-L27

@satoshisstream
Copy link
Author

Also is the TS you give in seconds?

@Evanfeenstra
Copy link
Contributor

Yes the TS is in seconds.

We will think about adding another TLV... definitely a standard format would be great, but in reality we cant just add every format that another app decides on :) We are trying to build a general system to support streaming payments for much more than just podcasts.

If you want to try to integrate Sphinx TLV like they are today, the format is:

  • {JSON}signature (so you can split on the last "}" to get the JSON)
  • After parsing the JSON, its an object like:
{
  type:28,
  message:{
    content: PODCAST_JSON,
    ...
  },
  ...
}
  • that PODCAST_JSON has the fields included in the typescript definition I linked. The feedID is the podcastindex id

@satoshisstream
Copy link
Author

Of course, we should not have 10 apps sending 10 different formats!

I am waiting for a streaming payment to a Satoshis.Stream podcast to parse your sig + JSON, and will look into that too. Would you mind sending a payment to PodNews or Satoshi Radio (NL) for example?

The reason I am setting up the TLV DB is exactly because of this... ;)

Please send a payment if you can, I will look into this. Afterwards we should decide which records are the best + most used I suppose.

@Evanfeenstra
Copy link
Contributor

ok i just streamed some PodNews

@satoshisstream
Copy link
Author

Cheers got some payments, will implement on Friday!

lncli listinvoices --max_invoices 1000000 | jq '.invoices[].htlcs[].custom_records' | grep ':' | cut -d: -f1 | sort | uniq -c
      6   "133773310"
    463   "5482373484"
    441   "7629168"
    456   "7629169"

@satoshisstream
Copy link
Author

satoshisstream commented Mar 29, 2021

Looking at it for some minutes I think like what you send a bit better than Breez to be honest. Let's see what we can do to standardize.

First I will integrate and see if I see any weird things!

What are the possible values for type ?

@satoshisstream
Copy link
Author

@Evanfeenstra I really like your format.

Could you take a look at:
https://github.com/satoshisstream/satoshis.stream/blob/main/TLV_registry.md#field-7629169

I think if you change the json slightly (just key-value, not nested in type) and send it to record 7629169, everyone is happy.

Suggestions for more/different fields are welcome.

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

2 participants