@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
|
@@ -1,218 +1,29 @@
|
|
|
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
|
-
|
|
214
1
|
// src/accounts/airdrop.ts
|
|
215
|
-
|
|
2
|
+
import {
|
|
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";
|
|
216
27
|
var AIRDROP_DISCRIMINATOR = new Uint8Array([
|
|
217
28
|
31,
|
|
218
29
|
112,
|
|
@@ -224,76 +35,76 @@ var AIRDROP_DISCRIMINATOR = new Uint8Array([
|
|
|
224
35
|
241
|
|
225
36
|
]);
|
|
226
37
|
function getAirdropDiscriminatorBytes() {
|
|
227
|
-
return
|
|
38
|
+
return fixEncoderSize(getBytesEncoder(), 8).encode(AIRDROP_DISCRIMINATOR);
|
|
228
39
|
}
|
|
229
40
|
function getAirdropEncoder() {
|
|
230
|
-
return
|
|
231
|
-
|
|
232
|
-
["discriminator",
|
|
233
|
-
["master",
|
|
234
|
-
["authority",
|
|
235
|
-
["mint",
|
|
236
|
-
["delegateAuthority",
|
|
237
|
-
["merkleRoot",
|
|
238
|
-
["id",
|
|
239
|
-
["supply",
|
|
240
|
-
["boost",
|
|
241
|
-
["startsAt",
|
|
242
|
-
["endsAt",
|
|
243
|
-
["bitmapCount",
|
|
244
|
-
["state",
|
|
245
|
-
["version",
|
|
246
|
-
["bump",
|
|
247
|
-
["padding",
|
|
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)]
|
|
248
59
|
]),
|
|
249
60
|
(value) => ({ ...value, discriminator: AIRDROP_DISCRIMINATOR })
|
|
250
61
|
);
|
|
251
62
|
}
|
|
252
63
|
function getAirdropDecoder() {
|
|
253
|
-
return
|
|
254
|
-
["discriminator",
|
|
255
|
-
["master",
|
|
256
|
-
["authority",
|
|
257
|
-
["mint",
|
|
258
|
-
["delegateAuthority",
|
|
259
|
-
["merkleRoot",
|
|
260
|
-
["id",
|
|
261
|
-
["supply",
|
|
262
|
-
["boost",
|
|
263
|
-
["startsAt",
|
|
264
|
-
["endsAt",
|
|
265
|
-
["bitmapCount",
|
|
266
|
-
["state",
|
|
267
|
-
["version",
|
|
268
|
-
["bump",
|
|
269
|
-
["padding",
|
|
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)]
|
|
270
81
|
]);
|
|
271
82
|
}
|
|
272
83
|
function getAirdropCodec() {
|
|
273
|
-
return
|
|
84
|
+
return combineCodec(getAirdropEncoder(), getAirdropDecoder());
|
|
274
85
|
}
|
|
275
86
|
function decodeAirdrop(encodedAccount) {
|
|
276
|
-
return
|
|
87
|
+
return decodeAccount(
|
|
277
88
|
encodedAccount,
|
|
278
89
|
getAirdropDecoder()
|
|
279
90
|
);
|
|
280
91
|
}
|
|
281
92
|
async function fetchAirdrop(rpc, address, config) {
|
|
282
93
|
const maybeAccount = await fetchMaybeAirdrop(rpc, address, config);
|
|
283
|
-
|
|
94
|
+
assertAccountExists(maybeAccount);
|
|
284
95
|
return maybeAccount;
|
|
285
96
|
}
|
|
286
97
|
async function fetchMaybeAirdrop(rpc, address, config) {
|
|
287
|
-
const maybeAccount = await
|
|
98
|
+
const maybeAccount = await fetchEncodedAccount(rpc, address, config);
|
|
288
99
|
return decodeAirdrop(maybeAccount);
|
|
289
100
|
}
|
|
290
101
|
async function fetchAllAirdrop(rpc, addresses, config) {
|
|
291
102
|
const maybeAccounts = await fetchAllMaybeAirdrop(rpc, addresses, config);
|
|
292
|
-
|
|
103
|
+
assertAccountsExist(maybeAccounts);
|
|
293
104
|
return maybeAccounts;
|
|
294
105
|
}
|
|
295
106
|
async function fetchAllMaybeAirdrop(rpc, addresses, config) {
|
|
296
|
-
const maybeAccounts = await
|
|
107
|
+
const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);
|
|
297
108
|
return maybeAccounts.map((maybeAccount) => decodeAirdrop(maybeAccount));
|
|
298
109
|
}
|
|
299
110
|
function getAirdropSize() {
|
|
@@ -301,7 +112,31 @@ function getAirdropSize() {
|
|
|
301
112
|
}
|
|
302
113
|
|
|
303
114
|
// src/accounts/airdropConfig.ts
|
|
304
|
-
|
|
115
|
+
import {
|
|
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";
|
|
305
140
|
var AIRDROP_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
306
141
|
194,
|
|
307
142
|
149,
|
|
@@ -313,71 +148,71 @@ var AIRDROP_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
|
313
148
|
16
|
|
314
149
|
]);
|
|
315
150
|
function getAirdropConfigDiscriminatorBytes() {
|
|
316
|
-
return (
|
|
151
|
+
return fixEncoderSize2(getBytesEncoder2(), 8).encode(
|
|
317
152
|
AIRDROP_CONFIG_DISCRIMINATOR
|
|
318
153
|
);
|
|
319
154
|
}
|
|
320
155
|
function getAirdropConfigEncoder() {
|
|
321
|
-
return (
|
|
322
|
-
(
|
|
323
|
-
["discriminator", (
|
|
324
|
-
["authority", (
|
|
325
|
-
["protocolTreasury", (
|
|
326
|
-
["wlRoot", (
|
|
327
|
-
["protocolFee", (
|
|
328
|
-
["airdropMasterCreateFee", (
|
|
329
|
-
["maxClaimFee", (
|
|
330
|
-
["maxActionFee", (
|
|
331
|
-
["minAirdropDuration", (
|
|
332
|
-
["defaultAirdropDuration", (
|
|
333
|
-
["maxAirdropDuration", (
|
|
334
|
-
["updateGracePeriod", (
|
|
335
|
-
["masterFeeBps", (
|
|
336
|
-
["version", (
|
|
337
|
-
["bump", (
|
|
338
|
-
["padding", (
|
|
339
|
-
["reserved", (
|
|
156
|
+
return transformEncoder2(
|
|
157
|
+
getStructEncoder2([
|
|
158
|
+
["discriminator", fixEncoderSize2(getBytesEncoder2(), 8)],
|
|
159
|
+
["authority", getAddressEncoder2()],
|
|
160
|
+
["protocolTreasury", getAddressEncoder2()],
|
|
161
|
+
["wlRoot", fixEncoderSize2(getBytesEncoder2(), 32)],
|
|
162
|
+
["protocolFee", getU64Encoder2()],
|
|
163
|
+
["airdropMasterCreateFee", getU64Encoder2()],
|
|
164
|
+
["maxClaimFee", getU64Encoder2()],
|
|
165
|
+
["maxActionFee", getU64Encoder2()],
|
|
166
|
+
["minAirdropDuration", getI64Encoder2()],
|
|
167
|
+
["defaultAirdropDuration", getI64Encoder2()],
|
|
168
|
+
["maxAirdropDuration", getI64Encoder2()],
|
|
169
|
+
["updateGracePeriod", getI64Encoder2()],
|
|
170
|
+
["masterFeeBps", getU16Encoder2()],
|
|
171
|
+
["version", getU8Encoder2()],
|
|
172
|
+
["bump", getU8Encoder2()],
|
|
173
|
+
["padding", fixEncoderSize2(getBytesEncoder2(), 4)],
|
|
174
|
+
["reserved", fixEncoderSize2(getBytesEncoder2(), 256)]
|
|
340
175
|
]),
|
|
341
176
|
(value) => ({ ...value, discriminator: AIRDROP_CONFIG_DISCRIMINATOR })
|
|
342
177
|
);
|
|
343
178
|
}
|
|
344
179
|
function getAirdropConfigDecoder() {
|
|
345
|
-
return (
|
|
346
|
-
["discriminator", (
|
|
347
|
-
["authority", (
|
|
348
|
-
["protocolTreasury", (
|
|
349
|
-
["wlRoot", (
|
|
350
|
-
["protocolFee", (
|
|
351
|
-
["airdropMasterCreateFee", (
|
|
352
|
-
["maxClaimFee", (
|
|
353
|
-
["maxActionFee", (
|
|
354
|
-
["minAirdropDuration", (
|
|
355
|
-
["defaultAirdropDuration", (
|
|
356
|
-
["maxAirdropDuration", (
|
|
357
|
-
["updateGracePeriod", (
|
|
358
|
-
["masterFeeBps", (
|
|
359
|
-
["version", (
|
|
360
|
-
["bump", (
|
|
361
|
-
["padding", (
|
|
362
|
-
["reserved", (
|
|
180
|
+
return getStructDecoder2([
|
|
181
|
+
["discriminator", fixDecoderSize2(getBytesDecoder2(), 8)],
|
|
182
|
+
["authority", getAddressDecoder2()],
|
|
183
|
+
["protocolTreasury", getAddressDecoder2()],
|
|
184
|
+
["wlRoot", fixDecoderSize2(getBytesDecoder2(), 32)],
|
|
185
|
+
["protocolFee", getU64Decoder2()],
|
|
186
|
+
["airdropMasterCreateFee", getU64Decoder2()],
|
|
187
|
+
["maxClaimFee", getU64Decoder2()],
|
|
188
|
+
["maxActionFee", getU64Decoder2()],
|
|
189
|
+
["minAirdropDuration", getI64Decoder2()],
|
|
190
|
+
["defaultAirdropDuration", getI64Decoder2()],
|
|
191
|
+
["maxAirdropDuration", getI64Decoder2()],
|
|
192
|
+
["updateGracePeriod", getI64Decoder2()],
|
|
193
|
+
["masterFeeBps", getU16Decoder2()],
|
|
194
|
+
["version", getU8Decoder2()],
|
|
195
|
+
["bump", getU8Decoder2()],
|
|
196
|
+
["padding", fixDecoderSize2(getBytesDecoder2(), 4)],
|
|
197
|
+
["reserved", fixDecoderSize2(getBytesDecoder2(), 256)]
|
|
363
198
|
]);
|
|
364
199
|
}
|
|
365
200
|
function getAirdropConfigCodec() {
|
|
366
|
-
return (
|
|
201
|
+
return combineCodec2(getAirdropConfigEncoder(), getAirdropConfigDecoder());
|
|
367
202
|
}
|
|
368
203
|
function decodeAirdropConfig(encodedAccount) {
|
|
369
|
-
return (
|
|
204
|
+
return decodeAccount2(
|
|
370
205
|
encodedAccount,
|
|
371
206
|
getAirdropConfigDecoder()
|
|
372
207
|
);
|
|
373
208
|
}
|
|
374
209
|
async function fetchAirdropConfig(rpc, address, config) {
|
|
375
210
|
const maybeAccount = await fetchMaybeAirdropConfig(rpc, address, config);
|
|
376
|
-
(
|
|
211
|
+
assertAccountExists2(maybeAccount);
|
|
377
212
|
return maybeAccount;
|
|
378
213
|
}
|
|
379
214
|
async function fetchMaybeAirdropConfig(rpc, address, config) {
|
|
380
|
-
const maybeAccount = await (
|
|
215
|
+
const maybeAccount = await fetchEncodedAccount2(rpc, address, config);
|
|
381
216
|
return decodeAirdropConfig(maybeAccount);
|
|
382
217
|
}
|
|
383
218
|
async function fetchAllAirdropConfig(rpc, addresses, config) {
|
|
@@ -386,11 +221,11 @@ async function fetchAllAirdropConfig(rpc, addresses, config) {
|
|
|
386
221
|
addresses,
|
|
387
222
|
config
|
|
388
223
|
);
|
|
389
|
-
(
|
|
224
|
+
assertAccountsExist2(maybeAccounts);
|
|
390
225
|
return maybeAccounts;
|
|
391
226
|
}
|
|
392
227
|
async function fetchAllMaybeAirdropConfig(rpc, addresses, config) {
|
|
393
|
-
const maybeAccounts = await (
|
|
228
|
+
const maybeAccounts = await fetchEncodedAccounts2(rpc, addresses, config);
|
|
394
229
|
return maybeAccounts.map((maybeAccount) => decodeAirdropConfig(maybeAccount));
|
|
395
230
|
}
|
|
396
231
|
function getAirdropConfigSize() {
|
|
@@ -398,7 +233,27 @@ function getAirdropConfigSize() {
|
|
|
398
233
|
}
|
|
399
234
|
|
|
400
235
|
// src/accounts/airdropMaster.ts
|
|
401
|
-
|
|
236
|
+
import {
|
|
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";
|
|
402
257
|
var AIRDROP_MASTER_DISCRIMINATOR = new Uint8Array([
|
|
403
258
|
31,
|
|
404
259
|
109,
|
|
@@ -410,69 +265,69 @@ var AIRDROP_MASTER_DISCRIMINATOR = new Uint8Array([
|
|
|
410
265
|
4
|
|
411
266
|
]);
|
|
412
267
|
function getAirdropMasterDiscriminatorBytes() {
|
|
413
|
-
return (
|
|
268
|
+
return fixEncoderSize3(getBytesEncoder3(), 8).encode(
|
|
414
269
|
AIRDROP_MASTER_DISCRIMINATOR
|
|
415
270
|
);
|
|
416
271
|
}
|
|
417
272
|
function getAirdropMasterEncoder() {
|
|
418
|
-
return (
|
|
419
|
-
(
|
|
420
|
-
["discriminator", (
|
|
421
|
-
["creator", (
|
|
422
|
-
["authority", (
|
|
423
|
-
["treasury", (
|
|
424
|
-
["createdAirdrops", (
|
|
425
|
-
["points", (
|
|
426
|
-
["totalClaimCount", (
|
|
427
|
-
["monetizedClaimQuota", (
|
|
428
|
-
["monetizedClaimCount", (
|
|
429
|
-
["airdropUpdateFee", (
|
|
430
|
-
["airdropCreationFee", (
|
|
431
|
-
["airdropClaimFee", (
|
|
432
|
-
["airdropDelegateFee", (
|
|
433
|
-
["bitmapCreationFee", (
|
|
434
|
-
["bump", (
|
|
435
|
-
["padding", (
|
|
273
|
+
return transformEncoder3(
|
|
274
|
+
getStructEncoder3([
|
|
275
|
+
["discriminator", fixEncoderSize3(getBytesEncoder3(), 8)],
|
|
276
|
+
["creator", getAddressEncoder3()],
|
|
277
|
+
["authority", getAddressEncoder3()],
|
|
278
|
+
["treasury", getAddressEncoder3()],
|
|
279
|
+
["createdAirdrops", getU64Encoder3()],
|
|
280
|
+
["points", getU64Encoder3()],
|
|
281
|
+
["totalClaimCount", getU64Encoder3()],
|
|
282
|
+
["monetizedClaimQuota", getU64Encoder3()],
|
|
283
|
+
["monetizedClaimCount", getU64Encoder3()],
|
|
284
|
+
["airdropUpdateFee", getU64Encoder3()],
|
|
285
|
+
["airdropCreationFee", getU64Encoder3()],
|
|
286
|
+
["airdropClaimFee", getU64Encoder3()],
|
|
287
|
+
["airdropDelegateFee", getU64Encoder3()],
|
|
288
|
+
["bitmapCreationFee", getU64Encoder3()],
|
|
289
|
+
["bump", getU8Encoder3()],
|
|
290
|
+
["padding", fixEncoderSize3(getBytesEncoder3(), 7)]
|
|
436
291
|
]),
|
|
437
292
|
(value) => ({ ...value, discriminator: AIRDROP_MASTER_DISCRIMINATOR })
|
|
438
293
|
);
|
|
439
294
|
}
|
|
440
295
|
function getAirdropMasterDecoder() {
|
|
441
|
-
return (
|
|
442
|
-
["discriminator", (
|
|
443
|
-
["creator", (
|
|
444
|
-
["authority", (
|
|
445
|
-
["treasury", (
|
|
446
|
-
["createdAirdrops", (
|
|
447
|
-
["points", (
|
|
448
|
-
["totalClaimCount", (
|
|
449
|
-
["monetizedClaimQuota", (
|
|
450
|
-
["monetizedClaimCount", (
|
|
451
|
-
["airdropUpdateFee", (
|
|
452
|
-
["airdropCreationFee", (
|
|
453
|
-
["airdropClaimFee", (
|
|
454
|
-
["airdropDelegateFee", (
|
|
455
|
-
["bitmapCreationFee", (
|
|
456
|
-
["bump", (
|
|
457
|
-
["padding", (
|
|
296
|
+
return getStructDecoder3([
|
|
297
|
+
["discriminator", fixDecoderSize3(getBytesDecoder3(), 8)],
|
|
298
|
+
["creator", getAddressDecoder3()],
|
|
299
|
+
["authority", getAddressDecoder3()],
|
|
300
|
+
["treasury", getAddressDecoder3()],
|
|
301
|
+
["createdAirdrops", getU64Decoder3()],
|
|
302
|
+
["points", getU64Decoder3()],
|
|
303
|
+
["totalClaimCount", getU64Decoder3()],
|
|
304
|
+
["monetizedClaimQuota", getU64Decoder3()],
|
|
305
|
+
["monetizedClaimCount", getU64Decoder3()],
|
|
306
|
+
["airdropUpdateFee", getU64Decoder3()],
|
|
307
|
+
["airdropCreationFee", getU64Decoder3()],
|
|
308
|
+
["airdropClaimFee", getU64Decoder3()],
|
|
309
|
+
["airdropDelegateFee", getU64Decoder3()],
|
|
310
|
+
["bitmapCreationFee", getU64Decoder3()],
|
|
311
|
+
["bump", getU8Decoder3()],
|
|
312
|
+
["padding", fixDecoderSize3(getBytesDecoder3(), 7)]
|
|
458
313
|
]);
|
|
459
314
|
}
|
|
460
315
|
function getAirdropMasterCodec() {
|
|
461
|
-
return (
|
|
316
|
+
return combineCodec3(getAirdropMasterEncoder(), getAirdropMasterDecoder());
|
|
462
317
|
}
|
|
463
318
|
function decodeAirdropMaster(encodedAccount) {
|
|
464
|
-
return (
|
|
319
|
+
return decodeAccount3(
|
|
465
320
|
encodedAccount,
|
|
466
321
|
getAirdropMasterDecoder()
|
|
467
322
|
);
|
|
468
323
|
}
|
|
469
324
|
async function fetchAirdropMaster(rpc, address, config) {
|
|
470
325
|
const maybeAccount = await fetchMaybeAirdropMaster(rpc, address, config);
|
|
471
|
-
(
|
|
326
|
+
assertAccountExists3(maybeAccount);
|
|
472
327
|
return maybeAccount;
|
|
473
328
|
}
|
|
474
329
|
async function fetchMaybeAirdropMaster(rpc, address, config) {
|
|
475
|
-
const maybeAccount = await (
|
|
330
|
+
const maybeAccount = await fetchEncodedAccount3(rpc, address, config);
|
|
476
331
|
return decodeAirdropMaster(maybeAccount);
|
|
477
332
|
}
|
|
478
333
|
async function fetchAllAirdropMaster(rpc, addresses, config) {
|
|
@@ -481,11 +336,11 @@ async function fetchAllAirdropMaster(rpc, addresses, config) {
|
|
|
481
336
|
addresses,
|
|
482
337
|
config
|
|
483
338
|
);
|
|
484
|
-
(
|
|
339
|
+
assertAccountsExist3(maybeAccounts);
|
|
485
340
|
return maybeAccounts;
|
|
486
341
|
}
|
|
487
342
|
async function fetchAllMaybeAirdropMaster(rpc, addresses, config) {
|
|
488
|
-
const maybeAccounts = await (
|
|
343
|
+
const maybeAccounts = await fetchEncodedAccounts3(rpc, addresses, config);
|
|
489
344
|
return maybeAccounts.map((maybeAccount) => decodeAirdropMaster(maybeAccount));
|
|
490
345
|
}
|
|
491
346
|
function getAirdropMasterSize() {
|
|
@@ -493,7 +348,29 @@ function getAirdropMasterSize() {
|
|
|
493
348
|
}
|
|
494
349
|
|
|
495
350
|
// src/accounts/bitmapAccount.ts
|
|
496
|
-
|
|
351
|
+
import {
|
|
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";
|
|
497
374
|
var BITMAP_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
498
375
|
152,
|
|
499
376
|
161,
|
|
@@ -505,53 +382,53 @@ var BITMAP_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
|
505
382
|
48
|
|
506
383
|
]);
|
|
507
384
|
function getBitmapAccountDiscriminatorBytes() {
|
|
508
|
-
return (
|
|
385
|
+
return fixEncoderSize4(getBytesEncoder4(), 8).encode(
|
|
509
386
|
BITMAP_ACCOUNT_DISCRIMINATOR
|
|
510
387
|
);
|
|
511
388
|
}
|
|
512
389
|
function getBitmapAccountEncoder() {
|
|
513
|
-
return (
|
|
514
|
-
(
|
|
515
|
-
["discriminator", (
|
|
516
|
-
["authority", (
|
|
517
|
-
["airdrop", (
|
|
518
|
-
["total",
|
|
519
|
-
["claimedBitmap", (
|
|
520
|
-
["id", (
|
|
521
|
-
["version", (
|
|
522
|
-
["bump", (
|
|
390
|
+
return transformEncoder4(
|
|
391
|
+
getStructEncoder4([
|
|
392
|
+
["discriminator", fixEncoderSize4(getBytesEncoder4(), 8)],
|
|
393
|
+
["authority", getAddressEncoder4()],
|
|
394
|
+
["airdrop", getAddressEncoder4()],
|
|
395
|
+
["total", getU32Encoder()],
|
|
396
|
+
["claimedBitmap", fixEncoderSize4(getBytesEncoder4(), 1e3)],
|
|
397
|
+
["id", getU16Encoder3()],
|
|
398
|
+
["version", getU8Encoder4()],
|
|
399
|
+
["bump", getU8Encoder4()]
|
|
523
400
|
]),
|
|
524
401
|
(value) => ({ ...value, discriminator: BITMAP_ACCOUNT_DISCRIMINATOR })
|
|
525
402
|
);
|
|
526
403
|
}
|
|
527
404
|
function getBitmapAccountDecoder() {
|
|
528
|
-
return (
|
|
529
|
-
["discriminator", (
|
|
530
|
-
["authority", (
|
|
531
|
-
["airdrop", (
|
|
532
|
-
["total",
|
|
533
|
-
["claimedBitmap", (
|
|
534
|
-
["id", (
|
|
535
|
-
["version", (
|
|
536
|
-
["bump", (
|
|
405
|
+
return getStructDecoder4([
|
|
406
|
+
["discriminator", fixDecoderSize4(getBytesDecoder4(), 8)],
|
|
407
|
+
["authority", getAddressDecoder4()],
|
|
408
|
+
["airdrop", getAddressDecoder4()],
|
|
409
|
+
["total", getU32Decoder()],
|
|
410
|
+
["claimedBitmap", fixDecoderSize4(getBytesDecoder4(), 1e3)],
|
|
411
|
+
["id", getU16Decoder3()],
|
|
412
|
+
["version", getU8Decoder4()],
|
|
413
|
+
["bump", getU8Decoder4()]
|
|
537
414
|
]);
|
|
538
415
|
}
|
|
539
416
|
function getBitmapAccountCodec() {
|
|
540
|
-
return (
|
|
417
|
+
return combineCodec4(getBitmapAccountEncoder(), getBitmapAccountDecoder());
|
|
541
418
|
}
|
|
542
419
|
function decodeBitmapAccount(encodedAccount) {
|
|
543
|
-
return (
|
|
420
|
+
return decodeAccount4(
|
|
544
421
|
encodedAccount,
|
|
545
422
|
getBitmapAccountDecoder()
|
|
546
423
|
);
|
|
547
424
|
}
|
|
548
425
|
async function fetchBitmapAccount(rpc, address, config) {
|
|
549
426
|
const maybeAccount = await fetchMaybeBitmapAccount(rpc, address, config);
|
|
550
|
-
(
|
|
427
|
+
assertAccountExists4(maybeAccount);
|
|
551
428
|
return maybeAccount;
|
|
552
429
|
}
|
|
553
430
|
async function fetchMaybeBitmapAccount(rpc, address, config) {
|
|
554
|
-
const maybeAccount = await (
|
|
431
|
+
const maybeAccount = await fetchEncodedAccount4(rpc, address, config);
|
|
555
432
|
return decodeBitmapAccount(maybeAccount);
|
|
556
433
|
}
|
|
557
434
|
async function fetchAllBitmapAccount(rpc, addresses, config) {
|
|
@@ -560,11 +437,11 @@ async function fetchAllBitmapAccount(rpc, addresses, config) {
|
|
|
560
437
|
addresses,
|
|
561
438
|
config
|
|
562
439
|
);
|
|
563
|
-
(
|
|
440
|
+
assertAccountsExist4(maybeAccounts);
|
|
564
441
|
return maybeAccounts;
|
|
565
442
|
}
|
|
566
443
|
async function fetchAllMaybeBitmapAccount(rpc, addresses, config) {
|
|
567
|
-
const maybeAccounts = await (
|
|
444
|
+
const maybeAccounts = await fetchEncodedAccounts4(rpc, addresses, config);
|
|
568
445
|
return maybeAccounts.map((maybeAccount) => decodeBitmapAccount(maybeAccount));
|
|
569
446
|
}
|
|
570
447
|
function getBitmapAccountSize() {
|
|
@@ -572,16 +449,45 @@ function getBitmapAccountSize() {
|
|
|
572
449
|
}
|
|
573
450
|
|
|
574
451
|
// src/errors/dropsyAirdrop.ts
|
|
575
|
-
|
|
452
|
+
import {
|
|
453
|
+
isProgramError
|
|
454
|
+
} from "@solana/kit";
|
|
576
455
|
|
|
577
456
|
// src/programs/dropsyAirdrop.ts
|
|
578
|
-
|
|
457
|
+
import {
|
|
458
|
+
assertIsInstructionWithAccounts,
|
|
459
|
+
containsBytes,
|
|
460
|
+
fixEncoderSize as fixEncoderSize11,
|
|
461
|
+
getBytesEncoder as getBytesEncoder11
|
|
462
|
+
} from "@solana/kit";
|
|
579
463
|
|
|
580
464
|
// src/instructions/claimAirdrop.ts
|
|
581
|
-
|
|
465
|
+
import {
|
|
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";
|
|
582
483
|
|
|
583
484
|
// src/shared/index.ts
|
|
584
|
-
|
|
485
|
+
import {
|
|
486
|
+
AccountRole,
|
|
487
|
+
isProgramDerivedAddress,
|
|
488
|
+
isTransactionSigner as kitIsTransactionSigner,
|
|
489
|
+
upgradeRoleToSigner
|
|
490
|
+
} from "@solana/kit";
|
|
585
491
|
function expectSome(value) {
|
|
586
492
|
if (value === null || value === void 0) {
|
|
587
493
|
throw new Error("Expected a value but received null or undefined.");
|
|
@@ -606,19 +512,19 @@ function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
|
|
|
606
512
|
if (optionalAccountStrategy === "omitted") return;
|
|
607
513
|
return Object.freeze({
|
|
608
514
|
address: programAddress,
|
|
609
|
-
role:
|
|
515
|
+
role: AccountRole.READONLY
|
|
610
516
|
});
|
|
611
517
|
}
|
|
612
|
-
const writableRole = account.isWritable ?
|
|
518
|
+
const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
|
|
613
519
|
return Object.freeze({
|
|
614
520
|
address: expectAddress(account.value),
|
|
615
|
-
role: isTransactionSigner(account.value) ?
|
|
521
|
+
role: isTransactionSigner(account.value) ? upgradeRoleToSigner(writableRole) : writableRole,
|
|
616
522
|
...isTransactionSigner(account.value) ? { signer: account.value } : {}
|
|
617
523
|
});
|
|
618
524
|
};
|
|
619
525
|
}
|
|
620
526
|
function isTransactionSigner(value) {
|
|
621
|
-
return !!value && typeof value === "object" && "address" in value && (
|
|
527
|
+
return !!value && typeof value === "object" && "address" in value && kitIsTransactionSigner(value);
|
|
622
528
|
}
|
|
623
529
|
|
|
624
530
|
// src/instructions/claimAirdrop.ts
|
|
@@ -633,33 +539,33 @@ var CLAIM_AIRDROP_DISCRIMINATOR = new Uint8Array([
|
|
|
633
539
|
20
|
|
634
540
|
]);
|
|
635
541
|
function getClaimAirdropDiscriminatorBytes() {
|
|
636
|
-
return (
|
|
542
|
+
return fixEncoderSize5(getBytesEncoder5(), 8).encode(
|
|
637
543
|
CLAIM_AIRDROP_DISCRIMINATOR
|
|
638
544
|
);
|
|
639
545
|
}
|
|
640
546
|
function getClaimAirdropInstructionDataEncoder() {
|
|
641
|
-
return (
|
|
642
|
-
(
|
|
643
|
-
["discriminator", (
|
|
644
|
-
["index", (
|
|
645
|
-
["proof",
|
|
646
|
-
["amount", (
|
|
647
|
-
["claimMapIndex", (
|
|
547
|
+
return transformEncoder5(
|
|
548
|
+
getStructEncoder5([
|
|
549
|
+
["discriminator", fixEncoderSize5(getBytesEncoder5(), 8)],
|
|
550
|
+
["index", getU64Encoder4()],
|
|
551
|
+
["proof", getArrayEncoder(fixEncoderSize5(getBytesEncoder5(), 32))],
|
|
552
|
+
["amount", getU64Encoder4()],
|
|
553
|
+
["claimMapIndex", getU16Encoder4()]
|
|
648
554
|
]),
|
|
649
555
|
(value) => ({ ...value, discriminator: CLAIM_AIRDROP_DISCRIMINATOR })
|
|
650
556
|
);
|
|
651
557
|
}
|
|
652
558
|
function getClaimAirdropInstructionDataDecoder() {
|
|
653
|
-
return (
|
|
654
|
-
["discriminator", (
|
|
655
|
-
["index", (
|
|
656
|
-
["proof",
|
|
657
|
-
["amount", (
|
|
658
|
-
["claimMapIndex", (
|
|
559
|
+
return getStructDecoder5([
|
|
560
|
+
["discriminator", fixDecoderSize5(getBytesDecoder5(), 8)],
|
|
561
|
+
["index", getU64Decoder4()],
|
|
562
|
+
["proof", getArrayDecoder(fixDecoderSize5(getBytesDecoder5(), 32))],
|
|
563
|
+
["amount", getU64Decoder4()],
|
|
564
|
+
["claimMapIndex", getU16Decoder4()]
|
|
659
565
|
]);
|
|
660
566
|
}
|
|
661
567
|
function getClaimAirdropInstructionDataCodec() {
|
|
662
|
-
return (
|
|
568
|
+
return combineCodec5(
|
|
663
569
|
getClaimAirdropInstructionDataEncoder(),
|
|
664
570
|
getClaimAirdropInstructionDataDecoder()
|
|
665
571
|
);
|
|
@@ -701,12 +607,12 @@ async function getClaimAirdropInstructionAsync(input, config) {
|
|
|
701
607
|
accounts.tokenProgram.value = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
702
608
|
}
|
|
703
609
|
if (!accounts.destinationTokenAccount.value) {
|
|
704
|
-
accounts.destinationTokenAccount.value = await
|
|
610
|
+
accounts.destinationTokenAccount.value = await getProgramDerivedAddress({
|
|
705
611
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
706
612
|
seeds: [
|
|
707
|
-
(
|
|
708
|
-
(
|
|
709
|
-
(
|
|
613
|
+
getAddressEncoder5().encode(expectAddress(accounts.claimer.value)),
|
|
614
|
+
getAddressEncoder5().encode(expectAddress(accounts.tokenProgram.value)),
|
|
615
|
+
getAddressEncoder5().encode(expectAddress(accounts.mint.value))
|
|
710
616
|
]
|
|
711
617
|
});
|
|
712
618
|
}
|
|
@@ -717,10 +623,10 @@ async function getClaimAirdropInstructionAsync(input, config) {
|
|
|
717
623
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
718
624
|
}
|
|
719
625
|
if (!accounts.airdropConfig.value) {
|
|
720
|
-
accounts.airdropConfig.value = await
|
|
626
|
+
accounts.airdropConfig.value = await getProgramDerivedAddress({
|
|
721
627
|
programAddress,
|
|
722
628
|
seeds: [
|
|
723
|
-
(
|
|
629
|
+
getBytesEncoder5().encode(
|
|
724
630
|
new Uint8Array([
|
|
725
631
|
97,
|
|
726
632
|
105,
|
|
@@ -742,10 +648,10 @@ async function getClaimAirdropInstructionAsync(input, config) {
|
|
|
742
648
|
});
|
|
743
649
|
}
|
|
744
650
|
if (!accounts.airdropMaster.value) {
|
|
745
|
-
accounts.airdropMaster.value = await
|
|
651
|
+
accounts.airdropMaster.value = await getProgramDerivedAddress({
|
|
746
652
|
programAddress,
|
|
747
653
|
seeds: [
|
|
748
|
-
(
|
|
654
|
+
getBytesEncoder5().encode(
|
|
749
655
|
new Uint8Array([
|
|
750
656
|
97,
|
|
751
657
|
105,
|
|
@@ -763,7 +669,7 @@ async function getClaimAirdropInstructionAsync(input, config) {
|
|
|
763
669
|
114
|
|
764
670
|
])
|
|
765
671
|
),
|
|
766
|
-
(
|
|
672
|
+
getAddressEncoder5().encode(expectAddress(accounts.masterCreator.value))
|
|
767
673
|
]
|
|
768
674
|
});
|
|
769
675
|
}
|
|
@@ -893,7 +799,27 @@ function parseClaimAirdropInstruction(instruction) {
|
|
|
893
799
|
}
|
|
894
800
|
|
|
895
801
|
// src/instructions/createAirdrop.ts
|
|
896
|
-
|
|
802
|
+
import {
|
|
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";
|
|
897
823
|
var CREATE_AIRDROP_DISCRIMINATOR = new Uint8Array([
|
|
898
824
|
227,
|
|
899
825
|
135,
|
|
@@ -905,37 +831,37 @@ var CREATE_AIRDROP_DISCRIMINATOR = new Uint8Array([
|
|
|
905
831
|
94
|
|
906
832
|
]);
|
|
907
833
|
function getCreateAirdropDiscriminatorBytes() {
|
|
908
|
-
return (
|
|
834
|
+
return fixEncoderSize6(getBytesEncoder6(), 8).encode(
|
|
909
835
|
CREATE_AIRDROP_DISCRIMINATOR
|
|
910
836
|
);
|
|
911
837
|
}
|
|
912
838
|
function getCreateAirdropInstructionDataEncoder() {
|
|
913
|
-
return (
|
|
914
|
-
(
|
|
915
|
-
["discriminator", (
|
|
916
|
-
["id", (
|
|
917
|
-
["merkleRoot",
|
|
918
|
-
["startsAt",
|
|
919
|
-
["endsAt",
|
|
920
|
-
["version",
|
|
921
|
-
["delegateAuthority",
|
|
839
|
+
return transformEncoder6(
|
|
840
|
+
getStructEncoder6([
|
|
841
|
+
["discriminator", fixEncoderSize6(getBytesEncoder6(), 8)],
|
|
842
|
+
["id", getU64Encoder5()],
|
|
843
|
+
["merkleRoot", getOptionEncoder(fixEncoderSize6(getBytesEncoder6(), 32))],
|
|
844
|
+
["startsAt", getOptionEncoder(getI64Encoder3())],
|
|
845
|
+
["endsAt", getOptionEncoder(getI64Encoder3())],
|
|
846
|
+
["version", getOptionEncoder(getU8Encoder5())],
|
|
847
|
+
["delegateAuthority", getOptionEncoder(getAddressEncoder6())]
|
|
922
848
|
]),
|
|
923
849
|
(value) => ({ ...value, discriminator: CREATE_AIRDROP_DISCRIMINATOR })
|
|
924
850
|
);
|
|
925
851
|
}
|
|
926
852
|
function getCreateAirdropInstructionDataDecoder() {
|
|
927
|
-
return (
|
|
928
|
-
["discriminator", (
|
|
929
|
-
["id", (
|
|
930
|
-
["merkleRoot",
|
|
931
|
-
["startsAt",
|
|
932
|
-
["endsAt",
|
|
933
|
-
["version",
|
|
934
|
-
["delegateAuthority",
|
|
853
|
+
return getStructDecoder6([
|
|
854
|
+
["discriminator", fixDecoderSize6(getBytesDecoder6(), 8)],
|
|
855
|
+
["id", getU64Decoder5()],
|
|
856
|
+
["merkleRoot", getOptionDecoder(fixDecoderSize6(getBytesDecoder6(), 32))],
|
|
857
|
+
["startsAt", getOptionDecoder(getI64Decoder3())],
|
|
858
|
+
["endsAt", getOptionDecoder(getI64Decoder3())],
|
|
859
|
+
["version", getOptionDecoder(getU8Decoder5())],
|
|
860
|
+
["delegateAuthority", getOptionDecoder(getAddressDecoder5())]
|
|
935
861
|
]);
|
|
936
862
|
}
|
|
937
863
|
function getCreateAirdropInstructionDataCodec() {
|
|
938
|
-
return (
|
|
864
|
+
return combineCodec6(
|
|
939
865
|
getCreateAirdropInstructionDataEncoder(),
|
|
940
866
|
getCreateAirdropInstructionDataDecoder()
|
|
941
867
|
);
|
|
@@ -959,10 +885,10 @@ async function getCreateAirdropInstructionAsync(input, config) {
|
|
|
959
885
|
const accounts = originalAccounts;
|
|
960
886
|
const args = { ...input };
|
|
961
887
|
if (!accounts.airdropConfig.value) {
|
|
962
|
-
accounts.airdropConfig.value = await (
|
|
888
|
+
accounts.airdropConfig.value = await getProgramDerivedAddress2({
|
|
963
889
|
programAddress,
|
|
964
890
|
seeds: [
|
|
965
|
-
(
|
|
891
|
+
getBytesEncoder6().encode(
|
|
966
892
|
new Uint8Array([
|
|
967
893
|
97,
|
|
968
894
|
105,
|
|
@@ -984,10 +910,10 @@ async function getCreateAirdropInstructionAsync(input, config) {
|
|
|
984
910
|
});
|
|
985
911
|
}
|
|
986
912
|
if (!accounts.airdropMaster.value) {
|
|
987
|
-
accounts.airdropMaster.value = await (
|
|
913
|
+
accounts.airdropMaster.value = await getProgramDerivedAddress2({
|
|
988
914
|
programAddress,
|
|
989
915
|
seeds: [
|
|
990
|
-
(
|
|
916
|
+
getBytesEncoder6().encode(
|
|
991
917
|
new Uint8Array([
|
|
992
918
|
97,
|
|
993
919
|
105,
|
|
@@ -1005,7 +931,7 @@ async function getCreateAirdropInstructionAsync(input, config) {
|
|
|
1005
931
|
114
|
|
1006
932
|
])
|
|
1007
933
|
),
|
|
1008
|
-
(
|
|
934
|
+
getAddressEncoder6().encode(expectAddress(accounts.masterCreator.value))
|
|
1009
935
|
]
|
|
1010
936
|
});
|
|
1011
937
|
}
|
|
@@ -1099,7 +1025,24 @@ function parseCreateAirdropInstruction(instruction) {
|
|
|
1099
1025
|
}
|
|
1100
1026
|
|
|
1101
1027
|
// src/instructions/createBitmap.ts
|
|
1102
|
-
|
|
1028
|
+
import {
|
|
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
|
+
getU64Decoder as getU64Decoder6,
|
|
1043
|
+
getU64Encoder as getU64Encoder6,
|
|
1044
|
+
transformEncoder as transformEncoder7
|
|
1045
|
+
} from "@solana/kit";
|
|
1103
1046
|
var CREATE_BITMAP_DISCRIMINATOR = new Uint8Array([
|
|
1104
1047
|
69,
|
|
1105
1048
|
92,
|
|
@@ -1111,29 +1054,31 @@ var CREATE_BITMAP_DISCRIMINATOR = new Uint8Array([
|
|
|
1111
1054
|
247
|
|
1112
1055
|
]);
|
|
1113
1056
|
function getCreateBitmapDiscriminatorBytes() {
|
|
1114
|
-
return (
|
|
1057
|
+
return fixEncoderSize7(getBytesEncoder7(), 8).encode(
|
|
1115
1058
|
CREATE_BITMAP_DISCRIMINATOR
|
|
1116
1059
|
);
|
|
1117
1060
|
}
|
|
1118
1061
|
function getCreateBitmapInstructionDataEncoder() {
|
|
1119
|
-
return (
|
|
1120
|
-
(
|
|
1121
|
-
["discriminator", (
|
|
1122
|
-
["id", (
|
|
1123
|
-
["total", (
|
|
1062
|
+
return transformEncoder7(
|
|
1063
|
+
getStructEncoder7([
|
|
1064
|
+
["discriminator", fixEncoderSize7(getBytesEncoder7(), 8)],
|
|
1065
|
+
["id", getU16Encoder5()],
|
|
1066
|
+
["total", getU32Encoder2()],
|
|
1067
|
+
["airdropId", getU64Encoder6()]
|
|
1124
1068
|
]),
|
|
1125
1069
|
(value) => ({ ...value, discriminator: CREATE_BITMAP_DISCRIMINATOR })
|
|
1126
1070
|
);
|
|
1127
1071
|
}
|
|
1128
1072
|
function getCreateBitmapInstructionDataDecoder() {
|
|
1129
|
-
return (
|
|
1130
|
-
["discriminator", (
|
|
1131
|
-
["id", (
|
|
1132
|
-
["total", (
|
|
1073
|
+
return getStructDecoder7([
|
|
1074
|
+
["discriminator", fixDecoderSize7(getBytesDecoder7(), 8)],
|
|
1075
|
+
["id", getU16Decoder5()],
|
|
1076
|
+
["total", getU32Decoder2()],
|
|
1077
|
+
["airdropId", getU64Decoder6()]
|
|
1133
1078
|
]);
|
|
1134
1079
|
}
|
|
1135
1080
|
function getCreateBitmapInstructionDataCodec() {
|
|
1136
|
-
return (
|
|
1081
|
+
return combineCodec7(
|
|
1137
1082
|
getCreateBitmapInstructionDataEncoder(),
|
|
1138
1083
|
getCreateBitmapInstructionDataDecoder()
|
|
1139
1084
|
);
|
|
@@ -1158,10 +1103,10 @@ async function getCreateBitmapInstructionAsync(input, config) {
|
|
|
1158
1103
|
const accounts = originalAccounts;
|
|
1159
1104
|
const args = { ...input };
|
|
1160
1105
|
if (!accounts.airdropConfig.value) {
|
|
1161
|
-
accounts.airdropConfig.value = await (
|
|
1106
|
+
accounts.airdropConfig.value = await getProgramDerivedAddress3({
|
|
1162
1107
|
programAddress,
|
|
1163
1108
|
seeds: [
|
|
1164
|
-
(
|
|
1109
|
+
getBytesEncoder7().encode(
|
|
1165
1110
|
new Uint8Array([
|
|
1166
1111
|
97,
|
|
1167
1112
|
105,
|
|
@@ -1183,10 +1128,10 @@ async function getCreateBitmapInstructionAsync(input, config) {
|
|
|
1183
1128
|
});
|
|
1184
1129
|
}
|
|
1185
1130
|
if (!accounts.airdropMaster.value) {
|
|
1186
|
-
accounts.airdropMaster.value = await (
|
|
1131
|
+
accounts.airdropMaster.value = await getProgramDerivedAddress3({
|
|
1187
1132
|
programAddress,
|
|
1188
1133
|
seeds: [
|
|
1189
|
-
(
|
|
1134
|
+
getBytesEncoder7().encode(
|
|
1190
1135
|
new Uint8Array([
|
|
1191
1136
|
97,
|
|
1192
1137
|
105,
|
|
@@ -1204,29 +1149,30 @@ async function getCreateBitmapInstructionAsync(input, config) {
|
|
|
1204
1149
|
114
|
|
1205
1150
|
])
|
|
1206
1151
|
),
|
|
1207
|
-
(
|
|
1152
|
+
getAddressEncoder7().encode(expectAddress(accounts.masterCreator.value))
|
|
1208
1153
|
]
|
|
1209
1154
|
});
|
|
1210
1155
|
}
|
|
1211
1156
|
if (!accounts.airdrop.value) {
|
|
1212
|
-
accounts.airdrop.value = await (
|
|
1157
|
+
accounts.airdrop.value = await getProgramDerivedAddress3({
|
|
1213
1158
|
programAddress,
|
|
1214
1159
|
seeds: [
|
|
1215
|
-
(
|
|
1160
|
+
getBytesEncoder7().encode(
|
|
1216
1161
|
new Uint8Array([97, 105, 114, 100, 114, 111, 112])
|
|
1217
1162
|
),
|
|
1218
|
-
(
|
|
1219
|
-
(
|
|
1163
|
+
getAddressEncoder7().encode(expectAddress(accounts.authority.value)),
|
|
1164
|
+
getAddressEncoder7().encode(expectAddress(accounts.mint.value)),
|
|
1165
|
+
getU64Encoder6().encode(expectSome(args.airdropId))
|
|
1220
1166
|
]
|
|
1221
1167
|
});
|
|
1222
1168
|
}
|
|
1223
1169
|
if (!accounts.bitmap.value) {
|
|
1224
|
-
accounts.bitmap.value = await (
|
|
1170
|
+
accounts.bitmap.value = await getProgramDerivedAddress3({
|
|
1225
1171
|
programAddress,
|
|
1226
1172
|
seeds: [
|
|
1227
|
-
(
|
|
1228
|
-
(
|
|
1229
|
-
(
|
|
1173
|
+
getBytesEncoder7().encode(new Uint8Array([98, 105, 116, 109, 97, 112])),
|
|
1174
|
+
getAddressEncoder7().encode(expectAddress(accounts.airdrop.value)),
|
|
1175
|
+
getU16Encoder5().encode(expectSome(args.id))
|
|
1230
1176
|
]
|
|
1231
1177
|
});
|
|
1232
1178
|
}
|
|
@@ -1324,7 +1270,20 @@ function parseCreateBitmapInstruction(instruction) {
|
|
|
1324
1270
|
}
|
|
1325
1271
|
|
|
1326
1272
|
// src/instructions/depositTokens.ts
|
|
1327
|
-
|
|
1273
|
+
import {
|
|
1274
|
+
combineCodec as combineCodec8,
|
|
1275
|
+
fixDecoderSize as fixDecoderSize8,
|
|
1276
|
+
fixEncoderSize as fixEncoderSize8,
|
|
1277
|
+
getAddressEncoder as getAddressEncoder8,
|
|
1278
|
+
getBytesDecoder as getBytesDecoder8,
|
|
1279
|
+
getBytesEncoder as getBytesEncoder8,
|
|
1280
|
+
getProgramDerivedAddress as getProgramDerivedAddress4,
|
|
1281
|
+
getStructDecoder as getStructDecoder8,
|
|
1282
|
+
getStructEncoder as getStructEncoder8,
|
|
1283
|
+
getU64Decoder as getU64Decoder7,
|
|
1284
|
+
getU64Encoder as getU64Encoder7,
|
|
1285
|
+
transformEncoder as transformEncoder8
|
|
1286
|
+
} from "@solana/kit";
|
|
1328
1287
|
var DEPOSIT_TOKENS_DISCRIMINATOR = new Uint8Array([
|
|
1329
1288
|
176,
|
|
1330
1289
|
83,
|
|
@@ -1336,27 +1295,29 @@ var DEPOSIT_TOKENS_DISCRIMINATOR = new Uint8Array([
|
|
|
1336
1295
|
150
|
|
1337
1296
|
]);
|
|
1338
1297
|
function getDepositTokensDiscriminatorBytes() {
|
|
1339
|
-
return (
|
|
1298
|
+
return fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
1340
1299
|
DEPOSIT_TOKENS_DISCRIMINATOR
|
|
1341
1300
|
);
|
|
1342
1301
|
}
|
|
1343
1302
|
function getDepositTokensInstructionDataEncoder() {
|
|
1344
|
-
return (
|
|
1345
|
-
(
|
|
1346
|
-
["discriminator", (
|
|
1347
|
-
["amount", (
|
|
1303
|
+
return transformEncoder8(
|
|
1304
|
+
getStructEncoder8([
|
|
1305
|
+
["discriminator", fixEncoderSize8(getBytesEncoder8(), 8)],
|
|
1306
|
+
["amount", getU64Encoder7()],
|
|
1307
|
+
["airdropId", getU64Encoder7()]
|
|
1348
1308
|
]),
|
|
1349
1309
|
(value) => ({ ...value, discriminator: DEPOSIT_TOKENS_DISCRIMINATOR })
|
|
1350
1310
|
);
|
|
1351
1311
|
}
|
|
1352
1312
|
function getDepositTokensInstructionDataDecoder() {
|
|
1353
|
-
return (
|
|
1354
|
-
["discriminator", (
|
|
1355
|
-
["amount", (
|
|
1313
|
+
return getStructDecoder8([
|
|
1314
|
+
["discriminator", fixDecoderSize8(getBytesDecoder8(), 8)],
|
|
1315
|
+
["amount", getU64Decoder7()],
|
|
1316
|
+
["airdropId", getU64Decoder7()]
|
|
1356
1317
|
]);
|
|
1357
1318
|
}
|
|
1358
1319
|
function getDepositTokensInstructionDataCodec() {
|
|
1359
|
-
return (
|
|
1320
|
+
return combineCodec8(
|
|
1360
1321
|
getDepositTokensInstructionDataEncoder(),
|
|
1361
1322
|
getDepositTokensInstructionDataDecoder()
|
|
1362
1323
|
);
|
|
@@ -1382,14 +1343,15 @@ async function getDepositTokensInstructionAsync(input, config) {
|
|
|
1382
1343
|
const accounts = originalAccounts;
|
|
1383
1344
|
const args = { ...input };
|
|
1384
1345
|
if (!accounts.airdrop.value) {
|
|
1385
|
-
accounts.airdrop.value = await (
|
|
1346
|
+
accounts.airdrop.value = await getProgramDerivedAddress4({
|
|
1386
1347
|
programAddress,
|
|
1387
1348
|
seeds: [
|
|
1388
|
-
(
|
|
1349
|
+
getBytesEncoder8().encode(
|
|
1389
1350
|
new Uint8Array([97, 105, 114, 100, 114, 111, 112])
|
|
1390
1351
|
),
|
|
1391
|
-
(
|
|
1392
|
-
(
|
|
1352
|
+
getAddressEncoder8().encode(expectAddress(accounts.authority.value)),
|
|
1353
|
+
getAddressEncoder8().encode(expectAddress(accounts.mint.value)),
|
|
1354
|
+
getU64Encoder7().encode(expectSome(args.airdropId))
|
|
1393
1355
|
]
|
|
1394
1356
|
});
|
|
1395
1357
|
}
|
|
@@ -1397,12 +1359,12 @@ async function getDepositTokensInstructionAsync(input, config) {
|
|
|
1397
1359
|
accounts.tokenProgram.value = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
1398
1360
|
}
|
|
1399
1361
|
if (!accounts.vault.value) {
|
|
1400
|
-
accounts.vault.value = await (
|
|
1362
|
+
accounts.vault.value = await getProgramDerivedAddress4({
|
|
1401
1363
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
1402
1364
|
seeds: [
|
|
1403
|
-
(
|
|
1404
|
-
(
|
|
1405
|
-
(
|
|
1365
|
+
getAddressEncoder8().encode(expectAddress(accounts.airdrop.value)),
|
|
1366
|
+
getAddressEncoder8().encode(expectAddress(accounts.tokenProgram.value)),
|
|
1367
|
+
getAddressEncoder8().encode(expectAddress(accounts.mint.value))
|
|
1406
1368
|
]
|
|
1407
1369
|
});
|
|
1408
1370
|
}
|
|
@@ -1504,7 +1466,25 @@ function parseDepositTokensInstruction(instruction) {
|
|
|
1504
1466
|
}
|
|
1505
1467
|
|
|
1506
1468
|
// src/instructions/initializeAirdropConfig.ts
|
|
1507
|
-
|
|
1469
|
+
import {
|
|
1470
|
+
combineCodec as combineCodec9,
|
|
1471
|
+
fixDecoderSize as fixDecoderSize9,
|
|
1472
|
+
fixEncoderSize as fixEncoderSize9,
|
|
1473
|
+
getBytesDecoder as getBytesDecoder9,
|
|
1474
|
+
getBytesEncoder as getBytesEncoder9,
|
|
1475
|
+
getI64Decoder as getI64Decoder4,
|
|
1476
|
+
getI64Encoder as getI64Encoder4,
|
|
1477
|
+
getOptionDecoder as getOptionDecoder2,
|
|
1478
|
+
getOptionEncoder as getOptionEncoder2,
|
|
1479
|
+
getProgramDerivedAddress as getProgramDerivedAddress5,
|
|
1480
|
+
getStructDecoder as getStructDecoder9,
|
|
1481
|
+
getStructEncoder as getStructEncoder9,
|
|
1482
|
+
getU16Decoder as getU16Decoder6,
|
|
1483
|
+
getU16Encoder as getU16Encoder6,
|
|
1484
|
+
getU64Decoder as getU64Decoder8,
|
|
1485
|
+
getU64Encoder as getU64Encoder8,
|
|
1486
|
+
transformEncoder as transformEncoder9
|
|
1487
|
+
} from "@solana/kit";
|
|
1508
1488
|
var INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
1509
1489
|
160,
|
|
1510
1490
|
68,
|
|
@@ -1516,24 +1496,24 @@ var INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
|
1516
1496
|
94
|
|
1517
1497
|
]);
|
|
1518
1498
|
function getInitializeAirdropConfigDiscriminatorBytes() {
|
|
1519
|
-
return (
|
|
1499
|
+
return fixEncoderSize9(getBytesEncoder9(), 8).encode(
|
|
1520
1500
|
INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR
|
|
1521
1501
|
);
|
|
1522
1502
|
}
|
|
1523
1503
|
function getInitializeAirdropConfigInstructionDataEncoder() {
|
|
1524
|
-
return (
|
|
1525
|
-
(
|
|
1526
|
-
["discriminator", (
|
|
1527
|
-
["wlRoot", (
|
|
1528
|
-
["airdropMasterCreateFee", (
|
|
1529
|
-
["maxClaimFee", (
|
|
1530
|
-
["maxActionFee", (
|
|
1531
|
-
["minAirdropDuration", (
|
|
1532
|
-
["defaultAirdropDuration", (
|
|
1533
|
-
["maxAirdropDuration", (
|
|
1534
|
-
["updateGracePeriod", (
|
|
1535
|
-
["protocolFee", (
|
|
1536
|
-
["masterFeeBps", (
|
|
1504
|
+
return transformEncoder9(
|
|
1505
|
+
getStructEncoder9([
|
|
1506
|
+
["discriminator", fixEncoderSize9(getBytesEncoder9(), 8)],
|
|
1507
|
+
["wlRoot", getOptionEncoder2(fixEncoderSize9(getBytesEncoder9(), 32))],
|
|
1508
|
+
["airdropMasterCreateFee", getOptionEncoder2(getU64Encoder8())],
|
|
1509
|
+
["maxClaimFee", getOptionEncoder2(getU64Encoder8())],
|
|
1510
|
+
["maxActionFee", getOptionEncoder2(getU64Encoder8())],
|
|
1511
|
+
["minAirdropDuration", getOptionEncoder2(getI64Encoder4())],
|
|
1512
|
+
["defaultAirdropDuration", getOptionEncoder2(getI64Encoder4())],
|
|
1513
|
+
["maxAirdropDuration", getOptionEncoder2(getI64Encoder4())],
|
|
1514
|
+
["updateGracePeriod", getOptionEncoder2(getI64Encoder4())],
|
|
1515
|
+
["protocolFee", getOptionEncoder2(getU64Encoder8())],
|
|
1516
|
+
["masterFeeBps", getOptionEncoder2(getU16Encoder6())]
|
|
1537
1517
|
]),
|
|
1538
1518
|
(value) => ({
|
|
1539
1519
|
...value,
|
|
@@ -1542,22 +1522,22 @@ function getInitializeAirdropConfigInstructionDataEncoder() {
|
|
|
1542
1522
|
);
|
|
1543
1523
|
}
|
|
1544
1524
|
function getInitializeAirdropConfigInstructionDataDecoder() {
|
|
1545
|
-
return (
|
|
1546
|
-
["discriminator", (
|
|
1547
|
-
["wlRoot", (
|
|
1548
|
-
["airdropMasterCreateFee", (
|
|
1549
|
-
["maxClaimFee", (
|
|
1550
|
-
["maxActionFee", (
|
|
1551
|
-
["minAirdropDuration", (
|
|
1552
|
-
["defaultAirdropDuration", (
|
|
1553
|
-
["maxAirdropDuration", (
|
|
1554
|
-
["updateGracePeriod", (
|
|
1555
|
-
["protocolFee", (
|
|
1556
|
-
["masterFeeBps", (
|
|
1525
|
+
return getStructDecoder9([
|
|
1526
|
+
["discriminator", fixDecoderSize9(getBytesDecoder9(), 8)],
|
|
1527
|
+
["wlRoot", getOptionDecoder2(fixDecoderSize9(getBytesDecoder9(), 32))],
|
|
1528
|
+
["airdropMasterCreateFee", getOptionDecoder2(getU64Decoder8())],
|
|
1529
|
+
["maxClaimFee", getOptionDecoder2(getU64Decoder8())],
|
|
1530
|
+
["maxActionFee", getOptionDecoder2(getU64Decoder8())],
|
|
1531
|
+
["minAirdropDuration", getOptionDecoder2(getI64Decoder4())],
|
|
1532
|
+
["defaultAirdropDuration", getOptionDecoder2(getI64Decoder4())],
|
|
1533
|
+
["maxAirdropDuration", getOptionDecoder2(getI64Decoder4())],
|
|
1534
|
+
["updateGracePeriod", getOptionDecoder2(getI64Decoder4())],
|
|
1535
|
+
["protocolFee", getOptionDecoder2(getU64Decoder8())],
|
|
1536
|
+
["masterFeeBps", getOptionDecoder2(getU16Decoder6())]
|
|
1557
1537
|
]);
|
|
1558
1538
|
}
|
|
1559
1539
|
function getInitializeAirdropConfigInstructionDataCodec() {
|
|
1560
|
-
return (
|
|
1540
|
+
return combineCodec9(
|
|
1561
1541
|
getInitializeAirdropConfigInstructionDataEncoder(),
|
|
1562
1542
|
getInitializeAirdropConfigInstructionDataDecoder()
|
|
1563
1543
|
);
|
|
@@ -1576,10 +1556,10 @@ async function getInitializeAirdropConfigInstructionAsync(input, config) {
|
|
|
1576
1556
|
const accounts = originalAccounts;
|
|
1577
1557
|
const args = { ...input };
|
|
1578
1558
|
if (!accounts.config.value) {
|
|
1579
|
-
accounts.config.value = await (
|
|
1559
|
+
accounts.config.value = await getProgramDerivedAddress5({
|
|
1580
1560
|
programAddress,
|
|
1581
1561
|
seeds: [
|
|
1582
|
-
(
|
|
1562
|
+
getBytesEncoder9().encode(
|
|
1583
1563
|
new Uint8Array([
|
|
1584
1564
|
97,
|
|
1585
1565
|
105,
|
|
@@ -1601,7 +1581,7 @@ async function getInitializeAirdropConfigInstructionAsync(input, config) {
|
|
|
1601
1581
|
});
|
|
1602
1582
|
}
|
|
1603
1583
|
if (!accounts.authority.value) {
|
|
1604
|
-
accounts.authority.value = "
|
|
1584
|
+
accounts.authority.value = "5gB7WLoBWELAvRDYPUvGj7e7BHEv65j6YDhissdMTQ4F";
|
|
1605
1585
|
}
|
|
1606
1586
|
if (!accounts.systemProgram.value) {
|
|
1607
1587
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
@@ -1634,7 +1614,7 @@ function getInitializeAirdropConfigInstruction(input, config) {
|
|
|
1634
1614
|
const accounts = originalAccounts;
|
|
1635
1615
|
const args = { ...input };
|
|
1636
1616
|
if (!accounts.authority.value) {
|
|
1637
|
-
accounts.authority.value = "
|
|
1617
|
+
accounts.authority.value = "5gB7WLoBWELAvRDYPUvGj7e7BHEv65j6YDhissdMTQ4F";
|
|
1638
1618
|
}
|
|
1639
1619
|
if (!accounts.systemProgram.value) {
|
|
1640
1620
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
@@ -1678,7 +1658,24 @@ function parseInitializeAirdropConfigInstruction(instruction) {
|
|
|
1678
1658
|
}
|
|
1679
1659
|
|
|
1680
1660
|
// src/instructions/initializeAirdropMaster.ts
|
|
1681
|
-
|
|
1661
|
+
import {
|
|
1662
|
+
combineCodec as combineCodec10,
|
|
1663
|
+
fixDecoderSize as fixDecoderSize10,
|
|
1664
|
+
fixEncoderSize as fixEncoderSize10,
|
|
1665
|
+
getAddressEncoder as getAddressEncoder9,
|
|
1666
|
+
getArrayDecoder as getArrayDecoder2,
|
|
1667
|
+
getArrayEncoder as getArrayEncoder2,
|
|
1668
|
+
getBytesDecoder as getBytesDecoder10,
|
|
1669
|
+
getBytesEncoder as getBytesEncoder10,
|
|
1670
|
+
getOptionDecoder as getOptionDecoder3,
|
|
1671
|
+
getOptionEncoder as getOptionEncoder3,
|
|
1672
|
+
getProgramDerivedAddress as getProgramDerivedAddress6,
|
|
1673
|
+
getStructDecoder as getStructDecoder10,
|
|
1674
|
+
getStructEncoder as getStructEncoder10,
|
|
1675
|
+
getU64Decoder as getU64Decoder9,
|
|
1676
|
+
getU64Encoder as getU64Encoder9,
|
|
1677
|
+
transformEncoder as transformEncoder10
|
|
1678
|
+
} from "@solana/kit";
|
|
1682
1679
|
var INITIALIZE_AIRDROP_MASTER_DISCRIMINATOR = new Uint8Array([
|
|
1683
1680
|
163,
|
|
1684
1681
|
197,
|
|
@@ -1690,23 +1687,23 @@ var INITIALIZE_AIRDROP_MASTER_DISCRIMINATOR = new Uint8Array([
|
|
|
1690
1687
|
65
|
|
1691
1688
|
]);
|
|
1692
1689
|
function getInitializeAirdropMasterDiscriminatorBytes() {
|
|
1693
|
-
return (
|
|
1690
|
+
return fixEncoderSize10(getBytesEncoder10(), 8).encode(
|
|
1694
1691
|
INITIALIZE_AIRDROP_MASTER_DISCRIMINATOR
|
|
1695
1692
|
);
|
|
1696
1693
|
}
|
|
1697
1694
|
function getInitializeAirdropMasterInstructionDataEncoder() {
|
|
1698
|
-
return (
|
|
1699
|
-
(
|
|
1700
|
-
["discriminator", (
|
|
1701
|
-
["airdropUpdateFee", (
|
|
1702
|
-
["airdropCreationFee", (
|
|
1703
|
-
["airdropClaimFee", (
|
|
1704
|
-
["airdropDelegateFee", (
|
|
1705
|
-
["bitmapCreationFee", (
|
|
1695
|
+
return transformEncoder10(
|
|
1696
|
+
getStructEncoder10([
|
|
1697
|
+
["discriminator", fixEncoderSize10(getBytesEncoder10(), 8)],
|
|
1698
|
+
["airdropUpdateFee", getOptionEncoder3(getU64Encoder9())],
|
|
1699
|
+
["airdropCreationFee", getOptionEncoder3(getU64Encoder9())],
|
|
1700
|
+
["airdropClaimFee", getOptionEncoder3(getU64Encoder9())],
|
|
1701
|
+
["airdropDelegateFee", getOptionEncoder3(getU64Encoder9())],
|
|
1702
|
+
["bitmapCreationFee", getOptionEncoder3(getU64Encoder9())],
|
|
1706
1703
|
[
|
|
1707
1704
|
"discountProof",
|
|
1708
|
-
(
|
|
1709
|
-
(
|
|
1705
|
+
getOptionEncoder3(
|
|
1706
|
+
getArrayEncoder2(fixEncoderSize10(getBytesEncoder10(), 32))
|
|
1710
1707
|
)
|
|
1711
1708
|
]
|
|
1712
1709
|
]),
|
|
@@ -1717,21 +1714,21 @@ function getInitializeAirdropMasterInstructionDataEncoder() {
|
|
|
1717
1714
|
);
|
|
1718
1715
|
}
|
|
1719
1716
|
function getInitializeAirdropMasterInstructionDataDecoder() {
|
|
1720
|
-
return (
|
|
1721
|
-
["discriminator", (
|
|
1722
|
-
["airdropUpdateFee", (
|
|
1723
|
-
["airdropCreationFee", (
|
|
1724
|
-
["airdropClaimFee", (
|
|
1725
|
-
["airdropDelegateFee", (
|
|
1726
|
-
["bitmapCreationFee", (
|
|
1717
|
+
return getStructDecoder10([
|
|
1718
|
+
["discriminator", fixDecoderSize10(getBytesDecoder10(), 8)],
|
|
1719
|
+
["airdropUpdateFee", getOptionDecoder3(getU64Decoder9())],
|
|
1720
|
+
["airdropCreationFee", getOptionDecoder3(getU64Decoder9())],
|
|
1721
|
+
["airdropClaimFee", getOptionDecoder3(getU64Decoder9())],
|
|
1722
|
+
["airdropDelegateFee", getOptionDecoder3(getU64Decoder9())],
|
|
1723
|
+
["bitmapCreationFee", getOptionDecoder3(getU64Decoder9())],
|
|
1727
1724
|
[
|
|
1728
1725
|
"discountProof",
|
|
1729
|
-
(
|
|
1726
|
+
getOptionDecoder3(getArrayDecoder2(fixDecoderSize10(getBytesDecoder10(), 32)))
|
|
1730
1727
|
]
|
|
1731
1728
|
]);
|
|
1732
1729
|
}
|
|
1733
1730
|
function getInitializeAirdropMasterInstructionDataCodec() {
|
|
1734
|
-
return (
|
|
1731
|
+
return combineCodec10(
|
|
1735
1732
|
getInitializeAirdropMasterInstructionDataEncoder(),
|
|
1736
1733
|
getInitializeAirdropMasterInstructionDataDecoder()
|
|
1737
1734
|
);
|
|
@@ -1753,10 +1750,10 @@ async function getInitializeAirdropMasterInstructionAsync(input, config) {
|
|
|
1753
1750
|
const accounts = originalAccounts;
|
|
1754
1751
|
const args = { ...input };
|
|
1755
1752
|
if (!accounts.config.value) {
|
|
1756
|
-
accounts.config.value = await (
|
|
1753
|
+
accounts.config.value = await getProgramDerivedAddress6({
|
|
1757
1754
|
programAddress,
|
|
1758
1755
|
seeds: [
|
|
1759
|
-
(
|
|
1756
|
+
getBytesEncoder10().encode(
|
|
1760
1757
|
new Uint8Array([
|
|
1761
1758
|
97,
|
|
1762
1759
|
105,
|
|
@@ -1778,10 +1775,10 @@ async function getInitializeAirdropMasterInstructionAsync(input, config) {
|
|
|
1778
1775
|
});
|
|
1779
1776
|
}
|
|
1780
1777
|
if (!accounts.airdropMaster.value) {
|
|
1781
|
-
accounts.airdropMaster.value = await (
|
|
1778
|
+
accounts.airdropMaster.value = await getProgramDerivedAddress6({
|
|
1782
1779
|
programAddress,
|
|
1783
1780
|
seeds: [
|
|
1784
|
-
(
|
|
1781
|
+
getBytesEncoder10().encode(
|
|
1785
1782
|
new Uint8Array([
|
|
1786
1783
|
97,
|
|
1787
1784
|
105,
|
|
@@ -1799,7 +1796,7 @@ async function getInitializeAirdropMasterInstructionAsync(input, config) {
|
|
|
1799
1796
|
114
|
|
1800
1797
|
])
|
|
1801
1798
|
),
|
|
1802
|
-
(
|
|
1799
|
+
getAddressEncoder9().encode(expectAddress(accounts.creator.value))
|
|
1803
1800
|
]
|
|
1804
1801
|
});
|
|
1805
1802
|
}
|
|
@@ -1901,36 +1898,36 @@ var DropsyAirdropAccount = /* @__PURE__ */ ((DropsyAirdropAccount2) => {
|
|
|
1901
1898
|
})(DropsyAirdropAccount || {});
|
|
1902
1899
|
function identifyDropsyAirdropAccount(account) {
|
|
1903
1900
|
const data = "data" in account ? account.data : account;
|
|
1904
|
-
if (
|
|
1901
|
+
if (containsBytes(
|
|
1905
1902
|
data,
|
|
1906
|
-
(
|
|
1903
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1907
1904
|
new Uint8Array([31, 112, 159, 158, 124, 237, 9, 241])
|
|
1908
1905
|
),
|
|
1909
1906
|
0
|
|
1910
1907
|
)) {
|
|
1911
1908
|
return 0 /* Airdrop */;
|
|
1912
1909
|
}
|
|
1913
|
-
if (
|
|
1910
|
+
if (containsBytes(
|
|
1914
1911
|
data,
|
|
1915
|
-
(
|
|
1912
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1916
1913
|
new Uint8Array([194, 149, 223, 142, 42, 98, 128, 16])
|
|
1917
1914
|
),
|
|
1918
1915
|
0
|
|
1919
1916
|
)) {
|
|
1920
1917
|
return 1 /* AirdropConfig */;
|
|
1921
1918
|
}
|
|
1922
|
-
if (
|
|
1919
|
+
if (containsBytes(
|
|
1923
1920
|
data,
|
|
1924
|
-
(
|
|
1921
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1925
1922
|
new Uint8Array([31, 109, 100, 62, 106, 173, 5, 4])
|
|
1926
1923
|
),
|
|
1927
1924
|
0
|
|
1928
1925
|
)) {
|
|
1929
1926
|
return 2 /* AirdropMaster */;
|
|
1930
1927
|
}
|
|
1931
|
-
if (
|
|
1928
|
+
if (containsBytes(
|
|
1932
1929
|
data,
|
|
1933
|
-
(
|
|
1930
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1934
1931
|
new Uint8Array([152, 161, 147, 85, 213, 38, 59, 48])
|
|
1935
1932
|
),
|
|
1936
1933
|
0
|
|
@@ -1952,54 +1949,54 @@ var DropsyAirdropInstruction = /* @__PURE__ */ ((DropsyAirdropInstruction2) => {
|
|
|
1952
1949
|
})(DropsyAirdropInstruction || {});
|
|
1953
1950
|
function identifyDropsyAirdropInstruction(instruction) {
|
|
1954
1951
|
const data = "data" in instruction ? instruction.data : instruction;
|
|
1955
|
-
if (
|
|
1952
|
+
if (containsBytes(
|
|
1956
1953
|
data,
|
|
1957
|
-
(
|
|
1954
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1958
1955
|
new Uint8Array([137, 50, 122, 111, 89, 254, 8, 20])
|
|
1959
1956
|
),
|
|
1960
1957
|
0
|
|
1961
1958
|
)) {
|
|
1962
1959
|
return 0 /* ClaimAirdrop */;
|
|
1963
1960
|
}
|
|
1964
|
-
if (
|
|
1961
|
+
if (containsBytes(
|
|
1965
1962
|
data,
|
|
1966
|
-
(
|
|
1963
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1967
1964
|
new Uint8Array([227, 135, 208, 66, 137, 177, 80, 94])
|
|
1968
1965
|
),
|
|
1969
1966
|
0
|
|
1970
1967
|
)) {
|
|
1971
1968
|
return 1 /* CreateAirdrop */;
|
|
1972
1969
|
}
|
|
1973
|
-
if (
|
|
1970
|
+
if (containsBytes(
|
|
1974
1971
|
data,
|
|
1975
|
-
(
|
|
1972
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1976
1973
|
new Uint8Array([69, 92, 61, 190, 154, 237, 116, 247])
|
|
1977
1974
|
),
|
|
1978
1975
|
0
|
|
1979
1976
|
)) {
|
|
1980
1977
|
return 2 /* CreateBitmap */;
|
|
1981
1978
|
}
|
|
1982
|
-
if (
|
|
1979
|
+
if (containsBytes(
|
|
1983
1980
|
data,
|
|
1984
|
-
(
|
|
1981
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1985
1982
|
new Uint8Array([176, 83, 229, 18, 191, 143, 176, 150])
|
|
1986
1983
|
),
|
|
1987
1984
|
0
|
|
1988
1985
|
)) {
|
|
1989
1986
|
return 3 /* DepositTokens */;
|
|
1990
1987
|
}
|
|
1991
|
-
if (
|
|
1988
|
+
if (containsBytes(
|
|
1992
1989
|
data,
|
|
1993
|
-
(
|
|
1990
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1994
1991
|
new Uint8Array([160, 68, 127, 205, 130, 205, 156, 94])
|
|
1995
1992
|
),
|
|
1996
1993
|
0
|
|
1997
1994
|
)) {
|
|
1998
1995
|
return 4 /* InitializeAirdropConfig */;
|
|
1999
1996
|
}
|
|
2000
|
-
if (
|
|
1997
|
+
if (containsBytes(
|
|
2001
1998
|
data,
|
|
2002
|
-
(
|
|
1999
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
2003
2000
|
new Uint8Array([163, 197, 170, 44, 57, 57, 90, 65])
|
|
2004
2001
|
),
|
|
2005
2002
|
0
|
|
@@ -2014,42 +2011,42 @@ function parseDropsyAirdropInstruction(instruction) {
|
|
|
2014
2011
|
const instructionType = identifyDropsyAirdropInstruction(instruction);
|
|
2015
2012
|
switch (instructionType) {
|
|
2016
2013
|
case 0 /* ClaimAirdrop */: {
|
|
2017
|
-
|
|
2014
|
+
assertIsInstructionWithAccounts(instruction);
|
|
2018
2015
|
return {
|
|
2019
2016
|
instructionType: 0 /* ClaimAirdrop */,
|
|
2020
2017
|
...parseClaimAirdropInstruction(instruction)
|
|
2021
2018
|
};
|
|
2022
2019
|
}
|
|
2023
2020
|
case 1 /* CreateAirdrop */: {
|
|
2024
|
-
|
|
2021
|
+
assertIsInstructionWithAccounts(instruction);
|
|
2025
2022
|
return {
|
|
2026
2023
|
instructionType: 1 /* CreateAirdrop */,
|
|
2027
2024
|
...parseCreateAirdropInstruction(instruction)
|
|
2028
2025
|
};
|
|
2029
2026
|
}
|
|
2030
2027
|
case 2 /* CreateBitmap */: {
|
|
2031
|
-
|
|
2028
|
+
assertIsInstructionWithAccounts(instruction);
|
|
2032
2029
|
return {
|
|
2033
2030
|
instructionType: 2 /* CreateBitmap */,
|
|
2034
2031
|
...parseCreateBitmapInstruction(instruction)
|
|
2035
2032
|
};
|
|
2036
2033
|
}
|
|
2037
2034
|
case 3 /* DepositTokens */: {
|
|
2038
|
-
|
|
2035
|
+
assertIsInstructionWithAccounts(instruction);
|
|
2039
2036
|
return {
|
|
2040
2037
|
instructionType: 3 /* DepositTokens */,
|
|
2041
2038
|
...parseDepositTokensInstruction(instruction)
|
|
2042
2039
|
};
|
|
2043
2040
|
}
|
|
2044
2041
|
case 4 /* InitializeAirdropConfig */: {
|
|
2045
|
-
|
|
2042
|
+
assertIsInstructionWithAccounts(instruction);
|
|
2046
2043
|
return {
|
|
2047
2044
|
instructionType: 4 /* InitializeAirdropConfig */,
|
|
2048
2045
|
...parseInitializeAirdropConfigInstruction(instruction)
|
|
2049
2046
|
};
|
|
2050
2047
|
}
|
|
2051
2048
|
case 5 /* InitializeAirdropMaster */: {
|
|
2052
|
-
|
|
2049
|
+
assertIsInstructionWithAccounts(instruction);
|
|
2053
2050
|
return {
|
|
2054
2051
|
instructionType: 5 /* InitializeAirdropMaster */,
|
|
2055
2052
|
...parseInitializeAirdropMasterInstruction(instruction)
|
|
@@ -2221,7 +2218,7 @@ function getDropsyAirdropErrorMessage(code) {
|
|
|
2221
2218
|
return "Error message not available in production bundles.";
|
|
2222
2219
|
}
|
|
2223
2220
|
function isDropsyAirdropError(error, transactionMessage, code) {
|
|
2224
|
-
return
|
|
2221
|
+
return isProgramError(
|
|
2225
2222
|
error,
|
|
2226
2223
|
transactionMessage,
|
|
2227
2224
|
DROPSY_AIRDROP_PROGRAM_ADDRESS,
|
|
@@ -2230,128 +2227,173 @@ function isDropsyAirdropError(error, transactionMessage, code) {
|
|
|
2230
2227
|
}
|
|
2231
2228
|
|
|
2232
2229
|
// src/types/airdropInitialized.ts
|
|
2233
|
-
|
|
2230
|
+
import {
|
|
2231
|
+
combineCodec as combineCodec11,
|
|
2232
|
+
fixDecoderSize as fixDecoderSize11,
|
|
2233
|
+
fixEncoderSize as fixEncoderSize12,
|
|
2234
|
+
getAddressDecoder as getAddressDecoder6,
|
|
2235
|
+
getAddressEncoder as getAddressEncoder10,
|
|
2236
|
+
getBytesDecoder as getBytesDecoder11,
|
|
2237
|
+
getBytesEncoder as getBytesEncoder12,
|
|
2238
|
+
getI64Decoder as getI64Decoder5,
|
|
2239
|
+
getI64Encoder as getI64Encoder5,
|
|
2240
|
+
getStructDecoder as getStructDecoder11,
|
|
2241
|
+
getStructEncoder as getStructEncoder11
|
|
2242
|
+
} from "@solana/kit";
|
|
2234
2243
|
function getAirdropInitializedEncoder() {
|
|
2235
|
-
return (
|
|
2236
|
-
["airdrop", (
|
|
2237
|
-
["mint", (
|
|
2238
|
-
["authority", (
|
|
2239
|
-
["master", (
|
|
2240
|
-
["merkleRoot", (
|
|
2241
|
-
["startTime", (
|
|
2242
|
-
["endTime", (
|
|
2243
|
-
["timestamp", (
|
|
2244
|
+
return getStructEncoder11([
|
|
2245
|
+
["airdrop", getAddressEncoder10()],
|
|
2246
|
+
["mint", getAddressEncoder10()],
|
|
2247
|
+
["authority", getAddressEncoder10()],
|
|
2248
|
+
["master", getAddressEncoder10()],
|
|
2249
|
+
["merkleRoot", fixEncoderSize12(getBytesEncoder12(), 32)],
|
|
2250
|
+
["startTime", getI64Encoder5()],
|
|
2251
|
+
["endTime", getI64Encoder5()],
|
|
2252
|
+
["timestamp", getI64Encoder5()]
|
|
2244
2253
|
]);
|
|
2245
2254
|
}
|
|
2246
2255
|
function getAirdropInitializedDecoder() {
|
|
2247
|
-
return (
|
|
2248
|
-
["airdrop", (
|
|
2249
|
-
["mint", (
|
|
2250
|
-
["authority", (
|
|
2251
|
-
["master", (
|
|
2252
|
-
["merkleRoot", (
|
|
2253
|
-
["startTime", (
|
|
2254
|
-
["endTime", (
|
|
2255
|
-
["timestamp", (
|
|
2256
|
+
return getStructDecoder11([
|
|
2257
|
+
["airdrop", getAddressDecoder6()],
|
|
2258
|
+
["mint", getAddressDecoder6()],
|
|
2259
|
+
["authority", getAddressDecoder6()],
|
|
2260
|
+
["master", getAddressDecoder6()],
|
|
2261
|
+
["merkleRoot", fixDecoderSize11(getBytesDecoder11(), 32)],
|
|
2262
|
+
["startTime", getI64Decoder5()],
|
|
2263
|
+
["endTime", getI64Decoder5()],
|
|
2264
|
+
["timestamp", getI64Decoder5()]
|
|
2256
2265
|
]);
|
|
2257
2266
|
}
|
|
2258
2267
|
function getAirdropInitializedCodec() {
|
|
2259
|
-
return (
|
|
2268
|
+
return combineCodec11(
|
|
2260
2269
|
getAirdropInitializedEncoder(),
|
|
2261
2270
|
getAirdropInitializedDecoder()
|
|
2262
2271
|
);
|
|
2263
2272
|
}
|
|
2264
2273
|
|
|
2265
2274
|
// src/types/bitmapClosed.ts
|
|
2266
|
-
|
|
2275
|
+
import {
|
|
2276
|
+
combineCodec as combineCodec12,
|
|
2277
|
+
getAddressDecoder as getAddressDecoder7,
|
|
2278
|
+
getAddressEncoder as getAddressEncoder11,
|
|
2279
|
+
getStructDecoder as getStructDecoder12,
|
|
2280
|
+
getStructEncoder as getStructEncoder12
|
|
2281
|
+
} from "@solana/kit";
|
|
2267
2282
|
function getBitmapClosedEncoder() {
|
|
2268
|
-
return (
|
|
2269
|
-
["airdrop", (
|
|
2270
|
-
["bitmap", (
|
|
2271
|
-
["authority", (
|
|
2283
|
+
return getStructEncoder12([
|
|
2284
|
+
["airdrop", getAddressEncoder11()],
|
|
2285
|
+
["bitmap", getAddressEncoder11()],
|
|
2286
|
+
["authority", getAddressEncoder11()]
|
|
2272
2287
|
]);
|
|
2273
2288
|
}
|
|
2274
2289
|
function getBitmapClosedDecoder() {
|
|
2275
|
-
return (
|
|
2276
|
-
["airdrop", (
|
|
2277
|
-
["bitmap", (
|
|
2278
|
-
["authority", (
|
|
2290
|
+
return getStructDecoder12([
|
|
2291
|
+
["airdrop", getAddressDecoder7()],
|
|
2292
|
+
["bitmap", getAddressDecoder7()],
|
|
2293
|
+
["authority", getAddressDecoder7()]
|
|
2279
2294
|
]);
|
|
2280
2295
|
}
|
|
2281
2296
|
function getBitmapClosedCodec() {
|
|
2282
|
-
return (
|
|
2297
|
+
return combineCodec12(getBitmapClosedEncoder(), getBitmapClosedDecoder());
|
|
2283
2298
|
}
|
|
2284
2299
|
|
|
2285
2300
|
// src/types/bitmapInitialized.ts
|
|
2286
|
-
|
|
2301
|
+
import {
|
|
2302
|
+
combineCodec as combineCodec13,
|
|
2303
|
+
getAddressDecoder as getAddressDecoder8,
|
|
2304
|
+
getAddressEncoder as getAddressEncoder12,
|
|
2305
|
+
getI64Decoder as getI64Decoder6,
|
|
2306
|
+
getI64Encoder as getI64Encoder6,
|
|
2307
|
+
getStructDecoder as getStructDecoder13,
|
|
2308
|
+
getStructEncoder as getStructEncoder13,
|
|
2309
|
+
getU16Decoder as getU16Decoder7,
|
|
2310
|
+
getU16Encoder as getU16Encoder7
|
|
2311
|
+
} from "@solana/kit";
|
|
2287
2312
|
function getBitmapInitializedEncoder() {
|
|
2288
|
-
return (
|
|
2289
|
-
["airdrop", (
|
|
2290
|
-
["bitmap", (
|
|
2291
|
-
["bitmapId", (
|
|
2292
|
-
["timestamp", (
|
|
2313
|
+
return getStructEncoder13([
|
|
2314
|
+
["airdrop", getAddressEncoder12()],
|
|
2315
|
+
["bitmap", getAddressEncoder12()],
|
|
2316
|
+
["bitmapId", getU16Encoder7()],
|
|
2317
|
+
["timestamp", getI64Encoder6()]
|
|
2293
2318
|
]);
|
|
2294
2319
|
}
|
|
2295
2320
|
function getBitmapInitializedDecoder() {
|
|
2296
|
-
return (
|
|
2297
|
-
["airdrop", (
|
|
2298
|
-
["bitmap", (
|
|
2299
|
-
["bitmapId", (
|
|
2300
|
-
["timestamp", (
|
|
2321
|
+
return getStructDecoder13([
|
|
2322
|
+
["airdrop", getAddressDecoder8()],
|
|
2323
|
+
["bitmap", getAddressDecoder8()],
|
|
2324
|
+
["bitmapId", getU16Decoder7()],
|
|
2325
|
+
["timestamp", getI64Decoder6()]
|
|
2301
2326
|
]);
|
|
2302
2327
|
}
|
|
2303
2328
|
function getBitmapInitializedCodec() {
|
|
2304
|
-
return (
|
|
2329
|
+
return combineCodec13(
|
|
2305
2330
|
getBitmapInitializedEncoder(),
|
|
2306
2331
|
getBitmapInitializedDecoder()
|
|
2307
2332
|
);
|
|
2308
2333
|
}
|
|
2309
2334
|
|
|
2310
2335
|
// src/types/tokensDeposited.ts
|
|
2311
|
-
|
|
2336
|
+
import {
|
|
2337
|
+
combineCodec as combineCodec14,
|
|
2338
|
+
getAddressDecoder as getAddressDecoder9,
|
|
2339
|
+
getAddressEncoder as getAddressEncoder13,
|
|
2340
|
+
getI64Decoder as getI64Decoder7,
|
|
2341
|
+
getI64Encoder as getI64Encoder7,
|
|
2342
|
+
getStructDecoder as getStructDecoder14,
|
|
2343
|
+
getStructEncoder as getStructEncoder14,
|
|
2344
|
+
getU64Decoder as getU64Decoder10,
|
|
2345
|
+
getU64Encoder as getU64Encoder10
|
|
2346
|
+
} from "@solana/kit";
|
|
2312
2347
|
function getTokensDepositedEncoder() {
|
|
2313
|
-
return (
|
|
2314
|
-
["airdrop", (
|
|
2315
|
-
["amount", (
|
|
2316
|
-
["newSupply", (
|
|
2317
|
-
["depositor", (
|
|
2318
|
-
["timestamp", (
|
|
2348
|
+
return getStructEncoder14([
|
|
2349
|
+
["airdrop", getAddressEncoder13()],
|
|
2350
|
+
["amount", getU64Encoder10()],
|
|
2351
|
+
["newSupply", getU64Encoder10()],
|
|
2352
|
+
["depositor", getAddressEncoder13()],
|
|
2353
|
+
["timestamp", getI64Encoder7()]
|
|
2319
2354
|
]);
|
|
2320
2355
|
}
|
|
2321
2356
|
function getTokensDepositedDecoder() {
|
|
2322
|
-
return (
|
|
2323
|
-
["airdrop", (
|
|
2324
|
-
["amount", (
|
|
2325
|
-
["newSupply", (
|
|
2326
|
-
["depositor", (
|
|
2327
|
-
["timestamp", (
|
|
2357
|
+
return getStructDecoder14([
|
|
2358
|
+
["airdrop", getAddressDecoder9()],
|
|
2359
|
+
["amount", getU64Decoder10()],
|
|
2360
|
+
["newSupply", getU64Decoder10()],
|
|
2361
|
+
["depositor", getAddressDecoder9()],
|
|
2362
|
+
["timestamp", getI64Decoder7()]
|
|
2328
2363
|
]);
|
|
2329
2364
|
}
|
|
2330
2365
|
function getTokensDepositedCodec() {
|
|
2331
|
-
return (
|
|
2366
|
+
return combineCodec14(getTokensDepositedEncoder(), getTokensDepositedDecoder());
|
|
2332
2367
|
}
|
|
2333
2368
|
|
|
2334
2369
|
// src/types/tokensRedeemed.ts
|
|
2335
|
-
|
|
2370
|
+
import {
|
|
2371
|
+
combineCodec as combineCodec15,
|
|
2372
|
+
getAddressDecoder as getAddressDecoder10,
|
|
2373
|
+
getAddressEncoder as getAddressEncoder14,
|
|
2374
|
+
getI64Decoder as getI64Decoder8,
|
|
2375
|
+
getI64Encoder as getI64Encoder8,
|
|
2376
|
+
getStructDecoder as getStructDecoder15,
|
|
2377
|
+
getStructEncoder as getStructEncoder15
|
|
2378
|
+
} from "@solana/kit";
|
|
2336
2379
|
function getTokensRedeemedEncoder() {
|
|
2337
|
-
return (
|
|
2338
|
-
["airdrop", (
|
|
2339
|
-
["authority", (
|
|
2340
|
-
["timestamp", (
|
|
2380
|
+
return getStructEncoder15([
|
|
2381
|
+
["airdrop", getAddressEncoder14()],
|
|
2382
|
+
["authority", getAddressEncoder14()],
|
|
2383
|
+
["timestamp", getI64Encoder8()]
|
|
2341
2384
|
]);
|
|
2342
2385
|
}
|
|
2343
2386
|
function getTokensRedeemedDecoder() {
|
|
2344
|
-
return (
|
|
2345
|
-
["airdrop", (
|
|
2346
|
-
["authority", (
|
|
2347
|
-
["timestamp", (
|
|
2387
|
+
return getStructDecoder15([
|
|
2388
|
+
["airdrop", getAddressDecoder10()],
|
|
2389
|
+
["authority", getAddressDecoder10()],
|
|
2390
|
+
["timestamp", getI64Decoder8()]
|
|
2348
2391
|
]);
|
|
2349
2392
|
}
|
|
2350
2393
|
function getTokensRedeemedCodec() {
|
|
2351
|
-
return (
|
|
2394
|
+
return combineCodec15(getTokensRedeemedEncoder(), getTokensRedeemedDecoder());
|
|
2352
2395
|
}
|
|
2353
|
-
|
|
2354
|
-
0 && (module.exports = {
|
|
2396
|
+
export {
|
|
2355
2397
|
AIRDROP_CONFIG_DISCRIMINATOR,
|
|
2356
2398
|
AIRDROP_DISCRIMINATOR,
|
|
2357
2399
|
AIRDROP_MASTER_DISCRIMINATOR,
|
|
@@ -2540,5 +2582,5 @@ function getTokensRedeemedCodec() {
|
|
|
2540
2582
|
parseDropsyAirdropInstruction,
|
|
2541
2583
|
parseInitializeAirdropConfigInstruction,
|
|
2542
2584
|
parseInitializeAirdropMasterInstruction
|
|
2543
|
-
}
|
|
2544
|
-
//# sourceMappingURL=index.
|
|
2585
|
+
};
|
|
2586
|
+
//# sourceMappingURL=index.mjs.map
|