@show-karma/karma-gap-sdk 0.2.9 → 0.3.3
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.
- package/core/class/Attestation.d.ts +6 -5
- package/core/class/Attestation.js +11 -6
- package/core/class/Fetcher.d.ts +4 -0
- package/core/class/Fetcher.js +6 -0
- package/core/class/GAP.d.ts +11 -10
- package/core/class/GAP.js +37 -23
- package/core/class/GapSchema.d.ts +6 -5
- package/core/class/GapSchema.js +10 -10
- package/core/class/GraphQL/GapEasClient.js +46 -48
- package/core/class/Schema.d.ts +14 -12
- package/core/class/Schema.js +37 -31
- package/core/class/contract/GapContract.js +8 -8
- package/core/class/entities/Community.d.ts +6 -6
- package/core/class/entities/Community.js +8 -6
- package/core/class/entities/Grant.d.ts +4 -3
- package/core/class/entities/Grant.js +42 -14
- package/core/class/entities/Milestone.d.ts +2 -2
- package/core/class/entities/Milestone.js +13 -10
- package/core/class/entities/Project.d.ts +2 -2
- package/core/class/entities/Project.js +14 -10
- package/core/class/karma-indexer/GapIndexerClient.js +15 -16
- package/core/consts.js +43 -47
- package/core/types.d.ts +3 -3
- package/core/types.js +1 -3
- package/package.json +1 -1
package/core/consts.js
CHANGED
|
@@ -97,53 +97,49 @@ exports.Networks = {
|
|
|
97
97
|
Project: '0xa727441596f5a9878552d3ad6c53c31629a709451e6081ba01bff0f73bf1af5a',
|
|
98
98
|
},
|
|
99
99
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
// Project:
|
|
144
|
-
// '0xec77990a252b54b17673955c774b9712766de5eecb22ca5aa2c440e0e93257fb',
|
|
145
|
-
// },
|
|
146
|
-
// },
|
|
100
|
+
arbitrum: {
|
|
101
|
+
chainId: 42161,
|
|
102
|
+
url: 'https://arbitrum.easscan.org/graphql',
|
|
103
|
+
rpcUrl: 'https://arb-mainnet.g.alchemy.com/v2/okcKBSKXvLuSCbas6QWGvKuh-IcHHSOr',
|
|
104
|
+
contracts: {
|
|
105
|
+
eas: '0xbD75f629A22Dc1ceD33dDA0b68c546A1c035c458',
|
|
106
|
+
schema: '0xA310da9c5B885E7fb3fbA9D66E9Ba6Df512b78eB',
|
|
107
|
+
multicall: '0x6dC1D6b864e8BEf815806f9e4677123496e12026',
|
|
108
|
+
projectResolver: '0x28BE0b0515be8BB8822aF1467A6613795E74717b',
|
|
109
|
+
},
|
|
110
|
+
schemas: {
|
|
111
|
+
Community: '0xc604f0661cfd522583835ed2b2c644b80e068139d287f93c7f1680888894bacc',
|
|
112
|
+
Details: '0x16bfe4783b7a9c743c401222c56a07ecb77ed42afc84b61ff1f62f5936c0b9d7',
|
|
113
|
+
Grant: '0xea02ab33f9f4c92ba02c9bb21614b7410b98c940a0d8eb8ad3a20204d8b4bda5',
|
|
114
|
+
GrantVerified: '0xd25ccdfbf87659a9081681eb90598d8b944ed28544da7d57c3ccbe6e6422cc15',
|
|
115
|
+
MemberOf: '0x5f430aec9d04f0dcb3729775c5dfe10752e436469a7607f8c64ae44ef996e477',
|
|
116
|
+
MilestoneApproved: '0xd25ccdfbf87659a9081681eb90598d8b944ed28544da7d57c3ccbe6e6422cc15',
|
|
117
|
+
MilestoneCompleted: '0xd25ccdfbf87659a9081681eb90598d8b944ed28544da7d57c3ccbe6e6422cc15',
|
|
118
|
+
Project: '0xac2a06e955a7e25e6729efe1a6532237e3435b21ccd3dc827ae3c94e624d25b3',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
sepolia: {
|
|
122
|
+
chainId: 11155111,
|
|
123
|
+
url: 'https://sepolia.easscan.org/graphql',
|
|
124
|
+
rpcUrl: 'https://rpc.sepolia.io',
|
|
125
|
+
contracts: {
|
|
126
|
+
eas: '0xC2679fBD37d54388Ce493F1DB75320D236e1815e',
|
|
127
|
+
schema: '0x0a7E2Ff54e76B8E6659aedc9103FB21c038050D0',
|
|
128
|
+
multicall: '0xec8d7BFe344790FD860920C41B46B259c005727A',
|
|
129
|
+
projectResolver: '0x099787D5a5aC92779A519CfD925ACB0Dc7E8bd23',
|
|
130
|
+
},
|
|
131
|
+
schemas: {
|
|
132
|
+
Community: '0xf3d790c7fdab6c1b1f25ffcc9289e5be2792eb596d2851a4d059c8aae1bc8b2e',
|
|
133
|
+
// "0x1954572e3fe21bf4334afdaf1358ed7098af1ed136e76dc93c2fdc25e83934c1", // original without resolver
|
|
134
|
+
Details: '0x2c270e35bfcdc4d611f0e9d3d2ab6924ec6c673505abc22a1dd07e19b67211af',
|
|
135
|
+
Grant: '0x09697aeeb3ae71de1cc19e388fd74264f11af5fba3016094764553ac341fdc72',
|
|
136
|
+
GrantVerified: '0x0be8952e2dd74ffd63a02f4d55b20b603fe7a60130cb9d70de31feb9c52fdd37',
|
|
137
|
+
MemberOf: '0xdd87b3500457931252424f4439365534ba72a367503a8805ff3482353fb90301',
|
|
138
|
+
MilestoneApproved: '0xcdef0e492d2e7ad25d0b0fdb868f6dcd1f5e5c30e42fd5fa0debdc12f7618322',
|
|
139
|
+
MilestoneCompleted: '0xcdef0e492d2e7ad25d0b0fdb868f6dcd1f5e5c30e42fd5fa0debdc12f7618322',
|
|
140
|
+
Project: '0xec77990a252b54b17673955c774b9712766de5eecb22ca5aa2c440e0e93257fb',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
147
143
|
};
|
|
148
144
|
const DetailsSchema = [{ type: 'string', name: 'json', value: null }];
|
|
149
145
|
/**
|
package/core/types.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export interface AttestArgs<T = unknown> {
|
|
|
29
29
|
export type TSchemaName = 'Community' | 'CommunityDetails' | 'Grant' | 'GrantDetails' | 'GrantVerified' | 'MemberOf' | 'MemberDetails' | 'Milestone' | 'MilestoneCompleted' | 'MilestoneApproved' | 'Project' | 'ProjectDetails' | 'Details';
|
|
30
30
|
export type TResolvedSchemaNames = 'Community' | 'Grant' | 'GrantVerified' | 'MemberOf' | 'MilestoneCompleted' | 'MilestoneApproved' | 'Project' | 'Details';
|
|
31
31
|
export type TExternalLink = 'twitter' | 'github' | 'website' | 'linkedin' | 'discord';
|
|
32
|
-
export type TNetwork = 'optimism' | 'optimism-goerli';
|
|
32
|
+
export type TNetwork = 'optimism' | 'optimism-goerli' | "arbitrum" | 'sepolia';
|
|
33
33
|
/**
|
|
34
34
|
* Generic GAP Facade interface.
|
|
35
35
|
* This supplies the GAP class with the necessary properties.
|
|
@@ -38,8 +38,8 @@ export declare abstract class Facade {
|
|
|
38
38
|
abstract readonly network: TNetwork;
|
|
39
39
|
abstract readonly schemas: SchemaInterface[];
|
|
40
40
|
abstract readonly fetch: Fetcher;
|
|
41
|
-
protected
|
|
42
|
-
|
|
41
|
+
protected _eas: EAS;
|
|
42
|
+
get eas(): EAS;
|
|
43
43
|
}
|
|
44
44
|
export interface RawAttestationPayload {
|
|
45
45
|
schema: Hex;
|
package/core/types.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Facade = void 0;
|
|
4
|
-
// | "arbitrum"
|
|
5
|
-
// | 'sepolia';y
|
|
6
4
|
/**
|
|
7
5
|
* Generic GAP Facade interface.
|
|
8
6
|
* This supplies the GAP class with the necessary properties.
|
|
9
7
|
*/
|
|
10
8
|
class Facade {
|
|
11
|
-
|
|
9
|
+
get eas() {
|
|
12
10
|
return this._eas;
|
|
13
11
|
}
|
|
14
12
|
}
|