Skip to content

Signed message verification #11

@dmytronasyrov

Description

@dmytronasyrov

I'm looking for a solution to verify signed by Beacon wallet (JS) RAW or MICHELINE message.
Looked through the source code of many repos but no luck yet. The closest solution for RAW (from my perspective) is

byte[] walletAddress = "PKH".getBytes(StandardCharsets.US_ASCII);
byte[] signature = "edsigu53AaPtjGhGtPKb3aM2AB8kGmikyhFtyjTP6QKv3VisAuVbtak8DJzEJn5kNB3hsNwEUP9FFfxuRZaPGUs5dmeSkT7pG2s".getBytes(StandardCharsets.US_ASCII);
byte[] msg = "abc".getBytes(StandardCharsets.US_ASCII);
final boolean verify = Ed25519.verify(signature, 0, walletAddress, 0, msg, 0, msg.length);

Message was signed with:

const payload = {
      signingType: SigningType.RAW,
      payload: "abc",
      sourceAddress: PKH
};

const signedPayload = await wallet.client.requestSignPayload(payload);
const {signature} = signedPayload;

Any idea how to make verification works?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions