Hello colleagues,
I’m working on implementing transaction history for ICRC-1 ledgers and have noticed an issue. According to the documentation, ICP supports ICRC-1, but requests to the ICP index canister fail with an error: “Error: type mismatch: type on the wire nat64, expect type nat”. It seems clear that the problem lies with the IDL file. Upon further debugging, I discovered that the types differ slightly, which leads to the aforementioned error.
Is there any hope for a fix for this issue in the near future?
Thanks
1 Like
Hi @Oleksii , the ICP ledger supports ICRC-1 endpoints. It does not support the internal structure of an ICRC-1 ledger, see here. The difference between nat and nat64 is a known issue and we are working on resolving it.
For the integration with the index canisters you will need to build separate clients because the accounts and accountidentifiers are fundamentally incompatible.
Just in case, given that the question was asked in the JavaScript channel, there are also two different libraries:
@dfinity/ledger-icp
is specifically tailored for the ICP ledger while any other ICRC tokens can be interacted with @dfinity/ledger-icrc
.
I’ve seen these libraries – they work great. It’s just a bit easier to manage a single interface rather than two.
Thanks, guys.
1 Like
heya @NikolasHai
just want to bump this topic a bit (:
any news regarding the nat and nat64 issue solving?