Skip to content

authorizeEntry: support non-Ed25519 signers (custom signature ScVal) #1530

Description

@Ryang-21

Is your feature request related to a problem? Please describe.
authorizeEntry / authorizeInvocation only support Ed25519 signers: the signer callback must return {signature: Uint8Array, publicKey}, and the helper internally calls StrKey.decodeEd25519PublicKey and verifies the signature. Smart-wallet / passkey (WebAuthn, secp256r1) projects can't use it because their custom-account contract's __check_auth expects a structured ScVal map (signature + authenticator data + client data), so they rebuild the entire auth flow by hand: constructing xdr.HashIdPreimageSorobanAuthorization, hashing .toXDR(), signing, and assembling SorobanAddressCredentials.

Describe the solution you'd like
Allow the signer callback to return an arbitrary signature ScVal (not just raw Ed25519 bytes + public key), and skip the internal Ed25519 verification / decodeEd25519PublicKey when the caller opts out. This would cover the passkey/WebAuthn smart-wallet use case without callers touching raw XDR.

Describe alternatives you've considered
Community projects like passkey-kit currently act as the stand-in, reimplementing preimage construction and credential assembly outside the SDK.

Additional context
Companion issues: a first-class WebAuthn helper; passing the hash (not the preimage) to the signer callback.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions