@solfund/idl 0.1.0 → 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 +505 -0
- package/dist/index.d.cts +361 -0
- package/dist/index.d.ts +361 -0
- package/dist/index.js +473 -0
- package/package.json +1 -1
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Program IDL in camelCase format in order to be used in JS/TS.
|
|
3
|
+
*
|
|
4
|
+
* Note that this is only a type helper and is not the actual IDL. The original
|
|
5
|
+
* IDL can be found at `target/idl/anchor_solana_crowdfunding.json`.
|
|
6
|
+
*/
|
|
7
|
+
type AnchorSolanaCrowdfunding = {
|
|
8
|
+
"address": "BM4pzjf5fqdeX7cKtRgVARK2PLKBiM4PU2xPZFEZkSff";
|
|
9
|
+
"metadata": {
|
|
10
|
+
"name": "anchorSolanaCrowdfunding";
|
|
11
|
+
"version": "0.1.0";
|
|
12
|
+
"spec": "0.1.0";
|
|
13
|
+
"description": "Created with Anchor";
|
|
14
|
+
};
|
|
15
|
+
"instructions": [{
|
|
16
|
+
"name": "cancelCampaign";
|
|
17
|
+
"discriminator": [66, 10, 32, 138, 122, 36, 134, 202];
|
|
18
|
+
"accounts": [{
|
|
19
|
+
"name": "campaign";
|
|
20
|
+
"writable": true;
|
|
21
|
+
}, {
|
|
22
|
+
"name": "creator";
|
|
23
|
+
"signer": true;
|
|
24
|
+
}];
|
|
25
|
+
"args": [];
|
|
26
|
+
}, {
|
|
27
|
+
"name": "contribute";
|
|
28
|
+
"discriminator": [82, 33, 68, 131, 32, 0, 205, 95];
|
|
29
|
+
"accounts": [{
|
|
30
|
+
"name": "campaign";
|
|
31
|
+
"writable": true;
|
|
32
|
+
}, {
|
|
33
|
+
"name": "contribution";
|
|
34
|
+
"writable": true;
|
|
35
|
+
"pda": {
|
|
36
|
+
"seeds": [{
|
|
37
|
+
"kind": "const";
|
|
38
|
+
"value": [99, 111, 110, 116, 114, 105, 98, 117, 116, 105, 111, 110];
|
|
39
|
+
}, {
|
|
40
|
+
"kind": "account";
|
|
41
|
+
"path": "campaign";
|
|
42
|
+
}, {
|
|
43
|
+
"kind": "account";
|
|
44
|
+
"path": "contributor";
|
|
45
|
+
}];
|
|
46
|
+
};
|
|
47
|
+
}, {
|
|
48
|
+
"name": "contributor";
|
|
49
|
+
"writable": true;
|
|
50
|
+
"signer": true;
|
|
51
|
+
}, {
|
|
52
|
+
"name": "systemProgram";
|
|
53
|
+
"address": "11111111111111111111111111111111";
|
|
54
|
+
}];
|
|
55
|
+
"args": [{
|
|
56
|
+
"name": "amount";
|
|
57
|
+
"type": "u64";
|
|
58
|
+
}];
|
|
59
|
+
}, {
|
|
60
|
+
"name": "createCampaign";
|
|
61
|
+
"discriminator": [111, 131, 187, 98, 160, 193, 114, 244];
|
|
62
|
+
"accounts": [{
|
|
63
|
+
"name": "campaign";
|
|
64
|
+
"writable": true;
|
|
65
|
+
"pda": {
|
|
66
|
+
"seeds": [{
|
|
67
|
+
"kind": "const";
|
|
68
|
+
"value": [99, 97, 109, 112, 97, 105, 103, 110];
|
|
69
|
+
}, {
|
|
70
|
+
"kind": "account";
|
|
71
|
+
"path": "creator";
|
|
72
|
+
}, {
|
|
73
|
+
"kind": "arg";
|
|
74
|
+
"path": "title";
|
|
75
|
+
}];
|
|
76
|
+
};
|
|
77
|
+
}, {
|
|
78
|
+
"name": "creator";
|
|
79
|
+
"writable": true;
|
|
80
|
+
"signer": true;
|
|
81
|
+
}, {
|
|
82
|
+
"name": "systemProgram";
|
|
83
|
+
"address": "11111111111111111111111111111111";
|
|
84
|
+
}];
|
|
85
|
+
"args": [{
|
|
86
|
+
"name": "title";
|
|
87
|
+
"type": "string";
|
|
88
|
+
}, {
|
|
89
|
+
"name": "targetAmount";
|
|
90
|
+
"type": "u64";
|
|
91
|
+
}, {
|
|
92
|
+
"name": "deadline";
|
|
93
|
+
"type": "i64";
|
|
94
|
+
}];
|
|
95
|
+
}, {
|
|
96
|
+
"name": "createContribution";
|
|
97
|
+
"discriminator": [239, 215, 102, 103, 123, 112, 178, 68];
|
|
98
|
+
"accounts": [{
|
|
99
|
+
"name": "campaign";
|
|
100
|
+
}, {
|
|
101
|
+
"name": "contribution";
|
|
102
|
+
"writable": true;
|
|
103
|
+
"pda": {
|
|
104
|
+
"seeds": [{
|
|
105
|
+
"kind": "const";
|
|
106
|
+
"value": [99, 111, 110, 116, 114, 105, 98, 117, 116, 105, 111, 110];
|
|
107
|
+
}, {
|
|
108
|
+
"kind": "account";
|
|
109
|
+
"path": "campaign";
|
|
110
|
+
}, {
|
|
111
|
+
"kind": "account";
|
|
112
|
+
"path": "contributor";
|
|
113
|
+
}];
|
|
114
|
+
};
|
|
115
|
+
}, {
|
|
116
|
+
"name": "contributor";
|
|
117
|
+
"writable": true;
|
|
118
|
+
"signer": true;
|
|
119
|
+
}, {
|
|
120
|
+
"name": "systemProgram";
|
|
121
|
+
"address": "11111111111111111111111111111111";
|
|
122
|
+
}];
|
|
123
|
+
"args": [];
|
|
124
|
+
}, {
|
|
125
|
+
"name": "refund";
|
|
126
|
+
"discriminator": [2, 96, 183, 251, 63, 208, 46, 46];
|
|
127
|
+
"accounts": [{
|
|
128
|
+
"name": "campaign";
|
|
129
|
+
"writable": true;
|
|
130
|
+
}, {
|
|
131
|
+
"name": "contribution";
|
|
132
|
+
"writable": true;
|
|
133
|
+
}, {
|
|
134
|
+
"name": "contributor";
|
|
135
|
+
"writable": true;
|
|
136
|
+
"signer": true;
|
|
137
|
+
}];
|
|
138
|
+
"args": [];
|
|
139
|
+
}, {
|
|
140
|
+
"name": "withdraw";
|
|
141
|
+
"discriminator": [183, 18, 70, 156, 148, 109, 161, 34];
|
|
142
|
+
"accounts": [{
|
|
143
|
+
"name": "campaign";
|
|
144
|
+
"writable": true;
|
|
145
|
+
}, {
|
|
146
|
+
"name": "creator";
|
|
147
|
+
"writable": true;
|
|
148
|
+
"signer": true;
|
|
149
|
+
}];
|
|
150
|
+
"args": [];
|
|
151
|
+
}];
|
|
152
|
+
"accounts": [{
|
|
153
|
+
"name": "campaign";
|
|
154
|
+
"discriminator": [50, 40, 49, 11, 157, 220, 229, 192];
|
|
155
|
+
}, {
|
|
156
|
+
"name": "contribution";
|
|
157
|
+
"discriminator": [182, 187, 14, 111, 72, 167, 242, 212];
|
|
158
|
+
}];
|
|
159
|
+
"events": [{
|
|
160
|
+
"name": "campaignCancelled";
|
|
161
|
+
"discriminator": [121, 171, 21, 55, 56, 234, 121, 44];
|
|
162
|
+
}, {
|
|
163
|
+
"name": "campaignCreated";
|
|
164
|
+
"discriminator": [9, 98, 69, 61, 53, 131, 64, 152];
|
|
165
|
+
}, {
|
|
166
|
+
"name": "contributionMade";
|
|
167
|
+
"discriminator": [81, 218, 72, 109, 93, 96, 131, 199];
|
|
168
|
+
}, {
|
|
169
|
+
"name": "fundsWithdrawn";
|
|
170
|
+
"discriminator": [56, 130, 230, 154, 35, 92, 11, 118];
|
|
171
|
+
}, {
|
|
172
|
+
"name": "refundIssued";
|
|
173
|
+
"discriminator": [249, 16, 159, 159, 93, 186, 145, 206];
|
|
174
|
+
}];
|
|
175
|
+
"errors": [{
|
|
176
|
+
"code": 6000;
|
|
177
|
+
"name": "titleTooLong";
|
|
178
|
+
"msg": "Title exceeds maximum length of 100 characters";
|
|
179
|
+
}, {
|
|
180
|
+
"code": 6001;
|
|
181
|
+
"name": "invalidAmount";
|
|
182
|
+
"msg": "Amount must be greater than zero";
|
|
183
|
+
}, {
|
|
184
|
+
"code": 6002;
|
|
185
|
+
"name": "invalidDeadline";
|
|
186
|
+
"msg": "Deadline must be in the future";
|
|
187
|
+
}, {
|
|
188
|
+
"code": 6003;
|
|
189
|
+
"name": "campaignNotActive";
|
|
190
|
+
"msg": "Campaign is not active";
|
|
191
|
+
}, {
|
|
192
|
+
"code": 6004;
|
|
193
|
+
"name": "campaignEnded";
|
|
194
|
+
"msg": "Campaign has already ended";
|
|
195
|
+
}, {
|
|
196
|
+
"code": 6005;
|
|
197
|
+
"name": "campaignNotEnded";
|
|
198
|
+
"msg": "Campaign has not ended yet";
|
|
199
|
+
}, {
|
|
200
|
+
"code": 6006;
|
|
201
|
+
"name": "alreadyWithdrawn";
|
|
202
|
+
"msg": "Funds have already been withdrawn";
|
|
203
|
+
}, {
|
|
204
|
+
"code": 6007;
|
|
205
|
+
"name": "targetNotReached";
|
|
206
|
+
"msg": "Target amount not reached";
|
|
207
|
+
}, {
|
|
208
|
+
"code": 6008;
|
|
209
|
+
"name": "targetReached";
|
|
210
|
+
"msg": "Target amount has been reached, no refunds available";
|
|
211
|
+
}, {
|
|
212
|
+
"code": 6009;
|
|
213
|
+
"name": "alreadyRefunded";
|
|
214
|
+
"msg": "Contribution has already been refunded";
|
|
215
|
+
}, {
|
|
216
|
+
"code": 6010;
|
|
217
|
+
"name": "unauthorized";
|
|
218
|
+
"msg": "Unauthorized action";
|
|
219
|
+
}, {
|
|
220
|
+
"code": 6011;
|
|
221
|
+
"name": "overflow";
|
|
222
|
+
"msg": "Numerical overflow occurred";
|
|
223
|
+
}, {
|
|
224
|
+
"code": 6012;
|
|
225
|
+
"name": "campaignHasContributions";
|
|
226
|
+
"msg": "Cannot cancel campaign with existing contributions";
|
|
227
|
+
}, {
|
|
228
|
+
"code": 6013;
|
|
229
|
+
"name": "insufficientFunds";
|
|
230
|
+
"msg": "Insufficient funds in account";
|
|
231
|
+
}];
|
|
232
|
+
"types": [{
|
|
233
|
+
"name": "campaign";
|
|
234
|
+
"type": {
|
|
235
|
+
"kind": "struct";
|
|
236
|
+
"fields": [{
|
|
237
|
+
"name": "creator";
|
|
238
|
+
"type": "pubkey";
|
|
239
|
+
}, {
|
|
240
|
+
"name": "title";
|
|
241
|
+
"type": "string";
|
|
242
|
+
}, {
|
|
243
|
+
"name": "targetAmount";
|
|
244
|
+
"type": "u64";
|
|
245
|
+
}, {
|
|
246
|
+
"name": "amountRaised";
|
|
247
|
+
"type": "u64";
|
|
248
|
+
}, {
|
|
249
|
+
"name": "deadline";
|
|
250
|
+
"type": "i64";
|
|
251
|
+
}, {
|
|
252
|
+
"name": "isActive";
|
|
253
|
+
"type": "bool";
|
|
254
|
+
}, {
|
|
255
|
+
"name": "withdrawn";
|
|
256
|
+
"type": "bool";
|
|
257
|
+
}, {
|
|
258
|
+
"name": "bump";
|
|
259
|
+
"type": "u8";
|
|
260
|
+
}];
|
|
261
|
+
};
|
|
262
|
+
}, {
|
|
263
|
+
"name": "campaignCancelled";
|
|
264
|
+
"type": {
|
|
265
|
+
"kind": "struct";
|
|
266
|
+
"fields": [{
|
|
267
|
+
"name": "campaign";
|
|
268
|
+
"type": "pubkey";
|
|
269
|
+
}];
|
|
270
|
+
};
|
|
271
|
+
}, {
|
|
272
|
+
"name": "campaignCreated";
|
|
273
|
+
"type": {
|
|
274
|
+
"kind": "struct";
|
|
275
|
+
"fields": [{
|
|
276
|
+
"name": "campaign";
|
|
277
|
+
"type": "pubkey";
|
|
278
|
+
}, {
|
|
279
|
+
"name": "creator";
|
|
280
|
+
"type": "pubkey";
|
|
281
|
+
}, {
|
|
282
|
+
"name": "targetAmount";
|
|
283
|
+
"type": "u64";
|
|
284
|
+
}, {
|
|
285
|
+
"name": "deadline";
|
|
286
|
+
"type": "i64";
|
|
287
|
+
}];
|
|
288
|
+
};
|
|
289
|
+
}, {
|
|
290
|
+
"name": "contribution";
|
|
291
|
+
"type": {
|
|
292
|
+
"kind": "struct";
|
|
293
|
+
"fields": [{
|
|
294
|
+
"name": "campaign";
|
|
295
|
+
"type": "pubkey";
|
|
296
|
+
}, {
|
|
297
|
+
"name": "contributor";
|
|
298
|
+
"type": "pubkey";
|
|
299
|
+
}, {
|
|
300
|
+
"name": "amount";
|
|
301
|
+
"type": "u64";
|
|
302
|
+
}, {
|
|
303
|
+
"name": "refunded";
|
|
304
|
+
"type": "bool";
|
|
305
|
+
}, {
|
|
306
|
+
"name": "bump";
|
|
307
|
+
"type": "u8";
|
|
308
|
+
}];
|
|
309
|
+
};
|
|
310
|
+
}, {
|
|
311
|
+
"name": "contributionMade";
|
|
312
|
+
"type": {
|
|
313
|
+
"kind": "struct";
|
|
314
|
+
"fields": [{
|
|
315
|
+
"name": "campaign";
|
|
316
|
+
"type": "pubkey";
|
|
317
|
+
}, {
|
|
318
|
+
"name": "contributor";
|
|
319
|
+
"type": "pubkey";
|
|
320
|
+
}, {
|
|
321
|
+
"name": "amount";
|
|
322
|
+
"type": "u64";
|
|
323
|
+
}, {
|
|
324
|
+
"name": "totalRaised";
|
|
325
|
+
"type": "u64";
|
|
326
|
+
}];
|
|
327
|
+
};
|
|
328
|
+
}, {
|
|
329
|
+
"name": "fundsWithdrawn";
|
|
330
|
+
"type": {
|
|
331
|
+
"kind": "struct";
|
|
332
|
+
"fields": [{
|
|
333
|
+
"name": "campaign";
|
|
334
|
+
"type": "pubkey";
|
|
335
|
+
}, {
|
|
336
|
+
"name": "creator";
|
|
337
|
+
"type": "pubkey";
|
|
338
|
+
}, {
|
|
339
|
+
"name": "amount";
|
|
340
|
+
"type": "u64";
|
|
341
|
+
}];
|
|
342
|
+
};
|
|
343
|
+
}, {
|
|
344
|
+
"name": "refundIssued";
|
|
345
|
+
"type": {
|
|
346
|
+
"kind": "struct";
|
|
347
|
+
"fields": [{
|
|
348
|
+
"name": "campaign";
|
|
349
|
+
"type": "pubkey";
|
|
350
|
+
}, {
|
|
351
|
+
"name": "contributor";
|
|
352
|
+
"type": "pubkey";
|
|
353
|
+
}, {
|
|
354
|
+
"name": "amount";
|
|
355
|
+
"type": "u64";
|
|
356
|
+
}];
|
|
357
|
+
};
|
|
358
|
+
}];
|
|
359
|
+
};
|
|
360
|
+
import { default as default2 } from "./anchor_solana_crowdfunding.json";
|
|
361
|
+
export { default2 as IDL, AnchorSolanaCrowdfunding };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Program IDL in camelCase format in order to be used in JS/TS.
|
|
3
|
+
*
|
|
4
|
+
* Note that this is only a type helper and is not the actual IDL. The original
|
|
5
|
+
* IDL can be found at `target/idl/anchor_solana_crowdfunding.json`.
|
|
6
|
+
*/
|
|
7
|
+
type AnchorSolanaCrowdfunding = {
|
|
8
|
+
"address": "BM4pzjf5fqdeX7cKtRgVARK2PLKBiM4PU2xPZFEZkSff";
|
|
9
|
+
"metadata": {
|
|
10
|
+
"name": "anchorSolanaCrowdfunding";
|
|
11
|
+
"version": "0.1.0";
|
|
12
|
+
"spec": "0.1.0";
|
|
13
|
+
"description": "Created with Anchor";
|
|
14
|
+
};
|
|
15
|
+
"instructions": [{
|
|
16
|
+
"name": "cancelCampaign";
|
|
17
|
+
"discriminator": [66, 10, 32, 138, 122, 36, 134, 202];
|
|
18
|
+
"accounts": [{
|
|
19
|
+
"name": "campaign";
|
|
20
|
+
"writable": true;
|
|
21
|
+
}, {
|
|
22
|
+
"name": "creator";
|
|
23
|
+
"signer": true;
|
|
24
|
+
}];
|
|
25
|
+
"args": [];
|
|
26
|
+
}, {
|
|
27
|
+
"name": "contribute";
|
|
28
|
+
"discriminator": [82, 33, 68, 131, 32, 0, 205, 95];
|
|
29
|
+
"accounts": [{
|
|
30
|
+
"name": "campaign";
|
|
31
|
+
"writable": true;
|
|
32
|
+
}, {
|
|
33
|
+
"name": "contribution";
|
|
34
|
+
"writable": true;
|
|
35
|
+
"pda": {
|
|
36
|
+
"seeds": [{
|
|
37
|
+
"kind": "const";
|
|
38
|
+
"value": [99, 111, 110, 116, 114, 105, 98, 117, 116, 105, 111, 110];
|
|
39
|
+
}, {
|
|
40
|
+
"kind": "account";
|
|
41
|
+
"path": "campaign";
|
|
42
|
+
}, {
|
|
43
|
+
"kind": "account";
|
|
44
|
+
"path": "contributor";
|
|
45
|
+
}];
|
|
46
|
+
};
|
|
47
|
+
}, {
|
|
48
|
+
"name": "contributor";
|
|
49
|
+
"writable": true;
|
|
50
|
+
"signer": true;
|
|
51
|
+
}, {
|
|
52
|
+
"name": "systemProgram";
|
|
53
|
+
"address": "11111111111111111111111111111111";
|
|
54
|
+
}];
|
|
55
|
+
"args": [{
|
|
56
|
+
"name": "amount";
|
|
57
|
+
"type": "u64";
|
|
58
|
+
}];
|
|
59
|
+
}, {
|
|
60
|
+
"name": "createCampaign";
|
|
61
|
+
"discriminator": [111, 131, 187, 98, 160, 193, 114, 244];
|
|
62
|
+
"accounts": [{
|
|
63
|
+
"name": "campaign";
|
|
64
|
+
"writable": true;
|
|
65
|
+
"pda": {
|
|
66
|
+
"seeds": [{
|
|
67
|
+
"kind": "const";
|
|
68
|
+
"value": [99, 97, 109, 112, 97, 105, 103, 110];
|
|
69
|
+
}, {
|
|
70
|
+
"kind": "account";
|
|
71
|
+
"path": "creator";
|
|
72
|
+
}, {
|
|
73
|
+
"kind": "arg";
|
|
74
|
+
"path": "title";
|
|
75
|
+
}];
|
|
76
|
+
};
|
|
77
|
+
}, {
|
|
78
|
+
"name": "creator";
|
|
79
|
+
"writable": true;
|
|
80
|
+
"signer": true;
|
|
81
|
+
}, {
|
|
82
|
+
"name": "systemProgram";
|
|
83
|
+
"address": "11111111111111111111111111111111";
|
|
84
|
+
}];
|
|
85
|
+
"args": [{
|
|
86
|
+
"name": "title";
|
|
87
|
+
"type": "string";
|
|
88
|
+
}, {
|
|
89
|
+
"name": "targetAmount";
|
|
90
|
+
"type": "u64";
|
|
91
|
+
}, {
|
|
92
|
+
"name": "deadline";
|
|
93
|
+
"type": "i64";
|
|
94
|
+
}];
|
|
95
|
+
}, {
|
|
96
|
+
"name": "createContribution";
|
|
97
|
+
"discriminator": [239, 215, 102, 103, 123, 112, 178, 68];
|
|
98
|
+
"accounts": [{
|
|
99
|
+
"name": "campaign";
|
|
100
|
+
}, {
|
|
101
|
+
"name": "contribution";
|
|
102
|
+
"writable": true;
|
|
103
|
+
"pda": {
|
|
104
|
+
"seeds": [{
|
|
105
|
+
"kind": "const";
|
|
106
|
+
"value": [99, 111, 110, 116, 114, 105, 98, 117, 116, 105, 111, 110];
|
|
107
|
+
}, {
|
|
108
|
+
"kind": "account";
|
|
109
|
+
"path": "campaign";
|
|
110
|
+
}, {
|
|
111
|
+
"kind": "account";
|
|
112
|
+
"path": "contributor";
|
|
113
|
+
}];
|
|
114
|
+
};
|
|
115
|
+
}, {
|
|
116
|
+
"name": "contributor";
|
|
117
|
+
"writable": true;
|
|
118
|
+
"signer": true;
|
|
119
|
+
}, {
|
|
120
|
+
"name": "systemProgram";
|
|
121
|
+
"address": "11111111111111111111111111111111";
|
|
122
|
+
}];
|
|
123
|
+
"args": [];
|
|
124
|
+
}, {
|
|
125
|
+
"name": "refund";
|
|
126
|
+
"discriminator": [2, 96, 183, 251, 63, 208, 46, 46];
|
|
127
|
+
"accounts": [{
|
|
128
|
+
"name": "campaign";
|
|
129
|
+
"writable": true;
|
|
130
|
+
}, {
|
|
131
|
+
"name": "contribution";
|
|
132
|
+
"writable": true;
|
|
133
|
+
}, {
|
|
134
|
+
"name": "contributor";
|
|
135
|
+
"writable": true;
|
|
136
|
+
"signer": true;
|
|
137
|
+
}];
|
|
138
|
+
"args": [];
|
|
139
|
+
}, {
|
|
140
|
+
"name": "withdraw";
|
|
141
|
+
"discriminator": [183, 18, 70, 156, 148, 109, 161, 34];
|
|
142
|
+
"accounts": [{
|
|
143
|
+
"name": "campaign";
|
|
144
|
+
"writable": true;
|
|
145
|
+
}, {
|
|
146
|
+
"name": "creator";
|
|
147
|
+
"writable": true;
|
|
148
|
+
"signer": true;
|
|
149
|
+
}];
|
|
150
|
+
"args": [];
|
|
151
|
+
}];
|
|
152
|
+
"accounts": [{
|
|
153
|
+
"name": "campaign";
|
|
154
|
+
"discriminator": [50, 40, 49, 11, 157, 220, 229, 192];
|
|
155
|
+
}, {
|
|
156
|
+
"name": "contribution";
|
|
157
|
+
"discriminator": [182, 187, 14, 111, 72, 167, 242, 212];
|
|
158
|
+
}];
|
|
159
|
+
"events": [{
|
|
160
|
+
"name": "campaignCancelled";
|
|
161
|
+
"discriminator": [121, 171, 21, 55, 56, 234, 121, 44];
|
|
162
|
+
}, {
|
|
163
|
+
"name": "campaignCreated";
|
|
164
|
+
"discriminator": [9, 98, 69, 61, 53, 131, 64, 152];
|
|
165
|
+
}, {
|
|
166
|
+
"name": "contributionMade";
|
|
167
|
+
"discriminator": [81, 218, 72, 109, 93, 96, 131, 199];
|
|
168
|
+
}, {
|
|
169
|
+
"name": "fundsWithdrawn";
|
|
170
|
+
"discriminator": [56, 130, 230, 154, 35, 92, 11, 118];
|
|
171
|
+
}, {
|
|
172
|
+
"name": "refundIssued";
|
|
173
|
+
"discriminator": [249, 16, 159, 159, 93, 186, 145, 206];
|
|
174
|
+
}];
|
|
175
|
+
"errors": [{
|
|
176
|
+
"code": 6000;
|
|
177
|
+
"name": "titleTooLong";
|
|
178
|
+
"msg": "Title exceeds maximum length of 100 characters";
|
|
179
|
+
}, {
|
|
180
|
+
"code": 6001;
|
|
181
|
+
"name": "invalidAmount";
|
|
182
|
+
"msg": "Amount must be greater than zero";
|
|
183
|
+
}, {
|
|
184
|
+
"code": 6002;
|
|
185
|
+
"name": "invalidDeadline";
|
|
186
|
+
"msg": "Deadline must be in the future";
|
|
187
|
+
}, {
|
|
188
|
+
"code": 6003;
|
|
189
|
+
"name": "campaignNotActive";
|
|
190
|
+
"msg": "Campaign is not active";
|
|
191
|
+
}, {
|
|
192
|
+
"code": 6004;
|
|
193
|
+
"name": "campaignEnded";
|
|
194
|
+
"msg": "Campaign has already ended";
|
|
195
|
+
}, {
|
|
196
|
+
"code": 6005;
|
|
197
|
+
"name": "campaignNotEnded";
|
|
198
|
+
"msg": "Campaign has not ended yet";
|
|
199
|
+
}, {
|
|
200
|
+
"code": 6006;
|
|
201
|
+
"name": "alreadyWithdrawn";
|
|
202
|
+
"msg": "Funds have already been withdrawn";
|
|
203
|
+
}, {
|
|
204
|
+
"code": 6007;
|
|
205
|
+
"name": "targetNotReached";
|
|
206
|
+
"msg": "Target amount not reached";
|
|
207
|
+
}, {
|
|
208
|
+
"code": 6008;
|
|
209
|
+
"name": "targetReached";
|
|
210
|
+
"msg": "Target amount has been reached, no refunds available";
|
|
211
|
+
}, {
|
|
212
|
+
"code": 6009;
|
|
213
|
+
"name": "alreadyRefunded";
|
|
214
|
+
"msg": "Contribution has already been refunded";
|
|
215
|
+
}, {
|
|
216
|
+
"code": 6010;
|
|
217
|
+
"name": "unauthorized";
|
|
218
|
+
"msg": "Unauthorized action";
|
|
219
|
+
}, {
|
|
220
|
+
"code": 6011;
|
|
221
|
+
"name": "overflow";
|
|
222
|
+
"msg": "Numerical overflow occurred";
|
|
223
|
+
}, {
|
|
224
|
+
"code": 6012;
|
|
225
|
+
"name": "campaignHasContributions";
|
|
226
|
+
"msg": "Cannot cancel campaign with existing contributions";
|
|
227
|
+
}, {
|
|
228
|
+
"code": 6013;
|
|
229
|
+
"name": "insufficientFunds";
|
|
230
|
+
"msg": "Insufficient funds in account";
|
|
231
|
+
}];
|
|
232
|
+
"types": [{
|
|
233
|
+
"name": "campaign";
|
|
234
|
+
"type": {
|
|
235
|
+
"kind": "struct";
|
|
236
|
+
"fields": [{
|
|
237
|
+
"name": "creator";
|
|
238
|
+
"type": "pubkey";
|
|
239
|
+
}, {
|
|
240
|
+
"name": "title";
|
|
241
|
+
"type": "string";
|
|
242
|
+
}, {
|
|
243
|
+
"name": "targetAmount";
|
|
244
|
+
"type": "u64";
|
|
245
|
+
}, {
|
|
246
|
+
"name": "amountRaised";
|
|
247
|
+
"type": "u64";
|
|
248
|
+
}, {
|
|
249
|
+
"name": "deadline";
|
|
250
|
+
"type": "i64";
|
|
251
|
+
}, {
|
|
252
|
+
"name": "isActive";
|
|
253
|
+
"type": "bool";
|
|
254
|
+
}, {
|
|
255
|
+
"name": "withdrawn";
|
|
256
|
+
"type": "bool";
|
|
257
|
+
}, {
|
|
258
|
+
"name": "bump";
|
|
259
|
+
"type": "u8";
|
|
260
|
+
}];
|
|
261
|
+
};
|
|
262
|
+
}, {
|
|
263
|
+
"name": "campaignCancelled";
|
|
264
|
+
"type": {
|
|
265
|
+
"kind": "struct";
|
|
266
|
+
"fields": [{
|
|
267
|
+
"name": "campaign";
|
|
268
|
+
"type": "pubkey";
|
|
269
|
+
}];
|
|
270
|
+
};
|
|
271
|
+
}, {
|
|
272
|
+
"name": "campaignCreated";
|
|
273
|
+
"type": {
|
|
274
|
+
"kind": "struct";
|
|
275
|
+
"fields": [{
|
|
276
|
+
"name": "campaign";
|
|
277
|
+
"type": "pubkey";
|
|
278
|
+
}, {
|
|
279
|
+
"name": "creator";
|
|
280
|
+
"type": "pubkey";
|
|
281
|
+
}, {
|
|
282
|
+
"name": "targetAmount";
|
|
283
|
+
"type": "u64";
|
|
284
|
+
}, {
|
|
285
|
+
"name": "deadline";
|
|
286
|
+
"type": "i64";
|
|
287
|
+
}];
|
|
288
|
+
};
|
|
289
|
+
}, {
|
|
290
|
+
"name": "contribution";
|
|
291
|
+
"type": {
|
|
292
|
+
"kind": "struct";
|
|
293
|
+
"fields": [{
|
|
294
|
+
"name": "campaign";
|
|
295
|
+
"type": "pubkey";
|
|
296
|
+
}, {
|
|
297
|
+
"name": "contributor";
|
|
298
|
+
"type": "pubkey";
|
|
299
|
+
}, {
|
|
300
|
+
"name": "amount";
|
|
301
|
+
"type": "u64";
|
|
302
|
+
}, {
|
|
303
|
+
"name": "refunded";
|
|
304
|
+
"type": "bool";
|
|
305
|
+
}, {
|
|
306
|
+
"name": "bump";
|
|
307
|
+
"type": "u8";
|
|
308
|
+
}];
|
|
309
|
+
};
|
|
310
|
+
}, {
|
|
311
|
+
"name": "contributionMade";
|
|
312
|
+
"type": {
|
|
313
|
+
"kind": "struct";
|
|
314
|
+
"fields": [{
|
|
315
|
+
"name": "campaign";
|
|
316
|
+
"type": "pubkey";
|
|
317
|
+
}, {
|
|
318
|
+
"name": "contributor";
|
|
319
|
+
"type": "pubkey";
|
|
320
|
+
}, {
|
|
321
|
+
"name": "amount";
|
|
322
|
+
"type": "u64";
|
|
323
|
+
}, {
|
|
324
|
+
"name": "totalRaised";
|
|
325
|
+
"type": "u64";
|
|
326
|
+
}];
|
|
327
|
+
};
|
|
328
|
+
}, {
|
|
329
|
+
"name": "fundsWithdrawn";
|
|
330
|
+
"type": {
|
|
331
|
+
"kind": "struct";
|
|
332
|
+
"fields": [{
|
|
333
|
+
"name": "campaign";
|
|
334
|
+
"type": "pubkey";
|
|
335
|
+
}, {
|
|
336
|
+
"name": "creator";
|
|
337
|
+
"type": "pubkey";
|
|
338
|
+
}, {
|
|
339
|
+
"name": "amount";
|
|
340
|
+
"type": "u64";
|
|
341
|
+
}];
|
|
342
|
+
};
|
|
343
|
+
}, {
|
|
344
|
+
"name": "refundIssued";
|
|
345
|
+
"type": {
|
|
346
|
+
"kind": "struct";
|
|
347
|
+
"fields": [{
|
|
348
|
+
"name": "campaign";
|
|
349
|
+
"type": "pubkey";
|
|
350
|
+
}, {
|
|
351
|
+
"name": "contributor";
|
|
352
|
+
"type": "pubkey";
|
|
353
|
+
}, {
|
|
354
|
+
"name": "amount";
|
|
355
|
+
"type": "u64";
|
|
356
|
+
}];
|
|
357
|
+
};
|
|
358
|
+
}];
|
|
359
|
+
};
|
|
360
|
+
import { default as default2 } from "./anchor_solana_crowdfunding.json";
|
|
361
|
+
export { default2 as IDL, AnchorSolanaCrowdfunding };
|