Errors
Adapters throw Errors whose message is a code: reason:detail.
denied: the person or the signer said no.unavailable: something isn't there.invalid: something came back wrong.
sigport turns codes into sentences before putting them in state.error. A message that isn't a code is shown as written. Network failures become "The signer did not answer. Check that it is open, then try again."
| Code | Sentence |
|---|---|
invalid:person | That is not an identity. Paste an npub, nprofile, NIP-05 address, or 64-character hex key. |
invalid:pairing-code | That is not a pairing code. Copy the whole code from your signer app and paste it again. |
invalid:password-mismatch | The two passwords differ. |
denied:passkey-cancelled | The passkey was not used. |
denied:passkey-mismatch | That passkey belongs to a different identity. |
unavailable:passkey-secret | This passkey cannot sign here. Try another one, or another way to sign in. |
unavailable:wallet-missing | The wallet is not in this browser any more. |
unavailable:wallet-cannot-encrypt | The wallet cannot encrypt messages. |
unavailable:snap-unconfigured | MetaMask sign-in is not set up on this site. |
invalid:wallet-key, invalid:wallet-signature | The wallet answered with something that does not check out. |
denied:plaintext-key-persistence | This identity cannot be remembered. |
Override any of them, or add your own:
ts
createSigport({
adapters,
messages: {
'denied:passkey-cancelled': 'No worries — try again when you are ready.',
'denied:my-wallet-locked': 'Unlock My Wallet first.',
},
});