Add Keys

This tutorial explains how to add public keys to a DID registered on InfraDID parachain.

Before you begin

Before you begin, Make sure you have the following:

Adding Public Keys to InfraDID

InfraDID registered on the chain allows management of various items, one of which is the list of public keys. By storing a list of public keys that a specific DID can use on the chain, it makes it public for other users to inspect the Document of a specific DID.

To add public keys to InfraDID, follow these steps:

  1. Visit the InfraBlockchain Explorer and follow the steps below.

  • Go to Developer - Extrinsic and select the addKeys extrinsic of the didModule palette.

    Configure it as shown below and trigger the extrinsic:

    add-keys

    Encode call data:

    0x3404d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d04012e7222343997d83b3571b176837092986630c3de8fcdc91ba74d31bbb11c1181000000000000d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d0100000001f62b5a39b0fceeb51d16b2a189da0e73f15f384497dcdd63a1f9a7c626f7649941b4a8cb66fed18c65574117a2f1ed607591dda6f6ec3bdfff40a09a71e202803

Removing Public Keys from InfraDID

To remove public keys from InfraDID, follow these steps:

  1. Visit the InfraBlockchain Explorer and follow the steps below.

  • Go to Developer - Extrinsic and select the removeKeys extrinsic of the didModule palette.

    Configure it as shown below and trigger the extrinsic:

    remove-keys

Adding and Removing Public Keys from InfraDID Using the infra-did-js Library

To add and remove public keys from InfraDID using the infra-did-js library:

  1. Install the infra-did-js library.

  2. Write code to set up the basic configuration code for accessing InfraDID chain, as shown below:

  3. Write code to add public keys to InfraDID:

  4. Alternatively, write code to remove public keys from InfraDID:

Next steps

Last updated