@l2-technology/sensei-client
Advanced tools
Comparing version 0.1.14 to 0.1.15
{ | ||
"name": "@l2-technology/sensei-client", | ||
"version": "0.1.14", | ||
"version": "0.1.15", | ||
"description": "A javascript client for the Sensei HTTP API", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -40,2 +40,3 @@ export interface SenseiClientConfig { | ||
} | ||
export interface CreateNodeResponse { | ||
@@ -85,2 +86,3 @@ id: string; | ||
} | ||
export interface CreateNodeParams { | ||
@@ -239,2 +241,3 @@ username: string; | ||
createNode({ username, alias, passphrase, start }: CreateNodeParams): Promise<CreateNodeResponse>; | ||
batchCreateNode(nodes: CreateNodeParams[]): Promise<CreateNodeResponse[]>; | ||
adminStartNode(pubkey: string, passphrase: string): Promise<NodeAuthInfo>; | ||
@@ -241,0 +244,0 @@ adminStopNode(pubkey: string): Promise<void>; |
@@ -157,2 +157,10 @@ class SenseiClient { | ||
async batchCreateNode(nodes) { | ||
let response = await this.post(`${this.basePath}/v1/nodes/batch`, { | ||
nodes, | ||
}); | ||
return response.nodes; | ||
} | ||
async createNode({ username, alias, passphrase, start }) { | ||
@@ -159,0 +167,0 @@ let response = await this.post(`${this.basePath}/v1/nodes`, { |
22239
666