Skip to content

Instantly share code, notes, and snippets.

@drshrey
Last active August 17, 2022 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drshrey/590293070dd08c6226b8d63c1014f083 to your computer and use it in GitHub Desktop.
Save drshrey/590293070dd08c6226b8d63c1014f083 to your computer and use it in GitHub Desktop.
Configcaster API Docs

Configcaster API Docs

Base API URL: https://configcaster-api-production.up.railway.app

Routes:

  1. GET /configs

Request Query Parameters:

Choose one of these, not both

  • connectedAddress: string: Connected address to Farcaster user
  • farcasterUsername: string: Farcaster user

Example Response:

{
  "farcasterUsername": "shreyas",
  "connectedAddress": "0x7cC789f9c8Ba2a61E1D40AEdB9506B95fEE1a393",
  "config": {
    "nft_whitelist": [],
    "dark_mode": false,
    "email_address": "97fd723f792e953eac763e48bc27ff48c0342c5ed641963f66e2d71e79e59d6a" # Privy.io Integrity Hash
  }
}
  1. POST /configs
type Config = {
  email_address: "string",
  nft_whitelist: ["string1", "string2"],
  dark_mode: boolean
}

type Proof = {
  "hash",
  hashAlgorithm: 'sha3',
  "signature",
  signatureAlgorithm: 'secp256k1',
  address: "connected address to farcaster user",
  farcasterUsername: "farcaster username",
}

Request Body:

  • config: Config: Config structure to store.
  • proof: Proof: Proof that the owner of the Config is authorizing this change.

Example Response

{
  "farcasterUsername": "shreyas",
  "connectedAddress": "0x7cC789f9c8Ba2a61E1D40AEdB9506B95fEE1a393",
  "config": {
    "nft_whitelist": [],
    "dark_mode": false,
    "email_address": "97fd723f792e953eac763e48bc27ff48c0342c5ed641963f66e2d71e79e59d6a"
  }
}
  1. POST /reveal_private_value

Request Body:

  • field: string: Private field to reveal corresponding plaintext value for
    • Valid options: email-address
  • proof: Proof: Proof that the owner of the Config is authorizing this read.
  • connectedAddress: string: Connected address to Farcaster user

Example Response:

{ 
  "plaintext": "shreyas@shreyasj.com"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment