simolus3 / web3dart

Ethereum library, written in Dart.
MIT License
441 stars 270 forks source link

private Api for centralized blockchain #231

Open seninAd opened 2 years ago

seninAd commented 2 years ago

hi I have read your code and you connect to etherscan and infura for the node, instead I have my own private blockchain and I have to implement the api for the connection with the flutter frontend. would you tell me if it is possible to implement the api with web3dart and how to do them or if flutter accepts javascript as a language so that you can use web3?

TheGreatAxios commented 2 years ago

@AAsenin

final Client _client = Client(); // I use the one from http package
final String _rpcUrl = 'http://localhost:1234';

final Web3Client _web3Client = Web3Client(_rpcUrl, _client);

I am currently using this without an issue.

// Javascript

Regarding the JavaScript piece, flutter does allow javascript packages and some code, but generally it is only using Flutter Web.

seninAd commented 2 years ago

i see that but i implemented the api with web3 in javascript , but flutter dont accept all command , for example require or the const . in this moment i try to found one example for doing the api in web3dart . there is here ???

TheGreatAxios commented 2 years ago

i see that but i implemented the api with web3 in javascript , but flutter dont accept all command , for example require or the const . in this moment i try to found one example for doing the api in web3dart . there is here ???

If you send some code I can help. Just tag me and clip some code in and we can take a look at what is going on.