@show-karma/karma-gap-sdk 0.3.26 → 0.3.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,7 @@ export declare class GapIndexerClient extends Fetcher {
13
13
  attestationsTo(schemaName: TSchemaName, recipient: `0x${string}`): Promise<IAttestation[]>;
14
14
  communities(search?: string): Promise<Community[]>;
15
15
  communitiesOf(address: Hex, withGrants: boolean): Promise<Community[]>;
16
+ adminOf(address: Hex): Promise<Community[]>;
16
17
  communitiesAdminOf(address: Hex, withGrants: boolean): Promise<Community[]>;
17
18
  communitiesByIds(uids: `0x${string}`[]): Promise<Community[]>;
18
19
  communityBySlug(slug: string): Promise<Community>;
@@ -67,6 +67,10 @@ class GapIndexerClient extends Fetcher_1.Fetcher {
67
67
  const { data } = await this.apiClient.communitiesOf(address, withGrants);
68
68
  return entities_1.Community.from(data, this.gap.network);
69
69
  }
70
+ async adminOf(address) {
71
+ const { data } = await this.apiClient.adminOf(address);
72
+ return entities_1.Community.from(data, this.gap.network);
73
+ }
70
74
  async communitiesAdminOf(address, withGrants) {
71
75
  const { data } = await this.client.get(Endpoints.grantees.communitiesAdmin(address, withGrants));
72
76
  return entities_1.Community.from(data, this.gap.network);
@@ -10,6 +10,7 @@ export declare class GapIndexerApi extends AxiosGQL {
10
10
  */
11
11
  communities(search?: string): Promise<import("axios").AxiosResponse<ICommunityResponse[], any>>;
12
12
  communitiesOf(address: Hex, withGrants: boolean): Promise<import("axios").AxiosResponse<ICommunityResponse[], any>>;
13
+ adminOf(address: Hex): Promise<import("axios").AxiosResponse<ICommunityResponse[], any>>;
13
14
  communityBySlug(slug: string): Promise<import("axios").AxiosResponse<ICommunityResponse, any>>;
14
15
  /**
15
16
  * Project
@@ -18,6 +18,7 @@ const Endpoints = {
18
18
  grants: (address) => `/grantees/${address}/grants`,
19
19
  projects: (address) => `/grantees/${address}/projects`,
20
20
  communities: (address, withGrants) => `/grantees/${address}/communities${withGrants ? "?withGrants=true" : ""}`,
21
+ adminOf: (address) => `/grantees/${address}/communities/admin`,
21
22
  },
22
23
  grants: {
23
24
  all: () => "/grants",
@@ -72,6 +73,10 @@ class GapIndexerApi extends AxiosGQL_1.AxiosGQL {
72
73
  const response = await this.client.get(Endpoints.grantees.communities(address, withGrants));
73
74
  return response;
74
75
  }
76
+ async adminOf(address) {
77
+ const response = await this.client.get(Endpoints.grantees.adminOf(address));
78
+ return response;
79
+ }
75
80
  async communityBySlug(slug) {
76
81
  const response = await this.client.get(Endpoints.communities.byUidOrSlug(slug));
77
82
  return response;
package/core/consts.d.ts CHANGED
@@ -10,6 +10,7 @@ export declare const chainIdToNetwork: {
10
10
  10: string;
11
11
  11155111: string;
12
12
  84532: string;
13
+ 42220: string;
13
14
  };
14
15
  export declare const nullRef = "0x0000000000000000000000000000000000000000000000000000000000000000";
15
16
  export declare const nullResolver = "0x0000000000000000000000000000000000000000";
package/core/consts.js CHANGED
@@ -17,7 +17,8 @@ exports.chainIdToNetwork = {
17
17
  42161: 'arbitrum',
18
18
  10: 'optimism',
19
19
  11155111: 'sepolia',
20
- 84532: 'base-sepolia'
20
+ 84532: 'base-sepolia',
21
+ 42220: 'celo'
21
22
  };
22
23
  exports.nullRef = "0x0000000000000000000000000000000000000000000000000000000000000000";
23
24
  // TODO: Remove null resolver and change usage to zero address
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.26",
6
+ "version": "0.3.28",
7
7
  "description": "Simple and easy interface between EAS and Karma GAP.",
8
8
  "main": "./index.js",
9
9
  "author": "KarmaHQ",