api.entities.AuthorizationRequest.AuthorizationRequest - PolymeshAssociation/polymesh-sdk GitHub Wiki
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
-
Entity
<UniqueIdentifiers
,HumanReadable
>↳
AuthorizationRequest
• authId: BigNumber
internal identifier for the Request (used to accept/reject/cancel)
api/entities/AuthorizationRequest.ts:100
• data: Authorization
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 |
api/entities/AuthorizationRequest.ts:89
• 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
api/entities/AuthorizationRequest.ts:95
• issuer: Identity
Identity that emitted the request
api/entities/AuthorizationRequest.ts:71
• target: Signer
Identity or Account to which the request was emitted
api/entities/AuthorizationRequest.ts:66
• uuid: string
▸ accept(opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Accept the Authorization Request. You must be the target of the Request to be able to accept it
Name | Type |
---|---|
opts? |
ProcedureOpts |
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
api/entities/AuthorizationRequest.ts:193
▸ exists(): Promise
<boolean
>
Determine whether this Authorization Request exists on chain
Promise
<boolean
>
api/entities/AuthorizationRequest.ts:222
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Name | Type |
---|---|
entity |
Entity <unknown , unknown > |
boolean
▸ isExpired(): boolean
Returns whether the Authorization Request has expired
boolean
api/entities/AuthorizationRequest.ts:213
▸ 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
Name | Type |
---|---|
opts? |
ProcedureOpts |
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
api/entities/AuthorizationRequest.ts:206
▸ toHuman(): HumanReadable
Return the Authorization's static data
api/entities/AuthorizationRequest.ts:236
▸ Static
generateUuid<Identifiers
>(identifiers
): string
Generate the Entity's UUID from its identifying properties
Name |
---|
Identifiers |
Name | Type |
---|---|
identifiers |
Identifiers |
string
▸ Static
unserialize<Identifiers
>(serialized
): Identifiers
Unserialize a UUID into its Unique Identifiers
Name |
---|
Identifiers |
Name | Type | Description |
---|---|---|
serialized |
string |
UUID to unserialize |
Identifiers