@buildonspark/spark-sdk 0.1.25 → 0.1.26

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.
@@ -1956,8 +1956,9 @@ declare class SparkWallet extends EventEmitter {
1956
1956
  protected connectionManager: ConnectionManager;
1957
1957
  protected lrc20ConnectionManager: ILrc20ConnectionManager;
1958
1958
  protected lrc20Wallet: LRCWallet | undefined;
1959
- private depositService;
1960
1959
  protected transferService: TransferService;
1960
+ protected tracerId: string;
1961
+ private depositService;
1961
1962
  private treeCreationService;
1962
1963
  private lightningService;
1963
1964
  private coopExitService;
@@ -2295,6 +2296,14 @@ declare class SparkWallet extends EventEmitter {
2295
2296
  tokenAmount: bigint;
2296
2297
  receiverSparkAddress: string;
2297
2298
  }[], selectedOutputs?: OutputWithPreviousTransactionData[]): Promise<string>;
2299
+ /**
2300
+ * Retrieves token transaction history for specified tokens owned by the wallet.
2301
+ * Can optionally filter by specific transaction hashes.
2302
+ *
2303
+ * @param tokenPublicKeys - Array of token public keys to query transactions for
2304
+ * @param tokenTransactionHashes - Optional array of specific transaction hashes to filter by
2305
+ * @returns Promise resolving to array of token transactions with their current status
2306
+ */
2298
2307
  queryTokenTransactions(tokenPublicKeys: string[], tokenTransactionHashes?: string[]): Promise<TokenTransactionWithStatus[]>;
2299
2308
  getTokenL1Address(): Promise<string>;
2300
2309
  /**
@@ -2339,4 +2348,4 @@ declare class SparkWallet extends EventEmitter {
2339
2348
  private startPeriodicClaimTransfers;
2340
2349
  }
2341
2350
 
2342
- export { ReactNativeSparkSigner, SparkWallet };
2351
+ export { ReactNativeSparkSigner as DefaultSparkSigner, ReactNativeSparkSigner, SparkWallet };
@@ -1956,8 +1956,9 @@ declare class SparkWallet extends EventEmitter {
1956
1956
  protected connectionManager: ConnectionManager;
1957
1957
  protected lrc20ConnectionManager: ILrc20ConnectionManager;
1958
1958
  protected lrc20Wallet: LRCWallet | undefined;
1959
- private depositService;
1960
1959
  protected transferService: TransferService;
1960
+ protected tracerId: string;
1961
+ private depositService;
1961
1962
  private treeCreationService;
1962
1963
  private lightningService;
1963
1964
  private coopExitService;
@@ -2295,6 +2296,14 @@ declare class SparkWallet extends EventEmitter {
2295
2296
  tokenAmount: bigint;
2296
2297
  receiverSparkAddress: string;
2297
2298
  }[], selectedOutputs?: OutputWithPreviousTransactionData[]): Promise<string>;
2299
+ /**
2300
+ * Retrieves token transaction history for specified tokens owned by the wallet.
2301
+ * Can optionally filter by specific transaction hashes.
2302
+ *
2303
+ * @param tokenPublicKeys - Array of token public keys to query transactions for
2304
+ * @param tokenTransactionHashes - Optional array of specific transaction hashes to filter by
2305
+ * @returns Promise resolving to array of token transactions with their current status
2306
+ */
2298
2307
  queryTokenTransactions(tokenPublicKeys: string[], tokenTransactionHashes?: string[]): Promise<TokenTransactionWithStatus[]>;
2299
2308
  getTokenL1Address(): Promise<string>;
2300
2309
  /**
@@ -2339,4 +2348,4 @@ declare class SparkWallet extends EventEmitter {
2339
2348
  private startPeriodicClaimTransfers;
2340
2349
  }
2341
2350
 
2342
- export { ReactNativeSparkSigner, SparkWallet };
2351
+ export { ReactNativeSparkSigner as DefaultSparkSigner, ReactNativeSparkSigner, SparkWallet };
@@ -15528,7 +15528,7 @@ var TransferService = class extends BaseTransferService {
15528
15528
  }
15529
15529
  async claimTransfer(transfer, leaves) {
15530
15530
  let proofMap;
15531
- if (transfer.status === 2 /* TRANSFER_STATUS_SENDER_KEY_TWEAKED */ || transfer.status === 3 /* TRANSFER_STATUS_RECEIVER_KEY_TWEAKED */) {
15531
+ if (transfer.status === 2 /* TRANSFER_STATUS_SENDER_KEY_TWEAKED */) {
15532
15532
  proofMap = await this.claimTransferTweakKeys(transfer, leaves);
15533
15533
  }
15534
15534
  const signatures = await this.claimTransferSignRefunds(
@@ -19059,8 +19059,9 @@ var SparkWallet = class _SparkWallet extends EventEmitter {
19059
19059
  connectionManager;
19060
19060
  lrc20ConnectionManager;
19061
19061
  lrc20Wallet;
19062
- depositService;
19063
19062
  transferService;
19063
+ tracerId = "spark-sdk";
19064
+ depositService;
19064
19065
  treeCreationService;
19065
19066
  lightningService;
19066
19067
  coopExitService;
@@ -19215,10 +19216,6 @@ var SparkWallet = class _SparkWallet extends EventEmitter {
19215
19216
  }) {
19216
19217
  const wallet = new _SparkWallet(options, signer);
19217
19218
  const initResponse = await wallet.initWallet(mnemonicOrSeed, accountNumber);
19218
- if (isNode3) {
19219
- await wallet.initializeTracer("spark-sdk");
19220
- wallet.wrapSparkWalletWithTracing();
19221
- }
19222
19219
  return {
19223
19220
  wallet,
19224
19221
  ...initResponse
@@ -19312,6 +19309,9 @@ var SparkWallet = class _SparkWallet extends EventEmitter {
19312
19309
  const claimedTransfersIds = await this.claimTransfers();
19313
19310
  try {
19314
19311
  for await (const data of stream) {
19312
+ if (this.streamController?.signal.aborted) {
19313
+ break;
19314
+ }
19315
19315
  if (data.event?.$case === "connected") {
19316
19316
  console.log("connected");
19317
19317
  this.emit("stream:connected");
@@ -19577,6 +19577,10 @@ var SparkWallet = class _SparkWallet extends EventEmitter {
19577
19577
  LRC_WALLET_NETWORK_TYPE[network],
19578
19578
  this.config.lrc20ApiConfig
19579
19579
  );
19580
+ if (isNode3) {
19581
+ await this.initializeTracer(this.tracerId);
19582
+ this.wrapSparkWalletWithTracing();
19583
+ }
19580
19584
  return {
19581
19585
  mnemonic
19582
19586
  };
@@ -20944,6 +20948,14 @@ var SparkWallet = class _SparkWallet extends EventEmitter {
20944
20948
  selectedOutputs
20945
20949
  );
20946
20950
  }
20951
+ /**
20952
+ * Retrieves token transaction history for specified tokens owned by the wallet.
20953
+ * Can optionally filter by specific transaction hashes.
20954
+ *
20955
+ * @param tokenPublicKeys - Array of token public keys to query transactions for
20956
+ * @param tokenTransactionHashes - Optional array of specific transaction hashes to filter by
20957
+ * @returns Promise resolving to array of token transactions with their current status
20958
+ */
20947
20959
  async queryTokenTransactions(tokenPublicKeys, tokenTransactionHashes) {
20948
20960
  const sparkClient = await this.connectionManager.createSparkClient(
20949
20961
  this.config.getCoordinatorAddress()
@@ -21068,6 +21080,7 @@ var SparkWallet = class _SparkWallet extends EventEmitter {
21068
21080
  }
21069
21081
  };
21070
21082
  export {
21083
+ ReactNativeSparkSigner as DefaultSparkSigner,
21071
21084
  ReactNativeSparkSigner,
21072
21085
  SparkWallet
21073
21086
  };