Initialize
Init
Once you have your rinkeby ETH, open your terminal and type: node
const Gnosis = require('@frontier-token-research/pm-js')
const HDWalletProvider = require("truffle-hdwallet-provider-privkey");
let helena
Gnosis.create(
{ ethereum: new HDWalletProvider([PRIVATE_KEY], "https://rinkeby.infura.io", 0, 1, false) }
).then(result => {
gnosis = result
})
Create parameters:
ethereum
(string|Provider) – An instance of a Web3 provider or a URL of a Web3 HTTP provider. If not specified, the Web3 provider will be either the browser-injected Web3 (Mist/MetaMask) or an HTTP provider looking at http://localhost:8545defaultAccount
(string) – The account to use as the default from address for ethereum transactions conducted through the Web3 instance. If unspecified, it will be the first account found on Web3. See Gnosis.setWeb3Provider defaultAccount parameter for more info.ipfs
(Object) – ipfs-mini configuration objectipfs.host
(string) – IPFS node address
ipfs.port
(Number) – IPFS protocol port
ipfs.protocol
(string) – IPFS protocol name
logger (function) – A callback for logging. Can also provide ‘console’ to use console.log.
Last updated
Was this helpful?