Skip to main content
Runtime type guard that checks if a value is a valid BrandedStorageKey.

Signature

    Parameters

    • value (unknown) - Value to check

    Returns

    boolean - true if value is BrandedStorageKey, false otherwise. TypeScript narrows type when true.

    Examples

    Basic Type Guard

      Runtime Validation

      API Input Validation

      Type Narrowing

      Array Filtering

      Optional Parameters

      Deserialization Validation

      Error Messages

      Testing

      Implementation Details

      Checks if value:
      1. Is an object (not null)
      2. Has address property that is AddressType
      3. Has slot property that is bigint