Do i need to use the rosetta API to interact with the ledger canister if I'm calling the ledger canister from another canister on the IC?

I have a canister already built out on the IC and I’m trying to integrate ICP payment via the ledger canister. I’ve only been able to find payment integrating documentation that references the rosetta API, which seems to be useful for integrating ICP with apps that aren’t hosted on the IC. but for dapps hosted on the IC, it seems like an unnecessary step since the rosetta API requires you to run a passive rosetta node off-chain in order to interact with the IC ledger canister. Could anyone point me to where I can find documentation and/or examples of how to integrate the ledger canister into my current canister? thank you in advance.

Bump - did you ever get an answer to this?

I believe you do not need Rosetta, but let me ping the team to see if i can have someone with authority confirm.

You do not need to use the Rosetta Api. Here’s the link to an example where the ledger canister is called and used:
icp-canister/main.mo at main · aviate-labs/icp-canister · GitHub

2 Likes

Thank you for resolving @Jesse

1 Like

You don’t need to run Rosetta to integrate your canisters with the ICP Ledger canister.
The ledger canister exposes a Candid interface that you can call from any other canister: Principal ryjl3-tyaaa-aaaaa-aaaba-cai | ic.rocks

There are a few example canisters that use the interface:

1 Like