-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from coinbase/wilson/touch-ups
add docs, reconfigured
- Loading branch information
Showing
7 changed files
with
60 additions
and
22 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
29 changes: 29 additions & 0 deletions
29
docs/pages/sdk/coinbaseWalletProvider/request/overview.mdx
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,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. | ||
|
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