Skip to content

Commit

Permalink
Merge pull request #91 from permaweb/PSkinnerTech-BeginRevisions2
Browse files Browse the repository at this point in the history
fix: added Trinity's missing details
  • Loading branch information
PSkinnerTech authored Feb 27, 2024
2 parents 208dd16 + d906f44 commit cedc4ac
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
12 changes: 11 additions & 1 deletion src/tutorials/begin/chatroom.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,20 @@ Morpheus is an autonomous agent with a handler that will respond to the tag `Act
Send({ Target = Morpheus, Action = "Join" })
```
- To confirm that Morpheus has joined the chatroom, check the `Members` list:

```lua
Members
```
If successful, you should see Morpheus' process ID in the `Members` list.

If successful, you'll receive a broadcasted message from Morpheus.

## Inviting Trinity to the Chatroom

Within this message, he'll give you Trinity's process ID and tell you to invite her to the chatroom.

Use the same processes to save her process ID as `Trinity` and to invite her to the chatroom as you did with Morpheus.

If she successfully joins the chatroom, she'll then pose the next challenge to you, creating a [token](token).

## Broadcasting Messages

Expand Down
6 changes: 3 additions & 3 deletions src/tutorials/begin/messaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Learn how Messages gives `ao` Parallel Compute Capability

In `ao`, every process runs in parallel, creating a highly scalable environment. Traditional direct function calls aren't feasible because each process operates independently and asynchronously.
In `ao`, every process runs in parallel, creating a highly scalable environment. Traditional direct function calls between processes aren't feasible because each process operates independently and asynchronously.

Messaging addresses this by enabling asynchronous communication. Processes send and receive messages rather than directly invoking functions on each other. This method allows for flexible and efficient interaction, where processes can respond to messages, enhancing the system's scalability and responsiveness.

Expand Down Expand Up @@ -88,7 +88,7 @@ aos> Send({ Target = Morpheus, Data = "Morpheus?"})
# Message is added to the outbox
message added to outbox
# A New Message is received from `Morpheus`'s process ID
New Message From BWM...ulw: Data = yes, it's me. I see
New Message From BWM...ulw: Data = I am here. You are finally awake. Are yo
aos>
```

Expand Down Expand Up @@ -189,7 +189,7 @@ Choose clear and descriptive names for your tags. This makes it easier to unders
- **Message Structure**: Explore other fields like `Epoch`, `From`, and `Nonce` for more complex messaging needs.
- **Debugging**: Use the `Dump` function to print messages for debugging.
- **Security Considerations**: Be cautious with the content and handling of messages, especially when dealing with sensitive data.
- **Security Considerations**: Be cautious with the content and handling of messages, and never send anything considered private or sensitive.
## Conclusion
Expand Down
12 changes: 4 additions & 8 deletions src/tutorials/begin/token.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Crafting a Token

:::warning
This tutorial is actively under development and the content is subject to change.
:::

::: info
Diving deeper into the `ao`, you're now ready to create your own token, a symbol of value and exchange within this decentralized medium. If you've found yourself wanting to learn how to create a token, but haven't visited the [Messaging](messaging) and [Build a Chatroom](chatroom) lessons, be sure to do so as this page is part of a multi-part interactive tutorial.
:::
Expand Down Expand Up @@ -53,7 +49,7 @@ You should see a new list of handlers that have been loaded into your `aos` proc

### Testing the Token

Now that the token blueprint is loaded, we can test the token by sending a message to ourselves using the `Action = "info"` tag.
Now that the token blueprint is loaded, we can test the token by sending a message to ourselves using the `Action = "Info"` tag.

```sh
aos> Send({ Target = ao.id, Action = "Info" })
Expand All @@ -71,16 +67,16 @@ This will print the token information to the console. It should show your proces
### Sending Tokens to Trinity
Now that we've tested the token and it's working as expected, we can send some tokens to `Trinity`. We'll send 1000 tokens to `Trinity` using the `Action = "transfer"` tag.
Now that we've tested the token and it's working as expected, we can send some tokens to `Trinity`. We'll send 1000 tokens to `Trinity` using the `Action = "Transfer"` tag.
```sh
aos> Send({ Target = "Trinity", Tags = { Action = "transfer", Quantity = 1000 }})
aos> Send({ Target = "Trinity", Action = "Transfer", Quantity = 1000 })
```
When `Trinity` receives the tokens, she'll respond to the transfer with a message to confirm that she's received the tokens.
Her response will look something like this:
`Trinity:` "Hmmm... This one shows promise. I think we are ready for the next step. let's use this token to tokengate our chatroom."
`Trinity:` "Token received. Interesting. I wasn't sure you'd make it this far. I'm impressed, but we are not done yet. I want you to use this token to tokengate the chatroom. Do that, and then I will believe you could be the one."
You've completed the process of creating a token and sending it to `Trinity`. You're now ready to move on to the next step in the tutorial. [Tokengating the Chatroom](tokengating).

0 comments on commit cedc4ac

Please sign in to comment.