Boilertalk / Web3.swift

A pure swift Ethereum Web3 library
MIT License
639 stars 188 forks source link

eth_sendTransaction not available #116

Open text4lilac opened 2 years ago

text4lilac commented 2 years ago

in my app, i am trying to call eth_sendTransaction method but its not working and giving error of eth_sendTransaction method not avaialble

i am trying to connect with metamask and using web3 rpc url:- https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161

i want to proceed without signing transaction. Is it possible or is there any workaround?

koraykoska commented 2 years ago

You can create your own methods as extensions of Web3 or Web3.Eth. Just use the same approach as in the Web3.swift main file (take the example of eth_sendRawTransaction).

We don't support all methods because there are a lot and most of them are not supported/discouraged. This library assumes in many places that private keys are directly handled, not by the node. That's why we don't support things like eth_sendTransaction. Adding it manually is easy enough to continue this strict path.