Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions snippets/js/src/getting-started.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const pubky = Pubky.testnet();
// --8<-- [start:js_getting_started_identity]
const keypair = Keypair.random();
const signer = pubky.signer(keypair);
console.log("Your pubky:", signer.publicKey.z32());
// --8<-- [end:js_getting_started_identity]

// --8<-- [start:js_getting_started_signup]
Expand Down
8 changes: 7 additions & 1 deletion src/content/docs/explore/pubky-protocol/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ This tells the SDK to use the local testnet services started by Pubky Docker ins
```js snippet="snippets/js/src/getting-started.ts:js_getting_started_identity"
```

This creates a demo user identity for the hello-world app. The signer uses it to perform identity actions such as signup and signin.
This creates a demo identity for the hello-world app and logs its pubky to the browser console.

#### 3.4 Sign up on the local Homeserver

Expand Down Expand Up @@ -176,6 +176,12 @@ This fetches the same JSON file from Homeserver storage and renders it in the te

Run `npm run dev` again and open the page. You should now see the data displayed there.

#### 3.8 Inspect Homeserver data

Open the [testnet Pubky Explorer](https://explorer.pubky.app/testnet/), enter the pubky logged in Step 3.3, and browse to `/pub/hello-world/data.json`.

The hosted app connects to `localhost`; allow local-network access if prompted. Alternatively, clone [Pubky Explorer](https://github.com/pubky/pubky-explorer) and run it locally.

:::tip[First app complete]
Nice. Your first Pubky app works.
:::
Expand Down
Loading