Lace wallet doesn't implement getProvingProvider(), expected behavior or version gap?

Hi, I’m building a dApp on Midnight preprod using @midnight-ntwrk/dapp-connector-api@4.0.1.

When connecting with 1AM wallet, wallet.getProvingProvider() exists and ZK proving works perfectly.

When connecting with Lace wallet, typeof wallet.getProvingProvider === "function" returns false, the method is absent on the connected API object.

According to the dapp-connector-api@4.x type definitions, getProvingProvider is declared as a required (non-optional) method on WalletConnectedAPI. So my questions are:

  1. Does the current version of Lace implement getProvingProvider()? If not, is there a known target version?

  2. Is the correct fallback for Lace to use a self-hosted midnightntwrk/proof-server via HTTP, or is there another recommended approach?

  3. getConfiguration().proverServerUri is marked @deprecated in the type definitions, is it still callable from a dApp with Lace, or is it auth-gated?

Thanks

1 Like

Hey 8pro! I saw we discussed this over on Discord, but I’m posting the solution here as well so it’s searchable for others who might hit the same versioning gap.

To answer your specific questions from a v4 API perspective:

1. Does the current version of Lace implement getProvingProvider()?
Currently, no. Lace does not yet expose this method on the WalletConnectedAPI. While 1AM is the reference implementation for v4 delegation, Lace is still catching up. We are syncing with the engineering team for a target version and will update the community as soon as we have a hard date.

2. Is the self-hosted proof-server the correct fallback?
Yes. The recommended approach for Lace right now is to implement a conditional fallback. This ensures your dApp remains compatible with both 1AM (delegated) and Lace (manual):

import { httpClientProofProvider } from '@midnight-ntwrk/midnight-js-http-client-proof-provider';

let proofProvider;
if (typeof walletAPI.getProvingProvider === 'function') {
  // Use v4 Delegated Proving (e.g., 1AM)
  proofProvider = await walletAPI.getProvingProvider(keyMaterialProvider);
} else {
  // Fallback to HTTP Proving (Current Lace workaround)
  const { proverServerUri } = await walletAPI.getConfiguration();
  proofProvider = httpClientProofProvider(
    proverServerUri || 'http://localhost:6300', 
    zkConfigProvider
  );
}

3. Is getConfiguration().proverServerUri still callable?
Yes. It is fully functional and not auth-gated. It is only marked as @deprecated to signal the future shift toward delegation, but it remains the correct way to respect the user’s custom prover settings in Lace for now.

Helpful Resources:

Hope this gets you and any other person facing this unblocked!

1 Like

Thanks @nasihudeenJ this will help more people. It was a great and helpful discussion

2 Likes