@oasisprotocol/privana-sdk 0.5.2 → 0.5.3

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/on-ramp.cjs CHANGED
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkUHXVYWTF_cjs = require('./chunk-UHXVYWTF.cjs');
4
+ var chunk7KEQHWZB_cjs = require('./chunk-7KEQHWZB.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "FiatOnRampForm", {
9
9
  enumerable: true,
10
- get: function () { return chunkUHXVYWTF_cjs.FiatOnRampForm; }
10
+ get: function () { return chunk7KEQHWZB_cjs.FiatOnRampForm; }
11
11
  });
12
12
  Object.defineProperty(exports, "useFiatOnRamp", {
13
13
  enumerable: true,
14
- get: function () { return chunkUHXVYWTF_cjs.useFiatOnRamp; }
14
+ get: function () { return chunk7KEQHWZB_cjs.useFiatOnRamp; }
15
15
  });
16
16
  //# sourceMappingURL=on-ramp.cjs.map
17
17
  //# sourceMappingURL=on-ramp.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { MoonPayBuyWidget } from '@moonpay/moonpay-react';
2
- import { B as Bytes32, _ as OnRampPostDepositLockConfig, d as TransactionSubmissionResponse, e as PostDepositLockError, $ as OnRampRecord, T as TokenConfig } from './pending-lock-BdkuMjmY.cjs';
3
- export { C as CreateOnRampIntentRequest, m as CreateOnRampIntentResponse, a0 as OnRampStatus, a3 as PendingOnRampsResponse, a7 as SignOnRampUrlRequest, a8 as SignOnRampUrlResponse, al as UpdateOnRampRequest, am as UpdateOnRampResponse } from './pending-lock-BdkuMjmY.cjs';
2
+ import { B as Bytes32, Z as OnRampPostDepositLockConfig, e as TransactionSubmissionResponse, f as PostDepositLockError, _ as OnRampRecord, T as TokenConfig } from './pending-lock-f4bWWTyN.cjs';
3
+ export { C as CreateOnRampIntentRequest, n as CreateOnRampIntentResponse, $ as OnRampStatus, a2 as PendingOnRampsResponse, a6 as SignOnRampUrlRequest, a7 as SignOnRampUrlResponse, al as UpdateOnRampRequest, am as UpdateOnRampResponse } from './pending-lock-f4bWWTyN.cjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import 'viem';
6
6
 
@@ -37,8 +37,9 @@ interface UseFiatOnRampOptions {
37
37
  onLockSubmitted?: (response: TransactionSubmissionResponse) => void;
38
38
  /**
39
39
  * Fired when the deposit credited but the pre-signed lock could not be
40
- * submitted. The funds sit in the user's available balance re-prompt a
41
- * fresh lock signature at the credited amount. Falls back to `onError`.
40
+ * submitted. The funds sit in the user's available balance. Fresh signing
41
+ * is safe only for failures known to precede any API attempt; otherwise
42
+ * retry or reconcile the same signature. Falls back to `onError`.
42
43
  */
43
44
  onLockFailed?: (error: PostDepositLockError) => void;
44
45
  onError?: (error: Error) => void;
package/dist/on-ramp.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { MoonPayBuyWidget } from '@moonpay/moonpay-react';
2
- import { B as Bytes32, _ as OnRampPostDepositLockConfig, d as TransactionSubmissionResponse, e as PostDepositLockError, $ as OnRampRecord, T as TokenConfig } from './pending-lock-BdkuMjmY.js';
3
- export { C as CreateOnRampIntentRequest, m as CreateOnRampIntentResponse, a0 as OnRampStatus, a3 as PendingOnRampsResponse, a7 as SignOnRampUrlRequest, a8 as SignOnRampUrlResponse, al as UpdateOnRampRequest, am as UpdateOnRampResponse } from './pending-lock-BdkuMjmY.js';
2
+ import { B as Bytes32, Z as OnRampPostDepositLockConfig, e as TransactionSubmissionResponse, f as PostDepositLockError, _ as OnRampRecord, T as TokenConfig } from './pending-lock-f4bWWTyN.js';
3
+ export { C as CreateOnRampIntentRequest, n as CreateOnRampIntentResponse, $ as OnRampStatus, a2 as PendingOnRampsResponse, a6 as SignOnRampUrlRequest, a7 as SignOnRampUrlResponse, al as UpdateOnRampRequest, am as UpdateOnRampResponse } from './pending-lock-f4bWWTyN.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import 'viem';
6
6
 
@@ -37,8 +37,9 @@ interface UseFiatOnRampOptions {
37
37
  onLockSubmitted?: (response: TransactionSubmissionResponse) => void;
38
38
  /**
39
39
  * Fired when the deposit credited but the pre-signed lock could not be
40
- * submitted. The funds sit in the user's available balance re-prompt a
41
- * fresh lock signature at the credited amount. Falls back to `onError`.
40
+ * submitted. The funds sit in the user's available balance. Fresh signing
41
+ * is safe only for failures known to precede any API attempt; otherwise
42
+ * retry or reconcile the same signature. Falls back to `onError`.
42
43
  */
43
44
  onLockFailed?: (error: PostDepositLockError) => void;
44
45
  onError?: (error: Error) => void;
package/dist/on-ramp.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use client";
2
- export { FiatOnRampForm, useFiatOnRamp } from './chunk-ZVUMV4NR.js';
2
+ export { FiatOnRampForm, useFiatOnRamp } from './chunk-DZURIIRE.js';
3
3
  //# sourceMappingURL=on-ramp.js.map
4
4
  //# sourceMappingURL=on-ramp.js.map
@@ -438,6 +438,7 @@ declare class HttpClient {
438
438
  type PrivanaClientConfig = HttpClientConfig;
439
439
  declare class PrivanaClient {
440
440
  private readonly http;
441
+ private readonly baseConfig;
441
442
  constructor(config: PrivanaClientConfig);
442
443
  getBaseUrl(): string;
443
444
  getDepositAddress(request?: DepositAddressRequest): Promise<DepositAddressResponse>;
@@ -478,20 +479,43 @@ declare class PrivanaClient {
478
479
  createOnRampIntent(request: CreateOnRampIntentRequest): Promise<CreateOnRampIntentResponse>;
479
480
  updateOnRamp(transactionId: string, request: UpdateOnRampRequest): Promise<UpdateOnRampResponse>;
480
481
  getPendingOnRamps(): Promise<PendingOnRampsResponse>;
482
+ /**
483
+ * @deprecated This mutates the shared client's headers and displaces its Authorization
484
+ * (JWT bearer) header, which breaks concurrent JWT-authenticated requests. Use
485
+ * {@link PrivanaClient.withPrivateReadToken} instead, which returns a scoped client that
486
+ * authenticates the private read without touching the shared client's headers. Will be
487
+ * removed in a future release.
488
+ */
481
489
  setPrivateReadToken(token: string): void;
490
+ /**
491
+ * @deprecated The shared client no longer carries a private-read token between requests;
492
+ * private reads now run on a scoped client from {@link PrivanaClient.withPrivateReadToken}.
493
+ * Returns whatever X-SIWE-Token is currently set on the shared client's headers. Will be
494
+ * removed in a future release.
495
+ */
482
496
  getPrivateReadToken(): string | undefined;
483
497
  clearPrivateReadToken(): void;
484
498
  setBearerToken(token: string): void;
485
499
  clearBearerToken(): void;
500
+ /**
501
+ * Returns a scoped client whose requests authenticate with the given SIWE private-read
502
+ * token (X-SIWE-Token) instead of the client-wide JWT bearer. The scoped client shares
503
+ * baseUrl/timeout/base headers but owns a separate header set, so private reads issued
504
+ * through it never displace the real client's Authorization header: concurrent
505
+ * JWT-authenticated requests on the real client keep their bearer, and a bearer installed
506
+ * mid-flight (auto-login/hydration) is never erased by a private read.
507
+ */
508
+ withPrivateReadToken(token: string): PrivanaClient;
486
509
  }
487
510
 
488
511
  /**
489
512
  * Deposit-and-lock without backend involvement: the user pre-signs a regular
490
513
  * `Lock` (EIP-712) for the exact expected amount before the deposit, the SDK
491
514
  * persists the payload, and submits it to POST /funds/lock once the deposit is
492
- * credited. Every failure fails closed if the credited amount is short or the
493
- * nonce went stale, the lock reverts, the funds stay in the user's available
494
- * balance, and the UI re-prompts a fresh signature at the actual amount.
515
+ * credited. Every failure fails closed. Deterministic preflight failures such
516
+ * as a short credit or expired signature can safely request a fresh signature;
517
+ * once an API attempt starts, recovery must replay that signature unless the
518
+ * attempt was cross-tab serialized and definitively rejected.
495
519
  * Services must only act on lock confirmation, never on deposit.
496
520
  */
497
521
  interface PostDepositLockConfig {
@@ -532,6 +556,12 @@ declare function applyLockBuffer(amount: bigint, buffer?: number): bigint;
532
556
  * signed lock must never exceed it, no matter what the flow computed.
533
557
  */
534
558
  declare function clampLockAmount(amount: bigint, maxAmount?: bigint): bigint;
559
+ /**
560
+ * The provider's `serviceAddress` is optional; every lock flow needs it set
561
+ * before a `Lock` can be signed.
562
+ */
563
+ declare function requireServiceAddress(serviceAddress: Address | undefined): Address;
564
+ declare function requireDepositLockOwner(walletAddress: Address | undefined, beneficiary: Address | null): Address;
535
565
  interface CreateSignedLockRequestParams {
536
566
  client: PrivanaClient;
537
567
  walletClient: WalletClient;
@@ -561,15 +591,17 @@ type PostDepositLockFailureReason =
561
591
  /** No persisted signed lock for this deposit (storage cleared, other device). */
562
592
  | 'not-found';
563
593
  /**
564
- * The deposit itself was credited; only the post-credit lock failed. UIs
565
- * should re-prompt a fresh `Lock` signature at the actual credited amount.
594
+ * The deposit itself was credited; only the post-credit lock failed. UIs may
595
+ * request a fresh signature only when no prior API attempt could have landed.
566
596
  */
567
597
  declare class PostDepositLockError extends Error {
568
598
  readonly reason: PostDepositLockFailureReason;
569
599
  readonly signedAmount?: bigint | undefined;
570
600
  readonly creditedAmount?: bigint | undefined;
601
+ readonly submissionMayHaveSucceeded: boolean;
571
602
  constructor(message: string, reason: PostDepositLockFailureReason, signedAmount?: bigint | undefined, creditedAmount?: bigint | undefined, options?: {
572
603
  cause?: unknown;
604
+ submissionMayHaveSucceeded?: boolean;
573
605
  });
574
606
  }
575
607
  interface SubmitPendingLockParams {
@@ -577,13 +609,15 @@ interface SubmitPendingLockParams {
577
609
  payload: LockFundsRequest;
578
610
  /** Credited amount in base units, when known — skips a guaranteed revert. */
579
611
  creditedAmount?: bigint;
612
+ /** Runs after deterministic preflight checks and immediately before the API request. */
613
+ beforeSubmit?: () => void;
580
614
  }
581
615
  /**
582
616
  * Submit a pre-signed lock after the deposit credited. Throws
583
617
  * `PostDepositLockError` on every failure path so callers can route to the
584
618
  * re-prompt flow.
585
619
  */
586
- declare function submitPendingLock({ client, payload, creditedAmount, }: SubmitPendingLockParams): Promise<TransactionSubmissionResponse>;
620
+ declare function submitPendingLock({ client, payload, creditedAmount, beforeSubmit, }: SubmitPendingLockParams): Promise<TransactionSubmissionResponse>;
587
621
  /**
588
622
  * Persist a signed lock so submission survives a page reload between deposit
589
623
  * and credit. `correlationId` ties it to the deposit (tx hash) or on-ramp
@@ -597,4 +631,4 @@ declare function savePendingLock(userAddress: string, correlationId: string, pay
597
631
  declare function loadPendingLock(userAddress: string, correlationId: string): LockFundsRequest | undefined;
598
632
  declare function clearPendingLock(userAddress: string, correlationId: string): void;
599
633
 
600
- export { type OnRampRecord as $, type Address as A, type Bytes32 as B, type CreateOnRampIntentRequest as C, type DepositAddressResponse as D, type ExpiredLocksResponse as E, type HttpClientConfig as F, type JwtLogoutRequest as G, type HostedAuthTokenExchangeResponse as H, type IntegerLike as I, type JwtRefreshResponse as J, type JwtLogoutResponse as K, type LockInfo as L, type JwtRefreshRequest as M, type NetworkConfig as N, type LockFundsRequest as O, PrivanaClient as P, type LockNonceResponse as Q, type LockedFundsResponse as R, type SiweLoginResponse as S, type TokenConfig as T, type MinDepositAmounts as U, type ModifyLockNonceResponse as V, type WithdrawalInfo as W, type ModifyLockRequest as X, NETWORK_CONFIG as Y, type Network as Z, type OnRampPostDepositLockConfig as _, type TokenBalance as a, type OnRampStatus as a0, type PendingDepositStatus as a1, type PendingDepositsRequest as a2, type PendingOnRampsResponse as a3, type PendingWithdrawalsResponse as a4, type PostDepositLockFailureReason as a5, type PrivanaClientConfig as a6, type SignOnRampUrlRequest as a7, type SignOnRampUrlResponse as a8, type SiweDomainResponse as a9, normalizeAddress as aA, normalizeHex as aB, savePendingLock as aC, submitPendingLock as aD, type SiweLoginRequest as aa, type SiweNonceResponse as ab, type SubmitPendingLockParams as ac, type TokenListResponse as ad, type TotalLockedBalanceResponse as ae, type TransferFundsRequest as af, type TransferLockedFundsRequest as ag, type TransferLockedNonceResponse as ah, type TransferNonceResponse as ai, type UnlockAllExpiredRequest as aj, type UnlockFundsRequest as ak, type UpdateOnRampRequest as al, type UpdateOnRampResponse as am, type WithdrawFromLockRequest as an, type WithdrawalInfoResponse as ao, type WithdrawalNonceResponse as ap, type WithdrawalRequest as aq, applyLockBuffer as ar, clampLockAmount as as, clearPendingLock as at, createSignedLockRequest as au, getAccountingContract as av, getApiUrl as aw, getChainId as ax, isSignedLockUsable as ay, loadPendingLock as az, type PostDepositLockConfig as b, type DepositCheckResponse as c, type TransactionSubmissionResponse as d, PostDepositLockError as e, type PendingDeposit as f, type PendingDepositsResponse as g, type HistoryEntry as h, type TokenInfoResponse as i, type BalanceResponse as j, type BatchBalancesRequest as k, type BatchBalancesResponse as l, type CreateOnRampIntentResponse as m, type CreateSignedLockRequestParams as n, DEFAULT_LOCK_DURATION_SECONDS as o, DEFAULT_ONRAMP_LOCK_BUFFER as p, type DepositAddressRequest as q, type DepositCheckRequest as r, type HexString as s, type HistoryKind as t, type HistoryRequest as u, type HistoryResponse as v, type HostedAuthAuthorizeUrlRequest as w, type HostedAuthResponseMode as x, type HostedAuthTokenExchangeRequest as y, HttpClient as z };
634
+ export { type OnRampStatus as $, type Address as A, type Bytes32 as B, type CreateOnRampIntentRequest as C, type DepositAddressResponse as D, type ExpiredLocksResponse as E, type HttpClientConfig as F, type JwtLogoutRequest as G, type HostedAuthTokenExchangeResponse as H, type IntegerLike as I, type JwtRefreshResponse as J, type JwtLogoutResponse as K, type LockInfo as L, type JwtRefreshRequest as M, type NetworkConfig as N, type LockFundsRequest as O, PrivanaClient as P, type LockNonceResponse as Q, type LockedFundsResponse as R, type MinDepositAmounts as S, type TokenConfig as T, type ModifyLockNonceResponse as U, type ModifyLockRequest as V, type WithdrawalInfo as W, NETWORK_CONFIG as X, type Network as Y, type OnRampPostDepositLockConfig as Z, type OnRampRecord as _, type HexString as a, type PendingDepositStatus as a0, type PendingDepositsRequest as a1, type PendingOnRampsResponse as a2, type PendingWithdrawalsResponse as a3, type PostDepositLockFailureReason as a4, type PrivanaClientConfig as a5, type SignOnRampUrlRequest as a6, type SignOnRampUrlResponse as a7, type SiweDomainResponse as a8, type SiweLoginRequest as a9, normalizeAddress as aA, normalizeHex as aB, requireDepositLockOwner as aC, requireServiceAddress as aD, savePendingLock as aE, submitPendingLock as aF, type SiweLoginResponse as aa, type SiweNonceResponse as ab, type SubmitPendingLockParams as ac, type TokenListResponse as ad, type TotalLockedBalanceResponse as ae, type TransferFundsRequest as af, type TransferLockedFundsRequest as ag, type TransferLockedNonceResponse as ah, type TransferNonceResponse as ai, type UnlockAllExpiredRequest as aj, type UnlockFundsRequest as ak, type UpdateOnRampRequest as al, type UpdateOnRampResponse as am, type WithdrawFromLockRequest as an, type WithdrawalInfoResponse as ao, type WithdrawalNonceResponse as ap, type WithdrawalRequest as aq, applyLockBuffer as ar, clampLockAmount as as, clearPendingLock as at, createSignedLockRequest as au, getAccountingContract as av, getApiUrl as aw, getChainId as ax, isSignedLockUsable as ay, loadPendingLock as az, type TokenBalance as b, type PostDepositLockConfig as c, type DepositCheckResponse as d, type TransactionSubmissionResponse as e, PostDepositLockError as f, type PendingDeposit as g, type PendingDepositsResponse as h, type HistoryEntry as i, type TokenInfoResponse as j, type BalanceResponse as k, type BatchBalancesRequest as l, type BatchBalancesResponse as m, type CreateOnRampIntentResponse as n, type CreateSignedLockRequestParams as o, DEFAULT_LOCK_DURATION_SECONDS as p, DEFAULT_ONRAMP_LOCK_BUFFER as q, type DepositAddressRequest as r, type DepositCheckRequest as s, type HistoryKind as t, type HistoryRequest as u, type HistoryResponse as v, type HostedAuthAuthorizeUrlRequest as w, type HostedAuthResponseMode as x, type HostedAuthTokenExchangeRequest as y, HttpClient as z };
@@ -438,6 +438,7 @@ declare class HttpClient {
438
438
  type PrivanaClientConfig = HttpClientConfig;
439
439
  declare class PrivanaClient {
440
440
  private readonly http;
441
+ private readonly baseConfig;
441
442
  constructor(config: PrivanaClientConfig);
442
443
  getBaseUrl(): string;
443
444
  getDepositAddress(request?: DepositAddressRequest): Promise<DepositAddressResponse>;
@@ -478,20 +479,43 @@ declare class PrivanaClient {
478
479
  createOnRampIntent(request: CreateOnRampIntentRequest): Promise<CreateOnRampIntentResponse>;
479
480
  updateOnRamp(transactionId: string, request: UpdateOnRampRequest): Promise<UpdateOnRampResponse>;
480
481
  getPendingOnRamps(): Promise<PendingOnRampsResponse>;
482
+ /**
483
+ * @deprecated This mutates the shared client's headers and displaces its Authorization
484
+ * (JWT bearer) header, which breaks concurrent JWT-authenticated requests. Use
485
+ * {@link PrivanaClient.withPrivateReadToken} instead, which returns a scoped client that
486
+ * authenticates the private read without touching the shared client's headers. Will be
487
+ * removed in a future release.
488
+ */
481
489
  setPrivateReadToken(token: string): void;
490
+ /**
491
+ * @deprecated The shared client no longer carries a private-read token between requests;
492
+ * private reads now run on a scoped client from {@link PrivanaClient.withPrivateReadToken}.
493
+ * Returns whatever X-SIWE-Token is currently set on the shared client's headers. Will be
494
+ * removed in a future release.
495
+ */
482
496
  getPrivateReadToken(): string | undefined;
483
497
  clearPrivateReadToken(): void;
484
498
  setBearerToken(token: string): void;
485
499
  clearBearerToken(): void;
500
+ /**
501
+ * Returns a scoped client whose requests authenticate with the given SIWE private-read
502
+ * token (X-SIWE-Token) instead of the client-wide JWT bearer. The scoped client shares
503
+ * baseUrl/timeout/base headers but owns a separate header set, so private reads issued
504
+ * through it never displace the real client's Authorization header: concurrent
505
+ * JWT-authenticated requests on the real client keep their bearer, and a bearer installed
506
+ * mid-flight (auto-login/hydration) is never erased by a private read.
507
+ */
508
+ withPrivateReadToken(token: string): PrivanaClient;
486
509
  }
487
510
 
488
511
  /**
489
512
  * Deposit-and-lock without backend involvement: the user pre-signs a regular
490
513
  * `Lock` (EIP-712) for the exact expected amount before the deposit, the SDK
491
514
  * persists the payload, and submits it to POST /funds/lock once the deposit is
492
- * credited. Every failure fails closed if the credited amount is short or the
493
- * nonce went stale, the lock reverts, the funds stay in the user's available
494
- * balance, and the UI re-prompts a fresh signature at the actual amount.
515
+ * credited. Every failure fails closed. Deterministic preflight failures such
516
+ * as a short credit or expired signature can safely request a fresh signature;
517
+ * once an API attempt starts, recovery must replay that signature unless the
518
+ * attempt was cross-tab serialized and definitively rejected.
495
519
  * Services must only act on lock confirmation, never on deposit.
496
520
  */
497
521
  interface PostDepositLockConfig {
@@ -532,6 +556,12 @@ declare function applyLockBuffer(amount: bigint, buffer?: number): bigint;
532
556
  * signed lock must never exceed it, no matter what the flow computed.
533
557
  */
534
558
  declare function clampLockAmount(amount: bigint, maxAmount?: bigint): bigint;
559
+ /**
560
+ * The provider's `serviceAddress` is optional; every lock flow needs it set
561
+ * before a `Lock` can be signed.
562
+ */
563
+ declare function requireServiceAddress(serviceAddress: Address | undefined): Address;
564
+ declare function requireDepositLockOwner(walletAddress: Address | undefined, beneficiary: Address | null): Address;
535
565
  interface CreateSignedLockRequestParams {
536
566
  client: PrivanaClient;
537
567
  walletClient: WalletClient;
@@ -561,15 +591,17 @@ type PostDepositLockFailureReason =
561
591
  /** No persisted signed lock for this deposit (storage cleared, other device). */
562
592
  | 'not-found';
563
593
  /**
564
- * The deposit itself was credited; only the post-credit lock failed. UIs
565
- * should re-prompt a fresh `Lock` signature at the actual credited amount.
594
+ * The deposit itself was credited; only the post-credit lock failed. UIs may
595
+ * request a fresh signature only when no prior API attempt could have landed.
566
596
  */
567
597
  declare class PostDepositLockError extends Error {
568
598
  readonly reason: PostDepositLockFailureReason;
569
599
  readonly signedAmount?: bigint | undefined;
570
600
  readonly creditedAmount?: bigint | undefined;
601
+ readonly submissionMayHaveSucceeded: boolean;
571
602
  constructor(message: string, reason: PostDepositLockFailureReason, signedAmount?: bigint | undefined, creditedAmount?: bigint | undefined, options?: {
572
603
  cause?: unknown;
604
+ submissionMayHaveSucceeded?: boolean;
573
605
  });
574
606
  }
575
607
  interface SubmitPendingLockParams {
@@ -577,13 +609,15 @@ interface SubmitPendingLockParams {
577
609
  payload: LockFundsRequest;
578
610
  /** Credited amount in base units, when known — skips a guaranteed revert. */
579
611
  creditedAmount?: bigint;
612
+ /** Runs after deterministic preflight checks and immediately before the API request. */
613
+ beforeSubmit?: () => void;
580
614
  }
581
615
  /**
582
616
  * Submit a pre-signed lock after the deposit credited. Throws
583
617
  * `PostDepositLockError` on every failure path so callers can route to the
584
618
  * re-prompt flow.
585
619
  */
586
- declare function submitPendingLock({ client, payload, creditedAmount, }: SubmitPendingLockParams): Promise<TransactionSubmissionResponse>;
620
+ declare function submitPendingLock({ client, payload, creditedAmount, beforeSubmit, }: SubmitPendingLockParams): Promise<TransactionSubmissionResponse>;
587
621
  /**
588
622
  * Persist a signed lock so submission survives a page reload between deposit
589
623
  * and credit. `correlationId` ties it to the deposit (tx hash) or on-ramp
@@ -597,4 +631,4 @@ declare function savePendingLock(userAddress: string, correlationId: string, pay
597
631
  declare function loadPendingLock(userAddress: string, correlationId: string): LockFundsRequest | undefined;
598
632
  declare function clearPendingLock(userAddress: string, correlationId: string): void;
599
633
 
600
- export { type OnRampRecord as $, type Address as A, type Bytes32 as B, type CreateOnRampIntentRequest as C, type DepositAddressResponse as D, type ExpiredLocksResponse as E, type HttpClientConfig as F, type JwtLogoutRequest as G, type HostedAuthTokenExchangeResponse as H, type IntegerLike as I, type JwtRefreshResponse as J, type JwtLogoutResponse as K, type LockInfo as L, type JwtRefreshRequest as M, type NetworkConfig as N, type LockFundsRequest as O, PrivanaClient as P, type LockNonceResponse as Q, type LockedFundsResponse as R, type SiweLoginResponse as S, type TokenConfig as T, type MinDepositAmounts as U, type ModifyLockNonceResponse as V, type WithdrawalInfo as W, type ModifyLockRequest as X, NETWORK_CONFIG as Y, type Network as Z, type OnRampPostDepositLockConfig as _, type TokenBalance as a, type OnRampStatus as a0, type PendingDepositStatus as a1, type PendingDepositsRequest as a2, type PendingOnRampsResponse as a3, type PendingWithdrawalsResponse as a4, type PostDepositLockFailureReason as a5, type PrivanaClientConfig as a6, type SignOnRampUrlRequest as a7, type SignOnRampUrlResponse as a8, type SiweDomainResponse as a9, normalizeAddress as aA, normalizeHex as aB, savePendingLock as aC, submitPendingLock as aD, type SiweLoginRequest as aa, type SiweNonceResponse as ab, type SubmitPendingLockParams as ac, type TokenListResponse as ad, type TotalLockedBalanceResponse as ae, type TransferFundsRequest as af, type TransferLockedFundsRequest as ag, type TransferLockedNonceResponse as ah, type TransferNonceResponse as ai, type UnlockAllExpiredRequest as aj, type UnlockFundsRequest as ak, type UpdateOnRampRequest as al, type UpdateOnRampResponse as am, type WithdrawFromLockRequest as an, type WithdrawalInfoResponse as ao, type WithdrawalNonceResponse as ap, type WithdrawalRequest as aq, applyLockBuffer as ar, clampLockAmount as as, clearPendingLock as at, createSignedLockRequest as au, getAccountingContract as av, getApiUrl as aw, getChainId as ax, isSignedLockUsable as ay, loadPendingLock as az, type PostDepositLockConfig as b, type DepositCheckResponse as c, type TransactionSubmissionResponse as d, PostDepositLockError as e, type PendingDeposit as f, type PendingDepositsResponse as g, type HistoryEntry as h, type TokenInfoResponse as i, type BalanceResponse as j, type BatchBalancesRequest as k, type BatchBalancesResponse as l, type CreateOnRampIntentResponse as m, type CreateSignedLockRequestParams as n, DEFAULT_LOCK_DURATION_SECONDS as o, DEFAULT_ONRAMP_LOCK_BUFFER as p, type DepositAddressRequest as q, type DepositCheckRequest as r, type HexString as s, type HistoryKind as t, type HistoryRequest as u, type HistoryResponse as v, type HostedAuthAuthorizeUrlRequest as w, type HostedAuthResponseMode as x, type HostedAuthTokenExchangeRequest as y, HttpClient as z };
634
+ export { type OnRampStatus as $, type Address as A, type Bytes32 as B, type CreateOnRampIntentRequest as C, type DepositAddressResponse as D, type ExpiredLocksResponse as E, type HttpClientConfig as F, type JwtLogoutRequest as G, type HostedAuthTokenExchangeResponse as H, type IntegerLike as I, type JwtRefreshResponse as J, type JwtLogoutResponse as K, type LockInfo as L, type JwtRefreshRequest as M, type NetworkConfig as N, type LockFundsRequest as O, PrivanaClient as P, type LockNonceResponse as Q, type LockedFundsResponse as R, type MinDepositAmounts as S, type TokenConfig as T, type ModifyLockNonceResponse as U, type ModifyLockRequest as V, type WithdrawalInfo as W, NETWORK_CONFIG as X, type Network as Y, type OnRampPostDepositLockConfig as Z, type OnRampRecord as _, type HexString as a, type PendingDepositStatus as a0, type PendingDepositsRequest as a1, type PendingOnRampsResponse as a2, type PendingWithdrawalsResponse as a3, type PostDepositLockFailureReason as a4, type PrivanaClientConfig as a5, type SignOnRampUrlRequest as a6, type SignOnRampUrlResponse as a7, type SiweDomainResponse as a8, type SiweLoginRequest as a9, normalizeAddress as aA, normalizeHex as aB, requireDepositLockOwner as aC, requireServiceAddress as aD, savePendingLock as aE, submitPendingLock as aF, type SiweLoginResponse as aa, type SiweNonceResponse as ab, type SubmitPendingLockParams as ac, type TokenListResponse as ad, type TotalLockedBalanceResponse as ae, type TransferFundsRequest as af, type TransferLockedFundsRequest as ag, type TransferLockedNonceResponse as ah, type TransferNonceResponse as ai, type UnlockAllExpiredRequest as aj, type UnlockFundsRequest as ak, type UpdateOnRampRequest as al, type UpdateOnRampResponse as am, type WithdrawFromLockRequest as an, type WithdrawalInfoResponse as ao, type WithdrawalNonceResponse as ap, type WithdrawalRequest as aq, applyLockBuffer as ar, clampLockAmount as as, clearPendingLock as at, createSignedLockRequest as au, getAccountingContract as av, getApiUrl as aw, getChainId as ax, isSignedLockUsable as ay, loadPendingLock as az, type TokenBalance as b, type PostDepositLockConfig as c, type DepositCheckResponse as d, type TransactionSubmissionResponse as e, PostDepositLockError as f, type PendingDeposit as g, type PendingDepositsResponse as h, type HistoryEntry as i, type TokenInfoResponse as j, type BalanceResponse as k, type BatchBalancesRequest as l, type BatchBalancesResponse as m, type CreateOnRampIntentResponse as n, type CreateSignedLockRequestParams as o, DEFAULT_LOCK_DURATION_SECONDS as p, DEFAULT_ONRAMP_LOCK_BUFFER as q, type DepositAddressRequest as r, type DepositCheckRequest as s, type HistoryKind as t, type HistoryRequest as u, type HistoryResponse as v, type HostedAuthAuthorizeUrlRequest as w, type HostedAuthResponseMode as x, type HostedAuthTokenExchangeRequest as y, HttpClient as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oasisprotocol/privana-sdk",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "React SDK for Privana - manage deposits, withdrawals, locks, and transfers",
5
5
  "author": "Oasis Protocol Foundation <security@oasisprotocol.org>",
6
6
  "license": "Apache-2.0",