Skip to content

Commit 8be4165

Browse files
committed
Add getGroup()
Signed-off-by: Andrew Richardson <[email protected]>
1 parent c9d8a5f commit 8be4165

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

lib/firefly.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ import {
6262
FireFlyIdentitiesResponse,
6363
FireFlyDataFilter,
6464
FireFlyIdentityRequest,
65+
FireFlyGroupResponse,
6566
} from './interfaces';
6667
import { FireFlyWebSocket, FireFlyWebSocketCallback } from './websocket';
6768
import HttpBase, { mapConfig } from './http';
@@ -241,6 +242,13 @@ export default class FireFly extends HttpBase {
241242
return this.createOne<FireFlyMessageResponse>(url, message, options);
242243
}
243244

245+
async getGroup(
246+
hash: string,
247+
options?: FireFlyGetOptions,
248+
): Promise<FireFlyGroupResponse | undefined> {
249+
return this.getOne<FireFlyGroupResponse>(`/groups/${hash}`, options);
250+
}
251+
244252
async createTokenPool(
245253
pool: FireFlyTokenPoolRequest,
246254
options?: FireFlyCreateOptions,

lib/interfaces.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ export type FireFlyMessageResponse = Required<
175175
export type FireFlyBatchResponse = Required<
176176
operations['getBatchByID']['responses']['200']['content']['application/json']
177177
>;
178+
export type FireFlyGroupResponse = Required<
179+
operations['getGroupByHash']['responses']['200']['content']['application/json']
180+
>;
178181

179182
export interface FireFlyPrivateSendOptions extends FireFlyCreateOptions {
180183
requestReply?: boolean;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hyperledger/firefly-sdk",
3-
"version": "1.1.5",
3+
"version": "1.1.6",
44
"description": "Client SDK for Hyperledger FireFly",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)