@motion-key/core
v0.1.0
Published
Shared types + Ed25519 canonical signing for Motion Key 2FA.
Maintainers
Readme
@motion-key/core
Shared wire types + Ed25519 canonical signing for Motion Key 2FA — an authenticator-style web 2FA system where the iPhone is the second factor.
This is the core package — pure TypeScript with no framework. You usually don't need to install it directly; both
@motion-key/serverand@motion-key/reactpull it in.
What's in here
- Wire types (
PendingChallengeDTO,ApproveRequest,EnrollStartResponse,AccountDTO, …) — everything that crosses a network boundary between the iPhone, the host RP, and the React components. canonicalize(payload)— alphabetical-key JSON serializer that the iPhone and the server both run, so the Ed25519 signature verifies byte-for-byte.verifySignature(payload, signatureBase64, publicKeyBase64)— Ed25519 verify using the host's Nodecrypto. Public key is base64-encoded raw 32 bytes.
Install
npm install @motion-key/core
# or
pnpm add @motion-key/coreNode 18+ (uses crypto.verify).
License
MIT
