isSpliceMessage
isSpliceMessage(
message): message is { request: { id?: string | number | null; jsonrpc: “2.0”; method: string; params?: Record<string, unknown> | unknown[] }; type: SPLICE_WALLET_REQUEST } | { response: { id?: string | number | null; jsonrpc: “2.0”; result?: unknown; [key: string]: unknown } | { error: { code: number; data?: unknown; message: string }; id?: string | number | null; jsonrpc: “2.0”; [key: string]: unknown }; type: SPLICE_WALLET_RESPONSE } | { type: SPLICE_WALLET_EXT_READY } | { type: SPLICE_WALLET_EXT_ACK } | { type: SPLICE_WALLET_EXT_OPEN; url: string } | { sessionId: string; token: string; type: SPLICE_WALLET_IDP_AUTH_SUCCESS }
Defined in: packages/dapp/src/messages/schemas.ts:140
Type guard for SpliceMessage
Parameters
Section titled “Parameters”message
Section titled “message”unknown
Returns
Section titled “Returns”message is { request: { id?: string | number | null; jsonrpc: “2.0”; method: string; params?: Record<string, unknown> | unknown[] }; type: SPLICE_WALLET_REQUEST } | { response: { id?: string | number | null; jsonrpc: “2.0”; result?: unknown; [key: string]: unknown } | { error: { code: number; data?: unknown; message: string }; id?: string | number | null; jsonrpc: “2.0”; [key: string]: unknown }; type: SPLICE_WALLET_RESPONSE } | { type: SPLICE_WALLET_EXT_READY } | { type: SPLICE_WALLET_EXT_ACK } | { type: SPLICE_WALLET_EXT_OPEN; url: string } | { sessionId: string; token: string; type: SPLICE_WALLET_IDP_AUTH_SUCCESS }