-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate: web3auth to particle.network (#106)
* fixes/meta/seo * repository page ui fixed * initial commit * feat: add header to notification * feat: add notification avatars * feat: add notification data * feat: update Notification * feat: update notification page add notification component * fix : bug fixed * style: pretty code by ci * settings Ui Done * settings Ui Done * fix/dashboard * style: pretty code by ci * nvmrc: Signed-off-by: Nasfame <[email protected]> Took 7 minutes * notification ui error fixed * dashboard ui fixed * style: pretty code by ci * fixed zoom error * style: pretty code by ci * error fixed * style: pretty code by ci * peer dep issue * style: pretty code by ci --------- Signed-off-by: Nasfame <[email protected]> Co-authored-by: Raji Roqeeb Olalekan <[email protected]> Co-authored-by: sheriff Oladimeji <[email protected]> Co-authored-by: Sheriff-Oladimeji <[email protected]> Co-authored-by: Codebox124 <[email protected]> Co-authored-by: Nasfame <[email protected]> Co-authored-by: techyNonso <[email protected]> Co-authored-by: Nasfame <[email protected]>
- Loading branch information
1 parent
b213b62
commit 6a6f14c
Showing
6 changed files
with
133 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
declare module 'web3.storage' | ||
declare module '@particle-network/auth' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { ParticleNetwork, WalletEntryPosition } from '@particle-network/auth' | ||
import { ParticleProvider } from '@particle-network/provider' | ||
// import { SolanaWallet } from '@particle-network/solana-wallet' | ||
import { Ethereum } from '@particle-network/chains' | ||
|
||
const particle = new ParticleNetwork({ | ||
projectId: `${process.env.NEXT_PUBLIC_PROJECT_ID}`, | ||
clientKey: `${process.env.NEXT_PUBLIC_CLIENT_KEY}`, | ||
appId: `${process.env.NEXT_PUBLIC_APP_ID}`, | ||
chainName: Ethereum.name, //optional: current chain name, default Ethereum. | ||
chainId: Ethereum.id, //optional: current chain id, default 1. | ||
wallet: { | ||
//optional: by default, the wallet entry is displayed in the bottom right corner of the webpage. | ||
displayWalletEntry: true, //show wallet entry when connect particle. | ||
defaultWalletEntryPosition: WalletEntryPosition.BR, //wallet entry position | ||
uiMode: 'dark', //optional: light or dark, if not set, the default is the same as web auth. | ||
supportChains: [ | ||
{ id: 1, name: 'Ethereum' }, | ||
{ id: 5, name: 'Ethereum' }, | ||
], // optional: web wallet support chains. | ||
customStyle: {}, //optional: custom wallet style | ||
}, | ||
securityAccount: { | ||
//optional: particle security account config | ||
//prompt set payment password. 0: None, 1: Once(default), 2: Always | ||
promptSettingWhenSign: 1, | ||
//prompt set master password. 0: None(default), 1: Once, 2: Always | ||
promptMasterPasswordSettingWhenLogin: 1, | ||
}, | ||
}) | ||
|
||
const particleProvider = new ParticleProvider(particle.auth) | ||
//if you need support solana chain | ||
//const solanaWallet = new SolanaWallet(particle.auth) | ||
|
||
//if you use web3.js | ||
// window.web3 = new Web3(particleProvider) | ||
// window.web3.currentProvider.isParticleNetwork // => true | ||
|
||
//if you use ethers.js | ||
import { ethers } from 'ethers' | ||
const ethersProvider = new ethers.JsonRpcProvider(`${particleProvider}`) // new ethers.Jproviders.Web3Provider(particleProvider, 'any') | ||
const ethersSigner = ethersProvider.getSigner() |