/** * Submission manager: builds and signs the deploy transaction with the fee- * paying deployer keypair, derives deterministic wallet addresses, and drives * the footprint-restore flow. * * Network submission itself is the server's job (`PasskeyServer` / relayer); this * manager owns the deployer keypair and the fee-payer signature that make a * deploy transaction submittable. * * @packageDocumentation */ import type { Keypair } from "@stellar/stellar-sdk"; import type { AssembledTransaction } from "@stellar/stellar-sdk/contract"; import type { Server } from "@stellar/stellar-sdk/rpc"; import type { Client as PasskeyClient } from "passkey-kit-sdk"; import { type RestorePreamble } from "../kit/tx-ops.js"; export interface SubmissionManagerDeps { rpc: Server; rpcUrl: string; networkPassphrase: string; walletWasmHash: string; deployerKeypair: Keypair; timeoutInSeconds: number; } export declare class SubmissionManager { private readonly deps; constructor(deps: SubmissionManagerDeps); /** The deployer's `G…` public key (fee source + derivation deployer). */ get deployerPublicKey(): string; /** Deterministically derive the wallet address for a passkey credential. */ deriveWalletAddress(keyId: Buffer): string; /** Build the wallet deploy transaction (initial Secp256r1 signer). */ buildDeployTransaction(keyId: Buffer, publicKey: Uint8Array): Promise>; /** * Sign a deploy transaction with the deployer keypair (the fee source) and * return the signed transaction XDR. * * The deploy carries source-account auth, so it is submitted through the * relayer's fee-bump (`{ xdr }`) path. A fee-bumped Soroban inner transaction * must have `fee == resourceFee` — the fee-bump supplies the inclusion fee — * or the relayer rejects it with a fee mismatch ("Transaction fee must be * equal to the resource fee"). The assembled fee is `inclusion + resource`, * so pin it to the resource fee BEFORE the deployer signs (the signature * commits to the fee). `TransactionBuilder.cloneFrom` drops * `SorobanTransactionData` (→ txMalformed), so set the fee field surgically on * the envelope and rebuild. */ signDeploy(tx: AssembledTransaction): Promise; /** Restore an archived footprint reported by simulation. */ restoreFootprint(restorePreamble: RestorePreamble): Promise; } //# sourceMappingURL=submission-manager.d.ts.map