Transfers one or more tokens from the transaction signer to the recipient(s) specified.
As with all new SDK api methods, this call should be wrapped in execute and passed a signing method
transfer(args: TransferArgs): NearContractCall
transfer takes a single argument of type TransferArgs
type TransferArgs = {
// pairs of recipient and token ids,
// each recipient will receive the corresponding token
transfers: {
receiverId: string;
tokenId: string;
}[];
// nftContractId is the token contract capable of doing the transfer
// if omitted, transfer method will attempt to use process.env.CONTRACT_ADDRESS
nftContractId?: string;
};
Example usage of transfer method in a hypothetical React component: