@pooflabs/web 0.0.34 → 0.0.35

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.
@@ -11940,11 +11940,6 @@ async function makeApiRequest(method, urlPath, data, _overrides) {
11940
11940
  if (_overrides === null || _overrides === void 0 ? void 0 : _overrides.headers) {
11941
11941
  Object.assign(headers, _overrides.headers);
11942
11942
  }
11943
- // Signal to backend that client supports offchain transaction signing
11944
- if (typeof window !== "undefined" &&
11945
- window.TAROBASE_SUPPORTS_OFFCHAIN_SIGNING) {
11946
- headers["X-Supports-Offchain-Signing"] = "true";
11947
- }
11948
11943
  const requestConfig = {
11949
11944
  method,
11950
11945
  url: `${config.apiUrl}${urlPath.startsWith("/") ? urlPath : `/${urlPath}`}`,
@@ -12327,6 +12322,7 @@ async function setMany(many, options) {
12327
12322
  return transactionResult;
12328
12323
  }
12329
12324
  async function handleOffchainTransaction(tx, authProvider, options) {
12325
+ var _a, _b, _c, _d, _e;
12330
12326
  const config = await getConfig();
12331
12327
  // 1. Sign the transaction message using the auth provider
12332
12328
  const signature = await authProvider.signMessage(tx.message);
@@ -12343,10 +12339,19 @@ async function setMany(many, options) {
12343
12339
  };
12344
12340
  }
12345
12341
  // 4. Submit to RPC endpoint
12346
- const rpcUrl = `${config.apiUrl}/app/${config.appId}/rpc`;
12342
+ // Use appId from headers if provided, otherwise fallback to config.appId
12343
+ const appId = ((_b = (_a = options === null || options === void 0 ? void 0 : options._overrides) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b['x-app-id']) || ((_d = (_c = options === null || options === void 0 ? void 0 : options._overrides) === null || _c === void 0 ? void 0 : _c.headers) === null || _d === void 0 ? void 0 : _d['X-App-Id']) || config.appId;
12344
+ const rpcUrl = `${config.apiUrl}/app/${appId}/rpc`;
12345
+ // Build headers, applying overrides if provided
12346
+ const headers = {
12347
+ 'Content-Type': 'application/json',
12348
+ };
12349
+ if ((_e = options === null || options === void 0 ? void 0 : options._overrides) === null || _e === void 0 ? void 0 : _e.headers) {
12350
+ Object.assign(headers, options._overrides.headers);
12351
+ }
12347
12352
  const rpcResponse = await fetch(rpcUrl, {
12348
12353
  method: 'POST',
12349
- headers: { 'Content-Type': 'application/json' },
12354
+ headers,
12350
12355
  body: JSON.stringify({
12351
12356
  jsonrpc: '2.0',
12352
12357
  id: 1,
@@ -12652,7 +12657,7 @@ async function loadDependencies() {
12652
12657
  const [reactModule, reactDomModule, phantomModule] = await Promise.all([
12653
12658
  import('react'),
12654
12659
  import('react-dom/client'),
12655
- Promise.resolve().then(function () { return require('./index-CvOWbIKV.js'); })
12660
+ Promise.resolve().then(function () { return require('./index-BLvoqeoa.js'); })
12656
12661
  ]);
12657
12662
  React$1 = reactModule;
12658
12663
  ReactDOM$1 = reactDomModule;
@@ -31640,4 +31645,4 @@ exports.setMany = setMany;
31640
31645
  exports.signSessionCreateMessage = signSessionCreateMessage;
31641
31646
  exports.subscribe = subscribe;
31642
31647
  exports.useAuth = useAuth;
31643
- //# sourceMappingURL=index-QjDqogbz.js.map
31648
+ //# sourceMappingURL=index-7EM1gtmw.js.map