Skip to main content

๐Ÿข Attester

This section of the workshop covers creating the Attester code. The steps are the following:

  1. Create an account to pay for all transactions and storage deposits.
  2. Create a DID, which is the identity used to create attestations.

While you can always switch the KILT account and pay deposits and fees with any account you like, your DID stays the same and is the way Claimers identify and trust you.

  1. Before you can attest claims, you need a CType that describes and gives context to what you attest.
  2. Once you have a way to pay fees and deposits, have an identity, and a CType, you can create attestations.

Folder Structureโ€‹

Create the following files in the attester folder. These folders mimic an Attester service.

โ””โ”€ kilt-rocks/ # project
โ””โ”€ attester/ # all attester code
โ”œโ”€ attestCredential.ts # issues attestations
โ”œโ”€ ctypeSchema.ts # create a local CType definition
โ”œโ”€ generateAccount.ts # functions for setting up and loading the attester's account
โ”œโ”€ generateCtype.ts # register the CType on chain
โ”œโ”€ generateDid.ts # registers the attester's on-chain DID
โ””โ”€ generateKeypairs.ts # setup the keys for the attester's DID