@umbra-privacy/sdk 2.1.1 → 3.0.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/{chunk-GP26R377.js → chunk-AUNYA6JP.js} +2 -2
- package/dist/chunk-AUNYA6JP.js.map +1 -0
- package/dist/{chunk-BL6WXLPV.cjs → chunk-KCHHJKQN.cjs} +2 -2
- package/dist/chunk-KCHHJKQN.cjs.map +1 -0
- package/dist/{chunk-KMRROOME.js → chunk-YA66JLHI.js} +9 -4
- package/dist/chunk-YA66JLHI.js.map +1 -0
- package/dist/{chunk-3LS5P32X.cjs → chunk-YFUGKMNS.cjs} +9 -4
- package/dist/chunk-YFUGKMNS.cjs.map +1 -0
- package/dist/{client-Cb53GYes.d.cts → client-Baxe29tj.d.cts} +128 -51
- package/dist/{client-CJ5S6Qln.d.ts → client-Cqv_5hHQ.d.ts} +128 -51
- package/dist/constants/index.cjs +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/crypto/index.cjs +142 -142
- package/dist/crypto/index.d.cts +1 -1
- package/dist/crypto/index.d.ts +1 -1
- package/dist/crypto/index.js +1 -1
- package/dist/errors/index.cjs +28 -28
- package/dist/errors/index.d.cts +1 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/{errors-DAIrstEL.d.cts → errors-BqAlwXfh.d.cts} +3 -5
- package/dist/{errors-DPNMfyh0.d.ts → errors-Crx4Jf9K.d.ts} +3 -5
- package/dist/{index-B5wNTNZr.d.cts → index-BRLHQNe9.d.cts} +27 -12
- package/dist/{index-Cd76ZBHA.d.ts → index-gpTrCX61.d.ts} +27 -12
- package/dist/index.cjs +816 -1072
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -263
- package/dist/index.d.ts +12 -263
- package/dist/index.js +321 -573
- package/dist/index.js.map +1 -1
- package/dist/indexer-NHZDFABY.js +311 -0
- package/dist/indexer-NHZDFABY.js.map +1 -0
- package/dist/indexer-XOUBVRNU.cjs +316 -0
- package/dist/indexer-XOUBVRNU.cjs.map +1 -0
- package/dist/interfaces/index.d.cts +2 -2
- package/dist/interfaces/index.d.ts +2 -2
- package/dist/solana/index.d.cts +2 -2
- package/dist/solana/index.d.ts +2 -2
- package/dist/{transaction-forwarder-Dme9whAc.d.ts → transaction-forwarder-Cv3OlsaZ.d.ts} +1 -1
- package/dist/{transaction-forwarder-0GZRKXIr.d.cts → transaction-forwarder-DH07CEkG.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-3LS5P32X.cjs.map +0 -1
- package/dist/chunk-BL6WXLPV.cjs.map +0 -1
- package/dist/chunk-GP26R377.js.map +0 -1
- package/dist/chunk-KMRROOME.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { RescueCommitmentGeneratorFunction } from './crypto/index.js';
|
|
2
2
|
export { AES_AUTH_TAG_LENGTH, AES_IV_LENGTH, AES_KEY_LENGTH, AES_METADATA_OVERHEAD, ALPHA, ALPHA_INVERSE, AesCiphertextWithMetadata, AesKey, AesPlaintext, BLOCK_SIZE, CIPHER_ROUND_COUNT, ConvertU256ToBase85LimbsFunction, EphemeralMasterSeedDeriverArgs, EphemeralMasterSeedDeriverDeps, EphemeralRescueCommitmentBlindingFactorDeriverArgs, EphemeralRescueCommitmentBlindingFactorDeriverDeps, EphemeralUtxoH2RandomSecretDeriverArgs, EphemeralUtxoH2RandomSecretDeriverDeps, EphemeralUtxoMasterViewingKeyBlindingFactorDeriverArgs, EphemeralUtxoMasterViewingKeyBlindingFactorDeriverDeps, EphemeralUtxoMasterViewingKeyDeriverArgs, EphemeralUtxoMasterViewingKeyDeriverDeps, EphemeralUtxoNullifierDeriverArgs, EphemeralUtxoNullifierDeriverDeps, EphemeralUtxoPoseidonPrivateKeyBlindingFactorDeriverArgs, EphemeralUtxoPoseidonPrivateKeyBlindingFactorDeriverDeps, EphemeralUtxoPoseidonPrivateKeyDeriverArgs, EphemeralUtxoPoseidonPrivateKeyDeriverDeps, FIELD_ELEMENT_BYTE_LENGTH, FIELD_PRIME, GROTH16_G1_BYTE_LENGTH, GROTH16_G2_BYTE_LENGTH, GetPersonalizationStringBuilderArgs, GetRescueCipherFromKeyPairFunction, GetRescueCipherFunction, Groth16Proof, Groth16ProofA, Groth16ProofB, Groth16ProofC, H2GeneratorDeps, HASH_CAPACITY, HASH_DIGEST_LENGTH, HASH_RATE, HASH_ROUND_COUNT, HASH_STATE_SIZE, Keccak512BasedBn254FieldElementDeriverDeps, Keccak512BasedBn254FieldElementDeriverFunction, KeystreamCommitmentDeps, MAX_AGGREGATOR_INPUTS, MAX_POSEIDON_INPUTS, MAX_PRF_SEEDS, MasterSeedBasedFieldElementDeriverArgs, MasterSeedBasedFieldElementDeriverDeps, MasterViewingKeyBlindingFactorDeriverArgs, MasterViewingKeyBlindingFactorDeriverDeps, MasterViewingKeyDeriverArgs, MasterViewingKeyDeriverDeps, MintViewingKeyDeriverArgs, MintViewingKeyDeriverDeps, ModifiedGenerationIndexDeriverFunction, NONCE_BYTES, Nonce, OPTIONAL_DATA_BYTE_LENGTH, OptionalData32, PRECOMPUTED_FIELD_INVERSES, PersonalizationStringBuilderFunction, PolynomialCommitmentFactorDeriverArgs, PolynomialCommitmentFactorDeriverDeps, PoseidonAggregatorDeps, PoseidonAggregatorFunction, PoseidonBlindingFactorDeriverArgs, PoseidonBlindingFactorDeriverDeps, PoseidonDecryptorDeps, PoseidonEncryptorDeps, PoseidonKeystreamBlindingFactorDeriverArgs, PoseidonKeystreamBlindingFactorDeriverDeps, PoseidonKeystreamGeneratorDeps, PoseidonPrfDeps, PoseidonPrivateKeyDeriverArgs, PoseidonPrivateKeyDeriverDeps, PseudorandomU512DeriverArgs, PseudorandomU512DeriverDeps, REDUCTION_CONST, RcCiphertext, RcCounter, RcDecryptorDeps, RcEncryptionNonce, RcEncryptorDeps, RcEncryptorWithNonceDeps, RcKey, RcKeyGeneratorDeps, RcPlaintext, RescueCipherFromKeyPairDeps, RescueCommitmentBlindingFactorDeriverArgs, RescueCommitmentBlindingFactorDeriverDeps, RescueCommitmentGeneratorDeps, SAMPLE_BUFFER_BYTE_LENGTH, SECRET_BYTES, SHAKE256_CIPHER_SEED, SplitAddressFunction, TimeViewingKeyDeriverArgs, TimeViewingKeyDeriverDeps, X25519KeypairDeriverArgs, X25519KeypairDeriverDeps, ZK_PROOF_BYTE_LENGTH, ZkProofBytes, assertAesCiphertextWithMetadata, assertAesKey, assertAesPlaintext, assertGroth16ProofA, assertGroth16ProofB, assertGroth16ProofC, assertOptionalData32, assertRcCiphertext, assertRcCounter, assertRcEncryptionNonce, assertRcKey, assertRcPlaintext, 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 './crypto/index.js';
|
|
3
|
-
import { I as IUmbraSigner, A as AccountInfoProviderFunction, G as GetLatestBlockhash, T as TransactionForwarder, a as GetEpochInfo, c as ComputationMonitor, d as IUmbraClient, e as
|
|
4
|
-
export {
|
|
3
|
+
import { I as IUmbraSigner, A as AccountInfoProviderFunction, G as GetLatestBlockhash, T as TransactionForwarder, a as GetEpochInfo, c as ComputationMonitor, d as IUmbraClient, e as ScannedUtxoData, B as BatchMerkleProofResult, f as ClaimableUtxoData, g as GetClaimableUtxoScannerFunctionArgs, h as GetClaimableUtxoScannerFunctionDeps, i as ClaimableUtxoScannerFunction } from './client-Cqv_5hHQ.js';
|
|
4
|
+
export { j as AesDecryptorFunction, k as AesEncryptorFunction, l as ComputationFinalizedResult, m as ComputationFinalizedResultWithSignature, n as ComputationMonitorOptions, o as ComputationMonitorProgressEvent, p as ComputationMonitorResult, q as ComputationMonitorResultWithSignature, r as ComputationPrunedResult, s as ComputationTimedOutResult, D as DEFAULT_MAX_SLOT_WINDOW, t as DEFAULT_POLLING_INTERVAL_MS, u as DEFAULT_SAFETY_TIMEOUT_MS, v as DEFAULT_SIGNATURE_RETRIEVAL_LIMIT, P as PollingBasedComputationMonitorConfig, w as PollingBasedComputationMonitorDeps, x as PollingComputationMonitorOptions, y as PreparedComputationMonitor, W as WebsocketBasedComputationMonitorConfig, z as WebsocketBasedComputationMonitorDeps, E as getPollingComputationMonitor, F as getWebsocketComputationMonitor } from './client-Cqv_5hHQ.js';
|
|
5
5
|
export { bn254Add, bn254FieldElementSampler, bn254ModuloPow, bn254Mul, bn254Sub, computeBn254LimbwiseSumInverse, computeBn254ModularInverse, curve25519FieldElementSampler, curve25519ModuloAdd, curve25519ModuloInv, curve25519ModuloMul, curve25519ModuloPow, curve25519ModuloSub, getBn254FieldElementSampler, getBn254ModularAdder, getBn254ModularInverter, getBn254ModularMultiplier, getBn254ModularNegator, getBn254ModularSubtractor, getCurve25519FieldElementSampler, getCurve25519ModularAddFunction, getCurve25519ModularInvFunction, getCurve25519ModularMulFunction, getCurve25519ModularPowFunction, getCurve25519ModularSubFunction } from './math/index.js';
|
|
6
6
|
import { C as Curve25519KeypairGeneratorFunction, M as MintX25519KeypairDeriverFunction, a as MasterViewingKeyDeriverFunction, b as MasterViewingKeyBlindingFactorDeriverFunction, P as PoseidonPrivateKeyDeriverFunction, c as PoseidonBlindingFactorDeriverFunction, R as RescueCommitmentBlindingFactorDeriverFunction, d as PolynomialCommitmentFactorDeriverFunction, e as RcKeyGeneratorFunction, f as RcEncryptorWithNonceFunction, U as UserCommitmentGeneratorFunction, F as FiatShamirChallengeGeneratorFunction, g as ChallengePowersFunction, h as PolynomialEvaluatorFunction, i as PoseidonAggregatorHashFunction } from './interfaces-z_xYJlgV.js';
|
|
7
7
|
export { j as ChallengePowersDeps, D as DailyViewingKeyGeneratorFunction, E as EphemeralMasterSeedDeriverFunction, k as EphemeralRescueCommitmentBlindingFactorDeriverFunction, l as EphemeralUtxoH2RandomSecretDeriverFunction, m as EphemeralUtxoMasterViewingKeyBlindingFactorDeriverFunction, n as EphemeralUtxoMasterViewingKeyDeriverFunction, o as EphemeralUtxoNullifierDeriverFunction, p as EphemeralUtxoPoseidonPrivateKeyBlindingFactorDeriverFunction, q as EphemeralUtxoPoseidonPrivateKeyDeriverFunction, r as FieldArithmetic, H as H2CircuitProvableHashFunction, s as H2CircuitProvableParams, t as H2FullParams, u as H2GeneratorFns, v as H2HashFunction, w as HourlyViewingKeyGeneratorFunction, K as KeystreamCommitmentFunction, x as MasterSeedBasedFieldElementDeriverFunction, y as MasterSeedGeneratorFunction, z as MintViewingKeyDeriverFunction, A as MinuteViewingKeyGeneratorFunction, B as ModuloPowCurve25519Function, G as MonthlyViewingKeyGeneratorFunction, I as PolynomialEvaluatorDeps, J as PoseidonDecryptorFunction, L as PoseidonEncryptorFunction, N as PoseidonHashFunction, O as PoseidonKeystreamBlindingFactorDeriverFunction, Q as PoseidonKeystreamGeneratorFunction, S as PoseidonPrfFunction, T as PseudorandomU512DeriverFunction, V as RcDecryptorFunction, W as RcEncryptorFunction, X as RescueCipherDeps, Y as RescueCipherInstance, Z as RescueKeyDerivationFunction, _ as RescuePermuteFunction, $ as RescuePrimeHashDeps, a0 as RescuePrimeHashFunction, a1 as SecondViewingKeyGeneratorFunction, a2 as UserCommitmentGeneratorDeps, a3 as ViewingKeyGeneratorOptions, a4 as YearlyViewingKeyGeneratorFunction } from './interfaces-z_xYJlgV.js';
|
|
8
8
|
export { C as Curve25519KeypairResult, D as DailyViewingKey, E as Ed25519Keypair, G as GenerationSeed, H as HourlyViewingKey, K as Keccak256Hash, a as Keccak512Hash, M as MASTER_VIEWING_KEY_MAX, b as MasterSeed, c as MasterViewingKey, d as MintViewingKey, e as MinuteViewingKey, f as MonthlyViewingKey, S as SecondViewingKey, g as SharedSecret, X as X25519Bytes, h as X25519Keypair, i as X25519PrivateKey, j as X25519PublicKey, k as X25519_BYTE_LENGTH, Y as YearlyViewingKey, l as assertCurve25519KeypairResult, m as assertDailyViewingKey, n as assertEd25519Keypair, o as assertGenerationSeed, p as assertHourlyViewingKey, q as assertKeccak256Hash, r as assertKeccak512Hash, s as assertMasterSeed, t as assertMasterViewingKey, u as assertMintViewingKey, v as assertMinuteViewingKey, w as assertMonthlyViewingKey, x as assertSecondViewingKey, y as assertSharedSecret, z as assertX25519Bytes, A as assertX25519Keypair, B as assertX25519PrivateKey, F as assertX25519PublicKey, I as assertYearlyViewingKey } from './types-DKEDUlH9.js';
|
|
9
9
|
export { B as BASE85_LIMB_MAX, a as Base85Limb, b as Base85LimbTuple, P as PoseidonCiphertext, c as PoseidonCounter, d as PoseidonHash, e as PoseidonKey, f as PoseidonKeystream, g as PoseidonPlaintext, h as assertBase85Limb, i as assertPoseidonCiphertext, j as assertPoseidonCounter, k as assertPoseidonHash, l as assertPoseidonKey, m as assertPoseidonKeystream, n as assertPoseidonPlaintext } from './types-Ca7frykr.js';
|
|
10
|
-
export { O as OnTransactionConfirmed, P as PollingBasedTransactionForwarderConfig, a as PollingBasedTransactionForwarderDeps, b as PollingTransactionForwardOptions, R as RpcBasedAccountInfoProviderConfig, c as RpcBasedBlockhashProviderConfig, d as RpcBasedBlockhashProviderDeps, e as RpcBasedEpochInfoProviderConfig, f as RpcBasedEpochInfoProviderDeps, T as TransactionConfirmedInfo, g as TransactionForwardOptions, W as WebsocketBasedTransactionForwarderConfig, h as WebsocketBasedTransactionForwarderDeps, i as createInMemorySigner, j as createSignerFromKeyPair, k as createSignerFromPrivateKeyBytes, l as createSignerFromWalletAccount, m as getPollingTransactionForwarder, n as getRpcAccountInfoProvider, o as getRpcBlockhashProvider, p as getRpcEpochInfoProvider, q as getWebsocketTransactionForwarder } from './transaction-forwarder-
|
|
10
|
+
export { O as OnTransactionConfirmed, P as PollingBasedTransactionForwarderConfig, a as PollingBasedTransactionForwarderDeps, b as PollingTransactionForwardOptions, R as RpcBasedAccountInfoProviderConfig, c as RpcBasedBlockhashProviderConfig, d as RpcBasedBlockhashProviderDeps, e as RpcBasedEpochInfoProviderConfig, f as RpcBasedEpochInfoProviderDeps, T as TransactionConfirmedInfo, g as TransactionForwardOptions, W as WebsocketBasedTransactionForwarderConfig, h as WebsocketBasedTransactionForwarderDeps, i as createInMemorySigner, j as createSignerFromKeyPair, k as createSignerFromPrivateKeyBytes, l as createSignerFromWalletAccount, m as getPollingTransactionForwarder, n as getRpcAccountInfoProvider, o as getRpcBlockhashProvider, p as getRpcEpochInfoProvider, q as getWebsocketTransactionForwarder } from './transaction-forwarder-Cv3OlsaZ.js';
|
|
11
11
|
import { f as LoadResult, g as StoreResult, b as MasterSeedGeneratorFunction, M as MasterSeedLoaderFunction, a as MasterSeedStorerFunction, T as TransactionSignature } from './types-CxfTIpN9.js';
|
|
12
|
-
export { C as ClaimUtxoError, a as ClaimUtxoStage, b as ComputationMonitorError, c as ComputationMonitorStage, d as ConversionError, e as ConversionStage, f as CreateUtxoError, g as CreateUtxoStage, E as EncryptedDepositError, h as EncryptedDepositStage, i as EncryptedWithdrawalError, j as EncryptedWithdrawalStage, F as FetchUtxosError, k as FetchUtxosStage, Q as QueryError, l as QueryStage, R as RegistrationError, m as RegistrationStage, n as isClaimUtxoError, o as isComputationMonitorError, p as isConversionError, q as isCreateUtxoError, r as isEncryptedDepositError, s as isEncryptedWithdrawalError, t as isFetchUtxosError, u as isQueryError, v as isRegistrationError } from './errors-
|
|
13
|
-
import { G as GetUmbraRelayerArgs, a as GetUmbraRelayerDeps, I as IUmbraRelayer, C as ClaimStatusResponse, b as ClaimStatus, c as ClaimBatchResult, d as GetReceiverClaimableUtxoToEncryptedBalanceClaimerFunctionArgs, e as GetReceiverClaimableUtxoToEncryptedBalanceClaimerFunctionDeps, f as ClaimUtxoIntoEncryptedBalanceResult, g as GetSelfClaimableUtxoToEncryptedBalanceClaimerFunctionArgs, h as GetSelfClaimableUtxoToEncryptedBalanceClaimerFunctionDeps, i as GetSelfClaimableUtxoToPublicBalanceClaimerFunctionArgs, j as GetSelfClaimableUtxoToPublicBalanceClaimerFunctionDeps, k as ClaimUtxoIntoPublicBalanceResult, l as GetCreateUserGrantedComplianceGrantFunctionArgs, m as GetCreateUserGrantedComplianceGrantFunctionDeps, n as CreateUserGrantedComplianceGrantFunction, o as GetDeleteUserGrantedComplianceGrantFunctionArgs, p as GetDeleteUserGrantedComplianceGrantFunctionDeps, D as DeleteUserGrantedComplianceGrantFunction, q as GetReencryptSharedCiphertextsUserGrantV10FunctionArgs, r as GetReencryptSharedCiphertextsUserGrantV10FunctionDeps, R as ReencryptSharedCiphertextsUserGrantV10Function, s as GetReencryptMxeCiphertextsNetworkGrantV10FunctionArgs, t as GetReencryptMxeCiphertextsNetworkGrantV10FunctionDeps, u as ReencryptMxeCiphertextsNetworkGrantV10Function, v as GetReencryptSharedCiphertextsNetworkGrantV10FunctionArgs, w as GetReencryptSharedCiphertextsNetworkGrantV10FunctionDeps, x as ReencryptSharedCiphertextsNetworkGrantV10Function, y as GetQueryNetworkMxeComplianceGrantFunctionArgs, z as GetQueryNetworkMxeComplianceGrantFunctionDeps, Q as QueryNetworkMxeComplianceGrantFunction, A as GetQueryNetworkSharedComplianceGrantFunctionArgs, B as GetQueryNetworkSharedComplianceGrantFunctionDeps, E as QueryNetworkSharedComplianceGrantFunction, F as GetQueryUserComplianceGrantFunctionArgs, H as GetQueryUserComplianceGrantFunctionDeps, J as QueryUserComplianceGrantFunction, K as GetConvertToSharedEncryptionFunctionArgs, L as GetConvertToSharedEncryptionFunctionDeps, M as ConvertToSharedEncryptionFunction, N as GetRotateMintX25519EncryptionKeyFunctionArgs, O as GetRotateMintX25519EncryptionKeyFunctionDeps, P as RotateMintX25519EncryptionKeyFunction, S as GetPublicBalanceToEncryptedBalanceDirectDepositorFunctionArgs, T as GetPublicBalanceToEncryptedBalanceDirectDepositorFunctionDeps, U as PublicBalanceToEncryptedBalanceDirectDepositorFunction, V as GetEncryptedBalanceToSelfClaimableUtxoCreatorFunctionArgs, W as GetEncryptedBalanceToSelfClaimableUtxoCreatorFunctionDeps, X as EncryptedBalanceToSelfClaimableUtxoCreatorFunction, Y as GetEncryptedBalanceToReceiverClaimableUtxoCreatorFunctionArgs, Z as GetEncryptedBalanceToReceiverClaimableUtxoCreatorFunctionDeps, _ as EncryptedBalanceToReceiverClaimableUtxoCreatorFunction, $ as GetPublicBalanceToSelfClaimableUtxoCreatorFunctionArgs, a0 as GetPublicBalanceToSelfClaimableUtxoCreatorFunctionDeps, a1 as PublicBalanceToSelfClaimableUtxoCreatorFunction, a2 as GetPublicBalanceToReceiverClaimableUtxoCreatorFunctionArgs, a3 as GetPublicBalanceToReceiverClaimableUtxoCreatorFunctionDeps, a4 as PublicBalanceToReceiverClaimableUtxoCreatorFunction, a5 as GetQueryEncryptedBalanceFunctionArgs, a6 as GetQueryEncryptedBalanceFunctionDeps, a7 as QueryEncryptedBalanceFunction, a8 as GetQueryUserAccountFunctionArgs, a9 as GetQueryUserAccountFunctionDeps, aa as QueryUserAccountFunction, ab as GetClaimStagedSolFromPoolFunctionArgs, ac as GetClaimStagedSolFromPoolFunctionDeps, ad as ClaimStagedSolFromPoolFunction, ae as GetClaimStagedSplFromPoolFunctionArgs, af as GetClaimStagedSplFromPoolFunctionDeps, ag as ClaimStagedSplFromPoolFunction, ah as IZkProverForUserRegistration, ai as UserRegistrationFunction, aj as GetUpdateRandomGenerationSeedFunctionArgs, ak as GetUpdateRandomGenerationSeedFunctionDeps, al as UpdateRandomGenerationSeedFunction, am as GetUpdateTokenAccountRandomGenerationSeedFunctionArgs, an as GetUpdateTokenAccountRandomGenerationSeedFunctionDeps, ao as UpdateTokenAccountRandomGenerationSeedFunction, ap as GetEncryptedBalanceToPublicBalanceDirectWithdrawerFunctionArgs, aq as GetEncryptedBalanceToPublicBalanceDirectWithdrawerFunctionDeps, ar as EncryptedBalanceToPublicBalanceDirectWithdrawerFunction } from './index-
|
|
14
|
-
export { as as AwaitCallbackOptions, at as AwaitComputationFinalizationConfig, au as CreateUtxoFromEncryptedBalanceResult, av as CreateUtxoFromPublicBalanceResult, aw as DepositResult, ax as ExecuteTransactionOptions, ay as TransactionExecutionResult, az as TransactionExecutionResultWithCallback, aA as TransactionExecutorConfig, aB as WithdrawResult, aC as buildTransactionMessage, aD as executeComputationTransaction, aE as extractSignatures, aF as forwardAndMonitor, aG as signTransactionMessage } from './index-
|
|
12
|
+
export { C as ClaimUtxoError, a as ClaimUtxoStage, b as ComputationMonitorError, c as ComputationMonitorStage, d as ConversionError, e as ConversionStage, f as CreateUtxoError, g as CreateUtxoStage, E as EncryptedDepositError, h as EncryptedDepositStage, i as EncryptedWithdrawalError, j as EncryptedWithdrawalStage, F as FetchUtxosError, k as FetchUtxosStage, Q as QueryError, l as QueryStage, R as RegistrationError, m as RegistrationStage, n as isClaimUtxoError, o as isComputationMonitorError, p as isConversionError, q as isCreateUtxoError, r as isEncryptedDepositError, s as isEncryptedWithdrawalError, t as isFetchUtxosError, u as isQueryError, v as isRegistrationError } from './errors-Crx4Jf9K.js';
|
|
13
|
+
import { G as GetUmbraRelayerArgs, a as GetUmbraRelayerDeps, I as IUmbraRelayer, C as ClaimStatusResponse, b as ClaimStatus, c as ClaimBatchResult, d as GetReceiverClaimableUtxoToEncryptedBalanceClaimerFunctionArgs, e as GetReceiverClaimableUtxoToEncryptedBalanceClaimerFunctionDeps, f as ClaimUtxoIntoEncryptedBalanceResult, g as GetSelfClaimableUtxoToEncryptedBalanceClaimerFunctionArgs, h as GetSelfClaimableUtxoToEncryptedBalanceClaimerFunctionDeps, i as GetSelfClaimableUtxoToPublicBalanceClaimerFunctionArgs, j as GetSelfClaimableUtxoToPublicBalanceClaimerFunctionDeps, k as ClaimUtxoIntoPublicBalanceResult, l as GetCreateUserGrantedComplianceGrantFunctionArgs, m as GetCreateUserGrantedComplianceGrantFunctionDeps, n as CreateUserGrantedComplianceGrantFunction, o as GetDeleteUserGrantedComplianceGrantFunctionArgs, p as GetDeleteUserGrantedComplianceGrantFunctionDeps, D as DeleteUserGrantedComplianceGrantFunction, q as GetReencryptSharedCiphertextsUserGrantV10FunctionArgs, r as GetReencryptSharedCiphertextsUserGrantV10FunctionDeps, R as ReencryptSharedCiphertextsUserGrantV10Function, s as GetReencryptMxeCiphertextsNetworkGrantV10FunctionArgs, t as GetReencryptMxeCiphertextsNetworkGrantV10FunctionDeps, u as ReencryptMxeCiphertextsNetworkGrantV10Function, v as GetReencryptSharedCiphertextsNetworkGrantV10FunctionArgs, w as GetReencryptSharedCiphertextsNetworkGrantV10FunctionDeps, x as ReencryptSharedCiphertextsNetworkGrantV10Function, y as GetQueryNetworkMxeComplianceGrantFunctionArgs, z as GetQueryNetworkMxeComplianceGrantFunctionDeps, Q as QueryNetworkMxeComplianceGrantFunction, A as GetQueryNetworkSharedComplianceGrantFunctionArgs, B as GetQueryNetworkSharedComplianceGrantFunctionDeps, E as QueryNetworkSharedComplianceGrantFunction, F as GetQueryUserComplianceGrantFunctionArgs, H as GetQueryUserComplianceGrantFunctionDeps, J as QueryUserComplianceGrantFunction, K as GetConvertToSharedEncryptionFunctionArgs, L as GetConvertToSharedEncryptionFunctionDeps, M as ConvertToSharedEncryptionFunction, N as GetRotateMintX25519EncryptionKeyFunctionArgs, O as GetRotateMintX25519EncryptionKeyFunctionDeps, P as RotateMintX25519EncryptionKeyFunction, S as GetPublicBalanceToEncryptedBalanceDirectDepositorFunctionArgs, T as GetPublicBalanceToEncryptedBalanceDirectDepositorFunctionDeps, U as PublicBalanceToEncryptedBalanceDirectDepositorFunction, V as GetEncryptedBalanceToSelfClaimableUtxoCreatorFunctionArgs, W as GetEncryptedBalanceToSelfClaimableUtxoCreatorFunctionDeps, X as EncryptedBalanceToSelfClaimableUtxoCreatorFunction, Y as GetEncryptedBalanceToReceiverClaimableUtxoCreatorFunctionArgs, Z as GetEncryptedBalanceToReceiverClaimableUtxoCreatorFunctionDeps, _ as EncryptedBalanceToReceiverClaimableUtxoCreatorFunction, $ as GetPublicBalanceToSelfClaimableUtxoCreatorFunctionArgs, a0 as GetPublicBalanceToSelfClaimableUtxoCreatorFunctionDeps, a1 as PublicBalanceToSelfClaimableUtxoCreatorFunction, a2 as GetPublicBalanceToReceiverClaimableUtxoCreatorFunctionArgs, a3 as GetPublicBalanceToReceiverClaimableUtxoCreatorFunctionDeps, a4 as PublicBalanceToReceiverClaimableUtxoCreatorFunction, a5 as GetQueryEncryptedBalanceFunctionArgs, a6 as GetQueryEncryptedBalanceFunctionDeps, a7 as QueryEncryptedBalanceFunction, a8 as GetQueryUserAccountFunctionArgs, a9 as GetQueryUserAccountFunctionDeps, aa as QueryUserAccountFunction, ab as GetClaimStagedSolFromPoolFunctionArgs, ac as GetClaimStagedSolFromPoolFunctionDeps, ad as ClaimStagedSolFromPoolFunction, ae as GetClaimStagedSplFromPoolFunctionArgs, af as GetClaimStagedSplFromPoolFunctionDeps, ag as ClaimStagedSplFromPoolFunction, ah as IZkProverForUserRegistration, ai as UserRegistrationFunction, aj as GetUpdateRandomGenerationSeedFunctionArgs, ak as GetUpdateRandomGenerationSeedFunctionDeps, al as UpdateRandomGenerationSeedFunction, am as GetUpdateTokenAccountRandomGenerationSeedFunctionArgs, an as GetUpdateTokenAccountRandomGenerationSeedFunctionDeps, ao as UpdateTokenAccountRandomGenerationSeedFunction, ap as GetEncryptedBalanceToPublicBalanceDirectWithdrawerFunctionArgs, aq as GetEncryptedBalanceToPublicBalanceDirectWithdrawerFunctionDeps, ar as EncryptedBalanceToPublicBalanceDirectWithdrawerFunction } from './index-gpTrCX61.js';
|
|
14
|
+
export { as as AwaitCallbackOptions, at as AwaitComputationFinalizationConfig, au as CreateUtxoFromEncryptedBalanceResult, av as CreateUtxoFromPublicBalanceResult, aw as DepositResult, ax as ExecuteTransactionOptions, ay as TransactionExecutionResult, az as TransactionExecutionResultWithCallback, aA as TransactionExecutorConfig, aB as WithdrawResult, aC as buildTransactionMessage, aD as executeComputationTransaction, aE as extractSignatures, aF as forwardAndMonitor, aG as signTransactionMessage } from './index-gpTrCX61.js';
|
|
15
15
|
export { EncryptedUserAccount, QueryComplianceGrantResult, QueryUserAccountResult } from './types/index.js';
|
|
16
16
|
import { h as U512 } from './types-C_V_CaKK.js';
|
|
17
17
|
import { N as Network, f as ProtocolVersionSpecifierFunction, a as AlgorithmVersionSpecifierFunction, g as SchemeVersionSpecifierFunction } from './versions-BRlR36EA.js';
|
|
@@ -57,11 +57,11 @@ declare function getDefaultMasterSeedStorage(): {
|
|
|
57
57
|
*
|
|
58
58
|
* @remarks
|
|
59
59
|
* Default generation process:
|
|
60
|
-
* 1.
|
|
61
|
-
* 2.
|
|
62
|
-
* 3. Hashes the signature with KMAC256 (dkLen=64) to produce 512-bit seed
|
|
60
|
+
* 1. Signs the full `UMBRA_MESSAGE_TO_SIGN` consent message with the user's wallet
|
|
61
|
+
* 2. Hashes the signature with KMAC256 (dkLen=64) to produce 512-bit seed
|
|
63
62
|
*
|
|
64
|
-
*
|
|
63
|
+
* The consent message is protocol-wide and must not be changed without a protocol
|
|
64
|
+
* upgrade, since all derived keys depend on the exact message bytes.
|
|
65
65
|
*
|
|
66
66
|
* @param signer - The signer to use for seed generation
|
|
67
67
|
* @returns Master seed generator function
|
|
@@ -335,7 +335,7 @@ interface GetUmbraClientDeps {
|
|
|
335
335
|
*
|
|
336
336
|
* Set to `undefined` (or omit) to use the default. The monitor is optional
|
|
337
337
|
* on `IUmbraClient` — callers that don't need MPC callback monitoring
|
|
338
|
-
* can simply not call `
|
|
338
|
+
* can simply not call `prepareMonitor`.
|
|
339
339
|
*
|
|
340
340
|
* @defaultValue Constructed from `rpcUrl` and `rpcSubscriptionsUrl`
|
|
341
341
|
*/
|
|
@@ -772,257 +772,6 @@ declare function getHardcodedClaimUtxoProtocolFeeProvider(): GetFeeConfig;
|
|
|
772
772
|
*/
|
|
773
773
|
declare function getHardcodedClaimUtxoRelayerFeeProvider(): GetFeeConfig;
|
|
774
774
|
|
|
775
|
-
/**
|
|
776
|
-
* Indexer Factory Functions Module.
|
|
777
|
-
*
|
|
778
|
-
* @remarks
|
|
779
|
-
* This module provides factory functions for creating indexer service fetchers.
|
|
780
|
-
* Each factory takes configuration arguments and optional dependencies,
|
|
781
|
-
* returning a specialized fetcher function.
|
|
782
|
-
*
|
|
783
|
-
* The Umbra indexer is an **untrusted** off-chain service that tracks on-chain events
|
|
784
|
-
* and makes UTXO data and Merkle proofs queryable without scanning the entire chain.
|
|
785
|
-
* Because the indexer is untrusted, callers are responsible for cryptographically
|
|
786
|
-
* verifying all returned data against the on-chain Merkle tree before use.
|
|
787
|
-
*
|
|
788
|
-
* **API Endpoints (via ReadServiceClient):**
|
|
789
|
-
* - `GET /v1/trees/:tree_index/proof/:insertion_index` - Merkle proof for a specific leaf
|
|
790
|
-
* - `GET /v1/utxos?start=&end=&limit=` - UTXO data with pagination
|
|
791
|
-
*
|
|
792
|
-
* **Hash Encoding:**
|
|
793
|
-
* All byte fields (hashes, keys, addresses) are base64-encoded in the read service protobuf response.
|
|
794
|
-
*
|
|
795
|
-
* **Dependency Injection:**
|
|
796
|
-
* All factories support injecting a custom `fetch` implementation for testing
|
|
797
|
-
* or environments without global fetch.
|
|
798
|
-
*
|
|
799
|
-
* **Trust Model:**
|
|
800
|
-
* The indexer is UNTRUSTED. Callers must verify:
|
|
801
|
-
* - UTXO commitments against the on-chain Indexed Merkle Tree.
|
|
802
|
-
* - Merkle proof paths against the on-chain Merkle root.
|
|
803
|
-
* - AES-encrypted data by decrypting with the recipient's private key and
|
|
804
|
-
* checking that the decrypted plaintext re-hashes to the stored commitment.
|
|
805
|
-
*
|
|
806
|
-
* @packageDocumentation
|
|
807
|
-
*/
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
* Error class for indexer-related failures.
|
|
811
|
-
*
|
|
812
|
-
* @remarks
|
|
813
|
-
* This error is thrown when indexer API calls fail due to network issues,
|
|
814
|
-
* invalid responses, or server errors. It extends the standard `Error` class
|
|
815
|
-
* with two additional structured fields:
|
|
816
|
-
*
|
|
817
|
-
* - `operation` — a machine-readable label for the failing operation, useful
|
|
818
|
-
* for programmatic error handling and logging.
|
|
819
|
-
* - `statusCode` — the HTTP status code returned by the indexer, when
|
|
820
|
-
* applicable. This is `undefined` for network-level failures (e.g. DNS
|
|
821
|
-
* resolution failure, timeout).
|
|
822
|
-
*
|
|
823
|
-
* @example
|
|
824
|
-
* ```typescript
|
|
825
|
-
* try {
|
|
826
|
-
* const proofs = await fetchProof(0, [42]);
|
|
827
|
-
* } catch (err) {
|
|
828
|
-
* if (err instanceof IndexerError) {
|
|
829
|
-
* console.error(`Operation: ${err.operation}, HTTP status: ${err.statusCode}`);
|
|
830
|
-
* }
|
|
831
|
-
* }
|
|
832
|
-
* ```
|
|
833
|
-
*
|
|
834
|
-
* @public
|
|
835
|
-
*/
|
|
836
|
-
declare class IndexerError extends Error {
|
|
837
|
-
/**
|
|
838
|
-
* The indexer operation that failed.
|
|
839
|
-
*
|
|
840
|
-
* @remarks
|
|
841
|
-
* This is a short camelCase label identifying which high-level operation
|
|
842
|
-
* triggered the error (e.g. `"fetchMerkleProof"`, `"fetchUtxoData"`,
|
|
843
|
-
* `"base64Conversion"`).
|
|
844
|
-
*
|
|
845
|
-
* @readonly
|
|
846
|
-
*/
|
|
847
|
-
readonly operation: string;
|
|
848
|
-
/**
|
|
849
|
-
* HTTP status code if available.
|
|
850
|
-
*
|
|
851
|
-
* @remarks
|
|
852
|
-
* Present when the server responded with an HTTP error (4xx or 5xx).
|
|
853
|
-
* `undefined` for transport-level failures such as network timeouts or
|
|
854
|
-
* DNS resolution failures.
|
|
855
|
-
*
|
|
856
|
-
* @readonly
|
|
857
|
-
*/
|
|
858
|
-
readonly statusCode: number | undefined;
|
|
859
|
-
/**
|
|
860
|
-
* Creates a new IndexerError.
|
|
861
|
-
*
|
|
862
|
-
* @param operation - The operation that failed (e.g. `"fetchMerkleProof"`)
|
|
863
|
-
* @param message - Descriptive error message for display to users or logs
|
|
864
|
-
* @param statusCode - Optional HTTP status code (undefined for network failures)
|
|
865
|
-
* @param cause - Optional underlying error that triggered this one
|
|
866
|
-
*/
|
|
867
|
-
constructor(operation: string, message: string, statusCode?: number, cause?: Error);
|
|
868
|
-
}
|
|
869
|
-
/**
|
|
870
|
-
* Creates a Merkle proof fetcher function.
|
|
871
|
-
*
|
|
872
|
-
* @remarks
|
|
873
|
-
* This factory creates a function that fetches Merkle proofs from the indexer
|
|
874
|
-
* read service via `GET /v1/trees/:tree_index/proof/:insertion_index`.
|
|
875
|
-
*
|
|
876
|
-
* **Purpose:**
|
|
877
|
-
* Merkle proofs are required as inputs to Groth16 claim transactions. The proof
|
|
878
|
-
* demonstrates that a UTXO commitment exists at a specific leaf position in the
|
|
879
|
-
* on-chain Indexed Merkle Tree without revealing which UTXO is being claimed
|
|
880
|
-
* (the ZK circuit hides this relationship).
|
|
881
|
-
*
|
|
882
|
-
* **Concurrency:**
|
|
883
|
-
* When multiple `insertionIndices` are provided, all proof requests are issued
|
|
884
|
-
* concurrently via `Promise.all`. The API supports only one leaf per request,
|
|
885
|
-
* so N insertion indices result in N HTTP calls fired in parallel.
|
|
886
|
-
*
|
|
887
|
-
* **Caller Verification Requirement:**
|
|
888
|
-
* Because the indexer is untrusted, callers must verify the returned `merkleRoot`
|
|
889
|
-
* against the current on-chain root before submitting the Merkle path to the
|
|
890
|
-
* ZK circuit. An incorrect proof will cause on-chain verification to fail.
|
|
891
|
-
*
|
|
892
|
-
* **API Endpoint:**
|
|
893
|
-
* `GET /v1/trees/:tree_index/proof/:insertion_index`
|
|
894
|
-
*
|
|
895
|
-
* @param args - Required configuration
|
|
896
|
-
* @param args.apiEndpoint - The base URL of the indexer read service
|
|
897
|
-
* @param deps - Optional dependencies (inject a custom `fetch` for tests or non-browser envs)
|
|
898
|
-
* @param deps.fetch - Custom fetch implementation; defaults to `globalThis.fetch`
|
|
899
|
-
* @returns A {@link MerkleProofFetcherFunction} that, when called, fetches proofs
|
|
900
|
-
* for the specified leaves and returns them keyed by insertion index
|
|
901
|
-
*
|
|
902
|
-
* @throws {IndexerError} If `treeIndex` or any `insertionIndex` is not a non-negative integer
|
|
903
|
-
* @throws {IndexerError} If the HTTP request to the indexer fails
|
|
904
|
-
*
|
|
905
|
-
* @example
|
|
906
|
-
* ```typescript
|
|
907
|
-
* const fetchProof = getMerkleProofFetcher({
|
|
908
|
-
* apiEndpoint: 'https://indexer.umbra.finance'
|
|
909
|
-
* });
|
|
910
|
-
*
|
|
911
|
-
* // Fetch proofs for two leaves in tree 0
|
|
912
|
-
* const proofs = await fetchProof(0, [42, 43]);
|
|
913
|
-
* const proof = proofs.get(42);
|
|
914
|
-
* if (proof !== undefined) {
|
|
915
|
-
* console.log('Merkle root:', proof.merkleRoot);
|
|
916
|
-
* console.log('Path length:', proof.merklePath.length);
|
|
917
|
-
* }
|
|
918
|
-
* ```
|
|
919
|
-
*
|
|
920
|
-
* @example
|
|
921
|
-
* ```typescript
|
|
922
|
-
* // Inject a custom fetch for unit testing
|
|
923
|
-
* const fetchProof = getMerkleProofFetcher(
|
|
924
|
-
* { apiEndpoint: 'https://indexer.umbra.finance' },
|
|
925
|
-
* { fetch: mockFetch }
|
|
926
|
-
* );
|
|
927
|
-
* ```
|
|
928
|
-
*
|
|
929
|
-
* @see {@link MerkleProofFetcherFunction}
|
|
930
|
-
* @see {@link MerkleProofData}
|
|
931
|
-
* @public
|
|
932
|
-
*/
|
|
933
|
-
declare function getMerkleProofFetcher(args: GetMerkleProofFetcherArgs, deps?: GetMerkleProofFetcherDeps): MerkleProofFetcherFunction;
|
|
934
|
-
/**
|
|
935
|
-
* Creates a batch Merkle proof fetcher function.
|
|
936
|
-
*
|
|
937
|
-
* @remarks
|
|
938
|
-
* Unlike {@link getMerkleProofFetcher} which fires individual HTTP requests per leaf,
|
|
939
|
-
* this fetcher uses the `POST /v1/trees/:tree_index/proofs` batch endpoint.
|
|
940
|
-
* The indexer generates all proofs under a single tree read lock, guaranteeing
|
|
941
|
-
* a consistent Merkle root across all entries. This is essential for ZK batch
|
|
942
|
-
* claims where the circuit requires a single root for all proved leaves.
|
|
943
|
-
*
|
|
944
|
-
* @param args - Factory arguments (apiEndpoint).
|
|
945
|
-
* @param deps - Optional dependency overrides (custom fetch).
|
|
946
|
-
* @returns A {@link BatchMerkleProofFetcherFunction}.
|
|
947
|
-
*
|
|
948
|
-
* @public
|
|
949
|
-
*/
|
|
950
|
-
declare function getBatchMerkleProofFetcher(args: GetMerkleProofFetcherArgs, deps?: GetMerkleProofFetcherDeps): BatchMerkleProofFetcherFunction;
|
|
951
|
-
/**
|
|
952
|
-
* Creates a UTXO data fetcher function.
|
|
953
|
-
*
|
|
954
|
-
* @remarks
|
|
955
|
-
* This factory creates a function that fetches UTXO data from the indexer
|
|
956
|
-
* read service via `GET /v1/utxos?start=&end=&limit=` with pagination support.
|
|
957
|
-
*
|
|
958
|
-
* **Purpose:**
|
|
959
|
-
* Recipients use this function to scan for UTXOs sent to them. Because UTXOs
|
|
960
|
-
* are encrypted, the recipient must attempt to decrypt each UTXO's AES ciphertext
|
|
961
|
-
* with their private key to determine which UTXOs belong to them.
|
|
962
|
-
*
|
|
963
|
-
* **Absolute Index Calculation:**
|
|
964
|
-
* The API uses a global "absolute index" that spans all trees. The formula is:
|
|
965
|
-
* ```
|
|
966
|
-
* absoluteIndex = treeIndex * 1,048,576 + insertionIndex
|
|
967
|
-
* ```
|
|
968
|
-
* where 1,048,576 = 2^20 is the capacity of each Indexed Merkle Tree.
|
|
969
|
-
*
|
|
970
|
-
* **Pagination:**
|
|
971
|
-
* The API returns up to `limit` items per response. To scan a range larger than
|
|
972
|
-
* one page, iterate using the cursor pattern:
|
|
973
|
-
* - Use `startIndex` and optional `endIndex` to define the absolute index range
|
|
974
|
-
* - Use `limit` to control page size (default: {@link DEFAULT_UTXO_LIMIT}, max: {@link MAX_UTXO_LIMIT})
|
|
975
|
-
* - Use `nextCursor` from the result as `startIndex` for the next page
|
|
976
|
-
* - Stop when `hasMore` is `false`
|
|
977
|
-
*
|
|
978
|
-
* **Caller Verification Requirement:**
|
|
979
|
-
* Because the indexer is untrusted, callers must verify each UTXO's
|
|
980
|
-
* `finalCommitment` against the on-chain Merkle tree after decryption.
|
|
981
|
-
*
|
|
982
|
-
* **API Endpoint:**
|
|
983
|
-
* `GET /v1/utxos?start=&end=&limit=`
|
|
984
|
-
*
|
|
985
|
-
* @param args - Required configuration
|
|
986
|
-
* @param args.apiEndpoint - The base URL of the indexer read service
|
|
987
|
-
* @param deps - Optional dependencies (inject a custom `fetch` for tests or non-browser envs)
|
|
988
|
-
* @param deps.fetch - Custom fetch implementation; defaults to `globalThis.fetch`
|
|
989
|
-
* @returns A {@link UtxoDataFetcherFunction} that fetches one page of UTXO data
|
|
990
|
-
*
|
|
991
|
-
* @throws {IndexerError} If `startIndex` is negative
|
|
992
|
-
* @throws {IndexerError} If `endIndex` is defined and less than `startIndex`
|
|
993
|
-
* @throws {IndexerError} If `limit` is outside the range [1, {@link MAX_UTXO_LIMIT}]
|
|
994
|
-
* @throws {IndexerError} If the HTTP request fails
|
|
995
|
-
* @throws {IndexerError} If any item in the response cannot be parsed
|
|
996
|
-
*
|
|
997
|
-
* @example
|
|
998
|
-
* ```typescript
|
|
999
|
-
* const fetchUtxoData = getUtxoDataFetcher({
|
|
1000
|
-
* apiEndpoint: 'https://indexer.umbra.finance'
|
|
1001
|
-
* });
|
|
1002
|
-
*
|
|
1003
|
-
* // Scan all UTXOs from the beginning
|
|
1004
|
-
* let result = await fetchUtxoData(0n, undefined, 1000);
|
|
1005
|
-
* console.log(`Found ${result.items.size} UTXOs, hasMore=${result.hasMore}`);
|
|
1006
|
-
*
|
|
1007
|
-
* // Continue pagination
|
|
1008
|
-
* while (result.hasMore && result.nextCursor !== undefined) {
|
|
1009
|
-
* result = await fetchUtxoData(result.nextCursor, undefined, 1000);
|
|
1010
|
-
* }
|
|
1011
|
-
* ```
|
|
1012
|
-
*
|
|
1013
|
-
* @example
|
|
1014
|
-
* ```typescript
|
|
1015
|
-
* // Fetch only UTXOs within tree 0 (absoluteIndex 0 to 1048575)
|
|
1016
|
-
* const result = await fetchUtxoData(0n, 1048575n, 5000);
|
|
1017
|
-
* ```
|
|
1018
|
-
*
|
|
1019
|
-
* @see {@link UtxoDataFetcherFunction}
|
|
1020
|
-
* @see {@link UtxoFetchResult}
|
|
1021
|
-
* @see {@link UtxoDataItem}
|
|
1022
|
-
* @public
|
|
1023
|
-
*/
|
|
1024
|
-
declare function getUtxoDataFetcher(args: GetUtxoDataFetcherArgs, deps?: GetUtxoDataFetcherDeps): UtxoDataFetcherFunction;
|
|
1025
|
-
|
|
1026
775
|
/**
|
|
1027
776
|
* Relayer Module (V2 API).
|
|
1028
777
|
*
|
|
@@ -5037,4 +4786,4 @@ declare function getTokenEntropySeedRotatorFunction(args: GetUpdateTokenAccountR
|
|
|
5037
4786
|
*/
|
|
5038
4787
|
declare function getEncryptedBalanceToPublicBalanceDirectWithdrawerFunction(args: GetEncryptedBalanceToPublicBalanceDirectWithdrawerFunctionArgs, deps?: GetEncryptedBalanceToPublicBalanceDirectWithdrawerFunctionDeps): EncryptedBalanceToPublicBalanceDirectWithdrawerFunction;
|
|
5039
4788
|
|
|
5040
|
-
export { BPS_DIVISOR, ChallengePowersFunction, ComputationMonitor, Curve25519KeypairGeneratorFunction, FEE_OFFSETS, type FeeSlab, type FeeSlabInstructionFields, type FeeSlabResult, FiatShamirChallengeGeneratorFunction, type GetFeeConfig, type GetUmbraClientArgs, type GetUmbraClientDeps,
|
|
4789
|
+
export { BPS_DIVISOR, ChallengePowersFunction, ComputationMonitor, Curve25519KeypairGeneratorFunction, FEE_OFFSETS, type FeeSlab, type FeeSlabInstructionFields, type FeeSlabResult, FiatShamirChallengeGeneratorFunction, type GetFeeConfig, type GetUmbraClientArgs, type GetUmbraClientDeps, MasterViewingKeyBlindingFactorDeriverFunction, MasterViewingKeyDeriverFunction, MintX25519KeypairDeriverFunction, PolynomialCommitmentFactorDeriverFunction, PolynomialEvaluatorFunction, PoseidonAggregatorHashFunction, PoseidonBlindingFactorDeriverFunction, PoseidonPrivateKeyDeriverFunction, type ProtocolFeeSlabInstructionFields, RcEncryptorWithNonceFunction, RcKeyGeneratorFunction, RelayerError, type RelayerFeeSlabInstructionFields, RescueCommitmentBlindingFactorDeriverFunction, RescueCommitmentGeneratorFunction, UMBRA_MESSAGE_TO_SIGN, UserCommitmentGeneratorFunction, calculateFee, enrichWithMerkleProof, extractMerklePath, feeSlabResultToInstructionFields, getClaimableUtxoScannerFunction, getComplianceGrantIssuerFunction, getComplianceGrantRevokerFunction, getDefaultKeyLoader, getDefaultKeyStorer, getDefaultMasterSeedGenerator, getDefaultMasterSeedStorage, getEncryptedBalanceQuerierFunction, getEncryptedBalanceToPublicBalanceDirectWithdrawerFunction, getEncryptedBalanceToReceiverClaimableUtxoCreatorFunction, getEncryptedBalanceToSelfClaimableUtxoCreatorFunction, getHardcodedClaimUtxoProtocolFeeProvider, getHardcodedClaimUtxoRelayerFeeProvider, getHardcodedCreateUtxoProtocolFeeProvider, getHardcodedDepositProtocolFeeProvider, getHardcodedWithdrawalProtocolFeeProvider, getMasterViewingKeyRotatorFunction, getMintEncryptionKeyRotatorFunction, getNetworkCiphertextReencryptorForNetworkGrantFunction, getNetworkComplianceGrantQuerierFunction, getNetworkEncryptionToSharedEncryptionConverterFunction, getPublicBalanceToEncryptedBalanceDirectDepositorFunction, getPublicBalanceToReceiverClaimableUtxoCreatorFunction, getPublicBalanceToSelfClaimableUtxoCreatorFunction, getReceiverClaimableUtxoToEncryptedBalanceClaimerFunction, getSelfClaimableUtxoToEncryptedBalanceClaimerFunction, getSelfClaimableUtxoToPublicBalanceClaimerFunction, getSharedCiphertextReencryptorForNetworkGrantFunction, getSharedCiphertextReencryptorForUserGrantFunction, getSharedComplianceGrantQuerierFunction, getStagedSolRecovererFunction, getStagedSplRecovererFunction, getTokenEntropySeedRotatorFunction, getUmbraClient, getUmbraRelayer, getUserAccountQuerierFunction, getUserComplianceGrantQuerierFunction, getUserEncryptionKeyRotatorFunction, getUserEntropySeedRotatorFunction, getUserRegistrationFunction, leafIndexToPathIndices, pollClaimUntilTerminal, protocolFeeSlabResultToInstructionFields, relayerFeeSlabResultToInstructionFields };
|