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
| Transport | Browser extension |
|---|---|
| Adapter package | @partylayer/adapter-nightly |
| SDK version | >=0.1.0 |
| Networks | devnet, testnet, mainnet |
| CIP-0103 | Not declared |
Install
npm install @partylayer/react @partylayer/adapter-nightlyConstruct 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
| Capability | Call | Through this adapter |
|---|---|---|
| Sign message | useSignMessage() | Yes |
| Sign transaction | useSignTransaction() | Not available |
| Submit transaction | useSubmitTransaction() | Yes |
| Report transaction status | submit result | Not available |
| Switch network | client.switchNetwork() | Not available |
| Multi-party | multi-party flows | Not 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
Troubleshooting
Every symptom below is a real rejection path in @partylayer/adapter-nightly, quoted from the adapter rather than reconstructed.
| Symptom | Cause | What 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
- Quick Start builds a working app around this adapter.
- Wallets and adapters covers registration, discovery and custom adapters.
- CIP-0103 provider is the standard behind the transports above.
- Nightly homepage for anything about the wallet itself. This page describes the PartyLayer adapter, not the wallet's own SDK.
Other wallets
Console Wallet · 5N Loop · Cantor8 · Bron · WalletConnect