# Identities

Handles all Identity related functionality

## Hierarchy

* **Identities**

## Index

### Methods

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

## Methods

### createPortfolio

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

*Defined in* [*src/Identities.ts:82*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/Identities.ts#L82)

Create a new Portfolio under the ownership of the signing Identity

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/proceduremethod.md), which means you can call [createPortfolio.checkAuthorization](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/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/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/procedureopts.md)

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/transactionqueue)*‹*[*NumberedPortfolio*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/numberedportfolio)*\[],* [*NumberedPortfolio*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/numberedportfolio)*››*

***

### createPortfolios

▸ **createPortfolios**(`args`: object, `opts?`: [ProcedureOpts](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/transactionqueue)*‹*[*NumberedPortfolio*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/numberedportfolio)*\[]››*

*Defined in* [*src/Identities.ts:92*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/Identities.ts#L92)

Creates a set of new Portfolios under the ownership of the signing Identity

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/proceduremethod.md), which means you can call [createPortfolios.checkAuthorization](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/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      |
| ------- | --------- |
| `names` | string\[] |

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

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/transactionqueue)*‹*[*NumberedPortfolio*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/numberedportfolio)*\[]››*

***

### getIdentity

▸ **getIdentity**(`args`: object): *Promise‹*[*Identity*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/identity)*›*

*Defined in* [*src/Identities.ts:101*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/Identities.ts#L101)

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*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/identity)*›*

***

### isIdentityValid

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

*Defined in* [*src/Identities.ts:108*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/Identities.ts#L108)

Return whether the supplied Identity/DID exists

**Parameters:**

▪ **args**: *object*

| Name       | Type                                                                                                  |
| ---------- | ----------------------------------------------------------------------------------------------------- |
| `identity` | [Identity](https://developers.polymath.network/polymesh-sdk-api-reference/classes/identity) \| string |

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

***

### registerIdentity

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

*Defined in* [*src/Identities.ts:72*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/Identities.ts#L72)

Register an Identity

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

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

**`note`** required role:

* Customer Due Diligence Provider

**`note`** this method is of type [ProcedureMethod](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/proceduremethod.md), which means you can call [registerIdentity.checkAuthorization](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/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/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/registeridentityparams.md) |
| `opts?` | [ProcedureOpts](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/procedureopts.md)                   |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/transactionqueue)*‹*[*Identity*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/identity)*››*
