Skip to content

Commit

Permalink
fix: adding the uri to the env (#254)
Browse files Browse the repository at this point in the history
* fix: adding the uri to the env

* feat: adding an example of what to add in the workshop

* feat: updating instructions

---------

Co-authored-by: Raphael Flechtner <[email protected]>
  • Loading branch information
Dudleyneedham and rflechtner authored Jul 14, 2023
1 parent 7f26046 commit 2f270c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ if (require.main === module) {
// Load attester account
const accountMnemonic = process.env.ATTESTER_ACCOUNT_MNEMONIC as string
const { account } = generateAccount(accountMnemonic)
const { mnemonic } = await createFullDid(account)
const { mnemonic, fullDid } = await createFullDid(account)

console.log('\nsave following to .env to continue\n')
console.error(`ATTESTER_DID_MNEMONIC="${mnemonic}"\n`)
console.error(`ATTESTER_DID_URI="${fullDid.uri}"\n`)
} catch (e) {
console.log('Error while creating attester DID')
throw e
Expand Down
4 changes: 3 additions & 1 deletion docs/develop/03_workshop/04_attester/02_did.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,12 @@ You can now execute the script with:
</TabItem>
</Tabs>

Once you have executed the script, the output should provide you with your `ATTESTER_DID_MNEMONIC`.
Once you have executed the script, the output should provide you with your `ATTESTER_DID_MNEMONIC` and `ATTESTER_DID_URI`.
Your output should look like this (but it won't be identical since the DIDs are constructed from your account):
```
ATTESTER_DID_MNEMONIC="beyond large galaxy...
ATTESTER_DID_URI="did:kilt:4ohMvUHsyeD..."
```
Be sure to save it in your `.env` file.
Expand All @@ -103,6 +104,7 @@ WSS_ADDRESS=wss://peregrine.kilt.io
ATTESTER_ACCOUNT_MNEMONIC="warrior icon use cry...
ATTESTER_ACCOUNT_ADDRESS=4ohMvUHsyeDhMVZF...
ATTESTER_DID_MNEMONIC="beyond large galaxy...
ATTESTER_DID_URI="did:kilt:4ohMvUHsyeD..."
```
Well done - You've successfully generated a full DID! Let's create a CType!

0 comments on commit 2f270c4

Please sign in to comment.