refactor
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"name": "@repo/mnie-sdk",
|
||||
"private": true,
|
||||
"name": "mnie",
|
||||
"type": "module",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./src/index.ts",
|
||||
@@ -19,6 +18,7 @@
|
||||
"@repo/mnie-types": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@repo/tsconfig": "workspace:*",
|
||||
"@types/bun": "latest"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import type { SbiClientMethods } from '@repo/mnie-types'
|
||||
|
||||
export type MnieSdkOptions = {
|
||||
export interface MnieSdkOptions {
|
||||
origin: string
|
||||
apiKey: string
|
||||
WebSocket?: typeof WebSocket
|
||||
}
|
||||
|
||||
export type JsonRpcError = {
|
||||
export interface JsonRpcError {
|
||||
code: number
|
||||
message: string
|
||||
}
|
||||
@@ -17,14 +17,14 @@ export type MnieClient = SbiClientMethods & {
|
||||
close(): void
|
||||
}
|
||||
|
||||
type JsonRpcResponse = {
|
||||
interface JsonRpcResponse {
|
||||
jsonrpc?: '2.0'
|
||||
id?: string | number | null
|
||||
result?: unknown
|
||||
error?: JsonRpcError
|
||||
}
|
||||
|
||||
type PendingCall = {
|
||||
interface PendingCall {
|
||||
resolve: (value: unknown) => void
|
||||
reject: (error: Error) => void
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"extends": "@repo/tsconfig/tsconfig.json",
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user