Skip to main content
info
IOTA Identity for Rebased is currently in alpha and may still be subject to significant changes

Creating a Decentralized Identity

If you want to benefit from Self-Sovereign Identity, you need to create a Decentralized Identity. This identity consists of many parts that have different functions.

DID method Specification

Note that the Iota Identity Framework follows IOTA DID Method Specification.

Identity Generation Process

1. Get Funds to cover the gas costs

The first thing you will need to generate an identity is an address with enough funds to cover the gas cost of the whole procedure. In test networks as well as local ones, you can use a faucet to request funds.

tip

If you want to use the main IOTA network, you will need an an address with actual IOTA funds to create a new Identity.

examples/utils/utils.rs
loading...

2. Create the content for the DID Document

As a bare minimum, a DID document needs at least one verification method.

At this point, the DID itself is unknown since the Identity object is not published yet and thus there's no ID for it.

tip

You can use a placeholder did:iota:0x0000000000000000000000000000000000000000000000000000000000000000 to reference the DID inside the document.

examples/utils/utils.rs
loading...

3. Construct an Identity Object

Next, you need to construct a new Identity Object that contains the just created DID Document. The created Identity contains an encoded version of the DID Document, and has a single controller that is represented by a newly created ControllerCap.

Controller Capability

When a new Identity is created the transaction's sender is assumed to be its controller and thus a ControllerCap is sent to its address.

examples/utils/utils.rs
loading...

Full Example Code

examples/0_basic/0_create_did.rs
loading...

Running Examples Locally

In order to run the examples, you will need to run an IOTA network locally.

If you want to use something different, you will need to modify the API and faucet endpoints in the examples to match your setup.