@soroban-dev-kit/connectors
v0.1.2
Published
Wallet connectors for soroban-dev-kit — a stellar-wallets-kit adapter plus a passkey/smart-account connector.
Downloads
503
Maintainers
Readme
@soroban-dev-kit/connectors
Wallet connectors for soroban-dev-kit —
a stellar-wallets-kit
adapter (Freighter, xBull, Albedo, Lobstr, Hana) plus a WebAuthn
PasskeyConnector.
npm install @soroban-dev-kit/connectorsFive wallets in one call
import { createWalletsKitConnectors } from "@soroban-dev-kit/connectors";
import { NETWORK_PRESETS } from "@soroban-dev-kit/core";
const connectors = createWalletsKitConnectors({ network: NETWORK_PRESETS.testnet });Pass this straight into <SorobanDevKitProvider connectors={connectors} ...> from
@soroban-dev-kit/react.
Freighter and Hana additionally advertise sign-auth-entry (their
stellar-wallets-kit module implements it for real); the others only
sign-transaction.
Passkeys
import { PasskeyConnector } from "@soroban-dev-kit/connectors";
const passkey = new PasskeyConnector({
network: NETWORK_PRESETS.testnet,
rpId: "your-app.example",
resolveContractAddress: (credentialId) => lookUpSmartWalletAddress(credentialId),
});Uses real navigator.credentials WebAuthn calls. A passkey has no classic
Stellar account, so it only ever advertises sign-auth-entry, and
signAuthEntry returns Signature::Secp256r1({authenticator_data,
client_data_json, signature}) — the exact shape verified against the
stellar/passkey-kit reference
smart-wallet contract's own #[contracttype] definitions, including
converting WebAuthn's DER-encoded signature to the raw 64-byte r || s
the contract's BytesN<64> field expects. Wiring this into a write end to
end (rather than through core's generic, authorizeEntry()-based
auth-entry bridge, which assumes a classic signer's flat signature bytes)
needs applyPasskeySignatureToEntry, exported alongside PasskeyConnector.
Full docs and the design rationale: see the
soroban-dev-kit repo and its
SKILL.md.
