UNPKG

@wuwei-labs/srsly

Version:
4,748 lines 127 kB
{
  "address": "SRSLYxcFnjd5jG2DpJw4as6UEyjwJQK1U4J1TD1hvZH",
  "metadata": {
    "name": "srsly",
    "version": "5.2.1",
    "spec": "0.1.0",
    "description": "Space Rental from SLY",
    "repository": "https://github.com/wuwei-labs/srsly"
  },
  "instructions": [
    {
      "name": "accept_rental",
      "docs": [
        "Accept a rental contract by providing payment and specifying duration.",
        "Used when no active rental exists. For queued rentals, use reserve_rental.",
        "Optionally verifies an ed25519 discount signature via slyvault CPI."
      ],
      "discriminator": [192, 221, 241, 212, 141, 161, 36, 146],
      "accounts": [
        {
          "name": "borrower",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "borrower_state",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [98, 111, 114, 114, 111, 119, 101, 114, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "borrower"
              }
            ]
          }
        },
        {
          "name": "borrower_token_account",
          "writable": true
        },
        {
          "name": "fleet",
          "docs": ["Fleet validated by contract"],
          "writable": true
        },
        {
          "name": "expired_borrower_state",
          "docs": [
            "BorrowerState for the expired rental's borrower (required when inline replacement fires)"
          ],
          "writable": true,
          "optional": true
        },
        {
          "name": "contract",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 99, 111, 110, 116, 114, 97, 99, 116]
              },
              {
                "kind": "account",
                "path": "contract.fleet",
                "account": "ContractState"
              }
            ]
          }
        },
        {
          "name": "active_rental",
          "docs": ["Active rental slot"],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [97, 99, 116, 105, 118, 101]
              }
            ]
          }
        },
        {
          "name": "queued_rental",
          "docs": ["Queued rental slot"],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [113, 117, 101, 117, 101, 100]
              }
            ]
          }
        },
        {
          "name": "rental_authority",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114, 101, 110, 116, 97, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121
                ]
              }
            ]
          }
        },
        {
          "name": "contract_token_account",
          "writable": true
        },
        {
          "name": "vault",
          "writable": true
        },
        {
          "name": "vault_token_account",
          "writable": true
        },
        {
          "name": "referrer",
          "writable": true,
          "optional": true
        },
        {
          "name": "expired_referrer",
          "writable": true,
          "optional": true
        },
        {
          "name": "expired_borrower_token_account",
          "writable": true,
          "optional": true
        },
        {
          "name": "queued_borrower_profile",
          "optional": true
        },
        {
          "name": "queued_borrower_profile_faction",
          "optional": true
        },
        {
          "name": "contract_thread",
          "writable": true,
          "optional": true
        },
        {
          "name": "close_rental_fiber",
          "writable": true,
          "optional": true
        },
        {
          "name": "sage_program"
        },
        {
          "name": "slyvault_program",
          "address": "VLTukwau1TDGhQUgBJfSSojSMv3BfnMHKrewnGN98M3"
        },
        {
          "name": "antegen_program",
          "address": "AgTv5w1UvUb6zeqkThwMrztGu9hpepBu8YLghuR4dpSx"
        },
        {
          "name": "fiber_program",
          "address": "AgFv5afjW9DmSPkiEvJ1er5bAAmRUqaBeTB6Cr8e1hKx"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "duration",
          "type": "i64"
        },
        {
          "name": "discount_signature",
          "type": {
            "option": {
              "array": ["u8", 64]
            }
          }
        },
        {
          "name": "discount_member_nonce",
          "type": {
            "option": "u32"
          }
        },
        {
          "name": "discount_bps",
          "type": {
            "option": "u16"
          }
        },
        {
          "name": "discount_expires_at",
          "type": {
            "option": "i64"
          }
        }
      ]
    },
    {
      "name": "cancel_rental",
      "docs": [
        "Cancel an active rental with flexible timing.",
        "- cancel_delay = 0: Instant cancellation (fleet returned immediately)",
        "- cancel_delay > 0: Deferred cancellation (fleet stays with borrower until delay expires)"
      ],
      "discriminator": [97, 204, 63, 8, 84, 34, 28, 43],
      "accounts": [
        {
          "name": "borrower",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "borrower_state",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [98, 111, 114, 114, 111, 119, 101, 114, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "borrower"
              }
            ]
          }
        },
        {
          "name": "borrower_token_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "borrower"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28,
                  180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
                153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "contract",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 99, 111, 110, 116, 114, 97, 99, 116]
              },
              {
                "kind": "account",
                "path": "contract.fleet",
                "account": "ContractState"
              }
            ]
          }
        },
        {
          "name": "rental_state",
          "writable": true
        },
        {
          "name": "contract_token_account",
          "writable": true
        },
        {
          "name": "fleet"
        },
        {
          "name": "rental_authority",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114, 101, 110, 116, 97, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121
                ]
              }
            ]
          }
        },
        {
          "name": "contract_thread",
          "writable": true,
          "optional": true
        },
        {
          "name": "antegen_program",
          "docs": ["Thread Program for trigger update"],
          "address": "AgTv5w1UvUb6zeqkThwMrztGu9hpepBu8YLghuR4dpSx"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "cancel_delay",
          "type": "i64"
        }
      ]
    },
    {
      "name": "claim_borrower",
      "docs": [
        "Borrower claims accumulated ATLAS from their managed token account.",
        "Callable by borrower or admin (config.admin) as escape hatch."
      ],
      "discriminator": [110, 181, 137, 36, 71, 243, 38, 219],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "borrower",
          "writable": true
        },
        {
          "name": "borrower_state",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [98, 111, 114, 114, 111, 119, 101, 114, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "borrower"
              }
            ]
          }
        },
        {
          "name": "borrower_managed_token_account",
          "docs": ["Managed token account (ATA with borrower_state as authority)."],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "borrower_state"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28,
                  180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
                153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "destination_token_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "borrower"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28,
                  180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
                153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "claim_contract",
      "docs": [
        "Claim accumulated ATLAS from a specific contract's token account.",
        "Transfers owner_claimable amount from contract_token_account to owner's wallet."
      ],
      "discriminator": [159, 37, 59, 144, 75, 50, 2, 170],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "owner"
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "contract",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 99, 111, 110, 116, 114, 97, 99, 116]
              },
              {
                "kind": "account",
                "path": "contract.fleet",
                "account": "ContractState"
              }
            ]
          }
        },
        {
          "name": "contract_token_account",
          "writable": true
        },
        {
          "name": "destination_token_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "owner"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28,
                  180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
                153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "close_borrower",
      "docs": [
        "Close a borrower's managed token account and BorrowerState.",
        "Requires no active rentals and zero managed ATA balance (claim first)."
      ],
      "discriminator": [136, 79, 95, 44, 18, 151, 73, 199],
      "accounts": [
        {
          "name": "borrower",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "borrower_state",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [98, 111, 114, 114, 111, 119, 101, 114, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "borrower"
              }
            ]
          }
        },
        {
          "name": "borrower_managed_token_account",
          "docs": [
            "Managed token account (ATA with borrower_state as authority).",
            "Must have zero balance (claim first)."
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "borrower_state"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28,
                  180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
                153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "close_contract",
      "docs": [
        "Closes a rental contract. Contract must have no active rentals.",
        "Owner closes contract and claims all remaining payments",
        "Requires no active rental, reclaims all rent"
      ],
      "discriminator": [37, 244, 34, 168, 92, 202, 80, 106],
      "accounts": [
        {
          "name": "owner",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "contract",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 99, 111, 110, 116, 114, 97, 99, 116]
              },
              {
                "kind": "account",
                "path": "fleet"
              }
            ]
          }
        },
        {
          "name": "fleet",
          "docs": ["Fleet to close rental contract for"],
          "writable": true
        },
        {
          "name": "active_rental",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [97, 99, 116, 105, 118, 101]
              }
            ]
          }
        },
        {
          "name": "queued_rental",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [113, 117, 101, 117, 101, 100]
              }
            ]
          }
        },
        {
          "name": "contract_token_account",
          "writable": true
        },
        {
          "name": "owner_destination",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "owner"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28,
                  180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
                153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "queued_borrower_state",
          "docs": [
            "Queued borrower's state PDA for removing active rental tracking.",
            "Required when queued rental exists (not Available)."
          ],
          "writable": true,
          "optional": true
        },
        {
          "name": "queued_borrower_token_account",
          "docs": [
            "Queued borrower's token account for refunding escrow + deferred fee.",
            "Required when queued rental exists (not Available)."
          ],
          "writable": true,
          "optional": true
        },
        {
          "name": "rental_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114, 101, 110, 116, 97, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121
                ]
              }
            ]
          }
        },
        {
          "name": "sage_program"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "close_contract_thread",
      "docs": [
        "Close a contract's automation thread independently.",
        "Closes thread + fibers, returns SOL to owner. Contract continues in manual mode."
      ],
      "discriminator": [213, 35, 77, 150, 62, 109, 103, 248],
      "accounts": [
        {
          "name": "owner",
          "writable": true,
          "signer": true
        },
        {
          "name": "contract",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 99, 111, 110, 116, 114, 97, 99, 116]
              },
              {
                "kind": "account",
                "path": "contract.fleet",
                "account": "ContractState"
              }
            ]
          }
        },
        {
          "name": "rental_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114, 101, 110, 116, 97, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121
                ]
              }
            ]
          }
        },
        {
          "name": "thread",
          "docs": ["Validated by antegen's close_thread CPI (seeds check)."],
          "writable": true
        },
        {
          "name": "antegen_program",
          "address": "AgTv5w1UvUb6zeqkThwMrztGu9hpepBu8YLghuR4dpSx"
        },
        {
          "name": "fiber_program",
          "address": "AgFv5afjW9DmSPkiEvJ1er5bAAmRUqaBeTB6Cr8e1hKx"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "close_rental",
      "docs": [
        "Close a completed or expired rental, optionally activating a queued rental inline.",
        "Serves both fiber 1 (automated) and manual fallback.",
        "Returns Signal for fiber dispatch (manual callers ignore return_data)."
      ],
      "discriminator": [179, 188, 113, 211, 41, 232, 51, 51],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "contract",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 99, 111, 110, 116, 114, 97, 99, 116]
              },
              {
                "kind": "account",
                "path": "contract.fleet",
                "account": "ContractState"
              }
            ]
          }
        },
        {
          "name": "rental_state",
          "writable": true
        },
        {
          "name": "borrower_state",
          "writable": true
        },
        {
          "name": "fleet",
          "docs": ["Fleet validated by contract"],
          "writable": true
        },
        {
          "name": "game_id"
        },
        {
          "name": "starbase"
        },
        {
          "name": "starbase_player",
          "writable": true
        },
        {
          "name": "contract_token_account",
          "docs": ["Contract's escrow token account (source for fee flush)"],
          "writable": true
        },
        {
          "name": "vault",
          "writable": true
        },
        {
          "name": "vault_token_account",
          "writable": true
        },
        {
          "name": "referrer",
          "writable": true,
          "optional": true
        },
        {
          "name": "borrower_token_account",
          "writable": true,
          "optional": true
        },
        {
          "name": "queued_rental",
          "writable": true,
          "optional": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [113, 117, 101, 117, 101, 100]
              }
            ]
          }
        },
        {
          "name": "queued_borrower_profile",
          "optional": true
        },
        {
          "name": "queued_borrower_profile_faction",
          "optional": true
        },
        {
          "name": "contract_thread",
          "writable": true,
          "optional": true
        },
        {
          "name": "close_rental_fiber",
          "writable": true,
          "optional": true
        },
        {
          "name": "rental_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114, 101, 110, 116, 97, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121
                ]
              }
            ]
          }
        },
        {
          "name": "sage_program"
        },
        {
          "name": "slyvault_program",
          "address": "VLTukwau1TDGhQUgBJfSSojSMv3BfnMHKrewnGN98M3"
        },
        {
          "name": "fiber_program",
          "address": "AgFv5afjW9DmSPkiEvJ1er5bAAmRUqaBeTB6Cr8e1hKx"
        },
        {
          "name": "antegen_program",
          "address": "AgTv5w1UvUb6zeqkThwMrztGu9hpepBu8YLghuR4dpSx"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [],
      "returns": {
        "defined": {
          "name": "Signal"
        }
      }
    },
    {
      "name": "create_borrower",
      "docs": [
        "Create a new BorrowerState account.",
        "Must be called before any rental operations (rental_accept, rental_reserve)."
      ],
      "discriminator": [203, 62, 59, 250, 206, 172, 88, 214],
      "accounts": [
        {
          "name": "borrower",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "borrower_state",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [98, 111, 114, 114, 111, 119, 101, 114, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "borrower"
              }
            ]
          }
        },
        {
          "name": "managed_token_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "borrower_state"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28,
                  180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
                153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "create_config",
      "docs": [
        "Create global program configuration. Called once during deployment.",
        "Note: Vault members must be added separately via slyvault member_init + member_add",
        "",
        "# Arguments",
        "- `recent_slot`: The slot used to derive the lookup table address"
      ],
      "discriminator": [201, 207, 243, 114, 75, 111, 47, 189],
      "accounts": [
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "vault",
          "writable": true
        },
        {
          "name": "vault_token_account",
          "writable": true
        },
        {
          "name": "lookup_table",
          "writable": true
        },
        {
          "name": "sage_program"
        },
        {
          "name": "antegen_program"
        },
        {
          "name": "alt_program",
          "address": "AddressLookupTab1e1111111111111111111111111"
        },
        {
          "name": "srsly_program",
          "address": "SRSLYxcFnjd5jG2DpJw4as6UEyjwJQK1U4J1TD1hvZH"
        },
        {
          "name": "slyvault_program",
          "address": "VLTukwau1TDGhQUgBJfSSojSMv3BfnMHKrewnGN98M3"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "recent_slot",
          "type": "u64"
        }
      ]
    },
    {
      "name": "create_contract",
      "docs": ["Create a new rental contract for a fleet with specified terms."],
      "discriminator": [244, 48, 244, 178, 216, 88, 122, 52],
      "accounts": [
        {
          "name": "owner",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "fleet",
          "docs": ["Fleet to create rental contract for"],
          "writable": true
        },
        {
          "name": "owner_profile"
        },
        {
          "name": "game_id"
        },
        {
          "name": "contract",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 99, 111, 110, 116, 114, 97, 99, 116]
              },
              {
                "kind": "account",
                "path": "fleet"
              }
            ]
          }
        },
        {
          "name": "active_rental",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [97, 99, 116, 105, 118, 101]
              }
            ]
          }
        },
        {
          "name": "queued_rental",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [113, 117, 101, 117, 101, 100]
              }
            ]
          }
        },
        {
          "name": "contract_token_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28,
                  180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
                153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "rental_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114, 101, 110, 116, 97, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121
                ]
              }
            ]
          }
        },
        {
          "name": "sage_program"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "rate",
          "type": "u64"
        },
        {
          "name": "duration_min",
          "type": "i64"
        },
        {
          "name": "duration_max",
          "type": "i64"
        },
        {
          "name": "owner_key_index",
          "type": "u16"
        },
        {
          "name": "cancel_delay_min",
          "type": "i64"
        },
        {
          "name": "reservations_disabled",
          "type": "bool"
        },
        {
          "name": "contested_threshold",
          "type": "u8"
        }
      ]
    },
    {
      "name": "create_contract_thread",
      "docs": [
        "Create per-contract automation thread with fiber-based dispatch.",
        "Creates thread (fiber 0: controller) + fiber 1 (rental_close).",
        "Activation is handled inline by rental_close. Owner-managed."
      ],
      "discriminator": [233, 57, 214, 37, 246, 233, 143, 139],
      "accounts": [
        {
          "name": "payer",
          "docs": ["Payer must be contract owner"],
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "contract",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 99, 111, 110, 116, 114, 97, 99, 116]
              },
              {
                "kind": "account",
                "path": "contract.fleet",
                "account": "ContractState"
              }
            ]
          }
        },
        {
          "name": "rental_authority",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114, 101, 110, 116, 97, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121
                ]
              }
            ]
          }
        },
        {
          "name": "contract_thread",
          "writable": true
        },
        {
          "name": "fiber_0",
          "writable": true
        },
        {
          "name": "close_rental_fiber",
          "writable": true
        },
        {
          "name": "owner"
        },
        {
          "name": "contract_token_account",
          "docs": ["Contract's escrow token account (validated here, passed to contract_process)"],
          "writable": true
        },
        {
          "name": "owner_token_account",
          "docs": [
            "Owner's ATLAS destination (created here, used by contract_process for auto-transfer)"
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "owner"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28,
                  180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "mint"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
                153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "active_rental",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [97, 99, 116, 105, 118, 101]
              }
            ]
          }
        },
        {
          "name": "queued_rental",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [113, 117, 101, 117, 101, 100]
              }
            ]
          }
        },
        {
          "name": "sage_program"
        },
        {
          "name": "antegen_program",
          "address": "AgTv5w1UvUb6zeqkThwMrztGu9hpepBu8YLghuR4dpSx"
        },
        {
          "name": "fiber_program",
          "address": "AgFv5afjW9DmSPkiEvJ1er5bAAmRUqaBeTB6Cr8e1hKx"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "lamports",
          "type": "u64"
        },
        {
          "name": "payments_freq",
          "type": "string"
        }
      ]
    },
    {
      "name": "delete_borrower",
      "docs": [
        "Delete borrower state (admin-only for schema migrations).",
        "Uses UncheckedAccount to bypass deserialization for old-format accounts."
      ],
      "discriminator": [89, 147, 185, 127, 231, 56, 190, 45],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "docs": ["Bypassed when admin is AUTHORIZED_INITIALIZER (break-glass)."],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "borrower",
          "writable": true
        },
        {
          "name": "borrower_state",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "delete_config",
      "docs": [
        "Delete global program configuration. Only callable by AUTHORIZED_INITIALIZER.",
        "WARNING: Destructive operation - prevents all program operations until re-initialized.",
        "Use for devnet/testnet when ConfigState schema changes."
      ],
      "discriminator": [219, 237, 110, 222, 219, 239, 70, 237],
      "accounts": [
        {
          "name": "authority",
          "writable": true,
          "signer": true,
          "address": "5xoQptcACAAAwPunPAgNgoGfEqywR5VyZdUdzGpaTp2z"
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "mint"
        },
        {
          "name": "vault",
          "writable": true
        },
        {
          "name": "vault_token_account",
          "writable": true
        },
        {
          "name": "srsly_program",
          "address": "SRSLYxcFnjd5jG2DpJw4as6UEyjwJQK1U4J1TD1hvZH"
        },
        {
          "name": "slyvault_program",
          "address": "VLTukwau1TDGhQUgBJfSSojSMv3BfnMHKrewnGN98M3"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "delete_contract",
      "docs": ["Delete contract state (dev-only for schema migrations)"],
      "discriminator": [189, 115, 12, 22, 241, 49, 35, 6],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "docs": ["Bypassed when admin is AUTHORIZED_INITIALIZER (break-glass)."],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "owner",
          "writable": true
        },
        {
          "name": "contract",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "delete_contract_thread",
      "docs": [
        "Admin-only thread deletion for schema migrations / redeployments.",
        "Like close_contract_thread but uses admin auth and skips contract deserialization."
      ],
      "discriminator": [113, 179, 247, 242, 60, 125, 240, 68],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "docs": ["Bypassed when admin is AUTHORIZED_INITIALIZER (break-glass)."],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "rental_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114, 101, 110, 116, 97, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121
                ]
              }
            ]
          }
        },
        {
          "name": "thread",
          "writable": true
        },
        {
          "name": "antegen_program",
          "address": "AgTv5w1UvUb6zeqkThwMrztGu9hpepBu8YLghuR4dpSx"
        },
        {
          "name": "fiber_program",
          "address": "AgFv5afjW9DmSPkiEvJ1er5bAAmRUqaBeTB6Cr8e1hKx"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "delete_rental",
      "docs": [
        "Delete rental state (admin-only for schema migrations).",
        "After deletion, use release_rental to clean up thread + SAGE fleet."
      ],
      "discriminator": [252, 24, 115, 220, 135, 174, 69, 172],
      "accounts": [
        {
          "name": "admin",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "docs": ["Bypassed when admin is AUTHORIZED_INITIALIZER (break-glass)."],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "borrower",
          "docs": ["If borrower is system_program::ID (empty slot), lamports go to admin instead."],
          "writable": true
        },
        {
          "name": "rental_state",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "invalidate_rental",
      "docs": [
        "Invalidate a fleet's rental status in SAGE when contract doesn't exist.",
        "Use when fleet is stuck but borrower is unknown and contract was never created."
      ],
      "discriminator": [180, 183, 106, 153, 255, 8, 232, 178],
      "accounts": [
        {
          "name": "signer",
          "writable": true,
          "signer": true
        },
        {
          "name": "fleet",
          "docs": [
            "Fleet to release from rental control",
            "- Must be in rental mode (sub_profile != default)",
            "- SRSLY must be the invalidator"
          ],
          "writable": true
        },
        {
          "name": "game_id"
        },
        {
          "name": "starbase"
        },
        {
          "name": "starbase_player",
          "writable": true
        },
        {
          "name": "contract",
          "docs": ["If contract exists, use rental_release instead"],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 99, 111, 110, 116, 114, 97, 99, 116]
              },
              {
                "kind": "account",
                "path": "fleet"
              }
            ]
          }
        },
        {
          "name": "rental_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114, 101, 110, 116, 97, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121
                ]
              }
            ]
          }
        },
        {
          "name": "sage_program"
        }
      ],
      "args": []
    },
    {
      "name": "process_contract",
      "docs": [
        "Controller fiber (fiber 0) — checks state, settles escrow, dispatches.",
        "Called by antegen thread executor automatically."
      ],
      "discriminator": [203, 109, 39, 44, 150, 50, 210, 78],
      "accounts": [
        {
          "name": "contract_thread",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "contract",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 99, 111, 110, 116, 114, 97, 99, 116]
              },
              {
                "kind": "account",
                "path": "contract.fleet",
                "account": "ContractState"
              }
            ]
          }
        },
        {
          "name": "active_rental",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [97, 99, 116, 105, 118, 101]
              }
            ]
          }
        },
        {
          "name": "queued_rental",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [113, 117, 101, 117, 101, 100]
              }
            ]
          }
        },
        {
          "name": "owner",
          "writable": true
        },
        {
          "name": "fleet",
          "docs": ["Fleet for SAGE invalidation on close"],
          "writable": true
        },
        {
          "name": "contract_token_account",
          "docs": ["Contract's escrow token account (source of tokens)"],
          "writable": true
        },
        {
          "name": "owner_token_account",
          "docs": ["Owner's destination token account (created by contract_thread)"],
          "writable": true
        },
        {
          "name": "rental_authority",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114, 101, 110, 116, 97, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121
                ]
              }
            ]
          }
        },
        {
          "name": "sage_program"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [],
      "returns": {
        "defined": {
          "name": "Signal"
        }
      }
    },
    {
      "name": "release_rental",
      "docs": [
        "Release a fleet from rental control regardless of state.",
        "Emergency function to free stuck fleets by invalidating rental in SAGE."
      ],
      "discriminator": [99, 35, 221, 147, 185, 205, 23, 12],
      "accounts": [
        {
          "name": "signer",
          "writable": true,
          "signer": true
        },
        {
          "name": "fleet",
          "docs": [
            "Fleet to release from rental control",
            "- Must be in rental mode (sub_profile != default)",
            "- SRSLY must be the invalidator"
          ],
          "writable": true
        },
        {
          "name": "game_id"
        },
        {
          "name": "starbase"
        },
        {
          "name": "starbase_player",
          "writable": true
        },
        {
          "name": "contract",
          "docs": [
            "Contract must exist - if contract doesn't exist, use rental_invalidate instead",
            "Constraint ensures no active rental (both slots empty)"
          ],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 99, 111, 110, 116, 114, 97, 99, 116]
              },
              {
                "kind": "account",
                "path": "fleet"
              }
            ]
          }
        },
        {
          "name": "rental_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114, 101, 110, 116, 97, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121
                ]
              }
            ]
          }
        },
        {
          "name": "sage_program"
        }
      ],
      "args": []
    },
    {
      "name": "reserve_rental",
      "docs": [
        "Reserve a rental and queue it for activation when the current rental ends.",
        "",
        "Combines the old reserve + claim flow: the reservation IS the queued rental.",
        "Escrow is transferred immediately and the rental is queued for activation.",
        "",
        "# Arguments",
        "* `bid_points` - Points to bid (burned; 0 if ATLAS bid)",
        "* `bid_atlas` - ATLAS premium to bid (0 if points bid)",
        "* `duration` - Rental duration in seconds"
      ],
      "discriminator": [5, 180, 4, 150, 64, 120, 189, 128],
      "accounts": [
        {
          "name": "challenger",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "contract",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 99, 111, 110, 116, 114, 97, 99, 116]
              },
              {
                "kind": "account",
                "path": "contract.fleet",
                "account": "ContractState"
              }
            ]
          }
        },
        {
          "name": "contract_thread",
          "writable": true
        },
        {
          "name": "close_rental_fiber",
          "writable": true
        },
        {
          "name": "contract_token_account",
          "docs": ["Contract's token account for ATLAS escrow"],
          "writable": true
        },
        {
          "name": "defender_state",
          "docs": ["Defender's borrower state (required when knocking off a defender)"],
          "writable": true,
          "optional": true
        },
        {
          "name": "defender_managed_token_account",
          "docs": [
            "Defender's managed token account (ATA of defender's BorrowerState PDA)",
            "Used to refund ATLAS when knocking off defender"
          ],
          "writable": true,
          "optional": true
        },
        {
          "name": "challenger_state",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [98, 111, 114, 114, 111, 119, 101, 114, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "challenger"
              }
            ]
          }
        },
        {
          "name": "challenger_token_account",
          "docs": [
            "Challenger's ATLAS token account (funding source -- required for escrow transfer)"
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "challenger"
              },
              {
                "kind": "const",
                "value": [
                  6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28,
                  180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169
                ]
              },
              {
                "kind": "account",
                "path": "config.atlas_mint",
                "account": "ConfigState"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19,
                153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89
              ]
            }
          }
        },
        {
          "name": "active_rental",
          "docs": ["Active rental slot (read-only, needed for fiber rebuild)"],
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [97, 99, 116, 105, 118, 101]
              }
            ]
          }
        },
        {
          "name": "rental_state",
          "docs": [
            "Queued rental state PDA — must be Available OR occupied by defender being knocked off"
          ],
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 115, 116, 97, 116, 101]
              },
              {
                "kind": "account",
                "path": "contract"
              },
              {
                "kind": "const",
                "value": [113, 117, 101, 117, 101, 100]
              }
            ]
          }
        },
        {
          "name": "referrer",
          "writable": true,
          "optional": true
        },
        {
          "name": "rental_authority",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114, 101, 110, 116, 97, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121
                ]
              }
            ]
          }
        },
        {
          "name": "sage_program"
        },
        {
          "name": "antegen_program",
          "address": "AgTv5w1UvUb6zeqkThwMrztGu9hpepBu8YLghuR4dpSx"
        },
        {
          "name": "fiber_program",
          "address": "AgFv5afjW9DmSPkiEvJ1er5bAAmRUqaBeTB6Cr8e1hKx"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "bid_points",
          "type": "u64"
        },
        {
          "name": "bid_atlas",
          "type": "u64"
        },
        {
          "name": "duration",
          "type": "i64"
        }
      ]
    },
    {
      "name": "set_delegate",
      "docs": [
        "Set or remove a delegate address that can update the contract rate.",
        "Only the owner can set/remove delegates."
      ],
      "discriminator": [242, 30, 46, 76, 108, 235, 128, 181],
      "accounts": [
        {
          "name": "owner",
          "writable": true,
          "signer": true,
          "relations": ["contract"]
        },
        {
          "name": "contract",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "delegate",
          "type": {
            "option": "pubkey"
          }
        }
      ]
    },
    {
      "name": "update_config",
      "docs": ["Update program configuration. Only callable by config authority."],
      "discriminator": [29, 158, 252, 191, 10, 83, 219, 99],
      "accounts": [
        {
          "name": "admin",
          "signer": true,
          "relations": ["config"]
        },
        {
          "name": "config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "ConfigUpdateParams"
            }
          }
        }
      ]
    },
    {
      "name": "update_contract",
      "docs": [
        "Update rental contract settings.",
        "Owner can update all settings, delegate can only update rate."
      ],
      "discriminator": [78, 184, 162, 174, 233, 5, 40, 82],
      "accounts": [
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "contract",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "ContractUpdateParams"
            }
          }
        }
      ]
    },
    {
      "name": "update_contract_thread",
      "docs": ["Fund a contract thread with SOL and/or update settlement frequency."],
      "discriminator": [183, 75, 119, 98, 134, 24, 187, 91],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "config",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [99, 111, 110, 102, 105, 103]
              }
            ]
          }
        },
        {
          "name": "contract",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [114, 101, 110, 116, 97, 108, 95, 99, 111, 110, 116, 114, 97, 99, 116]
              },
              {
                "kind": "account",
                "path": "contract.fleet",
                "account": "ContractState"
              }
            ]
          }
        },
        {
          "name": "rental_authority",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  114, 101, 110, 116, 97, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121
                ]
              }
            ]
          }
        },
        {
          "name": "contract_thread",
          "writable": true
        },
        {
          "name": "antegen_program",
          "address": "AgTv5w1UvUb6zeqkThwMrztGu9hpepBu8YLghuR4dpSx"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "lamports",
          "type": "u64"
        },
        {
          "name": "payments_freq",
          "type": {
            "option": "string"
          }
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "BorrowerState",
      "discriminator": [160, 47, 174, 209, 255, 213, 193, 235]
    },
    {
      "name": "ConfigState",
      "discriminator": [193, 77, 160, 128, 208, 254, 180, 135]
    },
    {
      "name": "ContractState",
      "discriminator": [190, 138, 10, 223, 189, 116, 222, 115]
    },
    {
      "name": "RentalState",
      "discriminator": [97, 162, 29, 222, 251, 251, 180, 244]
    }
  ],
  "events": [
    {
      "name": "FeesPaid",
      "discriminator": [71, 98, 195, 210, 40, 81, 73, 159]
    },
    {
      "name": "OwnerPaid",
      "discriminator": [135, 160, 107, 250, 183, 233, 175, 124]
    },
    {
      "name": "RentalAccepted",
      "discriminator": [72, 237, 15, 82, 177, 184, 244, 201]
    },
    {
      "name": "RentalCancelled",
      "discriminator": [7, 110, 25, 158, 197, 48, 12, 238]
    },
    {
      "name": "RentalClosed",
      "discriminator": [77, 252, 165, 5, 168, 29, 237, 40]
    },
    {
      "name": "RentalSettled",
      "discriminator": [170, 51, 180, 247, 186, 122, 168, 59]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "Unauthorized",
      "msg": "Unauthorized to use this instruction. Check that you have the correct authority."
    },
    {
      "code": 6001,
      "name": "InvalidDurationMinimum",
      "msg": "Invalid duration minimum. Must be between configured minimum and the contract's duration maximum."
    },
    {
      "code": 6002,
      "name": "InvalidDurationMaximum",
      "msg": "Invalid duration maximum. Must be greater than or equal to duration minimum and less than config maximum."
    },
    {
      "code": 6003,
      "name": "InvalidRateCalculation",
      "msg": "Invalid payment amount (rate * payment periods). Check your calculation."
    },
    {
      "code": 6004,
      "name": "FleetAlreadyRented",
      "msg": "Fleet is already rented. Wait for current rental to end or be cancelled."
    },
    {
      "code": 6005,
      "name": "InvalidRate",
      "msg": "Invalid rental rate. Rate must be greater than or equal to 0 ATLAS."
    },
    {
      "code": 6006,
      "name": "InvalidPaymentFrequency",
      "msg": "Invalid payment frequency. Must be one of the allowed frequencies configured in the program."
    },
    {
      "code": 6007,
      "name": "InsufficientCancellationNotice",
      "msg": "Insufficient cancellation notice. Must cancel at least one payment period before rental ends."
    },
    {
      "code": 6008,
      "name": "DelayExceedsTimeRemaining",
      "msg": "Cancellation delay exceeds time remaining. cancel_delay must be <= time remaining until rental ends."
    },
    {
      "code": 6009,
      "name": "ContractClosed",
      "msg": "Contract is closed and no longer accepts rentals. Find another available fleet."
    },
    {
      "code": 6010,
      "name": "InvalidThreadContext",
      "msg": "Thread has invalid execution context. Thread may have been corrupted or incorrectly initialized."
    },
    {
      "code": 6011,
      "name": "RentalIsActive",
      "msg": "Rental is still active. Wait for it to expire or use rental_cancel to end early."
    },
    {
      "code": 6012,
      "name": "RentalStateExists",
      "msg": "Rental state still exists. Cannot reset fleet until rental state is properly closed."
    },
    {
      "code": 6013,
      "name": "InvalidFeeRate",
      "msg": "Invalid fee rate. Service fee must be <= 10% (1000 bps), base_bps must be > 0."
    },
    {
      "code": 6014,
      "name": "InvalidRentalDuration",
      "msg": "Invalid rental duration. Min >= 1 hour, max >= min, max <= 3 months."
    },
    {
      "code": 6015,
      "name": "UnauthorizedConfigUpdate",
      "msg": "Only the config authority can update settings. Check the authority address."
    },
    {
      "code": 6016,
      "name": "InvalidAtlasConversionRate",
      "msg": "Invalid ATLAS conversion rate. Must be greater than 0 (typically 100,000,000 for 1 ATLAS)."
    },
    {
      "code": 6017,
      "name": "AccountOwnedByWrongProgram",
      "msg": "Account is owned by a different program than expected. Check account initialization."
    },
    {
      "code": 6018,
      "name": "InvalidDurationMinimumAlignment",
      "msg": "Duration minimum must be a multiple of the payment frequency (e.g., daily = 86400 seconds)."
    },
    {
      "code": 6019,
      "name": "InvalidDurationMaximumAlignment",
      "msg": "Duration maximum must be a multiple of the payment frequency (e.g., daily = 86400 seconds)."
    },
    {
      "code": 6020,
      "name": "RentalExpired",
      "msg": "Rental has expired. Use rental_close instruction to process final payment and clean up."
    },
    {
      "code": 6021,
      "name": "InvalidThread",
      "msg": "Thread account does not match the rental state's thread reference. Use the correct thread."
    },
    {
      "code": 6022,
      "name": "RentalAlreadyCancelled",
      "msg": "Rental has already been cancelled. No further action needed."
    },
    {
      "code": 6023,
      "name": "InvalidStarbase",
      "msg": "Invalid starbase - doesn't match stored value in rental state."
    },
    {
      "code": 6024,
      "name": "InvalidStarbasePlayer",
      "msg": "Invalid starbase player - doesn't match stored value in rental state."
    },
    {
      "code": 6025,
      "name": "InactiveReferrer",
      "msg": "Referral is not active"
    },
    {
      "code": 6026,
      "name": "InvalidAuthority",
      "msg": "Invalid authority for this operation"
    },
    {
      "code": 6027,
      "name": "InvalidSplitPercentages",
      "msg": "Payment split percentages must sum to 100%"
    },
    {
      "code": 6028,
      "name": "InvalidSplitConfig",
      "msg": "Invalid payment split configuration"
    },
    {
      "code": 6029,
      "name": "ReferrerAlreadySet",
      "msg": "Referrer has already been set and cannot be changed"
    },
    {
      "code": 6030,
      "name": "ExpiredBorrowerStateRequired",
      "msg": "Please provide the expired borrower's state"
    },
    {
      "code": 6031,
      "name": "NoReferrerSet",
      "msg": "Borrower has not set a referrer"
    },
    {
      "code": 6032,
      "name": "ReferrerMismatch",
      "msg": "Referrer does not match borrower's chosen referrer"
    },
    {
      "code": 6033,
      "name": "InvalidRecipient",
      "msg": "Invalid recipient for claim"
    },
    {
      "code": 6034,
      "name": "NoClaimableBalance",
      "msg": "No claimable balance available"
    },
    {
      "code": 6035,
      "name": "InvalidTokenAccount",
      "msg": "Invalid token account - same as current"
    },
    {
      "code": 6036,
      "name": "InvalidOwnerTokenAccount",
      "msg": "Owner token account address does not match the address stored in rental state"
    },
    {
      "code": 6037,
      "name": "MissingThreadAccounts",
      "msg": "Missing required accounts for thread creation"
    },
    {
      "code": 6038,
      "name": "InvalidClaimSchedule",
      "msg": "Invalid claim schedule. Must be @daily, @weekly, or @monthly"
    },
    {
      "code": 6039,
      "name": "InvalidPercentage",
      "msg": "Invalid percentage value. Must be <= 10000 basis points (100%)"
    },
    {
      "code": 6040,
      "name": "FleetHasActiveReservation",
      "msg": "Fleet has an active reservation. Must wait for exclusive window to expire or be the reservation holder."
    },
    {
      "code": 6041,
      "name": "InvalidReservationHolder",
      "msg": "Invalid reservation holder specified"
    },
    {
      "code": 6042,
      "name": "ContractNotRented",
      "msg": "Contract is not currently rented. Only active rentals can be reserved."
    },
    {
      "code": 6043,
      "name": "NotReservationHolder",
      "msg": "Not the current reservation holder"
    },
    {
      "code": 6044,
      "name": "ExclusiveWindowActive",
      "msg": "Exclusive reservation window is active. Cannot process new reservation."
    },
    {
      "code": 6045,
      "name": "InsufficientPointsForClaim",
      "msg": "Insufficient points to claim the reservation"
    },
    {
      "code": 6046,
      "name": "InvalidNonce",
      "msg": "Invalid nonce for reservation PDA"
    },
    {
      "code": 6047,
      "name": "InvalidCloseTarget",
      "msg": "Invalid close target for reservation account"
    },
    {
      "code": 6048,
      "name": "ReservationStillActive",
      "msg": "Reservation is still active. Must wait for expiry."
    },
    {
      "code": 6049,
      "name": "InsufficientPointsToReserve",
      "msg": "Insufficient points to take over the reservation"
    },
    {
      "code": 6050,
      "name": "InvalidReservationRateMultiplier",
      "msg": "Invalid reservation rate multiplier. Must be at least 10000 basis points (100%)."
    },
    {
      "code": 6051,
      "name": "ExcessiveReservationRateMultiplier",
      "msg": "Excessive reservation rate multiplier. Cannot exceed 20000 basis points (200%)."
    },
    {
      "code": 6052,
      "name": "ReservationsDisabled",
      "msg": "Reservation system is disabled"
    },
    {
      "code": 6053,
      "name": "MissingRequiredAccount",
      "msg": "Missing required account for operation"
    },
    {
      "code": 6054,
      "name": "InvalidConfig",
      "msg": "Invalid configuration parameter"
    },
    {
      "code": 6055,
      "name": "InvalidDefender",
      "msg": "Invalid defender - does not match current reservation holder"
    },
    {
      "code": 6056,
      "name": "InvalidSplit",
      "msg": "Invalid split - split authority not found in payment splits"
    },
    {
      "code": 6057,
      "name": "InvalidReferralRate",
      "msg": "Invalid referral rate configuration"
    },
    {
      "code": 6058,
      "name": "ReferralNotEnabled",
      "msg": "Referrals are not enabled for this split"
    },
    {
      "code": 6059,
      "name": "NoFeesToClaim",
      "msg": "No fees available to claim"
    },
    {
      "code": 6060,
      "name": "ActiveRentalExist",
      "msg": "Cannot close account while active rental(s) exist"
    },
    {
      "code": 6061,
      "name": "CannotReleaseActiveRental",
      "msg": "Cannot release an active rental. Either rental state must be closed or contract must show no active rental."
    },
    {
      "code": 6062,
      "name": "CloseRentalBeforeContract",
      "msg": "Cannot close contract while rental is active. Close the rental first using rental_close."
    },
    {
      "code": 6063,
      "name": "InstantCancelNotAllowed",
      "msg": "Instant cancellation not allowed for this contract. Owner must enable allow_instant_cancel."
    },
    {
      "code": 6064,
      "name": "CancelNotAllowed",
      "msg": "Cancel delay equals time remaining — cancellation would have no effect."
    },
    {
      "code": 6065,
      "name": "ContractReservationsDisabled",
      "msg": "Reservations disabled for this contract. Owner has opted out of reservation system."
    },
    {
      "code": 6066,
      "name": "AtlasReservationRequiresTokenAccounts",
      "msg": "ATLAS reservation requires token accounts"
    },
    {
      "code": 6067,
      "name": "InvalidAtlasAmount",
      "msg": "Invalid ATLAS amount for reservation (must be > 0)"
    },
    {
      "code": 6068,
      "name": "ContractExists",
      "msg": "Contract exists for this fleet. Use rental_release instead of rental_invalidate."
    },
    {
      "code": 6069,
      "name": "FleetNotRented",
      "msg": "Fleet is not currently rented (sub_profile is empty)."
    },
    {
      "code": 6070,
      "name": "NotCrownedWinner",
      "msg": "Not the crowned winner. Only the winner from reservation can claim during the claim window."
    },
    {
      "code": 6071,
      "name": "ClaimWindowExpired",
      "msg": "Claim window has expired. Fleet is now available for anyone via rental_accept."
    },
    {
      "code": 6072,
      "name": "QueueFull",
      "msg": "Queue is full. Both rental slots are occupied. Wait for current rental to close."
    },
    {
      "code": 6073,
      "name": "AlreadyScheduled",
      "msg": "Thread already scheduled for this rental. Cannot schedule again."
    },
    {
      "code": 6074,
      "name": "NoActiveRental",
      "msg": "No active rental exists. Use rental_accept instead of rental_claim."
    },
    {
      "code": 6075,
      "name": "ThreadNotScheduled",
      "msg": "Thread not scheduled. Call rental_schedule first or use manual payment mode."
    },
    {
      "code": 6076,
      "name": "InvalidRentalState",
      "msg": "Invalid rental state. The provided rental is not tracked by this contract."
    },
    {
      "code": 6077,
      "name": "InvalidRentalSlot",
      "msg": "Invalid rental slot. Passed slot does not match expected free slot."
    },
    {
      "code": 6078,
      "name": "RentalNotQueued",
      "msg": "Rental is not in Queued status. Only Queued rentals can be activated."
    },
    {
      "code": 6079,
      "name": "PreviousRentalActive",
      "msg": "Previous rental slot is still active. Wait for it to be closed first."
    },
    {
      "code": 6080,
      "name": "InvalidVault",
      "msg": "Invalid vault address. Does not match config.slyvault."
    },
    {
      "code": 6081,
      "name": "InsufficientAtlasForRefund",
      "msg": "Insufficient ATLAS in contract to refund reservation. Owner must fund contract first."
    },
    {
      "code": 6082,
      "name": "ContractPendingClose",
      "msg": "Contract is pending close. No new rentals or reservations allowed."
    },
    {
      "code": 6083,
      "name": "InvalidReferrer",
      "msg": "Referrer account does not match stored referrer on rental state."
    },
    {
      "code": 6084,
      "name": "ThreadStillExists",
      "msg": "Thread still exists. Close thread first using close_contract_thread."
    },
    {
      "code": 6085,
      "name": "InsufficientThreadFunding",
      "msg": "Insufficient SOL for thread creation. Minimum 0.04 SOL required for 3 fibers + thread rent."
    },
    {
      "code": 6086,
      "name": "InvalidDiscountContext",
      "msg": "Discount authorization context does not match contract"
    },
    {
      "code": 6087,
      "name": "AtlasBidRequired",
      "msg": "ATLAS bid required to knock off an ATLAS reservation"
    },
    {
      "code": 6088,
      "name": "InsufficientBid",
      "msg": "Bid is insufficient to knock off the current reservation"
    },
    {
      "code": 6089,
      "name": "BidRequired",
      "msg": "A non-zero bid is required to knock off an existing reservation"
    },
    {
      "code": 6090,
      "name": "PointsOrAtlasBidOnly",
      "msg": "Bid must be either points or ATLAS, not both"
    },
    {
      "code": 6091,
      "name": "DiscountNotLocked",
      "msg": "Discount must be locked before it can be used in activation"
    },
    {
      "code": 6092,
      "name": "MissingReferrer",
      "msg": "Referrer account required when discount params are provided"
    },
    {
      "code": 6093,
      "name": "OwnerCannotRent",
      "msg": "Owner cannot rent their own fleet"
    }
  ],
  "types": [
    {
      "name": "BorrowerState",
      "docs": [
        "Borrower state for storing preferences",
        "PDA: [BORROWER_STATE_SEED, authority.key()]"
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "version",
            "docs": ["Account version for future migrations"],
            "type": "u32"
          },
          {
            "name": "bump",
            "docs": ["PDA bump seed"],
            "type": "u8"
          },
          {
            "name": "authority",
            "docs": ["Authority's wallet address (the borrower)"],
            "type": "pubkey"
          },
          {
            "name": "active_rentals",
            "docs": [
              "Currently tracked fleet rentals for point accumulation (max 10)",
              "NOTE: This is a limited tracker - see active_rental_count for true total"
            ],
            "type": {
              "vec": "pubkey"
            }
          },
          {
            "name": "active_rental_count",
            "docs": [
              "Total count of active rentals (true accounting, not limited by vec capacity)",
              "This ensures we track the real number even if active_rentals vec is full"
            ],
            "type": "u16"
          },
          {
            "name": "capture_points",
            "docs": ["Current capture points accumulated"],
            "type": "u64"
          },
          {
            "name": "managed_token_account",
            "docs": [
              "Managed token account for receiving ATLAS refunds from reservations",
              "Created via init_if_needed in rental_reserve"
            ],
            "type": "pubkey"
          },
          {
            "name": "created_at",
            "docs": ["Timestamp when borrower state was created"],
            "type": "i64"
          },
          {
            "name": "updated_at",
            "docs": ["Timestamp when borrower state was last updated"],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "CargoStats",
      "docs": ["A ship's cargo stats"],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "cargo_capacity",
            "type": "u32"
          },
          {
            "name": "fuel_capacity",
            "type": "u32"
          },
          {
            "name": "ammo_capacity",
            "type": "u32"
          },
          {
            "name": "ammo_consumption_rate",
            "type": "u32"
          },
          {
            "name": "food_consumption_rate",
            "type": "u32"
          },
          {
            "name": "mining_rate",
            "type": "u32"
          },
          {
            "name": "upgrade_rate",
            "type": "u32"
          },
          {
            "name": "cargo_transfer_rate",
            "type": "u32"
          },
          {
            "name": "tractor_beam_gather_rate",
            "type": "u32"
          }
        ]
      }
    },
    {
      "name": "CombatStats",
      "docs": ["A ship's combat stats"],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "ap",
            "type": "u32"
          },
          {
            "name": "hp",
            "type": "u32"
          },
          {
            "name": "sp",
            "type": "u32"
          },
          {
            "name": "ammo_consumption_rate",
            "type": "u32"
          },
          {
            "name": "ap_regen_rate",
            "type": "u32"
          },
          {
            "name": "shield_recharge_rate",
            "type": "u32"
          },
          {
            "name": "repair_rate",
            "type": "u32"
          },
          {
            "name": "repair_ability",
            "type": "u32"
          },
          {
            "name": "repair_efficiency",
            "type": "u32"
          },
          {
            "name": "loot_rate",
            "type": "u32"
          },
          {
            "name": "shield_break_delay",
            "type": "u16"
          },
          {
            "name": "warp_spool_duration",
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "ConfigState",
      "docs": [
        "Global configuration for the SRSLY rental program.",
        "",
        "PDA derived from `CONFIG_SEED`. Contains system-wide settings including fees,",
        "duration limits, and payment frequencies. Only config admin can update."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "version",
            "docs": ["Account version for future migrations"],
            "type": "u32"
          },
          {
            "name": "bump",
            "docs": ["PDA bump seed"],
            "type": "u8"
          },
          {
            "name": "admin",
            "docs": ["Authority that can update configuration (admin)"],
            "type": "pubkey"
          },
          {
            "name": "stardust_to_atlas",
            "docs": ["Stardust to ATLAS conversion rate (default: 100M = 1 ATLAS)"],
            "type": "u64"
          },
          {
            "name": "service_fee_bps",
            "docs": ["Service fee in basis points (default: 1000 = 10%, max: 10%)"],
            "type": "u64"
          },
          {
            "name": "base_bps",
            "docs": ["Basis points denominator (default: 10,000)"],
            "type": "u16"
          },
          {
            "name": "rental_duration_min_seconds",
            "docs": ["Minimum rental duration (default: 3600s = 1 hour)"],
            "type": "i64"
          },
          {
            "name": "rental_duration_max_seconds",
            "docs": ["Maximum rental duration (default: 8,035,200s ≈ 3 months)"],
            "type": "i64"
          },
          {
            "name": "atlas_mint",
            "docs": ["ATLAS token mint for payments"],
            "type": "pubkey"
          },
          {
            "name": "slyvault",
            "docs": ["slyvault vault pubkey for fee distribution"],
            "type": "pubkey"
          },
          {
            "name": "reservations_enabled",
            "docs": ["Whether reservation system is enabled"],
            "type": "bool"
          },
          {
            "name": "points_per_day",
            "docs": ["Points awarded per day of rental"],
            "type": "u64"
          },
          {
            "name": "cancellation_penalty",
            "docs": ["Points lost on cancellation"],
            "type": "u64"
          },
          {
            "name": "min_capture_threshold",
            "docs": ["Minimum points to capture any flag"],
            "type": "u64"
          },
          {
            "name": "weight_base",
            "docs": ["Base for logarithm calculation (default: 10)"],
            "type": "u32"
          },
          {
            "name": "weight_multiplier",
            "docs": ["Multiplier for log result (default: 1.5)"],
            "type": "f32"
          },
          {
            "name": "max_weight",
            "docs": ["Maximum weight cap (default: 5)"],
            "type": "u8"
          },
          {
            "name": "capture_rate_bps",
            "docs": ["Rate increase in basis points (min 10000 = 100%, default: 10500 = 105%)"],
            "type": "u64"
          },
          {
            "name": "atlas_per_point",
            "docs": [
              "Stardust-of-ATLAS per stardust-of-points. With both in 8-decimal",
              "precision (1 ATLAS = 100M stardust, 1 point = 100M dust), this acts",
              "as the \"ATLAS per point\" ratio in human terms. Default 100 = 100",
              "ATLAS per point."
            ],
            "type": "u64"
          },
          {
            "name": "contested_multiplier_max_bps",
            "docs": [
              "Maximum floor multiplier in basis points (100 = 1×, 465 = 4.65×).",
              "Linear ramp from 1× (defender just reserved) to this value (snipe",
              "at activation). 100 disables the ramp. Default 465. Range 100..=10000."
            ],
            "type": "u16"
          },
          {
            "name": "rentals_completed",
            "docs": [
              "Lifetime count of rentals that ran their full term and closed",
              "normally via `process_rental_close`. Does NOT include cancellations",
              "(those keep status = Cancelled on the rental account). Monotonic.",
              "Not exposed in ConfigUpdateParams — admin can't tamper."
            ],
            "type": "u64"
          },
          {
            "name": "lookup_table",
            "docs": [
              "Address Lookup Table for transaction size optimization",
              "Contains static addresses used across all rental operations"
            ],
            "type": "pubkey"
          },
          {
            "name": "created_at",
            "docs": ["Timestamp when config was created"],
            "type": "i64"
          },
          {
            "name": "updated_at",
            "docs": ["Timestamp when config was last updated"],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "ConfigUpdateParams",
      "docs": [
        "Parameters for updating global configuration. All fields are optional",
        "for partial updates."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "admin",
            "docs": ["New admin address (admin)"],
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "stardust_to_atlas",
            "docs": ["Stardust to ATLAS conversion rate"],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "service_fee_bps",
            "docs": ["Service fee in basis points (1000 = 10%)"],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "base_bps",
            "docs": ["Basis points denominator"],
            "type": {
              "option": "u16"
            }
          },
          {
            "name": "rental_duration_min_seconds",
            "docs": ["Minimum rental duration in seconds"],
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "rental_duration_max_seconds",
            "docs": ["Maximum rental duration in seconds"],
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "atlas_mint",
            "docs": ["ATLAS token mint address"],
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "reservations_enabled",
            "docs": ["Whether reservation system is enabled"],
            "type": {
              "option": "bool"
            }
          },
          {
            "name": "points_per_day",
            "docs": ["Capture points awarded per day of rental"],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "cancellation_penalty",
            "docs": ["Points penalty for cancelling a rental"],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "min_capture_threshold",
            "docs": ["Minimum points needed to capture a flag"],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "weight_base",
            "docs": ["Base for logarithmic weight calculation"],
            "type": {
              "option": "u32"
            }
          },
          {
            "name": "weight_multiplier",
            "docs": ["Multiplier for weight calculation"],
            "type": {
              "option": "f32"
            }
          },
          {
            "name": "max_weight",
            "docs": ["Maximum weight value"],
            "type": {
              "option": "u8"
            }
          },
          {
            "name": "capture_rate_bps",
            "docs": ["Rate increase in basis points after capture (10000 = 100%, 11000 = 110%)"],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "atlas_per_point",
            "docs": ["ATLAS lamports per point equivalent for reservation bidding"],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "contested_multiplier_max_bps",
            "docs": [
              "Maximum multiplier on the contest minimum-bid floor as the queued",
              "reservation approaches `active_rental.end_time`. Custom scale where",
              "100 = 1× (disables ramp) and 10_000 = 100×. Range 100..=10_000."
            ],
            "type": {
              "option": "u16"
            }
          }
        ]
      }
    },
    {
      "name": "ContractState",
      "docs": [
        "Rental contract defining terms for a specific fleet.",
        "",
        "PDA derived from `RENTAL_CONTRACT_SEED` and fleet public key. Integrates with SAGE",
        "for fleet ownership and rental permissions."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "version",
            "docs": ["Account version for future migrations"],
            "type": "u32"
          },
          {
            "name": "bump",
            "docs": ["PDA bump seed"],
            "type": "u8"
          },
          {
            "name": "to_close",
            "docs": [
              "Whether contract is flagged for closure (owner wants to close but rental active)"
            ],
            "type": "bool"
          },
          {
            "name": "rate",
            "docs": ["Rental rate per day in Stardust (100M Stardust = 1 ATLAS)"],
            "type": "u64"
          },
          {
            "name": "duration_min_seconds",
            "docs": ["Minimum rental duration in seconds"],
            "type": "i64"
          },
          {
            "name": "duration_max_seconds",
            "docs": ["Maximum rental duration in seconds"],
            "type": "i64"
          },
          {
            "name": "cancel_delay_min",
            "docs": [
              "Minimum cancellation delay in seconds (0 = instant cancel allowed)",
              "Default: 0 (instant cancels allowed by default)"
            ],
            "type": "i64"
          },
          {
            "name": "weight",
            "docs": ["Fleet demand weight (1-5, based on reservation activity)"],
            "type": "u8"
          },
          {
            "name": "reservations_disabled",
            "docs": [
              "Whether reservations are disabled for this contract (owner opt-out)",
              "Default: false (reservations allowed)"
            ],
            "type": "bool"
          },
          {
            "name": "owner",
            "docs": ["Fleet owner who receives payments"],
            "type": "pubkey"
          },
          {
            "name": "fleet",
            "docs": ["Fleet associated with this contract"],
            "type": "pubkey"
          },
          {
            "name": "game_id",
            "docs": ["Game ID for SAGE integration"],
            "type": "pubkey"
          },
          {
            "name": "owner_profile",
            "docs": ["Owner's Star Atlas game profile"],
            "type": "pubkey"
          },
          {
            "name": "active_rental",
            "docs": ["Active rental PDA address (system_program::ID = empty)"],
            "type": "pubkey"
          },
          {
            "name": "queued_rental",
            "docs": ["Queued rental PDA address (system_program::ID = empty)"],
            "type": "pubkey"
          },
          {
            "name": "delegate",
            "docs": [
              "Delegated address that can update rate on behalf of owner",
              "Default: None (only owner can update rate)"
            ],
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "thread",
            "docs": ["Per-contract automation thread (system_program::ID = no thread)"],
            "type": "pubkey"
          },
          {
            "name": "trigger",
            "docs": ["Default trigger for thread settlement"],
            "type": {
              "defined": {
                "name": "Trigger"
              }
            }
          },
          {
            "name": "managed_token_account",
            "docs": ["Contract's managed token account (ATA of contract PDA)"],
            "type": "pubkey"
          },
          {
            "name": "total_earned",
            "docs": ["Per-contract ATLAS earned (lifetime total)"],
            "type": "u64"
          },
          {
            "name": "owner_claimable",
            "docs": ["Accumulated ATLAS earned by owner, not yet claimed"],
            "type": "u64"
          },
          {
            "name": "fee_claimable",
            "docs": [
              "Accumulated service fees, not yet paid to slyvault (flushed at rental_close)"
            ],
            "type": "u64"
          },
          {
            "name": "contested_threshold",
            "docs": [
              "Owner-configured number of contests required before the next",
              "activation increases `rate` by `capture_rate_bps`. 0 disables capture-rate",
              "entirely (rate never auto-increments). 1..=10 enables it. Default 1."
            ],
            "type": "u8"
          },
          {
            "name": "contested_count",
            "docs": [
              "Contests accumulated since the last rate increase. Resets on increase and",
              "when a rental cycle completes without an activation."
            ],
            "type": "u8"
          },
          {
            "name": "created_at",
            "docs": ["Timestamp when contract was created"],
            "type": "i64"
          },
          {
            "name": "updated_at",
            "docs": ["Timestamp when contract was last updated"],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "ContractUpdateParams",
      "docs": ["Parameters for updating contract settings. All fields are optional."],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "rate",
            "docs": ["Rental rate per day in Stardust"],
            "type": {
              "option": "u64"
            }
          },
          {
            "name": "duration_min_seconds",
            "docs": ["Minimum rental duration in seconds"],
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "duration_max_seconds",
            "docs": ["Maximum rental duration in seconds"],
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "cancel_delay_min",
            "docs": ["Minimum cancellation delay in seconds (0 = instant cancel allowed)"],
            "type": {
              "option": "i64"
            }
          },
          {
            "name": "reservations_disabled",
            "docs": ["Whether reservations are disabled for this contract"],
            "type": {
              "option": "bool"
            }
          },
          {
            "name": "to_close",
            "docs": ["Whether the contract is flagged for deferred closure"],
            "type": {
              "option": "bool"
            }
          },
          {
            "name": "contested_threshold",
            "docs": [
              "Number of contests that must accumulate before the next activation",
              "applies `capture_rate_bps`. 0 disables capture-rate entirely;",
              "1..=10 enables it with the chosen sensitivity. Default 1."
            ],
            "type": {
              "option": "u8"
            }
          }
        ]
      }
    },
    {
      "name": "FeesPaid",
      "docs": [
        "Emitted when accumulated fees are flushed to slyvault.",
        "Captures fee/discount split."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "contract",
            "type": "pubkey"
          },
          {
            "name": "fee_collected",
            "type": "u64"
          },
          {
            "name": "discount",
            "type": "u64"
          },
          {
            "name": "discount_bps",
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "Fleet",
      "docs": ["A SAGE fleet."],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "version",
            "type": "u8"
          },
          {
            "name": "game_id",
            "type": "pubkey"
          },
          {
            "name": "owner_profile",
            "type": "pubkey"
          },
          {
            "name": "fleet_ships",
            "type": "pubkey"
          },
          {
            "name": "sub_profile",
            "type": {
              "defined": {
                "name": "OptionalNonSystemPubkey"
              }
            }
          },
          {
            "name": "sub_profile_invalidator",
            "type": "pubkey"
          },
          {
            "name": "faction",
            "type": "u8"
          },
          {
            "name": "fleet_label",
            "type": {
              "array": ["u8", 32]
            }
          },
          {
            "name": "ship_counts",
            "type": {
              "defined": {
                "name": "ShipCounts"
              }
            }
          },
          {
            "name": "warp_cooldown_expires_at",
            "type": "i64"
          },
          {
            "name": "scan_cooldown_expires_at",
            "type": "i64"
          },
          {
            "name": "stats",
            "type": {
              "defined": {
                "name": "ShipStats"
              }
            }
          },
          {
            "name": "cargo_hold",
            "type": "pubkey"
          },
          {
            "name": "fuel_tank",
            "type": "pubkey"
          },
          {
            "name": "ammo_bank",
            "type": "pubkey"
          },
          {
            "name": "ap",
            "type": "u32"
          },
          {
            "name": "sp",
            "type": "u32"
          },
          {
            "name": "hp",
            "type": "u32"
          },
          {
            "name": "pending_hp",
            "type": "u32"
          },
          {
            "name": "ap_reload_expires_at",
            "type": "i64"
          },
          {
            "name": "shield_break_delay_expires_at",
            "type": "i64"
          },
          {
            "name": "last_combat_update",
            "type": "i64"
          },
          {
            "name": "update_id",
            "type": "u64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "MiscStats",
      "docs": ["A ship's miscellaneous stats"],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "required_crew",
            "type": "u16"
          },
          {
            "name": "passenger_capacity",
            "type": "u16"
          },
          {
            "name": "crew_count",
            "type": "u16"
          },
          {
            "name": "rented_crew",
            "type": "u16"
          },
          {
            "name": "respawn_time",
            "type": "u16"
          },
          {
            "name": "scan_cool_down",
            "type": "u16"
          },
          {
            "name": "sdu_per_scan",
            "type": "u32"
          },
          {
            "name": "scan_cost",
            "type": "u32"
          },
          {
            "name": "placeholder",
            "type": "u32"
          },
          {
            "name": "placeholder2",
            "type": "u32"
          },
          {
            "name": "placeholder3",
            "type": "u32"
          }
        ]
      }
    },
    {
      "name": "MovementStats",
      "docs": ["A ship's movement stats"],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "subwarp_speed",
            "type": "u32"
          },
          {
            "name": "warp_speed",
            "type": "u32"
          },
          {
            "name": "max_warp_distance",
            "type": "u16"
          },
          {
            "name": "warp_cool_down",
            "type": "u16"
          },
          {
            "name": "subwarp_fuel_consumption_rate",
            "type": "u32"
          },
          {
            "name": "warp_fuel_consumption_rate",
            "type": "u32"
          },
          {
            "name": "planet_exit_fuel_amount",
            "type": "u32"
          }
        ]
      }
    },
    {
      "name": "OptionalNonSystemPubkey",
      "docs": ["A pubkey sized option that is none if set to the system program."],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "key",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "OwnerPaid",
      "docs": [
        "Emitted when owner_claimable is transferred to owner's ATA.",
        "Covers both auto-transfer (contract_process) and manual claim (contract_claim)."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "contract",
            "type": "pubkey"
          },
          {
            "name": "owner",
            "type": "pubkey"
          },
          {
            "name": "amount",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "RentalAccepted",
      "docs": [
        "Emitted when a rental is accepted (direct or from reservation).",
        "Captures all inputs needed to verify settlement math."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "rental_state",
            "type": "pubkey"
          },
          {
            "name": "contract",
            "type": "pubkey"
          },
          {
            "name": "borrower",
            "type": "pubkey"
          },
          {
            "name": "escrow",
            "type": "u64"
          },
          {
            "name": "rate",
            "type": "u64"
          },
          {
            "name": "service_fee",
            "type": "u64"
          },
          {
            "name": "fee_bps",
            "type": "u16"
          },
          {
            "name": "start_time",
            "type": "i64"
          },
          {
            "name": "end_time",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "RentalCancelled",
      "docs": [
        "Emitted when borrower cancels early.",
        "Captures the three-way split: owner / fee / refund."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "rental_state",
            "type": "pubkey"
          },
          {
            "name": "contract",
            "type": "pubkey"
          },
          {
            "name": "borrower",
            "type": "pubkey"
          },
          {
            "name": "owner_earned",
            "type": "u64"
          },
          {
            "name": "fee_collected",
            "type": "u64"
          },
          {
            "name": "refund",
            "type": "u64"
          },
          {
            "name": "new_end_time",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "RentalClosed",
      "docs": [
        "Emitted when rental_close finalizes (after expiry or cancel).",
        "Captures final escrow reconciliation + CTF points."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "rental_state",
            "type": "pubkey"
          },
          {
            "name": "contract",
            "type": "pubkey"
          },
          {
            "name": "borrower",
            "type": "pubkey"
          },
          {
            "name": "owner_earned",
            "type": "u64"
          },
          {
            "name": "fee_collected",
            "type": "u64"
          },
          {
            "name": "points_awarded",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "RentalSettled",
      "docs": [
        "Emitted on each settlement tick (mid-period and final).",
        "Tracks incremental owner earnings and escrow drawdown."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "rental_state",
            "type": "pubkey"
          },
          {
            "name": "contract",
            "type": "pubkey"
          },
          {
            "name": "owner_earned",
            "type": "u64"
          },
          {
            "name": "escrow_remaining",
            "type": "u64"
          },
          {
            "name": "is_final",
            "type": "bool"
          }
        ]
      }
    },
    {
      "name": "RentalState",
      "docs": [
        "Active rental session between a fleet owner and borrower.",
        "",
        "Handles automated payments via Clockwork threads and tracks rental lifecycle.",
        "PDA derived from contract address and role seed (active or queued)."
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "version",
            "docs": ["Account version for future migrations"],
            "type": "u32"
          },
          {
            "name": "bump",
            "docs": ["PDA bump seed"],
            "type": "u8"
          },
          {
            "name": "borrower",
            "docs": ["Borrower public key (receives refunds if cancelled)"],
            "type": "pubkey"
          },
          {
            "name": "borrower_state",
            "docs": ["BorrowerState PDA for this rental (single source of borrower info)"],
            "type": "pubkey"
          },
          {
            "name": "borrower_profile",
            "docs": ["Borrower's SAGE profile (stored for frontend convenience)"],
            "type": "pubkey"
          },
          {
            "name": "contract",
            "docs": ["Reference to the rental contract"],
            "type": "pubkey"
          },
          {
            "name": "rate",
            "docs": ["Gross rate per day in Stardust (= contract.rate at accept/reserve time)"],
            "type": "u64"
          },
          {
            "name": "last_payment",
            "docs": ["Timestamp of last pro-rata payment settlement (base for next calculation)"],
            "type": "i64"
          },
          {
            "name": "escrow",
            "docs": ["ATLAS deposited as escrow for this rental (in stardust)"],
            "type": "u64"
          },
          {
            "name": "start_time",
            "docs": ["Rental start timestamp"],
            "type": "i64"
          },
          {
            "name": "end_time",
            "docs": ["Rental end timestamp"],
            "type": "i64"
          },
          {
            "name": "service_fee",
            "docs": ["Total fee target for post-rental collection (total * fee_bps / base_bps)"],
            "type": "u64"
          },
          {
            "name": "fee_bps",
            "docs": ["Fee basis points snapshotted from config (for cancel proration)"],
            "type": "u16"
          },
          {
            "name": "referrer",
            "docs": ["Referrer affiliate member for deferred fee tracking"],
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "discount_bps",
            "docs": ["Discount basis points verified at accept time (0 = no discount)"],
            "type": "u16"
          },
          {
            "name": "bid_points",
            "docs": ["Points bid for reservation contest comparison (0 if ATLAS bid)"],
            "type": "u64"
          },
          {
            "name": "bid_atlas",
            "docs": ["ATLAS premium bid for reservation contest (0 if points bid)"],
            "type": "u64"
          },
          {
            "name": "cancel_delay_min",
            "docs": [
              "Minimum cancellation delay in seconds, snapshotted from",
              "`contract.cancel_delay_min` at accept/reserve time. Locks the",
              "borrower's worst-case notice period — owner raising the contract",
              "value mid-rental cannot tighten this. Owner lowering the contract",
              "value flows through (cancel uses the lesser of the two)."
            ],
            "type": "i64"
          },
          {
            "name": "status",
            "docs": ["Rental lifecycle status (Available, Queued, Active)"],
            "type": {
              "defined": {
                "name": "RentalStatus"
              }
            }
          },
          {
            "name": "updated_at",
            "docs": [
              "Timestamp when rental was last updated (used as base for next pro-rata payment)"
            ],
            "type": "i64"
          },
          {
            "name": "created_at",
            "docs": ["Timestamp when rental was created"],
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "RentalStatus",
      "docs": ["Rental lifecycle status"],
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Available"
          },
          {
            "name": "Queued"
          },
          {
            "name": "Active"
          },
          {
            "name": "Cancelled"
          }
        ]
      }
    },
    {
      "name": "Schedule",
      "docs": [
        "Tracks the execution schedule - when the thread last ran and when it should run next",
        "(was: TriggerContext)"
      ],
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "OnChange",
            "fields": [
              {
                "name": "prev",
                "type": "u64"
              }
            ]
          },
          {
            "name": "Timed",
            "fields": [
              {
                "name": "prev",
                "type": "i64"
              },
              {
                "name": "next",
                "type": "i64"
              }
            ]
          },
          {
            "name": "Block",
            "fields": [
              {
                "name": "prev",
                "type": "u64"
              },
              {
                "name": "next",
                "type": "u64"
              }
            ]
          }
        ]
      }
    },
    {
      "name": "ShipCounts",
      "docs": ["Ship counts for a fleet."],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "total",
            "type": "u32"
          },
          {
            "name": "updated",
            "type": "u32"
          },
          {
            "name": "xx_small",
            "type": "u16"
          },
          {
            "name": "x_small",
            "type": "u16"
          },
          {
            "name": "small",
            "type": "u16"
          },
          {
            "name": "medium",
            "type": "u16"
          },
          {
            "name": "large",
            "type": "u16"
          },
          {
            "name": "capital",
            "type": "u16"
          },
          {
            "name": "commander",
            "type": "u16"
          },
          {
            "name": "titan",
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "ShipStats",
      "docs": ["A ship's stats"],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "movement_stats",
            "type": {
              "defined": {
                "name": "MovementStats"
              }
            }
          },
          {
            "name": "cargo_stats",
            "type": {
              "defined": {
                "name": "CargoStats"
              }
            }
          },
          {
            "name": "combat_stats",
            "type": {
              "defined": {
                "name": "CombatStats"
              }
            }
          },
          {
            "name": "misc_stats",
            "type": {
              "defined": {
                "name": "MiscStats"
              }
            }
          }
        ]
      }
    },
    {
      "name": "Signal",
      "docs": [
        "Signal from a fiber about what should happen after execution.",
        "Emitted via set_return_data(), received by thread program via get_return_data()."
      ],
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "None"
          },
          {
            "name": "Chain"
          },
          {
            "name": "Close"
          },
          {
            "name": "Repeat"
          },
          {
            "name": "Next",
            "fields": [
              {
                "name": "index",
                "type": "u8"
              }
            ]
          },
          {
            "name": "Update",
            "fields": [
              {
                "name": "paused",
                "type": {
                  "option": "bool"
                }
              },
              {
                "name": "trigger",
                "type": {
                  "option": {
                    "defined": {
                      "name": "Trigger"
                    }
                  }
                }
              },
              {
                "name": "index",
                "type": {
                  "option": "u8"
                }
              }
            ]
          }
        ]
      }
    },
    {
      "name": "Thread",
      "docs": ["Tracks the current state of a transaction thread on Solana."],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "version",
            "type": "u8"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "id",
            "type": "bytes"
          },
          {
            "name": "name",
            "type": "string"
          },
          {
            "name": "created_at",
            "type": "i64"
          },
          {
            "name": "trigger",
            "type": {
              "defined": {
                "name": "Trigger"
              }
            }
          },
          {
            "name": "schedule",
            "type": {
              "defined": {
                "name": "Schedule"
              }
            }
          },
          {
            "name": "fiber_ids",
            "type": "bytes"
          },
          {
            "name": "fiber_cursor",
            "type": "u8"
          },
          {
            "name": "fiber_next_id",
            "type": "u8"
          },
          {
            "name": "fiber_signal",
            "type": {
              "defined": {
                "name": "Signal"
              }
            }
          },
          {
            "name": "paused",
            "type": "bool"
          },
          {
            "name": "exec_count",
            "type": "u64"
          },
          {
            "name": "last_executor",
            "type": "pubkey"
          },
          {
            "name": "nonce_account",
            "type": "pubkey"
          },
          {
            "name": "last_nonce",
            "type": "string"
          },
          {
            "name": "close_fiber",
            "type": "bytes"
          }
        ]
      }
    },
    {
      "name": "Trigger",
      "docs": ["The triggering conditions of a thread."],
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Account",
            "fields": [
              {
                "name": "address",
                "docs": ["The address of the account to monitor."],
                "type": "pubkey"
              },
              {
                "name": "offset",
                "docs": ["The byte offset of the account data to monitor."],
                "type": "u64"
              },
              {
                "name": "size",
                "docs": ["The size of the byte slice to monitor (must be less than 1kb)"],
                "type": "u64"
              }
            ]
          },
          {
            "name": "Immediate",
            "fields": [
              {
                "name": "jitter",
                "docs": ["Optional jitter in seconds to prevent thundering herd (0 = no jitter)"],
                "type": "u64"
              }
            ]
          },
          {
            "name": "Timestamp",
            "fields": [
              {
                "name": "unix_ts",
                "type": "i64"
              },
              {
                "name": "jitter",
                "docs": [
                  "Optional jitter in seconds to spread execution across a window (0 = no jitter)"
                ],
                "type": "u64"
              }
            ]
          },
          {
            "name": "Interval",
            "fields": [
              {
                "name": "seconds",
                "docs": ["Interval in seconds between executions"],
                "type": "i64"
              },
              {
                "name": "skippable",
                "docs": ["Boolean value indicating whether triggering moments may be skipped"],
                "type": "bool"
              },
              {
                "name": "jitter",
                "docs": ["Optional jitter in seconds to prevent thundering herd (0 = no jitter)"],
                "type": "u64"
              }
            ]
          },
          {
            "name": "Cron",
            "fields": [
              {
                "name": "schedule",
                "docs": [
                  "The schedule in cron syntax. Value must be parsable by the `antegen_cron` package."
                ],
                "type": "string"
              },
              {
                "name": "skippable",
                "docs": [
                  "Boolean value indicating whether triggering moments may be skipped if they are missed (e.g. due to network downtime).",
                  "If false, any \"missed\" triggering moments will simply be executed as soon as the network comes back online."
                ],
                "type": "bool"
              },
              {
                "name": "jitter",
                "docs": [
                  "Optional jitter in seconds to spread execution across a window (0 = no jitter)"
                ],
                "type": "u64"
              }
            ]
          },
          {
            "name": "Slot",
            "fields": [
              {
                "name": "slot",
                "type": "u64"
              }
            ]
          },
          {
            "name": "Epoch",
            "fields": [
              {
                "name": "epoch",
                "type": "u64"
              }
            ]
          }
        ]
      }
    }
  ],
  "constants": [
    {
      "name": "THREAD_SEED",
      "docs": ["Seed for payment thread PDAs (Antegen/Clockwork)"],
      "type": "bytes",
      "value": "[116, 104, 114, 101, 97, 100]"
    }
  ]
}