Onchain Reputation Quickstart
This quickstart shows you how to invoke the Onchain Reputation API using CDP SDK, retrieving reputation and risk details associated with an address. Reputation scores can only be returned for Base and Ethereum. Risk scores can be returned for Base, Bitcoin, or Ethereum.
Requirements
Make sure your developer environment satisfies all of the requirements before proceeding through the quickstart.
Node.js 18+
The Coinbase server-side SDK requires Node.js version 18 or higher and npm version 9.7.2 or higher. To view your currently installed versions of Node.js, run the following from the command-line:
We recommend installing and managing Node.js and npm versions with nvm
. See Installing and Updating in the nvm
README for instructions on how to install nvm
.
Once nvm
has been installed, you can install and use the latest versions of Node.js and npm by running the following commands:
Node.js 18+
The Coinbase server-side SDK requires Node.js version 18 or higher and npm version 9.7.2 or higher. To view your currently installed versions of Node.js, run the following from the command-line:
We recommend installing and managing Node.js and npm versions with nvm
. See Installing and Updating in the nvm
README for instructions on how to install nvm
.
Once nvm
has been installed, you can install and use the latest versions of Node.js and npm by running the following commands:
Python 3.10+
Before using the SDK, ensure that you have the correct version of Python installed and the pip
package manager. The SDK requires Python 3.10 or higher. You can check your Python version and pip
installation by running the following code:
If you need to upgrade your Python version, you can download and install the latest version of Python from the official Python website. For pip
, refer to the official pip documentation for installation instructions.
Installation
Clone CDP SDK quickstart template The CDP SDK provides a quickstart template to get started with the SDK. Clone the repository and navigate to the quickstart template directory:
Install the dependencies:
The file index.js
contains the code to perform your first transfer with the CDP SDK. Let’s break down the content of this file.
Configure your CDP API Key as outlined here.
Clone CDP SDK quickstart template The CDP SDK provides a quickstart template to get started with the SDK. Clone the repository and navigate to the quickstart template directory:
Install the dependencies:
The file index.js
contains the code to perform your first transfer with the CDP SDK. Let’s break down the content of this file.
Configure your CDP API Key as outlined here.
Onchain Payment Replit Template There is a Replit template for enabling automated mass payments using the CDP SDK in Python.
Run the following from the command line:
For python
REPL
Use the Python Standard REPL (python
) to leverage Python’s built-in REPL and quickly explore the functionality of our SDK.
Run the following from the command line:
After running python
, import the module:
Configure your CDP API Key as outlined here.
Using the Onchain Reputation API
The code snippet below demonstrates invoking the Onchain Reputation API: