ABI: genericFoundingV1

Source module: apps/dclutch-web/lib/generated/genericFoundingV1.ts, whose own header reads:

@generated by scripts/generate-generic-founding.mjs; do not edit.
Regenerate with: npm run abi:generic-founding

Sources, in the order the wire is assembled:
  programs/dclutch-trading-sbf/src/generic_market_founding_v1.rs  (the route)
  crates/dclutch-market-core-codec/src/generic_founding_v1.rs     (the request)
  crates/dclutch-custody-contract/src/projected.rs                (Lock, Realize)
  crates/dclutch-claims-svm/src/founding_v5.rs                    (Claims)
  tools/local-validator/bootstrap/successor/src/market.rs         (the frame width)

String constants

namevalue
GENERIC_MARKET_FOUNDING_MAGIC_V1DCLTGMF1
GENERIC_FOUNDING_REQUEST_MAGIC_V1DCLTGFQ1
GENERIC_FOUNDING_ACK_MAGIC_V1DCLTGFA1
GENERIC_FOUNDING_FUNDING_LIST_DOMAIN_V1dclutch/generic-founding-funding-list/v1

Numeric constants (widths, offsets, counts, tags)

namevalue
GENERIC_MARKET_FOUNDING_INSTRUCTION_BYTES_V18
GENERIC_MARKET_FOUNDING_RAW_ACCOUNT_COUNT_V14
GENERIC_MARKET_FOUNDING_INSTRUCTIONS_SYSVAR_INDEX_V14
GENERIC_FOUNDING_FOUND_RAW_INDEX_V10
GENERIC_FOUNDING_LOCK_RAW_INDEX_V11
GENERIC_FOUNDING_REALIZE_RAW_INDEX_V12
PROJECTED_CUSTODY_LOCK_CLOSE_ACCOUNT_COUNT_V114
PROJECTED_CUSTODY_REALIZE_ACCOUNT_COUNT_V112
GENERIC_FOUNDING_FOUND_FIXED_ACCOUNT_COUNT_V134
GENERIC_FOUNDING_FOUND_SUFFIX_ACCOUNT_COUNT_V115
CLAIMS_FOUNDING_ACCOUNT_COUNT_V532
CORE_FOUND_MARKET_INDEX_V11
CORE_FOUND_CORE_PROGRAM_INDEX_V119
CORE_FOUND_TRADING_PROGRAM_INDEX_V131
CORE_FOUND_PERMIT_SUFFIX_INDEX_V10
CORE_FOUND_CLAIMS_PROGRAM_SUFFIX_INDEX_V17
GENERIC_FOUNDING_REQUEST_BYTES_V1400
GENERIC_FOUNDING_ACK_BYTES_V1248
PROJECTED_CUSTODY_REQUEST_BYTES_V1768
CLAIMS_FOUNDING_REQUEST_BYTES_V5832
GENERIC_FOUNDING_MAX_FUNDING_STATES_V116
GENERIC_FOUNDING_REQUEST_MAGIC_OFFSET_V10
GENERIC_FOUNDING_REQUEST_VERSION_V11
GENERIC_FOUNDING_REQUEST_VERSION_OFFSET_V18
GENERIC_FOUNDING_REQUEST_STAGE_OFFSET_V110
GENERIC_FOUNDING_REQUEST_FUNDING_COUNT_OFFSET_V111
GENERIC_FOUNDING_REQUEST_HEAD_RESERVED_OFFSET_V112
GENERIC_FOUNDING_REQUEST_HEAD_RESERVED_BYTES_V14
GENERIC_FOUNDING_REQUEST_IDENTITIES_OFFSET_V116
GENERIC_FOUNDING_REQUEST_SCALARS_OFFSET_V1336
GENERIC_FOUNDING_REQUEST_ENTRY_INDEX_OFFSET_V1392
GENERIC_FOUNDING_REQUEST_TAIL_RESERVED_OFFSET_V1394
GENERIC_FOUNDING_REQUEST_TAIL_RESERVED_BYTES_V16
GENERIC_FOUNDING_ACK_IDENTITIES_OFFSET_V116
SET_COMPUTE_UNIT_LIMIT_DISCRIMINANT_V12
REQUEST_HEAP_FRAME_DISCRIMINANT_V11
LOCAL_PROTOCOL_COMPUTE_UNIT_LIMIT_V11,400,000

Unrendered exports (verbatim)

The renderer did not recognize these statement shapes, so they are shown verbatim rather than dropped.

export const GENERIC_MARKET_FOUNDING_PREFIX_ACCOUNT_COUNT_V1 = 5 as const;

/** Index of each readonly request account inside the frame prefix. */
export const GENERIC_FOUNDING_CLAIMS_RAW_INDEX_V1 = 3 as const;

/** Stage account widths. The frame is exactly the concatenation of these. */
export const GENERIC_FOUNDING_OPEN_ACCOUNT_COUNT_V1 = 23 as const;

/**
 * Frame width at `funding_count = 0`, restated by the reference client.
 *
 * The client pins it as one number so a stage-width change shows up as a
 * disagreement rather than as a silently wider frame; the assertion that the
 * six widths above sum to it lives in `genericMarketFounding.test.ts`.
 */
export const GENERIC_MARKET_FOUNDING_FIXED_ACCOUNTS_V1 = 135 as const;

/** Exact distinct writable keys the outer requires, asserted by the client. */
export const GENERIC_MARKET_FOUNDING_DISTINCT_WRITABLE_V1 = 11 as const;

/** Agave `increase_tx_account_lock_limit`; the fee payer is the key outside the frame. */
export const MAX_TX_ACCOUNT_LOCKS_V1 = 128 as const;

/** Indexes into the Found stage that the route itself dereferences. */
export const CORE_FOUND_CUSTODY_PROGRAM_SUFFIX_INDEX_V1 = 9 as const;

/** The four readonly request bodies and the return acknowledgement. */
export const GENERIC_FOUNDING_ACK_MAGIC_OFFSET_V1 = 0 as const;

/** `GenericFoundingRequestV1` byte layout. */
export const GENERIC_FOUNDING_ACK_SCALARS_OFFSET_V1 = 240 as const;

/** The ten request identities, in their exact encoded order. */
export const GENERIC_FOUNDING_REQUEST_IDENTITIES_V1 = Object.freeze([
  'releaseSet',
  'market',
  'capabilityRoot',
  'context',
  'founder',
  'beneficiary',
  'fundingSource',
  'hoard',
  'projectedReplay',
  'fundingListId',
] as const);

/** The seven request scalars, in their exact encoded order. */
export const GENERIC_FOUNDING_REQUEST_SCALARS_V1 = Object.freeze([
  'generation',
  'quantity',
  'basisScale',
  'expirySlot',
  'marketRent',
  'permitRent',
  'projectedResultingRevision',
] as const);

/** Wire discriminants of `GenericFoundingStageV1`. */
export const GENERIC_FOUNDING_STAGES_V1 = Object.freeze([
  Object.freeze({ name: 'FoundAndPermit', tag: 1 }),
  Object.freeze({ name: 'Open', tag: 2 }),
] as const);

/**
 * ComputeBudget declarations the reference client puts on every transaction.
 *
 * `bounded_instructions` owns these and refuses a caller-supplied duplicate.
 * The default per-transaction ceiling is 200,000 CU and Found31 alone spends
 * over a million, so a builder that omits the limit does not produce a slow
 * transaction -- it produces one that cannot complete.
 */
export const FOUNDING_HEAP_FRAME_BYTES_V1 = 262144 as const;

/** Preimage domain of the ordered FundingState address list. */