Giter Club home page Giter Club logo

shakedex's People

Contributors

chikeichan avatar kurumiimari avatar pinheadmz avatar rithvikvibhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shakedex's Issues

Unique Views-Panel

Problem: unique views-panel on shakedex showing null or empty.

โ€” and some parts of domain info show N/A (owner, value, highest)

Reference hsd dependency by github link, not npm package

With shakedex in Bob Wallet, the app (Bob wallet) fails to start because names.json is missing in hsd's published package.

To use shakedex with Bob, it should reference the hsd's GitHub repo directly, like how Bob Wallet does now: https://github.com/kyokan/bob-wallet/blob/master/package.json#L150

If the file doesn't exist, the app doesn't open:

Module not found: Error: Can't resolve './names.json' in '/media/data/Projects/handshake/bob-wallet/node_modules/shakedex/node_modules/hsd/lib/covenants'

nameLock private keys should probably be encrypted in local DB

I know there's some progress already in deriving Shakedex keys from the BIP32 wallet in Bob or hsd, but currently we generate a raw private key, encode it as JSON and insert into levelDB. I think Shakedex should prompt user for a password and encrypt that private key.

Calculation of price decrements

Currently the calculation of price decrements for an auction is a bit off since the lowest price accepted is never part of the auction. I recommend following formula for deduction per step: (highest price - lowest price) / (steps - 1)

Example:
Highest price: 200
Lowest price: 20
Duration: 7 days
Steps: 7 (once per day)

Deduction = (200 - 20) / (7 - 1) = 30 => 200, 170, 140, 110, 80, 50, 20

consider moving hsd & hs-client to "peerDependencies"

...or updating to latest:

[email protected]

[email protected]

This is just to avoid duplicates with all their native node addons n shit when installing Bob Wallet

Actually, since we dont use semver in Bob any version you set in Shakedex will trigger a duplicate download. So I think peer dep is probably best? I don't know if matching the commit hash would work the same way:

    "hs-client": "https://github.com/handshake-org/hs-client/tarball/61aaf060a473b496b85501d795e586b9217d3306",
    "hsd": "https://github.com/handshake-org/hsd/tarball/27745128b3d8f5dd72b4cfbc933e14a1029dbe18",

Script suggestions

Your script is actually a bit long:

shakedex/src/script.js

Lines 9 to 37 in 8cf46ce

Opcode.fromSymbol('type'),
Opcode.fromInt(rules.types.UPDATE),
Opcode.fromSymbol('equal'),
Opcode.fromSymbol('if'),
Opcode.fromSymbol('return'),
Opcode.fromSymbol('endif'),
Opcode.fromSymbol('type'),
Opcode.fromInt(rules.types.REVOKE),
Opcode.fromSymbol('equal'),
Opcode.fromSymbol('if'),
Opcode.fromSymbol('return'),
Opcode.fromSymbol('endif'),
Opcode.fromSymbol('type'),
Opcode.fromInt(rules.types.RENEW),
Opcode.fromSymbol('equal'),
Opcode.fromSymbol('if'),
Opcode.fromSymbol('return'),
Opcode.fromSymbol('endif'),
Opcode.fromSymbol('type'),
Opcode.fromInt(rules.types.TRANSFER),
Opcode.fromSymbol('equal'),
Opcode.fromSymbol('if'),
Opcode.fromPush(pubKey),
Opcode.fromSymbol('checksigverify'),
Opcode.fromSymbol('endif'),
Opcode.fromInt(1),

... you might be able to just do:

OP_TYPE
<int transfer>
OP_EQUAL
OP_IF
  <pubkey>
  OP_CHECKSIG
OP_ELSE
  OP_TYPE
  <int finalize>
  OP_EQUAL
OP_ENDIF

Cannot read property 'height' of null

I think because you are calling nodeClient.getTX() here you should enforce in the docs that the local hsd full node must be run with --index-tx.

There might be other ways to do this, for example working with the hsd wallet maybe creating a new watch-only wallet that watches the p2sh address you create. Or instead of checking the TX, you could just check for the UTXO: https://hsd-dev.org/api-docs/#get-coin-by-outpoint

$ bin/shakedex list-auctions
An error occurred. Stack trace:
TypeError: Cannot read property 'height' of null
    at NameLockTransfer.getConfirmationDetails (/Users/matthewzipkin/Desktop/work/shakedex/src/nameLock.js:42:25)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async listAuctions (/Users/matthewzipkin/Desktop/work/shakedex/src/cli/main.js:283:23)
    at async Command.<anonymous> (/Users/matthewzipkin/Desktop/work/shakedex/src/cli/main.js:66:7)

Please report this as an issue by visiting https://github.com/kurumiimari/shakedex/issues/new.

Passphrase required

I ran through both sides of the auction process locally on regtest, I was only asked for my wallet passphrase for two steps, fulfill-auction and finalize-auction (the two buyer-side actions).

  1. The CLI wouldn't accept empty passphrase (I just entered (space) and it worked -- this is an unencrypted wallet)
  2. Feels like the passphrase should have been required to create the auction TXs because they are signed, why wasn't this required?

cli-table is defunct, try cli-table3 (or better yet-- neo-blessed or blessed-contrib)

cli-table3 is backwards compatible with the unmaintained cli-table.
You can just swap it out and everything should work the same (but slightly better).


But, if you want to really impress people (AND make your work easier) check out:

@blessed/neo-blessed.

Blessed can do a lot. But the basic building blocks are even easier than cli-table.
(There's even a blessed-cli for designing the basic structure of a blessed app visually. It doesn't get much easier than that.)
image

But wait, there's more-- blessed-contrib

Blessed-Contrib adds:

Don't be intimidated by how fancy these animations look

Building with blessed-contrib is even easier than cli-table, while also looking great.

Edit: It's also highly performant. Looks and works just as great on the lowest of low-end hardware.
Edit 2: (It's also MIT licensed.) If you don't try it out I will probably eventually get around to making a fork. But I encourage you to give it a try, because cli-table is a pain to work with.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.