@pooflabs/core 0.0.16 → 0.0.17

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/dist/index.mjs CHANGED
@@ -3147,11 +3147,6 @@ async function makeApiRequest(method, urlPath, data, _overrides) {
3147
3147
  if (_overrides === null || _overrides === void 0 ? void 0 : _overrides.headers) {
3148
3148
  Object.assign(headers, _overrides.headers);
3149
3149
  }
3150
- // Signal to backend that client supports offchain transaction signing
3151
- if (typeof window !== "undefined" &&
3152
- window.TAROBASE_SUPPORTS_OFFCHAIN_SIGNING) {
3153
- headers["X-Supports-Offchain-Signing"] = "true";
3154
- }
3155
3150
  const requestConfig = {
3156
3151
  method,
3157
3152
  url: `${config.apiUrl}${urlPath.startsWith("/") ? urlPath : `/${urlPath}`}`,
@@ -3534,6 +3529,7 @@ async function setMany(many, options) {
3534
3529
  return transactionResult;
3535
3530
  }
3536
3531
  async function handleOffchainTransaction(tx, authProvider, options) {
3532
+ var _a, _b, _c, _d, _e;
3537
3533
  const config = await getConfig();
3538
3534
  // 1. Sign the transaction message using the auth provider
3539
3535
  const signature = await authProvider.signMessage(tx.message);
@@ -3550,10 +3546,19 @@ async function setMany(many, options) {
3550
3546
  };
3551
3547
  }
3552
3548
  // 4. Submit to RPC endpoint
3553
- const rpcUrl = `${config.apiUrl}/app/${config.appId}/rpc`;
3549
+ // Use appId from headers if provided, otherwise fallback to config.appId
3550
+ 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;
3551
+ const rpcUrl = `${config.apiUrl}/app/${appId}/rpc`;
3552
+ // Build headers, applying overrides if provided
3553
+ const headers = {
3554
+ 'Content-Type': 'application/json',
3555
+ };
3556
+ if ((_e = options === null || options === void 0 ? void 0 : options._overrides) === null || _e === void 0 ? void 0 : _e.headers) {
3557
+ Object.assign(headers, options._overrides.headers);
3558
+ }
3554
3559
  const rpcResponse = await fetch(rpcUrl, {
3555
3560
  method: 'POST',
3556
- headers: { 'Content-Type': 'application/json' },
3561
+ headers,
3557
3562
  body: JSON.stringify({
3558
3563
  jsonrpc: '2.0',
3559
3564
  id: 1,