@supanovaapp/sdk 0.2.19 → 0.2.21

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.esm.js CHANGED
@@ -21549,12 +21549,7 @@ function rNe(t, e) {
21549
21549
  if (sNe(e) || iue(t))
21550
21550
  return t;
21551
21551
  const n = tNe(e);
21552
- if (t.startsWith(n)) {
21553
- const r = t[n.length];
21554
- if (!r || r === "/" || r === "?")
21555
- return t;
21556
- }
21557
- return oNe(n, t);
21552
+ return t.startsWith(n) ? t : oNe(n, t);
21558
21553
  }
21559
21554
  function iNe(t, e) {
21560
21555
  const n = cNe(t), r = { ...ZOe(n.search), ...e };
@@ -65651,7 +65646,14 @@ class e1t {
65651
65646
  * @throws Error if timeout is reached before completion
65652
65647
  */
65653
65648
  async submitPreparedAndWait(e, n, r = {}) {
65654
- const { timeout: i = 3e4, pollInterval: s = 1e3 } = r, a = await this.submitPrepared(e, n), { submissionId: o } = a, c = Date.now();
65649
+ const { timeout: i = 3e4, pollInterval: s = 1e3 } = r, a = await this.submitPrepared(e, n), { submissionId: o } = a;
65650
+ if (r.onSubmissionId)
65651
+ try {
65652
+ await r.onSubmissionId(o);
65653
+ } catch (l) {
65654
+ console.error(l);
65655
+ }
65656
+ const c = Date.now();
65655
65657
  for (; Date.now() - c < i; ) {
65656
65658
  const l = await this.queryCompletion(o);
65657
65659
  if (l.status === "completed")
@@ -1,6 +1,6 @@
1
1
  import { ApiClient } from '../core/client';
2
- import { CantonPrepareTransactionResponseDto, CantonSubmitRegisterRequestDto, CantonSubmitTransactionResponseDto, CantonMeResponseDto, CantonActiveContractsResponseDto, CantonQueryCompletionResponseDto, CantonWalletBalancesResponseDto, CantonPrepareAmuletTransferRequestDto, CantonIncomingTransferDto, CantonPrepareResponseIncomingTransferRequestDto, CantonCostEstimationDto, CantonTransactionDto, CantonTransactionsParams, CantonPriceInterval, CantonPriceCandleDto, CantonSubmitMultipleResultDto } from '../core/types';
3
- export type { CantonMeResponseDto, CantonActiveContractsResponseDto, CantonPrepareTransactionResponseDto, CantonQueryCompletionResponseDto, CantonWalletBalancesResponseDto, CantonPrepareAmuletTransferRequestDto, CantonIncomingTransferDto, CantonPrepareResponseIncomingTransferRequestDto, CantonCostEstimationDto, CantonTransactionDto, CantonTransactionsParams, CantonPriceInterval, CantonPriceCandleDto, CantonSubmitMultipleResultDto, };
2
+ import { CantonPrepareTransactionResponseDto, CantonSubmitRegisterRequestDto, CantonSubmitTransactionResponseDto, CantonMeResponseDto, CantonActiveContractsResponseDto, CantonQueryCompletionResponseDto, CantonWalletBalancesResponseDto, CantonPrepareAmuletTransferRequestDto, CantonPrepareAmuletTransferResponseDto, CantonIncomingTransferDto, CantonPrepareResponseIncomingTransferRequestDto, CantonCostEstimationDto, CantonTransactionDto, CantonTransactionsParams, CantonPriceInterval, CantonPriceCandleDto, CantonSubmitMultipleResultDto } from '../core/types';
3
+ export type { CantonMeResponseDto, CantonActiveContractsResponseDto, CantonPrepareTransactionResponseDto, CantonQueryCompletionResponseDto, CantonWalletBalancesResponseDto, CantonPrepareAmuletTransferRequestDto, CantonPrepareAmuletTransferResponseDto, CantonIncomingTransferDto, CantonPrepareResponseIncomingTransferRequestDto, CantonCostEstimationDto, CantonTransactionDto, CantonTransactionsParams, CantonPriceInterval, CantonPriceCandleDto, CantonSubmitMultipleResultDto, };
4
4
  export interface CantonRegisterParams {
5
5
  /** Base64 public key from Stellar wallet */
6
6
  publicKey: string;
@@ -20,6 +20,8 @@ export interface CantonSubmitPreparedOptions {
20
20
  timeout?: number;
21
21
  /** Polling interval in milliseconds (default: 1000) */
22
22
  pollInterval?: number;
23
+ /** Callback fired after submitPrepared returns submissionId (optional) */
24
+ onSubmissionId?: (submissionId: string) => void | Promise<void>;
23
25
  /** Callback to receive cost estimation before signing (optional) */
24
26
  onCostEstimation?: (costEstimation: CantonCostEstimationDto | undefined) => void | Promise<void>;
25
27
  }
@@ -135,7 +137,7 @@ export declare class CantonService {
135
137
  * @param params Transfer parameters (receiverPartyId, amount, memo)
136
138
  * @throws Error if amount has more than 10 decimal places
137
139
  */
138
- prepareAmuletTransfer(params: CantonPrepareAmuletTransferRequestDto): Promise<CantonPrepareTransactionResponseDto>;
140
+ prepareAmuletTransfer(params: CantonPrepareAmuletTransferRequestDto): Promise<CantonPrepareAmuletTransferResponseDto>;
139
141
  /**
140
142
  * Get pending incoming transfers for the current user
141
143
  * Returns a list of transfer offers that can be accepted or rejected
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supanovaapp/sdk",
3
- "version": "0.2.19",
3
+ "version": "0.2.21",
4
4
  "description": "React SDK for Supa Backend + Privy.io integration with Canton Network and EVM Smart Wallets support",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",