@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.
@@ -11920,11 +11920,6 @@ async function makeApiRequest(method, urlPath, data, _overrides) {
11920
11920
  if (_overrides === null || _overrides === void 0 ? void 0 : _overrides.headers) {
11921
11921
  Object.assign(headers, _overrides.headers);
11922
11922
  }
11923
- // Signal to backend that client supports offchain transaction signing
11924
- if (typeof window !== "undefined" &&
11925
- window.TAROBASE_SUPPORTS_OFFCHAIN_SIGNING) {
11926
- headers["X-Supports-Offchain-Signing"] = "true";
11927
- }
11928
11923
  const requestConfig = {
11929
11924
  method,
11930
11925
  url: `${config.apiUrl}${urlPath.startsWith("/") ? urlPath : `/${urlPath}`}`,
@@ -12307,6 +12302,7 @@ async function setMany(many, options) {
12307
12302
  return transactionResult;
12308
12303
  }
12309
12304
  async function handleOffchainTransaction(tx, authProvider, options) {
12305
+ var _a, _b, _c, _d, _e;
12310
12306
  const config = await getConfig();
12311
12307
  // 1. Sign the transaction message using the auth provider
12312
12308
  const signature = await authProvider.signMessage(tx.message);
@@ -12323,10 +12319,19 @@ async function setMany(many, options) {
12323
12319
  };
12324
12320
  }
12325
12321
  // 4. Submit to RPC endpoint
12326
- const rpcUrl = `${config.apiUrl}/app/${config.appId}/rpc`;
12322
+ // Use appId from headers if provided, otherwise fallback to config.appId
12323
+ 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;
12324
+ const rpcUrl = `${config.apiUrl}/app/${appId}/rpc`;
12325
+ // Build headers, applying overrides if provided
12326
+ const headers = {
12327
+ 'Content-Type': 'application/json',
12328
+ };
12329
+ if ((_e = options === null || options === void 0 ? void 0 : options._overrides) === null || _e === void 0 ? void 0 : _e.headers) {
12330
+ Object.assign(headers, options._overrides.headers);
12331
+ }
12327
12332
  const rpcResponse = await fetch(rpcUrl, {
12328
12333
  method: 'POST',
12329
- headers: { 'Content-Type': 'application/json' },
12334
+ headers,
12330
12335
  body: JSON.stringify({
12331
12336
  jsonrpc: '2.0',
12332
12337
  id: 1,
@@ -12632,7 +12637,7 @@ async function loadDependencies() {
12632
12637
  const [reactModule, reactDomModule, phantomModule] = await Promise.all([
12633
12638
  import('react'),
12634
12639
  import('react-dom/client'),
12635
- import('./index-C4NtEZJY.esm.js')
12640
+ import('./index-HhgbHQ0x.esm.js')
12636
12641
  ]);
12637
12642
  React$1 = reactModule;
12638
12643
  ReactDOM$1 = reactDomModule;
@@ -31583,4 +31588,4 @@ async function getIdToken() {
31583
31588
  }
31584
31589
 
31585
31590
  export { createSessionWithPrivy as A, createSessionWithSignature as B, genAuthNonce as C, DEFAULT_TEST_ADDRESS as D, genSolanaMessage as E, refreshSession as F, signSessionCreateMessage as G, MockAuthProvider as M, OffchainAuthProvider as O, PhantomWalletProvider as P, ServerSessionManager as S, WebSessionManager as W, getCurrentUser as a, bufferExports$1 as b, onAuthLoadingChanged as c, getAuthLoading as d, logout as e, getConfig as f, getDefaultExportFromCjs$1 as g, getAuthProvider as h, init as i, get$2 as j, setMany as k, login as l, setFile as m, getFiles as n, onAuthStateChanged as o, runQueryMany as p, runExpression as q, runQuery as r, set$1 as s, runExpressionMany as t, subscribe as u, useAuth as v, getIdToken as w, PrivyWalletProvider as x, buildSetDocumentsTransaction as y, convertRemainingAccounts as z };
31586
- //# sourceMappingURL=index-B4flwOh0.esm.js.map
31591
+ //# sourceMappingURL=index-BBhosQh0.esm.js.map