-
Notifications
You must be signed in to change notification settings - Fork 11
api.entities.Asset.Asset
api/entities/Asset.Asset
Class used to manage all Asset functionality
-
Entity
<UniqueIdentifiers
,string
>↳
Asset
- assetHolders
- checkpoints
- compliance
- corporateActions
- did
- documents
- issuance
- metadata
- offerings
- permissions
- settlements
- ticker
- transferRestrictions
- uuid
- controllerTransfer
- createdAt
- currentFundingRound
- details
- exists
- freeze
- getIdentifiers
- getOperationHistory
- getTransactionHistory
- investorCount
- isEqual
- isFrozen
- modify
- redeem
- setVenueFiltering
- toHuman
- transferOwnership
- unfreeze
- generateUuid
- unserialize
• assetHolders: AssetHolders
api/entities/Asset/index.ts:114
• checkpoints: Checkpoints
api/entities/Asset/index.ts:119
• compliance: Compliance
api/entities/Asset/index.ts:116
• corporateActions: CorporateActions
api/entities/Asset/index.ts:120
• did: string
Identity ID of the Asset (used for Claims)
api/entities/Asset/index.ts:104
• documents: Documents
api/entities/Asset/index.ts:112
• issuance: Issuance
api/entities/Asset/index.ts:115
• metadata: Metadata
api/entities/Asset/index.ts:122
• offerings: Offerings
api/entities/Asset/index.ts:118
• permissions: Permissions
api/entities/Asset/index.ts:121
• settlements: Settlements
api/entities/Asset/index.ts:113
• ticker: string
ticker of the Asset
api/entities/Asset/index.ts:109
• transferRestrictions: TransferRestrictions
api/entities/Asset/index.ts:117
• uuid: string
▸ controllerTransfer(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Force a transfer from a given Portfolio to the caller’s default Portfolio
Note
this method is of type ProcedureMethod, which means you can call controllerTransfer.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Name | Type |
---|---|
args |
ControllerTransferParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<void
, void
>>
▸ createdAt(): Promise
<null
| EventIdentifier
>
Retrieve the identifier data (block number, date and event index) of the event that was emitted when the token was created
Note
uses the middlewareV2
Note
there is a possibility that the data is not ready by the time it is requested. In that case, null
is returned
Promise
<null
| EventIdentifier
>
▸ currentFundingRound(): Promise
<null
| string
>
Retrieve the Asset's funding round
Note
can be subscribed to
Promise
<null
| string
>
▸ currentFundingRound(callback
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback |
SubCallback <null | string > |
Promise
<UnsubCallback
>
▸ details(): Promise
<AssetDetails
>
Retrieve the Asset's data
Note
can be subscribed to
Promise
<AssetDetails
>
▸ details(callback
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback |
SubCallback <AssetDetails > |
Promise
<UnsubCallback
>
▸ exists(): Promise
<boolean
>
Determine whether this Asset exists on chain
Promise
<boolean
>
▸ freeze(opts?
): Promise
<GenericPolymeshTransaction
<Asset
, Asset
>>
Freeze transfers of the Asset
Note
this method is of type NoArgsProcedureMethod, which means you can call freeze.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Name | Type |
---|---|
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<Asset
, Asset
>>
▸ getIdentifiers(): Promise
<SecurityIdentifier
[]>
Retrieve the Asset's identifiers list
Note
can be subscribed to
Promise
<SecurityIdentifier
[]>
▸ getIdentifiers(callback?
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback? |
SubCallback <SecurityIdentifier []> |
Promise
<UnsubCallback
>
▸ getOperationHistory(): Promise
<HistoricAgentOperation
[]>
Retrieve this Asset's Operation History
Note
Operations are grouped by the agent Identity who performed them
Note
uses the middlewareV2
Promise
<HistoricAgentOperation
[]>
▸ getTransactionHistory(opts
): Promise
<ResultSet
<HistoricAssetTransaction
>>
Retrieve this Asset's transaction History
Note
uses the middlewareV2
Name | Type |
---|---|
opts |
Object |
opts.size? |
BigNumber |
opts.start? |
BigNumber |
Promise
<ResultSet
<HistoricAssetTransaction
>>
▸ investorCount(): Promise
<BigNumber
>
Retrieve the amount of unique investors that hold this Asset
Promise
<BigNumber
>
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Name | Type |
---|---|
entity |
Entity <unknown , unknown > |
boolean
▸ isFrozen(): Promise
<boolean
>
Check whether transfers are frozen for the Asset
Note
can be subscribed to
Promise
<boolean
>
▸ isFrozen(callback
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback |
SubCallback <boolean > |
Promise
<UnsubCallback
>
▸ modify(args
, opts?
): Promise
<GenericPolymeshTransaction
<Asset
, Asset
>>
Modify some properties of the Asset
Throws
if the passed values result in no changes being made to the Asset
Note
this method is of type ProcedureMethod, which means you can call modify.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Name | Type |
---|---|
args |
ModifyAssetParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<Asset
, Asset
>>
▸ redeem(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Redeem (burn) an amount of this Asset's tokens
Note
tokens are removed from the caller's Default Portfolio
Note
this method is of type ProcedureMethod, which means you can call redeem.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Name | Type |
---|---|
args |
RedeemTokensParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<void
, void
>>
▸ setVenueFiltering(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Enable/disable venue filtering for this Asset and/or set allowed/disallowed venues
Note
this method is of type ProcedureMethod, which means you can call setVenueFiltering.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Name | Type |
---|---|
args |
SetVenueFilteringParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<void
, void
>>
▸ toHuman(): string
Return the Asset's ticker
string
▸ transferOwnership(args
, opts?
): Promise
<GenericPolymeshTransaction
<AuthorizationRequest
, AuthorizationRequest
>>
Transfer ownership of the Asset to another Identity. This generates an authorization request that must be accepted by the recipient
Note
this will create Authorization Request which has to be accepted by the target
Identity.
An Account or Identity can fetch its pending Authorization Requests by calling authorizations.getReceived.
Also, an Account or Identity can directly fetch the details of an Authorization Request by calling authorizations.getOne
Note
this method is of type ProcedureMethod, which means you can call transferOwnership.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Name | Type |
---|---|
args |
TransferAssetOwnershipParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<AuthorizationRequest
, AuthorizationRequest
>>
▸ unfreeze(opts?
): Promise
<GenericPolymeshTransaction
<Asset
, Asset
>>
Unfreeze transfers of the Asset
Note
this method is of type NoArgsProcedureMethod, which means you can call unfreeze.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Name | Type |
---|---|
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<Asset
, Asset
>>
▸ 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
Entities
- Account
- Asset
- Authorization Request
- Checkpoint
- Checkpoint Schedule
- Corporate Action
- Corporate Action Base
- Custom Permission Group
- Default Portfolio
- Default Trusted Claim Issuer
- Dividend Distribution
- Entity
- Identity
- Instruction
- Known Permission Group
- Metadata Entry
- Multi Sig Proposal
- Numbered Portfolio
- Offering
- Permission Group
- Portfolio
- Subsidies
- Subsidy
- Ticker Reservation
- Venue
- Authorizations
- Types