@aptos-labs/confidential-assets-bindings 0.0.7 → 0.0.8
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
CHANGED
|
@@ -14,7 +14,7 @@ No initialization required — WASM is loaded automatically on first use, from l
|
|
|
14
14
|
|
|
15
15
|
### Discrete Log
|
|
16
16
|
|
|
17
|
-
Solves discrete logarithms on the Ristretto255 curve for 16-bit and 32-bit secrets. Used to decrypt confidential
|
|
17
|
+
Solves discrete logarithms on the Ristretto255 curve for 16-bit and 32-bit secrets. Used to decrypt confidential assets balances.
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
20
|
import { solveDiscreteLog } from "@aptos-labs/confidential-assets-bindings";
|
package/dist/{aptos_confidential_asset_wasm_bg.wasm → aptos_confidential_assets_wasm_bg.wasm}
RENAMED
|
Binary file
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
//#region build/wasm/
|
|
2
|
+
//#region build/wasm/aptos_confidential_assets_wasm.js
|
|
3
3
|
/**
|
|
4
4
|
* Result of a batch range proof generation
|
|
5
5
|
*/
|
|
@@ -367,7 +367,7 @@ function __wbg_get_imports() {
|
|
|
367
367
|
};
|
|
368
368
|
return {
|
|
369
369
|
__proto__: null,
|
|
370
|
-
"./
|
|
370
|
+
"./aptos_confidential_assets_wasm_bg.js": import0
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
373
|
const BatchRangeProofFinalization = typeof FinalizationRegistry === "undefined" ? {
|
|
@@ -514,7 +514,7 @@ async function __wbg_init(module_or_path) {
|
|
|
514
514
|
if (wasm !== void 0) return wasm;
|
|
515
515
|
if (module_or_path !== void 0) if (Object.getPrototypeOf(module_or_path) === Object.prototype) ({module_or_path} = module_or_path);
|
|
516
516
|
else console.warn("using deprecated parameters for the initialization function; pass a single object instead");
|
|
517
|
-
if (module_or_path === void 0) module_or_path = new URL("
|
|
517
|
+
if (module_or_path === void 0) module_or_path = new URL("aptos_confidential_assets_wasm_bg.wasm", require("url").pathToFileURL(__filename).href);
|
|
518
518
|
const imports = __wbg_get_imports();
|
|
519
519
|
if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) module_or_path = fetch(module_or_path);
|
|
520
520
|
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
@@ -522,11 +522,11 @@ async function __wbg_init(module_or_path) {
|
|
|
522
522
|
}
|
|
523
523
|
//#endregion
|
|
524
524
|
//#region src/index.ts
|
|
525
|
-
const CDN_WASM_URL = `https://unpkg.com/@aptos-labs/confidential-assets-bindings@0.0.
|
|
525
|
+
const CDN_WASM_URL = `https://unpkg.com/@aptos-labs/confidential-assets-bindings@0.0.8/dist/aptos_confidential_assets_wasm_bg.wasm`;
|
|
526
526
|
async function getNodeModulesWASM() {
|
|
527
527
|
try {
|
|
528
528
|
const fs = await import("fs");
|
|
529
|
-
const possiblePaths = [(await import("path")).resolve(process.cwd(), "node_modules/@aptos-labs/confidential-assets-bindings/dist/
|
|
529
|
+
const possiblePaths = [(await import("path")).resolve(process.cwd(), "node_modules/@aptos-labs/confidential-assets-bindings/dist/aptos_confidential_assets_wasm_bg.wasm"), new URL("./aptos_confidential_assets_wasm_bg.wasm", require("url").pathToFileURL(__filename).href).pathname];
|
|
530
530
|
for (const wasmPath of possiblePaths) if (fs.existsSync(wasmPath)) return fs.readFileSync(wasmPath);
|
|
531
531
|
} catch {}
|
|
532
532
|
return CDN_WASM_URL;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region build/wasm/
|
|
1
|
+
//#region build/wasm/aptos_confidential_assets_wasm.js
|
|
2
2
|
/**
|
|
3
3
|
* Result of a batch range proof generation
|
|
4
4
|
*/
|
|
@@ -366,7 +366,7 @@ function __wbg_get_imports() {
|
|
|
366
366
|
};
|
|
367
367
|
return {
|
|
368
368
|
__proto__: null,
|
|
369
|
-
"./
|
|
369
|
+
"./aptos_confidential_assets_wasm_bg.js": import0
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
372
|
const BatchRangeProofFinalization = typeof FinalizationRegistry === "undefined" ? {
|
|
@@ -513,7 +513,7 @@ async function __wbg_init(module_or_path) {
|
|
|
513
513
|
if (wasm !== void 0) return wasm;
|
|
514
514
|
if (module_or_path !== void 0) if (Object.getPrototypeOf(module_or_path) === Object.prototype) ({module_or_path} = module_or_path);
|
|
515
515
|
else console.warn("using deprecated parameters for the initialization function; pass a single object instead");
|
|
516
|
-
if (module_or_path === void 0) module_or_path = new URL("
|
|
516
|
+
if (module_or_path === void 0) module_or_path = new URL("aptos_confidential_assets_wasm_bg.wasm", import.meta.url);
|
|
517
517
|
const imports = __wbg_get_imports();
|
|
518
518
|
if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) module_or_path = fetch(module_or_path);
|
|
519
519
|
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
@@ -521,11 +521,11 @@ async function __wbg_init(module_or_path) {
|
|
|
521
521
|
}
|
|
522
522
|
//#endregion
|
|
523
523
|
//#region src/index.ts
|
|
524
|
-
const CDN_WASM_URL = `https://unpkg.com/@aptos-labs/confidential-assets-bindings@0.0.
|
|
524
|
+
const CDN_WASM_URL = `https://unpkg.com/@aptos-labs/confidential-assets-bindings@0.0.8/dist/aptos_confidential_assets_wasm_bg.wasm`;
|
|
525
525
|
async function getNodeModulesWASM() {
|
|
526
526
|
try {
|
|
527
527
|
const fs = await import("fs");
|
|
528
|
-
const possiblePaths = [(await import("path")).resolve(process.cwd(), "node_modules/@aptos-labs/confidential-assets-bindings/dist/
|
|
528
|
+
const possiblePaths = [(await import("path")).resolve(process.cwd(), "node_modules/@aptos-labs/confidential-assets-bindings/dist/aptos_confidential_assets_wasm_bg.wasm"), new URL("./aptos_confidential_assets_wasm_bg.wasm", import.meta.url).pathname];
|
|
529
529
|
for (const wasmPath of possiblePaths) if (fs.existsSync(wasmPath)) return fs.readFileSync(wasmPath);
|
|
530
530
|
} catch {}
|
|
531
531
|
return CDN_WASM_URL;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptos-labs/confidential-assets-bindings",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Bindings for Aptos confidential assets (discrete log + range proofs)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/aptos-labs/confidential-
|
|
8
|
+
"url": "https://github.com/aptos-labs/confidential-assets-bindings.git"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [
|
|
11
11
|
"aptos",
|