@dropsy/airdrop 0.3.0 → 0.4.0
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.mjs → index.cjs} +628 -674
- package/dist/index.cjs.map +1 -0
- package/dist/{index.d.mts → index.d.cts} +11 -15
- package/dist/index.d.ts +11 -15
- package/dist/index.js +661 -641
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
- package/dist/index.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -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,86 +35,108 @@ 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
|
-
["
|
|
239
|
-
["
|
|
240
|
-
["
|
|
241
|
-
["
|
|
242
|
-
["
|
|
243
|
-
["
|
|
244
|
-
["
|
|
245
|
-
["
|
|
246
|
-
["
|
|
247
|
-
["
|
|
248
|
-
["padding", (0, import_kit.fixEncoderSize)((0, import_kit.getBytesEncoder)(), 1)]
|
|
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)]
|
|
249
59
|
]),
|
|
250
60
|
(value) => ({ ...value, discriminator: AIRDROP_DISCRIMINATOR })
|
|
251
61
|
);
|
|
252
62
|
}
|
|
253
63
|
function getAirdropDecoder() {
|
|
254
|
-
return
|
|
255
|
-
["discriminator",
|
|
256
|
-
["master",
|
|
257
|
-
["authority",
|
|
258
|
-
["mint",
|
|
259
|
-
["delegateAuthority",
|
|
260
|
-
["merkleRoot",
|
|
261
|
-
["
|
|
262
|
-
["
|
|
263
|
-
["
|
|
264
|
-
["
|
|
265
|
-
["
|
|
266
|
-
["
|
|
267
|
-
["
|
|
268
|
-
["
|
|
269
|
-
["
|
|
270
|
-
["
|
|
271
|
-
["padding", (0, import_kit.fixDecoderSize)((0, import_kit.getBytesDecoder)(), 1)]
|
|
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)]
|
|
272
81
|
]);
|
|
273
82
|
}
|
|
274
83
|
function getAirdropCodec() {
|
|
275
|
-
return
|
|
84
|
+
return combineCodec(getAirdropEncoder(), getAirdropDecoder());
|
|
276
85
|
}
|
|
277
86
|
function decodeAirdrop(encodedAccount) {
|
|
278
|
-
return
|
|
87
|
+
return decodeAccount(
|
|
279
88
|
encodedAccount,
|
|
280
89
|
getAirdropDecoder()
|
|
281
90
|
);
|
|
282
91
|
}
|
|
283
92
|
async function fetchAirdrop(rpc, address, config) {
|
|
284
93
|
const maybeAccount = await fetchMaybeAirdrop(rpc, address, config);
|
|
285
|
-
|
|
94
|
+
assertAccountExists(maybeAccount);
|
|
286
95
|
return maybeAccount;
|
|
287
96
|
}
|
|
288
97
|
async function fetchMaybeAirdrop(rpc, address, config) {
|
|
289
|
-
const maybeAccount = await
|
|
98
|
+
const maybeAccount = await fetchEncodedAccount(rpc, address, config);
|
|
290
99
|
return decodeAirdrop(maybeAccount);
|
|
291
100
|
}
|
|
292
101
|
async function fetchAllAirdrop(rpc, addresses, config) {
|
|
293
102
|
const maybeAccounts = await fetchAllMaybeAirdrop(rpc, addresses, config);
|
|
294
|
-
|
|
103
|
+
assertAccountsExist(maybeAccounts);
|
|
295
104
|
return maybeAccounts;
|
|
296
105
|
}
|
|
297
106
|
async function fetchAllMaybeAirdrop(rpc, addresses, config) {
|
|
298
|
-
const maybeAccounts = await
|
|
107
|
+
const maybeAccounts = await fetchEncodedAccounts(rpc, addresses, config);
|
|
299
108
|
return maybeAccounts.map((maybeAccount) => decodeAirdrop(maybeAccount));
|
|
300
109
|
}
|
|
301
110
|
function getAirdropSize() {
|
|
302
|
-
return
|
|
111
|
+
return 216;
|
|
303
112
|
}
|
|
304
113
|
|
|
305
114
|
// src/accounts/airdropConfig.ts
|
|
306
|
-
|
|
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";
|
|
307
140
|
var AIRDROP_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
308
141
|
194,
|
|
309
142
|
149,
|
|
@@ -315,71 +148,71 @@ var AIRDROP_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
|
315
148
|
16
|
|
316
149
|
]);
|
|
317
150
|
function getAirdropConfigDiscriminatorBytes() {
|
|
318
|
-
return (
|
|
151
|
+
return fixEncoderSize2(getBytesEncoder2(), 8).encode(
|
|
319
152
|
AIRDROP_CONFIG_DISCRIMINATOR
|
|
320
153
|
);
|
|
321
154
|
}
|
|
322
155
|
function getAirdropConfigEncoder() {
|
|
323
|
-
return (
|
|
324
|
-
(
|
|
325
|
-
["discriminator", (
|
|
326
|
-
["authority", (
|
|
327
|
-
["protocolTreasury", (
|
|
328
|
-
["wlRoot", (
|
|
329
|
-
["protocolFee", (
|
|
330
|
-
["airdropMasterCreateFee", (
|
|
331
|
-
["maxClaimFee", (
|
|
332
|
-
["maxActionFee", (
|
|
333
|
-
["minAirdropDuration", (
|
|
334
|
-
["defaultAirdropDuration", (
|
|
335
|
-
["maxAirdropDuration", (
|
|
336
|
-
["updateGracePeriod", (
|
|
337
|
-
["masterFeeBps", (
|
|
338
|
-
["version", (
|
|
339
|
-
["bump", (
|
|
340
|
-
["padding", (
|
|
341
|
-
["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)]
|
|
342
175
|
]),
|
|
343
176
|
(value) => ({ ...value, discriminator: AIRDROP_CONFIG_DISCRIMINATOR })
|
|
344
177
|
);
|
|
345
178
|
}
|
|
346
179
|
function getAirdropConfigDecoder() {
|
|
347
|
-
return (
|
|
348
|
-
["discriminator", (
|
|
349
|
-
["authority", (
|
|
350
|
-
["protocolTreasury", (
|
|
351
|
-
["wlRoot", (
|
|
352
|
-
["protocolFee", (
|
|
353
|
-
["airdropMasterCreateFee", (
|
|
354
|
-
["maxClaimFee", (
|
|
355
|
-
["maxActionFee", (
|
|
356
|
-
["minAirdropDuration", (
|
|
357
|
-
["defaultAirdropDuration", (
|
|
358
|
-
["maxAirdropDuration", (
|
|
359
|
-
["updateGracePeriod", (
|
|
360
|
-
["masterFeeBps", (
|
|
361
|
-
["version", (
|
|
362
|
-
["bump", (
|
|
363
|
-
["padding", (
|
|
364
|
-
["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)]
|
|
365
198
|
]);
|
|
366
199
|
}
|
|
367
200
|
function getAirdropConfigCodec() {
|
|
368
|
-
return (
|
|
201
|
+
return combineCodec2(getAirdropConfigEncoder(), getAirdropConfigDecoder());
|
|
369
202
|
}
|
|
370
203
|
function decodeAirdropConfig(encodedAccount) {
|
|
371
|
-
return (
|
|
204
|
+
return decodeAccount2(
|
|
372
205
|
encodedAccount,
|
|
373
206
|
getAirdropConfigDecoder()
|
|
374
207
|
);
|
|
375
208
|
}
|
|
376
209
|
async function fetchAirdropConfig(rpc, address, config) {
|
|
377
210
|
const maybeAccount = await fetchMaybeAirdropConfig(rpc, address, config);
|
|
378
|
-
(
|
|
211
|
+
assertAccountExists2(maybeAccount);
|
|
379
212
|
return maybeAccount;
|
|
380
213
|
}
|
|
381
214
|
async function fetchMaybeAirdropConfig(rpc, address, config) {
|
|
382
|
-
const maybeAccount = await (
|
|
215
|
+
const maybeAccount = await fetchEncodedAccount2(rpc, address, config);
|
|
383
216
|
return decodeAirdropConfig(maybeAccount);
|
|
384
217
|
}
|
|
385
218
|
async function fetchAllAirdropConfig(rpc, addresses, config) {
|
|
@@ -388,11 +221,11 @@ async function fetchAllAirdropConfig(rpc, addresses, config) {
|
|
|
388
221
|
addresses,
|
|
389
222
|
config
|
|
390
223
|
);
|
|
391
|
-
(
|
|
224
|
+
assertAccountsExist2(maybeAccounts);
|
|
392
225
|
return maybeAccounts;
|
|
393
226
|
}
|
|
394
227
|
async function fetchAllMaybeAirdropConfig(rpc, addresses, config) {
|
|
395
|
-
const maybeAccounts = await (
|
|
228
|
+
const maybeAccounts = await fetchEncodedAccounts2(rpc, addresses, config);
|
|
396
229
|
return maybeAccounts.map((maybeAccount) => decodeAirdropConfig(maybeAccount));
|
|
397
230
|
}
|
|
398
231
|
function getAirdropConfigSize() {
|
|
@@ -400,7 +233,27 @@ function getAirdropConfigSize() {
|
|
|
400
233
|
}
|
|
401
234
|
|
|
402
235
|
// src/accounts/airdropMaster.ts
|
|
403
|
-
|
|
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";
|
|
404
257
|
var AIRDROP_MASTER_DISCRIMINATOR = new Uint8Array([
|
|
405
258
|
31,
|
|
406
259
|
109,
|
|
@@ -412,67 +265,69 @@ var AIRDROP_MASTER_DISCRIMINATOR = new Uint8Array([
|
|
|
412
265
|
4
|
|
413
266
|
]);
|
|
414
267
|
function getAirdropMasterDiscriminatorBytes() {
|
|
415
|
-
return (
|
|
268
|
+
return fixEncoderSize3(getBytesEncoder3(), 8).encode(
|
|
416
269
|
AIRDROP_MASTER_DISCRIMINATOR
|
|
417
270
|
);
|
|
418
271
|
}
|
|
419
272
|
function getAirdropMasterEncoder() {
|
|
420
|
-
return (
|
|
421
|
-
(
|
|
422
|
-
["discriminator", (
|
|
423
|
-
["creator", (
|
|
424
|
-
["authority", (
|
|
425
|
-
["treasury", (
|
|
426
|
-
["
|
|
427
|
-
["
|
|
428
|
-
["
|
|
429
|
-
["
|
|
430
|
-
["
|
|
431
|
-
["
|
|
432
|
-
["
|
|
433
|
-
["
|
|
434
|
-
["
|
|
435
|
-
["
|
|
436
|
-
["
|
|
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)]
|
|
437
291
|
]),
|
|
438
292
|
(value) => ({ ...value, discriminator: AIRDROP_MASTER_DISCRIMINATOR })
|
|
439
293
|
);
|
|
440
294
|
}
|
|
441
295
|
function getAirdropMasterDecoder() {
|
|
442
|
-
return (
|
|
443
|
-
["discriminator", (
|
|
444
|
-
["creator", (
|
|
445
|
-
["authority", (
|
|
446
|
-
["treasury", (
|
|
447
|
-
["
|
|
448
|
-
["
|
|
449
|
-
["
|
|
450
|
-
["
|
|
451
|
-
["
|
|
452
|
-
["
|
|
453
|
-
["
|
|
454
|
-
["
|
|
455
|
-
["
|
|
456
|
-
["
|
|
457
|
-
["
|
|
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,19 +336,41 @@ 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() {
|
|
492
|
-
return
|
|
347
|
+
return 192;
|
|
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,28 +437,57 @@ 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() {
|
|
571
|
-
return
|
|
448
|
+
return 1080;
|
|
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,39 +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
|
-
["
|
|
917
|
-
["
|
|
918
|
-
["
|
|
919
|
-
["
|
|
920
|
-
["
|
|
921
|
-
["delegateAuthority",
|
|
922
|
-
["delegatePermissions", (0, import_kit7.getOptionEncoder)((0, import_kit7.getU8Encoder)())]
|
|
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())]
|
|
923
848
|
]),
|
|
924
849
|
(value) => ({ ...value, discriminator: CREATE_AIRDROP_DISCRIMINATOR })
|
|
925
850
|
);
|
|
926
851
|
}
|
|
927
852
|
function getCreateAirdropInstructionDataDecoder() {
|
|
928
|
-
return (
|
|
929
|
-
["discriminator", (
|
|
930
|
-
["
|
|
931
|
-
["
|
|
932
|
-
["
|
|
933
|
-
["
|
|
934
|
-
["
|
|
935
|
-
["delegateAuthority",
|
|
936
|
-
["delegatePermissions", (0, import_kit7.getOptionDecoder)((0, import_kit7.getU8Decoder)())]
|
|
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())]
|
|
937
861
|
]);
|
|
938
862
|
}
|
|
939
863
|
function getCreateAirdropInstructionDataCodec() {
|
|
940
|
-
return (
|
|
864
|
+
return combineCodec6(
|
|
941
865
|
getCreateAirdropInstructionDataEncoder(),
|
|
942
866
|
getCreateAirdropInstructionDataDecoder()
|
|
943
867
|
);
|
|
@@ -961,10 +885,10 @@ async function getCreateAirdropInstructionAsync(input, config) {
|
|
|
961
885
|
const accounts = originalAccounts;
|
|
962
886
|
const args = { ...input };
|
|
963
887
|
if (!accounts.airdropConfig.value) {
|
|
964
|
-
accounts.airdropConfig.value = await (
|
|
888
|
+
accounts.airdropConfig.value = await getProgramDerivedAddress2({
|
|
965
889
|
programAddress,
|
|
966
890
|
seeds: [
|
|
967
|
-
(
|
|
891
|
+
getBytesEncoder6().encode(
|
|
968
892
|
new Uint8Array([
|
|
969
893
|
97,
|
|
970
894
|
105,
|
|
@@ -986,10 +910,10 @@ async function getCreateAirdropInstructionAsync(input, config) {
|
|
|
986
910
|
});
|
|
987
911
|
}
|
|
988
912
|
if (!accounts.airdropMaster.value) {
|
|
989
|
-
accounts.airdropMaster.value = await (
|
|
913
|
+
accounts.airdropMaster.value = await getProgramDerivedAddress2({
|
|
990
914
|
programAddress,
|
|
991
915
|
seeds: [
|
|
992
|
-
(
|
|
916
|
+
getBytesEncoder6().encode(
|
|
993
917
|
new Uint8Array([
|
|
994
918
|
97,
|
|
995
919
|
105,
|
|
@@ -1007,19 +931,7 @@ async function getCreateAirdropInstructionAsync(input, config) {
|
|
|
1007
931
|
114
|
|
1008
932
|
])
|
|
1009
933
|
),
|
|
1010
|
-
(
|
|
1011
|
-
]
|
|
1012
|
-
});
|
|
1013
|
-
}
|
|
1014
|
-
if (!accounts.airdrop.value) {
|
|
1015
|
-
accounts.airdrop.value = await (0, import_kit7.getProgramDerivedAddress)({
|
|
1016
|
-
programAddress,
|
|
1017
|
-
seeds: [
|
|
1018
|
-
(0, import_kit7.getBytesEncoder)().encode(
|
|
1019
|
-
new Uint8Array([97, 105, 114, 100, 114, 111, 112])
|
|
1020
|
-
),
|
|
1021
|
-
(0, import_kit7.getAddressEncoder)().encode(expectAddress(accounts.authority.value)),
|
|
1022
|
-
(0, import_kit7.getAddressEncoder)().encode(expectAddress(accounts.mint.value))
|
|
934
|
+
getAddressEncoder6().encode(expectAddress(accounts.masterCreator.value))
|
|
1023
935
|
]
|
|
1024
936
|
});
|
|
1025
937
|
}
|
|
@@ -1113,7 +1025,22 @@ function parseCreateAirdropInstruction(instruction) {
|
|
|
1113
1025
|
}
|
|
1114
1026
|
|
|
1115
1027
|
// src/instructions/createBitmap.ts
|
|
1116
|
-
|
|
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
|
+
transformEncoder as transformEncoder7
|
|
1043
|
+
} from "@solana/kit";
|
|
1117
1044
|
var CREATE_BITMAP_DISCRIMINATOR = new Uint8Array([
|
|
1118
1045
|
69,
|
|
1119
1046
|
92,
|
|
@@ -1125,29 +1052,29 @@ var CREATE_BITMAP_DISCRIMINATOR = new Uint8Array([
|
|
|
1125
1052
|
247
|
|
1126
1053
|
]);
|
|
1127
1054
|
function getCreateBitmapDiscriminatorBytes() {
|
|
1128
|
-
return (
|
|
1055
|
+
return fixEncoderSize7(getBytesEncoder7(), 8).encode(
|
|
1129
1056
|
CREATE_BITMAP_DISCRIMINATOR
|
|
1130
1057
|
);
|
|
1131
1058
|
}
|
|
1132
1059
|
function getCreateBitmapInstructionDataEncoder() {
|
|
1133
|
-
return (
|
|
1134
|
-
(
|
|
1135
|
-
["discriminator", (
|
|
1136
|
-
["id", (
|
|
1137
|
-
["total", (
|
|
1060
|
+
return transformEncoder7(
|
|
1061
|
+
getStructEncoder7([
|
|
1062
|
+
["discriminator", fixEncoderSize7(getBytesEncoder7(), 8)],
|
|
1063
|
+
["id", getU16Encoder5()],
|
|
1064
|
+
["total", getU32Encoder2()]
|
|
1138
1065
|
]),
|
|
1139
1066
|
(value) => ({ ...value, discriminator: CREATE_BITMAP_DISCRIMINATOR })
|
|
1140
1067
|
);
|
|
1141
1068
|
}
|
|
1142
1069
|
function getCreateBitmapInstructionDataDecoder() {
|
|
1143
|
-
return (
|
|
1144
|
-
["discriminator", (
|
|
1145
|
-
["id", (
|
|
1146
|
-
["total", (
|
|
1070
|
+
return getStructDecoder7([
|
|
1071
|
+
["discriminator", fixDecoderSize7(getBytesDecoder7(), 8)],
|
|
1072
|
+
["id", getU16Decoder5()],
|
|
1073
|
+
["total", getU32Decoder2()]
|
|
1147
1074
|
]);
|
|
1148
1075
|
}
|
|
1149
1076
|
function getCreateBitmapInstructionDataCodec() {
|
|
1150
|
-
return (
|
|
1077
|
+
return combineCodec7(
|
|
1151
1078
|
getCreateBitmapInstructionDataEncoder(),
|
|
1152
1079
|
getCreateBitmapInstructionDataDecoder()
|
|
1153
1080
|
);
|
|
@@ -1172,10 +1099,10 @@ async function getCreateBitmapInstructionAsync(input, config) {
|
|
|
1172
1099
|
const accounts = originalAccounts;
|
|
1173
1100
|
const args = { ...input };
|
|
1174
1101
|
if (!accounts.airdropConfig.value) {
|
|
1175
|
-
accounts.airdropConfig.value = await (
|
|
1102
|
+
accounts.airdropConfig.value = await getProgramDerivedAddress3({
|
|
1176
1103
|
programAddress,
|
|
1177
1104
|
seeds: [
|
|
1178
|
-
(
|
|
1105
|
+
getBytesEncoder7().encode(
|
|
1179
1106
|
new Uint8Array([
|
|
1180
1107
|
97,
|
|
1181
1108
|
105,
|
|
@@ -1197,10 +1124,10 @@ async function getCreateBitmapInstructionAsync(input, config) {
|
|
|
1197
1124
|
});
|
|
1198
1125
|
}
|
|
1199
1126
|
if (!accounts.airdropMaster.value) {
|
|
1200
|
-
accounts.airdropMaster.value = await (
|
|
1127
|
+
accounts.airdropMaster.value = await getProgramDerivedAddress3({
|
|
1201
1128
|
programAddress,
|
|
1202
1129
|
seeds: [
|
|
1203
|
-
(
|
|
1130
|
+
getBytesEncoder7().encode(
|
|
1204
1131
|
new Uint8Array([
|
|
1205
1132
|
97,
|
|
1206
1133
|
105,
|
|
@@ -1218,29 +1145,29 @@ async function getCreateBitmapInstructionAsync(input, config) {
|
|
|
1218
1145
|
114
|
|
1219
1146
|
])
|
|
1220
1147
|
),
|
|
1221
|
-
(
|
|
1148
|
+
getAddressEncoder7().encode(expectAddress(accounts.masterCreator.value))
|
|
1222
1149
|
]
|
|
1223
1150
|
});
|
|
1224
1151
|
}
|
|
1225
1152
|
if (!accounts.airdrop.value) {
|
|
1226
|
-
accounts.airdrop.value = await (
|
|
1153
|
+
accounts.airdrop.value = await getProgramDerivedAddress3({
|
|
1227
1154
|
programAddress,
|
|
1228
1155
|
seeds: [
|
|
1229
|
-
(
|
|
1156
|
+
getBytesEncoder7().encode(
|
|
1230
1157
|
new Uint8Array([97, 105, 114, 100, 114, 111, 112])
|
|
1231
1158
|
),
|
|
1232
|
-
(
|
|
1233
|
-
(
|
|
1159
|
+
getAddressEncoder7().encode(expectAddress(accounts.authority.value)),
|
|
1160
|
+
getAddressEncoder7().encode(expectAddress(accounts.mint.value))
|
|
1234
1161
|
]
|
|
1235
1162
|
});
|
|
1236
1163
|
}
|
|
1237
1164
|
if (!accounts.bitmap.value) {
|
|
1238
|
-
accounts.bitmap.value = await (
|
|
1165
|
+
accounts.bitmap.value = await getProgramDerivedAddress3({
|
|
1239
1166
|
programAddress,
|
|
1240
1167
|
seeds: [
|
|
1241
|
-
(
|
|
1242
|
-
(
|
|
1243
|
-
(
|
|
1168
|
+
getBytesEncoder7().encode(new Uint8Array([98, 105, 116, 109, 97, 112])),
|
|
1169
|
+
getAddressEncoder7().encode(expectAddress(accounts.airdrop.value)),
|
|
1170
|
+
getU16Encoder5().encode(expectSome(args.id))
|
|
1244
1171
|
]
|
|
1245
1172
|
});
|
|
1246
1173
|
}
|
|
@@ -1338,7 +1265,20 @@ function parseCreateBitmapInstruction(instruction) {
|
|
|
1338
1265
|
}
|
|
1339
1266
|
|
|
1340
1267
|
// src/instructions/depositTokens.ts
|
|
1341
|
-
|
|
1268
|
+
import {
|
|
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";
|
|
1342
1282
|
var DEPOSIT_TOKENS_DISCRIMINATOR = new Uint8Array([
|
|
1343
1283
|
176,
|
|
1344
1284
|
83,
|
|
@@ -1350,27 +1290,27 @@ var DEPOSIT_TOKENS_DISCRIMINATOR = new Uint8Array([
|
|
|
1350
1290
|
150
|
|
1351
1291
|
]);
|
|
1352
1292
|
function getDepositTokensDiscriminatorBytes() {
|
|
1353
|
-
return (
|
|
1293
|
+
return fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
1354
1294
|
DEPOSIT_TOKENS_DISCRIMINATOR
|
|
1355
1295
|
);
|
|
1356
1296
|
}
|
|
1357
1297
|
function getDepositTokensInstructionDataEncoder() {
|
|
1358
|
-
return (
|
|
1359
|
-
(
|
|
1360
|
-
["discriminator", (
|
|
1361
|
-
["amount", (
|
|
1298
|
+
return transformEncoder8(
|
|
1299
|
+
getStructEncoder8([
|
|
1300
|
+
["discriminator", fixEncoderSize8(getBytesEncoder8(), 8)],
|
|
1301
|
+
["amount", getU64Encoder6()]
|
|
1362
1302
|
]),
|
|
1363
1303
|
(value) => ({ ...value, discriminator: DEPOSIT_TOKENS_DISCRIMINATOR })
|
|
1364
1304
|
);
|
|
1365
1305
|
}
|
|
1366
1306
|
function getDepositTokensInstructionDataDecoder() {
|
|
1367
|
-
return (
|
|
1368
|
-
["discriminator", (
|
|
1369
|
-
["amount", (
|
|
1307
|
+
return getStructDecoder8([
|
|
1308
|
+
["discriminator", fixDecoderSize8(getBytesDecoder8(), 8)],
|
|
1309
|
+
["amount", getU64Decoder6()]
|
|
1370
1310
|
]);
|
|
1371
1311
|
}
|
|
1372
1312
|
function getDepositTokensInstructionDataCodec() {
|
|
1373
|
-
return (
|
|
1313
|
+
return combineCodec8(
|
|
1374
1314
|
getDepositTokensInstructionDataEncoder(),
|
|
1375
1315
|
getDepositTokensInstructionDataDecoder()
|
|
1376
1316
|
);
|
|
@@ -1396,14 +1336,14 @@ async function getDepositTokensInstructionAsync(input, config) {
|
|
|
1396
1336
|
const accounts = originalAccounts;
|
|
1397
1337
|
const args = { ...input };
|
|
1398
1338
|
if (!accounts.airdrop.value) {
|
|
1399
|
-
accounts.airdrop.value = await (
|
|
1339
|
+
accounts.airdrop.value = await getProgramDerivedAddress4({
|
|
1400
1340
|
programAddress,
|
|
1401
1341
|
seeds: [
|
|
1402
|
-
(
|
|
1342
|
+
getBytesEncoder8().encode(
|
|
1403
1343
|
new Uint8Array([97, 105, 114, 100, 114, 111, 112])
|
|
1404
1344
|
),
|
|
1405
|
-
(
|
|
1406
|
-
(
|
|
1345
|
+
getAddressEncoder8().encode(expectAddress(accounts.authority.value)),
|
|
1346
|
+
getAddressEncoder8().encode(expectAddress(accounts.mint.value))
|
|
1407
1347
|
]
|
|
1408
1348
|
});
|
|
1409
1349
|
}
|
|
@@ -1411,12 +1351,12 @@ async function getDepositTokensInstructionAsync(input, config) {
|
|
|
1411
1351
|
accounts.tokenProgram.value = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
1412
1352
|
}
|
|
1413
1353
|
if (!accounts.vault.value) {
|
|
1414
|
-
accounts.vault.value = await (
|
|
1354
|
+
accounts.vault.value = await getProgramDerivedAddress4({
|
|
1415
1355
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
1416
1356
|
seeds: [
|
|
1417
|
-
(
|
|
1418
|
-
(
|
|
1419
|
-
(
|
|
1357
|
+
getAddressEncoder8().encode(expectAddress(accounts.airdrop.value)),
|
|
1358
|
+
getAddressEncoder8().encode(expectAddress(accounts.tokenProgram.value)),
|
|
1359
|
+
getAddressEncoder8().encode(expectAddress(accounts.mint.value))
|
|
1420
1360
|
]
|
|
1421
1361
|
});
|
|
1422
1362
|
}
|
|
@@ -1518,7 +1458,25 @@ function parseDepositTokensInstruction(instruction) {
|
|
|
1518
1458
|
}
|
|
1519
1459
|
|
|
1520
1460
|
// src/instructions/initializeAirdropConfig.ts
|
|
1521
|
-
|
|
1461
|
+
import {
|
|
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";
|
|
1522
1480
|
var INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
1523
1481
|
160,
|
|
1524
1482
|
68,
|
|
@@ -1530,24 +1488,24 @@ var INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
|
1530
1488
|
94
|
|
1531
1489
|
]);
|
|
1532
1490
|
function getInitializeAirdropConfigDiscriminatorBytes() {
|
|
1533
|
-
return (
|
|
1491
|
+
return fixEncoderSize9(getBytesEncoder9(), 8).encode(
|
|
1534
1492
|
INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR
|
|
1535
1493
|
);
|
|
1536
1494
|
}
|
|
1537
1495
|
function getInitializeAirdropConfigInstructionDataEncoder() {
|
|
1538
|
-
return (
|
|
1539
|
-
(
|
|
1540
|
-
["discriminator", (
|
|
1541
|
-
["wlRoot", (
|
|
1542
|
-
["airdropMasterCreateFee", (
|
|
1543
|
-
["maxClaimFee", (
|
|
1544
|
-
["maxActionFee", (
|
|
1545
|
-
["minAirdropDuration", (
|
|
1546
|
-
["defaultAirdropDuration", (
|
|
1547
|
-
["maxAirdropDuration", (
|
|
1548
|
-
["updateGracePeriod", (
|
|
1549
|
-
["protocolFee", (
|
|
1550
|
-
["masterFeeBps", (
|
|
1496
|
+
return transformEncoder9(
|
|
1497
|
+
getStructEncoder9([
|
|
1498
|
+
["discriminator", fixEncoderSize9(getBytesEncoder9(), 8)],
|
|
1499
|
+
["wlRoot", getOptionEncoder2(fixEncoderSize9(getBytesEncoder9(), 32))],
|
|
1500
|
+
["airdropMasterCreateFee", getOptionEncoder2(getU64Encoder7())],
|
|
1501
|
+
["maxClaimFee", getOptionEncoder2(getU64Encoder7())],
|
|
1502
|
+
["maxActionFee", getOptionEncoder2(getU64Encoder7())],
|
|
1503
|
+
["minAirdropDuration", getOptionEncoder2(getI64Encoder4())],
|
|
1504
|
+
["defaultAirdropDuration", getOptionEncoder2(getI64Encoder4())],
|
|
1505
|
+
["maxAirdropDuration", getOptionEncoder2(getI64Encoder4())],
|
|
1506
|
+
["updateGracePeriod", getOptionEncoder2(getI64Encoder4())],
|
|
1507
|
+
["protocolFee", getOptionEncoder2(getU64Encoder7())],
|
|
1508
|
+
["masterFeeBps", getOptionEncoder2(getU16Encoder6())]
|
|
1551
1509
|
]),
|
|
1552
1510
|
(value) => ({
|
|
1553
1511
|
...value,
|
|
@@ -1556,22 +1514,22 @@ function getInitializeAirdropConfigInstructionDataEncoder() {
|
|
|
1556
1514
|
);
|
|
1557
1515
|
}
|
|
1558
1516
|
function getInitializeAirdropConfigInstructionDataDecoder() {
|
|
1559
|
-
return (
|
|
1560
|
-
["discriminator", (
|
|
1561
|
-
["wlRoot", (
|
|
1562
|
-
["airdropMasterCreateFee", (
|
|
1563
|
-
["maxClaimFee", (
|
|
1564
|
-
["maxActionFee", (
|
|
1565
|
-
["minAirdropDuration", (
|
|
1566
|
-
["defaultAirdropDuration", (
|
|
1567
|
-
["maxAirdropDuration", (
|
|
1568
|
-
["updateGracePeriod", (
|
|
1569
|
-
["protocolFee", (
|
|
1570
|
-
["masterFeeBps", (
|
|
1517
|
+
return getStructDecoder9([
|
|
1518
|
+
["discriminator", fixDecoderSize9(getBytesDecoder9(), 8)],
|
|
1519
|
+
["wlRoot", getOptionDecoder2(fixDecoderSize9(getBytesDecoder9(), 32))],
|
|
1520
|
+
["airdropMasterCreateFee", getOptionDecoder2(getU64Decoder7())],
|
|
1521
|
+
["maxClaimFee", getOptionDecoder2(getU64Decoder7())],
|
|
1522
|
+
["maxActionFee", getOptionDecoder2(getU64Decoder7())],
|
|
1523
|
+
["minAirdropDuration", getOptionDecoder2(getI64Decoder4())],
|
|
1524
|
+
["defaultAirdropDuration", getOptionDecoder2(getI64Decoder4())],
|
|
1525
|
+
["maxAirdropDuration", getOptionDecoder2(getI64Decoder4())],
|
|
1526
|
+
["updateGracePeriod", getOptionDecoder2(getI64Decoder4())],
|
|
1527
|
+
["protocolFee", getOptionDecoder2(getU64Decoder7())],
|
|
1528
|
+
["masterFeeBps", getOptionDecoder2(getU16Decoder6())]
|
|
1571
1529
|
]);
|
|
1572
1530
|
}
|
|
1573
1531
|
function getInitializeAirdropConfigInstructionDataCodec() {
|
|
1574
|
-
return (
|
|
1532
|
+
return combineCodec9(
|
|
1575
1533
|
getInitializeAirdropConfigInstructionDataEncoder(),
|
|
1576
1534
|
getInitializeAirdropConfigInstructionDataDecoder()
|
|
1577
1535
|
);
|
|
@@ -1590,10 +1548,10 @@ async function getInitializeAirdropConfigInstructionAsync(input, config) {
|
|
|
1590
1548
|
const accounts = originalAccounts;
|
|
1591
1549
|
const args = { ...input };
|
|
1592
1550
|
if (!accounts.config.value) {
|
|
1593
|
-
accounts.config.value = await (
|
|
1551
|
+
accounts.config.value = await getProgramDerivedAddress5({
|
|
1594
1552
|
programAddress,
|
|
1595
1553
|
seeds: [
|
|
1596
|
-
(
|
|
1554
|
+
getBytesEncoder9().encode(
|
|
1597
1555
|
new Uint8Array([
|
|
1598
1556
|
97,
|
|
1599
1557
|
105,
|
|
@@ -1692,7 +1650,24 @@ function parseInitializeAirdropConfigInstruction(instruction) {
|
|
|
1692
1650
|
}
|
|
1693
1651
|
|
|
1694
1652
|
// src/instructions/initializeAirdropMaster.ts
|
|
1695
|
-
|
|
1653
|
+
import {
|
|
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";
|
|
1696
1671
|
var INITIALIZE_AIRDROP_MASTER_DISCRIMINATOR = new Uint8Array([
|
|
1697
1672
|
163,
|
|
1698
1673
|
197,
|
|
@@ -1704,23 +1679,23 @@ var INITIALIZE_AIRDROP_MASTER_DISCRIMINATOR = new Uint8Array([
|
|
|
1704
1679
|
65
|
|
1705
1680
|
]);
|
|
1706
1681
|
function getInitializeAirdropMasterDiscriminatorBytes() {
|
|
1707
|
-
return (
|
|
1682
|
+
return fixEncoderSize10(getBytesEncoder10(), 8).encode(
|
|
1708
1683
|
INITIALIZE_AIRDROP_MASTER_DISCRIMINATOR
|
|
1709
1684
|
);
|
|
1710
1685
|
}
|
|
1711
1686
|
function getInitializeAirdropMasterInstructionDataEncoder() {
|
|
1712
|
-
return (
|
|
1713
|
-
(
|
|
1714
|
-
["discriminator", (
|
|
1715
|
-
["airdropUpdateFee", (
|
|
1716
|
-
["airdropCreationFee", (
|
|
1717
|
-
["airdropClaimFee", (
|
|
1718
|
-
["airdropDelegateFee", (
|
|
1719
|
-
["bitmapCreationFee", (
|
|
1687
|
+
return transformEncoder10(
|
|
1688
|
+
getStructEncoder10([
|
|
1689
|
+
["discriminator", fixEncoderSize10(getBytesEncoder10(), 8)],
|
|
1690
|
+
["airdropUpdateFee", getOptionEncoder3(getU64Encoder8())],
|
|
1691
|
+
["airdropCreationFee", getOptionEncoder3(getU64Encoder8())],
|
|
1692
|
+
["airdropClaimFee", getOptionEncoder3(getU64Encoder8())],
|
|
1693
|
+
["airdropDelegateFee", getOptionEncoder3(getU64Encoder8())],
|
|
1694
|
+
["bitmapCreationFee", getOptionEncoder3(getU64Encoder8())],
|
|
1720
1695
|
[
|
|
1721
1696
|
"discountProof",
|
|
1722
|
-
(
|
|
1723
|
-
(
|
|
1697
|
+
getOptionEncoder3(
|
|
1698
|
+
getArrayEncoder2(fixEncoderSize10(getBytesEncoder10(), 32))
|
|
1724
1699
|
)
|
|
1725
1700
|
]
|
|
1726
1701
|
]),
|
|
@@ -1731,21 +1706,21 @@ function getInitializeAirdropMasterInstructionDataEncoder() {
|
|
|
1731
1706
|
);
|
|
1732
1707
|
}
|
|
1733
1708
|
function getInitializeAirdropMasterInstructionDataDecoder() {
|
|
1734
|
-
return (
|
|
1735
|
-
["discriminator", (
|
|
1736
|
-
["airdropUpdateFee", (
|
|
1737
|
-
["airdropCreationFee", (
|
|
1738
|
-
["airdropClaimFee", (
|
|
1739
|
-
["airdropDelegateFee", (
|
|
1740
|
-
["bitmapCreationFee", (
|
|
1709
|
+
return getStructDecoder10([
|
|
1710
|
+
["discriminator", fixDecoderSize10(getBytesDecoder10(), 8)],
|
|
1711
|
+
["airdropUpdateFee", getOptionDecoder3(getU64Decoder8())],
|
|
1712
|
+
["airdropCreationFee", getOptionDecoder3(getU64Decoder8())],
|
|
1713
|
+
["airdropClaimFee", getOptionDecoder3(getU64Decoder8())],
|
|
1714
|
+
["airdropDelegateFee", getOptionDecoder3(getU64Decoder8())],
|
|
1715
|
+
["bitmapCreationFee", getOptionDecoder3(getU64Decoder8())],
|
|
1741
1716
|
[
|
|
1742
1717
|
"discountProof",
|
|
1743
|
-
(
|
|
1718
|
+
getOptionDecoder3(getArrayDecoder2(fixDecoderSize10(getBytesDecoder10(), 32)))
|
|
1744
1719
|
]
|
|
1745
1720
|
]);
|
|
1746
1721
|
}
|
|
1747
1722
|
function getInitializeAirdropMasterInstructionDataCodec() {
|
|
1748
|
-
return (
|
|
1723
|
+
return combineCodec10(
|
|
1749
1724
|
getInitializeAirdropMasterInstructionDataEncoder(),
|
|
1750
1725
|
getInitializeAirdropMasterInstructionDataDecoder()
|
|
1751
1726
|
);
|
|
@@ -1767,10 +1742,10 @@ async function getInitializeAirdropMasterInstructionAsync(input, config) {
|
|
|
1767
1742
|
const accounts = originalAccounts;
|
|
1768
1743
|
const args = { ...input };
|
|
1769
1744
|
if (!accounts.config.value) {
|
|
1770
|
-
accounts.config.value = await (
|
|
1745
|
+
accounts.config.value = await getProgramDerivedAddress6({
|
|
1771
1746
|
programAddress,
|
|
1772
1747
|
seeds: [
|
|
1773
|
-
(
|
|
1748
|
+
getBytesEncoder10().encode(
|
|
1774
1749
|
new Uint8Array([
|
|
1775
1750
|
97,
|
|
1776
1751
|
105,
|
|
@@ -1792,10 +1767,10 @@ async function getInitializeAirdropMasterInstructionAsync(input, config) {
|
|
|
1792
1767
|
});
|
|
1793
1768
|
}
|
|
1794
1769
|
if (!accounts.airdropMaster.value) {
|
|
1795
|
-
accounts.airdropMaster.value = await (
|
|
1770
|
+
accounts.airdropMaster.value = await getProgramDerivedAddress6({
|
|
1796
1771
|
programAddress,
|
|
1797
1772
|
seeds: [
|
|
1798
|
-
(
|
|
1773
|
+
getBytesEncoder10().encode(
|
|
1799
1774
|
new Uint8Array([
|
|
1800
1775
|
97,
|
|
1801
1776
|
105,
|
|
@@ -1813,7 +1788,7 @@ async function getInitializeAirdropMasterInstructionAsync(input, config) {
|
|
|
1813
1788
|
114
|
|
1814
1789
|
])
|
|
1815
1790
|
),
|
|
1816
|
-
(
|
|
1791
|
+
getAddressEncoder9().encode(expectAddress(accounts.creator.value))
|
|
1817
1792
|
]
|
|
1818
1793
|
});
|
|
1819
1794
|
}
|
|
@@ -1905,7 +1880,7 @@ function parseInitializeAirdropMasterInstruction(instruction) {
|
|
|
1905
1880
|
}
|
|
1906
1881
|
|
|
1907
1882
|
// src/programs/dropsyAirdrop.ts
|
|
1908
|
-
var DROPSY_AIRDROP_PROGRAM_ADDRESS = "
|
|
1883
|
+
var DROPSY_AIRDROP_PROGRAM_ADDRESS = "3b97gLF94DDpa7sJQ8orbE3Ab6JQWBsDQTdQ5azoZqcz";
|
|
1909
1884
|
var DropsyAirdropAccount = /* @__PURE__ */ ((DropsyAirdropAccount2) => {
|
|
1910
1885
|
DropsyAirdropAccount2[DropsyAirdropAccount2["Airdrop"] = 0] = "Airdrop";
|
|
1911
1886
|
DropsyAirdropAccount2[DropsyAirdropAccount2["AirdropConfig"] = 1] = "AirdropConfig";
|
|
@@ -1915,36 +1890,36 @@ var DropsyAirdropAccount = /* @__PURE__ */ ((DropsyAirdropAccount2) => {
|
|
|
1915
1890
|
})(DropsyAirdropAccount || {});
|
|
1916
1891
|
function identifyDropsyAirdropAccount(account) {
|
|
1917
1892
|
const data = "data" in account ? account.data : account;
|
|
1918
|
-
if (
|
|
1893
|
+
if (containsBytes(
|
|
1919
1894
|
data,
|
|
1920
|
-
(
|
|
1895
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1921
1896
|
new Uint8Array([31, 112, 159, 158, 124, 237, 9, 241])
|
|
1922
1897
|
),
|
|
1923
1898
|
0
|
|
1924
1899
|
)) {
|
|
1925
1900
|
return 0 /* Airdrop */;
|
|
1926
1901
|
}
|
|
1927
|
-
if (
|
|
1902
|
+
if (containsBytes(
|
|
1928
1903
|
data,
|
|
1929
|
-
(
|
|
1904
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1930
1905
|
new Uint8Array([194, 149, 223, 142, 42, 98, 128, 16])
|
|
1931
1906
|
),
|
|
1932
1907
|
0
|
|
1933
1908
|
)) {
|
|
1934
1909
|
return 1 /* AirdropConfig */;
|
|
1935
1910
|
}
|
|
1936
|
-
if (
|
|
1911
|
+
if (containsBytes(
|
|
1937
1912
|
data,
|
|
1938
|
-
(
|
|
1913
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1939
1914
|
new Uint8Array([31, 109, 100, 62, 106, 173, 5, 4])
|
|
1940
1915
|
),
|
|
1941
1916
|
0
|
|
1942
1917
|
)) {
|
|
1943
1918
|
return 2 /* AirdropMaster */;
|
|
1944
1919
|
}
|
|
1945
|
-
if (
|
|
1920
|
+
if (containsBytes(
|
|
1946
1921
|
data,
|
|
1947
|
-
(
|
|
1922
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1948
1923
|
new Uint8Array([152, 161, 147, 85, 213, 38, 59, 48])
|
|
1949
1924
|
),
|
|
1950
1925
|
0
|
|
@@ -1966,54 +1941,54 @@ var DropsyAirdropInstruction = /* @__PURE__ */ ((DropsyAirdropInstruction2) => {
|
|
|
1966
1941
|
})(DropsyAirdropInstruction || {});
|
|
1967
1942
|
function identifyDropsyAirdropInstruction(instruction) {
|
|
1968
1943
|
const data = "data" in instruction ? instruction.data : instruction;
|
|
1969
|
-
if (
|
|
1944
|
+
if (containsBytes(
|
|
1970
1945
|
data,
|
|
1971
|
-
(
|
|
1946
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1972
1947
|
new Uint8Array([137, 50, 122, 111, 89, 254, 8, 20])
|
|
1973
1948
|
),
|
|
1974
1949
|
0
|
|
1975
1950
|
)) {
|
|
1976
1951
|
return 0 /* ClaimAirdrop */;
|
|
1977
1952
|
}
|
|
1978
|
-
if (
|
|
1953
|
+
if (containsBytes(
|
|
1979
1954
|
data,
|
|
1980
|
-
(
|
|
1955
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1981
1956
|
new Uint8Array([227, 135, 208, 66, 137, 177, 80, 94])
|
|
1982
1957
|
),
|
|
1983
1958
|
0
|
|
1984
1959
|
)) {
|
|
1985
1960
|
return 1 /* CreateAirdrop */;
|
|
1986
1961
|
}
|
|
1987
|
-
if (
|
|
1962
|
+
if (containsBytes(
|
|
1988
1963
|
data,
|
|
1989
|
-
(
|
|
1964
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1990
1965
|
new Uint8Array([69, 92, 61, 190, 154, 237, 116, 247])
|
|
1991
1966
|
),
|
|
1992
1967
|
0
|
|
1993
1968
|
)) {
|
|
1994
1969
|
return 2 /* CreateBitmap */;
|
|
1995
1970
|
}
|
|
1996
|
-
if (
|
|
1971
|
+
if (containsBytes(
|
|
1997
1972
|
data,
|
|
1998
|
-
(
|
|
1973
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
1999
1974
|
new Uint8Array([176, 83, 229, 18, 191, 143, 176, 150])
|
|
2000
1975
|
),
|
|
2001
1976
|
0
|
|
2002
1977
|
)) {
|
|
2003
1978
|
return 3 /* DepositTokens */;
|
|
2004
1979
|
}
|
|
2005
|
-
if (
|
|
1980
|
+
if (containsBytes(
|
|
2006
1981
|
data,
|
|
2007
|
-
(
|
|
1982
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
2008
1983
|
new Uint8Array([160, 68, 127, 205, 130, 205, 156, 94])
|
|
2009
1984
|
),
|
|
2010
1985
|
0
|
|
2011
1986
|
)) {
|
|
2012
1987
|
return 4 /* InitializeAirdropConfig */;
|
|
2013
1988
|
}
|
|
2014
|
-
if (
|
|
1989
|
+
if (containsBytes(
|
|
2015
1990
|
data,
|
|
2016
|
-
(
|
|
1991
|
+
fixEncoderSize11(getBytesEncoder11(), 8).encode(
|
|
2017
1992
|
new Uint8Array([163, 197, 170, 44, 57, 57, 90, 65])
|
|
2018
1993
|
),
|
|
2019
1994
|
0
|
|
@@ -2028,42 +2003,42 @@ function parseDropsyAirdropInstruction(instruction) {
|
|
|
2028
2003
|
const instructionType = identifyDropsyAirdropInstruction(instruction);
|
|
2029
2004
|
switch (instructionType) {
|
|
2030
2005
|
case 0 /* ClaimAirdrop */: {
|
|
2031
|
-
|
|
2006
|
+
assertIsInstructionWithAccounts(instruction);
|
|
2032
2007
|
return {
|
|
2033
2008
|
instructionType: 0 /* ClaimAirdrop */,
|
|
2034
2009
|
...parseClaimAirdropInstruction(instruction)
|
|
2035
2010
|
};
|
|
2036
2011
|
}
|
|
2037
2012
|
case 1 /* CreateAirdrop */: {
|
|
2038
|
-
|
|
2013
|
+
assertIsInstructionWithAccounts(instruction);
|
|
2039
2014
|
return {
|
|
2040
2015
|
instructionType: 1 /* CreateAirdrop */,
|
|
2041
2016
|
...parseCreateAirdropInstruction(instruction)
|
|
2042
2017
|
};
|
|
2043
2018
|
}
|
|
2044
2019
|
case 2 /* CreateBitmap */: {
|
|
2045
|
-
|
|
2020
|
+
assertIsInstructionWithAccounts(instruction);
|
|
2046
2021
|
return {
|
|
2047
2022
|
instructionType: 2 /* CreateBitmap */,
|
|
2048
2023
|
...parseCreateBitmapInstruction(instruction)
|
|
2049
2024
|
};
|
|
2050
2025
|
}
|
|
2051
2026
|
case 3 /* DepositTokens */: {
|
|
2052
|
-
|
|
2027
|
+
assertIsInstructionWithAccounts(instruction);
|
|
2053
2028
|
return {
|
|
2054
2029
|
instructionType: 3 /* DepositTokens */,
|
|
2055
2030
|
...parseDepositTokensInstruction(instruction)
|
|
2056
2031
|
};
|
|
2057
2032
|
}
|
|
2058
2033
|
case 4 /* InitializeAirdropConfig */: {
|
|
2059
|
-
|
|
2034
|
+
assertIsInstructionWithAccounts(instruction);
|
|
2060
2035
|
return {
|
|
2061
2036
|
instructionType: 4 /* InitializeAirdropConfig */,
|
|
2062
2037
|
...parseInitializeAirdropConfigInstruction(instruction)
|
|
2063
2038
|
};
|
|
2064
2039
|
}
|
|
2065
2040
|
case 5 /* InitializeAirdropMaster */: {
|
|
2066
|
-
|
|
2041
|
+
assertIsInstructionWithAccounts(instruction);
|
|
2067
2042
|
return {
|
|
2068
2043
|
instructionType: 5 /* InitializeAirdropMaster */,
|
|
2069
2044
|
...parseInitializeAirdropMasterInstruction(instruction)
|
|
@@ -2235,7 +2210,7 @@ function getDropsyAirdropErrorMessage(code) {
|
|
|
2235
2210
|
return "Error message not available in production bundles.";
|
|
2236
2211
|
}
|
|
2237
2212
|
function isDropsyAirdropError(error, transactionMessage, code) {
|
|
2238
|
-
return
|
|
2213
|
+
return isProgramError(
|
|
2239
2214
|
error,
|
|
2240
2215
|
transactionMessage,
|
|
2241
2216
|
DROPSY_AIRDROP_PROGRAM_ADDRESS,
|
|
@@ -2244,128 +2219,173 @@ function isDropsyAirdropError(error, transactionMessage, code) {
|
|
|
2244
2219
|
}
|
|
2245
2220
|
|
|
2246
2221
|
// src/types/airdropInitialized.ts
|
|
2247
|
-
|
|
2222
|
+
import {
|
|
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";
|
|
2248
2235
|
function getAirdropInitializedEncoder() {
|
|
2249
|
-
return (
|
|
2250
|
-
["airdrop", (
|
|
2251
|
-
["mint", (
|
|
2252
|
-
["authority", (
|
|
2253
|
-
["master", (
|
|
2254
|
-
["merkleRoot", (
|
|
2255
|
-
["startTime", (
|
|
2256
|
-
["endTime", (
|
|
2257
|
-
["timestamp", (
|
|
2236
|
+
return getStructEncoder11([
|
|
2237
|
+
["airdrop", getAddressEncoder10()],
|
|
2238
|
+
["mint", getAddressEncoder10()],
|
|
2239
|
+
["authority", getAddressEncoder10()],
|
|
2240
|
+
["master", getAddressEncoder10()],
|
|
2241
|
+
["merkleRoot", fixEncoderSize12(getBytesEncoder12(), 32)],
|
|
2242
|
+
["startTime", getI64Encoder5()],
|
|
2243
|
+
["endTime", getI64Encoder5()],
|
|
2244
|
+
["timestamp", getI64Encoder5()]
|
|
2258
2245
|
]);
|
|
2259
2246
|
}
|
|
2260
2247
|
function getAirdropInitializedDecoder() {
|
|
2261
|
-
return (
|
|
2262
|
-
["airdrop", (
|
|
2263
|
-
["mint", (
|
|
2264
|
-
["authority", (
|
|
2265
|
-
["master", (
|
|
2266
|
-
["merkleRoot", (
|
|
2267
|
-
["startTime", (
|
|
2268
|
-
["endTime", (
|
|
2269
|
-
["timestamp", (
|
|
2248
|
+
return getStructDecoder11([
|
|
2249
|
+
["airdrop", getAddressDecoder6()],
|
|
2250
|
+
["mint", getAddressDecoder6()],
|
|
2251
|
+
["authority", getAddressDecoder6()],
|
|
2252
|
+
["master", getAddressDecoder6()],
|
|
2253
|
+
["merkleRoot", fixDecoderSize11(getBytesDecoder11(), 32)],
|
|
2254
|
+
["startTime", getI64Decoder5()],
|
|
2255
|
+
["endTime", getI64Decoder5()],
|
|
2256
|
+
["timestamp", getI64Decoder5()]
|
|
2270
2257
|
]);
|
|
2271
2258
|
}
|
|
2272
2259
|
function getAirdropInitializedCodec() {
|
|
2273
|
-
return (
|
|
2260
|
+
return combineCodec11(
|
|
2274
2261
|
getAirdropInitializedEncoder(),
|
|
2275
2262
|
getAirdropInitializedDecoder()
|
|
2276
2263
|
);
|
|
2277
2264
|
}
|
|
2278
2265
|
|
|
2279
2266
|
// src/types/bitmapClosed.ts
|
|
2280
|
-
|
|
2267
|
+
import {
|
|
2268
|
+
combineCodec as combineCodec12,
|
|
2269
|
+
getAddressDecoder as getAddressDecoder7,
|
|
2270
|
+
getAddressEncoder as getAddressEncoder11,
|
|
2271
|
+
getStructDecoder as getStructDecoder12,
|
|
2272
|
+
getStructEncoder as getStructEncoder12
|
|
2273
|
+
} from "@solana/kit";
|
|
2281
2274
|
function getBitmapClosedEncoder() {
|
|
2282
|
-
return (
|
|
2283
|
-
["airdrop", (
|
|
2284
|
-
["bitmap", (
|
|
2285
|
-
["authority", (
|
|
2275
|
+
return getStructEncoder12([
|
|
2276
|
+
["airdrop", getAddressEncoder11()],
|
|
2277
|
+
["bitmap", getAddressEncoder11()],
|
|
2278
|
+
["authority", getAddressEncoder11()]
|
|
2286
2279
|
]);
|
|
2287
2280
|
}
|
|
2288
2281
|
function getBitmapClosedDecoder() {
|
|
2289
|
-
return (
|
|
2290
|
-
["airdrop", (
|
|
2291
|
-
["bitmap", (
|
|
2292
|
-
["authority", (
|
|
2282
|
+
return getStructDecoder12([
|
|
2283
|
+
["airdrop", getAddressDecoder7()],
|
|
2284
|
+
["bitmap", getAddressDecoder7()],
|
|
2285
|
+
["authority", getAddressDecoder7()]
|
|
2293
2286
|
]);
|
|
2294
2287
|
}
|
|
2295
2288
|
function getBitmapClosedCodec() {
|
|
2296
|
-
return (
|
|
2289
|
+
return combineCodec12(getBitmapClosedEncoder(), getBitmapClosedDecoder());
|
|
2297
2290
|
}
|
|
2298
2291
|
|
|
2299
2292
|
// src/types/bitmapInitialized.ts
|
|
2300
|
-
|
|
2293
|
+
import {
|
|
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";
|
|
2301
2304
|
function getBitmapInitializedEncoder() {
|
|
2302
|
-
return (
|
|
2303
|
-
["airdrop", (
|
|
2304
|
-
["bitmap", (
|
|
2305
|
-
["bitmapId", (
|
|
2306
|
-
["timestamp", (
|
|
2305
|
+
return getStructEncoder13([
|
|
2306
|
+
["airdrop", getAddressEncoder12()],
|
|
2307
|
+
["bitmap", getAddressEncoder12()],
|
|
2308
|
+
["bitmapId", getU16Encoder7()],
|
|
2309
|
+
["timestamp", getI64Encoder6()]
|
|
2307
2310
|
]);
|
|
2308
2311
|
}
|
|
2309
2312
|
function getBitmapInitializedDecoder() {
|
|
2310
|
-
return (
|
|
2311
|
-
["airdrop", (
|
|
2312
|
-
["bitmap", (
|
|
2313
|
-
["bitmapId", (
|
|
2314
|
-
["timestamp", (
|
|
2313
|
+
return getStructDecoder13([
|
|
2314
|
+
["airdrop", getAddressDecoder8()],
|
|
2315
|
+
["bitmap", getAddressDecoder8()],
|
|
2316
|
+
["bitmapId", getU16Decoder7()],
|
|
2317
|
+
["timestamp", getI64Decoder6()]
|
|
2315
2318
|
]);
|
|
2316
2319
|
}
|
|
2317
2320
|
function getBitmapInitializedCodec() {
|
|
2318
|
-
return (
|
|
2321
|
+
return combineCodec13(
|
|
2319
2322
|
getBitmapInitializedEncoder(),
|
|
2320
2323
|
getBitmapInitializedDecoder()
|
|
2321
2324
|
);
|
|
2322
2325
|
}
|
|
2323
2326
|
|
|
2324
2327
|
// src/types/tokensDeposited.ts
|
|
2325
|
-
|
|
2328
|
+
import {
|
|
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";
|
|
2326
2339
|
function getTokensDepositedEncoder() {
|
|
2327
|
-
return (
|
|
2328
|
-
["airdrop", (
|
|
2329
|
-
["amount", (
|
|
2330
|
-
["newSupply", (
|
|
2331
|
-
["depositor", (
|
|
2332
|
-
["timestamp", (
|
|
2340
|
+
return getStructEncoder14([
|
|
2341
|
+
["airdrop", getAddressEncoder13()],
|
|
2342
|
+
["amount", getU64Encoder9()],
|
|
2343
|
+
["newSupply", getU64Encoder9()],
|
|
2344
|
+
["depositor", getAddressEncoder13()],
|
|
2345
|
+
["timestamp", getI64Encoder7()]
|
|
2333
2346
|
]);
|
|
2334
2347
|
}
|
|
2335
2348
|
function getTokensDepositedDecoder() {
|
|
2336
|
-
return (
|
|
2337
|
-
["airdrop", (
|
|
2338
|
-
["amount", (
|
|
2339
|
-
["newSupply", (
|
|
2340
|
-
["depositor", (
|
|
2341
|
-
["timestamp", (
|
|
2349
|
+
return getStructDecoder14([
|
|
2350
|
+
["airdrop", getAddressDecoder9()],
|
|
2351
|
+
["amount", getU64Decoder9()],
|
|
2352
|
+
["newSupply", getU64Decoder9()],
|
|
2353
|
+
["depositor", getAddressDecoder9()],
|
|
2354
|
+
["timestamp", getI64Decoder7()]
|
|
2342
2355
|
]);
|
|
2343
2356
|
}
|
|
2344
2357
|
function getTokensDepositedCodec() {
|
|
2345
|
-
return (
|
|
2358
|
+
return combineCodec14(getTokensDepositedEncoder(), getTokensDepositedDecoder());
|
|
2346
2359
|
}
|
|
2347
2360
|
|
|
2348
2361
|
// src/types/tokensRedeemed.ts
|
|
2349
|
-
|
|
2362
|
+
import {
|
|
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";
|
|
2350
2371
|
function getTokensRedeemedEncoder() {
|
|
2351
|
-
return (
|
|
2352
|
-
["airdrop", (
|
|
2353
|
-
["authority", (
|
|
2354
|
-
["timestamp", (
|
|
2372
|
+
return getStructEncoder15([
|
|
2373
|
+
["airdrop", getAddressEncoder14()],
|
|
2374
|
+
["authority", getAddressEncoder14()],
|
|
2375
|
+
["timestamp", getI64Encoder8()]
|
|
2355
2376
|
]);
|
|
2356
2377
|
}
|
|
2357
2378
|
function getTokensRedeemedDecoder() {
|
|
2358
|
-
return (
|
|
2359
|
-
["airdrop", (
|
|
2360
|
-
["authority", (
|
|
2361
|
-
["timestamp", (
|
|
2379
|
+
return getStructDecoder15([
|
|
2380
|
+
["airdrop", getAddressDecoder10()],
|
|
2381
|
+
["authority", getAddressDecoder10()],
|
|
2382
|
+
["timestamp", getI64Decoder8()]
|
|
2362
2383
|
]);
|
|
2363
2384
|
}
|
|
2364
2385
|
function getTokensRedeemedCodec() {
|
|
2365
|
-
return (
|
|
2386
|
+
return combineCodec15(getTokensRedeemedEncoder(), getTokensRedeemedDecoder());
|
|
2366
2387
|
}
|
|
2367
|
-
|
|
2368
|
-
0 && (module.exports = {
|
|
2388
|
+
export {
|
|
2369
2389
|
AIRDROP_CONFIG_DISCRIMINATOR,
|
|
2370
2390
|
AIRDROP_DISCRIMINATOR,
|
|
2371
2391
|
AIRDROP_MASTER_DISCRIMINATOR,
|
|
@@ -2554,5 +2574,5 @@ function getTokensRedeemedCodec() {
|
|
|
2554
2574
|
parseDropsyAirdropInstruction,
|
|
2555
2575
|
parseInitializeAirdropConfigInstruction,
|
|
2556
2576
|
parseInitializeAirdropMasterInstruction
|
|
2557
|
-
}
|
|
2577
|
+
};
|
|
2558
2578
|
//# sourceMappingURL=index.js.map
|