@taquito/sapling 24.3.0-rc.2 → 24.3.0-rc.3
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/SAPLING_PARAMS_PROVENANCE.md +16 -10
- package/dist/lib/sapling-module-wrapper.js +3 -12
- package/dist/lib/sapling-params-loader.js +180 -0
- package/dist/lib/sapling-params-manifest.json +15 -0
- package/dist/lib/taquito-sapling.js +5 -1
- package/dist/lib/version.js +2 -2
- package/dist/taquito-sapling.es6.js +189 -21
- package/dist/taquito-sapling.es6.js.map +1 -1
- package/dist/taquito-sapling.umd.js +194 -21
- package/dist/taquito-sapling.umd.js.map +1 -1
- package/dist/types/sapling-params-loader.d.ts +9 -0
- package/dist/types/taquito-sapling.d.ts +2 -0
- package/dist/types/types.d.ts +28 -0
- package/package.json +9 -10
- package/src/sapling-params-manifest.json +15 -0
- package/dist/lib/sapling-output-params.js +0 -12
- package/dist/types/sapling-output-params.d.ts +0 -6
- package/saplingOutputParams.d.ts +0 -5
- package/saplingOutputParams.js +0 -16
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SaplingInitOptions } from './types';
|
|
2
|
+
export declare class SaplingParamsError extends Error {
|
|
3
|
+
readonly code: 'SAPLING_PARAMS_INVALID_CONFIG' | 'SAPLING_PARAMS_FETCH_FAILED' | 'SAPLING_PARAMS_HASH_MISMATCH' | 'SAPLING_PARAMS_UNSUPPORTED_RUNTIME';
|
|
4
|
+
readonly source: string;
|
|
5
|
+
readonly cause?: unknown;
|
|
6
|
+
constructor(code: 'SAPLING_PARAMS_INVALID_CONFIG' | 'SAPLING_PARAMS_FETCH_FAILED' | 'SAPLING_PARAMS_HASH_MISMATCH' | 'SAPLING_PARAMS_UNSUPPORTED_RUNTIME', message: string, source: string, cause?: unknown);
|
|
7
|
+
}
|
|
8
|
+
export declare function initSapling(options?: SaplingInitOptions): Promise<void>;
|
|
9
|
+
export declare function preloadSaplingParams(): Promise<void>;
|
|
@@ -9,6 +9,8 @@ import { SaplingTransactionViewer } from './sapling-tx-viewer/sapling-transactio
|
|
|
9
9
|
import { ParametersSaplingTransaction, ParametersUnshieldedTransaction, SaplingContractDetails } from './types';
|
|
10
10
|
import { SaplingTransactionBuilder } from './sapling-tx-builder/sapling-transactions-builder';
|
|
11
11
|
import { InMemoryProvingKey } from './sapling-keys/in-memory-proving-key';
|
|
12
|
+
export { initSapling, preloadSaplingParams, SaplingParamsError } from './sapling-params-loader';
|
|
13
|
+
export type { SaplingInitOptions, SaplingParamsSource } from './types';
|
|
12
14
|
export { SaplingTransactionViewer } from './sapling-tx-viewer/sapling-transaction-viewer';
|
|
13
15
|
export { InMemoryViewingKey } from './sapling-keys/in-memory-viewing-key';
|
|
14
16
|
export { InMemorySpendingKey } from './sapling-keys/in-memory-spending-key';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -139,6 +139,34 @@ export interface SaplingContractDetails {
|
|
|
139
139
|
saplingId?: string;
|
|
140
140
|
memoSize: number;
|
|
141
141
|
}
|
|
142
|
+
export type SaplingParamsSource = {
|
|
143
|
+
source?: 'taquito' | 'zcash';
|
|
144
|
+
spendParamsUrl?: never;
|
|
145
|
+
outputParamsUrl?: never;
|
|
146
|
+
spendParamsSha256?: never;
|
|
147
|
+
outputParamsSha256?: never;
|
|
148
|
+
spendParamsPath?: never;
|
|
149
|
+
outputParamsPath?: never;
|
|
150
|
+
} | {
|
|
151
|
+
source?: never;
|
|
152
|
+
spendParamsUrl: string;
|
|
153
|
+
outputParamsUrl: string;
|
|
154
|
+
spendParamsSha256: string;
|
|
155
|
+
outputParamsSha256: string;
|
|
156
|
+
spendParamsPath?: never;
|
|
157
|
+
outputParamsPath?: never;
|
|
158
|
+
} | {
|
|
159
|
+
source?: never;
|
|
160
|
+
spendParamsPath: string;
|
|
161
|
+
outputParamsPath: string;
|
|
162
|
+
spendParamsSha256?: string;
|
|
163
|
+
outputParamsSha256?: string;
|
|
164
|
+
spendParamsUrl?: never;
|
|
165
|
+
outputParamsUrl?: never;
|
|
166
|
+
};
|
|
167
|
+
export interface SaplingInitOptions {
|
|
168
|
+
params?: SaplingParamsSource;
|
|
169
|
+
}
|
|
142
170
|
export interface SaplingStateTree {
|
|
143
171
|
height: number;
|
|
144
172
|
size: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taquito/sapling",
|
|
3
|
-
"version": "24.3.0-rc.
|
|
3
|
+
"version": "24.3.0-rc.3",
|
|
4
4
|
"description": "Sapling transaction building and viewing support for Taquito.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"taquito",
|
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
"typings": "dist/types/taquito-sapling.d.ts",
|
|
16
16
|
"files": [
|
|
17
17
|
"dist",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"SAPLING_PARAMS_PROVENANCE.md"
|
|
18
|
+
"SAPLING_PARAMS_PROVENANCE.md",
|
|
19
|
+
"src/sapling-params-manifest.json"
|
|
21
20
|
],
|
|
22
21
|
"publishConfig": {
|
|
23
22
|
"access": "public"
|
|
@@ -49,6 +48,7 @@
|
|
|
49
48
|
"precommit": "lint-staged",
|
|
50
49
|
"prebuild": "rimraf dist",
|
|
51
50
|
"version-stamp": "node ../taquito/version-stamping.js",
|
|
51
|
+
"prepare:release-artifacts": "node ./prepare-sapling-release-artifacts.js",
|
|
52
52
|
"build": "tsc --project ./tsconfig.prod.json --module commonjs && rollup -c rollup.config.ts --bundleConfigAsCjs",
|
|
53
53
|
"start": "rollup -c rollup.config.ts --bundleConfigAsCjs -w"
|
|
54
54
|
},
|
|
@@ -59,15 +59,14 @@
|
|
|
59
59
|
]
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@taquito/sapling-wasm": "0.
|
|
62
|
+
"@taquito/sapling-wasm": "0.2.0",
|
|
63
63
|
"@scure/bip39": "^2.0.1",
|
|
64
64
|
"@noble/hashes": "^2.0.1",
|
|
65
65
|
"@stablelib/nacl": "^1.0.4",
|
|
66
|
-
"@taquito/core": "^24.3.0-rc.
|
|
67
|
-
"@taquito/rpc": "^24.3.0-rc.
|
|
68
|
-
"@taquito/
|
|
69
|
-
"@taquito/
|
|
70
|
-
"@taquito/utils": "^24.3.0-rc.2",
|
|
66
|
+
"@taquito/core": "^24.3.0-rc.3",
|
|
67
|
+
"@taquito/rpc": "^24.3.0-rc.3",
|
|
68
|
+
"@taquito/taquito": "^24.3.0-rc.3",
|
|
69
|
+
"@taquito/utils": "^24.3.0-rc.3",
|
|
71
70
|
"buffer": "^6.0.3",
|
|
72
71
|
"bignumber.js": "^10.0.2",
|
|
73
72
|
"blakejs": "^1.2.1",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"saplingParamsVersion": "groth16-mainnet-1",
|
|
3
|
+
"spendParams": {
|
|
4
|
+
"sha256": "8e48ffd23abb3a5fd9c5589204f32d9c31285a04b78096ba40a79b75677efc13",
|
|
5
|
+
"bytes": 47958396,
|
|
6
|
+
"taquitoUrl": "https://sapling.taquito.io/params/groth16-mainnet-1/spend.params",
|
|
7
|
+
"zcashUrl": "https://download.z.cash/downloads/sapling-spend.params"
|
|
8
|
+
},
|
|
9
|
+
"outputParams": {
|
|
10
|
+
"sha256": "2f0ebbcbb9bb0bcffe95a397e7eba89c29eb4dde6191c339db88570e3f3fb0e4",
|
|
11
|
+
"bytes": 3592860,
|
|
12
|
+
"taquitoUrl": "https://sapling.taquito.io/params/groth16-mainnet-1/output.params",
|
|
13
|
+
"zcashUrl": "https://download.z.cash/downloads/sapling-output.params"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
require("../saplingOutputParams.js");
|
|
4
|
-
const loadSaplingOutputParams = () => {
|
|
5
|
-
const saplingOutputParams = globalThis.__taquitoVendoredParams
|
|
6
|
-
?.saplingOutputParams;
|
|
7
|
-
if (!saplingOutputParams) {
|
|
8
|
-
throw new Error('Vendored sapling output params failed to load');
|
|
9
|
-
}
|
|
10
|
-
return saplingOutputParams;
|
|
11
|
-
};
|
|
12
|
-
exports.default = loadSaplingOutputParams();
|