StarknetByteArray

data class StarknetByteArray(val data: List<Felt>, val pendingWord: Felt, val pendingWordLen: Int) : ConvertibleToCalldata

Represents a ByteArray struct from Cairo.

The ByteArray struct is used to represent a string in Cairo.

Parameters

data

The list of 31-byte chunks of the byte array

pendingWord

The last chunk of the byte array, which consists of at most 30 bytes

pendingWordLen

The number of bytes in pendingWord

Constructors

Link copied to clipboard
constructor(data: List<Felt>, pendingWord: Felt, pendingWordLen: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val data: List<Felt>
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun toCalldata(): List<Felt>

Encode as a Felt list

Link copied to clipboard
open override fun toString(): String

Encode as a String