@unclaimedsol/spl-burn-close-sdk 1.0.3 → 1.0.4

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.cjs CHANGED
@@ -4,8 +4,6 @@ const PROGRAM_ID = new PublicKey("UNCaXzXkR3vp8mbCJyxWUvwuRk5uHgzrwe6jcWPfiUR");
4
4
  /** Hardcoded fee recipient on-chain expectation */
5
5
  const FEE_RECIPIENT = new PublicKey("uncNCRycMtNPj2kXHfwiCgNrzCTnC9xU5FS8ZeWyn3M");
6
6
  const TOKEN_PROGRAM_ID = new PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
7
- /** Fixed fee percentage enforced by the program (5%) */
8
- const FIXED_FEE_PERCENTAGE = 5; // do not change
9
7
  /**
10
8
  * Build *unsigned* transactions that call the on-chain burn+close program.
11
9
  * You sign and send them yourself (frontend wallet or backend keypair).
@@ -21,15 +19,15 @@ export async function buildBurnAndCloseTransactions(connection, programId, user,
21
19
  if (!pairs.length)
22
20
  return [];
23
21
  const chunkSize = Math.max(1, options.chunkSize ?? 12);
24
- const commitment = options.commitment ?? "confirmed";
22
+ const commitment = options.commitment ?? "processed";
25
23
  const feePayer = options.feePayer ?? user;
26
24
  // Split into chunks so we stay under CU / account limits
27
25
  const chunks = [];
28
26
  for (let i = 0; i < pairs.length; i += chunkSize) {
29
27
  chunks.push(pairs.slice(i, i + chunkSize));
30
28
  }
31
- // Instruction data: [selector=0, fee_pct=5]
32
- const data = Buffer.from([0, FIXED_FEE_PERCENTAGE]);
29
+ // Instruction data: [selector=0]
30
+ const data = Buffer.from([0]);
33
31
  const txs = [];
34
32
  for (const chunk of chunks) {
35
33
  const keys = [
package/dist/index.d.ts CHANGED
@@ -4,8 +4,6 @@ export declare const PROGRAM_ID: PublicKey;
4
4
  /** Hardcoded fee recipient on-chain expectation */
5
5
  export declare const FEE_RECIPIENT: PublicKey;
6
6
  export declare const TOKEN_PROGRAM_ID: PublicKey;
7
- /** Fixed fee percentage enforced by the program (5%) */
8
- export declare const FIXED_FEE_PERCENTAGE = 5;
9
7
  export type Pair = {
10
8
  mint: PublicKey;
11
9
  ata: PublicKey;
package/dist/index.js CHANGED
@@ -4,8 +4,6 @@ export const PROGRAM_ID = new PublicKey("UNCaXzXkR3vp8mbCJyxWUvwuRk5uHgzrwe6jcWP
4
4
  /** Hardcoded fee recipient on-chain expectation */
5
5
  export const FEE_RECIPIENT = new PublicKey("uncNCRycMtNPj2kXHfwiCgNrzCTnC9xU5FS8ZeWyn3M");
6
6
  export const TOKEN_PROGRAM_ID = new PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
7
- /** Fixed fee percentage enforced by the program (5%) */
8
- export const FIXED_FEE_PERCENTAGE = 5; // do not change
9
7
  /**
10
8
  * Build *unsigned* transactions that call the on-chain burn+close program.
11
9
  * You sign and send them yourself (frontend wallet or backend keypair).
@@ -21,15 +19,15 @@ export async function buildBurnAndCloseTransactions(connection, programId, user,
21
19
  if (!pairs.length)
22
20
  return [];
23
21
  const chunkSize = Math.max(1, options.chunkSize ?? 12);
24
- const commitment = options.commitment ?? "confirmed";
22
+ const commitment = options.commitment ?? "processed";
25
23
  const feePayer = options.feePayer ?? user;
26
24
  // Split into chunks so we stay under CU / account limits
27
25
  const chunks = [];
28
26
  for (let i = 0; i < pairs.length; i += chunkSize) {
29
27
  chunks.push(pairs.slice(i, i + chunkSize));
30
28
  }
31
- // Instruction data: [selector=0, fee_pct=5]
32
- const data = Buffer.from([0, FIXED_FEE_PERCENTAGE]);
29
+ // Instruction data: [selector=0]
30
+ const data = Buffer.from([0]);
33
31
  const txs = [];
34
32
  for (const chunk of chunks) {
35
33
  const keys = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unclaimedsol/spl-burn-close-sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "SDK to burn and close SPL token accounts via the Unclaimed SOL program (with a built-in 5% fee).",
5
5
  "license": "MIT",
6
6
  "author": "Unclaimed SOL",