@@ -56,6 +56,10 @@ import {
56
56
FireFlyContractAPIQueryRequest ,
57
57
FireFlyContractInvokeRequest ,
58
58
FireFlyContractQueryRequest ,
59
+ FireFlyDataRequest ,
60
+ FireFlyIdentityFilter ,
61
+ FireFlyIdentityResponse ,
62
+ FireFlyIdentitiesResponse ,
59
63
} from './interfaces' ;
60
64
import { FireFlyWebSocket , FireFlyWebSocketCallback } from './websocket' ;
61
65
import HttpBase , { mapConfig } from './http' ;
@@ -68,23 +72,32 @@ export default class FireFly extends HttpBase {
68
72
return response . data ;
69
73
}
70
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
+
71
89
async getOrganizations (
72
90
filter ?: FireFlyOrganizationFilter ,
73
91
options ?: FireFlyGetOptions ,
74
92
) : Promise < FireFlyOrganizationResponse [ ] > {
75
- return this . getMany < FireFlyOrganizationResponse [ ] > (
76
- '/network/organizations' ,
77
- filter ,
78
- options ,
79
- true ,
80
- ) ;
93
+ return this . getMany < FireFlyOrganizationResponse [ ] > ( '/network/organizations' , filter , options ) ;
81
94
}
82
95
83
96
async getNodes (
84
97
filter ?: FireFlyNodeFilter ,
85
98
options ?: FireFlyGetOptions ,
86
99
) : Promise < FireFlyNodeResponse [ ] > {
87
- return this . getMany < FireFlyNodeResponse [ ] > ( '/network/nodes' , filter , options , true ) ;
100
+ return this . getMany < FireFlyNodeResponse [ ] > ( '/network/nodes' , filter , options ) ;
88
101
}
89
102
90
103
async getVerifiers (
@@ -97,7 +110,6 @@ export default class FireFly extends HttpBase {
97
110
`/namespaces/${ namespace } /verifiers` ,
98
111
filter ,
99
112
options ,
100
- true ,
101
113
) ;
102
114
}
103
115
@@ -152,6 +164,13 @@ export default class FireFly extends HttpBase {
152
164
return response . data ;
153
165
}
154
166
167
+ async uploadData (
168
+ data : FireFlyDataRequest ,
169
+ options ?: FireFlyCreateOptions ,
170
+ ) : Promise < FireFlyDataResponse > {
171
+ return this . createOne < FireFlyDataResponse > ( '/data' , data , options ) ;
172
+ }
173
+
155
174
async uploadDataBlob (
156
175
blob : string | Buffer | Readable ,
157
176
filename : string ,
0 commit comments