Blockchain Commons Components TypeScript Library - v1.0.0-alpha.13
    Preparing search index...

    Class Sr25519PublicKey

    Sr25519PublicKey - Public key for Schnorr signatures over Ristretto25519.

    This is the signature scheme used by Polkadot/Substrate.

    Index

    Methods

    • Verify a signature using the default "substrate" context.

      Parameters

      • signature: Uint8Array

        The 64-byte signature

      • message: Uint8Array

        The message that was signed

      Returns boolean

      true if the signature is valid

    • Verify a signature using a custom context.

      Note: The @scure/sr25519 library uses a hardcoded "substrate" context. Custom context is accepted for API compatibility but only signatures created with "substrate" context will verify correctly.

      Parameters

      • signature: Uint8Array

        The 64-byte signature

      • message: Uint8Array

        The message that was signed

      • _context: Uint8Array

        The signing context (only "substrate" is supported)

      Returns boolean

      true if the signature is valid