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

prototype: tKey MPC integration #2424

Closed
wants to merge 14 commits into from
Closed

prototype: tKey MPC integration #2424

wants to merge 14 commits into from

Conversation

schmanu
Copy link
Member

@schmanu schmanu commented Aug 22, 2023

Prototype implementation using tKey MPC for Social Logins.

It is possible to create new wallets, add a backup factor, reset (delete) the whole account and to sign transactions on Görli.

@github-actions
Copy link

github-actions bot commented Aug 22, 2023

Branch preview

✅ Deploy successful!

https://tkey_mpc--walletweb.review-wallet-web.5afe.dev

@github-actions
Copy link

github-actions bot commented Aug 22, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 1 0
Ignored 0 N/A
  • Result: ✅ success

  • Annotations: 1 total


[warning] react-hooks/exhaustive-deps

verifies the list of dependencies for Hooks like useEffect and similar


Report generated by eslint-plus-action

);
}
} catch (error) {
console.log('Hello');
Copy link
Member

Choose a reason for hiding this comment

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

Hello to you as well!

Copy link
Member Author

Choose a reason for hiding this comment

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

hahaha. This is the example service worker copied from the web3auth guide. It is def. not production ready.
I think it will also need adjustments as it hardcodes localhost:3000

https://web3auth.io/docs/content-hub/guides/tkey-mpc#setting-up-the-service-worker

blockExplorer: 'https://goerli.etherscan.io',
ticker: 'ETH',
tickerName: 'Ethereum',
chainId: hexlify(Number(chain.chainId)),
Copy link
Member

Choose a reason for hiding this comment

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

Is it giving anything different than Number(chain.chainId).toString(16)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, I will use the your suggested conversion to reduce ethers dependencies.

const fromAddress = (await web3Local?.send('eth_accounts', []))[0]
setWalletAddress(fromAddress)
const accountsResponse = await web3Local?.send('eth_accounts', [])
if (isArray(accountsResponse) && accountsResponse.length > 0) {
Copy link
Member

Choose a reason for hiding this comment

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

There's a native Array.isArray.

@schmanu schmanu closed this Aug 25, 2023
@schmanu schmanu deleted the tKey-MPC branch August 25, 2023 12:08
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants