Deejay's Scripts Documentation
  • Getting started
    • Introduction
    • Environment Set-up
    • Import and install our Scripts
    • Scripts overview
    • Setting .env
  • Scripts
    • â„šī¸Get Token Info
    • ✅Check Ownership
    • 🔗Associate / Dissociate Tokens
    • đŸĒ™Create Fungible Token
    • âš’ī¸Mint Additional Fungible Tokens
    • 🎆Burn Fungible Tokens
    • 🔨Create Non-Fungible Token
    • đŸ”ĨBurn Non-Fungible Tokens
    • â„ī¸Freeze Non-Fungible Tokens
    • 🤝NFT Transfer between two owned accounts
    • 🔑Update Private Key
    • 🔍Track Hedera NFTs
    • â˜ ī¸Token Graveyard
Powered by GitBook
On this page
  • Note
  • Usage
  • Arguments
  1. Scripts

NFT Transfer between two owned accounts

Script to transfer all serials of a given token from one account to another when you have both keys. Useful when sender account is not treasury e.g. from a burner 3rd party or between wallets you own.

Note

This script exposes minimal economics (0.001 per batch of up to 8 NFTs) to cirumvent royalties / fall back fees.

Usage

Edit your .env file (rename .env.example to .env) with the following items:

###NFTTransferTwoPKs 
SENDER_ACCOUNT_ID=0.0.4561233
SENDER_PRIVATE_KEY=302e1..............
RECEIVE_ACCOUNT_ID=0.0.1234565
RECEIVE_PRIVATE_KEY=302e2.............
MEMO='Example Memo' 
##MAIN or TEST environment 
ENVIRONMENT=TEST

We recommend to remove the private key from the .env file after use. Extra precaution.

Then, in your Node.js command prompt terminal, you can use

node NFTTransferTwoPKs.mjs -t [-v]

Arguments

-t for Token id, for example -t 0.0.123456. if not specified look for all tokens in given wallet

-v - optional - for verbose (debug)

PreviousFreeze Non-Fungible TokensNextUpdate Private Key

Last updated 2 years ago

🤝