@taquito/sapling 24.3.0-beta.0 → 24.3.0-beta.2
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/README.md +2 -2
- package/dist/lib/sapling-keys/helpers.js +3 -2
- package/dist/lib/sapling-keys/in-memory-spending-key.js +1 -1
- package/dist/lib/version.js +2 -2
- package/dist/taquito-sapling.es6.js +675 -4
- package/dist/taquito-sapling.es6.js.map +1 -1
- package/dist/taquito-sapling.umd.js +679 -7
- package/dist/taquito-sapling.umd.js.map +1 -1
- package/dist/types/node_modules/@scure/base/index.d.ts +293 -0
- package/dist/types/src/version.d.ts +4 -0
- package/package.json +13 -36
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ The returned balance is in mutez.
|
|
|
24
24
|
import { TezosToolkit, RpcReadAdapter } from '@taquito/taquito';
|
|
25
25
|
import { SaplingToolkit, InMemorySpendingKey } from '@taquito/sapling';
|
|
26
26
|
|
|
27
|
-
const tezos = new TezosToolkit('https://
|
|
27
|
+
const tezos = new TezosToolkit('https://shadownet.tezos.ecadinfra.com/');
|
|
28
28
|
|
|
29
29
|
const saplingContract = await tezos.contract.at('KT1UYwMR6Q6LZnwQEi77DSBrAjKT1tEJb245');
|
|
30
30
|
|
|
@@ -50,7 +50,7 @@ A shielded transaction allows sending tokens from a Tezos account (tz1, tz2, tz3
|
|
|
50
50
|
import { TezosToolkit, RpcReadAdapter } from '@taquito/taquito';
|
|
51
51
|
import { SaplingToolkit, InMemorySpendingKey } from '@taquito/sapling';
|
|
52
52
|
|
|
53
|
-
const tezos = new TezosToolkit('https://
|
|
53
|
+
const tezos = new TezosToolkit('https://shadownet.tezos.ecadinfra.com/');
|
|
54
54
|
// set up your signer on the TezosToolkit as usual
|
|
55
55
|
const saplingContract = await tezos.contract.at('KT1UYwMR6Q6LZnwQEi77DSBrAjKT1tEJb245');
|
|
56
56
|
|
|
@@ -4,7 +4,8 @@ exports.decryptKey = decryptKey;
|
|
|
4
4
|
const errors_1 = require("../errors");
|
|
5
5
|
const typedarray_to_buffer_1 = require("typedarray-to-buffer");
|
|
6
6
|
const nacl_1 = require("@stablelib/nacl");
|
|
7
|
-
const
|
|
7
|
+
const pbkdf2_js_1 = require("@noble/hashes/pbkdf2.js");
|
|
8
|
+
const sha2_js_1 = require("@noble/hashes/sha2.js");
|
|
8
9
|
const utils_1 = require("@taquito/utils");
|
|
9
10
|
const core_1 = require("@taquito/core");
|
|
10
11
|
function decryptKey(spendingKey, password) {
|
|
@@ -30,7 +31,7 @@ function decryptKey(spendingKey, password) {
|
|
|
30
31
|
}
|
|
31
32
|
const salt = (0, typedarray_to_buffer_1.default)(keyArr.slice(0, 8));
|
|
32
33
|
const encryptedSk = (0, typedarray_to_buffer_1.default)(keyArr.slice(8));
|
|
33
|
-
const encryptionKey =
|
|
34
|
+
const encryptionKey = (0, pbkdf2_js_1.pbkdf2)(sha2_js_1.sha512, password, salt, { c: 32768, dkLen: 32 });
|
|
34
35
|
// Zero nonce is safe: fresh random salt per encryption produces unique PBKDF2-derived key.
|
|
35
36
|
// See: https://gitlab.com/tezos/tezos/-/blob/master/src/lib_signer_backends/encrypted.ml
|
|
36
37
|
const decrypted = (0, nacl_1.openSecretBox)(new Uint8Array(encryptionKey), new Uint8Array(24), // zero nonce - uniqueness provided by per-encryption derived key
|
|
@@ -16,7 +16,7 @@ exports.InMemorySpendingKey = void 0;
|
|
|
16
16
|
const in_memory_viewing_key_1 = require("./in-memory-viewing-key");
|
|
17
17
|
const sapling = require("@airgap/sapling-wasm");
|
|
18
18
|
const utils_1 = require("@taquito/utils");
|
|
19
|
-
const bip39 = require("bip39");
|
|
19
|
+
const bip39 = require("@scure/bip39");
|
|
20
20
|
const helpers_1 = require("./helpers");
|
|
21
21
|
/**
|
|
22
22
|
* holds the spending key, create proof and signature for spend descriptions
|
package/dist/lib/version.js
CHANGED
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
4
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT!
|
|
5
5
|
exports.VERSION = {
|
|
6
|
-
"commitHash": "
|
|
7
|
-
"version": "24.3.0-beta.
|
|
6
|
+
"commitHash": "fb73f1546d3dff2fbba7741ca6006680212bef16",
|
|
7
|
+
"version": "24.3.0-beta.2"
|
|
8
8
|
};
|