-
Notifications
You must be signed in to change notification settings - Fork 513
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add @web3-onboard/okx * feat(okx sdk): use createDownloadMessage * Update packages/okx/src/types.ts * Prettier --------- Co-authored-by: Adam Carpenter <adamcarpenter86@gmail.com>
- Loading branch information
1 parent
9958cfe
commit 5626431
Showing
15 changed files
with
260 additions
and
5 deletions.
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
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
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,50 @@ | ||
--- | ||
title: OKX Wallet | ||
--- | ||
|
||
# {$frontmatter.title} | ||
|
||
Wallet module for connecting OKX wallet through Web3 Onboard | ||
|
||
### Install | ||
|
||
<Tabs values={['yarn', 'npm']}> | ||
<TabPanel value="yarn"> | ||
|
||
```sh copy | ||
yarn add @web3-onboard/okx | ||
``` | ||
|
||
</TabPanel> | ||
<TabPanel value="npm"> | ||
|
||
```sh copy | ||
npm install @web3-onboard/okx | ||
``` | ||
|
||
</TabPanel> | ||
</Tabs> | ||
|
||
## Usage | ||
|
||
```typescript | ||
import Onboard from '@web3-onboard/core' | ||
import okxWallet from '@web3-onboard/okx' | ||
|
||
const okx = okxWallet() | ||
|
||
const onboard = Onboard({ | ||
// ... other Onboard options | ||
wallets: [ | ||
okx | ||
//... other wallets | ||
] | ||
}) | ||
|
||
const connectedWallets = await onboard.connectWallet() | ||
console.log(connectedWallets) | ||
``` | ||
|
||
## Build Environments | ||
|
||
For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments) |
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
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,33 @@ | ||
# @web3-onboard/okx | ||
|
||
## Wallet module for connecting OKX Wallet through web3-onboard | ||
|
||
OKX Wallet SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications. | ||
|
||
### Install | ||
|
||
**NPM** | ||
`npm i @web3-onboard/core @web3-onboard/okx` | ||
|
||
**Yarn** | ||
`yarn add @web3-onboard/core @web3-onboard/okx` | ||
|
||
## Usage | ||
|
||
```typescript | ||
import Onboard from '@web3-onboard/core' | ||
import okxModule from '@web3-onboard/okx' | ||
|
||
const okx = okxModule() | ||
|
||
const onboard = Onboard({ | ||
// ... other Onboard options | ||
wallets: [ | ||
okx | ||
//... other wallets | ||
] | ||
}) | ||
|
||
const connectedWallets = await onboard.connectWallet() | ||
console.log(connectedWallets) | ||
``` |
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,66 @@ | ||
{ | ||
"name": "@web3-onboard/okx", | ||
"version": "2.0.0-alpha.1", | ||
"description": "OKX Wallet SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", | ||
"keywords": [ | ||
"Ethereum", | ||
"Web3", | ||
"EVM", | ||
"dapp", | ||
"Multichain", | ||
"Wallet", | ||
"Transaction", | ||
"Provider", | ||
"Hardware Wallet", | ||
"Notifications", | ||
"React", | ||
"Svelte", | ||
"Vue", | ||
"Next", | ||
"Nuxt", | ||
"MetaMask", | ||
"Coinbase", | ||
"WalletConnect", | ||
"Ledger", | ||
"Trezor", | ||
"Connect Wallet", | ||
"Ethereum Hooks", | ||
"Blocknative", | ||
"Mempool", | ||
"pending", | ||
"confirmed", | ||
"Injected Wallet", | ||
"Crypto", | ||
"Crypto Wallet", | ||
"Enkrypt", | ||
"OKX" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/blocknative/web3-onboard.git", | ||
"directory": "packages/okx" | ||
}, | ||
"homepage": "https://www.blocknative.com/onboard", | ||
"bugs": "https://github.com/blocknative/web3-onboard/issues", | ||
"module": "dist/index.js", | ||
"browser": "dist/index.js", | ||
"main": "dist/index.js", | ||
"type": "module", | ||
"typings": "dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "tsc", | ||
"dev": "tsc -w", | ||
"type-check": "tsc --noEmit" | ||
}, | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/node": "^17.0.21", | ||
"typescript": "^5.4.5" | ||
}, | ||
"dependencies": { | ||
"@web3-onboard/common": "^2.4.1" | ||
} | ||
} |
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,5 @@ | ||
export default `<svg width="100%" height="100%" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<rect width="1000" height="1000" fill="black"/> | ||
<path fill-rule="evenodd" clip-rule="evenodd" d="M393.949 218.518H231.049C224.129 218.518 218.519 224.128 218.519 231.048V393.948C218.519 400.869 224.129 406.479 231.049 406.479H393.949C400.87 406.479 406.48 400.869 406.48 393.948V231.048C406.48 224.128 400.87 218.518 393.949 218.518ZM581.992 406.479H419.092C412.172 406.479 406.561 412.09 406.561 419.01V581.91C406.561 588.831 412.172 594.441 419.092 594.441H581.992C588.913 594.441 594.523 588.831 594.523 581.91V419.01C594.523 412.09 588.913 406.479 581.992 406.479ZM606.974 218.518H769.874C776.794 218.518 782.405 224.128 782.405 231.048V393.948C782.405 400.869 776.794 406.479 769.874 406.479H606.974C600.053 406.479 594.443 400.869 594.443 393.948V231.048C594.443 224.128 600.053 218.518 606.974 218.518ZM393.95 594.442H231.049C224.129 594.442 218.519 600.052 218.519 606.973V769.873C218.519 776.793 224.129 782.404 231.049 782.404H393.95C400.87 782.404 406.48 776.793 406.48 769.873V606.973C406.48 600.052 400.87 594.442 393.95 594.442ZM606.974 594.442H769.874C776.794 594.442 782.405 600.052 782.405 606.973V769.873C782.405 776.793 776.794 782.404 769.874 782.404H606.974C600.053 782.404 594.443 776.793 594.443 769.873V606.973C594.443 600.052 600.053 594.442 606.974 594.442Z" fill="white"/> | ||
</svg> | ||
` |
Oops, something went wrong.