@umbra-privacy/sdk 2.0.3 → 2.0.5

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.js CHANGED
@@ -1,9 +1,9 @@
1
1
  export { RelayerError, getUmbraRelayer, pollClaimUntilTerminal } from './chunk-4RHXVBNI.js';
2
+ import { getNetworkConfig, getNetworkSpecifier, getDefaultSchemeVersion, getDefaultAlgorithmVersion, getDefaultProtocolVersion, createSetComputeUnitLimitInstruction, TOKEN_2022_PROGRAM_ID, SPL_TOKEN_PROGRAM_ID } from './chunk-FQDYYTPG.js';
2
3
  import { getPoseidonAggregator, getPoseidonHasher, getAesDecryptor, getUserAccountX25519KeypairDeriver, deriveNullifierFromModifiedGenerationIndex, deriveRandomSecretFromModifiedGenerationIndex, deriveKeystreamBlindingFactor, getRescueEncryptorFromPrivateKey, getRescueKeyGeneratorFromPrivateKey, getRescueCommitmentGenerator, getModuloPowCurve25519Function, getPolynomialEvaluatorFunction, getMasterViewingKeyDeriver, getMasterViewingKeyBlindingFactorDeriver, getPoseidonPrivateKeyDeriver, getPoseidonBlindingFactorDeriver, getSecondViewingKeyDeriver, getPoseidonEncryptor, getPoseidonKeystreamGenerator, getUserCommitmentGeneratorFunction, getKeystreamCommitmentGenerator, getFiatShamirChallengeGeneratorFunction, expandModifiedGenerationIndex, getEphemeralUtxoMasterViewingKeyDeriver, getEphemeralUtxoMasterViewingKeyBlindingFactorDeriver, getEphemeralUtxoPoseidonPrivateKeyDeriver, getEphemeralUtxoPoseidonPrivateKeyBlindingFactorDeriver, getMasterViewingKeyX25519KeypairDeriver, getMintX25519KeypairDeriver, getPoseidonKeystreamBlindingFactorDeriver, getUtxoCommitmentHashGenerator, getChallengePowersFunction, getAesEncryptor, deriveProofAccountOffsetFromModifiedGenerationIndex, deriveRandomFactorForPolynomialCommitmentFromModifiedGenerationIndex, deriveRescueEncryptionCommitmentBlindingFactorFromModifiedGenerationIndex, getRescueCommitmentBlindingFactorDeriver, getPolynomialCommitmentFactorDeriver, getRescueEncryptorWithNonceFromPrivateKey, getRescueDecryptorFromPrivateKey } from './chunk-KMRROOME.js';
3
4
  export { AES_AUTH_TAG_LENGTH, AES_IV_LENGTH, AES_KEY_LENGTH, AES_METADATA_OVERHEAD, ALPHA, ALPHA_INVERSE, BASE85_LIMB_MAX, BLOCK_SIZE, CIPHER_ROUND_COUNT, FIELD_ELEMENT_BYTE_LENGTH, FIELD_PRIME, GROTH16_G1_BYTE_LENGTH, GROTH16_G2_BYTE_LENGTH, HASH_CAPACITY, HASH_DIGEST_LENGTH, HASH_RATE, HASH_ROUND_COUNT, HASH_STATE_SIZE, MASTER_VIEWING_KEY_MAX, MAX_AGGREGATOR_INPUTS, MAX_POSEIDON_INPUTS, MAX_PRF_SEEDS, NONCE_BYTES, OPTIONAL_DATA_BYTE_LENGTH, PRECOMPUTED_FIELD_INVERSES, REDUCTION_CONST, SAMPLE_BUFFER_BYTE_LENGTH, SECRET_BYTES, SHAKE256_CIPHER_SEED, X25519_BYTE_LENGTH, ZK_PROOF_BYTE_LENGTH, assertAesCiphertextWithMetadata, assertAesKey, assertAesPlaintext, assertBase85Limb, assertCurve25519KeypairResult, assertDailyViewingKey, assertEd25519Keypair, assertGenerationSeed, assertGroth16ProofA, assertGroth16ProofB, assertGroth16ProofC, assertHourlyViewingKey, assertKeccak256Hash, assertKeccak512Hash, assertMasterSeed, assertMasterViewingKey, assertMintViewingKey, assertMinuteViewingKey, assertMonthlyViewingKey, assertOptionalData32, assertPoseidonCiphertext, assertPoseidonCounter, assertPoseidonHash, assertPoseidonKey, assertPoseidonKeystream, assertPoseidonPlaintext, assertRcCiphertext, assertRcCounter, assertRcEncryptionNonce, assertRcKey, assertRcPlaintext, assertSecondViewingKey, assertSharedSecret, assertX25519Bytes, assertX25519Keypair, assertX25519PrivateKey, assertX25519PublicKey, assertYearlyViewingKey, assertZkProofBytes, buildPersonalizationString, defaultAesDecryptor, defaultAesEncryptor, deriveBn254FieldElementFromKeccak512, deriveEphemeralMasterViewingKey, deriveEphemeralMasterViewingKeyBlindingFactor, deriveEphemeralPoseidonPrivateKey, deriveEphemeralPoseidonPrivateKeyBlindingFactor, deriveKeystreamBlindingFactor, deriveModifiedGenerationIndexForReceiverClaim, deriveModifiedGenerationIndexForSenderClaim, deriveNullifierFromModifiedGenerationIndex, deriveProofAccountOffsetFromModifiedGenerationIndex, deriveRandomFactorForPolynomialCommitmentFromModifiedGenerationIndex, deriveRandomSecretFromModifiedGenerationIndex, deriveRescueEncryptionCommitmentBlindingFactorFromModifiedGenerationIndex, expandModifiedGenerationIndex, getAesDecryptor, getAesEncryptor, getBn254FieldElementFromKeccak512Deriver, getChallengePowersFunction, getDailyViewingKeyDeriver, getEphemeralMasterSeedDeriver, getEphemeralRescueCommitmentBlindingFactorDeriver, getEphemeralUtxoH2RandomSecretDeriver, getEphemeralUtxoMasterViewingKeyBlindingFactorDeriver, getEphemeralUtxoMasterViewingKeyDeriver, getEphemeralUtxoNullifierDeriver, getEphemeralUtxoPoseidonPrivateKeyBlindingFactorDeriver, getEphemeralUtxoPoseidonPrivateKeyDeriver, getFiatShamirChallengeGeneratorFunction, getFieldArithmetic, getHourlyViewingKeyDeriver, getKeystreamCommitmentGenerator, getMasterSeedBasedFieldElementDeriver, getMasterViewingKeyBlindingFactorDeriver, getMasterViewingKeyDeriver, getMasterViewingKeyX25519KeypairDeriver, getMintViewingKeyDeriver, getMintX25519KeypairDeriver, getMinuteViewingKeyDeriver, getModuloPowCurve25519Function, getMonthlyViewingKeyDeriver, getPersonalizationStringBuilder, getPolynomialCommitmentFactorDeriver, getPolynomialEvaluatorFunction, getPoseidonAggregator, getPoseidonBlindingFactorDeriver, getPoseidonDecryptor, getPoseidonEncryptor, getPoseidonHasher, getPoseidonKeystreamBlindingFactorDeriver, getPoseidonKeystreamGenerator, getPoseidonPrf, getPoseidonPrivateKeyDeriver, getPseudorandomU512Deriver, getRescueCipher, getRescueCipherFromKeyPair, getRescueCipherInstance, getRescueCommitmentBlindingFactorDeriver, getRescueCommitmentGenerator, getRescueDecryptorFromPrivateKey, getRescueEncryptorFromPrivateKey, getRescueEncryptorWithNonceFromPrivateKey, getRescueKeyGeneratorFromPrivateKey, getRescuePrimeHashFunction, getSecondViewingKeyDeriver, getUserAccountX25519KeypairDeriver, getUserCommitmentGeneratorFunction, getUtxoCommitmentHashGenerator, getYearlyViewingKeyDeriver } from './chunk-KMRROOME.js';
4
5
  import { splitAddressToLowHigh, createBn254FieldElement, createPoseidonKey, splitU256IntoTwoU128s, createRcPlaintext, splitX25519PublicKeyIntoTwoU128s, convertU256ToBase85Limbs, createU256, createCurve25519FieldElement, bigintToBinaryArrayLSB, generateRandomU256, generateRandomU128, createU64, extractClusterOffsetFromMxeAccount, generateRandomU64, extractTransferFeeConfig, calculateTransferFee, generateComputationOffset, extractUtcComponents, getByteAt } from './chunk-UXMQI6B7.js';
5
6
  import { findEncryptedUserAccountPda, findArciumInfrastructurePdas, findUserComplianceGrantPda, findNetworkComplianceGrantPda, findSharedComplianceGrantPda, findEncryptedTokenAccountPda, findStealthPoolPda, findUtxoInputBufferPda, findPublicUtxoInputBufferPda } from './chunk-KH3YTDKA.js';
6
- import { getNetworkConfig, getNetworkSpecifier, getDefaultSchemeVersion, getDefaultAlgorithmVersion, getDefaultProtocolVersion, createSetComputeUnitLimitInstruction, TOKEN_2022_PROGRAM_ID, SPL_TOKEN_PROGRAM_ID } from './chunk-INJ73LXQ.js';
7
7
  import './chunk-EEKF4553.js';
8
8
  import { ComputationMonitorError, FetchUtxosError, ClaimUtxoError, RpcError, ConversionError, TransactionSigningError, TransactionError, EncryptedDepositError, CreateUtxoError, QueryError, RegistrationError, MasterSeedSigningRejectedError, EncryptedWithdrawalError } from './chunk-GP26R377.js';
9
9
  export { ClaimUtxoError, ComputationMonitorError, ConversionError, CreateUtxoError, EncryptedDepositError, EncryptedWithdrawalError, FetchUtxosError, QueryError, RegistrationError, isClaimUtxoError, isComputationMonitorError, isConversionError, isCreateUtxoError, isEncryptedDepositError, isEncryptedWithdrawalError, isFetchUtxosError, isQueryError, isRegistrationError } from './chunk-GP26R377.js';
@@ -5138,7 +5138,7 @@ function getComplianceGrantIssuerFunction(args, deps) {
5138
5138
  granterX25519: { first: granterX25519 },
5139
5139
  receiverX25519: { first: receiverX25519 },
5140
5140
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES }
5141
- });
5141
+ }, { programAddress: client.networkConfig.programId });
5142
5142
  const latestBlockhash = await getLatestBlockhash();
5143
5143
  const computeBudgetInstruction = createSetComputeUnitLimitInstruction(12e5);
5144
5144
  const transactionMessage = pipe(
@@ -5182,7 +5182,7 @@ function getComplianceGrantRevokerFunction(args, deps) {
5182
5182
  granterX25519: { first: granterX25519 },
5183
5183
  receiverX25519: { first: receiverX25519 },
5184
5184
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES2 }
5185
- });
5185
+ }, { programAddress: client.networkConfig.programId });
5186
5186
  const latestBlockhash = await getLatestBlockhash();
5187
5187
  const computeBudgetInstruction = createSetComputeUnitLimitInstruction(12e5);
5188
5188
  const transactionMessage = pipe(
@@ -5263,7 +5263,8 @@ function getSharedCiphertextReencryptorForUserGrantFunction(args, deps) {
5263
5263
  mpcCallbackDataOffset: { first: mpcCallbackDataOffset },
5264
5264
  priorityFees: { first: microLamportsPerAcu ?? 0n },
5265
5265
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES3 }
5266
- }
5266
+ },
5267
+ { programAddress: client.networkConfig.programId }
5267
5268
  );
5268
5269
  const latestBlockhash = await getLatestBlockhash();
5269
5270
  const baseTransactionMessage = pipe(
@@ -5348,7 +5349,8 @@ function getNetworkCiphertextReencryptorForNetworkGrantFunction(args, deps) {
5348
5349
  mpcCallbackDataOffset: { first: mpcCallbackDataOffset },
5349
5350
  priorityFees: { first: microLamportsPerAcu ?? 0n },
5350
5351
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES4 }
5351
- }
5352
+ },
5353
+ { programAddress: client.networkConfig.programId }
5352
5354
  );
5353
5355
  const latestBlockhash = await getLatestBlockhash();
5354
5356
  const baseTransactionMessage = pipe(
@@ -5433,7 +5435,7 @@ function getSharedCiphertextReencryptorForNetworkGrantFunction(args, deps) {
5433
5435
  mpcCallbackDataOffset: { first: mpcCallbackDataOffset },
5434
5436
  priorityFees: { first: microLamportsPerAcu ?? 0n },
5435
5437
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES5 }
5436
- });
5438
+ }, { programAddress: client.networkConfig.programId });
5437
5439
  const latestBlockhash = await getLatestBlockhash();
5438
5440
  const baseTransactionMessage = pipe(
5439
5441
  createTransactionMessage({ version: 0 }),
@@ -5626,7 +5628,7 @@ function getNetworkEncryptionToSharedEncryptionConverterFunction(args, deps) {
5626
5628
  },
5627
5629
  priorityFees: { first: microLamportsPerAcu ?? 0n },
5628
5630
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES6 }
5629
- });
5631
+ }, { programAddress: client.networkConfig.programId });
5630
5632
  const baseTransactionMessage = pipe(
5631
5633
  createTransactionMessage({ version: 0 }),
5632
5634
  (m) => setTransactionMessageFeePayer(userAddress, m),
@@ -5781,7 +5783,7 @@ function getMintEncryptionKeyRotatorFunction(args, deps) {
5781
5783
  },
5782
5784
  priorityFees: { first: microLamportsPerAcu ?? 0n },
5783
5785
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES7 }
5784
- });
5786
+ }, { programAddress: client.networkConfig.programId });
5785
5787
  const latestBlockhash = await getLatestBlockhash();
5786
5788
  const computeBudgetInstruction = createSetComputeUnitLimitInstruction(12e5);
5787
5789
  const baseTransactionMessage = pipe(
@@ -9595,7 +9597,7 @@ function getStagedSolRecovererFunction(args, deps) {
9595
9597
  destination,
9596
9598
  amount: { first: amount },
9597
9599
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES8 }
9598
- });
9600
+ }, { programAddress: client.networkConfig.programId });
9599
9601
  const latestBlockhash = await getLatestBlockhash();
9600
9602
  const transactionMessage = pipe(
9601
9603
  createTransactionMessage({ version: 0 }),
@@ -9634,7 +9636,7 @@ function getStagedSplRecovererFunction(args, deps) {
9634
9636
  destinationAta,
9635
9637
  amount: { first: amount },
9636
9638
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES9 }
9637
- });
9639
+ }, { programAddress: client.networkConfig.programId });
9638
9640
  const latestBlockhash = await getLatestBlockhash();
9639
9641
  const transactionMessage = pipe(
9640
9642
  createTransactionMessage({ version: 0 }),
@@ -10310,7 +10312,7 @@ function getUserEntropySeedRotatorFunction(args, deps) {
10310
10312
  user: noopSigner,
10311
10313
  newSeed: { first: newSeed },
10312
10314
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES10 }
10313
- });
10315
+ }, { programAddress: client.networkConfig.programId });
10314
10316
  const latestBlockhash = await getLatestBlockhash();
10315
10317
  const transactionMessage = pipe(
10316
10318
  createTransactionMessage({ version: 0 }),
@@ -10351,7 +10353,7 @@ function getTokenEntropySeedRotatorFunction(args, deps) {
10351
10353
  mint,
10352
10354
  newSeed: { first: newSeed },
10353
10355
  optionalData: { first: optionalData ?? DEFAULT_OPTIONAL_DATA_BYTES11 }
10354
- });
10356
+ }, { programAddress: client.networkConfig.programId });
10355
10357
  const latestBlockhash = await getLatestBlockhash();
10356
10358
  const transactionMessage = pipe(
10357
10359
  createTransactionMessage({ version: 0 }),
@@ -10602,7 +10604,7 @@ function getEncryptedBalanceToPublicBalanceDirectWithdrawerFunction(args, deps)
10602
10604
  },
10603
10605
  // Fee slab data and merkle proof
10604
10606
  ...feeSlabResultToInstructionFields(protocolFeeConfig)
10605
- });
10607
+ }, { programAddress: client.networkConfig.programId });
10606
10608
  } catch (error) {
10607
10609
  if (error instanceof EncryptedWithdrawalError) {
10608
10610
  throw error;