File tree Expand file tree Collapse file tree 7 files changed +1384
-1285
lines changed
Expand file tree Collapse file tree 7 files changed +1384
-1285
lines changed Original file line number Diff line number Diff line change 11name : ' Lint'
22on : [pull_request]
33
4+ concurrency :
5+ group : ${{ github.workflow }}-${{ github.ref }}
6+ cancel-in-progress : true
7+
48jobs :
59 eslint :
610 runs-on : ubuntu-latest
711 steps :
8- - name : Cancel previous runs
9- uses : styfle/cancel-workflow-action@0.8.0
10- with :
11- access_token : ${{ github.token }}
12-
13- - uses : actions/checkout@v2
12+ - uses : actions/checkout@v3
1413
15- - name : Yarn install
16- run : yarn install --immutable
14+ - run : npm install
1715
1816 - uses : Maggi64/eslint-plus-action@master
1917 with :
Original file line number Diff line number Diff line change 11name : ' Unit tests'
22on : [pull_request]
33
4+ concurrency :
5+ group : ${{ github.workflow }}-${{ github.ref }}
6+ cancel-in-progress : true
7+
48jobs :
59 tests :
610 runs-on : ubuntu-latest
711 steps :
8- - uses : actions/checkout@v2
12+ - uses : actions/checkout@v3
913 - run : npm install
1014
1115 - name : Run tests
Original file line number Diff line number Diff line change 11{
22 "name" : " @safe-global/safe-gateway-typescript-sdk" ,
3- "version" : " 3.7.3 " ,
3+ "version" : " 3.8.0 " ,
44 "main" : " dist/index.js" ,
55 "types" : " dist/index.d.ts" ,
66 "files" : [
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import type { MasterCopyReponse } from './types/master-copies'
2222import type { DecodedDataResponse } from './types/decoded-data'
2323import type { SafeMessage , SafeMessageListPage } from './types/safe-messages'
2424import { DEFAULT_BASE_URL } from './config'
25+ import type { DelegateResponse , DelegatesRequest } from './types/delegates'
2526
2627export * from './types/safe-info'
2728export * from './types/safe-apps'
@@ -343,4 +344,14 @@ export function confirmSafeMessage(
343344 } )
344345}
345346
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+
346357/* eslint-enable @typescript-eslint/explicit-module-boundary-types */
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import type {
2626 SafeMessage ,
2727 SafeMessageListPage ,
2828} from './safe-messages'
29+ import type { DelegateResponse , DelegatesRequest } from './delegates'
2930
3031export type Primitive = string | number | boolean | null
3132
@@ -260,6 +261,15 @@ export interface paths extends PathRegistry {
260261 }
261262 }
262263 }
264+ '/v1/chains/{chainId}/delegates' : {
265+ get : operations [ 'get_delegates' ]
266+ parameters : {
267+ path : {
268+ chainId : string
269+ }
270+ query : DelegatesRequest
271+ }
272+ }
263273}
264274
265275export interface operations {
@@ -666,4 +676,17 @@ export interface operations {
666676 }
667677 }
668678 }
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+ }
669692}
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