Skip to main content
Version: 30.0.x

Class: AuthorizationRequest

Defined in: src/api/entities/AuthorizationRequest.ts:51

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

Extends

Properties

authId

authId: BigNumber

Defined in: src/api/entities/AuthorizationRequest.ts:99

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


data

data: Authorization

Defined in: src/api/entities/AuthorizationRequest.ts:88

Authorization Request data corresponding to type of Authorization

TypeData
Add Relayer Paying KeyBeneficiary, Relayer, Allowance
Become AgentPermission Group
Attest Primary Key RotationDID
Rotate Primary KeyN/A
Rotate Primary Key to SecondaryPermissions
Transfer TickerTicker
Add MultiSig SignerAccount
Transfer Asset OwnershipTicker
Join IdentityPermissions
Portfolio CustodyPortfolio

expiry

expiry: Date | null

Defined in: src/api/entities/AuthorizationRequest.ts:94

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

Defined in: src/api/entities/AuthorizationRequest.ts:70

Identity that emitted the request


target

target: Signer

Defined in: src/api/entities/AuthorizationRequest.ts:65

Identity or Account to which the request was emitted


uuid

uuid: string

Defined in: src/api/entities/Entity.ts:46

Inherited from

Entity.uuid

Methods

accept()

accept(opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/AuthorizationRequest.ts:189

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

Parameters

ParameterType

opts?

ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this method is of type NoArgsProcedureMethod, which means you can call accept.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


exists()

exists(): Promise<boolean>

Defined in: src/api/entities/AuthorizationRequest.ts:211

Determine whether this Authorization Request exists on chain

Returns

Promise<boolean>

Overrides

Entity.exists


isEqual()

isEqual(entity: Entity<unknown, unknown>): boolean

Defined in: src/api/entities/Entity.ts:61

Determine whether this Entity is the same as another one

Parameters

ParameterType

entity

Entity<unknown, unknown>

Returns

boolean

Inherited from

Entity.isEqual


isExpired()

isExpired(): boolean

Defined in: src/api/entities/AuthorizationRequest.ts:202

Returns whether the Authorization Request has expired

Returns

boolean


remove()

remove(opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/AuthorizationRequest.ts:197

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

Parameters

ParameterType

opts?

ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this method is of type NoArgsProcedureMethod, which means you can call remove.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it


toHuman()

toHuman(): HumanReadable

Defined in: src/api/entities/AuthorizationRequest.ts:225

Return the Authorization's static data

Returns

HumanReadable

Overrides

Entity.toHuman


generateUuid()

static generateUuid<Identifiers>(identifiers: Identifiers): string

Defined in: src/api/entities/Entity.ts:14

Generate the Entity's UUID from its identifying properties

Type Parameters

Type Parameter

Identifiers

Parameters

ParameterTypeDescription

identifiers

Identifiers

Returns

string

Inherited from

Entity.generateUuid


unserialize()

static unserialize<Identifiers>(serialized: string): Identifiers

Defined in: src/api/entities/Entity.ts:23

Unserialize a UUID into its Unique Identifiers

Type Parameters

Type Parameter

Identifiers

Parameters

ParameterTypeDescription

serialized

string

UUID to unserialize

Returns

Identifiers

Inherited from

Entity.unserialize