Functions
assertByteArrayIsNotEmptyForCodec
assertByteArrayIsNotEmptyForCodec(
codecDescription
,bytes
,offset?
):void
Asserts that a given byte array is not empty (after the optional provided offset).
Returns void if the byte array is not empty but throws a SolanaError otherwise.
Parameters
Parameter | Type | Description |
---|---|---|
codecDescription | string | A description of the codec used by the assertion error. |
bytes | Uint8Array <ArrayBufferLike > | ReadonlyUint8Array | The byte array to check. |
offset? | number | The offset from which to start checking the byte array. If provided, the byte array is considered empty if it has no bytes after the offset. |
Returns
void