🏗️GraphQL API

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

Types

Circle Type

Represents a circle.

ProofRecord Type

Represents a proof record.

CircleStats Type

Represents statistics for a circle.

SystemStats Type

Represents system-wide statistics.

Query Type

The root query type.

Mutation Type

The root mutation type.

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