This commit is contained in:
Shotaro Nakamura
2026-07-10 19:03:57 +09:00
parent df40c591a5
commit 23aa3e5775
42 changed files with 259 additions and 256 deletions
+1
View File
@@ -24,6 +24,7 @@
"zod": "^4.4.3"
},
"devDependencies": {
"@repo/tsconfig": "workspace:*",
"@types/bun": "latest",
"drizzle-kit": "^0.31.1",
"typescript": "^5"
+1 -1
View File
@@ -1,7 +1,7 @@
import { mkdirSync } from 'node:fs'
import { dirname, resolve } from 'node:path'
export type ServerConfig = {
export interface ServerConfig {
port: number
databasePath: string
corsOrigin: string
+1 -1
View File
@@ -1,7 +1,7 @@
import type { ServerConfig } from './config'
import type { Db } from './db'
export type AppBindings = {
export interface AppBindings {
Variables: {
db: Db
config: ServerConfig
+1 -1
View File
@@ -14,7 +14,7 @@ import {
import { randomId } from '../security/crypto'
import { deleteSecret, saveSecret } from '../security/keyring'
export type StoredSbiPasskeySecret = {
export interface StoredSbiPasskeySecret {
credential: PlaintextStoredWebAuthnCredential
tradePassword?: string
deviceId?: string
+1 -1
View File
@@ -32,7 +32,7 @@ const requireAuthenticated = (auth: AuthContext) => {
const ORDER_SUBMIT_TICKET_TTL_MS = 10 * 60 * 1000
type OrderSubmitTicket = {
interface OrderSubmitTicket {
passkeyId: string
estimateMethod: RpcMethod
submitMethod: RpcMethod
+3 -3
View File
@@ -11,14 +11,14 @@ import {
import { invokeSbiMethod, isRpcMethod, isTradingMethod, RPC_METHODS } from './methods'
import { connectSbi } from './sbi-session'
type JsonRpcRequest = {
interface JsonRpcRequest {
jsonrpc?: '2.0'
id?: string | number | null
method?: string
params?: unknown
}
type RpcSocketState = {
interface RpcSocketState {
client?: SbiClientMethods
sbiPasskeyId?: string
apiKeyId?: string
@@ -26,7 +26,7 @@ type RpcSocketState = {
boardPollingSubscriptions: Map<string, AbortController>
}
type BoardPollingParams = {
interface BoardPollingParams {
issueCode: string
market: MarketCode
intervalSeconds?: number
+1 -1
View File
@@ -3,7 +3,7 @@ import type { Db } from '../db'
import { apiKeys } from '../db/schema'
import { randomId, randomToken, sha256 } from './crypto'
export type ApiKeySettings = {
export interface ApiKeySettings {
maxTradesPerHour?: number | null
maxTradesPer6Hours?: number | null
maxTradesPerDay?: number | null
@@ -5,7 +5,7 @@ import type { RpcMethod } from '../rpc/methods'
type WindowName = '1h' | '3h' | '1d'
type TradeLimitInput = {
interface TradeLimitInput {
apiKeyId: string
params: unknown
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "@repo/tsconfig/tsconfig.json",
"compilerOptions": {
"types": ["bun"],
"rootDir": "src",