@lumera/sdk-js
    Preparing search index...

    Function createDefaultSignaturePrompter

    • Default signature prompter that creates a modal dialog

      This function creates a modal prompt that requests user confirmation before triggering the wallet signature request. This is necessary for wallets like Keplr that require signature requests to originate from explicit user gestures.

      The prompter:

      1. Injects necessary CSS styles
      2. Creates a modal overlay with a centered dialog containing Sign and Cancel buttons
      3. Waits for user interaction (button click or overlay click)
      4. Triggers the signature request on confirmation
      5. Cleans up the modal from the DOM after completion or cancellation

      The modal is centered on the screen with a semi-transparent overlay. Clicking the overlay or Cancel button will reject the signature request. The modal is responsive and works well on different screen sizes.

      Parameters

      • OptionalcontainerSelector: string

        (Optional, deprecated) Previously used to specify a container. Now ignored as the modal is always appended to the body.

      Returns SignaturePrompter

      A SignaturePrompter function

      const uploader = new CascadeUploader(...);

      await uploader.uploadFile(fileBytes, {
      fileName: 'example.txt',
      expirationTime: '...',
      signaturePrompter: createDefaultSignaturePrompter()
      });