@dropsy/airdrop 0.0.1
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.d.mts +890 -0
- package/dist/index.d.ts +890 -0
- package/dist/index.js +1916 -0
- package/dist/index.mjs +1961 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +50 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1640 -0
- package/docs/functions/add.html +1 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +13 -0
- package/docs/modules.html +1 -0
- package/index.ts +0 -0
- package/new/index.js +2 -0
- package/new/node_modules/.package-lock.json +14 -0
- package/new/node_modules/@dropsy/easypublish/dist/index.d.mts +3 -0
- package/new/node_modules/@dropsy/easypublish/dist/index.d.ts +3 -0
- package/new/node_modules/@dropsy/easypublish/dist/index.js +32 -0
- package/new/node_modules/@dropsy/easypublish/dist/index.mjs +7 -0
- package/new/node_modules/@dropsy/easypublish/package.json +25 -0
- package/new/node_modules/@dropsy/easypublish/readme.md +21 -0
- package/new/node_modules/@dropsy/easypublish/tsup.config.ts +10 -0
- package/new/package-lock.json +22 -0
- package/new/package.json +16 -0
- package/package.json +37 -0
- package/readme.md +21 -0
- package/tsup.config.ts +10 -0
- package/typedoc.json +5 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,1961 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// src/accounts/airdrop.ts
|
|
42
|
+
import {
|
|
43
|
+
assertAccountExists,
|
|
44
|
+
assertAccountsExist,
|
|
45
|
+
combineCodec,
|
|
46
|
+
decodeAccount,
|
|
47
|
+
fetchEncodedAccount,
|
|
48
|
+
fetchEncodedAccounts,
|
|
49
|
+
fixDecoderSize,
|
|
50
|
+
fixEncoderSize,
|
|
51
|
+
getAddressDecoder,
|
|
52
|
+
getAddressEncoder,
|
|
53
|
+
getArrayDecoder,
|
|
54
|
+
getArrayEncoder,
|
|
55
|
+
getBytesDecoder,
|
|
56
|
+
getBytesEncoder,
|
|
57
|
+
getI64Decoder,
|
|
58
|
+
getI64Encoder,
|
|
59
|
+
getStructDecoder,
|
|
60
|
+
getStructEncoder,
|
|
61
|
+
getU64Decoder,
|
|
62
|
+
getU64Encoder,
|
|
63
|
+
getU8Decoder,
|
|
64
|
+
getU8Encoder,
|
|
65
|
+
transformEncoder
|
|
66
|
+
} from "@solana/kit";
|
|
67
|
+
var AIRDROP_DISCRIMINATOR = new Uint8Array([
|
|
68
|
+
31,
|
|
69
|
+
112,
|
|
70
|
+
159,
|
|
71
|
+
158,
|
|
72
|
+
124,
|
|
73
|
+
237,
|
|
74
|
+
9,
|
|
75
|
+
241
|
|
76
|
+
]);
|
|
77
|
+
function getAirdropDiscriminatorBytes() {
|
|
78
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(AIRDROP_DISCRIMINATOR);
|
|
79
|
+
}
|
|
80
|
+
function getAirdropEncoder() {
|
|
81
|
+
return transformEncoder(
|
|
82
|
+
getStructEncoder([
|
|
83
|
+
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
84
|
+
["id", getU64Encoder()],
|
|
85
|
+
["mint", getAddressEncoder()],
|
|
86
|
+
["owner", getAddressEncoder()],
|
|
87
|
+
["controller", getAddressEncoder()],
|
|
88
|
+
["supply", getU64Encoder()],
|
|
89
|
+
["merkleRoot", getArrayEncoder(getU8Encoder(), { size: 32 })],
|
|
90
|
+
["startsAt", getI64Encoder()],
|
|
91
|
+
["endsAt", getI64Encoder()],
|
|
92
|
+
["bitmapCount", getU8Encoder()],
|
|
93
|
+
["version", getU8Encoder()],
|
|
94
|
+
["bump", getU8Encoder()]
|
|
95
|
+
]),
|
|
96
|
+
(value) => __spreadProps(__spreadValues({}, value), { discriminator: AIRDROP_DISCRIMINATOR })
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
function getAirdropDecoder() {
|
|
100
|
+
return getStructDecoder([
|
|
101
|
+
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
102
|
+
["id", getU64Decoder()],
|
|
103
|
+
["mint", getAddressDecoder()],
|
|
104
|
+
["owner", getAddressDecoder()],
|
|
105
|
+
["controller", getAddressDecoder()],
|
|
106
|
+
["supply", getU64Decoder()],
|
|
107
|
+
["merkleRoot", getArrayDecoder(getU8Decoder(), { size: 32 })],
|
|
108
|
+
["startsAt", getI64Decoder()],
|
|
109
|
+
["endsAt", getI64Decoder()],
|
|
110
|
+
["bitmapCount", getU8Decoder()],
|
|
111
|
+
["version", getU8Decoder()],
|
|
112
|
+
["bump", getU8Decoder()]
|
|
113
|
+
]);
|
|
114
|
+
}
|
|
115
|
+
function getAirdropCodec() {
|
|
116
|
+
return combineCodec(getAirdropEncoder(), getAirdropDecoder());
|
|
117
|
+
}
|
|
118
|
+
function decodeAirdrop(encodedAccount) {
|
|
119
|
+
return decodeAccount(
|
|
120
|
+
encodedAccount,
|
|
121
|
+
getAirdropDecoder()
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
function fetchAirdrop(rpc, address, config) {
|
|
125
|
+
return __async(this, null, function* () {
|
|
126
|
+
const maybeAccount = yield fetchMaybeAirdrop(rpc, address, config);
|
|
127
|
+
assertAccountExists(maybeAccount);
|
|
128
|
+
return maybeAccount;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function fetchMaybeAirdrop(rpc, address, config) {
|
|
132
|
+
return __async(this, null, function* () {
|
|
133
|
+
const maybeAccount = yield fetchEncodedAccount(rpc, address, config);
|
|
134
|
+
return decodeAirdrop(maybeAccount);
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function fetchAllAirdrop(rpc, addresses, config) {
|
|
138
|
+
return __async(this, null, function* () {
|
|
139
|
+
const maybeAccounts = yield fetchAllMaybeAirdrop(rpc, addresses, config);
|
|
140
|
+
assertAccountsExist(maybeAccounts);
|
|
141
|
+
return maybeAccounts;
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function fetchAllMaybeAirdrop(rpc, addresses, config) {
|
|
145
|
+
return __async(this, null, function* () {
|
|
146
|
+
const maybeAccounts = yield fetchEncodedAccounts(rpc, addresses, config);
|
|
147
|
+
return maybeAccounts.map((maybeAccount) => decodeAirdrop(maybeAccount));
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// src/accounts/bitmapAccount.ts
|
|
152
|
+
import {
|
|
153
|
+
addDecoderSizePrefix,
|
|
154
|
+
addEncoderSizePrefix,
|
|
155
|
+
assertAccountExists as assertAccountExists2,
|
|
156
|
+
assertAccountsExist as assertAccountsExist2,
|
|
157
|
+
combineCodec as combineCodec2,
|
|
158
|
+
decodeAccount as decodeAccount2,
|
|
159
|
+
fetchEncodedAccount as fetchEncodedAccount2,
|
|
160
|
+
fetchEncodedAccounts as fetchEncodedAccounts2,
|
|
161
|
+
fixDecoderSize as fixDecoderSize2,
|
|
162
|
+
fixEncoderSize as fixEncoderSize2,
|
|
163
|
+
getAddressDecoder as getAddressDecoder2,
|
|
164
|
+
getAddressEncoder as getAddressEncoder2,
|
|
165
|
+
getBytesDecoder as getBytesDecoder2,
|
|
166
|
+
getBytesEncoder as getBytesEncoder2,
|
|
167
|
+
getStructDecoder as getStructDecoder2,
|
|
168
|
+
getStructEncoder as getStructEncoder2,
|
|
169
|
+
getU32Decoder,
|
|
170
|
+
getU32Encoder,
|
|
171
|
+
getU8Decoder as getU8Decoder2,
|
|
172
|
+
getU8Encoder as getU8Encoder2,
|
|
173
|
+
transformEncoder as transformEncoder2
|
|
174
|
+
} from "@solana/kit";
|
|
175
|
+
var BITMAP_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
176
|
+
152,
|
|
177
|
+
161,
|
|
178
|
+
147,
|
|
179
|
+
85,
|
|
180
|
+
213,
|
|
181
|
+
38,
|
|
182
|
+
59,
|
|
183
|
+
48
|
|
184
|
+
]);
|
|
185
|
+
function getBitmapAccountDiscriminatorBytes() {
|
|
186
|
+
return fixEncoderSize2(getBytesEncoder2(), 8).encode(
|
|
187
|
+
BITMAP_ACCOUNT_DISCRIMINATOR
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
function getBitmapAccountEncoder() {
|
|
191
|
+
return transformEncoder2(
|
|
192
|
+
getStructEncoder2([
|
|
193
|
+
["discriminator", fixEncoderSize2(getBytesEncoder2(), 8)],
|
|
194
|
+
["owner", getAddressEncoder2()],
|
|
195
|
+
["airdrop", getAddressEncoder2()],
|
|
196
|
+
[
|
|
197
|
+
"claimedBitmap",
|
|
198
|
+
addEncoderSizePrefix(getBytesEncoder2(), getU32Encoder())
|
|
199
|
+
],
|
|
200
|
+
["id", getU8Encoder2()],
|
|
201
|
+
["version", getU8Encoder2()],
|
|
202
|
+
["bump", getU8Encoder2()]
|
|
203
|
+
]),
|
|
204
|
+
(value) => __spreadProps(__spreadValues({}, value), { discriminator: BITMAP_ACCOUNT_DISCRIMINATOR })
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
function getBitmapAccountDecoder() {
|
|
208
|
+
return getStructDecoder2([
|
|
209
|
+
["discriminator", fixDecoderSize2(getBytesDecoder2(), 8)],
|
|
210
|
+
["owner", getAddressDecoder2()],
|
|
211
|
+
["airdrop", getAddressDecoder2()],
|
|
212
|
+
["claimedBitmap", addDecoderSizePrefix(getBytesDecoder2(), getU32Decoder())],
|
|
213
|
+
["id", getU8Decoder2()],
|
|
214
|
+
["version", getU8Decoder2()],
|
|
215
|
+
["bump", getU8Decoder2()]
|
|
216
|
+
]);
|
|
217
|
+
}
|
|
218
|
+
function getBitmapAccountCodec() {
|
|
219
|
+
return combineCodec2(getBitmapAccountEncoder(), getBitmapAccountDecoder());
|
|
220
|
+
}
|
|
221
|
+
function decodeBitmapAccount(encodedAccount) {
|
|
222
|
+
return decodeAccount2(
|
|
223
|
+
encodedAccount,
|
|
224
|
+
getBitmapAccountDecoder()
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
function fetchBitmapAccount(rpc, address, config) {
|
|
228
|
+
return __async(this, null, function* () {
|
|
229
|
+
const maybeAccount = yield fetchMaybeBitmapAccount(rpc, address, config);
|
|
230
|
+
assertAccountExists2(maybeAccount);
|
|
231
|
+
return maybeAccount;
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
function fetchMaybeBitmapAccount(rpc, address, config) {
|
|
235
|
+
return __async(this, null, function* () {
|
|
236
|
+
const maybeAccount = yield fetchEncodedAccount2(rpc, address, config);
|
|
237
|
+
return decodeBitmapAccount(maybeAccount);
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
function fetchAllBitmapAccount(rpc, addresses, config) {
|
|
241
|
+
return __async(this, null, function* () {
|
|
242
|
+
const maybeAccounts = yield fetchAllMaybeBitmapAccount(
|
|
243
|
+
rpc,
|
|
244
|
+
addresses,
|
|
245
|
+
config
|
|
246
|
+
);
|
|
247
|
+
assertAccountsExist2(maybeAccounts);
|
|
248
|
+
return maybeAccounts;
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
function fetchAllMaybeBitmapAccount(rpc, addresses, config) {
|
|
252
|
+
return __async(this, null, function* () {
|
|
253
|
+
const maybeAccounts = yield fetchEncodedAccounts2(rpc, addresses, config);
|
|
254
|
+
return maybeAccounts.map((maybeAccount) => decodeBitmapAccount(maybeAccount));
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// src/accounts/controller.ts
|
|
259
|
+
import {
|
|
260
|
+
assertAccountExists as assertAccountExists3,
|
|
261
|
+
assertAccountsExist as assertAccountsExist3,
|
|
262
|
+
combineCodec as combineCodec3,
|
|
263
|
+
decodeAccount as decodeAccount3,
|
|
264
|
+
fetchEncodedAccount as fetchEncodedAccount3,
|
|
265
|
+
fetchEncodedAccounts as fetchEncodedAccounts3,
|
|
266
|
+
fixDecoderSize as fixDecoderSize3,
|
|
267
|
+
fixEncoderSize as fixEncoderSize3,
|
|
268
|
+
getAddressDecoder as getAddressDecoder3,
|
|
269
|
+
getAddressEncoder as getAddressEncoder3,
|
|
270
|
+
getBytesDecoder as getBytesDecoder3,
|
|
271
|
+
getBytesEncoder as getBytesEncoder3,
|
|
272
|
+
getStructDecoder as getStructDecoder3,
|
|
273
|
+
getStructEncoder as getStructEncoder3,
|
|
274
|
+
getU64Decoder as getU64Decoder2,
|
|
275
|
+
getU64Encoder as getU64Encoder2,
|
|
276
|
+
getU8Decoder as getU8Decoder3,
|
|
277
|
+
getU8Encoder as getU8Encoder3,
|
|
278
|
+
transformEncoder as transformEncoder3
|
|
279
|
+
} from "@solana/kit";
|
|
280
|
+
var CONTROLLER_DISCRIMINATOR = new Uint8Array([
|
|
281
|
+
184,
|
|
282
|
+
79,
|
|
283
|
+
171,
|
|
284
|
+
0,
|
|
285
|
+
183,
|
|
286
|
+
43,
|
|
287
|
+
113,
|
|
288
|
+
110
|
|
289
|
+
]);
|
|
290
|
+
function getControllerDiscriminatorBytes() {
|
|
291
|
+
return fixEncoderSize3(getBytesEncoder3(), 8).encode(CONTROLLER_DISCRIMINATOR);
|
|
292
|
+
}
|
|
293
|
+
function getControllerEncoder() {
|
|
294
|
+
return transformEncoder3(
|
|
295
|
+
getStructEncoder3([
|
|
296
|
+
["discriminator", fixEncoderSize3(getBytesEncoder3(), 8)],
|
|
297
|
+
["authority", getAddressEncoder3()],
|
|
298
|
+
["feeVault", getAddressEncoder3()],
|
|
299
|
+
["createFee", getU64Encoder2()],
|
|
300
|
+
["claimFee", getU64Encoder2()],
|
|
301
|
+
["version", getU8Encoder3()],
|
|
302
|
+
["bump", getU8Encoder3()]
|
|
303
|
+
]),
|
|
304
|
+
(value) => __spreadProps(__spreadValues({}, value), { discriminator: CONTROLLER_DISCRIMINATOR })
|
|
305
|
+
);
|
|
306
|
+
}
|
|
307
|
+
function getControllerDecoder() {
|
|
308
|
+
return getStructDecoder3([
|
|
309
|
+
["discriminator", fixDecoderSize3(getBytesDecoder3(), 8)],
|
|
310
|
+
["authority", getAddressDecoder3()],
|
|
311
|
+
["feeVault", getAddressDecoder3()],
|
|
312
|
+
["createFee", getU64Decoder2()],
|
|
313
|
+
["claimFee", getU64Decoder2()],
|
|
314
|
+
["version", getU8Decoder3()],
|
|
315
|
+
["bump", getU8Decoder3()]
|
|
316
|
+
]);
|
|
317
|
+
}
|
|
318
|
+
function getControllerCodec() {
|
|
319
|
+
return combineCodec3(getControllerEncoder(), getControllerDecoder());
|
|
320
|
+
}
|
|
321
|
+
function decodeController(encodedAccount) {
|
|
322
|
+
return decodeAccount3(
|
|
323
|
+
encodedAccount,
|
|
324
|
+
getControllerDecoder()
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
function fetchController(rpc, address, config) {
|
|
328
|
+
return __async(this, null, function* () {
|
|
329
|
+
const maybeAccount = yield fetchMaybeController(rpc, address, config);
|
|
330
|
+
assertAccountExists3(maybeAccount);
|
|
331
|
+
return maybeAccount;
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
function fetchMaybeController(rpc, address, config) {
|
|
335
|
+
return __async(this, null, function* () {
|
|
336
|
+
const maybeAccount = yield fetchEncodedAccount3(rpc, address, config);
|
|
337
|
+
return decodeController(maybeAccount);
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
function fetchAllController(rpc, addresses, config) {
|
|
341
|
+
return __async(this, null, function* () {
|
|
342
|
+
const maybeAccounts = yield fetchAllMaybeController(rpc, addresses, config);
|
|
343
|
+
assertAccountsExist3(maybeAccounts);
|
|
344
|
+
return maybeAccounts;
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
function fetchAllMaybeController(rpc, addresses, config) {
|
|
348
|
+
return __async(this, null, function* () {
|
|
349
|
+
const maybeAccounts = yield fetchEncodedAccounts3(rpc, addresses, config);
|
|
350
|
+
return maybeAccounts.map((maybeAccount) => decodeController(maybeAccount));
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// src/errors/dropsy.ts
|
|
355
|
+
import {
|
|
356
|
+
isProgramError
|
|
357
|
+
} from "@solana/kit";
|
|
358
|
+
|
|
359
|
+
// src/programs/dropsy.ts
|
|
360
|
+
import {
|
|
361
|
+
containsBytes,
|
|
362
|
+
fixEncoderSize as fixEncoderSize4,
|
|
363
|
+
getBytesEncoder as getBytesEncoder4
|
|
364
|
+
} from "@solana/kit";
|
|
365
|
+
var DROPSY_PROGRAM_ADDRESS = "DropyEMekkCgKmsWiJVcTCAEeFgvHpDAW19ipWebFaPv";
|
|
366
|
+
var DropsyAccount = /* @__PURE__ */ ((DropsyAccount2) => {
|
|
367
|
+
DropsyAccount2[DropsyAccount2["Airdrop"] = 0] = "Airdrop";
|
|
368
|
+
DropsyAccount2[DropsyAccount2["BitmapAccount"] = 1] = "BitmapAccount";
|
|
369
|
+
DropsyAccount2[DropsyAccount2["Controller"] = 2] = "Controller";
|
|
370
|
+
return DropsyAccount2;
|
|
371
|
+
})(DropsyAccount || {});
|
|
372
|
+
function identifyDropsyAccount(account) {
|
|
373
|
+
const data = "data" in account ? account.data : account;
|
|
374
|
+
if (containsBytes(
|
|
375
|
+
data,
|
|
376
|
+
fixEncoderSize4(getBytesEncoder4(), 8).encode(
|
|
377
|
+
new Uint8Array([31, 112, 159, 158, 124, 237, 9, 241])
|
|
378
|
+
),
|
|
379
|
+
0
|
|
380
|
+
)) {
|
|
381
|
+
return 0 /* Airdrop */;
|
|
382
|
+
}
|
|
383
|
+
if (containsBytes(
|
|
384
|
+
data,
|
|
385
|
+
fixEncoderSize4(getBytesEncoder4(), 8).encode(
|
|
386
|
+
new Uint8Array([152, 161, 147, 85, 213, 38, 59, 48])
|
|
387
|
+
),
|
|
388
|
+
0
|
|
389
|
+
)) {
|
|
390
|
+
return 1 /* BitmapAccount */;
|
|
391
|
+
}
|
|
392
|
+
if (containsBytes(
|
|
393
|
+
data,
|
|
394
|
+
fixEncoderSize4(getBytesEncoder4(), 8).encode(
|
|
395
|
+
new Uint8Array([184, 79, 171, 0, 183, 43, 113, 110])
|
|
396
|
+
),
|
|
397
|
+
0
|
|
398
|
+
)) {
|
|
399
|
+
return 2 /* Controller */;
|
|
400
|
+
}
|
|
401
|
+
throw new Error(
|
|
402
|
+
"The provided account could not be identified as a dropsy account."
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
var DropsyInstruction = /* @__PURE__ */ ((DropsyInstruction2) => {
|
|
406
|
+
DropsyInstruction2[DropsyInstruction2["ClaimTokens"] = 0] = "ClaimTokens";
|
|
407
|
+
DropsyInstruction2[DropsyInstruction2["CloseAirdrop"] = 1] = "CloseAirdrop";
|
|
408
|
+
DropsyInstruction2[DropsyInstruction2["CloseBitmap"] = 2] = "CloseBitmap";
|
|
409
|
+
DropsyInstruction2[DropsyInstruction2["DepositTokens"] = 3] = "DepositTokens";
|
|
410
|
+
DropsyInstruction2[DropsyInstruction2["InitializeAirdrop"] = 4] = "InitializeAirdrop";
|
|
411
|
+
DropsyInstruction2[DropsyInstruction2["InitializeBitmap"] = 5] = "InitializeBitmap";
|
|
412
|
+
DropsyInstruction2[DropsyInstruction2["InitializeController"] = 6] = "InitializeController";
|
|
413
|
+
return DropsyInstruction2;
|
|
414
|
+
})(DropsyInstruction || {});
|
|
415
|
+
function identifyDropsyInstruction(instruction) {
|
|
416
|
+
const data = "data" in instruction ? instruction.data : instruction;
|
|
417
|
+
if (containsBytes(
|
|
418
|
+
data,
|
|
419
|
+
fixEncoderSize4(getBytesEncoder4(), 8).encode(
|
|
420
|
+
new Uint8Array([108, 216, 210, 231, 0, 212, 42, 64])
|
|
421
|
+
),
|
|
422
|
+
0
|
|
423
|
+
)) {
|
|
424
|
+
return 0 /* ClaimTokens */;
|
|
425
|
+
}
|
|
426
|
+
if (containsBytes(
|
|
427
|
+
data,
|
|
428
|
+
fixEncoderSize4(getBytesEncoder4(), 8).encode(
|
|
429
|
+
new Uint8Array([85, 138, 99, 129, 104, 203, 94, 4])
|
|
430
|
+
),
|
|
431
|
+
0
|
|
432
|
+
)) {
|
|
433
|
+
return 1 /* CloseAirdrop */;
|
|
434
|
+
}
|
|
435
|
+
if (containsBytes(
|
|
436
|
+
data,
|
|
437
|
+
fixEncoderSize4(getBytesEncoder4(), 8).encode(
|
|
438
|
+
new Uint8Array([59, 123, 115, 204, 163, 227, 37, 118])
|
|
439
|
+
),
|
|
440
|
+
0
|
|
441
|
+
)) {
|
|
442
|
+
return 2 /* CloseBitmap */;
|
|
443
|
+
}
|
|
444
|
+
if (containsBytes(
|
|
445
|
+
data,
|
|
446
|
+
fixEncoderSize4(getBytesEncoder4(), 8).encode(
|
|
447
|
+
new Uint8Array([176, 83, 229, 18, 191, 143, 176, 150])
|
|
448
|
+
),
|
|
449
|
+
0
|
|
450
|
+
)) {
|
|
451
|
+
return 3 /* DepositTokens */;
|
|
452
|
+
}
|
|
453
|
+
if (containsBytes(
|
|
454
|
+
data,
|
|
455
|
+
fixEncoderSize4(getBytesEncoder4(), 8).encode(
|
|
456
|
+
new Uint8Array([96, 196, 74, 102, 61, 195, 48, 184])
|
|
457
|
+
),
|
|
458
|
+
0
|
|
459
|
+
)) {
|
|
460
|
+
return 4 /* InitializeAirdrop */;
|
|
461
|
+
}
|
|
462
|
+
if (containsBytes(
|
|
463
|
+
data,
|
|
464
|
+
fixEncoderSize4(getBytesEncoder4(), 8).encode(
|
|
465
|
+
new Uint8Array([25, 109, 200, 45, 209, 118, 74, 69])
|
|
466
|
+
),
|
|
467
|
+
0
|
|
468
|
+
)) {
|
|
469
|
+
return 5 /* InitializeBitmap */;
|
|
470
|
+
}
|
|
471
|
+
if (containsBytes(
|
|
472
|
+
data,
|
|
473
|
+
fixEncoderSize4(getBytesEncoder4(), 8).encode(
|
|
474
|
+
new Uint8Array([137, 255, 100, 190, 201, 247, 241, 81])
|
|
475
|
+
),
|
|
476
|
+
0
|
|
477
|
+
)) {
|
|
478
|
+
return 6 /* InitializeController */;
|
|
479
|
+
}
|
|
480
|
+
throw new Error(
|
|
481
|
+
"The provided instruction could not be identified as a dropsy instruction."
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
// src/errors/dropsy.ts
|
|
486
|
+
var DROPSY_ERROR__AIRDROP_NOT_STARTED = 6100;
|
|
487
|
+
var DROPSY_ERROR__AIRDROP_ENDED = 6101;
|
|
488
|
+
var DROPSY_ERROR__AIRDROP_NOT_ENDED = 6102;
|
|
489
|
+
var DROPSY_ERROR__DURATION_TOO_SHORT = 6103;
|
|
490
|
+
var DROPSY_ERROR__INVALID_END_TIME = 6104;
|
|
491
|
+
var DROPSY_ERROR__INVALID_OWNER = 6200;
|
|
492
|
+
var DROPSY_ERROR__OWNER_MISMATCH = 6201;
|
|
493
|
+
var DROPSY_ERROR__INVALID_VAULT_AUTHORITY = 6202;
|
|
494
|
+
var DROPSY_ERROR__INVALID_DESTINATION_OWNER = 6203;
|
|
495
|
+
var DROPSY_ERROR__CONTROLLER_MISMATCH = 6204;
|
|
496
|
+
var DROPSY_ERROR__INVALID_MINT = 6300;
|
|
497
|
+
var DROPSY_ERROR__MINT_MISMATCH = 6301;
|
|
498
|
+
var DROPSY_ERROR__VAULT_MINT_MISMATCH = 6302;
|
|
499
|
+
var DROPSY_ERROR__DESTINATION_MINT_MISMATCH = 6303;
|
|
500
|
+
var DROPSY_ERROR__MINT_IS_FROZEN = 6304;
|
|
501
|
+
var DROPSY_ERROR__INVALID_MINT_OWNER = 6305;
|
|
502
|
+
var DROPSY_ERROR__MINT_IS_NOT_INITIALIZED = 6306;
|
|
503
|
+
var DROPSY_ERROR__MINT_HAS_FREEZE_AUTHORITY = 6307;
|
|
504
|
+
var DROPSY_ERROR__NFT_NOT_ALLOWED = 6308;
|
|
505
|
+
var DROPSY_ERROR__VAULT_HAS_DELEGATE = 6401;
|
|
506
|
+
var DROPSY_ERROR__VAULT_FROZEN = 6402;
|
|
507
|
+
var DROPSY_ERROR__VAULT_HAS_CLOSE_AUTHORITY = 6403;
|
|
508
|
+
var DROPSY_ERROR__INVALID_AIRDROP_PDA = 6404;
|
|
509
|
+
var DROPSY_ERROR__VAULT_NOT_INITIALIZED = 6405;
|
|
510
|
+
var DROPSY_ERROR__INSUFFICIENT_VAULT_FUNDS = 6406;
|
|
511
|
+
var DROPSY_ERROR__SOURCE_HAS_DELEGATE = 6450;
|
|
512
|
+
var DROPSY_ERROR__SOURCE_ACCOUNT_FROZEN = 6451;
|
|
513
|
+
var DROPSY_ERROR__SOURCE_HAS_CLOSE_AUTHORITY = 6452;
|
|
514
|
+
var DROPSY_ERROR__INVALID_PROOF = 6500;
|
|
515
|
+
var DROPSY_ERROR__ALREADY_CLAIMED = 6501;
|
|
516
|
+
var DROPSY_ERROR__MISSING_BITMAP_PDA = 6502;
|
|
517
|
+
var DROPSY_ERROR__INVALID_BITMAP_ACCOUNT = 6503;
|
|
518
|
+
var DROPSY_ERROR__INVALID_BITMAP_INDEX = 6504;
|
|
519
|
+
var DROPSY_ERROR__TOO_MANY_BITMAPS = 6505;
|
|
520
|
+
var DROPSY_ERROR__BITMAP_TOO_LARGE = 6506;
|
|
521
|
+
var DROPSY_ERROR__INVALID_TOTAL = 6507;
|
|
522
|
+
var DROPSY_ERROR__BITMAP_AIRDROP_MISMATCH = 6508;
|
|
523
|
+
var DROPSY_ERROR__ACTIVE_BITMAPS_EXIST = 6509;
|
|
524
|
+
var DROPSY_ERROR__BITMAP_COUNT_UNDERFLOW = 6510;
|
|
525
|
+
var DROPSY_ERROR__INSUFFICIENT_DEPOSIT = 6600;
|
|
526
|
+
var DROPSY_ERROR__CREATE_FEE_TOO_HIGH = 6601;
|
|
527
|
+
var DROPSY_ERROR__CLAIM_FEE_TOO_HIGH = 6602;
|
|
528
|
+
var DROPSY_ERROR__INSUFFICIENT_FUNDS_FOR_FEE = 6603;
|
|
529
|
+
var DROPSY_ERROR__INVALID_FEE_VAULT = 6604;
|
|
530
|
+
var DROPSY_ERROR__INVALID_FEE_VAULT_OWNER = 6605;
|
|
531
|
+
var DROPSY_ERROR__INVALID_FEE_VAULT_CURVE = 6606;
|
|
532
|
+
var DROPSY_ERROR__INVALID_PDA = 6700;
|
|
533
|
+
var DROPSY_ERROR__INVALID_AMOUNT = 6701;
|
|
534
|
+
var DROPSY_ERROR__OVERFLOW = 6702;
|
|
535
|
+
var DROPSY_ERROR__VAULT_NOT_RENT_EXEMPT = 6703;
|
|
536
|
+
var DROPSY_ERROR__INVALID_TREASURY_ACCOUNT = 6704;
|
|
537
|
+
var dropsyErrorMessages;
|
|
538
|
+
if (process.env.NODE_ENV !== "production") {
|
|
539
|
+
dropsyErrorMessages = {
|
|
540
|
+
[DROPSY_ERROR__ACTIVE_BITMAPS_EXIST]: `Active bitmaps exist`,
|
|
541
|
+
[DROPSY_ERROR__AIRDROP_ENDED]: `Airdrop has already ended`,
|
|
542
|
+
[DROPSY_ERROR__AIRDROP_NOT_ENDED]: `Airdrop not yet ended`,
|
|
543
|
+
[DROPSY_ERROR__AIRDROP_NOT_STARTED]: `Airdrop has not started yet`,
|
|
544
|
+
[DROPSY_ERROR__ALREADY_CLAIMED]: `Tokens already claimed`,
|
|
545
|
+
[DROPSY_ERROR__BITMAP_AIRDROP_MISMATCH]: `Bitmap/airdrop mismatch`,
|
|
546
|
+
[DROPSY_ERROR__BITMAP_COUNT_UNDERFLOW]: `Bitmaps already closed`,
|
|
547
|
+
[DROPSY_ERROR__BITMAP_TOO_LARGE]: `Bitmap size exceeds limit`,
|
|
548
|
+
[DROPSY_ERROR__CLAIM_FEE_TOO_HIGH]: `Claim fee too high (>0.005 SOL)`,
|
|
549
|
+
[DROPSY_ERROR__CONTROLLER_MISMATCH]: `Mismatched controller`,
|
|
550
|
+
[DROPSY_ERROR__CREATE_FEE_TOO_HIGH]: `Create fee too high (>0.05 SOL)`,
|
|
551
|
+
[DROPSY_ERROR__DESTINATION_MINT_MISMATCH]: `Destination mint doesn't match`,
|
|
552
|
+
[DROPSY_ERROR__DURATION_TOO_SHORT]: `Airdrop duration must be at least 24 hours`,
|
|
553
|
+
[DROPSY_ERROR__INSUFFICIENT_DEPOSIT]: `Insufficient SOL deposit`,
|
|
554
|
+
[DROPSY_ERROR__INSUFFICIENT_FUNDS_FOR_FEE]: `Insufficient funds for fee`,
|
|
555
|
+
[DROPSY_ERROR__INSUFFICIENT_VAULT_FUNDS]: `Insufficient vault funds`,
|
|
556
|
+
[DROPSY_ERROR__INVALID_AIRDROP_PDA]: `Invalid vault account`,
|
|
557
|
+
[DROPSY_ERROR__INVALID_AMOUNT]: `Invalid amount`,
|
|
558
|
+
[DROPSY_ERROR__INVALID_BITMAP_ACCOUNT]: `Invalid bitmap account`,
|
|
559
|
+
[DROPSY_ERROR__INVALID_BITMAP_INDEX]: `Invalid bitmap index`,
|
|
560
|
+
[DROPSY_ERROR__INVALID_DESTINATION_OWNER]: `Destination account owner is not the signer`,
|
|
561
|
+
[DROPSY_ERROR__INVALID_END_TIME]: `Airdrop must end at least 24 hours in the future`,
|
|
562
|
+
[DROPSY_ERROR__INVALID_FEE_VAULT]: `Invalid fee vault`,
|
|
563
|
+
[DROPSY_ERROR__INVALID_FEE_VAULT_CURVE]: `Fee vault not in curve`,
|
|
564
|
+
[DROPSY_ERROR__INVALID_FEE_VAULT_OWNER]: `Invalid fee vault owner`,
|
|
565
|
+
[DROPSY_ERROR__INVALID_MINT]: `Mint does not match stored state`,
|
|
566
|
+
[DROPSY_ERROR__INVALID_MINT_OWNER]: `Invalid token program owner`,
|
|
567
|
+
[DROPSY_ERROR__INVALID_OWNER]: `Transaction sender is not the owner`,
|
|
568
|
+
[DROPSY_ERROR__INVALID_PDA]: `Invalid PDA account`,
|
|
569
|
+
[DROPSY_ERROR__INVALID_PROOF]: `Invalid merkle proof`,
|
|
570
|
+
[DROPSY_ERROR__INVALID_TOTAL]: `Invalid total claimers`,
|
|
571
|
+
[DROPSY_ERROR__INVALID_TREASURY_ACCOUNT]: `invalid treasury account`,
|
|
572
|
+
[DROPSY_ERROR__INVALID_VAULT_AUTHORITY]: `Invalid vault authority`,
|
|
573
|
+
[DROPSY_ERROR__MINT_HAS_FREEZE_AUTHORITY]: `Mint has freeze authority`,
|
|
574
|
+
[DROPSY_ERROR__MINT_IS_FROZEN]: `Mint is frozen`,
|
|
575
|
+
[DROPSY_ERROR__MINT_IS_NOT_INITIALIZED]: `Mint must be initialized`,
|
|
576
|
+
[DROPSY_ERROR__MINT_MISMATCH]: `Provided mint doesn't match airdrop's mint`,
|
|
577
|
+
[DROPSY_ERROR__MISSING_BITMAP_PDA]: `Missing bitmap PDA`,
|
|
578
|
+
[DROPSY_ERROR__NFT_NOT_ALLOWED]: `Fungible tokens only (no NFTs)`,
|
|
579
|
+
[DROPSY_ERROR__OVERFLOW]: `Arithmetic overflow`,
|
|
580
|
+
[DROPSY_ERROR__OWNER_MISMATCH]: `Airdrop owner mismatch`,
|
|
581
|
+
[DROPSY_ERROR__SOURCE_ACCOUNT_FROZEN]: `Source account is frozen`,
|
|
582
|
+
[DROPSY_ERROR__SOURCE_HAS_CLOSE_AUTHORITY]: `Source has close authority`,
|
|
583
|
+
[DROPSY_ERROR__SOURCE_HAS_DELEGATE]: `Source has delegate set`,
|
|
584
|
+
[DROPSY_ERROR__TOO_MANY_BITMAPS]: `Too many bitmap accounts`,
|
|
585
|
+
[DROPSY_ERROR__VAULT_FROZEN]: `Vault is frozen`,
|
|
586
|
+
[DROPSY_ERROR__VAULT_HAS_CLOSE_AUTHORITY]: `Vault has close authority`,
|
|
587
|
+
[DROPSY_ERROR__VAULT_HAS_DELEGATE]: `Vault has delegate set`,
|
|
588
|
+
[DROPSY_ERROR__VAULT_MINT_MISMATCH]: `Vault mint doesn't match airdrop mint`,
|
|
589
|
+
[DROPSY_ERROR__VAULT_NOT_INITIALIZED]: `Vault not initialized`,
|
|
590
|
+
[DROPSY_ERROR__VAULT_NOT_RENT_EXEMPT]: `Vault not rent exempt`
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
function getDropsyErrorMessage(code) {
|
|
594
|
+
if (process.env.NODE_ENV !== "production") {
|
|
595
|
+
return dropsyErrorMessages[code];
|
|
596
|
+
}
|
|
597
|
+
return "Error message not available in production bundles.";
|
|
598
|
+
}
|
|
599
|
+
function isDropsyError(error, transactionMessage, code) {
|
|
600
|
+
return isProgramError(
|
|
601
|
+
error,
|
|
602
|
+
transactionMessage,
|
|
603
|
+
DROPSY_PROGRAM_ADDRESS,
|
|
604
|
+
code
|
|
605
|
+
);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
// src/instructions/claimTokens.ts
|
|
609
|
+
import {
|
|
610
|
+
combineCodec as combineCodec4,
|
|
611
|
+
fixDecoderSize as fixDecoderSize4,
|
|
612
|
+
fixEncoderSize as fixEncoderSize5,
|
|
613
|
+
getArrayDecoder as getArrayDecoder2,
|
|
614
|
+
getArrayEncoder as getArrayEncoder2,
|
|
615
|
+
getBytesDecoder as getBytesDecoder4,
|
|
616
|
+
getBytesEncoder as getBytesEncoder5,
|
|
617
|
+
getStructDecoder as getStructDecoder4,
|
|
618
|
+
getStructEncoder as getStructEncoder4,
|
|
619
|
+
getU64Decoder as getU64Decoder3,
|
|
620
|
+
getU64Encoder as getU64Encoder3,
|
|
621
|
+
getU8Decoder as getU8Decoder4,
|
|
622
|
+
getU8Encoder as getU8Encoder4,
|
|
623
|
+
transformEncoder as transformEncoder4
|
|
624
|
+
} from "@solana/kit";
|
|
625
|
+
|
|
626
|
+
// src/shared/index.ts
|
|
627
|
+
import {
|
|
628
|
+
AccountRole,
|
|
629
|
+
isProgramDerivedAddress,
|
|
630
|
+
isTransactionSigner as kitIsTransactionSigner,
|
|
631
|
+
upgradeRoleToSigner
|
|
632
|
+
} from "@solana/kit";
|
|
633
|
+
function expectSome(value) {
|
|
634
|
+
if (value == null) {
|
|
635
|
+
throw new Error("Expected a value but received null or undefined.");
|
|
636
|
+
}
|
|
637
|
+
return value;
|
|
638
|
+
}
|
|
639
|
+
function expectAddress(value) {
|
|
640
|
+
if (!value) {
|
|
641
|
+
throw new Error("Expected a Address.");
|
|
642
|
+
}
|
|
643
|
+
if (typeof value === "object" && "address" in value) {
|
|
644
|
+
return value.address;
|
|
645
|
+
}
|
|
646
|
+
if (Array.isArray(value)) {
|
|
647
|
+
return value[0];
|
|
648
|
+
}
|
|
649
|
+
return value;
|
|
650
|
+
}
|
|
651
|
+
function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
|
|
652
|
+
return (account) => {
|
|
653
|
+
if (!account.value) {
|
|
654
|
+
if (optionalAccountStrategy === "omitted") return;
|
|
655
|
+
return Object.freeze({
|
|
656
|
+
address: programAddress,
|
|
657
|
+
role: AccountRole.READONLY
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
|
|
661
|
+
return Object.freeze(__spreadValues({
|
|
662
|
+
address: expectAddress(account.value),
|
|
663
|
+
role: isTransactionSigner(account.value) ? upgradeRoleToSigner(writableRole) : writableRole
|
|
664
|
+
}, isTransactionSigner(account.value) ? { signer: account.value } : {}));
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
function isTransactionSigner(value) {
|
|
668
|
+
return !!value && typeof value === "object" && "address" in value && kitIsTransactionSigner(value);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
// src/instructions/claimTokens.ts
|
|
672
|
+
var CLAIM_TOKENS_DISCRIMINATOR = new Uint8Array([
|
|
673
|
+
108,
|
|
674
|
+
216,
|
|
675
|
+
210,
|
|
676
|
+
231,
|
|
677
|
+
0,
|
|
678
|
+
212,
|
|
679
|
+
42,
|
|
680
|
+
64
|
|
681
|
+
]);
|
|
682
|
+
function getClaimTokensDiscriminatorBytes() {
|
|
683
|
+
return fixEncoderSize5(getBytesEncoder5(), 8).encode(
|
|
684
|
+
CLAIM_TOKENS_DISCRIMINATOR
|
|
685
|
+
);
|
|
686
|
+
}
|
|
687
|
+
function getClaimTokensInstructionDataEncoder() {
|
|
688
|
+
return transformEncoder4(
|
|
689
|
+
getStructEncoder4([
|
|
690
|
+
["discriminator", fixEncoderSize5(getBytesEncoder5(), 8)],
|
|
691
|
+
["index", getU64Encoder3()],
|
|
692
|
+
["proof", getArrayEncoder2(getArrayEncoder2(getU8Encoder4(), { size: 32 }))],
|
|
693
|
+
["amount", getU64Encoder3()]
|
|
694
|
+
]),
|
|
695
|
+
(value) => __spreadProps(__spreadValues({}, value), { discriminator: CLAIM_TOKENS_DISCRIMINATOR })
|
|
696
|
+
);
|
|
697
|
+
}
|
|
698
|
+
function getClaimTokensInstructionDataDecoder() {
|
|
699
|
+
return getStructDecoder4([
|
|
700
|
+
["discriminator", fixDecoderSize4(getBytesDecoder4(), 8)],
|
|
701
|
+
["index", getU64Decoder3()],
|
|
702
|
+
["proof", getArrayDecoder2(getArrayDecoder2(getU8Decoder4(), { size: 32 }))],
|
|
703
|
+
["amount", getU64Decoder3()]
|
|
704
|
+
]);
|
|
705
|
+
}
|
|
706
|
+
function getClaimTokensInstructionDataCodec() {
|
|
707
|
+
return combineCodec4(
|
|
708
|
+
getClaimTokensInstructionDataEncoder(),
|
|
709
|
+
getClaimTokensInstructionDataDecoder()
|
|
710
|
+
);
|
|
711
|
+
}
|
|
712
|
+
function getClaimTokensInstruction(input, config) {
|
|
713
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
714
|
+
const programAddress = (_a = config == null ? void 0 : config.programAddress) != null ? _a : DROPSY_PROGRAM_ADDRESS;
|
|
715
|
+
const originalAccounts = {
|
|
716
|
+
vault: { value: (_b = input.vault) != null ? _b : null, isWritable: true },
|
|
717
|
+
destinationTokenAccount: {
|
|
718
|
+
value: (_c = input.destinationTokenAccount) != null ? _c : null,
|
|
719
|
+
isWritable: true
|
|
720
|
+
},
|
|
721
|
+
airdrop: { value: (_d = input.airdrop) != null ? _d : null, isWritable: false },
|
|
722
|
+
bitmap: { value: (_e = input.bitmap) != null ? _e : null, isWritable: true },
|
|
723
|
+
mint: { value: (_f = input.mint) != null ? _f : null, isWritable: false },
|
|
724
|
+
feeVault: { value: (_g = input.feeVault) != null ? _g : null, isWritable: true },
|
|
725
|
+
controller: { value: (_h = input.controller) != null ? _h : null, isWritable: false },
|
|
726
|
+
claimer: { value: (_i = input.claimer) != null ? _i : null, isWritable: true },
|
|
727
|
+
treasury: { value: (_j = input.treasury) != null ? _j : null, isWritable: true },
|
|
728
|
+
tokenProgram: { value: (_k = input.tokenProgram) != null ? _k : null, isWritable: false },
|
|
729
|
+
systemProgram: { value: (_l = input.systemProgram) != null ? _l : null, isWritable: false }
|
|
730
|
+
};
|
|
731
|
+
const accounts = originalAccounts;
|
|
732
|
+
const args = __spreadValues({}, input);
|
|
733
|
+
if (!accounts.treasury.value) {
|
|
734
|
+
accounts.treasury.value = "DHffy4rNMtuL8VKgyBEay4jcq8AYHyoAzxLKU6aEijUV";
|
|
735
|
+
}
|
|
736
|
+
if (!accounts.tokenProgram.value) {
|
|
737
|
+
accounts.tokenProgram.value = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
738
|
+
}
|
|
739
|
+
if (!accounts.systemProgram.value) {
|
|
740
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
741
|
+
}
|
|
742
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
743
|
+
const instruction = {
|
|
744
|
+
accounts: [
|
|
745
|
+
getAccountMeta(accounts.vault),
|
|
746
|
+
getAccountMeta(accounts.destinationTokenAccount),
|
|
747
|
+
getAccountMeta(accounts.airdrop),
|
|
748
|
+
getAccountMeta(accounts.bitmap),
|
|
749
|
+
getAccountMeta(accounts.mint),
|
|
750
|
+
getAccountMeta(accounts.feeVault),
|
|
751
|
+
getAccountMeta(accounts.controller),
|
|
752
|
+
getAccountMeta(accounts.claimer),
|
|
753
|
+
getAccountMeta(accounts.treasury),
|
|
754
|
+
getAccountMeta(accounts.tokenProgram),
|
|
755
|
+
getAccountMeta(accounts.systemProgram)
|
|
756
|
+
],
|
|
757
|
+
programAddress,
|
|
758
|
+
data: getClaimTokensInstructionDataEncoder().encode(
|
|
759
|
+
args
|
|
760
|
+
)
|
|
761
|
+
};
|
|
762
|
+
return instruction;
|
|
763
|
+
}
|
|
764
|
+
function parseClaimTokensInstruction(instruction) {
|
|
765
|
+
if (instruction.accounts.length < 11) {
|
|
766
|
+
throw new Error("Not enough accounts");
|
|
767
|
+
}
|
|
768
|
+
let accountIndex = 0;
|
|
769
|
+
const getNextAccount = () => {
|
|
770
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
771
|
+
accountIndex += 1;
|
|
772
|
+
return accountMeta;
|
|
773
|
+
};
|
|
774
|
+
return {
|
|
775
|
+
programAddress: instruction.programAddress,
|
|
776
|
+
accounts: {
|
|
777
|
+
vault: getNextAccount(),
|
|
778
|
+
destinationTokenAccount: getNextAccount(),
|
|
779
|
+
airdrop: getNextAccount(),
|
|
780
|
+
bitmap: getNextAccount(),
|
|
781
|
+
mint: getNextAccount(),
|
|
782
|
+
feeVault: getNextAccount(),
|
|
783
|
+
controller: getNextAccount(),
|
|
784
|
+
claimer: getNextAccount(),
|
|
785
|
+
treasury: getNextAccount(),
|
|
786
|
+
tokenProgram: getNextAccount(),
|
|
787
|
+
systemProgram: getNextAccount()
|
|
788
|
+
},
|
|
789
|
+
data: getClaimTokensInstructionDataDecoder().decode(instruction.data)
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
// src/instructions/closeAirdrop.ts
|
|
794
|
+
import {
|
|
795
|
+
combineCodec as combineCodec5,
|
|
796
|
+
fixDecoderSize as fixDecoderSize5,
|
|
797
|
+
fixEncoderSize as fixEncoderSize6,
|
|
798
|
+
getBytesDecoder as getBytesDecoder5,
|
|
799
|
+
getBytesEncoder as getBytesEncoder6,
|
|
800
|
+
getStructDecoder as getStructDecoder5,
|
|
801
|
+
getStructEncoder as getStructEncoder5,
|
|
802
|
+
transformEncoder as transformEncoder5
|
|
803
|
+
} from "@solana/kit";
|
|
804
|
+
var CLOSE_AIRDROP_DISCRIMINATOR = new Uint8Array([
|
|
805
|
+
85,
|
|
806
|
+
138,
|
|
807
|
+
99,
|
|
808
|
+
129,
|
|
809
|
+
104,
|
|
810
|
+
203,
|
|
811
|
+
94,
|
|
812
|
+
4
|
|
813
|
+
]);
|
|
814
|
+
function getCloseAirdropDiscriminatorBytes() {
|
|
815
|
+
return fixEncoderSize6(getBytesEncoder6(), 8).encode(
|
|
816
|
+
CLOSE_AIRDROP_DISCRIMINATOR
|
|
817
|
+
);
|
|
818
|
+
}
|
|
819
|
+
function getCloseAirdropInstructionDataEncoder() {
|
|
820
|
+
return transformEncoder5(
|
|
821
|
+
getStructEncoder5([["discriminator", fixEncoderSize6(getBytesEncoder6(), 8)]]),
|
|
822
|
+
(value) => __spreadProps(__spreadValues({}, value), { discriminator: CLOSE_AIRDROP_DISCRIMINATOR })
|
|
823
|
+
);
|
|
824
|
+
}
|
|
825
|
+
function getCloseAirdropInstructionDataDecoder() {
|
|
826
|
+
return getStructDecoder5([
|
|
827
|
+
["discriminator", fixDecoderSize5(getBytesDecoder5(), 8)]
|
|
828
|
+
]);
|
|
829
|
+
}
|
|
830
|
+
function getCloseAirdropInstructionDataCodec() {
|
|
831
|
+
return combineCodec5(
|
|
832
|
+
getCloseAirdropInstructionDataEncoder(),
|
|
833
|
+
getCloseAirdropInstructionDataDecoder()
|
|
834
|
+
);
|
|
835
|
+
}
|
|
836
|
+
function getCloseAirdropInstruction(input, config) {
|
|
837
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
838
|
+
const programAddress = (_a = config == null ? void 0 : config.programAddress) != null ? _a : DROPSY_PROGRAM_ADDRESS;
|
|
839
|
+
const originalAccounts = {
|
|
840
|
+
airdrop: { value: (_b = input.airdrop) != null ? _b : null, isWritable: true },
|
|
841
|
+
vault: { value: (_c = input.vault) != null ? _c : null, isWritable: true },
|
|
842
|
+
destinationTokenAccount: {
|
|
843
|
+
value: (_d = input.destinationTokenAccount) != null ? _d : null,
|
|
844
|
+
isWritable: true
|
|
845
|
+
},
|
|
846
|
+
owner: { value: (_e = input.owner) != null ? _e : null, isWritable: true },
|
|
847
|
+
mint: { value: (_f = input.mint) != null ? _f : null, isWritable: false },
|
|
848
|
+
tokenProgram: { value: (_g = input.tokenProgram) != null ? _g : null, isWritable: false }
|
|
849
|
+
};
|
|
850
|
+
const accounts = originalAccounts;
|
|
851
|
+
if (!accounts.tokenProgram.value) {
|
|
852
|
+
accounts.tokenProgram.value = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
853
|
+
}
|
|
854
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
855
|
+
const instruction = {
|
|
856
|
+
accounts: [
|
|
857
|
+
getAccountMeta(accounts.airdrop),
|
|
858
|
+
getAccountMeta(accounts.vault),
|
|
859
|
+
getAccountMeta(accounts.destinationTokenAccount),
|
|
860
|
+
getAccountMeta(accounts.owner),
|
|
861
|
+
getAccountMeta(accounts.mint),
|
|
862
|
+
getAccountMeta(accounts.tokenProgram)
|
|
863
|
+
],
|
|
864
|
+
programAddress,
|
|
865
|
+
data: getCloseAirdropInstructionDataEncoder().encode({})
|
|
866
|
+
};
|
|
867
|
+
return instruction;
|
|
868
|
+
}
|
|
869
|
+
function parseCloseAirdropInstruction(instruction) {
|
|
870
|
+
if (instruction.accounts.length < 6) {
|
|
871
|
+
throw new Error("Not enough accounts");
|
|
872
|
+
}
|
|
873
|
+
let accountIndex = 0;
|
|
874
|
+
const getNextAccount = () => {
|
|
875
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
876
|
+
accountIndex += 1;
|
|
877
|
+
return accountMeta;
|
|
878
|
+
};
|
|
879
|
+
return {
|
|
880
|
+
programAddress: instruction.programAddress,
|
|
881
|
+
accounts: {
|
|
882
|
+
airdrop: getNextAccount(),
|
|
883
|
+
vault: getNextAccount(),
|
|
884
|
+
destinationTokenAccount: getNextAccount(),
|
|
885
|
+
owner: getNextAccount(),
|
|
886
|
+
mint: getNextAccount(),
|
|
887
|
+
tokenProgram: getNextAccount()
|
|
888
|
+
},
|
|
889
|
+
data: getCloseAirdropInstructionDataDecoder().decode(instruction.data)
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
// src/instructions/closeBitmap.ts
|
|
894
|
+
import {
|
|
895
|
+
combineCodec as combineCodec6,
|
|
896
|
+
fixDecoderSize as fixDecoderSize6,
|
|
897
|
+
fixEncoderSize as fixEncoderSize7,
|
|
898
|
+
getBytesDecoder as getBytesDecoder6,
|
|
899
|
+
getBytesEncoder as getBytesEncoder7,
|
|
900
|
+
getStructDecoder as getStructDecoder6,
|
|
901
|
+
getStructEncoder as getStructEncoder6,
|
|
902
|
+
transformEncoder as transformEncoder6
|
|
903
|
+
} from "@solana/kit";
|
|
904
|
+
var CLOSE_BITMAP_DISCRIMINATOR = new Uint8Array([
|
|
905
|
+
59,
|
|
906
|
+
123,
|
|
907
|
+
115,
|
|
908
|
+
204,
|
|
909
|
+
163,
|
|
910
|
+
227,
|
|
911
|
+
37,
|
|
912
|
+
118
|
|
913
|
+
]);
|
|
914
|
+
function getCloseBitmapDiscriminatorBytes() {
|
|
915
|
+
return fixEncoderSize7(getBytesEncoder7(), 8).encode(
|
|
916
|
+
CLOSE_BITMAP_DISCRIMINATOR
|
|
917
|
+
);
|
|
918
|
+
}
|
|
919
|
+
function getCloseBitmapInstructionDataEncoder() {
|
|
920
|
+
return transformEncoder6(
|
|
921
|
+
getStructEncoder6([["discriminator", fixEncoderSize7(getBytesEncoder7(), 8)]]),
|
|
922
|
+
(value) => __spreadProps(__spreadValues({}, value), { discriminator: CLOSE_BITMAP_DISCRIMINATOR })
|
|
923
|
+
);
|
|
924
|
+
}
|
|
925
|
+
function getCloseBitmapInstructionDataDecoder() {
|
|
926
|
+
return getStructDecoder6([
|
|
927
|
+
["discriminator", fixDecoderSize6(getBytesDecoder6(), 8)]
|
|
928
|
+
]);
|
|
929
|
+
}
|
|
930
|
+
function getCloseBitmapInstructionDataCodec() {
|
|
931
|
+
return combineCodec6(
|
|
932
|
+
getCloseBitmapInstructionDataEncoder(),
|
|
933
|
+
getCloseBitmapInstructionDataDecoder()
|
|
934
|
+
);
|
|
935
|
+
}
|
|
936
|
+
function getCloseBitmapInstruction(input, config) {
|
|
937
|
+
var _a, _b, _c, _d;
|
|
938
|
+
const programAddress = (_a = config == null ? void 0 : config.programAddress) != null ? _a : DROPSY_PROGRAM_ADDRESS;
|
|
939
|
+
const originalAccounts = {
|
|
940
|
+
airdrop: { value: (_b = input.airdrop) != null ? _b : null, isWritable: true },
|
|
941
|
+
bitmap: { value: (_c = input.bitmap) != null ? _c : null, isWritable: true },
|
|
942
|
+
owner: { value: (_d = input.owner) != null ? _d : null, isWritable: true }
|
|
943
|
+
};
|
|
944
|
+
const accounts = originalAccounts;
|
|
945
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
946
|
+
const instruction = {
|
|
947
|
+
accounts: [
|
|
948
|
+
getAccountMeta(accounts.airdrop),
|
|
949
|
+
getAccountMeta(accounts.bitmap),
|
|
950
|
+
getAccountMeta(accounts.owner)
|
|
951
|
+
],
|
|
952
|
+
programAddress,
|
|
953
|
+
data: getCloseBitmapInstructionDataEncoder().encode({})
|
|
954
|
+
};
|
|
955
|
+
return instruction;
|
|
956
|
+
}
|
|
957
|
+
function parseCloseBitmapInstruction(instruction) {
|
|
958
|
+
if (instruction.accounts.length < 3) {
|
|
959
|
+
throw new Error("Not enough accounts");
|
|
960
|
+
}
|
|
961
|
+
let accountIndex = 0;
|
|
962
|
+
const getNextAccount = () => {
|
|
963
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
964
|
+
accountIndex += 1;
|
|
965
|
+
return accountMeta;
|
|
966
|
+
};
|
|
967
|
+
return {
|
|
968
|
+
programAddress: instruction.programAddress,
|
|
969
|
+
accounts: {
|
|
970
|
+
airdrop: getNextAccount(),
|
|
971
|
+
bitmap: getNextAccount(),
|
|
972
|
+
owner: getNextAccount()
|
|
973
|
+
},
|
|
974
|
+
data: getCloseBitmapInstructionDataDecoder().decode(instruction.data)
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
// src/instructions/depositTokens.ts
|
|
979
|
+
import {
|
|
980
|
+
combineCodec as combineCodec7,
|
|
981
|
+
fixDecoderSize as fixDecoderSize7,
|
|
982
|
+
fixEncoderSize as fixEncoderSize8,
|
|
983
|
+
getBytesDecoder as getBytesDecoder7,
|
|
984
|
+
getBytesEncoder as getBytesEncoder8,
|
|
985
|
+
getStructDecoder as getStructDecoder7,
|
|
986
|
+
getStructEncoder as getStructEncoder7,
|
|
987
|
+
getU64Decoder as getU64Decoder4,
|
|
988
|
+
getU64Encoder as getU64Encoder4,
|
|
989
|
+
transformEncoder as transformEncoder7
|
|
990
|
+
} from "@solana/kit";
|
|
991
|
+
var DEPOSIT_TOKENS_DISCRIMINATOR = new Uint8Array([
|
|
992
|
+
176,
|
|
993
|
+
83,
|
|
994
|
+
229,
|
|
995
|
+
18,
|
|
996
|
+
191,
|
|
997
|
+
143,
|
|
998
|
+
176,
|
|
999
|
+
150
|
|
1000
|
+
]);
|
|
1001
|
+
function getDepositTokensDiscriminatorBytes() {
|
|
1002
|
+
return fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
1003
|
+
DEPOSIT_TOKENS_DISCRIMINATOR
|
|
1004
|
+
);
|
|
1005
|
+
}
|
|
1006
|
+
function getDepositTokensInstructionDataEncoder() {
|
|
1007
|
+
return transformEncoder7(
|
|
1008
|
+
getStructEncoder7([
|
|
1009
|
+
["discriminator", fixEncoderSize8(getBytesEncoder8(), 8)],
|
|
1010
|
+
["amount", getU64Encoder4()]
|
|
1011
|
+
]),
|
|
1012
|
+
(value) => __spreadProps(__spreadValues({}, value), { discriminator: DEPOSIT_TOKENS_DISCRIMINATOR })
|
|
1013
|
+
);
|
|
1014
|
+
}
|
|
1015
|
+
function getDepositTokensInstructionDataDecoder() {
|
|
1016
|
+
return getStructDecoder7([
|
|
1017
|
+
["discriminator", fixDecoderSize7(getBytesDecoder7(), 8)],
|
|
1018
|
+
["amount", getU64Decoder4()]
|
|
1019
|
+
]);
|
|
1020
|
+
}
|
|
1021
|
+
function getDepositTokensInstructionDataCodec() {
|
|
1022
|
+
return combineCodec7(
|
|
1023
|
+
getDepositTokensInstructionDataEncoder(),
|
|
1024
|
+
getDepositTokensInstructionDataDecoder()
|
|
1025
|
+
);
|
|
1026
|
+
}
|
|
1027
|
+
function getDepositTokensInstruction(input, config) {
|
|
1028
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1029
|
+
const programAddress = (_a = config == null ? void 0 : config.programAddress) != null ? _a : DROPSY_PROGRAM_ADDRESS;
|
|
1030
|
+
const originalAccounts = {
|
|
1031
|
+
sourceTokenAccount: {
|
|
1032
|
+
value: (_b = input.sourceTokenAccount) != null ? _b : null,
|
|
1033
|
+
isWritable: true
|
|
1034
|
+
},
|
|
1035
|
+
vault: { value: (_c = input.vault) != null ? _c : null, isWritable: true },
|
|
1036
|
+
airdrop: { value: (_d = input.airdrop) != null ? _d : null, isWritable: true },
|
|
1037
|
+
mint: { value: (_e = input.mint) != null ? _e : null, isWritable: false },
|
|
1038
|
+
owner: { value: (_f = input.owner) != null ? _f : null, isWritable: false },
|
|
1039
|
+
tokenProgram: { value: (_g = input.tokenProgram) != null ? _g : null, isWritable: false }
|
|
1040
|
+
};
|
|
1041
|
+
const accounts = originalAccounts;
|
|
1042
|
+
const args = __spreadValues({}, input);
|
|
1043
|
+
if (!accounts.tokenProgram.value) {
|
|
1044
|
+
accounts.tokenProgram.value = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
1045
|
+
}
|
|
1046
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
1047
|
+
const instruction = {
|
|
1048
|
+
accounts: [
|
|
1049
|
+
getAccountMeta(accounts.sourceTokenAccount),
|
|
1050
|
+
getAccountMeta(accounts.vault),
|
|
1051
|
+
getAccountMeta(accounts.airdrop),
|
|
1052
|
+
getAccountMeta(accounts.mint),
|
|
1053
|
+
getAccountMeta(accounts.owner),
|
|
1054
|
+
getAccountMeta(accounts.tokenProgram)
|
|
1055
|
+
],
|
|
1056
|
+
programAddress,
|
|
1057
|
+
data: getDepositTokensInstructionDataEncoder().encode(
|
|
1058
|
+
args
|
|
1059
|
+
)
|
|
1060
|
+
};
|
|
1061
|
+
return instruction;
|
|
1062
|
+
}
|
|
1063
|
+
function parseDepositTokensInstruction(instruction) {
|
|
1064
|
+
if (instruction.accounts.length < 6) {
|
|
1065
|
+
throw new Error("Not enough accounts");
|
|
1066
|
+
}
|
|
1067
|
+
let accountIndex = 0;
|
|
1068
|
+
const getNextAccount = () => {
|
|
1069
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
1070
|
+
accountIndex += 1;
|
|
1071
|
+
return accountMeta;
|
|
1072
|
+
};
|
|
1073
|
+
return {
|
|
1074
|
+
programAddress: instruction.programAddress,
|
|
1075
|
+
accounts: {
|
|
1076
|
+
sourceTokenAccount: getNextAccount(),
|
|
1077
|
+
vault: getNextAccount(),
|
|
1078
|
+
airdrop: getNextAccount(),
|
|
1079
|
+
mint: getNextAccount(),
|
|
1080
|
+
owner: getNextAccount(),
|
|
1081
|
+
tokenProgram: getNextAccount()
|
|
1082
|
+
},
|
|
1083
|
+
data: getDepositTokensInstructionDataDecoder().decode(instruction.data)
|
|
1084
|
+
};
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
// src/instructions/initializeAirdrop.ts
|
|
1088
|
+
import {
|
|
1089
|
+
combineCodec as combineCodec8,
|
|
1090
|
+
fixDecoderSize as fixDecoderSize8,
|
|
1091
|
+
fixEncoderSize as fixEncoderSize9,
|
|
1092
|
+
getAddressEncoder as getAddressEncoder4,
|
|
1093
|
+
getArrayDecoder as getArrayDecoder3,
|
|
1094
|
+
getArrayEncoder as getArrayEncoder3,
|
|
1095
|
+
getBytesDecoder as getBytesDecoder8,
|
|
1096
|
+
getBytesEncoder as getBytesEncoder9,
|
|
1097
|
+
getI64Decoder as getI64Decoder2,
|
|
1098
|
+
getI64Encoder as getI64Encoder2,
|
|
1099
|
+
getProgramDerivedAddress,
|
|
1100
|
+
getStructDecoder as getStructDecoder8,
|
|
1101
|
+
getStructEncoder as getStructEncoder8,
|
|
1102
|
+
getU64Decoder as getU64Decoder5,
|
|
1103
|
+
getU64Encoder as getU64Encoder5,
|
|
1104
|
+
getU8Decoder as getU8Decoder5,
|
|
1105
|
+
getU8Encoder as getU8Encoder5,
|
|
1106
|
+
transformEncoder as transformEncoder8
|
|
1107
|
+
} from "@solana/kit";
|
|
1108
|
+
var INITIALIZE_AIRDROP_DISCRIMINATOR = new Uint8Array([
|
|
1109
|
+
96,
|
|
1110
|
+
196,
|
|
1111
|
+
74,
|
|
1112
|
+
102,
|
|
1113
|
+
61,
|
|
1114
|
+
195,
|
|
1115
|
+
48,
|
|
1116
|
+
184
|
|
1117
|
+
]);
|
|
1118
|
+
function getInitializeAirdropDiscriminatorBytes() {
|
|
1119
|
+
return fixEncoderSize9(getBytesEncoder9(), 8).encode(
|
|
1120
|
+
INITIALIZE_AIRDROP_DISCRIMINATOR
|
|
1121
|
+
);
|
|
1122
|
+
}
|
|
1123
|
+
function getInitializeAirdropInstructionDataEncoder() {
|
|
1124
|
+
return transformEncoder8(
|
|
1125
|
+
getStructEncoder8([
|
|
1126
|
+
["discriminator", fixEncoderSize9(getBytesEncoder9(), 8)],
|
|
1127
|
+
["id", getU64Encoder5()],
|
|
1128
|
+
["merkleRoot", getArrayEncoder3(getU8Encoder5(), { size: 32 })],
|
|
1129
|
+
["startsTime", getI64Encoder2()],
|
|
1130
|
+
["endTime", getI64Encoder2()]
|
|
1131
|
+
]),
|
|
1132
|
+
(value) => __spreadProps(__spreadValues({}, value), { discriminator: INITIALIZE_AIRDROP_DISCRIMINATOR })
|
|
1133
|
+
);
|
|
1134
|
+
}
|
|
1135
|
+
function getInitializeAirdropInstructionDataDecoder() {
|
|
1136
|
+
return getStructDecoder8([
|
|
1137
|
+
["discriminator", fixDecoderSize8(getBytesDecoder8(), 8)],
|
|
1138
|
+
["id", getU64Decoder5()],
|
|
1139
|
+
["merkleRoot", getArrayDecoder3(getU8Decoder5(), { size: 32 })],
|
|
1140
|
+
["startsTime", getI64Decoder2()],
|
|
1141
|
+
["endTime", getI64Decoder2()]
|
|
1142
|
+
]);
|
|
1143
|
+
}
|
|
1144
|
+
function getInitializeAirdropInstructionDataCodec() {
|
|
1145
|
+
return combineCodec8(
|
|
1146
|
+
getInitializeAirdropInstructionDataEncoder(),
|
|
1147
|
+
getInitializeAirdropInstructionDataDecoder()
|
|
1148
|
+
);
|
|
1149
|
+
}
|
|
1150
|
+
function getInitializeAirdropInstructionAsync(input, config) {
|
|
1151
|
+
return __async(this, null, function* () {
|
|
1152
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1153
|
+
const programAddress = (_a = config == null ? void 0 : config.programAddress) != null ? _a : DROPSY_PROGRAM_ADDRESS;
|
|
1154
|
+
const originalAccounts = {
|
|
1155
|
+
mint: { value: (_b = input.mint) != null ? _b : null, isWritable: false },
|
|
1156
|
+
airdrop: { value: (_c = input.airdrop) != null ? _c : null, isWritable: true },
|
|
1157
|
+
controller: { value: (_d = input.controller) != null ? _d : null, isWritable: true },
|
|
1158
|
+
feeVault: { value: (_e = input.feeVault) != null ? _e : null, isWritable: true },
|
|
1159
|
+
owner: { value: (_f = input.owner) != null ? _f : null, isWritable: true },
|
|
1160
|
+
treasury: { value: (_g = input.treasury) != null ? _g : null, isWritable: true },
|
|
1161
|
+
systemProgram: { value: (_h = input.systemProgram) != null ? _h : null, isWritable: false }
|
|
1162
|
+
};
|
|
1163
|
+
const accounts = originalAccounts;
|
|
1164
|
+
const args = __spreadValues({}, input);
|
|
1165
|
+
if (!accounts.airdrop.value) {
|
|
1166
|
+
accounts.airdrop.value = yield getProgramDerivedAddress({
|
|
1167
|
+
programAddress,
|
|
1168
|
+
seeds: [
|
|
1169
|
+
getBytesEncoder9().encode(
|
|
1170
|
+
new Uint8Array([97, 105, 114, 100, 114, 111, 112])
|
|
1171
|
+
),
|
|
1172
|
+
getAddressEncoder4().encode(expectAddress(accounts.mint.value)),
|
|
1173
|
+
getAddressEncoder4().encode(expectAddress(accounts.owner.value)),
|
|
1174
|
+
getU64Encoder5().encode(expectSome(args.id))
|
|
1175
|
+
]
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
if (!accounts.treasury.value) {
|
|
1179
|
+
accounts.treasury.value = "DHffy4rNMtuL8VKgyBEay4jcq8AYHyoAzxLKU6aEijUV";
|
|
1180
|
+
}
|
|
1181
|
+
if (!accounts.systemProgram.value) {
|
|
1182
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
1183
|
+
}
|
|
1184
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
1185
|
+
const instruction = {
|
|
1186
|
+
accounts: [
|
|
1187
|
+
getAccountMeta(accounts.mint),
|
|
1188
|
+
getAccountMeta(accounts.airdrop),
|
|
1189
|
+
getAccountMeta(accounts.controller),
|
|
1190
|
+
getAccountMeta(accounts.feeVault),
|
|
1191
|
+
getAccountMeta(accounts.owner),
|
|
1192
|
+
getAccountMeta(accounts.treasury),
|
|
1193
|
+
getAccountMeta(accounts.systemProgram)
|
|
1194
|
+
],
|
|
1195
|
+
programAddress,
|
|
1196
|
+
data: getInitializeAirdropInstructionDataEncoder().encode(
|
|
1197
|
+
args
|
|
1198
|
+
)
|
|
1199
|
+
};
|
|
1200
|
+
return instruction;
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
function getInitializeAirdropInstruction(input, config) {
|
|
1204
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1205
|
+
const programAddress = (_a = config == null ? void 0 : config.programAddress) != null ? _a : DROPSY_PROGRAM_ADDRESS;
|
|
1206
|
+
const originalAccounts = {
|
|
1207
|
+
mint: { value: (_b = input.mint) != null ? _b : null, isWritable: false },
|
|
1208
|
+
airdrop: { value: (_c = input.airdrop) != null ? _c : null, isWritable: true },
|
|
1209
|
+
controller: { value: (_d = input.controller) != null ? _d : null, isWritable: true },
|
|
1210
|
+
feeVault: { value: (_e = input.feeVault) != null ? _e : null, isWritable: true },
|
|
1211
|
+
owner: { value: (_f = input.owner) != null ? _f : null, isWritable: true },
|
|
1212
|
+
treasury: { value: (_g = input.treasury) != null ? _g : null, isWritable: true },
|
|
1213
|
+
systemProgram: { value: (_h = input.systemProgram) != null ? _h : null, isWritable: false }
|
|
1214
|
+
};
|
|
1215
|
+
const accounts = originalAccounts;
|
|
1216
|
+
const args = __spreadValues({}, input);
|
|
1217
|
+
if (!accounts.treasury.value) {
|
|
1218
|
+
accounts.treasury.value = "DHffy4rNMtuL8VKgyBEay4jcq8AYHyoAzxLKU6aEijUV";
|
|
1219
|
+
}
|
|
1220
|
+
if (!accounts.systemProgram.value) {
|
|
1221
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
1222
|
+
}
|
|
1223
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
1224
|
+
const instruction = {
|
|
1225
|
+
accounts: [
|
|
1226
|
+
getAccountMeta(accounts.mint),
|
|
1227
|
+
getAccountMeta(accounts.airdrop),
|
|
1228
|
+
getAccountMeta(accounts.controller),
|
|
1229
|
+
getAccountMeta(accounts.feeVault),
|
|
1230
|
+
getAccountMeta(accounts.owner),
|
|
1231
|
+
getAccountMeta(accounts.treasury),
|
|
1232
|
+
getAccountMeta(accounts.systemProgram)
|
|
1233
|
+
],
|
|
1234
|
+
programAddress,
|
|
1235
|
+
data: getInitializeAirdropInstructionDataEncoder().encode(
|
|
1236
|
+
args
|
|
1237
|
+
)
|
|
1238
|
+
};
|
|
1239
|
+
return instruction;
|
|
1240
|
+
}
|
|
1241
|
+
function parseInitializeAirdropInstruction(instruction) {
|
|
1242
|
+
if (instruction.accounts.length < 7) {
|
|
1243
|
+
throw new Error("Not enough accounts");
|
|
1244
|
+
}
|
|
1245
|
+
let accountIndex = 0;
|
|
1246
|
+
const getNextAccount = () => {
|
|
1247
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
1248
|
+
accountIndex += 1;
|
|
1249
|
+
return accountMeta;
|
|
1250
|
+
};
|
|
1251
|
+
return {
|
|
1252
|
+
programAddress: instruction.programAddress,
|
|
1253
|
+
accounts: {
|
|
1254
|
+
mint: getNextAccount(),
|
|
1255
|
+
airdrop: getNextAccount(),
|
|
1256
|
+
controller: getNextAccount(),
|
|
1257
|
+
feeVault: getNextAccount(),
|
|
1258
|
+
owner: getNextAccount(),
|
|
1259
|
+
treasury: getNextAccount(),
|
|
1260
|
+
systemProgram: getNextAccount()
|
|
1261
|
+
},
|
|
1262
|
+
data: getInitializeAirdropInstructionDataDecoder().decode(instruction.data)
|
|
1263
|
+
};
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
// src/instructions/initializeBitmap.ts
|
|
1267
|
+
import {
|
|
1268
|
+
combineCodec as combineCodec9,
|
|
1269
|
+
fixDecoderSize as fixDecoderSize9,
|
|
1270
|
+
fixEncoderSize as fixEncoderSize10,
|
|
1271
|
+
getAddressEncoder as getAddressEncoder5,
|
|
1272
|
+
getBytesDecoder as getBytesDecoder9,
|
|
1273
|
+
getBytesEncoder as getBytesEncoder10,
|
|
1274
|
+
getProgramDerivedAddress as getProgramDerivedAddress2,
|
|
1275
|
+
getStructDecoder as getStructDecoder9,
|
|
1276
|
+
getStructEncoder as getStructEncoder9,
|
|
1277
|
+
getU64Decoder as getU64Decoder6,
|
|
1278
|
+
getU64Encoder as getU64Encoder6,
|
|
1279
|
+
getU8Decoder as getU8Decoder6,
|
|
1280
|
+
getU8Encoder as getU8Encoder6,
|
|
1281
|
+
transformEncoder as transformEncoder9
|
|
1282
|
+
} from "@solana/kit";
|
|
1283
|
+
var INITIALIZE_BITMAP_DISCRIMINATOR = new Uint8Array([
|
|
1284
|
+
25,
|
|
1285
|
+
109,
|
|
1286
|
+
200,
|
|
1287
|
+
45,
|
|
1288
|
+
209,
|
|
1289
|
+
118,
|
|
1290
|
+
74,
|
|
1291
|
+
69
|
|
1292
|
+
]);
|
|
1293
|
+
function getInitializeBitmapDiscriminatorBytes() {
|
|
1294
|
+
return fixEncoderSize10(getBytesEncoder10(), 8).encode(
|
|
1295
|
+
INITIALIZE_BITMAP_DISCRIMINATOR
|
|
1296
|
+
);
|
|
1297
|
+
}
|
|
1298
|
+
function getInitializeBitmapInstructionDataEncoder() {
|
|
1299
|
+
return transformEncoder9(
|
|
1300
|
+
getStructEncoder9([
|
|
1301
|
+
["discriminator", fixEncoderSize10(getBytesEncoder10(), 8)],
|
|
1302
|
+
["id", getU8Encoder6()],
|
|
1303
|
+
["total", getU64Encoder6()]
|
|
1304
|
+
]),
|
|
1305
|
+
(value) => __spreadProps(__spreadValues({}, value), { discriminator: INITIALIZE_BITMAP_DISCRIMINATOR })
|
|
1306
|
+
);
|
|
1307
|
+
}
|
|
1308
|
+
function getInitializeBitmapInstructionDataDecoder() {
|
|
1309
|
+
return getStructDecoder9([
|
|
1310
|
+
["discriminator", fixDecoderSize9(getBytesDecoder9(), 8)],
|
|
1311
|
+
["id", getU8Decoder6()],
|
|
1312
|
+
["total", getU64Decoder6()]
|
|
1313
|
+
]);
|
|
1314
|
+
}
|
|
1315
|
+
function getInitializeBitmapInstructionDataCodec() {
|
|
1316
|
+
return combineCodec9(
|
|
1317
|
+
getInitializeBitmapInstructionDataEncoder(),
|
|
1318
|
+
getInitializeBitmapInstructionDataDecoder()
|
|
1319
|
+
);
|
|
1320
|
+
}
|
|
1321
|
+
function getInitializeBitmapInstructionAsync(input, config) {
|
|
1322
|
+
return __async(this, null, function* () {
|
|
1323
|
+
var _a, _b, _c, _d, _e;
|
|
1324
|
+
const programAddress = (_a = config == null ? void 0 : config.programAddress) != null ? _a : DROPSY_PROGRAM_ADDRESS;
|
|
1325
|
+
const originalAccounts = {
|
|
1326
|
+
bitmap: { value: (_b = input.bitmap) != null ? _b : null, isWritable: true },
|
|
1327
|
+
airdrop: { value: (_c = input.airdrop) != null ? _c : null, isWritable: true },
|
|
1328
|
+
owner: { value: (_d = input.owner) != null ? _d : null, isWritable: true },
|
|
1329
|
+
systemProgram: { value: (_e = input.systemProgram) != null ? _e : null, isWritable: false }
|
|
1330
|
+
};
|
|
1331
|
+
const accounts = originalAccounts;
|
|
1332
|
+
const args = __spreadValues({}, input);
|
|
1333
|
+
if (!accounts.bitmap.value) {
|
|
1334
|
+
accounts.bitmap.value = yield getProgramDerivedAddress2({
|
|
1335
|
+
programAddress,
|
|
1336
|
+
seeds: [
|
|
1337
|
+
getBytesEncoder10().encode(new Uint8Array([98, 105, 116, 109, 97, 112])),
|
|
1338
|
+
getAddressEncoder5().encode(expectAddress(accounts.airdrop.value)),
|
|
1339
|
+
getU8Encoder6().encode(expectSome(args.id))
|
|
1340
|
+
]
|
|
1341
|
+
});
|
|
1342
|
+
}
|
|
1343
|
+
if (!accounts.systemProgram.value) {
|
|
1344
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
1345
|
+
}
|
|
1346
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
1347
|
+
const instruction = {
|
|
1348
|
+
accounts: [
|
|
1349
|
+
getAccountMeta(accounts.bitmap),
|
|
1350
|
+
getAccountMeta(accounts.airdrop),
|
|
1351
|
+
getAccountMeta(accounts.owner),
|
|
1352
|
+
getAccountMeta(accounts.systemProgram)
|
|
1353
|
+
],
|
|
1354
|
+
programAddress,
|
|
1355
|
+
data: getInitializeBitmapInstructionDataEncoder().encode(
|
|
1356
|
+
args
|
|
1357
|
+
)
|
|
1358
|
+
};
|
|
1359
|
+
return instruction;
|
|
1360
|
+
});
|
|
1361
|
+
}
|
|
1362
|
+
function getInitializeBitmapInstruction(input, config) {
|
|
1363
|
+
var _a, _b, _c, _d, _e;
|
|
1364
|
+
const programAddress = (_a = config == null ? void 0 : config.programAddress) != null ? _a : DROPSY_PROGRAM_ADDRESS;
|
|
1365
|
+
const originalAccounts = {
|
|
1366
|
+
bitmap: { value: (_b = input.bitmap) != null ? _b : null, isWritable: true },
|
|
1367
|
+
airdrop: { value: (_c = input.airdrop) != null ? _c : null, isWritable: true },
|
|
1368
|
+
owner: { value: (_d = input.owner) != null ? _d : null, isWritable: true },
|
|
1369
|
+
systemProgram: { value: (_e = input.systemProgram) != null ? _e : null, isWritable: false }
|
|
1370
|
+
};
|
|
1371
|
+
const accounts = originalAccounts;
|
|
1372
|
+
const args = __spreadValues({}, input);
|
|
1373
|
+
if (!accounts.systemProgram.value) {
|
|
1374
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
1375
|
+
}
|
|
1376
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
1377
|
+
const instruction = {
|
|
1378
|
+
accounts: [
|
|
1379
|
+
getAccountMeta(accounts.bitmap),
|
|
1380
|
+
getAccountMeta(accounts.airdrop),
|
|
1381
|
+
getAccountMeta(accounts.owner),
|
|
1382
|
+
getAccountMeta(accounts.systemProgram)
|
|
1383
|
+
],
|
|
1384
|
+
programAddress,
|
|
1385
|
+
data: getInitializeBitmapInstructionDataEncoder().encode(
|
|
1386
|
+
args
|
|
1387
|
+
)
|
|
1388
|
+
};
|
|
1389
|
+
return instruction;
|
|
1390
|
+
}
|
|
1391
|
+
function parseInitializeBitmapInstruction(instruction) {
|
|
1392
|
+
if (instruction.accounts.length < 4) {
|
|
1393
|
+
throw new Error("Not enough accounts");
|
|
1394
|
+
}
|
|
1395
|
+
let accountIndex = 0;
|
|
1396
|
+
const getNextAccount = () => {
|
|
1397
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
1398
|
+
accountIndex += 1;
|
|
1399
|
+
return accountMeta;
|
|
1400
|
+
};
|
|
1401
|
+
return {
|
|
1402
|
+
programAddress: instruction.programAddress,
|
|
1403
|
+
accounts: {
|
|
1404
|
+
bitmap: getNextAccount(),
|
|
1405
|
+
airdrop: getNextAccount(),
|
|
1406
|
+
owner: getNextAccount(),
|
|
1407
|
+
systemProgram: getNextAccount()
|
|
1408
|
+
},
|
|
1409
|
+
data: getInitializeBitmapInstructionDataDecoder().decode(instruction.data)
|
|
1410
|
+
};
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
// src/instructions/initializeController.ts
|
|
1414
|
+
import {
|
|
1415
|
+
combineCodec as combineCodec10,
|
|
1416
|
+
fixDecoderSize as fixDecoderSize10,
|
|
1417
|
+
fixEncoderSize as fixEncoderSize11,
|
|
1418
|
+
getAddressEncoder as getAddressEncoder6,
|
|
1419
|
+
getBytesDecoder as getBytesDecoder10,
|
|
1420
|
+
getBytesEncoder as getBytesEncoder11,
|
|
1421
|
+
getProgramDerivedAddress as getProgramDerivedAddress3,
|
|
1422
|
+
getStructDecoder as getStructDecoder10,
|
|
1423
|
+
getStructEncoder as getStructEncoder10,
|
|
1424
|
+
getU64Decoder as getU64Decoder7,
|
|
1425
|
+
getU64Encoder as getU64Encoder7,
|
|
1426
|
+
transformEncoder as transformEncoder10
|
|
1427
|
+
} from "@solana/kit";
|
|
1428
|
+
var INITIALIZE_CONTROLLER_DISCRIMINATOR = new Uint8Array([
|
|
1429
|
+
137,
|
|
1430
|
+
255,
|
|
1431
|
+
100,
|
|
1432
|
+
190,
|
|
1433
|
+
201,
|
|
1434
|
+
247,
|
|
1435
|
+
241,
|
|
1436
|
+
81
|
|
1437
|
+
]);
|
|
1438
|
+
function getInitializeControllerDiscriminatorBytes() {
|
|
1439
|
+
return fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1440
|
+
INITIALIZE_CONTROLLER_DISCRIMINATOR
|
|
1441
|
+
);
|
|
1442
|
+
}
|
|
1443
|
+
function getInitializeControllerInstructionDataEncoder() {
|
|
1444
|
+
return transformEncoder10(
|
|
1445
|
+
getStructEncoder10([
|
|
1446
|
+
["discriminator", fixEncoderSize11(getBytesEncoder11(), 8)],
|
|
1447
|
+
["createFee", getU64Encoder7()],
|
|
1448
|
+
["claimFee", getU64Encoder7()]
|
|
1449
|
+
]),
|
|
1450
|
+
(value) => __spreadProps(__spreadValues({}, value), {
|
|
1451
|
+
discriminator: INITIALIZE_CONTROLLER_DISCRIMINATOR
|
|
1452
|
+
})
|
|
1453
|
+
);
|
|
1454
|
+
}
|
|
1455
|
+
function getInitializeControllerInstructionDataDecoder() {
|
|
1456
|
+
return getStructDecoder10([
|
|
1457
|
+
["discriminator", fixDecoderSize10(getBytesDecoder10(), 8)],
|
|
1458
|
+
["createFee", getU64Decoder7()],
|
|
1459
|
+
["claimFee", getU64Decoder7()]
|
|
1460
|
+
]);
|
|
1461
|
+
}
|
|
1462
|
+
function getInitializeControllerInstructionDataCodec() {
|
|
1463
|
+
return combineCodec10(
|
|
1464
|
+
getInitializeControllerInstructionDataEncoder(),
|
|
1465
|
+
getInitializeControllerInstructionDataDecoder()
|
|
1466
|
+
);
|
|
1467
|
+
}
|
|
1468
|
+
function getInitializeControllerInstructionAsync(input, config) {
|
|
1469
|
+
return __async(this, null, function* () {
|
|
1470
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1471
|
+
const programAddress = (_a = config == null ? void 0 : config.programAddress) != null ? _a : DROPSY_PROGRAM_ADDRESS;
|
|
1472
|
+
const originalAccounts = {
|
|
1473
|
+
controller: { value: (_b = input.controller) != null ? _b : null, isWritable: true },
|
|
1474
|
+
feeVault: { value: (_c = input.feeVault) != null ? _c : null, isWritable: false },
|
|
1475
|
+
treasury: { value: (_d = input.treasury) != null ? _d : null, isWritable: true },
|
|
1476
|
+
payer: { value: (_e = input.payer) != null ? _e : null, isWritable: true },
|
|
1477
|
+
systemProgram: { value: (_f = input.systemProgram) != null ? _f : null, isWritable: false }
|
|
1478
|
+
};
|
|
1479
|
+
const accounts = originalAccounts;
|
|
1480
|
+
const args = __spreadValues({}, input);
|
|
1481
|
+
if (!accounts.controller.value) {
|
|
1482
|
+
accounts.controller.value = yield getProgramDerivedAddress3({
|
|
1483
|
+
programAddress,
|
|
1484
|
+
seeds: [
|
|
1485
|
+
getBytesEncoder11().encode(
|
|
1486
|
+
new Uint8Array([
|
|
1487
|
+
99,
|
|
1488
|
+
111,
|
|
1489
|
+
110,
|
|
1490
|
+
116,
|
|
1491
|
+
114,
|
|
1492
|
+
111,
|
|
1493
|
+
108,
|
|
1494
|
+
108,
|
|
1495
|
+
101,
|
|
1496
|
+
114,
|
|
1497
|
+
45,
|
|
1498
|
+
100,
|
|
1499
|
+
114,
|
|
1500
|
+
111,
|
|
1501
|
+
112,
|
|
1502
|
+
115,
|
|
1503
|
+
121
|
|
1504
|
+
])
|
|
1505
|
+
),
|
|
1506
|
+
getAddressEncoder6().encode(expectAddress(accounts.payer.value))
|
|
1507
|
+
]
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1510
|
+
if (!accounts.treasury.value) {
|
|
1511
|
+
accounts.treasury.value = "DHffy4rNMtuL8VKgyBEay4jcq8AYHyoAzxLKU6aEijUV";
|
|
1512
|
+
}
|
|
1513
|
+
if (!accounts.systemProgram.value) {
|
|
1514
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
1515
|
+
}
|
|
1516
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
1517
|
+
const instruction = {
|
|
1518
|
+
accounts: [
|
|
1519
|
+
getAccountMeta(accounts.controller),
|
|
1520
|
+
getAccountMeta(accounts.feeVault),
|
|
1521
|
+
getAccountMeta(accounts.treasury),
|
|
1522
|
+
getAccountMeta(accounts.payer),
|
|
1523
|
+
getAccountMeta(accounts.systemProgram)
|
|
1524
|
+
],
|
|
1525
|
+
programAddress,
|
|
1526
|
+
data: getInitializeControllerInstructionDataEncoder().encode(
|
|
1527
|
+
args
|
|
1528
|
+
)
|
|
1529
|
+
};
|
|
1530
|
+
return instruction;
|
|
1531
|
+
});
|
|
1532
|
+
}
|
|
1533
|
+
function getInitializeControllerInstruction(input, config) {
|
|
1534
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1535
|
+
const programAddress = (_a = config == null ? void 0 : config.programAddress) != null ? _a : DROPSY_PROGRAM_ADDRESS;
|
|
1536
|
+
const originalAccounts = {
|
|
1537
|
+
controller: { value: (_b = input.controller) != null ? _b : null, isWritable: true },
|
|
1538
|
+
feeVault: { value: (_c = input.feeVault) != null ? _c : null, isWritable: false },
|
|
1539
|
+
treasury: { value: (_d = input.treasury) != null ? _d : null, isWritable: true },
|
|
1540
|
+
payer: { value: (_e = input.payer) != null ? _e : null, isWritable: true },
|
|
1541
|
+
systemProgram: { value: (_f = input.systemProgram) != null ? _f : null, isWritable: false }
|
|
1542
|
+
};
|
|
1543
|
+
const accounts = originalAccounts;
|
|
1544
|
+
const args = __spreadValues({}, input);
|
|
1545
|
+
if (!accounts.treasury.value) {
|
|
1546
|
+
accounts.treasury.value = "DHffy4rNMtuL8VKgyBEay4jcq8AYHyoAzxLKU6aEijUV";
|
|
1547
|
+
}
|
|
1548
|
+
if (!accounts.systemProgram.value) {
|
|
1549
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
1550
|
+
}
|
|
1551
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
1552
|
+
const instruction = {
|
|
1553
|
+
accounts: [
|
|
1554
|
+
getAccountMeta(accounts.controller),
|
|
1555
|
+
getAccountMeta(accounts.feeVault),
|
|
1556
|
+
getAccountMeta(accounts.treasury),
|
|
1557
|
+
getAccountMeta(accounts.payer),
|
|
1558
|
+
getAccountMeta(accounts.systemProgram)
|
|
1559
|
+
],
|
|
1560
|
+
programAddress,
|
|
1561
|
+
data: getInitializeControllerInstructionDataEncoder().encode(
|
|
1562
|
+
args
|
|
1563
|
+
)
|
|
1564
|
+
};
|
|
1565
|
+
return instruction;
|
|
1566
|
+
}
|
|
1567
|
+
function parseInitializeControllerInstruction(instruction) {
|
|
1568
|
+
if (instruction.accounts.length < 5) {
|
|
1569
|
+
throw new Error("Not enough accounts");
|
|
1570
|
+
}
|
|
1571
|
+
let accountIndex = 0;
|
|
1572
|
+
const getNextAccount = () => {
|
|
1573
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
1574
|
+
accountIndex += 1;
|
|
1575
|
+
return accountMeta;
|
|
1576
|
+
};
|
|
1577
|
+
return {
|
|
1578
|
+
programAddress: instruction.programAddress,
|
|
1579
|
+
accounts: {
|
|
1580
|
+
controller: getNextAccount(),
|
|
1581
|
+
feeVault: getNextAccount(),
|
|
1582
|
+
treasury: getNextAccount(),
|
|
1583
|
+
payer: getNextAccount(),
|
|
1584
|
+
systemProgram: getNextAccount()
|
|
1585
|
+
},
|
|
1586
|
+
data: getInitializeControllerInstructionDataDecoder().decode(
|
|
1587
|
+
instruction.data
|
|
1588
|
+
)
|
|
1589
|
+
};
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
// src/types/airdropClosed.ts
|
|
1593
|
+
import {
|
|
1594
|
+
combineCodec as combineCodec11,
|
|
1595
|
+
getAddressDecoder as getAddressDecoder4,
|
|
1596
|
+
getAddressEncoder as getAddressEncoder7,
|
|
1597
|
+
getI64Decoder as getI64Decoder3,
|
|
1598
|
+
getI64Encoder as getI64Encoder3,
|
|
1599
|
+
getStructDecoder as getStructDecoder11,
|
|
1600
|
+
getStructEncoder as getStructEncoder11
|
|
1601
|
+
} from "@solana/kit";
|
|
1602
|
+
function getAirdropClosedEncoder() {
|
|
1603
|
+
return getStructEncoder11([
|
|
1604
|
+
["airdrop", getAddressEncoder7()],
|
|
1605
|
+
["owner", getAddressEncoder7()],
|
|
1606
|
+
["timestamp", getI64Encoder3()]
|
|
1607
|
+
]);
|
|
1608
|
+
}
|
|
1609
|
+
function getAirdropClosedDecoder() {
|
|
1610
|
+
return getStructDecoder11([
|
|
1611
|
+
["airdrop", getAddressDecoder4()],
|
|
1612
|
+
["owner", getAddressDecoder4()],
|
|
1613
|
+
["timestamp", getI64Decoder3()]
|
|
1614
|
+
]);
|
|
1615
|
+
}
|
|
1616
|
+
function getAirdropClosedCodec() {
|
|
1617
|
+
return combineCodec11(getAirdropClosedEncoder(), getAirdropClosedDecoder());
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
// src/types/airdropInitialized.ts
|
|
1621
|
+
import {
|
|
1622
|
+
combineCodec as combineCodec12,
|
|
1623
|
+
getAddressDecoder as getAddressDecoder5,
|
|
1624
|
+
getAddressEncoder as getAddressEncoder8,
|
|
1625
|
+
getArrayDecoder as getArrayDecoder4,
|
|
1626
|
+
getArrayEncoder as getArrayEncoder4,
|
|
1627
|
+
getI64Decoder as getI64Decoder4,
|
|
1628
|
+
getI64Encoder as getI64Encoder4,
|
|
1629
|
+
getStructDecoder as getStructDecoder12,
|
|
1630
|
+
getStructEncoder as getStructEncoder12,
|
|
1631
|
+
getU8Decoder as getU8Decoder7,
|
|
1632
|
+
getU8Encoder as getU8Encoder7
|
|
1633
|
+
} from "@solana/kit";
|
|
1634
|
+
function getAirdropInitializedEncoder() {
|
|
1635
|
+
return getStructEncoder12([
|
|
1636
|
+
["airdrop", getAddressEncoder8()],
|
|
1637
|
+
["mint", getAddressEncoder8()],
|
|
1638
|
+
["owner", getAddressEncoder8()],
|
|
1639
|
+
["controller", getAddressEncoder8()],
|
|
1640
|
+
["controllerAuthority", getAddressEncoder8()],
|
|
1641
|
+
["merkleRoot", getArrayEncoder4(getU8Encoder7(), { size: 32 })],
|
|
1642
|
+
["startTime", getI64Encoder4()],
|
|
1643
|
+
["endTime", getI64Encoder4()],
|
|
1644
|
+
["timestamp", getI64Encoder4()]
|
|
1645
|
+
]);
|
|
1646
|
+
}
|
|
1647
|
+
function getAirdropInitializedDecoder() {
|
|
1648
|
+
return getStructDecoder12([
|
|
1649
|
+
["airdrop", getAddressDecoder5()],
|
|
1650
|
+
["mint", getAddressDecoder5()],
|
|
1651
|
+
["owner", getAddressDecoder5()],
|
|
1652
|
+
["controller", getAddressDecoder5()],
|
|
1653
|
+
["controllerAuthority", getAddressDecoder5()],
|
|
1654
|
+
["merkleRoot", getArrayDecoder4(getU8Decoder7(), { size: 32 })],
|
|
1655
|
+
["startTime", getI64Decoder4()],
|
|
1656
|
+
["endTime", getI64Decoder4()],
|
|
1657
|
+
["timestamp", getI64Decoder4()]
|
|
1658
|
+
]);
|
|
1659
|
+
}
|
|
1660
|
+
function getAirdropInitializedCodec() {
|
|
1661
|
+
return combineCodec12(
|
|
1662
|
+
getAirdropInitializedEncoder(),
|
|
1663
|
+
getAirdropInitializedDecoder()
|
|
1664
|
+
);
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
// src/types/bitmapClosed.ts
|
|
1668
|
+
import {
|
|
1669
|
+
combineCodec as combineCodec13,
|
|
1670
|
+
getAddressDecoder as getAddressDecoder6,
|
|
1671
|
+
getAddressEncoder as getAddressEncoder9,
|
|
1672
|
+
getStructDecoder as getStructDecoder13,
|
|
1673
|
+
getStructEncoder as getStructEncoder13
|
|
1674
|
+
} from "@solana/kit";
|
|
1675
|
+
function getBitmapClosedEncoder() {
|
|
1676
|
+
return getStructEncoder13([
|
|
1677
|
+
["airdrop", getAddressEncoder9()],
|
|
1678
|
+
["bitmap", getAddressEncoder9()],
|
|
1679
|
+
["owner", getAddressEncoder9()]
|
|
1680
|
+
]);
|
|
1681
|
+
}
|
|
1682
|
+
function getBitmapClosedDecoder() {
|
|
1683
|
+
return getStructDecoder13([
|
|
1684
|
+
["airdrop", getAddressDecoder6()],
|
|
1685
|
+
["bitmap", getAddressDecoder6()],
|
|
1686
|
+
["owner", getAddressDecoder6()]
|
|
1687
|
+
]);
|
|
1688
|
+
}
|
|
1689
|
+
function getBitmapClosedCodec() {
|
|
1690
|
+
return combineCodec13(getBitmapClosedEncoder(), getBitmapClosedDecoder());
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
// src/types/bitmapInitialized.ts
|
|
1694
|
+
import {
|
|
1695
|
+
combineCodec as combineCodec14,
|
|
1696
|
+
getAddressDecoder as getAddressDecoder7,
|
|
1697
|
+
getAddressEncoder as getAddressEncoder10,
|
|
1698
|
+
getStructDecoder as getStructDecoder14,
|
|
1699
|
+
getStructEncoder as getStructEncoder14,
|
|
1700
|
+
getU64Decoder as getU64Decoder8,
|
|
1701
|
+
getU64Encoder as getU64Encoder8,
|
|
1702
|
+
getU8Decoder as getU8Decoder8,
|
|
1703
|
+
getU8Encoder as getU8Encoder8
|
|
1704
|
+
} from "@solana/kit";
|
|
1705
|
+
function getBitmapInitializedEncoder() {
|
|
1706
|
+
return getStructEncoder14([
|
|
1707
|
+
["airdrop", getAddressEncoder10()],
|
|
1708
|
+
["bitmap", getAddressEncoder10()],
|
|
1709
|
+
["bitmapId", getU8Encoder8()],
|
|
1710
|
+
["totalClaims", getU64Encoder8()]
|
|
1711
|
+
]);
|
|
1712
|
+
}
|
|
1713
|
+
function getBitmapInitializedDecoder() {
|
|
1714
|
+
return getStructDecoder14([
|
|
1715
|
+
["airdrop", getAddressDecoder7()],
|
|
1716
|
+
["bitmap", getAddressDecoder7()],
|
|
1717
|
+
["bitmapId", getU8Decoder8()],
|
|
1718
|
+
["totalClaims", getU64Decoder8()]
|
|
1719
|
+
]);
|
|
1720
|
+
}
|
|
1721
|
+
function getBitmapInitializedCodec() {
|
|
1722
|
+
return combineCodec14(
|
|
1723
|
+
getBitmapInitializedEncoder(),
|
|
1724
|
+
getBitmapInitializedDecoder()
|
|
1725
|
+
);
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
// src/types/controllerInitialized.ts
|
|
1729
|
+
import {
|
|
1730
|
+
combineCodec as combineCodec15,
|
|
1731
|
+
getAddressDecoder as getAddressDecoder8,
|
|
1732
|
+
getAddressEncoder as getAddressEncoder11,
|
|
1733
|
+
getI64Decoder as getI64Decoder5,
|
|
1734
|
+
getI64Encoder as getI64Encoder5,
|
|
1735
|
+
getStructDecoder as getStructDecoder15,
|
|
1736
|
+
getStructEncoder as getStructEncoder15,
|
|
1737
|
+
getU64Decoder as getU64Decoder9,
|
|
1738
|
+
getU64Encoder as getU64Encoder9,
|
|
1739
|
+
getU8Decoder as getU8Decoder9,
|
|
1740
|
+
getU8Encoder as getU8Encoder9
|
|
1741
|
+
} from "@solana/kit";
|
|
1742
|
+
function getControllerInitializedEncoder() {
|
|
1743
|
+
return getStructEncoder15([
|
|
1744
|
+
["authority", getAddressEncoder11()],
|
|
1745
|
+
["feeVault", getAddressEncoder11()],
|
|
1746
|
+
["createFee", getU64Encoder9()],
|
|
1747
|
+
["claimFee", getU64Encoder9()],
|
|
1748
|
+
["bump", getU8Encoder9()],
|
|
1749
|
+
["timestamp", getI64Encoder5()]
|
|
1750
|
+
]);
|
|
1751
|
+
}
|
|
1752
|
+
function getControllerInitializedDecoder() {
|
|
1753
|
+
return getStructDecoder15([
|
|
1754
|
+
["authority", getAddressDecoder8()],
|
|
1755
|
+
["feeVault", getAddressDecoder8()],
|
|
1756
|
+
["createFee", getU64Decoder9()],
|
|
1757
|
+
["claimFee", getU64Decoder9()],
|
|
1758
|
+
["bump", getU8Decoder9()],
|
|
1759
|
+
["timestamp", getI64Decoder5()]
|
|
1760
|
+
]);
|
|
1761
|
+
}
|
|
1762
|
+
function getControllerInitializedCodec() {
|
|
1763
|
+
return combineCodec15(
|
|
1764
|
+
getControllerInitializedEncoder(),
|
|
1765
|
+
getControllerInitializedDecoder()
|
|
1766
|
+
);
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
// src/types/tokensDeposited.ts
|
|
1770
|
+
import {
|
|
1771
|
+
combineCodec as combineCodec16,
|
|
1772
|
+
getAddressDecoder as getAddressDecoder9,
|
|
1773
|
+
getAddressEncoder as getAddressEncoder12,
|
|
1774
|
+
getI64Decoder as getI64Decoder6,
|
|
1775
|
+
getI64Encoder as getI64Encoder6,
|
|
1776
|
+
getStructDecoder as getStructDecoder16,
|
|
1777
|
+
getStructEncoder as getStructEncoder16,
|
|
1778
|
+
getU64Decoder as getU64Decoder10,
|
|
1779
|
+
getU64Encoder as getU64Encoder10
|
|
1780
|
+
} from "@solana/kit";
|
|
1781
|
+
function getTokensDepositedEncoder() {
|
|
1782
|
+
return getStructEncoder16([
|
|
1783
|
+
["airdrop", getAddressEncoder12()],
|
|
1784
|
+
["amount", getU64Encoder10()],
|
|
1785
|
+
["newSupply", getU64Encoder10()],
|
|
1786
|
+
["depositor", getAddressEncoder12()],
|
|
1787
|
+
["timestamp", getI64Encoder6()]
|
|
1788
|
+
]);
|
|
1789
|
+
}
|
|
1790
|
+
function getTokensDepositedDecoder() {
|
|
1791
|
+
return getStructDecoder16([
|
|
1792
|
+
["airdrop", getAddressDecoder9()],
|
|
1793
|
+
["amount", getU64Decoder10()],
|
|
1794
|
+
["newSupply", getU64Decoder10()],
|
|
1795
|
+
["depositor", getAddressDecoder9()],
|
|
1796
|
+
["timestamp", getI64Decoder6()]
|
|
1797
|
+
]);
|
|
1798
|
+
}
|
|
1799
|
+
function getTokensDepositedCodec() {
|
|
1800
|
+
return combineCodec16(getTokensDepositedEncoder(), getTokensDepositedDecoder());
|
|
1801
|
+
}
|
|
1802
|
+
export {
|
|
1803
|
+
AIRDROP_DISCRIMINATOR,
|
|
1804
|
+
BITMAP_ACCOUNT_DISCRIMINATOR,
|
|
1805
|
+
CLAIM_TOKENS_DISCRIMINATOR,
|
|
1806
|
+
CLOSE_AIRDROP_DISCRIMINATOR,
|
|
1807
|
+
CLOSE_BITMAP_DISCRIMINATOR,
|
|
1808
|
+
CONTROLLER_DISCRIMINATOR,
|
|
1809
|
+
DEPOSIT_TOKENS_DISCRIMINATOR,
|
|
1810
|
+
DROPSY_ERROR__ACTIVE_BITMAPS_EXIST,
|
|
1811
|
+
DROPSY_ERROR__AIRDROP_ENDED,
|
|
1812
|
+
DROPSY_ERROR__AIRDROP_NOT_ENDED,
|
|
1813
|
+
DROPSY_ERROR__AIRDROP_NOT_STARTED,
|
|
1814
|
+
DROPSY_ERROR__ALREADY_CLAIMED,
|
|
1815
|
+
DROPSY_ERROR__BITMAP_AIRDROP_MISMATCH,
|
|
1816
|
+
DROPSY_ERROR__BITMAP_COUNT_UNDERFLOW,
|
|
1817
|
+
DROPSY_ERROR__BITMAP_TOO_LARGE,
|
|
1818
|
+
DROPSY_ERROR__CLAIM_FEE_TOO_HIGH,
|
|
1819
|
+
DROPSY_ERROR__CONTROLLER_MISMATCH,
|
|
1820
|
+
DROPSY_ERROR__CREATE_FEE_TOO_HIGH,
|
|
1821
|
+
DROPSY_ERROR__DESTINATION_MINT_MISMATCH,
|
|
1822
|
+
DROPSY_ERROR__DURATION_TOO_SHORT,
|
|
1823
|
+
DROPSY_ERROR__INSUFFICIENT_DEPOSIT,
|
|
1824
|
+
DROPSY_ERROR__INSUFFICIENT_FUNDS_FOR_FEE,
|
|
1825
|
+
DROPSY_ERROR__INSUFFICIENT_VAULT_FUNDS,
|
|
1826
|
+
DROPSY_ERROR__INVALID_AIRDROP_PDA,
|
|
1827
|
+
DROPSY_ERROR__INVALID_AMOUNT,
|
|
1828
|
+
DROPSY_ERROR__INVALID_BITMAP_ACCOUNT,
|
|
1829
|
+
DROPSY_ERROR__INVALID_BITMAP_INDEX,
|
|
1830
|
+
DROPSY_ERROR__INVALID_DESTINATION_OWNER,
|
|
1831
|
+
DROPSY_ERROR__INVALID_END_TIME,
|
|
1832
|
+
DROPSY_ERROR__INVALID_FEE_VAULT,
|
|
1833
|
+
DROPSY_ERROR__INVALID_FEE_VAULT_CURVE,
|
|
1834
|
+
DROPSY_ERROR__INVALID_FEE_VAULT_OWNER,
|
|
1835
|
+
DROPSY_ERROR__INVALID_MINT,
|
|
1836
|
+
DROPSY_ERROR__INVALID_MINT_OWNER,
|
|
1837
|
+
DROPSY_ERROR__INVALID_OWNER,
|
|
1838
|
+
DROPSY_ERROR__INVALID_PDA,
|
|
1839
|
+
DROPSY_ERROR__INVALID_PROOF,
|
|
1840
|
+
DROPSY_ERROR__INVALID_TOTAL,
|
|
1841
|
+
DROPSY_ERROR__INVALID_TREASURY_ACCOUNT,
|
|
1842
|
+
DROPSY_ERROR__INVALID_VAULT_AUTHORITY,
|
|
1843
|
+
DROPSY_ERROR__MINT_HAS_FREEZE_AUTHORITY,
|
|
1844
|
+
DROPSY_ERROR__MINT_IS_FROZEN,
|
|
1845
|
+
DROPSY_ERROR__MINT_IS_NOT_INITIALIZED,
|
|
1846
|
+
DROPSY_ERROR__MINT_MISMATCH,
|
|
1847
|
+
DROPSY_ERROR__MISSING_BITMAP_PDA,
|
|
1848
|
+
DROPSY_ERROR__NFT_NOT_ALLOWED,
|
|
1849
|
+
DROPSY_ERROR__OVERFLOW,
|
|
1850
|
+
DROPSY_ERROR__OWNER_MISMATCH,
|
|
1851
|
+
DROPSY_ERROR__SOURCE_ACCOUNT_FROZEN,
|
|
1852
|
+
DROPSY_ERROR__SOURCE_HAS_CLOSE_AUTHORITY,
|
|
1853
|
+
DROPSY_ERROR__SOURCE_HAS_DELEGATE,
|
|
1854
|
+
DROPSY_ERROR__TOO_MANY_BITMAPS,
|
|
1855
|
+
DROPSY_ERROR__VAULT_FROZEN,
|
|
1856
|
+
DROPSY_ERROR__VAULT_HAS_CLOSE_AUTHORITY,
|
|
1857
|
+
DROPSY_ERROR__VAULT_HAS_DELEGATE,
|
|
1858
|
+
DROPSY_ERROR__VAULT_MINT_MISMATCH,
|
|
1859
|
+
DROPSY_ERROR__VAULT_NOT_INITIALIZED,
|
|
1860
|
+
DROPSY_ERROR__VAULT_NOT_RENT_EXEMPT,
|
|
1861
|
+
DROPSY_PROGRAM_ADDRESS,
|
|
1862
|
+
DropsyAccount,
|
|
1863
|
+
DropsyInstruction,
|
|
1864
|
+
INITIALIZE_AIRDROP_DISCRIMINATOR,
|
|
1865
|
+
INITIALIZE_BITMAP_DISCRIMINATOR,
|
|
1866
|
+
INITIALIZE_CONTROLLER_DISCRIMINATOR,
|
|
1867
|
+
decodeAirdrop,
|
|
1868
|
+
decodeBitmapAccount,
|
|
1869
|
+
decodeController,
|
|
1870
|
+
fetchAirdrop,
|
|
1871
|
+
fetchAllAirdrop,
|
|
1872
|
+
fetchAllBitmapAccount,
|
|
1873
|
+
fetchAllController,
|
|
1874
|
+
fetchAllMaybeAirdrop,
|
|
1875
|
+
fetchAllMaybeBitmapAccount,
|
|
1876
|
+
fetchAllMaybeController,
|
|
1877
|
+
fetchBitmapAccount,
|
|
1878
|
+
fetchController,
|
|
1879
|
+
fetchMaybeAirdrop,
|
|
1880
|
+
fetchMaybeBitmapAccount,
|
|
1881
|
+
fetchMaybeController,
|
|
1882
|
+
getAirdropClosedCodec,
|
|
1883
|
+
getAirdropClosedDecoder,
|
|
1884
|
+
getAirdropClosedEncoder,
|
|
1885
|
+
getAirdropCodec,
|
|
1886
|
+
getAirdropDecoder,
|
|
1887
|
+
getAirdropDiscriminatorBytes,
|
|
1888
|
+
getAirdropEncoder,
|
|
1889
|
+
getAirdropInitializedCodec,
|
|
1890
|
+
getAirdropInitializedDecoder,
|
|
1891
|
+
getAirdropInitializedEncoder,
|
|
1892
|
+
getBitmapAccountCodec,
|
|
1893
|
+
getBitmapAccountDecoder,
|
|
1894
|
+
getBitmapAccountDiscriminatorBytes,
|
|
1895
|
+
getBitmapAccountEncoder,
|
|
1896
|
+
getBitmapClosedCodec,
|
|
1897
|
+
getBitmapClosedDecoder,
|
|
1898
|
+
getBitmapClosedEncoder,
|
|
1899
|
+
getBitmapInitializedCodec,
|
|
1900
|
+
getBitmapInitializedDecoder,
|
|
1901
|
+
getBitmapInitializedEncoder,
|
|
1902
|
+
getClaimTokensDiscriminatorBytes,
|
|
1903
|
+
getClaimTokensInstruction,
|
|
1904
|
+
getClaimTokensInstructionDataCodec,
|
|
1905
|
+
getClaimTokensInstructionDataDecoder,
|
|
1906
|
+
getClaimTokensInstructionDataEncoder,
|
|
1907
|
+
getCloseAirdropDiscriminatorBytes,
|
|
1908
|
+
getCloseAirdropInstruction,
|
|
1909
|
+
getCloseAirdropInstructionDataCodec,
|
|
1910
|
+
getCloseAirdropInstructionDataDecoder,
|
|
1911
|
+
getCloseAirdropInstructionDataEncoder,
|
|
1912
|
+
getCloseBitmapDiscriminatorBytes,
|
|
1913
|
+
getCloseBitmapInstruction,
|
|
1914
|
+
getCloseBitmapInstructionDataCodec,
|
|
1915
|
+
getCloseBitmapInstructionDataDecoder,
|
|
1916
|
+
getCloseBitmapInstructionDataEncoder,
|
|
1917
|
+
getControllerCodec,
|
|
1918
|
+
getControllerDecoder,
|
|
1919
|
+
getControllerDiscriminatorBytes,
|
|
1920
|
+
getControllerEncoder,
|
|
1921
|
+
getControllerInitializedCodec,
|
|
1922
|
+
getControllerInitializedDecoder,
|
|
1923
|
+
getControllerInitializedEncoder,
|
|
1924
|
+
getDepositTokensDiscriminatorBytes,
|
|
1925
|
+
getDepositTokensInstruction,
|
|
1926
|
+
getDepositTokensInstructionDataCodec,
|
|
1927
|
+
getDepositTokensInstructionDataDecoder,
|
|
1928
|
+
getDepositTokensInstructionDataEncoder,
|
|
1929
|
+
getDropsyErrorMessage,
|
|
1930
|
+
getInitializeAirdropDiscriminatorBytes,
|
|
1931
|
+
getInitializeAirdropInstruction,
|
|
1932
|
+
getInitializeAirdropInstructionAsync,
|
|
1933
|
+
getInitializeAirdropInstructionDataCodec,
|
|
1934
|
+
getInitializeAirdropInstructionDataDecoder,
|
|
1935
|
+
getInitializeAirdropInstructionDataEncoder,
|
|
1936
|
+
getInitializeBitmapDiscriminatorBytes,
|
|
1937
|
+
getInitializeBitmapInstruction,
|
|
1938
|
+
getInitializeBitmapInstructionAsync,
|
|
1939
|
+
getInitializeBitmapInstructionDataCodec,
|
|
1940
|
+
getInitializeBitmapInstructionDataDecoder,
|
|
1941
|
+
getInitializeBitmapInstructionDataEncoder,
|
|
1942
|
+
getInitializeControllerDiscriminatorBytes,
|
|
1943
|
+
getInitializeControllerInstruction,
|
|
1944
|
+
getInitializeControllerInstructionAsync,
|
|
1945
|
+
getInitializeControllerInstructionDataCodec,
|
|
1946
|
+
getInitializeControllerInstructionDataDecoder,
|
|
1947
|
+
getInitializeControllerInstructionDataEncoder,
|
|
1948
|
+
getTokensDepositedCodec,
|
|
1949
|
+
getTokensDepositedDecoder,
|
|
1950
|
+
getTokensDepositedEncoder,
|
|
1951
|
+
identifyDropsyAccount,
|
|
1952
|
+
identifyDropsyInstruction,
|
|
1953
|
+
isDropsyError,
|
|
1954
|
+
parseClaimTokensInstruction,
|
|
1955
|
+
parseCloseAirdropInstruction,
|
|
1956
|
+
parseCloseBitmapInstruction,
|
|
1957
|
+
parseDepositTokensInstruction,
|
|
1958
|
+
parseInitializeAirdropInstruction,
|
|
1959
|
+
parseInitializeBitmapInstruction,
|
|
1960
|
+
parseInitializeControllerInstruction
|
|
1961
|
+
};
|