bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 21쪽 중 12쪽
r is opened and directed to CARV).
* The user completes a login and authorization step at CARV if needed.
* CARV redirects back to an URL under the application’s control, passing authorization information for the user.
<img src="https://758822945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6A1MZN6YkMg4U1B64H4g%2Fuploads%2FcezLQT2eNb3sXh4F7UIR%2Fimage.png?alt=media&token=dc8c82e2-ee22-4d98-81e3-bf1283d19785" alt="" data-size="original">
{% endhint %}
## API Details
**Discover OAuth Information**
```bash
curl -X GET https://oauth.carv.io/.well-known/openid-configuration
```
#### Authorization Request
Construct and redirect users to the CARV ID authorization page to begin the authentication process:
{% code overflow="wrap" %}
```bash
https://auth.carv.io/auth/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&response_type=code&scope=YOUR_SCOPE&state=YOUR_STATE
```
{% endcode %}
Parameters:
* `response_type`: Should be `code` for the authorization code flow.
* `client_id`: Your application's Client ID.
* `redirect_uri`: The URL to which CARV ID will send the user after authorization.
* `scope`: The space-separated list of permissions your application requests.
* `state`: A unique state value that your application generates to mitigate CSRF attacks.
After successful login and authorization, user will be redirected to the provided URL with `code` and `state` included in the parameters.
#### **Scopes**
Scopes allow you to set granular access for your application so that your application only has the permissions that it needs.
<table><thead><tr><th width="262">Scope</th><th>Description</th></tr></thead><tbody><tr><td>carv_id_basic_read</td><td>Basic CARV ID info</td></tr><tr><td>email_basic_read</td><td>Email address</td></tr><tr><td>twitter_basic_read</td><td>Basic Twitter account info</td></tr><tr><td>discord_basic_read</td><td>Basic Discord account info</td></tr><tr><td>facebook_basic_read</td><td>Basic Facebook account info</td></tr><tr><td>google_basic_read</td><td>Basic Google account info</td></tr><tr><td>steam_basic_read</td><td>Basic Steam account info</td></tr><tr><td>steam_detailed_read</td><td>Detailed Steam account info</td></tr><tr><td>carv_play_basic_read</td><td>Basic CARV Play account info</td></tr><tr><td>evm_address_basic_read</td><td>EVM address</td></tr><tr><td>solana_address_basic_read</td><td>Solana address</td></tr><tr><td>bitcoin_address_basic_read</td><td>Bitcoin address</td></tr><tr><td>platform_detailed_read</td><td>User's account info from your platform/application/game</td></tr><tr><td>platform_detailed_write</td><td>Update user's account info from your platform/application/game to CARV ID</td></tr></tbody></table>
#### Access Token Request
After the user authorizes your application, they will be redirected to your `redirect_uri` with a `code` parameter. Exchange this code for an access token.
```bash
curl -X POST https://oauth.carv.io/oauth2/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Basic YOUR_BASE64_ENCODED_CLIENT_ID_AND_SECRET" \
-d "grant_type=authorization_code&code=AUTHORIZATION_CODE&redirect_uri=YOUR_REDIRECT_URI"
```
Parameters:
* `grant_type`: Should be `authorization_code`.
* `code`: The authorization code received from the authorization request.
* `redirect_uri`: Must match the redirect URI used in the authorization request.
* `client_id`: Your application's Client ID.
* `client_secret`: Your application's Client Secret.
Sample Python code to encode credentials:
```python
import base64
# Your client ID and client secret
client_id = 'your_client_id_here'
client_secret = 'your_client_secret_here'
# Concatenate the client ID and client secret with a colon
credentials = f"{client_id}:{client_secret}"
# Encode the credentials using base64
encoded_credentials = base64.b64encode(credentials.encode()).decode()
# The result can be used in the Authorization header
print("Basic " + encoded_credentials)
```
Response Sample
```json
{
"code": 0,
"msg": "",
"data": {
"access_token": "xxxx",
"token_type": "Bearer",
"expires_in": "604800",
"scope": "xxxx",
"refresh_token": "xxxx",
"id_token": "xxxx"
}
}
```
#### Token Refresh Request
Refresh an expired access token using:
```bash
curl -X POST https://oauth.carv.io/oauth2/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Basic YOUR_BASE64_ENCODED_CLIENT_ID_AND_SECRET" \
-d "grant_type=refresh_token&refresh_token=YOUR_REFRESH_TOKEN&scope=YOUR_SCOPE"
```
Parameters:
* `grant_type`: Should be `refresh_token`.
* `refresh_token`: The `refresh_code` received from the access token request.
* `scope`: The space-separated list of permissions your application requests.
* `client_id`: Your application's Client ID.
* `client_secret`: Your application's Client Secret.
Response Sample
```json
{
"code": 0,
"msg": "",
"data": {
"access_token": "xxxx",
"token_type": "Bearer",
"expires_in": "604800",
"scope": "xxxx",
"refresh_token": "xxxx",
"id_token": "xxxx"
}
}
```
#### Fetch User Detailed Info 
Retrieve detailed user information with:
```bash
curl -X GET https://oauth.carv.io/api/userinfo \
-H "Authorization: Bearer ACCESS_TOKEN"
```
Response Sample
```json
{
"code": 0,
"msg": "",
"data": {
"smart_wallet_address": "xxxx",
"signer_wallet_address": "xxxx",
"email_address": "abc@gmail.com",
"twitter": {
"id": "xxxx",
"username": "xxxx"
}
// Additional fields
}
}
```
#### Update User Profile
Third-party data providers can update the user's profile data via:
```bash
curl -X POST https://oauth.carv.io/api/userinfo/update \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d "user_id=xxx&user_name=xxx&properties={}"
```
Parameters:
* `user_id`: The unique identifier for the user on the third-party platform.
* `user_name`: The name of the user on the third-party platform.
* `properties`: A JSON formatted string containing any additional property data to upload.
Note that to use this API, you will need to apply for the write access scope for the platform.
## Conclusion
This guide outlines the process for securely integrating CARV ID OAuth 2.0 into your applications, enhancing user authentication experiences.
# CARV ID Telegram SDK
## Overview
The **CARV ID Telegram SDK** provides a seamless solution for third-party games and Telegram-based applications to integrate CARV ID functionality. 
With this SDK, you can connect users to their CARV IDs, enable third-party account binding, and empower developers with access to powerful data insights and analytics powered by CARV ID.
It features both **light and dark modes** for optimal user experience and a **customizable plugin appearance** to match your brand and app design.
## How Does it Work?
The CARV ID Telegram SDK leverages the robust CARV ID suite to simplify authentication and account integration. The following illustration provides an overview of how the CARV ID ecosystem integrates with Telegram applications.
<figure><img src="https://758822945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6A1MZN6YkMg4U1B64H4g%2Fuploads%2FFaBvJktzUrTmtbaJti4I%2Fimage.png?alt=media&token=9b40d6cf-fb5e-4d0a-84e8-d6b6f3b34a7d" alt=""><figcaption></figcaption></figure>
## Getting Started
The SDK implements the OAuth 2.0 standard, ensuring secure and reliable authentication. You would need to register your application first with CARV.
{% hint style="info" %}
How to register your application:
* **Determining Necessary Permissions**: Begin by reviewing the [application scopes available](#scopes) to identify the permissions your application will need.
* Provide Application Information: Share your application's **Redirect URL** and the **scopes** you've selected based on your needs. Additionally, provide the following information:
* **Name Displayed on OAuth Screen**: The name of your application as it will appear during the authentication process.
* **Home Page URL**: The main URL of your application, where users can learn more about your service.
* **Logo Image URL**: A URL pointing to your logo image, which will be displayed during the authentication process.
* **Privacy Policy URL**: The URL of your privacy policy page.
* **Terms of Service URL**: The URL of your terms of service page.
* After we receive this information, we will set up your OAuth configuration and provide you with a Client ID and Client Secret. Keep these confidential.
{% endhint %}
## Implementation 
Once you receive your client ID and secret, you integrate the SDK into your Telegram bot. Use the SDK's prebuilt methods to handle user authentication and launch of CARV ID account center. 
Please refer to our detailed documentation in the Github repository for step-by-step guide via [**https://github.com/carv-protocol/carv-id-sdk**](https://github.com/carv-protocol/carv-id-sdk). You can also access a **demo project and the source code there.**
# Smart Contracts & Security
> For details on contracts related to nodes (veCARV, Node License, etc), please refer to [Smart Contract Addresses](/carv-ecosystem/verifier-nodes/smart-contract-addresses)
## Code Repository
The source code for core contracts can be found below:
{% embed url="<https://github.com/carv-protocol/carv-contracts>" %}
{% embed url="<https://github.com/carv-protocol/contracts>" %}
## Audit Reports
The core contracts have been audited by Certik. You can find the audit reports [here](https://skynet.certik.com/projects/carv).
## Contract Addresses
Here are the list of contract addresses deployed by CARV.
<table><thead><tr><th width="183">Contract Name</th><th width="119">Blockchain</th><th width="151">Token Standard</th><th>Contract Address</th></tr></thead><tbody><tr><td>CARV Token</td><td>Ethereum</td><td>OFT</td><td>0xc08Cd26474722cE93F4D0c34D16201461c10AA8C</td></tr><tr><td>CARV Token</td><td>Base</td><td>OFT</td><td>0xc08Cd26474722cE93F4D0c34D16201461c10AA8C</td></tr><tr><td>CARV Token</td><td>Arbitrum</td><td>OFT</td><td>0xc08Cd26474722cE93F4D0c34D16201461c10AA8C</td></tr><tr><td>CARV Token</td><td>BSC</td><td>OFT</td><td>0xc08Cd26474722cE93F4D0c34D16201461c10AA8C</td></tr><tr><td>CARV Token</td><td>Linea</td><td>OFT</td><td>0xc08Cd26474722cE93F4D0c34D16201461c10AA8C</td></tr><tr><td>CARV Testnet Token</td><td>BNB-testnet</td><td>OFT</td><td>0xbdd15B0fec494a0234F7A13fD60D10f38F751763</td></tr><tr><td>Airdrop SBT</td><td>Base</td><td>ERC721</td><td>0x2b790Dea1f6c5d72D5C60aF0F9CD6834374a964B</td></tr><tr><td>CARV Airdrop</td><td>Base</td><td>Airdrop</td><td>0x584cB7Dae5158be594AA1022Fb38017C791af2A0</td></tr><tr><td>veCARV Airdrop</td><td>Arbitrum</td><td>Airdrop</td><td>0x584cB7Dae5158be594AA1022Fb38017C791af2A0</td></tr><tr><td>veCARV(s)</td><td>Base</td><td>Staking</td><td>0x7aFC144a0c3C62e24d8f9c592feF8F65ce631C59</td></tr><tr><td>CARV Verifier License </td><td>Arbitrum</td><td>ERC721</td><td>0x6584533decbcb8c05fb7eabfa93f92b7b3a85038</td></tr><tr><td>CARV ID</td><td>opBNB</td><td>ERC721</td><td>0xcd3c861a0c8f867f78396a69B14c4F8953fC4Ee9</td></tr><tr><td>.Play Name Service</td><td>opBNB</td><td>ERC721</td><td>0xC5Cb997016c9A3AC91cBe306e59B048a812C056f</td></tr><tr><td>Dragon Treasure</td><td>Polygon</td><td>ERC721</td><td>0x3B1DE80137985CE69C87E999d888c0997F482Fb6</td></tr><tr><td>CARV Events<br></td><td>Polygon</td><td>ERC1155</td><td>0x6d778a0f5e07c01211672F57f246166ccF6541C1</td></tr><tr><td>CARV Events</td><td>BNB Chain</td><td>ERC1155</td><td>0xDda56260FCb1B1C6Ba1D84C5f99f5507d556A04b</td></tr><tr><td>CARV Events</td><td>zkSync</td><td>ERC1155</td><td>0x089b353642E6f066bAD44A6a854Ef4e3bCb0dC9C</td></tr><tr><td>CARV Events</td><td>Solana</td><td>SPL</td><td>8d8d41fc0db5ae1309245fa83d69358ce56baea7ca62799232ccf4950f348954</td></tr><tr><td>CARV Events</td><td>NEAR</td><td>NEP171</td><td>events.carv.near</td></tr><tr><td>CARV Events</td><td>Sei</td><td>CW721</td><td>sei1zc4u2fw96xx03x3lq5pfnk4vsr2rxjylqueucceuhf92te9sregsjak3ac</td></tr><tr><td>CARV Events</td><td>opBNB</td><td>ERC1155</td><td>0xde50d9F0B51C2f81512455bffdf4144cAa58dE0D</td></tr><tr><td>CARV Events</td><td>Ronin</td><td>ERC1155</td><td>SOON</td></tr><tr><td>CARV Events</td><td>Fantom</td><td>ERC1155</td><td>0x8B4dc268F1B28B1eD9F76B0C05CAA3D0a75953BC</td></tr><tr><td>CARV Events</td><td>Linea</td><td>ERC1155</td><td>0x134b50a34a2a56d1dad865a7a7d0f6534c8c4586</td></tr><tr><td>CARV Events</td><td>BNB</td><td>ERC721</td><td>0xb1544f3615B23b0D4fb8B6B71ebC1BD78b636e5F</td></tr><tr><td>CARV Achievements</td><td>Cyber</td><td>ERC1155</td><td>0x2E421EB05Ffa719c42C280Ec0D52b38bB9e7923c</td></tr><tr><td>CARV Achievements (Deprecated)</td><td>Polygon Mumbai</td><td>ERC1155</td><td>0x30F977Ca7e383A1143f4a328eB2B011b664441e4</td></tr><tr><td>CARV Achievements</td><td>BNB Chain</td><td>ERC1155</td><td>0xc2F24Ffe96A69e381A747dc73FCd51492E29a0A4</td></tr><tr><td>CARV Memberships</td><td>Polygon</td><td>ERC721</td><td>0x0433882C60aDa1077A9F652ca2d1D36422c62C6C</td></tr><tr><td>CARV GAT</td><td>Cyber</td><td>ERC721</td><td>0xEb5fB40b071c0d59449a3e12a09dbD0E23f4836E</td></tr><tr><td>CARV GAT (Deprecated)</td><td>Polygon Mumbai</td><td>ERC721</td><td>0x20a1d5D4e8eCa3838f237F98151558831Bc7930b</td></tr><tr><td>SOUL Token</td><td>opBNB</td><td>ERC20</td><td>0xc32338e7f84f4c01864c1d5b2b0c0c7c697c25dc</td></tr><tr><td>SOUL Token</td><td>zkSync</td><td>ERC20</td><td>0x5155704BB41fDe152Ad3e1aE402e8E8b9bA335D3</td></tr><tr><td>SOUL Token</td><td>Ronin</td><td>ERC20</td><td>0xc39a2430b0b6f1edad1681672b47c857c1be0998</td></tr><tr><td>SOUL Token</td><td>Linea</td><td>ERC20</td><td>0xc5cb997016c9a3ac91cbe306e59b048a812c056f</td></tr><tr><td>CARV Pass S2</td><td>Polygon</td><td>ERC1155</td><td>0x4822d5ac20a8242b525f2edabf82b9a2311eb515</td></tr><tr><td>CARV Pass S3</td><td>Polygon</td><td>ERC1155</td><td>0xddA7C9FCCBf2F882C56f97E4647EDc775C5975d8</td></tr><tr><td>CARV Pass S4</td><td>Polygon</td><td>ERC1155</td><td>0xf5f293af7a7a5654c505a21767a9b8ead5835303</td></tr><tr><td>CARV Pass S5</td><td>Polygon</td><td>ERC1155</td><td>0x7C6abC5428ea6Bb952Dd84d2C3694132cD761a96</td></tr><tr><td>CARV Pass S6</td><td>Polygon</td><td>ERC1155</td><td>0x88db2a843b2efc1ccc3c988b1179b86204c897a9</td></tr><tr><td>CARV Pass S7</td><td>Polygon</td><td>ERC1155</td><td>0x6df4741cba8300a9c2eec12c40126b1a06617e88</td></tr><tr><td>CARV Pass S8</td><td>Polygon</td><td>ERC1155</td><td>0xee6160bf539391dbd31378105c2718a7b84f1d5f</td></tr></tbody></table>
# MOFF Bot & Customer Data Platform
A Winner from BNBChain's Zero2Hero Hackathon Gaming Track. Building with CARV's ID SDK and Graph, Incubated by CARV.
Moff is a community bot that supercharges your Discord servers and empowers your community manager with user intelligence. It was a Gaming track winning project, integrating CARV SDK, from BNBChain's Zero2Hero Hackathon. 
It not only grows your community, helps gain deeper insights into your users, but also streamlines your day-to-day tasks. Moff currently offers the following features:
### User Insights
* **`Insights Dashboard`**: Empower community admins with valuable information and data-driven insights. With this powerful tool, you can now gain a better understanding of your community members x platform activities by accessing in-depth analysis. Discover key demographics, interests, and behaviors, allowing you to refine your messaging and operating strategies with precision. You can access this dashboard on [CARV Portal](/carv-ecosystem/carv-play/portal-access).
* **`ID Graph`**: Gain a better understanding of your community with in-depth analysis of their profiles and refine your messaging and targeting. Let your users connect their wallets and third-party accounts and add more dimensions to the profile of your users. [Details](https://www.notion.so/ID-Graph-c8940690bb43434eba9b809925367d09?pvs=21)
<figure><img src="https://758822945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6A1MZN6YkMg4U1B64H4g%2Fuploads%2F2H7zrfJwtYLGi6T208GH%2FMoff%20CDP%201.png?alt=media&token=108ae6f3-d5d3-496d-9e3d-f22662baec72" alt="Moff CDP - CARV"><figcaption><p>Moff CDP</p></figcaption></figure>
<figure><img src="https://758822945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6A1MZN6YkMg4U1B64H4g%2Fuploads%2FJVQwOfB3ohYunPpZKga2%2FMoff%20CDP2.png?alt=media&token=bd52a705-595c-4f77-a323-4395dd9685e2" alt="Moff CDP - CARV"><figcaption><p>Moff CDP</p></figcaption></figure>
### Community Quest Creation on CARV Play
* **`Discord Quests`** Launch your [incentive campaigns](https://www.notion.so/carv-official/Event-Launcher-a8b9664ce751469092e978b3e9724b86) on [mission system](https://www.notion.so/carv-official/Missions-System-3e05da5f70084af28798164fb9c104a7) CARV and attract users to join your Discord, get a certain role, send messages, invite others to your server, etc. [Details](https://www.notion.so/2f4becefb5b64bfcbf10b08873e64eaf?pvs=21)
<figure><img src="https://758822945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6A1MZN6YkMg4U1B64H4g%2Fuploads%2FHVrl0P4dTGF59x3n8CKO%2FCARV%20Portal%20Community%20Quest.png?alt=media&token=89f49cd3-d5dc-4022-b3bd-0d4ecbf5cf14" alt="CARV Portal UI"><figcaption><p>CARV Portal UI</p></figcaption></figure>
### **Community Management**
* **`Channel Snapshot`**: Record the attendance of live-streaming events, e.g., AMA, and how long each member stays for the live event using this feature. It can be activated in Text, Forum, Voice, and Stage channels. The attendance can be exported as Google Sheets or viewed via Insights Dashboard on CARV Portal. [Details](https://www.notion.so/Channel-Snapshot-93b3393e6ad647b48740120fb13b2d2a?pvs=21)
<figure><img src="https://758822945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6A1MZN6YkMg4U1B64H4g%2Fuploads%2FKHLq29Uw373VVNZ3cg8l%2FMoff%20Community%20Snapshot.png?alt=media&token=ef37c240-4d21-4733-af64-950be214fa4e" alt="Moff Community Snapshot - CARV"><figcaption><p>Moff Community Snapshot - CARV</p></figcaption></figure>
### **Campaign Traffic Tracking**
* **`Permanent Invites`**: Create never-expiring Discord invite links customized for each campaign and each distribution source. And track the performance of your campaigns and effectiveness of your distribution sources to grow your community in the future. Such insights can also be viewed via Insights Dashboard on [CARV Portal](/carv-ecosystem/carv-play/portal-access). [Details](https://www.notion.so/Permanent-Invites-3689f1d44a594fbaa23479c68643a79c?pvs=21)
<figure><img src="https://758822945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6A1MZN6YkMg4U1B64H4g%2Fuploads%2FTTmffF9Rn4g6cKx1WS2X%2FMoff%20Community%20Growth.png?alt=media&token=8050bc6f-b87a-472f-b9a2-07e43843beee" alt="Moff Community Growth - CARV"><figcaption><p>Moff Community Growth</p></figcaption></figure>
Visit [Moff Guide](https://www.notion.so/carv-official/Moff-Guide-b20d93b13f1141be97a6218d26e4a270) at [Help Center](https://carv-official.notion.site/CARV-Help-Center-94043498ebdc4a9a8fd5fc3315ae819c) for more details!
# CARV Account
Like your Meta, Instagram, X IDs and ENS Domains, but now you aggregate them and truly own it!
Both in Web2 and Web3 realms, your IDs pertain to user identitification mechanisms. But in Web2, where you've had your most online actvities in the past 40 years or throughout your lifetime, your IDs are:
* **Under Centralized Control** with **u**ser data and identities are stored on centralized servers
* **Data Ownership with Limited Control** by users on how it's used or shared.
* **Privacy and Security Issues** with potential single point of failure and potential data breaches.
* **Walled Garden of Siloed Data** leading to fragmented digital identities.
On the other side, one of the most interesting aspects of Web3 is the ability 프로젝트로 돌아가기