@sip-protocol/sdk 0.6.5 → 0.6.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/dist/browser.d.mts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +277 -245
- package/dist/browser.mjs +274 -242
- package/dist/chunk-25QRORO4.mjs +17031 -0
- package/dist/chunk-3INS3PR5.mjs +884 -0
- package/dist/index-CLgrUxac.d.mts +11340 -0
- package/dist/index-Dm5Sdjkd.d.ts +11340 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/proofs/noir.js +6 -6
- package/dist/proofs/noir.mjs +5 -5
- package/package.json +1 -1
- package/src/proofs/browser.ts +324 -277
- package/src/proofs/circuits/funding_proof.json +1 -1
- package/src/proofs/mock.ts +2 -2
- package/src/proofs/noir.ts +7 -5
- package/src/proofs/worker.ts +5 -3
package/dist/proofs/noir.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
fulfillment_proof_default,
|
|
3
3
|
funding_proof_default,
|
|
4
4
|
validity_proof_default
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-3INS3PR5.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ProofError,
|
|
8
8
|
ProofGenerationError
|
|
@@ -137,15 +137,15 @@ var NoirProofProvider = class {
|
|
|
137
137
|
const blindingField = this.bytesToField(params.blindingFactor);
|
|
138
138
|
const witnessInputs = {
|
|
139
139
|
// Public inputs
|
|
140
|
-
minimum_required: params.minimumRequired.toString()
|
|
140
|
+
minimum_required: `0x${params.minimumRequired.toString(16)}`,
|
|
141
141
|
asset_id: `0x${this.assetIdToField(params.assetId)}`,
|
|
142
142
|
// Private inputs
|
|
143
|
-
balance: params.balance.toString()
|
|
143
|
+
balance: `0x${params.balance.toString(16)}`,
|
|
144
144
|
blinding: blindingField
|
|
145
145
|
};
|
|
146
146
|
if (this.config.verbose) {
|
|
147
147
|
console.log("[NoirProofProvider] Witness inputs:", {
|
|
148
|
-
minimum_required: params.minimumRequired.toString()
|
|
148
|
+
minimum_required: `0x${params.minimumRequired.toString(16)}`,
|
|
149
149
|
asset_id: `0x${this.assetIdToField(params.assetId)}`,
|
|
150
150
|
balance: "[PRIVATE]",
|
|
151
151
|
blinding: "[PRIVATE]"
|
|
@@ -163,7 +163,7 @@ var NoirProofProvider = class {
|
|
|
163
163
|
const commitmentHashBytes = returnValue;
|
|
164
164
|
const commitmentHashHex = bytesToHex(new Uint8Array(commitmentHashBytes));
|
|
165
165
|
const publicInputs = [
|
|
166
|
-
`0x${params.minimumRequired.toString(16).padStart(
|
|
166
|
+
`0x${params.minimumRequired.toString(16).padStart(64, "0")}`,
|
|
167
167
|
`0x${this.assetIdToField(params.assetId)}`,
|
|
168
168
|
`0x${commitmentHashHex}`
|
|
169
169
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sip-protocol/sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"description": "Core SDK for Shielded Intents Protocol - Privacy layer for cross-chain transactions",
|
|
5
5
|
"author": "SIP Protocol <hello@sip-protocol.org>",
|
|
6
6
|
"homepage": "https://sip-protocol.org",
|