# ICRC-2/ICRC-103 for ICP ledger canister. Revoke all allowances

**URL:** <https://forum.dfinity.org/t/icrc-2-icrc-103-for-icp-ledger-canister-revoke-all-allowances/60107>\
**Category:** Developers\
**Tags:** icrc\
**Created:** [November 20, 2025, 8:44am UTC](https://forum.dfinity.org/t/icrc-2-icrc-103-for-icp-ledger-canister-revoke-all-allowances/60107 "2025-11-20T08:44:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oleksii](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/oleksii/32/25411_2.png) [@Oleksii](https://forum.dfinity.org/u/Oleksii)\
**Post date:** [November 20, 2025, 8:44am UTC](https://forum.dfinity.org/t/icrc-2-icrc-103-for-icp-ledger-canister-revoke-all-allowances/60107/1 "2025-11-20T08:44:07Z")

</div>

Good afternoon. I’m trying to understand the ICRC-2/ICRC-103 standard and I’ve run into some questions.

For all SNS tokens there is an `icrc103_get_allowances` method, which returns a list of accounts (principal + subaccount), and it is possible to revoke an allowance by passing a zero allowance for a specific account.  
However, the ICP ledger does not have such an interface.

If I use `get_allowances` for ICP, I get a list of addresses (hashes of the principal + subaccount), and with this data I have no way to revoke all allowances for my account — `icrc2_allowance` still requires an account (principal + subaccount), which of course cannot be derived from a hash.

Is it possible that I’m missing something?  
Is there any way to obtain all allowances for my principal and then revoke them on the ICP ledger?

Thanks

---

<div class="post-metadata">

**Author:** ![bogwar](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/bogwar/32/2161_2.png) [@bogwar](https://forum.dfinity.org/u/bogwar)\
**Post date:** [November 20, 2025, 8:52am UTC](https://forum.dfinity.org/t/icrc-2-icrc-103-for-icp-ledger-canister-revoke-all-allowances/60107/2 "2025-11-20T08:52:46Z")

</div>

Hi @Oleksii ,

For the ICP ledger it is not possible to obtain the allowances of a principal since the ledgers itself does not keep the information about which account belongs to which principal.

There, you can remove allowances on a per account basis using the `remove_allowance` method.

See the last message in this thread for a discussion: [https://forum.dfinity.org/t/standard-for-managing-icrc-2-approvals-a-challenge-for-the-icp-ledger/32997/20](https://forum.dfinity.org/t/standard-for-managing-icrc-2-approvals-a-challenge-for-the-icp-ledger/32997/20)

---

<div class="post-metadata">

**Author:** ![Oleksii](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/oleksii/32/25411_2.png) [@Oleksii](https://forum.dfinity.org/u/Oleksii)\
**Post date:** [November 20, 2025, 9:05am UTC](https://forum.dfinity.org/t/icrc-2-icrc-103-for-icp-ledger-canister-revoke-all-allowances/60107/3 "2025-11-20T09:05:19Z")

</div>

> [@bogwar](#):
>
> [https://forum.dfinity.org/t/standard-for-managing-icrc-2-approvals-a-challenge-for-the-icp-ledger/32997/20](https://forum.dfinity.org/t/standard-for-managing-icrc-2-approvals-a-challenge-for-the-icp-ledger/32997/20)

Thank you. I’m getting a list of textual identifiers in `get_allowances`, but to execute `remove_approval` I need `spender : blob`.  
How can I convert `to_spender_id : text` into `spender : blob`?

---

<div class="post-metadata">

**Author:** ![Oleksii](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/oleksii/32/25411_2.png) [@Oleksii](https://forum.dfinity.org/u/Oleksii)\
**Post date:** [November 20, 2025, 9:14am UTC](https://forum.dfinity.org/t/icrc-2-icrc-103-for-icp-ledger-canister-revoke-all-allowances/60107/4 "2025-11-20T09:14:52Z")

</div>

Is it sufficient to simply use `AccountIdentifier.toUint8Array` …. `blob`, or do I need to perform any additional steps to convert the text response into a blob request?

---

<div class="post-metadata">

**Author:** ![maciejdfinity1](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/maciejdfinity1/32/13134_2.png) [@maciejdfinity1](https://forum.dfinity.org/u/maciejdfinity1)\
**Post date:** [November 20, 2025, 12:09pm UTC](https://forum.dfinity.org/t/icrc-2-icrc-103-for-icp-ledger-canister-revoke-all-allowances/60107/5 "2025-11-20T12:09:35Z")

</div>

I assume you are using javascript? I haven’t used js to interact with IC, but I guess it could work. I would test it first, though. You can use the TESTICP ledger: [https://dashboard.internetcomputer.org/canister/xafvr-biaaa-aaaai-aql5q-cai](https://dashboard.internetcomputer.org/canister/xafvr-biaaa-aaaai-aql5q-cai) There is also a faucet where you can get TESTICP tokens for testing: [https://nqoci-rqaaa-aaaap-qp53q-cai.icp0.io/](https://nqoci-rqaaa-aaaap-qp53q-cai.icp0.io/)

---

<div class="post-metadata">

**Author:** ![Oleksii](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/oleksii/32/25411_2.png) [@Oleksii](https://forum.dfinity.org/u/Oleksii)\
**Post date:** [November 20, 2025, 12:38pm UTC](https://forum.dfinity.org/t/icrc-2-icrc-103-for-icp-ledger-canister-revoke-all-allowances/60107/6 "2025-11-20T12:38:33Z")

</div>

Thank you. I’ve already tested it. It’s sufficient to use `AccountIdentifier.fromHex(spenderPrincipalId).toUint8Array()`. This is a bit misleading. It’s unclear why this decision was made — to use one type for the response and then convert the same data to another type for the request. But it works, so thanks for that 🙂
