interface SSZWriter
(source)
A writer for encoding values to SSZ.
open fun writeAddress(address: Bytes): Unit
Write an address. |
|
open fun writeAddressList(vararg elements: Bytes): Unit open fun writeAddressList(elements: MutableList<out Bytes>): Unit
Write a list of addresses. |
|
open fun writeBigInteger(value: BigInteger, bitLength: Int): Unit
Write a big integer to the output. |
|
open fun writeBigIntegerList(bitLength: Int, vararg elements: BigInteger): Unit open fun writeBigIntegerList(bitLength: Int, elements: MutableList<BigInteger>): Unit
Write a list of big integers. |
|
open fun writeBoolean(value: Boolean): Unit
Write a boolean to the output. |
|
open fun writeBooleanList(vararg elements: Boolean): Unit open fun writeBooleanList(elements: MutableList<Boolean>): Unit
Write a list of booleans. |
|
open fun writeBytes(value: Bytes): Unit
Encode a Bytes value to SSZ. open fun writeBytes(value: ByteArray): Unit
Encode a byte array to SSZ. |
|
open fun writeBytesList(vararg elements: Bytes): Unit open fun writeBytesList(elements: MutableList<out Bytes>): Unit
Write a list of bytes. |
|
open fun writeFixedBytes(value: Bytes): Unit
Encode a known fixed-length Bytes value to SSZ without the length mixin. |
|
open fun writeFixedBytesList(elements: MutableList<out Bytes>): Unit
Write a list of known-size homogenous bytes. The list itself WILL have a length mixin, but the elements WILL NOT. |
|
open fun writeFixedBytesVector(elements: MutableList<out Bytes>): Unit
Write a known-size fixed-length list of known-size homogenous bytes. Neither the list nor the elements in the list will have a length mixin. |
|
open fun writeHash(hash: Bytes): Unit
Write a hash. |
|
open fun writeHashList(vararg elements: Bytes): Unit open fun writeHashList(elements: MutableList<out Bytes>): Unit
Write a list of hashes. |
|
open fun writeInt(value: Int, bitLength: Int): Unit
Write a two's-compliment integer to the output. |
|
open fun writeInt16(value: Int): Unit
Write a 16-bit two's-compliment integer to the output. |
|
open fun writeInt16List(vararg elements: Int): Unit open fun writeInt16List(elements: MutableList<Int>): Unit
Write a list of 16-bit two's compliment integers. |
|
open fun writeInt32(value: Int): Unit
Write a 32-bit two's-compliment integer to the output. |
|
open fun writeInt32List(vararg elements: Int): Unit open fun writeInt32List(elements: MutableList<Int>): Unit
Write a list of 32-bit two's compliment integers. |
|
open fun writeInt64(value: Long): Unit
Write a 64-bit two's-compliment integer to the output. |
|
open fun writeInt64List(vararg elements: Long): Unit open fun writeInt64List(elements: MutableList<Long>): Unit
Write a list of 64-bit two's compliment integers. |
|
open fun writeInt8(value: Int): Unit
Write an 8-bit two's-compliment integer to the output. |
|
open fun writeInt8List(vararg elements: Int): Unit open fun writeInt8List(elements: MutableList<Int>): Unit
Write a list of 8-bit two's compliment integers. |
|
open fun writeIntList(bitLength: Int, vararg elements: Int): Unit open fun writeIntList(bitLength: Int, elements: MutableList<Int>): Unit
Write a list of two's compliment integers. |
|
open fun writeLong(value: Long, bitLength: Int): Unit
Write a two's-compliment long to the output. |
|
open fun writeLongIntList(bitLength: Int, vararg elements: Long): Unit open fun writeLongIntList(bitLength: Int, elements: MutableList<Long>): Unit
Write a list of two's compliment long integers. |
|
abstract fun writeSSZ(value: Bytes): Unit open fun writeSSZ(value: ByteArray): Unit
Append an already SSZ encoded value. Note that this method may not validate that |
|
open fun writeString(str: String): Unit
Write a string to the output. |
|
open fun writeStringList(vararg elements: String): Unit open fun writeStringList(elements: MutableList<String>): Unit
Write a list of strings, which must be of the same length |
|
open fun writeUBigInteger(value: BigInteger, bitLength: Int): Unit
Write an unsigned big integer to the output. |
|
open fun writeUInt(value: Int, bitLength: Int): Unit
Write an unsigned integer to the output. Note that the argument |
|
open fun writeUInt16(value: Int): Unit
Write a 16-bit unsigned integer to the output. |
|
open fun writeUInt16List(vararg elements: Int): Unit open fun writeUInt16List(elements: MutableList<Int>): Unit
Write a list of 16-bit unsigned integers. |
|
open fun writeUInt256(value: UInt256): Unit
Write a UInt256 to the output. |
|
open fun writeUInt256List(vararg elements: UInt256): Unit open fun writeUInt256List(elements: MutableList<UInt256>): Unit
Write a list of unsigned 256-bit integers. |
|
open fun writeUInt32(value: Long): Unit
Write a 32-bit unsigned integer to the output. |
|
open fun writeUInt32List(vararg elements: Long): Unit open fun writeUInt32List(elements: MutableList<Long>): Unit
Write a list of 32-bit unsigned integers. |
|
open fun writeUInt384(value: UInt384): Unit
Write a UInt384 to the output. |
|
open fun writeUInt384List(elements: MutableList<UInt384>): Unit open fun writeUInt384List(vararg elements: UInt384): Unit
Write a list of unsigned 384-bit integers. |
|
open fun writeUInt64(value: Long): Unit
Write a 64-bit unsigned integer to the output. Note that the argument |
|
open fun writeUInt64List(vararg elements: Long): Unit open fun writeUInt64List(elements: MutableList<Long>): Unit
Write a list of 64-bit unsigned integers. Note that the |
|
open fun writeUInt8(value: Int): Unit
Write an 8-bit unsigned integer to the output. |
|
open fun writeUInt8List(vararg elements: Int): Unit open fun writeUInt8List(elements: MutableList<Int>): Unit
Write a list of 8-bit unsigned integers. |
|
open fun writeUIntList(bitLength: Int, vararg elements: Int): Unit open fun writeUIntList(bitLength: Int, elements: MutableList<Int>): Unit
Write a list of unsigned integers. Note that the |
|
open fun writeULong(value: Long, bitLength: Int): Unit
Write an unsigned long to the output. Note that the argument |
|
open fun writeULongIntList(bitLength: Int, vararg elements: Long): Unit open fun writeULongIntList(bitLength: Int, elements: MutableList<Long>): Unit
Write a list of unsigned long integers. Note that the |
|
open fun writeVector(elements: MutableList<out Bytes>): Unit
Write a vector of bytes. |