@neus/sdk 1.1.1 → 1.1.4

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
@@ -1,206 +1,191 @@
1
- # @neus/sdk
2
-
3
- Create, check, and reuse NEUS trust receipts from apps and backends. The same package ships the **`neus`** CLI for hosted MCP setup and portable agent import.
4
-
5
- NEUS makes trust portable across apps, agents, and ecosystems before access, payment, or action.
6
-
7
- Roadmap: [docs.neus.network/platform/status](https://docs.neus.network/platform/status)
8
-
9
- ## Install (library)
10
-
11
- ```bash
12
- npm install @neus/sdk
13
- ```
14
-
15
- ## Bring Your Own Agent (BYOA)
16
-
17
- Already have an agent setup? Use the CLI to package supported local agent context, including instructions, rules, skills, and MCP server references from **OpenClaw, Cursor, Claude Code, and Claude Desktop**:
18
-
19
- ```bash
20
- npx -y -p @neus/sdk neus import
21
- ```
22
-
23
- This prepares a local portable-agent manifest. In MCP, call `neus_agent_link` first; if setup is missing, use `neus_agent_create`, complete the hosted or signing steps, then call `neus_agent_link` again until `linked: true`.
24
-
25
- *To check what will be imported without writing changes:*
26
- ```bash
27
- npx -y -p @neus/sdk neus import --dry-run
28
- ```
29
-
30
- ## Connect editors and assistants
31
-
32
- | Topic | Link |
33
- | --------------------------------- | ----------------------------------------------------------------------------- |
34
- | Setup, JSON snippets, and headers | [MCP setup](https://docs.neus.network/mcp/setup) |
35
- | Tools and session order | [MCP overview](https://docs.neus.network/mcp/overview) |
36
- | Discovery URLs | [Discovery and endpoints](https://docs.neus.network/mcp/endpoints) |
37
- | NEUS for AI assistants | [NEUS for AI assistants](https://docs.neus.network/mcp/ide-plugin) |
38
-
39
- Prefer `neus setup` over hand-editing config files so every host stays on **`https://mcp.neus.network/mcp`**.
40
-
41
- ## What you can ship
42
-
43
- - Hosted verification flows that return a reusable receipt
44
- - Server checks before access, rewards, payments, or actions
45
- - React gates with `VerifyGate`
46
- - Agent identity and scoped delegation
47
- - MCP setup for assistants and agent tools
48
-
49
- ## Fastest path: Hosted Verify
50
-
51
- Use Hosted Verify when you want NEUS to handle the signing/verification flow outside your app UI.
52
-
53
- ```js
54
- import { getHostedCheckoutUrl } from '@neus/sdk';
55
-
56
- const url = getHostedCheckoutUrl({
57
- verifiers: ['ownership-basic'],
58
- returnUrl: 'https://yourapp.com/auth/callback'
59
- });
60
-
61
- window.location.assign(url);
62
- ```
63
-
64
- After completion, NEUS redirects back with a `qHash`. Store it with your user or record.
65
-
66
- ## Advanced: in-app signing
67
-
68
- Use this only when your app intentionally handles signing. This example is EVM. For non-EVM accounts, pass the provider explicitly and include `chain` as a CAIP-2 value.
69
-
70
- ```js
71
- import { NeusClient } from '@neus/sdk';
72
-
73
- const client = new NeusClient({
74
- appId: 'your-app-id'
75
- });
76
-
77
- const proof = await client.verify({
78
- verifier: 'ownership-basic',
79
- data: {
80
- owner: '0x...',
81
- contentType: 'application/json',
82
- content: JSON.stringify({
83
- title: 'Verified claim',
84
- type: 'project-update',
85
- summary: 'Public summary of what is being proven.'
86
- }),
87
- reference: {
88
- type: 'url',
89
- id: 'https://example.com/source',
90
- title: 'Source record'
91
- }
92
- },
93
- wallet: window.ethereum // EVM provider
94
- });
95
-
96
- console.log(proof.qHash);
97
- console.log(proof.proofUrl);
98
- ```
99
-
100
- ## React widget
101
-
102
- Use `VerifyGate` when you want a drop-in verification flow in React.
103
-
104
- ```jsx
105
- import { VerifyGate } from '@neus/sdk/widgets';
106
-
107
- export function Page() {
108
- return (
109
- <VerifyGate
110
- appId="your-app-id"
111
- requiredVerifiers={['ownership-basic']}
112
- verifierData={{
113
- 'ownership-basic': {
114
- owner: '0x...',
115
- contentType: 'application/json',
116
- content: JSON.stringify({
117
- title: 'Verified claim',
118
- summary: 'Public summary of what is being proven.'
119
- }),
120
- reference: {
121
- type: 'url',
122
- id: 'https://example.com/source'
123
- }
124
- }
125
- }}
126
- onVerified={result => {
127
- console.log(result.qHash || result.qHashes);
128
- }}
129
- />
130
- );
131
- }
132
- ```
133
-
134
- ## Check receipts
135
-
136
- Use `gateCheck` from trusted server code when you need allow/deny or eligibility checks.
137
-
138
- ```js
139
- import { NeusClient } from '@neus/sdk';
140
-
141
- const client = new NeusClient({
142
- appId: 'your-app-id'
143
- });
144
-
145
- const result = await client.gateCheck({
146
- address: '0x...',
147
- verifierIds: ['ownership-basic']
148
- });
149
-
150
- if (!result.data?.eligible) {
151
- throw new Error('Access denied');
152
- }
153
- ```
154
-
155
- Never ship access keys in browser code.
156
-
157
- ## Core methods
158
-
159
- | Method | Use it for |
160
- | ------------------------------- | ------------------------------------------- |
161
- | `getHostedCheckoutUrl()` | Send a user to Hosted Verify |
162
- | `client.verify()` | Create a proof |
163
- | `client.getProof()` | Fetch a receipt by `qHash` |
164
- | `client.pollProofStatus()` | Wait for async completion |
165
- | `client.gateCheck()` | Server-side eligibility checks |
166
- | `client.checkGate()` | Local preview against already-loaded proofs |
167
- | `client.createWalletLinkData()` | Wallet-link payloads |
168
-
169
- ## Configuration
170
-
171
- ```js
172
- const client = new NeusClient({
173
- apiUrl: 'https://api.neus.network',
174
- appId: 'your-app-id',
175
- timeout: 30000
176
- });
177
- ```
178
-
179
- `appId` is public attribution for your app.
180
- `apiKey` / `npk_*` is optional and server-side only.
181
-
182
- ## MCP step-by-step
183
-
184
- ```bash
185
- npx -y -p @neus/sdk neus setup
186
- npx -y -p @neus/sdk neus auth
187
- npx -y -p @neus/sdk neus doctor --live
188
- ```
189
-
190
- Re-sign in or rotate credentials:
191
-
192
- ```bash
193
- npx -y -p @neus/sdk neus auth
194
- npx -y -p @neus/sdk neus auth --access-key <npk_...> # servers and CI only
195
- ```
196
-
197
- Editors with plugin marketplaces can install **`neus-trust@neus`** for the bundled session workflow. OpenClaw, Hermes, and other runtimes: see [NEUS for AI assistants](https://docs.neus.network/mcp/ide-plugin) for exact paths.
198
-
199
- ## Docs
200
-
201
- - Quickstart: https://docs.neus.network/quickstart
202
- - JavaScript SDK: https://docs.neus.network/sdks/javascript
203
- - Ownership Basic: https://docs.neus.network/verification/ownership-basic
204
- - Widgets: https://docs.neus.network/widgets/overview
205
- - MCP: https://docs.neus.network/mcp/overview
206
- - API: https://docs.neus.network/api/overview
1
+ # @neus/sdk
2
+
3
+ Create, check, and reuse NEUS trust receipts from apps and backends. The same package ships the **`neus`** CLI for hosted MCP setup.
4
+
5
+ NEUS makes trust portable across apps, agents, and ecosystems before access, payment, or action.
6
+
7
+ Roadmap: [docs.neus.network/platform/status](https://docs.neus.network/platform/status)
8
+
9
+ ## Install (library)
10
+
11
+ ```bash
12
+ npm install @neus/sdk
13
+ ```
14
+
15
+ ## Connect editors and assistants
16
+
17
+ One command detects your environment and configures hosted MCP for Claude Code, Codex, Cursor, or VS Code.
18
+
19
+ ```bash
20
+ npx -y -p @neus/sdk neus setup
21
+ npx -y -p @neus/sdk neus doctor --live
22
+ ```
23
+
24
+ Open your MCP client and ask the assistant to use NEUS Trust.
25
+
26
+ ## MCP docs
27
+
28
+ | Topic | Link |
29
+ | --------------------------------- | ----------------------------------------------------------------------------- |
30
+ | Setup, JSON snippets, and headers | [MCP setup](https://docs.neus.network/mcp/setup) |
31
+ | Tools and session order | [MCP overview](https://docs.neus.network/mcp/overview) |
32
+ | Discovery URLs | [Discovery and endpoints](https://docs.neus.network/mcp/endpoints) |
33
+ | Install NEUS Trust | [Install NEUS Trust](https://docs.neus.network/install) |
34
+
35
+ Prefer `neus setup` over hand-editing config files so every host stays on **`https://mcp.neus.network/mcp`**.
36
+
37
+ ## What you can ship
38
+
39
+ - Hosted verification flows that return a reusable receipt
40
+ - Server checks before access, rewards, payments, or actions
41
+ - React gates with `VerifyGate`
42
+ - Agent identity and scoped delegation
43
+ - MCP setup for assistants and agent tools
44
+
45
+ ## Hosted Verify
46
+
47
+ Use Hosted Verify when you want NEUS to handle the signing/verification flow outside your app UI. Prefer a **published gate**:
48
+
49
+ ```js
50
+ import { getHostedCheckoutUrl } from '@neus/sdk';
51
+
52
+ const url = getHostedCheckoutUrl({
53
+ gateId: 'gate_your-app-name',
54
+ returnUrl: 'https://yourapp.com/auth/callback'
55
+ });
56
+
57
+ window.location.assign(url);
58
+ ```
59
+
60
+ After completion, NEUS redirects back with a `qHash`. Store it with your user or record.
61
+
62
+ ## Advanced: in-app signing
63
+
64
+ Use this only when your app intentionally handles signing. This example is EVM. For non-EVM accounts, pass the provider explicitly and include `chain` as a CAIP-2 value.
65
+
66
+ ```js
67
+ import { NeusClient } from '@neus/sdk';
68
+
69
+ const client = new NeusClient({
70
+ apiUrl: 'https://api.neus.network'
71
+ });
72
+
73
+ const proof = await client.verify({
74
+ verifier: 'ownership-basic',
75
+ data: {
76
+ owner: '0x...',
77
+ contentType: 'application/json',
78
+ content: JSON.stringify({
79
+ title: 'Verified claim',
80
+ type: 'project-update',
81
+ summary: 'Public summary of what is being proven.'
82
+ }),
83
+ reference: {
84
+ type: 'url',
85
+ id: 'https://example.com/source',
86
+ title: 'Source record'
87
+ }
88
+ },
89
+ wallet: window.ethereum // EVM provider
90
+ });
91
+
92
+ console.log(proof.qHash);
93
+ console.log(proof.proofUrl);
94
+ ```
95
+
96
+ ## React widget
97
+
98
+ Use `VerifyGate` with your published `gateId`:
99
+
100
+ ```jsx
101
+ import { VerifyGate } from '@neus/sdk/widgets';
102
+
103
+ export function Page() {
104
+ return (
105
+ <VerifyGate
106
+ gateId="gate_your-app-name"
107
+ onVerified={result => {
108
+ console.log(result.qHash || result.qHashes);
109
+ }}
110
+ >
111
+ <section>Unlocked content</section>
112
+ </VerifyGate>
113
+ );
114
+ }
115
+ ```
116
+
117
+ ## Check receipts
118
+
119
+ Use `gateCheck` from trusted server code when you need allow/deny before access:
120
+
121
+ ```js
122
+ import { NeusClient } from '@neus/sdk';
123
+
124
+ const client = new NeusClient();
125
+
126
+ const result = await client.gateCheck({
127
+ gateId: 'gate_your-app-name',
128
+ address: '0x...'
129
+ });
130
+
131
+ if (!result.data?.eligible) {
132
+ throw new Error('Access denied');
133
+ }
134
+ ```
135
+
136
+ Never ship access keys in browser code.
137
+
138
+ ## Core methods
139
+
140
+ | Method | Use it for |
141
+ | ------------------------------- | ------------------------------------------- |
142
+ | `getHostedCheckoutUrl()` | Send a user to Hosted Verify |
143
+ | `client.verify()` | Create a proof |
144
+ | `client.getProof()` | Fetch a receipt by `qHash` |
145
+ | `client.pollProofStatus()` | Wait for async completion |
146
+ | `client.gateCheck()` | Server-side eligibility checks |
147
+ | `client.checkGate()` | Local preview against already-loaded proofs |
148
+ | `client.createWalletLinkData()` | Wallet-link payloads |
149
+
150
+ ## Configuration
151
+
152
+ ```js
153
+ const client = new NeusClient({
154
+ apiUrl: 'https://api.neus.network',
155
+ timeout: 30000
156
+ });
157
+ ```
158
+
159
+ `appId` is optional public attribution for advanced server/app flows. Published gate checkout and `gateCheck({ gateId })` do not require it.
160
+ `apiKey` / `npk_*` is optional and server-side only.
161
+
162
+ ## MCP step-by-step
163
+
164
+ ```bash
165
+ npx -y -p @neus/sdk neus setup
166
+ npx -y -p @neus/sdk neus doctor --live
167
+ ```
168
+
169
+ `neus setup` configures MCP and signs you in: `NEUS_ACCESS_KEY` from the environment when set, otherwise the selected host starts OAuth. Cursor, VS Code, and Claude Code use browser sign-in on NEUS. Pass `--access-key <npk_...>` only to override.
170
+
171
+ Codex owns its local MCP OAuth session. Use `npx -y -p @neus/sdk neus setup --client codex`, then `npx -y -p @neus/sdk neus auth --client codex`.
172
+
173
+ Integrators embedding install UX in apps should import **`@neus/sdk/mcp-hosts`** (setup commands, deeplinks, host labels) instead of duplicating strings.
174
+
175
+ Claude Code users can install **`neus-trust@neus`** for the bundled session workflow:
176
+
177
+ ```text
178
+ /plugin marketplace add https://github.com/neus/network
179
+ /plugin install neus-trust@neus
180
+ ```
181
+
182
+ Other hosts: [Install NEUS Trust](https://docs.neus.network/install).
183
+
184
+ ## Docs
185
+
186
+ - Quickstart: https://docs.neus.network/quickstart
187
+ - JavaScript SDK: https://docs.neus.network/sdks/javascript
188
+ - Ownership Basic: https://docs.neus.network/verification/ownership-basic
189
+ - Widgets: https://docs.neus.network/widgets/overview
190
+ - MCP: https://docs.neus.network/mcp/overview
191
+ - API: https://docs.neus.network/api/overview
package/SECURITY.md CHANGED
@@ -1,38 +1,38 @@
1
- # NEUS SDK security notes
2
-
3
- Treat **wallet signatures** and **API keys** as secrets. Do not log them, expose them to clients, or store them in analytics.
4
-
5
- ## Authentication model
6
-
7
- - **Verification requests** are authenticated with a wallet signature over the **CAIP-380 Portable Proof** six-line signing string. Never roll your own message format in production—use the SDK or the hosted preparation step documented for HTTP integrations.
8
- - **Proof lookups by `qHash`** are safe for public proofs. Private proofs return a minimal payload unless the caller proves ownership (authenticated owner or signed request).
9
- - **Owner-only reads** of private proof payloads require an extra owner-signed request. The SDK attaches the required signed headers for you.
10
-
11
- ## Do not
12
-
13
- - Do not treat proof signatures as bearer tokens (they are request-bound).
14
- - Do not embed API keys in browser apps. Keep API keys server-side only.
15
- - Do not log or persist proof signatures, API keys, or third-party auth credentials (if your integration uses them).
16
-
17
- ## Privacy defaults
18
-
19
- **`client.verify()`** defaults to **private**.
20
-
21
- **`VerifyGate`** create mode also defaults to **private**.
22
-
23
- Use public visibility only when you need proof reuse without owner-authenticated access:
24
-
25
- - unlisted public: `privacyLevel: 'public'`, `publicDisplay: false`
26
- - listed public: `privacyLevel: 'public'`, `publicDisplay: true`
27
-
28
- Do not treat unlisted public proofs as secret.
29
-
30
- `storeOriginalContent` is an advanced storage control. Most integrations should leave the default as-is.
31
-
32
- Controls:
33
-
34
- - `privacyLevel` - private by default; switch to public only for intentional public reuse
35
- - `publicDisplay` - discovery vs unlisted
36
- - `storeOriginalContent` - advanced content-storage control
37
-
38
- Discoverable listings require **`privacyLevel: 'public'`** and **`publicDisplay: true`**.
1
+ # NEUS SDK security notes
2
+
3
+ Treat **wallet signatures** and **API keys** as secrets. Do not log them, expose them to clients, or store them in analytics.
4
+
5
+ ## Authentication model
6
+
7
+ - **Verification requests** are authenticated with a wallet signature over the **CAIP-380 Portable Proof** six-line signing string. Never roll your own message format in production—use the SDK or the hosted preparation step documented for HTTP integrations.
8
+ - **Proof lookups by `qHash`** are safe for public proofs. Private proofs return a minimal payload unless the caller proves ownership (authenticated owner or signed request).
9
+ - **Owner-only reads** of private proof payloads require an extra owner-signed request. The SDK attaches the required signed headers for you.
10
+
11
+ ## Do not
12
+
13
+ - Do not treat proof signatures as bearer tokens (they are request-bound).
14
+ - Do not embed API keys in browser apps. Keep API keys server-side only.
15
+ - Do not log or persist proof signatures, API keys, or third-party auth credentials (if your integration uses them).
16
+
17
+ ## Privacy defaults
18
+
19
+ **`client.verify()`** defaults to **private**.
20
+
21
+ **`VerifyGate`** create mode also defaults to **private**.
22
+
23
+ Use public visibility only when you need proof reuse without owner-authenticated access:
24
+
25
+ - unlisted public: `privacyLevel: 'public'`, `publicDisplay: false`
26
+ - listed public: `privacyLevel: 'public'`, `publicDisplay: true`
27
+
28
+ Do not treat unlisted public proofs as secret.
29
+
30
+ `storeOriginalContent` is an advanced storage control. Most integrations should leave the default as-is.
31
+
32
+ Controls:
33
+
34
+ - `privacyLevel` - private by default; switch to public only for intentional public reuse
35
+ - `publicDisplay` - discovery vs unlisted
36
+ - `storeOriginalContent` - advanced content-storage control
37
+
38
+ Discoverable listings require **`privacyLevel: 'public'`** and **`publicDisplay: true`**.
package/cjs/client.cjs CHANGED
@@ -1396,21 +1396,20 @@ var NeusClient = class {
1396
1396
  return hex;
1397
1397
  }
1398
1398
  };
1399
- const isFarcasterWallet = (() => {
1399
+ const isBaseMiniAppWallet = (() => {
1400
1400
  if (typeof window === "undefined") return false;
1401
1401
  try {
1402
1402
  const w = window;
1403
- const fc = w.farcaster;
1404
- if (!fc || !fc.context) return false;
1405
- const fcProvider = fc.provider || fc.walletProvider || fc.context && fc.context.walletProvider;
1406
- if (fcProvider === provider) return true;
1407
- if (w.mini && w.mini.wallet === provider && fc && fc.context) return true;
1408
- if (w.ethereum === provider && fc && fc.context) return true;
1403
+ const mini = w.mini;
1404
+ if (!mini) return false;
1405
+ const miniProvider = mini.wallet || mini.provider;
1406
+ if (miniProvider === provider) return true;
1407
+ if (w.ethereum === provider && mini) return true;
1409
1408
  } catch {
1410
1409
  }
1411
1410
  return false;
1412
1411
  })();
1413
- if (isFarcasterWallet) {
1412
+ if (isBaseMiniAppWallet) {
1414
1413
  try {
1415
1414
  const hexMsg = toHexUtf82(message);
1416
1415
  signature2 = await provider.request({ method: "personal_sign", params: [hexMsg, walletAddress2] });
@@ -1759,7 +1758,9 @@ ${bytes.length}`;
1759
1758
  const pathId = /^0x[a-fA-F0-9]{40}$/i.test(id) ? id.toLowerCase() : id;
1760
1759
  const qs = [];
1761
1760
  if (options.limit) qs.push(`limit=${encodeURIComponent(String(options.limit))}`);
1762
- if (options.offset) qs.push(`offset=${encodeURIComponent(String(options.offset))}`);
1761
+ const cursorRaw = options.cursor !== null && options.cursor !== void 0 ? String(options.cursor).trim() : "";
1762
+ if (cursorRaw) qs.push(`cursor=${encodeURIComponent(cursorRaw)}`);
1763
+ else if (options.offset) qs.push(`offset=${encodeURIComponent(String(options.offset))}`);
1763
1764
  if (options.qHash) qs.push(`qHash=${encodeURIComponent(options.qHash.toLowerCase())}`);
1764
1765
  const query = qs.length ? `?${qs.join("&")}` : "";
1765
1766
  const response = await this._makeRequest(
@@ -1775,7 +1776,8 @@ ${bytes.length}`;
1775
1776
  proofs: Array.isArray(proofs) ? proofs : [],
1776
1777
  totalCount: response.data?.totalCount ?? proofs.length,
1777
1778
  hasMore: Boolean(response.data?.hasMore),
1778
- nextOffset: response.data?.nextOffset ?? null
1779
+ nextOffset: response.data?.nextOffset ?? null,
1780
+ nextCursor: typeof response.data?.nextCursor === "string" && response.data.nextCursor.trim() ? response.data.nextCursor.trim() : null
1779
1781
  };
1780
1782
  }
1781
1783
  async getPrivateProofsByWallet(walletAddress, options = {}, wallet = null) {
@@ -1827,7 +1829,9 @@ ${bytes.length}`;
1827
1829
  }
1828
1830
  const qs = [];
1829
1831
  if (options.limit) qs.push(`limit=${encodeURIComponent(String(options.limit))}`);
1830
- if (options.offset) qs.push(`offset=${encodeURIComponent(String(options.offset))}`);
1832
+ const cursorRaw = options.cursor !== null && options.cursor !== void 0 ? String(options.cursor).trim() : "";
1833
+ if (cursorRaw) qs.push(`cursor=${encodeURIComponent(cursorRaw)}`);
1834
+ else if (options.offset) qs.push(`offset=${encodeURIComponent(String(options.offset))}`);
1831
1835
  if (options.qHash) qs.push(`qHash=${encodeURIComponent(options.qHash.toLowerCase())}`);
1832
1836
  const query = qs.length ? `?${qs.join("&")}` : "";
1833
1837
  const response = await this._makeRequest("GET", `/api/v1/proofs/by-wallet/${encodeURIComponent(pathId)}${query}`, null, {
@@ -1845,7 +1849,8 @@ ${bytes.length}`;
1845
1849
  proofs: Array.isArray(proofs) ? proofs : [],
1846
1850
  totalCount: response.data?.totalCount ?? proofs.length,
1847
1851
  hasMore: Boolean(response.data?.hasMore),
1848
- nextOffset: response.data?.nextOffset ?? null
1852
+ nextOffset: response.data?.nextOffset ?? null,
1853
+ nextCursor: typeof response.data?.nextCursor === "string" && response.data.nextCursor.trim() ? response.data.nextCursor.trim() : null
1849
1854
  };
1850
1855
  }
1851
1856
  async gateCheck(params = {}) {
@@ -1853,6 +1858,8 @@ ${bytes.length}`;
1853
1858
  if (!validateUniversalAddress(address, params.chain)) {
1854
1859
  throw new ValidationError("Valid address is required");
1855
1860
  }
1861
+ const gateIdParam = typeof params.gateId === "string" ? params.gateId.trim() : "";
1862
+ const verifierIds = gateIdParam ? void 0 : params.verifierIds;
1856
1863
  const qs = new URLSearchParams();
1857
1864
  qs.set("address", address);
1858
1865
  const setIfPresent = (key, value) => {
@@ -1874,7 +1881,8 @@ ${bytes.length}`;
1874
1881
  }
1875
1882
  setIfPresent(key, value);
1876
1883
  };
1877
- setCsvIfPresent("verifierIds", params.verifierIds);
1884
+ setIfPresent("gateId", gateIdParam);
1885
+ setCsvIfPresent("verifierIds", verifierIds);
1878
1886
  setBoolIfPresent("requireAll", params.requireAll);
1879
1887
  setIfPresent("minCount", params.minCount);
1880
1888
  setIfPresent("sinceDays", params.sinceDays);
@@ -1938,10 +1946,10 @@ ${bytes.length}`;
1938
1946
  }
1939
1947
  }
1940
1948
  let mergedHeaders = headersOverride;
1941
- if (!mergedHeaders) {
1949
+ if (!mergedHeaders && !gateIdParam) {
1942
1950
  try {
1943
1951
  const sponsorHeaders = await this._resolveSponsorGrantHeaders(
1944
- Array.isArray(params.verifierIds) ? params.verifierIds : params.verifierIds ? [params.verifierIds] : []
1952
+ Array.isArray(verifierIds) ? verifierIds : verifierIds ? [verifierIds] : []
1945
1953
  );
1946
1954
  if (sponsorHeaders && Object.keys(sponsorHeaders).length > 0) {
1947
1955
  mergedHeaders = sponsorHeaders;