@umbra-privacy/sdk 2.0.3 → 2.1.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.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkNKVMSABR_cjs = require('./chunk-NKVMSABR.cjs');
4
+ var chunk43JEHY7D_cjs = require('./chunk-43JEHY7D.cjs');
4
5
  var chunk3LS5P32X_cjs = require('./chunk-3LS5P32X.cjs');
5
6
  var chunkZY3TSHMJ_cjs = require('./chunk-ZY3TSHMJ.cjs');
6
7
  var chunkUEI7SYH6_cjs = require('./chunk-UEI7SYH6.cjs');
7
- var chunkZQOIYCGA_cjs = require('./chunk-ZQOIYCGA.cjs');
8
8
  require('./chunk-TQQZGNOI.cjs');
9
9
  var chunkBL6WXLPV_cjs = require('./chunk-BL6WXLPV.cjs');
10
10
  var chunkYEZBTYCP_cjs = require('./chunk-YEZBTYCP.cjs');
@@ -671,12 +671,12 @@ async function getUmbraClient(args, deps) {
671
671
  offsets: customOffsets,
672
672
  deferMasterSeedSignature = false
673
673
  } = args;
674
- const networkConfig = chunkZQOIYCGA_cjs.getNetworkConfig(network);
674
+ const networkConfig = chunk43JEHY7D_cjs.getNetworkConfig(network);
675
675
  const versions = {
676
- protocol: customVersions?.protocol ?? chunkZQOIYCGA_cjs.getDefaultProtocolVersion,
677
- algorithm: customVersions?.algorithm ?? chunkZQOIYCGA_cjs.getDefaultAlgorithmVersion,
678
- scheme: customVersions?.scheme ?? chunkZQOIYCGA_cjs.getDefaultSchemeVersion,
679
- network: chunkZQOIYCGA_cjs.getNetworkSpecifier(network)
676
+ protocol: customVersions?.protocol ?? chunk43JEHY7D_cjs.getDefaultProtocolVersion,
677
+ algorithm: customVersions?.algorithm ?? chunk43JEHY7D_cjs.getDefaultAlgorithmVersion,
678
+ scheme: customVersions?.scheme ?? chunk43JEHY7D_cjs.getDefaultSchemeVersion,
679
+ network: chunk43JEHY7D_cjs.getNetworkSpecifier(network)
680
680
  };
681
681
  const offsets = {
682
682
  masterViewingKey: customOffsets?.masterViewingKey ?? 0n,
@@ -1187,6 +1187,7 @@ function getClaimableUtxoScannerFunction(args, deps) {
1187
1187
  const absoluteEndIndex = endInsertionIndex === void 0 ? treeEndAbsoluteIndex : treeOffset + endInsertionIndex;
1188
1188
  const allDecrypted = [];
1189
1189
  let cursor = absoluteStartIndex;
1190
+ let lastSeenInsertionIndex = null;
1190
1191
  while (cursor <= absoluteEndIndex) {
1191
1192
  let result;
1192
1193
  try {
@@ -1203,6 +1204,9 @@ function getClaimableUtxoScannerFunction(args, deps) {
1203
1204
  if (utxo.treeIndex !== treeIndex) {
1204
1205
  continue;
1205
1206
  }
1207
+ if (lastSeenInsertionIndex === null || utxo.insertionIndex > lastSeenInsertionIndex) {
1208
+ lastSeenInsertionIndex = utxo.insertionIndex;
1209
+ }
1206
1210
  const decrypted = await tryDecryptUtxo(
1207
1211
  utxo,
1208
1212
  clientX25519PrivateKey,
@@ -1221,8 +1225,9 @@ function getClaimableUtxoScannerFunction(args, deps) {
1221
1225
  }
1222
1226
  cursor = result.nextCursor;
1223
1227
  }
1228
+ const nextScanStartIndex = lastSeenInsertionIndex !== null ? lastSeenInsertionIndex + 1n : startInsertionIndex;
1224
1229
  if (allDecrypted.length === 0) {
1225
- return { selfBurnable: [], received: [], publicSelfBurnable: [], publicReceived: [] };
1230
+ return { selfBurnable: [], received: [], publicSelfBurnable: [], publicReceived: [], nextScanStartIndex };
1226
1231
  }
1227
1232
  const selfBurnableUtxos = [];
1228
1233
  const receivedUtxos = [];
@@ -1252,7 +1257,8 @@ function getClaimableUtxoScannerFunction(args, deps) {
1252
1257
  selfBurnable: selfBurnableUtxos,
1253
1258
  received: receivedUtxos,
1254
1259
  publicSelfBurnable: publicSelfBurnableUtxos,
1255
- publicReceived: publicReceivedUtxos
1260
+ publicReceived: publicReceivedUtxos,
1261
+ nextScanStartIndex
1256
1262
  };
1257
1263
  }, "fetchClaimableUtxos");
1258
1264
  }
@@ -5135,9 +5141,9 @@ function getComplianceGrantIssuerFunction(args, deps) {
5135
5141
  granterX25519: { first: granterX25519 },
5136
5142
  receiverX25519: { first: receiverX25519 },
5137
5143
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES }
5138
- });
5144
+ }, { programAddress: client.networkConfig.programId });
5139
5145
  const latestBlockhash = await getLatestBlockhash();
5140
- const computeBudgetInstruction = chunkZQOIYCGA_cjs.createSetComputeUnitLimitInstruction(12e5);
5146
+ const computeBudgetInstruction = chunk43JEHY7D_cjs.createSetComputeUnitLimitInstruction(12e5);
5141
5147
  const transactionMessage = kit.pipe(
5142
5148
  kit.createTransactionMessage({ version: 0 }),
5143
5149
  (m) => kit.setTransactionMessageFeePayer(userAddress, m),
@@ -5179,9 +5185,9 @@ function getComplianceGrantRevokerFunction(args, deps) {
5179
5185
  granterX25519: { first: granterX25519 },
5180
5186
  receiverX25519: { first: receiverX25519 },
5181
5187
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES2 }
5182
- });
5188
+ }, { programAddress: client.networkConfig.programId });
5183
5189
  const latestBlockhash = await getLatestBlockhash();
5184
- const computeBudgetInstruction = chunkZQOIYCGA_cjs.createSetComputeUnitLimitInstruction(12e5);
5190
+ const computeBudgetInstruction = chunk43JEHY7D_cjs.createSetComputeUnitLimitInstruction(12e5);
5185
5191
  const transactionMessage = kit.pipe(
5186
5192
  kit.createTransactionMessage({ version: 0 }),
5187
5193
  (m) => kit.setTransactionMessageFeePayer(userAddress, m),
@@ -5260,7 +5266,8 @@ function getSharedCiphertextReencryptorForUserGrantFunction(args, deps) {
5260
5266
  mpcCallbackDataOffset: { first: mpcCallbackDataOffset },
5261
5267
  priorityFees: { first: microLamportsPerAcu ?? 0n },
5262
5268
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES3 }
5263
- }
5269
+ },
5270
+ { programAddress: client.networkConfig.programId }
5264
5271
  );
5265
5272
  const latestBlockhash = await getLatestBlockhash();
5266
5273
  const baseTransactionMessage = kit.pipe(
@@ -5345,7 +5352,8 @@ function getNetworkCiphertextReencryptorForNetworkGrantFunction(args, deps) {
5345
5352
  mpcCallbackDataOffset: { first: mpcCallbackDataOffset },
5346
5353
  priorityFees: { first: microLamportsPerAcu ?? 0n },
5347
5354
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES4 }
5348
- }
5355
+ },
5356
+ { programAddress: client.networkConfig.programId }
5349
5357
  );
5350
5358
  const latestBlockhash = await getLatestBlockhash();
5351
5359
  const baseTransactionMessage = kit.pipe(
@@ -5430,7 +5438,7 @@ function getSharedCiphertextReencryptorForNetworkGrantFunction(args, deps) {
5430
5438
  mpcCallbackDataOffset: { first: mpcCallbackDataOffset },
5431
5439
  priorityFees: { first: microLamportsPerAcu ?? 0n },
5432
5440
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES5 }
5433
- });
5441
+ }, { programAddress: client.networkConfig.programId });
5434
5442
  const latestBlockhash = await getLatestBlockhash();
5435
5443
  const baseTransactionMessage = kit.pipe(
5436
5444
  kit.createTransactionMessage({ version: 0 }),
@@ -5623,7 +5631,7 @@ function getNetworkEncryptionToSharedEncryptionConverterFunction(args, deps) {
5623
5631
  },
5624
5632
  priorityFees: { first: microLamportsPerAcu ?? 0n },
5625
5633
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES6 }
5626
- });
5634
+ }, { programAddress: client.networkConfig.programId });
5627
5635
  const baseTransactionMessage = kit.pipe(
5628
5636
  kit.createTransactionMessage({ version: 0 }),
5629
5637
  (m) => kit.setTransactionMessageFeePayer(userAddress, m),
@@ -5778,9 +5786,9 @@ function getMintEncryptionKeyRotatorFunction(args, deps) {
5778
5786
  },
5779
5787
  priorityFees: { first: microLamportsPerAcu ?? 0n },
5780
5788
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES7 }
5781
- });
5789
+ }, { programAddress: client.networkConfig.programId });
5782
5790
  const latestBlockhash = await getLatestBlockhash();
5783
- const computeBudgetInstruction = chunkZQOIYCGA_cjs.createSetComputeUnitLimitInstruction(12e5);
5791
+ const computeBudgetInstruction = chunk43JEHY7D_cjs.createSetComputeUnitLimitInstruction(12e5);
5784
5792
  const baseTransactionMessage = kit.pipe(
5785
5793
  kit.createTransactionMessage({ version: 0 }),
5786
5794
  (m) => kit.setTransactionMessageFeePayer(userAddress, m),
@@ -5946,7 +5954,7 @@ function getPublicBalanceToEncryptedBalanceDirectDepositorFunction(args, deps) {
5946
5954
  {
5947
5955
  instruction,
5948
5956
  preInstructions: [
5949
- chunkZQOIYCGA_cjs.createSetComputeUnitLimitInstruction(12e5),
5957
+ chunk43JEHY7D_cjs.createSetComputeUnitLimitInstruction(12e5),
5950
5958
  ...preInstructions ?? []
5951
5959
  ],
5952
5960
  altEntry
@@ -6017,7 +6025,7 @@ function getPublicBalanceToEncryptedBalanceDirectDepositorFunction(args, deps) {
6017
6025
  throw new chunkBL6WXLPV_cjs.EncryptedDepositError("mint-fetch", `Mint account not found: ${mint}`);
6018
6026
  }
6019
6027
  mintOwner = mintAccount.programAddress;
6020
- if (mintOwner === chunkZQOIYCGA_cjs.TOKEN_2022_PROGRAM_ID) {
6028
+ if (mintOwner === chunk43JEHY7D_cjs.TOKEN_2022_PROGRAM_ID) {
6021
6029
  const mintData = new Uint8Array(mintAccount.data);
6022
6030
  const feeConfig = chunkZY3TSHMJ_cjs.extractTransferFeeConfig(mintData);
6023
6031
  if (feeConfig === null) {
@@ -6035,12 +6043,12 @@ function getPublicBalanceToEncryptedBalanceDirectDepositorFunction(args, deps) {
6035
6043
  chunkLTCKPTZC_cjs.assertU64(calculatedDepositAmount);
6036
6044
  depositAmount = calculatedDepositAmount;
6037
6045
  }
6038
- } else if (mintOwner === chunkZQOIYCGA_cjs.SPL_TOKEN_PROGRAM_ID) {
6046
+ } else if (mintOwner === chunk43JEHY7D_cjs.SPL_TOKEN_PROGRAM_ID) {
6039
6047
  depositAmount = transferAmount;
6040
6048
  } else {
6041
6049
  throw new chunkBL6WXLPV_cjs.EncryptedDepositError(
6042
6050
  "mint-fetch",
6043
- `Unknown token program: ${mintOwner}. Expected SPL Token (${chunkZQOIYCGA_cjs.SPL_TOKEN_PROGRAM_ID}) or Token-2022 (${chunkZQOIYCGA_cjs.TOKEN_2022_PROGRAM_ID})`
6051
+ `Unknown token program: ${mintOwner}. Expected SPL Token (${chunk43JEHY7D_cjs.SPL_TOKEN_PROGRAM_ID}) or Token-2022 (${chunk43JEHY7D_cjs.TOKEN_2022_PROGRAM_ID})`
6044
6052
  );
6045
6053
  }
6046
6054
  } catch (error) {
@@ -7240,7 +7248,7 @@ function getEncryptedBalanceToSelfClaimableUtxoCreatorFunction(args, deps) {
7240
7248
  },
7241
7249
  { programAddress: client.networkConfig.programId }
7242
7250
  );
7243
- const computeBudgetInstruction = chunkZQOIYCGA_cjs.createSetComputeUnitLimitInstruction(6e5);
7251
+ const computeBudgetInstruction = chunk43JEHY7D_cjs.createSetComputeUnitLimitInstruction(6e5);
7244
7252
  const resolvedAwaitConfig = factoryAwaitComputationFinalization === false ? false : factoryAwaitComputationFinalization ?? {};
7245
7253
  const utxoCallbackOptions = resolvedAwaitConfig === false ? void 0 : {
7246
7254
  ...resolvedAwaitConfig,
@@ -8230,7 +8238,7 @@ function getEncryptedBalanceToReceiverClaimableUtxoCreatorFunction(args, deps) {
8230
8238
  },
8231
8239
  { programAddress: client.networkConfig.programId }
8232
8240
  );
8233
- const computeBudgetInstruction = chunkZQOIYCGA_cjs.createSetComputeUnitLimitInstruction(6e5);
8241
+ const computeBudgetInstruction = chunk43JEHY7D_cjs.createSetComputeUnitLimitInstruction(6e5);
8234
8242
  const resolvedAwaitConfig = factoryAwaitComputationFinalization === false ? false : factoryAwaitComputationFinalization ?? {};
8235
8243
  const utxoCallbackOptions = resolvedAwaitConfig === false ? void 0 : {
8236
8244
  ...resolvedAwaitConfig,
@@ -8371,7 +8379,7 @@ function getPublicBalanceToSelfClaimableUtxoCreatorFunction(args, deps) {
8371
8379
  mintAccountMap.get(client.networkConfig.mxeAccountAddress)
8372
8380
  );
8373
8381
  const mintOwner = mintAccount.programAddress;
8374
- if (mintOwner === chunkZQOIYCGA_cjs.TOKEN_2022_PROGRAM_ID) {
8382
+ if (mintOwner === chunk43JEHY7D_cjs.TOKEN_2022_PROGRAM_ID) {
8375
8383
  const mintData = new Uint8Array(mintAccount.data);
8376
8384
  const feeConfig = chunkZY3TSHMJ_cjs.extractTransferFeeConfig(mintData);
8377
8385
  if (feeConfig === null) {
@@ -8386,10 +8394,10 @@ function getPublicBalanceToSelfClaimableUtxoCreatorFunction(args, deps) {
8386
8394
  );
8387
8395
  }
8388
8396
  }
8389
- mintTokenProgram = chunkZQOIYCGA_cjs.TOKEN_2022_PROGRAM_ID;
8390
- } else if (mintOwner === chunkZQOIYCGA_cjs.SPL_TOKEN_PROGRAM_ID) {
8397
+ mintTokenProgram = chunk43JEHY7D_cjs.TOKEN_2022_PROGRAM_ID;
8398
+ } else if (mintOwner === chunk43JEHY7D_cjs.SPL_TOKEN_PROGRAM_ID) {
8391
8399
  actualReceived = amount;
8392
- mintTokenProgram = chunkZQOIYCGA_cjs.SPL_TOKEN_PROGRAM_ID;
8400
+ mintTokenProgram = chunk43JEHY7D_cjs.SPL_TOKEN_PROGRAM_ID;
8393
8401
  } else {
8394
8402
  throw new chunkBL6WXLPV_cjs.TransactionError(
8395
8403
  `Unknown token program: ${mintOwner}. Expected SPL Token or Token-2022.`
@@ -8761,7 +8769,7 @@ function getPublicBalanceToSelfClaimableUtxoCreatorFunction(args, deps) {
8761
8769
  },
8762
8770
  { programAddress: client.networkConfig.programId }
8763
8771
  );
8764
- const computeBudgetInstruction = chunkZQOIYCGA_cjs.createSetComputeUnitLimitInstruction(12e5);
8772
+ const computeBudgetInstruction = chunk43JEHY7D_cjs.createSetComputeUnitLimitInstruction(12e5);
8765
8773
  if (factoryCreateUtxoCallbacks?.pre !== void 0) {
8766
8774
  await factoryCreateUtxoCallbacks.pre(proofAccountResult.signedTransaction);
8767
8775
  }
@@ -8915,7 +8923,7 @@ function getPublicBalanceToReceiverClaimableUtxoCreatorFunction(args, deps) {
8915
8923
  throw new chunkBL6WXLPV_cjs.TransactionError(`Mint account not found: ${mint}`);
8916
8924
  }
8917
8925
  const mintOwner = mintAccount.programAddress;
8918
- if (mintOwner === chunkZQOIYCGA_cjs.TOKEN_2022_PROGRAM_ID) {
8926
+ if (mintOwner === chunk43JEHY7D_cjs.TOKEN_2022_PROGRAM_ID) {
8919
8927
  const mintData = new Uint8Array(mintAccount.data);
8920
8928
  const feeConfig = chunkZY3TSHMJ_cjs.extractTransferFeeConfig(mintData);
8921
8929
  if (feeConfig === null) {
@@ -8930,10 +8938,10 @@ function getPublicBalanceToReceiverClaimableUtxoCreatorFunction(args, deps) {
8930
8938
  );
8931
8939
  }
8932
8940
  }
8933
- mintTokenProgram = chunkZQOIYCGA_cjs.TOKEN_2022_PROGRAM_ID;
8934
- } else if (mintOwner === chunkZQOIYCGA_cjs.SPL_TOKEN_PROGRAM_ID) {
8941
+ mintTokenProgram = chunk43JEHY7D_cjs.TOKEN_2022_PROGRAM_ID;
8942
+ } else if (mintOwner === chunk43JEHY7D_cjs.SPL_TOKEN_PROGRAM_ID) {
8935
8943
  actualReceived = amount;
8936
- mintTokenProgram = chunkZQOIYCGA_cjs.SPL_TOKEN_PROGRAM_ID;
8944
+ mintTokenProgram = chunk43JEHY7D_cjs.SPL_TOKEN_PROGRAM_ID;
8937
8945
  } else {
8938
8946
  throw new chunkBL6WXLPV_cjs.TransactionError(
8939
8947
  `Unknown token program: ${mintOwner}. Expected SPL Token or Token-2022.`
@@ -9291,7 +9299,7 @@ function getPublicBalanceToReceiverClaimableUtxoCreatorFunction(args, deps) {
9291
9299
  },
9292
9300
  { programAddress: client.networkConfig.programId }
9293
9301
  );
9294
- const computeBudgetInstruction = chunkZQOIYCGA_cjs.createSetComputeUnitLimitInstruction(12e5);
9302
+ const computeBudgetInstruction = chunk43JEHY7D_cjs.createSetComputeUnitLimitInstruction(12e5);
9295
9303
  if (factoryCreateUtxoCallbacks?.pre !== void 0) {
9296
9304
  await factoryCreateUtxoCallbacks.pre(proofAccountResult.signedTransaction);
9297
9305
  }
@@ -9592,7 +9600,7 @@ function getStagedSolRecovererFunction(args, deps) {
9592
9600
  destination,
9593
9601
  amount: { first: amount },
9594
9602
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES8 }
9595
- });
9603
+ }, { programAddress: client.networkConfig.programId });
9596
9604
  const latestBlockhash = await getLatestBlockhash();
9597
9605
  const transactionMessage = kit.pipe(
9598
9606
  kit.createTransactionMessage({ version: 0 }),
@@ -9631,7 +9639,7 @@ function getStagedSplRecovererFunction(args, deps) {
9631
9639
  destinationAta,
9632
9640
  amount: { first: amount },
9633
9641
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES9 }
9634
- });
9642
+ }, { programAddress: client.networkConfig.programId });
9635
9643
  const latestBlockhash = await getLatestBlockhash();
9636
9644
  const transactionMessage = kit.pipe(
9637
9645
  kit.createTransactionMessage({ version: 0 }),
@@ -9816,7 +9824,7 @@ function getUserRegistrationFunction(args, deps) {
9816
9824
  programAddress: client.networkConfig.programId
9817
9825
  }
9818
9826
  );
9819
- const computeBudgetInstruction = chunkZQOIYCGA_cjs.createSetComputeUnitLimitInstruction(12e5);
9827
+ const computeBudgetInstruction = chunk43JEHY7D_cjs.createSetComputeUnitLimitInstruction(12e5);
9820
9828
  const signature = await executeTransactionWithCallbacks(
9821
9829
  registerX25519Instruction,
9822
9830
  callbacks?.registerX25519PublicKey,
@@ -10229,7 +10237,7 @@ function getUserRegistrationFunction(args, deps) {
10229
10237
  programAddress: client.networkConfig.programId
10230
10238
  }
10231
10239
  );
10232
- const computeBudgetInstruction = chunkZQOIYCGA_cjs.createSetComputeUnitLimitInstruction(12e5);
10240
+ const computeBudgetInstruction = chunk43JEHY7D_cjs.createSetComputeUnitLimitInstruction(12e5);
10233
10241
  const registrationAltEntry = chunkAXD7LXYY_cjs.lookupAltEntry(client.networkConfig.addressLookupTables, clusterOffset, "register_user_for_anonymous_usage_v11");
10234
10242
  const signature = await executeTransactionWithCallbacks(
10235
10243
  registerAnonymousInstruction,
@@ -10307,7 +10315,7 @@ function getUserEntropySeedRotatorFunction(args, deps) {
10307
10315
  user: noopSigner,
10308
10316
  newSeed: { first: newSeed },
10309
10317
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES10 }
10310
- });
10318
+ }, { programAddress: client.networkConfig.programId });
10311
10319
  const latestBlockhash = await getLatestBlockhash();
10312
10320
  const transactionMessage = kit.pipe(
10313
10321
  kit.createTransactionMessage({ version: 0 }),
@@ -10348,7 +10356,7 @@ function getTokenEntropySeedRotatorFunction(args, deps) {
10348
10356
  mint,
10349
10357
  newSeed: { first: newSeed },
10350
10358
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES11 }
10351
- });
10359
+ }, { programAddress: client.networkConfig.programId });
10352
10360
  const latestBlockhash = await getLatestBlockhash();
10353
10361
  const transactionMessage = kit.pipe(
10354
10362
  kit.createTransactionMessage({ version: 0 }),
@@ -10461,7 +10469,7 @@ function getEncryptedBalanceToPublicBalanceDirectWithdrawerFunction(args, deps)
10461
10469
  executorConfig,
10462
10470
  {
10463
10471
  instruction,
10464
- preInstructions: [chunkZQOIYCGA_cjs.createSetComputeUnitLimitInstruction(4e5)],
10472
+ preInstructions: [chunk43JEHY7D_cjs.createSetComputeUnitLimitInstruction(4e5)],
10465
10473
  altEntry
10466
10474
  },
10467
10475
  awaitCallback
@@ -10522,10 +10530,10 @@ function getEncryptedBalanceToPublicBalanceDirectWithdrawerFunction(args, deps)
10522
10530
  throw new chunkBL6WXLPV_cjs.EncryptedWithdrawalError("mint-fetch", `Mint account not found: ${mint}`);
10523
10531
  }
10524
10532
  const mintOwner = mintAccount.programAddress;
10525
- if (mintOwner !== chunkZQOIYCGA_cjs.SPL_TOKEN_PROGRAM_ID && mintOwner !== chunkZQOIYCGA_cjs.TOKEN_2022_PROGRAM_ID) {
10533
+ if (mintOwner !== chunk43JEHY7D_cjs.SPL_TOKEN_PROGRAM_ID && mintOwner !== chunk43JEHY7D_cjs.TOKEN_2022_PROGRAM_ID) {
10526
10534
  throw new chunkBL6WXLPV_cjs.EncryptedWithdrawalError(
10527
10535
  "mint-fetch",
10528
- `Unknown token program: ${mintOwner}. Expected SPL Token (${chunkZQOIYCGA_cjs.SPL_TOKEN_PROGRAM_ID}) or Token-2022 (${chunkZQOIYCGA_cjs.TOKEN_2022_PROGRAM_ID})`
10536
+ `Unknown token program: ${mintOwner}. Expected SPL Token (${chunk43JEHY7D_cjs.SPL_TOKEN_PROGRAM_ID}) or Token-2022 (${chunk43JEHY7D_cjs.TOKEN_2022_PROGRAM_ID})`
10529
10537
  );
10530
10538
  }
10531
10539
  mintTokenProgram = mintOwner;
@@ -10599,7 +10607,7 @@ function getEncryptedBalanceToPublicBalanceDirectWithdrawerFunction(args, deps)
10599
10607
  },
10600
10608
  // Fee slab data and merkle proof
10601
10609
  ...feeSlabResultToInstructionFields(protocolFeeConfig)
10602
- });
10610
+ }, { programAddress: client.networkConfig.programId });
10603
10611
  } catch (error) {
10604
10612
  if (error instanceof chunkBL6WXLPV_cjs.EncryptedWithdrawalError) {
10605
10613
  throw error;