atomic-server icon indicating copy to clipboard operation
atomic-server copied to clipboard

Make it easer for lib users to create a Default Agent

Open joepio opened this issue 3 years ago • 0 comments

If you want to use resource.save(), the Store needs to have Some(Agent). In most examples I currently manually add this.

Some ideas:

  1. Create default Agent on Storelike::init(). The easiest for the user, but how does the user know who this agent is, and what its private key is? It's not returned anywhere, so they need to know to use get_default_agent.
  2. Add a create_default_agent method. Seems pretty convenient.
  3. Implement ::default, which calls create_default_agent.

joepio avatar Jul 12 '22 07:07 joepio