# Identities

Handles all Identity related functionality

## Hierarchy

* **Identities**

## Index

### Methods

* [createPortfolio](#createportfolio)
* [getIdentity](#getidentity)
* [isIdentityValid](#isidentityvalid)
* [registerIdentity](#registeridentity)

## Methods

### createPortfolio

▸ **createPortfolio**(`args`: object, `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue.md)*‹*[*NumberedPortfolio*](/polymesh-sdk-api-reference/docs-beta/classes/numberedportfolio.md)*››*

*Defined in* [*src/Identities.ts:61*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/Identities.ts#L61)

Create a new Portfolio under the ownership of the signing Identity

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md), which means you can call [createPortfolio.checkAuthorization](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters:**

▪ **args**: *object*

| Name   | Type   |
| ------ | ------ |
| `name` | string |

▪`Optional` **opts**: [*ProcedureOpts*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)

**Returns:** *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue.md)*‹*[*NumberedPortfolio*](/polymesh-sdk-api-reference/docs-beta/classes/numberedportfolio.md)*››*

***

### getIdentity

▸ **getIdentity**(`args`: object): *Promise‹*[*Identity*](/polymesh-sdk-api-reference/docs-beta/classes/identity.md)*›*

*Defined in* [*src/Identities.ts:70*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/Identities.ts#L70)

Create an Identity instance from a DID

**`throws`** if there is no Identity with the passed DID

**Parameters:**

▪ **args**: *object*

| Name  | Type   |
| ----- | ------ |
| `did` | string |

**Returns:** *Promise‹*[*Identity*](/polymesh-sdk-api-reference/docs-beta/classes/identity.md)*›*

***

### isIdentityValid

▸ **isIdentityValid**(`args`: object): *Promise‹boolean›*

*Defined in* [*src/Identities.ts:77*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/Identities.ts#L77)

Return whether the supplied Identity/DID exists

**Parameters:**

▪ **args**: *object*

| Name       | Type                                                                            |
| ---------- | ------------------------------------------------------------------------------- |
| `identity` | [Identity](/polymesh-sdk-api-reference/docs-beta/classes/identity.md) \| string |

**Returns:** *Promise‹boolean›*

***

### registerIdentity

▸ **registerIdentity**(`args`: [RegisterIdentityParams](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/registeridentityparams.md), `opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue.md)*‹*[*Identity*](/polymesh-sdk-api-reference/docs-beta/classes/identity.md)*››*

*Defined in* [*src/Identities.ts:51*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/Identities.ts#L51)

Register an Identity

**`note`** must be a CDD provider

**`note`** this may create [Authorization Requests](/polymesh-sdk-api-reference/docs-beta/classes/authorizationrequest.md) which have to be accepted by the `targetAccount`. An [Account](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/enums/signertype.md#account) or [Identity](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/enums/roletype.md#identity) can fetch its pending Authorization Requests by calling [authorizations.getReceived](/polymesh-sdk-api-reference/docs-beta/classes/authorizations.md#getreceived). Also, an Account or Identity can directly fetch the details of an Authorization Request by calling [authorizations.getOne](/polymesh-sdk-api-reference/docs-beta/classes/authorizations.md#getone)

**`note`** required role:

* Customer Due Diligence Provider

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md), which means you can call [registerIdentity.checkAuthorization](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/proceduremethod.md#checkauthorization) on it to see whether the signing Account and Identity have the required roles and permissions to run it

**Parameters:**

| Name    | Type                                                                                                                               |
| ------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `args`  | [RegisterIdentityParams](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/registeridentityparams.md) |
| `opts?` | [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)                   |

**Returns:** *Promise‹*[*TransactionQueue*](/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue.md)*‹*[*Identity*](/polymesh-sdk-api-reference/docs-beta/classes/identity.md)*››*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/identities.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
