Skip to content

Commit

Permalink
Release 2.21.4 (docs) (#1672)
Browse files Browse the repository at this point in the history
  • Loading branch information
leightkt authored May 2, 2023
1 parent 56be08e commit d7d89f8
Show file tree
Hide file tree
Showing 21 changed files with 555 additions and 54 deletions.
19 changes: 19 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,12 @@ jobs:
working_directory: ~/web3-onboard-monorepo/packages/unstoppable-resolution
steps:
- node-build-steps
build-cede-store:
docker:
- image: cimg/node:16.13.1
working_directory: ~/web3-onboard-monorepo/packages/cede-store
steps:
- node-build-steps

# Build staging/Alpha releases
build-staging-core:
Expand Down Expand Up @@ -599,6 +605,12 @@ jobs:
working_directory: ~/web3-onboard-monorepo/packages/unstoppable-resolution
steps:
- node-staging-build-steps
build-staging-cede-store:
docker:
- image: cimg/node:16.13.1
working_directory: ~/web3-onboard-monorepo/packages/cede-store
steps:
- node-staging-build-steps

workflows:
version: 2
Expand Down Expand Up @@ -819,3 +831,10 @@ workflows:
<<: *deploy_production_filters
- build-staging-unstoppable-resolution:
<<: *deploy_staging_filters
cede-store:
jobs:
- build-cede-store:
<<: *deploy_production_filters
- build-staging-cede-store:
<<: *deploy_staging_filters

1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
},
"type": "module",
"dependencies": {
"@web3-onboard/cede-store": "^2.0.0-alpha.1",
"@web3-onboard/coinbase": "^2.2.2",
"@web3-onboard/core": "^2.17.0-alpha.1",
"@web3-onboard/dcent": "^2.2.5",
Expand Down
8 changes: 6 additions & 2 deletions docs/src/lib/components/FeaturesSection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import FeatureCard from './FeatureCard.svelte'
import FrameworksGraphic from './svg/frameworks-group.svelte'
import NetworksGraphic from './svg/networks-group.svelte'
import NotifyGraphic from './svg/notify-group.svelte'
import NetworksGraphic from './svg/networks-graphic.svg'
import AccountCenterGraphic from './svg/account-center-graphic.svg'
import WalletsGraphic from './svg/wallet-row.svg'
import TransactionPreviewGraphic from './svg/transaction-preview-graphic.svg'
Expand Down Expand Up @@ -78,7 +78,11 @@
<Button href="/examples/connect-wallet" buttonStyle={'link'}>{'View Demo'}</Button>
</Flexbox>
</TextBlock>
<NetworksGraphic />
<img
src={NetworksGraphic}
alt="Onboard Supported Chains"
style="margin: auto; max-width: 80%;"
/>
</div>
</Container>
<ScrollContainer>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions docs/src/lib/services/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const classMutationListener = () => {
}

const intiOnboard = async (theme) => {
const { default: cedeModule } = await import('@web3-onboard/cede-store')
const { default: Onboard } = await import('@web3-onboard/core')
const { default: injectedModule } = await import('@web3-onboard/injected-wallets')
const { default: trezorModule } = await import('@web3-onboard/trezor')
Expand Down Expand Up @@ -75,6 +76,7 @@ const intiOnboard = async (theme) => {
const torus = torusModule()
const trust = trustModule()
const xdefi = xdefiModule()
const cede = cedeModule()

const portis = portisModule({
apiKey: 'b2b7586f-2b1e-4c30-a7fb-c2d1533b153b'
Expand Down Expand Up @@ -117,19 +119,20 @@ const intiOnboard = async (theme) => {
gnosis,
uauth,
taho,
cede,
xdefi,
torus,
sequence,
web3auth,
infinityWallet,
dcent,
enkrypt,
mewWallet,
magic,
fortmatic,
keystone,
keepkey,
portis
portis,
infinityWallet
],
chains: [
{
Expand Down
4 changes: 3 additions & 1 deletion docs/src/routes/docs/[...3]modules/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ import injectedModule from '@web3-onboard/injected-wallets'
import { ethers } from 'ethers'

// Sign up to get your free API key at https://explorer.blocknative.com/?signup=true
const dappId = '1730eff0-9d50-4382-a3fe-89f0d34a2070'
// Required for Transaction Notifications and Transaction Preview
const apiKey = '1730eff0-9d50-4382-a3fe-89f0d34a2070'

const injected = injectedModule()

Expand All @@ -41,6 +42,7 @@ const rpcUrl = `https://mainnet.infura.io/v3/${infuraKey}`

// initialize Onboard
init({
apiKey,
wallets: [injected],
chains: [
{
Expand Down
102 changes: 102 additions & 0 deletions docs/src/routes/docs/[...4]wallets/cede-store.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# cede.store

## Wallet module for connecting cede.store Wallet SDK to web3-onboard

cede.store is a non-custodial browser extension designed to store CEX (centralized exchange) API keys and to sign CEX requests from the client-side. It allows users to manage their cryptos in their CEX through a unified interface.

Any dApp can integrate cede.store in order to track and/or manage a user's CEX assets. In this way, we offer the dApp a way to monitor and manage a user's CEX assets while remaining non-custodial and maintaining the same user experience as any DeFi browser wallet.

See [cede.store Wallet Developer Docs](https://docs.cede.store)

:::admonition type=warning
As cede.store is not a traditional 1193 wallet behavior is a little different from other wallets that connect through web3-onboard in that there is no on-chain user address to interact with and there isn't a specific chain associated. With this behavior dapp devs will need to handle accordingly and differently from traditional 1193 wallets. The dapp dev can expect the connect account to not be shown as a hex value (or at all) and the chain to always be `0x0` when a user connects with cede.store for that specific wallet account.
:::

### Install

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

```sh copy
yarn add @web3-onboard/cede-store
```

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

```sh copy
npm install @web3-onboard/cede-store
```

</TabPanel>
</Tabs>

## Usage

```typescript
import Onboard from '@web3-onboard/core'
import cedeStoreWalletModule from '@web3-onboard/cede-store'

const cedeStoreWallet = cedeStoreWalletModule()

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

const connectedWallets = await onboard.connectWallet()
console.log(connectedWallets)
```

## Vault management

Vaults allow creating bundles of CEX accounts. The extension connects with CEX through CEX API keys and everything is stored in the Local Storage of the browser, on a mobile or on a Ledger (more coming soon...). We can compare Vaults with the [Keyring concept](https://www.wispwisp.com/index.php/2020/12/25/how-metamask-stores-your-wallet-secret/) of Metamask.

A user can have multiple vaults with different CEX accounts inside.
This system allows the user to give a dApp custom access to his accounts depending on the degree of trust he has in the dApp in question.

Let's say the user has three vaults: a main one with full access (track, trade, withdraw) to all his CEX, one just for tracking and one just for trading.
If the user does not know the reputation of the dApp he is using, the most logical solution would be to give access
only to the tracking vault so the dApp will not be able to initiate trade requests.

## CEX connection

All requests are divided into two categories:

- private requests
- public requests

All public data, such as prices, volumes, historical data are collected from different exchanges and provided with our API.

All private requests, such as user balances, trades, open positions are coming from cede.store (from the user's machine).

You can access both public and private data through the extension's API. cede.store handles all exchanges requests, as well as API keys secure storage.

## Example of a workflow (fetch user's balances and transactions)

```typescript
// get available vaults and accounts
const { vaultPreview } = provider.getVaultPreviews()
console.log(vaultPreview)

// Fetch user's balances from Binance and Coinbase
const vaultId = vaultPreview[0].id
await provider.request({
method: 'balances',
params: {
vaultId,
accountNames: ['Binance 1', 'Coinbase 1']
}
})

// Fetch user's transactions
await provider.request({
method: 'transactions',
params: {
vaultId
}
})
```
15 changes: 14 additions & 1 deletion docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@
"@babel/helper-validator-identifier" "^7.19.1"
to-fast-properties "^2.0.0"

"@cedelabs/providers@^0.0.7":
version "0.0.7"
resolved "https://registry.yarnpkg.com/@cedelabs/providers/-/providers-0.0.7.tgz#859070c5cf0a86841ce98d32c1599cc8de9b7869"
integrity sha512-rjOcEff5dnuKif+dJmEygCC/mp05oztkFYAmGEcGa1HW9EcVP3id1PTjBEYZLieVBNwJdg4kcl8Jh1dboG8pCA==

"@chainsafe/as-sha256@^0.3.1":
version "0.3.1"
resolved "https://registry.yarnpkg.com/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz#3639df0e1435cab03f4d9870cc3ac079e57a6fc9"
Expand Down Expand Up @@ -3806,6 +3811,14 @@
"@walletconnect/window-getters" "^1.0.1"
tslib "1.14.1"

"@web3-onboard/cede-store@^2.0.0-alpha.1":
version "2.0.0-alpha.1"
resolved "https://registry.yarnpkg.com/@web3-onboard/cede-store/-/cede-store-2.0.0-alpha.1.tgz#4ab31464b883b8e39969f95c8cc546ad319efb95"
integrity sha512-3/K4zYac95AdZQjrD0SH+tHdjbaenwUZ5T08Mu9MuuOjxhJysx+wX2aoXil3dawZpcJvtIcX6XD042kFgI6keQ==
dependencies:
"@cedelabs/providers" "^0.0.7"
"@web3-onboard/common" "^2.3.0-alpha.1"

"@web3-onboard/coinbase@^2.2.2":
version "2.2.2"
resolved "https://registry.yarnpkg.com/@web3-onboard/coinbase/-/coinbase-2.2.2.tgz#a08bfc5c946fb2a3b57a3487a157e102881860ee"
Expand All @@ -3823,7 +3836,7 @@
ethers "5.5.4"
joi "17.8.1"

"@web3-onboard/common@^2.3.1":
"@web3-onboard/common@^2.3.0-alpha.1", "@web3-onboard/common@^2.3.1":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@web3-onboard/common/-/common-2.3.1.tgz#69ad0d5167e5103086c34a4f7e8af90681d71be4"
integrity sha512-VRIsJLW92Q+bu6w9WSlTrPIk0vGmFvVwnoAKy1ubKuBvSKKhMUmrnv8N5tusr0mk+gcUuUdDF6gLDCABqrfC7g==
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web3-onboard-monorepo",
"version": "2.21.3",
"version": "2.21.4",
"private": true,
"workspaces": {
"packages": [
Expand Down
86 changes: 86 additions & 0 deletions packages/cede-store/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# @web3-onboard/cede-store

## Wallet module for connecting cede.store Wallet SDK to web3-onboard

cede.store is a non-custodial browser extension designed to store CEX (centralized exchange) API keys and to sign CEX requests from the client-side. It allows users to manage their cryptos in their CEX through a unified interface.

Any dApp can integrate cede.store in order to track and/or manage a user's CEX assets. In this way, we offer the dApp a way to monitor and manage a user's CEX assets while remaining non-custodial and maintaining the same user experience as any DeFi browser wallet.

As cede.store is not a traditional 1193 wallet behavior is a little different from other wallets that connect through web3-onboard in that there is no on-chain user address to interact with and there isn't a specific chain associated. With this behavior dapp devs will need to handle accordingly and differently from traditional 1193 wallets. The dapp dev can expect the connect account to not be shown as a hex value (or at all) and the chain to always be `0x0` when a user connects with cede.store for that specific wallet account.

See [cede.store Wallet Developer Docs](https://docs.cede.store)

### Install

`npm i @web3-onboard/cede-store`

## Usage

```typescript
import Onboard from '@web3-onboard/core'
import cedeStoreWalletModule from '@web3-onboard/cede-store'

const cedeStoreWallet = cedeStoreWalletModule()

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

const connectedWallets = await onboard.connectWallet()
console.log(connectedWallets)
```

## Vault management

Vaults allow creating bundles of CEX accounts. The extension connects with CEX through CEX API keys and everything is stored in the Local Storage of the browser, on a mobile or on a Ledger (more coming soon...). We can compare Vaults with the [Keyring concept](https://www.wispwisp.com/index.php/2020/12/25/how-metamask-stores-your-wallet-secret/) of Metamask.

A user can have multiple vaults with different CEX accounts inside.
This system allows the user to give a dApp custom access to his accounts depending on the degree of trust he has in the dApp in question.

Let's say the user has three vaults: a main one with full access (track, trade, withdraw) to all his CEX, one just for tracking and one just for trading.
If the user does not know the reputation of the dApp he is using, the most logical solution would be to give access
only to the tracking vault so the dApp will not be able to initiate trade requests.

## CEX connection

All requests are divided into two categories:

- private requests
- public requests

All public data, such as prices, volumes, historical data are collected from different exchanges and
provided with our API.

All private requests, such as user balances, trades, open positions are coming from cede.store (from the user's machine).

You can access both public and private data through the extension's API. cede.store handles all exchanges requests, as well as API keys secure storage.

## Example of a workflow (fetch user's balances and transactions)

```typescript
// get available vaults and accounts
const { vaultPreview } = provider.getVaultPreviews()
console.log(vaultPreview)

// Fetch user's balances from Binance and Coinbase
const vaultId = vaultPreview[0].id
await provider.request({
method: 'balances',
params: {
vaultId,
accountNames: ['Binance 1', 'Coinbase 1']
}
})

// Fetch user's transactions
await provider.request({
method: 'transactions',
params: {
vaultId
}
})
```
Loading

1 comment on commit d7d89f8

@vercel
Copy link

@vercel vercel bot commented on d7d89f8 May 2, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.