Skip to main content
Use your own wallet addresses and API credentials.

1. Build and simulate the contract call

Send 0.01 USDC from the API wallet using the USDC Stellar Asset Contract (SAC). Both wallets need a USDC trustline; the sender also needs XLM for fees. Build and simulate the transaction, then use the printed txBase64 below.
Use the latest Node.js LTS:
Review feeStroops before submitting the signing request. Use the newly printed txBase64 below. Its sequence and 900-second validity window belong to that build; the recorded transaction’s old XDR is not reusable. A restorePreamble requires a separate restoration transaction to be confirmed before rebuilding and simulating the transfer.

2. Create a signing request

Use the source API wallet’s vault UUID, API token and client signer key with CreateSigningRequest:
from is the same source wallet used to build the envelope. txBase64 is its unsigned, standard base64-encoded XDR. Save the returned signingRequest.uuid.

3. Review the simulation

The response includes signingRequest.simulation when a simulation is available. In REST, it is base64-encoded JSON. Decode it before signing:
If simulation is empty, call Resimulation while the request is pending, using the same API token:
The response’s simulation is also base64-encoded JSON and may be empty if no result is available. Check the simulation result and transaction details before signing.

4. Execute and confirm

Review the request, then execute its UUID:
MPCVault signs and broadcasts the transaction. Signing success alone does not confirm on-chain execution. Use the returned txHash to check the transaction and transfer:
If the sequence or validity window is stale, rebuild and simulate before creating a new signing request. If execution times out, check the existing request and its transaction hash before resubmitting.