Skip to content

filecoin-saturn/browser-client

Repository files navigation

Saturn Browser Client

The Saturn Browser Client is a service worker that serves websites' CID requests with CAR files. CAR files are verifiable, which is a requirement when retrieving content in a trustless manner from community hosted Saturn Nodes.

Install

$ npm install

Development

$ npm run dev

Adding the Browser Client to your website

  1. Add this script tag to the <head> tag. This will install the service worker.
<script async src="https://saturn.tech/widget.js#integration=<YOUR_INTEGRATION_ID>">
  1. Host the service worker file from the root path of your website's domain. For example, if your website is https://example.com, host the service worker file at https://example.com/saturn-sw.js.

    The service worker file can be found here: https://saturn.tech/saturn-sw.js

Deployment

  • To deploy to staging, push to main.

  • To deploy to production, push a tag.

git tag -m deploy $(date +%s)
git push --follow-tags

License

Dual-licensed under MIT + Apache 2.0