Class StarknetByteArray
-
- All Implemented Interfaces:
-
com.swmansion.starknet.data.types.conversions.ConvertibleToCalldata
public final class StarknetByteArray implements ConvertibleToCalldata
Represents a ByteArray struct from Cairo.
The ByteArray struct is used to represent a string in Cairo.
-
-
Field Summary
Fields Modifier and Type Field Description private final List<Felt>
data
private final Felt
pendingWord
private final Integer
pendingWordLen
-
Constructor Summary
Constructors Constructor Description StarknetByteArray(List<Felt> data, Felt pendingWord, Integer pendingWordLen)
-
Method Summary
Modifier and Type Method Description final List<Felt>
getData()
final Felt
getPendingWord()
final Integer
getPendingWordLen()
List<Felt>
toCalldata()
Encode as a Felt list String
toString()
Encode as a String final static StarknetByteArray
fromString(String string)
Create byte array from a string. -
-
Method Detail
-
getPendingWord
final Felt getPendingWord()
-
getPendingWordLen
final Integer getPendingWordLen()
-
toCalldata
List<Felt> toCalldata()
Encode as a Felt list
-
fromString
final static StarknetByteArray fromString(String string)
Create byte array from a string.
- Parameters:
string
- The string to be transformed to byte array
-
-
-
-