@show-karma/karma-gap-sdk 0.3.5 → 0.3.6

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.
@@ -190,6 +190,10 @@ class Attestation {
190
190
  this.assertPayload();
191
191
  if (this.schema.isJsonSchema()) {
192
192
  const { remoteClient } = GAP_1.GAP;
193
+ if (this.type) {
194
+ this._data.type = this.type;
195
+ this.schema.setValue('json', JSON.stringify(this._data));
196
+ }
193
197
  if (remoteClient) {
194
198
  const cid = await remoteClient.save(this._data, this.schema.name);
195
199
  const encodedData = remoteClient.encode(cid);
@@ -8,6 +8,7 @@ export interface IMilestone {
8
8
  title: string;
9
9
  endsAt: number;
10
10
  description: string;
11
+ type?: string;
11
12
  }
12
13
  export declare class Milestone extends Attestation<IMilestone> implements IMilestone {
13
14
  title: string;
@@ -16,6 +17,7 @@ export declare class Milestone extends Attestation<IMilestone> implements IMiles
16
17
  completed: MilestoneCompleted;
17
18
  approved: MilestoneCompleted;
18
19
  rejected: MilestoneCompleted;
20
+ type: string;
19
21
  /**
20
22
  * Approves this milestone. If the milestone is not completed or already approved,
21
23
  * it will throw an error.
@@ -7,6 +7,10 @@ const SchemaError_1 = require("../SchemaError");
7
7
  const GapContract_1 = require("../contract/GapContract");
8
8
  const attestations_1 = require("../types/attestations");
9
9
  class Milestone extends Attestation_1.Attestation {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.type = 'milestone';
13
+ }
10
14
  /**
11
15
  * Approves this milestone. If the milestone is not completed or already approved,
12
16
  * it will throw an error.
@@ -12,6 +12,7 @@ export interface ICommunityDetails {
12
12
  imageURL: string;
13
13
  slug?: string;
14
14
  links?: ExternalLink;
15
+ type?: string;
15
16
  }
16
17
  export declare class CommunityDetails extends Attestation<ICommunityDetails> implements ICommunityDetails {
17
18
  name: string;
@@ -19,6 +20,7 @@ export declare class CommunityDetails extends Attestation<ICommunityDetails> imp
19
20
  imageURL: string;
20
21
  links: ExternalLink;
21
22
  slug?: string;
23
+ type: string;
22
24
  }
23
25
  export interface IGrantDetails {
24
26
  title: string;
@@ -30,6 +32,7 @@ export interface IGrantDetails {
30
32
  season?: string;
31
33
  cycle?: string;
32
34
  questions?: IGrantDetailsQuestion[];
35
+ type?: string;
33
36
  }
34
37
  export declare class GrantDetails extends Attestation<IGrantDetails> implements IGrantDetails {
35
38
  title: string;
@@ -41,6 +44,7 @@ export declare class GrantDetails extends Attestation<IGrantDetails> implements
41
44
  season?: string;
42
45
  cycle?: string;
43
46
  questions?: IGrantDetailsQuestion[];
47
+ type: string;
44
48
  }
45
49
  export interface IGrantRound {
46
50
  name: string;
@@ -83,6 +87,7 @@ export interface IProjectDetails {
83
87
  links?: ExternalLink;
84
88
  tags?: ITag[];
85
89
  slug?: string;
90
+ type?: string;
86
91
  }
87
92
  export declare class ProjectDetails extends Attestation<IProjectDetails> implements IProjectDetails {
88
93
  title: string;
@@ -91,6 +96,7 @@ export declare class ProjectDetails extends Attestation<IProjectDetails> impleme
91
96
  links: ExternalLink;
92
97
  tags: ITag[];
93
98
  slug: string;
99
+ type: string;
94
100
  }
95
101
  export declare class Grantee {
96
102
  address: string;
@@ -6,10 +6,15 @@ class CommunityDetails extends Attestation_1.Attestation {
6
6
  constructor() {
7
7
  super(...arguments);
8
8
  this.links = [];
9
+ this.type = 'community-details';
9
10
  }
10
11
  }
11
12
  exports.CommunityDetails = CommunityDetails;
12
13
  class GrantDetails extends Attestation_1.Attestation {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.type = 'grant-details';
17
+ }
13
18
  }
14
19
  exports.GrantDetails = GrantDetails;
15
20
  class GrantRound extends Attestation_1.Attestation {
@@ -32,6 +37,7 @@ class ProjectDetails extends Attestation_1.Attestation {
32
37
  super(...arguments);
33
38
  this.links = [];
34
39
  this.tags = [];
40
+ this.type = 'project-details';
35
41
  }
36
42
  }
37
43
  exports.ProjectDetails = ProjectDetails;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.5",
6
+ "version": "0.3.6",
7
7
  "description": "Simple and easy interface between EAS and Karma GAP.",
8
8
  "main": "./index.js",
9
9
  "author": "KarmaHQ",