Skip to content

Instantly share code, notes, and snippets.

andrewxhill /
Last active Aug 7, 2020
Powergate Workshop

Introduction to Filecoin app building

This document:

Slides from intro presentation:

In this workshop, we are going to introduce you to Filecoin through the use of the Powergate. While you can develop using Lotus or other Filecoin implementations directly, the Powergate is designed to provide the necessary abstractions to build Filecoin storage into your application. Some features of the Powergate include fast data retrieval with IPFS serving as a caching layer, deal management, multi-tenant wallet APIs, and more. The system comes set up to run locally in Docker or deploy to your servers.

We'll cover the Powergate CLI and the Powergate JavaScript Client in the two parts of the workshop. To prepare, we encourage you to install a few things before we get started.

View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<meta name="description" content="Template cloned from">
<style type="text/css">
html, body {
height: 100%;

On chatting to people

Chat is not the same as conversation. When you tag someone using the "@" or if you send them a direct message, you may be directly forcing them to change their focus to your problem. While this is good for you, it can be bad for a healthy and productive community. Here are a couple of rules to abide.

  • Only "@" tag people's names in the following cases.
    • Your comment is urgent/time-sensitive and you need the help of the "@" target.
    • Your comment has grown stale and you still need an answer that the "@" target can provide.
    • You comment is in a channel or thread where the "@" target is not present but you need them aware.
  • Abide by the "no hello" rule at all times. Provide the topic of your conversation immediately. This means, never start a DM or tag a person with the "@" symbol with a simple "hello", "good morning" or another nicety. While this is polite, it can cause a lot of inefficiency in group chat.
    • Example bad message: "Good morning @andrewxhill! Hope you are doi
View pseudo-bucket-example.ts
* Buckets
* You can now create Buckets for your User.
* Bucket contain raw files and documents.
const buckets = new Buckets(db.context);
const roots = await buckets.list();

Powergate Show & Tell


Create drop-in Filecoin API Management tools for systems and apps.

Key components:

  • Reputation Indices: A collection of data collected from the network for miner selection. Includes miner activity duration, slashing events, and deals.

Setup a new game of cmd-line tag!

Create a new game


sh "Game 1"
andrewxhill /
Created Apr 21, 2019
Update an IPFS record in Cloudflare DNS
set -e # abort on any error
HASH=${1?param missing - hash.}
if [[ -z "${PAGES_CLOUDFLARE_API_KEY}" ]]; then
echo "See setup instructions to set PAGES_CLOUDFLARE_API_KEY"
exit 1
import ipfsapi
import requests
import random
import string
# Gateways
gateways = [

Keybase proof

I hereby claim:

  • I am andrewxhill on github.
  • I am andrewxhill ( on keybase.
  • I have a public key ASCQCpQbOhKgXK6xK9-Xo-2vx_oQgf9v6vW7q6S_ry6FFgo

To claim this, I am signing this object:

You can’t perform that action at this time.