stackup-wallet / userop.js

A simple JS library for building ERC-4337 UserOperations.
MIT License
115 stars 32 forks source link

Extend rpc configuration in userop.js to support ConnectionInfo #62

Closed winor30 closed 10 months ago

winor30 commented 1 year ago

This PR modifies the userop.js library to allow for more extensive rpc configurations. Previously, the rpc configuration only accepted a URL string. However, there was a need to set additional request parameters beyond the URL, such as headers.

To address this, the type of rpc configuration parameters has been extended from rpc?: string to rpc?: string | ConnectionInfo. The ConnectionInfo type, which comes from the ethers library, allows for the setting of a wider range of parameters, such as headers, in addition to the URL.

winor30 commented 1 year ago

@hazim-j could you please check it? We would like this change in our project.