-
Notifications
You must be signed in to change notification settings - Fork 11
api.entities.Asset.Fungible.FungibleAsset
api/entities/Asset/Fungible.FungibleAsset
Class used to manage all Fungible Asset functionality
-
↳
FungibleAsset
- assetHolders
- checkpoints
- compliance
- corporateActions
- documents
- id
- issuance
- metadata
- offerings
- permissions
- settlements
- transferRestrictions
- uuid
- addRequiredMediators
- controllerTransfer
- createdAt
- currentFundingRound
- details
- exists
- freeze
- getIdentifiers
- getOperationHistory
- getRequiredMediators
- getTransactionHistory
- getVenueFilteringDetails
- investorCount
- isEqual
- isFrozen
- linkTicker
- modify
- redeem
- removeRequiredMediators
- setVenueFiltering
- toHuman
- transferOwnership
- unfreeze
- unlinkTicker
- generateUuid
- unserialize
• assetHolders: AssetHolders
api/entities/Asset/Fungible/index.ts:49
• checkpoints: Checkpoints
api/entities/Asset/Fungible/index.ts:53
• compliance: Compliance
api/entities/Asset/Base/BaseAsset.ts:71
• corporateActions: CorporateActions
api/entities/Asset/Fungible/index.ts:54
• documents: Documents
api/entities/Asset/Base/BaseAsset.ts:72
• id: string
Unique ID of the Asset in UUID format
api/entities/Asset/Base/BaseAsset.ts:79
• issuance: Issuance
api/entities/Asset/Fungible/index.ts:50
• metadata: Metadata
api/entities/Asset/Base/BaseAsset.ts:73
• offerings: Offerings
api/entities/Asset/Fungible/index.ts:52
• permissions: Permissions
api/entities/Asset/Base/BaseAsset.ts:74
• settlements: FungibleSettlements
api/entities/Asset/Fungible/index.ts:48
• transferRestrictions: TransferRestrictions
api/entities/Asset/Fungible/index.ts:51
• uuid: string
• get
rawId(): string
Unique ID of the Asset in hex format
string
Note
Although UUID format is the usual representation of asset IDs, generic polkadot/substrate tools usually expect it in hex format
BaseAsset.rawId
api/entities/Asset/Base/BaseAsset.ts:86
▸ addRequiredMediators(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Add required mediators. Mediators must approve any trades involving the asset
Name | Type |
---|---|
args |
AssetMediatorParams |
opts? |
ProcedureOpts |
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
BaseAsset.addRequiredMediators
api/entities/Asset/Base/BaseAsset.ts:241
▸ controllerTransfer(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Force a transfer from a given Portfolio to the caller’s default Portfolio
Name | Type |
---|---|
args |
ControllerTransferParams |
opts? |
ProcedureOpts |
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
api/entities/Asset/Fungible/index.ts:148
▸ 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
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
api/entities/Asset/Fungible/index.ts:86
▸ currentFundingRound(): Promise
<null
| string
>
Retrieve the Asset's funding round
Promise
<null
| string
>
Note
can be subscribed to, if connected to node using a web socket
api/entities/Asset/Base/BaseAsset.ts:518
▸ currentFundingRound(callback
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback |
SubCallback <null | string > |
Promise
<UnsubCallback
>
api/entities/Asset/Base/BaseAsset.ts:519
▸ details(): Promise
<AssetDetails
>
Retrieve the Asset's data
Promise
<AssetDetails
>
Note
can be subscribed to, if connected to node using a web socket
api/entities/Asset/Base/BaseAsset.ts:360
▸ details(callback
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback |
SubCallback <AssetDetails > |
Promise
<UnsubCallback
>
api/entities/Asset/Base/BaseAsset.ts:361
▸ exists(): Promise
<boolean
>
Determine whether this FungibleAsset exists on chain
Promise
<boolean
>
BaseAsset.exists
api/entities/Asset/Fungible/index.ts:263
▸ freeze(opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Freeze transfers of the Asset
Name | Type |
---|---|
opts? |
ProcedureOpts |
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
api/entities/Asset/Base/BaseAsset.ts:221
▸ getIdentifiers(): Promise
<SecurityIdentifier
[]>
Retrieve the Asset's identifiers list
Promise
<SecurityIdentifier
[]>
Note
can be subscribed to, if connected to node using a web socket
api/entities/Asset/Base/BaseAsset.ts:287
▸ getIdentifiers(callback?
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback? |
SubCallback <SecurityIdentifier []> |
Promise
<UnsubCallback
>
api/entities/Asset/Base/BaseAsset.ts:288
▸ getOperationHistory(): Promise
<HistoricAgentOperation
[]>
Retrieve this Asset's Operation History
Promise
<HistoricAgentOperation
[]>
Note
Operations are grouped by the agent Identity who performed them
Note
uses the middlewareV2
api/entities/Asset/Fungible/index.ts:159
▸ getRequiredMediators(): Promise
<Identity
[]>
Get required Asset mediators. These Identities must approve any Instruction involving the asset
Promise
<Identity
[]>
BaseAsset.getRequiredMediators
api/entities/Asset/Base/BaseAsset.ts:463
▸ getTransactionHistory(opts
): Promise
<ResultSet
<HistoricAssetTransaction
>>
Retrieve this Asset's transaction History
Name | Type |
---|---|
opts |
Object |
opts.size? |
BigNumber |
opts.start? |
BigNumber |
Promise
<ResultSet
<HistoricAssetTransaction
>>
Note
uses the middlewareV2
api/entities/Asset/Fungible/index.ts:190
▸ getVenueFilteringDetails(): Promise
<VenueFilteringDetails
>
Get venue filtering details
Promise
<VenueFilteringDetails
>
BaseAsset.getVenueFilteringDetails
api/entities/Asset/Base/BaseAsset.ts:483
▸ investorCount(): Promise
<BigNumber
>
Retrieve the amount of unique investors that hold this Asset
Promise
<BigNumber
>
api/entities/Asset/Fungible/index.ts:119
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Name | Type |
---|---|
entity |
Entity <unknown , unknown > |
boolean
▸ isFrozen(): Promise
<boolean
>
Check whether transfers are frozen for the Asset
Promise
<boolean
>
Note
can be subscribed to, if connected to node using a web socket
api/entities/Asset/Base/BaseAsset.ts:326
▸ isFrozen(callback
): Promise
<UnsubCallback
>
Name | Type |
---|---|
callback |
SubCallback <boolean > |
Promise
<UnsubCallback
>
api/entities/Asset/Base/BaseAsset.ts:327
▸ linkTicker(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Link ticker to the asset
Name | Type |
---|---|
args |
LinkTickerToAssetParams |
opts? |
ProcedureOpts |
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
api/entities/Asset/Base/BaseAsset.ts:264
▸ modify(args
, opts?
): Promise
<GenericPolymeshTransaction
<Asset
, Asset
>>
Modify some properties of the Asset
Name | Type |
---|---|
args |
ModifyAssetParams |
opts? |
ProcedureOpts |
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
api/entities/Asset/Base/BaseAsset.ts:135
▸ redeem(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Redeem (burn) an amount of this Asset's tokens
Name | Type |
---|---|
args |
RedeemTokensParams |
opts? |
ProcedureOpts |
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
api/entities/Asset/Fungible/index.ts:112
▸ removeRequiredMediators(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Remove required mediators
Name | Type |
---|---|
args |
AssetMediatorParams |
opts? |
ProcedureOpts |
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
BaseAsset.removeRequiredMediators
api/entities/Asset/Base/BaseAsset.ts:251
▸ setVenueFiltering(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Enable/disable venue filtering for this Asset and/or set allowed/disallowed venues
Name | Type |
---|---|
args |
SetVenueFilteringParams |
opts? |
ProcedureOpts |
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
api/entities/Asset/Base/BaseAsset.ts:111
▸ toHuman(): string
Return the BaseAsset's ID
string
api/entities/Asset/Base/BaseAsset.ts:575
▸ 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
Name | Type |
---|---|
args |
TransferAssetOwnershipParams |
opts? |
ProcedureOpts |
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
api/entities/Asset/Base/BaseAsset.ts:101
▸ unfreeze(opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Unfreeze transfers of the Asset
Name | Type |
---|---|
opts? |
ProcedureOpts |
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
api/entities/Asset/Base/BaseAsset.ts:231
▸ unlinkTicker(opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Unlink ticker from the Asset
Name | Type |
---|---|
opts? |
ProcedureOpts |
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
api/entities/Asset/Base/BaseAsset.ts:278
▸ Static
generateUuid<Identifiers
>(identifiers
): string
Generate the Entity's UUID from its identifying properties
Name |
---|
Identifiers |
Name | Type |
---|---|
identifiers |
Identifiers |
string
▸ Static
unserialize<Identifiers
>(serialized
): Identifiers
Unserialize a UUID into its Unique Identifiers
Name |
---|
Identifiers |
Name | Type | Description |
---|---|---|
serialized |
string |
UUID to unserialize |
Identifiers
Entities
- Account
- Asset
- Authorization Request
- Checkpoint
- Checkpoint Schedule
- Corporate Action
- Corporate Action Base
- Custom Permission Group
- Default Portfolio
- Default Trusted Claim Issuer
- Dividend Distribution
- Entity
- Identity
- Instruction
- Known Permission Group
- Metadata Entry
- Multi Sig Proposal
- Numbered Portfolio
- Offering
- Permission Group
- Portfolio
- Subsidies
- Subsidy
- Ticker Reservation
- Venue
- Authorizations
- Types