@omnity/ree-client-ts-sdk 0.4.0 → 0.4.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/README.md CHANGED
@@ -70,6 +70,7 @@ const poolInfo = await client.getPoolInfo("pool-address");
70
70
  const transaction = await client.createTransaction({
71
71
  address: "bc1p...", // Bitcoin address for runes
72
72
  paymentAddress: "bc1q...", // Payment address for BTC
73
+ // feeRate: BigInt(25), // Optional manual fee rate in sat/vbyte
73
74
  });
74
75
 
75
76
  // Add a single intention (e.g., swap BTC for runes)
@@ -111,6 +112,7 @@ const result = await transaction.send(signedPsbt.toHex());
111
112
  const transaction = await client.createTransaction({
112
113
  address: "bc1p...",
113
114
  paymentAddress: "bc1q...",
115
+ // feeRate: BigInt(25),
114
116
  });
115
117
 
116
118
  // Add multiple intentions in a single transaction
@@ -193,7 +195,9 @@ function WalletComponent() {
193
195
 
194
196
  const executeComplexTransaction = async () => {
195
197
  // Create transaction with multiple pools
196
- const tx = await createTransaction();
198
+ const tx = await createTransaction({
199
+ // feeRate: BigInt(25), // Optional manual fee rate override
200
+ });
197
201
 
198
202
  // Add multiple intentions
199
203
  tx.addIntention({
@@ -283,7 +287,9 @@ function MyComponent({ children }) {
283
287
  value: depositBtcAmount,
284
288
  });
285
289
 
286
- const tx = await createTransaction();
290
+ const tx = await createTransaction({
291
+ // feeRate: BigInt(25),
292
+ });
287
293
 
288
294
  tx.addIntention({
289
295
  poolAddress: "bc1q...",
@@ -369,7 +375,7 @@ new ReeClient(config: Config)
369
375
 
370
376
  ##### Transaction Methods
371
377
 
372
- - `createTransaction(): Promise<Transaction>` - Create a transaction
378
+ - `createTransaction(params?: { feeRate?: bigint }): Promise<Transaction>` - Create a transaction with optional manual fee rate
373
379
 
374
380
  ### Transaction
375
381
 
package/dist/index.d.ts CHANGED
@@ -295,9 +295,10 @@ export declare class ReeClient {
295
295
  * @param params.involvedRuneId - Optional rune ID for rune swaps
296
296
  * @returns Transaction instance
297
297
  */
298
- createTransaction({ address, paymentAddress, }: {
298
+ createTransaction({ address, paymentAddress, feeRate, }: {
299
299
  address: string;
300
300
  paymentAddress: string;
301
+ feeRate?: number;
301
302
  }): Promise<Transaction>;
302
303
  }
303
304
 
@@ -310,7 +311,9 @@ declare interface ReeContextValue {
310
311
  address?: string;
311
312
  paymentAddress?: string;
312
313
  }) => void;
313
- createTransaction: () => Promise<Transaction>;
314
+ createTransaction: (params?: {
315
+ feeRate?: number;
316
+ }) => Promise<Transaction>;
314
317
  }
315
318
 
316
319
  export declare function ReeProvider({ children, config }: ReeProviderProps): JSX_2.Element;
@@ -499,6 +502,9 @@ export declare class Transaction {
499
502
  txid: string;
500
503
  fee: bigint;
501
504
  }>;
505
+ private static estimateTxVirtualSize;
506
+ private static parseAddressType;
507
+ private static varIntSize;
502
508
  /**
503
509
  * Submit the signed transaction to the orchestrator for execution
504
510
  * This method sends the signed PSBT along with the intention set to the orchestrator canister
@@ -522,6 +528,8 @@ export declare interface TransactionConfig {
522
528
  exchangeId: string;
523
529
  address: string;
524
530
  paymentAddress: string;
531
+ /** Optional manual fee rate in satoshis per virtual byte */
532
+ feeRate?: number;
525
533
  }
526
534
 
527
535
  declare interface UseBalanceOptions {