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 support for json-rpc accounts (e.g. metamask) w/ eth_sign #7

Merged
merged 20 commits into from
Dec 8, 2023

Conversation

zeroXbrock
Copy link
Member

@zeroXbrock zeroXbrock commented Dec 5, 2023

  • detect transport type to determine which signing method to use
    • use eth_sign if wallet is initialized with a custom transport (e.g. window.ethereum)
    • otherwise local account (privateKey) is expected
  • add doc-comments for suaveRigil.newWallet and suaveRigil.newPublicClient

Copy link
Contributor

github-actions bot commented Dec 5, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
viem (esm) 57.93 KB (0%) 1.2 s (0%) 1.1 s (-50.65% 🔽) 2.2 s
viem (cjs) 76.48 KB (0%) 1.6 s (0%) 2.5 s (+52.66% 🔺) 4 s
viem (minimal surface - tree-shaking) 3.97 KB (0%) 80 ms (0%) 238 ms (-42.71% 🔽) 317 ms
viem/accounts 89.01 KB (0%) 1.8 s (0%) 1.2 s (-16.22% 🔽) 3 s
viem/accounts (tree-shaking) 19.37 KB (0%) 388 ms (0%) 405 ms (-6.95% 🔽) 793 ms
viem/actions 43.25 KB (0%) 865 ms (0%) 7.7 s (+5.39% 🔺) 8.5 s
viem/actions (tree-shaking) 350 B (0%) 10 ms (0%) 245 ms (-32.87% 🔽) 255 ms
viem/chains 59.89 KB (+0.9% 🔺) 1.2 s (+0.9% 🔺) 1.2 s (-37.53% 🔽) 2.4 s
viem/chains (tree-shaking) 470 B (0%) 10 ms (0%) 798 ms (+73.76% 🔺) 808 ms
viem/chains/utils 7.97 KB (0%) 160 ms (0%) 332 ms (-28.82% 🔽) 492 ms
viem/chains/utils (tree-shaking) 5.24 KB (0%) 105 ms (0%) 565 ms (+59.46% 🔺) 670 ms
viem/ens 43.24 KB (-0.01% 🔽) 865 ms (-0.01% 🔽) 7.7 s (-9.76% 🔽) 8.6 s
viem/ens (tree-shaking) 17.94 KB (0%) 359 ms (0%) 355 ms (-22.78% 🔽) 713 ms

Copy link
Member

@dmarzzz dmarzzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LSTM

@zeroXbrock zeroXbrock merged commit 54cc4ea into main Dec 8, 2023
4 of 12 checks passed
@zeroXbrock zeroXbrock deleted the eth_sign-support branch December 8, 2023 00:48
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.

3 participants