Phase 3 Finalization: Estuary Integration POC

Phase 3 ended up being changed to working with the Estuary project, adding webnative-filecoin to their system.

The write up of what we ended up doing is here:

This showcases having people sign up with a DID-based Fission account, get a new FIL address created, work with the existing API key system that Estuary has, and be able to send FIL from within the system.

The pull request is here:

We have demonstrated this flow and created new FIL accounts on the fly, in browser, on mainnet, and sent funds from the web page, completing the end to end flow.

This shows how users could sign up for a brand new account, be provisioned a FIL account securely on the fly, and be able to pay for storage deals on Filecoin, relying on Estuary to handle the ingestion of files and deal making on behalf of the user.

This wraps up the original grant, read about the previous two phases:

Next Steps

Right now the Estuary team are looking at natively integrating UCANs into their server-side system. This would mean being able to use DIDs for both client side login as well as replacing API keys.

We talked through the existing FIL wallet flows. Currently, Estuary and Lotus instances have a default server wallet which manages deal making on behalf of all users.

In order to track FIL per user, we discussed a number of different options:

  1. Keep the single wallet per Estuary node, track FIL addresses and amounts sent per user in the database – can be verified / synced with chain state, need to include functions to send funds back to use
  2. Create an “escrow multisig” that is 1 of 2 from each user’s address and the Estuary wallet – amounts are tracked on chain, user can withdraw from there themselves if they want, need to verify those accounts
  3. Users sign transactions authorizing / paying for deals directly - user needs to have a verified account, and this likely needs some improvement via FIPs

Using webnative-filecoin in apps

The webnative-filecoin library can be used to securely create and store FIL addresses in browser, and synced between devices with Fission webnative encrypted file store. The library is here:

You will also need the FIL Cosigner running server side, or reach out to use Fission’s cosigner:

Using this, developers can build applications with any front end framework, and enable users to send and receive FIL.

We also have started some work with the Application Research Group on bundling this into the Origin web3 app template, including starting by adding webnative:

We are planning to submit some Filecoin Improvement Proposals (FIPs) in order to propose ways that accounts can be used for sign in, and other dapp-enabling methods.