Skip to main content
When your contract needs to send private data (e.g., PII — name, date of birth, email, etc.) to a third-party API, it does not read the values and inline them. Instead it uses the http-with-placeholders host interface: you put {{profile.<field>}} markers in the request, and the host resolves them from the calling user’s profile inside the enclave, just before the request goes out. The plaintext never enters your WASM.
Your contract in Rust:
Key points:
  • Synchronous. Like plain http, you get the upstream response back in the same invocation — there’s no deferred queue.
  • Profile access is gated by the user’s delegation. The markers resolve only when the calling agent is authorized to act for that user (see Invoke your contract). A marker your contract isn’t permitted to resolve fails with placeholder not permitted: <marker>.
  • Egress follows the same grant rule as http — see Outbound HTTP authenticated by user.
  • Markers reference the user profile schema — e.g. {{profile.first_name}}, {{profile.date_of_birth}}, {{profile.verified_contacts.email.value}}. Fields the schema doesn’t carry yet (passport, title) are supplied by your contract directly.