@show-karma/karma-gap-sdk 0.3.31 → 0.3.32

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.
@@ -1,7 +1,7 @@
1
- import { Hex, IAttestation, JSONStr, MultiAttestData, SignerOrProvider, TNetwork } from '../types';
2
- import { Schema } from './Schema';
3
- import { SchemaItem, SchemaValue } from '@ethereum-attestation-service/eas-sdk';
4
- import { GapSchema } from './GapSchema';
1
+ import { Hex, IAttestation, JSONStr, MultiAttestData, SignerOrProvider, TNetwork } from "../types";
2
+ import { Schema } from "./Schema";
3
+ import { SchemaItem, SchemaValue } from "@ethereum-attestation-service/eas-sdk";
4
+ import { GapSchema } from "./GapSchema";
5
5
  export interface AttestationArgs<T = unknown, S extends Schema = Schema> {
6
6
  data: T | string;
7
7
  schema: S;
@@ -88,7 +88,7 @@ export declare class Attestation<T = unknown, S extends Schema = GapSchema> impl
88
88
  * @param signer
89
89
  * @returns
90
90
  */
91
- revoke(signer: SignerOrProvider): Promise<any>;
91
+ revoke(signer: SignerOrProvider, callback?: Function): Promise<void>;
92
92
  /**
93
93
  * Attests the data using the specified signer and schema.
94
94
  * @param signer - The signer or provider to use for attestation.
@@ -72,7 +72,7 @@ class Attestation {
72
72
  setValues(values) {
73
73
  const isJsonSchema = this.schema.isJsonSchema();
74
74
  if (isJsonSchema)
75
- this.schema.setValue('json', JSON.stringify(values));
75
+ this.schema.setValue("json", JSON.stringify(values));
76
76
  this._data = values;
77
77
  Object.entries(values).forEach(([key, value]) => {
78
78
  this[key] = value;
@@ -92,7 +92,7 @@ class Attestation {
92
92
  * @returns
93
93
  */
94
94
  fromDecodedSchema(data) {
95
- return typeof data === 'string'
95
+ return typeof data === "string"
96
96
  ? Attestation.fromDecodedSchema(data)
97
97
  : data;
98
98
  }
@@ -102,8 +102,9 @@ class Attestation {
102
102
  * @param signer
103
103
  * @returns
104
104
  */
105
- revoke(signer) {
105
+ async revoke(signer, callback) {
106
106
  try {
107
+ callback?.("preparing");
107
108
  return GapContract_1.GapContract.multiRevoke(signer, [
108
109
  {
109
110
  data: [
@@ -114,11 +115,13 @@ class Attestation {
114
115
  ],
115
116
  schema: this.schema.uid,
116
117
  },
117
- ]);
118
+ ]).then(() => {
119
+ callback?.("confirmed");
120
+ });
118
121
  }
119
122
  catch (error) {
120
123
  console.error(error);
121
- throw new SchemaError_1.SchemaError('REVOKE_ERROR', 'Error revoking attestation.');
124
+ throw new SchemaError_1.SchemaError("REVOKE_ERROR", "Error revoking attestation.");
122
125
  }
123
126
  }
124
127
  /**
@@ -129,7 +132,9 @@ class Attestation {
129
132
  * @throws An `AttestationError` if an error occurs during attestation.
130
133
  */
131
134
  async attest(signer, ...args) {
132
- const callback = typeof args[args.length - 1] === 'function' ? args.pop() : null;
135
+ const callback = typeof args[args.length - 1] === "function"
136
+ ? args.pop()
137
+ : null;
133
138
  console.log(`Attesting ${this.schema.name}`);
134
139
  try {
135
140
  const uid = await this.schema.attest({
@@ -137,14 +142,14 @@ class Attestation {
137
142
  to: this.recipient,
138
143
  refUID: this.refUID,
139
144
  signer,
140
- callback: callback
145
+ callback: callback,
141
146
  });
142
147
  this._uid = uid;
143
148
  console.log(`Attested ${this.schema.name} with UID ${uid}`);
144
149
  }
145
150
  catch (error) {
146
151
  console.error(error);
147
- throw new SchemaError_1.AttestationError('ATTEST_ERROR', 'Error during attestation.');
152
+ throw new SchemaError_1.AttestationError("ATTEST_ERROR", "Error during attestation.");
148
153
  }
149
154
  }
150
155
  /**
@@ -194,12 +199,12 @@ class Attestation {
194
199
  const { remoteClient } = GAP_1.GAP;
195
200
  if (this.type) {
196
201
  this._data.type = this.type;
197
- this.schema.setValue('json', JSON.stringify(this._data));
202
+ this.schema.setValue("json", JSON.stringify(this._data));
198
203
  }
199
204
  if (remoteClient && JSON.stringify(this._data)?.length > 1500) {
200
205
  const cid = await remoteClient.save(this._data, this.schema.name);
201
206
  const encodedData = remoteClient.encode(cid);
202
- this.schema.setValue('json', JSON.stringify(encodedData));
207
+ this.schema.setValue("json", JSON.stringify(encodedData));
203
208
  }
204
209
  }
205
210
  const payload = (encode = true) => ({
@@ -234,17 +239,17 @@ class Attestation {
234
239
  const parsed = JSON.parse(data);
235
240
  if (data.length < 2 && !/\{.*\}/gim.test(data))
236
241
  return {};
237
- if (parsed.length === 1 && parsed[0].name === 'json') {
242
+ if (parsed.length === 1 && parsed[0].name === "json") {
238
243
  const { value } = parsed[0];
239
- return (typeof value.value === 'string'
244
+ return (typeof value.value === "string"
240
245
  ? JSON.parse(value.value)
241
246
  : value.value);
242
247
  }
243
248
  if (parsed && Array.isArray(parsed)) {
244
249
  return parsed.reduce((acc, curr) => {
245
250
  const { value } = curr.value;
246
- if (curr.type.includes('uint')) {
247
- acc[curr.name] = ['string', 'bigint'].includes(typeof value)
251
+ if (curr.type.includes("uint")) {
252
+ acc[curr.name] = ["string", "bigint"].includes(typeof value)
248
253
  ? BigInt(value)
249
254
  : Number(value);
250
255
  }
@@ -253,11 +258,11 @@ class Attestation {
253
258
  return acc;
254
259
  }, {});
255
260
  }
256
- throw new SchemaError_1.SchemaError('INVALID_DATA', 'Data must be a valid JSON array string.');
261
+ throw new SchemaError_1.SchemaError("INVALID_DATA", "Data must be a valid JSON array string.");
257
262
  }
258
263
  catch (error) {
259
264
  console.error(error);
260
- throw new SchemaError_1.SchemaError('INVALID_DATA', 'Data must be a valid JSON string.');
265
+ throw new SchemaError_1.SchemaError("INVALID_DATA", "Data must be a valid JSON string.");
261
266
  }
262
267
  }
263
268
  /**
@@ -289,10 +294,10 @@ class Attestation {
289
294
  assert(args, strict = false) {
290
295
  const { schema, uid } = args;
291
296
  if (!schema || !(schema instanceof Schema_1.Schema)) {
292
- throw new SchemaError_1.SchemaError('MISSING_FIELD', 'Schema must be an array.');
297
+ throw new SchemaError_1.SchemaError("MISSING_FIELD", "Schema must be an array.");
293
298
  }
294
299
  if (!uid) {
295
- throw new SchemaError_1.SchemaError('MISSING_FIELD', 'Schema uid is required');
300
+ throw new SchemaError_1.SchemaError("MISSING_FIELD", "Schema uid is required");
296
301
  }
297
302
  if (strict)
298
303
  Schema_1.Schema.validate(this.schema.gap.network);
@@ -323,7 +328,7 @@ class Attestation {
323
328
  recipient: to,
324
329
  attester: from,
325
330
  schema,
326
- uid: '0x0',
331
+ uid: "0x0",
327
332
  createdAt: new Date(),
328
333
  chainID: consts_1.Networks[schema.gap.network].chainId,
329
334
  });
@@ -140,23 +140,21 @@ export declare abstract class Schema<T extends string = string> implements Schem
140
140
  * @param {Object} param0 - An object containing the schema and other optional settings.
141
141
  * @returns {Object} An object containing the attestation results, including the CID if 'ipfsKey' is enabled.
142
142
  */
143
- attest<T>({ data, to, signer, refUID, callback }: AttestArgs<T> & {
144
- callback?: (status: string) => void;
145
- }): Promise<Hex>;
143
+ attest<T>({ data, to, signer, refUID, callback, }: AttestArgs<T>): Promise<Hex>;
146
144
  /**
147
145
  * Bulk attest a set of attestations.
148
146
  * @param signer
149
147
  * @param entities
150
148
  * @returns
151
149
  */
152
- multiAttest(signer: SignerOrProvider, entities?: Attestation[], callback?: Function): Promise<string[]>;
150
+ multiAttest(signer: SignerOrProvider, entities?: Attestation[], callback?: Function): Promise<void>;
153
151
  /**
154
152
  * Revokes a set of attestations by their UIDs.
155
153
  * @param signer
156
154
  * @param uids
157
155
  * @returns
158
156
  */
159
- multiRevoke(signer: SignerOrProvider, toRevoke: MultiRevokeArgs[]): Promise<void>;
157
+ multiRevoke(signer: SignerOrProvider, toRevoke: MultiRevokeArgs[], callback?: Function): Promise<void>;
160
158
  static exists(name: string, network: TNetwork): Schema<string>;
161
159
  /**
162
160
  * Adds the schema signature to a shares list. Use Schema.get("SchemaName") to get the schema.
@@ -219,7 +219,7 @@ class Schema {
219
219
  * @param {Object} param0 - An object containing the schema and other optional settings.
220
220
  * @returns {Object} An object containing the attestation results, including the CID if 'ipfsKey' is enabled.
221
221
  */
222
- async attest({ data, to, signer, refUID, callback }) {
222
+ async attest({ data, to, signer, refUID, callback, }) {
223
223
  const eas = this.gap.eas.connect(signer);
224
224
  if (this.references && !refUID)
225
225
  throw new SchemaError_1.AttestationError("INVALID_REFERENCE", "Attestation schema references another schema but no reference UID was provided.");
@@ -258,19 +258,18 @@ class Schema {
258
258
  },
259
259
  },
260
260
  };
261
+ callback?.("preparing");
261
262
  if (consts_1.useDefaultAttestation.includes(this.name)) {
262
263
  const tx = await eas.attest({
263
264
  schema: this.uid,
264
265
  data: payload.data.payload,
265
266
  });
266
- if (callback)
267
- callback('pending');
267
+ callback?.("pending");
268
268
  const txResult = await tx.wait();
269
- if (callback)
270
- callback('completed');
269
+ callback?.("confirmed");
271
270
  return txResult;
272
271
  }
273
- const uid = await GapContract_1.GapContract.attest(signer, payload);
272
+ const uid = await GapContract_1.GapContract.attest(signer, payload, callback);
274
273
  return uid;
275
274
  }
276
275
  /**
@@ -301,14 +300,17 @@ class Schema {
301
300
  expirationTime: 0n,
302
301
  })),
303
302
  }));
303
+ if (callback)
304
+ callback("preparing");
304
305
  const tx = await eas.multiAttest(payload, {
305
306
  gasLimit: 5000000n,
306
307
  });
307
308
  if (callback)
308
- callback('pending');
309
- return tx.wait();
310
- if (callback)
311
- callback('completed');
309
+ callback("pending");
310
+ return tx.wait().then(() => {
311
+ if (callback)
312
+ callback("confirmed");
313
+ });
312
314
  }
313
315
  /**
314
316
  * Revokes a set of attestations by their UIDs.
@@ -316,7 +318,8 @@ class Schema {
316
318
  * @param uids
317
319
  * @returns
318
320
  */
319
- async multiRevoke(signer, toRevoke) {
321
+ async multiRevoke(signer, toRevoke, callback) {
322
+ callback?.("preparing");
320
323
  const groupBySchema = toRevoke.reduce((acc, { uid, schemaId }) => {
321
324
  if (!acc[schemaId])
322
325
  acc[schemaId] = [];
@@ -331,7 +334,10 @@ class Schema {
331
334
  const tx = await eas.multiRevoke(payload, {
332
335
  gasLimit: 5000000n,
333
336
  });
334
- return tx.wait();
337
+ callback?.("pending");
338
+ return tx.wait().then(() => {
339
+ callback?.("confirmed");
340
+ });
335
341
  }
336
342
  static exists(name, network) {
337
343
  return this.schemas[network].find((schema) => schema.name === name);
@@ -455,11 +461,11 @@ class Schema {
455
461
  }
456
462
  exports.Schema = Schema;
457
463
  Schema.schemas = {
458
- 'optimism-sepolia': [],
464
+ "optimism-sepolia": [],
459
465
  // "optimism-goerli": [],
460
466
  optimism: [],
461
467
  sepolia: [],
462
468
  arbitrum: [],
463
469
  celo: [],
464
- 'base-sepolia': [],
470
+ "base-sepolia": [],
465
471
  };
@@ -1,4 +1,4 @@
1
- import { Hex, RawAttestationPayload, RawMultiAttestPayload, SignerOrProvider } from "core/types";
1
+ import { CallbackStatus, Hex, RawAttestationPayload, RawMultiAttestPayload, SignerOrProvider } from "core/types";
2
2
  import { MultiRevocationRequest } from "@ethereum-attestation-service/eas-sdk";
3
3
  export declare class GapContract {
4
4
  static nonces: {
@@ -30,7 +30,7 @@ export declare class GapContract {
30
30
  * @param payload
31
31
  * @returns
32
32
  */
33
- static attest(signer: SignerOrProvider, payload: RawAttestationPayload): Promise<`0x${string}`>;
33
+ static attest(signer: SignerOrProvider, payload: RawAttestationPayload, callback?: ((status: CallbackStatus) => void) & ((status: string) => void)): Promise<`0x${string}`>;
34
34
  static attestBySig(signer: SignerOrProvider, payload: RawAttestationPayload): Promise<`0x${string}`>;
35
35
  /**
36
36
  * Performs a referenced multi attestation.
@@ -72,16 +72,23 @@ class GapContract {
72
72
  * @param payload
73
73
  * @returns
74
74
  */
75
- static async attest(signer, payload) {
75
+ static async attest(signer, payload, callback) {
76
76
  const contract = await GAP_1.GAP.getMulticall(signer);
77
77
  if (GAP_1.GAP.gelatoOpts?.useGasless) {
78
78
  return this.attestBySig(signer, payload);
79
79
  }
80
- const tx = await contract.attest({
80
+ callback?.("preparing");
81
+ const tx = await contract
82
+ .attest({
81
83
  schema: payload.schema,
82
84
  data: payload.data.payload,
85
+ })
86
+ .then((res) => {
87
+ callback?.("pending");
88
+ return res;
83
89
  });
84
90
  const result = await tx.wait?.();
91
+ callback?.("confirmed");
85
92
  const attestations = (0, eas_sdk_1.getUIDsFromAttestReceipt)(result)[0];
86
93
  return attestations;
87
94
  }
@@ -115,12 +122,14 @@ class GapContract {
115
122
  if (GAP_1.GAP.gelatoOpts?.useGasless) {
116
123
  return this.multiAttestBySig(signer, payload);
117
124
  }
125
+ if (callback)
126
+ callback("preparing");
118
127
  const tx = await contract.multiSequentialAttest(payload.map((p) => p.payload));
119
128
  if (callback)
120
- callback('pending');
129
+ callback("pending");
121
130
  const result = await tx.wait?.();
122
131
  if (callback)
123
- callback('completed');
132
+ callback("confirmed");
124
133
  const attestations = (0, eas_sdk_1.getUIDsFromAttestReceipt)(result);
125
134
  return attestations;
126
135
  }
@@ -1,9 +1,9 @@
1
- import { Attestation } from '../Attestation';
2
- import { CommunityDetails, ICommunityDetails } from '../types/attestations';
3
- import { Project } from './Project';
4
- import { MultiAttestPayload, SignerOrProvider, TNetwork } from 'core/types';
5
- import { Grant } from './Grant';
6
- import { ICommunityResponse } from '../karma-indexer/api/types';
1
+ import { Attestation } from "../Attestation";
2
+ import { CommunityDetails, ICommunityDetails } from "../types/attestations";
3
+ import { Project } from "./Project";
4
+ import { MultiAttestPayload, SignerOrProvider, TNetwork } from "core/types";
5
+ import { Grant } from "./Grant";
6
+ import { ICommunityResponse } from "../karma-indexer/api/types";
7
7
  export interface ICommunity {
8
8
  community: true;
9
9
  }
@@ -41,8 +41,10 @@ class Community extends Attestation_1.Attestation {
41
41
  * @param details
42
42
  */
43
43
  async attest(signer, details, callback) {
44
- console.log('Attesting community');
44
+ console.log("Attesting community");
45
45
  try {
46
+ if (callback)
47
+ callback("preparing");
46
48
  this._uid = await this.schema.attest({
47
49
  signer,
48
50
  to: this.recipient,
@@ -51,22 +53,22 @@ class Community extends Attestation_1.Attestation {
51
53
  });
52
54
  console.log(this.uid);
53
55
  if (callback)
54
- callback('pending');
56
+ callback("pending");
55
57
  if (details) {
56
58
  const communityDetails = new attestations_1.CommunityDetails({
57
59
  data: details,
58
60
  recipient: this.recipient,
59
61
  refUID: this.uid,
60
- schema: this.schema.gap.findSchema('CommunityDetails'),
62
+ schema: this.schema.gap.findSchema("CommunityDetails"),
61
63
  });
62
64
  await communityDetails.attest(signer);
63
65
  }
64
66
  if (callback)
65
- callback('completed');
67
+ callback("confirmed");
66
68
  }
67
69
  catch (error) {
68
70
  console.error(error);
69
- throw new SchemaError_1.AttestationError('ATTEST_ERROR', 'Error during attestation.');
71
+ throw new SchemaError_1.AttestationError("ATTEST_ERROR", "Error during attestation.");
70
72
  }
71
73
  }
72
74
  static from(attestations, network) {
@@ -76,7 +78,7 @@ class Community extends Attestation_1.Attestation {
76
78
  data: {
77
79
  community: true,
78
80
  },
79
- schema: GapSchema_1.GapSchema.find('Community', network),
81
+ schema: GapSchema_1.GapSchema.find("Community", network),
80
82
  chainID: attestation.chainID,
81
83
  });
82
84
  if (attestation.details) {
@@ -86,7 +88,7 @@ class Community extends Attestation_1.Attestation {
86
88
  data: {
87
89
  ...details.data,
88
90
  },
89
- schema: GapSchema_1.GapSchema.find('CommunityDetails', network),
91
+ schema: GapSchema_1.GapSchema.find("CommunityDetails", network),
90
92
  chainID: attestation.chainID,
91
93
  });
92
94
  }
@@ -1,5 +1,5 @@
1
- import { SignerOrProvider, TNetwork } from '../../../core/types';
2
- import { Attestation } from '../Attestation';
1
+ import { SignerOrProvider, TNetwork } from "../../../core/types";
2
+ import { Attestation } from "../Attestation";
3
3
  export interface _IGrantUpdate extends GrantUpdate {
4
4
  }
5
5
  export interface IGrantUpdate {
@@ -7,7 +7,7 @@ export interface IGrantUpdate {
7
7
  text: string;
8
8
  type?: string;
9
9
  }
10
- type IStatus = 'verified';
10
+ type IStatus = "verified";
11
11
  export interface IGrantUpdateStatus {
12
12
  type: `grant-update-${IStatus}`;
13
13
  reason?: string;
@@ -19,6 +19,8 @@ class GrantUpdate extends Attestation_1.Attestation {
19
19
  async attestStatus(signer, schema, callback) {
20
20
  const eas = this.schema.gap.eas.connect(signer);
21
21
  try {
22
+ if (callback)
23
+ callback("preparing");
22
24
  const tx = await eas.attest({
23
25
  schema: schema.uid,
24
26
  data: {
@@ -30,15 +32,15 @@ class GrantUpdate extends Attestation_1.Attestation {
30
32
  },
31
33
  });
32
34
  if (callback)
33
- callback('pending');
35
+ callback("pending");
34
36
  const uid = await tx.wait();
35
37
  if (callback)
36
- callback('completed');
38
+ callback("confirmed");
37
39
  console.log(uid);
38
40
  }
39
41
  catch (error) {
40
42
  console.error(error);
41
- throw new SchemaError_1.AttestationError('ATTEST_ERROR', error.message);
43
+ throw new SchemaError_1.AttestationError("ATTEST_ERROR", error.message);
42
44
  }
43
45
  }
44
46
  /**
@@ -47,17 +49,17 @@ class GrantUpdate extends Attestation_1.Attestation {
47
49
  * @param signer
48
50
  * @param reason
49
51
  */
50
- async verify(signer, reason = '', callback) {
51
- console.log('Verifying');
52
- const schema = this.schema.gap.findSchema('GrantUpdateStatus');
53
- schema.setValue('type', 'grant-update-verified');
54
- schema.setValue('reason', reason);
55
- console.log('Before attest grant update verified');
52
+ async verify(signer, reason = "", callback) {
53
+ console.log("Verifying");
54
+ const schema = this.schema.gap.findSchema("GrantUpdateStatus");
55
+ schema.setValue("type", "grant-update-verified");
56
+ schema.setValue("reason", reason);
57
+ console.log("Before attest grant update verified");
56
58
  await this.attestStatus(signer, schema, callback);
57
- console.log('After attest grant update verified');
59
+ console.log("After attest grant update verified");
58
60
  this.verified.push(new GrantUpdateStatus({
59
61
  data: {
60
- type: 'grant-update-verified',
62
+ type: "grant-update-verified",
61
63
  reason,
62
64
  },
63
65
  refUID: this.uid,
@@ -72,16 +74,16 @@ class GrantUpdate extends Attestation_1.Attestation {
72
74
  data: {
73
75
  ...attestation.data,
74
76
  },
75
- schema: new AllGapSchemas_1.AllGapSchemas().findSchema('GrantUpdate', consts_1.chainIdToNetwork[attestation.chainID]),
77
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema("GrantUpdate", consts_1.chainIdToNetwork[attestation.chainID]),
76
78
  chainID: attestation.chainID,
77
79
  });
78
80
  if (attestation.verified?.length > 0) {
79
- grantUpdate.verified = attestation.verified.map(m => new GrantUpdateStatus({
81
+ grantUpdate.verified = attestation.verified.map((m) => new GrantUpdateStatus({
80
82
  ...m,
81
83
  data: {
82
84
  ...m.data,
83
85
  },
84
- schema: new AllGapSchemas_1.AllGapSchemas().findSchema('GrantUpdateStatus', consts_1.chainIdToNetwork[attestation.chainID]),
86
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema("GrantUpdateStatus", consts_1.chainIdToNetwork[attestation.chainID]),
85
87
  chainID: attestation.chainID,
86
88
  }));
87
89
  }
@@ -1,8 +1,8 @@
1
- import { MultiAttestPayload, SignerOrProvider, TNetwork } from '../../types';
2
- import { Attestation } from '../Attestation';
3
- import { GapSchema } from '../GapSchema';
4
- import { IMilestoneResponse } from '../karma-indexer/api/types';
5
- import { MilestoneCompleted } from '../types/attestations';
1
+ import { MultiAttestPayload, SignerOrProvider, TNetwork } from "../../types";
2
+ import { Attestation } from "../Attestation";
3
+ import { GapSchema } from "../GapSchema";
4
+ import { IMilestoneResponse } from "../karma-indexer/api/types";
5
+ import { MilestoneCompleted } from "../types/attestations";
6
6
  export interface IMilestone {
7
7
  title: string;
8
8
  startsAt?: number;
@@ -52,13 +52,13 @@ export declare class Milestone extends Attestation<IMilestone> implements IMiles
52
52
  * @param signer
53
53
  * @param reason
54
54
  */
55
- complete(signer: SignerOrProvider, reason?: string): Promise<void>;
55
+ complete(signer: SignerOrProvider, reason?: string, callback?: Function): Promise<void>;
56
56
  /**
57
57
  * Revokes the completed status of the milestone. If the milestone is not completed,
58
58
  * it will throw an error.
59
59
  * @param signer
60
60
  */
61
- revokeCompletion(signer: SignerOrProvider): Promise<void>;
61
+ revokeCompletion(signer: SignerOrProvider, callback?: Function): Promise<void>;
62
62
  /**
63
63
  * Creates the payload for a multi-attestation.
64
64
  *
@@ -80,10 +80,10 @@ export declare class Milestone extends Attestation<IMilestone> implements IMiles
80
80
  private attestStatus;
81
81
  static from(attestations: IMilestoneResponse[], network: TNetwork): Milestone[];
82
82
  /**
83
- * Verify this milestone. If the milestone is not completed or already verified,
84
- * it will throw an error.
85
- * @param signer
86
- * @param reason
87
- */
83
+ * Verify this milestone. If the milestone is not completed or already verified,
84
+ * it will throw an error.
85
+ * @param signer
86
+ * @param reason
87
+ */
88
88
  verify(signer: SignerOrProvider, reason?: string, callback?: Function): Promise<void>;
89
89
  }
@@ -11,7 +11,7 @@ class Milestone extends Attestation_1.Attestation {
11
11
  constructor() {
12
12
  super(...arguments);
13
13
  this.verified = [];
14
- this.type = 'milestone';
14
+ this.type = "milestone";
15
15
  }
16
16
  /**
17
17
  * Approves this milestone. If the milestone is not completed or already approved,
@@ -19,16 +19,16 @@ class Milestone extends Attestation_1.Attestation {
19
19
  * @param signer
20
20
  * @param reason
21
21
  */
22
- async approve(signer, reason = '', callback) {
22
+ async approve(signer, reason = "", callback) {
23
23
  if (!this.completed)
24
- throw new SchemaError_1.AttestationError('ATTEST_ERROR', 'Milestone is not completed');
25
- const schema = this.schema.gap.findSchema('MilestoneCompleted');
26
- schema.setValue('type', 'approved');
27
- schema.setValue('reason', reason);
28
- await this.attestStatus(signer, schema);
24
+ throw new SchemaError_1.AttestationError("ATTEST_ERROR", "Milestone is not completed");
25
+ const schema = this.schema.gap.findSchema("MilestoneCompleted");
26
+ schema.setValue("type", "approved");
27
+ schema.setValue("reason", reason);
28
+ await this.attestStatus(signer, schema, callback);
29
29
  this.approved = new attestations_1.MilestoneCompleted({
30
30
  data: {
31
- type: 'approved',
31
+ type: "approved",
32
32
  reason,
33
33
  },
34
34
  refUID: this.uid,
@@ -43,7 +43,7 @@ class Milestone extends Attestation_1.Attestation {
43
43
  */
44
44
  async revokeApproval(signer) {
45
45
  if (!this.approved)
46
- throw new SchemaError_1.AttestationError('ATTEST_ERROR', 'Milestone is not approved');
46
+ throw new SchemaError_1.AttestationError("ATTEST_ERROR", "Milestone is not approved");
47
47
  await this.approved.schema.multiRevoke(signer, [
48
48
  {
49
49
  schemaId: this.completed.schema.uid,
@@ -57,16 +57,16 @@ class Milestone extends Attestation_1.Attestation {
57
57
  * @param signer
58
58
  * @param reason
59
59
  */
60
- async reject(signer, reason = '') {
60
+ async reject(signer, reason = "") {
61
61
  if (!this.completed)
62
- throw new SchemaError_1.AttestationError('ATTEST_ERROR', 'Milestone is not completed');
63
- const schema = this.schema.gap.findSchema('MilestoneCompleted');
64
- schema.setValue('type', 'rejected');
65
- schema.setValue('reason', reason);
62
+ throw new SchemaError_1.AttestationError("ATTEST_ERROR", "Milestone is not completed");
63
+ const schema = this.schema.gap.findSchema("MilestoneCompleted");
64
+ schema.setValue("type", "rejected");
65
+ schema.setValue("reason", reason);
66
66
  await this.attestStatus(signer, schema);
67
67
  this.rejected = new attestations_1.MilestoneCompleted({
68
68
  data: {
69
- type: 'rejected',
69
+ type: "rejected",
70
70
  reason,
71
71
  },
72
72
  refUID: this.uid,
@@ -81,7 +81,7 @@ class Milestone extends Attestation_1.Attestation {
81
81
  */
82
82
  async revokeRejection(signer) {
83
83
  if (!this.rejected)
84
- throw new SchemaError_1.AttestationError('ATTEST_ERROR', 'Milestone is not rejected');
84
+ throw new SchemaError_1.AttestationError("ATTEST_ERROR", "Milestone is not rejected");
85
85
  await this.rejected.schema.multiRevoke(signer, [
86
86
  {
87
87
  schemaId: this.completed.schema.uid,
@@ -95,14 +95,14 @@ class Milestone extends Attestation_1.Attestation {
95
95
  * @param signer
96
96
  * @param reason
97
97
  */
98
- async complete(signer, reason = '') {
99
- const schema = this.schema.gap.findSchema('MilestoneCompleted');
100
- schema.setValue('type', 'completed');
101
- schema.setValue('reason', reason);
102
- await this.attestStatus(signer, schema);
98
+ async complete(signer, reason = "", callback) {
99
+ const schema = this.schema.gap.findSchema("MilestoneCompleted");
100
+ schema.setValue("type", "completed");
101
+ schema.setValue("reason", reason);
102
+ await this.attestStatus(signer, schema, callback);
103
103
  this.completed = new attestations_1.MilestoneCompleted({
104
104
  data: {
105
- type: 'completed',
105
+ type: "completed",
106
106
  reason,
107
107
  },
108
108
  refUID: this.uid,
@@ -115,15 +115,15 @@ class Milestone extends Attestation_1.Attestation {
115
115
  * it will throw an error.
116
116
  * @param signer
117
117
  */
118
- async revokeCompletion(signer) {
118
+ async revokeCompletion(signer, callback) {
119
119
  if (!this.completed)
120
- throw new SchemaError_1.AttestationError('ATTEST_ERROR', 'Milestone is not completed');
120
+ throw new SchemaError_1.AttestationError("ATTEST_ERROR", "Milestone is not completed");
121
121
  await this.completed.schema.multiRevoke(signer, [
122
122
  {
123
123
  schemaId: this.completed.schema.uid,
124
124
  uid: this.completed.uid,
125
125
  },
126
- ]);
126
+ ], callback);
127
127
  }
128
128
  /**
129
129
  * Creates the payload for a multi-attestation.
@@ -173,6 +173,8 @@ class Milestone extends Attestation_1.Attestation {
173
173
  async attestStatus(signer, schema, callback) {
174
174
  const eas = this.schema.gap.eas.connect(signer);
175
175
  try {
176
+ if (callback)
177
+ callback("preparing");
176
178
  const tx = await eas.attest({
177
179
  schema: schema.uid,
178
180
  data: {
@@ -184,15 +186,15 @@ class Milestone extends Attestation_1.Attestation {
184
186
  },
185
187
  });
186
188
  if (callback)
187
- callback('pending');
189
+ callback("pending");
188
190
  const uid = await tx.wait();
189
191
  if (callback)
190
- callback('completed');
192
+ callback("confirmed");
191
193
  console.log(uid);
192
194
  }
193
195
  catch (error) {
194
196
  console.error(error);
195
- throw new SchemaError_1.AttestationError('ATTEST_ERROR', error.message);
197
+ throw new SchemaError_1.AttestationError("ATTEST_ERROR", error.message);
196
198
  }
197
199
  }
198
200
  static from(attestations, network) {
@@ -202,7 +204,7 @@ class Milestone extends Attestation_1.Attestation {
202
204
  data: {
203
205
  ...attestation.data,
204
206
  },
205
- schema: new AllGapSchemas_1.AllGapSchemas().findSchema('Milestone', consts_1.chainIdToNetwork[attestation.chainID]),
207
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema("Milestone", consts_1.chainIdToNetwork[attestation.chainID]),
206
208
  chainID: attestation.chainID,
207
209
  });
208
210
  if (attestation.completed) {
@@ -211,7 +213,7 @@ class Milestone extends Attestation_1.Attestation {
211
213
  data: {
212
214
  ...attestation.completed.data,
213
215
  },
214
- schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MilestoneCompleted', consts_1.chainIdToNetwork[attestation.chainID]),
216
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema("MilestoneCompleted", consts_1.chainIdToNetwork[attestation.chainID]),
215
217
  chainID: attestation.chainID,
216
218
  });
217
219
  }
@@ -221,7 +223,7 @@ class Milestone extends Attestation_1.Attestation {
221
223
  data: {
222
224
  ...attestation.completed.data,
223
225
  },
224
- schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MilestoneCompleted', consts_1.chainIdToNetwork[attestation.chainID]),
226
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema("MilestoneCompleted", consts_1.chainIdToNetwork[attestation.chainID]),
225
227
  chainID: attestation.chainID,
226
228
  });
227
229
  }
@@ -231,17 +233,17 @@ class Milestone extends Attestation_1.Attestation {
231
233
  data: {
232
234
  ...attestation.completed.data,
233
235
  },
234
- schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MilestoneCompleted', consts_1.chainIdToNetwork[attestation.chainID]),
236
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema("MilestoneCompleted", consts_1.chainIdToNetwork[attestation.chainID]),
235
237
  chainID: attestation.chainID,
236
238
  });
237
239
  }
238
240
  if (attestation.verified?.length > 0) {
239
- milestone.verified = attestation.verified.map(m => new attestations_1.MilestoneCompleted({
241
+ milestone.verified = attestation.verified.map((m) => new attestations_1.MilestoneCompleted({
240
242
  ...m,
241
243
  data: {
242
244
  ...m.data,
243
245
  },
244
- schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MilestoneCompleted', consts_1.chainIdToNetwork[attestation.chainID]),
246
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema("MilestoneCompleted", consts_1.chainIdToNetwork[attestation.chainID]),
245
247
  chainID: attestation.chainID,
246
248
  }));
247
249
  }
@@ -249,24 +251,24 @@ class Milestone extends Attestation_1.Attestation {
249
251
  });
250
252
  }
251
253
  /**
252
- * Verify this milestone. If the milestone is not completed or already verified,
253
- * it will throw an error.
254
- * @param signer
255
- * @param reason
256
- */
257
- async verify(signer, reason = '', callback) {
258
- console.log('Verifying');
254
+ * Verify this milestone. If the milestone is not completed or already verified,
255
+ * it will throw an error.
256
+ * @param signer
257
+ * @param reason
258
+ */
259
+ async verify(signer, reason = "", callback) {
260
+ console.log("Verifying");
259
261
  if (!this.completed)
260
- throw new SchemaError_1.AttestationError('ATTEST_ERROR', 'Milestone is not completed');
261
- const schema = this.schema.gap.findSchema('MilestoneCompleted');
262
- schema.setValue('type', 'verified');
263
- schema.setValue('reason', reason);
264
- console.log('Before attestStatus');
262
+ throw new SchemaError_1.AttestationError("ATTEST_ERROR", "Milestone is not completed");
263
+ const schema = this.schema.gap.findSchema("MilestoneCompleted");
264
+ schema.setValue("type", "verified");
265
+ schema.setValue("reason", reason);
266
+ console.log("Before attestStatus");
265
267
  await this.attestStatus(signer, schema, callback);
266
- console.log('After attestStatus');
268
+ console.log("After attestStatus");
267
269
  this.verified.push(new attestations_1.MilestoneCompleted({
268
270
  data: {
269
- type: 'verified',
271
+ type: "verified",
270
272
  reason,
271
273
  },
272
274
  refUID: this.uid,
@@ -1,10 +1,10 @@
1
- import { Attestation } from '../Attestation';
2
- import { Grantee, MemberDetails, ProjectDetails, ProjectEndorsement } from '../types/attestations';
3
- import { Hex, MultiAttestPayload, SignerOrProvider, TNetwork } from 'core/types';
4
- import { Grant } from './Grant';
5
- import { MemberOf } from './MemberOf';
6
- import { IProjectResponse } from '../karma-indexer/api/types';
7
- import { ProjectImpact } from './ProjectImpact';
1
+ import { Attestation } from "../Attestation";
2
+ import { Grantee, MemberDetails, ProjectDetails, ProjectEndorsement } from "../types/attestations";
3
+ import { Hex, MultiAttestPayload, SignerOrProvider, TNetwork } from "core/types";
4
+ import { Grant } from "./Grant";
5
+ import { MemberOf } from "./MemberOf";
6
+ import { IProjectResponse } from "../karma-indexer/api/types";
7
+ import { ProjectImpact } from "./ProjectImpact";
8
8
  export interface IProject {
9
9
  project: true;
10
10
  }
@@ -27,7 +27,7 @@ export declare class Project extends Attestation<IProject> {
27
27
  */
28
28
  multiAttestPayload(currentPayload?: MultiAttestPayload, communityIdx?: number): Promise<MultiAttestPayload>;
29
29
  attest(signer: SignerOrProvider, callback?: Function): Promise<void>;
30
- transferOwnership(signer: SignerOrProvider, newOwner: Hex): Promise<void>;
30
+ transferOwnership(signer: SignerOrProvider, newOwner: Hex, callback?: Function): Promise<void>;
31
31
  isOwner(signer: SignerOrProvider): Promise<boolean>;
32
32
  /**
33
33
  * Add new members to the project.
@@ -50,8 +50,10 @@ class Project extends Attestation_1.Attestation {
50
50
  payload[index][0].uid = uid;
51
51
  });
52
52
  }
53
- async transferOwnership(signer, newOwner) {
53
+ async transferOwnership(signer, newOwner, callback) {
54
+ callback?.("preparing");
54
55
  await GapContract_1.GapContract.transferProjectOwnership(signer, this.uid, newOwner);
56
+ callback?.("confirmed");
55
57
  }
56
58
  isOwner(signer) {
57
59
  return GapContract_1.GapContract.isProjectOwner(signer, this.uid, this.chainID);
@@ -66,7 +68,7 @@ class Project extends Attestation_1.Attestation {
66
68
  this.members.push(...(0, utils_1.mapFilter)(members, (member) => !!this.members.find((m) => m.recipient === member), (member) => new MemberOf_1.MemberOf({
67
69
  data: { memberOf: true },
68
70
  refUID: this.uid,
69
- schema: this.schema.gap.findSchema('MemberOf'),
71
+ schema: this.schema.gap.findSchema("MemberOf"),
70
72
  recipient: member,
71
73
  uid: consts_1.nullRef,
72
74
  })));
@@ -87,7 +89,7 @@ class Project extends Attestation_1.Attestation {
87
89
  const member = new MemberOf_1.MemberOf({
88
90
  data: { memberOf: true },
89
91
  refUID: this.uid,
90
- schema: this.schema.gap.findSchema('MemberOf'),
92
+ schema: this.schema.gap.findSchema("MemberOf"),
91
93
  createdAt: Date.now(),
92
94
  recipient: details.recipient,
93
95
  uid: consts_1.nullRef,
@@ -95,11 +97,11 @@ class Project extends Attestation_1.Attestation {
95
97
  return { member, details };
96
98
  });
97
99
  if (!newMembers.length) {
98
- throw new SchemaError_1.AttestationError('ATTEST_ERROR', 'No new members to add.');
100
+ throw new SchemaError_1.AttestationError("ATTEST_ERROR", "No new members to add.");
99
101
  }
100
102
  console.log(`Creating ${newMembers.length} new members`);
101
103
  const attestedMembers = await this.schema.multiAttest(signer, newMembers.map((m) => m.member), callback);
102
- console.log('attested-members', attestedMembers);
104
+ console.log("attested-members", attestedMembers);
103
105
  newMembers.forEach(({ member, details }, idx) => {
104
106
  Object.assign(member, { uid: attestedMembers[idx] });
105
107
  if (!details)
@@ -122,12 +124,12 @@ class Project extends Attestation_1.Attestation {
122
124
  member.details &&
123
125
  member.details?.refUID !== entity.refUID), (member) => member.uid);
124
126
  if (toRevoke.length) {
125
- console.log('Revoking details');
127
+ console.log("Revoking details");
126
128
  await this.cleanDetails(signer, toRevoke);
127
129
  }
128
130
  console.log(`Creating ${entities.length} new member details`);
129
- const attestedEntities = (await this.schema.multiAttest(signer, entities, callback));
130
- console.log('attested-entities', attestedEntities);
131
+ const attestedEntities = await this.schema.multiAttest(signer, entities, callback);
132
+ console.log("attested-entities", attestedEntities);
131
133
  entities.forEach((entity, idx) => {
132
134
  const member = this.members.find((member) => member.uid === entity.refUID);
133
135
  if (!member)
@@ -143,9 +145,9 @@ class Project extends Attestation_1.Attestation {
143
145
  */
144
146
  async cleanDetails(signer, uids) {
145
147
  if (!uids.length) {
146
- throw new SchemaError_1.AttestationError('ATTEST_ERROR', 'No details to clean.');
148
+ throw new SchemaError_1.AttestationError("ATTEST_ERROR", "No details to clean.");
147
149
  }
148
- const memberDetails = this.schema.gap.findSchema('MemberDetails');
150
+ const memberDetails = this.schema.gap.findSchema("MemberDetails");
149
151
  await this.schema.multiRevoke(signer, uids.map((uid) => ({ schemaId: memberDetails.uid, uid })));
150
152
  this.members.forEach((member) => {
151
153
  if (!member.details)
@@ -163,9 +165,9 @@ class Project extends Attestation_1.Attestation {
163
165
  */
164
166
  async removeMembers(signer, uids) {
165
167
  if (!uids.length) {
166
- throw new SchemaError_1.AttestationError('ATTEST_ERROR', 'No members to remove.');
168
+ throw new SchemaError_1.AttestationError("ATTEST_ERROR", "No members to remove.");
167
169
  }
168
- const memberOf = this.schema.gap.findSchema('MemberOf');
170
+ const memberOf = this.schema.gap.findSchema("MemberOf");
169
171
  const details = (0, utils_1.mapFilter)(this.members, (m) => uids.includes(m.uid) && !!m.details, (m) => m.details?.uid);
170
172
  if (details.length) {
171
173
  await this.cleanDetails(signer, details);
@@ -180,7 +182,7 @@ class Project extends Attestation_1.Attestation {
180
182
  async removeAllMembers(signer) {
181
183
  const members = (0, utils_1.mapFilter)(this.members, (m) => !!m.uid, (m) => m.uid);
182
184
  if (!members.length) {
183
- throw new SchemaError_1.AttestationError('REVOKATION_ERROR', 'No members to revoke.');
185
+ throw new SchemaError_1.AttestationError("REVOKATION_ERROR", "No members to revoke.");
184
186
  }
185
187
  const details = (0, utils_1.mapFilter)(this.members, (m) => !!m.details, (m) => m.details?.uid);
186
188
  if (details.length) {
@@ -196,7 +198,7 @@ class Project extends Attestation_1.Attestation {
196
198
  data: {
197
199
  project: true,
198
200
  },
199
- schema: new AllGapSchemas_1.AllGapSchemas().findSchema('Project', consts_1.chainIdToNetwork[attestation.chainID]),
201
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema("Project", consts_1.chainIdToNetwork[attestation.chainID]),
200
202
  chainID: attestation.chainID,
201
203
  });
202
204
  if (attestation.details) {
@@ -206,7 +208,7 @@ class Project extends Attestation_1.Attestation {
206
208
  data: {
207
209
  ...details.data,
208
210
  },
209
- schema: new AllGapSchemas_1.AllGapSchemas().findSchema('ProjectDetails', consts_1.chainIdToNetwork[attestation.chainID]),
211
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema("ProjectDetails", consts_1.chainIdToNetwork[attestation.chainID]),
210
212
  chainID: attestation.chainID,
211
213
  });
212
214
  project.details.links = details.data.links || [];
@@ -225,7 +227,7 @@ class Project extends Attestation_1.Attestation {
225
227
  data: {
226
228
  memberOf: true,
227
229
  },
228
- schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MemberOf', consts_1.chainIdToNetwork[attestation.chainID]),
230
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema("MemberOf", consts_1.chainIdToNetwork[attestation.chainID]),
229
231
  chainID: attestation.chainID,
230
232
  });
231
233
  if (m.details) {
@@ -235,7 +237,7 @@ class Project extends Attestation_1.Attestation {
235
237
  data: {
236
238
  ...details.data,
237
239
  },
238
- schema: new AllGapSchemas_1.AllGapSchemas().findSchema('MemberDetails', consts_1.chainIdToNetwork[attestation.chainID]),
240
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema("MemberDetails", consts_1.chainIdToNetwork[attestation.chainID]),
239
241
  chainID: attestation.chainID,
240
242
  });
241
243
  }
@@ -255,7 +257,7 @@ class Project extends Attestation_1.Attestation {
255
257
  data: {
256
258
  ...pi.data,
257
259
  },
258
- schema: new AllGapSchemas_1.AllGapSchemas().findSchema('ProjectDetails', consts_1.chainIdToNetwork[attestation.chainID]),
260
+ schema: new AllGapSchemas_1.AllGapSchemas().findSchema("ProjectDetails", consts_1.chainIdToNetwork[attestation.chainID]),
259
261
  chainID: attestation.chainID,
260
262
  });
261
263
  return endorsement;
@@ -268,11 +270,11 @@ class Project extends Attestation_1.Attestation {
268
270
  const projectImpact = new ProjectImpact_1.ProjectImpact({
269
271
  data: {
270
272
  ...data,
271
- type: 'project-impact',
273
+ type: "project-impact",
272
274
  },
273
275
  recipient: this.recipient,
274
276
  refUID: this.uid,
275
- schema: this.schema.gap.findSchema('ProjectDetails'),
277
+ schema: this.schema.gap.findSchema("ProjectDetails"),
276
278
  });
277
279
  await projectImpact.attest(signer);
278
280
  this.impacts.push(projectImpact);
@@ -281,11 +283,11 @@ class Project extends Attestation_1.Attestation {
281
283
  const projectEndorsement = new attestations_1.ProjectEndorsement({
282
284
  data: {
283
285
  ...data,
284
- type: 'project-endorsement',
286
+ type: "project-endorsement",
285
287
  },
286
288
  recipient: this.recipient,
287
289
  refUID: this.uid,
288
- schema: this.schema.gap.findSchema('ProjectDetails'),
290
+ schema: this.schema.gap.findSchema("ProjectDetails"),
289
291
  });
290
292
  await projectEndorsement.attest(signer);
291
293
  this.endorsements.push(projectEndorsement);
@@ -20,6 +20,8 @@ class ProjectImpact extends Attestation_1.Attestation {
20
20
  async attestStatus(signer, schema, callback) {
21
21
  const eas = this.schema.gap.eas.connect(signer);
22
22
  try {
23
+ if (callback)
24
+ callback("preparing");
23
25
  const tx = await eas.attest({
24
26
  schema: schema.uid,
25
27
  data: {
@@ -34,7 +36,7 @@ class ProjectImpact extends Attestation_1.Attestation {
34
36
  callback("pending");
35
37
  const uid = await tx.wait();
36
38
  if (callback)
37
- callback("completed");
39
+ callback("confirmed");
38
40
  console.log(uid);
39
41
  }
40
42
  catch (error) {
@@ -1,8 +1,8 @@
1
- import { Attestation, AttestationArgs } from '../Attestation';
2
- import { Hex } from 'core/types';
3
- import { Project } from '../entities/Project';
4
- import { GapSchema } from '../GapSchema';
5
- import { GrantUpdate } from '../entities/GrantUpdate';
1
+ import { Attestation, AttestationArgs } from "../Attestation";
2
+ import { Hex } from "core/types";
3
+ import { Project } from "../entities/Project";
4
+ import { GapSchema } from "../GapSchema";
5
+ import { GrantUpdate } from "../entities/GrantUpdate";
6
6
  /** Attestation interfaces */
7
7
  export type ExternalLink = {
8
8
  type: string;
package/core/types.d.ts CHANGED
@@ -15,12 +15,13 @@ export interface MultiRevokeArgs {
15
15
  uid: Hex;
16
16
  schemaId: Hex;
17
17
  }
18
+ export type CallbackStatus = "pending" | "confirmed" | "preparing";
18
19
  export interface AttestArgs<T = unknown> {
19
20
  to: Hex;
20
21
  data: T;
21
22
  refUID?: Hex;
22
23
  signer: SignerOrProvider;
23
- callback?: SignerOrProvider;
24
+ callback?: (status: CallbackStatus) => void;
24
25
  }
25
26
  export type TSchemaName = "Community" | "CommunityDetails" | "Grant" | "GrantDetails" | "GrantVerified" | "MemberOf" | "MemberDetails" | "Milestone" | "MilestoneCompleted" | "MilestoneApproved" | "Project" | "ProjectDetails" | "Details" | "ProjectImpact" | "GrantUpdate" | "GrantUpdateStatus" | "ProjectEndorsement";
26
27
  export type TResolvedSchemaNames = "Community" | "Grant" | "GrantVerified" | "MemberOf" | "MilestoneCompleted" | "MilestoneApproved" | "Project" | "Details" | "GrantUpdateStatus";
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.31",
6
+ "version": "0.3.32",
7
7
  "description": "Simple and easy interface between EAS and Karma GAP.",
8
8
  "main": "./index.js",
9
9
  "author": "KarmaHQ",