Skip to content

Commit

Permalink
Working on examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lealobanov committed Nov 4, 2024
1 parent f3b5b55 commit e8d7a66
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions sdk/src/main/kotlin/org/onflow/flow/sdk/models.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1295,24 +1295,6 @@ data class FlowCollection(
.addAllTransactionIds(transactionIds.map { it.byteStringValue })
}

data class FlowFullCollection(
val id: FlowId,
val transactionIds: List<FlowId>
) : Serializable {
companion object {
@JvmStatic
fun of(value: CollectionOuterClass.Collection) = FlowCollection(
id = FlowId.of(value.id.toByteArray()),
transactionIds = value.transactionIdsList.map { FlowId.of(it.toByteArray()) }
)
}

@JvmOverloads
fun builder(builder: CollectionOuterClass.Collection.Builder = CollectionOuterClass.Collection.newBuilder()): CollectionOuterClass.Collection.Builder = builder
.setId(id.byteStringValue)
.addAllTransactionIds(transactionIds.map { it.byteStringValue })
}

interface BytesHolder {
val bytes: ByteArray
val base16Value: String get() = bytes.bytesToHex()
Expand Down

0 comments on commit e8d7a66

Please sign in to comment.