Skip to content

api.entities.Asset.Base.BaseAsset.BaseAsset

polymath-eric edited this page May 28, 2024 · 28 revisions

Class: BaseAsset

api/entities/Asset/Base/BaseAsset.BaseAsset

Class used to manage functionality common to all assets.

Hierarchy

Table of contents

Properties

Methods

Properties

compliance

compliance: Compliance

Defined in

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


did

did: string

Identity ID of the Asset (used for Claims)

Defined in

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


documents

documents: Documents

Defined in

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


metadata

metadata: Metadata

Defined in

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


permissions

permissions: Permissions

Defined in

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


ticker

ticker: string

ticker of the Asset

Defined in

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


uuid

uuid: string

Inherited from

Entity.uuid

Defined in

api/entities/Entity.ts:46

Methods

addRequiredMediators

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

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

Parameters

Name Type
args AssetMediatorParams
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:218


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:457

currentFundingRound(callback): Promise<UnsubCallback>

Parameters

Name Type
callback SubCallback<null | string>

Returns

Promise<UnsubCallback>

Defined in

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


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:309

details(callback): Promise<UnsubCallback>

Parameters

Name Type
callback SubCallback<AssetDetails>

Returns

Promise<UnsubCallback>

Defined in

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


freeze

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

Freeze transfers of the Asset

Parameters

Name Type
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:198


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:237

getIdentifiers(callback?): Promise<UnsubCallback>

Parameters

Name Type
callback? SubCallback<SecurityIdentifier[]>

Returns

Promise<UnsubCallback>

Defined in

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


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:403


getVenueFilteringDetails

getVenueFilteringDetails(): Promise<VenueFilteringDetails>

Get venue filtering details

Returns

Promise<VenueFilteringDetails>

Defined in

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


isEqual

isEqual(entity): boolean

Determine whether this Entity is the same as another one

Parameters

Name Type
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

Returns

Promise<boolean>

Note

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

Defined in

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

isFrozen(callback): Promise<UnsubCallback>

Parameters

Name Type
callback SubCallback<boolean>

Returns

Promise<UnsubCallback>

Defined in

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


modify

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

Modify some properties of the Asset

Parameters

Name Type
args ModifyAssetParams
opts? ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<Asset, 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

Defined in

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


removeRequiredMediators

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

Remove required mediators

Parameters

Name Type
args AssetMediatorParams
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:228


setVenueFiltering

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

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

Parameters

Name Type
args SetVenueFilteringParams
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:102


toHuman

toHuman(): string

Return the NftCollection's ticker

Returns

string

Overrides

Entity.toHuman

Defined in

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


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

Name Type
args TransferAssetOwnershipParams
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:92


unfreeze

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

Unfreeze transfers of the Asset

Parameters

Name Type
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:208


generateUuid

Static generateUuid<Identifiers>(identifiers): string

Generate the Entity's UUID from its identifying properties

Type parameters

Name
Identifiers

Parameters

Name Type
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

Name Type Description
serialized string UUID to unserialize

Returns

Identifiers

Inherited from

Entity.unserialize

Defined in

api/entities/Entity.ts:23

Clone this wiki locally