@omnity/ree-client-ts-sdk 0.3.4 → 0.3.5

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/README.md CHANGED
@@ -99,7 +99,7 @@ transaction.addIntention({
99
99
  });
100
100
 
101
101
  // Build and execute
102
- const psbt = await transaction.build();
102
+ const { psbt } = await transaction.build();
103
103
  const signedPsbt = await wallet.signPsbt(psbt);
104
104
  const result = await transaction.send(signedPsbt.toHex());
105
105
  ```
@@ -162,7 +162,7 @@ transaction.addIntention({
162
162
  });
163
163
 
164
164
  // Build and execute the multi-intention transaction
165
- const psbt = await transaction.build();
165
+ const { psbt } = await transaction.build();
166
166
  const signedPsbt = await wallet.signPsbt(psbt);
167
167
  const result = await transaction.send(signedPsbt.toHex());
168
168
  ```
@@ -238,7 +238,7 @@ function WalletComponent() {
238
238
  nonce: BigInt(Date.now() + 1),
239
239
  });
240
240
 
241
- const psbt = await tx.build();
241
+ const { psbt } = await tx.build();
242
242
  // Sign and send...
243
243
  };
244
244
 
@@ -302,7 +302,7 @@ function MyComponent({ children }) {
302
302
  nonce: depositOffer.nonce,
303
303
  });
304
304
 
305
- const psbt = await tx.build();
305
+ const { psbt } = await tx.build();
306
306
 
307
307
  const signedPsbt = await signPsbt(psbt);
308
308
  const txid = await tx.send(signedPsbt.toHex());
@@ -378,7 +378,7 @@ Transaction builder for Bitcoin and Rune transactions with multi-intention suppo
378
378
  #### Methods
379
379
 
380
380
  - `addIntention(intention: Intention): void` - Add an intention to the transaction
381
- - `build(): Promise<bitcoin.Psbt>` - Build the PSBT with all intentions
381
+ - `build(): Promise<{ psbt: bitcoin.Psbt, txid: string }>` - Build the PSBT with all intentions
382
382
  - `send(signedPsbtHex: string): Promise<any>` - Submit the signed transaction
383
383
 
384
384
  #### Intention Structure
package/dist/index.d.ts CHANGED
@@ -473,11 +473,14 @@ export declare class Transaction {
473
473
  * @example
474
474
  * ```typescript
475
475
  * // After adding intentions
476
- * const psbt = await transaction.build();
476
+ * const { psbt, txid } = await transaction.build();
477
477
  * const signedPsbt = await wallet.signPsbt(psbt);
478
478
  * ```
479
479
  */
480
- build(): Promise<bitcoin.Psbt>;
480
+ build(): Promise<{
481
+ psbt: bitcoin.Psbt;
482
+ txid: string;
483
+ }>;
481
484
  /**
482
485
  * Submit the signed transaction to the orchestrator for execution
483
486
  * This method sends the signed PSBT along with the intention set to the orchestrator canister