@dropsy/airdrop 0.4.0 → 0.4.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.d.cts → index.d.mts} +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +631 -659
- package/dist/index.js.map +1 -1
- package/dist/{index.cjs → index.mjs} +668 -626
- package/dist/index.mjs.map +1 -0
- package/package.json +1 -4
- package/dist/index.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,29 +1,218 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
AIRDROP_CONFIG_DISCRIMINATOR: () => AIRDROP_CONFIG_DISCRIMINATOR,
|
|
24
|
+
AIRDROP_DISCRIMINATOR: () => AIRDROP_DISCRIMINATOR,
|
|
25
|
+
AIRDROP_MASTER_DISCRIMINATOR: () => AIRDROP_MASTER_DISCRIMINATOR,
|
|
26
|
+
BITMAP_ACCOUNT_DISCRIMINATOR: () => BITMAP_ACCOUNT_DISCRIMINATOR,
|
|
27
|
+
CLAIM_AIRDROP_DISCRIMINATOR: () => CLAIM_AIRDROP_DISCRIMINATOR,
|
|
28
|
+
CREATE_AIRDROP_DISCRIMINATOR: () => CREATE_AIRDROP_DISCRIMINATOR,
|
|
29
|
+
CREATE_BITMAP_DISCRIMINATOR: () => CREATE_BITMAP_DISCRIMINATOR,
|
|
30
|
+
DEPOSIT_TOKENS_DISCRIMINATOR: () => DEPOSIT_TOKENS_DISCRIMINATOR,
|
|
31
|
+
DROPSY_AIRDROP_ERROR__ACTION_FEE_TOO_HIGH: () => DROPSY_AIRDROP_ERROR__ACTION_FEE_TOO_HIGH,
|
|
32
|
+
DROPSY_AIRDROP_ERROR__ACTIVE_BITMAPS_EXIST: () => DROPSY_AIRDROP_ERROR__ACTIVE_BITMAPS_EXIST,
|
|
33
|
+
DROPSY_AIRDROP_ERROR__AIRDROP_ENDED: () => DROPSY_AIRDROP_ERROR__AIRDROP_ENDED,
|
|
34
|
+
DROPSY_AIRDROP_ERROR__AIRDROP_NOT_ENDED: () => DROPSY_AIRDROP_ERROR__AIRDROP_NOT_ENDED,
|
|
35
|
+
DROPSY_AIRDROP_ERROR__AIRDROP_NOT_STARTED: () => DROPSY_AIRDROP_ERROR__AIRDROP_NOT_STARTED,
|
|
36
|
+
DROPSY_AIRDROP_ERROR__ALREADY_CLAIMED: () => DROPSY_AIRDROP_ERROR__ALREADY_CLAIMED,
|
|
37
|
+
DROPSY_AIRDROP_ERROR__BITMAP_AIRDROP_MISMATCH: () => DROPSY_AIRDROP_ERROR__BITMAP_AIRDROP_MISMATCH,
|
|
38
|
+
DROPSY_AIRDROP_ERROR__BITMAP_COUNT_UNDERFLOW: () => DROPSY_AIRDROP_ERROR__BITMAP_COUNT_UNDERFLOW,
|
|
39
|
+
DROPSY_AIRDROP_ERROR__BITMAP_TOO_LARGE: () => DROPSY_AIRDROP_ERROR__BITMAP_TOO_LARGE,
|
|
40
|
+
DROPSY_AIRDROP_ERROR__CLAIM_FEE_TOO_HIGH: () => DROPSY_AIRDROP_ERROR__CLAIM_FEE_TOO_HIGH,
|
|
41
|
+
DROPSY_AIRDROP_ERROR__CREATE_FEE_TOO_HIGH: () => DROPSY_AIRDROP_ERROR__CREATE_FEE_TOO_HIGH,
|
|
42
|
+
DROPSY_AIRDROP_ERROR__DESTINATION_MINT_MISMATCH: () => DROPSY_AIRDROP_ERROR__DESTINATION_MINT_MISMATCH,
|
|
43
|
+
DROPSY_AIRDROP_ERROR__DURATION_TOO_SHORT: () => DROPSY_AIRDROP_ERROR__DURATION_TOO_SHORT,
|
|
44
|
+
DROPSY_AIRDROP_ERROR__IMMUTABLE_AIRDROP: () => DROPSY_AIRDROP_ERROR__IMMUTABLE_AIRDROP,
|
|
45
|
+
DROPSY_AIRDROP_ERROR__IMMUTABLE_FIELD: () => DROPSY_AIRDROP_ERROR__IMMUTABLE_FIELD,
|
|
46
|
+
DROPSY_AIRDROP_ERROR__INSUFFICIENT_DEPOSIT: () => DROPSY_AIRDROP_ERROR__INSUFFICIENT_DEPOSIT,
|
|
47
|
+
DROPSY_AIRDROP_ERROR__INSUFFICIENT_FUNDS_FOR_FEE: () => DROPSY_AIRDROP_ERROR__INSUFFICIENT_FUNDS_FOR_FEE,
|
|
48
|
+
DROPSY_AIRDROP_ERROR__INSUFFICIENT_VAULT_FUNDS: () => DROPSY_AIRDROP_ERROR__INSUFFICIENT_VAULT_FUNDS,
|
|
49
|
+
DROPSY_AIRDROP_ERROR__INVALID_ADMIN: () => DROPSY_AIRDROP_ERROR__INVALID_ADMIN,
|
|
50
|
+
DROPSY_AIRDROP_ERROR__INVALID_AFFILIATE_PDA: () => DROPSY_AIRDROP_ERROR__INVALID_AFFILIATE_PDA,
|
|
51
|
+
DROPSY_AIRDROP_ERROR__INVALID_AIRDROP_PDA: () => DROPSY_AIRDROP_ERROR__INVALID_AIRDROP_PDA,
|
|
52
|
+
DROPSY_AIRDROP_ERROR__INVALID_AIRDROP_VERSION: () => DROPSY_AIRDROP_ERROR__INVALID_AIRDROP_VERSION,
|
|
53
|
+
DROPSY_AIRDROP_ERROR__INVALID_AIRDROP_VESTING_VERSION: () => DROPSY_AIRDROP_ERROR__INVALID_AIRDROP_VESTING_VERSION,
|
|
54
|
+
DROPSY_AIRDROP_ERROR__INVALID_AMOUNT: () => DROPSY_AIRDROP_ERROR__INVALID_AMOUNT,
|
|
55
|
+
DROPSY_AIRDROP_ERROR__INVALID_BITMAP_ACCOUNT: () => DROPSY_AIRDROP_ERROR__INVALID_BITMAP_ACCOUNT,
|
|
56
|
+
DROPSY_AIRDROP_ERROR__INVALID_BITMAP_INDEX: () => DROPSY_AIRDROP_ERROR__INVALID_BITMAP_INDEX,
|
|
57
|
+
DROPSY_AIRDROP_ERROR__INVALID_DELEGATE_PERMISSION: () => DROPSY_AIRDROP_ERROR__INVALID_DELEGATE_PERMISSION,
|
|
58
|
+
DROPSY_AIRDROP_ERROR__INVALID_DESTINATION_OWNER: () => DROPSY_AIRDROP_ERROR__INVALID_DESTINATION_OWNER,
|
|
59
|
+
DROPSY_AIRDROP_ERROR__INVALID_END_TIME: () => DROPSY_AIRDROP_ERROR__INVALID_END_TIME,
|
|
60
|
+
DROPSY_AIRDROP_ERROR__INVALID_FEE_VAULT: () => DROPSY_AIRDROP_ERROR__INVALID_FEE_VAULT,
|
|
61
|
+
DROPSY_AIRDROP_ERROR__INVALID_FEE_VAULT_CURVE: () => DROPSY_AIRDROP_ERROR__INVALID_FEE_VAULT_CURVE,
|
|
62
|
+
DROPSY_AIRDROP_ERROR__INVALID_FEE_VAULT_OWNER: () => DROPSY_AIRDROP_ERROR__INVALID_FEE_VAULT_OWNER,
|
|
63
|
+
DROPSY_AIRDROP_ERROR__INVALID_MINT: () => DROPSY_AIRDROP_ERROR__INVALID_MINT,
|
|
64
|
+
DROPSY_AIRDROP_ERROR__INVALID_MINT_OWNER: () => DROPSY_AIRDROP_ERROR__INVALID_MINT_OWNER,
|
|
65
|
+
DROPSY_AIRDROP_ERROR__INVALID_MUTABILITY: () => DROPSY_AIRDROP_ERROR__INVALID_MUTABILITY,
|
|
66
|
+
DROPSY_AIRDROP_ERROR__INVALID_OWNER: () => DROPSY_AIRDROP_ERROR__INVALID_OWNER,
|
|
67
|
+
DROPSY_AIRDROP_ERROR__INVALID_PARENT_ACCOUNT: () => DROPSY_AIRDROP_ERROR__INVALID_PARENT_ACCOUNT,
|
|
68
|
+
DROPSY_AIRDROP_ERROR__INVALID_PDA: () => DROPSY_AIRDROP_ERROR__INVALID_PDA,
|
|
69
|
+
DROPSY_AIRDROP_ERROR__INVALID_PERCENTAGE: () => DROPSY_AIRDROP_ERROR__INVALID_PERCENTAGE,
|
|
70
|
+
DROPSY_AIRDROP_ERROR__INVALID_PROOF: () => DROPSY_AIRDROP_ERROR__INVALID_PROOF,
|
|
71
|
+
DROPSY_AIRDROP_ERROR__INVALID_PUB_KEY: () => DROPSY_AIRDROP_ERROR__INVALID_PUB_KEY,
|
|
72
|
+
DROPSY_AIRDROP_ERROR__INVALID_TIMESTAMP: () => DROPSY_AIRDROP_ERROR__INVALID_TIMESTAMP,
|
|
73
|
+
DROPSY_AIRDROP_ERROR__INVALID_TOTAL: () => DROPSY_AIRDROP_ERROR__INVALID_TOTAL,
|
|
74
|
+
DROPSY_AIRDROP_ERROR__INVALID_TREASURY_ACCOUNT: () => DROPSY_AIRDROP_ERROR__INVALID_TREASURY_ACCOUNT,
|
|
75
|
+
DROPSY_AIRDROP_ERROR__INVALID_VAULT_AUTHORITY: () => DROPSY_AIRDROP_ERROR__INVALID_VAULT_AUTHORITY,
|
|
76
|
+
DROPSY_AIRDROP_ERROR__INVALID_VESTING_SCHEDULE: () => DROPSY_AIRDROP_ERROR__INVALID_VESTING_SCHEDULE,
|
|
77
|
+
DROPSY_AIRDROP_ERROR__INVALID_VESTING_TYPE: () => DROPSY_AIRDROP_ERROR__INVALID_VESTING_TYPE,
|
|
78
|
+
DROPSY_AIRDROP_ERROR__MINT_HAS_FREEZE_AUTHORITY: () => DROPSY_AIRDROP_ERROR__MINT_HAS_FREEZE_AUTHORITY,
|
|
79
|
+
DROPSY_AIRDROP_ERROR__MINT_IS_FROZEN: () => DROPSY_AIRDROP_ERROR__MINT_IS_FROZEN,
|
|
80
|
+
DROPSY_AIRDROP_ERROR__MINT_IS_NOT_INITIALIZED: () => DROPSY_AIRDROP_ERROR__MINT_IS_NOT_INITIALIZED,
|
|
81
|
+
DROPSY_AIRDROP_ERROR__MINT_MISMATCH: () => DROPSY_AIRDROP_ERROR__MINT_MISMATCH,
|
|
82
|
+
DROPSY_AIRDROP_ERROR__MISSING_BITMAP_PDA: () => DROPSY_AIRDROP_ERROR__MISSING_BITMAP_PDA,
|
|
83
|
+
DROPSY_AIRDROP_ERROR__NFT_NOT_ALLOWED: () => DROPSY_AIRDROP_ERROR__NFT_NOT_ALLOWED,
|
|
84
|
+
DROPSY_AIRDROP_ERROR__NON_ZERO_VALUE_REQUIRED: () => DROPSY_AIRDROP_ERROR__NON_ZERO_VALUE_REQUIRED,
|
|
85
|
+
DROPSY_AIRDROP_ERROR__OVERFLOW: () => DROPSY_AIRDROP_ERROR__OVERFLOW,
|
|
86
|
+
DROPSY_AIRDROP_ERROR__OWNER_MISMATCH: () => DROPSY_AIRDROP_ERROR__OWNER_MISMATCH,
|
|
87
|
+
DROPSY_AIRDROP_ERROR__SOURCE_ACCOUNT_FROZEN: () => DROPSY_AIRDROP_ERROR__SOURCE_ACCOUNT_FROZEN,
|
|
88
|
+
DROPSY_AIRDROP_ERROR__SOURCE_HAS_CLOSE_AUTHORITY: () => DROPSY_AIRDROP_ERROR__SOURCE_HAS_CLOSE_AUTHORITY,
|
|
89
|
+
DROPSY_AIRDROP_ERROR__SOURCE_HAS_DELEGATE: () => DROPSY_AIRDROP_ERROR__SOURCE_HAS_DELEGATE,
|
|
90
|
+
DROPSY_AIRDROP_ERROR__TOO_MANY_BITMAPS: () => DROPSY_AIRDROP_ERROR__TOO_MANY_BITMAPS,
|
|
91
|
+
DROPSY_AIRDROP_ERROR__UNAUTHORIZED: () => DROPSY_AIRDROP_ERROR__UNAUTHORIZED,
|
|
92
|
+
DROPSY_AIRDROP_ERROR__UN_AUTHORIZED: () => DROPSY_AIRDROP_ERROR__UN_AUTHORIZED,
|
|
93
|
+
DROPSY_AIRDROP_ERROR__UPDATE_CUTOFF_TIME_PASSED: () => DROPSY_AIRDROP_ERROR__UPDATE_CUTOFF_TIME_PASSED,
|
|
94
|
+
DROPSY_AIRDROP_ERROR__VALUE_BELOW_THE_MINIMUM: () => DROPSY_AIRDROP_ERROR__VALUE_BELOW_THE_MINIMUM,
|
|
95
|
+
DROPSY_AIRDROP_ERROR__VALUE_EXCEEDS_MAXIMUM: () => DROPSY_AIRDROP_ERROR__VALUE_EXCEEDS_MAXIMUM,
|
|
96
|
+
DROPSY_AIRDROP_ERROR__VALUE_OUT_OF_RANGE: () => DROPSY_AIRDROP_ERROR__VALUE_OUT_OF_RANGE,
|
|
97
|
+
DROPSY_AIRDROP_ERROR__VAULT_FROZEN: () => DROPSY_AIRDROP_ERROR__VAULT_FROZEN,
|
|
98
|
+
DROPSY_AIRDROP_ERROR__VAULT_HAS_CLOSE_AUTHORITY: () => DROPSY_AIRDROP_ERROR__VAULT_HAS_CLOSE_AUTHORITY,
|
|
99
|
+
DROPSY_AIRDROP_ERROR__VAULT_HAS_DELEGATE: () => DROPSY_AIRDROP_ERROR__VAULT_HAS_DELEGATE,
|
|
100
|
+
DROPSY_AIRDROP_ERROR__VAULT_MINT_MISMATCH: () => DROPSY_AIRDROP_ERROR__VAULT_MINT_MISMATCH,
|
|
101
|
+
DROPSY_AIRDROP_ERROR__VAULT_NOT_INITIALIZED: () => DROPSY_AIRDROP_ERROR__VAULT_NOT_INITIALIZED,
|
|
102
|
+
DROPSY_AIRDROP_ERROR__VAULT_NOT_RENT_EXEMPT: () => DROPSY_AIRDROP_ERROR__VAULT_NOT_RENT_EXEMPT,
|
|
103
|
+
DROPSY_AIRDROP_ERROR__VESTING_ACCOUNT_REQUIRED: () => DROPSY_AIRDROP_ERROR__VESTING_ACCOUNT_REQUIRED,
|
|
104
|
+
DROPSY_AIRDROP_PROGRAM_ADDRESS: () => DROPSY_AIRDROP_PROGRAM_ADDRESS,
|
|
105
|
+
DropsyAirdropAccount: () => DropsyAirdropAccount,
|
|
106
|
+
DropsyAirdropInstruction: () => DropsyAirdropInstruction,
|
|
107
|
+
INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR: () => INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR,
|
|
108
|
+
INITIALIZE_AIRDROP_MASTER_DISCRIMINATOR: () => INITIALIZE_AIRDROP_MASTER_DISCRIMINATOR,
|
|
109
|
+
decodeAirdrop: () => decodeAirdrop,
|
|
110
|
+
decodeAirdropConfig: () => decodeAirdropConfig,
|
|
111
|
+
decodeAirdropMaster: () => decodeAirdropMaster,
|
|
112
|
+
decodeBitmapAccount: () => decodeBitmapAccount,
|
|
113
|
+
fetchAirdrop: () => fetchAirdrop,
|
|
114
|
+
fetchAirdropConfig: () => fetchAirdropConfig,
|
|
115
|
+
fetchAirdropMaster: () => fetchAirdropMaster,
|
|
116
|
+
fetchAllAirdrop: () => fetchAllAirdrop,
|
|
117
|
+
fetchAllAirdropConfig: () => fetchAllAirdropConfig,
|
|
118
|
+
fetchAllAirdropMaster: () => fetchAllAirdropMaster,
|
|
119
|
+
fetchAllBitmapAccount: () => fetchAllBitmapAccount,
|
|
120
|
+
fetchAllMaybeAirdrop: () => fetchAllMaybeAirdrop,
|
|
121
|
+
fetchAllMaybeAirdropConfig: () => fetchAllMaybeAirdropConfig,
|
|
122
|
+
fetchAllMaybeAirdropMaster: () => fetchAllMaybeAirdropMaster,
|
|
123
|
+
fetchAllMaybeBitmapAccount: () => fetchAllMaybeBitmapAccount,
|
|
124
|
+
fetchBitmapAccount: () => fetchBitmapAccount,
|
|
125
|
+
fetchMaybeAirdrop: () => fetchMaybeAirdrop,
|
|
126
|
+
fetchMaybeAirdropConfig: () => fetchMaybeAirdropConfig,
|
|
127
|
+
fetchMaybeAirdropMaster: () => fetchMaybeAirdropMaster,
|
|
128
|
+
fetchMaybeBitmapAccount: () => fetchMaybeBitmapAccount,
|
|
129
|
+
getAirdropCodec: () => getAirdropCodec,
|
|
130
|
+
getAirdropConfigCodec: () => getAirdropConfigCodec,
|
|
131
|
+
getAirdropConfigDecoder: () => getAirdropConfigDecoder,
|
|
132
|
+
getAirdropConfigDiscriminatorBytes: () => getAirdropConfigDiscriminatorBytes,
|
|
133
|
+
getAirdropConfigEncoder: () => getAirdropConfigEncoder,
|
|
134
|
+
getAirdropConfigSize: () => getAirdropConfigSize,
|
|
135
|
+
getAirdropDecoder: () => getAirdropDecoder,
|
|
136
|
+
getAirdropDiscriminatorBytes: () => getAirdropDiscriminatorBytes,
|
|
137
|
+
getAirdropEncoder: () => getAirdropEncoder,
|
|
138
|
+
getAirdropInitializedCodec: () => getAirdropInitializedCodec,
|
|
139
|
+
getAirdropInitializedDecoder: () => getAirdropInitializedDecoder,
|
|
140
|
+
getAirdropInitializedEncoder: () => getAirdropInitializedEncoder,
|
|
141
|
+
getAirdropMasterCodec: () => getAirdropMasterCodec,
|
|
142
|
+
getAirdropMasterDecoder: () => getAirdropMasterDecoder,
|
|
143
|
+
getAirdropMasterDiscriminatorBytes: () => getAirdropMasterDiscriminatorBytes,
|
|
144
|
+
getAirdropMasterEncoder: () => getAirdropMasterEncoder,
|
|
145
|
+
getAirdropMasterSize: () => getAirdropMasterSize,
|
|
146
|
+
getAirdropSize: () => getAirdropSize,
|
|
147
|
+
getBitmapAccountCodec: () => getBitmapAccountCodec,
|
|
148
|
+
getBitmapAccountDecoder: () => getBitmapAccountDecoder,
|
|
149
|
+
getBitmapAccountDiscriminatorBytes: () => getBitmapAccountDiscriminatorBytes,
|
|
150
|
+
getBitmapAccountEncoder: () => getBitmapAccountEncoder,
|
|
151
|
+
getBitmapAccountSize: () => getBitmapAccountSize,
|
|
152
|
+
getBitmapClosedCodec: () => getBitmapClosedCodec,
|
|
153
|
+
getBitmapClosedDecoder: () => getBitmapClosedDecoder,
|
|
154
|
+
getBitmapClosedEncoder: () => getBitmapClosedEncoder,
|
|
155
|
+
getBitmapInitializedCodec: () => getBitmapInitializedCodec,
|
|
156
|
+
getBitmapInitializedDecoder: () => getBitmapInitializedDecoder,
|
|
157
|
+
getBitmapInitializedEncoder: () => getBitmapInitializedEncoder,
|
|
158
|
+
getClaimAirdropDiscriminatorBytes: () => getClaimAirdropDiscriminatorBytes,
|
|
159
|
+
getClaimAirdropInstruction: () => getClaimAirdropInstruction,
|
|
160
|
+
getClaimAirdropInstructionAsync: () => getClaimAirdropInstructionAsync,
|
|
161
|
+
getClaimAirdropInstructionDataCodec: () => getClaimAirdropInstructionDataCodec,
|
|
162
|
+
getClaimAirdropInstructionDataDecoder: () => getClaimAirdropInstructionDataDecoder,
|
|
163
|
+
getClaimAirdropInstructionDataEncoder: () => getClaimAirdropInstructionDataEncoder,
|
|
164
|
+
getCreateAirdropDiscriminatorBytes: () => getCreateAirdropDiscriminatorBytes,
|
|
165
|
+
getCreateAirdropInstruction: () => getCreateAirdropInstruction,
|
|
166
|
+
getCreateAirdropInstructionAsync: () => getCreateAirdropInstructionAsync,
|
|
167
|
+
getCreateAirdropInstructionDataCodec: () => getCreateAirdropInstructionDataCodec,
|
|
168
|
+
getCreateAirdropInstructionDataDecoder: () => getCreateAirdropInstructionDataDecoder,
|
|
169
|
+
getCreateAirdropInstructionDataEncoder: () => getCreateAirdropInstructionDataEncoder,
|
|
170
|
+
getCreateBitmapDiscriminatorBytes: () => getCreateBitmapDiscriminatorBytes,
|
|
171
|
+
getCreateBitmapInstruction: () => getCreateBitmapInstruction,
|
|
172
|
+
getCreateBitmapInstructionAsync: () => getCreateBitmapInstructionAsync,
|
|
173
|
+
getCreateBitmapInstructionDataCodec: () => getCreateBitmapInstructionDataCodec,
|
|
174
|
+
getCreateBitmapInstructionDataDecoder: () => getCreateBitmapInstructionDataDecoder,
|
|
175
|
+
getCreateBitmapInstructionDataEncoder: () => getCreateBitmapInstructionDataEncoder,
|
|
176
|
+
getDepositTokensDiscriminatorBytes: () => getDepositTokensDiscriminatorBytes,
|
|
177
|
+
getDepositTokensInstruction: () => getDepositTokensInstruction,
|
|
178
|
+
getDepositTokensInstructionAsync: () => getDepositTokensInstructionAsync,
|
|
179
|
+
getDepositTokensInstructionDataCodec: () => getDepositTokensInstructionDataCodec,
|
|
180
|
+
getDepositTokensInstructionDataDecoder: () => getDepositTokensInstructionDataDecoder,
|
|
181
|
+
getDepositTokensInstructionDataEncoder: () => getDepositTokensInstructionDataEncoder,
|
|
182
|
+
getDropsyAirdropErrorMessage: () => getDropsyAirdropErrorMessage,
|
|
183
|
+
getInitializeAirdropConfigDiscriminatorBytes: () => getInitializeAirdropConfigDiscriminatorBytes,
|
|
184
|
+
getInitializeAirdropConfigInstruction: () => getInitializeAirdropConfigInstruction,
|
|
185
|
+
getInitializeAirdropConfigInstructionAsync: () => getInitializeAirdropConfigInstructionAsync,
|
|
186
|
+
getInitializeAirdropConfigInstructionDataCodec: () => getInitializeAirdropConfigInstructionDataCodec,
|
|
187
|
+
getInitializeAirdropConfigInstructionDataDecoder: () => getInitializeAirdropConfigInstructionDataDecoder,
|
|
188
|
+
getInitializeAirdropConfigInstructionDataEncoder: () => getInitializeAirdropConfigInstructionDataEncoder,
|
|
189
|
+
getInitializeAirdropMasterDiscriminatorBytes: () => getInitializeAirdropMasterDiscriminatorBytes,
|
|
190
|
+
getInitializeAirdropMasterInstruction: () => getInitializeAirdropMasterInstruction,
|
|
191
|
+
getInitializeAirdropMasterInstructionAsync: () => getInitializeAirdropMasterInstructionAsync,
|
|
192
|
+
getInitializeAirdropMasterInstructionDataCodec: () => getInitializeAirdropMasterInstructionDataCodec,
|
|
193
|
+
getInitializeAirdropMasterInstructionDataDecoder: () => getInitializeAirdropMasterInstructionDataDecoder,
|
|
194
|
+
getInitializeAirdropMasterInstructionDataEncoder: () => getInitializeAirdropMasterInstructionDataEncoder,
|
|
195
|
+
getTokensDepositedCodec: () => getTokensDepositedCodec,
|
|
196
|
+
getTokensDepositedDecoder: () => getTokensDepositedDecoder,
|
|
197
|
+
getTokensDepositedEncoder: () => getTokensDepositedEncoder,
|
|
198
|
+
getTokensRedeemedCodec: () => getTokensRedeemedCodec,
|
|
199
|
+
getTokensRedeemedDecoder: () => getTokensRedeemedDecoder,
|
|
200
|
+
getTokensRedeemedEncoder: () => getTokensRedeemedEncoder,
|
|
201
|
+
identifyDropsyAirdropAccount: () => identifyDropsyAirdropAccount,
|
|
202
|
+
identifyDropsyAirdropInstruction: () => identifyDropsyAirdropInstruction,
|
|
203
|
+
isDropsyAirdropError: () => isDropsyAirdropError,
|
|
204
|
+
parseClaimAirdropInstruction: () => parseClaimAirdropInstruction,
|
|
205
|
+
parseCreateAirdropInstruction: () => parseCreateAirdropInstruction,
|
|
206
|
+
parseCreateBitmapInstruction: () => parseCreateBitmapInstruction,
|
|
207
|
+
parseDepositTokensInstruction: () => parseDepositTokensInstruction,
|
|
208
|
+
parseDropsyAirdropInstruction: () => parseDropsyAirdropInstruction,
|
|
209
|
+
parseInitializeAirdropConfigInstruction: () => parseInitializeAirdropConfigInstruction,
|
|
210
|
+
parseInitializeAirdropMasterInstruction: () => parseInitializeAirdropMasterInstruction
|
|
211
|
+
});
|
|
212
|
+
module.exports = __toCommonJS(index_exports);
|
|
213
|
+
|
|
1
214
|
// src/accounts/airdrop.ts
|
|
2
|
-
|
|
3
|
-
assertAccountExists,
|
|
4
|
-
assertAccountsExist,
|
|
5
|
-
combineCodec,
|
|
6
|
-
decodeAccount,
|
|
7
|
-
fetchEncodedAccount,
|
|
8
|
-
fetchEncodedAccounts,
|
|
9
|
-
fixDecoderSize,
|
|
10
|
-
fixEncoderSize,
|
|
11
|
-
getAddressDecoder,
|
|
12
|
-
getAddressEncoder,
|
|
13
|
-
getBytesDecoder,
|
|
14
|
-
getBytesEncoder,
|
|
15
|
-
getI64Decoder,
|
|
16
|
-
getI64Encoder,
|
|
17
|
-
getStructDecoder,
|
|
18
|
-
getStructEncoder,
|
|
19
|
-
getU16Decoder,
|
|
20
|
-
getU16Encoder,
|
|
21
|
-
getU64Decoder,
|
|
22
|
-
getU64Encoder,
|
|
23
|
-
getU8Decoder,
|
|
24
|
-
getU8Encoder,
|
|
25
|
-
transformEncoder
|
|
26
|
-
} from "@solana/kit";
|
|
215
|
+
var import_kit = require("@solana/kit");
|
|
27
216
|
var AIRDROP_DISCRIMINATOR = new Uint8Array([
|
|
28
217
|
31,
|
|
29
218
|
112,
|
|
@@ -35,76 +224,76 @@ var AIRDROP_DISCRIMINATOR = new Uint8Array([
|
|
|
35
224
|
241
|
|
36
225
|
]);
|
|
37
226
|
function getAirdropDiscriminatorBytes() {
|
|
38
|
-
return fixEncoderSize(getBytesEncoder(), 8).encode(AIRDROP_DISCRIMINATOR);
|
|
227
|
+
return (0, import_kit.fixEncoderSize)((0, import_kit.getBytesEncoder)(), 8).encode(AIRDROP_DISCRIMINATOR);
|
|
39
228
|
}
|
|
40
229
|
function getAirdropEncoder() {
|
|
41
|
-
return transformEncoder(
|
|
42
|
-
getStructEncoder([
|
|
43
|
-
["discriminator", fixEncoderSize(getBytesEncoder(), 8)],
|
|
44
|
-
["master", getAddressEncoder()],
|
|
45
|
-
["authority", getAddressEncoder()],
|
|
46
|
-
["mint", getAddressEncoder()],
|
|
47
|
-
["delegateAuthority", getAddressEncoder()],
|
|
48
|
-
["merkleRoot", fixEncoderSize(getBytesEncoder(), 32)],
|
|
49
|
-
["id", getU64Encoder()],
|
|
50
|
-
["supply", getU64Encoder()],
|
|
51
|
-
["boost", getU64Encoder()],
|
|
52
|
-
["startsAt", getI64Encoder()],
|
|
53
|
-
["endsAt", getI64Encoder()],
|
|
54
|
-
["bitmapCount", getU16Encoder()],
|
|
55
|
-
["state", getU8Encoder()],
|
|
56
|
-
["version", getU8Encoder()],
|
|
57
|
-
["bump", getU8Encoder()],
|
|
58
|
-
["padding", fixEncoderSize(getBytesEncoder(), 3)]
|
|
230
|
+
return (0, import_kit.transformEncoder)(
|
|
231
|
+
(0, import_kit.getStructEncoder)([
|
|
232
|
+
["discriminator", (0, import_kit.fixEncoderSize)((0, import_kit.getBytesEncoder)(), 8)],
|
|
233
|
+
["master", (0, import_kit.getAddressEncoder)()],
|
|
234
|
+
["authority", (0, import_kit.getAddressEncoder)()],
|
|
235
|
+
["mint", (0, import_kit.getAddressEncoder)()],
|
|
236
|
+
["delegateAuthority", (0, import_kit.getAddressEncoder)()],
|
|
237
|
+
["merkleRoot", (0, import_kit.fixEncoderSize)((0, import_kit.getBytesEncoder)(), 32)],
|
|
238
|
+
["id", (0, import_kit.getU64Encoder)()],
|
|
239
|
+
["supply", (0, import_kit.getU64Encoder)()],
|
|
240
|
+
["boost", (0, import_kit.getU64Encoder)()],
|
|
241
|
+
["startsAt", (0, import_kit.getI64Encoder)()],
|
|
242
|
+
["endsAt", (0, import_kit.getI64Encoder)()],
|
|
243
|
+
["bitmapCount", (0, import_kit.getU16Encoder)()],
|
|
244
|
+
["state", (0, import_kit.getU8Encoder)()],
|
|
245
|
+
["version", (0, import_kit.getU8Encoder)()],
|
|
246
|
+
["bump", (0, import_kit.getU8Encoder)()],
|
|
247
|
+
["padding", (0, import_kit.fixEncoderSize)((0, import_kit.getBytesEncoder)(), 3)]
|
|
59
248
|
]),
|
|
60
249
|
(value) => ({ ...value, discriminator: AIRDROP_DISCRIMINATOR })
|
|
61
250
|
);
|
|
62
251
|
}
|
|
63
252
|
function getAirdropDecoder() {
|
|
64
|
-
return getStructDecoder([
|
|
65
|
-
["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
|
|
66
|
-
["master", getAddressDecoder()],
|
|
67
|
-
["authority", getAddressDecoder()],
|
|
68
|
-
["mint", getAddressDecoder()],
|
|
69
|
-
["delegateAuthority", getAddressDecoder()],
|
|
70
|
-
["merkleRoot", fixDecoderSize(getBytesDecoder(), 32)],
|
|
71
|
-
["id", getU64Decoder()],
|
|
72
|
-
["supply", getU64Decoder()],
|
|
73
|
-
["boost", getU64Decoder()],
|
|
74
|
-
["startsAt", getI64Decoder()],
|
|
75
|
-
["endsAt", getI64Decoder()],
|
|
76
|
-
["bitmapCount", getU16Decoder()],
|
|
77
|
-
["state", getU8Decoder()],
|
|
78
|
-
["version", getU8Decoder()],
|
|
79
|
-
["bump", getU8Decoder()],
|
|
80
|
-
["padding", fixDecoderSize(getBytesDecoder(), 3)]
|
|
253
|
+
return (0, import_kit.getStructDecoder)([
|
|
254
|
+
["discriminator", (0, import_kit.fixDecoderSize)((0, import_kit.getBytesDecoder)(), 8)],
|
|
255
|
+
["master", (0, import_kit.getAddressDecoder)()],
|
|
256
|
+
["authority", (0, import_kit.getAddressDecoder)()],
|
|
257
|
+
["mint", (0, import_kit.getAddressDecoder)()],
|
|
258
|
+
["delegateAuthority", (0, import_kit.getAddressDecoder)()],
|
|
259
|
+
["merkleRoot", (0, import_kit.fixDecoderSize)((0, import_kit.getBytesDecoder)(), 32)],
|
|
260
|
+
["id", (0, import_kit.getU64Decoder)()],
|
|
261
|
+
["supply", (0, import_kit.getU64Decoder)()],
|
|
262
|
+
["boost", (0, import_kit.getU64Decoder)()],
|
|
263
|
+
["startsAt", (0, import_kit.getI64Decoder)()],
|
|
264
|
+
["endsAt", (0, import_kit.getI64Decoder)()],
|
|
265
|
+
["bitmapCount", (0, import_kit.getU16Decoder)()],
|
|
266
|
+
["state", (0, import_kit.getU8Decoder)()],
|
|
267
|
+
["version", (0, import_kit.getU8Decoder)()],
|
|
268
|
+
["bump", (0, import_kit.getU8Decoder)()],
|
|
269
|
+
["padding", (0, import_kit.fixDecoderSize)((0, import_kit.getBytesDecoder)(), 3)]
|
|
81
270
|
]);
|
|
82
271
|
}
|
|
83
272
|
function getAirdropCodec() {
|
|
84
|
-
return combineCodec(getAirdropEncoder(), getAirdropDecoder());
|
|
273
|
+
return (0, import_kit.combineCodec)(getAirdropEncoder(), getAirdropDecoder());
|
|
85
274
|
}
|
|
86
275
|
function decodeAirdrop(encodedAccount) {
|
|
87
|
-
return decodeAccount(
|
|
276
|
+
return (0, import_kit.decodeAccount)(
|
|
88
277
|
encodedAccount,
|
|
89
278
|
getAirdropDecoder()
|
|
90
279
|
);
|
|
91
280
|
}
|
|
92
281
|
async function fetchAirdrop(rpc, address, config) {
|
|
93
282
|
const maybeAccount = await fetchMaybeAirdrop(rpc, address, config);
|
|
94
|
-
assertAccountExists(maybeAccount);
|
|
283
|
+
(0, import_kit.assertAccountExists)(maybeAccount);
|
|
95
284
|
return maybeAccount;
|
|
96
285
|
}
|
|
97
286
|
async function fetchMaybeAirdrop(rpc, address, config) {
|
|
98
|
-
const maybeAccount = await fetchEncodedAccount(rpc, address, config);
|
|
287
|
+
const maybeAccount = await (0, import_kit.fetchEncodedAccount)(rpc, address, config);
|
|
99
288
|
return decodeAirdrop(maybeAccount);
|
|
100
289
|
}
|
|
101
290
|
async function fetchAllAirdrop(rpc, addresses, config) {
|
|
102
291
|
const maybeAccounts = await fetchAllMaybeAirdrop(rpc, addresses, config);
|
|
103
|
-
assertAccountsExist(maybeAccounts);
|
|
292
|
+
(0, import_kit.assertAccountsExist)(maybeAccounts);
|
|
104
293
|
return maybeAccounts;
|
|
105
294
|
}
|
|
106
295
|
async function fetchAllMaybeAirdrop(rpc, addresses, config) {
|
|
107
|
-
const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);
|
|
296
|
+
const maybeAccounts = await (0, import_kit.fetchEncodedAccounts)(rpc, addresses, config);
|
|
108
297
|
return maybeAccounts.map((maybeAccount) => decodeAirdrop(maybeAccount));
|
|
109
298
|
}
|
|
110
299
|
function getAirdropSize() {
|
|
@@ -112,31 +301,7 @@ function getAirdropSize() {
|
|
|
112
301
|
}
|
|
113
302
|
|
|
114
303
|
// src/accounts/airdropConfig.ts
|
|
115
|
-
|
|
116
|
-
assertAccountExists as assertAccountExists2,
|
|
117
|
-
assertAccountsExist as assertAccountsExist2,
|
|
118
|
-
combineCodec as combineCodec2,
|
|
119
|
-
decodeAccount as decodeAccount2,
|
|
120
|
-
fetchEncodedAccount as fetchEncodedAccount2,
|
|
121
|
-
fetchEncodedAccounts as fetchEncodedAccounts2,
|
|
122
|
-
fixDecoderSize as fixDecoderSize2,
|
|
123
|
-
fixEncoderSize as fixEncoderSize2,
|
|
124
|
-
getAddressDecoder as getAddressDecoder2,
|
|
125
|
-
getAddressEncoder as getAddressEncoder2,
|
|
126
|
-
getBytesDecoder as getBytesDecoder2,
|
|
127
|
-
getBytesEncoder as getBytesEncoder2,
|
|
128
|
-
getI64Decoder as getI64Decoder2,
|
|
129
|
-
getI64Encoder as getI64Encoder2,
|
|
130
|
-
getStructDecoder as getStructDecoder2,
|
|
131
|
-
getStructEncoder as getStructEncoder2,
|
|
132
|
-
getU16Decoder as getU16Decoder2,
|
|
133
|
-
getU16Encoder as getU16Encoder2,
|
|
134
|
-
getU64Decoder as getU64Decoder2,
|
|
135
|
-
getU64Encoder as getU64Encoder2,
|
|
136
|
-
getU8Decoder as getU8Decoder2,
|
|
137
|
-
getU8Encoder as getU8Encoder2,
|
|
138
|
-
transformEncoder as transformEncoder2
|
|
139
|
-
} from "@solana/kit";
|
|
304
|
+
var import_kit2 = require("@solana/kit");
|
|
140
305
|
var AIRDROP_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
141
306
|
194,
|
|
142
307
|
149,
|
|
@@ -148,71 +313,71 @@ var AIRDROP_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
|
148
313
|
16
|
|
149
314
|
]);
|
|
150
315
|
function getAirdropConfigDiscriminatorBytes() {
|
|
151
|
-
return
|
|
316
|
+
return (0, import_kit2.fixEncoderSize)((0, import_kit2.getBytesEncoder)(), 8).encode(
|
|
152
317
|
AIRDROP_CONFIG_DISCRIMINATOR
|
|
153
318
|
);
|
|
154
319
|
}
|
|
155
320
|
function getAirdropConfigEncoder() {
|
|
156
|
-
return
|
|
157
|
-
|
|
158
|
-
["discriminator",
|
|
159
|
-
["authority",
|
|
160
|
-
["protocolTreasury",
|
|
161
|
-
["wlRoot",
|
|
162
|
-
["protocolFee",
|
|
163
|
-
["airdropMasterCreateFee",
|
|
164
|
-
["maxClaimFee",
|
|
165
|
-
["maxActionFee",
|
|
166
|
-
["minAirdropDuration",
|
|
167
|
-
["defaultAirdropDuration",
|
|
168
|
-
["maxAirdropDuration",
|
|
169
|
-
["updateGracePeriod",
|
|
170
|
-
["masterFeeBps",
|
|
171
|
-
["version",
|
|
172
|
-
["bump",
|
|
173
|
-
["padding",
|
|
174
|
-
["reserved",
|
|
321
|
+
return (0, import_kit2.transformEncoder)(
|
|
322
|
+
(0, import_kit2.getStructEncoder)([
|
|
323
|
+
["discriminator", (0, import_kit2.fixEncoderSize)((0, import_kit2.getBytesEncoder)(), 8)],
|
|
324
|
+
["authority", (0, import_kit2.getAddressEncoder)()],
|
|
325
|
+
["protocolTreasury", (0, import_kit2.getAddressEncoder)()],
|
|
326
|
+
["wlRoot", (0, import_kit2.fixEncoderSize)((0, import_kit2.getBytesEncoder)(), 32)],
|
|
327
|
+
["protocolFee", (0, import_kit2.getU64Encoder)()],
|
|
328
|
+
["airdropMasterCreateFee", (0, import_kit2.getU64Encoder)()],
|
|
329
|
+
["maxClaimFee", (0, import_kit2.getU64Encoder)()],
|
|
330
|
+
["maxActionFee", (0, import_kit2.getU64Encoder)()],
|
|
331
|
+
["minAirdropDuration", (0, import_kit2.getI64Encoder)()],
|
|
332
|
+
["defaultAirdropDuration", (0, import_kit2.getI64Encoder)()],
|
|
333
|
+
["maxAirdropDuration", (0, import_kit2.getI64Encoder)()],
|
|
334
|
+
["updateGracePeriod", (0, import_kit2.getI64Encoder)()],
|
|
335
|
+
["masterFeeBps", (0, import_kit2.getU16Encoder)()],
|
|
336
|
+
["version", (0, import_kit2.getU8Encoder)()],
|
|
337
|
+
["bump", (0, import_kit2.getU8Encoder)()],
|
|
338
|
+
["padding", (0, import_kit2.fixEncoderSize)((0, import_kit2.getBytesEncoder)(), 4)],
|
|
339
|
+
["reserved", (0, import_kit2.fixEncoderSize)((0, import_kit2.getBytesEncoder)(), 256)]
|
|
175
340
|
]),
|
|
176
341
|
(value) => ({ ...value, discriminator: AIRDROP_CONFIG_DISCRIMINATOR })
|
|
177
342
|
);
|
|
178
343
|
}
|
|
179
344
|
function getAirdropConfigDecoder() {
|
|
180
|
-
return
|
|
181
|
-
["discriminator",
|
|
182
|
-
["authority",
|
|
183
|
-
["protocolTreasury",
|
|
184
|
-
["wlRoot",
|
|
185
|
-
["protocolFee",
|
|
186
|
-
["airdropMasterCreateFee",
|
|
187
|
-
["maxClaimFee",
|
|
188
|
-
["maxActionFee",
|
|
189
|
-
["minAirdropDuration",
|
|
190
|
-
["defaultAirdropDuration",
|
|
191
|
-
["maxAirdropDuration",
|
|
192
|
-
["updateGracePeriod",
|
|
193
|
-
["masterFeeBps",
|
|
194
|
-
["version",
|
|
195
|
-
["bump",
|
|
196
|
-
["padding",
|
|
197
|
-
["reserved",
|
|
345
|
+
return (0, import_kit2.getStructDecoder)([
|
|
346
|
+
["discriminator", (0, import_kit2.fixDecoderSize)((0, import_kit2.getBytesDecoder)(), 8)],
|
|
347
|
+
["authority", (0, import_kit2.getAddressDecoder)()],
|
|
348
|
+
["protocolTreasury", (0, import_kit2.getAddressDecoder)()],
|
|
349
|
+
["wlRoot", (0, import_kit2.fixDecoderSize)((0, import_kit2.getBytesDecoder)(), 32)],
|
|
350
|
+
["protocolFee", (0, import_kit2.getU64Decoder)()],
|
|
351
|
+
["airdropMasterCreateFee", (0, import_kit2.getU64Decoder)()],
|
|
352
|
+
["maxClaimFee", (0, import_kit2.getU64Decoder)()],
|
|
353
|
+
["maxActionFee", (0, import_kit2.getU64Decoder)()],
|
|
354
|
+
["minAirdropDuration", (0, import_kit2.getI64Decoder)()],
|
|
355
|
+
["defaultAirdropDuration", (0, import_kit2.getI64Decoder)()],
|
|
356
|
+
["maxAirdropDuration", (0, import_kit2.getI64Decoder)()],
|
|
357
|
+
["updateGracePeriod", (0, import_kit2.getI64Decoder)()],
|
|
358
|
+
["masterFeeBps", (0, import_kit2.getU16Decoder)()],
|
|
359
|
+
["version", (0, import_kit2.getU8Decoder)()],
|
|
360
|
+
["bump", (0, import_kit2.getU8Decoder)()],
|
|
361
|
+
["padding", (0, import_kit2.fixDecoderSize)((0, import_kit2.getBytesDecoder)(), 4)],
|
|
362
|
+
["reserved", (0, import_kit2.fixDecoderSize)((0, import_kit2.getBytesDecoder)(), 256)]
|
|
198
363
|
]);
|
|
199
364
|
}
|
|
200
365
|
function getAirdropConfigCodec() {
|
|
201
|
-
return
|
|
366
|
+
return (0, import_kit2.combineCodec)(getAirdropConfigEncoder(), getAirdropConfigDecoder());
|
|
202
367
|
}
|
|
203
368
|
function decodeAirdropConfig(encodedAccount) {
|
|
204
|
-
return
|
|
369
|
+
return (0, import_kit2.decodeAccount)(
|
|
205
370
|
encodedAccount,
|
|
206
371
|
getAirdropConfigDecoder()
|
|
207
372
|
);
|
|
208
373
|
}
|
|
209
374
|
async function fetchAirdropConfig(rpc, address, config) {
|
|
210
375
|
const maybeAccount = await fetchMaybeAirdropConfig(rpc, address, config);
|
|
211
|
-
|
|
376
|
+
(0, import_kit2.assertAccountExists)(maybeAccount);
|
|
212
377
|
return maybeAccount;
|
|
213
378
|
}
|
|
214
379
|
async function fetchMaybeAirdropConfig(rpc, address, config) {
|
|
215
|
-
const maybeAccount = await
|
|
380
|
+
const maybeAccount = await (0, import_kit2.fetchEncodedAccount)(rpc, address, config);
|
|
216
381
|
return decodeAirdropConfig(maybeAccount);
|
|
217
382
|
}
|
|
218
383
|
async function fetchAllAirdropConfig(rpc, addresses, config) {
|
|
@@ -221,11 +386,11 @@ async function fetchAllAirdropConfig(rpc, addresses, config) {
|
|
|
221
386
|
addresses,
|
|
222
387
|
config
|
|
223
388
|
);
|
|
224
|
-
|
|
389
|
+
(0, import_kit2.assertAccountsExist)(maybeAccounts);
|
|
225
390
|
return maybeAccounts;
|
|
226
391
|
}
|
|
227
392
|
async function fetchAllMaybeAirdropConfig(rpc, addresses, config) {
|
|
228
|
-
const maybeAccounts = await
|
|
393
|
+
const maybeAccounts = await (0, import_kit2.fetchEncodedAccounts)(rpc, addresses, config);
|
|
229
394
|
return maybeAccounts.map((maybeAccount) => decodeAirdropConfig(maybeAccount));
|
|
230
395
|
}
|
|
231
396
|
function getAirdropConfigSize() {
|
|
@@ -233,27 +398,7 @@ function getAirdropConfigSize() {
|
|
|
233
398
|
}
|
|
234
399
|
|
|
235
400
|
// src/accounts/airdropMaster.ts
|
|
236
|
-
|
|
237
|
-
assertAccountExists as assertAccountExists3,
|
|
238
|
-
assertAccountsExist as assertAccountsExist3,
|
|
239
|
-
combineCodec as combineCodec3,
|
|
240
|
-
decodeAccount as decodeAccount3,
|
|
241
|
-
fetchEncodedAccount as fetchEncodedAccount3,
|
|
242
|
-
fetchEncodedAccounts as fetchEncodedAccounts3,
|
|
243
|
-
fixDecoderSize as fixDecoderSize3,
|
|
244
|
-
fixEncoderSize as fixEncoderSize3,
|
|
245
|
-
getAddressDecoder as getAddressDecoder3,
|
|
246
|
-
getAddressEncoder as getAddressEncoder3,
|
|
247
|
-
getBytesDecoder as getBytesDecoder3,
|
|
248
|
-
getBytesEncoder as getBytesEncoder3,
|
|
249
|
-
getStructDecoder as getStructDecoder3,
|
|
250
|
-
getStructEncoder as getStructEncoder3,
|
|
251
|
-
getU64Decoder as getU64Decoder3,
|
|
252
|
-
getU64Encoder as getU64Encoder3,
|
|
253
|
-
getU8Decoder as getU8Decoder3,
|
|
254
|
-
getU8Encoder as getU8Encoder3,
|
|
255
|
-
transformEncoder as transformEncoder3
|
|
256
|
-
} from "@solana/kit";
|
|
401
|
+
var import_kit3 = require("@solana/kit");
|
|
257
402
|
var AIRDROP_MASTER_DISCRIMINATOR = new Uint8Array([
|
|
258
403
|
31,
|
|
259
404
|
109,
|
|
@@ -265,69 +410,69 @@ var AIRDROP_MASTER_DISCRIMINATOR = new Uint8Array([
|
|
|
265
410
|
4
|
|
266
411
|
]);
|
|
267
412
|
function getAirdropMasterDiscriminatorBytes() {
|
|
268
|
-
return
|
|
413
|
+
return (0, import_kit3.fixEncoderSize)((0, import_kit3.getBytesEncoder)(), 8).encode(
|
|
269
414
|
AIRDROP_MASTER_DISCRIMINATOR
|
|
270
415
|
);
|
|
271
416
|
}
|
|
272
417
|
function getAirdropMasterEncoder() {
|
|
273
|
-
return
|
|
274
|
-
|
|
275
|
-
["discriminator",
|
|
276
|
-
["creator",
|
|
277
|
-
["authority",
|
|
278
|
-
["treasury",
|
|
279
|
-
["createdAirdrops",
|
|
280
|
-
["points",
|
|
281
|
-
["totalClaimCount",
|
|
282
|
-
["monetizedClaimQuota",
|
|
283
|
-
["monetizedClaimCount",
|
|
284
|
-
["airdropUpdateFee",
|
|
285
|
-
["airdropCreationFee",
|
|
286
|
-
["airdropClaimFee",
|
|
287
|
-
["airdropDelegateFee",
|
|
288
|
-
["bitmapCreationFee",
|
|
289
|
-
["bump",
|
|
290
|
-
["padding",
|
|
418
|
+
return (0, import_kit3.transformEncoder)(
|
|
419
|
+
(0, import_kit3.getStructEncoder)([
|
|
420
|
+
["discriminator", (0, import_kit3.fixEncoderSize)((0, import_kit3.getBytesEncoder)(), 8)],
|
|
421
|
+
["creator", (0, import_kit3.getAddressEncoder)()],
|
|
422
|
+
["authority", (0, import_kit3.getAddressEncoder)()],
|
|
423
|
+
["treasury", (0, import_kit3.getAddressEncoder)()],
|
|
424
|
+
["createdAirdrops", (0, import_kit3.getU64Encoder)()],
|
|
425
|
+
["points", (0, import_kit3.getU64Encoder)()],
|
|
426
|
+
["totalClaimCount", (0, import_kit3.getU64Encoder)()],
|
|
427
|
+
["monetizedClaimQuota", (0, import_kit3.getU64Encoder)()],
|
|
428
|
+
["monetizedClaimCount", (0, import_kit3.getU64Encoder)()],
|
|
429
|
+
["airdropUpdateFee", (0, import_kit3.getU64Encoder)()],
|
|
430
|
+
["airdropCreationFee", (0, import_kit3.getU64Encoder)()],
|
|
431
|
+
["airdropClaimFee", (0, import_kit3.getU64Encoder)()],
|
|
432
|
+
["airdropDelegateFee", (0, import_kit3.getU64Encoder)()],
|
|
433
|
+
["bitmapCreationFee", (0, import_kit3.getU64Encoder)()],
|
|
434
|
+
["bump", (0, import_kit3.getU8Encoder)()],
|
|
435
|
+
["padding", (0, import_kit3.fixEncoderSize)((0, import_kit3.getBytesEncoder)(), 7)]
|
|
291
436
|
]),
|
|
292
437
|
(value) => ({ ...value, discriminator: AIRDROP_MASTER_DISCRIMINATOR })
|
|
293
438
|
);
|
|
294
439
|
}
|
|
295
440
|
function getAirdropMasterDecoder() {
|
|
296
|
-
return
|
|
297
|
-
["discriminator",
|
|
298
|
-
["creator",
|
|
299
|
-
["authority",
|
|
300
|
-
["treasury",
|
|
301
|
-
["createdAirdrops",
|
|
302
|
-
["points",
|
|
303
|
-
["totalClaimCount",
|
|
304
|
-
["monetizedClaimQuota",
|
|
305
|
-
["monetizedClaimCount",
|
|
306
|
-
["airdropUpdateFee",
|
|
307
|
-
["airdropCreationFee",
|
|
308
|
-
["airdropClaimFee",
|
|
309
|
-
["airdropDelegateFee",
|
|
310
|
-
["bitmapCreationFee",
|
|
311
|
-
["bump",
|
|
312
|
-
["padding",
|
|
441
|
+
return (0, import_kit3.getStructDecoder)([
|
|
442
|
+
["discriminator", (0, import_kit3.fixDecoderSize)((0, import_kit3.getBytesDecoder)(), 8)],
|
|
443
|
+
["creator", (0, import_kit3.getAddressDecoder)()],
|
|
444
|
+
["authority", (0, import_kit3.getAddressDecoder)()],
|
|
445
|
+
["treasury", (0, import_kit3.getAddressDecoder)()],
|
|
446
|
+
["createdAirdrops", (0, import_kit3.getU64Decoder)()],
|
|
447
|
+
["points", (0, import_kit3.getU64Decoder)()],
|
|
448
|
+
["totalClaimCount", (0, import_kit3.getU64Decoder)()],
|
|
449
|
+
["monetizedClaimQuota", (0, import_kit3.getU64Decoder)()],
|
|
450
|
+
["monetizedClaimCount", (0, import_kit3.getU64Decoder)()],
|
|
451
|
+
["airdropUpdateFee", (0, import_kit3.getU64Decoder)()],
|
|
452
|
+
["airdropCreationFee", (0, import_kit3.getU64Decoder)()],
|
|
453
|
+
["airdropClaimFee", (0, import_kit3.getU64Decoder)()],
|
|
454
|
+
["airdropDelegateFee", (0, import_kit3.getU64Decoder)()],
|
|
455
|
+
["bitmapCreationFee", (0, import_kit3.getU64Decoder)()],
|
|
456
|
+
["bump", (0, import_kit3.getU8Decoder)()],
|
|
457
|
+
["padding", (0, import_kit3.fixDecoderSize)((0, import_kit3.getBytesDecoder)(), 7)]
|
|
313
458
|
]);
|
|
314
459
|
}
|
|
315
460
|
function getAirdropMasterCodec() {
|
|
316
|
-
return
|
|
461
|
+
return (0, import_kit3.combineCodec)(getAirdropMasterEncoder(), getAirdropMasterDecoder());
|
|
317
462
|
}
|
|
318
463
|
function decodeAirdropMaster(encodedAccount) {
|
|
319
|
-
return
|
|
464
|
+
return (0, import_kit3.decodeAccount)(
|
|
320
465
|
encodedAccount,
|
|
321
466
|
getAirdropMasterDecoder()
|
|
322
467
|
);
|
|
323
468
|
}
|
|
324
469
|
async function fetchAirdropMaster(rpc, address, config) {
|
|
325
470
|
const maybeAccount = await fetchMaybeAirdropMaster(rpc, address, config);
|
|
326
|
-
|
|
471
|
+
(0, import_kit3.assertAccountExists)(maybeAccount);
|
|
327
472
|
return maybeAccount;
|
|
328
473
|
}
|
|
329
474
|
async function fetchMaybeAirdropMaster(rpc, address, config) {
|
|
330
|
-
const maybeAccount = await
|
|
475
|
+
const maybeAccount = await (0, import_kit3.fetchEncodedAccount)(rpc, address, config);
|
|
331
476
|
return decodeAirdropMaster(maybeAccount);
|
|
332
477
|
}
|
|
333
478
|
async function fetchAllAirdropMaster(rpc, addresses, config) {
|
|
@@ -336,11 +481,11 @@ async function fetchAllAirdropMaster(rpc, addresses, config) {
|
|
|
336
481
|
addresses,
|
|
337
482
|
config
|
|
338
483
|
);
|
|
339
|
-
|
|
484
|
+
(0, import_kit3.assertAccountsExist)(maybeAccounts);
|
|
340
485
|
return maybeAccounts;
|
|
341
486
|
}
|
|
342
487
|
async function fetchAllMaybeAirdropMaster(rpc, addresses, config) {
|
|
343
|
-
const maybeAccounts = await
|
|
488
|
+
const maybeAccounts = await (0, import_kit3.fetchEncodedAccounts)(rpc, addresses, config);
|
|
344
489
|
return maybeAccounts.map((maybeAccount) => decodeAirdropMaster(maybeAccount));
|
|
345
490
|
}
|
|
346
491
|
function getAirdropMasterSize() {
|
|
@@ -348,29 +493,7 @@ function getAirdropMasterSize() {
|
|
|
348
493
|
}
|
|
349
494
|
|
|
350
495
|
// src/accounts/bitmapAccount.ts
|
|
351
|
-
|
|
352
|
-
assertAccountExists as assertAccountExists4,
|
|
353
|
-
assertAccountsExist as assertAccountsExist4,
|
|
354
|
-
combineCodec as combineCodec4,
|
|
355
|
-
decodeAccount as decodeAccount4,
|
|
356
|
-
fetchEncodedAccount as fetchEncodedAccount4,
|
|
357
|
-
fetchEncodedAccounts as fetchEncodedAccounts4,
|
|
358
|
-
fixDecoderSize as fixDecoderSize4,
|
|
359
|
-
fixEncoderSize as fixEncoderSize4,
|
|
360
|
-
getAddressDecoder as getAddressDecoder4,
|
|
361
|
-
getAddressEncoder as getAddressEncoder4,
|
|
362
|
-
getBytesDecoder as getBytesDecoder4,
|
|
363
|
-
getBytesEncoder as getBytesEncoder4,
|
|
364
|
-
getStructDecoder as getStructDecoder4,
|
|
365
|
-
getStructEncoder as getStructEncoder4,
|
|
366
|
-
getU16Decoder as getU16Decoder3,
|
|
367
|
-
getU16Encoder as getU16Encoder3,
|
|
368
|
-
getU32Decoder,
|
|
369
|
-
getU32Encoder,
|
|
370
|
-
getU8Decoder as getU8Decoder4,
|
|
371
|
-
getU8Encoder as getU8Encoder4,
|
|
372
|
-
transformEncoder as transformEncoder4
|
|
373
|
-
} from "@solana/kit";
|
|
496
|
+
var import_kit4 = require("@solana/kit");
|
|
374
497
|
var BITMAP_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
375
498
|
152,
|
|
376
499
|
161,
|
|
@@ -382,53 +505,53 @@ var BITMAP_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
|
382
505
|
48
|
|
383
506
|
]);
|
|
384
507
|
function getBitmapAccountDiscriminatorBytes() {
|
|
385
|
-
return
|
|
508
|
+
return (0, import_kit4.fixEncoderSize)((0, import_kit4.getBytesEncoder)(), 8).encode(
|
|
386
509
|
BITMAP_ACCOUNT_DISCRIMINATOR
|
|
387
510
|
);
|
|
388
511
|
}
|
|
389
512
|
function getBitmapAccountEncoder() {
|
|
390
|
-
return
|
|
391
|
-
|
|
392
|
-
["discriminator",
|
|
393
|
-
["authority",
|
|
394
|
-
["airdrop",
|
|
395
|
-
["total", getU32Encoder()],
|
|
396
|
-
["claimedBitmap",
|
|
397
|
-
["id",
|
|
398
|
-
["version",
|
|
399
|
-
["bump",
|
|
513
|
+
return (0, import_kit4.transformEncoder)(
|
|
514
|
+
(0, import_kit4.getStructEncoder)([
|
|
515
|
+
["discriminator", (0, import_kit4.fixEncoderSize)((0, import_kit4.getBytesEncoder)(), 8)],
|
|
516
|
+
["authority", (0, import_kit4.getAddressEncoder)()],
|
|
517
|
+
["airdrop", (0, import_kit4.getAddressEncoder)()],
|
|
518
|
+
["total", (0, import_kit4.getU32Encoder)()],
|
|
519
|
+
["claimedBitmap", (0, import_kit4.fixEncoderSize)((0, import_kit4.getBytesEncoder)(), 1e3)],
|
|
520
|
+
["id", (0, import_kit4.getU16Encoder)()],
|
|
521
|
+
["version", (0, import_kit4.getU8Encoder)()],
|
|
522
|
+
["bump", (0, import_kit4.getU8Encoder)()]
|
|
400
523
|
]),
|
|
401
524
|
(value) => ({ ...value, discriminator: BITMAP_ACCOUNT_DISCRIMINATOR })
|
|
402
525
|
);
|
|
403
526
|
}
|
|
404
527
|
function getBitmapAccountDecoder() {
|
|
405
|
-
return
|
|
406
|
-
["discriminator",
|
|
407
|
-
["authority",
|
|
408
|
-
["airdrop",
|
|
409
|
-
["total", getU32Decoder()],
|
|
410
|
-
["claimedBitmap",
|
|
411
|
-
["id",
|
|
412
|
-
["version",
|
|
413
|
-
["bump",
|
|
528
|
+
return (0, import_kit4.getStructDecoder)([
|
|
529
|
+
["discriminator", (0, import_kit4.fixDecoderSize)((0, import_kit4.getBytesDecoder)(), 8)],
|
|
530
|
+
["authority", (0, import_kit4.getAddressDecoder)()],
|
|
531
|
+
["airdrop", (0, import_kit4.getAddressDecoder)()],
|
|
532
|
+
["total", (0, import_kit4.getU32Decoder)()],
|
|
533
|
+
["claimedBitmap", (0, import_kit4.fixDecoderSize)((0, import_kit4.getBytesDecoder)(), 1e3)],
|
|
534
|
+
["id", (0, import_kit4.getU16Decoder)()],
|
|
535
|
+
["version", (0, import_kit4.getU8Decoder)()],
|
|
536
|
+
["bump", (0, import_kit4.getU8Decoder)()]
|
|
414
537
|
]);
|
|
415
538
|
}
|
|
416
539
|
function getBitmapAccountCodec() {
|
|
417
|
-
return
|
|
540
|
+
return (0, import_kit4.combineCodec)(getBitmapAccountEncoder(), getBitmapAccountDecoder());
|
|
418
541
|
}
|
|
419
542
|
function decodeBitmapAccount(encodedAccount) {
|
|
420
|
-
return
|
|
543
|
+
return (0, import_kit4.decodeAccount)(
|
|
421
544
|
encodedAccount,
|
|
422
545
|
getBitmapAccountDecoder()
|
|
423
546
|
);
|
|
424
547
|
}
|
|
425
548
|
async function fetchBitmapAccount(rpc, address, config) {
|
|
426
549
|
const maybeAccount = await fetchMaybeBitmapAccount(rpc, address, config);
|
|
427
|
-
|
|
550
|
+
(0, import_kit4.assertAccountExists)(maybeAccount);
|
|
428
551
|
return maybeAccount;
|
|
429
552
|
}
|
|
430
553
|
async function fetchMaybeBitmapAccount(rpc, address, config) {
|
|
431
|
-
const maybeAccount = await
|
|
554
|
+
const maybeAccount = await (0, import_kit4.fetchEncodedAccount)(rpc, address, config);
|
|
432
555
|
return decodeBitmapAccount(maybeAccount);
|
|
433
556
|
}
|
|
434
557
|
async function fetchAllBitmapAccount(rpc, addresses, config) {
|
|
@@ -437,11 +560,11 @@ async function fetchAllBitmapAccount(rpc, addresses, config) {
|
|
|
437
560
|
addresses,
|
|
438
561
|
config
|
|
439
562
|
);
|
|
440
|
-
|
|
563
|
+
(0, import_kit4.assertAccountsExist)(maybeAccounts);
|
|
441
564
|
return maybeAccounts;
|
|
442
565
|
}
|
|
443
566
|
async function fetchAllMaybeBitmapAccount(rpc, addresses, config) {
|
|
444
|
-
const maybeAccounts = await
|
|
567
|
+
const maybeAccounts = await (0, import_kit4.fetchEncodedAccounts)(rpc, addresses, config);
|
|
445
568
|
return maybeAccounts.map((maybeAccount) => decodeBitmapAccount(maybeAccount));
|
|
446
569
|
}
|
|
447
570
|
function getBitmapAccountSize() {
|
|
@@ -449,45 +572,16 @@ function getBitmapAccountSize() {
|
|
|
449
572
|
}
|
|
450
573
|
|
|
451
574
|
// src/errors/dropsyAirdrop.ts
|
|
452
|
-
|
|
453
|
-
isProgramError
|
|
454
|
-
} from "@solana/kit";
|
|
575
|
+
var import_kit13 = require("@solana/kit");
|
|
455
576
|
|
|
456
577
|
// src/programs/dropsyAirdrop.ts
|
|
457
|
-
|
|
458
|
-
assertIsInstructionWithAccounts,
|
|
459
|
-
containsBytes,
|
|
460
|
-
fixEncoderSize as fixEncoderSize11,
|
|
461
|
-
getBytesEncoder as getBytesEncoder11
|
|
462
|
-
} from "@solana/kit";
|
|
578
|
+
var import_kit12 = require("@solana/kit");
|
|
463
579
|
|
|
464
580
|
// src/instructions/claimAirdrop.ts
|
|
465
|
-
|
|
466
|
-
combineCodec as combineCodec5,
|
|
467
|
-
fixDecoderSize as fixDecoderSize5,
|
|
468
|
-
fixEncoderSize as fixEncoderSize5,
|
|
469
|
-
getAddressEncoder as getAddressEncoder5,
|
|
470
|
-
getArrayDecoder,
|
|
471
|
-
getArrayEncoder,
|
|
472
|
-
getBytesDecoder as getBytesDecoder5,
|
|
473
|
-
getBytesEncoder as getBytesEncoder5,
|
|
474
|
-
getProgramDerivedAddress,
|
|
475
|
-
getStructDecoder as getStructDecoder5,
|
|
476
|
-
getStructEncoder as getStructEncoder5,
|
|
477
|
-
getU16Decoder as getU16Decoder4,
|
|
478
|
-
getU16Encoder as getU16Encoder4,
|
|
479
|
-
getU64Decoder as getU64Decoder4,
|
|
480
|
-
getU64Encoder as getU64Encoder4,
|
|
481
|
-
transformEncoder as transformEncoder5
|
|
482
|
-
} from "@solana/kit";
|
|
581
|
+
var import_kit6 = require("@solana/kit");
|
|
483
582
|
|
|
484
583
|
// src/shared/index.ts
|
|
485
|
-
|
|
486
|
-
AccountRole,
|
|
487
|
-
isProgramDerivedAddress,
|
|
488
|
-
isTransactionSigner as kitIsTransactionSigner,
|
|
489
|
-
upgradeRoleToSigner
|
|
490
|
-
} from "@solana/kit";
|
|
584
|
+
var import_kit5 = require("@solana/kit");
|
|
491
585
|
function expectSome(value) {
|
|
492
586
|
if (value === null || value === void 0) {
|
|
493
587
|
throw new Error("Expected a value but received null or undefined.");
|
|
@@ -512,19 +606,19 @@ function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
|
|
|
512
606
|
if (optionalAccountStrategy === "omitted") return;
|
|
513
607
|
return Object.freeze({
|
|
514
608
|
address: programAddress,
|
|
515
|
-
role: AccountRole.READONLY
|
|
609
|
+
role: import_kit5.AccountRole.READONLY
|
|
516
610
|
});
|
|
517
611
|
}
|
|
518
|
-
const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
|
|
612
|
+
const writableRole = account.isWritable ? import_kit5.AccountRole.WRITABLE : import_kit5.AccountRole.READONLY;
|
|
519
613
|
return Object.freeze({
|
|
520
614
|
address: expectAddress(account.value),
|
|
521
|
-
role: isTransactionSigner(account.value) ? upgradeRoleToSigner(writableRole) : writableRole,
|
|
615
|
+
role: isTransactionSigner(account.value) ? (0, import_kit5.upgradeRoleToSigner)(writableRole) : writableRole,
|
|
522
616
|
...isTransactionSigner(account.value) ? { signer: account.value } : {}
|
|
523
617
|
});
|
|
524
618
|
};
|
|
525
619
|
}
|
|
526
620
|
function isTransactionSigner(value) {
|
|
527
|
-
return !!value && typeof value === "object" && "address" in value &&
|
|
621
|
+
return !!value && typeof value === "object" && "address" in value && (0, import_kit5.isTransactionSigner)(value);
|
|
528
622
|
}
|
|
529
623
|
|
|
530
624
|
// src/instructions/claimAirdrop.ts
|
|
@@ -539,33 +633,33 @@ var CLAIM_AIRDROP_DISCRIMINATOR = new Uint8Array([
|
|
|
539
633
|
20
|
|
540
634
|
]);
|
|
541
635
|
function getClaimAirdropDiscriminatorBytes() {
|
|
542
|
-
return
|
|
636
|
+
return (0, import_kit6.fixEncoderSize)((0, import_kit6.getBytesEncoder)(), 8).encode(
|
|
543
637
|
CLAIM_AIRDROP_DISCRIMINATOR
|
|
544
638
|
);
|
|
545
639
|
}
|
|
546
640
|
function getClaimAirdropInstructionDataEncoder() {
|
|
547
|
-
return
|
|
548
|
-
|
|
549
|
-
["discriminator",
|
|
550
|
-
["index",
|
|
551
|
-
["proof", getArrayEncoder(
|
|
552
|
-
["amount",
|
|
553
|
-
["claimMapIndex",
|
|
641
|
+
return (0, import_kit6.transformEncoder)(
|
|
642
|
+
(0, import_kit6.getStructEncoder)([
|
|
643
|
+
["discriminator", (0, import_kit6.fixEncoderSize)((0, import_kit6.getBytesEncoder)(), 8)],
|
|
644
|
+
["index", (0, import_kit6.getU64Encoder)()],
|
|
645
|
+
["proof", (0, import_kit6.getArrayEncoder)((0, import_kit6.fixEncoderSize)((0, import_kit6.getBytesEncoder)(), 32))],
|
|
646
|
+
["amount", (0, import_kit6.getU64Encoder)()],
|
|
647
|
+
["claimMapIndex", (0, import_kit6.getU16Encoder)()]
|
|
554
648
|
]),
|
|
555
649
|
(value) => ({ ...value, discriminator: CLAIM_AIRDROP_DISCRIMINATOR })
|
|
556
650
|
);
|
|
557
651
|
}
|
|
558
652
|
function getClaimAirdropInstructionDataDecoder() {
|
|
559
|
-
return
|
|
560
|
-
["discriminator",
|
|
561
|
-
["index",
|
|
562
|
-
["proof", getArrayDecoder(
|
|
563
|
-
["amount",
|
|
564
|
-
["claimMapIndex",
|
|
653
|
+
return (0, import_kit6.getStructDecoder)([
|
|
654
|
+
["discriminator", (0, import_kit6.fixDecoderSize)((0, import_kit6.getBytesDecoder)(), 8)],
|
|
655
|
+
["index", (0, import_kit6.getU64Decoder)()],
|
|
656
|
+
["proof", (0, import_kit6.getArrayDecoder)((0, import_kit6.fixDecoderSize)((0, import_kit6.getBytesDecoder)(), 32))],
|
|
657
|
+
["amount", (0, import_kit6.getU64Decoder)()],
|
|
658
|
+
["claimMapIndex", (0, import_kit6.getU16Decoder)()]
|
|
565
659
|
]);
|
|
566
660
|
}
|
|
567
661
|
function getClaimAirdropInstructionDataCodec() {
|
|
568
|
-
return
|
|
662
|
+
return (0, import_kit6.combineCodec)(
|
|
569
663
|
getClaimAirdropInstructionDataEncoder(),
|
|
570
664
|
getClaimAirdropInstructionDataDecoder()
|
|
571
665
|
);
|
|
@@ -607,12 +701,12 @@ async function getClaimAirdropInstructionAsync(input, config) {
|
|
|
607
701
|
accounts.tokenProgram.value = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
608
702
|
}
|
|
609
703
|
if (!accounts.destinationTokenAccount.value) {
|
|
610
|
-
accounts.destinationTokenAccount.value = await getProgramDerivedAddress({
|
|
704
|
+
accounts.destinationTokenAccount.value = await (0, import_kit6.getProgramDerivedAddress)({
|
|
611
705
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
612
706
|
seeds: [
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
707
|
+
(0, import_kit6.getAddressEncoder)().encode(expectAddress(accounts.claimer.value)),
|
|
708
|
+
(0, import_kit6.getAddressEncoder)().encode(expectAddress(accounts.tokenProgram.value)),
|
|
709
|
+
(0, import_kit6.getAddressEncoder)().encode(expectAddress(accounts.mint.value))
|
|
616
710
|
]
|
|
617
711
|
});
|
|
618
712
|
}
|
|
@@ -623,10 +717,10 @@ async function getClaimAirdropInstructionAsync(input, config) {
|
|
|
623
717
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
624
718
|
}
|
|
625
719
|
if (!accounts.airdropConfig.value) {
|
|
626
|
-
accounts.airdropConfig.value = await getProgramDerivedAddress({
|
|
720
|
+
accounts.airdropConfig.value = await (0, import_kit6.getProgramDerivedAddress)({
|
|
627
721
|
programAddress,
|
|
628
722
|
seeds: [
|
|
629
|
-
|
|
723
|
+
(0, import_kit6.getBytesEncoder)().encode(
|
|
630
724
|
new Uint8Array([
|
|
631
725
|
97,
|
|
632
726
|
105,
|
|
@@ -648,10 +742,10 @@ async function getClaimAirdropInstructionAsync(input, config) {
|
|
|
648
742
|
});
|
|
649
743
|
}
|
|
650
744
|
if (!accounts.airdropMaster.value) {
|
|
651
|
-
accounts.airdropMaster.value = await getProgramDerivedAddress({
|
|
745
|
+
accounts.airdropMaster.value = await (0, import_kit6.getProgramDerivedAddress)({
|
|
652
746
|
programAddress,
|
|
653
747
|
seeds: [
|
|
654
|
-
|
|
748
|
+
(0, import_kit6.getBytesEncoder)().encode(
|
|
655
749
|
new Uint8Array([
|
|
656
750
|
97,
|
|
657
751
|
105,
|
|
@@ -669,7 +763,7 @@ async function getClaimAirdropInstructionAsync(input, config) {
|
|
|
669
763
|
114
|
|
670
764
|
])
|
|
671
765
|
),
|
|
672
|
-
|
|
766
|
+
(0, import_kit6.getAddressEncoder)().encode(expectAddress(accounts.masterCreator.value))
|
|
673
767
|
]
|
|
674
768
|
});
|
|
675
769
|
}
|
|
@@ -799,27 +893,7 @@ function parseClaimAirdropInstruction(instruction) {
|
|
|
799
893
|
}
|
|
800
894
|
|
|
801
895
|
// src/instructions/createAirdrop.ts
|
|
802
|
-
|
|
803
|
-
combineCodec as combineCodec6,
|
|
804
|
-
fixDecoderSize as fixDecoderSize6,
|
|
805
|
-
fixEncoderSize as fixEncoderSize6,
|
|
806
|
-
getAddressDecoder as getAddressDecoder5,
|
|
807
|
-
getAddressEncoder as getAddressEncoder6,
|
|
808
|
-
getBytesDecoder as getBytesDecoder6,
|
|
809
|
-
getBytesEncoder as getBytesEncoder6,
|
|
810
|
-
getI64Decoder as getI64Decoder3,
|
|
811
|
-
getI64Encoder as getI64Encoder3,
|
|
812
|
-
getOptionDecoder,
|
|
813
|
-
getOptionEncoder,
|
|
814
|
-
getProgramDerivedAddress as getProgramDerivedAddress2,
|
|
815
|
-
getStructDecoder as getStructDecoder6,
|
|
816
|
-
getStructEncoder as getStructEncoder6,
|
|
817
|
-
getU64Decoder as getU64Decoder5,
|
|
818
|
-
getU64Encoder as getU64Encoder5,
|
|
819
|
-
getU8Decoder as getU8Decoder5,
|
|
820
|
-
getU8Encoder as getU8Encoder5,
|
|
821
|
-
transformEncoder as transformEncoder6
|
|
822
|
-
} from "@solana/kit";
|
|
896
|
+
var import_kit7 = require("@solana/kit");
|
|
823
897
|
var CREATE_AIRDROP_DISCRIMINATOR = new Uint8Array([
|
|
824
898
|
227,
|
|
825
899
|
135,
|
|
@@ -831,37 +905,37 @@ var CREATE_AIRDROP_DISCRIMINATOR = new Uint8Array([
|
|
|
831
905
|
94
|
|
832
906
|
]);
|
|
833
907
|
function getCreateAirdropDiscriminatorBytes() {
|
|
834
|
-
return
|
|
908
|
+
return (0, import_kit7.fixEncoderSize)((0, import_kit7.getBytesEncoder)(), 8).encode(
|
|
835
909
|
CREATE_AIRDROP_DISCRIMINATOR
|
|
836
910
|
);
|
|
837
911
|
}
|
|
838
912
|
function getCreateAirdropInstructionDataEncoder() {
|
|
839
|
-
return
|
|
840
|
-
|
|
841
|
-
["discriminator",
|
|
842
|
-
["id",
|
|
843
|
-
["merkleRoot", getOptionEncoder(
|
|
844
|
-
["startsAt", getOptionEncoder(
|
|
845
|
-
["endsAt", getOptionEncoder(
|
|
846
|
-
["version", getOptionEncoder(
|
|
847
|
-
["delegateAuthority", getOptionEncoder(
|
|
913
|
+
return (0, import_kit7.transformEncoder)(
|
|
914
|
+
(0, import_kit7.getStructEncoder)([
|
|
915
|
+
["discriminator", (0, import_kit7.fixEncoderSize)((0, import_kit7.getBytesEncoder)(), 8)],
|
|
916
|
+
["id", (0, import_kit7.getU64Encoder)()],
|
|
917
|
+
["merkleRoot", (0, import_kit7.getOptionEncoder)((0, import_kit7.fixEncoderSize)((0, import_kit7.getBytesEncoder)(), 32))],
|
|
918
|
+
["startsAt", (0, import_kit7.getOptionEncoder)((0, import_kit7.getI64Encoder)())],
|
|
919
|
+
["endsAt", (0, import_kit7.getOptionEncoder)((0, import_kit7.getI64Encoder)())],
|
|
920
|
+
["version", (0, import_kit7.getOptionEncoder)((0, import_kit7.getU8Encoder)())],
|
|
921
|
+
["delegateAuthority", (0, import_kit7.getOptionEncoder)((0, import_kit7.getAddressEncoder)())]
|
|
848
922
|
]),
|
|
849
923
|
(value) => ({ ...value, discriminator: CREATE_AIRDROP_DISCRIMINATOR })
|
|
850
924
|
);
|
|
851
925
|
}
|
|
852
926
|
function getCreateAirdropInstructionDataDecoder() {
|
|
853
|
-
return
|
|
854
|
-
["discriminator",
|
|
855
|
-
["id",
|
|
856
|
-
["merkleRoot", getOptionDecoder(
|
|
857
|
-
["startsAt", getOptionDecoder(
|
|
858
|
-
["endsAt", getOptionDecoder(
|
|
859
|
-
["version", getOptionDecoder(
|
|
860
|
-
["delegateAuthority", getOptionDecoder(
|
|
927
|
+
return (0, import_kit7.getStructDecoder)([
|
|
928
|
+
["discriminator", (0, import_kit7.fixDecoderSize)((0, import_kit7.getBytesDecoder)(), 8)],
|
|
929
|
+
["id", (0, import_kit7.getU64Decoder)()],
|
|
930
|
+
["merkleRoot", (0, import_kit7.getOptionDecoder)((0, import_kit7.fixDecoderSize)((0, import_kit7.getBytesDecoder)(), 32))],
|
|
931
|
+
["startsAt", (0, import_kit7.getOptionDecoder)((0, import_kit7.getI64Decoder)())],
|
|
932
|
+
["endsAt", (0, import_kit7.getOptionDecoder)((0, import_kit7.getI64Decoder)())],
|
|
933
|
+
["version", (0, import_kit7.getOptionDecoder)((0, import_kit7.getU8Decoder)())],
|
|
934
|
+
["delegateAuthority", (0, import_kit7.getOptionDecoder)((0, import_kit7.getAddressDecoder)())]
|
|
861
935
|
]);
|
|
862
936
|
}
|
|
863
937
|
function getCreateAirdropInstructionDataCodec() {
|
|
864
|
-
return
|
|
938
|
+
return (0, import_kit7.combineCodec)(
|
|
865
939
|
getCreateAirdropInstructionDataEncoder(),
|
|
866
940
|
getCreateAirdropInstructionDataDecoder()
|
|
867
941
|
);
|
|
@@ -885,10 +959,10 @@ async function getCreateAirdropInstructionAsync(input, config) {
|
|
|
885
959
|
const accounts = originalAccounts;
|
|
886
960
|
const args = { ...input };
|
|
887
961
|
if (!accounts.airdropConfig.value) {
|
|
888
|
-
accounts.airdropConfig.value = await
|
|
962
|
+
accounts.airdropConfig.value = await (0, import_kit7.getProgramDerivedAddress)({
|
|
889
963
|
programAddress,
|
|
890
964
|
seeds: [
|
|
891
|
-
|
|
965
|
+
(0, import_kit7.getBytesEncoder)().encode(
|
|
892
966
|
new Uint8Array([
|
|
893
967
|
97,
|
|
894
968
|
105,
|
|
@@ -910,10 +984,10 @@ async function getCreateAirdropInstructionAsync(input, config) {
|
|
|
910
984
|
});
|
|
911
985
|
}
|
|
912
986
|
if (!accounts.airdropMaster.value) {
|
|
913
|
-
accounts.airdropMaster.value = await
|
|
987
|
+
accounts.airdropMaster.value = await (0, import_kit7.getProgramDerivedAddress)({
|
|
914
988
|
programAddress,
|
|
915
989
|
seeds: [
|
|
916
|
-
|
|
990
|
+
(0, import_kit7.getBytesEncoder)().encode(
|
|
917
991
|
new Uint8Array([
|
|
918
992
|
97,
|
|
919
993
|
105,
|
|
@@ -931,7 +1005,7 @@ async function getCreateAirdropInstructionAsync(input, config) {
|
|
|
931
1005
|
114
|
|
932
1006
|
])
|
|
933
1007
|
),
|
|
934
|
-
|
|
1008
|
+
(0, import_kit7.getAddressEncoder)().encode(expectAddress(accounts.masterCreator.value))
|
|
935
1009
|
]
|
|
936
1010
|
});
|
|
937
1011
|
}
|
|
@@ -1025,22 +1099,7 @@ function parseCreateAirdropInstruction(instruction) {
|
|
|
1025
1099
|
}
|
|
1026
1100
|
|
|
1027
1101
|
// src/instructions/createBitmap.ts
|
|
1028
|
-
|
|
1029
|
-
combineCodec as combineCodec7,
|
|
1030
|
-
fixDecoderSize as fixDecoderSize7,
|
|
1031
|
-
fixEncoderSize as fixEncoderSize7,
|
|
1032
|
-
getAddressEncoder as getAddressEncoder7,
|
|
1033
|
-
getBytesDecoder as getBytesDecoder7,
|
|
1034
|
-
getBytesEncoder as getBytesEncoder7,
|
|
1035
|
-
getProgramDerivedAddress as getProgramDerivedAddress3,
|
|
1036
|
-
getStructDecoder as getStructDecoder7,
|
|
1037
|
-
getStructEncoder as getStructEncoder7,
|
|
1038
|
-
getU16Decoder as getU16Decoder5,
|
|
1039
|
-
getU16Encoder as getU16Encoder5,
|
|
1040
|
-
getU32Decoder as getU32Decoder2,
|
|
1041
|
-
getU32Encoder as getU32Encoder2,
|
|
1042
|
-
transformEncoder as transformEncoder7
|
|
1043
|
-
} from "@solana/kit";
|
|
1102
|
+
var import_kit8 = require("@solana/kit");
|
|
1044
1103
|
var CREATE_BITMAP_DISCRIMINATOR = new Uint8Array([
|
|
1045
1104
|
69,
|
|
1046
1105
|
92,
|
|
@@ -1052,29 +1111,31 @@ var CREATE_BITMAP_DISCRIMINATOR = new Uint8Array([
|
|
|
1052
1111
|
247
|
|
1053
1112
|
]);
|
|
1054
1113
|
function getCreateBitmapDiscriminatorBytes() {
|
|
1055
|
-
return
|
|
1114
|
+
return (0, import_kit8.fixEncoderSize)((0, import_kit8.getBytesEncoder)(), 8).encode(
|
|
1056
1115
|
CREATE_BITMAP_DISCRIMINATOR
|
|
1057
1116
|
);
|
|
1058
1117
|
}
|
|
1059
1118
|
function getCreateBitmapInstructionDataEncoder() {
|
|
1060
|
-
return
|
|
1061
|
-
|
|
1062
|
-
["discriminator",
|
|
1063
|
-
["id",
|
|
1064
|
-
["total",
|
|
1119
|
+
return (0, import_kit8.transformEncoder)(
|
|
1120
|
+
(0, import_kit8.getStructEncoder)([
|
|
1121
|
+
["discriminator", (0, import_kit8.fixEncoderSize)((0, import_kit8.getBytesEncoder)(), 8)],
|
|
1122
|
+
["id", (0, import_kit8.getU16Encoder)()],
|
|
1123
|
+
["total", (0, import_kit8.getU32Encoder)()],
|
|
1124
|
+
["airdropId", (0, import_kit8.getU64Encoder)()]
|
|
1065
1125
|
]),
|
|
1066
1126
|
(value) => ({ ...value, discriminator: CREATE_BITMAP_DISCRIMINATOR })
|
|
1067
1127
|
);
|
|
1068
1128
|
}
|
|
1069
1129
|
function getCreateBitmapInstructionDataDecoder() {
|
|
1070
|
-
return
|
|
1071
|
-
["discriminator",
|
|
1072
|
-
["id",
|
|
1073
|
-
["total",
|
|
1130
|
+
return (0, import_kit8.getStructDecoder)([
|
|
1131
|
+
["discriminator", (0, import_kit8.fixDecoderSize)((0, import_kit8.getBytesDecoder)(), 8)],
|
|
1132
|
+
["id", (0, import_kit8.getU16Decoder)()],
|
|
1133
|
+
["total", (0, import_kit8.getU32Decoder)()],
|
|
1134
|
+
["airdropId", (0, import_kit8.getU64Decoder)()]
|
|
1074
1135
|
]);
|
|
1075
1136
|
}
|
|
1076
1137
|
function getCreateBitmapInstructionDataCodec() {
|
|
1077
|
-
return
|
|
1138
|
+
return (0, import_kit8.combineCodec)(
|
|
1078
1139
|
getCreateBitmapInstructionDataEncoder(),
|
|
1079
1140
|
getCreateBitmapInstructionDataDecoder()
|
|
1080
1141
|
);
|
|
@@ -1099,10 +1160,10 @@ async function getCreateBitmapInstructionAsync(input, config) {
|
|
|
1099
1160
|
const accounts = originalAccounts;
|
|
1100
1161
|
const args = { ...input };
|
|
1101
1162
|
if (!accounts.airdropConfig.value) {
|
|
1102
|
-
accounts.airdropConfig.value = await
|
|
1163
|
+
accounts.airdropConfig.value = await (0, import_kit8.getProgramDerivedAddress)({
|
|
1103
1164
|
programAddress,
|
|
1104
1165
|
seeds: [
|
|
1105
|
-
|
|
1166
|
+
(0, import_kit8.getBytesEncoder)().encode(
|
|
1106
1167
|
new Uint8Array([
|
|
1107
1168
|
97,
|
|
1108
1169
|
105,
|
|
@@ -1124,10 +1185,10 @@ async function getCreateBitmapInstructionAsync(input, config) {
|
|
|
1124
1185
|
});
|
|
1125
1186
|
}
|
|
1126
1187
|
if (!accounts.airdropMaster.value) {
|
|
1127
|
-
accounts.airdropMaster.value = await
|
|
1188
|
+
accounts.airdropMaster.value = await (0, import_kit8.getProgramDerivedAddress)({
|
|
1128
1189
|
programAddress,
|
|
1129
1190
|
seeds: [
|
|
1130
|
-
|
|
1191
|
+
(0, import_kit8.getBytesEncoder)().encode(
|
|
1131
1192
|
new Uint8Array([
|
|
1132
1193
|
97,
|
|
1133
1194
|
105,
|
|
@@ -1145,29 +1206,30 @@ async function getCreateBitmapInstructionAsync(input, config) {
|
|
|
1145
1206
|
114
|
|
1146
1207
|
])
|
|
1147
1208
|
),
|
|
1148
|
-
|
|
1209
|
+
(0, import_kit8.getAddressEncoder)().encode(expectAddress(accounts.masterCreator.value))
|
|
1149
1210
|
]
|
|
1150
1211
|
});
|
|
1151
1212
|
}
|
|
1152
1213
|
if (!accounts.airdrop.value) {
|
|
1153
|
-
accounts.airdrop.value = await
|
|
1214
|
+
accounts.airdrop.value = await (0, import_kit8.getProgramDerivedAddress)({
|
|
1154
1215
|
programAddress,
|
|
1155
1216
|
seeds: [
|
|
1156
|
-
|
|
1217
|
+
(0, import_kit8.getBytesEncoder)().encode(
|
|
1157
1218
|
new Uint8Array([97, 105, 114, 100, 114, 111, 112])
|
|
1158
1219
|
),
|
|
1159
|
-
|
|
1160
|
-
|
|
1220
|
+
(0, import_kit8.getAddressEncoder)().encode(expectAddress(accounts.authority.value)),
|
|
1221
|
+
(0, import_kit8.getAddressEncoder)().encode(expectAddress(accounts.mint.value)),
|
|
1222
|
+
(0, import_kit8.getU64Encoder)().encode(expectSome(args.airdropId))
|
|
1161
1223
|
]
|
|
1162
1224
|
});
|
|
1163
1225
|
}
|
|
1164
1226
|
if (!accounts.bitmap.value) {
|
|
1165
|
-
accounts.bitmap.value = await
|
|
1227
|
+
accounts.bitmap.value = await (0, import_kit8.getProgramDerivedAddress)({
|
|
1166
1228
|
programAddress,
|
|
1167
1229
|
seeds: [
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1230
|
+
(0, import_kit8.getBytesEncoder)().encode(new Uint8Array([98, 105, 116, 109, 97, 112])),
|
|
1231
|
+
(0, import_kit8.getAddressEncoder)().encode(expectAddress(accounts.airdrop.value)),
|
|
1232
|
+
(0, import_kit8.getU16Encoder)().encode(expectSome(args.id))
|
|
1171
1233
|
]
|
|
1172
1234
|
});
|
|
1173
1235
|
}
|
|
@@ -1265,20 +1327,7 @@ function parseCreateBitmapInstruction(instruction) {
|
|
|
1265
1327
|
}
|
|
1266
1328
|
|
|
1267
1329
|
// src/instructions/depositTokens.ts
|
|
1268
|
-
|
|
1269
|
-
combineCodec as combineCodec8,
|
|
1270
|
-
fixDecoderSize as fixDecoderSize8,
|
|
1271
|
-
fixEncoderSize as fixEncoderSize8,
|
|
1272
|
-
getAddressEncoder as getAddressEncoder8,
|
|
1273
|
-
getBytesDecoder as getBytesDecoder8,
|
|
1274
|
-
getBytesEncoder as getBytesEncoder8,
|
|
1275
|
-
getProgramDerivedAddress as getProgramDerivedAddress4,
|
|
1276
|
-
getStructDecoder as getStructDecoder8,
|
|
1277
|
-
getStructEncoder as getStructEncoder8,
|
|
1278
|
-
getU64Decoder as getU64Decoder6,
|
|
1279
|
-
getU64Encoder as getU64Encoder6,
|
|
1280
|
-
transformEncoder as transformEncoder8
|
|
1281
|
-
} from "@solana/kit";
|
|
1330
|
+
var import_kit9 = require("@solana/kit");
|
|
1282
1331
|
var DEPOSIT_TOKENS_DISCRIMINATOR = new Uint8Array([
|
|
1283
1332
|
176,
|
|
1284
1333
|
83,
|
|
@@ -1290,27 +1339,29 @@ var DEPOSIT_TOKENS_DISCRIMINATOR = new Uint8Array([
|
|
|
1290
1339
|
150
|
|
1291
1340
|
]);
|
|
1292
1341
|
function getDepositTokensDiscriminatorBytes() {
|
|
1293
|
-
return
|
|
1342
|
+
return (0, import_kit9.fixEncoderSize)((0, import_kit9.getBytesEncoder)(), 8).encode(
|
|
1294
1343
|
DEPOSIT_TOKENS_DISCRIMINATOR
|
|
1295
1344
|
);
|
|
1296
1345
|
}
|
|
1297
1346
|
function getDepositTokensInstructionDataEncoder() {
|
|
1298
|
-
return
|
|
1299
|
-
|
|
1300
|
-
["discriminator",
|
|
1301
|
-
["amount",
|
|
1347
|
+
return (0, import_kit9.transformEncoder)(
|
|
1348
|
+
(0, import_kit9.getStructEncoder)([
|
|
1349
|
+
["discriminator", (0, import_kit9.fixEncoderSize)((0, import_kit9.getBytesEncoder)(), 8)],
|
|
1350
|
+
["amount", (0, import_kit9.getU64Encoder)()],
|
|
1351
|
+
["airdropId", (0, import_kit9.getU64Encoder)()]
|
|
1302
1352
|
]),
|
|
1303
1353
|
(value) => ({ ...value, discriminator: DEPOSIT_TOKENS_DISCRIMINATOR })
|
|
1304
1354
|
);
|
|
1305
1355
|
}
|
|
1306
1356
|
function getDepositTokensInstructionDataDecoder() {
|
|
1307
|
-
return
|
|
1308
|
-
["discriminator",
|
|
1309
|
-
["amount",
|
|
1357
|
+
return (0, import_kit9.getStructDecoder)([
|
|
1358
|
+
["discriminator", (0, import_kit9.fixDecoderSize)((0, import_kit9.getBytesDecoder)(), 8)],
|
|
1359
|
+
["amount", (0, import_kit9.getU64Decoder)()],
|
|
1360
|
+
["airdropId", (0, import_kit9.getU64Decoder)()]
|
|
1310
1361
|
]);
|
|
1311
1362
|
}
|
|
1312
1363
|
function getDepositTokensInstructionDataCodec() {
|
|
1313
|
-
return
|
|
1364
|
+
return (0, import_kit9.combineCodec)(
|
|
1314
1365
|
getDepositTokensInstructionDataEncoder(),
|
|
1315
1366
|
getDepositTokensInstructionDataDecoder()
|
|
1316
1367
|
);
|
|
@@ -1336,14 +1387,15 @@ async function getDepositTokensInstructionAsync(input, config) {
|
|
|
1336
1387
|
const accounts = originalAccounts;
|
|
1337
1388
|
const args = { ...input };
|
|
1338
1389
|
if (!accounts.airdrop.value) {
|
|
1339
|
-
accounts.airdrop.value = await
|
|
1390
|
+
accounts.airdrop.value = await (0, import_kit9.getProgramDerivedAddress)({
|
|
1340
1391
|
programAddress,
|
|
1341
1392
|
seeds: [
|
|
1342
|
-
|
|
1393
|
+
(0, import_kit9.getBytesEncoder)().encode(
|
|
1343
1394
|
new Uint8Array([97, 105, 114, 100, 114, 111, 112])
|
|
1344
1395
|
),
|
|
1345
|
-
|
|
1346
|
-
|
|
1396
|
+
(0, import_kit9.getAddressEncoder)().encode(expectAddress(accounts.authority.value)),
|
|
1397
|
+
(0, import_kit9.getAddressEncoder)().encode(expectAddress(accounts.mint.value)),
|
|
1398
|
+
(0, import_kit9.getU64Encoder)().encode(expectSome(args.airdropId))
|
|
1347
1399
|
]
|
|
1348
1400
|
});
|
|
1349
1401
|
}
|
|
@@ -1351,12 +1403,12 @@ async function getDepositTokensInstructionAsync(input, config) {
|
|
|
1351
1403
|
accounts.tokenProgram.value = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
1352
1404
|
}
|
|
1353
1405
|
if (!accounts.vault.value) {
|
|
1354
|
-
accounts.vault.value = await
|
|
1406
|
+
accounts.vault.value = await (0, import_kit9.getProgramDerivedAddress)({
|
|
1355
1407
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
1356
1408
|
seeds: [
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1409
|
+
(0, import_kit9.getAddressEncoder)().encode(expectAddress(accounts.airdrop.value)),
|
|
1410
|
+
(0, import_kit9.getAddressEncoder)().encode(expectAddress(accounts.tokenProgram.value)),
|
|
1411
|
+
(0, import_kit9.getAddressEncoder)().encode(expectAddress(accounts.mint.value))
|
|
1360
1412
|
]
|
|
1361
1413
|
});
|
|
1362
1414
|
}
|
|
@@ -1458,25 +1510,7 @@ function parseDepositTokensInstruction(instruction) {
|
|
|
1458
1510
|
}
|
|
1459
1511
|
|
|
1460
1512
|
// src/instructions/initializeAirdropConfig.ts
|
|
1461
|
-
|
|
1462
|
-
combineCodec as combineCodec9,
|
|
1463
|
-
fixDecoderSize as fixDecoderSize9,
|
|
1464
|
-
fixEncoderSize as fixEncoderSize9,
|
|
1465
|
-
getBytesDecoder as getBytesDecoder9,
|
|
1466
|
-
getBytesEncoder as getBytesEncoder9,
|
|
1467
|
-
getI64Decoder as getI64Decoder4,
|
|
1468
|
-
getI64Encoder as getI64Encoder4,
|
|
1469
|
-
getOptionDecoder as getOptionDecoder2,
|
|
1470
|
-
getOptionEncoder as getOptionEncoder2,
|
|
1471
|
-
getProgramDerivedAddress as getProgramDerivedAddress5,
|
|
1472
|
-
getStructDecoder as getStructDecoder9,
|
|
1473
|
-
getStructEncoder as getStructEncoder9,
|
|
1474
|
-
getU16Decoder as getU16Decoder6,
|
|
1475
|
-
getU16Encoder as getU16Encoder6,
|
|
1476
|
-
getU64Decoder as getU64Decoder7,
|
|
1477
|
-
getU64Encoder as getU64Encoder7,
|
|
1478
|
-
transformEncoder as transformEncoder9
|
|
1479
|
-
} from "@solana/kit";
|
|
1513
|
+
var import_kit10 = require("@solana/kit");
|
|
1480
1514
|
var INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
1481
1515
|
160,
|
|
1482
1516
|
68,
|
|
@@ -1488,24 +1522,24 @@ var INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
|
1488
1522
|
94
|
|
1489
1523
|
]);
|
|
1490
1524
|
function getInitializeAirdropConfigDiscriminatorBytes() {
|
|
1491
|
-
return
|
|
1525
|
+
return (0, import_kit10.fixEncoderSize)((0, import_kit10.getBytesEncoder)(), 8).encode(
|
|
1492
1526
|
INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR
|
|
1493
1527
|
);
|
|
1494
1528
|
}
|
|
1495
1529
|
function getInitializeAirdropConfigInstructionDataEncoder() {
|
|
1496
|
-
return
|
|
1497
|
-
|
|
1498
|
-
["discriminator",
|
|
1499
|
-
["wlRoot",
|
|
1500
|
-
["airdropMasterCreateFee",
|
|
1501
|
-
["maxClaimFee",
|
|
1502
|
-
["maxActionFee",
|
|
1503
|
-
["minAirdropDuration",
|
|
1504
|
-
["defaultAirdropDuration",
|
|
1505
|
-
["maxAirdropDuration",
|
|
1506
|
-
["updateGracePeriod",
|
|
1507
|
-
["protocolFee",
|
|
1508
|
-
["masterFeeBps",
|
|
1530
|
+
return (0, import_kit10.transformEncoder)(
|
|
1531
|
+
(0, import_kit10.getStructEncoder)([
|
|
1532
|
+
["discriminator", (0, import_kit10.fixEncoderSize)((0, import_kit10.getBytesEncoder)(), 8)],
|
|
1533
|
+
["wlRoot", (0, import_kit10.getOptionEncoder)((0, import_kit10.fixEncoderSize)((0, import_kit10.getBytesEncoder)(), 32))],
|
|
1534
|
+
["airdropMasterCreateFee", (0, import_kit10.getOptionEncoder)((0, import_kit10.getU64Encoder)())],
|
|
1535
|
+
["maxClaimFee", (0, import_kit10.getOptionEncoder)((0, import_kit10.getU64Encoder)())],
|
|
1536
|
+
["maxActionFee", (0, import_kit10.getOptionEncoder)((0, import_kit10.getU64Encoder)())],
|
|
1537
|
+
["minAirdropDuration", (0, import_kit10.getOptionEncoder)((0, import_kit10.getI64Encoder)())],
|
|
1538
|
+
["defaultAirdropDuration", (0, import_kit10.getOptionEncoder)((0, import_kit10.getI64Encoder)())],
|
|
1539
|
+
["maxAirdropDuration", (0, import_kit10.getOptionEncoder)((0, import_kit10.getI64Encoder)())],
|
|
1540
|
+
["updateGracePeriod", (0, import_kit10.getOptionEncoder)((0, import_kit10.getI64Encoder)())],
|
|
1541
|
+
["protocolFee", (0, import_kit10.getOptionEncoder)((0, import_kit10.getU64Encoder)())],
|
|
1542
|
+
["masterFeeBps", (0, import_kit10.getOptionEncoder)((0, import_kit10.getU16Encoder)())]
|
|
1509
1543
|
]),
|
|
1510
1544
|
(value) => ({
|
|
1511
1545
|
...value,
|
|
@@ -1514,22 +1548,22 @@ function getInitializeAirdropConfigInstructionDataEncoder() {
|
|
|
1514
1548
|
);
|
|
1515
1549
|
}
|
|
1516
1550
|
function getInitializeAirdropConfigInstructionDataDecoder() {
|
|
1517
|
-
return
|
|
1518
|
-
["discriminator",
|
|
1519
|
-
["wlRoot",
|
|
1520
|
-
["airdropMasterCreateFee",
|
|
1521
|
-
["maxClaimFee",
|
|
1522
|
-
["maxActionFee",
|
|
1523
|
-
["minAirdropDuration",
|
|
1524
|
-
["defaultAirdropDuration",
|
|
1525
|
-
["maxAirdropDuration",
|
|
1526
|
-
["updateGracePeriod",
|
|
1527
|
-
["protocolFee",
|
|
1528
|
-
["masterFeeBps",
|
|
1551
|
+
return (0, import_kit10.getStructDecoder)([
|
|
1552
|
+
["discriminator", (0, import_kit10.fixDecoderSize)((0, import_kit10.getBytesDecoder)(), 8)],
|
|
1553
|
+
["wlRoot", (0, import_kit10.getOptionDecoder)((0, import_kit10.fixDecoderSize)((0, import_kit10.getBytesDecoder)(), 32))],
|
|
1554
|
+
["airdropMasterCreateFee", (0, import_kit10.getOptionDecoder)((0, import_kit10.getU64Decoder)())],
|
|
1555
|
+
["maxClaimFee", (0, import_kit10.getOptionDecoder)((0, import_kit10.getU64Decoder)())],
|
|
1556
|
+
["maxActionFee", (0, import_kit10.getOptionDecoder)((0, import_kit10.getU64Decoder)())],
|
|
1557
|
+
["minAirdropDuration", (0, import_kit10.getOptionDecoder)((0, import_kit10.getI64Decoder)())],
|
|
1558
|
+
["defaultAirdropDuration", (0, import_kit10.getOptionDecoder)((0, import_kit10.getI64Decoder)())],
|
|
1559
|
+
["maxAirdropDuration", (0, import_kit10.getOptionDecoder)((0, import_kit10.getI64Decoder)())],
|
|
1560
|
+
["updateGracePeriod", (0, import_kit10.getOptionDecoder)((0, import_kit10.getI64Decoder)())],
|
|
1561
|
+
["protocolFee", (0, import_kit10.getOptionDecoder)((0, import_kit10.getU64Decoder)())],
|
|
1562
|
+
["masterFeeBps", (0, import_kit10.getOptionDecoder)((0, import_kit10.getU16Decoder)())]
|
|
1529
1563
|
]);
|
|
1530
1564
|
}
|
|
1531
1565
|
function getInitializeAirdropConfigInstructionDataCodec() {
|
|
1532
|
-
return
|
|
1566
|
+
return (0, import_kit10.combineCodec)(
|
|
1533
1567
|
getInitializeAirdropConfigInstructionDataEncoder(),
|
|
1534
1568
|
getInitializeAirdropConfigInstructionDataDecoder()
|
|
1535
1569
|
);
|
|
@@ -1548,10 +1582,10 @@ async function getInitializeAirdropConfigInstructionAsync(input, config) {
|
|
|
1548
1582
|
const accounts = originalAccounts;
|
|
1549
1583
|
const args = { ...input };
|
|
1550
1584
|
if (!accounts.config.value) {
|
|
1551
|
-
accounts.config.value = await
|
|
1585
|
+
accounts.config.value = await (0, import_kit10.getProgramDerivedAddress)({
|
|
1552
1586
|
programAddress,
|
|
1553
1587
|
seeds: [
|
|
1554
|
-
|
|
1588
|
+
(0, import_kit10.getBytesEncoder)().encode(
|
|
1555
1589
|
new Uint8Array([
|
|
1556
1590
|
97,
|
|
1557
1591
|
105,
|
|
@@ -1573,7 +1607,7 @@ async function getInitializeAirdropConfigInstructionAsync(input, config) {
|
|
|
1573
1607
|
});
|
|
1574
1608
|
}
|
|
1575
1609
|
if (!accounts.authority.value) {
|
|
1576
|
-
accounts.authority.value = "
|
|
1610
|
+
accounts.authority.value = "5gB7WLoBWELAvRDYPUvGj7e7BHEv65j6YDhissdMTQ4F";
|
|
1577
1611
|
}
|
|
1578
1612
|
if (!accounts.systemProgram.value) {
|
|
1579
1613
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
@@ -1606,7 +1640,7 @@ function getInitializeAirdropConfigInstruction(input, config) {
|
|
|
1606
1640
|
const accounts = originalAccounts;
|
|
1607
1641
|
const args = { ...input };
|
|
1608
1642
|
if (!accounts.authority.value) {
|
|
1609
|
-
accounts.authority.value = "
|
|
1643
|
+
accounts.authority.value = "5gB7WLoBWELAvRDYPUvGj7e7BHEv65j6YDhissdMTQ4F";
|
|
1610
1644
|
}
|
|
1611
1645
|
if (!accounts.systemProgram.value) {
|
|
1612
1646
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
@@ -1650,24 +1684,7 @@ function parseInitializeAirdropConfigInstruction(instruction) {
|
|
|
1650
1684
|
}
|
|
1651
1685
|
|
|
1652
1686
|
// src/instructions/initializeAirdropMaster.ts
|
|
1653
|
-
|
|
1654
|
-
combineCodec as combineCodec10,
|
|
1655
|
-
fixDecoderSize as fixDecoderSize10,
|
|
1656
|
-
fixEncoderSize as fixEncoderSize10,
|
|
1657
|
-
getAddressEncoder as getAddressEncoder9,
|
|
1658
|
-
getArrayDecoder as getArrayDecoder2,
|
|
1659
|
-
getArrayEncoder as getArrayEncoder2,
|
|
1660
|
-
getBytesDecoder as getBytesDecoder10,
|
|
1661
|
-
getBytesEncoder as getBytesEncoder10,
|
|
1662
|
-
getOptionDecoder as getOptionDecoder3,
|
|
1663
|
-
getOptionEncoder as getOptionEncoder3,
|
|
1664
|
-
getProgramDerivedAddress as getProgramDerivedAddress6,
|
|
1665
|
-
getStructDecoder as getStructDecoder10,
|
|
1666
|
-
getStructEncoder as getStructEncoder10,
|
|
1667
|
-
getU64Decoder as getU64Decoder8,
|
|
1668
|
-
getU64Encoder as getU64Encoder8,
|
|
1669
|
-
transformEncoder as transformEncoder10
|
|
1670
|
-
} from "@solana/kit";
|
|
1687
|
+
var import_kit11 = require("@solana/kit");
|
|
1671
1688
|
var INITIALIZE_AIRDROP_MASTER_DISCRIMINATOR = new Uint8Array([
|
|
1672
1689
|
163,
|
|
1673
1690
|
197,
|
|
@@ -1679,23 +1696,23 @@ var INITIALIZE_AIRDROP_MASTER_DISCRIMINATOR = new Uint8Array([
|
|
|
1679
1696
|
65
|
|
1680
1697
|
]);
|
|
1681
1698
|
function getInitializeAirdropMasterDiscriminatorBytes() {
|
|
1682
|
-
return
|
|
1699
|
+
return (0, import_kit11.fixEncoderSize)((0, import_kit11.getBytesEncoder)(), 8).encode(
|
|
1683
1700
|
INITIALIZE_AIRDROP_MASTER_DISCRIMINATOR
|
|
1684
1701
|
);
|
|
1685
1702
|
}
|
|
1686
1703
|
function getInitializeAirdropMasterInstructionDataEncoder() {
|
|
1687
|
-
return
|
|
1688
|
-
|
|
1689
|
-
["discriminator",
|
|
1690
|
-
["airdropUpdateFee",
|
|
1691
|
-
["airdropCreationFee",
|
|
1692
|
-
["airdropClaimFee",
|
|
1693
|
-
["airdropDelegateFee",
|
|
1694
|
-
["bitmapCreationFee",
|
|
1704
|
+
return (0, import_kit11.transformEncoder)(
|
|
1705
|
+
(0, import_kit11.getStructEncoder)([
|
|
1706
|
+
["discriminator", (0, import_kit11.fixEncoderSize)((0, import_kit11.getBytesEncoder)(), 8)],
|
|
1707
|
+
["airdropUpdateFee", (0, import_kit11.getOptionEncoder)((0, import_kit11.getU64Encoder)())],
|
|
1708
|
+
["airdropCreationFee", (0, import_kit11.getOptionEncoder)((0, import_kit11.getU64Encoder)())],
|
|
1709
|
+
["airdropClaimFee", (0, import_kit11.getOptionEncoder)((0, import_kit11.getU64Encoder)())],
|
|
1710
|
+
["airdropDelegateFee", (0, import_kit11.getOptionEncoder)((0, import_kit11.getU64Encoder)())],
|
|
1711
|
+
["bitmapCreationFee", (0, import_kit11.getOptionEncoder)((0, import_kit11.getU64Encoder)())],
|
|
1695
1712
|
[
|
|
1696
1713
|
"discountProof",
|
|
1697
|
-
|
|
1698
|
-
|
|
1714
|
+
(0, import_kit11.getOptionEncoder)(
|
|
1715
|
+
(0, import_kit11.getArrayEncoder)((0, import_kit11.fixEncoderSize)((0, import_kit11.getBytesEncoder)(), 32))
|
|
1699
1716
|
)
|
|
1700
1717
|
]
|
|
1701
1718
|
]),
|
|
@@ -1706,21 +1723,21 @@ function getInitializeAirdropMasterInstructionDataEncoder() {
|
|
|
1706
1723
|
);
|
|
1707
1724
|
}
|
|
1708
1725
|
function getInitializeAirdropMasterInstructionDataDecoder() {
|
|
1709
|
-
return
|
|
1710
|
-
["discriminator",
|
|
1711
|
-
["airdropUpdateFee",
|
|
1712
|
-
["airdropCreationFee",
|
|
1713
|
-
["airdropClaimFee",
|
|
1714
|
-
["airdropDelegateFee",
|
|
1715
|
-
["bitmapCreationFee",
|
|
1726
|
+
return (0, import_kit11.getStructDecoder)([
|
|
1727
|
+
["discriminator", (0, import_kit11.fixDecoderSize)((0, import_kit11.getBytesDecoder)(), 8)],
|
|
1728
|
+
["airdropUpdateFee", (0, import_kit11.getOptionDecoder)((0, import_kit11.getU64Decoder)())],
|
|
1729
|
+
["airdropCreationFee", (0, import_kit11.getOptionDecoder)((0, import_kit11.getU64Decoder)())],
|
|
1730
|
+
["airdropClaimFee", (0, import_kit11.getOptionDecoder)((0, import_kit11.getU64Decoder)())],
|
|
1731
|
+
["airdropDelegateFee", (0, import_kit11.getOptionDecoder)((0, import_kit11.getU64Decoder)())],
|
|
1732
|
+
["bitmapCreationFee", (0, import_kit11.getOptionDecoder)((0, import_kit11.getU64Decoder)())],
|
|
1716
1733
|
[
|
|
1717
1734
|
"discountProof",
|
|
1718
|
-
|
|
1735
|
+
(0, import_kit11.getOptionDecoder)((0, import_kit11.getArrayDecoder)((0, import_kit11.fixDecoderSize)((0, import_kit11.getBytesDecoder)(), 32)))
|
|
1719
1736
|
]
|
|
1720
1737
|
]);
|
|
1721
1738
|
}
|
|
1722
1739
|
function getInitializeAirdropMasterInstructionDataCodec() {
|
|
1723
|
-
return
|
|
1740
|
+
return (0, import_kit11.combineCodec)(
|
|
1724
1741
|
getInitializeAirdropMasterInstructionDataEncoder(),
|
|
1725
1742
|
getInitializeAirdropMasterInstructionDataDecoder()
|
|
1726
1743
|
);
|
|
@@ -1742,10 +1759,10 @@ async function getInitializeAirdropMasterInstructionAsync(input, config) {
|
|
|
1742
1759
|
const accounts = originalAccounts;
|
|
1743
1760
|
const args = { ...input };
|
|
1744
1761
|
if (!accounts.config.value) {
|
|
1745
|
-
accounts.config.value = await
|
|
1762
|
+
accounts.config.value = await (0, import_kit11.getProgramDerivedAddress)({
|
|
1746
1763
|
programAddress,
|
|
1747
1764
|
seeds: [
|
|
1748
|
-
|
|
1765
|
+
(0, import_kit11.getBytesEncoder)().encode(
|
|
1749
1766
|
new Uint8Array([
|
|
1750
1767
|
97,
|
|
1751
1768
|
105,
|
|
@@ -1767,10 +1784,10 @@ async function getInitializeAirdropMasterInstructionAsync(input, config) {
|
|
|
1767
1784
|
});
|
|
1768
1785
|
}
|
|
1769
1786
|
if (!accounts.airdropMaster.value) {
|
|
1770
|
-
accounts.airdropMaster.value = await
|
|
1787
|
+
accounts.airdropMaster.value = await (0, import_kit11.getProgramDerivedAddress)({
|
|
1771
1788
|
programAddress,
|
|
1772
1789
|
seeds: [
|
|
1773
|
-
|
|
1790
|
+
(0, import_kit11.getBytesEncoder)().encode(
|
|
1774
1791
|
new Uint8Array([
|
|
1775
1792
|
97,
|
|
1776
1793
|
105,
|
|
@@ -1788,7 +1805,7 @@ async function getInitializeAirdropMasterInstructionAsync(input, config) {
|
|
|
1788
1805
|
114
|
|
1789
1806
|
])
|
|
1790
1807
|
),
|
|
1791
|
-
|
|
1808
|
+
(0, import_kit11.getAddressEncoder)().encode(expectAddress(accounts.creator.value))
|
|
1792
1809
|
]
|
|
1793
1810
|
});
|
|
1794
1811
|
}
|
|
@@ -1890,36 +1907,36 @@ var DropsyAirdropAccount = /* @__PURE__ */ ((DropsyAirdropAccount2) => {
|
|
|
1890
1907
|
})(DropsyAirdropAccount || {});
|
|
1891
1908
|
function identifyDropsyAirdropAccount(account) {
|
|
1892
1909
|
const data = "data" in account ? account.data : account;
|
|
1893
|
-
if (containsBytes(
|
|
1910
|
+
if ((0, import_kit12.containsBytes)(
|
|
1894
1911
|
data,
|
|
1895
|
-
|
|
1912
|
+
(0, import_kit12.fixEncoderSize)((0, import_kit12.getBytesEncoder)(), 8).encode(
|
|
1896
1913
|
new Uint8Array([31, 112, 159, 158, 124, 237, 9, 241])
|
|
1897
1914
|
),
|
|
1898
1915
|
0
|
|
1899
1916
|
)) {
|
|
1900
1917
|
return 0 /* Airdrop */;
|
|
1901
1918
|
}
|
|
1902
|
-
if (containsBytes(
|
|
1919
|
+
if ((0, import_kit12.containsBytes)(
|
|
1903
1920
|
data,
|
|
1904
|
-
|
|
1921
|
+
(0, import_kit12.fixEncoderSize)((0, import_kit12.getBytesEncoder)(), 8).encode(
|
|
1905
1922
|
new Uint8Array([194, 149, 223, 142, 42, 98, 128, 16])
|
|
1906
1923
|
),
|
|
1907
1924
|
0
|
|
1908
1925
|
)) {
|
|
1909
1926
|
return 1 /* AirdropConfig */;
|
|
1910
1927
|
}
|
|
1911
|
-
if (containsBytes(
|
|
1928
|
+
if ((0, import_kit12.containsBytes)(
|
|
1912
1929
|
data,
|
|
1913
|
-
|
|
1930
|
+
(0, import_kit12.fixEncoderSize)((0, import_kit12.getBytesEncoder)(), 8).encode(
|
|
1914
1931
|
new Uint8Array([31, 109, 100, 62, 106, 173, 5, 4])
|
|
1915
1932
|
),
|
|
1916
1933
|
0
|
|
1917
1934
|
)) {
|
|
1918
1935
|
return 2 /* AirdropMaster */;
|
|
1919
1936
|
}
|
|
1920
|
-
if (containsBytes(
|
|
1937
|
+
if ((0, import_kit12.containsBytes)(
|
|
1921
1938
|
data,
|
|
1922
|
-
|
|
1939
|
+
(0, import_kit12.fixEncoderSize)((0, import_kit12.getBytesEncoder)(), 8).encode(
|
|
1923
1940
|
new Uint8Array([152, 161, 147, 85, 213, 38, 59, 48])
|
|
1924
1941
|
),
|
|
1925
1942
|
0
|
|
@@ -1941,54 +1958,54 @@ var DropsyAirdropInstruction = /* @__PURE__ */ ((DropsyAirdropInstruction2) => {
|
|
|
1941
1958
|
})(DropsyAirdropInstruction || {});
|
|
1942
1959
|
function identifyDropsyAirdropInstruction(instruction) {
|
|
1943
1960
|
const data = "data" in instruction ? instruction.data : instruction;
|
|
1944
|
-
if (containsBytes(
|
|
1961
|
+
if ((0, import_kit12.containsBytes)(
|
|
1945
1962
|
data,
|
|
1946
|
-
|
|
1963
|
+
(0, import_kit12.fixEncoderSize)((0, import_kit12.getBytesEncoder)(), 8).encode(
|
|
1947
1964
|
new Uint8Array([137, 50, 122, 111, 89, 254, 8, 20])
|
|
1948
1965
|
),
|
|
1949
1966
|
0
|
|
1950
1967
|
)) {
|
|
1951
1968
|
return 0 /* ClaimAirdrop */;
|
|
1952
1969
|
}
|
|
1953
|
-
if (containsBytes(
|
|
1970
|
+
if ((0, import_kit12.containsBytes)(
|
|
1954
1971
|
data,
|
|
1955
|
-
|
|
1972
|
+
(0, import_kit12.fixEncoderSize)((0, import_kit12.getBytesEncoder)(), 8).encode(
|
|
1956
1973
|
new Uint8Array([227, 135, 208, 66, 137, 177, 80, 94])
|
|
1957
1974
|
),
|
|
1958
1975
|
0
|
|
1959
1976
|
)) {
|
|
1960
1977
|
return 1 /* CreateAirdrop */;
|
|
1961
1978
|
}
|
|
1962
|
-
if (containsBytes(
|
|
1979
|
+
if ((0, import_kit12.containsBytes)(
|
|
1963
1980
|
data,
|
|
1964
|
-
|
|
1981
|
+
(0, import_kit12.fixEncoderSize)((0, import_kit12.getBytesEncoder)(), 8).encode(
|
|
1965
1982
|
new Uint8Array([69, 92, 61, 190, 154, 237, 116, 247])
|
|
1966
1983
|
),
|
|
1967
1984
|
0
|
|
1968
1985
|
)) {
|
|
1969
1986
|
return 2 /* CreateBitmap */;
|
|
1970
1987
|
}
|
|
1971
|
-
if (containsBytes(
|
|
1988
|
+
if ((0, import_kit12.containsBytes)(
|
|
1972
1989
|
data,
|
|
1973
|
-
|
|
1990
|
+
(0, import_kit12.fixEncoderSize)((0, import_kit12.getBytesEncoder)(), 8).encode(
|
|
1974
1991
|
new Uint8Array([176, 83, 229, 18, 191, 143, 176, 150])
|
|
1975
1992
|
),
|
|
1976
1993
|
0
|
|
1977
1994
|
)) {
|
|
1978
1995
|
return 3 /* DepositTokens */;
|
|
1979
1996
|
}
|
|
1980
|
-
if (containsBytes(
|
|
1997
|
+
if ((0, import_kit12.containsBytes)(
|
|
1981
1998
|
data,
|
|
1982
|
-
|
|
1999
|
+
(0, import_kit12.fixEncoderSize)((0, import_kit12.getBytesEncoder)(), 8).encode(
|
|
1983
2000
|
new Uint8Array([160, 68, 127, 205, 130, 205, 156, 94])
|
|
1984
2001
|
),
|
|
1985
2002
|
0
|
|
1986
2003
|
)) {
|
|
1987
2004
|
return 4 /* InitializeAirdropConfig */;
|
|
1988
2005
|
}
|
|
1989
|
-
if (containsBytes(
|
|
2006
|
+
if ((0, import_kit12.containsBytes)(
|
|
1990
2007
|
data,
|
|
1991
|
-
|
|
2008
|
+
(0, import_kit12.fixEncoderSize)((0, import_kit12.getBytesEncoder)(), 8).encode(
|
|
1992
2009
|
new Uint8Array([163, 197, 170, 44, 57, 57, 90, 65])
|
|
1993
2010
|
),
|
|
1994
2011
|
0
|
|
@@ -2003,42 +2020,42 @@ function parseDropsyAirdropInstruction(instruction) {
|
|
|
2003
2020
|
const instructionType = identifyDropsyAirdropInstruction(instruction);
|
|
2004
2021
|
switch (instructionType) {
|
|
2005
2022
|
case 0 /* ClaimAirdrop */: {
|
|
2006
|
-
assertIsInstructionWithAccounts(instruction);
|
|
2023
|
+
(0, import_kit12.assertIsInstructionWithAccounts)(instruction);
|
|
2007
2024
|
return {
|
|
2008
2025
|
instructionType: 0 /* ClaimAirdrop */,
|
|
2009
2026
|
...parseClaimAirdropInstruction(instruction)
|
|
2010
2027
|
};
|
|
2011
2028
|
}
|
|
2012
2029
|
case 1 /* CreateAirdrop */: {
|
|
2013
|
-
assertIsInstructionWithAccounts(instruction);
|
|
2030
|
+
(0, import_kit12.assertIsInstructionWithAccounts)(instruction);
|
|
2014
2031
|
return {
|
|
2015
2032
|
instructionType: 1 /* CreateAirdrop */,
|
|
2016
2033
|
...parseCreateAirdropInstruction(instruction)
|
|
2017
2034
|
};
|
|
2018
2035
|
}
|
|
2019
2036
|
case 2 /* CreateBitmap */: {
|
|
2020
|
-
assertIsInstructionWithAccounts(instruction);
|
|
2037
|
+
(0, import_kit12.assertIsInstructionWithAccounts)(instruction);
|
|
2021
2038
|
return {
|
|
2022
2039
|
instructionType: 2 /* CreateBitmap */,
|
|
2023
2040
|
...parseCreateBitmapInstruction(instruction)
|
|
2024
2041
|
};
|
|
2025
2042
|
}
|
|
2026
2043
|
case 3 /* DepositTokens */: {
|
|
2027
|
-
assertIsInstructionWithAccounts(instruction);
|
|
2044
|
+
(0, import_kit12.assertIsInstructionWithAccounts)(instruction);
|
|
2028
2045
|
return {
|
|
2029
2046
|
instructionType: 3 /* DepositTokens */,
|
|
2030
2047
|
...parseDepositTokensInstruction(instruction)
|
|
2031
2048
|
};
|
|
2032
2049
|
}
|
|
2033
2050
|
case 4 /* InitializeAirdropConfig */: {
|
|
2034
|
-
assertIsInstructionWithAccounts(instruction);
|
|
2051
|
+
(0, import_kit12.assertIsInstructionWithAccounts)(instruction);
|
|
2035
2052
|
return {
|
|
2036
2053
|
instructionType: 4 /* InitializeAirdropConfig */,
|
|
2037
2054
|
...parseInitializeAirdropConfigInstruction(instruction)
|
|
2038
2055
|
};
|
|
2039
2056
|
}
|
|
2040
2057
|
case 5 /* InitializeAirdropMaster */: {
|
|
2041
|
-
assertIsInstructionWithAccounts(instruction);
|
|
2058
|
+
(0, import_kit12.assertIsInstructionWithAccounts)(instruction);
|
|
2042
2059
|
return {
|
|
2043
2060
|
instructionType: 5 /* InitializeAirdropMaster */,
|
|
2044
2061
|
...parseInitializeAirdropMasterInstruction(instruction)
|
|
@@ -2210,7 +2227,7 @@ function getDropsyAirdropErrorMessage(code) {
|
|
|
2210
2227
|
return "Error message not available in production bundles.";
|
|
2211
2228
|
}
|
|
2212
2229
|
function isDropsyAirdropError(error, transactionMessage, code) {
|
|
2213
|
-
return isProgramError(
|
|
2230
|
+
return (0, import_kit13.isProgramError)(
|
|
2214
2231
|
error,
|
|
2215
2232
|
transactionMessage,
|
|
2216
2233
|
DROPSY_AIRDROP_PROGRAM_ADDRESS,
|
|
@@ -2219,173 +2236,128 @@ function isDropsyAirdropError(error, transactionMessage, code) {
|
|
|
2219
2236
|
}
|
|
2220
2237
|
|
|
2221
2238
|
// src/types/airdropInitialized.ts
|
|
2222
|
-
|
|
2223
|
-
combineCodec as combineCodec11,
|
|
2224
|
-
fixDecoderSize as fixDecoderSize11,
|
|
2225
|
-
fixEncoderSize as fixEncoderSize12,
|
|
2226
|
-
getAddressDecoder as getAddressDecoder6,
|
|
2227
|
-
getAddressEncoder as getAddressEncoder10,
|
|
2228
|
-
getBytesDecoder as getBytesDecoder11,
|
|
2229
|
-
getBytesEncoder as getBytesEncoder12,
|
|
2230
|
-
getI64Decoder as getI64Decoder5,
|
|
2231
|
-
getI64Encoder as getI64Encoder5,
|
|
2232
|
-
getStructDecoder as getStructDecoder11,
|
|
2233
|
-
getStructEncoder as getStructEncoder11
|
|
2234
|
-
} from "@solana/kit";
|
|
2239
|
+
var import_kit14 = require("@solana/kit");
|
|
2235
2240
|
function getAirdropInitializedEncoder() {
|
|
2236
|
-
return
|
|
2237
|
-
["airdrop",
|
|
2238
|
-
["mint",
|
|
2239
|
-
["authority",
|
|
2240
|
-
["master",
|
|
2241
|
-
["merkleRoot",
|
|
2242
|
-
["startTime",
|
|
2243
|
-
["endTime",
|
|
2244
|
-
["timestamp",
|
|
2241
|
+
return (0, import_kit14.getStructEncoder)([
|
|
2242
|
+
["airdrop", (0, import_kit14.getAddressEncoder)()],
|
|
2243
|
+
["mint", (0, import_kit14.getAddressEncoder)()],
|
|
2244
|
+
["authority", (0, import_kit14.getAddressEncoder)()],
|
|
2245
|
+
["master", (0, import_kit14.getAddressEncoder)()],
|
|
2246
|
+
["merkleRoot", (0, import_kit14.fixEncoderSize)((0, import_kit14.getBytesEncoder)(), 32)],
|
|
2247
|
+
["startTime", (0, import_kit14.getI64Encoder)()],
|
|
2248
|
+
["endTime", (0, import_kit14.getI64Encoder)()],
|
|
2249
|
+
["timestamp", (0, import_kit14.getI64Encoder)()]
|
|
2245
2250
|
]);
|
|
2246
2251
|
}
|
|
2247
2252
|
function getAirdropInitializedDecoder() {
|
|
2248
|
-
return
|
|
2249
|
-
["airdrop",
|
|
2250
|
-
["mint",
|
|
2251
|
-
["authority",
|
|
2252
|
-
["master",
|
|
2253
|
-
["merkleRoot",
|
|
2254
|
-
["startTime",
|
|
2255
|
-
["endTime",
|
|
2256
|
-
["timestamp",
|
|
2253
|
+
return (0, import_kit14.getStructDecoder)([
|
|
2254
|
+
["airdrop", (0, import_kit14.getAddressDecoder)()],
|
|
2255
|
+
["mint", (0, import_kit14.getAddressDecoder)()],
|
|
2256
|
+
["authority", (0, import_kit14.getAddressDecoder)()],
|
|
2257
|
+
["master", (0, import_kit14.getAddressDecoder)()],
|
|
2258
|
+
["merkleRoot", (0, import_kit14.fixDecoderSize)((0, import_kit14.getBytesDecoder)(), 32)],
|
|
2259
|
+
["startTime", (0, import_kit14.getI64Decoder)()],
|
|
2260
|
+
["endTime", (0, import_kit14.getI64Decoder)()],
|
|
2261
|
+
["timestamp", (0, import_kit14.getI64Decoder)()]
|
|
2257
2262
|
]);
|
|
2258
2263
|
}
|
|
2259
2264
|
function getAirdropInitializedCodec() {
|
|
2260
|
-
return
|
|
2265
|
+
return (0, import_kit14.combineCodec)(
|
|
2261
2266
|
getAirdropInitializedEncoder(),
|
|
2262
2267
|
getAirdropInitializedDecoder()
|
|
2263
2268
|
);
|
|
2264
2269
|
}
|
|
2265
2270
|
|
|
2266
2271
|
// src/types/bitmapClosed.ts
|
|
2267
|
-
|
|
2268
|
-
combineCodec as combineCodec12,
|
|
2269
|
-
getAddressDecoder as getAddressDecoder7,
|
|
2270
|
-
getAddressEncoder as getAddressEncoder11,
|
|
2271
|
-
getStructDecoder as getStructDecoder12,
|
|
2272
|
-
getStructEncoder as getStructEncoder12
|
|
2273
|
-
} from "@solana/kit";
|
|
2272
|
+
var import_kit15 = require("@solana/kit");
|
|
2274
2273
|
function getBitmapClosedEncoder() {
|
|
2275
|
-
return
|
|
2276
|
-
["airdrop",
|
|
2277
|
-
["bitmap",
|
|
2278
|
-
["authority",
|
|
2274
|
+
return (0, import_kit15.getStructEncoder)([
|
|
2275
|
+
["airdrop", (0, import_kit15.getAddressEncoder)()],
|
|
2276
|
+
["bitmap", (0, import_kit15.getAddressEncoder)()],
|
|
2277
|
+
["authority", (0, import_kit15.getAddressEncoder)()]
|
|
2279
2278
|
]);
|
|
2280
2279
|
}
|
|
2281
2280
|
function getBitmapClosedDecoder() {
|
|
2282
|
-
return
|
|
2283
|
-
["airdrop",
|
|
2284
|
-
["bitmap",
|
|
2285
|
-
["authority",
|
|
2281
|
+
return (0, import_kit15.getStructDecoder)([
|
|
2282
|
+
["airdrop", (0, import_kit15.getAddressDecoder)()],
|
|
2283
|
+
["bitmap", (0, import_kit15.getAddressDecoder)()],
|
|
2284
|
+
["authority", (0, import_kit15.getAddressDecoder)()]
|
|
2286
2285
|
]);
|
|
2287
2286
|
}
|
|
2288
2287
|
function getBitmapClosedCodec() {
|
|
2289
|
-
return
|
|
2288
|
+
return (0, import_kit15.combineCodec)(getBitmapClosedEncoder(), getBitmapClosedDecoder());
|
|
2290
2289
|
}
|
|
2291
2290
|
|
|
2292
2291
|
// src/types/bitmapInitialized.ts
|
|
2293
|
-
|
|
2294
|
-
combineCodec as combineCodec13,
|
|
2295
|
-
getAddressDecoder as getAddressDecoder8,
|
|
2296
|
-
getAddressEncoder as getAddressEncoder12,
|
|
2297
|
-
getI64Decoder as getI64Decoder6,
|
|
2298
|
-
getI64Encoder as getI64Encoder6,
|
|
2299
|
-
getStructDecoder as getStructDecoder13,
|
|
2300
|
-
getStructEncoder as getStructEncoder13,
|
|
2301
|
-
getU16Decoder as getU16Decoder7,
|
|
2302
|
-
getU16Encoder as getU16Encoder7
|
|
2303
|
-
} from "@solana/kit";
|
|
2292
|
+
var import_kit16 = require("@solana/kit");
|
|
2304
2293
|
function getBitmapInitializedEncoder() {
|
|
2305
|
-
return
|
|
2306
|
-
["airdrop",
|
|
2307
|
-
["bitmap",
|
|
2308
|
-
["bitmapId",
|
|
2309
|
-
["timestamp",
|
|
2294
|
+
return (0, import_kit16.getStructEncoder)([
|
|
2295
|
+
["airdrop", (0, import_kit16.getAddressEncoder)()],
|
|
2296
|
+
["bitmap", (0, import_kit16.getAddressEncoder)()],
|
|
2297
|
+
["bitmapId", (0, import_kit16.getU16Encoder)()],
|
|
2298
|
+
["timestamp", (0, import_kit16.getI64Encoder)()]
|
|
2310
2299
|
]);
|
|
2311
2300
|
}
|
|
2312
2301
|
function getBitmapInitializedDecoder() {
|
|
2313
|
-
return
|
|
2314
|
-
["airdrop",
|
|
2315
|
-
["bitmap",
|
|
2316
|
-
["bitmapId",
|
|
2317
|
-
["timestamp",
|
|
2302
|
+
return (0, import_kit16.getStructDecoder)([
|
|
2303
|
+
["airdrop", (0, import_kit16.getAddressDecoder)()],
|
|
2304
|
+
["bitmap", (0, import_kit16.getAddressDecoder)()],
|
|
2305
|
+
["bitmapId", (0, import_kit16.getU16Decoder)()],
|
|
2306
|
+
["timestamp", (0, import_kit16.getI64Decoder)()]
|
|
2318
2307
|
]);
|
|
2319
2308
|
}
|
|
2320
2309
|
function getBitmapInitializedCodec() {
|
|
2321
|
-
return
|
|
2310
|
+
return (0, import_kit16.combineCodec)(
|
|
2322
2311
|
getBitmapInitializedEncoder(),
|
|
2323
2312
|
getBitmapInitializedDecoder()
|
|
2324
2313
|
);
|
|
2325
2314
|
}
|
|
2326
2315
|
|
|
2327
2316
|
// src/types/tokensDeposited.ts
|
|
2328
|
-
|
|
2329
|
-
combineCodec as combineCodec14,
|
|
2330
|
-
getAddressDecoder as getAddressDecoder9,
|
|
2331
|
-
getAddressEncoder as getAddressEncoder13,
|
|
2332
|
-
getI64Decoder as getI64Decoder7,
|
|
2333
|
-
getI64Encoder as getI64Encoder7,
|
|
2334
|
-
getStructDecoder as getStructDecoder14,
|
|
2335
|
-
getStructEncoder as getStructEncoder14,
|
|
2336
|
-
getU64Decoder as getU64Decoder9,
|
|
2337
|
-
getU64Encoder as getU64Encoder9
|
|
2338
|
-
} from "@solana/kit";
|
|
2317
|
+
var import_kit17 = require("@solana/kit");
|
|
2339
2318
|
function getTokensDepositedEncoder() {
|
|
2340
|
-
return
|
|
2341
|
-
["airdrop",
|
|
2342
|
-
["amount",
|
|
2343
|
-
["newSupply",
|
|
2344
|
-
["depositor",
|
|
2345
|
-
["timestamp",
|
|
2319
|
+
return (0, import_kit17.getStructEncoder)([
|
|
2320
|
+
["airdrop", (0, import_kit17.getAddressEncoder)()],
|
|
2321
|
+
["amount", (0, import_kit17.getU64Encoder)()],
|
|
2322
|
+
["newSupply", (0, import_kit17.getU64Encoder)()],
|
|
2323
|
+
["depositor", (0, import_kit17.getAddressEncoder)()],
|
|
2324
|
+
["timestamp", (0, import_kit17.getI64Encoder)()]
|
|
2346
2325
|
]);
|
|
2347
2326
|
}
|
|
2348
2327
|
function getTokensDepositedDecoder() {
|
|
2349
|
-
return
|
|
2350
|
-
["airdrop",
|
|
2351
|
-
["amount",
|
|
2352
|
-
["newSupply",
|
|
2353
|
-
["depositor",
|
|
2354
|
-
["timestamp",
|
|
2328
|
+
return (0, import_kit17.getStructDecoder)([
|
|
2329
|
+
["airdrop", (0, import_kit17.getAddressDecoder)()],
|
|
2330
|
+
["amount", (0, import_kit17.getU64Decoder)()],
|
|
2331
|
+
["newSupply", (0, import_kit17.getU64Decoder)()],
|
|
2332
|
+
["depositor", (0, import_kit17.getAddressDecoder)()],
|
|
2333
|
+
["timestamp", (0, import_kit17.getI64Decoder)()]
|
|
2355
2334
|
]);
|
|
2356
2335
|
}
|
|
2357
2336
|
function getTokensDepositedCodec() {
|
|
2358
|
-
return
|
|
2337
|
+
return (0, import_kit17.combineCodec)(getTokensDepositedEncoder(), getTokensDepositedDecoder());
|
|
2359
2338
|
}
|
|
2360
2339
|
|
|
2361
2340
|
// src/types/tokensRedeemed.ts
|
|
2362
|
-
|
|
2363
|
-
combineCodec as combineCodec15,
|
|
2364
|
-
getAddressDecoder as getAddressDecoder10,
|
|
2365
|
-
getAddressEncoder as getAddressEncoder14,
|
|
2366
|
-
getI64Decoder as getI64Decoder8,
|
|
2367
|
-
getI64Encoder as getI64Encoder8,
|
|
2368
|
-
getStructDecoder as getStructDecoder15,
|
|
2369
|
-
getStructEncoder as getStructEncoder15
|
|
2370
|
-
} from "@solana/kit";
|
|
2341
|
+
var import_kit18 = require("@solana/kit");
|
|
2371
2342
|
function getTokensRedeemedEncoder() {
|
|
2372
|
-
return
|
|
2373
|
-
["airdrop",
|
|
2374
|
-
["authority",
|
|
2375
|
-
["timestamp",
|
|
2343
|
+
return (0, import_kit18.getStructEncoder)([
|
|
2344
|
+
["airdrop", (0, import_kit18.getAddressEncoder)()],
|
|
2345
|
+
["authority", (0, import_kit18.getAddressEncoder)()],
|
|
2346
|
+
["timestamp", (0, import_kit18.getI64Encoder)()]
|
|
2376
2347
|
]);
|
|
2377
2348
|
}
|
|
2378
2349
|
function getTokensRedeemedDecoder() {
|
|
2379
|
-
return
|
|
2380
|
-
["airdrop",
|
|
2381
|
-
["authority",
|
|
2382
|
-
["timestamp",
|
|
2350
|
+
return (0, import_kit18.getStructDecoder)([
|
|
2351
|
+
["airdrop", (0, import_kit18.getAddressDecoder)()],
|
|
2352
|
+
["authority", (0, import_kit18.getAddressDecoder)()],
|
|
2353
|
+
["timestamp", (0, import_kit18.getI64Decoder)()]
|
|
2383
2354
|
]);
|
|
2384
2355
|
}
|
|
2385
2356
|
function getTokensRedeemedCodec() {
|
|
2386
|
-
return
|
|
2357
|
+
return (0, import_kit18.combineCodec)(getTokensRedeemedEncoder(), getTokensRedeemedDecoder());
|
|
2387
2358
|
}
|
|
2388
|
-
export
|
|
2359
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
2360
|
+
0 && (module.exports = {
|
|
2389
2361
|
AIRDROP_CONFIG_DISCRIMINATOR,
|
|
2390
2362
|
AIRDROP_DISCRIMINATOR,
|
|
2391
2363
|
AIRDROP_MASTER_DISCRIMINATOR,
|
|
@@ -2574,5 +2546,5 @@ export {
|
|
|
2574
2546
|
parseDropsyAirdropInstruction,
|
|
2575
2547
|
parseInitializeAirdropConfigInstruction,
|
|
2576
2548
|
parseInitializeAirdropMasterInstruction
|
|
2577
|
-
};
|
|
2549
|
+
});
|
|
2578
2550
|
//# sourceMappingURL=index.js.map
|