web3dart icon indicating copy to clipboard operation
web3dart copied to clipboard

private Api for centralized blockchain

Open seninAd opened this issue 3 years ago • 3 comments

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?

seninAd avatar Dec 17 '21 15:12 seninAd

@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.

TheGreatAxios avatar Dec 28 '21 14:12 TheGreatAxios

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 ???

seninAd avatar Dec 28 '21 14:12 seninAd

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.

TheGreatAxios avatar Dec 29 '21 21:12 TheGreatAxios