Module spl_tlv_account_resolution::seeds

source ·
Expand description

Types for managing seed configurations in TLV Account Resolution

As determined by the address_config field of ExtraAccountMeta, seed configurations are limited to a maximum of 32 bytes. This means that the maximum number of seed configurations that can be packed into a single ExtraAccountMeta will depend directly on the size of the seed configurations themselves.

Sizes are as follows: * Seed::Literal: 1 + 1 + N * 1 - Discriminator * 1 - Length of literal * N - Literal bytes themselves * Seed::InstructionData: 1 + 1 + 1 = 3 * 1 - Discriminator * 1 - Start index of instruction data * 1 - Length of instruction data starting at index * Seed::AccountKey - 1 + 1 = 2 * 1 - Discriminator * 1 - Index of account in accounts list * Seed::AccountData: 1 + 1 + 1 + 1 = 4 * 1 - Discriminator * 1 - Index of account in accounts list * 1 - Start index of account data * 1 - Length of account data starting at index

No matter which types of seeds you choose, the total size of all seed configurations must be less than or equal to 32 bytes.

Enums§

  • Enum to describe a required seed for a Program-Derived Address