This microservice is created to connect any frontend or backend application to hedera block chain network.
This microservice is created to connect any frontend or backend application to hedera block chain network.
This package will help users to create NFTs in batch & Transfer ownership of NFT to other users.
Note: Creating NFTs in batch saves the GAS amount charged per NFT creation.
Currently for each NFT creation hedera charges around 14 HBARs as GAS cost.
With batch NFTs creation you can create around 1,000 NFTs with same GAS cost as 1 NFT i.e around 14 HBARs.
Not only NFTs but this package will also help to create custom fungible tokens on hedera network with capability
of transferring it to multiple users withing hedera eco system.
This package will also help to swap custom fungible tokens to HBARs & vice versa.
1. Install package using command npm install hedera-services
2. Initialise and Get the the Client as follow:
const initClient = async (
operatorId,
operatorPvKey,
maxQueryPayment,
isMainNet = false
) => {
try {
const client = await getClient(
operatorId,
operatorPvKey,
maxQueryPayment,
isMainNet
);
global.client;
global.client = client;
} catch (error) {
throw error;
}
};
3. Non Fungible Token:
A. To create new NFTs:
createAndMintToken(
"
"
"
"
"
);
B. To create new NFTs with limited supply
mintFiniteNFTs(
"
"
"
"
"
"
)
C. To create non fungible token
createNonFungibleToken(
tokenName,
"
"
"
"
)
D. To mint non fungible token
mintNonFungibleToken(
"
"
"
"
)
E. To transfer NFT ownership:
purchaseNFT(
"
"
"
"
"
"
"
);
F. To transfer NFT with Royalty:
purchaseNFT(
"
"
"
"
"
"
"
"
"
);
G: To tansfer NFT using Fungible token
purchaseNFTUsingToken(
"
"
"
"
"
"
"
"
)
H: To tansfer NFT using fungible token with royalty
purchaseNFTUsingToken(
"
"
"
"
"
"
"
"
"
"
)
I. To transfer multiple NFTs:
transferMultipleNFTs(
"
"
"
"
"
"
"
)
J. Burn NFT Serial Number:
burnNonFungibleToken(
"
"
"
"
)
4. Fungible Token:
A. To create Fungible Token
createFungibleToken(
"
"
"
"
"
"
);
B. To transfer fungible tokens to other hedera account
transferFungibleToken(
"
"
"
"
"
"
)
C. To swap Fungible Token with Hbar
swapFungibleToken(
"
"
"
"
"
"
"
)
note: Here token buyer is who want to buy token with exchange of Hbar.
D. To update Fungible Token Supply
updateFungibleTokenSupply(
"
"
"
"
)
5. Files:
A. Create File
createFile(
"
"
"
);
B. Read File
getFileContent(
"
"
"
);
C. Update File
updateFile(
);
D. Append File
appendFile(
)
E. Delete File
appendFile(
)
A. Create Hedera Acount using Private Key
createHederaAccount(
B. Create Hedera Acount using 24 word Phrases
createAccountUsingPhrases(
)
transferHBar(
)
1. We are not saving any private keys of users for security reasons.
2. NFTs created through this package can be validated from hedera mirror node apis.
(https://testnet.mirrornode.hedera.com/api/v1/tokens/{token_id}/nfts
https://mainnet.mirrornode.hedera.com/api/v1/tokens/{token_id}/nfts)