File tree Expand file tree Collapse file tree 3 files changed +24
-15
lines changed Expand file tree Collapse file tree 3 files changed +24
-15
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @initia/initia.js" ,
3
- "version" : " 0.2.3 " ,
3
+ "version" : " 0.2.4 " ,
4
4
"description" : " The JavaScript SDK for Initia" ,
5
5
"license" : " MIT" ,
6
6
"author" : " InitiaLabs" ,
Original file line number Diff line number Diff line change @@ -9,13 +9,17 @@ import {
9
9
IbcClientParams ,
10
10
} from '../../../core' ;
11
11
12
- export interface Status {
13
- status : string ;
12
+ export interface ClientState {
13
+ client_state : any ;
14
+ proof : string | null ;
15
+ proof_height : Height ;
14
16
}
15
17
16
- export namespace Status {
18
+ export namespace ClientState {
17
19
export interface Data {
18
- status : string ;
20
+ client_state : any ;
21
+ proof : string | null ;
22
+ proof_height : Height . Data ;
19
23
}
20
24
}
21
25
@@ -160,12 +164,17 @@ export class IbcAPI extends BaseAPI {
160
164
public async clientState (
161
165
client_id : string ,
162
166
params : APIParams = { }
163
- ) : Promise < IdentifiedClientState > {
167
+ ) : Promise < ClientState > {
164
168
return this . c
165
- . get < {
166
- client_state : IdentifiedClientState . Data ;
167
- } > ( `/ibc/core/client/v1/client_states/${ client_id } ` , params )
168
- . then ( d => IdentifiedClientState . fromData ( d . client_state ) ) ;
169
+ . get < ClientState . Data > (
170
+ `/ibc/core/client/v1/client_states/${ client_id } ` ,
171
+ params
172
+ )
173
+ . then ( d => ( {
174
+ client_state : d . client_state ,
175
+ proof : d . proof ,
176
+ proof_height : Height . fromData ( d . proof_height ) ,
177
+ } ) ) ;
169
178
}
170
179
171
180
/**
@@ -176,12 +185,12 @@ export class IbcAPI extends BaseAPI {
176
185
public async clientStatus (
177
186
client_id : string ,
178
187
params : APIParams = { }
179
- ) : Promise < Status > {
188
+ ) : Promise < string > {
180
189
return this . c
181
190
. get < {
182
- status : Status . Data ;
191
+ status : string ;
183
192
} > ( `/ibc/core/client/v1/client_status/${ client_id } ` , params )
184
- . then ( ) ;
193
+ . then ( d => d . status ) ;
185
194
}
186
195
187
196
/**
You can’t perform that action at this time.
0 commit comments