This file contains information about Alexandria Browser's stack. What services it needs to connect to, as well as core modules. This is for development reference only.
Needs to have functions to generate new addresses, sign messages, publish transactions with comments (only FLO).
Regular Bitcoin wallet.
Regular Litecoin wallet.
Regular Florincoin wallet.
Bitcoin Lightning Network wallet.
Litecoin Lightning Network wallet.
Florincoin Lightning Network wallet.
The browser needs to connect to a number of API's that provide a variety of services. I have outlined the API's we connect to, as well as what they are used for and what data in them is used.
https://api.alexandria.io/docs/
The LibraryD Service should hook up to the following function
Should return a JSON array, this is just a simple API call. https://api.alexandria.io/docs/#get-all-publishers
Should return a JSON array, this is just a simple API call, however it should allow variables for the different search types. https://api.alexandria.io/docs/#get-a-specific-publisher
Should return a JSON array, this is just a simple API call. https://api.alexandria.io/docs/#get-all-artifacts
Should return a JSON array, this is just a simple API call, however it should allow variables for the different search types. https://api.alexandria.io/docs/#get-a-specific-artifact
This funtion should hook up to the wallet core module to use it to sign a message then return the signature. https://github.com/dloa/publisher-web/blob/7490dd40ad35dc1c7ad161c6901a6a0d5f85553c/js/libraryd-js.js#L6
This funtion should hook up to the wallet core module to use it to sign a message then return the signature. https://github.com/dloa/publisher-web/blob/7490dd40ad35dc1c7ad161c6901a6a0d5f85553c/js/libraryd-js.js#L14
This funtion should hook up to the wallet core module to use it to sign a message then return the signature. https://github.com/dloa/publisher-web/blob/7490dd40ad35dc1c7ad161c6901a6a0d5f85553c/js/libraryd-js.js#L22
This function should accept OIP 041 Artifact JSON, then take that JSON and publish it in transactions to the Florincoin Blockchain. Care needs to be taken that if multiple transactions are needed, the multi-part artifact format is still valid. This mainly needs to interact with the wallet module. https://github.com/dloa/publisher-web/blob/7490dd40ad35dc1c7ad161c6901a6a0d5f85553c/js/libraryd-js.js#L30
This function should accept a JSON object, then take that JSON and publish it in transactions to the Florincoin Blockchain. Care needs to be taken that if multiple transactions are needed, the multi-part artifact format is still valid. This mainly needs to interact with the wallet module. This will be used upon user registration to register the username to a Florincoin address to use as the "Publisher" address. https://github.com/dloa/publisher-web/blob/7490dd40ad35dc1c7ad161c6901a6a0d5f85553c/js/libraryd-js.js#L82
Same as Register. https://github.com/dloa/publisher-web/blob/7490dd40ad35dc1c7ad161c6901a6a0d5f85553c/js/libraryd-js.js#L87
This function should accept OIP 041 Artifact Deactivation JSON, then take that JSON and publish it in transactions to the Florincoin Blockchain. Care needs to be taken that if multiple transactions are needed, the multi-part artifact format is still valid. This mainly needs to interact with the wallet module. This will be used upon user registration to register the username to a Florincoin address to use as the "Publisher" address. https://github.com/dloa/publisher-web/blob/7490dd40ad35dc1c7ad161c6901a6a0d5f85553c/js/libraryd-js.js#L120
This function should accept OIP 041 Artifact Edit JSON, then take that JSON and publish it in transactions to the Florincoin Blockchain. Care needs to be taken that if multiple transactions are needed, the multi-part artifact format is still valid. This mainly needs to interact with the wallet module. This will be used upon user registration to register the username to a Florincoin address to use as the "Publisher" address.
This function should accept OIP 041 Artifact Transfer JSON, then take that JSON and publish it in transactions to the Florincoin Blockchain. Care needs to be taken that if multiple transactions are needed, the multi-part artifact format is still valid. This mainly needs to interact with the wallet module. This will be used upon user registration to register the username to a Florincoin address to use as the "Publisher" address.
This is just an API endpoint that needs to be called. We use it to get the latest Florincoin price for our FLO to USD/BTC calculations (used upon publish & payment stuff) https://api.alexandria.io/docs/#get-market-data
Should be pretty self explanitory https://api.alexandria.io/docs/#search-florincoin-tx-comments
The Tradebot service needs to connect to the Tradebot API as well as the Blockchain.info websocket to listen for incoming payments. You can find code for how it was last implemented here: https://github.com/dloa/publisher-web/blob/7490dd40ad35dc1c7ad161c6901a6a0d5f85553c/js/tradebot.js
https://api.alexandria.io/docs/#tradebot
This is used to help process transactions. It serves a new BTC address to the user for the user to send payment to, then forwards it on to the creator at a later time. We need per user addresses so that we can properly listen for transactions, since others might be also paying at the same time and we do not want only a single person to be required to pay. https://api.alexandria.io/docs/#payment-processor
We need to be able to both retreive files and add/modify files inside of IPFS. The service should handle the loading of IPFS file torrents and return either a URL to the resource, or a file buffer (to be streamed into our players). A file buffer is preferred over a URL so that we can abstract up one layer and hide that from the end user.
We need to use websockets to listen for transactions to Bitcoin addresses. We currently use the following code for this: https://github.com/dloa/publisher-web/blob/7490dd40ad35dc1c7ad161c6901a6a0d5f85553c/js/tradebot.js#L44