# @reflaunt/reflaunt-erc721

> The objective of this project is to provide a blockchain library that can be used easily in every reflaunt project.

Latest version **1.0.1** (published 2019-12-03) · SEE LICENSE IN license.txt license · 0 weekly downloads

## Install

```sh
npm install @reflaunt/reflaunt-erc721
pnpm add @reflaunt/reflaunt-erc721
yarn add @reflaunt/reflaunt-erc721
bun add @reflaunt/reflaunt-erc721
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-12-03 |
| First published | 2018-11-07 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN license.txt |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 17 |
| Unpacked size | 2.7 MB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Author | Reflaunt Pte Ltd |
| Maintainers | gaolinch, hanstf, nightfury |
| Keywords | reflaunt, erc721, blockchain |

## Links

- npm: https://www.npmjs.com/package/@reflaunt/reflaunt-erc721
- Repository: https://gaolinch@bitbucket.org/gaolinch/erc721-smartcontract-lib
- Homepage: https://bitbucket.org/gaolinch/erc721-smartcontract-lib/src/master/#readme
- npm.io page: https://npm.io/package/@reflaunt/reflaunt-erc721

## Dependencies (17)

- [web3](https://npm.io/package/web3.md) ^1.2.4
- [axios](https://npm.io/package/axios.md) ^0.18.0
- [bip39](https://npm.io/package/bip39.md) ^3.0.2
- [bn.js](https://npm.io/package/bn.js.md) ^5.0.0
- [dotenv](https://npm.io/package/dotenv.md) ^6.1.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [tsyringe](https://npm.io/package/tsyringe.md) ^4.0.1
- [ganache-core](https://npm.io/package/ganache-core.md) ^2.8.0
- [ipfs-http-client](https://npm.io/package/ipfs-http-client.md) ^30.1.4
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.1.13
- [@truffle/contract](https://npm.io/package/@truffle/contract.md) ^4.1.1
- [ethereumjs-wallet](https://npm.io/package/ethereumjs-wallet.md) ^0.6.3
- [@truffle/contract-schema](https://npm.io/package/@truffle/contract-schema.md) ^3.0.19
- [truffle-hdwallet-provider](https://npm.io/package/truffle-hdwallet-provider.md) ^1.0.17
- [@truffle/hdwallet-provider](https://npm.io/package/@truffle/hdwallet-provider.md) ^1.0.26
- [@truffle/interface-adapter](https://npm.io/package/@truffle/interface-adapter.md) ^0.4.0
- [truffle-privatekey-provider](https://npm.io/package/truffle-privatekey-provider.md) ^1.3.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-12-03
- 0.0.13 — 2019-10-18
- 0.0.12 — 2019-04-10
- 0.0.11 — 2019-03-28
- 0.0.10 — 2019-02-15
- 0.0.9 — 2019-02-14
- 0.0.8 — 2019-02-13
- 0.0.7 — 2019-02-12
- 0.0.6 — 2019-02-12
- 0.0.5 — 2019-02-12
- 0.0.4 — 2019-02-12
- 0.0.3 — 2019-02-12
- 0.0.2 — 2018-11-07

## README

# Reflaunt lib

The objective of this project is to provide a blockhchain library that can be used
easily in every reflaunt project. 

This project includes the migration of ERC-721 based token that will become the standard
of reflaunt blockchain to emit non-fungible tokens for every products.

To foster conviniences, reflaunt wallets will be derived on the HD wallet that is defined by the creator,
the reflaunt user's user id will become the HD wallet last path. 

Eg. reflaunt user id 100 and reflaunt is using hd wallet path "m/44'/60'/0'/0/", the wallet will be generated
based on the defined mnemonic and path of "m/44'/60'/0'/0/100".


To start, please import it this way

```
import {ReflauntErc721} from "@reflaunt/reflaunt-erc721";
```

Next please instatiate the class this way

```
this.api = new ReflauntErc721({
      mnemonic: '...',
      nodeUrl: '...'
    });
```

### Testing
As we are using ganache to construct a mock node for testing and run it this way
```
./node_modules/.bin/ganache-cli -m 'blame left final crime wing curious actual light drip trip patient daughter' -p 9988
```
then run
```
jest test
```

### Note
This library do not cover the authentication and the security is solely based on the caller mnemonic key and closed within 
the hd wallet ecosystem.

### Contract address
- ROPSTEN: 0xD64F081BF118e17338297F2B3Fdf301dF6874997
- SOKOL: 0xfF2Bb1588f44382337a4b328AFB4fc943ddc8b14

#### Check it out at: 
- ROPSTEN: https://ropsten.etherscan.io/address/0xD64F081BF118e17338297F2B3Fdf301dF6874997
- SOKOL: https://blockscout.com/poa/sokol/address/0xfF2Bb1588f44382337a4b328AFB4fc943ddc8b14/transactions

### Current Parameters
- ROPSTEN_MNEMONIC = 'blame left final crime wing curious actual light drip trip patient daughter'
- ROPSTEN_NODE_URL = 'https://ropsten.infura.io/v3/821f08fc642942f7989c54907cd2ccfd'

- SOKOL_MNEMONIC = 'blame left final crime wing curious actual light drip trip patient daughter'
- SOKOL_NODE_URL = 'https://sokol.poa.network'

- DOCKER_MNEMONIC = 'blame left final crime wing curious actual light drip trip patient daughter'
- DOCKER_NODE_URL = 'http://testrpc:9988'


### Continuous integration
```
git tag $(VERSION_NO eg. 0.0.3)
git push origin master --tags
```

---
_Source: https://npm.io/package/@reflaunt/reflaunt-erc721 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
