@xoxno/sdk-js 1.0.219 → 1.0.221

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.
@@ -1,3 +1,4 @@
1
+ import { rpc } from '@stellar/stellar-sdk';
1
2
  import type { FeeBumpTransaction, Transaction } from '@stellar/stellar-sdk';
2
3
  import type { BuiltStellarTx } from './lending.js';
3
4
  import { type StellarNetwork } from './contracts.js';
@@ -7,17 +8,21 @@ export interface StellarPrepareOptions {
7
8
  network?: StellarNetwork;
8
9
  /** Contract used to qualify errors before mapping controller/pool error codes. */
9
10
  invokedContractId?: string;
11
+ /**
12
+ * Extra CPU instructions requested from simulation (default 20,000,000).
13
+ * Covers the measured ~11.84M instruction increase across a ledger boundary
14
+ * for a ten-position accrual flow, with headroom.
15
+ * Must be an integer from 0 to 4294967295. Increase for measured execution
16
+ * variance; this margin does not guarantee coverage of later state changes
17
+ * or maximum-position flows. The resulting resources must fit network limits.
18
+ */
19
+ instructionLeeway?: number;
10
20
  }
11
- /**
12
- * The single `rpc.Server` capability the prepare helpers need. Declared
13
- * structurally instead of `Pick<rpc.Server, 'prepareTransaction'>` so the
14
- * published `.d.ts` references stellar-sdk's concrete `Transaction` exports
15
- * rather than its `rpc` namespace — the namespaced form trips
16
- * `dts-bundle-generator`'s external-type resolution under stellar-sdk v16. A
17
- * real `rpc.Server` satisfies this structurally, so call sites are unchanged.
18
- */
21
+ /** The simulation capability the prepare helpers need from `rpc.Server`. */
19
22
  export interface StellarTxPreparer {
20
- prepareTransaction(tx: Transaction | FeeBumpTransaction): Promise<Transaction>;
23
+ simulateTransaction(tx: Transaction | FeeBumpTransaction, resources?: {
24
+ cpuInstructions?: number;
25
+ }): Promise<rpc.Api.SimulateTransactionResponse>;
21
26
  }
22
27
  export declare function tagStellarInvokedContractError(contractId: string, error: unknown): Error;
23
28
  /**