@ckb-lumos/rpc
Advanced tools
Comparing version 0.0.0-canary-3763977-20240725033024 to 0.0.0-canary-3cf82d9-20240802041808
import { Base } from "./Base"; | ||
import { Method } from "./method"; | ||
import { JSONValue, Method } from "./method"; | ||
import { CKBComponents } from "./types/api"; | ||
@@ -42,3 +42,3 @@ import { formatter as paramsFormatter } from "./paramsFormatter"; | ||
addMethod: (options: CKBComponents.Method, config?: RPCConfig) => void; | ||
createBatchRequest: <N extends keyof Base, P extends (string | number | object)[], R = any[]>(params?: [method: N, ...rest: P][]) => [method: N, ...rest: P][] & { | ||
createBatchRequest: <N extends keyof Base, P extends JSONValue[], R = any[]>(params?: [method: N, ...rest: P][]) => [method: N, ...rest: P][] & { | ||
add: (n: N, ...p: P) => [method: N, ...rest: P][]; | ||
@@ -45,0 +45,0 @@ remove: (index: number) => [method: N, ...rest: P][]; |
import { CKBComponents } from "./types/api"; | ||
import { RPCConfig } from "./types/common"; | ||
type JSONPrimitive = string | number | boolean | null; | ||
type JSONArray = JSONValue[]; | ||
type JSONObject = { | ||
[key: string]: JSONValue; | ||
}; | ||
export type JSONValue = JSONPrimitive | JSONArray | JSONObject; | ||
export declare class Method { | ||
@@ -7,4 +13,4 @@ #private; | ||
constructor(node: CKBComponents.Node, options: CKBComponents.Method, config?: Partial<RPCConfig>); | ||
call: (...params: (string | number | object)[]) => Promise<any>; | ||
getPayload: (...params: (string | number | object)[]) => { | ||
call: (...params: JSONValue[]) => Promise<any>; | ||
getPayload: (...params: JSONValue[]) => { | ||
id: number; | ||
@@ -16,2 +22,3 @@ method: string; | ||
} | ||
export {}; | ||
//# sourceMappingURL=method.d.ts.map |
{ | ||
"name": "@ckb-lumos/rpc", | ||
"version": "0.0.0-canary-3763977-20240725033024", | ||
"version": "0.0.0-canary-3cf82d9-20240802041808", | ||
"description": "RPC module for CKB", | ||
@@ -29,4 +29,4 @@ "homepage": "https://github.com/ckb-js/lumos#readme", | ||
"dependencies": { | ||
"@ckb-lumos/base": "0.0.0-canary-3763977-20240725033024", | ||
"@ckb-lumos/bi": "0.0.0-canary-3763977-20240725033024", | ||
"@ckb-lumos/base": "0.0.0-canary-3cf82d9-20240802041808", | ||
"@ckb-lumos/bi": "0.0.0-canary-3cf82d9-20240802041808", | ||
"abort-controller": "^3.0.0", | ||
@@ -33,0 +33,0 @@ "cross-fetch": "^3.1.5" |
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
329538
3435
+ Added@ckb-lumos/base@0.0.0-canary-3cf82d9-20240802041808(transitive)
+ Added@ckb-lumos/bi@0.0.0-canary-3cf82d9-20240802041808(transitive)
+ Added@ckb-lumos/codec@0.0.0-canary-3cf82d9-20240802041808(transitive)
+ Added@ckb-lumos/toolkit@0.0.0-canary-3cf82d9-20240802041808(transitive)
- Removed@ckb-lumos/base@0.0.0-canary-3763977-20240725033024(transitive)
- Removed@ckb-lumos/bi@0.0.0-canary-3763977-20240725033024(transitive)
- Removed@ckb-lumos/codec@0.0.0-canary-3763977-20240725033024(transitive)
- Removed@ckb-lumos/toolkit@0.0.0-canary-3763977-20240725033024(transitive)