An introduction to Filecoin clients and APIs to store your data

Hub CLI

Takes a few steps to install and will be needed to follow along with the steps later in the workshop.

A growing ecosystem of tools to add your data to Filecoin.

Network Clients: Lotus

Network Clients: Powergate

Interfaces: Fleek

Interfaces: Voodfy

Interfaces: file.video

Interfaces: Slate

APIs: nft.storage

APIs: Filswan

APIs: Powergate, again!

APIs: Textile Buckets

A Filecoin client for any byte.

Buckets

Buckets provide object storage, synchronization, and sharing over IPFS and Filecoin. They are easy to use and full of features.

  • CLI or API - Buckets can be used from your command-line or built into your application or web-app using a fully-featured API.
  • Single-user - Use buckets to push your data to the IPFS in a single command.
  • Multi-user - Invite others to watch or help manage your buckets.

press down to learn more about buckets or right to continue the tour

Buckets

Buckets bridge multiple protocols so you can use the best for any use-case.

  • IPFS - When connected to the Textile Hub, all bucket contents are published over IPFS. The IPFS CID will update on each change.
  • IPNS - Every bucket gets its own IPNS address that provides a stable address to the bucket over IPFS.
  • HTTP - The Textile Hub will give your bucket a static HTTP URL to use at `<key>.textile.space`.
  • Filecoin - The bucket archive API can be used to store snapshots of your buckets on Filecoin.

press down to learn more about buckets or right to continue the tour

js-buckets

You can embed the buckets API in your app and give your users their own buckets.

  • @textile/buckets - buckets client written in typescript and available for NodeJS or in the Browser. Available in @textile/hub too.
  • Account Keys - manage your personal or your organization's buckets on the Textile Hub.
  • User Keys - embed buckets in your app and let your users create/edit their own.

press down to learn more about buckets or right to continue the tour

cryptography = await import("https://unpkg.com/@textile/crypto?module")
api = await import("https://unpkg.com/@textile/[email protected]?module")
buck = await api.Buckets.withKeyInfo({ key: "apikey", secret: "secret" })

const alice = cryptography.PrivateKey.fromRandom()
await buck.getToken(alice)

const { root, threadID } = await buck.getOrCreate('bucket', {
    threadName: 'default',
    encrypted: false,
})

const nodes = await buckets.listPath(key, "")
if (nodes.item) {
    for (const obj of nodes.item.items) {
        if (obj.name === '.textileseed') continue
        if (obj.isDir) {
            console.log(`${obj.name}`)
        }
    }
}

Fresh off the press. go-buckets is a full node for services and apps.

  • services - expose bucket APIs as part of your own platform or service. gRPC API and client.
  • desktop - use go-buckets to build desktop applications, tray utilities, and background services that efficiently move data across IPFS and Filecoin.
  • pinning services - run your own pinning service, with permissioning and pinset sync, in seconds.

press down to learn more about buckets or right to continue the tour

Textile Hub

Hosted access to the IPFS and Filecoin network. Bucket persistence, Thread APIs, and more.

  • Free signup
  • Instant access to IPFS pinning for your buckets.
  • Easy to use client libraries to embed threads and buckets in your app.
  • Simple Filecoin API for your data.

press down to learn more about the hub or right to continue the tour

Your first Filecoin deal

  • Use the Textile Hub to manage deal creation on Filecoin.
  • Push any bucket as a new deal to store on the network.
  • Use the Miner Index to find cheap miners ready to store your data.
  • Fetch or recover previously stored buckets easily.
> hub init
> hub buck init --cid=bafybeihdavzx5tuykt43g4ohbwccfuvfcdwivmimw2uffpr5vzt2wrtyny
> hub fil addrs
> hub buck archive set-default-config --fast-retrieval --trusted-miners {A,B} --rep-factor 2
> hub buck archive
Success! Archive queued successfully

1. Init account

2. CD into a new directory. Init bucket (WARN: 5Gib download)

3. List and fund your Hub wallet address

4. Set bucket default storage config to use your miner

5. Kick off the storage deal with your miner

press down to learn more about the hub or right to continue the tour

Powergate

  • A production-ready Filecoin development stack.
  • Handle one-to-thousands of wallets.
  • Manage scalable deal-storage pipelines.
  • Integrated IPFS pinning API.
  • Get started here.

press down to learn more about powergate or right to continue the tour

Localnet

  • Develop with a full featured Filecoin network right on your device.
  • Dockerized miners that run fast
  • Experience the full network capabilities and workflow while building your application.
  • Get started here.

press down to learn more about powergate or right to continue the tour

Production

Miner Index

An easy to use API to discover miners on the Filecoin network and store your data.

Thanks!

Learn more at textile.io

Get in touch at https://slack.textile.io