File tree 7 files changed +1384
-1285
lines changed
7 files changed +1384
-1285
lines changed Original file line number Diff line number Diff line change 1
1
name : ' Lint'
2
2
on : [pull_request]
3
3
4
+ concurrency :
5
+ group : ${{ github.workflow }}-${{ github.ref }}
6
+ cancel-in-progress : true
7
+
4
8
jobs :
5
9
eslint :
6
10
runs-on : ubuntu-latest
7
11
steps :
8
- - name : Cancel previous runs
9
-
10
- with :
11
- access_token : ${{ github.token }}
12
-
13
- - uses : actions/checkout@v2
12
+ - uses : actions/checkout@v3
14
13
15
- - name : Yarn install
16
- run : yarn install --immutable
14
+ - run : npm install
17
15
18
16
- uses : Maggi64/eslint-plus-action@master
19
17
with :
Original file line number Diff line number Diff line change 1
1
name : ' Unit tests'
2
2
on : [pull_request]
3
3
4
+ concurrency :
5
+ group : ${{ github.workflow }}-${{ github.ref }}
6
+ cancel-in-progress : true
7
+
4
8
jobs :
5
9
tests :
6
10
runs-on : ubuntu-latest
7
11
steps :
8
- - uses : actions/checkout@v2
12
+ - uses : actions/checkout@v3
9
13
- run : npm install
10
14
11
15
- name : Run tests
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @safe-global/safe-gateway-typescript-sdk" ,
3
- "version" : " 3.7.3 " ,
3
+ "version" : " 3.8.0 " ,
4
4
"main" : " dist/index.js" ,
5
5
"types" : " dist/index.d.ts" ,
6
6
"files" : [
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import type { MasterCopyReponse } from './types/master-copies'
22
22
import type { DecodedDataResponse } from './types/decoded-data'
23
23
import type { SafeMessage , SafeMessageListPage } from './types/safe-messages'
24
24
import { DEFAULT_BASE_URL } from './config'
25
+ import type { DelegateResponse , DelegatesRequest } from './types/delegates'
25
26
26
27
export * from './types/safe-info'
27
28
export * from './types/safe-apps'
@@ -343,4 +344,14 @@ export function confirmSafeMessage(
343
344
} )
344
345
}
345
346
347
+ /**
348
+ * Returns a list of delegates
349
+ */
350
+ export function getDelegates ( chainId : string , query : DelegatesRequest = { } ) : Promise < DelegateResponse > {
351
+ return getEndpoint ( baseUrl , '/v1/chains/{chainId}/delegates' , {
352
+ path : { chainId } ,
353
+ query,
354
+ } )
355
+ }
356
+
346
357
/* eslint-enable @typescript-eslint/explicit-module-boundary-types */
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import type {
26
26
SafeMessage ,
27
27
SafeMessageListPage ,
28
28
} from './safe-messages'
29
+ import type { DelegateResponse , DelegatesRequest } from './delegates'
29
30
30
31
export type Primitive = string | number | boolean | null
31
32
@@ -260,6 +261,15 @@ export interface paths extends PathRegistry {
260
261
}
261
262
}
262
263
}
264
+ '/v1/chains/{chainId}/delegates' : {
265
+ get : operations [ 'get_delegates' ]
266
+ parameters : {
267
+ path : {
268
+ chainId : string
269
+ }
270
+ query : DelegatesRequest
271
+ }
272
+ }
263
273
}
264
274
265
275
export interface operations {
@@ -666,4 +676,17 @@ export interface operations {
666
676
}
667
677
}
668
678
}
679
+ get_delegates : {
680
+ parameters : {
681
+ path : {
682
+ chainId : string
683
+ }
684
+ query : DelegatesRequest
685
+ }
686
+ responses : {
687
+ 200 : {
688
+ schema : DelegateResponse
689
+ }
690
+ }
691
+ }
669
692
}
Original file line number Diff line number Diff line change
1
+ import type { Page } from './common'
2
+
3
+ export type Delegate = {
4
+ safe ?: string
5
+ delegate : string
6
+ delegator : string
7
+ label : string
8
+ }
9
+
10
+ export type DelegateResponse = Page < Delegate >
11
+
12
+ export type DelegatesRequest = {
13
+ safe ?: string
14
+ delegate ?: string
15
+ delegator ?: string
16
+ label ?: string
17
+ }
18
+
19
+ export type AddDelegateRequest = {
20
+ safe ?: string
21
+ delegate : string
22
+ delegator : string
23
+ signature : string
24
+ label : string
25
+ }
26
+
27
+ export type DeleteDelegateRequest = {
28
+ delegate : string
29
+ delegator : string
30
+ signature : string
31
+ }
32
+
33
+ export type DeleteSafeDelegateRequest = {
34
+ safe : string
35
+ delegate : string
36
+ signature : string
37
+ }
You can’t perform that action at this time.
0 commit comments