You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuweni.apache.org by to...@apache.org on 2019/05/05 03:55:50 UTC

[incubator-tuweni] branch master updated: Remove SSZ experimental code

This is an automated email from the ASF dual-hosted git repository.

toulmean pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git


The following commit(s) were added to refs/heads/master by this push:
     new 7b9021b  Remove SSZ experimental code
7b9021b is described below

commit 7b9021b706c0d484fa186568b630392c2ff69b65
Author: Antoine Toulme <an...@lunar-ocean.com>
AuthorDate: Sat May 4 20:55:37 2019 -0700

    Remove SSZ experimental code
---
 .../tuweni/ssz/experimental/BytesSSZReader.kt      |  91 ----
 .../tuweni/ssz/experimental/BytesSSZWriter.kt      | 121 -----
 .../org/apache/tuweni/ssz/experimental/SSZ.kt      | 191 -------
 .../apache/tuweni/ssz/experimental/SSZReader.kt    | 528 -------------------
 .../apache/tuweni/ssz/experimental/SSZWriter.kt    | 570 ---------------------
 .../org/apache/tuweni/ssz/experimental/SSZTest.kt  |  42 --
 6 files changed, 1543 deletions(-)

diff --git a/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/BytesSSZReader.kt b/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/BytesSSZReader.kt
deleted file mode 100644
index 92a662c..0000000
--- a/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/BytesSSZReader.kt
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuweni.ssz.experimental
-
-import org.apache.tuweni.bytes.Bytes
-import org.apache.tuweni.units.bigints.UInt256
-import org.apache.tuweni.units.bigints.UInt384
-import java.math.BigInteger
-
-@ExperimentalUnsignedTypes
-internal class BytesSSZReader(private val delegate: org.apache.tuweni.ssz.SSZReader) : SSZReader {
-  override fun readBytes(limit: Int): Bytes =
-    delegate.readBytes(limit)
-
-  override fun readInt(bitLength: Int): Int =
-    delegate.readInt(bitLength)
-
-  override fun readLong(bitLength: Int): Long =
-    delegate.readLong(bitLength)
-
-  override fun readBigInteger(bitLength: Int): BigInteger =
-    delegate.readBigInteger(bitLength)
-
-  override fun readUnsignedBigInteger(bitLength: Int): BigInteger =
-    delegate.readUnsignedBigInteger(bitLength)
-
-  override fun readUInt256(): UInt256 =
-    delegate.readUInt256()
-
-  override fun readUInt384(): UInt384 =
-    delegate.readUInt384()
-
-  override fun readAddress(): Bytes =
-    delegate.readAddress()
-
-  override fun readHash(hashLength: Int): Bytes =
-    delegate.readHash(hashLength)
-
-  override fun readBytesList(limit: Int): List<Bytes> =
-    delegate.readBytesList(limit)
-
-  override fun readByteArrayList(limit: Int): List<ByteArray> =
-    delegate.readByteArrayList(limit)
-
-  override fun readStringList(limit: Int): List<String> =
-    delegate.readStringList(limit)
-
-  override fun readIntList(bitLength: Int): List<Int> =
-    delegate.readIntList(bitLength)
-
-  override fun readLongIntList(bitLength: Int): List<Long> =
-    delegate.readLongIntList(bitLength)
-
-  override fun readBigIntegerList(bitLength: Int): List<BigInteger> =
-    delegate.readBigIntegerList(bitLength)
-
-  override fun readUnsignedBigIntegerList(bitLength: Int): List<BigInteger> =
-    delegate.readUnsignedBigIntegerList(bitLength)
-
-  override fun readUInt256List(): List<UInt256> =
-    delegate.readUInt256List()
-
-  override fun readUInt384List(): List<UInt384> =
-    delegate.readUInt384List()
-
-  override fun readAddressList(): List<Bytes> =
-    delegate.readAddressList()
-
-  override fun readHashList(hashLength: Int): List<Bytes> =
-    delegate.readHashList(hashLength)
-
-  override fun readBooleanList(): List<Boolean> =
-    delegate.readBooleanList()
-
-  override val isComplete: Boolean
-    get() = delegate.isComplete
-}
diff --git a/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/BytesSSZWriter.kt b/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/BytesSSZWriter.kt
deleted file mode 100644
index 9622e2d..0000000
--- a/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/BytesSSZWriter.kt
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuweni.ssz.experimental
-
-import org.apache.tuweni.bytes.Bytes
-import org.apache.tuweni.units.bigints.UInt256
-import org.apache.tuweni.units.bigints.UInt384
-import java.math.BigInteger
-
-@ExperimentalUnsignedTypes
-internal class BytesSSZWriter(private val delegate: org.apache.tuweni.ssz.SSZWriter) : SSZWriter {
-  override fun writeSSZ(value: Bytes) =
-    delegate.writeSSZ(value)
-
-  override fun writeBytes(value: Bytes) =
-    delegate.writeBytes(value)
-
-  override fun writeBytes(value: ByteArray) =
-    delegate.writeBytes(value)
-
-  override fun writeString(str: String) =
-    delegate.writeString(str)
-
-  override fun writeInt(value: Int, bitLength: Int) =
-    delegate.writeInt(value, bitLength)
-
-  override fun writeLong(value: Long, bitLength: Int) =
-    delegate.writeLong(value, bitLength)
-
-  override fun writeUInt(value: UInt, bitLength: Int) =
-    delegate.writeUInt(value.toInt(), bitLength)
-
-  override fun writeULong(value: ULong, bitLength: Int) =
-    delegate.writeULong(value.toLong(), bitLength)
-
-  override fun writeBytesList(vararg elements: Bytes) =
-    delegate.writeBytesList(*elements)
-
-  override fun writeBytesList(elements: List<Bytes>) =
-    delegate.writeBytesList(elements)
-
-  override fun writeStringList(vararg elements: String) =
-      delegate.writeStringList(*elements)
-
-  override fun writeStringList(elements: List<String>) =
-    delegate.writeStringList(elements)
-
-  override fun writeIntList(bitLength: Int, vararg elements: Int) =
-    delegate.writeIntList(bitLength, *elements)
-
-  override fun writeIntList(bitLength: Int, elements: List<Int>) =
-    delegate.writeIntList(bitLength, elements)
-
-  override fun writeLongIntList(bitLength: Int, vararg elements: Long) =
-    delegate.writeLongIntList(bitLength, *elements)
-
-  override fun writeLongIntList(bitLength: Int, elements: List<Long>) =
-    delegate.writeLongIntList(bitLength, elements)
-
-  override fun writeBigIntegerList(bitLength: Int, vararg elements: BigInteger) =
-    delegate.writeBigIntegerList(bitLength, *elements)
-
-  override fun writeBigIntegerList(bitLength: Int, elements: List<BigInteger>) =
-    delegate.writeBigIntegerList(bitLength, elements)
-
-  override fun writeUIntList(bitLength: Int, vararg elements: UInt) =
-    delegate.writeUIntList(bitLength, elements.map { i -> i.toInt() })
-
-  override fun writeUIntList(bitLength: Int, elements: List<UInt>) =
-    delegate.writeUIntList(bitLength, elements.map { i -> i.toInt() })
-
-  override fun writeULongIntList(bitLength: Int, vararg elements: ULong) =
-    delegate.writeULongIntList(bitLength, elements.map { i -> i.toLong() })
-
-  override fun writeULongIntList(bitLength: Int, elements: List<ULong>) =
-    delegate.writeULongIntList(bitLength, elements.map { i -> i.toLong() })
-
-  override fun writeUInt256List(vararg elements: UInt256) =
-      delegate.writeUInt256List(*elements)
-
-  override fun writeUInt256List(elements: List<UInt256>) =
-    delegate.writeUInt256List(elements)
-
-  override fun writeUInt384List(vararg elements: UInt384) =
-    delegate.writeUInt384List(*elements)
-
-  override fun writeUInt384List(elements: List<UInt384>) =
-    delegate.writeUInt384List(elements)
-
-  override fun writeHashList(vararg elements: Bytes) =
-    delegate.writeHashList(*elements)
-
-  override fun writeHashList(elements: List<Bytes>) =
-    delegate.writeHashList(elements)
-
-  override fun writeAddressList(vararg elements: Bytes) =
-    delegate.writeAddressList(*elements)
-
-  override fun writeAddressList(elements: List<Bytes>) =
-    delegate.writeAddressList(elements)
-
-  override fun writeBooleanList(vararg elements: Boolean) =
-    delegate.writeBooleanList(*elements)
-
-  override fun writeBooleanList(elements: List<Boolean>) =
-    delegate.writeBooleanList(elements)
-}
diff --git a/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/SSZ.kt b/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/SSZ.kt
deleted file mode 100644
index 7fefddc..0000000
--- a/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/SSZ.kt
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuweni.ssz.experimental
-
-import org.apache.tuweni.bytes.Bytes
-import org.apache.tuweni.ssz.EndOfSSZException
-import org.apache.tuweni.ssz.InvalidSSZTypeException
-import java.nio.BufferOverflowException
-import java.nio.ByteBuffer
-import java.nio.ReadOnlyBufferException
-
-/**
- * Simple Serialize (SSZ) encoding and decoding.
- */
-@ExperimentalUnsignedTypes
-object SSZ {
-
-  // Encoding
-
-  /**
-   * Encode values to a {@link Bytes} value.
-   *
-   * @param fn A consumer that will be provided with a {@link SSZWriter} that can consume values.
-   * @return The SSZ encoding in a {@link Bytes} value.
-   */
-  fun encode(fn: (SSZWriter) -> Unit): Bytes = org.apache.tuweni.ssz.SSZ.encode { w -> fn(BytesSSZWriter(w)) }
-
-  /**
-   * Encode values to a {@link ByteBuffer}.
-   *
-   * @param buffer The buffer to write into, starting from its current position.
-   * @param fn A consumer that will be provided with a {@link SSZWriter} that can consume values.
-   * @param <T> The type of the buffer.
-   * @return The buffer.
-   * @throws BufferOverflowException If the writer attempts to write more than the provided buffer can hold.
-   * @throws ReadOnlyBufferException If the provided buffer is read-only.
-   */
-  fun <T : ByteBuffer> encodeTo(buffer: T, fn: (SSZWriter) -> Unit): T =
-    org.apache.tuweni.ssz.SSZ.encodeTo(buffer) { w -> fn(BytesSSZWriter(w)) }
-
-  /**
-   * Encode an unsigned integer to a {@link Bytes} value.
-   *
-   * @param value The integer to encode.
-   * @param bitLength The bit length of the encoded integer value (must be a multiple of 8).
-   * @return The SSZ encoding in a {@link Bytes} value.
-   * @throws IllegalArgumentException If the value is too large for the specified {@code bitLength}.
-   */
-  fun encodeUInt(value: UInt, bitLength: Int): Bytes =
-    org.apache.tuweni.ssz.SSZ.encodeULong(value.toLong(), bitLength)
-
-  /**
-   * Encode an unsigned long integer to a {@link Bytes} value.
-   *
-   * @param value The long to encode.
-   * @param bitLength The bit length of the integer value (must be a multiple of 8).
-   * @return The SSZ encoding in a {@link Bytes} value.
-   * @throws IllegalArgumentException If the value is too large for the specified {@code bitLength}.
-   */
-  fun encodeULong(value: ULong, bitLength: Int): Bytes =
-    org.apache.tuweni.ssz.SSZ.encodeULong(value.toLong(), bitLength)
-
-  /**
-   * Encode an 8-bit unsigned integer to a {@link Bytes} value.
-   *
-   * @param value The integer to encode.
-   * @return The SSZ encoding in a {@link Bytes} value.
-   * @throws IllegalArgumentException If the value is too large for the specified {@code bitLength}.
-   */
-  fun encodeUInt8(value: UInt): Bytes = encodeUInt(value, 8)
-
-  /**
-   * Encode a 16-bit unsigned integer to a {@link Bytes} value.
-   *
-   * @param value The integer to encode.
-   * @return The SSZ encoding in a {@link Bytes} value.
-   * @throws IllegalArgumentException If the value is too large for the specified {@code bitLength}.
-   */
-  fun encodeUInt16(value: UInt): Bytes = encodeUInt(value, 16)
-
-  /**
-   * Encode a 32-bit unsigned integer to a {@link Bytes} value.
-   *
-   * @param value The integer to encode.
-   * @return The SSZ encoding in a {@link Bytes} value.
-   * @throws IllegalArgumentException If the value is too large for the specified {@code bitLength}.
-   */
-  fun encodeUInt32(value: UInt): Bytes = encodeUInt(value, 32)
-
-  /**
-   * Encode a 64-bit unsigned integer to a {@link Bytes} value.
-   *
-   * @param value The integer to encode.
-   * @return The SSZ encoding in a {@link Bytes} value.
-   * @throws IllegalArgumentException If the value is too large for the specified {@code bitLength}.
-   */
-  fun encodeUInt64(value: ULong): Bytes = encodeULong(value, 64)
-
-  // Decoding
-
-  /**
-   * Read and decode SSZ from a {@link Bytes} value.
-   *
-   * @param source The SSZ encoded bytes.
-   * @param fn A function that will be provided a {@link SSZReader}.
-   * @param <T> The result type of the reading function.
-   * @return The result from the reading function.
-   */
-  fun <T> decode(source: Bytes, fn: (SSZReader) -> T): T =
-    org.apache.tuweni.ssz.SSZ.decode(source) { r -> fn(BytesSSZReader(r)) }
-
-  /**
-   * Read a SSZ encoded unsigned integer from a {@link Bytes} value.
-   *
-   * @param source The SSZ encoded bytes.
-   * @param bitLength The bit length of the integer to read (a multiple of 8).
-   * @return An unsigned int.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for the desired bit length, or the decoded
-   *         value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun decodeUInt(source: Bytes, bitLength: Int): UInt =
-    org.apache.tuweni.ssz.SSZ.decodeUInt(source, bitLength).toUInt()
-
-  /**
-   * Read a SSZ encoded unsigned long integer from a {@link Bytes} value.
-   *
-   * @param source The SSZ encoded bytes.
-   * @param bitLength The bit length of the integer to read (a multiple of 8).
-   * @return An unsigned long.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for the desired bit length, or the decoded
-   *         value was too large to fit into a long.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun decodeULong(source: Bytes, bitLength: Int): ULong =
-    org.apache.tuweni.ssz.SSZ.decodeULong(source, bitLength).toULong()
-
-  /**
-   * Read an 8-bit unsigned integer from the SSZ source.
-   *
-   * @param source The SSZ encoded bytes.
-   * @return An unsigned int.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for an 8-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun decodeUInt8(source: Bytes) = decodeUInt(source, 8)
-
-  /**
-   * Read a 16-bit unsigned integer from the SSZ source.
-   *
-   * @param source The SSZ encoded bytes.
-   * @return An unsigned int.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for an 8-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun decodeUInt16(source: Bytes) = decodeUInt(source, 16)
-
-  /**
-   * Read a 32-bit unsigned integer from the SSZ source.
-   *
-   * @param source The SSZ encoded bytes.
-   * @return An unsigned int.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for an 8-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun decodeUInt32(source: Bytes) = decodeUInt(source, 32)
-
-  /**
-   * Read a 64-bit unsigned integer from the SSZ source.
-   *
-   * @param source The SSZ encoded bytes.
-   * @return An unsigned long.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for an 8-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun decodeUInt64(source: Bytes) = decodeULong(source, 64)
-}
diff --git a/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/SSZReader.kt b/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/SSZReader.kt
deleted file mode 100644
index def15c3..0000000
--- a/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/SSZReader.kt
+++ /dev/null
@@ -1,528 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuweni.ssz.experimental
-
-import org.apache.tuweni.bytes.Bytes
-import org.apache.tuweni.ssz.EndOfSSZException
-import org.apache.tuweni.ssz.InvalidSSZTypeException
-import org.apache.tuweni.units.bigints.UInt256
-import org.apache.tuweni.units.bigints.UInt384
-import java.math.BigInteger
-import java.nio.charset.StandardCharsets.UTF_8
-
-/**
- * A reader for consuming values from an SSZ encoded source.
- */
-// Does not extend org.apache.tuweni.ssz.SSZReader (unlike SSZWriter) as the return types vary for the UInt methods.
-@ExperimentalUnsignedTypes
-interface SSZReader {
-
-  /**
-   * Read bytes from the SSZ source.
-   *
-   * @param limit The maximum number of bytes to read.
-   * @return The bytes for the next value.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a byte array, or would exceed the limit.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readBytes(limit: Int): Bytes
-
-  /**
-   * Read a byte array from the SSZ source.
-   *
-   * @param limit The maximum number of bytes to read.
-   * @return The byte array for the next value.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a byte array, or would exceed the limit.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readByteArray(limit: Int = Integer.MAX_VALUE): ByteArray = readBytes(limit).toArrayUnsafe()
-
-  /**
-   * Read a string value from the SSZ source.
-   *
-   * @param limit The maximum number of bytes to read.
-   * @return A string.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a byte array, or would exceed the limit.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readString(limit: Int): String = String(readByteArray(limit), UTF_8)
-
-  /**
-   * Read a two's-compliment int value from the SSZ source.
-   *
-   * @param bitLength The bit length of the integer to read (a multiple of 8).
-   * @return An int.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for the desired bit length, or the decoded
-   * value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readInt(bitLength: Int): Int
-
-  /**
-   * Read a two's-compliment long value from the SSZ source.
-   *
-   * @param bitLength The bit length of the integer to read (a multiple of 8).
-   * @return A long.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for the desired bit length, or the decoded
-   * value was too large to fit into a long.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readLong(bitLength: Int): Long
-
-  /**
-   * Read a big integer value from the SSZ source.
-   *
-   * @param bitLength The bit length of the integer to read (a multiple of 8).
-   * @return A big integer.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for the desired bit length.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readBigInteger(bitLength: Int): BigInteger
-
-  /**
-   * Read an 8-bit two's-compliment integer from the SSZ source.
-   *
-   * @return An int.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for an 8-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readInt8(): Int = readInt(8)
-
-  /**
-   * Read a 16-bit two's-compliment integer from the SSZ source.
-   *
-   * @return An int.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for a 16-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readInt16(): Int = readInt(16)
-
-  /**
-   * Read a 32-bit two's-compliment integer from the SSZ source.
-   *
-   * @return An int.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for a 32-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readInt32(): Int = readInt(32)
-
-  /**
-   * Read a 64-bit two's-compliment integer from the SSZ source.
-   *
-   * @return A long.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for a 64-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readInt64(): Long = readLong(64)
-
-  /**
-   * Read an unsigned int value from the SSZ source.
-   *
-   * @param bitLength The bit length of the integer to read (a multiple of 8).
-   * @return An unsigned int.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for the desired bit length, or the decoded
-   * value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUInt(bitLength: Int): UInt = readInt(bitLength).toUInt()
-
-  /**
-   * Read an unsigned long value from the SSZ source.
-   *
-   * @param bitLength The bit length of the integer to read (a multiple of 8).
-   * @return An unsigned long.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for the desired bit length, or the decoded
-   * value was too large to fit into a long.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readULong(bitLength: Int): ULong = readLong(bitLength).toULong()
-
-  /**
-   * Read an unsigned big integer value from the SSZ source.
-   *
-   * @param bitLength The bit length of the integer to read (a multiple of 8).
-   * @return A big integer.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for the desired bit length.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUnsignedBigInteger(bitLength: Int): BigInteger
-
-  /**
-   * Read an 8-bit unsigned integer from the SSZ source.
-   *
-   * @return An int.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for an 8-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUInt8(): UInt = readUInt(8)
-
-  /**
-   * Read a 16-bit unsigned integer from the SSZ source.
-   *
-   * @return An int.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for a 16-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUInt16(): UInt = readUInt(16)
-
-  /**
-   * Read a 32-bit unsigned integer from the SSZ source.
-   *
-   * @return An int.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for a 32-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUInt32(): ULong = readULong(32)
-
-  /**
-   * Read a 64-bit unsigned integer from the SSZ source.
-   *
-   * @return A long.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for a 64-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUInt64(): ULong = readULong(64)
-
-  /**
-   * Read a [UInt256] from the SSZ source.
-   *
-   * @return A [UInt256].
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for a 256-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUInt256(): UInt256
-
-  /**
-   * Read a [UInt384] from the SSZ source.
-   *
-   * @return A [UInt384].
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for a 384-bit int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUInt384(): UInt384
-
-  /**
-   * Read a boolean from the SSZ source.
-   *
-   * @return A boolean.
-   * @throws InvalidSSZTypeException If the decoded value is not a boolean.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readBoolean(): Boolean = when (readInt(8)) {
-    0 -> false
-    1 -> true
-    else -> throw InvalidSSZTypeException("decoded value is not a boolean")
-  }
-
-  /**
-   * Read a 20-byte address from the SSZ source.
-   *
-   * @return The bytes of the Address.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for a 20-byte address.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readAddress(): Bytes
-
-  /**
-   * Read a hash from the SSZ source.
-   *
-   * @param hashLength The length of the hash (in bytes).
-   * @return The bytes of the hash.
-   * @throws InvalidSSZTypeException If there are insufficient encoded bytes for a 32-byte hash.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readHash(hashLength: Int): Bytes
-
-  /**
-   * Read a list of [Bytes] from the SSZ source.
-   *
-   * Note: prefer to use [.readBytesList] instead, especially when reading untrusted data.
-   *
-   * @return A list of [Bytes].
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, any value in the list is not a byte array, or
-   * any byte array is too large (greater than 2^32 bytes).
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readBytesList(): List<Bytes> = readBytesList(Integer.MAX_VALUE)
-
-  /**
-   * Read a list of [Bytes] from the SSZ source.
-   *
-   * @param limit The maximum number of bytes to read for each list element.
-   * @return A list of [Bytes].
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, any value in the list is not a byte array, or
-   * the size of any byte array would exceed the limit.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readBytesList(limit: Int): List<Bytes>
-
-  /**
-   * Read a list of byte arrays from the SSZ source.
-   *
-   * Note: prefer to use [.readByteArrayList] instead, especially when reading untrusted data.
-   *
-   * @return A list of byte arrays.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, any value in the list is not a byte array, or
-   * any byte array is too large (greater than 2^32 bytes).
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readByteArrayList(): List<ByteArray> = readByteArrayList(Integer.MAX_VALUE)
-
-  /**
-   * Read a list of byte arrays from the SSZ source.
-   *
-   * @param limit The maximum number of bytes to read for each list element.
-   * @return A list of byte arrays.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, any value in the list is not a byte array, or
-   * the size of any byte array would exceed the limit.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readByteArrayList(limit: Int): List<ByteArray>
-
-  /**
-   * Read a list of strings from the SSZ source.
-   *
-   * Note: prefer to use [.readStringList] instead, especially when reading untrusted data.
-   *
-   * @return A list of strings.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, any value in the list is not a string, or any
-   * string is too large (greater than 2^32 bytes).
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readStringList(): List<String> = readStringList(Integer.MAX_VALUE)
-
-  /**
-   * Read a list of strings from the SSZ source.
-   *
-   * @param limit The maximum number of bytes to read for each list element.
-   * @return A list of strings.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, any value in the list is not a string, or the
-   * size of any string would exceed the limit.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readStringList(limit: Int): List<String>
-
-  /**
-   * Read a list of two's-compliment int values from the SSZ source.
-   *
-   * @param bitLength The bit length of the integers to read (a multiple of 8).
-   * @return A list of ints.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readIntList(bitLength: Int): List<Int>
-
-  /**
-   * Read a list of two's-compliment long int values from the SSZ source.
-   *
-   * @param bitLength The bit length of the integers to read (a multiple of 8).
-   * @return A list of longs.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into a long.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readLongIntList(bitLength: Int): List<Long>
-
-  /**
-   * Read a list of two's-compliment big integer values from the SSZ source.
-   *
-   * @param bitLength The bit length of the integers to read (a multiple of 8).
-   * @return A list of big integers.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, or there are insufficient encoded bytes for
-   * the desired bit length or any value in the list.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readBigIntegerList(bitLength: Int): List<BigInteger>
-
-  /**
-   * Read a list of 8-bit two's-compliment int values from the SSZ source.
-   *
-   * @return A list of ints.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readInt8List(): List<Int> = readIntList(8)
-
-  /**
-   * Read a list of 16-bit two's-compliment int values from the SSZ source.
-   *
-   * @return A list of ints.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readInt16List(): List<Int> = readIntList(16)
-
-  /**
-   * Read a list of 32-bit two's-compliment int values from the SSZ source.
-   *
-   * @return A list of ints.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readInt32List(): List<Int> = readIntList(32)
-
-  /**
-   * Read a list of 64-bit two's-compliment int values from the SSZ source.
-   *
-   * @return A list of ints.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readInt64List(): List<Long> = readLongIntList(64)
-
-  /**
-   * Read a list of unsigned int values from the SSZ source.
-   *
-   * @param bitLength The bit length of the integers to read (a multiple of 8).
-   * @return A list of ints.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUIntList(bitLength: Int): List<UInt> {
-    // encoding is the same for unsigned
-    return readIntList(bitLength).map { i -> i.toUInt() }
-  }
-
-  /**
-   * Read a list of unsigned long int values from the SSZ source.
-   *
-   * @param bitLength The bit length of the integers to read (a multiple of 8).
-   * @return A list of longs.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into a long.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readULongIntList(bitLength: Int): List<ULong> {
-    // encoding is the same for unsigned
-    return readLongIntList(bitLength).map { i -> i.toULong() }
-  }
-
-  /**
-   * Read a list of unsigned big integer values from the SSZ source.
-   *
-   * @param bitLength The bit length of the integers to read (a multiple of 8).
-   * @return A list of big integers.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, or there are insufficient encoded bytes for
-   * the desired bit length or any value in the list.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUnsignedBigIntegerList(bitLength: Int): List<BigInteger>
-
-  /**
-   * Read a list of 8-bit unsigned int values from the SSZ source.
-   *
-   * @return A list of ints.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUInt8List(): List<UInt> = readUIntList(8)
-
-  /**
-   * Read a list of 16-bit unsigned int values from the SSZ source.
-   *
-   * @return A list of ints.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUInt16List(): List<UInt> = readUIntList(16)
-
-  /**
-   * Read a list of 32-bit unsigned int values from the SSZ source.
-   *
-   * @return A list of ints.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUInt32List(): List<ULong> = readULongIntList(32)
-
-  /**
-   * Read a list of 64-bit unsigned int values from the SSZ source.
-   *
-   * @return A list of ints.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUInt64List(): List<ULong> = readULongIntList(64)
-
-  /**
-   * Read a list of 256-bit unsigned int values from the SSZ source.
-   *
-   * @return A list of [UInt256].
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUInt256List(): List<UInt256>
-
-  /**
-   * Read a list of 384-bit unsigned int values from the SSZ source.
-   *
-   * @return A list of [UInt256].
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for the
-   * desired bit length or any value in the list, or any decoded value was too large to fit into an int.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readUInt384List(): List<UInt384>
-
-  /**
-   * Read a list of 20-byte addresses from the SSZ source.
-   *
-   * @return A list of 20-byte addresses.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for any
-   * address in the list.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readAddressList(): List<Bytes>
-
-  /**
-   * Read a list of hashes from the SSZ source.
-   *
-   * @param hashLength The length of the hash (in bytes).
-   * @return A list of 32-byte hashes.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for any
-   * hash in the list.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readHashList(hashLength: Int): List<Bytes>
-
-  /**
-   * Read a list of booleans from the SSZ source.
-   *
-   * @return A list of booleans.
-   * @throws InvalidSSZTypeException If the next SSZ value is not a list, there are insufficient encoded bytes for all
-   * the booleans in the list.
-   * @throws EndOfSSZException If there are no more SSZ values to read.
-   */
-  fun readBooleanList(): List<Boolean>
-
-  /**
-   * Check if all values have been read.
-   *
-   * @return `true` if all values have been read.
-   */
-  val isComplete: Boolean
-}
diff --git a/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/SSZWriter.kt b/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/SSZWriter.kt
deleted file mode 100644
index d103592..0000000
--- a/ssz/src/main/kotlin/org/apache/tuweni/ssz/experimental/SSZWriter.kt
+++ /dev/null
@@ -1,570 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuweni.ssz.experimental
-
-import org.apache.tuweni.bytes.Bytes
-import org.apache.tuweni.ssz.SSZ
-import org.apache.tuweni.units.bigints.UInt256
-import org.apache.tuweni.units.bigints.UInt384
-import java.math.BigInteger
-
-@ExperimentalUnsignedTypes
-interface SSZWriter {
-
-  /**
-   * Append an already SSZ encoded value.
-   *
-   * Note that this method **may not** validate that `value` is a valid SSZ sequence. Appending an invalid SSZ
-   * sequence will cause the entire SSZ encoding produced by this writer to also be invalid.
-   *
-   * @param value the SSZ encoded bytes to append
-   */
-  fun writeSSZ(value: Bytes)
-
-  /**
-   * Append an already SSZ encoded value.
-   *
-   * Note that this method **may not** validate that `value` is a valid SSZ sequence. Appending an invalid SSZ
-   * sequence will cause the entire SSZ encoding produced by this writer to also be invalid.
-   *
-   * @param value the SSZ encoded bytes to append
-   */
-  fun writeSSZ(value: ByteArray) = writeSSZ(Bytes.wrap(value))
-
-  /**
-   * Encode a [Bytes] value to SSZ.
-   *
-   * @param value the byte array to encode
-   */
-  fun writeBytes(value: Bytes)
-
-  /**
-   * Encode a byte array to SSZ.
-   *
-   * @param value the byte array to encode
-   */
-  fun writeBytes(value: ByteArray)
-
-  /**
-   * Write a string to the output.
-   *
-   * @param str the string to write
-   */
-  fun writeString(str: String)
-
-  /**
-   * Write a two's-compliment integer to the output.
-   *
-   * @param value the integer to write
-   * @param bitLength the bit length of the integer value
-   * @throws IllegalArgumentException if the value is too large for the specified bit length
-   */
-  fun writeInt(value: Int, bitLength: Int)
-
-  /**
-   * Write a two's-compliment long to the output.
-   *
-   * @param value the long value to write
-   * @param bitLength the bit length of the integer value
-   * @throws IllegalArgumentException if the value is too large for the specified bit length
-   */
-  fun writeLong(value: Long, bitLength: Int)
-
-  /**
-   * Write a big integer to the output.
-   *
-   * @param value the integer to write
-   * @param bitLength the bit length of the integer value
-   * @throws IllegalArgumentException if the value is too large for the specified bit length
-   */
-  fun writeBigInteger(value: BigInteger, bitLength: Int) {
-    writeSSZ(SSZ.encodeBigIntegerToByteArray(value, bitLength))
-  }
-
-  /**
-   * Write an 8-bit two's-compliment integer to the output.
-   *
-   * @param value the integer to write
-   * @throws IllegalArgumentException if the value is too large to be represented in 8 bits
-   */
-  fun writeInt8(value: Int) {
-    writeInt(value, 8)
-  }
-
-  /**
-   * Write a 16-bit two's-compliment integer to the output.
-   *
-   * @param value the integer to write
-   * @throws IllegalArgumentException if the value is too large to be represented in 16 bits
-   */
-  fun writeInt16(value: Int) {
-    writeInt(value, 16)
-  }
-
-  /**
-   * Write a 32-bit two's-compliment integer to the output.
-   *
-   * @param value the integer to write
-   */
-  fun writeInt32(value: Int) {
-    writeInt(value, 32)
-  }
-
-  /**
-   * Write a 64-bit two's-compliment integer to the output.
-   *
-   * @param value the long to write
-   */
-  fun writeInt64(value: Long) {
-    writeLong(value, 64)
-  }
-
-  /**
-   * Write an unsigned integer to the output.
-   *
-   * @param value the integer to write
-   * @param bitLength the bit length of the integer value
-   * @throws IllegalArgumentException if the value is too large for the specified bit length
-   */
-  fun writeUInt(value: UInt, bitLength: Int)
-
-  /**
-   * Write an unsigned long to the output.
-   *
-   * @param value the long value to write
-   * @param bitLength the bit length of the integer value
-   * @throws IllegalArgumentException if the value is too large for the specified bit length
-   */
-  fun writeULong(value: ULong, bitLength: Int)
-
-  /**
-   * Write an 8-bit unsigned integer to the output.
-   *
-   * @param value the integer to write
-   * @throws IllegalArgumentException if the value is too large to be represented in 8 bits
-   */
-  fun writeUInt8(value: UInt) {
-    writeUInt(value, 8)
-  }
-
-  /**
-   * Write a 16-bit unsigned integer to the output.
-   *
-   * @param value the integer to write
-   * @throws IllegalArgumentException if the value is too large to be represented in 16 bits
-   */
-  fun writeUInt16(value: UInt) {
-    writeUInt(value, 16)
-  }
-
-  /**
-   * Write a 32-bit unsigned integer to the output.
-   *
-   * @param value the integer to write
-   */
-  fun writeUInt32(value: UInt) {
-    writeUInt(value, 32)
-  }
-
-  /**
-   * Write a 64-bit unsigned integer to the output.
-   *
-   * @param value the long to write
-   */
-  fun writeUInt64(value: ULong) {
-    writeULong(value, 64)
-  }
-
-  /**
-   * Write a [UInt256] to the output.
-   *
-   * @param value the [UInt256] to write
-   */
-  fun writeUInt256(value: UInt256) {
-    writeSSZ(SSZ.encodeUInt256(value))
-  }
-
-  /**
-   * Write a boolean to the output.
-   *
-   * @param value the boolean value
-   */
-  fun writeBoolean(value: Boolean) {
-    writeSSZ(SSZ.encodeBoolean(value))
-  }
-
-  /**
-   * Write an address.
-   *
-   * @param address the address (must be exactly 20 bytes)
-   * @throws IllegalArgumentException if `address.size != 20`
-   */
-  fun writeAddress(address: Bytes) {
-    writeSSZ(SSZ.encodeAddress(address))
-  }
-
-  /**
-   * Write a hash.
-   *
-   * @param hash the hash
-   */
-  fun writeHash(hash: Bytes) {
-    writeSSZ(SSZ.encodeHash(hash))
-  }
-
-  /**
-   * Write a list of bytes.
-   *
-   * @param elements the bytes to write as a list
-   */
-  fun writeBytesList(vararg elements: Bytes)
-
-  /**
-   * Write a list of bytes.
-   *
-   * @param elements the bytes to write as a list
-   */
-  fun writeBytesList(elements: List<Bytes>)
-
-  /**
-   * Write a list of strings, which must be of the same length
-   *
-   * @param elements the strings to write as a list
-   */
-  fun writeStringList(vararg elements: String)
-
-  /**
-   * Write a list of strings, which must be of the same length
-   *
-   * @param elements the strings to write as a list
-   */
-  fun writeStringList(elements: List<String>)
-
-  /**
-   * Write a list of two's compliment integers.
-   *
-   * @param bitLength the bit length of the encoded integers (must be a multiple of 8)
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if any values are too large for the specified bit length
-   */
-  fun writeIntList(bitLength: Int, vararg elements: Int)
-
-  /**
-   * Write a list of two's compliment integers.
-   *
-   * @param bitLength the bit length of the encoded integers (must be a multiple of 8)
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if any values are too large for the specified bit length
-   */
-  fun writeIntList(bitLength: Int, elements: List<Int>)
-
-  /**
-   * Write a list of two's compliment long integers.
-   *
-   * @param bitLength the bit length of the encoded integers (must be a multiple of 8)
-   * @param elements the long integers to write as a list
-   * @throws IllegalArgumentException if any values are too large for the specified bit length
-   */
-  fun writeLongIntList(bitLength: Int, vararg elements: Long)
-
-  /**
-   * Write a list of two's compliment long integers.
-   *
-   * @param bitLength the bit length of the encoded integers (must be a multiple of 8)
-   * @param elements the long integers to write as a list
-   * @throws IllegalArgumentException if any values are too large for the specified bit length
-   */
-  fun writeLongIntList(bitLength: Int, elements: List<Long>)
-
-  /**
-   * Write a list of big integers.
-   *
-   * @param bitLength the bit length of each integer
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if an integer cannot be stored in the number of bytes provided
-   */
-  fun writeBigIntegerList(bitLength: Int, vararg elements: BigInteger)
-
-  /**
-   * Write a list of big integers.
-   *
-   * @param bitLength the bit length of each integer
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if an integer cannot be stored in the number of bytes provided
-   */
-  fun writeBigIntegerList(bitLength: Int, elements: List<BigInteger>)
-
-  /**
-   * Write a list of 8-bit two's compliment integers.
-   *
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if any values are too large to be represented in 8 bits
-   */
-  fun writeInt8List(vararg elements: Int) {
-    writeIntList(8, *elements)
-  }
-
-  /**
-   * Write a list of 8-bit two's compliment integers.
-   *
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if any values are too large to be represented in 8 bits
-   */
-  fun writeInt8List(elements: List<Int>) {
-    writeIntList(8, elements)
-  }
-
-  /**
-   * Write a list of 16-bit two's compliment integers.
-   *
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if any values are too large to be represented in 16 bits
-   */
-  fun writeInt16List(vararg elements: Int) {
-    writeIntList(16, *elements)
-  }
-
-  /**
-   * Write a list of 16-bit two's compliment integers.
-   *
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if any values are too large to be represented in 16 bits
-   */
-  fun writeInt16List(elements: List<Int>) {
-    writeIntList(16, elements)
-  }
-
-  /**
-   * Write a list of 32-bit two's compliment integers.
-   *
-   * @param elements the integers to write as a list
-   */
-  fun writeInt32List(vararg elements: Int) {
-    writeIntList(32, *elements)
-  }
-
-  /**
-   * Write a list of 32-bit two's compliment integers.
-   *
-   * @param elements the integers to write as a list
-   */
-  fun writeInt32List(elements: List<Int>) {
-    writeIntList(32, elements)
-  }
-
-  /**
-   * Write a list of 64-bit two's compliment integers.
-   *
-   * @param elements the integers to write as a list
-   */
-  fun writeInt64List(vararg elements: Long) {
-    writeLongIntList(64, *elements)
-  }
-
-  /**
-   * Write a list of 64-bit two's compliment integers.
-   *
-   * @param elements the integers to write as a list
-   */
-  fun writeInt64List(elements: List<Long>) {
-    writeLongIntList(64, elements)
-  }
-
-  /**
-   * Write a list of unsigned integers.
-   *
-   * @param bitLength the bit length of the encoded integers (must be a multiple of 8)
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if any values are too large for the specified bit length
-   */
-  fun writeUIntList(bitLength: Int, vararg elements: UInt)
-
-  /**
-   * Write a list of unsigned integers.
-   *
-   * @param bitLength the bit length of the encoded integers (must be a multiple of 8)
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if any values are too large for the specified bit length
-   */
-  fun writeUIntList(bitLength: Int, elements: List<UInt>)
-
-  /**
-   * Write a list of unsigned long integers.
-   *
-   * @param bitLength The bit length of the encoded integers (must be a multiple of 8).
-   * @param elements The long integers to write as a list.
-   * @throws IllegalArgumentException If any values are too large for the specified bit length.
-   */
-  fun writeULongIntList(bitLength: Int, vararg elements: ULong)
-
-  /**
-   * Write a list of unsigned long integers.
-   *
-   * @param bitLength The bit length of the encoded integers (must be a multiple of 8).
-   * @param elements The long integers to write as a list.
-   * @throws IllegalArgumentException If any values are too large for the specified bit length.
-   */
-  fun writeULongIntList(bitLength: Int, elements: List<ULong>)
-
-  /**
-   * Write a list of 8-bit unsigned integers.
-   *
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if any values are too large to be represented in 8 bits
-   */
-  fun writeUInt8List(vararg elements: UInt) {
-    writeUIntList(8, *elements)
-  }
-
-  /**
-   * Write a list of 8-bit unsigned integers.
-   *
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if any values are too large to be represented in 8 bits
-   */
-  fun writeUInt8List(elements: List<UInt>) {
-    writeUIntList(8, elements)
-  }
-
-  /**
-   * Write a list of 16-bit unsigned integers.
-   *
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if any values are too large to be represented in 16 bits
-   */
-  fun writeUInt16List(vararg elements: UInt) {
-    writeUIntList(16, *elements)
-  }
-
-  /**
-   * Write a list of 16-bit unsigned integers.
-   *
-   * @param elements the integers to write as a list
-   * @throws IllegalArgumentException if any values are too large to be represented in 16 bits
-   */
-  fun writeUInt16List(elements: List<UInt>) {
-    writeUIntList(16, elements)
-  }
-
-  /**
-   * Write a list of 32-bit unsigned integers.
-   *
-   * @param elements the integers to write as a list
-   */
-  fun writeUInt32List(vararg elements: UInt) {
-    writeUIntList(32, *elements)
-  }
-
-  /**
-   * Write a list of 32-bit unsigned integers.
-   *
-   * @param elements the integers to write as a list
-   */
-  fun writeUInt32List(elements: List<UInt>) {
-    writeUIntList(32, elements)
-  }
-
-  /**
-   * Write a list of 64-bit unsigned integers.
-   *
-   * @param elements the integers to write as a list
-   */
-  fun writeUInt64List(vararg elements: ULong) {
-    writeULongIntList(64, *elements)
-  }
-
-  /**
-   * Write a list of 64-bit unsigned integers.
-   *
-   * @param elements the integers to write as a list
-   */
-  fun writeUInt64List(elements: List<ULong>) {
-    writeULongIntList(64, elements)
-  }
-
-  /**
-   * Write a list of unsigned 256-bit integers.
-   *
-   * @param elements the integers to write as a list
-   */
-  fun writeUInt256List(vararg elements: UInt256)
-
-  /**
-   * Write a list of unsigned 256-bit integers.
-   *
-   * @param elements the integers to write as a list
-   */
-  fun writeUInt256List(elements: List<UInt256>)
-
-  /**
-   * Write a list of unsigned 384-bit integers.
-   *
-   * @param elements the integers to write as a list
-   */
-  fun writeUInt384List(vararg elements: UInt384)
-
-  /**
-   * Write a list of unsigned 256-bit integers.
-   *
-   * @param elements the integers to write as a list
-   */
-  fun writeUInt384List(elements: List<UInt384>)
-
-  /**
-   * Write a list of hashes.
-   *
-   * @param elements the hashes to write as a list
-   */
-  fun writeHashList(vararg elements: Bytes)
-
-  /**
-   * Write a list of hashes.
-   *
-   * @param elements the hashes to write as a list
-   */
-  fun writeHashList(elements: List<Bytes>)
-
-  /**
-   * Write a list of addresses.
-   *
-   * @param elements the addresses to write as a list
-   * @throws IllegalArgumentException if any `address.size != 20`
-   */
-  fun writeAddressList(vararg elements: Bytes)
-
-  /**
-   * Write a list of addresses.
-   *
-   * @param elements the addresses to write as a list
-   * @throws IllegalArgumentException if any `address.size != 20`
-   */
-  fun writeAddressList(elements: List<Bytes>)
-
-  /**
-   * Write a list of booleans.
-   *
-   * @param elements the booleans to write as a list
-   */
-  fun writeBooleanList(vararg elements: Boolean)
-
-  /**
-   * Write a list of booleans.
-   *
-   * @param elements the booleans to write as a list
-   */
-  fun writeBooleanList(elements: List<Boolean>)
-}
diff --git a/ssz/src/test/kotlin/org/apache/tuweni/ssz/experimental/SSZTest.kt b/ssz/src/test/kotlin/org/apache/tuweni/ssz/experimental/SSZTest.kt
deleted file mode 100644
index 8d5f64f..0000000
--- a/ssz/src/test/kotlin/org/apache/tuweni/ssz/experimental/SSZTest.kt
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.tuweni.ssz.experimental
-
-import org.apache.tuweni.bytes.Bytes.fromHexString
-import org.junit.jupiter.api.Assertions.assertEquals
-import org.junit.jupiter.api.Test
-
-@ExperimentalUnsignedTypes
-class SSZTest {
-
-    @Test
-    fun shouldEncodeUnsigned() {
-        assertEquals(fromHexString("0000"), SSZ.encodeUInt16(0.toUInt()))
-        assertEquals(fromHexString("00000000"), SSZ.encodeUInt32(0.toUInt()))
-        assertEquals(fromHexString("0000000000000000"), SSZ.encodeUInt64(0L.toULong()))
-        assertEquals(fromHexString("0000000000000000"), SSZ.encodeUInt64(0L.toULong()))
-
-        assertEquals(fromHexString("FFFF"), SSZ.encodeUInt16(65535.toUInt()))
-        assertEquals(fromHexString("FFFF0000"), SSZ.encodeUInt32(65535.toUInt()))
-    }
-
-    @Test
-    fun shouldWriteUnsigned() {
-        assertEquals(fromHexString("FFFF"), SSZ.encode { w -> w.writeUInt16(65535.toUInt()) })
-        assertEquals(fromHexString("FFFF0000"), SSZ.encode { w -> w.writeUInt32(65535.toUInt()) })
-    }
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org