Skip to main content
Version: 26.2.x

Class: BaseAsset

api/entities/Asset/Base/BaseAsset.BaseAsset

Class used to manage functionality common to all assets.

Hierarchy

Properties

compliance

compliance: Compliance

Defined in

api/entities/Asset/Base/BaseAsset.ts:71


did

Optional did: string

Identity ID of the Asset (used for Claims)

Deprecated

this is no longer used from chain 7.x

Defined in

api/entities/Asset/Base/BaseAsset.ts:81


documents

documents: Documents

Defined in

api/entities/Asset/Base/BaseAsset.ts:72


id

id: string

Unique ID of the Asset in UUID format

Defined in

api/entities/Asset/Base/BaseAsset.ts:95


metadata

metadata: Metadata

Defined in

api/entities/Asset/Base/BaseAsset.ts:73


permissions

permissions: Permissions

Defined in

api/entities/Asset/Base/BaseAsset.ts:74


ticker

Optional ticker: string

ticker of the Asset

Since the chain version 7.x, ticker can be optionally associated with an Asset

Deprecated

in favour of ticker value received from the response of details method

Defined in

api/entities/Asset/Base/BaseAsset.ts:90


uuid

uuid: string

Inherited from

Entity.uuid

Defined in

api/entities/Entity.ts:46

Accessors

rawId

get rawId(): string

Unique ID of the Asset in hex format

Returns

string

Note

Although UUID format is the usual representation of asset IDs, generic polkadot/substrate tools usually expect it in hex format

Defined in

api/entities/Asset/Base/BaseAsset.ts:102

Methods

addRequiredMediators

addRequiredMediators(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Add required mediators. Mediators must approve any trades involving the asset

Parameters

NameType
argsAssetMediatorParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

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

Defined in

api/entities/Asset/Base/BaseAsset.ts:265


currentFundingRound

currentFundingRound(): Promise<null | string>

Retrieve the Asset's funding round

Returns

Promise<null | string>

Note

can be subscribed to, if connected to node using a web socket

Defined in

api/entities/Asset/Base/BaseAsset.ts:565

currentFundingRound(callback): Promise<UnsubCallback>

Parameters

NameType
callbackSubCallback<null | string>

Returns

Promise<UnsubCallback>

Defined in

api/entities/Asset/Base/BaseAsset.ts:566


details

details(): Promise<AssetDetails>

Retrieve the Asset's data

Returns

Promise<AssetDetails>

Note

can be subscribed to, if connected to node using a web socket

Defined in

api/entities/Asset/Base/BaseAsset.ts:391

details(callback): Promise<UnsubCallback>

Parameters

NameType
callbackSubCallback<AssetDetails>

Returns

Promise<UnsubCallback>

Defined in

api/entities/Asset/Base/BaseAsset.ts:392


freeze

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

Freeze transfers of the Asset

Parameters

NameType
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

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

Defined in

api/entities/Asset/Base/BaseAsset.ts:245


getIdentifiers

getIdentifiers(): Promise<SecurityIdentifier[]>

Retrieve the Asset's identifiers list

Returns

Promise<SecurityIdentifier[]>

Note

can be subscribed to, if connected to node using a web socket

Defined in

api/entities/Asset/Base/BaseAsset.ts:311

getIdentifiers(callback?): Promise<UnsubCallback>

Parameters

NameType
callback?SubCallback<SecurityIdentifier[]>

Returns

Promise<UnsubCallback>

Defined in

api/entities/Asset/Base/BaseAsset.ts:312


getRequiredMediators

getRequiredMediators(): Promise<Identity[]>

Get required Asset mediators. These Identities must approve any Instruction involving the asset

Returns

Promise<Identity[]>

Defined in

api/entities/Asset/Base/BaseAsset.ts:510


getVenueFilteringDetails

getVenueFilteringDetails(): Promise<VenueFilteringDetails>

Get venue filtering details

Returns

Promise<VenueFilteringDetails>

Defined in

api/entities/Asset/Base/BaseAsset.ts:530


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


isFrozen

isFrozen(): Promise<boolean>

Check whether transfers are frozen for the Asset

Returns

Promise<boolean>

Note

can be subscribed to, if connected to node using a web socket

Defined in

api/entities/Asset/Base/BaseAsset.ts:357

isFrozen(callback): Promise<UnsubCallback>

Parameters

NameType
callbackSubCallback<boolean>

Returns

Promise<UnsubCallback>

Defined in

api/entities/Asset/Base/BaseAsset.ts:358


linkTicker

linkTicker(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Link ticker to the asset

Parameters

NameType
argsLinkTickerToAssetParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

if ticker is already reserved, then required role:

  • Ticker Owner

Note

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

Defined in

api/entities/Asset/Base/BaseAsset.ts:288


modify

modify(args, opts?): Promise<GenericPolymeshTransaction<Asset, Asset>>

Modify some properties of the Asset

Parameters

NameType
argsModifyAssetParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<Asset, Asset>>

Throws

if the passed values result in no changes being made to the Asset

Throws

if the passed assetType is not a known asset type or a custom type that has not been created on the chain

Throws

if trying to modify an NftCollection's assetType

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

Defined in

api/entities/Asset/Base/BaseAsset.ts:151


removeRequiredMediators

removeRequiredMediators(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Remove required mediators

Parameters

NameType
argsAssetMediatorParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

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

Defined in

api/entities/Asset/Base/BaseAsset.ts:275


setVenueFiltering

setVenueFiltering(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Enable/disable venue filtering for this Asset and/or set allowed/disallowed venues

Parameters

NameType
argsSetVenueFilteringParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

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

Defined in

api/entities/Asset/Base/BaseAsset.ts:127


toHuman

toHuman(): string

Return the BaseAsset's ID

Returns

string

Overrides

Entity.toHuman

Defined in

api/entities/Asset/Base/BaseAsset.ts:632


transferOwnership

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

Parameters

NameType
argsTransferAssetOwnershipParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<AuthorizationRequest, AuthorizationRequest>>

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

Defined in

api/entities/Asset/Base/BaseAsset.ts:117


unfreeze

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

Unfreeze transfers of the Asset

Parameters

NameType
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

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

Defined in

api/entities/Asset/Base/BaseAsset.ts:255


unlinkTicker

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

Unlink ticker from the Asset

Parameters

NameType
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

Only the ticker owner is allowed to unlink the Asset

Throws

if there is no ticker to unlink

Note

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

Defined in

api/entities/Asset/Base/BaseAsset.ts:302


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