> For the complete documentation index, see [llms.txt](https://dev-en.omnione.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev-en.omnione.net/sdk-instruction-guide/core-sdk-guide/java-wallet/untitled-3.md).

# IWDIDManager

## IWDIDManager

```
public IWDIDManager(String pathWithName)
```

Descriptor

* Constructor

Parameter

| Type   | Name         |                       Description |
| ------ | ------------ | --------------------------------: |
| String | pathWithName | DID Document Name (Path included) |

### isExistDID

```
public boolean isExistDID()
```

Description

* Checks if the DID Document exists in the local

Return

* boolean: true, if exist

### saveToFile

```
public boolean saveToFile(String didsJSON) throws IWException
```

Description

* Saves the DID Document(JSON)&#x20;

Parameter

| Type   |   Name   |        Description |
| ------ | :------: | -----------------: |
| String | didsJSON | Did Document(JSON) |

Return

* boolean:  true, if save is successful &#x20;

Throws

* IWException

### makeRequestDIDsRead

```
public String makeRequestDIDsRead() throws IWException
```

Description

* Searches the DID Document&#x20;

Return

* String : Did Document(JSON)

Throws

* IWException

### deleteDidFile

```
public void deleteDIDFile()
```

Description

* Deletes Did Document file

### genDid

```
 public String genDID() throws IWException
```

Description

* Creates the DID  &#x20;

  ex) did:omn:\~

Return

* String: created DID

Throws

* IWException

### genDid(prefix)

```
 public String genDID(String prefix) throws IWException
```

Description

* Create prefix-attatched DID&#x20;

  ex) did:omn:prefix:\~

Parameter

| Type   |  Name  | Description |
| ------ | :----: | ----------: |
| String | prefix |      prefix |

Return

* String: created DID

Throws

* IWException

### makeRequestDIDsCreate

```
String makeRequestDIDsCreate(String did, List<String> createKeyIds, IWKeyManager keyManager) throws IWException
```

Description

* Create a request to register DID Document(JSON) in the blockchain&#x20;

Parameter

| Type           |     Name     |                                          Description |
| -------------- | :----------: | ---------------------------------------------------: |
| String         |      did     |                                                  DID |
| List< String > | createKeyIds | KeyID list of Keys for public key and authentication |
| IWKeyManager   |  keyManager  |                  Key Manager with an unlocked status |

Return

* String: request full-text(JSON)

Throws

* IWException

### makeRequestDIDsAdd

```
public String makeRequestDIDsAdd(String addKeyId, IWKeyManager keyManager) throws IWException
```

Description

* Add keyId to DID Document then Make DID Document (JSON) for registration to Blockchain

Parameter

| Type         |    Name    |                         Description |
| ------------ | :--------: | ----------------------------------: |
| String       |  addKeyId  |                     a key Id to add |
| IWKeyManager | keyManager | Key Manager with an unlocked status |

Return

* String: request full-text (JSON)

Throws

* IWException

### makeRequestDIDsDelete

```
public String makeRequestDIDsDelete(String deleteKeyId) throws IWException
```

Description

* Remove keyId from Did Document then Make Did Document Json for registration to Blockchain

Parameter

| Type   |     Name    |        Description |
| ------ | :---------: | -----------------: |
| String | deleteKeyId | a key Id to delete |

Return

* String: request full-text (JSON)

Throws

* IWException

### makeDIDAssertion

```
 public String makeDIDAssertion(String type, String signKeyId, byte[] source, IWKeyManager keyManager) throws IWException
```

Description

* Create the DID Assertion(JSON) and Proof

Parameter

| Type         |    Name    |                                            Description |
| ------------ | :--------: | -----------------------------------------------------: |
| String       |    type    | Assertion type (currently only "default" is supported) |
| String       |  signKeyId |                                       a Key Id to sign |
| byte\[]      |   source   |                                           Random value |
| IWKeyManager | keyManager |                    Key manager with an unlocked status |

Return

* String: DID Assertion(JSON) and Proof

Throws

* IWException

### makeDIDRevokeAssertion

```
 public String makeDIDAssertion(String type, String signKeyId, DIDRevoke didRevoke, byte[] nonce, IWKeyManager keyManager) throws IWException
```

Description

* Create DID Document(JSON) and Proof to register in the blockchain.

Parameter

| Type         |    Name    |                         Description |
| ------------ | :--------: | ----------------------------------: |
| String       |    type    |        DID Assertion Type. "revoke" |
| String       |  signKeyId |                    a key Id to sign |
| DIDRevoke    |  didRevoke |                       Revoke Object |
| byte\[]      |    nonce   |                        Random value |
| IWKeyManager | keyManager | Key manager with an unlocked status |

Return

* String: Assertion(JSON) and Proof

Throws

* IWException

### makeProof

```
 public String makeProof(String didsJSON, String signKeyId, byte[] nonce, IWKeyManager keyManager) throws IWException
```

Description

* create DID Document (JSON) and Proof to register on the blockchain.

Parameter

| Type         |    Name    |                         Description |
| ------------ | :--------: | ----------------------------------: |
| String       |  didsJSON  |                  Did Document(JSON) |
| String       |  signKeyId |                    a key Id to sign |
| byte\[]      |    nonce   |                        Random value |
| IWKeyManager | keyManager | Key Manager with an unlocked status |

Return

* String: Did Document(JSON) and Proof

Throws

* IWException
