# AuthorizationRequest

Represents a request made by an Identity to another Identity (or Account) for some sort of authorization. This has multiple uses. For example, if Alice wants to transfer ownership of one of her Assets to Bob, this method emits an authorization request for Bob, who then has to accept it in order to complete the ownership transfer

## Hierarchy

* [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/entity)‹UniqueIdentifiers, [HumanReadable](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/humanreadable.md)›

  ↳ **AuthorizationRequest**

## Index

### Properties

* [authId](#authid)
* [context](#protected-context)
* [data](#data)
* [expiry](#expiry)
* [issuer](#issuer)
* [target](#target)
* [uuid](#uuid)

### Methods

* [accept](#accept)
* [exists](#exists)
* [isEqual](#isequal)
* [isExpired](#isexpired)
* [remove](#remove)
* [toHuman](#tohuman)
* [generateUuid](#static-generateuuid)
* [unserialize](#static-unserialize)

## Properties

### authId

• **authId**: *BigNumber*

*Defined in* [*src/api/entities/AuthorizationRequest.ts:99*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/AuthorizationRequest.ts#L99)

internal identifier for the Request (used to accept/reject/cancel)

***

### `Protected` context

• **context**: *Context*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule)*.*[*context*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/checkpointschedule#protected-context)

*Defined in* [*src/api/entities/Entity.ts:48*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Entity.ts#L48)

***

### data

• **data**: [*Authorization*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#authorization)

*Defined in* [*src/api/entities/AuthorizationRequest.ts:88*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/AuthorizationRequest.ts#L88)

Authorization Request data corresponding to type of Authorization

| Type                            | Data                            |
| ------------------------------- | ------------------------------- |
| Add Relayer Paying Key          | Beneficiary, Relayer, Allowance |
| Become Agent                    | Permission Group                |
| Attest Primary Key Rotation     | DID                             |
| Rotate Primary Key              | N/A                             |
| Rotate Primary Key to Secondary | Permissions                     |
| Transfer Ticker                 | Ticker                          |
| Add MultiSig Signer             | Account                         |
| Transfer Asset Ownership        | Ticker                          |
| Join Identity                   | Permissions                     |
| Portfolio Custody               | Portfolio                       |

***

### expiry

• **expiry**: *Date | null*

*Defined in* [*src/api/entities/AuthorizationRequest.ts:94*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/AuthorizationRequest.ts#L94)

date at which the Authorization Request expires and can no longer be accepted. At this point, a new Authorization Request must be emitted. Null if the Request never expires

***

### issuer

• **issuer**: [*Identity*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/identity)

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

Identity that emitted the request

***

### target

• **target**: [*Signer*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#signer)

*Defined in* [*src/api/entities/AuthorizationRequest.ts:65*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/AuthorizationRequest.ts#L65)

Identity or Account to which the request was emitted

***

### uuid

• **uuid**: *string*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule)*.*[*uuid*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/checkpointschedule#uuid)

*Defined in* [*src/api/entities/Entity.ts:46*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Entity.ts#L46)

## Methods

### accept

▸ **accept**(`opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue)*‹void››*

*Defined in* [*src/api/entities/AuthorizationRequest.ts:183*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/AuthorizationRequest.ts#L183)

Accept the Authorization Request. You must be the target of the Request to be able to accept it

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

**Parameters:**

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

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

***

### exists

▸ **exists**(): *Promise‹boolean›*

*Overrides* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/entity)*.*[*exists*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/entity#abstract-exists)

*Defined in* [*src/api/entities/AuthorizationRequest.ts:212*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/AuthorizationRequest.ts#L212)

Determine whether this Authorization Request exists on chain

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

***

### isEqual

▸ **isEqual**(`entity`: [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/entity)‹unknown, unknown›): *boolean*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule)*.*[*isEqual*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/checkpointschedule#isequal)

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

Determine whether this Entity is the same as another one

**Parameters:**

| Name     | Type                                                                                                                |
| -------- | ------------------------------------------------------------------------------------------------------------------- |
| `entity` | [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/entity)‹unknown, unknown› |

**Returns:** *boolean*

***

### isExpired

▸ **isExpired**(): *boolean*

*Defined in* [*src/api/entities/AuthorizationRequest.ts:203*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/AuthorizationRequest.ts#L203)

Returns whether the Authorization Request has expired

**Returns:** *boolean*

***

### remove

▸ **remove**(`opts?`: [ProcedureOpts](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/procedureopts.md)): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/transactionqueue)*‹void››*

*Defined in* [*src/api/entities/AuthorizationRequest.ts:196*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/AuthorizationRequest.ts#L196)

Remove the Authorization Request

* If you are the Request issuer, this will cancel the Authorization
* If you are the Request target, this will reject the Authorization

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

**Parameters:**

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

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

***

### toHuman

▸ **toHuman**(): [*HumanReadable*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/humanreadable.md)

*Overrides* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/entity)*.*[*toHuman*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/entity#abstract-tohuman)

*Defined in* [*src/api/entities/AuthorizationRequest.ts:226*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/AuthorizationRequest.ts#L226)

Return the Authorization's static data

**Returns:** [*HumanReadable*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/humanreadable.md)

***

### `Static` generateUuid

▸ **generateUuid**‹**Identifiers**›(`identifiers`: Identifiers): *string*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule)*.*[*generateUuid*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/checkpointschedule#static-generateuuid)

*Defined in* [*src/api/entities/Entity.ts:14*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Entity.ts#L14)

Generate the Entity's UUID from its identifying properties

**Type parameters:**

▪ **Identifiers**

**Parameters:**

| Name          | Type        | Description |
| ------------- | ----------- | ----------- |
| `identifiers` | Identifiers |             |

**Returns:** *string*

***

### `Static` unserialize

▸ **unserialize**‹**Identifiers**›(`serialized`: string): *Identifiers*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/checkpointschedule)*.*[*unserialize*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/checkpointschedule#static-unserialize)

*Defined in* [*src/api/entities/Entity.ts:23*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Entity.ts#L23)

Unserialize a UUID into its Unique Identifiers

**Type parameters:**

▪ **Identifiers**

**Parameters:**

| Name         | Type   | Description         |
| ------------ | ------ | ------------------- |
| `serialized` | string | UUID to unserialize |

**Returns:** *Identifiers*
