/** * Mint asset to Alice address */ async Task <string> GenerateAsset() { var aliceAddress = _aliceWallet.GetAddress(); var generateAsset = new AssetGen(TOKEN_NAME, 1000000m, aliceAddress); var memo = new MemoEntry(new[] { "Generate 1000000m CookiePoints." }); var tx = TransactionCreator.SimpleSignedTransaction( new ITransactionEntry[] { generateAsset, memo }, new[] { _aliceWallet.GetPrivateKey() }); await _transactionService.SendTransaction(tx); return(tx.Id.ToString()); }
/// <summary> /// Generation Asset /// </summary> /// <param name="client"></param> /// <returns>tx.Id</returns> public static async Task <string> Assetgenerate(IClient client) { //Asset infomation var generateAsset = new AssetGen(TableName, 1000000m, new PublicKeyAddress(Utils.GetUser0KeyPair().PublicKey)); var tx = TransactionCreator.SimpleSignedTransaction( new ITransactionEntry[] { generateAsset }, new[] { Utils.GetOwnerKeyPair().PrivateKey }); await SendTransaction(tx); return(tx.Id.ToString());; }