@helium/helium-admin-cli 0.11.7 → 0.11.9

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.
@@ -1,287 +0,0 @@
1
- import * as anchor from "@coral-xyz/anchor";
2
- import { keyToAssetForAsset } from "@helium/helium-entity-manager-sdk";
3
- import { daoKey } from "@helium/helium-sub-daos-sdk";
4
- import { init as initLazy, lazyDistributorKey, } from "@helium/lazy-distributor-sdk";
5
- import { init as initRewards } from "@helium/rewards-oracle-sdk";
6
- import { init as initMem } from "@helium/mobile-entity-manager-sdk";
7
- import { HNT_MINT, MOBILE_MINT, getAssetBatch, batchInstructionsToTxsWithPriorityFee, bulkSendTransactions, chunks, } from "@helium/spl-utils";
8
- import { PublicKey } from "@solana/web3.js";
9
- import bs58 from "bs58";
10
- import os from "os";
11
- import pLimit from "p-limit";
12
- import yargs from "yargs/yargs";
13
- import { loadKeypair } from "./utils";
14
- export async function run(args = process.argv) {
15
- const yarg = yargs(args).options({
16
- wallet: {
17
- alias: "k",
18
- describe: "Anchor wallet keypair",
19
- default: `${os.homedir()}/.config/solana/id.json`,
20
- },
21
- url: {
22
- alias: "u",
23
- default: "http://127.0.0.1:8899",
24
- describe: "The solana url",
25
- },
26
- authority: {
27
- type: "string",
28
- describe: "Path to the authority keypair. Defaults to wallet.",
29
- },
30
- approver: {
31
- type: "string",
32
- describe: "Path to the approver keypair (if lazy distributor has approver set)",
33
- },
34
- commit: {
35
- type: "boolean",
36
- describe: "Actually close accounts. Otherwise dry-run",
37
- default: false,
38
- },
39
- });
40
- const argv = await yarg.argv;
41
- process.env.ANCHOR_WALLET = argv.wallet;
42
- process.env.ANCHOR_PROVIDER_URL = argv.url;
43
- anchor.setProvider(anchor.AnchorProvider.local(argv.url));
44
- const provider = anchor.getProvider();
45
- const lazyProgram = await initLazy(provider);
46
- const rewardsOracleProgram = await initRewards(provider);
47
- const memProgram = await initMem(provider);
48
- const authority = argv.authority
49
- ? loadKeypair(argv.authority)
50
- : loadKeypair(argv.wallet);
51
- const approver = argv.approver ? loadKeypair(argv.approver) : null;
52
- const dao = daoKey(HNT_MINT)[0];
53
- const lazyDistributor = lazyDistributorKey(MOBILE_MINT)[0];
54
- // Fetch all subscriber collections
55
- console.log("Fetching CarrierV0 accounts to identify subscriber collections...");
56
- const carriers = await memProgram.account.carrierV0.all();
57
- const subscriberCollections = new Set();
58
- for (const carrier of carriers) {
59
- subscriberCollections.add(carrier.account.collection.toBase58());
60
- }
61
- console.log(` Found ${subscriberCollections.size} subscriber collection(s) from ${carriers.length} carriers\n`);
62
- console.log("Fetching RecipientV0 accounts for MOBILE lazy distributor using pagination...");
63
- const PAGE_SIZE = 5000; // Helius supports up to 5k per page for getProgramAccountsV2
64
- const BATCH_SIZE = 50000; // Process in 50k chunks to avoid memory issues
65
- let paginationKey = null;
66
- let page = 0;
67
- let totalRecipientsFetched = 0;
68
- let totalSkippedNonSubscriber = 0;
69
- let currentBatch = [];
70
- const subscriberRecipients = [];
71
- async function fetchAssetBatchWithRetry(chunk, maxRetries = 5) {
72
- for (let attempt = 0; attempt < maxRetries; attempt++) {
73
- try {
74
- const result = await getAssetBatch(provider.connection.rpcEndpoint, chunk);
75
- return result || [];
76
- }
77
- catch (err) {
78
- const is429 = err.message?.includes("429") || err.status === 429;
79
- if (attempt === maxRetries - 1 || !is429) {
80
- console.error(`Failed to fetch asset batch after ${maxRetries} attempts: ${err.message}`);
81
- return [];
82
- }
83
- // Exponential backoff for rate limits
84
- const delay = Math.min(2000 * Math.pow(2, attempt), 30000);
85
- console.log(` Rate limited, retrying in ${delay / 1000}s...`);
86
- await new Promise((resolve) => setTimeout(resolve, delay));
87
- }
88
- }
89
- return [];
90
- }
91
- async function processBatch(batch, batchLabel) {
92
- console.log(`\n--- Processing ${batchLabel} ---`);
93
- const assetIds = batch.map((r) => r.account.asset);
94
- console.log(`Fetching ${assetIds.length.toLocaleString()} assets...`);
95
- // Fetch assets with concurrency control
96
- const assetChunks = chunks(assetIds, 1000);
97
- const assetLimiter = pLimit(10);
98
- let fetchedCount = 0;
99
- let assetBatchIndex = 0;
100
- const assetResults = await Promise.all(assetChunks.map((chunk) => assetLimiter(async () => {
101
- const result = await fetchAssetBatchWithRetry(chunk);
102
- fetchedCount += chunk.length;
103
- assetBatchIndex++;
104
- if (assetBatchIndex % 10 === 0 || fetchedCount >= assetIds.length) {
105
- console.log(` ${assetBatchIndex} batches: ${fetchedCount.toLocaleString()} assets`);
106
- }
107
- return result;
108
- })));
109
- const assets = assetResults.flat();
110
- // Filter for subscriber assets
111
- console.log("Filtering for subscriber assets...");
112
- let batchNonSubscribers = 0;
113
- let batchSubscribers = 0;
114
- batch.forEach((recipient, index) => {
115
- const asset = assets[index];
116
- if (!asset) {
117
- batchNonSubscribers++;
118
- return;
119
- }
120
- const assetCollection = asset.grouping?.find((g) => g.group_key === "collection")?.group_value;
121
- if (assetCollection &&
122
- subscriberCollections.has(assetCollection.toBase58())) {
123
- subscriberRecipients.push({
124
- address: recipient.publicKey,
125
- asset,
126
- recipientData: recipient.account,
127
- });
128
- batchSubscribers++;
129
- }
130
- else {
131
- batchNonSubscribers++;
132
- }
133
- });
134
- return {
135
- subscribers: batchSubscribers,
136
- nonSubscribers: batchNonSubscribers,
137
- };
138
- }
139
- // Pagination and batch processing loop
140
- console.log("Fetching recipients with pagination and processing in batches...\n");
141
- do {
142
- page++;
143
- // Fetch next page
144
- const response = await fetch(provider.connection.rpcEndpoint, {
145
- method: "POST",
146
- headers: { "Content-Type": "application/json" },
147
- body: JSON.stringify({
148
- jsonrpc: "2.0",
149
- id: `page-${page}`,
150
- method: "getProgramAccountsV2",
151
- params: [
152
- lazyProgram.programId.toBase58(),
153
- {
154
- encoding: "base64",
155
- filters: [
156
- {
157
- memcmp: {
158
- offset: 8,
159
- bytes: lazyDistributor.toBase58(),
160
- },
161
- },
162
- ],
163
- limit: PAGE_SIZE,
164
- ...(paginationKey && { paginationKey }),
165
- },
166
- ],
167
- }),
168
- });
169
- const data = await response.json();
170
- if (data.error) {
171
- throw new Error(`RPC error: ${data.error.message}`);
172
- }
173
- const { result } = data;
174
- // If no more results, set paginationKey to null to end pagination
175
- if (!result || !result.accounts || result.accounts.length === 0) {
176
- paginationKey = null;
177
- }
178
- else {
179
- // Decode and add to current batch
180
- const pageRecipients = result.accounts.map((item) => ({
181
- publicKey: new PublicKey(item.pubkey),
182
- account: lazyProgram.coder.accounts.decode("recipientV0", Buffer.from(item.account.data[0], "base64")),
183
- }));
184
- currentBatch.push(...pageRecipients);
185
- totalRecipientsFetched += pageRecipients.length;
186
- if (page % 10 === 0) {
187
- console.log(` Fetched ${totalRecipientsFetched.toLocaleString()} recipients (batch size: ${currentBatch.length.toLocaleString()})...`);
188
- }
189
- paginationKey = result.paginationKey || null;
190
- }
191
- // Process batch when we hit BATCH_SIZE or finished pagination
192
- const shouldProcessBatch = currentBatch.length >= BATCH_SIZE || !paginationKey;
193
- if (shouldProcessBatch && currentBatch.length > 0) {
194
- const { subscribers, nonSubscribers } = await processBatch(currentBatch, `batch of ${currentBatch.length.toLocaleString()} recipients`);
195
- totalSkippedNonSubscriber += nonSubscribers;
196
- console.log(`Found ${subscriberRecipients.length.toLocaleString()} subscriber recipients so far (${subscribers} subscribers, ${nonSubscribers} non-subscribers in this batch)\n`);
197
- // Clear current batch to free memory
198
- currentBatch = [];
199
- }
200
- } while (paginationKey);
201
- console.log(`\n=== Summary ===`);
202
- console.log(`Processed ${totalRecipientsFetched.toLocaleString()} total RecipientV0 accounts`);
203
- console.log(`${subscriberRecipients.length.toLocaleString()} are for subscriber assets`);
204
- console.log(`${totalSkippedNonSubscriber.toLocaleString()} skipped (non-subscriber assets)`);
205
- if (!argv.commit) {
206
- console.log(`\nDry run: would close ${subscriberRecipients.length} subscriber recipient accounts. Re-run with --commit to close recipients.`);
207
- return;
208
- }
209
- if (subscriberRecipients.length === 0) {
210
- console.log("\nNo subscriber recipient accounts to close.");
211
- return;
212
- }
213
- console.log(`\nClosing ${subscriberRecipients.length.toLocaleString()} recipient accounts...`);
214
- // Build close instructions
215
- let failedCount = 0;
216
- let processed = 0;
217
- const recipientChunks = chunks(subscriberRecipients, 100);
218
- const instructionLimiter = pLimit(50);
219
- const allBatchResults = await Promise.all(recipientChunks.map((chunk) => instructionLimiter(async () => {
220
- const batchResults = await Promise.all(chunk.map(async (recipient) => {
221
- try {
222
- const { address: recipientAddr, asset } = recipient;
223
- // Compute the KeyToAssetV0 address
224
- const keyToAsset = keyToAssetForAsset(asset, dao);
225
- // Extract entity key from asset URI
226
- const entityKeyStr = asset.content.json_uri.split("/").pop() || "";
227
- const cleanEntityKeyStr = entityKeyStr.split(/[.?#]/)[0];
228
- const entityKeyBytes = Buffer.from(bs58.decode(cleanEntityKeyStr));
229
- // Get oracle_signer PDA
230
- const [oracleSigner] = PublicKey.findProgramAddressSync([Buffer.from("oracle_signer", "utf-8")], rewardsOracleProgram.programId);
231
- return await rewardsOracleProgram.methods
232
- .tempCloseRecipientWrapperV0({
233
- entityKey: entityKeyBytes,
234
- asset: new PublicKey(asset.id),
235
- })
236
- .accountsPartial({
237
- lazyDistributor,
238
- recipient: recipientAddr,
239
- keyToAsset,
240
- dao,
241
- authority: authority.publicKey,
242
- approver: approver?.publicKey || null,
243
- oracleSigner,
244
- lazyDistributorProgram: lazyProgram.programId,
245
- })
246
- .instruction();
247
- }
248
- catch (err) {
249
- console.error(`Error building instruction for recipient ${recipient.address.toBase58()}: ${err.message}`);
250
- return null;
251
- }
252
- }));
253
- processed += chunk.length;
254
- const validResults = batchResults.filter((i) => i !== null);
255
- failedCount += chunk.length - validResults.length;
256
- // Show progress every 1000 recipients or at end
257
- if (processed % 1000 === 0 ||
258
- processed === subscriberRecipients.length) {
259
- console.log(` Prepared ${processed - failedCount} / ${subscriberRecipients.length.toLocaleString()} instructions (${failedCount} failed)...`);
260
- }
261
- return batchResults;
262
- })));
263
- const instructions = allBatchResults
264
- .flat()
265
- .filter((i) => i !== null);
266
- const instructionCount = instructions.length;
267
- // Free memory
268
- subscriberRecipients.length = 0;
269
- console.log(`\nBatching ${instructionCount.toLocaleString()} instructions into transactions...`);
270
- const txns = await batchInstructionsToTxsWithPriorityFee(provider, instructions, {
271
- useFirstEstimateForAll: true,
272
- computeUnitLimit: 600000,
273
- });
274
- // Free memory - instructions now in transactions
275
- instructions.length = 0;
276
- console.log(`\nSending ${txns.length} transactions...`);
277
- // Sign with authority and approver (if present)
278
- const extraSigners = [authority];
279
- if (approver) {
280
- extraSigners.push(approver);
281
- }
282
- await bulkSendTransactions(provider, txns, (status) => {
283
- console.log(`Sending ${status.currentBatchProgress} / ${status.currentBatchSize} in batch. ${status.totalProgress} / ${txns.length}`);
284
- }, 10, extraSigners);
285
- console.log(`\n✓ Complete: Closed ${instructionCount} recipient accounts${failedCount > 0 ? ` (${failedCount} failed to build instructions)` : ""}`);
286
- }
287
- //# sourceMappingURL=close-all-subscriber-recipients.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"close-all-subscriber-recipients.js","sourceRoot":"","sources":["../../../src/close-all-subscriber-recipients.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EACL,IAAI,IAAI,QAAQ,EAChB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EACL,QAAQ,EACR,WAAW,EACX,aAAa,EACb,qCAAqC,EACrC,oBAAoB,EACpB,MAAM,GACP,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAA0B,MAAM,iBAAiB,CAAC;AACpE,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAA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cAAc;IACd,oBAAoB,CAAC,MAAM,GAAG,CAAC,CAAC;IAEhC,OAAO,CAAC,GAAG,CACT,cAAc,gBAAgB,CAAC,cAAc,EAAE,oCAAoC,CACpF,CAAC;IACF,MAAM,IAAI,GAAG,MAAM,qCAAqC,CACtD,QAAQ,EACR,YAAY,EACZ;QACE,sBAAsB,EAAE,IAAI;QAC5B,gBAAgB,EAAE,MAAM;KACzB,CACF,CAAC;IAEF,iDAAiD;IACjD,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;IAExB,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,CAAC,MAAM,kBAAkB,CAAC,CAAC;IAExD,gDAAgD;IAChD,MAAM,YAAY,GAAG,CAAC,SAAS,CAAC,CAAC;IACjC,IAAI,QAAQ,EAAE;QACZ,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC7B;IAED,MAAM,oBAAoB,CACxB,QAAQ,EACR,IAAI,EACJ,CAAC,MAAM,EAAE,EAAE;QACT,OAAO,CAAC,GAAG,CACT,WAAW,MAAM,CAAC,oBAAoB,MAAM,MAAM,CAAC,gBAAgB,cAAc,MAAM,CAAC,aAAa,MAAM,IAAI,CAAC,MAAM,EAAE,CACzH,CAAC;IACJ,CAAC,EACD,EAAE,EACF,YAAY,CACb,CAAC;IAEF,OAAO,CAAC,GAAG,CACT,wBAAwB,gBAAgB,sBACtC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,WAAW,gCAAgC,CAAC,CAAC,CAAC,EACvE,EAAE,CACH,CAAC;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function run(args?: any): Promise<void>;
2
- //# sourceMappingURL=claim-and-close-subscriber-key-to-assets.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claim-and-close-subscriber-key-to-assets.d.ts","sourceRoot":"","sources":["../../../src/claim-and-close-subscriber-key-to-assets.ts"],"names":[],"mappings":"AA8CA,wBAAsB,GAAG,CAAC,IAAI,GAAE,GAAkB,iBAm3BjD"}
@@ -1,2 +0,0 @@
1
- export declare function run(args?: any): Promise<void>;
2
- //# sourceMappingURL=close-all-subscriber-recipients.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"close-all-subscriber-recipients.d.ts","sourceRoot":"","sources":["../../../src/close-all-subscriber-recipients.ts"],"names":[],"mappings":"AAwBA,wBAAsB,GAAG,CAAC,IAAI,GAAE,GAAkB,iBAkajD"}