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

Adapter configuration #1926

Merged
merged 3 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ await web3auth.connect();
| `@web3auth/no-modal-react-hooks` | [![npm version](https://img.shields.io/npm/v/@web3auth/no-modal-react-hooks?label=%22%22)](https://www.npmjs.com/package/@web3auth/no-modal-react-hooks/v/latest) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3auth/no-modal-react-hooks?label=%22%22)](https://bundlephobia.com/result?p=@web3auth/no-modal-react-hooks@latest) | Provides React hooks for integrating Web3Auth No Modal SDK in React applications. Offers flexibility for custom UI implementations while simplifying Web3Auth state management and interactions. |
| 🔌 **Adapters** |
| `@web3auth/coinbase-adapter` | [![npm version](https://img.shields.io/npm/v/@web3auth/coinbase-adapter?label=%22%22)](https://www.npmjs.com/package/@web3auth/coinbase-adapter/v/latest) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3auth/coinbase-adapter?label=%22%22)](https://bundlephobia.com/result?p=@web3auth/coinbase-adapter@latest) | Adds coinbase login functionality |
| `@web3auth/metamask-adapter` | [![npm version](https://img.shields.io/npm/v/@web3auth/metamask-adapter?label=%22%22)](https://www.npmjs.com/package/@web3auth/metamask-adapter/v/latest) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3auth/metamask-adapter?label=%22%22)](https://bundlephobia.com/result?p=@web3auth/metamask-adapter@latest) | Adds metamask chrome extension login functionality |
| `@web3auth/auth-adapter` | [![npm version](https://img.shields.io/npm/v/@web3auth/auth-adapter?label=%22%22)](https://www.npmjs.com/package/@web3auth/auth-adapter/v/latest) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3auth/auth-adapter?label=%22%22)](https://bundlephobia.com/result?p=@web3auth/auth-adapter@latest) | Adds social logins with MFA functionality |
| `@web3auth/phantom-adapter` | [![npm version](https://img.shields.io/npm/v/@web3auth/phantom-adapter?label=%22%22)](https://www.npmjs.com/package/@web3auth/phantom-adapter/v/latest) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3auth/phantom-adapter?label=%22%22)](https://bundlephobia.com/result?p=@web3auth/phantom-adapter@latest) | Adds phantom chrome extension login functionality |
| `@web3auth/auth-adapter` | [![npm version](https://img.shields.io/npm/v/@web3auth/auth-adapter?label=%22%22)](https://www.npmjs.com/package/@web3auth/auth-adapter/v/latest) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3auth/auth-adapter?label=%22%22)](https://bundlephobia.com/result?p=@web3auth/auth-adapter@latest) | Adds social logins with MFA functionality |
| `@web3auth/torus-evm-adapter` | [![npm version](https://img.shields.io/npm/v/@web3auth/torus-evm-adapter?label=%22%22)](https://www.npmjs.com/package/@web3auth/torus-evm-adapter/v/latest) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3auth/torus-evm-adapter?label=%22%22)](https://bundlephobia.com/result?p=@web3auth/torus-evm-adapter@latest) | Adds Torus Wallet login functionality (https://app.tor.us) |
| `@web3auth/torus-solana-adapter` | [![npm version](https://img.shields.io/npm/v/@web3auth/torus-solana-adapter?label=%22%22)](https://www.npmjs.com/package/@web3auth/torus-solana-adapter/v/latest) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3auth/torus-solana-adapter?label=%22%22)](https://bundlephobia.com/result?p=@web3auth/torus-solana-adapter@latest) | Adds Solana Torus Wallet login functionality (https://solana.tor.us) |
| `@web3auth/wallet-connect-v2-adapter` | [![npm version](https://img.shields.io/npm/v/@web3auth/wallet-connect-v2-adapter?label=%22%22)](https://www.npmjs.com/package/@web3auth/wallet-connect-v2-adapter/v/latest) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3auth/wallet-connect-v2-adapter?label=%22%22)](https://bundlephobia.com/result?p=@web3auth/wallet-connect-v2-adapter@latest) | Adds wallet connect v2 login functionality + all supported adapters (eg: Metamask mobile, rainbow etc.) |
Expand Down
56 changes: 3 additions & 53 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/adapters/default-evm-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"dependencies": {
"@web3auth/base": "^9.0.0-alpha.0",
"@web3auth/base-evm-adapter": "^9.0.0-alpha.0",
"@web3auth/torus-evm-adapter": "^9.0.0-alpha.0",
"@web3auth/wallet-connect-v2-adapter": "^9.0.0-alpha.0",
"mipd": "^0.0.7"
},
Expand Down
8 changes: 2 additions & 6 deletions packages/adapters/default-evm-adapter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ export const getDefaultExternalAdapters = async (params: { options: IWeb3AuthCor
...(chainConfig || {}),
};

const [{ TorusWalletAdapter }, { WalletConnectV2Adapter }] = await Promise.all([
import("@web3auth/torus-evm-adapter"),
import("@web3auth/wallet-connect-v2-adapter"),
]);
const torusWalletAdapter = new TorusWalletAdapter({ chainConfig: finalChainConfig, clientId, sessionTime, web3AuthNetwork, useCoreKitKey });
const [{ WalletConnectV2Adapter }] = await Promise.all([import("@web3auth/wallet-connect-v2-adapter")]);

const wcv2Adapter = new WalletConnectV2Adapter({
chainConfig: finalChainConfig,
Expand Down Expand Up @@ -54,5 +50,5 @@ export const getDefaultExternalAdapters = async (params: { options: IWeb3AuthCor
});
});

return [...injectedProviders, torusWalletAdapter, wcv2Adapter];
return [...injectedProviders, wcv2Adapter];
};
1 change: 0 additions & 1 deletion packages/adapters/default-solana-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"@web3auth/base": "^9.0.0-alpha.0",
"@web3auth/base-solana-adapter": "^9.0.0-alpha.0",
"@web3auth/solana-provider": "^9.0.0-alpha.0",
"@web3auth/torus-solana-adapter": "^9.0.0-alpha.0",
"bn.js": "^5.2.1"
},
"files": [
Expand Down
4 changes: 1 addition & 3 deletions packages/adapters/default-solana-adapter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export const getDefaultExternalAdapters = async (params: { options: IWeb3AuthCor
...(getChainConfig(chainConfig.chainNamespace, chainConfig?.chainId) as CustomChainConfig),
...(chainConfig || {}),
};
const [{ SolanaWalletAdapter }] = await Promise.all([import("@web3auth/torus-solana-adapter")]);
const solanaWalletAdapter = new SolanaWalletAdapter({ chainConfig: finalChainConfig, clientId, sessionTime, web3AuthNetwork, useCoreKitKey });

// get installed wallets that support standard wallet
const standardWalletAdapters = [] as BaseAdapter<void>[];
Expand All @@ -50,5 +48,5 @@ export const getDefaultExternalAdapters = async (params: { options: IWeb3AuthCor
})
);
});
return [solanaWalletAdapter, ...standardWalletAdapters];
return standardWalletAdapters;
};
64 changes: 0 additions & 64 deletions packages/adapters/metamask-adapter/README.md

This file was deleted.

62 changes: 0 additions & 62 deletions packages/adapters/metamask-adapter/package.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/adapters/metamask-adapter/src/index.ts

This file was deleted.

Loading
Loading