Skip to main content
In this step, you’ll learn how to use your Internet Computer identity from Step 3 to make canister calls.
This step builds on Step 3: Authenticate with Odin API. Make sure you have a working Internet Computer identity before proceeding.

What You’ll Accomplish

By the end of this step, you’ll have:
  • ✅ Connected to the Odin canister using your authenticated identity
  • ✅ Made your first canister call to deposit BTC
  • ✅ Verified the functionality of your integration

Odin Canister Integration

Import Canister Interface

Let’s start by setting up the Odin canister interface. You can reference the contract and download the interface from the Internet Computer Dashboard.
canister/odin_canister.idl.ts

Configuration Setup

Create the necessary configuration files for your project:

Environment Configuration

Use this endpoint for development and testing purposes. Doesn’t require BTC

Deposit BTC

This is only for development and testing purposes. This method is not exposed in production. For onchain deposits, use the corresponding deposit address of the coin/token/rune.
To interact with any canister method, we just need to create an actor based on that identity.
utils/odin.ts
You can view more canister methods here.

Testing the Deposit Function

Let’s test our identity by calling a function in the Odin canister:
index.ts
Run the test:
Great! You’ve successfully integrated with Odin!