PartyLayer

Canton wallets / 5N Loop

5N Loop wallet integration

LoopAdapter connects through a script-loaded SDK rather than a browser extension, so there is nothing for a user to install first. The registry classifies its transport as a QR or popup flow opened by the wallet SDK. It is available on devnet and mainnet, and it is one of two adapters in this set that can restore a session without a fresh scan.

What the registry declares

TransportQR or popup, opened by the wallet SDK
Adapter package@partylayer/adapter-loop
SDK version>=0.1.0
Networksdevnet, mainnet
CIP-0103Not declared

Install

npm install @partylayer/react @partylayer/adapter-loop

Construct the adapter

import { LoopAdapter } from '@partylayer/adapter-loop';

// No configuration required.
const loop = new LoopAdapter();

Register it

Pass the adapter to PartyLayerKit. Everything else, the button and the modal, is the same for every wallet.

import { PartyLayerKit, ConnectButton } from '@partylayer/react';

export default function App() {
  return (
    <PartyLayerKit network="devnet" adapters={[loop]}>
      <ConnectButton />
    </PartyLayerKit>
  );
}

Connection flow

Detection returns true in any browser because the SDK is script-loaded rather than injected, so there is no installed-or-not signal to read before the user starts. The wallet SDK opens its own window. On a return visit the adapter tries an auto-connect restore first and falls back to a fresh flow if that times out.

What the transport means for you

There is no install state to render, which changes the shape of your picker: selecting this wallet always opens a flow, and a user with no Loop account discovers that only after the window appears. Budget for a visible cancel path and a retry, because a QR flow that the user abandons is a normal outcome here rather than an error condition.

What this adapter supports

CapabilityCallThrough this adapter
Sign messageuseSignMessage()Yes
Sign transactionuseSignTransaction()Not available
Submit transactionuseSubmitTransaction()Yes
Report transaction statussubmit resultYes
Switch networkclient.switchNetwork()Not available
Multi-partymulti-party flowsNot available

Not available, and why

signTransaction
The registry entry declares signTransaction: false. LoopAdapter offers submit but no detached sign-only path.
testnet
The registry entry lists devnet and mainnet only.

Things that will catch you out

updateId is the ledger update id, and is omitted when absentLoopAdapter previously reported the SDK's submission_id under updateId. A submission id identifies the request, not the committed update. It now reads the SDK's own update_id and omits the field entirely when there is none, so a caller can tell "no update id" apart from a substituted one. This was our defect, not the wallet's.

Troubleshooting

Every symptom below is a real rejection path in @partylayer/adapter-loop, quoted from the adapter rather than reconstructed.

SymptomCauseWhat to do
"Connection timeout, user did not complete QR scan"The connect flow opened and no scan completed inside the adapter's window.This is a user outcome, not a fault. Keep the modal open, offer a retry, and do not log it as an error.
"Loop Wallet auto-connect timed out, session not restorable"The restore path ran on a return visit and did not complete in time.Fall back to a fresh connect. Treat restore as an optimisation that may not land, not as a step that must succeed.
"Browser environment required"A connect or restore call ran where there is no window, typically during server-side rendering.Guard the call behind a client-side effect. The wallet UI in this repository already does this; a custom picker has to do it too.
"Not connected to Loop Wallet"signMessage, submitTransaction or a ledger read was called before connect resolved.Gate those calls on session state rather than firing them optimistically after opening the modal.

Related

Other wallets

Console Wallet · Cantor8 · Bron · Nightly · WalletConnect