urbit / NEAR

Public repo for Urbit Labs projects
MIT License
4 stars 3 forks source link

Method ergonomics #10

Open hanfel-dovned opened 8 months ago

hanfel-dovned commented 8 months ago

Right now the Urbit object methods look like this:

pokeNearHandler: (json) => {
        return pokeUrbit("near-handler", "near-handler-action", json);
      },

The json argument here is doing a lot of heavy lifting; this JSON is encoding the poke. The Urbit http-api poke method works in this same way, simply specifying JSON as one of its arguments, but it would be nice if we could specify the components of this JSON that we need a little more explicitly, like so:

Urbit.arbitrary_poke("hood","helm-hi", "msg")

Once we have our current Urbit object implementation working, we should look more closely at these ergonomics.