parseKey

Parses the key field from base64-encoded XDR string to a typed LedgerKey object.

The LedgerKey identifies the type and location of this entry:

  • ACCOUNT: Account entry key

  • TRUSTLINE: Trustline entry key

  • OFFER: Offer entry key

  • DATA: Account data entry key

  • CLAIMABLE_BALANCE: Claimable balance entry key

  • LIQUIDITY_POOL: Liquidity pool entry key

  • CONTRACT_DATA: Soroban contract data entry key

  • CONTRACT_CODE: Soroban contract code entry key

  • CONFIG_SETTING: Network configuration setting key

  • TTL: Time-to-live entry key

Return

The parsed LedgerKey XDR object.

Throws

if the XDR string is malformed or cannot be decoded.