@taquito/sapling 20.0.2-beta.0 → 20.0.2-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/dist/lib/sapling-keys/helpers.js +1 -2
- package/dist/lib/sapling-keys/in-memory-spending-key.js +2 -2
- package/dist/lib/sapling-state/sapling-state.js +2 -2
- package/dist/lib/sapling-state/utils.js +2 -2
- package/dist/lib/sapling-tx-viewer/helpers.js +4 -5
- package/dist/lib/version.js +2 -2
- package/dist/taquito-sapling.es6.js +4 -4
- package/dist/taquito-sapling.umd.js +4 -4
- package/dist/types/constants.d.ts +0 -1
- package/dist/types/sapling-forger/sapling-forger.d.ts +0 -1
- package/dist/types/sapling-keys/helpers.d.ts +0 -1
- package/dist/types/sapling-keys/in-memory-viewing-key.d.ts +0 -1
- package/dist/types/sapling-module-wrapper.d.ts +0 -1
- package/dist/types/sapling-tx-builder/sapling-transactions-builder.d.ts +0 -1
- package/dist/types/sapling-tx-viewer/helpers.d.ts +0 -1
- package/dist/types/types.d.ts +0 -1
- package/package.json +22 -22
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decryptKey =
|
|
3
|
+
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");
|
|
@@ -26,4 +26,3 @@ function decryptKey(spendingKey, password) {
|
|
|
26
26
|
return (0, typedarray_to_buffer_1.default)(keyArr);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
exports.decryptKey = decryptKey;
|
|
@@ -49,8 +49,8 @@ class InMemorySpendingKey {
|
|
|
49
49
|
* @param derivationPath tezos current standard 'm/'
|
|
50
50
|
* @returns InMemorySpendingKey class instantiated
|
|
51
51
|
*/
|
|
52
|
-
static fromMnemonic(
|
|
53
|
-
return __awaiter(this,
|
|
52
|
+
static fromMnemonic(mnemonic_1) {
|
|
53
|
+
return __awaiter(this, arguments, void 0, function* (mnemonic, derivationPath = 'm/') {
|
|
54
54
|
// no password passed here. password provided only changes from sask -> MMXj
|
|
55
55
|
const fullSeed = yield bip39.mnemonicToSeed(mnemonic);
|
|
56
56
|
const first32 = fullSeed.slice(0, 32);
|
|
@@ -30,8 +30,8 @@ class SaplingState {
|
|
|
30
30
|
this.uncommittedMerkleHash = '0100000000000000000000000000000000000000000000000000000000000000';
|
|
31
31
|
this.uncommittedMerkleHashes = new utils_1.Lazy(() => this.createUncommittedMerkleHashes());
|
|
32
32
|
}
|
|
33
|
-
getStateTree(
|
|
34
|
-
return __awaiter(this,
|
|
33
|
+
getStateTree(stateDiff_1) {
|
|
34
|
+
return __awaiter(this, arguments, void 0, function* (stateDiff, constructTree = true) {
|
|
35
35
|
if (this.stateTree !== undefined && this.stateTree.root === stateDiff.root) {
|
|
36
36
|
return this.stateTree;
|
|
37
37
|
}
|
|
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.changeEndianness = exports.Lazy =
|
|
12
|
+
exports.changeEndianness = exports.Lazy = void 0;
|
|
13
|
+
exports.pairNodes = pairNodes;
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @param leaves nodes in the tree that we would like to make pairs from
|
|
@@ -22,7 +23,6 @@ function pairNodes(leaves) {
|
|
|
22
23
|
}
|
|
23
24
|
return pairs;
|
|
24
25
|
}
|
|
25
|
-
exports.pairNodes = pairNodes;
|
|
26
26
|
/**
|
|
27
27
|
* @description helper function to assist in Lazy initializing an object
|
|
28
28
|
*/
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.memoHexToUtf8 = memoHexToUtf8;
|
|
4
|
+
exports.readableFormat = readableFormat;
|
|
5
|
+
exports.convertValueToBigNumber = convertValueToBigNumber;
|
|
6
|
+
exports.bufToUint8Array = bufToUint8Array;
|
|
4
7
|
const utils_1 = require("@taquito/utils");
|
|
5
8
|
const bignumber_js_1 = require("bignumber.js");
|
|
6
9
|
function memoHexToUtf8(memo) {
|
|
7
10
|
const memoNoPadding = removeZeroPaddedBytesRight(memo);
|
|
8
11
|
return memoNoPadding === '' ? memoNoPadding : (0, utils_1.bytesToString)(memoNoPadding);
|
|
9
12
|
}
|
|
10
|
-
exports.memoHexToUtf8 = memoHexToUtf8;
|
|
11
13
|
function removeZeroPaddedBytesRight(memo) {
|
|
12
14
|
const matchZeroRight = memo.match(/^(.*?)(00)+$/);
|
|
13
15
|
return matchZeroRight ? matchZeroRight[1] : memo;
|
|
@@ -19,12 +21,9 @@ function readableFormat(saplingTransactionProperties) {
|
|
|
19
21
|
paymentAddress: (0, utils_1.b58cencode)(saplingTransactionProperties.paymentAddress, utils_1.prefix[utils_1.Prefix.ZET1]),
|
|
20
22
|
};
|
|
21
23
|
}
|
|
22
|
-
exports.readableFormat = readableFormat;
|
|
23
24
|
function convertValueToBigNumber(value) {
|
|
24
25
|
return new bignumber_js_1.default(Buffer.from(value).toString('hex'), 16);
|
|
25
26
|
}
|
|
26
|
-
exports.convertValueToBigNumber = convertValueToBigNumber;
|
|
27
27
|
function bufToUint8Array(buffer) {
|
|
28
28
|
return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
29
29
|
}
|
|
30
|
-
exports.bufToUint8Array = bufToUint8Array;
|
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 OR CHECKIN!
|
|
5
5
|
exports.VERSION = {
|
|
6
|
-
"commitHash": "
|
|
7
|
-
"version": "20.0.2-beta.
|
|
6
|
+
"commitHash": "943d5fd11790da35f4a3e6ecfcaae3c4f0399a97",
|
|
7
|
+
"version": "20.0.2-beta.2"
|
|
8
8
|
};
|
|
@@ -509,8 +509,8 @@ class SaplingState {
|
|
|
509
509
|
this.uncommittedMerkleHash = '0100000000000000000000000000000000000000000000000000000000000000';
|
|
510
510
|
this.uncommittedMerkleHashes = new Lazy(() => this.createUncommittedMerkleHashes());
|
|
511
511
|
}
|
|
512
|
-
getStateTree(
|
|
513
|
-
return __awaiter(this,
|
|
512
|
+
getStateTree(stateDiff_1) {
|
|
513
|
+
return __awaiter(this, arguments, void 0, function* (stateDiff, constructTree = true) {
|
|
514
514
|
if (this.stateTree !== undefined && this.stateTree.root === stateDiff.root) {
|
|
515
515
|
return this.stateTree;
|
|
516
516
|
}
|
|
@@ -1015,8 +1015,8 @@ class InMemorySpendingKey {
|
|
|
1015
1015
|
* @param derivationPath tezos current standard 'm/'
|
|
1016
1016
|
* @returns InMemorySpendingKey class instantiated
|
|
1017
1017
|
*/
|
|
1018
|
-
static fromMnemonic(
|
|
1019
|
-
return __awaiter(this,
|
|
1018
|
+
static fromMnemonic(mnemonic_1) {
|
|
1019
|
+
return __awaiter(this, arguments, void 0, function* (mnemonic, derivationPath = 'm/') {
|
|
1020
1020
|
// no password passed here. password provided only changes from sask -> MMXj
|
|
1021
1021
|
const fullSeed = yield bip39.mnemonicToSeed(mnemonic);
|
|
1022
1022
|
const first32 = fullSeed.slice(0, 32);
|
|
@@ -522,8 +522,8 @@
|
|
|
522
522
|
this.uncommittedMerkleHash = '0100000000000000000000000000000000000000000000000000000000000000';
|
|
523
523
|
this.uncommittedMerkleHashes = new Lazy(() => this.createUncommittedMerkleHashes());
|
|
524
524
|
}
|
|
525
|
-
getStateTree(
|
|
526
|
-
return __awaiter(this,
|
|
525
|
+
getStateTree(stateDiff_1) {
|
|
526
|
+
return __awaiter(this, arguments, void 0, function* (stateDiff, constructTree = true) {
|
|
527
527
|
if (this.stateTree !== undefined && this.stateTree.root === stateDiff.root) {
|
|
528
528
|
return this.stateTree;
|
|
529
529
|
}
|
|
@@ -1028,8 +1028,8 @@
|
|
|
1028
1028
|
* @param derivationPath tezos current standard 'm/'
|
|
1029
1029
|
* @returns InMemorySpendingKey class instantiated
|
|
1030
1030
|
*/
|
|
1031
|
-
static fromMnemonic(
|
|
1032
|
-
return __awaiter(this,
|
|
1031
|
+
static fromMnemonic(mnemonic_1) {
|
|
1032
|
+
return __awaiter(this, arguments, void 0, function* (mnemonic, derivationPath = 'm/') {
|
|
1033
1033
|
// no password passed here. password provided only changes from sask -> MMXj
|
|
1034
1034
|
const fullSeed = yield bip39__namespace.mnemonicToSeed(mnemonic);
|
|
1035
1035
|
const first32 = fullSeed.slice(0, 32);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { SaplingForger } from '../sapling-forger/sapling-forger';
|
|
3
2
|
import BigNumber from 'bignumber.js';
|
|
4
3
|
import { Input, SaplingTransactionOutput, SaplingTransactionInput, ParametersBindingSig, ChosenSpendableInputs, ParametersOutputDescription, ParametersCiphertext, Ciphertext, SaplingContractDetails, SaplingTransaction, SaplingTransactionParams } from '../types';
|
package/dist/types/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taquito/sapling",
|
|
3
|
-
"version": "20.0.2-beta.
|
|
3
|
+
"version": "20.0.2-beta.2",
|
|
4
4
|
"description": "Allows reading and preparing sapling transactions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tezos",
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
"@airgap/sapling-wasm": "0.0.9",
|
|
69
69
|
"@stablelib/nacl": "^1.0.4",
|
|
70
70
|
"@stablelib/random": "^1.0.2",
|
|
71
|
-
"@taquito/core": "^20.0.2-beta.
|
|
72
|
-
"@taquito/rpc": "^20.0.2-beta.
|
|
73
|
-
"@taquito/taquito": "^20.0.2-beta.
|
|
74
|
-
"@taquito/utils": "^20.0.2-beta.
|
|
71
|
+
"@taquito/core": "^20.0.2-beta.2",
|
|
72
|
+
"@taquito/rpc": "^20.0.2-beta.2",
|
|
73
|
+
"@taquito/taquito": "^20.0.2-beta.2",
|
|
74
|
+
"@taquito/utils": "^20.0.2-beta.2",
|
|
75
75
|
"bignumber.js": "^9.1.2",
|
|
76
76
|
"bip39": "3.1.0",
|
|
77
77
|
"blakejs": "^1.2.1",
|
|
@@ -80,31 +80,31 @@
|
|
|
80
80
|
"typedarray-to-buffer": "^4.0.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@rollup/plugin-json": "^6.0
|
|
84
|
-
"@types/jest": "^29.5.
|
|
85
|
-
"@types/node": "^
|
|
86
|
-
"@types/pbkdf2": "^3.1.
|
|
87
|
-
"@types/typedarray-to-buffer": "^4.0.
|
|
88
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
89
|
-
"@typescript-eslint/parser": "^6.
|
|
83
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
84
|
+
"@types/jest": "^29.5.12",
|
|
85
|
+
"@types/node": "^22",
|
|
86
|
+
"@types/pbkdf2": "^3.1.2",
|
|
87
|
+
"@types/typedarray-to-buffer": "^4.0.4",
|
|
88
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
89
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
90
90
|
"colors": "^1.4.0",
|
|
91
91
|
"coveralls": "^3.1.1",
|
|
92
92
|
"cross-env": "^7.0.3",
|
|
93
|
-
"eslint": "^8.
|
|
93
|
+
"eslint": "^8.57.0",
|
|
94
94
|
"jest": "^29.7.0",
|
|
95
95
|
"jest-config": "^29.7.0",
|
|
96
|
-
"lint-staged": "^
|
|
96
|
+
"lint-staged": "^15.2.7",
|
|
97
97
|
"lodash.camelcase": "^4.3.0",
|
|
98
|
-
"prettier": "^3.
|
|
98
|
+
"prettier": "^3.3.3",
|
|
99
99
|
"prompt": "^1.3.0",
|
|
100
|
-
"replace-in-file": "^
|
|
101
|
-
"rimraf": "^
|
|
102
|
-
"rollup": "^4.1
|
|
100
|
+
"replace-in-file": "^8.1.0",
|
|
101
|
+
"rimraf": "^6.0.1",
|
|
102
|
+
"rollup": "^4.19.1",
|
|
103
103
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
104
104
|
"shelljs": "^0.8.5",
|
|
105
|
-
"ts-jest": "^29.
|
|
106
|
-
"ts-node": "^10.9.
|
|
107
|
-
"typescript": "~5.
|
|
105
|
+
"ts-jest": "^29.2.3",
|
|
106
|
+
"ts-node": "^10.9.2",
|
|
107
|
+
"typescript": "~5.5.4"
|
|
108
108
|
},
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "f0f9e4d22a374c72913abbb1991b0e5b34f4c978"
|
|
110
110
|
}
|