@wuwei-labs/srsly
Version:
TypeScript SDK for SRSLY
18 lines • 801 B
JavaScript
/**
* @purpose Account data sizes (including 8-byte Anchor discriminator).
*
* These match `8 + InitSpace` on the Rust side and determine rent-exemption
* lamports via `rpc.getMinimumBalanceForRentExemption(size)`.
*
* Source of truth: `rust/programs/srsly/src/state/*.rs` — structs with
* `#[derive(InitSpace)]`. Keep in sync when account layouts change.
*/
/** ContractState — `state/contract.rs` */
export const CONTRACT_STATE_SIZE = 638;
/** RentalState — `state/rental.rs` (two instances per contract: active + queued) */
export const RENTAL_STATE_SIZE = 426;
/** BorrowerState — `state/borrower.rs` (Vec<Pubkey> max_len 10) */
export const BORROWER_STATE_SIZE = 423;
/** ConfigState — `state/config.rs` */
export const CONFIG_STATE_SIZE = 468;
//# sourceMappingURL=sizes.js.map