Quickstart
Integrate the Morpheus Privacy Oracle into your Neo smart contracts in under 5 minutes. This guide covers the end-to-end flow from encrypting secrets to reading the TEE-verified result on-chain.
The Morpheus paymaster-backed AA relay path has already been validated end-to-end on Neo N3 testnet, including account registration, verifier update, paymaster approval, relay submission, and on-chain executeUserOp success.
Latest full-path relay tx: 0x057d4a581efbe815fad0148a3766284da2a33335e72fb50e54d476078d8f40d4
Open Paymaster GuideStep 1: Understand the Data Flow
The Morpheus network requires an asynchronous request-callback pattern. You must implement a callback function in your contract to receive the response.
Step 2: Seal Your Parameters (Off-Chain)
Before calling the Oracle contract, encrypt any sensitive API keys or parameters locally. The worker's active X25519 public key is exposed through the frontend proxy and also published on-chain in the Oracle registry metadata.
Step 3: Submit On-Chain Request
Build a JSON payload, then pass that payload bytestring to the Oracle contract. On Neo N3 the request currently costs 0.01 GAS of prepaid credit.
Step 4: Await the Relayer Callback
Once the transaction is mined, the Morpheus Relayer detects the event, forwards the encrypted payload to the Phala TEE, and then submits a callback transaction back to your contract containing the signed result envelope. If the upstream fetch or compute fails, the request should still finalize with a failure callback instead of being silently dropped.
Zero-Code Testing (Mainnet)
You don't need to write or deploy your own Consumer contract to test Morpheus. The selected Neo N3 Mainnet example callback consumer is 0x89b05cac00804648c666b47ecb1c57bc185821b7.
1. Submit Request: Generate your JSON payload using the Dashboard Oracle Builder. Then, invoke request on the MorpheusOracle (0x017520f068fd602082fe5572596185e62a4ad991) directly using NeoLine or Neo-CLI:
- Arg 1 (String):
"privacy_oracle"or"compute" - Arg 2 (ByteString): Your generated JSON payload string
- Arg 3 (Hash160):
0x89b05cac00804648c666b47ecb1c57bc185821b7 - Arg 4 (String):
"onOracleResult" - Fee: Attach exactly
0.01 GASto the transaction invocation.
2. Read Result: Check your transaction to get the requestId. Wait about 60 seconds, then perform a read-only invoke of getCallback(requestId) on the consumer script hash above to view your completely executed result envelope!