-
Notifications
You must be signed in to change notification settings - Fork 11
api.entities.Asset.Base.Settlements.FungibleSettlements
api/entities/Asset/Base/Settlements.FungibleSettlements
Handles all Asset Settlements related functionality
-
BaseSettlements
<FungibleAsset
>↳
FungibleSettlements
▸ canTransfer(args
): Promise
<TransferBreakdown
>
Check whether it is possible to create a settlement instruction to transfer a certain amount of this asset between two Portfolios. Returns a breakdown of the transaction containing general errors (such as insufficient balance or invalid receiver), any broken transfer restrictions, and any compliance failures
Name | Type | Description |
---|---|---|
args |
Object |
- |
args.amount |
BigNumber |
amount of tokens to transfer |
args.from? |
PortfolioLike |
sender Portfolio (optional, defaults to the signing Identity's Default Portfolio) |
args.to |
PortfolioLike |
receiver Portfolio |
Promise
<TransferBreakdown
>
Note
this takes locked tokens into account. For example, if portfolio A has 1000 tokens and this function is called to check if 700 of them can be transferred to portfolio B (assuming everything else checks out) the result will be success. If an instruction is created and authorized to transfer those 700 tokens, they would become locked. From that point, further calls to this function would return failed results because of the funds being locked, even though they haven't been transferred yet
api/entities/Asset/Base/Settlements/index.ts:281
▸ preApprove(opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Pre-approves receiving this asset for the signing identity. Receiving this asset in a settlement will not require manual affirmation
Name | Type |
---|---|
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
this method is of type NoArgsProcedureMethod, which means you can call preApprove.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
BaseSettlements.preApprove
api/entities/Asset/Base/Settlements/index.ts:53
▸ removePreApproval(opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Removes pre-approval for this asset
Name | Type |
---|---|
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<void
, void
>>
Note
this method is of type NoArgsProcedureMethod, which means you can call removePreApproval.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
BaseSettlements.removePreApproval
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