-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more examples #27
Comments
I need too. add an ethereum example please. |
Will do, but it will not be so fast, currently I'm using this lib for my product, a lots api may have breaking changes due to requirements, I'll add more eth example in few days. Btw the best tutorial please refer to trust wallet core official test case. |
Thank you so much. Waiting for that. |
Hello. Any updates about ethereum transaction example? |
@sylvestrevgen @mahdibagjani The official tests are a really good reference, I got basic ETH transactions signed and submitted to network like this: Note: need to convert hex into byte arrays for the protobuf messages with the convert package final input = SigningInput(
privateKey: privateKey.data(),
chainId: hex.decode('0539'), // 1337 for ganache
nonce: hex.decode('01'),
gasPrice: hex.decode('04a817c800'), // 20000000000
gasLimit: hex.decode('5208'), // 21000
toAddress: receiverAddress,
transaction: Transaction(
transfer: Transaction_Transfer(
amount: hex.decode('0de0b6b3a7640000'), // 1 ETH
),
),
);
final signed = AnySigner.sign(
input.writeToBuffer(),
TWCoinType.TWCoinTypeEthereum,
);
final output = SigningOutput.fromBuffer(signed);
// Now you can submit the encoded output to the network
output.encoded
|
@edTheGuy00 perfect... Appreciate any feedback |
Hello. Thank you for this plugin, it is very great and useful. Can you add more examples for different cois and ethereum transaction example, please?
The text was updated successfully, but these errors were encountered: