[Feat] prepareSendNft
Closed this issue · 0 comments
wireless90 commented
/**
* Send NFT.
*
* @param params Addresses and nft ids.
* @param transactionOptions Additional transaction options
* or custom inputs.
* @returns The prepared transaction.
*/
async prepareSendNft(
params: SendNftParams[],
transactionOptions?: TransactionOptions,
): Promise<PreparedTransaction> {
const response = await this.methodHandler.callAccountMethod(
this.meta.index,
{
name: 'prepareSendNft',
data: {
params,
options: transactionOptions,
},
},
);
const parsed = JSON.parse(
response,
) as Response<PreparedTransactionData>;
return new PreparedTransaction(
plainToInstance(PreparedTransactionData, parsed.payload),
this,
);
}