Last active
January 17, 2023 13:17
-
-
Save ItayPodhajcer/5ad1973533ae7fcff3dbfe492236eac8 to your computer and use it in GitHub Desktop.
terraform-azure-confidential-ledger/test-ledger.py#data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ledger_client = ConfidentialLedgerClient( | |
endpoint=ledger_url, | |
credential=credential, | |
ledger_certificate_path=ledger_tls_cert_file_name | |
) | |
sample_entry = {"contents": "Hello world!"} | |
ledger_client.create_ledger_entry(entry=sample_entry) | |
latest_entry = ledger_client.get_current_ledger_entry() | |
print("Latest entry:") | |
print(f" Transaction ID: {latest_entry['transactionId']}") | |
print(f" Collection ID: {latest_entry['collectionId']}") | |
print(f" Contents: {latest_entry['contents']}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment