@aintivirus-ai/mixer-sdk 1.0.9 → 1.0.10

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.
@@ -21,11 +21,15 @@ function useEVMReady() {
21
21
  const evmSDK = mixer?.getActiveEVM?.() ?? null;
22
22
  const evmChainConfig = chainId != null ? getEvmChainConfig(chainId) : undefined;
23
23
  const subgraphUrl = evmChainConfig?.subgraphUrl;
24
+ const subgraphApiKey = evmChainConfig?.subgraphApiKey;
24
25
  const subgraph = (0, react_1.useMemo)(() => {
25
26
  if (!subgraphUrl)
26
27
  return null;
27
- return new subgraph_1.AintiVirusEVMSubgraph({ endpoint: subgraphUrl });
28
- }, [subgraphUrl]);
28
+ const headers = subgraphApiKey
29
+ ? { Authorization: `Bearer ${subgraphApiKey}` }
30
+ : undefined;
31
+ return new subgraph_1.AintiVirusEVMSubgraph({ endpoint: subgraphUrl, headers });
32
+ }, [subgraphUrl, subgraphApiKey]);
29
33
  const isSupportedEVMChain = chainId != null &&
30
34
  evmChainIds.length > 0 &&
31
35
  evmChainIds.includes(chainId);
@@ -110,6 +110,8 @@ export interface EvmChainConfig {
110
110
  wethGatewayAddress?: string;
111
111
  rpcUrl?: string;
112
112
  subgraphUrl?: string;
113
+ /** Subgraph API key for The Graph Gateway (Bearer token). Required when using gateway.thegraph.com */
114
+ subgraphApiKey?: string;
113
115
  /** Payment contract address (for subgraph payment stats / payment processed list) */
114
116
  paymentAddress?: string;
115
117
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aintivirus-ai/mixer-sdk",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "TypeScript SDK for AintiVirus Mixer - Easy web3 integration for privacy-preserving transactions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",