keymaster-api-protocol 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,6 +33,7 @@ export declare const MethodEventsSubscribe = "events.subscribe";
33
33
  export declare const MethodFilesBrowse = "files.browse";
34
34
  export declare const MethodFilesList = "files.list";
35
35
  export declare const MethodInfoGet = "info.get";
36
+ export declare const MethodPluginsInspect = "plugins.inspect";
36
37
  export declare const MethodPricingBatch = "pricing.batch";
37
38
  export declare const MethodPricingClearFile = "pricing.clearFile";
38
39
  export declare const MethodPricingSetDefaults = "pricing.setDefaults";
@@ -35,6 +35,7 @@ export const MethodEventsSubscribe = "events.subscribe"; // params=EventsSubscri
35
35
  export const MethodFilesBrowse = "files.browse"; // params=BrowseRequest result=BrowseView timeout=short
36
36
  export const MethodFilesList = "files.list"; // params=null result=FilesView timeout=short
37
37
  export const MethodInfoGet = "info.get"; // params=null result=Info timeout=short
38
+ export const MethodPluginsInspect = "plugins.inspect"; // params=null result=PluginsInspectView timeout=short
38
39
  export const MethodPricingBatch = "pricing.batch"; // params=PricingBatchRequest result=PricingBatchResponse timeout=short
39
40
  export const MethodPricingClearFile = "pricing.clearFile"; // params=PricingClearRequest result=PricingClearResponse timeout=short
40
41
  export const MethodPricingSetDefaults = "pricing.setDefaults"; // params=PricingDefaultsRequest result=PricingDefaultsResponse timeout=short
@@ -92,6 +93,7 @@ export const MethodTimeout = {
92
93
  "files.browse": "short",
93
94
  "files.list": "short",
94
95
  "info.get": "short",
96
+ "plugins.inspect": "short",
95
97
  "pricing.batch": "short",
96
98
  "pricing.clearFile": "short",
97
99
  "pricing.setDefaults": "short",
@@ -150,6 +152,7 @@ export const MethodParams = {
150
152
  "files.browse": "BrowseRequest",
151
153
  "files.list": "null",
152
154
  "info.get": "null",
155
+ "plugins.inspect": "null",
153
156
  "pricing.batch": "PricingBatchRequest",
154
157
  "pricing.clearFile": "PricingClearRequest",
155
158
  "pricing.setDefaults": "PricingDefaultsRequest",
@@ -208,6 +211,7 @@ export const MethodResult = {
208
211
  "files.browse": "BrowseView",
209
212
  "files.list": "FilesView",
210
213
  "info.get": "Info",
214
+ "plugins.inspect": "PluginsInspectView",
211
215
  "pricing.batch": "PricingBatchResponse",
212
216
  "pricing.clearFile": "PricingClearResponse",
213
217
  "pricing.setDefaults": "PricingDefaultsResponse",
@@ -226,6 +226,8 @@ export interface ConnectDirectoryURLEntry {
226
226
  }
227
227
  export interface ConnectDirectoryView {
228
228
  entries: ConnectDirectoryEntry[];
229
+ favorites?: Record<string, unknown>;
230
+ knownApplications?: Record<string, unknown>;
229
231
  marketError?: string;
230
232
  pending: ConnectDirectoryPendingEntry[];
231
233
  }
@@ -312,6 +314,23 @@ export interface JsonValue {
312
314
  export interface Ok {
313
315
  ok: boolean;
314
316
  }
317
+ export interface PluginCatalogEntry {
318
+ methods: string[];
319
+ pluginId: string;
320
+ unitId: string;
321
+ }
322
+ export interface PluginUnitView {
323
+ instanceId: string;
324
+ pluginId: string;
325
+ unitId: string;
326
+ }
327
+ export interface PluginsInspectView {
328
+ active: boolean;
329
+ catalog: PluginCatalogEntry[];
330
+ instanceId: string;
331
+ runtimeInstanceId: string;
332
+ units: PluginUnitView[];
333
+ }
315
334
  export interface PricingBatchRequest {
316
335
  blockPrice: string;
317
336
  mode: string;
@@ -574,7 +593,6 @@ export interface WalletCreateResponse {
574
593
  export interface WalletImportRequest {
575
594
  keyMaterial: string;
576
595
  network: string;
577
- password: string;
578
596
  }
579
597
  export interface WalletImportResponse {
580
598
  ok: boolean;
package/dist/ws.d.ts CHANGED
@@ -94,7 +94,7 @@ export declare class KmWSClient {
94
94
  connectionPause(authorizationId: string): Promise<unknown>;
95
95
  connectExec(params: unknown): Promise<unknown>;
96
96
  walletCreate(password: string, network: string): Promise<unknown>;
97
- walletImport(password: string, keyMaterial: string, network: "test" | "main"): Promise<unknown>;
97
+ walletImport(keyMaterial: string, network: "test" | "main"): Promise<unknown>;
98
98
  private onMessage;
99
99
  private failAll;
100
100
  }
package/dist/ws.js CHANGED
@@ -504,8 +504,8 @@ export class KmWSClient {
504
504
  async walletCreate(password, network) {
505
505
  return this.call(undefined, "wallet.create", { password, network });
506
506
  }
507
- async walletImport(password, keyMaterial, network) {
508
- return this.call(undefined, "wallet.import", { password, keyMaterial, network });
507
+ async walletImport(keyMaterial, network) {
508
+ return this.call(undefined, "wallet.import", { keyMaterial, network });
509
509
  }
510
510
  onMessage(ev) {
511
511
  const data = ev.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keymaster-api-protocol",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Keymaster 后台业务 API v1 契约 SDK(DTO 与 WebSocket/进程内客户端,Go/TS 同契约)",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",