Accesly adapter
Sign Pollar transactions with an Accesly Smart Account (passkey + Shamir-MPC), wired as a Pollar wallet adapter.
With @pollar/react, wire signXdr from @accesly/react's useAccesly() (unlock → sign) and pass the adapter to walletAdapters on <PollarProvider>. It must render inside <AcceslyProvider>.
Notes
- Accesly is a self-custodial **smart wallet** (a C-address Soroban contract), so
custodyis'smart'. - Signing happens **client-side** via Accesly's SDK — Pollar never holds the key; the signed XDR is broadcast via RPC, like an external wallet.
- Wire
signXdrfromuseAccesly():wallet.unlockForSigning(passkey → Shamir → ed25519 seed), thentx.signRawXdr({ transactionXdr, ed25519Seed, expectedPublicKey }). - Start a login with
login({ provider: 'accesly' })(id=== the adapter'stype).
terminal
pnpm add @pollar/accesly-adapter @accesly/react
@pollar/react— hooks & components
import { useMemo } from 'react'; import { useAccesly } from '@accesly/react'; import { PollarProvider } from '@pollar/react'; import { createAcceslyAdapter } from '@pollar/accesly-adapter'; // Render inside <AcceslyProvider appId="…" env="…"> (from @accesly/react). function AcceslyPollar({ address, username, children, }: { address: string; username: string; children: React.ReactNode; }) { const { wallet, tx } = useAccesly(); const accesly = useMemo( () => createAcceslyAdapter({ address, // the Accesly C-address signXdr: async (transactionXdr) => { const { ed25519Seed, expectedPublicKey } = await wallet.unlockForSigning(username); const { signedXdr } = await tx.signRawXdr({ transactionXdr, ed25519Seed, expectedPublicKey, }); return signedXdr; }, }), [address, username, wallet, tx], ); return ( <PollarProvider client={{ apiKey: 'pub_testnet_…', stellarNetwork: 'testnet', walletAdapters: [accesly], }} > {children} </PollarProvider> ); }