Towards More Conversational Wallet Connections: A Proposal for the redeemDelegation Interface

This proposal is intended to provide a unified interface that can be exposed from any smart account, allowing us to advance towards a safer dapp-wallet connection while unimpeding the innovation of smart accounts.

Yes, this looks like a UX that could be built on the proposed interface, in a way that allows the requesting dapp to interact with many types of smart accounts, not just one.

A point that is in the video talk but not in this original post is the idea of the wallet provider method that might pair with this. Something like wallet_requestOnchainPermissions.

The goal of that method would be to allow the site to specify what it needs to do (and possibly justify that request), while remaining agnostic to the implementation of the granting account (possibly by utilizing a generic redemption method like the redeemDelegation described above).

A very simple conversation-starter level sketch of that method might be:

const [approverAddress, approvingBytes] = await provider.request({
  method: 'wallet_requestOnchainPermission',
  params: [{
    method: 'erc20_transfer',
    contract: TOKEN_ADDRESS,
    chainId,
    justification: "Just in case I want to spend it."
  }]
});

The approvingBytes could then be usable as described above:

const approver = new Contract(approverAddress);
approver.redeemDelegation(approvingBytes, intendedOperation);

I did a fresh summary of the current state of this thread’s proposal in a new tiny blog post.

1 Like

Love the idea, Dan.

We are resuming the regular call of AllERCDevs, care to come to share the idea with ERC authors and builders? Next is 2024-03-21 UTC1700 online if you are open to it.

1 Like