@solana/rpc-spec-types
Advanced tools
Comparing version 2.0.0-preview.1.20240312180856.34ecac6fce2dc8dae2685c864fe844c36a9af6c7 to 2.0.0-preview.1.20240312181104.52a5d3db60e702ccf77b4d17b8a3fd388e6e8584
@@ -1,16 +0,1 @@ | ||
// src/rpc-error.ts | ||
var RpcError = class extends Error { | ||
code; | ||
data; | ||
constructor(details) { | ||
super(`JSON-RPC 2.0 error (${details.code}): ${details.message}`); | ||
Error.captureStackTrace(this, this.constructor); | ||
this.code = details.code; | ||
this.data = details.data; | ||
} | ||
get name() { | ||
return "RpcError"; | ||
} | ||
}; | ||
// src/rpc-message.ts | ||
@@ -32,4 +17,4 @@ var _nextMessageId = 0; | ||
export { RpcError, createRpcMessage }; | ||
export { createRpcMessage }; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=index.browser.js.map |
@@ -1,16 +0,1 @@ | ||
// src/rpc-error.ts | ||
var RpcError = class extends Error { | ||
code; | ||
data; | ||
constructor(details) { | ||
super(`JSON-RPC 2.0 error (${details.code}): ${details.message}`); | ||
Error.captureStackTrace(this, this.constructor); | ||
this.code = details.code; | ||
this.data = details.data; | ||
} | ||
get name() { | ||
return "RpcError"; | ||
} | ||
}; | ||
// src/rpc-message.ts | ||
@@ -32,4 +17,4 @@ var _nextMessageId = 0; | ||
export { RpcError, createRpcMessage }; | ||
export { createRpcMessage }; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=index.native.js.map |
@@ -1,16 +0,1 @@ | ||
// src/rpc-error.ts | ||
var RpcError = class extends Error { | ||
code; | ||
data; | ||
constructor(details) { | ||
super(`JSON-RPC 2.0 error (${details.code}): ${details.message}`); | ||
Error.captureStackTrace(this, this.constructor); | ||
this.code = details.code; | ||
this.data = details.data; | ||
} | ||
get name() { | ||
return "RpcError"; | ||
} | ||
}; | ||
// src/rpc-message.ts | ||
@@ -32,4 +17,4 @@ var _nextMessageId = 0; | ||
export { RpcError, createRpcMessage }; | ||
export { createRpcMessage }; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=index.node.js.map |
export * from './overloads.js'; | ||
export * from './rpc-error.js'; | ||
export * from './rpc-message.js'; | ||
@@ -4,0 +3,0 @@ export * from './rpc-response.js'; |
@@ -1,5 +0,9 @@ | ||
import { RpcErrorResponse } from './rpc-error.js'; | ||
interface IHasIdentifier { | ||
readonly id: number; | ||
} | ||
type RpcErrorResponse = Readonly<{ | ||
code: number; | ||
data?: unknown; | ||
message: string; | ||
}>; | ||
export type RpcResponse<TResponse> = IHasIdentifier & Readonly<{ | ||
@@ -6,0 +10,0 @@ error: RpcErrorResponse; |
{ | ||
"name": "@solana/rpc-spec-types", | ||
"version": "2.0.0-preview.1.20240312180856.34ecac6fce2dc8dae2685c864fe844c36a9af6c7", | ||
"version": "2.0.0-preview.1.20240312181104.52a5d3db60e702ccf77b4d17b8a3fd388e6e8584", | ||
"description": "Shared generic JSON RPC specifications", | ||
@@ -5,0 +5,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
63994
23
769