PartyLayer

Canton wallets / Nightly

Nightly wallet integration

NightlyAdapter is a browser-extension integration, discovered through the window property the registry entry names. It supports message signing and transaction submission across all three networks, and unlike the popup and QR wallets it can tell you whether the extension is present before the user commits to a flow.

What the registry declares

TransportBrowser extension
Adapter package@partylayer/adapter-nightly
SDK version>=0.1.0
Networksdevnet, testnet, mainnet
CIP-0103Not declared

Install

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

Construct the adapter

import { NightlyAdapter } from '@partylayer/adapter-nightly';

// No configuration required.
const nightly = new NightlyAdapter();

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={[nightly]}>
      <ConnectButton />
    </PartyLayerKit>
  );
}

Connection flow

Detection reads the window property declared in the registry entry, so the adapter can distinguish an installed extension from a missing one before the user picks the wallet. A return visit attempts a session restore before opening a fresh prompt.

What the transport means for you

Because detection is real here, your picker can show an install call to action instead of a connect button when the extension is absent, which is the single biggest usability difference between an extension wallet and a QR one. Extensions also inject on page load, so a wallet selected immediately after a hard refresh can occasionally be probed before injection lands; treat a first-attempt miss as retryable rather than final.

What this adapter supports

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

Not available, and why

signTransaction
The registry entry declares signTransaction: false. Submission is available; a detached sign-only path is not.
transaction status
The registry entry declares transactionStatus: false, so this integration does not report a committed status back to the app.

Things that will catch you out

submitTransaction throws rather than returning a synthetic hashWhen neither an updateId nor a signature comes back, NightlyAdapter.submitTransaction throws instead of returning a generated tx_<timestamp>_<random> value. Handle the rejection; do not expect a placeholder. This was our defect, not the wallet's.
No committed status to pollWith transactionStatus false, a successful submit tells you the wallet accepted and forwarded the command, not that it committed. If your UI needs a settled state, read it from the ledger yourself rather than waiting on this adapter.

Troubleshooting

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

SymptomCauseWhat to do
WalletNotInstalledError: "Nightly wallet not detected. Install from https://nightly.app/download"The window property the registry entry names was not present when the adapter probed for it.Render an install link rather than a connect button. If it fires immediately after a page load, retry once before showing it, in case the extension had not injected yet.
"Failed to restore Nightly wallet session"The restore attempt on a return visit did not produce a usable session.Fall back to a fresh connect. Restore is an optimisation here, not a guarantee.
"Browser environment required"Detection or connect ran with no window, typically during server-side rendering.Guard the call behind a client-side effect.

Related

Other wallets

Console Wallet · 5N Loop · Cantor8 · Bron · WalletConnect