prepareNewNFT method

Transaction prepareNewNFT(
  1. int initialSupply,
  2. String name,
  3. String seed,
  4. int index,
  5. String curve,
  6. String originPrivateKey,
)

Prepare a transaction to create a NFT @param {int} initialSupply of the NFT @param {String} name of the NFT @param {String} seed TransactionChain seed @param {int} index Number of transaction in the chain @param {String} curve Elliptic curve to use ("ed25519", "P256", "secp256k1") @param {} originPrivateKey The origin signature to able to perform the ProofOfWork and authorize the transaction

Implementation

Transaction prepareNewNFT(int initialSupply, String name, String seed,
    int index, String curve, String originPrivateKey) {
  String content = 'initial supply: ${initialSupply}\nname: ${name}';
  return Transaction(type: 'nft', data: Transaction.initData())
      .setContent(content)
      .build(seed, index, curve)
      .originSign(originPrivateKey);
}