Skip to main content
Version: v29.0.x

Class: NonFungibleSettlements

Defined in: src/api/entities/Asset/Base/Settlements/index.ts:225

Handles all Asset Settlements related functionality

Extends

Methods

canTransfer()

canTransfer(args: object): Promise<TransferBreakdown>

Defined in: src/api/entities/Asset/Base/Settlements/index.ts:241

Check whether it is possible to create a settlement instruction to transfer an NFT 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

Parameters

ParameterTypeDescription

args

{ from?: PortfolioLike; nfts: (BigNumber | Nft)[]; to: PortfolioLike; }

args.from?

PortfolioLike

sender Portfolio (optional, defaults to the signing Identity's Default Portfolio)

args.nfts

(BigNumber | Nft)[]

the NFTs to transfer

args.to

PortfolioLike

receiver Portfolio

Returns

Promise<TransferBreakdown>

Note

this takes locked tokens into account. For example, if portfolio A has NFTs 1, 2 and 3 of a collection and this function is called to check if 1 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 that token, they would become locked. From that point, further calls to this function would return failed results because of the funds being locked, even though it hasn't been transferred yet


preApprove()

preApprove(opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Asset/Base/Settlements/index.ts:39

Pre-approves receiving this asset for the signing identity. Receiving this asset in a settlement will not require manual affirmation

Parameters

ParameterType

opts?

ProcedureOpts

Returns

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

Inherited from

BaseSettlements.preApprove


removePreApproval()

removePreApproval(opts?: ProcedureOpts): Promise<GenericPolymeshTransaction<void, void>>

Defined in: src/api/entities/Asset/Base/Settlements/index.ts:44

Removes pre-approval for this asset

Parameters

ParameterType

opts?

ProcedureOpts

Returns

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

Inherited from

BaseSettlements.removePreApproval