@show-karma/karma-gap-sdk 0.3.23 → 0.3.25

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.
@@ -0,0 +1,582 @@
1
+ [
2
+ { "inputs": [], "name": "ALLOCATION_ACTIVE", "type": "error" },
3
+ { "inputs": [], "name": "ALLOCATION_NOT_ACTIVE", "type": "error" },
4
+ { "inputs": [], "name": "ALLOCATION_NOT_ENDED", "type": "error" },
5
+ { "inputs": [], "name": "ALREADY_INITIALIZED", "type": "error" },
6
+ { "inputs": [], "name": "AMOUNT_MISMATCH", "type": "error" },
7
+ { "inputs": [], "name": "ANCHOR_ERROR", "type": "error" },
8
+ { "inputs": [], "name": "ARRAY_MISMATCH", "type": "error" },
9
+ { "inputs": [], "name": "INVALID", "type": "error" },
10
+ { "inputs": [], "name": "INVALID_ADDRESS", "type": "error" },
11
+ { "inputs": [], "name": "INVALID_FEE", "type": "error" },
12
+ { "inputs": [], "name": "INVALID_METADATA", "type": "error" },
13
+ { "inputs": [], "name": "INVALID_REGISTRATION", "type": "error" },
14
+ { "inputs": [], "name": "IS_APPROVED_STRATEGY", "type": "error" },
15
+ { "inputs": [], "name": "MISMATCH", "type": "error" },
16
+ { "inputs": [], "name": "NONCE_NOT_AVAILABLE", "type": "error" },
17
+ { "inputs": [], "name": "NOT_APPROVED_STRATEGY", "type": "error" },
18
+ { "inputs": [], "name": "NOT_ENOUGH_FUNDS", "type": "error" },
19
+ { "inputs": [], "name": "NOT_IMPLEMENTED", "type": "error" },
20
+ { "inputs": [], "name": "NOT_INITIALIZED", "type": "error" },
21
+ { "inputs": [], "name": "NOT_PENDING_OWNER", "type": "error" },
22
+ { "inputs": [], "name": "POOL_ACTIVE", "type": "error" },
23
+ { "inputs": [], "name": "POOL_INACTIVE", "type": "error" },
24
+ { "inputs": [], "name": "RECIPIENT_ALREADY_ACCEPTED", "type": "error" },
25
+ {
26
+ "inputs": [
27
+ { "internalType": "address", "name": "recipientId", "type": "address" }
28
+ ],
29
+ "name": "RECIPIENT_ERROR",
30
+ "type": "error"
31
+ },
32
+ { "inputs": [], "name": "RECIPIENT_NOT_ACCEPTED", "type": "error" },
33
+ { "inputs": [], "name": "REGISTRATION_ACTIVE", "type": "error" },
34
+ { "inputs": [], "name": "REGISTRATION_NOT_ACTIVE", "type": "error" },
35
+ { "inputs": [], "name": "UNAUTHORIZED", "type": "error" },
36
+ { "inputs": [], "name": "ZERO_ADDRESS", "type": "error" },
37
+ {
38
+ "anonymous": false,
39
+ "inputs": [
40
+ {
41
+ "indexed": false,
42
+ "internalType": "uint8",
43
+ "name": "version",
44
+ "type": "uint8"
45
+ }
46
+ ],
47
+ "name": "Initialized",
48
+ "type": "event"
49
+ },
50
+ {
51
+ "anonymous": false,
52
+ "inputs": [
53
+ {
54
+ "indexed": true,
55
+ "internalType": "bytes32",
56
+ "name": "profileId",
57
+ "type": "bytes32"
58
+ },
59
+ {
60
+ "indexed": false,
61
+ "internalType": "uint256",
62
+ "name": "nonce",
63
+ "type": "uint256"
64
+ },
65
+ {
66
+ "indexed": false,
67
+ "internalType": "string",
68
+ "name": "name",
69
+ "type": "string"
70
+ },
71
+ {
72
+ "components": [
73
+ { "internalType": "uint256", "name": "protocol", "type": "uint256" },
74
+ { "internalType": "string", "name": "pointer", "type": "string" }
75
+ ],
76
+ "indexed": false,
77
+ "internalType": "struct Metadata",
78
+ "name": "metadata",
79
+ "type": "tuple"
80
+ },
81
+ {
82
+ "indexed": false,
83
+ "internalType": "address",
84
+ "name": "owner",
85
+ "type": "address"
86
+ },
87
+ {
88
+ "indexed": false,
89
+ "internalType": "address",
90
+ "name": "anchor",
91
+ "type": "address"
92
+ }
93
+ ],
94
+ "name": "ProfileCreated",
95
+ "type": "event"
96
+ },
97
+ {
98
+ "anonymous": false,
99
+ "inputs": [
100
+ {
101
+ "indexed": true,
102
+ "internalType": "bytes32",
103
+ "name": "profileId",
104
+ "type": "bytes32"
105
+ },
106
+ {
107
+ "components": [
108
+ { "internalType": "uint256", "name": "protocol", "type": "uint256" },
109
+ { "internalType": "string", "name": "pointer", "type": "string" }
110
+ ],
111
+ "indexed": false,
112
+ "internalType": "struct Metadata",
113
+ "name": "metadata",
114
+ "type": "tuple"
115
+ }
116
+ ],
117
+ "name": "ProfileMetadataUpdated",
118
+ "type": "event"
119
+ },
120
+ {
121
+ "anonymous": false,
122
+ "inputs": [
123
+ {
124
+ "indexed": true,
125
+ "internalType": "bytes32",
126
+ "name": "profileId",
127
+ "type": "bytes32"
128
+ },
129
+ {
130
+ "indexed": false,
131
+ "internalType": "string",
132
+ "name": "name",
133
+ "type": "string"
134
+ },
135
+ {
136
+ "indexed": false,
137
+ "internalType": "address",
138
+ "name": "anchor",
139
+ "type": "address"
140
+ }
141
+ ],
142
+ "name": "ProfileNameUpdated",
143
+ "type": "event"
144
+ },
145
+ {
146
+ "anonymous": false,
147
+ "inputs": [
148
+ {
149
+ "indexed": true,
150
+ "internalType": "bytes32",
151
+ "name": "profileId",
152
+ "type": "bytes32"
153
+ },
154
+ {
155
+ "indexed": false,
156
+ "internalType": "address",
157
+ "name": "owner",
158
+ "type": "address"
159
+ }
160
+ ],
161
+ "name": "ProfileOwnerUpdated",
162
+ "type": "event"
163
+ },
164
+ {
165
+ "anonymous": false,
166
+ "inputs": [
167
+ {
168
+ "indexed": true,
169
+ "internalType": "bytes32",
170
+ "name": "profileId",
171
+ "type": "bytes32"
172
+ },
173
+ {
174
+ "indexed": false,
175
+ "internalType": "address",
176
+ "name": "pendingOwner",
177
+ "type": "address"
178
+ }
179
+ ],
180
+ "name": "ProfilePendingOwnerUpdated",
181
+ "type": "event"
182
+ },
183
+ {
184
+ "anonymous": false,
185
+ "inputs": [
186
+ {
187
+ "indexed": true,
188
+ "internalType": "bytes32",
189
+ "name": "role",
190
+ "type": "bytes32"
191
+ },
192
+ {
193
+ "indexed": true,
194
+ "internalType": "bytes32",
195
+ "name": "previousAdminRole",
196
+ "type": "bytes32"
197
+ },
198
+ {
199
+ "indexed": true,
200
+ "internalType": "bytes32",
201
+ "name": "newAdminRole",
202
+ "type": "bytes32"
203
+ }
204
+ ],
205
+ "name": "RoleAdminChanged",
206
+ "type": "event"
207
+ },
208
+ {
209
+ "anonymous": false,
210
+ "inputs": [
211
+ {
212
+ "indexed": true,
213
+ "internalType": "bytes32",
214
+ "name": "role",
215
+ "type": "bytes32"
216
+ },
217
+ {
218
+ "indexed": true,
219
+ "internalType": "address",
220
+ "name": "account",
221
+ "type": "address"
222
+ },
223
+ {
224
+ "indexed": true,
225
+ "internalType": "address",
226
+ "name": "sender",
227
+ "type": "address"
228
+ }
229
+ ],
230
+ "name": "RoleGranted",
231
+ "type": "event"
232
+ },
233
+ {
234
+ "anonymous": false,
235
+ "inputs": [
236
+ {
237
+ "indexed": true,
238
+ "internalType": "bytes32",
239
+ "name": "role",
240
+ "type": "bytes32"
241
+ },
242
+ {
243
+ "indexed": true,
244
+ "internalType": "address",
245
+ "name": "account",
246
+ "type": "address"
247
+ },
248
+ {
249
+ "indexed": true,
250
+ "internalType": "address",
251
+ "name": "sender",
252
+ "type": "address"
253
+ }
254
+ ],
255
+ "name": "RoleRevoked",
256
+ "type": "event"
257
+ },
258
+ {
259
+ "inputs": [],
260
+ "name": "ALLO_OWNER",
261
+ "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
262
+ "stateMutability": "view",
263
+ "type": "function"
264
+ },
265
+ {
266
+ "inputs": [],
267
+ "name": "DEFAULT_ADMIN_ROLE",
268
+ "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
269
+ "stateMutability": "view",
270
+ "type": "function"
271
+ },
272
+ {
273
+ "inputs": [],
274
+ "name": "NATIVE",
275
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
276
+ "stateMutability": "view",
277
+ "type": "function"
278
+ },
279
+ {
280
+ "inputs": [
281
+ { "internalType": "bytes32", "name": "_profileId", "type": "bytes32" }
282
+ ],
283
+ "name": "acceptProfileOwnership",
284
+ "outputs": [],
285
+ "stateMutability": "nonpayable",
286
+ "type": "function"
287
+ },
288
+ {
289
+ "inputs": [
290
+ { "internalType": "bytes32", "name": "_profileId", "type": "bytes32" },
291
+ { "internalType": "address[]", "name": "_members", "type": "address[]" }
292
+ ],
293
+ "name": "addMembers",
294
+ "outputs": [],
295
+ "stateMutability": "nonpayable",
296
+ "type": "function"
297
+ },
298
+ {
299
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
300
+ "name": "anchorToProfileId",
301
+ "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
302
+ "stateMutability": "view",
303
+ "type": "function"
304
+ },
305
+ {
306
+ "inputs": [
307
+ { "internalType": "uint256", "name": "_nonce", "type": "uint256" },
308
+ { "internalType": "string", "name": "_name", "type": "string" },
309
+ {
310
+ "components": [
311
+ { "internalType": "uint256", "name": "protocol", "type": "uint256" },
312
+ { "internalType": "string", "name": "pointer", "type": "string" }
313
+ ],
314
+ "internalType": "struct Metadata",
315
+ "name": "_metadata",
316
+ "type": "tuple"
317
+ },
318
+ { "internalType": "address", "name": "_owner", "type": "address" },
319
+ { "internalType": "address[]", "name": "_members", "type": "address[]" }
320
+ ],
321
+ "name": "createProfile",
322
+ "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
323
+ "stateMutability": "nonpayable",
324
+ "type": "function"
325
+ },
326
+ {
327
+ "inputs": [
328
+ { "internalType": "address", "name": "_anchor", "type": "address" }
329
+ ],
330
+ "name": "getProfileByAnchor",
331
+ "outputs": [
332
+ {
333
+ "components": [
334
+ { "internalType": "bytes32", "name": "id", "type": "bytes32" },
335
+ { "internalType": "uint256", "name": "nonce", "type": "uint256" },
336
+ { "internalType": "string", "name": "name", "type": "string" },
337
+ {
338
+ "components": [
339
+ {
340
+ "internalType": "uint256",
341
+ "name": "protocol",
342
+ "type": "uint256"
343
+ },
344
+ { "internalType": "string", "name": "pointer", "type": "string" }
345
+ ],
346
+ "internalType": "struct Metadata",
347
+ "name": "metadata",
348
+ "type": "tuple"
349
+ },
350
+ { "internalType": "address", "name": "owner", "type": "address" },
351
+ { "internalType": "address", "name": "anchor", "type": "address" }
352
+ ],
353
+ "internalType": "struct IRegistry.Profile",
354
+ "name": "",
355
+ "type": "tuple"
356
+ }
357
+ ],
358
+ "stateMutability": "view",
359
+ "type": "function"
360
+ },
361
+ {
362
+ "inputs": [
363
+ { "internalType": "bytes32", "name": "_profileId", "type": "bytes32" }
364
+ ],
365
+ "name": "getProfileById",
366
+ "outputs": [
367
+ {
368
+ "components": [
369
+ { "internalType": "bytes32", "name": "id", "type": "bytes32" },
370
+ { "internalType": "uint256", "name": "nonce", "type": "uint256" },
371
+ { "internalType": "string", "name": "name", "type": "string" },
372
+ {
373
+ "components": [
374
+ {
375
+ "internalType": "uint256",
376
+ "name": "protocol",
377
+ "type": "uint256"
378
+ },
379
+ { "internalType": "string", "name": "pointer", "type": "string" }
380
+ ],
381
+ "internalType": "struct Metadata",
382
+ "name": "metadata",
383
+ "type": "tuple"
384
+ },
385
+ { "internalType": "address", "name": "owner", "type": "address" },
386
+ { "internalType": "address", "name": "anchor", "type": "address" }
387
+ ],
388
+ "internalType": "struct IRegistry.Profile",
389
+ "name": "",
390
+ "type": "tuple"
391
+ }
392
+ ],
393
+ "stateMutability": "view",
394
+ "type": "function"
395
+ },
396
+ {
397
+ "inputs": [
398
+ { "internalType": "bytes32", "name": "role", "type": "bytes32" }
399
+ ],
400
+ "name": "getRoleAdmin",
401
+ "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
402
+ "stateMutability": "view",
403
+ "type": "function"
404
+ },
405
+ {
406
+ "inputs": [
407
+ { "internalType": "bytes32", "name": "role", "type": "bytes32" },
408
+ { "internalType": "address", "name": "account", "type": "address" }
409
+ ],
410
+ "name": "grantRole",
411
+ "outputs": [],
412
+ "stateMutability": "nonpayable",
413
+ "type": "function"
414
+ },
415
+ {
416
+ "inputs": [
417
+ { "internalType": "bytes32", "name": "role", "type": "bytes32" },
418
+ { "internalType": "address", "name": "account", "type": "address" }
419
+ ],
420
+ "name": "hasRole",
421
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
422
+ "stateMutability": "view",
423
+ "type": "function"
424
+ },
425
+ {
426
+ "inputs": [
427
+ { "internalType": "address", "name": "_owner", "type": "address" }
428
+ ],
429
+ "name": "initialize",
430
+ "outputs": [],
431
+ "stateMutability": "nonpayable",
432
+ "type": "function"
433
+ },
434
+ {
435
+ "inputs": [
436
+ { "internalType": "bytes32", "name": "_profileId", "type": "bytes32" },
437
+ { "internalType": "address", "name": "_member", "type": "address" }
438
+ ],
439
+ "name": "isMemberOfProfile",
440
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
441
+ "stateMutability": "view",
442
+ "type": "function"
443
+ },
444
+ {
445
+ "inputs": [
446
+ { "internalType": "bytes32", "name": "_profileId", "type": "bytes32" },
447
+ { "internalType": "address", "name": "_owner", "type": "address" }
448
+ ],
449
+ "name": "isOwnerOfProfile",
450
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
451
+ "stateMutability": "view",
452
+ "type": "function"
453
+ },
454
+ {
455
+ "inputs": [
456
+ { "internalType": "bytes32", "name": "_profileId", "type": "bytes32" },
457
+ { "internalType": "address", "name": "_account", "type": "address" }
458
+ ],
459
+ "name": "isOwnerOrMemberOfProfile",
460
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
461
+ "stateMutability": "view",
462
+ "type": "function"
463
+ },
464
+ {
465
+ "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
466
+ "name": "profileIdToPendingOwner",
467
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
468
+ "stateMutability": "view",
469
+ "type": "function"
470
+ },
471
+ {
472
+ "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
473
+ "name": "profilesById",
474
+ "outputs": [
475
+ { "internalType": "bytes32", "name": "id", "type": "bytes32" },
476
+ { "internalType": "uint256", "name": "nonce", "type": "uint256" },
477
+ { "internalType": "string", "name": "name", "type": "string" },
478
+ {
479
+ "components": [
480
+ { "internalType": "uint256", "name": "protocol", "type": "uint256" },
481
+ { "internalType": "string", "name": "pointer", "type": "string" }
482
+ ],
483
+ "internalType": "struct Metadata",
484
+ "name": "metadata",
485
+ "type": "tuple"
486
+ },
487
+ { "internalType": "address", "name": "owner", "type": "address" },
488
+ { "internalType": "address", "name": "anchor", "type": "address" }
489
+ ],
490
+ "stateMutability": "view",
491
+ "type": "function"
492
+ },
493
+ {
494
+ "inputs": [
495
+ { "internalType": "address", "name": "_token", "type": "address" },
496
+ { "internalType": "address", "name": "_recipient", "type": "address" }
497
+ ],
498
+ "name": "recoverFunds",
499
+ "outputs": [],
500
+ "stateMutability": "nonpayable",
501
+ "type": "function"
502
+ },
503
+ {
504
+ "inputs": [
505
+ { "internalType": "bytes32", "name": "_profileId", "type": "bytes32" },
506
+ { "internalType": "address[]", "name": "_members", "type": "address[]" }
507
+ ],
508
+ "name": "removeMembers",
509
+ "outputs": [],
510
+ "stateMutability": "nonpayable",
511
+ "type": "function"
512
+ },
513
+ {
514
+ "inputs": [
515
+ { "internalType": "bytes32", "name": "role", "type": "bytes32" },
516
+ { "internalType": "address", "name": "account", "type": "address" }
517
+ ],
518
+ "name": "renounceRole",
519
+ "outputs": [],
520
+ "stateMutability": "nonpayable",
521
+ "type": "function"
522
+ },
523
+ {
524
+ "inputs": [
525
+ { "internalType": "bytes32", "name": "role", "type": "bytes32" },
526
+ { "internalType": "address", "name": "account", "type": "address" }
527
+ ],
528
+ "name": "revokeRole",
529
+ "outputs": [],
530
+ "stateMutability": "nonpayable",
531
+ "type": "function"
532
+ },
533
+ {
534
+ "inputs": [
535
+ { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }
536
+ ],
537
+ "name": "supportsInterface",
538
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
539
+ "stateMutability": "view",
540
+ "type": "function"
541
+ },
542
+ {
543
+ "inputs": [
544
+ { "internalType": "bytes32", "name": "_profileId", "type": "bytes32" },
545
+ {
546
+ "components": [
547
+ { "internalType": "uint256", "name": "protocol", "type": "uint256" },
548
+ { "internalType": "string", "name": "pointer", "type": "string" }
549
+ ],
550
+ "internalType": "struct Metadata",
551
+ "name": "_metadata",
552
+ "type": "tuple"
553
+ }
554
+ ],
555
+ "name": "updateProfileMetadata",
556
+ "outputs": [],
557
+ "stateMutability": "nonpayable",
558
+ "type": "function"
559
+ },
560
+ {
561
+ "inputs": [
562
+ { "internalType": "bytes32", "name": "_profileId", "type": "bytes32" },
563
+ { "internalType": "string", "name": "_name", "type": "string" }
564
+ ],
565
+ "name": "updateProfileName",
566
+ "outputs": [
567
+ { "internalType": "address", "name": "anchor", "type": "address" }
568
+ ],
569
+ "stateMutability": "nonpayable",
570
+ "type": "function"
571
+ },
572
+ {
573
+ "inputs": [
574
+ { "internalType": "bytes32", "name": "_profileId", "type": "bytes32" },
575
+ { "internalType": "address", "name": "_pendingOwner", "type": "address" }
576
+ ],
577
+ "name": "updateProfilePendingOwner",
578
+ "outputs": [],
579
+ "stateMutability": "nonpayable",
580
+ "type": "function"
581
+ }
582
+ ]
@@ -194,7 +194,7 @@ class Attestation {
194
194
  this._data.type = this.type;
195
195
  this.schema.setValue('json', JSON.stringify(this._data));
196
196
  }
197
- if (remoteClient) {
197
+ if (remoteClient && JSON.stringify(this._data)?.length > 1500) {
198
198
  const cid = await remoteClient.save(this._data, this.schema.name);
199
199
  const encodedData = remoteClient.encode(cid);
200
200
  this.schema.setValue('json', JSON.stringify(encodedData));
@@ -0,0 +1,16 @@
1
+ import { ethers } from "ethers";
2
+ import { GrantArgs } from "../types/allo";
3
+ import { NFTStorage } from "nft.storage";
4
+ export declare class AlloBase {
5
+ private signer;
6
+ private contract;
7
+ private static ipfsClient;
8
+ private allo;
9
+ constructor(signer: ethers.Signer, ipfsStorage: NFTStorage, chainId: number);
10
+ saveAndGetCID(data: any): Promise<import("nft.storage").CIDString>;
11
+ encodeStrategyInitData(applicationStart: number, applicationEnd: number, roundStart: number, roundEnd: number, payoutToken: string): Promise<string>;
12
+ createGrant(args: GrantArgs): Promise<{
13
+ poolId: string;
14
+ txHash: string;
15
+ }>;
16
+ }