0.1.6 • Published 4 years ago

@fabrica.city/fabrica-js-sdk v0.1.6

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

#Fabrica Sdk

##Setup Run command npm i in the project root folder.

When the sdk is executed on a CLIENT you should pass a web3 instance and a config object with the following keys:

{
  "ipfsUrl": "https://ipfs.infura.io:5001"
}

When the sdk is executed on a SERVER you should pass a web3 instance and a config object with the following keys:

{
  "privateKey": "*************************************",
  "ipfsUrl": "https://ipfs.infura.io:5001"
}

Code example:

const Web3 = require("web3")
const Fabrica = require("fabrica-sdk") //for local testing just specify the local module folder
const config = {
  "privateKey": "*************************************", //if you are working on a client don't write this line
  "ipfsUrl": "https://ipfs.infura.io:5001"
}
  
const web3 = new Web3("http://localhost:8545")
const fabrica = new Fabrica(web3, config)

fabrica.init()
  .then(() => fabrica.token.mint(TOKEN_ID, "9q94yz3p4en6", "walletA", "ipfs uri here"))
  .then(console.log)
  .catch(console.error)             

##Test To execute a test run the command NODE_ENV=local TEST=<test name> npm test

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

7 years ago

0.0.1

7 years ago