@solfund/idl 0.1.1 → 0.1.2
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/dist/index.cjs +29 -194
- package/dist/index.d.cts +13 -23
- package/dist/index.d.ts +13 -23
- package/dist/index.js +29 -194
- package/package.json +38 -38
package/dist/index.cjs
CHANGED
|
@@ -35,7 +35,7 @@ __export(exports_anchor_crowdfunding_idl, {
|
|
|
35
35
|
module.exports = __toCommonJS(exports_anchor_crowdfunding_idl);
|
|
36
36
|
// anchor_solana_crowdfunding.json
|
|
37
37
|
var anchor_solana_crowdfunding_default = {
|
|
38
|
-
address: "
|
|
38
|
+
address: "BM4pzjf5fqdeX7cKtRgVARK2PLKBiM4PU2xPZFEZkSff",
|
|
39
39
|
metadata: {
|
|
40
40
|
name: "anchor_solana_crowdfunding",
|
|
41
41
|
version: "0.1.0",
|
|
@@ -45,16 +45,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
45
45
|
instructions: [
|
|
46
46
|
{
|
|
47
47
|
name: "cancel_campaign",
|
|
48
|
-
discriminator: [
|
|
49
|
-
66,
|
|
50
|
-
10,
|
|
51
|
-
32,
|
|
52
|
-
138,
|
|
53
|
-
122,
|
|
54
|
-
36,
|
|
55
|
-
134,
|
|
56
|
-
202
|
|
57
|
-
],
|
|
48
|
+
discriminator: [66, 10, 32, 138, 122, 36, 134, 202],
|
|
58
49
|
accounts: [
|
|
59
50
|
{
|
|
60
51
|
name: "campaign",
|
|
@@ -69,16 +60,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
69
60
|
},
|
|
70
61
|
{
|
|
71
62
|
name: "contribute",
|
|
72
|
-
discriminator: [
|
|
73
|
-
82,
|
|
74
|
-
33,
|
|
75
|
-
68,
|
|
76
|
-
131,
|
|
77
|
-
32,
|
|
78
|
-
0,
|
|
79
|
-
205,
|
|
80
|
-
95
|
|
81
|
-
],
|
|
63
|
+
discriminator: [82, 33, 68, 131, 32, 0, 205, 95],
|
|
82
64
|
accounts: [
|
|
83
65
|
{
|
|
84
66
|
name: "campaign",
|
|
@@ -91,20 +73,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
91
73
|
seeds: [
|
|
92
74
|
{
|
|
93
75
|
kind: "const",
|
|
94
|
-
value: [
|
|
95
|
-
99,
|
|
96
|
-
111,
|
|
97
|
-
110,
|
|
98
|
-
116,
|
|
99
|
-
114,
|
|
100
|
-
105,
|
|
101
|
-
98,
|
|
102
|
-
117,
|
|
103
|
-
116,
|
|
104
|
-
105,
|
|
105
|
-
111,
|
|
106
|
-
110
|
|
107
|
-
]
|
|
76
|
+
value: [99, 111, 110, 116, 114, 105, 98, 117, 116, 105, 111, 110]
|
|
108
77
|
},
|
|
109
78
|
{
|
|
110
79
|
kind: "account",
|
|
@@ -136,16 +105,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
136
105
|
},
|
|
137
106
|
{
|
|
138
107
|
name: "create_campaign",
|
|
139
|
-
discriminator: [
|
|
140
|
-
111,
|
|
141
|
-
131,
|
|
142
|
-
187,
|
|
143
|
-
98,
|
|
144
|
-
160,
|
|
145
|
-
193,
|
|
146
|
-
114,
|
|
147
|
-
244
|
|
148
|
-
],
|
|
108
|
+
discriminator: [111, 131, 187, 98, 160, 193, 114, 244],
|
|
149
109
|
accounts: [
|
|
150
110
|
{
|
|
151
111
|
name: "campaign",
|
|
@@ -154,16 +114,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
154
114
|
seeds: [
|
|
155
115
|
{
|
|
156
116
|
kind: "const",
|
|
157
|
-
value: [
|
|
158
|
-
99,
|
|
159
|
-
97,
|
|
160
|
-
109,
|
|
161
|
-
112,
|
|
162
|
-
97,
|
|
163
|
-
105,
|
|
164
|
-
103,
|
|
165
|
-
110
|
|
166
|
-
]
|
|
117
|
+
value: [99, 97, 109, 112, 97, 105, 103, 110]
|
|
167
118
|
},
|
|
168
119
|
{
|
|
169
120
|
kind: "account",
|
|
@@ -191,10 +142,6 @@ var anchor_solana_crowdfunding_default = {
|
|
|
191
142
|
name: "title",
|
|
192
143
|
type: "string"
|
|
193
144
|
},
|
|
194
|
-
{
|
|
195
|
-
name: "description",
|
|
196
|
-
type: "string"
|
|
197
|
-
},
|
|
198
145
|
{
|
|
199
146
|
name: "target_amount",
|
|
200
147
|
type: "u64"
|
|
@@ -207,16 +154,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
207
154
|
},
|
|
208
155
|
{
|
|
209
156
|
name: "create_contribution",
|
|
210
|
-
discriminator: [
|
|
211
|
-
239,
|
|
212
|
-
215,
|
|
213
|
-
102,
|
|
214
|
-
103,
|
|
215
|
-
123,
|
|
216
|
-
112,
|
|
217
|
-
178,
|
|
218
|
-
68
|
|
219
|
-
],
|
|
157
|
+
discriminator: [239, 215, 102, 103, 123, 112, 178, 68],
|
|
220
158
|
accounts: [
|
|
221
159
|
{
|
|
222
160
|
name: "campaign"
|
|
@@ -228,20 +166,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
228
166
|
seeds: [
|
|
229
167
|
{
|
|
230
168
|
kind: "const",
|
|
231
|
-
value: [
|
|
232
|
-
99,
|
|
233
|
-
111,
|
|
234
|
-
110,
|
|
235
|
-
116,
|
|
236
|
-
114,
|
|
237
|
-
105,
|
|
238
|
-
98,
|
|
239
|
-
117,
|
|
240
|
-
116,
|
|
241
|
-
105,
|
|
242
|
-
111,
|
|
243
|
-
110
|
|
244
|
-
]
|
|
169
|
+
value: [99, 111, 110, 116, 114, 105, 98, 117, 116, 105, 111, 110]
|
|
245
170
|
},
|
|
246
171
|
{
|
|
247
172
|
kind: "account",
|
|
@@ -268,16 +193,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
268
193
|
},
|
|
269
194
|
{
|
|
270
195
|
name: "refund",
|
|
271
|
-
discriminator: [
|
|
272
|
-
2,
|
|
273
|
-
96,
|
|
274
|
-
183,
|
|
275
|
-
251,
|
|
276
|
-
63,
|
|
277
|
-
208,
|
|
278
|
-
46,
|
|
279
|
-
46
|
|
280
|
-
],
|
|
196
|
+
discriminator: [2, 96, 183, 251, 63, 208, 46, 46],
|
|
281
197
|
accounts: [
|
|
282
198
|
{
|
|
283
199
|
name: "campaign",
|
|
@@ -297,16 +213,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
297
213
|
},
|
|
298
214
|
{
|
|
299
215
|
name: "withdraw",
|
|
300
|
-
discriminator: [
|
|
301
|
-
183,
|
|
302
|
-
18,
|
|
303
|
-
70,
|
|
304
|
-
156,
|
|
305
|
-
148,
|
|
306
|
-
109,
|
|
307
|
-
161,
|
|
308
|
-
34
|
|
309
|
-
],
|
|
216
|
+
discriminator: [183, 18, 70, 156, 148, 109, 161, 34],
|
|
310
217
|
accounts: [
|
|
311
218
|
{
|
|
312
219
|
name: "campaign",
|
|
@@ -324,96 +231,33 @@ var anchor_solana_crowdfunding_default = {
|
|
|
324
231
|
accounts: [
|
|
325
232
|
{
|
|
326
233
|
name: "Campaign",
|
|
327
|
-
discriminator: [
|
|
328
|
-
50,
|
|
329
|
-
40,
|
|
330
|
-
49,
|
|
331
|
-
11,
|
|
332
|
-
157,
|
|
333
|
-
220,
|
|
334
|
-
229,
|
|
335
|
-
192
|
|
336
|
-
]
|
|
234
|
+
discriminator: [50, 40, 49, 11, 157, 220, 229, 192]
|
|
337
235
|
},
|
|
338
236
|
{
|
|
339
237
|
name: "Contribution",
|
|
340
|
-
discriminator: [
|
|
341
|
-
182,
|
|
342
|
-
187,
|
|
343
|
-
14,
|
|
344
|
-
111,
|
|
345
|
-
72,
|
|
346
|
-
167,
|
|
347
|
-
242,
|
|
348
|
-
212
|
|
349
|
-
]
|
|
238
|
+
discriminator: [182, 187, 14, 111, 72, 167, 242, 212]
|
|
350
239
|
}
|
|
351
240
|
],
|
|
352
241
|
events: [
|
|
353
242
|
{
|
|
354
243
|
name: "CampaignCancelled",
|
|
355
|
-
discriminator: [
|
|
356
|
-
121,
|
|
357
|
-
171,
|
|
358
|
-
21,
|
|
359
|
-
55,
|
|
360
|
-
56,
|
|
361
|
-
234,
|
|
362
|
-
121,
|
|
363
|
-
44
|
|
364
|
-
]
|
|
244
|
+
discriminator: [121, 171, 21, 55, 56, 234, 121, 44]
|
|
365
245
|
},
|
|
366
246
|
{
|
|
367
247
|
name: "CampaignCreated",
|
|
368
|
-
discriminator: [
|
|
369
|
-
9,
|
|
370
|
-
98,
|
|
371
|
-
69,
|
|
372
|
-
61,
|
|
373
|
-
53,
|
|
374
|
-
131,
|
|
375
|
-
64,
|
|
376
|
-
152
|
|
377
|
-
]
|
|
248
|
+
discriminator: [9, 98, 69, 61, 53, 131, 64, 152]
|
|
378
249
|
},
|
|
379
250
|
{
|
|
380
251
|
name: "ContributionMade",
|
|
381
|
-
discriminator: [
|
|
382
|
-
81,
|
|
383
|
-
218,
|
|
384
|
-
72,
|
|
385
|
-
109,
|
|
386
|
-
93,
|
|
387
|
-
96,
|
|
388
|
-
131,
|
|
389
|
-
199
|
|
390
|
-
]
|
|
252
|
+
discriminator: [81, 218, 72, 109, 93, 96, 131, 199]
|
|
391
253
|
},
|
|
392
254
|
{
|
|
393
255
|
name: "FundsWithdrawn",
|
|
394
|
-
discriminator: [
|
|
395
|
-
56,
|
|
396
|
-
130,
|
|
397
|
-
230,
|
|
398
|
-
154,
|
|
399
|
-
35,
|
|
400
|
-
92,
|
|
401
|
-
11,
|
|
402
|
-
118
|
|
403
|
-
]
|
|
256
|
+
discriminator: [56, 130, 230, 154, 35, 92, 11, 118]
|
|
404
257
|
},
|
|
405
258
|
{
|
|
406
259
|
name: "RefundIssued",
|
|
407
|
-
discriminator: [
|
|
408
|
-
249,
|
|
409
|
-
16,
|
|
410
|
-
159,
|
|
411
|
-
159,
|
|
412
|
-
93,
|
|
413
|
-
186,
|
|
414
|
-
145,
|
|
415
|
-
206
|
|
416
|
-
]
|
|
260
|
+
discriminator: [249, 16, 159, 159, 93, 186, 145, 206]
|
|
417
261
|
}
|
|
418
262
|
],
|
|
419
263
|
errors: [
|
|
@@ -424,71 +268,66 @@ var anchor_solana_crowdfunding_default = {
|
|
|
424
268
|
},
|
|
425
269
|
{
|
|
426
270
|
code: 6001,
|
|
427
|
-
name: "DescriptionTooLong",
|
|
428
|
-
msg: "Description exceeds maximum length of 2000 characters"
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
code: 6002,
|
|
432
271
|
name: "InvalidAmount",
|
|
433
272
|
msg: "Amount must be greater than zero"
|
|
434
273
|
},
|
|
435
274
|
{
|
|
436
|
-
code:
|
|
275
|
+
code: 6002,
|
|
437
276
|
name: "InvalidDeadline",
|
|
438
277
|
msg: "Deadline must be in the future"
|
|
439
278
|
},
|
|
440
279
|
{
|
|
441
|
-
code:
|
|
280
|
+
code: 6003,
|
|
442
281
|
name: "CampaignNotActive",
|
|
443
282
|
msg: "Campaign is not active"
|
|
444
283
|
},
|
|
445
284
|
{
|
|
446
|
-
code:
|
|
285
|
+
code: 6004,
|
|
447
286
|
name: "CampaignEnded",
|
|
448
287
|
msg: "Campaign has already ended"
|
|
449
288
|
},
|
|
450
289
|
{
|
|
451
|
-
code:
|
|
290
|
+
code: 6005,
|
|
452
291
|
name: "CampaignNotEnded",
|
|
453
292
|
msg: "Campaign has not ended yet"
|
|
454
293
|
},
|
|
455
294
|
{
|
|
456
|
-
code:
|
|
295
|
+
code: 6006,
|
|
457
296
|
name: "AlreadyWithdrawn",
|
|
458
297
|
msg: "Funds have already been withdrawn"
|
|
459
298
|
},
|
|
460
299
|
{
|
|
461
|
-
code:
|
|
300
|
+
code: 6007,
|
|
462
301
|
name: "TargetNotReached",
|
|
463
302
|
msg: "Target amount not reached"
|
|
464
303
|
},
|
|
465
304
|
{
|
|
466
|
-
code:
|
|
305
|
+
code: 6008,
|
|
467
306
|
name: "TargetReached",
|
|
468
307
|
msg: "Target amount has been reached, no refunds available"
|
|
469
308
|
},
|
|
470
309
|
{
|
|
471
|
-
code:
|
|
310
|
+
code: 6009,
|
|
472
311
|
name: "AlreadyRefunded",
|
|
473
312
|
msg: "Contribution has already been refunded"
|
|
474
313
|
},
|
|
475
314
|
{
|
|
476
|
-
code:
|
|
315
|
+
code: 6010,
|
|
477
316
|
name: "Unauthorized",
|
|
478
317
|
msg: "Unauthorized action"
|
|
479
318
|
},
|
|
480
319
|
{
|
|
481
|
-
code:
|
|
320
|
+
code: 6011,
|
|
482
321
|
name: "Overflow",
|
|
483
322
|
msg: "Numerical overflow occurred"
|
|
484
323
|
},
|
|
485
324
|
{
|
|
486
|
-
code:
|
|
325
|
+
code: 6012,
|
|
487
326
|
name: "CampaignHasContributions",
|
|
488
327
|
msg: "Cannot cancel campaign with existing contributions"
|
|
489
328
|
},
|
|
490
329
|
{
|
|
491
|
-
code:
|
|
330
|
+
code: 6013,
|
|
492
331
|
name: "InsufficientFunds",
|
|
493
332
|
msg: "Insufficient funds in account"
|
|
494
333
|
}
|
|
@@ -507,10 +346,6 @@ var anchor_solana_crowdfunding_default = {
|
|
|
507
346
|
name: "title",
|
|
508
347
|
type: "string"
|
|
509
348
|
},
|
|
510
|
-
{
|
|
511
|
-
name: "description",
|
|
512
|
-
type: "string"
|
|
513
|
-
},
|
|
514
349
|
{
|
|
515
350
|
name: "target_amount",
|
|
516
351
|
type: "u64"
|
package/dist/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* IDL can be found at `target/idl/anchor_solana_crowdfunding.json`.
|
|
6
6
|
*/
|
|
7
7
|
type AnchorSolanaCrowdfunding = {
|
|
8
|
-
"address": "
|
|
8
|
+
"address": "BM4pzjf5fqdeX7cKtRgVARK2PLKBiM4PU2xPZFEZkSff";
|
|
9
9
|
"metadata": {
|
|
10
10
|
"name": "anchorSolanaCrowdfunding";
|
|
11
11
|
"version": "0.1.0";
|
|
@@ -85,9 +85,6 @@ type AnchorSolanaCrowdfunding = {
|
|
|
85
85
|
"args": [{
|
|
86
86
|
"name": "title";
|
|
87
87
|
"type": "string";
|
|
88
|
-
}, {
|
|
89
|
-
"name": "description";
|
|
90
|
-
"type": "string";
|
|
91
88
|
}, {
|
|
92
89
|
"name": "targetAmount";
|
|
93
90
|
"type": "u64";
|
|
@@ -181,58 +178,54 @@ type AnchorSolanaCrowdfunding = {
|
|
|
181
178
|
"msg": "Title exceeds maximum length of 100 characters";
|
|
182
179
|
}, {
|
|
183
180
|
"code": 6001;
|
|
184
|
-
"name": "descriptionTooLong";
|
|
185
|
-
"msg": "Description exceeds maximum length of 2000 characters";
|
|
186
|
-
}, {
|
|
187
|
-
"code": 6002;
|
|
188
181
|
"name": "invalidAmount";
|
|
189
182
|
"msg": "Amount must be greater than zero";
|
|
190
183
|
}, {
|
|
191
|
-
"code":
|
|
184
|
+
"code": 6002;
|
|
192
185
|
"name": "invalidDeadline";
|
|
193
186
|
"msg": "Deadline must be in the future";
|
|
194
187
|
}, {
|
|
195
|
-
"code":
|
|
188
|
+
"code": 6003;
|
|
196
189
|
"name": "campaignNotActive";
|
|
197
190
|
"msg": "Campaign is not active";
|
|
198
191
|
}, {
|
|
199
|
-
"code":
|
|
192
|
+
"code": 6004;
|
|
200
193
|
"name": "campaignEnded";
|
|
201
194
|
"msg": "Campaign has already ended";
|
|
202
195
|
}, {
|
|
203
|
-
"code":
|
|
196
|
+
"code": 6005;
|
|
204
197
|
"name": "campaignNotEnded";
|
|
205
198
|
"msg": "Campaign has not ended yet";
|
|
206
199
|
}, {
|
|
207
|
-
"code":
|
|
200
|
+
"code": 6006;
|
|
208
201
|
"name": "alreadyWithdrawn";
|
|
209
202
|
"msg": "Funds have already been withdrawn";
|
|
210
203
|
}, {
|
|
211
|
-
"code":
|
|
204
|
+
"code": 6007;
|
|
212
205
|
"name": "targetNotReached";
|
|
213
206
|
"msg": "Target amount not reached";
|
|
214
207
|
}, {
|
|
215
|
-
"code":
|
|
208
|
+
"code": 6008;
|
|
216
209
|
"name": "targetReached";
|
|
217
210
|
"msg": "Target amount has been reached, no refunds available";
|
|
218
211
|
}, {
|
|
219
|
-
"code":
|
|
212
|
+
"code": 6009;
|
|
220
213
|
"name": "alreadyRefunded";
|
|
221
214
|
"msg": "Contribution has already been refunded";
|
|
222
215
|
}, {
|
|
223
|
-
"code":
|
|
216
|
+
"code": 6010;
|
|
224
217
|
"name": "unauthorized";
|
|
225
218
|
"msg": "Unauthorized action";
|
|
226
219
|
}, {
|
|
227
|
-
"code":
|
|
220
|
+
"code": 6011;
|
|
228
221
|
"name": "overflow";
|
|
229
222
|
"msg": "Numerical overflow occurred";
|
|
230
223
|
}, {
|
|
231
|
-
"code":
|
|
224
|
+
"code": 6012;
|
|
232
225
|
"name": "campaignHasContributions";
|
|
233
226
|
"msg": "Cannot cancel campaign with existing contributions";
|
|
234
227
|
}, {
|
|
235
|
-
"code":
|
|
228
|
+
"code": 6013;
|
|
236
229
|
"name": "insufficientFunds";
|
|
237
230
|
"msg": "Insufficient funds in account";
|
|
238
231
|
}];
|
|
@@ -246,9 +239,6 @@ type AnchorSolanaCrowdfunding = {
|
|
|
246
239
|
}, {
|
|
247
240
|
"name": "title";
|
|
248
241
|
"type": "string";
|
|
249
|
-
}, {
|
|
250
|
-
"name": "description";
|
|
251
|
-
"type": "string";
|
|
252
242
|
}, {
|
|
253
243
|
"name": "targetAmount";
|
|
254
244
|
"type": "u64";
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* IDL can be found at `target/idl/anchor_solana_crowdfunding.json`.
|
|
6
6
|
*/
|
|
7
7
|
type AnchorSolanaCrowdfunding = {
|
|
8
|
-
"address": "
|
|
8
|
+
"address": "BM4pzjf5fqdeX7cKtRgVARK2PLKBiM4PU2xPZFEZkSff";
|
|
9
9
|
"metadata": {
|
|
10
10
|
"name": "anchorSolanaCrowdfunding";
|
|
11
11
|
"version": "0.1.0";
|
|
@@ -85,9 +85,6 @@ type AnchorSolanaCrowdfunding = {
|
|
|
85
85
|
"args": [{
|
|
86
86
|
"name": "title";
|
|
87
87
|
"type": "string";
|
|
88
|
-
}, {
|
|
89
|
-
"name": "description";
|
|
90
|
-
"type": "string";
|
|
91
88
|
}, {
|
|
92
89
|
"name": "targetAmount";
|
|
93
90
|
"type": "u64";
|
|
@@ -181,58 +178,54 @@ type AnchorSolanaCrowdfunding = {
|
|
|
181
178
|
"msg": "Title exceeds maximum length of 100 characters";
|
|
182
179
|
}, {
|
|
183
180
|
"code": 6001;
|
|
184
|
-
"name": "descriptionTooLong";
|
|
185
|
-
"msg": "Description exceeds maximum length of 2000 characters";
|
|
186
|
-
}, {
|
|
187
|
-
"code": 6002;
|
|
188
181
|
"name": "invalidAmount";
|
|
189
182
|
"msg": "Amount must be greater than zero";
|
|
190
183
|
}, {
|
|
191
|
-
"code":
|
|
184
|
+
"code": 6002;
|
|
192
185
|
"name": "invalidDeadline";
|
|
193
186
|
"msg": "Deadline must be in the future";
|
|
194
187
|
}, {
|
|
195
|
-
"code":
|
|
188
|
+
"code": 6003;
|
|
196
189
|
"name": "campaignNotActive";
|
|
197
190
|
"msg": "Campaign is not active";
|
|
198
191
|
}, {
|
|
199
|
-
"code":
|
|
192
|
+
"code": 6004;
|
|
200
193
|
"name": "campaignEnded";
|
|
201
194
|
"msg": "Campaign has already ended";
|
|
202
195
|
}, {
|
|
203
|
-
"code":
|
|
196
|
+
"code": 6005;
|
|
204
197
|
"name": "campaignNotEnded";
|
|
205
198
|
"msg": "Campaign has not ended yet";
|
|
206
199
|
}, {
|
|
207
|
-
"code":
|
|
200
|
+
"code": 6006;
|
|
208
201
|
"name": "alreadyWithdrawn";
|
|
209
202
|
"msg": "Funds have already been withdrawn";
|
|
210
203
|
}, {
|
|
211
|
-
"code":
|
|
204
|
+
"code": 6007;
|
|
212
205
|
"name": "targetNotReached";
|
|
213
206
|
"msg": "Target amount not reached";
|
|
214
207
|
}, {
|
|
215
|
-
"code":
|
|
208
|
+
"code": 6008;
|
|
216
209
|
"name": "targetReached";
|
|
217
210
|
"msg": "Target amount has been reached, no refunds available";
|
|
218
211
|
}, {
|
|
219
|
-
"code":
|
|
212
|
+
"code": 6009;
|
|
220
213
|
"name": "alreadyRefunded";
|
|
221
214
|
"msg": "Contribution has already been refunded";
|
|
222
215
|
}, {
|
|
223
|
-
"code":
|
|
216
|
+
"code": 6010;
|
|
224
217
|
"name": "unauthorized";
|
|
225
218
|
"msg": "Unauthorized action";
|
|
226
219
|
}, {
|
|
227
|
-
"code":
|
|
220
|
+
"code": 6011;
|
|
228
221
|
"name": "overflow";
|
|
229
222
|
"msg": "Numerical overflow occurred";
|
|
230
223
|
}, {
|
|
231
|
-
"code":
|
|
224
|
+
"code": 6012;
|
|
232
225
|
"name": "campaignHasContributions";
|
|
233
226
|
"msg": "Cannot cancel campaign with existing contributions";
|
|
234
227
|
}, {
|
|
235
|
-
"code":
|
|
228
|
+
"code": 6013;
|
|
236
229
|
"name": "insufficientFunds";
|
|
237
230
|
"msg": "Insufficient funds in account";
|
|
238
231
|
}];
|
|
@@ -246,9 +239,6 @@ type AnchorSolanaCrowdfunding = {
|
|
|
246
239
|
}, {
|
|
247
240
|
"name": "title";
|
|
248
241
|
"type": "string";
|
|
249
|
-
}, {
|
|
250
|
-
"name": "description";
|
|
251
|
-
"type": "string";
|
|
252
242
|
}, {
|
|
253
243
|
"name": "targetAmount";
|
|
254
244
|
"type": "u64";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// anchor_solana_crowdfunding.json
|
|
2
2
|
var anchor_solana_crowdfunding_default = {
|
|
3
|
-
address: "
|
|
3
|
+
address: "BM4pzjf5fqdeX7cKtRgVARK2PLKBiM4PU2xPZFEZkSff",
|
|
4
4
|
metadata: {
|
|
5
5
|
name: "anchor_solana_crowdfunding",
|
|
6
6
|
version: "0.1.0",
|
|
@@ -10,16 +10,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
10
10
|
instructions: [
|
|
11
11
|
{
|
|
12
12
|
name: "cancel_campaign",
|
|
13
|
-
discriminator: [
|
|
14
|
-
66,
|
|
15
|
-
10,
|
|
16
|
-
32,
|
|
17
|
-
138,
|
|
18
|
-
122,
|
|
19
|
-
36,
|
|
20
|
-
134,
|
|
21
|
-
202
|
|
22
|
-
],
|
|
13
|
+
discriminator: [66, 10, 32, 138, 122, 36, 134, 202],
|
|
23
14
|
accounts: [
|
|
24
15
|
{
|
|
25
16
|
name: "campaign",
|
|
@@ -34,16 +25,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
34
25
|
},
|
|
35
26
|
{
|
|
36
27
|
name: "contribute",
|
|
37
|
-
discriminator: [
|
|
38
|
-
82,
|
|
39
|
-
33,
|
|
40
|
-
68,
|
|
41
|
-
131,
|
|
42
|
-
32,
|
|
43
|
-
0,
|
|
44
|
-
205,
|
|
45
|
-
95
|
|
46
|
-
],
|
|
28
|
+
discriminator: [82, 33, 68, 131, 32, 0, 205, 95],
|
|
47
29
|
accounts: [
|
|
48
30
|
{
|
|
49
31
|
name: "campaign",
|
|
@@ -56,20 +38,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
56
38
|
seeds: [
|
|
57
39
|
{
|
|
58
40
|
kind: "const",
|
|
59
|
-
value: [
|
|
60
|
-
99,
|
|
61
|
-
111,
|
|
62
|
-
110,
|
|
63
|
-
116,
|
|
64
|
-
114,
|
|
65
|
-
105,
|
|
66
|
-
98,
|
|
67
|
-
117,
|
|
68
|
-
116,
|
|
69
|
-
105,
|
|
70
|
-
111,
|
|
71
|
-
110
|
|
72
|
-
]
|
|
41
|
+
value: [99, 111, 110, 116, 114, 105, 98, 117, 116, 105, 111, 110]
|
|
73
42
|
},
|
|
74
43
|
{
|
|
75
44
|
kind: "account",
|
|
@@ -101,16 +70,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
101
70
|
},
|
|
102
71
|
{
|
|
103
72
|
name: "create_campaign",
|
|
104
|
-
discriminator: [
|
|
105
|
-
111,
|
|
106
|
-
131,
|
|
107
|
-
187,
|
|
108
|
-
98,
|
|
109
|
-
160,
|
|
110
|
-
193,
|
|
111
|
-
114,
|
|
112
|
-
244
|
|
113
|
-
],
|
|
73
|
+
discriminator: [111, 131, 187, 98, 160, 193, 114, 244],
|
|
114
74
|
accounts: [
|
|
115
75
|
{
|
|
116
76
|
name: "campaign",
|
|
@@ -119,16 +79,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
119
79
|
seeds: [
|
|
120
80
|
{
|
|
121
81
|
kind: "const",
|
|
122
|
-
value: [
|
|
123
|
-
99,
|
|
124
|
-
97,
|
|
125
|
-
109,
|
|
126
|
-
112,
|
|
127
|
-
97,
|
|
128
|
-
105,
|
|
129
|
-
103,
|
|
130
|
-
110
|
|
131
|
-
]
|
|
82
|
+
value: [99, 97, 109, 112, 97, 105, 103, 110]
|
|
132
83
|
},
|
|
133
84
|
{
|
|
134
85
|
kind: "account",
|
|
@@ -156,10 +107,6 @@ var anchor_solana_crowdfunding_default = {
|
|
|
156
107
|
name: "title",
|
|
157
108
|
type: "string"
|
|
158
109
|
},
|
|
159
|
-
{
|
|
160
|
-
name: "description",
|
|
161
|
-
type: "string"
|
|
162
|
-
},
|
|
163
110
|
{
|
|
164
111
|
name: "target_amount",
|
|
165
112
|
type: "u64"
|
|
@@ -172,16 +119,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
172
119
|
},
|
|
173
120
|
{
|
|
174
121
|
name: "create_contribution",
|
|
175
|
-
discriminator: [
|
|
176
|
-
239,
|
|
177
|
-
215,
|
|
178
|
-
102,
|
|
179
|
-
103,
|
|
180
|
-
123,
|
|
181
|
-
112,
|
|
182
|
-
178,
|
|
183
|
-
68
|
|
184
|
-
],
|
|
122
|
+
discriminator: [239, 215, 102, 103, 123, 112, 178, 68],
|
|
185
123
|
accounts: [
|
|
186
124
|
{
|
|
187
125
|
name: "campaign"
|
|
@@ -193,20 +131,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
193
131
|
seeds: [
|
|
194
132
|
{
|
|
195
133
|
kind: "const",
|
|
196
|
-
value: [
|
|
197
|
-
99,
|
|
198
|
-
111,
|
|
199
|
-
110,
|
|
200
|
-
116,
|
|
201
|
-
114,
|
|
202
|
-
105,
|
|
203
|
-
98,
|
|
204
|
-
117,
|
|
205
|
-
116,
|
|
206
|
-
105,
|
|
207
|
-
111,
|
|
208
|
-
110
|
|
209
|
-
]
|
|
134
|
+
value: [99, 111, 110, 116, 114, 105, 98, 117, 116, 105, 111, 110]
|
|
210
135
|
},
|
|
211
136
|
{
|
|
212
137
|
kind: "account",
|
|
@@ -233,16 +158,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
233
158
|
},
|
|
234
159
|
{
|
|
235
160
|
name: "refund",
|
|
236
|
-
discriminator: [
|
|
237
|
-
2,
|
|
238
|
-
96,
|
|
239
|
-
183,
|
|
240
|
-
251,
|
|
241
|
-
63,
|
|
242
|
-
208,
|
|
243
|
-
46,
|
|
244
|
-
46
|
|
245
|
-
],
|
|
161
|
+
discriminator: [2, 96, 183, 251, 63, 208, 46, 46],
|
|
246
162
|
accounts: [
|
|
247
163
|
{
|
|
248
164
|
name: "campaign",
|
|
@@ -262,16 +178,7 @@ var anchor_solana_crowdfunding_default = {
|
|
|
262
178
|
},
|
|
263
179
|
{
|
|
264
180
|
name: "withdraw",
|
|
265
|
-
discriminator: [
|
|
266
|
-
183,
|
|
267
|
-
18,
|
|
268
|
-
70,
|
|
269
|
-
156,
|
|
270
|
-
148,
|
|
271
|
-
109,
|
|
272
|
-
161,
|
|
273
|
-
34
|
|
274
|
-
],
|
|
181
|
+
discriminator: [183, 18, 70, 156, 148, 109, 161, 34],
|
|
275
182
|
accounts: [
|
|
276
183
|
{
|
|
277
184
|
name: "campaign",
|
|
@@ -289,96 +196,33 @@ var anchor_solana_crowdfunding_default = {
|
|
|
289
196
|
accounts: [
|
|
290
197
|
{
|
|
291
198
|
name: "Campaign",
|
|
292
|
-
discriminator: [
|
|
293
|
-
50,
|
|
294
|
-
40,
|
|
295
|
-
49,
|
|
296
|
-
11,
|
|
297
|
-
157,
|
|
298
|
-
220,
|
|
299
|
-
229,
|
|
300
|
-
192
|
|
301
|
-
]
|
|
199
|
+
discriminator: [50, 40, 49, 11, 157, 220, 229, 192]
|
|
302
200
|
},
|
|
303
201
|
{
|
|
304
202
|
name: "Contribution",
|
|
305
|
-
discriminator: [
|
|
306
|
-
182,
|
|
307
|
-
187,
|
|
308
|
-
14,
|
|
309
|
-
111,
|
|
310
|
-
72,
|
|
311
|
-
167,
|
|
312
|
-
242,
|
|
313
|
-
212
|
|
314
|
-
]
|
|
203
|
+
discriminator: [182, 187, 14, 111, 72, 167, 242, 212]
|
|
315
204
|
}
|
|
316
205
|
],
|
|
317
206
|
events: [
|
|
318
207
|
{
|
|
319
208
|
name: "CampaignCancelled",
|
|
320
|
-
discriminator: [
|
|
321
|
-
121,
|
|
322
|
-
171,
|
|
323
|
-
21,
|
|
324
|
-
55,
|
|
325
|
-
56,
|
|
326
|
-
234,
|
|
327
|
-
121,
|
|
328
|
-
44
|
|
329
|
-
]
|
|
209
|
+
discriminator: [121, 171, 21, 55, 56, 234, 121, 44]
|
|
330
210
|
},
|
|
331
211
|
{
|
|
332
212
|
name: "CampaignCreated",
|
|
333
|
-
discriminator: [
|
|
334
|
-
9,
|
|
335
|
-
98,
|
|
336
|
-
69,
|
|
337
|
-
61,
|
|
338
|
-
53,
|
|
339
|
-
131,
|
|
340
|
-
64,
|
|
341
|
-
152
|
|
342
|
-
]
|
|
213
|
+
discriminator: [9, 98, 69, 61, 53, 131, 64, 152]
|
|
343
214
|
},
|
|
344
215
|
{
|
|
345
216
|
name: "ContributionMade",
|
|
346
|
-
discriminator: [
|
|
347
|
-
81,
|
|
348
|
-
218,
|
|
349
|
-
72,
|
|
350
|
-
109,
|
|
351
|
-
93,
|
|
352
|
-
96,
|
|
353
|
-
131,
|
|
354
|
-
199
|
|
355
|
-
]
|
|
217
|
+
discriminator: [81, 218, 72, 109, 93, 96, 131, 199]
|
|
356
218
|
},
|
|
357
219
|
{
|
|
358
220
|
name: "FundsWithdrawn",
|
|
359
|
-
discriminator: [
|
|
360
|
-
56,
|
|
361
|
-
130,
|
|
362
|
-
230,
|
|
363
|
-
154,
|
|
364
|
-
35,
|
|
365
|
-
92,
|
|
366
|
-
11,
|
|
367
|
-
118
|
|
368
|
-
]
|
|
221
|
+
discriminator: [56, 130, 230, 154, 35, 92, 11, 118]
|
|
369
222
|
},
|
|
370
223
|
{
|
|
371
224
|
name: "RefundIssued",
|
|
372
|
-
discriminator: [
|
|
373
|
-
249,
|
|
374
|
-
16,
|
|
375
|
-
159,
|
|
376
|
-
159,
|
|
377
|
-
93,
|
|
378
|
-
186,
|
|
379
|
-
145,
|
|
380
|
-
206
|
|
381
|
-
]
|
|
225
|
+
discriminator: [249, 16, 159, 159, 93, 186, 145, 206]
|
|
382
226
|
}
|
|
383
227
|
],
|
|
384
228
|
errors: [
|
|
@@ -389,71 +233,66 @@ var anchor_solana_crowdfunding_default = {
|
|
|
389
233
|
},
|
|
390
234
|
{
|
|
391
235
|
code: 6001,
|
|
392
|
-
name: "DescriptionTooLong",
|
|
393
|
-
msg: "Description exceeds maximum length of 2000 characters"
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
code: 6002,
|
|
397
236
|
name: "InvalidAmount",
|
|
398
237
|
msg: "Amount must be greater than zero"
|
|
399
238
|
},
|
|
400
239
|
{
|
|
401
|
-
code:
|
|
240
|
+
code: 6002,
|
|
402
241
|
name: "InvalidDeadline",
|
|
403
242
|
msg: "Deadline must be in the future"
|
|
404
243
|
},
|
|
405
244
|
{
|
|
406
|
-
code:
|
|
245
|
+
code: 6003,
|
|
407
246
|
name: "CampaignNotActive",
|
|
408
247
|
msg: "Campaign is not active"
|
|
409
248
|
},
|
|
410
249
|
{
|
|
411
|
-
code:
|
|
250
|
+
code: 6004,
|
|
412
251
|
name: "CampaignEnded",
|
|
413
252
|
msg: "Campaign has already ended"
|
|
414
253
|
},
|
|
415
254
|
{
|
|
416
|
-
code:
|
|
255
|
+
code: 6005,
|
|
417
256
|
name: "CampaignNotEnded",
|
|
418
257
|
msg: "Campaign has not ended yet"
|
|
419
258
|
},
|
|
420
259
|
{
|
|
421
|
-
code:
|
|
260
|
+
code: 6006,
|
|
422
261
|
name: "AlreadyWithdrawn",
|
|
423
262
|
msg: "Funds have already been withdrawn"
|
|
424
263
|
},
|
|
425
264
|
{
|
|
426
|
-
code:
|
|
265
|
+
code: 6007,
|
|
427
266
|
name: "TargetNotReached",
|
|
428
267
|
msg: "Target amount not reached"
|
|
429
268
|
},
|
|
430
269
|
{
|
|
431
|
-
code:
|
|
270
|
+
code: 6008,
|
|
432
271
|
name: "TargetReached",
|
|
433
272
|
msg: "Target amount has been reached, no refunds available"
|
|
434
273
|
},
|
|
435
274
|
{
|
|
436
|
-
code:
|
|
275
|
+
code: 6009,
|
|
437
276
|
name: "AlreadyRefunded",
|
|
438
277
|
msg: "Contribution has already been refunded"
|
|
439
278
|
},
|
|
440
279
|
{
|
|
441
|
-
code:
|
|
280
|
+
code: 6010,
|
|
442
281
|
name: "Unauthorized",
|
|
443
282
|
msg: "Unauthorized action"
|
|
444
283
|
},
|
|
445
284
|
{
|
|
446
|
-
code:
|
|
285
|
+
code: 6011,
|
|
447
286
|
name: "Overflow",
|
|
448
287
|
msg: "Numerical overflow occurred"
|
|
449
288
|
},
|
|
450
289
|
{
|
|
451
|
-
code:
|
|
290
|
+
code: 6012,
|
|
452
291
|
name: "CampaignHasContributions",
|
|
453
292
|
msg: "Cannot cancel campaign with existing contributions"
|
|
454
293
|
},
|
|
455
294
|
{
|
|
456
|
-
code:
|
|
295
|
+
code: 6013,
|
|
457
296
|
name: "InsufficientFunds",
|
|
458
297
|
msg: "Insufficient funds in account"
|
|
459
298
|
}
|
|
@@ -472,10 +311,6 @@ var anchor_solana_crowdfunding_default = {
|
|
|
472
311
|
name: "title",
|
|
473
312
|
type: "string"
|
|
474
313
|
},
|
|
475
|
-
{
|
|
476
|
-
name: "description",
|
|
477
|
-
type: "string"
|
|
478
|
-
},
|
|
479
314
|
{
|
|
480
315
|
name: "target_amount",
|
|
481
316
|
type: "u64"
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@solfund/idl",
|
|
3
|
-
"description": "SolFund anchor idl",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
],
|
|
9
|
-
"module": "./dist/index.js",
|
|
10
|
-
"main": "./dist/index.cjs",
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"import": {
|
|
15
|
-
"types": "./dist/index.d.ts",
|
|
16
|
-
"default": "./dist/index.js"
|
|
17
|
-
},
|
|
18
|
-
"require": {
|
|
19
|
-
"types": "./dist/index.d.cts",
|
|
20
|
-
"default": "./dist/index.cjs"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"./package.json": "./package.json"
|
|
24
|
-
},
|
|
25
|
-
"license": "MIT",
|
|
26
|
-
"author": "oioioi",
|
|
27
|
-
"scripts": {
|
|
28
|
-
"build": "bunup",
|
|
29
|
-
"dev": "bunup --watch"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@types/bun": "latest",
|
|
33
|
-
"bunup": "^0.16.22"
|
|
34
|
-
},
|
|
35
|
-
"peerDependencies": {
|
|
36
|
-
"typescript": "^5"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@solfund/idl",
|
|
3
|
+
"description": "SolFund anchor idl",
|
|
4
|
+
"version": "0.1.2",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"main": "./dist/index.cjs",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"require": {
|
|
19
|
+
"types": "./dist/index.d.cts",
|
|
20
|
+
"default": "./dist/index.cjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"./package.json": "./package.json"
|
|
24
|
+
},
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"author": "oioioi",
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "bunup",
|
|
29
|
+
"dev": "bunup --watch"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/bun": "latest",
|
|
33
|
+
"bunup": "^0.16.22"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"typescript": "^5"
|
|
37
|
+
}
|
|
38
|
+
}
|