@bounded-sh/client 0.0.36 → 0.0.37

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.
@@ -15,6 +15,8 @@ export type { HostedAuthMethod, OidcLoginOptions, PopupLoginOptions } from "./au
15
15
  export { get, getMany, docId, set, setMany, setFile, getFiles, search, queryAggregate, runQuery, runQueryMany, runExpression, runExpressionMany, signMessage, signTransaction, signAndSubmitTransaction, count, aggregate, GetOptions, SearchOptions, SetOptions, CountOptions, AggregateOptions, AggregateOperation, AggregateResult, AggregateSpec, AggregateRow, QueryAggregateOptions, } from "@bounded-sh/core";
16
16
  export type { GetOptions as BoundedGetOptions } from "@bounded-sh/core";
17
17
  export { subscribe } from "@bounded-sh/core";
18
+ export { BoundedDeclineError, deriveDecline, dispatchDeclineEvent, DECLINE_EVENT_NAME } from "@bounded-sh/core";
19
+ export type { BoundedDecline, DeclineReason, DeclineBoundary } from "@bounded-sh/core";
18
20
  export * from "@bounded-sh/core";
19
21
  export { useAuth } from "./auth/hooks/useAuth";
20
22
  export { deserializeTransaction } from "./auth/providers/sol/sol-utils";
@@ -165,6 +165,15 @@ class OffchainAuthProvider {
165
165
  }
166
166
  return null;
167
167
  }
168
+ // Forward per-call login overrides (theme/title/subtitle and the `method`
169
+ // directive) to the wrapped provider. Without this, the top-level login()
170
+ // forwarder (which duck-types `setLoginOverrides` on the active provider)
171
+ // skips the wrapper and the override — including `method` — is dropped on
172
+ // offchain/Poofnet builds.
173
+ setLoginOverrides(opts) {
174
+ var _a, _b;
175
+ (_b = (_a = this.wrappedProvider).setLoginOverrides) === null || _b === void 0 ? void 0 : _b.call(_a, opts);
176
+ }
168
177
  async logout() {
169
178
  await this.wrappedProvider.logout();
170
179
  }
@@ -198,6 +207,15 @@ class OffchainAuthProvider {
198
207
  async getNativeMethods() {
199
208
  return this.wrappedProvider.getNativeMethods();
200
209
  }
210
+ // Forward wallet export to the wrapped provider (only Privy embedded wallets
211
+ // implement it). Duck-typed so wrappers around non-embedded providers throw
212
+ // a clear error rather than a "not a function" crash.
213
+ async exportWallet(address) {
214
+ if (typeof this.wrappedProvider.exportWallet !== 'function') {
215
+ throw new Error('Wallet export is not available for this wallet.');
216
+ }
217
+ await this.wrappedProvider.exportWallet(address);
218
+ }
201
219
  // ============ signMessage delegates to wrapped provider ============
202
220
  async signMessage(message) {
203
221
  var _a, _b, _c, _d, _e, _f;
@@ -4864,7 +4882,7 @@ function useAuth() {
4864
4882
  // Provide a fallback so server render doesn't break
4865
4883
  if (isSSR) {
4866
4884
  return {
4867
- login: async () => undefined,
4885
+ login: async (_options) => undefined,
4868
4886
  logout: async () => undefined,
4869
4887
  loading: true,
4870
4888
  user: null,
@@ -4886,10 +4904,10 @@ function useAuth() {
4886
4904
  stopLoading();
4887
4905
  };
4888
4906
  }, []);
4889
- const login$1 = async () => {
4907
+ const login$1 = async (options) => {
4890
4908
  try {
4891
4909
  setLoading(true);
4892
- const user = await login();
4910
+ const user = await login(options);
4893
4911
  setUser(user);
4894
4912
  }
4895
4913
  catch (error) {
@@ -5327,6 +5345,14 @@ class PrivyExpoProvider {
5327
5345
  }
5328
5346
  }
5329
5347
 
5348
+ Object.defineProperty(exports, "BoundedDeclineError", {
5349
+ enumerable: true,
5350
+ get: function () { return core.BoundedDeclineError; }
5351
+ });
5352
+ Object.defineProperty(exports, "DECLINE_EVENT_NAME", {
5353
+ enumerable: true,
5354
+ get: function () { return core.DECLINE_EVENT_NAME; }
5355
+ });
5330
5356
  Object.defineProperty(exports, "aggregate", {
5331
5357
  enumerable: true,
5332
5358
  get: function () { return core.aggregate; }
@@ -5335,6 +5361,14 @@ Object.defineProperty(exports, "count", {
5335
5361
  enumerable: true,
5336
5362
  get: function () { return core.count; }
5337
5363
  });
5364
+ Object.defineProperty(exports, "deriveDecline", {
5365
+ enumerable: true,
5366
+ get: function () { return core.deriveDecline; }
5367
+ });
5368
+ Object.defineProperty(exports, "dispatchDeclineEvent", {
5369
+ enumerable: true,
5370
+ get: function () { return core.dispatchDeclineEvent; }
5371
+ });
5338
5372
  Object.defineProperty(exports, "docId", {
5339
5373
  enumerable: true,
5340
5374
  get: function () { return core.docId; }