Skip to main content
Version: 23.0.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:54


did

did: string

Identity ID of the Asset (used for Claims)

Defined in

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


documents

documents: Documents

Defined in

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


metadata

metadata: Metadata

Defined in

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


permissions

permissions: Permissions

Defined in

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


ticker

ticker: string

ticker of the Asset

Defined in

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


uuid

uuid: string

Inherited from

Entity.uuid

Defined in

api/entities/Entity.ts:46

Methods

details

details(): Promise<AssetDetails>

Retrieve the Asset's data

Note

can be subscribed to

Returns

Promise<AssetDetails>

details(callback): Promise<UnsubCallback>

Parameters

NameType
callbackSubCallback<AssetDetails>

Returns

Promise<UnsubCallback>


freeze

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

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?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>


getIdentifiers

getIdentifiers(): Promise<SecurityIdentifier[]>

Retrieve the Asset's identifiers list

Note

can be subscribed to

Returns

Promise<SecurityIdentifier[]>

getIdentifiers(callback?): Promise<UnsubCallback>

Parameters

NameType
callback?SubCallback<SecurityIdentifier[]>

Returns

Promise<UnsubCallback>


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


isFrozen

isFrozen(): Promise<boolean>

Check whether transfers are frozen for the Asset

Note

can be subscribed to

Returns

Promise<boolean>

isFrozen(callback): Promise<UnsubCallback>

Parameters

NameType
callbackSubCallback<boolean>

Returns

Promise<UnsubCallback>


toHuman

toHuman(): string

Return the NftCollection's ticker

Returns

string

Overrides

Entity.toHuman


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

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

NameType
argsTransferAssetOwnershipParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<AuthorizationRequest, AuthorizationRequest>>


unfreeze

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

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?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>


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


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