Skip to content

Commit 7ebb9ab

Browse files
authored
Merge pull request hyperledger-indy#896 from n3m4nja/patch-1
Update step2.py
2 parents 3617ead + 23a6aca commit 7ebb9ab

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

doc/how-tos/rotate-key/python/step2.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
# but it gives us a key that we can use to sign a ledger transaction that we're going to submit later.
2020
print_log('\n5. Generating and storing steward DID and verkey\n')
2121

22-
2322
# The DID and public verkey for this steward key are already in the ledger; they were part of the genesis
2423
# transactions we told the SDK to start with in the previous step. But we have to also put the DID, verkey,
2524
# and private signing key into our wallet, so we can use the signing key to submit an acceptably signed
@@ -33,7 +32,6 @@
3332
steward_did, steward_verkey = await did.create_and_store_my_did(wallet_handle, did_json)
3433
print_log('Steward DID: ', steward_did)
3534

36-
3735
# Now, create a new DID and verkey for a trust anchor, and store it in our wallet as well. Don't use a seed;
3836
# this DID and its keyas are secure and random. Again, we're not writing to the ledger yet.
3937
print_log('\n6. Generating and storing trust anchor DID and verkey\n')
@@ -46,10 +44,11 @@
4644
# This call will look up the private key of the steward DID in our wallet, and use it to sign the transaction.
4745
print_log('\n7. Building NYM request to add Trust Anchor to the ledger\n')
4846
nym_transaction_request = await ledger.build_nym_request(submitter_did=steward_did,
49-
target_did=trust_anchor_did,
50-
ver_key=trust_anchor_verkey,
51-
alias=None,
52-
role='TRUST_ANCHOR')
47+
target_did=trust_anchor_did,
48+
ver_key=trust_anchor_verkey,
49+
alias=None,
50+
role='TRUST_ANCHOR')
51+
5352
print_log('NYM request: ')
5453
pprint.pprint(json.loads(nym_transaction_request))
5554

@@ -59,9 +58,10 @@
5958
# network).
6059
print_log('\n8. Sending NYM request to the ledger\n')
6160
nym_transaction_response = await ledger.sign_and_submit_request(pool_handle=pool_handle,
62-
wallet_handle=wallet_handle,
63-
submitter_did=steward_did,
64-
request_json=nym_transaction_request)
61+
wallet_handle=wallet_handle,
62+
submitter_did=steward_did,
63+
request_json=nym_transaction_request)
64+
6565
print_log('NYM response: ')
6666
pprint.pprint(json.loads(nym_transaction_response))
6767

0 commit comments

Comments
 (0)