@@ -57,6 +57,9 @@ import {
57
57
FireFlyContractInvokeRequest ,
58
58
FireFlyContractQueryRequest ,
59
59
FireFlyDataRequest ,
60
+ FireFlyIdentityFilter ,
61
+ FireFlyIdentityResponse ,
62
+ FireFlyIdentitiesResponse ,
60
63
} from './interfaces' ;
61
64
import { FireFlyWebSocket , FireFlyWebSocketCallback } from './websocket' ;
62
65
import HttpBase , { mapConfig } from './http' ;
@@ -69,23 +72,32 @@ export default class FireFly extends HttpBase {
69
72
return response . data ;
70
73
}
71
74
75
+ async getIdentities (
76
+ filter ?: FireFlyIdentityFilter ,
77
+ options ?: FireFlyGetOptions ,
78
+ ) : Promise < FireFlyIdentitiesResponse > {
79
+ return this . getMany < FireFlyIdentitiesResponse > ( '/identities' , filter , options ) ;
80
+ }
81
+
82
+ async getIdentity (
83
+ nameOrId : string ,
84
+ options ?: FireFlyGetOptions ,
85
+ ) : Promise < FireFlyIdentityResponse | undefined > {
86
+ return this . getOne < FireFlyIdentityResponse > ( `/identities/${ nameOrId } ` , options ) ;
87
+ }
88
+
72
89
async getOrganizations (
73
90
filter ?: FireFlyOrganizationFilter ,
74
91
options ?: FireFlyGetOptions ,
75
92
) : Promise < FireFlyOrganizationResponse [ ] > {
76
- return this . getMany < FireFlyOrganizationResponse [ ] > (
77
- '/network/organizations' ,
78
- filter ,
79
- options ,
80
- true ,
81
- ) ;
93
+ return this . getMany < FireFlyOrganizationResponse [ ] > ( '/network/organizations' , filter , options ) ;
82
94
}
83
95
84
96
async getNodes (
85
97
filter ?: FireFlyNodeFilter ,
86
98
options ?: FireFlyGetOptions ,
87
99
) : Promise < FireFlyNodeResponse [ ] > {
88
- return this . getMany < FireFlyNodeResponse [ ] > ( '/network/nodes' , filter , options , true ) ;
100
+ return this . getMany < FireFlyNodeResponse [ ] > ( '/network/nodes' , filter , options ) ;
89
101
}
90
102
91
103
async getVerifiers (
@@ -98,7 +110,6 @@ export default class FireFly extends HttpBase {
98
110
`/namespaces/${ namespace } /verifiers` ,
99
111
filter ,
100
112
options ,
101
- true ,
102
113
) ;
103
114
}
104
115
0 commit comments