🏗️GraphQL API

This GraphQL schema defines the types and operations available in the API.

Types

Circle Type

Represents a circle.

Field
Type
Description

id

ID!

The unique identifier of the circle.

name

String!

The name of the circle.

badgeDisplayName

String

The display name of the circle's badge.

description

String

The description of the circle.

tooltip

String

The tooltip for the circle.

image

String

The image associated with the circle.

contentURI

String!

The content URI of the circle.

members

[String]

The list of members in the circle.

coordinator

String

The coordinator of the circle.

createdAt

String

The creation timestamp of the circle.

updatedAt

String

The last update timestamp of the circle.

requirements

[String]

The list of requirements for the circle.

createdTxHash

String

The transaction hash of the circle creation.

circleType

String

The type of the circle.

circleMetadata

String

The metadata associated with the circle.

ProofRecord Type

Represents a proof record.

Field
Type
Description

proofId

ID!

The unique identifier of the proof.

circleId

String!

The ID of the circle associated with the proof.

signal

String!

The signal of the proof.

proof

[String!]!

The list of proofs for the record.

txHash

String!

The transaction hash of the proof.

createdAt

String

The creation timestamp of the proof record.

updatedAt

String

The last update timestamp of the proof record.

blockNumber

Int

The block number of the proof.

CircleStats Type

Represents statistics for a circle.

Field
Type
Description

proofs

Int

The number of proofs in the circle.

members

Int

The number of members in the circle.

SystemStats Type

Represents system-wide statistics.

Field
Type
Description

totalCircles

Int

The total number of circles.

totalProofs

Int

The total number of proofs.

totalMembers

Int

The total number of members.

Query Type

The root query type.

Field
Arguments
Return Type
Description

verifyToken

token: String!

Boolean

Verifies a token.

getAuthChallenge

address: String!

String

Gets the authentication challenge for the provided address.

stats

SystemStats

Retrieves system-wide statistics.

circles

[Circle]

Retrieves all circles.

circlesByType

circleType: String!

[Circle]

Retrieves circles by type.

circle

id: ID!

Circle

Retrieves a circle by ID.

circleByName

name: String!

Circle

Retrieves a circle by name.

isConnected

service: String!

String

Checks if a service is connected.

myCircles

[Circle]

Retrieves circles associated with the current user.

circleStats

circleId: ID!

CircleStats

Retrieves statistics for a specific circle.

getBalanceOfProofCircleId

token: String!, minBalance: String

String

Retrieves the balance for the given proof circle ID.

proof

proofId: ID!

ProofRecord

Retrieves a proof record by ID.

getProofsByCircleId

circleId: ID!

[ProofRecord]

Retrieves proof records by circle ID.

getProofsByCircleIdAndSignal

circleId: ID!, signal: String!

[ProofRecord]

Retrieves proof records by circle ID and signal.

getProofsByTxHash

txHash: String!

[ProofRecord]

Retrieves proof records by transaction hash.

verifyProof

circleId: ID!, signal: String!, nullifierHash: String!, externalNullifier: String!, solidityProof: [String]

String

Verifies a proof.

getOwnedRepos

ethAddress: String!

[String]

Retrieves the owned repositories for the given Ethereum address.

getConnectedTwitterUser

String

Retrieves the connected Twitter user.

hasTokyoNFT

ethAddress: String!

Boolean

Checks if the provided Ethereum address has the Tokyo NFT.

getTxHashByCircleIdAndCommitment

circleId: ID!, commitment: String!

String

Retrieves the transaction hash for the given circle ID and commitment.

Mutation Type

The root mutation type.

Field
Arguments
Return Type
Description

createCircle

circleId: ID!, name: String!, displayName: String, tooltip: String, image: String, description: String, coordinator: String!, members: [String], circleType: String, circleMetadata: String, signature: String

String

Creates a new circle.

addIdentityToCircle

circleId: ID!, identityCommitment: String!

Circle

Adds an identity to the specified circle.

revokeIdentityFromCircle

circleId: ID!, identityCommitment: String!

Circle

Revokes an identity from the specified circle.

broadcastSignal

circleId: ID!, signal: String!, nullifierHash: String!, externalNullifier: String!, solidityProof: [String]

String

Broadcasts a signal and its associated proof.

broadcastTestSignal

circleId: ID!, signal: String!, seed: String!

String

Broadcasts a test signal with the specified seed.

deleteCircle

circleId: ID!

Boolean

Deletes the specified circle.

broadcastPost

circleId: ID!, profileId: String!, contentURI: String!, refInitData: String! signature: String

String

Broadcasts a post within the specified circle.

broadcastComment

circleId: ID!, profileId: String!, pointedPost: String!, contentURI: String, refInitData: String!, refData: String!, signature: String

String

Broadcasts a comment within the specified circle.

createBalanceOfProof

identityCommitment: String!, ethAddress: String!, balance: String!, linkedEOASig: String, secondaryEOASig: String, secondaryEOAAddress: String

String

Creates a balance of proof.

createProofOfLens

identityCommitment: String!, ethAddress:String!, lensId: String!, linkedEOASig: String, secondaryEOASig: String, secondaryEOAAddress: String

String

Creates a proof of lens.

createProofOfNFT

identityCommitment: String!, ethAddress: String!, nftAddress: String!, linkedEOASig: String, secondaryEOASig: String, secondaryEOAAddress: String

String

Creates a proof of NFT.

createGithubRepoOwnerProof

identityCommitment: String!, repoName: String!, signature: String

String

Creates a proof of ownership for a GitHub repository.

createProofOfTwitter

identityCommitment: String!, ethAddress: String!, twitterHandle: String!, signature: String

String

Creates a proof of ownership for a Twitter account.

Note: The exclamation mark (!) after a type indicates that the field is non-nullable.

Queries

stats

Retrieves system-wide statistics.

stats: SystemStats
  • Returns:

    • An object of type SystemStats containing the following fields:

      • totalCircles: An integer representing the total number of circles.

      • totalProofs: An integer representing the total number of proofs.

      • totalMembers: An integer representing the total number of members.


circles

Retrieves all circles.

circles: [Circle]
  • Returns:

    • An array of Circle objects representing all the circles.


circlesByType

Retrieves circles by type.

circlesByType(circleType: String!): [Circle]
  • Arguments:

    • circleType (required): A string representing the type of circles to retrieve.

  • Returns:

    • An array of Circle objects representing the circles of the specified type.


circle

Retrieves a circle by ID.

circle(id: ID!): Circle
  • Arguments:

    • id (required): The ID of the circle to retrieve.

  • Returns:

    • A Circle object representing the retrieved circle.

Mutations

createCircle

Creates a new circle.

createCircle(
  circleId: ID!,
  name: String!,
  displayName: String,
  tooltip: String,
  image: String,
  description: String,
  coordinator: String!,
  members: [String],
  circleType: String,
  circleMetadata: String,
  signature: String
): String
  • Arguments:

    • circleId (required): The ID of the circle.

    • name (required): The name of the circle.

    • displayName: The display name of the circle.

    • tooltip: The tooltip text for the circle.

    • image: The image URL for the circle.

    • description: The description of the circle.

    • coordinator (required): The coordinator of the circle.

    • members: An array of member IDs associated with the circle.

    • circleType: The type of the circle.

    • circleMetadata: Additional metadata for the circle.

    • signature: The signature for creating the circle.

  • Returns:

    • A string representing the created circle.


addIdentityToCircle

Adds an identity to the specified circle.

addIdentityToCircle(
  circleId: ID!,
  identityCommitment: String!
): Circle
  • Arguments:

    • circleId (required): The ID of the circle.

    • identityCommitment (required): The identity commitment to be added.

  • Returns:

    • A Circle object representing the circle with the added identity.


revokeIdentityFromCircle

Revokes an identity from the specified circle.

revokeIdentityFromCircle(
  circleId: ID!,
  identityCommitment: String!
): Circle
  • Arguments:

    • circleId (required): The ID of the circle.

    • identityCommitment (required): The identity commitment to be revoked.

  • Returns:

    • A Circle object representing the circle with the revoked identity.


broadcastSignal

Broadcasts a signal and its associated proof.

broadcastSignal(
  circleId: ID!,
  signal: String!,
  nullifierHash: String!,
  externalNullifier: String!,
  solidityProof: [String]
): String
  • Arguments:

    • circleId (required): The ID of the circle.

    • signal (required): The signal to be broadcasted.

    • nullifierHash (required): The nullifier hash associated with the signal.

    • externalNullifier (required): The external nullifier associated with the signal.

    • solidityProof: An array of strings representing the solidity proof.

  • Returns:

    • A string representing the result of the broadcast.


broadcastTestSignal

Broadcasts a test signal with the specified seed.

broadcastTestSignal(
  circleId: ID!,
  signal: String!,
  seed: String!
): String
  • Arguments:

    • circleId (required): The ID of the circle.

    • signal (required): The signal to be broadcasted.

    • seed (required): The seed for generating the test signal.

  • Returns:

    • A string representing the result of the broadcast.

broadcastPost

Broadcasts a post within the specified circle.

broadcastPost(
  circleId: ID!,
  profileId: String!,
  contentURI: String!,
  refInitData: String!,
  signature: String
): String
  • Arguments:

    • circleId (required): The ID of the circle.

    • profileId (required): The profile ID associated with the post.

    • contentURI (required): The content URI of the post.

    • refInitData (required): The reference initialization data for the post.

    • signature: The signature for creating the post.

  • Returns:

    • A string representing the result of the broadcast.


broadcastComment

Broadcasts a comment within the specified circle.

broadcastComment(
  circleId: ID!,
  profileId: String!,
  pointedPost: String!,
  contentURI: String,
  refInitData: String!,
  refData: String!,
  signature: String
): String
  • Arguments:

    • circleId (required): The ID of the circle.

    • profileId (required): The profile ID associated with the comment.

    • pointedPost (required): The ID of the post being commented on.

    • contentURI: The content URI of the comment.

    • refInitData (required): The reference initialization data for the comment.

    • refData (required): The reference data for the comment.

    • signature: The signature for creating the comment.

  • Returns:

    • A string representing the result of the broadcast.


createBalanceOfProof

Creates a balance of proof.

createBalanceOfProof(
  identityCommitment: String!,
  ethAddress: String!,
  balance: String!,
  linkedEOASig: String,
  secondaryEOASig: String,
  secondaryEOAAddress: String
): String
  • Arguments:

    • identityCommitment (required): The identity commitment for the balance of proof.

    • ethAddress (required): The Ethereum address associated with the balance of proof.

    • balance (required): The balance value.

    • linkedEOASig: The signature of the linked Ethereum address.

    • secondaryEOASig: The signature of the secondary Ethereum address.

    • secondaryEOAAddress: The secondary Ethereum address.

  • Returns:

    • A string representing the created balance of proof.


createProofOfLens

Creates a proof of lens.

createProofOfLens(
  identityCommitment: String!,
  ethAddress:String!,
  lensId: String!,
  linkedEOASig: String,
  secondaryEOASig: String,
  secondaryEOAAddress: String
): String
  • Arguments:

    • identityCommitment (required): The identity commitment for the proof of lens.

    • ethAddress (required): The Ethereum address associated with the proof of lens.

    • lensId (required): The ID of the lens.

    • linkedEOASig: The signature of the linked Ethereum address.

    • secondaryEOASig: The signature of the secondary Ethereum address.

    • secondaryEOAAddress: The secondary Ethereum address.

  • Returns:

    • A string representing the created proof of lens.

createProofOfNFT

Creates a proof of NFT.

createProofOfNFT(
  identityCommitment: String!,
  ethAddress: String!,
  nftAddress: String!,
  linkedEOASig: String,
  secondaryEOASig: String,
  secondaryEOAAddress: String
): String
  • Arguments:

    • identityCommitment (required): The identity commitment for the proof of NFT.

    • ethAddress (required): The Ethereum address associated with the proof of NFT.

    • nftAddress (required): The address of the NFT contract.

    • linkedEOASig: The signature of the linked Ethereum address.

    • secondaryEOASig: The signature of the secondary Ethereum address.

    • secondaryEOAAddress: The secondary Ethereum address.

  • Returns:

    • A string representing the created proof of NFT.


createGithubRepoOwnerProof

Creates a proof of Github repo ownership.

createGithubRepoOwnerProof(
  identityCommitment: String!,
  repoName: String!,
  signature: String
): String
  • Arguments:

    • identityCommitment (required): The identity commitment for the Github repo ownership proof.

    • repoName (required): The name of the repository.

    • signature: The signature for creating the Github repo owner proof.

  • Returns:

    • A string representing the created Github repo owner proof.


createProofOfTwitter

Creates a proof of Twitter account ownership.

createProofOfTwitter(
  identityCommitment: String!,
  ethAddress: String!,
  twitterHandle: String!,
  signature: String
): String
  • Arguments:

    • identityCommitment (required): The identity commitment for the Twitter account ownership proof.

    • ethAddress (required): The Ethereum address associated with the proof.

    • twitterHandle (required): The Twitter handle.

    • signature: The signature for creating the Twitter account ownership proof.

  • Returns:

    • A string representing the created Twitter account ownership proof.

Last updated