SSI Turkey

SSI Turkey

SSI Türkiye Platform is a digital identity infrastructure managed by its own community and operated in accordance with the next generation blockchain-based digital Self Sovereign Identity Management model. Digital Türkiye Infrastructure (DTA) is a blockchain-based trust repository. It is being developed within TÜBİTAK for use in public and private sector digital transformation projects. As the Blockchain Laboratory, we have been the initiator of this system since 2018 and have been carrying out the development and operation of blockchain-based components.

Our development activities are carried out under the auspices of the Digital Transformation Office as part of the Presidential Action Plan.

Our efforts to develop our unique blockchain platform, which can run its own governance model, are carried out in coordination with the secure Digital Identity Wallet studies carried out within the E-Identity Unit of BİLGEM.

The system includes a test network serving developers and a public network (PublicNet) that can be utilised by finalised Digital Identity products. The registration process for SSI Türkiye to be recognised as an international did:tr DID method is nearing completion.

You can find detailed information about the platform on the SSI Türkiye (https://ssiturkiye.bag.org.tr/) page.

ssi img 2

About

SSI Turkey Platform is a digital identity infrastructure managed by its own community and operated in accordance with the new generation digital Self Sovereign identity management model. It was launched for use in Public and Private sector Digital Transformation projects.

The infrastructure includes a test network (TestNet) that serves developers and a public network (PublicNet) that can be used by the final Digital Identity products developed.

The registration process to make it visible as an international DIDMethod is ongoing.

The first version (v1.0) was installed in November 2023.

V2.0, which will include data economy and Governance based capabilities, is under development.

Membership requests for the platform should be sent to bzlab@tubitak.gov.tr until the institutional processes of the platform are fully established. In the current version, membership requests can be made for one or more of the following roles: participating in the management of the infrastructure as a (Steering Committe Member), operating a validator node in the PublicNet blockchain network as a (Steward), or having read-write permissions for the infrastructure as a (Trust Anchor)

The function of reading data from the infrastructure is open to all members of the public without permission or membership.

Members

The stakeholders of the infrastructure are listed in the table below.
Member Institution Role Presentations
TÜBİTAK BİLGEM Trustee Active
Yapı Kredi Bank Steward Active
Ziraat Bank Steward Establishing
Sabancı University Steward Establishing
AyroTek TrustAnchor Establishing
Member1 (Bank) Steward Application
Member2 (Private Company) TrustAnchor Application
Member3 (Bank) Steward Application
Member4 (Public Institution) Steward Application
Member5 (Bank) Steward Establishing

Sources

The current average Validator Node Machine requirements in SSITurkey Infrastructure are as follows

  • Sufficient processing power (8+ cores)
  • RAM (>32 GB)
  • Storage (At least 1TB of reliable (e.g. RAID) disk space, expandable to 2TB. Sufficiently large boot partition
  • High speed and Internet connection (+100Mbps) (highly available, redundant pipes).
  • 2 NIC (Network Interface Card) with their own separate static IP addresses
    • 1 NIC Validator Node must be dedicated for consensus traffic
    • 1 NIC must be dedicated to handle external requests

More detailed Indy use cases can be found in the Indy SDK repo.

You can also find the following examples in the ssi-turkiye-docs repo.

You can also use the test network with **BILGEM-DID-SDK**. You can access the relevant SDK documentation on this page: sdk.did.bag.org.tr.

Reading transactions from the SSI Türkiye Testnet using Indy SDK.

				
					$ python3 query_ledger.py
# https://github.com/hyperledger/indy-sdk/blob/main/docs/how-tos/write-did-and-query-verkey/python/write_did_and_query_verkey.py
# query_ledger.py

import asyncio
import json
import pprint

from indy import pool, ledger, wallet, did
from indy.error import IndyError, ErrorCode

from utils import get_pool_genesis_txn_path, PROTOCOL_VERSION

pool_name = "ssi-turkiye-testnet"
genesis_file_path = get_pool_genesis_txn_path(pool_name)

wallet_config = json.dumps({"id": "wallet"})
wallet_credentials = json.dumps({"key": "wallet_key"})


def print_log(value_color="", value_noncolor=""):
    """"set the colors for text."""
    HEADER = "\033[92m"
    ENDC = "\033[0m"
    print(HEADER + value_color + ENDC + str(value_noncolor))


async def write_nym_and_query_verkey():
    try:
        await pool.set_protocol_version(PROTOCOL_VERSION)

        print_log(
            "\n1. Creates a new local pool ledger configuration that is used "
            "later when connecting to ledger.\n"
        )
        pool_config = json.dumps({"genesis_txn": str(genesis_file_path)})
        try:
            await pool.create_pool_ledger_config(
                config_name=pool_name, config=pool_config
            )
        except IndyError as ex:
            if ex.error_code == ErrorCode.PoolLedgerConfigAlreadyExistsError:
                pass

        print_log("\n2. Open pool ledger and get handle from libindy\n")
        pool_handle = await pool.open_pool_ledger(config_name=pool_name, config=None)

        request = await ledger.build_get_txn_request(None, None, 1)
        print(request)
        response = await ledger.submit_request(pool_handle, request)
        parsed = json.loads(response)
        print_log("response: {}".format(response))

        print_log("\n13. Closing wallet and pool\n")
        await pool.close_pool_ledger(pool_handle)

    except IndyError as e:
        print("Error occurred: %s" % e)


def main():
    loop = asyncio.get_event_loop()
    loop.run_until_complete(write_nym_and_query_verkey())
    loop.close()


if __name__ == "__main__":
    main()
# utils.py
# https://github.com/hyperledger/indy-sdk/blob/main/docs/how-tos/write-did-and-query-verkey/python/utils.py

from pathlib import Path
from tempfile import gettempdir

PROTOCOL_VERSION = 2


def get_pool_genesis_txn_path(pool_name):
    path_temp = Path(gettempdir()).joinpath("indy")
    path = path_temp.joinpath("{}.txn".format(pool_name))
    save_pool_genesis_txn_file(path)
    return path


#! Genesis may have changed, use the latest genesis on the site
def pool_genesis_txn_data():
    return """ {"reqSignature":{},"txn":{"data":{"data":{"alias":"tbtk1","blskey":"3Fd47gxCTnumCK6tWw67QNvuuTdV5Log98W5zqph47CtPuMGhxquQeQdDtExBTKrf2h34Fzq6n9wDq9sMVosCF57sNAAYXUJ9SPCnLfZi9HGzarzufXzgLdemJd3EfR9L2hYJMCMNedTkGXBEkQoAL2YcgzkgMiTdZMvH6oDgDuPqAn", "blskey_pop":"R7ZqdRqyhSMkEzP7BKXJZrooMRTzNXBAQ72sXT2CTe55unygvVw1J1kRGQZT6LcgSUBXfWCxirTWcSzaeAQLmX2rJTNd3B5P9nPjzmLjyo3qxKNnaVMvKLsMpzsJaLniMjHdXeggUbAWPZUSs1cRxVvoviWSmV7cX5EGXLVH913EXH", "client_ip": "5.252.204.141","client_port":"9702","node_ip":"10.29.29.2", "node_port": "9701", "services":["VALIDATOR"]}, "dest": "4TzzhKsPCBwTYTnATF9JSRRMcvf5TnWnn5DEncDjeQiN"}, "metadata":{"from":"7MnUxhDh56UmUmZGdurvzk"},"type":"0"},"txnMetadata":{"seqNo":1,"txnId":"266ee63fbf82e0cda7ab6a04caf179265238927625d5a9f029a4eb8dcef888ef"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"tbtk2","blskey":"HxrGvTkTzrLvCotTU2JZfJoCYgsTTpLAB8bkbiqQtPaop6KvZ1qwDwpepBbwjA5ayGiGr3hfesc64knk4FWKqjGYjZNYYTUqtdusT7pJ5j4mPpVaWxJNTnNUm6purJRQjwsnrJMGaVp8e5nSw9rT2dPNdixGXPijP5eNwfrBmCLuWP", "blskey_pop":"RKMUNpLptTzHVSEtxhvY8NgsTga2xMntpoVNZbjScLqQjyBVAMk2TxAEdTWJcSS17ADCU2tRtNQCeVh4Z2H54ueicHLRv48tSwJhajMqNSzB5GSQZVJoM73yWBW9sTGTH8yH9jux8upBaGvBk7XWmXqUWEUsXdBL6Ei8JSxe8jFyUK", "client_ip": "5.252.204.141","client_port":"9704","node_ip":"10.29.29.3", "node_port": "9703", "services":["VALIDATOR"]}, "dest": "FvM37TPMy4kpkvDcbXb5rVxizEnVFTNre1veeWNdx2EG"}, "metadata":{"from":"UNh4syxSLQWWpJxM8JM4og"},"type":"0"},"txnMetadata":{"seqNo":2,"txnId":"b70ec813929f49260a40783ba85f15906a4e2dd75a487c8c5fde531b6e2be7c1"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"tbtk3","blskey":"2nTYJPkgkAXeZpWLBGxKStcfPGx9n7E6kYiddjudWohc42H2Lzd3BtFpsSRur9YnEVkFPbXLqkArj3g3YuNUv1fxEE2LDU9zRwBL34hT4FZomtgKrACgL72MY943jb7sh5ALpK3PEn3sTDTBvM5zeoKtyw2FvnkNknZe8kMmD5dDVjo", "blskey_pop":"RYWHWWW3nVuD2sSqQgD7TYfzQCP1nYkbnMFkZeohApesTDYYPN7kNgjzGDzvsjmT1nejd5PbyhEmFJgmkPTCHVtweAeUXZhjqqhWwpFP24iYBC9yGDxyxy9tcHocALpAQknuaSoM38EBpX2J3ZbppM4EKB8eeg7ScD5SVGXWQPN1sMZ", "client_ip": "5.252.204.141","client_port":"9706","node_ip":"10.29.29.4", "node_port": "9705", "services":["VALIDATOR"]}, "dest": "F4PVpB9yhddQqPKdqJJqmA9go75DWMJPArXVyiZ5DVFA"}, "metadata":{"from":"So2p6V1T1NU8pQEAtC2z1x"},"type":"0"},"txnMetadata":{"seqNo":3,"txnId":"b3921432e4073d619a57a4b12588cefe5102c6575469264444bb0bc7098de175"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"tbtk4","blskey":"4juqxWyMuYbbYTE5vzxbN747MvxSjfY94SoUZ2MJsS8XxZDp6G2mkYk6tHX3guRF6xq8CYiM3adETrq41NJSWC4pRvHLPsaJsBR2w3tYnnk79kQ8JDZKc272N5G1paNLwVcrEGwRsc2WhERgVbqz1UVXQn1BLrowSX67dRkcMLRwotT", "blskey_pop":"Qw7DVjrVe5ujQdLrJXSE3Xu95aroeJiHJXnrVXaC3R4QzzVTdh6NRGP2So3hAmt5hBUCa2taf4JnSGNr6d2sgsCJ5jngdBH7mKTHDFiHyEemvfiGxyXF82ybhQAsCRbr6rknZ1dSn4EZUmfG5iRX1rK5H59wMLwjELGEGnLXdP6Ym5", "client_ip": "5.252.204.141","client_port":"9708","node_ip":"10.29.29.5","node_port":"9707","services":["VALIDATOR"]},"dest":"5zsoBCXGjxhKhNY5c2HAQR8A6duKqezGJwrPCojs67op"},"metadata":{"from":"AArF7p2Bckz6qwzoEHeRSP"},"type":"0"},"txnMetadata":{"seqNo":4,"txnId":"c4649f64b28ab9935f77368e3805b841af30e1363c4971836036bbd7aa7f2fee"},"ver":"1"}"""


def save_pool_genesis_txn_file(path):
    data = pool_genesis_txn_data()
    path.parent.mkdir(parents=True, exist_ok=True)
    with open(str(path), "w+") as f:
        f.writelines(data)
				
			

You can use the links below to learn more about Hyperledger Indy.

For information about DID SDK, you can refer to the following resources.

Blockchain Networks

Publicnet

To connect to **SSI Türkiye PublicNet**, you can use the genesis file.

You can explore PublicNet by using the website explorer.publicnet.ssiturkiye.bag.org.tr.

 

Adding a Validator node to the network

The steps to add a new validator node to PublicNet are as follows:

  1. The user who will set up the node generates the node keys and DID using the DID and Node seed.
  2. DID and verkey to the trustee.
  3. The trustee adds the DID and verkey to the ledger with the **STEWARD** role.
  4. The user, now having the right to write **NODE** type transactions to the ledger, performs the **NODE** transaction.
  5. The user brings up their node, and thus joins the network as a validator.

For an example of node setup, you can refer to here. It is also recommended to carefully read the Indy Node documentation.

For using the Hyperledger Indy SDK, you can refer to the Indy SDK How Tos page.

The minimum node requirements are as follows:

  • It must have sufficient processing power, with a processor having 8 cores or more.
  • 32 GB of RAM will be considered sufficient.
  • There must be a reliable disk (with RAID) with at least 1 TB of capacity, expandable up to 2 TB.

It is recommended that users operating the node review the following documents:

Testnet

To connect to the **SSI Türkiye Testnet**, you can use this genesis file.

You can explore the Testnet using the website explorer.testnet.ssiturkiye.bag.org.tr.

To register a DID on the Testnet, you can send the DID and its verkey to bagyonetici@tubitak.gov.tr.

To create a DID, you can use either Indy-CLI or Indy SDK.