Skip to content

Commit

Permalink
Merge pull request #4 from coinbase/wilson/touch-ups
Browse files Browse the repository at this point in the history
add docs, reconfigured
  • Loading branch information
wilsoncusack authored Apr 29, 2024
2 parents 8b90019 + 33abdef commit 2028e57
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 22 deletions.
Binary file modified bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion docs/pages/FAQ.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ Coming soon...

- When will Smart Wallet be live?
- How does Smart Wallet work with Coinbase Wallet app and extension?
- ...
- What networks will be supported?
-...
4 changes: 1 addition & 3 deletions docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ import { HomePage } from 'vocs/components'

<HomePage.Root>
<HomePage.Logo />
<HomePage.Tagline>Smart Wallet</HomePage.Tagline>
<HomePage.InstallPackage name="vocs" type="init" />
<HomePage.Description>Smart Wallet Documentation</HomePage.Description>
<HomePage.Buttons>
<HomePage.Button href="/why" variant="accent">Get started</HomePage.Button>
<HomePage.Button href="/start" variant="accent">Get started</HomePage.Button>
<HomePage.Button href="https://github.com/coinbase/coinbase-wallet-sdk">GitHub</HomePage.Button>
</HomePage.Buttons>
</HomePage.Root>
29 changes: 29 additions & 0 deletions docs/pages/sdk/coinbaseWalletProvider/request/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Overview

`CoinbaseWalletProvider` is an [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) compliant Ethereum Javascript provider.
It handles requests via its `request` method. For example
:::code-group
``` typescript [example.ts]
const provider = sdk.makeWeb3Provider();
const addresses = provider.request('eth_requestAccounts');
provider.request('personal_sign', [
`0x${Buffer.from('test message', 'utf8').toString('hex')}`,
addresses[0],
]);
```
``` typescript [setup.ts]
import { CoinbaseWalletSDK } from '@coinbase/wallet-sdk'

const sdk = new CoinbaseWalletSDK({
appName: 'My App Name',
appChainIds: [8453]
});
```
:::

Please see the EIP for detailed specifications of request and response format.

We will not document all requests that can be made with this method.
There is good documentation of this [elsewhere](https://docs.metamask.io/wallet/reference/json-rpc-api/).
We will, however, document a few new RPCs that can be uniquely used with Smart Wallet.

3 changes: 3 additions & 0 deletions docs/pages/why.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ backed up and synced across devices [1](https://developer.apple.com/passkeys/),

Note this is *not* passkey auth to some server where we store a users key: the users on device passkey is what is [validated for signing onchain](https://github.com/base-org/webauthn-sol).

## Zero Cost
Smart Wallet is free for both developers and users.

## Unified Account Across Apps
Smart Wallet users can use the same account and address across all apps.

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
"dev": "vocs dev",
"build": "vocs build",
"preview": "vocs preview",
"format": "dprint fmt"
"format": "dprint fmt",
"prepare": "bun x simple-git-hooks"
},
"dependencies": {
"@types/react": "latest",
"dprint": "^0.45.1",
"react": "latest",
"react-dom": "latest",
"typescript": "latest",
"vocs": "latest"
},
"devDependencies": {
"dprint": "^0.45.1",
"simple-git-hooks": "^2.11.1"
},
"simple-git-hooks": {
Expand Down
38 changes: 22 additions & 16 deletions vocs.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,10 @@ export default defineConfig({
},
title: 'Smart Wallet',
topNav: [
{ text: 'Guide & API', link: '/docs/getting-started', match: '/docs' },
{ text: 'Blog', link: '/blog' },
{
text: 'version',
items: [
{
text: 'Changelog',
link: 'https://github.com/wevm/vocs/blob/main/src/CHANGELOG.md',
},
{
text: 'Contributing',
link: 'https://github.com/wevm/vocs/blob/main/.github/CONTRIBUTING.md',
},
],
},
{ text: 'Docs', link: '/start', match: '/docs' },
{ text: 'Demo', link: 'https://smart-wallet.xyz/' },
{ text: 'SDK Playground', link: 'https://coinbase.github.io/coinbase-wallet-sdk/'},
{ text: 'Github', link: 'https://github.com/coinbase/coinbase-wallet-sdk'}
],
sidebar: [
{
Expand All @@ -54,7 +43,7 @@ export default defineConfig({
collapsed: false,
items: [
{
text: 'Integrating via Wagmi',
text: 'Using with Wagmi',
link: '/guides/wagmi',
},
{
Expand Down Expand Up @@ -136,6 +125,23 @@ export default defineConfig({
{
text: 'makeWeb3Provider',
link: '/sdk/makeWeb3Provider'
},
{
text: 'CoinbaseWalletProvider',
items: [
{
text: 'request',
items: [
{text: 'Overview', link: '/sdk/coinbaseWalletProvider/request/overview'},
{text: 'wallet_getCapabilities'},
{text: 'wallet_sendCalls'},
{text: 'wallet_getCallsStatus'},
{text: 'wallet_showCallsStatus'},
]
}
]
}, {
text: 'Supported Networks'
}
],
},
Expand Down

0 comments on commit 2028e57

Please sign in to comment.