@pollar/core 0.7.1 → 0.8.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.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { S as Storage, O as OnStorageDegrade } from './types-DqgJIJBl.mjs';
2
2
  export { a as StorageDegradeReason } from './types-DqgJIJBl.mjs';
3
+ import { V as VisibilityProvider } from './types-84G_htcn.mjs';
3
4
  import * as openapi_fetch from 'openapi-fetch';
4
5
 
5
6
  type StellarNetwork = 'mainnet' | 'testnet';
@@ -219,6 +220,14 @@ interface PollarClientConfig {
219
220
  * additional wallets without bundling those dependencies into `@pollar/core`.
220
221
  */
221
222
  walletAdapter?: WalletAdapterResolver;
223
+ /**
224
+ * Maximum time (ms) the SDK waits for a `walletAdapter` resolver to return.
225
+ * Guards against a broken extension bridge (e.g. Freighter content-script
226
+ * down) hanging the login flow forever. The resolver only constructs the
227
+ * adapter object — it does NOT include the user-facing approval step — so
228
+ * a few seconds is plenty. Defaults to 5000.
229
+ */
230
+ walletResolverTimeoutMs?: number;
222
231
  /**
223
232
  * Optional human-friendly label sent at /auth/login time and recorded on
224
233
  * the server-side refresh-token row so the user can identify it in the
@@ -226,6 +235,66 @@ interface PollarClientConfig {
226
235
  * If unset, the server-recorded `user_agent` header is the fallback.
227
236
  */
228
237
  deviceLabel?: string;
238
+ /**
239
+ * Foreground-detection signal for the silent-refresh scheduler. When the
240
+ * app is hidden / backgrounded, scheduled refreshes are skipped (saves
241
+ * network + sidesteps browser/RN background timer throttling); they run
242
+ * the moment visibility comes back. Defaults to a web provider in the
243
+ * browser (`visibilitychange` + BFCache + focus) and a noop elsewhere.
244
+ * React Native consumers should inject an `AppState`-backed provider —
245
+ * see TODO on `VisibilityProvider`.
246
+ */
247
+ visibilityProvider?: VisibilityProvider;
248
+ /**
249
+ * If set, the silent-refresh scheduler stops issuing proactive refreshes
250
+ * after this many milliseconds of no client-side HTTP activity. The
251
+ * session is not cleared — the next user action triggers a request that
252
+ * either reuses a still-valid access token or hits 401 → reactive
253
+ * refresh (transparent if the RT is still valid). Defaults to
254
+ * `undefined` = refresh forever as long as the app is visible.
255
+ */
256
+ maxIdleMs?: number;
257
+ /**
258
+ * Strategy for opening the hosted OAuth URL during
259
+ * `login({ provider: 'google' | 'github' })`. Defaults to a browser popup
260
+ * on web. React Native consumers MUST provide one (typically wrapping
261
+ * `expo-web-browser`'s `openAuthSessionAsync`), since `window.open` does
262
+ * not exist there. The SDK still drives the rest of the flow by polling the
263
+ * auth-session status, so the opener only needs to surface the URL — it does
264
+ * NOT need to capture the redirect payload.
265
+ */
266
+ openAuthUrl?: AuthUrlOpener;
267
+ /**
268
+ * Value sent to the backend as `redirect_uri` for hosted OAuth (where the
269
+ * provider returns the user afterwards). Defaults to `window.location.origin`
270
+ * on web. On React Native set this to your app's deep link / scheme — the
271
+ * same URL you pass to `WebBrowser.openAuthSessionAsync`.
272
+ */
273
+ oauthRedirectUri?: string;
274
+ }
275
+ /**
276
+ * Strategy for opening the hosted OAuth URL. The SDK mints the per-login auth
277
+ * session lazily inside `getUrl()` (call it once; the first call creates the
278
+ * `clientSessionId` and returns the full URL, or `null` if session creation
279
+ * failed). Open the resolved URL however the platform allows — a popup on web,
280
+ * `WebBrowser.openAuthSessionAsync(url, redirectUri)` on React Native — and
281
+ * resolve once the user-facing browser step is done or dismissed. You do NOT
282
+ * need to capture the redirect payload: the SDK polls the auth-session status
283
+ * until the backend marks it READY.
284
+ */
285
+ type AuthUrlOpener = (ctx: AuthOpenContext) => void | Promise<void>;
286
+ interface AuthOpenContext {
287
+ provider: 'google' | 'github';
288
+ /**
289
+ * Mints the auth session (once) and returns the full hosted-OAuth URL, or
290
+ * `null` if session creation failed. On web, call it AFTER reserving the
291
+ * popup window so popup blockers (which only honor `window.open` inside the
292
+ * original user-gesture tick) don't swallow it.
293
+ */
294
+ getUrl: () => Promise<string | null>;
295
+ /** The redirect target passed to the backend as `redirect_uri`. */
296
+ redirectUri: string;
297
+ signal: AbortSignal;
229
298
  }
230
299
  /**
231
300
  * One row in the active-sessions list (returned by `PollarClient.listSessions()`).
@@ -245,6 +314,13 @@ type TxBuildBody = NonNullable<paths['/tx/build']['post']['requestBody']>['conte
245
314
  type TxBuildResponse = paths['/tx/build']['post']['responses'][200]['content']['application/json'];
246
315
  type TxSignAndSendBody = NonNullable<paths['/tx/sign-and-send']['post']['requestBody']>['content']['application/json'];
247
316
  type TxSignSendResponse = paths['/tx/sign-and-send']['post']['responses'][200]['content']['application/json'];
317
+ type TxSignBody = NonNullable<paths['/tx/sign']['post']['requestBody']>['content']['application/json'];
318
+ type TxSignResponse = paths['/tx/sign']['post']['responses'][200]['content']['application/json'];
319
+ type TxSignContent = TxSignResponse['content'];
320
+ type TxSubmitSignedBody = NonNullable<paths['/tx/submit']['post']['requestBody']>['content']['application/json'];
321
+ type TxBuildSignSubmitBody = NonNullable<paths['/tx/build-sign-submit']['post']['requestBody']>['content']['application/json'];
322
+ type TxBuildSignSubmitResponse = paths['/tx/build-sign-submit']['post']['responses'][200]['content']['application/json'];
323
+ type TxBuildSignSubmitContent = TxBuildSignSubmitResponse['content'];
248
324
  type PollarLoginOptions = {
249
325
  provider: 'google';
250
326
  } | {
@@ -257,6 +333,28 @@ type PollarLoginOptions = {
257
333
  type: WalletId;
258
334
  };
259
335
  type TxBuildContent = TxBuildResponse['content'];
336
+ /**
337
+ * Phases the SDK can be in across the build → sign → submit lifecycle.
338
+ *
339
+ * **Granular** steps (`building`, `signing`, `submitting`) are emitted when
340
+ * the SDK can directly observe that phase — i.e. when each is a separate
341
+ * client-driven call (`buildTx`, `signTx`, `submitTx`, external-wallet
342
+ * `signAndSubmitTx`).
343
+ *
344
+ * **Compound** steps (`signing-submitting`, `building-signing-submitting`)
345
+ * are emitted when multiple phases collapse into a single opaque backend
346
+ * round-trip (`signAndSubmitTx` custodial → `/tx/sign-and-send`, and `runTx`
347
+ * / `buildAndSignAndSubmitTx` custodial → `/tx/build-sign-submit`). The SDK
348
+ * can't see when one phase ends and the next begins inside that request, so
349
+ * it honestly reports a single fused state instead of fabricating
350
+ * transitions.
351
+ *
352
+ * **Terminal states** (`success`, `error`) and the post-Horizon-ack pending
353
+ * state (`submitted`) are shared across all paths.
354
+ *
355
+ * On `error`, the `phase` discriminator tells the consumer *where* the
356
+ * failure happened so modal UIs can offer "retry from this step" buttons.
357
+ */
260
358
  type TransactionState = {
261
359
  step: 'idle';
262
360
  } | {
@@ -267,20 +365,84 @@ type TransactionState = {
267
365
  } | {
268
366
  step: 'signing';
269
367
  buildData?: TxBuildContent;
270
- external?: true;
368
+ } | {
369
+ step: 'signed';
370
+ buildData?: TxBuildContent;
371
+ signedXdr: string;
372
+ submissionToken?: string;
373
+ } | {
374
+ step: 'submitting';
375
+ buildData?: TxBuildContent;
376
+ signedXdr?: string;
377
+ } | {
378
+ step: 'signing-submitting';
379
+ buildData?: TxBuildContent;
380
+ } | {
381
+ step: 'building-signing-submitting';
382
+ } | {
383
+ step: 'submitted';
384
+ buildData?: TxBuildContent;
385
+ hash: string;
271
386
  } | {
272
387
  step: 'success';
273
388
  buildData?: TxBuildContent;
274
389
  hash: string;
275
- external?: true;
276
390
  } | {
277
391
  step: 'error';
392
+ phase: TxErrorPhase;
278
393
  details?: string;
279
394
  buildData?: TxBuildContent;
280
- external?: true;
395
+ signedXdr?: string;
396
+ };
397
+ /**
398
+ * Identifies which phase failed when `TransactionState.step === 'error'`.
399
+ * Compound phase names (`signing-submitting`, `building-signing-submitting`)
400
+ * appear here when the failure happened inside an atomic backend call where
401
+ * the SDK can't isolate the failing sub-phase.
402
+ */
403
+ type TxErrorPhase = 'building' | 'signing' | 'submitting' | 'signing-submitting' | 'building-signing-submitting';
404
+ /**
405
+ * Per-call outcomes returned by `buildTx`, `signTx`, `submitTx`,
406
+ * `signAndSubmitTx`, and `buildAndSignAndSubmitTx`. These are additive to
407
+ * `TransactionState` — the same operations still drive the state machine for
408
+ * modal-style UIs, but headless callers can `await` the method and inspect
409
+ * the returned outcome directly instead of subscribing to state changes.
410
+ */
411
+ type BuildOutcome = {
412
+ status: 'built';
413
+ buildData: TxBuildContent;
414
+ } | {
415
+ status: 'error';
416
+ details?: string;
417
+ };
418
+ type SignOutcome = {
419
+ status: 'signed';
420
+ signedXdr: string;
421
+ submissionToken?: string;
422
+ expiresAt?: number;
423
+ } | {
424
+ status: 'error';
425
+ details?: string;
426
+ };
427
+ type SubmitOutcome = {
428
+ status: 'success';
429
+ hash: string;
430
+ buildData?: TxBuildContent;
431
+ } | {
432
+ status: 'pending';
433
+ hash: string;
434
+ buildData?: TxBuildContent;
435
+ } | {
436
+ status: 'error';
437
+ hash?: string;
438
+ details?: string;
439
+ resultCode?: string;
440
+ buildData?: TxBuildContent;
281
441
  };
282
442
  declare const AUTH_ERROR_CODES: {
283
443
  readonly SESSION_CREATE_FAILED: "SESSION_CREATE_FAILED";
444
+ readonly SESSION_EXPIRED: "SESSION_EXPIRED";
445
+ readonly SESSION_INVALID: "SESSION_INVALID";
284
446
  readonly EMAIL_SEND_FAILED: "EMAIL_SEND_FAILED";
285
447
  readonly EMAIL_VERIFY_FAILED: "EMAIL_VERIFY_FAILED";
286
448
  readonly EMAIL_CODE_EXPIRED: "EMAIL_CODE_EXPIRED";
@@ -288,6 +450,7 @@ declare const AUTH_ERROR_CODES: {
288
450
  readonly AUTH_FAILED: "AUTH_FAILED";
289
451
  readonly WALLET_CONNECT_FAILED: "WALLET_CONNECT_FAILED";
290
452
  readonly WALLET_AUTH_FAILED: "WALLET_AUTH_FAILED";
453
+ readonly WALLET_RESOLVER_TIMEOUT: "WALLET_RESOLVER_TIMEOUT";
291
454
  readonly UNEXPECTED_ERROR: "UNEXPECTED_ERROR";
292
455
  };
293
456
  type AuthErrorCode = (typeof AUTH_ERROR_CODES)[keyof typeof AUTH_ERROR_CODES];
@@ -451,6 +614,13 @@ declare class PollarClient {
451
614
  /** Optional UI label sent to the server at /auth/login so the sessions UI
452
615
  * can show a recognizable device name. Set via PollarClientConfig.deviceLabel. */
453
616
  private readonly _deviceLabel;
617
+ private readonly _visibilityProvider;
618
+ private readonly _maxIdleMs;
619
+ /** Updated by the request middleware. Read by the silent-refresh scheduler
620
+ * to skip proactive refreshes after `maxIdleMs` of no HTTP activity. */
621
+ private _lastRequestAt;
622
+ private _refreshTimer;
623
+ private _visibilityUnsubscribe;
454
624
  private _transactionState;
455
625
  private _transactionStateListeners;
456
626
  private _txHistoryState;
@@ -461,9 +631,23 @@ declare class PollarClient {
461
631
  private _authStateListeners;
462
632
  private _networkState;
463
633
  private _networkStateListeners;
634
+ /**
635
+ * Latched once the storage adapter degrades. We dedupe (the adapter only
636
+ * fires once anyway) and use it to replay state to late-subscribers — same
637
+ * pattern as `onAuthStateChange` replaying `_authState` on subscribe.
638
+ * Only populated when the SDK constructed the default storage adapter; if
639
+ * the consumer passes `config.storage`, they own degradation notifications.
640
+ */
641
+ private _storageDegraded;
642
+ private _storageDegradeListeners;
464
643
  private _walletAdapter;
465
644
  private readonly _walletAdapterResolver;
645
+ private readonly _walletResolverTimeoutMs;
466
646
  private _loginController;
647
+ /** Platform strategy for opening the hosted-OAuth URL (popup on web; injected on RN). */
648
+ private readonly _openAuthUrl;
649
+ /** `redirect_uri` sent to the backend for hosted OAuth. */
650
+ private readonly _oauthRedirectUri;
467
651
  constructor(config: PollarClientConfig);
468
652
  /** Awaitable handle for the initial keypair + session restore. */
469
653
  ready(): Promise<void>;
@@ -479,8 +663,54 @@ declare class PollarClient {
479
663
  */
480
664
  refresh(): Promise<void>;
481
665
  private _doRefresh;
666
+ /**
667
+ * Arm a single setTimeout to fire shortly before the current access token
668
+ * expires. Idempotent — clearing any previous timer first. Safe to call
669
+ * from any session-write site (initial login, restore-from-storage, after
670
+ * a successful rotation). No-op if there's no session in memory.
671
+ *
672
+ * Browser/RN background-tab throttling makes long-running setTimeouts
673
+ * unreliable on their own; the `visibilitychange` listener compensates by
674
+ * re-invoking `_maybeProactiveRefresh` whenever the app comes back to the
675
+ * foreground, catching any timer that fired late or never fired at all.
676
+ */
677
+ private _scheduleNextRefresh;
678
+ /**
679
+ * Decide whether to actually run a refresh right now. Called both from the
680
+ * scheduler timer and from the visibility-change listener.
681
+ *
682
+ * Skip if:
683
+ * - no session / no RT (nothing to refresh)
684
+ * - app is hidden — wait for the visibility listener to re-trigger us
685
+ * - `maxIdleMs` configured and no client request since that window — let
686
+ * the next reactive 401-refresh handle it whenever the user comes back
687
+ * - the AT still has more than `REFRESH_SKEW_SECONDS` of life — reschedule
688
+ *
689
+ * Otherwise call `refresh()`, which uses the existing in-flight singleton
690
+ * so we never collide with a reactive 401-triggered refresh. On failure,
691
+ * `_doRefresh` already calls `_clearSession`, so auth-state listeners see
692
+ * `step:'idle'` — no extra event dispatch needed here.
693
+ */
694
+ private _maybeProactiveRefresh;
695
+ private _clearRefreshTimer;
482
696
  getAuthState(): AuthState;
483
697
  onAuthStateChange(cb: (state: AuthState) => void): () => void;
698
+ /**
699
+ * Subscribe to persistent-storage degradation (Safari private mode,
700
+ * sandboxed iframes, quota errors, etc.). The SDK keeps running off
701
+ * in-memory storage after degrade, but sessions won't survive reload — a
702
+ * host UI typically wants to show "your session won't be saved" so the
703
+ * user isn't blindsided after a refresh.
704
+ *
705
+ * Fires at most once per client lifetime (the underlying adapter dedupes).
706
+ * Late subscribers receive the latched state synchronously on subscribe.
707
+ *
708
+ * Only fires when the SDK constructs the default storage adapter. If you
709
+ * pass a custom `config.storage`, wire your own notification path through
710
+ * that adapter's API — the SDK has no hook into it.
711
+ */
712
+ onStorageDegrade(cb: OnStorageDegrade): () => void;
713
+ private _dispatchStorageDegrade;
484
714
  /** PII (email, names, avatar, providers). Held in memory only — never persisted. */
485
715
  getUserProfile(): PollarUserProfile | null;
486
716
  login(options: PollarLoginOptions): void;
@@ -529,9 +759,81 @@ declare class PollarClient {
529
759
  getWalletBalanceState(): WalletBalanceState;
530
760
  onWalletBalanceStateChange(cb: (state: WalletBalanceState) => void): () => void;
531
761
  refreshBalance(publicKey?: string): Promise<void>;
532
- buildTx(operation: TxBuildBody['operation'], params: TxBuildBody['params'], options?: TxBuildBody['options']): Promise<void>;
762
+ /**
763
+ * Builds an unsigned XDR. Drives `_setTransactionState` for modal-style UIs
764
+ * AND returns a {@link BuildOutcome} so headless callers can `await` and
765
+ * inspect the result without subscribing to state changes.
766
+ */
767
+ buildTx(operation: TxBuildBody['operation'], params: TxBuildBody['params'], options?: TxBuildBody['options']): Promise<BuildOutcome>;
533
768
  getWalletType(): WalletId | null;
534
- signAndSubmitTx(unsignedXdr: string): Promise<void>;
769
+ /**
770
+ * Signs the given unsigned XDR and returns the signed XDR.
771
+ *
772
+ * - External wallets: signs locally via the wallet adapter.
773
+ * - Custodial wallets: posts to `/tx/sign`. The backend signs (through
774
+ * wallet-service or the app's customer-managed adapter) and returns the
775
+ * signed XDR plus an `idempotencyKey` the caller should echo back to
776
+ * `submitTx`.
777
+ *
778
+ * Drives `_setTransactionState`: emits `signing` while in flight and
779
+ * `signed` on success (or `error[phase: 'signing']` on failure). `buildData`
780
+ * is threaded through if the consumer previously called `buildTx`.
781
+ */
782
+ signTx(unsignedXdr: string): Promise<SignOutcome>;
783
+ /**
784
+ * Submits a signed XDR via `/tx/submit` regardless of wallet type
785
+ * (custodial or external). Routing through sdk-api gives us:
786
+ * - End-to-end tx_records persistence with full phase lifecycle so the
787
+ * developer dashboard can show every tx (both custodial and external
788
+ * wallet flows) at `/apps/:id/monitor/transactions`.
789
+ * - Idempotency tracking via `submissionToken` (returned by `signTx`).
790
+ * - A single response shape (SUCCESS / PENDING / FAILED) shared by both
791
+ * flows — previously external wallets could only return SUCCESS or
792
+ * error since the direct-to-Horizon path was synchronous.
793
+ *
794
+ * The extra hop adds ~50–150 ms vs. the legacy direct-Horizon path; the
795
+ * persistence + observability win is worth it.
796
+ *
797
+ * Drives `_setTransactionState`: emits `submitting` while in flight,
798
+ * `submitted` on Horizon ack (pending), `success` on ledger confirmation,
799
+ * or `error[phase: 'submitting']` on failure.
800
+ */
801
+ submitTx(signedXdr: string, opts?: {
802
+ submissionToken?: string;
803
+ }): Promise<SubmitOutcome>;
804
+ /**
805
+ * Signs and submits in one logical step. Returns a {@link SubmitOutcome}.
806
+ *
807
+ * - **External wallets**: composes `signTx` + `submitTx` client-side. State
808
+ * machine sees the full granular sequence `signing → signed → submitting
809
+ * → success` because the underlying methods each emit.
810
+ * - **Custodial wallets**: atomic `/tx/sign-and-send` round-trip. State
811
+ * machine emits the compound `signing-submitting` step (the SDK can't
812
+ * observe when one phase ends and the next begins inside that single
813
+ * backend call) and then transitions to `submitted` (Horizon ack only) or
814
+ * `success` (ledger-confirmed), or `error[phase: 'signing-submitting']`.
815
+ */
816
+ signAndSubmitTx(unsignedXdr: string): Promise<SubmitOutcome>;
817
+ /**
818
+ * One-shot: build → sign → submit, returning the final {@link SubmitOutcome}.
819
+ *
820
+ * - **External wallets**: composes `buildTx` + `signAndSubmitTx` client-side.
821
+ * State machine sees the full granular sequence (`building → built →
822
+ * signing → signed → submitting → success`) because each composed call
823
+ * emits its own transitions.
824
+ * - **Custodial wallets**: single round-trip to `/tx/build-sign-submit`. The
825
+ * signed XDR never leaves the backend. State machine emits the compound
826
+ * `building-signing-submitting` step (the SDK can't observe individual
827
+ * phase boundaries inside one atomic call) and then transitions to
828
+ * `submitted` / `success` / `error[phase: 'building-signing-submitting']`.
829
+ *
830
+ * If you need granular UI feedback for custodial flows (separate
831
+ * "Building…", "Signing…", "Submitting…" indicators), call `buildTx`,
832
+ * `signTx`, and `submitTx` separately instead.
833
+ */
834
+ buildAndSignAndSubmitTx(operation: TxBuildBody['operation'], params: TxBuildBody['params'], options?: TxBuildBody['options']): Promise<SubmitOutcome>;
835
+ /** Alias for {@link buildAndSignAndSubmitTx} — shorter "just do the thing" name. */
836
+ runTx(operation: TxBuildBody['operation'], params: TxBuildBody['params'], options?: TxBuildBody['options']): Promise<SubmitOutcome>;
535
837
  getAppConfig(): Promise<unknown>;
536
838
  getKycStatus(providerId?: string): Promise<{
537
839
  status: KycStatus;
@@ -587,6 +889,13 @@ declare class PollarClient {
587
889
  private _setNetworkState;
588
890
  private _setAuthState;
589
891
  private _setTransactionState;
892
+ /**
893
+ * Threads `buildData` through state transitions. When the user has already
894
+ * called `buildTx`, every subsequent state (signing, signed, submitting,
895
+ * submitted, success, error) should carry the build summary so modal UIs
896
+ * can keep showing "Send 5 USDC to G..." through the whole flow.
897
+ */
898
+ private _currentBuildData;
590
899
  }
591
900
 
592
901
  /**
@@ -825,6 +1134,26 @@ interface paths {
825
1134
  patch?: never;
826
1135
  trace?: never;
827
1136
  };
1137
+ "/auth/session/status/{clientSessionId}/poll": {
1138
+ parameters: {
1139
+ query?: never;
1140
+ header?: never;
1141
+ path?: never;
1142
+ cookie?: never;
1143
+ };
1144
+ /**
1145
+ * Poll client session status (non-streaming)
1146
+ * @description One-shot JSON variant of the SSE status stream, for clients without fetch response-body streaming (React Native). Returns the current `{status, user.ready}` immediately. Poll until `status` reaches a ready/consumed state.
1147
+ */
1148
+ get: operations["getAuthSessionStatusByClientSessionIdPoll"];
1149
+ put?: never;
1150
+ post?: never;
1151
+ delete?: never;
1152
+ options?: never;
1153
+ head?: never;
1154
+ patch?: never;
1155
+ trace?: never;
1156
+ };
828
1157
  "/auth/google": {
829
1158
  parameters: {
830
1159
  query?: never;
@@ -1113,6 +1442,66 @@ interface paths {
1113
1442
  patch?: never;
1114
1443
  trace?: never;
1115
1444
  };
1445
+ "/tx/sign": {
1446
+ parameters: {
1447
+ query?: never;
1448
+ header?: never;
1449
+ path?: never;
1450
+ cookie?: never;
1451
+ };
1452
+ get?: never;
1453
+ put?: never;
1454
+ /**
1455
+ * Sign an unsigned XDR (split flow)
1456
+ * @description Sign-only step of the split build/sign/submit flow. For custodial wallets, the signed XDR is returned to the caller so it can be submitted later via POST /tx/submit. External wallets sign client-side and do not call this endpoint.
1457
+ */
1458
+ post: operations["postTxSign"];
1459
+ delete?: never;
1460
+ options?: never;
1461
+ head?: never;
1462
+ patch?: never;
1463
+ trace?: never;
1464
+ };
1465
+ "/tx/submit": {
1466
+ parameters: {
1467
+ query?: never;
1468
+ header?: never;
1469
+ path?: never;
1470
+ cookie?: never;
1471
+ };
1472
+ get?: never;
1473
+ put?: never;
1474
+ /**
1475
+ * Submit a pre-signed XDR
1476
+ * @description Submit step of the split build/sign/submit flow. Accepts a signed XDR produced by /tx/sign or signed client-side by an external wallet (Freighter/Albedo/SWK). Routing is custody-aware: EXTERNAL (user-controlled) wallets and adapter-signed wallets are broadcast directly via Soroban RPC, since wallet-service holds no record of them; custodial wallets go through wallet-service /v1/tx/submit so the submission is policy-validated and idempotency-tracked. The EXTERNAL signal is per-user, so apps mixing social login and wallet login submit each user correctly. All paths return the same PENDING | SUCCESS | FAILED outcome.
1477
+ */
1478
+ post: operations["postTxSubmit"];
1479
+ delete?: never;
1480
+ options?: never;
1481
+ head?: never;
1482
+ patch?: never;
1483
+ trace?: never;
1484
+ };
1485
+ "/tx/build-sign-submit": {
1486
+ parameters: {
1487
+ query?: never;
1488
+ header?: never;
1489
+ path?: never;
1490
+ cookie?: never;
1491
+ };
1492
+ get?: never;
1493
+ put?: never;
1494
+ /**
1495
+ * Atomic build + sign + submit (one round-trip)
1496
+ * @description Server-side composition of /tx/build + /tx/sign + /tx/submit. The signed XDR never leaves the backend. Use for headless / server-driven flows that do not need intermediate state-machine transitions on the client.
1497
+ */
1498
+ post: operations["postTxBuildSignSubmit"];
1499
+ delete?: never;
1500
+ options?: never;
1501
+ head?: never;
1502
+ patch?: never;
1503
+ trace?: never;
1504
+ };
1116
1505
  "/tx/status": {
1117
1506
  parameters: {
1118
1507
  query?: never;
@@ -1153,6 +1542,46 @@ interface paths {
1153
1542
  patch?: never;
1154
1543
  trace?: never;
1155
1544
  };
1545
+ "/charges": {
1546
+ parameters: {
1547
+ query?: never;
1548
+ header?: never;
1549
+ path?: never;
1550
+ cookie?: never;
1551
+ };
1552
+ get?: never;
1553
+ put?: never;
1554
+ /**
1555
+ * Create a charge
1556
+ * @description Creates a Pollar Pay point-of-sale charge for one of the application branches. Reserves a pool wallet (the address the customer pays to) and returns the payment intent.
1557
+ */
1558
+ post: operations["postCharges"];
1559
+ delete?: never;
1560
+ options?: never;
1561
+ head?: never;
1562
+ patch?: never;
1563
+ trace?: never;
1564
+ };
1565
+ "/charges/{id}": {
1566
+ parameters: {
1567
+ query?: never;
1568
+ header?: never;
1569
+ path?: never;
1570
+ cookie?: never;
1571
+ };
1572
+ /**
1573
+ * Get charge status
1574
+ * @description Returns the live status of a charge. A pending charge past its window reads as expired.
1575
+ */
1576
+ get: operations["getChargesById"];
1577
+ put?: never;
1578
+ post?: never;
1579
+ delete?: never;
1580
+ options?: never;
1581
+ head?: never;
1582
+ patch?: never;
1583
+ trace?: never;
1584
+ };
1156
1585
  "/wallet/balance": {
1157
1586
  parameters: {
1158
1587
  query?: never;
@@ -1420,7 +1849,7 @@ interface operations {
1420
1849
  "application/json": {
1421
1850
  /** @constant */
1422
1851
  success: false;
1423
- error: string;
1852
+ code: string;
1424
1853
  };
1425
1854
  };
1426
1855
  };
@@ -1433,7 +1862,7 @@ interface operations {
1433
1862
  "application/json": {
1434
1863
  /** @constant */
1435
1864
  success: false;
1436
- error: string;
1865
+ code: string;
1437
1866
  };
1438
1867
  };
1439
1868
  };
@@ -1446,7 +1875,7 @@ interface operations {
1446
1875
  "application/json": {
1447
1876
  /** @constant */
1448
1877
  success: false;
1449
- error: string;
1878
+ code: string;
1450
1879
  };
1451
1880
  };
1452
1881
  };
@@ -1479,6 +1908,65 @@ interface operations {
1479
1908
  };
1480
1909
  };
1481
1910
  };
1911
+ getAuthSessionStatusByClientSessionIdPoll: {
1912
+ parameters: {
1913
+ query?: never;
1914
+ header?: never;
1915
+ path: {
1916
+ clientSessionId: string;
1917
+ };
1918
+ cookie?: never;
1919
+ };
1920
+ requestBody?: never;
1921
+ responses: {
1922
+ /** @description Current session status */
1923
+ 200: {
1924
+ headers: {
1925
+ [name: string]: unknown;
1926
+ };
1927
+ content: {
1928
+ "application/json": {
1929
+ /** @constant */
1930
+ code: "SDK_SESSION_STATUS";
1931
+ /** @constant */
1932
+ success: true;
1933
+ content: {
1934
+ status: string;
1935
+ user: {
1936
+ ready: boolean;
1937
+ };
1938
+ };
1939
+ };
1940
+ };
1941
+ };
1942
+ /** @description Not found */
1943
+ 404: {
1944
+ headers: {
1945
+ [name: string]: unknown;
1946
+ };
1947
+ content: {
1948
+ "application/json": {
1949
+ /** @constant */
1950
+ success: false;
1951
+ code: string;
1952
+ };
1953
+ };
1954
+ };
1955
+ /** @description Gone (expired) */
1956
+ 410: {
1957
+ headers: {
1958
+ [name: string]: unknown;
1959
+ };
1960
+ content: {
1961
+ "application/json": {
1962
+ /** @constant */
1963
+ success: false;
1964
+ code: string;
1965
+ };
1966
+ };
1967
+ };
1968
+ };
1969
+ };
1482
1970
  getAuthGoogle: {
1483
1971
  parameters: {
1484
1972
  query: {
@@ -1508,7 +1996,7 @@ interface operations {
1508
1996
  "application/json": {
1509
1997
  /** @constant */
1510
1998
  success: false;
1511
- error: string;
1999
+ code: string;
1512
2000
  };
1513
2001
  };
1514
2002
  };
@@ -1521,7 +2009,7 @@ interface operations {
1521
2009
  "application/json": {
1522
2010
  /** @constant */
1523
2011
  success: false;
1524
- error: string;
2012
+ code: string;
1525
2013
  };
1526
2014
  };
1527
2015
  };
@@ -1534,7 +2022,7 @@ interface operations {
1534
2022
  "application/json": {
1535
2023
  /** @constant */
1536
2024
  success: false;
1537
- error: string;
2025
+ code: string;
1538
2026
  };
1539
2027
  };
1540
2028
  };
@@ -1547,7 +2035,7 @@ interface operations {
1547
2035
  "application/json": {
1548
2036
  /** @constant */
1549
2037
  success: false;
1550
- error: string;
2038
+ code: string;
1551
2039
  };
1552
2040
  };
1553
2041
  };
@@ -1582,7 +2070,7 @@ interface operations {
1582
2070
  "application/json": {
1583
2071
  /** @constant */
1584
2072
  success: false;
1585
- error: string;
2073
+ code: string;
1586
2074
  };
1587
2075
  };
1588
2076
  };
@@ -1595,7 +2083,7 @@ interface operations {
1595
2083
  "application/json": {
1596
2084
  /** @constant */
1597
2085
  success: false;
1598
- error: string;
2086
+ code: string;
1599
2087
  };
1600
2088
  };
1601
2089
  };
@@ -1608,7 +2096,7 @@ interface operations {
1608
2096
  "application/json": {
1609
2097
  /** @constant */
1610
2098
  success: false;
1611
- error: string;
2099
+ code: string;
1612
2100
  };
1613
2101
  };
1614
2102
  };
@@ -1621,7 +2109,7 @@ interface operations {
1621
2109
  "application/json": {
1622
2110
  /** @constant */
1623
2111
  success: false;
1624
- error: string;
2112
+ code: string;
1625
2113
  };
1626
2114
  };
1627
2115
  };
@@ -1655,7 +2143,7 @@ interface operations {
1655
2143
  "application/json": {
1656
2144
  /** @constant */
1657
2145
  success: false;
1658
- error: string;
2146
+ code: string;
1659
2147
  };
1660
2148
  };
1661
2149
  };
@@ -1668,7 +2156,7 @@ interface operations {
1668
2156
  "application/json": {
1669
2157
  /** @constant */
1670
2158
  success: false;
1671
- error: string;
2159
+ code: string;
1672
2160
  };
1673
2161
  };
1674
2162
  };
@@ -1681,7 +2169,7 @@ interface operations {
1681
2169
  "application/json": {
1682
2170
  /** @constant */
1683
2171
  success: false;
1684
- error: string;
2172
+ code: string;
1685
2173
  };
1686
2174
  };
1687
2175
  };
@@ -1731,7 +2219,7 @@ interface operations {
1731
2219
  "application/json": {
1732
2220
  /** @constant */
1733
2221
  success: false;
1734
- error: string;
2222
+ code: string;
1735
2223
  };
1736
2224
  };
1737
2225
  };
@@ -1744,7 +2232,7 @@ interface operations {
1744
2232
  "application/json": {
1745
2233
  /** @constant */
1746
2234
  success: false;
1747
- error: string;
2235
+ code: string;
1748
2236
  };
1749
2237
  };
1750
2238
  };
@@ -1757,7 +2245,7 @@ interface operations {
1757
2245
  "application/json": {
1758
2246
  /** @constant */
1759
2247
  success: false;
1760
- error: string;
2248
+ code: string;
1761
2249
  };
1762
2250
  };
1763
2251
  };
@@ -1770,7 +2258,20 @@ interface operations {
1770
2258
  "application/json": {
1771
2259
  /** @constant */
1772
2260
  success: false;
1773
- error: string;
2261
+ code: string;
2262
+ };
2263
+ };
2264
+ };
2265
+ /** @description Gone (expired) */
2266
+ 410: {
2267
+ headers: {
2268
+ [name: string]: unknown;
2269
+ };
2270
+ content: {
2271
+ "application/json": {
2272
+ /** @constant */
2273
+ success: false;
2274
+ code: string;
1774
2275
  };
1775
2276
  };
1776
2277
  };
@@ -1818,7 +2319,7 @@ interface operations {
1818
2319
  "application/json": {
1819
2320
  /** @constant */
1820
2321
  success: false;
1821
- error: string;
2322
+ code: string;
1822
2323
  };
1823
2324
  };
1824
2325
  };
@@ -1831,7 +2332,7 @@ interface operations {
1831
2332
  "application/json": {
1832
2333
  /** @constant */
1833
2334
  success: false;
1834
- error: string;
2335
+ code: string;
1835
2336
  };
1836
2337
  };
1837
2338
  };
@@ -1844,7 +2345,7 @@ interface operations {
1844
2345
  "application/json": {
1845
2346
  /** @constant */
1846
2347
  success: false;
1847
- error: string;
2348
+ code: string;
1848
2349
  };
1849
2350
  };
1850
2351
  };
@@ -1857,7 +2358,20 @@ interface operations {
1857
2358
  "application/json": {
1858
2359
  /** @constant */
1859
2360
  success: false;
1860
- error: string;
2361
+ code: string;
2362
+ };
2363
+ };
2364
+ };
2365
+ /** @description Gone (expired) */
2366
+ 410: {
2367
+ headers: {
2368
+ [name: string]: unknown;
2369
+ };
2370
+ content: {
2371
+ "application/json": {
2372
+ /** @constant */
2373
+ success: false;
2374
+ code: string;
1861
2375
  };
1862
2376
  };
1863
2377
  };
@@ -1906,7 +2420,7 @@ interface operations {
1906
2420
  "application/json": {
1907
2421
  /** @constant */
1908
2422
  success: false;
1909
- error: string;
2423
+ code: string;
1910
2424
  };
1911
2425
  };
1912
2426
  };
@@ -1919,7 +2433,7 @@ interface operations {
1919
2433
  "application/json": {
1920
2434
  /** @constant */
1921
2435
  success: false;
1922
- error: string;
2436
+ code: string;
1923
2437
  };
1924
2438
  };
1925
2439
  };
@@ -1932,7 +2446,7 @@ interface operations {
1932
2446
  "application/json": {
1933
2447
  /** @constant */
1934
2448
  success: false;
1935
- error: string;
2449
+ code: string;
1936
2450
  };
1937
2451
  };
1938
2452
  };
@@ -1945,14 +2459,27 @@ interface operations {
1945
2459
  "application/json": {
1946
2460
  /** @constant */
1947
2461
  success: false;
1948
- error: string;
2462
+ code: string;
1949
2463
  };
1950
2464
  };
1951
2465
  };
1952
- };
1953
- };
1954
- postAuthLogin: {
1955
- parameters: {
2466
+ /** @description Gone (expired) */
2467
+ 410: {
2468
+ headers: {
2469
+ [name: string]: unknown;
2470
+ };
2471
+ content: {
2472
+ "application/json": {
2473
+ /** @constant */
2474
+ success: false;
2475
+ code: string;
2476
+ };
2477
+ };
2478
+ };
2479
+ };
2480
+ };
2481
+ postAuthLogin: {
2482
+ parameters: {
1956
2483
  query?: never;
1957
2484
  header?: never;
1958
2485
  path?: never;
@@ -2037,7 +2564,7 @@ interface operations {
2037
2564
  "application/json": {
2038
2565
  /** @constant */
2039
2566
  success: false;
2040
- error: string;
2567
+ code: string;
2041
2568
  };
2042
2569
  };
2043
2570
  };
@@ -2050,7 +2577,7 @@ interface operations {
2050
2577
  "application/json": {
2051
2578
  /** @constant */
2052
2579
  success: false;
2053
- error: string;
2580
+ code: string;
2054
2581
  };
2055
2582
  };
2056
2583
  };
@@ -2063,7 +2590,7 @@ interface operations {
2063
2590
  "application/json": {
2064
2591
  /** @constant */
2065
2592
  success: false;
2066
- error: string;
2593
+ code: string;
2067
2594
  };
2068
2595
  };
2069
2596
  };
@@ -2076,7 +2603,20 @@ interface operations {
2076
2603
  "application/json": {
2077
2604
  /** @constant */
2078
2605
  success: false;
2079
- error: string;
2606
+ code: string;
2607
+ };
2608
+ };
2609
+ };
2610
+ /** @description Gone (expired) */
2611
+ 410: {
2612
+ headers: {
2613
+ [name: string]: unknown;
2614
+ };
2615
+ content: {
2616
+ "application/json": {
2617
+ /** @constant */
2618
+ success: false;
2619
+ code: string;
2080
2620
  };
2081
2621
  };
2082
2622
  };
@@ -2127,7 +2667,7 @@ interface operations {
2127
2667
  "application/json": {
2128
2668
  /** @constant */
2129
2669
  success: false;
2130
- error: string;
2670
+ code: string;
2131
2671
  };
2132
2672
  };
2133
2673
  };
@@ -2140,7 +2680,7 @@ interface operations {
2140
2680
  "application/json": {
2141
2681
  /** @constant */
2142
2682
  success: false;
2143
- error: string;
2683
+ code: string;
2144
2684
  };
2145
2685
  };
2146
2686
  };
@@ -2153,7 +2693,7 @@ interface operations {
2153
2693
  "application/json": {
2154
2694
  /** @constant */
2155
2695
  success: false;
2156
- error: string;
2696
+ code: string;
2157
2697
  };
2158
2698
  };
2159
2699
  };
@@ -2166,7 +2706,20 @@ interface operations {
2166
2706
  "application/json": {
2167
2707
  /** @constant */
2168
2708
  success: false;
2169
- error: string;
2709
+ code: string;
2710
+ };
2711
+ };
2712
+ };
2713
+ /** @description Gone (expired) */
2714
+ 410: {
2715
+ headers: {
2716
+ [name: string]: unknown;
2717
+ };
2718
+ content: {
2719
+ "application/json": {
2720
+ /** @constant */
2721
+ success: false;
2722
+ code: string;
2170
2723
  };
2171
2724
  };
2172
2725
  };
@@ -2213,7 +2766,7 @@ interface operations {
2213
2766
  "application/json": {
2214
2767
  /** @constant */
2215
2768
  success: false;
2216
- error: string;
2769
+ code: string;
2217
2770
  };
2218
2771
  };
2219
2772
  };
@@ -2263,7 +2816,7 @@ interface operations {
2263
2816
  "application/json": {
2264
2817
  /** @constant */
2265
2818
  success: false;
2266
- error: string;
2819
+ code: string;
2267
2820
  };
2268
2821
  };
2269
2822
  };
@@ -2306,7 +2859,7 @@ interface operations {
2306
2859
  "application/json": {
2307
2860
  /** @constant */
2308
2861
  success: false;
2309
- error: string;
2862
+ code: string;
2310
2863
  };
2311
2864
  };
2312
2865
  };
@@ -2319,7 +2872,7 @@ interface operations {
2319
2872
  "application/json": {
2320
2873
  /** @constant */
2321
2874
  success: false;
2322
- error: string;
2875
+ code: string;
2323
2876
  };
2324
2877
  };
2325
2878
  };
@@ -2376,7 +2929,7 @@ interface operations {
2376
2929
  "application/json": {
2377
2930
  /** @constant */
2378
2931
  success: false;
2379
- error: string;
2932
+ code: string;
2380
2933
  };
2381
2934
  };
2382
2935
  };
@@ -2389,7 +2942,7 @@ interface operations {
2389
2942
  "application/json": {
2390
2943
  /** @constant */
2391
2944
  success: false;
2392
- error: string;
2945
+ code: string;
2393
2946
  };
2394
2947
  };
2395
2948
  };
@@ -2402,7 +2955,7 @@ interface operations {
2402
2955
  "application/json": {
2403
2956
  /** @constant */
2404
2957
  success: false;
2405
- error: string;
2958
+ code: string;
2406
2959
  };
2407
2960
  };
2408
2961
  };
@@ -2437,7 +2990,7 @@ interface operations {
2437
2990
  "application/json": {
2438
2991
  /** @constant */
2439
2992
  success: false;
2440
- error: string;
2993
+ code: string;
2441
2994
  };
2442
2995
  };
2443
2996
  };
@@ -2688,7 +3241,7 @@ interface operations {
2688
3241
  "application/json": {
2689
3242
  /** @constant */
2690
3243
  success: false;
2691
- error: string;
3244
+ code: string;
2692
3245
  };
2693
3246
  };
2694
3247
  };
@@ -2701,7 +3254,7 @@ interface operations {
2701
3254
  "application/json": {
2702
3255
  /** @constant */
2703
3256
  success: false;
2704
- error: string;
3257
+ code: string;
2705
3258
  };
2706
3259
  };
2707
3260
  };
@@ -2714,7 +3267,7 @@ interface operations {
2714
3267
  "application/json": {
2715
3268
  /** @constant */
2716
3269
  success: false;
2717
- error: string;
3270
+ code: string;
2718
3271
  };
2719
3272
  };
2720
3273
  };
@@ -2768,7 +3321,7 @@ interface operations {
2768
3321
  "application/json": {
2769
3322
  /** @constant */
2770
3323
  success: false;
2771
- error: string;
3324
+ code: string;
2772
3325
  };
2773
3326
  };
2774
3327
  };
@@ -2781,25 +3334,58 @@ interface operations {
2781
3334
  "application/json": {
2782
3335
  /** @constant */
2783
3336
  success: false;
2784
- error: string;
3337
+ code: string;
3338
+ };
3339
+ };
3340
+ };
3341
+ /** @description Forbidden */
3342
+ 403: {
3343
+ headers: {
3344
+ [name: string]: unknown;
3345
+ };
3346
+ content: {
3347
+ "application/json": {
3348
+ /** @constant */
3349
+ success: false;
3350
+ code: string;
3351
+ };
3352
+ };
3353
+ };
3354
+ /** @description Signing or submission error (upstream/RPC) */
3355
+ 502: {
3356
+ headers: {
3357
+ [name: string]: unknown;
3358
+ };
3359
+ content: {
3360
+ "application/json": {
3361
+ /** @constant */
3362
+ success: false;
3363
+ code: string;
2785
3364
  };
2786
3365
  };
2787
3366
  };
2788
3367
  };
2789
3368
  };
2790
- getTxStatus: {
3369
+ postTxSign: {
2791
3370
  parameters: {
2792
- query: {
2793
- network: "testnet" | "mainnet";
2794
- hash: string;
2795
- };
3371
+ query?: never;
2796
3372
  header?: never;
2797
3373
  path?: never;
2798
3374
  cookie?: never;
2799
3375
  };
2800
- requestBody?: never;
3376
+ requestBody: {
3377
+ content: {
3378
+ "application/json": {
3379
+ /** @enum {string} */
3380
+ network: "testnet" | "mainnet";
3381
+ publicKey: string;
3382
+ unsignedXdr: string;
3383
+ idempotencyKey?: string;
3384
+ };
3385
+ };
3386
+ };
2801
3387
  responses: {
2802
- /** @description Transaction status (PENDING si no existe aún en Horizon) */
3388
+ /** @description Signed XDR + idempotency key to use with /tx/submit */
2803
3389
  200: {
2804
3390
  headers: {
2805
3391
  [name: string]: unknown;
@@ -2807,16 +3393,12 @@ interface operations {
2807
3393
  content: {
2808
3394
  "application/json": {
2809
3395
  /** @constant */
2810
- code: "SDK_TX_STATUS";
3396
+ code: "SDK_TX_SIGNED";
2811
3397
  /** @constant */
2812
3398
  success: true;
2813
3399
  content: {
2814
- hash: string;
2815
- /** @enum {string} */
2816
- status: "PENDING" | "SUCCESS" | "FAILED";
2817
- resultCode?: string;
2818
- ledger?: number;
2819
- message?: string;
3400
+ signedXdr: string;
3401
+ idempotencyKey: string;
2820
3402
  };
2821
3403
  };
2822
3404
  };
@@ -2830,7 +3412,7 @@ interface operations {
2830
3412
  "application/json": {
2831
3413
  /** @constant */
2832
3414
  success: false;
2833
- error: string;
3415
+ code: string;
2834
3416
  };
2835
3417
  };
2836
3418
  };
@@ -2843,26 +3425,58 @@ interface operations {
2843
3425
  "application/json": {
2844
3426
  /** @constant */
2845
3427
  success: false;
2846
- error: string;
3428
+ code: string;
3429
+ };
3430
+ };
3431
+ };
3432
+ /** @description Forbidden */
3433
+ 403: {
3434
+ headers: {
3435
+ [name: string]: unknown;
3436
+ };
3437
+ content: {
3438
+ "application/json": {
3439
+ /** @constant */
3440
+ success: false;
3441
+ code: string;
3442
+ };
3443
+ };
3444
+ };
3445
+ /** @description Signing error */
3446
+ 502: {
3447
+ headers: {
3448
+ [name: string]: unknown;
3449
+ };
3450
+ content: {
3451
+ "application/json": {
3452
+ /** @constant */
3453
+ success: false;
3454
+ code: string;
2847
3455
  };
2848
3456
  };
2849
3457
  };
2850
3458
  };
2851
3459
  };
2852
- getTxHistory: {
3460
+ postTxSubmit: {
2853
3461
  parameters: {
2854
- query?: {
2855
- network?: "testnet" | "mainnet";
2856
- limit?: number;
2857
- offset?: number;
2858
- };
3462
+ query?: never;
2859
3463
  header?: never;
2860
3464
  path?: never;
2861
3465
  cookie?: never;
2862
3466
  };
2863
- requestBody?: never;
3467
+ requestBody: {
3468
+ content: {
3469
+ "application/json": {
3470
+ /** @enum {string} */
3471
+ network: "testnet" | "mainnet";
3472
+ publicKey: string;
3473
+ signedXdr: string;
3474
+ idempotencyKey?: string;
3475
+ };
3476
+ };
3477
+ };
2864
3478
  responses: {
2865
- /** @description Paginated list of transactions */
3479
+ /** @description Submit result (PENDING | SUCCESS | FAILED) */
2866
3480
  200: {
2867
3481
  headers: {
2868
3482
  [name: string]: unknown;
@@ -2870,29 +3484,15 @@ interface operations {
2870
3484
  content: {
2871
3485
  "application/json": {
2872
3486
  /** @constant */
2873
- code: "SDK_TX_HISTORY";
3487
+ code: "SDK_TX_SUBMIT";
2874
3488
  /** @constant */
2875
3489
  success: true;
2876
3490
  content: {
2877
- records: {
2878
- id: string;
2879
- hash: string;
2880
- /** @enum {string} */
2881
- network: "testnet" | "mainnet";
2882
- /** @enum {string} */
2883
- status: "PENDING" | "SUCCESS" | "FAILED";
2884
- operation: string;
2885
- feeXlm?: string;
2886
- resultCode?: string;
2887
- details: {
2888
- [key: string]: unknown;
2889
- };
2890
- summary: string;
2891
- createdAt: string;
2892
- }[];
2893
- total: number;
2894
- limit: number;
2895
- offset: number;
3491
+ hash: string;
3492
+ /** @enum {string} */
3493
+ status: "PENDING" | "SUCCESS" | "FAILED";
3494
+ resultCode?: string;
3495
+ message?: string;
2896
3496
  };
2897
3497
  };
2898
3498
  };
@@ -2906,7 +3506,7 @@ interface operations {
2906
3506
  "application/json": {
2907
3507
  /** @constant */
2908
3508
  success: false;
2909
- error: string;
3509
+ code: string;
2910
3510
  };
2911
3511
  };
2912
3512
  };
@@ -2919,7 +3519,630 @@ interface operations {
2919
3519
  "application/json": {
2920
3520
  /** @constant */
2921
3521
  success: false;
2922
- error: string;
3522
+ code: string;
3523
+ };
3524
+ };
3525
+ };
3526
+ /** @description Submission error (RPC/network) */
3527
+ 502: {
3528
+ headers: {
3529
+ [name: string]: unknown;
3530
+ };
3531
+ content: {
3532
+ "application/json": {
3533
+ /** @constant */
3534
+ success: false;
3535
+ code: string;
3536
+ };
3537
+ };
3538
+ };
3539
+ };
3540
+ };
3541
+ postTxBuildSignSubmit: {
3542
+ parameters: {
3543
+ query?: never;
3544
+ header?: never;
3545
+ path?: never;
3546
+ cookie?: never;
3547
+ };
3548
+ requestBody: {
3549
+ content: {
3550
+ "application/json": {
3551
+ /** @enum {string} */
3552
+ network: "testnet" | "mainnet";
3553
+ publicKey: string;
3554
+ options?: {
3555
+ timeoutSec?: number;
3556
+ memo?: {
3557
+ /** @constant */
3558
+ type: "text";
3559
+ value: string;
3560
+ } | {
3561
+ /** @constant */
3562
+ type: "id";
3563
+ value: string;
3564
+ };
3565
+ maxFeeStroops?: number;
3566
+ };
3567
+ } & ({
3568
+ /** @constant */
3569
+ operation: "payment";
3570
+ params: {
3571
+ destination: string;
3572
+ amount: string;
3573
+ asset: {
3574
+ /** @constant */
3575
+ type: "native";
3576
+ } | {
3577
+ /** @constant */
3578
+ type: "credit_alphanum4";
3579
+ code: string;
3580
+ issuer: string;
3581
+ } | {
3582
+ /** @constant */
3583
+ type: "credit_alphanum12";
3584
+ code: string;
3585
+ issuer: string;
3586
+ };
3587
+ };
3588
+ } | {
3589
+ /** @constant */
3590
+ operation: "change_trust";
3591
+ params: {
3592
+ asset: {
3593
+ /** @constant */
3594
+ type: "credit_alphanum4";
3595
+ code: string;
3596
+ issuer: string;
3597
+ } | {
3598
+ /** @constant */
3599
+ type: "credit_alphanum12";
3600
+ code: string;
3601
+ issuer: string;
3602
+ } | {
3603
+ /** @constant */
3604
+ type: "liquidity_pool_shares";
3605
+ assetA: {
3606
+ /** @constant */
3607
+ type: "native";
3608
+ } | {
3609
+ /** @constant */
3610
+ type: "credit_alphanum4";
3611
+ code: string;
3612
+ issuer: string;
3613
+ } | {
3614
+ /** @constant */
3615
+ type: "credit_alphanum12";
3616
+ code: string;
3617
+ issuer: string;
3618
+ };
3619
+ assetB: {
3620
+ /** @constant */
3621
+ type: "native";
3622
+ } | {
3623
+ /** @constant */
3624
+ type: "credit_alphanum4";
3625
+ code: string;
3626
+ issuer: string;
3627
+ } | {
3628
+ /** @constant */
3629
+ type: "credit_alphanum12";
3630
+ code: string;
3631
+ issuer: string;
3632
+ };
3633
+ };
3634
+ limit?: string;
3635
+ };
3636
+ } | {
3637
+ /** @constant */
3638
+ operation: "path_payment_strict_send";
3639
+ params: {
3640
+ destination: string;
3641
+ sendAsset: {
3642
+ /** @constant */
3643
+ type: "native";
3644
+ } | {
3645
+ /** @constant */
3646
+ type: "credit_alphanum4";
3647
+ code: string;
3648
+ issuer: string;
3649
+ } | {
3650
+ /** @constant */
3651
+ type: "credit_alphanum12";
3652
+ code: string;
3653
+ issuer: string;
3654
+ };
3655
+ sendAmount: string;
3656
+ destAsset: {
3657
+ /** @constant */
3658
+ type: "native";
3659
+ } | {
3660
+ /** @constant */
3661
+ type: "credit_alphanum4";
3662
+ code: string;
3663
+ issuer: string;
3664
+ } | {
3665
+ /** @constant */
3666
+ type: "credit_alphanum12";
3667
+ code: string;
3668
+ issuer: string;
3669
+ };
3670
+ destMin: string;
3671
+ /** @default [] */
3672
+ path?: ({
3673
+ /** @constant */
3674
+ type: "native";
3675
+ } | {
3676
+ /** @constant */
3677
+ type: "credit_alphanum4";
3678
+ code: string;
3679
+ issuer: string;
3680
+ } | {
3681
+ /** @constant */
3682
+ type: "credit_alphanum12";
3683
+ code: string;
3684
+ issuer: string;
3685
+ })[];
3686
+ };
3687
+ } | {
3688
+ /** @constant */
3689
+ operation: "create_account";
3690
+ params: {
3691
+ destination: string;
3692
+ startingBalance: string;
3693
+ };
3694
+ } | {
3695
+ /** @constant */
3696
+ operation: "invoke_contract";
3697
+ params: {
3698
+ contractId: string;
3699
+ method: string;
3700
+ /** @default [] */
3701
+ args?: ({
3702
+ /** @constant */
3703
+ type: "bool";
3704
+ value: boolean;
3705
+ } | {
3706
+ /** @constant */
3707
+ type: "i32";
3708
+ value: number;
3709
+ } | {
3710
+ /** @constant */
3711
+ type: "u32";
3712
+ value: number;
3713
+ } | {
3714
+ /** @enum {string} */
3715
+ type: "i64" | "u64" | "i128" | "u128" | "i256" | "u256";
3716
+ value: string;
3717
+ } | {
3718
+ /** @constant */
3719
+ type: "address";
3720
+ value: string;
3721
+ } | {
3722
+ /** @enum {string} */
3723
+ type: "string" | "symbol";
3724
+ value: string;
3725
+ } | {
3726
+ /** @constant */
3727
+ type: "bytes";
3728
+ /** @description Base64-encoded bytes */
3729
+ value: string;
3730
+ } | {
3731
+ /** @constant */
3732
+ type: "vec";
3733
+ /** @description Array of ScValArg items */
3734
+ value: unknown[];
3735
+ } | {
3736
+ /** @constant */
3737
+ type: "map";
3738
+ /** @description Array of {key, val} ScValArg pairs */
3739
+ value: {
3740
+ key: unknown;
3741
+ val: unknown;
3742
+ }[];
3743
+ } | {
3744
+ /** @constant */
3745
+ type: "void";
3746
+ })[];
3747
+ };
3748
+ }) & {
3749
+ idempotencyKey?: string;
3750
+ };
3751
+ };
3752
+ };
3753
+ responses: {
3754
+ /** @description Final submit result with the original build summary */
3755
+ 200: {
3756
+ headers: {
3757
+ [name: string]: unknown;
3758
+ };
3759
+ content: {
3760
+ "application/json": {
3761
+ /** @constant */
3762
+ code: "SDK_TX_SUBMIT";
3763
+ /** @constant */
3764
+ success: true;
3765
+ content: {
3766
+ hash: string;
3767
+ /** @enum {string} */
3768
+ status: "PENDING" | "SUCCESS" | "FAILED";
3769
+ resultCode?: string;
3770
+ message?: string;
3771
+ summary: {
3772
+ title: string;
3773
+ lines: string[];
3774
+ network: string;
3775
+ fee: string;
3776
+ };
3777
+ estimatedFee: string;
3778
+ };
3779
+ };
3780
+ };
3781
+ };
3782
+ /** @description Validation error */
3783
+ 400: {
3784
+ headers: {
3785
+ [name: string]: unknown;
3786
+ };
3787
+ content: {
3788
+ "application/json": {
3789
+ /** @constant */
3790
+ success: false;
3791
+ code: string;
3792
+ };
3793
+ };
3794
+ };
3795
+ /** @description Unauthorized */
3796
+ 401: {
3797
+ headers: {
3798
+ [name: string]: unknown;
3799
+ };
3800
+ content: {
3801
+ "application/json": {
3802
+ /** @constant */
3803
+ success: false;
3804
+ code: string;
3805
+ };
3806
+ };
3807
+ };
3808
+ /** @description Build/sign/submit error */
3809
+ 502: {
3810
+ headers: {
3811
+ [name: string]: unknown;
3812
+ };
3813
+ content: {
3814
+ "application/json": {
3815
+ /** @constant */
3816
+ success: false;
3817
+ code: string;
3818
+ };
3819
+ };
3820
+ };
3821
+ };
3822
+ };
3823
+ getTxStatus: {
3824
+ parameters: {
3825
+ query: {
3826
+ network: "testnet" | "mainnet";
3827
+ hash: string;
3828
+ };
3829
+ header?: never;
3830
+ path?: never;
3831
+ cookie?: never;
3832
+ };
3833
+ requestBody?: never;
3834
+ responses: {
3835
+ /** @description Transaction status (PENDING si no existe aún en Horizon) */
3836
+ 200: {
3837
+ headers: {
3838
+ [name: string]: unknown;
3839
+ };
3840
+ content: {
3841
+ "application/json": {
3842
+ /** @constant */
3843
+ code: "SDK_TX_STATUS";
3844
+ /** @constant */
3845
+ success: true;
3846
+ content: {
3847
+ hash: string;
3848
+ /** @enum {string} */
3849
+ status: "PENDING" | "SUCCESS" | "FAILED";
3850
+ resultCode?: string;
3851
+ ledger?: number;
3852
+ message?: string;
3853
+ };
3854
+ };
3855
+ };
3856
+ };
3857
+ /** @description Validation error */
3858
+ 400: {
3859
+ headers: {
3860
+ [name: string]: unknown;
3861
+ };
3862
+ content: {
3863
+ "application/json": {
3864
+ /** @constant */
3865
+ success: false;
3866
+ code: string;
3867
+ };
3868
+ };
3869
+ };
3870
+ /** @description Unauthorized */
3871
+ 401: {
3872
+ headers: {
3873
+ [name: string]: unknown;
3874
+ };
3875
+ content: {
3876
+ "application/json": {
3877
+ /** @constant */
3878
+ success: false;
3879
+ code: string;
3880
+ };
3881
+ };
3882
+ };
3883
+ };
3884
+ };
3885
+ getTxHistory: {
3886
+ parameters: {
3887
+ query?: {
3888
+ network?: "testnet" | "mainnet";
3889
+ limit?: number;
3890
+ offset?: number;
3891
+ };
3892
+ header?: never;
3893
+ path?: never;
3894
+ cookie?: never;
3895
+ };
3896
+ requestBody?: never;
3897
+ responses: {
3898
+ /** @description Paginated list of transactions */
3899
+ 200: {
3900
+ headers: {
3901
+ [name: string]: unknown;
3902
+ };
3903
+ content: {
3904
+ "application/json": {
3905
+ /** @constant */
3906
+ code: "SDK_TX_HISTORY";
3907
+ /** @constant */
3908
+ success: true;
3909
+ content: {
3910
+ records: {
3911
+ id: string;
3912
+ hash: string;
3913
+ /** @enum {string} */
3914
+ network: "testnet" | "mainnet";
3915
+ /** @enum {string} */
3916
+ status: "PENDING" | "SUCCESS" | "FAILED";
3917
+ operation: string;
3918
+ feeXlm?: string;
3919
+ resultCode?: string;
3920
+ details: {
3921
+ [key: string]: unknown;
3922
+ };
3923
+ summary: string;
3924
+ createdAt: string;
3925
+ }[];
3926
+ total: number;
3927
+ limit: number;
3928
+ offset: number;
3929
+ };
3930
+ };
3931
+ };
3932
+ };
3933
+ /** @description Validation error */
3934
+ 400: {
3935
+ headers: {
3936
+ [name: string]: unknown;
3937
+ };
3938
+ content: {
3939
+ "application/json": {
3940
+ /** @constant */
3941
+ success: false;
3942
+ code: string;
3943
+ };
3944
+ };
3945
+ };
3946
+ /** @description Unauthorized */
3947
+ 401: {
3948
+ headers: {
3949
+ [name: string]: unknown;
3950
+ };
3951
+ content: {
3952
+ "application/json": {
3953
+ /** @constant */
3954
+ success: false;
3955
+ code: string;
3956
+ };
3957
+ };
3958
+ };
3959
+ };
3960
+ };
3961
+ postCharges: {
3962
+ parameters: {
3963
+ query?: never;
3964
+ header?: never;
3965
+ path?: never;
3966
+ cookie?: never;
3967
+ };
3968
+ requestBody?: never;
3969
+ responses: {
3970
+ /** @description Charge created */
3971
+ 201: {
3972
+ headers: {
3973
+ [name: string]: unknown;
3974
+ };
3975
+ content: {
3976
+ "application/json": {
3977
+ /** @constant */
3978
+ code: "SDK_CHARGE_CREATED";
3979
+ /** @constant */
3980
+ success: true;
3981
+ content: {
3982
+ chargeId: string;
3983
+ walletAddress: string;
3984
+ reason: string;
3985
+ amount: string;
3986
+ asset: string;
3987
+ network: string;
3988
+ expiresAt: string;
3989
+ timeRemainingSeconds: number;
3990
+ };
3991
+ };
3992
+ };
3993
+ };
3994
+ /** @description Validation error */
3995
+ 400: {
3996
+ headers: {
3997
+ [name: string]: unknown;
3998
+ };
3999
+ content: {
4000
+ "application/json": {
4001
+ /** @constant */
4002
+ success: false;
4003
+ code: string;
4004
+ };
4005
+ };
4006
+ };
4007
+ /** @description Unauthorized */
4008
+ 401: {
4009
+ headers: {
4010
+ [name: string]: unknown;
4011
+ };
4012
+ content: {
4013
+ "application/json": {
4014
+ /** @constant */
4015
+ success: false;
4016
+ code: string;
4017
+ };
4018
+ };
4019
+ };
4020
+ /** @description Forbidden */
4021
+ 403: {
4022
+ headers: {
4023
+ [name: string]: unknown;
4024
+ };
4025
+ content: {
4026
+ "application/json": {
4027
+ /** @constant */
4028
+ success: false;
4029
+ code: string;
4030
+ };
4031
+ };
4032
+ };
4033
+ /** @description Not found */
4034
+ 404: {
4035
+ headers: {
4036
+ [name: string]: unknown;
4037
+ };
4038
+ content: {
4039
+ "application/json": {
4040
+ /** @constant */
4041
+ success: false;
4042
+ code: string;
4043
+ };
4044
+ };
4045
+ };
4046
+ /** @description No pool wallet available */
4047
+ 503: {
4048
+ headers: {
4049
+ [name: string]: unknown;
4050
+ };
4051
+ content: {
4052
+ "application/json": {
4053
+ chargeId: string;
4054
+ walletAddress: string;
4055
+ reason: string;
4056
+ amount: string;
4057
+ asset: string;
4058
+ network: string;
4059
+ expiresAt: string;
4060
+ timeRemainingSeconds: number;
4061
+ };
4062
+ };
4063
+ };
4064
+ };
4065
+ };
4066
+ getChargesById: {
4067
+ parameters: {
4068
+ query?: never;
4069
+ header?: never;
4070
+ path: {
4071
+ id: string;
4072
+ };
4073
+ cookie?: never;
4074
+ };
4075
+ requestBody?: never;
4076
+ responses: {
4077
+ /** @description Charge status */
4078
+ 200: {
4079
+ headers: {
4080
+ [name: string]: unknown;
4081
+ };
4082
+ content: {
4083
+ "application/json": {
4084
+ /** @constant */
4085
+ code: "SDK_CHARGE_STATUS";
4086
+ /** @constant */
4087
+ success: true;
4088
+ content: {
4089
+ chargeId: string;
4090
+ /** @enum {string} */
4091
+ status: "pending" | "completed" | "overpaid" | "underpaid" | "expired" | "refunded";
4092
+ reason: string;
4093
+ amountExpected: string;
4094
+ amountPaid: string;
4095
+ remaining: string;
4096
+ asset: string;
4097
+ walletAddress: string;
4098
+ network: string;
4099
+ expiresAt: string;
4100
+ timeRemainingSeconds: number;
4101
+ isExpired: boolean;
4102
+ feeAmount: string | null;
4103
+ payoutAmount: string | null;
4104
+ forwardTxHash: string | null;
4105
+ createdAt: string;
4106
+ };
4107
+ };
4108
+ };
4109
+ };
4110
+ /** @description Unauthorized */
4111
+ 401: {
4112
+ headers: {
4113
+ [name: string]: unknown;
4114
+ };
4115
+ content: {
4116
+ "application/json": {
4117
+ /** @constant */
4118
+ success: false;
4119
+ code: string;
4120
+ };
4121
+ };
4122
+ };
4123
+ /** @description Forbidden */
4124
+ 403: {
4125
+ headers: {
4126
+ [name: string]: unknown;
4127
+ };
4128
+ content: {
4129
+ "application/json": {
4130
+ /** @constant */
4131
+ success: false;
4132
+ code: string;
4133
+ };
4134
+ };
4135
+ };
4136
+ /** @description Not found */
4137
+ 404: {
4138
+ headers: {
4139
+ [name: string]: unknown;
4140
+ };
4141
+ content: {
4142
+ "application/json": {
4143
+ /** @constant */
4144
+ success: false;
4145
+ code: string;
2923
4146
  };
2924
4147
  };
2925
4148
  };
@@ -2977,7 +4200,7 @@ interface operations {
2977
4200
  "application/json": {
2978
4201
  /** @constant */
2979
4202
  success: false;
2980
- error: string;
4203
+ code: string;
2981
4204
  };
2982
4205
  };
2983
4206
  };
@@ -2990,7 +4213,7 @@ interface operations {
2990
4213
  "application/json": {
2991
4214
  /** @constant */
2992
4215
  success: false;
2993
- error: string;
4216
+ code: string;
2994
4217
  };
2995
4218
  };
2996
4219
  };
@@ -3038,7 +4261,7 @@ interface operations {
3038
4261
  "application/json": {
3039
4262
  /** @constant */
3040
4263
  success: false;
3041
- error: string;
4264
+ code: string;
3042
4265
  };
3043
4266
  };
3044
4267
  };
@@ -3051,7 +4274,7 @@ interface operations {
3051
4274
  "application/json": {
3052
4275
  /** @constant */
3053
4276
  success: false;
3054
- error: string;
4277
+ code: string;
3055
4278
  };
3056
4279
  };
3057
4280
  };
@@ -3064,7 +4287,7 @@ interface operations {
3064
4287
  "application/json": {
3065
4288
  /** @constant */
3066
4289
  success: false;
3067
- error: string;
4290
+ code: string;
3068
4291
  };
3069
4292
  };
3070
4293
  };
@@ -3113,7 +4336,7 @@ interface operations {
3113
4336
  "application/json": {
3114
4337
  /** @constant */
3115
4338
  success: false;
3116
- error: string;
4339
+ code: string;
3117
4340
  };
3118
4341
  };
3119
4342
  };
@@ -3126,7 +4349,7 @@ interface operations {
3126
4349
  "application/json": {
3127
4350
  /** @constant */
3128
4351
  success: false;
3129
- error: string;
4352
+ code: string;
3130
4353
  };
3131
4354
  };
3132
4355
  };
@@ -3181,7 +4404,7 @@ interface operations {
3181
4404
  "application/json": {
3182
4405
  /** @constant */
3183
4406
  success: false;
3184
- error: string;
4407
+ code: string;
3185
4408
  };
3186
4409
  };
3187
4410
  };
@@ -3194,7 +4417,7 @@ interface operations {
3194
4417
  "application/json": {
3195
4418
  /** @constant */
3196
4419
  success: false;
3197
- error: string;
4420
+ code: string;
3198
4421
  };
3199
4422
  };
3200
4423
  };
@@ -3207,7 +4430,7 @@ interface operations {
3207
4430
  "application/json": {
3208
4431
  /** @constant */
3209
4432
  success: false;
3210
- error: string;
4433
+ code: string;
3211
4434
  };
3212
4435
  };
3213
4436
  };
@@ -3265,7 +4488,7 @@ interface operations {
3265
4488
  "application/json": {
3266
4489
  /** @constant */
3267
4490
  success: false;
3268
- error: string;
4491
+ code: string;
3269
4492
  };
3270
4493
  };
3271
4494
  };
@@ -3278,7 +4501,7 @@ interface operations {
3278
4501
  "application/json": {
3279
4502
  /** @constant */
3280
4503
  success: false;
3281
- error: string;
4504
+ code: string;
3282
4505
  };
3283
4506
  };
3284
4507
  };
@@ -3340,7 +4563,7 @@ interface operations {
3340
4563
  "application/json": {
3341
4564
  /** @constant */
3342
4565
  success: false;
3343
- error: string;
4566
+ code: string;
3344
4567
  };
3345
4568
  };
3346
4569
  };
@@ -3353,7 +4576,7 @@ interface operations {
3353
4576
  "application/json": {
3354
4577
  /** @constant */
3355
4578
  success: false;
3356
- error: string;
4579
+ code: string;
3357
4580
  };
3358
4581
  };
3359
4582
  };
@@ -3366,7 +4589,7 @@ interface operations {
3366
4589
  "application/json": {
3367
4590
  /** @constant */
3368
4591
  success: false;
3369
- error: string;
4592
+ code: string;
3370
4593
  };
3371
4594
  };
3372
4595
  };
@@ -3425,7 +4648,7 @@ interface operations {
3425
4648
  "application/json": {
3426
4649
  /** @constant */
3427
4650
  success: false;
3428
- error: string;
4651
+ code: string;
3429
4652
  };
3430
4653
  };
3431
4654
  };
@@ -3438,7 +4661,7 @@ interface operations {
3438
4661
  "application/json": {
3439
4662
  /** @constant */
3440
4663
  success: false;
3441
- error: string;
4664
+ code: string;
3442
4665
  };
3443
4666
  };
3444
4667
  };
@@ -3451,7 +4674,7 @@ interface operations {
3451
4674
  "application/json": {
3452
4675
  /** @constant */
3453
4676
  success: false;
3454
- error: string;
4677
+ code: string;
3455
4678
  };
3456
4679
  };
3457
4680
  };
@@ -3503,7 +4726,7 @@ interface operations {
3503
4726
  "application/json": {
3504
4727
  /** @constant */
3505
4728
  success: false;
3506
- error: string;
4729
+ code: string;
3507
4730
  };
3508
4731
  };
3509
4732
  };
@@ -3516,7 +4739,7 @@ interface operations {
3516
4739
  "application/json": {
3517
4740
  /** @constant */
3518
4741
  success: false;
3519
- error: string;
4742
+ code: string;
3520
4743
  };
3521
4744
  };
3522
4745
  };
@@ -3529,7 +4752,7 @@ interface operations {
3529
4752
  "application/json": {
3530
4753
  /** @constant */
3531
4754
  success: false;
3532
- error: string;
4755
+ code: string;
3533
4756
  };
3534
4757
  };
3535
4758
  };
@@ -3581,7 +4804,7 @@ interface operations {
3581
4804
  "application/json": {
3582
4805
  /** @constant */
3583
4806
  success: false;
3584
- error: string;
4807
+ code: string;
3585
4808
  };
3586
4809
  };
3587
4810
  };
@@ -3631,7 +4854,7 @@ interface operations {
3631
4854
  "application/json": {
3632
4855
  /** @constant */
3633
4856
  success: false;
3634
- error: string;
4857
+ code: string;
3635
4858
  };
3636
4859
  };
3637
4860
  };
@@ -3644,7 +4867,7 @@ interface operations {
3644
4867
  "application/json": {
3645
4868
  /** @constant */
3646
4869
  success: false;
3647
- error: string;
4870
+ code: string;
3648
4871
  };
3649
4872
  };
3650
4873
  };
@@ -3657,7 +4880,7 @@ interface operations {
3657
4880
  "application/json": {
3658
4881
  /** @constant */
3659
4882
  success: false;
3660
- error: string;
4883
+ code: string;
3661
4884
  };
3662
4885
  };
3663
4886
  };
@@ -3670,7 +4893,7 @@ interface operations {
3670
4893
  "application/json": {
3671
4894
  /** @constant */
3672
4895
  success: false;
3673
- error: string;
4896
+ code: string;
3674
4897
  };
3675
4898
  };
3676
4899
  };
@@ -3774,4 +4997,4 @@ declare function listDistributionRules(api: PollarApiClient): Promise<Distributi
3774
4997
  */
3775
4998
  declare function claimDistributionRule(api: PollarApiClient, body: DistributionClaimBody): Promise<DistributionClaimContent>;
3776
4999
 
3777
- export { AUTH_ERROR_CODES, type AdapterFn, AlbedoAdapter, type AuthErrorCode, type AuthState, type BuildProofArgs, type ConnectWalletResponse, type DistributionClaimBody, type DistributionClaimContent, type DistributionRule, type DistributionRulesState, FreighterAdapter, type KeyManager, type KycFlow, type KycLevel, type KycProvider, type KycStartBody, type KycStartResponse, type KycStatus, type LocalStorageAdapterOptions, type NetworkState, OnStorageDegrade, type PaymentInstructions, type PollarAdapter, type PollarAdapters, type PollarApiClient, type PollarApplicationConfigContent, type PollarApplicationConfigResponse, PollarClient, type PollarClientConfig, PollarFlowError, type PollarLoginOptions, type PollarPersistedSession, type PollarUserProfile, type PublicEcJwk, type RampDirection, type RampQuote, type RampTxStatus, type RampsOfframpBody, type RampsOfframpResponse, type RampsOnrampBody, type RampsOnrampResponse, type RampsQuoteQuery, type RampsQuoteResponse, type RampsTransactionResponse, type RulePeriod, type SessionInfo, type SignAuthEntryOptions, type SignAuthEntryResponse, type SignTransactionOptions, type SignTransactionResponse, type StellarBalance, StellarClient, type StellarClientConfig, type StellarNetwork, Storage, type TransactionState, type TxBuildBody, type TxBuildContent, type TxBuildResponse, type TxHistoryContent, type TxHistoryParams, type TxHistoryRecord, type TxHistoryState, type TxSignAndSendBody, type TxSignSendResponse, type WalletAdapter, type WalletAdapterResolver, type WalletBalanceContent, type WalletBalanceRecord, type WalletBalanceState, type WalletId, WalletType, WebCryptoKeyManager, buildProof, canonicalEcJwk, claimDistributionRule, computeJwkThumbprint, createLocalStorageAdapter, createMemoryAdapter, createOffRamp, createOnRamp, defaultKeyManager, defaultStorage, getKycProviders, getKycStatus, getRampTransaction, getRampsQuote, isValidSession, listDistributionRules, normalizeHtu, pollKycStatus, pollRampTransaction, type paths as pollarPaths, resolveKyc, startKyc };
5000
+ export { AUTH_ERROR_CODES, type AdapterFn, AlbedoAdapter, type AuthErrorCode, type AuthOpenContext, type AuthState, type AuthUrlOpener, type BuildOutcome, type BuildProofArgs, type ConnectWalletResponse, type DistributionClaimBody, type DistributionClaimContent, type DistributionRule, type DistributionRulesState, FreighterAdapter, type KeyManager, type KycFlow, type KycLevel, type KycProvider, type KycStartBody, type KycStartResponse, type KycStatus, type LocalStorageAdapterOptions, type NetworkState, OnStorageDegrade, type PaymentInstructions, type PollarAdapter, type PollarAdapters, type PollarApiClient, type PollarApplicationConfigContent, type PollarApplicationConfigResponse, PollarClient, type PollarClientConfig, PollarFlowError, type PollarLoginOptions, type PollarPersistedSession, type PollarUserProfile, type PublicEcJwk, type RampDirection, type RampQuote, type RampTxStatus, type RampsOfframpBody, type RampsOfframpResponse, type RampsOnrampBody, type RampsOnrampResponse, type RampsQuoteQuery, type RampsQuoteResponse, type RampsTransactionResponse, type RulePeriod, type SessionInfo, type SignAuthEntryOptions, type SignAuthEntryResponse, type SignOutcome, type SignTransactionOptions, type SignTransactionResponse, type StellarBalance, StellarClient, type StellarClientConfig, type StellarNetwork, Storage, type SubmitOutcome, type TransactionState, type TxBuildBody, type TxBuildContent, type TxBuildResponse, type TxBuildSignSubmitBody, type TxBuildSignSubmitContent, type TxBuildSignSubmitResponse, type TxErrorPhase, type TxHistoryContent, type TxHistoryParams, type TxHistoryRecord, type TxHistoryState, type TxSignAndSendBody, type TxSignBody, type TxSignContent, type TxSignResponse, type TxSignSendResponse, type TxSubmitSignedBody, type WalletAdapter, type WalletAdapterResolver, type WalletBalanceContent, type WalletBalanceRecord, type WalletBalanceState, type WalletId, WalletType, WebCryptoKeyManager, buildProof, canonicalEcJwk, claimDistributionRule, computeJwkThumbprint, createLocalStorageAdapter, createMemoryAdapter, createOffRamp, createOnRamp, defaultKeyManager, defaultStorage, getKycProviders, getKycStatus, getRampTransaction, getRampsQuote, isValidSession, listDistributionRules, normalizeHtu, pollKycStatus, pollRampTransaction, type paths as pollarPaths, resolveKyc, startKyc };