Skip to content

Conversation

@squirer
Copy link
Contributor

@squirer squirer commented Nov 24, 2025

Purpose

Update concordium base to the version with exposed prove function, add the bindings for this function too

Changes

Updated base library, addded bindings method to lib.rs so that it can be called from Java

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

@squirer squirer marked this pull request as ready for review November 25, 2025 11:04
@squirer squirer requested a review from Radiokot November 25, 2025 13:07
Copy link
Member

@Radiokot Radiokot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know, there also must be a context hashing function for anchor verification

@Radiokot Radiokot changed the base branch from main to auditable-proofs November 25, 2025 13:24
@Radiokot
Copy link
Member

In the Typescript SDK bindings, the presentation creation method accepts the following structure:

#[wasm_bindgen(js_name = createPresentationV1)]
pub fn create_presentation_v1(raw_input: JsonString) -> JsResult {
    let PresentationV1Input {
        request,
        global,
        inputs,
    } = serde_json::from_str(&raw_input)?;
    let inputs = inputs.iter().map(|i| i.borrow());
    let presentation = request
        .prove(&global, inputs.into_iter())
        .map_err(to_js_error)?;

    serde_json::to_string(&presentation)
        .context("Failed to serialize PresentationV1")
        .map_err(to_js_error)
}

It is PresentationV1Input, not PresentationV1ProofInput

Can you please use PresentationV1Input in Java and Swift bindings as well so we have the same models in our SDKs and have less confusion?

@Radiokot
Copy link
Member

The structure is

struct PresentationV1Input {
    request: base::web3id::v1::RequestV1<ArCurve, Web3IdAttribute>,
    global: GlobalContext<ArCurve>,
    inputs: Vec<
        base::web3id::v1::OwnedCredentialProofPrivateInputs<IpPairing, ArCurve, Web3IdAttribute>,
    >,
}

@squirer squirer requested a review from Radiokot November 27, 2025 09:11
@squirer squirer merged commit 4fbcce1 into auditable-proofs Nov 27, 2025
@squirer squirer deleted the feature/RUN-77-update-rust-bindings-presentations-prove branch November 27, 2025 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants