api_entities_Asset.Asset

@polymeshassociation/polymesh-sdk / Modules / api/entities/Asset / Asset

Class: Asset

api/entities/Asset.Asset

Class used to manage all Asset functionality

Hierarchy

Table of contents

Properties

Methods

Properties

assetHolders

assetHolders: AssetHolders

Defined in

api/entities/Asset/index.ts:110


checkpoints

checkpoints: Checkpoints

Defined in

api/entities/Asset/index.ts:115


compliance

compliance: Compliance

Defined in

api/entities/Asset/index.ts:112


corporateActions

corporateActions: CorporateActions

Defined in

api/entities/Asset/index.ts:116


did

did: string

Identity ID of the Asset (used for Claims)

Defined in

api/entities/Asset/index.ts:100


documents

documents: Documents

Defined in

api/entities/Asset/index.ts:108


issuance

issuance: Issuance

Defined in

api/entities/Asset/index.ts:111


offerings

offerings: Offerings

Defined in

api/entities/Asset/index.ts:114


permissions

permissions: Permissions

Defined in

api/entities/Asset/index.ts:117


settlements

settlements: Settlements

Defined in

api/entities/Asset/index.ts:109


ticker

ticker: string

ticker of the Asset

Defined in

api/entities/Asset/index.ts:105


transferRestrictions

transferRestrictions: TransferRestrictions

Defined in

api/entities/Asset/index.ts:113


uuid

uuid: string

Inherited from

Entity.uuid

Defined in

api/entities/Entity.ts:46

Methods

controllerTransfer

controllerTransfer(args, opts?): Promise<TransactionQueue<void, void, unknown[][]>>

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

Parameters

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/entities/Asset/index.ts:562


createdAt

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 middleware

note there is a possibility that the data is not ready by the time it is requested. In that case, null is returned

Returns

Promise<null | EventIdentifier>

Defined in

api/entities/Asset/index.ts:387


currentFundingRound

currentFundingRound(): Promise<null | string>

Retrieve the Asset's funding round

note can be subscribed to

Returns

Promise<null | string>

Defined in

api/entities/Asset/index.ts:313

currentFundingRound(callback): Promise<UnsubCallback>

Parameters

NameType

callback

SubCallback<null | string>

Returns

Promise<UnsubCallback>

Defined in

api/entities/Asset/index.ts:314


details

details(): Promise<AssetDetails>

Retrieve the Asset's data

note can be subscribed to

Returns

Promise<AssetDetails>

Defined in

api/entities/Asset/index.ts:212

details(callback): Promise<UnsubCallback>

Parameters

NameType

callback

Returns

Promise<UnsubCallback>

Defined in

api/entities/Asset/index.ts:213


exists

exists(): Promise<boolean>

Determine whether this Asset exists on chain

Returns

Promise<boolean>

Overrides

Entity.exists

Defined in

api/entities/Asset/index.ts:654


freeze

freeze(opts?): Promise<TransactionQueue<Asset, Asset, unknown[][]>>

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

Parameters

NameType

opts?

Returns

Promise<TransactionQueue<Asset, Asset, unknown[][]>>

Defined in

api/entities/Asset/index.ts:409


getIdentifiers

getIdentifiers(): Promise<SecurityIdentifier[]>

Retrieve the Asset's identifiers list

note can be subscribed to

Returns

Promise<SecurityIdentifier[]>

Defined in

api/entities/Asset/index.ts:350

getIdentifiers(callback?): Promise<UnsubCallback>

Parameters

NameType

callback?

Returns

Promise<UnsubCallback>

Defined in

api/entities/Asset/index.ts:351


getOperationHistory

getOperationHistory(): Promise<HistoricAgentOperation[]>

Retrieve this Asset's Operation History

note Operations are grouped by the agent Identity who performed them

note uses the middleware

Returns

Promise<HistoricAgentOperation[]>

Defined in

api/entities/Asset/index.ts:573


investorCount

investorCount(): Promise<BigNumber>

Retrieve the amount of unique investors that hold this Asset

note this takes into account the Scope ID of Investor Uniqueness Claims. If an investor holds balances of this Asset in two or more different Identities, but they all have Investor Uniqueness Claims with the same Scope ID, then they will only be counted once for the purposes of this result

Returns

Promise<BigNumber>

Defined in

api/entities/Asset/index.ts:506


isEqual

isEqual(entity): boolean

Determine whether this Entity is the same as another one

Parameters

NameType

entity

Entity<unknown, unknown>

Returns

boolean

Inherited from

Entity.isEqual

Defined in

api/entities/Entity.ts:61


isFrozen

isFrozen(): Promise<boolean>

Check whether transfers are frozen for the Asset

note can be subscribed to

Returns

Promise<boolean>

Defined in

api/entities/Asset/index.ts:428

isFrozen(callback): Promise<UnsubCallback>

Parameters

NameType

callback

SubCallback<boolean>

Returns

Promise<UnsubCallback>

Defined in

api/entities/Asset/index.ts:429


modify

modify(args, opts?): Promise<TransactionQueue<Asset, Asset, unknown[][]>>

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

Parameters

Returns

Promise<TransactionQueue<Asset, Asset, unknown[][]>>

Defined in

api/entities/Asset/index.ts:203


modifyPrimaryIssuanceAgent

modifyPrimaryIssuanceAgent(args, opts?): Promise<TransactionQueue<void, void, unknown[][]>>

Assign a new primary issuance agent for the Asset

note this will create an 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

deprecated in favor of inviteAgent

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

Parameters

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/entities/Asset/index.ts:469


redeem

redeem(args, opts?): Promise<TransactionQueue<void, void, unknown[][]>>

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

Parameters

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/entities/Asset/index.ts:495


removePrimaryIssuanceAgent

removePrimaryIssuanceAgent(opts?): Promise<TransactionQueue<void, void, unknown[][]>>

Remove the primary issuance agent of the Asset

note if primary issuance agent is not set, Asset owner would be used by default

deprecated

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

Parameters

NameType

opts?

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/entities/Asset/index.ts:483


toHuman

toHuman(): string

Return the Asset's ticker

Returns

string

Overrides

Entity.toHuman

Defined in

api/entities/Asset/index.ts:667


transferOwnership

transferOwnership(args, opts?): Promise<TransactionQueue<AuthorizationRequest, AuthorizationRequest, unknown[][]>>

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

Parameters

Returns

Promise<TransactionQueue<AuthorizationRequest, AuthorizationRequest, unknown[][]>>

Defined in

api/entities/Asset/index.ts:192


unfreeze

unfreeze(opts?): Promise<TransactionQueue<Asset, Asset, unknown[][]>>

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

Parameters

NameType

opts?

Returns

Promise<TransactionQueue<Asset, Asset, unknown[][]>>

Defined in

api/entities/Asset/index.ts:419


generateUuid

Static generateUuid<Identifiers>(identifiers): string

Generate the Entity's UUID from its identifying properties

Type parameters

Name

Identifiers

Parameters

NameType

identifiers

Identifiers

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

serialized

string

UUID to unserialize

Returns

Identifiers

Inherited from

Entity.unserialize

Defined in

api/entities/Entity.ts:23

Last updated