Skip to main content
Version: 22.1.x

Class: AuthorizationRequest

api/entities/AuthorizationRequest.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

Properties

authId

authId: BigNumber

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

Defined in

api/entities/AuthorizationRequest.ts:100


data

data: Authorization

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

Defined in

api/entities/AuthorizationRequest.ts:89


expiry

expiry: null | Date

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

Defined in

api/entities/AuthorizationRequest.ts:95


issuer

issuer: Identity

Identity that emitted the request

Defined in

api/entities/AuthorizationRequest.ts:71


target

target: Signer

Identity or Account to which the request was emitted

Defined in

api/entities/AuthorizationRequest.ts:66


uuid

uuid: string

Inherited from

Entity.uuid

Defined in

api/entities/Entity.ts:46

Methods

accept

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

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

Parameters

NameType
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

Defined in

api/entities/AuthorizationRequest.ts:193


exists

exists(): Promise<boolean>

Determine whether this Authorization Request exists on chain

Returns

Promise<boolean>

Overrides

Entity.exists

Defined in

api/entities/AuthorizationRequest.ts:222


isEqual

isEqual(entity): boolean

Determine whether this Entity is the same as another one

Parameters

NameType
entityEntity<unknown, unknown>

Returns

boolean

Inherited from

Entity.isEqual

Defined in

api/entities/Entity.ts:61


isExpired

isExpired(): boolean

Returns whether the Authorization Request has expired

Returns

boolean

Defined in

api/entities/AuthorizationRequest.ts:213


remove

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

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

NameType
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

Defined in

api/entities/AuthorizationRequest.ts:206


toHuman

toHuman(): HumanReadable

Return the Authorization's static data

Returns

HumanReadable

Overrides

Entity.toHuman

Defined in

api/entities/AuthorizationRequest.ts:236


generateUuid

Static generateUuid<Identifiers>(identifiers): string

Generate the Entity's UUID from its identifying properties

Type parameters

Name
Identifiers

Parameters

NameType
identifiersIdentifiers

Returns

string

Inherited from

Entity.generateUuid

Defined in

api/entities/Entity.ts:14


unserialize

Static unserialize<Identifiers>(serialized): Identifiers

Unserialize a UUID into its Unique Identifiers

Type parameters

Name
Identifiers

Parameters

NameTypeDescription
serializedstringUUID to unserialize

Returns

Identifiers

Inherited from

Entity.unserialize

Defined in

api/entities/Entity.ts:23