• Discover
  • Partner with us
  • Chapters
  • Blog

Learn everything about Circle and USDC

Course Intro
Blockchain in a Nutshell
Introduction to Circle
Stablecoins
USDC
Wallets

Section Overview
Getting API Key
Introduction to Wallets
Getting App Id
Create a User
Acquire Session Token
Initialize User
Create Wallet
Submit Your Homework 1
Section Summary

Section Overview
Check Wallet Status
Getting Test USDC
Check Wallet Balance
Getting Native Test Token
Initiate Transaction
Validating Transaction
Submit Your Homework 2
Section Summary
Bonus: Complete a Challenge with WebSDK

Section Overview
Account Types
Create SCA
Transfer and Verify
Submit Your Homework 3
Section Summary

Section Overview
Working With Dev Controlled Wallets
Submit Your Homework 4
Section Summary

Section Overview
CCTP in a Nutshell
CCTP
Section Summary

Submit Your Final Project

Getting USDC Using ZKP2P and Turkish Lira
Resources

Reviewing User-Controlled Wallets

Welcome. In this video, we will review what you've learned in the last section of the course, focusing on user-controlled wallets.

Project Overview

The project used in this section is where the provided code originates. We begin by examining the package.json file, which includes commands like:

  • checkWalletStatus
  • checkWalletBalance
  • initiateTransaction

Before running these, ensure you execute npm install to install all necessary dependencies.

Environment Configuration

Next, we look at the .env file, where we store credentials like the API key, App ID, and User ID. These were created in the previous section where we built user-controlled wallets. The goal now is to acquire a new session token, encryption key, and challenge ID, which are needed to initiate new challenges, similar to earlier steps.

Checking Wallet Status

We use an API call to check the wallet status by fetching variables from the .env file (User ID and API key). This is a GET method request. The response is stringified to JSON so we can visualize the output, which includes:

  • Wallet ID
  • Wallet Address
  • Additional relevant data

This data will be used in subsequent actions.

Retrieving Wallet Balance

We then retrieve the wallet balance using another API call, this time requiring the Wallet ID obtained earlier. Run npm run checkWalletStatus to get the necessary details and add them to your .env file:

  • WALLET_ID
  • ADDRESS

Once set, you can execute npm run checkWalletBalance to see the current balance. The response typically includes:

  • A token balances array
  • Native token (e.g., MATIC on Mumbai testnet)
  • USDC token (non-native)

Each token includes:

  • Amount
  • Decimals
  • Whether it’s native
  • Token ID (critical for identifying tokens during transactions)

Add the USDC Token ID to your .env file for later use.

Understanding Native Tokens and USDC

Native tokens are essential for paying gas fees. USDC, although not native, is also stored and transferred using the same wallet. Each token adheres to the ERC-20 standard as Mumbai is an Ethereum Layer-2 chain. This means all smart contracts and transactions are compatible with EVM.

Preparing for Transactions

Before initiating a transaction, you need test tokens from:

  • The Mumbai Faucet (for native tokens)
  • Circle’s USDC Faucet (for USDC)

Assuming you have these, you can proceed to initiate a transaction using the same approach as before—first by acquiring a session token and encryption key using a helper function.

These values are not stored in .env because they are temporary. You’ll also need to generate a challenge ID, which is used to present the transaction to the user through Circle’s Web SDK.

Initiating a Transaction

The transaction logic resides in index.js. We:

  1. Use the .env values and helper functions to retrieve necessary credentials.
  2. Generate a potency key (a unique identifier to ensure the transaction is processed once).
  3. Use a POST request to initiate the transaction.

The request body includes:

  • User token
  • Destination address (same or different wallet)
  • Amount (e.g., 1 USDC)
  • Fee level (high for now)
  • Token ID
  • Wallet ID

We log this data to verify that the transaction has all necessary components.

Validating Challenges and Completing Transactions

Running npm run initiateTransaction will generate:

  • User token
  • Encryption key
  • Potency key
  • Challenge ID

To complete the transaction, the Web SDK needs:

  • App ID
  • User ID
  • Encryption key
  • Session token
  • Challenge ID

Once these are submitted, the user completes a simple challenge (e.g., entering a PIN). This finalizes the transaction, as the user controls the wallet.

Final Thoughts and Next Steps

You’ve accomplished a lot:

  • Created user-controlled wallets
  • Checked wallet status and balance
  • Sent transactions
  • Verified them through challenges

This replicates many functions of modern financial applications. In the next section, we’ll explore gas stations—a novel solution to manage gas fees.

Previous
Next

Lesson discussion

Swap insights and ask questions about “Learn everything about Circle and USDC”.

Enroll to participate
Start the course to unlock the discussion. Enrolling helps us keep conversations relevant to learners.
WebsiteDiscoverPartner with UsBlogEvents
Discover
CoursesCircleRustSoliditySolanaWeb3 FundamentalsBlockchain Basics
CompanyAbout UsBrand GuidelineFAQsTerms of UsePrivacy PolicyGDPR NoticeCookies
Don't miss any update!

Disclaimer: The information, programs, and events provided on https://risein.com is strictly for upskilling and networking purposes related to the technical infrastructure of blockchain platforms. We do not provide financial or investment advice, nor do we make any representations regarding the value, profitability, or future price of any blockchain or cryptocurrency. Users are encouraged to conduct their own research and consult with licensed financial professionals before engaging in any investment activities. https://risein.com disclaims any responsibility for financial decisions made by users based on the information provided here.

© 2026 Rise In, All rights reserved