Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docs: Ethereum Provider section in typescript.md #993

Merged
merged 3 commits into from
Aug 8, 2023

Conversation

KipCrossing
Copy link
Contributor

@KipCrossing KipCrossing commented Aug 7, 2023

In this PR:

  • docs for "viem/window" and EIP1193Provider

It would be good to let the user know about typing support for window.ethereum; Especially considering this project adopts ddd.

This section was added to typescript.md as per this discussion: #977

Happy to update or move, let me know.


PR-Codex overview

This PR adds a window polyfill for viem that allows window.ethereum to be typed as an EIP1193Provider with a fully-typed request function and typed events.

Detailed summary

  • Adds a window polyfill for viem
  • window.ethereum is typed as an EIP1193Provider
  • Includes a fully-typed request function and typed events
  • window.ethereum may be undefined in certain cases

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@changeset-bot
Copy link

changeset-bot bot commented Aug 7, 2023

⚠️ No Changeset found

Latest commit: cf5e8ab

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Aug 7, 2023

@KipCrossing is attempting to deploy a commit to the wagmi Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Aug 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
viem ✅ Ready (Inspect) Visit Preview Aug 7, 2023 3:16pm

@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Merging #993 (3cc78d2) into main (e4a870e) will decrease coverage by 4.74%.
Report is 2 commits behind head on main.
The diff coverage is n/a.

❗ Current head 3cc78d2 differs from pull request most recent head f685bfa. Consider uploading reports for the commit f685bfa to get more accurate results

@@            Coverage Diff             @@
##             main     #993      +/-   ##
==========================================
- Coverage   99.79%   95.05%   -4.74%     
==========================================
  Files         262      259       -3     
  Lines       25745    25574     -171     
  Branches     2071     1829     -242     
==========================================
- Hits        25691    24310    -1381     
- Misses         51     1254    +1203     
- Partials        3       10       +7     

see 49 files with indirect coverage changes

@jxom
Copy link
Member

jxom commented Aug 8, 2023

Thanks!

@jxom jxom merged commit 8031562 into wevm:main Aug 8, 2023
aaronmgdr pushed a commit to celo-org/viem that referenced this pull request Aug 18, 2023
* docs: add Ethereum Provider section

* Update typescript.md

* Update typescript.md

---------

Co-authored-by: jxom <jakemoxey@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants