Overview
SignerManager manages signers attached to context rules on your smart account. Access it via kit.signers.
// Add a passkey signer to rule 0
await kit.signers.addPasskey(0, 'My App', 'Recovery Key');
// Add a G-address signer
await kit.signers.addDelegated(0, 'GABC...');
// Remove a signer
await kit.signers.remove(0, signer);
batch_add_signer is intentionally left on the raw kit.wallet client - the SDK does not add enough ergonomics to justify a wrapper.
Methods
addPasskey()
Register a new WebAuthn passkey and add it as a signer on the given context rule.
const { credentialId, transaction } = await kit.signers.addPasskey(
contextRuleId: number,
appName: string,
userName: string,
options?: AddPasskeyOptions
);
Parameters:
The ID of the context rule to add the signer to.
Display name for the relying party shown during passkey creation.
Label for the new passkey (e.g. “Recovery Key”, “YubiKey”).
Optional local nickname for the credential.
Example:
const { credentialId } = await kit.signers.addPasskey(
0,
'My App',
'Backup YubiKey',
{ nickname: 'Backup YubiKey' }
);
addDelegated()
Add a Stellar G-address as a delegated signer on a context rule.
await kit.signers.addDelegated(
contextRuleId: number,
address: string
);
Example:
await kit.signers.addDelegated(0, 'GABC...');
remove()
Remove a signer from a context rule. The SDK resolves signer IDs internally - pass the signer value directly.
await kit.signers.remove(
contextRuleId: number,
signer: ContractSigner
);
Example:
const rule = (await kit.rules.get(0)).result;
const signer = rule.signers[0];
await kit.signers.remove(0, signer);