@gurge/sdk 0.3.36 → 0.3.39

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gurge/sdk",
3
- "version": "0.3.36",
3
+ "version": "0.3.39",
4
4
  "homepage": "hinkal.io",
5
5
  "author": {
6
6
  "name": "Hinkal Protocol"
@@ -15,9 +15,9 @@
15
15
  ".": {
16
16
  "types": "./index.d.ts",
17
17
  "react-native": {
18
- "types": "./react-native/index.d.ts",
19
- "import": "./react-native/index.mjs",
20
- "default": "./react-native/index.cjs"
18
+ "types": "./index.d.ts",
19
+ "import": "./index.mjs",
20
+ "default": "./index.cjs"
21
21
  },
22
22
  "import": "./index.mjs",
23
23
  "default": "./index.cjs"
@@ -70,6 +70,12 @@
70
70
  "import": "./providers/prepareSolanaHinkal.mjs",
71
71
  "default": "./providers/prepareSolanaHinkal.cjs"
72
72
  },
73
+ "./react-native/setup": {
74
+ "types": "./react-native/setup.d.ts",
75
+ "react-native": "./react-native/setup.cjs",
76
+ "import": "./react-native/setup.mjs",
77
+ "default": "./react-native/setup.cjs"
78
+ },
73
79
  "./react-native/metro-config": "./react-native/metro-config.js"
74
80
  },
75
81
  "types": "./index.d.ts",
@@ -14,8 +14,8 @@
14
14
  var e = /* @__PURE__ */ ((r) => (r.ZKProof = "ZKProof", r.SnarkJS = "SnarkJS", r.UTXO = "UTXO", r))(e || {});
15
15
 
16
16
  const n = async () => ({
17
- [e.ZKProof]: await getWorkerURL(domain + '/0.3.36/' + 'zkProofWorkerLauncher.js'),
18
- [e.SnarkJS]: await getWorkerURL(domain + '/0.3.36/' + 'snarkjsWorkerLauncher.js'),
19
- [e.UTXO]: await getWorkerURL(domain + '/0.3.36/' + 'utxoWorkerLauncher.js'),
17
+ [e.ZKProof]: await getWorkerURL(domain + '/0.3.39/' + 'zkProofWorkerLauncher.js'),
18
+ [e.SnarkJS]: await getWorkerURL(domain + '/0.3.39/' + 'snarkjsWorkerLauncher.js'),
19
+ [e.UTXO]: await getWorkerURL(domain + '/0.3.39/' + 'utxoWorkerLauncher.js'),
20
20
  });
21
21
  exports.getWorkerViteURL = n;
@@ -14,8 +14,8 @@
14
14
  var e = /* @__PURE__ */ ((r) => (r.ZKProof = "ZKProof", r.SnarkJS = "SnarkJS", r.UTXO = "UTXO", r))(e || {});
15
15
 
16
16
  const n = async () => ({
17
- [e.ZKProof]: await getWorkerURL(domain + '/0.3.36/' + 'zkProofWorkerLauncher.js'),
18
- [e.SnarkJS]: await getWorkerURL(domain + '/0.3.36/' + 'snarkjsWorkerLauncher.js'),
19
- [e.UTXO]: await getWorkerURL(domain + '/0.3.36/' + 'utxoWorkerLauncher.js'),
17
+ [e.ZKProof]: await getWorkerURL(domain + '/0.3.39/' + 'zkProofWorkerLauncher.js'),
18
+ [e.SnarkJS]: await getWorkerURL(domain + '/0.3.39/' + 'snarkjsWorkerLauncher.js'),
19
+ [e.UTXO]: await getWorkerURL(domain + '/0.3.39/' + 'utxoWorkerLauncher.js'),
20
20
  });
21
21
  export { n as getWorkerViteURL };
package/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./common/src/types/external-action.types.cjs`),t=require(`./common/src/types/balances.types.cjs`),n=require(`./common/src/functions/pre-transaction/getFeeStructure.cjs`),r=require(`./common/src/crypto/preProcessing.cjs`),i=require(`./services/Hinkal.cjs`);require(`./services/index.cjs`);const a=require(`./functions/utils/refreshBalance.cjs`),o=require(`./functions/integrations/swapApi.cjs`);require(`./functions/index.cjs`),require(`./types/index.cjs`),exports.ExternalActionId=e.ExternalActionId,exports.Hinkal=i.Hinkal,exports.PrivateBalanceUpdateType=t.PrivateBalanceUpdateType,exports.getEvmSwapPrices=o.getEvmSwapPrices,exports.getFeeStructure=n.getFeeStructure,exports.getSolanaSwapPrices=o.getSolanaSwapPrices,exports.preProcessing=r.preProcessing,exports.refreshBalance=a.refreshBalance;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./common/src/types/external-action.types.cjs`),t=require(`./common/src/types/balances.types.cjs`),n=require(`./common/src/functions/pre-transaction/getFeeStructure.cjs`),r=require(`./common/src/crypto/preProcessing.cjs`),i=require(`./services/Hinkal.cjs`);require(`./services/index.cjs`);const a=require(`./functions/utils/refreshBalance.cjs`),o=require(`./functions/integrations/swapApi.cjs`);require(`./functions/index.cjs`),require(`./types/index.cjs`);const s=require(`./react-native/HinkalProvider.cjs`);exports.ExternalActionId=e.ExternalActionId,exports.Hinkal=i.Hinkal,exports.HinkalProvider=s.HinkalProvider,exports.PrivateBalanceUpdateType=t.PrivateBalanceUpdateType,exports.getEvmSwapPrices=o.getEvmSwapPrices,exports.getFeeStructure=n.getFeeStructure,exports.getSolanaSwapPrices=o.getSolanaSwapPrices,exports.preProcessing=r.preProcessing,exports.refreshBalance=a.refreshBalance;
package/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './services';
2
2
  export * from './functions';
3
3
  export * from './types';
4
+ export { HinkalProvider } from './react-native/HinkalProvider';
package/index.mjs CHANGED
@@ -8,4 +8,5 @@ import { refreshBalance as a } from "./functions/utils/refreshBalance.mjs";
8
8
  import { getEvmSwapPrices as o, getSolanaSwapPrices as s } from "./functions/integrations/swapApi.mjs";
9
9
  import "./functions/index.mjs";
10
10
  import "./types/index.mjs";
11
- export { e as ExternalActionId, i as Hinkal, t as PrivateBalanceUpdateType, o as getEvmSwapPrices, n as getFeeStructure, s as getSolanaSwapPrices, r as preProcessing, a as refreshBalance };
11
+ import { HinkalProvider as c } from "./react-native/HinkalProvider.mjs";
12
+ export { e as ExternalActionId, i as Hinkal, c as HinkalProvider, t as PrivateBalanceUpdateType, o as getEvmSwapPrices, n as getFeeStructure, s as getSolanaSwapPrices, r as preProcessing, a as refreshBalance };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gurge/sdk",
3
- "version": "0.3.36",
3
+ "version": "0.3.39",
4
4
  "homepage": "hinkal.io",
5
5
  "author": {
6
6
  "name": "Hinkal Protocol"
@@ -15,9 +15,9 @@
15
15
  ".": {
16
16
  "types": "./index.d.ts",
17
17
  "react-native": {
18
- "types": "./react-native/index.d.ts",
19
- "import": "./react-native/index.mjs",
20
- "default": "./react-native/index.cjs"
18
+ "types": "./index.d.ts",
19
+ "import": "./index.mjs",
20
+ "default": "./index.cjs"
21
21
  },
22
22
  "import": "./index.mjs",
23
23
  "default": "./index.cjs"
@@ -70,6 +70,12 @@
70
70
  "import": "./providers/prepareSolanaHinkal.mjs",
71
71
  "default": "./providers/prepareSolanaHinkal.cjs"
72
72
  },
73
+ "./react-native/setup": {
74
+ "types": "./react-native/setup.d.ts",
75
+ "react-native": "./react-native/setup.cjs",
76
+ "import": "./react-native/setup.mjs",
77
+ "default": "./react-native/setup.cjs"
78
+ },
73
79
  "./react-native/metro-config": "./react-native/metro-config.js"
74
80
  },
75
81
  "types": "./index.d.ts",
@@ -14,13 +14,23 @@
14
14
  const path = require('path');
15
15
 
16
16
  const shimDir = path.join(__dirname, 'shims');
17
- const setupModule = path.join(__dirname, 'setup.cjs');
17
+
18
+ const resolveSetupModule = () => {
19
+ try {
20
+ return require.resolve('@hinkal/sdk/react-native/setup');
21
+ } catch {
22
+ return path.join(__dirname, 'setup.cjs');
23
+ }
24
+ };
25
+
26
+ const setupModule = resolveSetupModule();
18
27
  const shim = (name) => ({
19
28
  filePath: path.join(shimDir, `${name}.js`),
20
29
  type: 'sourceFile',
21
30
  });
22
31
 
23
- const isFromHinkalSdk = (originPath) => !!originPath && originPath.includes('/@hinkal/sdk/');
32
+ const isFromHinkalSdk = (originPath) =>
33
+ !!originPath && (originPath.includes('/@hinkal/sdk/') || originPath.includes('/@gurge/sdk/'));
24
34
 
25
35
  const applyHinkalMetroConfig = (config) => {
26
36
  if (!config || !config.resolver) {
@@ -1 +1 @@
1
- var e={name:`@gurge/sdk`,version:`0.3.35`,homepage:`hinkal.io`,author:{name:`Hinkal Protocol`},keywords:[`blockchain`,`privacy`,`zero-knowledge`,`stealth addresses`],exports:{".":{types:`./index.d.ts`,"react-native":{types:`./react-native/index.d.ts`,import:`./react-native/index.mjs`,default:`./react-native/index.cjs`},import:`./index.mjs`,default:`./index.cjs`},"./providers/WagmiProviderAdapter":{types:`./providers/WagmiProviderAdapter.d.ts`,"react-native":`./providers/WagmiProviderAdapter.cjs`,import:`./providers/WagmiProviderAdapter.mjs`,default:`./providers/WagmiProviderAdapter.cjs`},"./providers/EthersProviderAdapter":{types:`./providers/EthersProviderAdapter.d.ts`,"react-native":`./providers/EthersProviderAdapter.cjs`,import:`./providers/EthersProviderAdapter.mjs`,default:`./providers/EthersProviderAdapter.cjs`},"./providers/TronProviderAdapter":{types:`./providers/TronProviderAdapter.d.ts`,"react-native":`./providers/TronProviderAdapter.cjs`,import:`./providers/TronProviderAdapter.mjs`,default:`./providers/TronProviderAdapter.cjs`},"./providers/SolanaProviderAdapter":{types:`./providers/SolanaProviderAdapter.d.ts`,"react-native":`./providers/SolanaProviderAdapter.cjs`,import:`./providers/SolanaProviderAdapter.mjs`,default:`./providers/SolanaProviderAdapter.cjs`},"./providers/prepareEthersHinkal":{types:`./providers/prepareEthersHinkal.d.ts`,"react-native":`./providers/prepareEthersHinkal.cjs`,import:`./providers/prepareEthersHinkal.mjs`,default:`./providers/prepareEthersHinkal.cjs`},"./providers/prepareWagmiHinkal":{types:`./providers/prepareWagmiHinkal.d.ts`,"react-native":`./providers/prepareWagmiHinkal.cjs`,import:`./providers/prepareWagmiHinkal.mjs`,default:`./providers/prepareWagmiHinkal.cjs`},"./providers/prepareTronHinkal":{types:`./providers/prepareTronHinkal.d.ts`,"react-native":`./providers/prepareTronHinkal.cjs`,import:`./providers/prepareTronHinkal.mjs`,default:`./providers/prepareTronHinkal.cjs`},"./providers/prepareSolanaHinkal":{types:`./providers/prepareSolanaHinkal.d.ts`,"react-native":`./providers/prepareSolanaHinkal.cjs`,import:`./providers/prepareSolanaHinkal.mjs`,default:`./providers/prepareSolanaHinkal.cjs`},"./react-native/metro-config":`./react-native/metro-config.js`},types:`./index.d.ts`,scripts:{prebuild:`nx prebuild:workers`,build:`nx build`,lint:`nx lint`,test:`nx test`},devDependencies:{nx:`22.6.4`,vite:`^8.0.4`,"vite-plugin-dts":`^4.5.4`,"vite-tsconfig-paths":`^6.1.1`},dependencies:{"@coral-xyz/anchor":`^0.31.0`,"@solana/spl-token":`^0.4.14`,"@solana/web3.js":`^1.98.4`,"@solana/wallet-adapter-react":`^0.15.39`,axios:`^1.15.0`,"async-mutex":`^0.4.0`,bs58:`^6.0.0`,buffer:`6.0.3`,"circomlibjs-hinkal-fork":`^0.0.10`,dotenv:`^16.4.5`,ethers:`^6.15.0`,"idb-keyval":`6.2.1`,multiformats:`^9.4.2`,snarkjs:`0.7.5`,"libsodium-wrappers":`^0.8.2`,lodash:`^4.17.21`,tweetnacl:`^1.0.3`,process:`0.11.10`,"ua-parser-js":`^1.0.37`,uuid:`^9.0.1`,"node-forge":`^1.3.1`,"poseidon-lite":`^0.3.0`,tronweb:`^6.2.0`,"@react-native-async-storage/async-storage":`^2.2.0`,assert:`^2.1.0`,"react-native-get-random-values":`^1.11.0`},peerDependencies:{wagmi:`2.13.3`,"@walletconnect/utils":`^2.17.2`},peerDependenciesMeta:{wagmi:{optional:!0},"@walletconnect/utils":{optional:!0}}};exports.default=e;
1
+ var e={name:`@gurge/sdk`,version:`0.3.38`,homepage:`hinkal.io`,author:{name:`Hinkal Protocol`},keywords:[`blockchain`,`privacy`,`zero-knowledge`,`stealth addresses`],exports:{".":{types:`./index.d.ts`,"react-native":{types:`./index.d.ts`,import:`./index.mjs`,default:`./index.cjs`},import:`./index.mjs`,default:`./index.cjs`},"./providers/WagmiProviderAdapter":{types:`./providers/WagmiProviderAdapter.d.ts`,"react-native":`./providers/WagmiProviderAdapter.cjs`,import:`./providers/WagmiProviderAdapter.mjs`,default:`./providers/WagmiProviderAdapter.cjs`},"./providers/EthersProviderAdapter":{types:`./providers/EthersProviderAdapter.d.ts`,"react-native":`./providers/EthersProviderAdapter.cjs`,import:`./providers/EthersProviderAdapter.mjs`,default:`./providers/EthersProviderAdapter.cjs`},"./providers/TronProviderAdapter":{types:`./providers/TronProviderAdapter.d.ts`,"react-native":`./providers/TronProviderAdapter.cjs`,import:`./providers/TronProviderAdapter.mjs`,default:`./providers/TronProviderAdapter.cjs`},"./providers/SolanaProviderAdapter":{types:`./providers/SolanaProviderAdapter.d.ts`,"react-native":`./providers/SolanaProviderAdapter.cjs`,import:`./providers/SolanaProviderAdapter.mjs`,default:`./providers/SolanaProviderAdapter.cjs`},"./providers/prepareEthersHinkal":{types:`./providers/prepareEthersHinkal.d.ts`,"react-native":`./providers/prepareEthersHinkal.cjs`,import:`./providers/prepareEthersHinkal.mjs`,default:`./providers/prepareEthersHinkal.cjs`},"./providers/prepareWagmiHinkal":{types:`./providers/prepareWagmiHinkal.d.ts`,"react-native":`./providers/prepareWagmiHinkal.cjs`,import:`./providers/prepareWagmiHinkal.mjs`,default:`./providers/prepareWagmiHinkal.cjs`},"./providers/prepareTronHinkal":{types:`./providers/prepareTronHinkal.d.ts`,"react-native":`./providers/prepareTronHinkal.cjs`,import:`./providers/prepareTronHinkal.mjs`,default:`./providers/prepareTronHinkal.cjs`},"./providers/prepareSolanaHinkal":{types:`./providers/prepareSolanaHinkal.d.ts`,"react-native":`./providers/prepareSolanaHinkal.cjs`,import:`./providers/prepareSolanaHinkal.mjs`,default:`./providers/prepareSolanaHinkal.cjs`},"./react-native/setup":{types:`./react-native/setup.d.ts`,"react-native":`./react-native/setup.cjs`,import:`./react-native/setup.mjs`,default:`./react-native/setup.cjs`},"./react-native/metro-config":`./react-native/metro-config.js`},types:`./index.d.ts`,scripts:{prebuild:`nx prebuild:workers`,build:`nx build`,lint:`nx lint`,test:`nx test`},devDependencies:{nx:`22.6.4`,vite:`^8.0.4`,"vite-plugin-dts":`^4.5.4`,"vite-tsconfig-paths":`^6.1.1`},dependencies:{"@coral-xyz/anchor":`^0.31.0`,"@solana/spl-token":`^0.4.14`,"@solana/web3.js":`^1.98.4`,"@solana/wallet-adapter-react":`^0.15.39`,axios:`^1.15.0`,"async-mutex":`^0.4.0`,bs58:`^6.0.0`,buffer:`6.0.3`,"circomlibjs-hinkal-fork":`^0.0.10`,dotenv:`^16.4.5`,ethers:`^6.15.0`,"idb-keyval":`6.2.1`,multiformats:`^9.4.2`,snarkjs:`0.7.5`,"libsodium-wrappers":`^0.8.2`,lodash:`^4.17.21`,tweetnacl:`^1.0.3`,process:`0.11.10`,"ua-parser-js":`^1.0.37`,uuid:`^9.0.1`,"node-forge":`^1.3.1`,"poseidon-lite":`^0.3.0`,tronweb:`^6.2.0`,"@react-native-async-storage/async-storage":`^2.2.0`,assert:`^2.1.0`,"react-native-get-random-values":`^1.11.0`},peerDependencies:{wagmi:`2.13.3`,"@walletconnect/utils":`^2.17.2`},peerDependenciesMeta:{wagmi:{optional:!0},"@walletconnect/utils":{optional:!0}}};exports.default=e;
@@ -1,6 +1,6 @@
1
1
  var e = {
2
2
  name: "@gurge/sdk",
3
- version: "0.3.35",
3
+ version: "0.3.38",
4
4
  homepage: "hinkal.io",
5
5
  author: { name: "Hinkal Protocol" },
6
6
  keywords: [
@@ -13,9 +13,9 @@ var e = {
13
13
  ".": {
14
14
  types: "./index.d.ts",
15
15
  "react-native": {
16
- types: "./react-native/index.d.ts",
17
- import: "./react-native/index.mjs",
18
- default: "./react-native/index.cjs"
16
+ types: "./index.d.ts",
17
+ import: "./index.mjs",
18
+ default: "./index.cjs"
19
19
  },
20
20
  import: "./index.mjs",
21
21
  default: "./index.cjs"
@@ -68,6 +68,12 @@ var e = {
68
68
  import: "./providers/prepareSolanaHinkal.mjs",
69
69
  default: "./providers/prepareSolanaHinkal.cjs"
70
70
  },
71
+ "./react-native/setup": {
72
+ types: "./react-native/setup.d.ts",
73
+ "react-native": "./react-native/setup.cjs",
74
+ import: "./react-native/setup.mjs",
75
+ default: "./react-native/setup.cjs"
76
+ },
71
77
  "./react-native/metro-config": "./react-native/metro-config.js"
72
78
  },
73
79
  types: "./index.d.ts",
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../common/src/types/external-action.types.cjs`),t=require(`../common/src/types/balances.types.cjs`),n=require(`../common/src/functions/pre-transaction/getFeeStructure.cjs`),r=require(`../common/src/crypto/preProcessing.cjs`),i=require(`../services/Hinkal.cjs`),a=require(`../functions/utils/refreshBalance.cjs`),o=require(`../functions/integrations/swapApi.cjs`);require(`../index.cjs`);const s=require(`./HinkalProvider.cjs`);exports.ExternalActionId=e.ExternalActionId,exports.Hinkal=i.Hinkal,exports.HinkalProvider=s.HinkalProvider,exports.PrivateBalanceUpdateType=t.PrivateBalanceUpdateType,exports.getEvmSwapPrices=o.getEvmSwapPrices,exports.getFeeStructure=n.getFeeStructure,exports.getSolanaSwapPrices=o.getSolanaSwapPrices,exports.preProcessing=r.preProcessing,exports.refreshBalance=a.refreshBalance;
@@ -1,2 +0,0 @@
1
- export * from '../index';
2
- export { HinkalProvider } from './HinkalProvider';
@@ -1,10 +0,0 @@
1
- import { ExternalActionId as e } from "../common/src/types/external-action.types.mjs";
2
- import { PrivateBalanceUpdateType as t } from "../common/src/types/balances.types.mjs";
3
- import { getFeeStructure as n } from "../common/src/functions/pre-transaction/getFeeStructure.mjs";
4
- import { preProcessing as r } from "../common/src/crypto/preProcessing.mjs";
5
- import { Hinkal as i } from "../services/Hinkal.mjs";
6
- import { refreshBalance as a } from "../functions/utils/refreshBalance.mjs";
7
- import { getEvmSwapPrices as o, getSolanaSwapPrices as s } from "../functions/integrations/swapApi.mjs";
8
- import "../index.mjs";
9
- import { HinkalProvider as c } from "./HinkalProvider.mjs";
10
- export { e as ExternalActionId, i as Hinkal, c as HinkalProvider, t as PrivateBalanceUpdateType, o as getEvmSwapPrices, n as getFeeStructure, s as getSolanaSwapPrices, r as preProcessing, a as refreshBalance };