Kibisis Wallet

This guide explains how to integrate Kibisis wallet with Sign-In with Algorand (SIWA) for message signing.

Get started quickly with SIWA Connect

Prerequisites

Install the Kibisis wallet extension on Chrome

Overview

Kibisis wallet uses a direct message signing approach for SIWA messages. Here's how it works:

  1. Inject the Kibisis wallet script

  2. Enable the wallet and get the user's address

  3. Sign the SIWA message using the wallet's signBytes method

Implementation

1. Injecting and Connecting to Kibisis Wallet

To use Kibisis wallet, you need to inject its script and enable it:

2. Signing a SIWA Message

To sign a SIWA message with Kibisis wallet:

  1. Prepare the message by prefixing it with "MX"

  2. Use the window.algorand.signBytes method to sign the message

Here's the code to accomplish this:

Verification

When verifying the SIWA message signature for Kibisis wallet, the process is straightforward as it uses direct message signing. Here's how it works:

  1. The verification function receives the following parameters:

    • message: The original SIWA message

    • signature: The signature in base64 format

    • provider: The wallet provider (in this case, "Kibisis")

  2. The verification process for Kibisis wallet:

This verification process ensures that:

  1. The message is properly hashed

  2. The signature is valid for the given message and address

Key points to remember for Kibisis wallet verification:

  1. The message used for verification should be the same as the one used for signing (including the "MX" prefix).

  2. The algosdk.verifyBytes function is used to verify the signature against the hashed message and the signer's address.

  3. Any errors during the verification process will result in a false return value.

Remember to handle any potential errors during the verification process and ensure that all required parameters are provided.

Last updated