Open ErkanKule opened 5 years ago
@ErkanKule Have you found a solution to your question? If so, could you share how to sign a transaction directly in C #
I'm also interessted if somebody found a solution
any news? it really should be with some sample code
I did it this way but im not sure if its correct, but would be nice if u can test ist.
private const string SignAlgorithmName = "SHA-256withECDSA"; public byte[] SignTransaction(byte[] data) { ISigner signer = SignerUtilities.GetSigner(SignAlgorithmName); signer.Init(true, _privateKey); signer.BlockUpdate(data, 0, data.Length); byte[] sigBytes = signer.GenerateSignature(); return sigBytes; }
I did it this way but im not sure if its correct, but would be nice if u can test ist.
private const string SignAlgorithmName = "SHA-256withECDSA"; public byte[] SignTransaction(byte[] data) { ISigner signer = SignerUtilities.GetSigner(SignAlgorithmName); signer.Init(true, _privateKey); signer.BlockUpdate(data, 0, data.Length); byte[] sigBytes = signer.GenerateSignature(); return sigBytes; }
and how do you send it to the blockchain? i appreciate if you send full sample of your solution.
I have never tried. Its documented at https://developers.tron.network/docs/account If you want to test it you can use https://developers.tron.network/reference#walletbroadcasttransaction-1 I will also test it if i have time
Does anyone have a full example of signing and broadcasting?
Does anyone have a full example of signing and broadcasting?
Not with this library, but check this out: https://github.com/stoway/TronNet#sample-3-contract-trc20-transfer-usdt
@MRayp hi, how i can use TronNet with .net framework 4.7 ??
@MRayp hi, how i can use TronNet with .net framework 4.7 ??
I used it in dotnet core... you should implement it in .net 4.7 yourself .
@MRayp ok. because .net framework does not support grpc ... .thank you
@maede71 Can multiple inputs and multiple outputs be specified for the transaction? That is, he sent tron from 3 addresses to one address?
@ramincsy2 i dont know. tronprotocol documentation: The adopted transaction model is the account model instead of the UTXO model. Currently, only one-to-one transaction services are available, meaning that one-to-many or many-to-one transactions are not supported.
help; https://github.com/tronprotocol/documentation/blob/master/TRX/Tron-overview.md and: https://developers.tron.network/docs/transactions-1
@maede71 How do big exchanges manage the wallets of the users?
for example: when we want to withdraw TRC20 from our wallets we need to pay fee in TRX, which causes a large amount of fee that is not an economic way for us. wold you please offer any solution for this.
@maede71 Thank you for your guidance
@ramincsy2 I think it's paid from a main wallet. And after a while, the users' wallets are transferred to the main wallet. And the cost is paid from the user withdrawal fee. This method prevents small amounts from remaining in the wallets. Maybe there are better solutions, if you find a solution, share it with us...
@maede71
I need help
I want to sign the transaction trc20 usdt offline
for .net or c#
@ramincsy2 I did not work on this and I do not know anything. on .NET4.7 or core?? How do you use it? And what can I do to help?
@maede71 .NET4.7 I can sign the transaction offline for trx trc10 but I can not sign the smart contract for trc20 offline I want to send usdt trc20 but the signature is offline
but I can not sign the smart contract for trc20 offline I want to send usdt trc20 but the signature is offline
Does anyone have a full example of signing and broadcasting?
Not with this library, but check this out: https://github.com/stoway/TronNet#sample-3-contract-trc20-transfer-usdt
it doesn't work!
@EhsanGhanbari what is your problem? https://developers.tron.network/docs/trc20-contract-interaction
Hi ,
There is no sample for transaction signing
I has a transfer contract for TRX ,
I had private key or ECKey too ,
what next to sign trx in c# ?