api.entities.AuthorizationRequest - PolymeshAssociation/polymesh-sdk GitHub Wiki
@polymeshassociation/polymesh-sdk / api/entities/AuthorizationRequest
Defined in: 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
authId:
BigNumber
Defined in: api/entities/AuthorizationRequest.ts:99
internal identifier for the Request (used to accept/reject/cancel)
data:
Authorization
Defined in: api/entities/AuthorizationRequest.ts:88
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:
Date|null
Defined in: 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:
Identity
Defined in: api/entities/AuthorizationRequest.ts:70
Identity that emitted the request
target:
Signer
Defined in: api/entities/AuthorizationRequest.ts:65
Identity or Account to which the request was emitted
uuid:
string
Defined in: api/entities/Entity.ts:46
accept(
opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/AuthorizationRequest.ts:185
Accept the Authorization Request. You must be the target of the Request to be able to accept it
| Parameter | Type |
|---|---|
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
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():
Promise<boolean>
Defined in: api/entities/AuthorizationRequest.ts:207
Determine whether this Authorization Request exists on chain
Promise<boolean>
isEqual(
entity):boolean
Defined in: api/entities/Entity.ts:61
Determine whether this Entity is the same as another one
| Parameter | Type |
|---|---|
entity |
Entity<unknown, unknown> |
boolean
isExpired():
boolean
Defined in: api/entities/AuthorizationRequest.ts:198
Returns whether the Authorization Request has expired
boolean
remove(
opts?):Promise<GenericPolymeshTransaction<void,void>>
Defined in: api/entities/AuthorizationRequest.ts:193
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
| Parameter | Type |
|---|---|
opts? |
ProcedureOpts |
Promise<GenericPolymeshTransaction<void, void>>
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():
HumanReadable
Defined in: api/entities/AuthorizationRequest.ts:221
Return the Authorization's static data
staticgenerateUuid<Identifiers>(identifiers):string
Defined in: api/entities/Entity.ts:14
Generate the Entity's UUID from its identifying properties
| Type Parameter |
|---|
Identifiers |
| Parameter | Type | Description |
|---|---|---|
identifiers |
Identifiers |
- |
string
staticunserialize<Identifiers>(serialized):Identifiers
Defined in: api/entities/Entity.ts:23
Unserialize a UUID into its Unique Identifiers
| Type Parameter |
|---|
Identifiers |
| Parameter | Type | Description |
|---|---|---|
serialized |
string |
UUID to unserialize |
Identifiers
Defined in: api/entities/AuthorizationRequest.ts:31
data:
HumanReadableType<Authorization>
Defined in: api/entities/AuthorizationRequest.ts:35
expiry:
string|null
Defined in: api/entities/AuthorizationRequest.ts:33
id:
string
Defined in: api/entities/AuthorizationRequest.ts:36
issuer:
string
Defined in: api/entities/AuthorizationRequest.ts:32
target:
SignerValue
Defined in: api/entities/AuthorizationRequest.ts:34
Defined in: api/entities/AuthorizationRequest.ts:39
data:
Authorization
Defined in: api/entities/AuthorizationRequest.ts:43
expiry:
Date|null
Defined in: api/entities/AuthorizationRequest.ts:42
issuer:
Identity
Defined in: api/entities/AuthorizationRequest.ts:41
target:
Signer
Defined in: api/entities/AuthorizationRequest.ts:40
Defined in: api/entities/AuthorizationRequest.ts:27
authId:
BigNumber
Defined in: api/entities/AuthorizationRequest.ts:28