Feature development guides for OneKey. Use when adding new chains, socket events, notifications, pages, or routes. Covers blockchain integration, WebSocket subscriptions, push notifications, and navigation patterns.
74
93%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Medium
Suggest reviewing before use
Comprehensive guides for extending OneKey app functionality.
| Feature | Guide | Key Files |
|---|---|---|
| Add blockchain chain | adding-chains.md | packages/core/src/chains/ |
| Add WebSocket events | adding-socket-events.md | packages/shared/types/socket.ts |
| Push notifications | notification-system.md | packages/kit-bg/src/services/ServiceNotification/ |
| Pages & routes | page-and-route.md | packages/kit/src/routes/ |
See: references/rules/adding-chains.md
Key steps:
packages/core/src/chains/mychain/packages/shared/src/config/chains/Reference implementations:
packages/core/src/chains/evm/packages/core/src/chains/btc/packages/core/src/chains/sol/See: references/rules/adding-socket-events.md
Key steps:
EAppSocketEventNames enummsgId: stringPushProviderWebSocket.initWebSocket()ackNotificationMessagethis.socket.on(EAppSocketEventNames.myEvent, (payload: IMyPayload) => {
void this.backgroundApi.serviceNotification.ackNotificationMessage({
msgId: payload.msgId,
action: ENotificationPushMessageAckAction.arrived,
});
void this.backgroundApi.someService.handleEvent(payload);
});See: references/rules/notification-system.md
Notification modes:
| Mode | Action |
|---|---|
| 1 (page) | Navigate to specific page |
| 2 (dialog) | Show dialog |
| 3 (openInBrowser) | Open URL in external browser |
| 4 (openInApp) | Open URL in in-app browser |
| 5 (openInDapp) | Open URL in DApp browser |
Key files:
packages/kit-bg/src/services/ServiceNotification/ServiceNotification.tspackages/shared/src/utils/notificationsUtils.tspackages/shared/types/notification.tsSee: references/rules/page-and-route.md
Page types:
| Type | Description |
|---|---|
modal | Modal overlay pages |
stack | Tab route pages |
onboarding | Full screen onboarding pages |
Route configuration locations:
packages/kit/src/routes/Modal/router.tsxpackages/kit/src/routes/Tab/router.tspackages/kit/src/views/Onboardingv2/router/index.tsxImportant:
pop: true with navigation.navigate/1k-coding-patterns - React and TypeScript best practices/1k-architecture - Project structure and import rules/1k-state-management - Jotai atom patternsd71e6b7
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.