Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: CDP Client API Key #1486

Merged
merged 4 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/docs/pages/api/build-swap-transaction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The `buildSwapTransaction` function is used to get an unsigned transaction for a swap between two Tokens.

Before using them, make sure to obtain a Public API Key from the [Coinbase Developer Platform APIs](https://portal.cdp.coinbase.com/products/onchainkit).
Before using them, make sure to obtain a [Client API Key](https://portal.cdp.coinbase.com/projects/project-id/api-keys/client-key) from Coinbase Developer Platform.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion site/docs/pages/api/get-swap-quote.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The `getSwapQuote` function is used to get a quote for a swap between two Tokens.

Before using them, make sure to obtain a Public API Key from the [Coinbase Developer Platform APIs](https://portal.cdp.coinbase.com/products/onchainkit).
Before using them, make sure to obtain a [Client API Key](https://portal.cdp.coinbase.com/projects/project-id/api-keys/client-key) from Coinbase Developer Platform.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion site/docs/pages/api/get-tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The `getTokens` function retrieves a list of tokens on Base by searching for the name, symbol, or address of a token.

Before using them, make sure to obtain a Public API Key from the [Coinbase Developer Platform APIs](https://portal.cdp.coinbase.com/products/onchainkit).
Before using them, make sure to obtain a [Client API Key](https://portal.cdp.coinbase.com/projects/project-id/api-keys/client-key) from Coinbase Developer Platform.

## Usage

Expand Down
12 changes: 6 additions & 6 deletions site/docs/pages/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,26 @@ Install OnchainKit in your project.
npm i @coinbase/onchainkit@latest
```

## Get Your Public API Key
## Get Your Client API Key

Get your Public API Key from the [Coinbase Developer Platform APIs](https://portal.cdp.coinbase.com/products/onchainkit).
Get your [Client API Key](https://portal.cdp.coinbase.com/projects/project-id/api-keys/client-key) from Coinbase Developer Platform.

<img alt="OnchainKit copy Public API Key"
<img alt="OnchainKit copy Client API Key"
src="https://onchainkit.xyz/assets/copy-api-key-guide.png"
height="364"/>

Create a `.env` file in your project's root directory.
<img
alt="OnchainKit define Public API Key"
alt="OnchainKit define Client API Key"
src="https://onchainkit.xyz/assets/getting-started-create-env-file.png"
width="250"
loading="lazy"
/>

Add your Public API Key to the `.env` file:
Add your Client API Key to the `.env` file:

```tsx [.env]
NEXT_PUBLIC_ONCHAINKIT_API_KEY=YOUR_PUBLIC_API_KEY
NEXT_PUBLIC_ONCHAINKIT_API_KEY=YOUR_CLIENT_API_KEY
```

## Add Providers
Expand Down
8 changes: 4 additions & 4 deletions site/docs/pages/guides/build-onchain-apps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ Go to https://github.com/coinbase/onchain-app-template and click on the "Use thi
loading="lazy"
/>

### Public API Key(s)
### Client API Key(s)

Obtain a Public API Key from the [Coinbase Developer Platform APIs](https://portal.cdp.coinbase.com/products/onchainkit).
Get your [Client API Key](https://portal.cdp.coinbase.com/projects/project-id/api-keys/client-key) from Coinbase Developer Platform.

<img
alt="OnchainKit copy Public API Key"
alt="OnchainKit copy Client API Key"
src="https://onchainkit.xyz/assets/copy-api-key-guide.png"
width="664"
loading="lazy"
Expand All @@ -62,7 +62,7 @@ In order to use RainbowKit, you'd also need to obtain a Wallet Connector project
Create a new file in your project’s root directory and name it `.env`.

<img
alt="OnchainKit define Public API Key"
alt="OnchainKit define Client API Key"
src="https://onchainkit.xyz/assets/getting-started-create-env-file.png"
width="250"
loading="lazy"
Expand Down
Binary file modified site/docs/public/assets/copy-api-key-guide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.