@show-karma/karma-gap-sdk 0.3.44 → 0.3.46

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.
Files changed (37) hide show
  1. package/core/abi/AirdropNFT.json +622 -0
  2. package/core/abi/Donations.json +260 -0
  3. package/core/abi/EAS.json +1 -0
  4. package/core/abi/SchemaRegistry.json +1 -0
  5. package/core/abi/index.d.ts +1114 -0
  6. package/core/abi/index.js +26 -0
  7. package/core/class/GAP.js +16 -11
  8. package/core/class/Schema.js +2 -3
  9. package/core/class/entities/ContributorProfile.d.ts +39 -0
  10. package/core/class/entities/ContributorProfile.js +69 -0
  11. package/core/class/entities/Grant.d.ts +1 -1
  12. package/core/class/entities/Grant.js +9 -9
  13. package/core/class/entities/GrantUpdate.d.ts +2 -2
  14. package/core/class/entities/GrantUpdate.js +2 -5
  15. package/core/class/entities/Milestone.d.ts +2 -0
  16. package/core/class/entities/Milestone.js +8 -5
  17. package/core/class/entities/Project.d.ts +7 -2
  18. package/core/class/entities/Project.js +65 -2
  19. package/core/class/entities/ProjectImpact.d.ts +1 -1
  20. package/core/class/entities/ProjectMilestone.d.ts +60 -0
  21. package/core/class/entities/ProjectMilestone.js +174 -0
  22. package/core/class/entities/ProjectUpdate.d.ts +2 -0
  23. package/core/class/entities/UserSummary.d.ts +37 -0
  24. package/core/class/entities/UserSummary.js +69 -0
  25. package/core/class/karma-indexer/GapIndexerClient.d.ts +9 -7
  26. package/core/class/karma-indexer/GapIndexerClient.js +15 -10
  27. package/core/class/karma-indexer/api/GapIndexerApi.d.ts +3 -1
  28. package/core/class/karma-indexer/api/GapIndexerApi.js +9 -0
  29. package/core/class/karma-indexer/api/types.d.ts +22 -0
  30. package/core/class/types/attestations.d.ts +14 -0
  31. package/core/class/types/attestations.js +4 -1
  32. package/core/consts.js +30 -0
  33. package/core/index.d.ts +1 -0
  34. package/core/index.js +1 -0
  35. package/core/types.d.ts +3 -2
  36. package/package.json +1 -1
  37. package/core/abi/AlloCaller.json +0 -117
package/core/consts.js CHANGED
@@ -47,6 +47,7 @@ exports.Networks = {
47
47
  projectResolver: "0x7177AdC0f924b695C0294A40C4C5FEFf5EE1E141",
48
48
  communityResolver: "0x6dC1D6b864e8BEf815806f9e4677123496e12026",
49
49
  donations: "0x021896771412C1D3f31BC7B01fFA3a6A17c5dA30",
50
+ airdropNFT: "0x2bB9aB0084477c1306A7da80f5DCDdBca4139112",
50
51
  },
51
52
  schemas: {
52
53
  Community: "0x721c17b065dccc5c916e0c2708d0ef50f1810591b76d0402ff6fe5accbd8488f",
@@ -59,6 +60,7 @@ exports.Networks = {
59
60
  GrantUpdateStatus: "0xdc3f4d0938b1d029d825c01b3c53ad955e0ef3eabc1f57c1ebde90de2bf527ae",
60
61
  Project: "0x5b873b6e7a16207b526dde366e8164e95bcda2f009272306519667c5e94d2191",
61
62
  ProjectUpdateStatus: "0xdc3f4d0938b1d029d825c01b3c53ad955e0ef3eabc1f57c1ebde90de2bf527ae",
63
+ ProjectMilestoneStatus: "0xdc3f4d0938b1d029d825c01b3c53ad955e0ef3eabc1f57c1ebde90de2bf527ae",
62
64
  },
63
65
  oldSchemas: [
64
66
  {
@@ -99,6 +101,7 @@ exports.Networks = {
99
101
  projectResolver: "0x832931F23ea4e3c70957DA71a7eB50F5B7efA93D",
100
102
  schema: "0x4200000000000000000000000000000000000020",
101
103
  donations: "0x3caF83Ed040501f1f439fb22E198bB5a67Bc2884",
104
+ airdropNFT: "0x57d6A954E051145D7E9dD81decaeA6d7Feb640ee",
102
105
  },
103
106
  schemas: {
104
107
  Community: "0x314bb1c3c9b5311c1b813a3ad123b6ac5a03902b987795056dd2e4ff38e833ea",
@@ -111,6 +114,7 @@ exports.Networks = {
111
114
  GrantUpdateStatus: "0x6f8e6a1394bdc398f8d93a99b0ecca326d04470a4f0ee5c379bb85a458a322e4",
112
115
  Project: "0xf9bbd118dd100459a7d093403af21c6e7f847fd7f331b7a4e6bfb94a1366bd76",
113
116
  ProjectUpdateStatus: "0x6f8e6a1394bdc398f8d93a99b0ecca326d04470a4f0ee5c379bb85a458a322e4",
117
+ ProjectMilestoneStatus: "0x6f8e6a1394bdc398f8d93a99b0ecca326d04470a4f0ee5c379bb85a458a322e4",
114
118
  },
115
119
  oldSchemas: [
116
120
  {
@@ -151,6 +155,7 @@ exports.Networks = {
151
155
  projectResolver: "0x28BE0b0515be8BB8822aF1467A6613795E74717b",
152
156
  communityResolver: "0xD534C4704F82494aBbc901560046fB62Ac63E9C4",
153
157
  donations: "0x475F3E915601d975c792E6116791FBe9ACdBE902",
158
+ airdropNFT: "0xe957aFd24F91e6A14F4d47E801d70b876176772a",
154
159
  },
155
160
  schemas: {
156
161
  Community: "0xc604f0661cfd522583835ed2b2c644b80e068139d287f93c7f1680888894bacc",
@@ -163,6 +168,7 @@ exports.Networks = {
163
168
  GrantUpdateStatus: "0x93391c496898c63995f23797835c8e0468be338f0dbc2df62edfd70856cde1d4",
164
169
  Project: "0xac2a06e955a7e25e6729efe1a6532237e3435b21ccd3dc827ae3c94e624d25b3",
165
170
  ProjectUpdateStatus: "0x93391c496898c63995f23797835c8e0468be338f0dbc2df62edfd70856cde1d4",
171
+ ProjectMilestoneStatus: "0x93391c496898c63995f23797835c8e0468be338f0dbc2df62edfd70856cde1d4",
166
172
  },
167
173
  oldSchemas: [
168
174
  {
@@ -203,6 +209,7 @@ exports.Networks = {
203
209
  projectResolver: "0x099787D5a5aC92779A519CfD925ACB0Dc7E8bd23",
204
210
  communityResolver: "0xa9E55D9F52d7B47792d2Db15F6A9674c56ccc5C9",
205
211
  donations: "0xb2021F7550b8B07cA71696159B592C1F713593e4",
212
+ airdropNFT: "0x11f48e68Ff894D417956839263337a2989822703",
206
213
  },
207
214
  schemas: {
208
215
  Community: "0xf3d790c7fdab6c1b1f25ffcc9289e5be2792eb596d2851a4d059c8aae1bc8b2e",
@@ -216,6 +223,7 @@ exports.Networks = {
216
223
  GrantUpdateStatus: "0xcdef0e492d2e7ad25d0b0fdb868f6dcd1f5e5c30e42fd5fa0debdc12f7618322",
217
224
  Project: "0xec77990a252b54b17673955c774b9712766de5eecb22ca5aa2c440e0e93257fb",
218
225
  ProjectUpdateStatus: "0xcdef0e492d2e7ad25d0b0fdb868f6dcd1f5e5c30e42fd5fa0debdc12f7618322",
226
+ ProjectMilestoneStatus: "0xcdef0e492d2e7ad25d0b0fdb868f6dcd1f5e5c30e42fd5fa0debdc12f7618322",
219
227
  },
220
228
  },
221
229
  "base-sepolia": {
@@ -229,6 +237,7 @@ exports.Networks = {
229
237
  projectResolver: "0xC891F8eBA218f5034bf3a472528408BE19E1130E",
230
238
  communityResolver: "0x009dC7dF3Ea3b23CE80Fd3Ba811d5bA5675934A1",
231
239
  donations: "0x61eD6D070EE996698fB35B909e45111402336645",
240
+ airdropNFT: "0xa9c31794385A217832D4C8E200CfA6A8da9c7B32",
232
241
  },
233
242
  schemas: {
234
243
  Community: "0xe130107659909d20cbd75a2c82e1988b09b1c08fd39ad6f4397ce27c089e0e95",
@@ -241,6 +250,7 @@ exports.Networks = {
241
250
  GrantUpdateStatus: "0xe9cce07bd9295aafc78faa7afdd88a6fad6fd61834a048fb8c3dbc86cb471f81",
242
251
  Project: "0x5ddd6b7a11406771308431ca9bd146cc717848b74b52993a532dc1aad0ccc83f",
243
252
  ProjectUpdateStatus: "0xe9cce07bd9295aafc78faa7afdd88a6fad6fd61834a048fb8c3dbc86cb471f81",
253
+ ProjectMilestoneStatus: "0xe9cce07bd9295aafc78faa7afdd88a6fad6fd61834a048fb8c3dbc86cb471f81",
244
254
  },
245
255
  },
246
256
  celo: {
@@ -254,6 +264,7 @@ exports.Networks = {
254
264
  projectResolver: "0x6dC1D6b864e8BEf815806f9e4677123496e12026",
255
265
  communityResolver: "0xfddb660F2F1C27d219372210745BB9f73431856E",
256
266
  donations: "0xf373467c21841DF20529FAA8bE49381106DBc258",
267
+ airdropNFT: "0x884F839fA169B5ECfF5d65CA600C2B43C1F6f668",
257
268
  },
258
269
  schemas: {
259
270
  Community: "0x3c2231024f4f17f3718b5bd9ed9ff29cc323dea5449f9ceba11a9888bfbdd0e1",
@@ -266,6 +277,7 @@ exports.Networks = {
266
277
  GrantUpdateStatus: "0x80f0701853e862d920f87e8ae5b359a1625ad417a9523af2ed12bc3504b04088",
267
278
  Project: "0xf3f753b41e04d1052b5a5ec7624d1dfdb6c2da288a985120e477ddbcac071022",
268
279
  ProjectUpdateStatus: "0x80f0701853e862d920f87e8ae5b359a1625ad417a9523af2ed12bc3504b04088",
280
+ ProjectMilestoneStatus: "0x80f0701853e862d920f87e8ae5b359a1625ad417a9523af2ed12bc3504b04088",
269
281
  },
270
282
  oldSchemas: [
271
283
  {
@@ -306,6 +318,7 @@ exports.Networks = {
306
318
  projectResolver: "0x96f36F25C6bD648d9bdBbd8C3E029CfB2394754d",
307
319
  communityResolver: "0x61d519C99279DC91fC2FC56B177f42B90B35050E",
308
320
  donations: "0xB80D85690747C3E2ceCc0f8529594C6602b642D5",
321
+ airdropNFT: "0xfced53EA1b05F0ef10f86757933cbD4A4e6D9c6e",
309
322
  },
310
323
  schemas: {
311
324
  Community: "0x57dee0b7e1aa8e5c6280c27fecf2edeb225f1b87b47e2750f9dc7eaebe57a2ba",
@@ -318,6 +331,7 @@ exports.Networks = {
318
331
  GrantUpdateStatus: "0xc3b9bee0be3a6ea92f76fa459922a088824e29798becdc82d81f6b2309442563",
319
332
  Project: "0xf6b89107f8096220051240b89a48abb66e0a23e529c914953b80f5a2bc5ea44c",
320
333
  ProjectUpdateStatus: "0xc3b9bee0be3a6ea92f76fa459922a088824e29798becdc82d81f6b2309442563",
334
+ ProjectMilestoneStatus: "0xc3b9bee0be3a6ea92f76fa459922a088824e29798becdc82d81f6b2309442563",
321
335
  },
322
336
  oldSchemas: [
323
337
  {
@@ -358,6 +372,7 @@ exports.Networks = {
358
372
  projectResolver: "0xdA2c62101851365EEdC5A1f7087d92Ffde7345B4",
359
373
  communityResolver: "0x50fb4a65CE924D29b9AC8C508c376a5a21Fda1BC",
360
374
  donations: "0xB80D85690747C3E2ceCc0f8529594C6602b642D5",
375
+ airdropNFT: "0x00933B581765d638369cd8A10a4583c275a857A6",
361
376
  },
362
377
  schemas: {
363
378
  Community: "0x968fe3d635bbf22b6253596df6290d1b6da1f192da9e2b5b41ae3595a965dbc2",
@@ -370,6 +385,7 @@ exports.Networks = {
370
385
  GrantUpdateStatus: "0xb25551d21dc886be83a07c241c46de318704cb6f485191fdedcf80f4b8b28188",
371
386
  Project: "0x9de9294fbb62391b393332a33bfc28b4e0e728dd094aee4bda3955df62f8401a5",
372
387
  ProjectUpdateStatus: "0xb25551d21dc886be83a07c241c46de318704cb6f485191fdedcf80f4b8b28188",
388
+ ProjectMilestoneStatus: "0xb25551d21dc886be83a07c241c46de318704cb6f485191fdedcf80f4b8b28188",
373
389
  },
374
390
  },
375
391
  };
@@ -518,6 +534,20 @@ const MountEntities = (network) => ({
518
534
  references: "Project",
519
535
  oldSchemas: network.oldSchemas?.filter(s => s.name === "ProjectPointer")?.map(s => ({ uid: s.uid, raw: s.raw }))
520
536
  },
537
+ ProjectMilestone: {
538
+ name: "ProjectMilestone",
539
+ schema: DetailsSchema,
540
+ uid: network.schemas.Details,
541
+ references: "Project",
542
+ oldSchemas: network.oldSchemas?.filter(s => s.name === "ProjectMilestone")?.map(s => ({ uid: s.uid, raw: s.raw }))
543
+ },
544
+ ProjectMilestoneStatus: {
545
+ name: "ProjectMilestoneStatus",
546
+ schema: DetailsSchema,
547
+ uid: network.schemas.ProjectUpdateStatus,
548
+ references: "ProjectMilestone",
549
+ oldSchemas: network.oldSchemas?.filter(s => s.name === "ProjectMilestoneStatus")?.map(s => ({ uid: s.uid, raw: s.raw }))
550
+ },
521
551
  });
522
552
  exports.MountEntities = MountEntities;
523
553
  exports.alloSupportedNetworks = {
package/core/index.d.ts CHANGED
@@ -5,3 +5,4 @@ export * from "./class/GAP";
5
5
  export * from "./class/GapSchema";
6
6
  export * from "./class/types/attestations";
7
7
  export * from "./class/entities";
8
+ export * from "./abi";
package/core/index.js CHANGED
@@ -21,3 +21,4 @@ __exportStar(require("./class/GAP"), exports);
21
21
  __exportStar(require("./class/GapSchema"), exports);
22
22
  __exportStar(require("./class/types/attestations"), exports);
23
23
  __exportStar(require("./class/entities"), exports);
24
+ __exportStar(require("./abi"), exports);
package/core/types.d.ts CHANGED
@@ -27,8 +27,8 @@ export interface AttestArgs<T = unknown> {
27
27
  signer: SignerOrProvider;
28
28
  callback?: (status: CallbackStatus) => void;
29
29
  }
30
- export type TSchemaName = "Community" | "CommunityDetails" | "Grant" | "GrantDetails" | "GrantVerified" | "MemberOf" | "MemberDetails" | "Milestone" | "MilestoneCompleted" | "MilestoneApproved" | "Project" | "ProjectDetails" | "Details" | "ProjectImpact" | "ProjectUpdate" | "ProjectUpdateStatus" | "ProjectPointer" | "GrantUpdate" | "GrantUpdateStatus" | "ProjectEndorsement";
31
- export type TResolvedSchemaNames = "Community" | "Grant" | "GrantVerified" | "MemberOf" | "MilestoneCompleted" | "MilestoneApproved" | "Project" | "Details" | "ProjectUpdateStatus" | "GrantUpdateStatus" | "ProjectUpdateStatus";
30
+ export type TSchemaName = "Community" | "CommunityDetails" | "Grant" | "GrantDetails" | "GrantVerified" | "MemberOf" | "MemberDetails" | "Milestone" | "MilestoneCompleted" | "MilestoneApproved" | "Project" | "ProjectDetails" | "Details" | "ProjectImpact" | "ProjectUpdate" | "ProjectUpdateStatus" | "ProjectPointer" | "GrantUpdate" | "GrantUpdateStatus" | "ProjectEndorsement" | "ProjectMilestone" | "ProjectMilestoneStatus";
31
+ export type TResolvedSchemaNames = "Community" | "Grant" | "GrantVerified" | "MemberOf" | "MilestoneCompleted" | "MilestoneApproved" | "Project" | "Details" | "ProjectUpdateStatus" | "GrantUpdateStatus" | "ProjectUpdateStatus" | "ProjectMilestoneStatus";
32
32
  export type TExternalLink = "twitter" | "github" | "website" | "linkedin" | "discord";
33
33
  export type TNetwork = "optimism" | "celo" | "optimism-sepolia" | "arbitrum" | "sepolia" | "sei" | "sei-testnet" | "base-sepolia";
34
34
  /**
@@ -70,6 +70,7 @@ export interface EASNetworkConfig {
70
70
  projectResolver: Hex;
71
71
  communityResolver: Hex;
72
72
  donations: Hex;
73
+ airdropNFT: Hex;
73
74
  };
74
75
  /**
75
76
  * A tuple containing the schema name and it's UID for that network
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.44",
6
+ "version": "0.3.46",
7
7
  "description": "Simple and easy interface between EAS and Karma GAP.",
8
8
  "main": "./index.js",
9
9
  "author": "KarmaHQ",
@@ -1,117 +0,0 @@
1
- [
2
- {
3
- "inputs": [
4
- {
5
- "internalType": "bytes32",
6
- "name": "_profileId",
7
- "type": "bytes32"
8
- },
9
- {
10
- "internalType": "address",
11
- "name": "_strategy",
12
- "type": "address"
13
- },
14
- {
15
- "internalType": "bytes",
16
- "name": "_initStrategyData",
17
- "type": "bytes"
18
- },
19
- {
20
- "internalType": "address",
21
- "name": "_token",
22
- "type": "address"
23
- },
24
- {
25
- "internalType": "uint256",
26
- "name": "_amount",
27
- "type": "uint256"
28
- },
29
- {
30
- "components": [
31
- {
32
- "internalType": "uint256",
33
- "name": "protocol",
34
- "type": "uint256"
35
- },
36
- {
37
- "internalType": "string",
38
- "name": "pointer",
39
- "type": "string"
40
- }
41
- ],
42
- "internalType": "struct IAllo.Metadata",
43
- "name": "_metadata",
44
- "type": "tuple"
45
- },
46
- {
47
- "internalType": "address[]",
48
- "name": "_managers",
49
- "type": "address[]"
50
- }
51
- ],
52
- "name": "createPool",
53
- "outputs": [
54
- {
55
- "internalType": "uint256",
56
- "name": "poolId",
57
- "type": "uint256"
58
- }
59
- ],
60
- "stateMutability": "payable",
61
- "type": "function"
62
- },
63
- {
64
- "inputs": [
65
- {
66
- "internalType": "uint256",
67
- "name": "_poolId",
68
- "type": "uint256"
69
- },
70
- {
71
- "components": [
72
- {
73
- "internalType": "uint256",
74
- "name": "protocol",
75
- "type": "uint256"
76
- },
77
- {
78
- "internalType": "string",
79
- "name": "pointer",
80
- "type": "string"
81
- }
82
- ],
83
- "internalType": "struct IAllo.Metadata",
84
- "name": "_metadata",
85
- "type": "tuple"
86
- }
87
- ],
88
- "name": "updatePoolMetadata",
89
- "outputs": [],
90
- "stateMutability": "nonpayable",
91
- "type": "function"
92
- },
93
- {
94
- "inputs": [
95
- {
96
- "internalType": "address",
97
- "name": "_alloAddress",
98
- "type": "address"
99
- }
100
- ],
101
- "stateMutability": "nonpayable",
102
- "type": "constructor"
103
- },
104
- {
105
- "inputs": [],
106
- "name": "allo",
107
- "outputs": [
108
- {
109
- "internalType": "contract IAllo",
110
- "name": "",
111
- "type": "address"
112
- }
113
- ],
114
- "stateMutability": "view",
115
- "type": "function"
116
- }
117
- ]