import { type ValidCreateActionArgs, type ValidCreateActionInput, type ValidCreateActionOutput } from '@bsv/sdk/wallet/validationHelpers'; import { Beef, OriginatorDomainNameStringUnder250Bytes, Script } from '@bsv/sdk'; import { StorageProvider } from '../StorageProvider'; import { AuthId, StorageCreateActionResult, StorageProvidedBy } from '../../sdk/WalletStorage.interfaces'; import { TableOutput } from '../schema/tables/TableOutput'; export declare function setDisableDoubleSpendCheckForTest(v: boolean): void; export declare function createAction(storage: StorageProvider, auth: AuthId, vargs: ValidCreateActionArgs, _originator?: OriginatorDomainNameStringUnder250Bytes): Promise; export interface XValidCreateActionInput extends ValidCreateActionInput { vin: number; lockingScript: Script; satoshis: number; output?: TableOutput; } export interface XValidCreateActionOutput extends ValidCreateActionOutput { vout: number; providedBy: StorageProvidedBy; purpose?: string; derivationSuffix?: string; keyOffset?: string; } /** Check known outputs for double-spend, mark them spent, return competing txid if found. */ export declare function markKnownInputsSpent(storage: StorageProvider, knownInputRows: Array<{ i: XValidCreateActionInput; o: TableOutput; }>, transactionId: number): Promise; /** * Convert vargs.outputs: * * lockingScript: HexString * satoshis: SatoshiValue * outputDescription: DescriptionString5to50Bytes * basket?: BasketStringUnder300Bytes * customInstructions?: string * tags: BasketStringUnderBytes[] * * to XValidCreateActionOutput (which aims for StorageCreateTransactionSdkOutput) * * adds: * vout: number * providedBy: StorageProvidedBy * purpose?: string * derivationSuffix?: string * keyOffset?: string * * @param vargs * @returns xoutputs */ export declare function validateRequiredOutputs(storage: StorageProvider, userId: number, vargs: ValidCreateActionArgs): XValidCreateActionOutput[]; /** * Verify that we are in posession of validity proof data for any inputs being proposed for a new transaction. * * `vargs.inputs` is the source of inputs. * `vargs.inputBEEF` may include new user supplied validity data. * 'vargs.options.trustSelf === 'known'` indicates whether we can rely on the storage database records. * * If there are no inputs, returns an empty `Beef`. * * Always pulls rawTx data into first level of validity chains so that parsed transaction data is available * and checks input sourceSatoshis as well as filling in input sourceLockingScript. * * This data may be pruned again before being returned to the user based on `vargs.options.knownTxids`. * * @param storage * @param userId * @param vargs * @returns {storageBeef} containing only validity proof data for only unknown required inputs. * @returns {beef} containing verified validity proof data for all required inputs. * @returns {xinputs} extended validated required inputs. */ export declare function validateRequiredInputs(storage: StorageProvider, userId: number, vargs: ValidCreateActionArgs): Promise<{ storageBeef: Beef; beef: Beef; xinputs: XValidCreateActionInput[]; walletSourcedInputTxids: string[]; }>; //# sourceMappingURL=createAction.d.ts.map