mainnet-cash / project

Docs related to the mainnet.cash project
9 stars 3 forks source link

SLP #7

Open readcash opened 4 years ago

readcash commented 4 years ago

@jcramer We want to integrate SLP tokens into this project (http://mainnet.cash/) but I'm not sure how to do it. Probably the best way is SLPDB, but it requires MongoDB. It's not so much of a problem in production, but for tests... Our project is going to be in JavaScript/TypeScript - is it possible to have something to mock up MongoDB (or something else) to avoid having to install a live Mongo for tests?... Thank you in advance!

readcash commented 4 years ago

@2qx suggested that we might look into https://github.com/erikolson186/zangodb Would it work, any advice?

2qx commented 4 years ago

Just to expand, zangodb is a MongoDB wrapper for IndexedDB which supports "filtering, projection, sorting, updating and aggregation", but hasn't been updated in about 3-4 years.

So is SLPDB using any recently added features of MongoDB? Or does it use any MongoDB specific methods that may not be supported by the wrapper?

jcramer commented 4 years ago

consider testing out the fork of bchd that has slp built in. If you send me a dm on telegram @jscramer on Monday we can discuss

readcash commented 4 years ago

@jcramer Thank you for this information. Any idea where to find this fork? I tried looking at BCHD's slp branch, but it hasn't been updated for a year...

readcash commented 4 years ago

cc @cpacia @zquestz Any help would be appreciated. We're not too close to testing SLP tokens, more like preparation/planning.

To be clear: The question is where to find BCHD with SLP support and how good it is.

jcramer commented 4 years ago

The fork is here. Please note, the code is under active development. It passes all of the SLP unit tests. It can be run by compiling locally and running with the --slpindex flag set or slpindex=1 in bchd.conf.

https://github.com/simpleledgerinc/bchd/tree/slp-index

As for connecting to this via gRPC, I have a fork of my javascript BCHD client with new SLP endpoints included. https://github.com/simpleledgerinc/grpc-bchrpc-node/tree/slp

A gRPC client can be created for most languages by compiling the protocol buffers file bchrpc.proto.

readcash commented 4 years ago

@jcramer @chaintip Thank you!

chaintip commented 4 years ago

@jcramer has claimed the 0.06360716 BCH| ~ 20.08 USD sent by @readcash via chaintip.

2qx commented 4 years ago

@readcash Should we circle back on this around mid-October?

readcash commented 4 years ago

I think we'll get to tokens much faster :) But we needed to have some answers about how to proceed before the actual start. Now we have some answer. If this thing already passes SLP unit tests - I'd say it's already stable enough to use it and will get only better.