Problem
It is very difficult or impossible for:
- New wallets to enter the ecosystem, as each dapp would need to integrate them individually. This makes it challenging to ask wallets like Metamask or Ledger to support connecting with ICP apps without established standards.
- New ICP dapp developers to support all available wallets, since each wallet has a different method for connecting, requesting asset transfers, and making calls to other canisters.
Existing solutions
Artemis and connect2ic are two useful packages currently employed by some dapps. They provide simple methods for dapp developers to interact with wallets by individually wrapping each one. While these packages are valuable in the short term, a long-term approach with standardized solutions is still needed. This will allow for the scalability of new and existing wallets without placing additional burdens on toolkit package maintainers or dapp developers.
Standardized solution
- Standardize interactions between wallets and dapps: This will enable dapp developers to focus more on building useful features for users, rather than managing wallet integrations.
- Develop a comprehensive toolkit: This toolkit will abstract away the complexity of wallet interactions, allowing new wallets to be immediately usable across the ecosystem without requiring additional effort from dapp developers.
Progress
The Wallet and Identity Working Group has made a significant push over the last few months to complete the standards, of which there are 4 prioritized methods:
- icrc25_get_permissions: This is the initial method a developer would call to inform the user about the future actions the dapp will request. Given the complexity of permission management, this method is designed to be intentionally flexible.
- icrc34_get_delegation: This method will be most familiar to dapp developers who receive delegations from NFID Wallet and Internet Identity. Additionally, we have developed a secure delegation request method under the ICRC-28 proposal to protect users from malicious attacks that exploit delegations with the same principal across different dapps, preventing dapps from draining users’ funds.
- icrc27_get_accounts: This method may serve as an alternative to get_delegation for dapp developers who only need to check the user’s asset balances and request approvals for actions like transfers, purchases, and swaps. It will be familiar to dapp developers from other ecosystems. It can also be used after dapps request a delegation.
- icrc49_call_canister: This method allows dapp developers to invoke any method on any canister, making it particularly useful when users connect to dapps with a wallet address rather than a new anonymous principal, such as with Internet Identity (II).
Secondary standards priorities
- icrc28_get_trusted_origins: This method enables developers to securely request delegations with consistent principals across dapps, ensuring that a malicious dapp cannot drain the user’s assets.
- icrc39_batch_calling: This method allows developers to bundle multiple calls into a single batch, resulting in just one wallet prompt for the user to approve multiple signature requests simultaneously.
- icrc32_sign_challenge: This method allows developers to request signatures to prove the user is in control of the principal the dapp was given (i.e. through icrc27_get_accounts).
- icrc58_extend_delegation: This method allows developers to request additional targets that are not within their control to be added to a delegation chain.
- icrc59_shared_ecosystem_canisters: This standard exposes a list of types of canisters wallets can optionally blacklist from being added to a delegation without explicit user approval (i.e. via icrc58_extend_delegation).