Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft of programming an AEA, proof read overall #380

Merged
merged 41 commits into from
Nov 7, 2019

Conversation

katharine-murphy
Copy link
Contributor

@katharine-murphy katharine-murphy commented Nov 5, 2019

Proposed changes

Including a DRAFT page of instructions to fix: #298.
Complete proof read of everything from last week.

Fixes

None.

Types of changes

What types of changes does your code introduce to agents-aea?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING doc
  • I am making a pull request against the develop branch (left side). Also you should start your branch off our develop.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that code coverage does not decrease.
  • I have checked that the documentation about the aea cli tool works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Further comments

None.

Copy link
Contributor

@DavidMinarsch DavidMinarsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I added my comments.

public_key_1 = "mailbox1"
mailbox1 = MailBox(OEFLocalConnection(public_key_1, node))
private_key_pem_path = os.path.join(CUR_PATH, "data", "priv.pem")
wallet = Wallet({'default': private_key_pem_path})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wallet creation should be done first.

Then they can get the public key like so:
public_key = wallet.public_keys['default']

Then they can set up a mailbox like so:
mailbox = MailBox(stub_connection)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stub connection doesn't use the public key.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, I would still swap it around as in all but this connection case the public key is needed and derived from the wallet.

docs/hacking-an-agent.md Outdated Show resolved Hide resolved
docs/hacking-an-agent.md Show resolved Hide resolved
docs/hacking-an-agent.md Outdated Show resolved Hide resolved
docs/hacking-an-agent.md Outdated Show resolved Hide resolved
docs/hacking-an-agent.md Outdated Show resolved Hide resolved
docs/hacking-an-agent.md Outdated Show resolved Hide resolved
private_key_pem_path = os.path.join(CUR_PATH, "data", "priv.pem")
wallet = Wallet({'default': private_key_pem_path})
```

Using a variable for accessing running ledgers, initialise the agent.
Get the public key from the wallet. You would use this to talk to an OEF or Fetch.ai ledger node.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would comment this out. We might use it another time but here it does not add value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put the pk comments in a Note. Awaiting your approval.

@DavidMinarsch DavidMinarsch merged commit cd04334 into develop Nov 7, 2019
@DavidMinarsch DavidMinarsch deleted the katharines/docs branch November 7, 2019 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants