Skip to content

Commit

Permalink
Add XDEFI module and injected to docs site (#1544)
Browse files Browse the repository at this point in the history
* Add xdefi to docs

* Add xdefi module to docs

* Add xdefi package to docs onboard

* Add to injected wallets list
  • Loading branch information
Adamj1232 authored Feb 22, 2023
1 parent 930d219 commit 36944b9
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 20 deletions.
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"@web3-onboard/uauth": "^2.0.1",
"@web3-onboard/walletconnect": "^2.2.1",
"@web3-onboard/web3auth": "^2.1.4",
"@web3-onboard/xdefi": "^2.0.0",
"animejs": "^3.2.1",
"ethers": "^5.7.0"
}
Expand Down
3 changes: 3 additions & 0 deletions docs/src/lib/services/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const intiOnboard = async (theme) => {
const { default: web3authModule } = await import('@web3-onboard/web3auth')
const { default: uauthModule } = await import('@web3-onboard/uauth')
const { default: trustModule } = await import('@web3-onboard/trust')
const { default: xdefiModule } = await import('@web3-onboard/xdefi')
const INFURA_ID = '8b60d52405694345a99bcb82e722e0af'

const injected = injectedModule()
Expand All @@ -68,6 +69,7 @@ const intiOnboard = async (theme) => {
const tally = tallyModule()
const torus = torusModule()
const trust = trustModule()
const xdefi = xdefiModule()

const portis = portisModule({
apiKey: 'b2b7586f-2b1e-4c30-a7fb-c2d1533b153b'
Expand Down Expand Up @@ -110,6 +112,7 @@ const intiOnboard = async (theme) => {
gnosis,
uauth,
tally,
xdefi,
torus,
sequence,
web3auth,
Expand Down
2 changes: 1 addition & 1 deletion docs/src/routes/docs/[...4]wallets/injected.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ const injected = injectedModule({
- Meetone - _Mobile_
- Mykey - _Mobile_
- Ownbit - _Mobile_
- xDefi - _Desktop & Mobile_
- Tokenpocket - _Desktop & Mobile_
- TP - _Mobile_
- xDefi - _Desktop & Mobile_
- 1inch - _Mobile_
- Tokenary - _Mobile_
- GameStop - _Desktop_
Expand Down
47 changes: 47 additions & 0 deletions docs/src/routes/docs/[...4]wallets/xdefi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

# XDEFI

## Wallet module for connecting XDEFI to web3-onboard

See [XDEFI Wallet Developer Docs](https://sdk.xdefi.io/)

## Install

<Tabs values={['yarn', 'npm']}>
<TabPanel value="yarn">

```sh copy
yarn add @web3-onboard/core @web3-onboard/xdefi
```

</TabPanel>
<TabPanel value="npm">

```sh copy
npm install @web3-onboard/core @web3-onboard/xdefi
```

</TabPanel>
</Tabs>


## Usage

```typescript
import Onboard from '@web3-onboard/core'
import xdefiWalletModule from '@web3-onboard/xdefi'

// initialize the module with options
const xdefiWalletSdk = xdefiWalletModule()

const onboard = Onboard({
// ... other Onboard options
wallets: [
xdefiWalletSdk()
//... other wallets
]
})

const connectedWallets = await onboard.connectWallet()
console.log(connectedWallets)
```
35 changes: 16 additions & 19 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2969,10 +2969,10 @@
ethers "5.5.4"
joi "^17.6.1"

"@web3-onboard/core@^2.15.1-alpha.1":
version "2.15.1-alpha.1"
resolved "https://registry.yarnpkg.com/@web3-onboard/core/-/core-2.15.1-alpha.1.tgz#a6c241ba7eb84f40547e57b8192ecd46759ec5ad"
integrity sha512-CrAj0WkBxO52j2JUs5YFIbvfwyrUoWXO7B3QOG6VrQ9w4HRXO5lVBsD2RYMSA5fTbAbRZ7VwPiHCdmQ/ztKYLg==
"@web3-onboard/core@^2.15.2-alpha.1":
version "2.15.2"
resolved "https://registry.yarnpkg.com/@web3-onboard/core/-/core-2.15.2.tgz#9156f3c0a39dfb9aa8963a8ef4d8cf11bd8b5695"
integrity sha512-5p7rW6xNpljAq85kCcU5O/MKSR7uDG4V3EixwfwvNSITHejtjpfGmcUPFW7pYI/J+PQ3Z/u1ThMRDoD2tfjevA==
dependencies:
"@unstoppabledomains/resolution" "^8.0"
"@web3-onboard/common" "^2.2.3"
Expand Down Expand Up @@ -3138,10 +3138,10 @@
"@toruslabs/torus-embed" "1.38.2"
"@web3-onboard/common" "^2.2.3"

"@web3-onboard/transaction-preview@^2.0.3-alpha.1":
version "2.0.3-alpha.1"
resolved "https://registry.yarnpkg.com/@web3-onboard/transaction-preview/-/transaction-preview-2.0.3-alpha.1.tgz#b8945c3b785dc1e0281709c01b464fe45aea1570"
integrity sha512-iJZtvGcYh3ZbmTzaNRAUWKmX4VwgbgaKbmlYCdmeOvNjB7fZykzqr9CXbGwwVmfI3xA7zT17hP5M0WjGFyuDFA==
"@web3-onboard/transaction-preview@^2.0.4-alpha.1":
version "2.0.4"
resolved "https://registry.yarnpkg.com/@web3-onboard/transaction-preview/-/transaction-preview-2.0.4.tgz#c2d5dc55cf1602e9150c70238fc38a573ae580c7"
integrity sha512-GWnyPzQh0/7qVE8TDiehILqAlSsoodlUGq6FCuyIU2abaBDhssODxX+s9MLrSF0SlV8jniJ+KoG3ir1Q1chQTQ==
dependencies:
"@web3-onboard/common" "^2.2.3"
bnc-sdk "^4.6.7"
Expand Down Expand Up @@ -3206,6 +3206,13 @@
"@web3auth/base" "^3.3.0"
"@web3auth/modal" "^3.3.0"

"@web3-onboard/xdefi@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@web3-onboard/xdefi/-/xdefi-2.0.0.tgz#1adff4d798688d18616cfc8d78150fbe47f1757a"
integrity sha512-sgqhXUSO6dIvAmzKwD/ygCLtpkDgeLZ3Th8JkmV5t8wsYWj26FPuJFT0LNy4yVXSg4psFzsYcWb23BLdlTLvog==
dependencies:
"@web3-onboard/common" "^2.2.3"

"@web3auth/base-evm-adapter@^3.3.0":
version "3.3.0"
resolved "https://registry.yarnpkg.com/@web3auth/base-evm-adapter/-/base-evm-adapter-3.3.0.tgz#ab8575ac5d05dfe055e52500b61691cefdd6268f"
Expand Down Expand Up @@ -3931,17 +3938,7 @@ bnb-javascript-sdk-nobroadcast@^2.16.14:
uuid "^3.3.2"
websocket-stream "^5.5.0"

bnc-sdk@^4.6.6:
version "4.6.6"
resolved "https://registry.yarnpkg.com/bnc-sdk/-/bnc-sdk-4.6.6.tgz#ef5501a0c68014efae24d00d2e3fb706318fa00d"
integrity sha512-cpavy/WBQrkw5PZpnuUAvxzj/RjmP1vSldOEG+nonf7n/4sykScDO6KrJN2oVhEMaxHOqOVf2rOugSL5t515eA==
dependencies:
crypto-es "^1.2.2"
nanoid "^3.3.1"
rxjs "^6.6.3"
sturdy-websocket "^0.1.12"

bnc-sdk@^4.6.7:
bnc-sdk@^4.6.6, bnc-sdk@^4.6.7:
version "4.6.7"
resolved "https://registry.yarnpkg.com/bnc-sdk/-/bnc-sdk-4.6.7.tgz#138a22e04c95c2c697fb836092358d21957e2114"
integrity sha512-jIQ6cmeRBgvH/YDLuYRr2+kxDGcAAi0SOvjlO5nQ5cWdbslw+ASWftd1HmxiVLNCiwEH5bSc/t8a0agZ5njTUQ==
Expand Down

0 comments on commit 36944b9

Please sign in to comment.