Skip to content

P2P example for README? #36

@natevw

Description

@natevw

I've gotten a bit stuck following the current README.

  1. I generated an endpoint ("id") to play with, storing it to a file for reuse
  2. I've instantiated a mesh and am logging it's link URI thing as the documentation does
  3. (I've also found the currently-undocumented telehash.load helper that does the above for me)
  4. Now what?

The documentation says I need a "router to assist" if I want to connect to a hashname.

I remembered that v2 used seeds and whatnot, but I don't see https://github.com/quartzjer/telehash-seeds/ as a dependency and passing that to telehash.load({id:"endpoint.json", links:"seeds.json"}) doesn't work as the links wants a CommonJS module rather than JSON [for starters]. I also see some hints that Telehash might be doing private meshes by default now, and/or that it's using blockname for DHT perhaps instead of seeds — but blockname's documentation makes it sound like it's a way to store backup DNS A records in Bitcoin so I'm a little lost down this path. What is a router, and do I need a Bitcoin wallet/client/??? to use Telehash in this way, but what does backup IPv4 host mappings have to do with Telehash hashnames and/or keys…?

Backing up to this README again, it looks like the other alternative is that I can connect directly, if I have endpoint/id-reminiscent information. Not sure about "paths" here though… I've already logged this URI thing as the first/only thing after instantiating(/starting?) my own mesh, so it seems important, but gets no further mention in the docs here. I guess I need the public keys from the file generated in step 1 above, and maybe the URI for paths? But paths is an {} instead of a [] so I'm not sure how I should pass it based on the docs.


This is as far as I've got today; and I'm guessing as I continue to UTSL in conjunction with the spec, things will gradually become clearer. But, while they were fresh, I wanted to document some things that were confusing to me and have slowed me down trying to play.

At this point, what I think would be helpful is if:

  • the telehash.org page had a "getting started" link — perhaps I just did the wrong thing by using telehash-js and one of the other implementations is a better place to start? But telehash-js looked fairly recently updated and I've been doing a lot of node.js stuff lately, so it seemed a reasonable place to start
  • this repo (if it is a good place to start) had a bit more fleshed out documentation, especially going to the point where a connection is made. I just checked and see now there is an examples directory, but the one example it has does a "same-process only" meshA.mesh(meshB) thing — at this point I have only a tentative understanding of what a Telehash mesh is in the abstract, or how its been encapsulated in this JS object I know have.
  • there were something of a standard Telehash "blinky" or "Hello, World" kick-the-tires tutorial milestone, in common across projects and maybe even featured prominently on the homepage. I really didn't have clear goal (beyond understanding this system better) when setting down to do this; I guess I was hoping to get some sort of tracer bullet "send over here, some evidence of its receipt happens" type communications working. Is there a public "echo server" or "numbers station" somewhere, that I should aiming to access as a first step? Or should I be trying to connect two of my own processes together? Will that work regardless of where in the world each bit of telehash app code is, or does it need to be on the same LAN [the link:// URL contains only a network ip address] or what?

In short, how do I get to a point where I know Telehash is "working", and then what are my options for remixing things from that point?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions