-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Zach Alam
committed
Dec 14, 2020
1 parent
fa013c1
commit 54892cc
Showing
10 changed files
with
58 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module.exports = { | ||
BITFACT_ADDR: "0x00000000000000000000000000000000000000Bf", | ||
DEFAULT_CHAIN: {chain: 'mainnet'}, | ||
DEFAULT_OPTIONS: {chain: 'mainnet'}, | ||
CONFIG_FILE: 'bitfact.json' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// NOTE: Update to USE from a package manager instead. | ||
const BitFact = require("../BitFact"); | ||
const keys = require("./keys"); | ||
const theKeys = keys({ provider: "", privateKey: "" }); | ||
|
||
console.log(theKeys); | ||
const loadConf = require("./loadConf"); | ||
const setup = loadConf({ | ||
provider: "", | ||
privateKey: "", | ||
options: { chain: "ropsten" }, | ||
}); | ||
|
||
// creates a BitFact | ||
(async () => { | ||
const bitfact = new BitFact(theKeys,{chain:'ropsten'}); | ||
const bitfact = new BitFact(setup); | ||
const receipt = await bitfact.stampText("Hello World!", "hello world memo"); | ||
console.log(receipt); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
// NOTE: Update to USE from a package manager instead. | ||
const BitFact = require("../BitFact"); | ||
const keys = require("./keys"); | ||
const theKeys = keys({ provider: "", privateKey: "" }); | ||
const loadConf = require("./loadConf"); | ||
const setup = loadConf({ | ||
provider: "", | ||
privateKey: "", | ||
options: { chain: "ropsten" }, | ||
}); | ||
|
||
// creates an Ethereum keypair | ||
(async () => { | ||
console.log(await new BitFact(theKeys).createKeypair()); | ||
console.log(await new BitFact(setup).createKeypair()); | ||
})(); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// load keys. | ||
module.exports = (otherConf) => { | ||
let confToUse; | ||
try { | ||
confToUse = require("./bitfact.json"); | ||
} catch (e) { | ||
confToUse = otherConf; | ||
} | ||
return confToUse; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters