Skip to content

icebreakerlabs/alloy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alloy by Icebreaker

An alloy is formed by mixing various existing materials together, often resulting in superior properties vs. the inputs alone. This sums Icebreaker's approach to identity. This repo will progressively open source key components of the icebreaker application which promotes interoperable identity and networking

To propose a new account type, simply propose a name, prefix pattern, and an icon:

  1. In channelTypes.ts, add your proposed channel slug (all lowercase with no spaces, underscores, or dashes) in the CHANNEL_TYPES array.
  2. In channelTypes.ts, add your proposed prefix in the CHANNEL_TYPE_PREFIXES array, using your proposed channel slug
  3. Optional: If a new icon is required, propose a react icon or add a new icon svg in your PR by creating a new icon file in the src/app/components/icons folder
  4. Open a PR against this repo and a team member will review it and merge in if complete and at least 3 people attest they will use the channel if it were available

That's it!

To propose a new credential to be displayed on icebreaker, it is just a few lines of code if it is already available on ethereum attestation service

  1. In eas_schemas.ts, add your proposed credential at the end of the EAS_SCHEMAS array. A sample format is below:

      {
     id: "54",
     isEnabled: true,
     attester: "0xdc81d807f0e1a638ddd5cbf37f1320d86d0de30c",
     chain: "optimism",
     name: "ENS Delegate",
     schemaEncoding: "bool isEnsDelegate",
     schemaId:
       "0x640fbe0854497111367645de93b34b4ff946d9ab500668e997903913b0199316",
     targetField: "isEnsDelegate",
     filter: { isEnsDelegate: true },
     isBoolean: true,
      },
    
    
  • Replace the chain with your chainslug (optimism polygon base ethereum sepolia arbitrum arbitrum nova scroll zksync etc). Can be any one of EAS supported chains
  • Replace the name with the user visible name you'd like to display in the icebreaker UI for users who have this credential. Note that Icebreaker may modify this name if it may be confused with other names.
  • Replace schemaEncoding with the encoding from your EAS schema
  • Replace schemaId with the schema UID from your EAS schema
  • Replace targetField with the field you want to check to determine the name. If the name is simply a boolean, then the target field can be any field on the schema that will always be populated.
  • Optionally replace isBoolean with whether you want the credential to append the values of the targetField when displaying in the Icebreaker UI. For example, for schema 59 for Icebreaker memberships, if isBoolean is true, the credential for an isMember attestation with name = Icebreaker and role = Premium will display as Icebreaker, but if isBoolean is set to false, the credential for the same attestation will display as Icebreaker: Premium.
  • Optionally add a filter if you are using a schema where not all the attestations should count toward the credential. For example, if using the Memberships schema on base, we recommend you set a filter to at least include name: yourmembershipname and any other identifying data required to determine whether an attestation is valid.
  • Additional fields are available that control advanced logic for the credential, like whether it is reattestable, whether anyone can attest to it, whether it is a number and if so how to parse the units, etc. Feel free to reach out to icebreaker for details if you're not sure!

We will add more detail to this section over time to make it easier to interoperate with schemas and make them usable on icebreaker and elsewhere.

About

Repo for supported credentials on icebreaker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •