A premise, I have confused ideas about smart contract client.
I would like to create a website, that runs a classic browser, with a javascript file imported that can execute functions on the blockchain.
I've seen Web3JS but it seems to be a NodeJS library (in fact it use the require()
function that is not a built-in function in a Javascript console). I'm searching for a way to connect to the remote node and then execute the smart contract on it and then read the output. But, if a user that uses my website has a local node running, then I use its node instead of my remote node.
Can anyone help me to understand which components I need and how to orchestrate all the components?
I don't know, help me to understand, if instead of connecting to remote node, is it possible to start a light-client on a client browser in a few second?