@umbra-privacy/sdk 2.1.1 → 4.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 +817 -1072
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -276
- package/dist/index.d.ts +25 -276
- package/dist/index.js +322 -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 +3 -3
- 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
|
@@ -7,7 +7,6 @@ var chunkQJAUUYZU_cjs = require('./chunk-QJAUUYZU.cjs');
|
|
|
7
7
|
var chunkLTCKPTZC_cjs = require('./chunk-LTCKPTZC.cjs');
|
|
8
8
|
var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
|
|
9
9
|
var aes_js = require('@noble/ciphers/aes.js');
|
|
10
|
-
var crypto = require('crypto');
|
|
11
10
|
var poseidon_js = require('@noble/curves/abstract/poseidon.js');
|
|
12
11
|
var bn254_js = require('@noble/curves/bn254.js');
|
|
13
12
|
var sha3Addons_js = require('@noble/hashes/sha3-addons.js');
|
|
@@ -15,11 +14,17 @@ var sha3_js = require('@noble/hashes/sha3.js');
|
|
|
15
14
|
var sha2_js = require('@noble/hashes/sha2.js');
|
|
16
15
|
var ed25519_js = require('@noble/curves/ed25519.js');
|
|
17
16
|
|
|
17
|
+
function randomBytes(length) {
|
|
18
|
+
const bytes = new Uint8Array(length);
|
|
19
|
+
globalThis.crypto.getRandomValues(bytes);
|
|
20
|
+
return bytes;
|
|
21
|
+
}
|
|
22
|
+
chunkPK6SKIKE_cjs.__name(randomBytes, "randomBytes");
|
|
18
23
|
function getAesEncryptor() {
|
|
19
24
|
return async (key, plaintext) => {
|
|
20
25
|
chunkLTCKPTZC_cjs.assertAesKey(key);
|
|
21
26
|
chunkLTCKPTZC_cjs.assertAesPlaintext(plaintext);
|
|
22
|
-
const iv =
|
|
27
|
+
const iv = randomBytes(chunkLTCKPTZC_cjs.AES_IV_LENGTH);
|
|
23
28
|
const cipher = aes_js.gcm(key, iv);
|
|
24
29
|
const ciphertextWithTag = cipher.encrypt(plaintext);
|
|
25
30
|
const encryptedLength = ciphertextWithTag.length - chunkLTCKPTZC_cjs.AES_AUTH_TAG_LENGTH;
|
|
@@ -10888,5 +10893,5 @@ exports.getUserAccountX25519KeypairDeriver = getUserAccountX25519KeypairDeriver;
|
|
|
10888
10893
|
exports.getUserCommitmentGeneratorFunction = getUserCommitmentGeneratorFunction;
|
|
10889
10894
|
exports.getUtxoCommitmentHashGenerator = getUtxoCommitmentHashGenerator;
|
|
10890
10895
|
exports.getYearlyViewingKeyDeriver = getYearlyViewingKeyDeriver;
|
|
10891
|
-
//# sourceMappingURL=chunk-
|
|
10892
|
-
//# sourceMappingURL=chunk-
|
|
10896
|
+
//# sourceMappingURL=chunk-YFUGKMNS.cjs.map
|
|
10897
|
+
//# sourceMappingURL=chunk-YFUGKMNS.cjs.map
|