Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Add typedocs for commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Tschakki committed Dec 7, 2023
1 parent 3d08f48 commit b31234a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
3 changes: 3 additions & 0 deletions framework/src/modules/nft/cc_commands/cc_transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ import { FeeMethod } from '../types';
import { EscrowStore } from '../stores/escrow';
import { CcmTransferEvent } from '../events/ccm_transfer';

/**
* Accepts CCMs created by the {@link CrossChainTransferCommand} and executes the cross-chain transfer on the receiving chain.
*/
export class CrossChainTransferCommand extends BaseCCCommand {
public schema = crossChainNFTTransferMessageParamsSchema;
private _method!: NFTMethod;
Expand Down
2 changes: 1 addition & 1 deletion framework/src/modules/nft/commands/transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface TransferParams {
*
* @example
* ```sh
* ./bin/run transaction:create nft transfer 10000000 --params='{"nftID":"01000000000000010000000000000001","recipientAddress":"lskycz7hvr8yfu74bcwxy2n4mopfmjancgdvxq8xz","data":"Congratulations on completing the course!"}'
* lisk-core transaction:create nft transfer 10000000 --params='{"nftID":"01000000000000010000000000000001","recipientAddress":"lskycz7hvr8yfu74bcwxy2n4mopfmjancgdvxq8xz","data":"Congratulations on completing the course!"}'
* ```
*/
export class TransferCommand extends BaseCommand {
Expand Down
19 changes: 19 additions & 0 deletions framework/src/modules/nft/commands/transfer_cross_chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,25 @@ export interface TransferCrossChainParams {
includeAttributes: boolean;
}

/**
* The TransferCrossChain command transfers an NFT from one account to another across chains.
*
* ## Name
* - `transferCrossChain`
*
* ## Parameters
* - `nftID` (number) : 16 byte long
* - `recipientAddress` (string) : Lisk32 address
* - `data` (string) : Optional transfer message
* - `receivingChainID` (string) : The {@link https://lisk.com/documentation/understand-blockchain/interoperability/index.html#chain-identifiers | Chain ID} of the network receiving the NFT.
* - `messageFee` (string): Fee for the execution of the CCM in Beddows
* - `includeAttributes` (boolean) : Boolean, if NFT attributes should be inlcuded in the cross-chain transfer, or not.
*
* @example
* ```sh
* lisk-core transaction:create nft transferCrossChain 10000000 --params='{"nftID":"01000000000000010000000000000001","recipientAddress":"lskycz7hvr8yfu74bcwxy2n4mopfmjancgdvxq8xz","data":"Congratulations on completing the course!","receivingChainID":"04000002","messageFee":"10000000","includeAttributes":true}'
* ```
*/
export class TransferCrossChainCommand extends BaseCommand {
public schema = crossChainTransferParamsSchema;

Expand Down

0 comments on commit b31234a

Please sign in to comment.