Skip to main content

1. Build and simulate the contract call

Use an activated MPCVault wallet with XLM for fees and a deployed Mainnet counter contract exposing increment(). This example requires only source-account authorization. Using Stellar JavaScript SDK 17.x, build an invokeHostFunction operation and prepare the unsigned transaction:
prepareTransaction simulates the call and applies the returned authorization, resource data and fees. toXdr() returns the unsigned base64 envelope. Use txBase64 as <PREPARED_UNSIGNED_TRANSACTION_BASE64> below; MPCVault performs signing and broadcast. The MPCVault Resimulation endpoint currently returns no simulation for Soroban requests submitted through stellarSendCustom. Resolve simulation errors before submission. Archived contract data may require a RestoreFootprint transaction through the same custom signing flow; confirm it, then rebuild and simulate the original call.

2. Create a signing request

CreateSigningRequest
txBase64 is the standard base64-encoded XDR envelope. from selects the MPCVault wallet that signs it. Save the response’s signingRequest.uuid for execution.

3. Sign and track

Review the payload with GetSigningRequestDetails, then sign the request. MPCVault signs and broadcasts the transaction. Confirm the returned txHash with Stellar RPC. SUCCESS confirms on-chain execution. If the sequence or validity window is stale, rebuild and simulate the transaction before creating a new signing request. If ExecuteSigningRequests times out, check the existing request and its transaction hash before resubmitting.