import { type ValidCreateActionArgs, type ValidProcessActionArgs } from '@bsv/sdk/wallet/validationHelpers'; import { AtomicBEEF, Beef, CreateActionResult, OutpointString, SendWithResult, SignableTransaction, TXIDHexString } from '@bsv/sdk'; import { AuthId, ReviewActionResult, StorageProcessActionResults } from '../../sdk/WalletStorage.interfaces'; import { PendingSignAction, Wallet } from '../../Wallet'; export interface CreateActionResultX extends CreateActionResult { txid?: TXIDHexString; tx?: AtomicBEEF; noSendChange?: OutpointString[]; sendWithResults?: SendWithResult[]; signableTransaction?: SignableTransaction; notDelayedResults?: ReviewActionResult[]; } export declare function createAction(wallet: Wallet, auth: AuthId, vargs: ValidCreateActionArgs): Promise; /** * Serialize the result BEEF, re-applying `options.knownTxids` on the way out. * * THE INVARIANT THIS PROTECTS: a declared ancestor may be omitted, but it must never be carried * in full with its own ancestry missing. A recipient can skip an absent or txid-only ancestor and * restore it from its own records; it can verify one carried complete. It can do neither with a * transaction that is present, unproven, and whose input sources are gone -- that is neither * provable nor marked as omitted. * * That third shape is reachable because the result BEEF is rebuilt after storage has already * trimmed it: `result.mergeBeef(inputBeef)` then `result.mergeTransaction(prior.tx)`. * `Beef.mergeTransactionGraph` merges every node it walks as a FULL entry, so wherever an input's * `sourceTransaction` is populated, a trimmed ancestor is re-materialized whole -- and the walk * then stops, because that source transaction does not carry its own sources. * * `verifyReturnedTxidOnlyAtomicBEEF` does not catch it: it asserts that every txid-only entry WAS * declared, not that every declared entry IS omitted. * * Trimming a CLONE is deliberate. `Wallet.createAction` merges the result BEEF into the wallet's * own retained BEEF (`this.beef.mergeBeefFromParty(...)`), which must keep the full ancestry for * later actions. `Beef.clone` is shallow, but `makeTxidOnly` replaces the array slot rather than * mutating the shared `BeefTx`, so the original is unaffected. * * Parameters: * - `beef`: assembled result BEEF; left untouched * - `txid`: subject transaction, the atomic root * - `knownTxids`: ancestors the recipient has said it already holds * * Returns: AtomicBEEF with each declared ancestor reduced to a txid-only entry. */ export declare function serializeResultBeef(beef: Beef, txid: TXIDHexString, knownTxids?: string[]): AtomicBEEF; export declare function processAction(prior: PendingSignAction | undefined, wallet: Wallet, auth: AuthId, vargs: ValidProcessActionArgs): Promise; //# sourceMappingURL=createAction.d.ts.map