…nt (C-address) activation
Closes #22.
Wallet plumbing:
- @creit.tech/stellar-wallets-kit 1.9.5 -> 2.3.0 (static-singleton API,
explicit module list, module classes from subpath exports).
- Nido (passkey smart wallet) module synced verbatim from theahaco/nido at a
pinned, ENFORCED commit by scripts/sync-nido-module.sh (npm cannot install
monorepo subpaths as git deps; the script is the dependency, src/dist stay
out of this repo). Its sole @g2c/passkey-sdk import is satisfied by a
committed five-line StrKey shim. Apache-2.0 NOTICE committed. Registered
only on testnet (Nido is testnet-only today); "Nido" row in the modal.
- connect(): disconnect-before-setWallet (clears Nido's cached account, so
reconnect can switch accounts) and full pairing rollback on a failed
connect — "Try again" with no address re-opens the picker instead of
signing via the wrong module.
Smart-account (C-address) support:
- @theaha/authline 0.5.0: getActivationStatus is holder-kind-aware —
contract holders have no trustline; the SAC authorized() view (simulated
with the asset issuer as dummy source, Address-encoded for G and C) is
authoritative. The documented non-throwing contract now actually holds
(key construction moved inside the try). buildOnboardTx gained feeSource
(required for contract holders — a contract cannot source a transaction).
- dApp: smart-account flow end to end — status/phases/StatusRows/preview/
copy handle contract holders truthfully; activation pre-builds in the
background (session friendbot fee payer + prepared onboard tx) so the
Nido sign popup opens within the click's transient-user-activation
window; the wallet passkey-signs the smart account's auth entry, the fee
payer signs the envelope, the dApp submits. TrustlineOnly for a contract
holder is reported as the failure it is (nothing changed on-chain).
Verified on-chain (testnet): SAC authorized(C) defaults false/true for
AUTH_REQUIRED/open assets; the authorizer-stub authorizes contract holders;
router onboard(sac, C) returns Authorized with exactly one auth entry —
the entry the Nido popup signs.
Tests: 47 unit (holder-kind status matrix, non-throwing guarantees), 9
real-chain e2e (new smart-account suite: SAC-view status both asset
classes, feeSource refusal, fee-payer-sourced tx carrying the smart
account's address-credential auth entry), 14 Playwright (smart-account
?address= previews against the real chain, Nido in the modal).
Closes #22.
What this does
Nido (https://github.com/theahaco/nido) users can now connect their passkey smart wallet on Authline and activate assets. Nido accounts are Soroban C-addresses — they cannot hold classic trustlines or source transactions — so this PR is two things: the wallet connector, and first-class smart-account support through the whole stack.
Wallet plumbing
scripts/sync-nido-module.shfetchespackages/stellar-wallets-kit-modulefrom theahaco/nido at an enforced pinned commit at build time (source stays out of this repo; Apache-2.0 NOTICE committed). Its only@g2c/passkey-sdkimport is satisfied by a committed 5-line StrKey shim, avoiding the upstream SDK's stellar-sdk@15 tree.PUBLIC_NIDO_BASEoverrides the defaultnido.fyi.Smart-account (C-address) support
getActivationStatusis holder-kind-aware:holderKind: "account" | "contract"; contract holders skip the trustline read entirely and the SACauthorized()view is authoritative (defaults verified on-chain: open → authorized, AUTH_REQUIRED → not). The documented non-throwing contract now actually holds (a C-address used to throw out of the SDK and crash connect).buildOnboardTxgainedfeeSource— required for contract holders.TrustlineOnlyfor a contract holder reports as the failure it is (nothing changed on-chain).?address=preview incl. C-addresses, success/already copy, contract explorer links).On-chain verification (testnet, before building)
authorized(C): AUTH_REQUIRED →false, open →trueauthorize_trustline(C)works for contract holders with no balance entryonboard(sac, C)→Authorizedwith exactly one auth entry — the one the Nido popup signsTest plan
?address=previews against the real chain (regulated → "not authorized", open → "all set") and the Nido row in the wallet modalLimits / notes
🤖 Generated with Claude Code