faker-js / faker

Generate massive amounts of fake data in the browser and node.js
https://fakerjs.dev
Other
12.53k stars 900 forks source link

Blockchain module #1038

Open import-brain opened 2 years ago

import-brain commented 2 years ago

Clear and concise description of the problem

I wish to be able to use Faker to be able to generate random cryptocurrency and blockchain related entries.

Suggested solution

faker.blockchain.crypto() // { name: "Cardano", symbol: "ADA" } faker.blockchain.crypto() // { name: "Ripple", symbol: "XRP" } As you can see, for blockchain.crypto(), the backend should work pretty similarly to the functions in science.

faker.blockchain.hashAlgorithm() // "SHA-256" faker.blockchain.hashAlgorithm() // "X11"

In addition, deprecate the finance.bitcoinAddress(), finance.ethereumAddress(), and finance.litecoinAddress() functions and move them to the blockchain module.

Alternative

No response

Additional context

No response

xDivisionByZerox commented 2 years ago

IDK, crypto() could fit into the finance module and hashAlorythm() in the hacker module. I don't see the need for a new module.

Shinigami92 commented 2 years ago

IDK, crypto() could fit into the finance module and hashAlorythm() in the hacker module. I don't see the need for a new module.

That is exactly my same thought when I read this PR initially. Really not sure if a new module is worth it for this.

import-brain commented 2 years ago

IDK, crypto() could fit into the finance module and hashAlorythm() in the hacker module. I don't see the need for a new module.

That is exactly my same thought when I read this PR initially. Really not sure if a new module is worth it for this.

Yeah, should I change this issue to "implement finance.crypto() and hacker.hashAlgorithm()"? Should I make another issue? Should those two functions be in separate issues?

ST-DDT commented 2 years ago

Currently I dont see a usecase for any of these. What are the user going to do with them? Just because we can generate certain data doesnt mean we should.

Shinigami92 commented 2 years ago

Yeah, should I change this issue to "implement finance.crypto() and hacker.hashAlgorithm()"? Should I make another issue? Should those two functions be in separate issues?

Yeah, maybe even better finance.blockchainCrypto() or something else?

Currently I dont see a usecase for any of these. What are the user going to do with them? Just because we can generate certain data doesnt mean we should.

@import-brain It is always good to also provide a cause why you want to implement something.

import-brain commented 2 years ago

Currently I dont see a usecase for any of these. What are the user going to do with them? Just because we can generate certain data doesnt mean we should.

The use case is narrower than most other functions, but I think it would be helpful to generate cryptocurrency visualizations and chart websites, like this.

For example, if .crypto() returned an object with the coin's logo, name, and symbol, a user could call the function multiple times and map the results into cards for testing purposes to ensure the card components they wrote work as expected.

github-actions[bot] commented 1 year ago

Thank you for your feature proposal.

We marked it as "waiting for user interest" for now to gather some feedback from our community:

bnn1 commented 1 year ago

hey guys. making a simple trading app for logging my trades. I'd love to have a way to seed database with coin symbols, coin names and coin pairs. A way to specify kind of coin: stable coins and alts/btc, would be really nice. smth like that maybe faker.finance.crypto({ stable?: boolean })

ST-DDT commented 1 year ago

@bnn1 Then please upvote the issue, so we are able to track community interest better.