๐ข Attester
This section of the workshop covers creating the Attester code. The steps are the following:
- Create an account to pay for all transactions and storage deposits.
- 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.
- Before you can attest claims, you need a CType that describes and gives context to what you attest.
- 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.
- Typescript
- Javascript
โโ 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
cd attester && touch attestCredential.ts ctypeSchema.ts generateAccount.ts generateCtype.ts generateDid.ts generateKeypairs.ts && cd ..
โโ kilt-rocks/ # project
โโ attester/ # all attester code
โโ attestCredential.js # issues attestations
โโ ctypeSchema.js # create a local CType definition
โโ generateAccount.js # functions for setting up and loading the attester's account
โโ generateCtype.js # register the CType on chain
โโ generateDid.js # registers the attester's on-chain DID
โโ generateKeypairs.js # setup the keys for the attester's DID
cd attester && touch attestCredential.js ctypeSchema.js generateAccount.js generateCtype.js generateDid.js generateKeypairs.js && cd ..