Canton dAppBooster
    Preparing search index...
    • Escape hatch for ledger reads useExecute and useSignMessage do not cover: the participant's JSON API, passed through untyped.

      Returns UseLedgerResult

      with no CantonConnectProvider above it, and from ledgerApi itself where nothing is connected or the wallet is locked, which isReady is there to check first. A refused read throws too, always as an Error: see toError.

      const { ledgerApi, isReady } = useLedger()

      if (!isReady) return <p>Connect and unlock the wallet first.</p>

      await ledgerApi({
      requestMethod: 'get',
      resource: '/v2/users/{user-id}/rights',
      path: { 'user-id': 'alice' },
      })