@gurge/sdk-react-native 0.3.130 → 0.3.136
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/common/src/crypto/babyJub.cjs +1 -1
- package/common/src/crypto/babyJub.mjs +1 -2
- package/common/src/crypto/eddsa.cjs +1 -1
- package/common/src/crypto/eddsa.mjs +2 -3
- package/common/src/crypto/poseidon.cjs +1 -1
- package/common/src/crypto/poseidon.mjs +2 -3
- package/common/src/webworker/viteWorkerURL.constant.mjs +3 -3
- package/package.json +1 -1
- package/shims/circomlibjs-hinkal-fork.mjs +11 -1752
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../constants/vite.constants.cjs`),t=require(
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");const e=require(`../constants/vite.constants.cjs`),t=require(`../../../shims/circomlibjs-hinkal-fork.cjs`);let n=require(`circomlibjs-hinkal-fork/src/babyjubRN.js`);var r=new class{babyjub=void 0;async init(){this.babyjub||=e.isReactNative?(0,n.buildBabyJubRN)():await t.buildBabyjub()}getJub(){return this.babyjub}},i=()=>r.getJub();exports.babyJubInstance=i,exports.jubHolder=r;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { isReactNative as e } from "../constants/vite.constants.mjs";
|
|
2
|
-
import { buildBabyJubRN as t } from "
|
|
3
|
-
import { buildBabyjub as n } from "../../../shims/circomlibjs-hinkal-fork.mjs";
|
|
2
|
+
import { buildBabyJubRN as t, buildBabyjub as n } from "../../../shims/circomlibjs-hinkal-fork.mjs";
|
|
4
3
|
var r = new class {
|
|
5
4
|
babyjub = void 0;
|
|
6
5
|
async init() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../constants/vite.constants.cjs`),t=require(
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");const e=require(`../constants/vite.constants.cjs`),t=require(`../../../shims/circomlibjs-hinkal-fork.cjs`);let n=require(`circomlibjs-hinkal-fork/src/EddsaRN.js`);var r=new class{eddsa=void 0;async init(){this.eddsa||=e.isReactNative?await(0,n.buildEddsaRN)():await t.buildEddsa()}getEddsa(){return this.eddsa}},i=()=>r.getEddsa();exports.eddsaHolder=r,exports.eddsaInstance=i;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { isReactNative as e } from "../constants/vite.constants.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { buildEddsa as n } from "../../../shims/circomlibjs-hinkal-fork.mjs";
|
|
2
|
+
import { buildEddsa as t, buildEddsaRN as n } from "../../../shims/circomlibjs-hinkal-fork.mjs";
|
|
4
3
|
var r = new class {
|
|
5
4
|
eddsa = void 0;
|
|
6
5
|
async init() {
|
|
7
|
-
this.eddsa ||= e ? await
|
|
6
|
+
this.eddsa ||= e ? await n() : await t();
|
|
8
7
|
}
|
|
9
8
|
getEddsa() {
|
|
10
9
|
return this.eddsa;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require("../../../_virtual/_rolldown/runtime.cjs");const e=require(`../constants/vite.constants.cjs`),t=require(`../functions/utils/amounts.utils.cjs`),n=require(
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");const e=require(`../constants/vite.constants.cjs`),t=require(`../functions/utils/amounts.utils.cjs`),n=require(`../../../shims/circomlibjs-hinkal-fork.cjs`);let r=require(`ethers`),i=require(`circomlibjs-hinkal-fork/src/poseidonRN.js`);var a=new class{poseidon=void 0;async init(){this.poseidon||=e.isReactNative?(0,i.buildPoseidon)():await n.buildPoseidon()}getPoseidon(){return this.poseidon}};function o(...e){let n=a.getPoseidon();return t.toBigInt(n.F.toString(n(e)))}var s=(...e)=>{let t=a.getPoseidon();return r.ethers.toBeHex(t.F.toString(t([...e])))};exports.poseidonFunction=o,exports.poseidonHash=s,exports.poseidonHolder=a;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { isReactNative as e } from "../constants/vite.constants.mjs";
|
|
2
2
|
import { toBigInt as t } from "../functions/utils/amounts.utils.mjs";
|
|
3
|
-
import { buildPoseidon as n } from "
|
|
4
|
-
import { buildPoseidon as r } from "../../../shims/circomlibjs-hinkal-fork.mjs";
|
|
3
|
+
import { buildPoseidon as n, buildPoseidonRN as r } from "../../../shims/circomlibjs-hinkal-fork.mjs";
|
|
5
4
|
import { ethers as i } from "ethers";
|
|
6
5
|
var a = new class {
|
|
7
6
|
poseidon = void 0;
|
|
8
7
|
async init() {
|
|
9
|
-
this.poseidon ||= e ?
|
|
8
|
+
this.poseidon ||= e ? r() : await n();
|
|
10
9
|
}
|
|
11
10
|
getPoseidon() {
|
|
12
11
|
return this.poseidon;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
const domain = 'https://storage.googleapis.com/hinkal-workers-staging';
|
|
3
3
|
|
|
4
4
|
const WORKER_CDN_URLS = {
|
|
5
|
-
ZKProof: domain + '/0.3.
|
|
6
|
-
SnarkJS: domain + '/0.3.
|
|
7
|
-
UTXO: domain + '/0.3.
|
|
5
|
+
ZKProof: domain + '/0.3.135/' + 'zkProofWorkerLauncher.js',
|
|
6
|
+
SnarkJS: domain + '/0.3.135/' + 'snarkjsWorkerLauncher.js',
|
|
7
|
+
UTXO: domain + '/0.3.135/' + 'utxoWorkerLauncher.js',
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
// Returns a blob:// URL which points
|