isOffchainMessageContentRestrictedAsciiOf1232BytesMax

function isOffchainMessageContentRestrictedAsciiOf1232BytesMax(
    putativeContent,
): putativeContent is Readonly<{
    format: RESTRICTED_ASCII_1232_BYTES_MAX;
    text: Brand<
        string,
        'offchainMessageContentRestrictedAsciiOf1232BytesMax'
    >;
}>;

A type guard that returns true when supplied content of a v0 offchain message that conforms to the OffchainMessageContentRestrictedAsciiOf1232BytesMax type, and refines its type for use in your program.

Parameters

ParameterType
putativeContent{ format: OffchainMessageContentFormat; text: string; }
putativeContent.formatOffchainMessageContentFormat
putativeContent.textstring

Returns

putativeContent is Readonly<{ format: RESTRICTED_ASCII_1232_BYTES_MAX; text: Brand<string, "offchainMessageContentRestrictedAsciiOf1232BytesMax"> }>

See

OffchainMessageContentRestrictedAsciiOf1232BytesMax for more detail.

On this page