Class: FungibleAsset
Defined in: src/api/entities/Asset/Fungible/index.ts:45
Class used to manage all Fungible Asset functionality
Extends
Properties
assetHolders
assetHolders:
AssetHolders
Defined in: src/api/entities/Asset/Fungible/index.ts:47
checkpoints
checkpoints:
Checkpoints
Defined in: src/api/entities/Asset/Fungible/index.ts:51
compliance
compliance:
Compliance
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:70
Inherited from
corporateActions
corporateActions:
CorporateActions
Defined in: src/api/entities/Asset/Fungible/index.ts:52
documents
documents:
Documents
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:71
Inherited from
id
id:
string
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:78
Unique ID of the Asset in UUID format
Inherited from
issuance
issuance:
Issuance
Defined in: src/api/entities/Asset/Fungible/index.ts:48
metadata
metadata:
Metadata
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:72
Inherited from
offerings
offerings:
Offerings
Defined in: src/api/entities/Asset/Fungible/index.ts:50
permissions
permissions:
Permissions
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:73
Inherited from
settlements
settlements:
FungibleSettlements
Defined in: src/api/entities/Asset/Fungible/index.ts:46
transferRestrictions
transferRestrictions:
TransferRestrictions
Defined in: src/api/entities/Asset/Fungible/index.ts:49
uuid
uuid:
string
Defined in: src/api/entities/Entity.ts:46
Inherited from
Accessors
rawId
Get Signature
get rawId():
string
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:85
Unique ID of the Asset in hex format
Note
Although UUID format is the usual representation of asset IDs, generic polkadot/substrate tools usually expect it in hex format
Returns
string
Inherited from
Methods
addRequiredMediators()
addRequiredMediators(
args
:AssetMediatorParams
,opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:212
Add required mediators. Mediators must approve any trades involving the asset
Parameters
Parameter | Type |
---|---|
| |
|
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
Inherited from
BaseAsset
.addRequiredMediators
controllerTransfer()
controllerTransfer(
args
:ControllerTransferParams
,opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Asset/Fungible/index.ts:138
Force a transfer from a given Portfolio to the caller’s default Portfolio
Parameters
Parameter | Type |
---|---|
| |
|
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
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
createdAt()
createdAt():
Promise
<null
|EventIdentifier
>
Defined in: src/api/entities/Asset/Fungible/index.ts:84
Retrieve the identifier data (block number, date and event index) of the event that was emitted when the token was created
Returns
Promise
<null
| EventIdentifier
>
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
currentFundingRound()
Call Signature
currentFundingRound():
Promise
<null
|string
>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:499
Retrieve the Asset's funding round
Returns
Promise
<null
| string
>
Promise that resolves to the current funding round name or null if not set
Inherited from
Call Signature
currentFundingRound(
callback
:SubCallback
<null
|string
>):Promise
<UnsubCallback
>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:509
Retrieve the Asset's funding round
Parameters
Parameter | Type | Description |
---|---|---|
|
| Callback function that receives funding round updates |
Returns
Promise
<UnsubCallback
>
Promise that resolves to an unsubscribe function
Note
can be subscribed to, if connected to node using a web socket
Inherited from
details()
Call Signature
details():
Promise
<AssetDetails
>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:332
Retrieve the Asset's data
Returns
Promise
<AssetDetails
>
Promise that resolves to the Asset details
Inherited from
Call Signature
details(
callback
:SubCallback
<AssetDetails
>):Promise
<UnsubCallback
>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:342
Retrieve the Asset's data
Parameters
Parameter | Type | Description |
---|---|---|
| Callback function that receives Asset details updates |
Returns
Promise
<UnsubCallback
>
Promise that resolves to an unsubscribe function
Note
can be subscribed to, if connected to node using a web socket
Inherited from
exists()
exists():
Promise
<boolean
>
Defined in: src/api/entities/Asset/Fungible/index.ts:251
Determine whether this FungibleAsset exists on chain
Returns
Promise
<boolean
>
Overrides
BaseAsset.exists
freeze()
freeze(
opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:202
Freeze transfers of the Asset
Parameters
Parameter | Type |
---|---|
|
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
Inherited from
getIdentifiers()
Call Signature
getIdentifiers():
Promise
<SecurityIdentifier
[]>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:241
Retrieve the Asset's identifiers list
Returns
Promise
<SecurityIdentifier
[]>
Promise that resolves to the list of security identifiers
Inherited from
Call Signature
getIdentifiers(
callback?
:SubCallback
<SecurityIdentifier
[]>):Promise
<UnsubCallback
>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:251
Retrieve the Asset's identifiers list
Parameters
Parameter | Type | Description |
---|---|---|
| Callback function that receives identifier updates |
Returns
Promise
<UnsubCallback
>
Promise that resolves to an unsubscribe function
Note
can be subscribed to, if connected to node using a web socket
Inherited from
getOperationHistory()
getOperationHistory():
Promise
<HistoricAgentOperation
[]>
Defined in: src/api/entities/Asset/Fungible/index.ts:147
Retrieve this Asset's Operation History
Returns
Promise
<HistoricAgentOperation
[]>
Note
Operations are grouped by the agent Identity who performed them
Note
uses the middlewareV2
getRequiredMediators()
getRequiredMediators():
Promise
<Identity
[]>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:444
Get required Asset mediators. These Identities must approve any Instruction involving the asset
Returns
Promise
<Identity
[]>
Inherited from
BaseAsset
.getRequiredMediators
getTransactionHistory()
getTransactionHistory(
opts
:object
):Promise
<ResultSet
<HistoricAssetTransaction
>>
Defined in: src/api/entities/Asset/Fungible/index.ts:178
Retrieve this Asset's transaction History
Parameters
Parameter | Type |
---|---|
| { |
|
|
|
|
Returns
Promise
<ResultSet
<HistoricAssetTransaction
>>
Note
uses the middlewareV2
getVenueFilteringDetails()
getVenueFilteringDetails():
Promise
<VenueFilteringDetails
>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:464
Get venue filtering details
Returns
Promise
<VenueFilteringDetails
>
Inherited from
BaseAsset
.getVenueFilteringDetails
investorCount()
investorCount():
Promise
<BigNumber
>
Defined in: src/api/entities/Asset/Fungible/index.ts:112
Retrieve the amount of unique investors that hold this Asset
Returns
Promise
<BigNumber
>
isEqual()
isEqual(
entity
:Entity
<unknown
,unknown
>):boolean
Defined in: src/api/entities/Entity.ts:61
Determine whether this Entity is the same as another one
Parameters
Parameter | Type |
---|---|
|
|
Returns
boolean
Inherited from
isFrozen()
Call Signature
isFrozen():
Promise
<boolean
>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:289
Check whether transfers are frozen for the Asset
Returns
Promise
<boolean
>
Promise that resolves to true if transfers are frozen, false otherwise
Inherited from
Call Signature
isFrozen(
callback
:SubCallback
<boolean
>):Promise
<UnsubCallback
>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:299
Check whether transfers are frozen for the Asset
Parameters
Parameter | Type | Description |
---|---|---|
|
| Callback function that receives frozen status updates |
Returns
Promise
<UnsubCallback
>
Promise that resolves to an unsubscribe function
Note
can be subscribed to, if connected to node using a web socket
Inherited from
linkTicker()
linkTicker(
args
:LinkTickerToAssetParams
,opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:225
Link ticker to the asset
Parameters
Parameter | Type |
---|---|
| |
|
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
Inherited from
modify()
modify(
args
:ModifyAssetParams
,opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<Asset
,Asset
>>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:121
Modify some properties of the Asset
Parameters
Parameter | Type |
---|---|
| |
|
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
Inherited from
redeem()
redeem(
args
:RedeemTokensParams
,opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Asset/Fungible/index.ts:107
Redeem (burn) an amount of this Asset's tokens
Parameters
Parameter | Type |
---|---|
| |
|
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
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
removeRequiredMediators()
removeRequiredMediators(
args
:AssetMediatorParams
,opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:217
Remove required mediators
Parameters
Parameter | Type |
---|---|
| |
|
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
Inherited from
BaseAsset
.removeRequiredMediators
setVenueFiltering()
setVenueFiltering(
args
:SetVenueFilteringParams
,opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:102
Enable/disable venue filtering for this Asset and/or set allowed/disallowed venues
Parameters
Parameter | Type |
---|---|
| |
|
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
Inherited from
toHuman()
toHuman():
string
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:565
Return the BaseAsset's ID
Returns
string
Inherited from
transferOwnership()
transferOwnership(
args
:TransferAssetOwnershipParams
,opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<AuthorizationRequest
,AuthorizationRequest
>>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:97
Transfer ownership of the Asset to another Identity. This generates an authorization request that must be accepted by the recipient
Parameters
Parameter | Type |
---|---|
| |
|
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
Inherited from
unfreeze()
unfreeze(
opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:207
Unfreeze transfers of the Asset
Parameters
Parameter | Type |
---|---|
|
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
Inherited from
unlinkTicker()
unlinkTicker(
opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Asset/Base/BaseAsset.ts:234
Unlink ticker from the Asset
Parameters
Parameter | Type |
---|---|
|
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
Inherited from
generateUuid()
static
generateUuid<Identifiers
>(identifiers
:Identifiers
):string
Defined in: src/api/entities/Entity.ts:14
Generate the Entity's UUID from its identifying properties
Type Parameters
Type Parameter |
---|
|
Parameters
Parameter | Type | Description |
---|---|---|
|
|
Returns
string
Inherited from
unserialize()
static
unserialize<Identifiers
>(serialized
:string
):Identifiers
Defined in: src/api/entities/Entity.ts:23
Unserialize a UUID into its Unique Identifiers
Type Parameters
Type Parameter |
---|
|
Parameters
Parameter | Type | Description |
---|---|---|
|
| UUID to unserialize |
Returns
Identifiers