mint_create_policy
Create a parametric insurance policy that pays a beneficiary when an oracle confirms a trigger condition, or refunds the insurer at expiry.
Instructions
Create a parametric insurance policy on the FoundryNet devnet program.
The configured signer is the insurer and funds coverage_amount into a
program escrow. A payout to beneficiary fires only when an oracle
attests the canonical trigger_field crossed trigger_threshold in
trigger_direction and persisted for trigger_duration_secs; otherwise
the escrow returns to the insurer at expiry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| machine | No | optional registered machine pubkey (defaults to the signer). | |
| policy_id | Yes | unique id, ≤ 32 bytes (PDA seed), e.g. "spindle-cnc-12". | |
| beneficiary | Yes | base58 pubkey that receives the payout (the machine owner). | |
| trigger_field | Yes | canonical field name, e.g. "spindle_load_pct". | |
| premium_amount | Yes | SPL base-unit monthly premium the operator pays. | |
| coverage_amount | Yes | SPL base-unit payout the insurer escrows. | |
| trigger_direction | No | 0 = above the threshold, 1 = below (default 0). | |
| trigger_threshold | Yes | scaled threshold, e.g. 9500 for 95.00%. | |
| policy_duration_secs | Yes | policy length in seconds. | |
| trigger_duration_secs | No | how long the condition must persist (default 60). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||