executeNftTransfer
Transfer a non-fungible token from one destination to another
This function transfers non-fungible tokens (ex. ERC721/ ERC1155 / VIP181/…​) from one address to another. The destination can be any blockchain address, a wallet, or a smart contract, it can even be an email address.
1
signer.executeNftTransfer({
2
walletId: '71dec640-4eb8-4321-adb8-b79461573fc4',
3
to: '0xf147cA0b981C0CD0955D1323DB9980F4B43e9FED',
4
tokenAddress: '0x158b6a3540eeced8ecb40f9389e88f0902a3da9f'
5
tokenId: '65'
6
secretType: 'ETHEREUM',
7
})
Copied!

Signature

1
signer.executeNftTransfer(nftTransferRequestDto, options?): Promise<SignerResult>
Copied!

Returns

1
Promise<SignerResult>
Copied!

Parameters

Parameter
Required
Description
True
The transfer request you want to execute. For more info on how this request should look like, see nftTransferRequestDto .
​options​
False
Redirect options you want to pass. Only available when using a REDIRECT signer​

Example

1
const signer = venlyConnect.createSigner();
2
​
3
signer.executeNftTransfer({
4
walletId: '71dec640-4eb8-4321-adb8-b79461573fc4',
5
to: '0xf147cA0b981C0CD0955D1323DB9980F4B43e9FED',
6
tokenAddress: '0x158b6a3540eeced8ecb40f9389e88f0902a3da9f'
7
tokenId: '65'
8
secretType: 'ETHEREUM',
9
}).then((signerResult) => {
10
if (signerResult.success) {
11
console.log(`Transaction ${signerResult.result.transactionHash} has been successfully executed!`);
12
} else {
13
console.warn(`Something went wrong while executing the transaction`);
14
}
15
}).catch((reason) => {
16
console.log(error);
17
});
Copied!
πŸ§™ Using the network parameter, the node to which the transaction is sent can be set manually. It allows you to submit a transaction to any mainnet or testnet node of your choosing, public or private. (Ethereum only)

Object Types