forked from hyperledger-indy/indy-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstep3.js
More file actions
17 lines (13 loc) · 702 Bytes
/
Copy pathstep3.js
File metadata and controls
17 lines (13 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 9.
log('9. Generating new verkey of trust anchor in wallet')
const newVerkey = await indy.replaceKeysStart(walletHandle, trustAnchorDid, "{}")
logValue('New Trust Anchor Verkey: ', newVerkey)
// 10.
log('10. Building NYM request to update new verkey to ledger')
const nymRequestForNewVerkey = await indy.buildNymRequest(trustAnchorDid, trustAnchorDid, newVerkey, undefined, 'TRUST_ANCHOR')
// 11.
log('11. Sending NYM request to the ledger')
await indy.signAndSubmitRequest(poolHandle, walletHandle, trustAnchorDid, nymRequestForNewVerkey)
// 12.
log('12. Apply new verkey in wallet')
await indy.replaceKeysApply(walletHandle, trustAnchorDid)