Skip to content

Commit 72dd10e

Browse files
committed
DOCS: Add cede.store detailed documentation with an example flow
1 parent bd8ec18 commit 72dd10e

File tree

2 files changed

+110
-3
lines changed

2 files changed

+110
-3
lines changed

docs/src/routes/docs/[...4]wallets/cede-store.md

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,26 @@
22

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

5+
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.
6+
7+
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.
8+
59
See [cede.store Wallet Developer Docs](https://docs.cede.store)
610

711
### Install
812

9-
<Tabs values={['yarn', 'npm']}>
13+
<Tabs values={["yarn", "npm"]}>
1014
<TabPanel value="yarn">
1115

1216
```sh copy
13-
yarn add @web3-onboard/coinbase
17+
yarn add @web3-onboard/cede-store
1418
```
1519

1620
</TabPanel>
1721
<TabPanel value="npm">
1822

1923
```sh copy
20-
npm install @web3-onboard/coinbase
24+
npm install @web3-onboard/cede-store
2125
```
2226

2327
</TabPanel>
@@ -42,3 +46,51 @@ const onboard = Onboard({
4246
const connectedWallets = await onboard.connectWallet()
4347
console.log(connectedWallets)
4448
```
49+
## Vault management
50+
51+
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.
52+
53+
A user can have multiple vaults with different CEX accounts inside.
54+
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.
55+
56+
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.
57+
If the user does not know the reputation of the dApp he is using, the most logical solution would be to give access
58+
only to the tracking vault so the dApp will not be able to initiate trade requests.
59+
60+
## CEX connection
61+
62+
All requests are divided into two categories:
63+
- private requests
64+
- public requests
65+
66+
All public data, such as prices, volumes, historical data are collected from different exchanges and provided with our API.
67+
68+
All private requests, such as user balances, trades, open positions are coming from cede.store (from the user's machine).
69+
70+
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.
71+
72+
## Example of a workflow (fetch user balances and transactions)
73+
74+
```typescript
75+
// get available vaults and accounts
76+
const { vaultPreview } = provider.getVaultPreviews();
77+
console.log(vaultPreview);
78+
79+
// Fetch user's balances from Binance and Coinbase
80+
const vaultId = vaultPreview[0].id;
81+
await provider.request({
82+
method: "balances",
83+
params: {
84+
vaultId,
85+
accountNames: ["Binance 1", "Coinbase 1"]
86+
}
87+
});
88+
89+
// Fetch user's transactions
90+
await provider.request({
91+
method: "transactions",
92+
params: {
93+
vaultId
94+
}
95+
});
96+
```

packages/cede-store/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# @web3-onboard/cede-store
22

33
## Wallet module for connecting cede.store Wallet SDK to web3-onboard
4+
5+
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.
6+
7+
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.
8+
49
See [cede.store Wallet Developer Docs](https://docs.cede.store)
510

611
### Install
@@ -26,3 +31,53 @@ const onboard = Onboard({
2631
const connectedWallets = await onboard.connectWallet()
2732
console.log(connectedWallets)
2833
```
34+
35+
## Vault management
36+
37+
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.
38+
39+
A user can have multiple vaults with different CEX accounts inside.
40+
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.
41+
42+
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.
43+
If the user does not know the reputation of the dApp he is using, the most logical solution would be to give access
44+
only to the tracking vault so the dApp will not be able to initiate trade requests.
45+
46+
## CEX connection
47+
48+
All requests are divided into two categories:
49+
- private requests
50+
- public requests
51+
52+
All public data, such as prices, volumes, historical data are collected from different exchanges and
53+
provided with our API.
54+
55+
All private requests, such as user balances, trades, open positions are coming from cede.store (from the user's machine).
56+
57+
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.
58+
59+
## Example of a workflow (fetch user balances and transactions)
60+
61+
```typescript
62+
// get available vaults and accounts
63+
const { vaultPreview } = provider.getVaultPreviews();
64+
console.log(vaultPreview);
65+
66+
// Fetch user's balances from Binance and Coinbase
67+
const vaultId = vaultPreview[0].id;
68+
await provider.request({
69+
method: "balances",
70+
params: {
71+
vaultId,
72+
accountNames: ["Binance 1", "Coinbase 1"]
73+
}
74+
});
75+
76+
// Fetch user's transactions
77+
await provider.request({
78+
method: "transactions",
79+
params: {
80+
vaultId
81+
}
82+
});
83+
```

0 commit comments

Comments
 (0)