Skip to content

Design Dusk-native typed intent signing for dApps #22

Description

@HDauven

Summary

dusk_signMessage is a low-level opaque byte-signing primitive. Even with domain separation, it is not the right long-term UX/security model for dApp authorization, contract actions, data-driver workflows, or other human-meaningful intents.

This issue tracks the larger product/protocol design for Dusk-native typed intent signing.

The short-term dusk_signMessage approval UI hardening is tracked separately in #24.

Goals

Introduce a typed signing model that lets the wallet render what the user is authorizing, while giving dApps and verifiers a canonical envelope they can validate.

The design should bind at least:

  • origin
  • chain ID
  • account/public key
  • intent type
  • nonce
  • issued-at timestamp
  • expiry
  • human-readable statement or summary
  • canonical payload hash
  • optional schema/data-driver/contract context

Possible provider method

dusk_signIntent({
  type,
  nonce,
  expiresAt,
  statement,
  payload,
  payloadSchema?,
  contractId?,
  fnName?,
  dataDriverVersion?,
})

Possible signed envelope

Dusk Connect SignIntent v1
Origin: https://example.app
Chain ID: dusk:1
Account: <BLS public account>
Intent Type: login | contract-action | driver-upload | generic
Issued At: <ISO timestamp>
Expiration Time: <ISO timestamp>
Nonce: <dApp nonce>
Payload Schema: <schema id or data-driver id>
Payload Hash: 0x...
Payload:
<canonical JSON or typed summary>

Design questions

  • Should this use a direct BLS signing export from the browser wallet/core path instead of the current dummy Moonlight memo transaction technique?
  • What canonical serialization should be used for typed payloads?
  • Which intent types should be supported in v1?
  • How should connect expose verifier helpers?
  • How should data drivers participate in rendering and validating contract-call payloads?
  • What should be rejected by policy instead of merely displayed?

Expected output

  • A concrete intent envelope specification.
  • Wallet UI rendering rules for each supported intent type.
  • Verification helpers or API shape for connect.
  • Migration guidance for dApps currently using dusk_signMessage for login/auth flows.
  • Tests covering origin/chain/account binding, nonce/expiry handling, and canonical payload hashing.

Related issue

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions