v1.0 stable · Open-source core
Third-party Adapter Spec
Required adapter methods, events, normalization, signing, and fixtures.
Overview
Third-party adapters implement the ChainAdapter contract from @dolphin-id/core.
Adapters own wallet discovery, account normalization, SIWX message creation, and wallet signing.
Requirements
- discoverWallets returns stable wallet IDs, supported chain types, install status, and capabilities.
- connect returns accounts with normalized address, display address, wallet ID, adapter ID, and chain.
- createSiwxMessage must include domain, address, chainType, chainId, nonce, uri, issuedAt, expirationTime, version, and raw payload when useful.
- signSiwxMessage returns the account, message, signature, and ISO signedAt timestamp.
- on must support lifecycle event subscription and return an unsubscribe function.
- Contract tests should cover discovery, connection, normalization, message construction, signing, and emitted events.