Blockstream/satellite

Decode data from Satellite API

whiteyhat opened this issue · 4 comments

Hey, currently when using GET /order/:uuid the only parameter related with the received data is the message_diggest

Is it required this python example to decode and read the data broadcasted?

How can I decode and read broadcasted data from the satellite API using the uuid and the authToken in JavaScript?

@bteitelb @nbenoit

@whiteyhat, thanks for your question.

In the most typical receiver use case, there is no need to interact with the API. The receiver application (blocksat-rx) receives API messages and the api_data_reader.py example script tries to decrypt the data. The idea is that decrypting will only be successful for the messages that you are really the target recipient of (you have the GPG keys to decrypt).

Is that what you mean by "decode" (to decrypt)? If not, could you clarify the question?

Let us know.

@whiteyhat the message_digest in GET /order/:uuid is just a SHA256 hash of the message or file that was sent when creating an order, so it's not there to be decrypted (you can't, anyway).

If you want to see a broadcasted message, you have to use the /message endpoint, for example https://api.blockstream.space/message/{tx_seq_num}, tx_seq_num being a number you can find when you query GET /order/:uuid.

Interesting! Okay, that is all I needed thank you guys! @bokobza @blockstreamsatellite

One last thing, querying the Satellite API requires internet access?

Eg: If I have a receiver pointing to the Blockstream satellite can I query the API without internet access? ⬇️
curl -F "bid=10000" -F "message=Hello World" https://api.blockstream.space/order/

No problem.
Yeah you need internet to query the API. The API is the one that push messages to the satellite.