@show-karma/karma-gap-sdk 0.3.5 → 0.3.7
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/core/consts.js
CHANGED
|
@@ -45,7 +45,7 @@ exports.Networks = {
|
|
|
45
45
|
'optimism-goerli': {
|
|
46
46
|
chainId: 420,
|
|
47
47
|
url: 'https://optimism-goerli-bedrock.easscan.org/graphql',
|
|
48
|
-
rpcUrl: 'https://
|
|
48
|
+
rpcUrl: 'https://optimism-goerli.infura.io/v3/34917361240448cda81f542681961659',
|
|
49
49
|
contracts: {
|
|
50
50
|
eas: '0x4200000000000000000000000000000000000021',
|
|
51
51
|
schema: '0x4200000000000000000000000000000000000020',
|
|
@@ -90,7 +90,7 @@ exports.Networks = {
|
|
|
90
90
|
sepolia: {
|
|
91
91
|
chainId: 11155111,
|
|
92
92
|
url: 'https://sepolia.easscan.org/graphql',
|
|
93
|
-
rpcUrl: 'https://
|
|
93
|
+
rpcUrl: 'https://sepolia.infura.io/v3/34917361240448cda81f542681961659',
|
|
94
94
|
contracts: {
|
|
95
95
|
eas: '0xC2679fBD37d54388Ce493F1DB75320D236e1815e',
|
|
96
96
|
schema: '0x0a7E2Ff54e76B8E6659aedc9103FB21c038050D0',
|