/*
 * Copyright (c) 2026 QPQ IaaS AG <info@qpq.swiss>. All rights reserved.
 * Project: Gajumaru Core Java Libraries <gajumaru.io>
 *
 * This program is dual-licensed:
 * 1) Under the GNU Affero General Public License as published by the Free
 *    Software Foundation, either version 3 of the License, or (at your option)
 *    any later version (AGPL-3.0-or-later).
 *
 * 2) Under a commercial/proprietary license available directly from QPQ IaaS AG.
 *    If you wish to use this software outside the strict constraints of the
 *    AGPLv3 (e.g. within a closed-source or proprietary product), you must
 *    purchase a commercial license from QPQ IaaS AG.
 *
 * Authors:
 *   - Craig Everett <craigeverett@qpq.swiss>
 *
 * SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-QPQ-Commercial
 */

package swiss.qpq.gajumobile.data.models

import kotlinx.serialization.Serializable

@Serializable
data class Endpoint(
    val host: String,
    val port: Int = 3013,
    val useTls: Boolean = false,
)

@Serializable
data class Wallet(
    val id: String,
    val name: String,
    val networkId: String = "groot.mainnet",
    val accounts: List<Account> = emptyList(),
    val createdAt: Long = System.currentTimeMillis(),
    val endpoints: List<Endpoint> = emptyList()
) {
    companion object {
        val DEFAULT_MAINNET = listOf(
            Endpoint("groot.mainnet.gajumaru.io", 3013, useTls = true),
            Endpoint("tsuriai.jp", 3013, useTls = true)
        )
        
        val DEFAULT_TESTNET = listOf(
            Endpoint("groot.testnet.gajumaru.io", 3013, useTls = true),
            Endpoint("tsuriai.jp", 4013, useTls = true)
        )
    }
}
