import_strategy
Parse and validate a shared-strategy JSON. Return the validated strategy for read-only inspection; reject JSON containing addresses or tx hashes.
Instructions
Parse and validate a shared-strategy JSON produced by share_strategy (someone else's, or one the user generated earlier). Pass either the stringified form or the parsed object via json. Returns the validated SharedStrategy for read-only inspection — protocol allocations, per-position percentages, optional health-factor / fee-tier / APR metadata. The same redaction scan that runs on emit also runs on import — addresses or tx hashes anywhere in the imported JSON cause a RedactionError, so a malicious sender cannot smuggle a wallet identifier through fields the recipient might not eyeball. Strict shape validation: unknown fields tolerated (forward-compat for v2 schema additions) but required fields must be present and well-typed. Read-only — no on-chain side effect, no signing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | The strategy JSON. Pass either the stringified form (what `share_strategy` returns in `jsonString`) or the parsed object (what it returns in `strategy`). The same redaction scan that runs on emit also runs on import — addresses or tx hashes anywhere in the imported JSON cause a structured RedactionError. |