apinow-sdk 0.28.0 → 0.28.1

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -86,7 +86,10 @@ export function createClient(config) {
86
86
  async function signAuthHeader() {
87
87
  const issuedAt = new Date().toISOString();
88
88
  const nonce = Math.random().toString(36).slice(2) + Date.now().toString(36);
89
- const message = `APINow auth\naddress: ${address}\nissuedAt: ${issuedAt}\nnonce: ${nonce}`;
89
+ // Single-line format: Chrome's fetch() rejects header values containing
90
+ // raw newlines ("Failed to execute 'fetch' on 'Window': Invalid value").
91
+ // Server parses via regex so space-separated works identically.
92
+ const message = `APINow auth | address: ${address} | issuedAt: ${issuedAt} | nonce: ${nonce}`;
90
93
  const signature = await signMessage(message);
91
94
  return {
92
95
  Authorization: `Bearer ${message}||${signature}||${address}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apinow-sdk",
3
- "version": "0.28.0",
3
+ "version": "0.28.1",
4
4
  "description": "Pay-per-call API SDK & CLI for APINow.fun — endpoints + workflows, wraps x402 so you don't have to",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",