@wuwei-labs/srsly
Version:
TypeScript SDK for SRSLY
21 lines • 982 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.CONFIG_STATE_SIZE = exports.BORROWER_STATE_SIZE = exports.RENTAL_STATE_SIZE = exports.CONTRACT_STATE_SIZE = void 0;
/** ContractState — `state/contract.rs` */
exports.CONTRACT_STATE_SIZE = 638;
/** RentalState — `state/rental.rs` (two instances per contract: active + queued) */
exports.RENTAL_STATE_SIZE = 426;
/** BorrowerState — `state/borrower.rs` (Vec<Pubkey> max_len 10) */
exports.BORROWER_STATE_SIZE = 423;
/** ConfigState — `state/config.rs` */
exports.CONFIG_STATE_SIZE = 468;
//# sourceMappingURL=sizes.js.map