PartyLayer

Canton wallets / Cantor8

Cantor8 wallet integration

Cantor8Adapter is the narrowest integration in this set: through it a dApp can submit transactions and read their status, and nothing else. If your app gates anything on a signed message, this adapter is not the path. It is also the one adapter here whose submit call takes a wallet-SDK-shaped payload rather than the shape the other adapters accept, which is the detail most likely to cost you an afternoon.

What the registry declares

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

Install

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

Construct the adapter

import { Cantor8Adapter } from '@partylayer/adapter-cantor8';

// dappUrl defaults to the page origin, which is what you want in a browser app.
const cantor8 = new Cantor8Adapter();

// Override only when the origin the wallet should see differs from the page's:
//   new Cantor8Adapter({ dappUrl: 'https://app.example.com' })

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

Connection flow

The adapter passes a dApp URL into the wallet SDK popup handshake, defaulting to the page origin. The wallet SDK owns the popup and the postMessage channel back to your page.

What the transport means for you

The origin your page runs on is part of the handshake, so a deployment whose public origin differs from the one the browser sees, behind a proxy or on a preview URL, is the case to check first when a handshake never completes. Overriding dappUrl exists for exactly that, and is not something a normal browser app needs to set.

What this adapter supports

CapabilityCallThrough this adapter
Sign messageuseSignMessage()Not available
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

signMessage
The registry entry declares signMessage: false and Cantor8Adapter implements no signMessage path. useSignMessage() will not work through this adapter.
signTransaction
The registry entry declares signTransaction: false.

Things that will catch you out

submitTransaction takes the wallet SDK's signAndExecute inputThis adapter does not accept the same signedTx shape as the others. It requires the object the wallet SDK's signAndExecute expects: { note?, partyId, commandId, commandsJson, disclosedContracts? }. Passing a signed payload built for another adapter fails here.
Plan the connect UI around submit-onlyBecause this integration supports neither signMessage nor signTransaction, an app that gates login on a signed message has no path through this adapter. Decide that before you offer the wallet in your picker, not after a user selects it.

Troubleshooting

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

SymptomCauseWhat to do
"Cantor8 returned no account after connect"The popup handshake resolved but carried no account for the adapter to build a session from.Treat it as a failed connect and retry. Check that the origin in the handshake matches the origin the browser is actually on.
submitTransaction rejects with a message about signedTx shapeThe payload was not the wallet SDK signAndExecute input this adapter forwards.Build { partyId, commandId, commandsJson } and pass disclosedContracts and note when you have them. The rejection names the required keys.
"Browser environment required"A connect call ran with no window available, typically during server-side rendering.Move the call into a client-side effect.

Related

Other wallets

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