Skip to content

Commit

Permalink
added harmony-network and new bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
neeboo committed Apr 9, 2019
1 parent b823f1a commit cff1cda
Show file tree
Hide file tree
Showing 29 changed files with 9,910 additions and 141 deletions.
2 changes: 2 additions & 0 deletions examples/temp.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
</div>
<script src="../dist/HarmonyAccount.browser.js"></script>
<script src="../dist/HarmonyCrypto.browser.js"></script>
<script src="../dist/HarmonyUtils.browser.js"></script>
<script src="../dist/HarmonyNetwork.browser.js"></script>


</body>
Expand Down
28 changes: 25 additions & 3 deletions examples/testNode.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
const { Account, Wallet } = require('../packages/harmony-account/lib/index.js');
const {
Account,
Wallet,
} = require('../packages/harmony-account/dist/index.js');
const {
getAddressFromPublicKey,
} = require('../packages/harmony-crypto/lib/index.js');
} = require('../packages/harmony-crypto/dist/index.js');
const {
isAddress,
isPrivateKey,
} = require('../packages/harmony-utils/lib/index.js');
} = require('../packages/harmony-utils/dist/index.js');

const { numberToHex } = require('../packages/harmony-utils/dist/index.js');
const {
HttpProvider,
Messenger,
} = require('../packages/harmony-network/dist/index.js');

// const a = Account.new();

Expand Down Expand Up @@ -58,3 +67,16 @@ testWallet();
// console.log(a);
// });
// });

// const newProvider = new HttpProvider('https://dev-api.zilliqa.com');
// const msg = new Messenger(newProvider);

// const getBalance = async () => {
// const res = await msg.send(
// 'GetBalance',
// '9bfec715a6bd658fcb62b0f8cc9bfa2ade71434a',
// );
// console.log(res);
// };

// getBalance();
9 changes: 7 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
const { task } = require('gulp');
const del = require('del');

const packages = ['harmony-crypto'];
const packages = [
'harmony-crypto',
'harmony-account',
'harmony-network',
'harmony-utils',
];

task('cleanBrowser', async () => {
await packages.map((p) => {
Expand All @@ -12,7 +17,7 @@ task('cleanBrowser', async () => {

task('cleanServer', async () => {
await packages.map((p) => {
const pathToLib = `packages/${p}/node`;
const pathToLib = `packages/${p}/dist`;
return del.sync([pathToLib]);
});
});
Expand Down
Loading

0 comments on commit cff1cda

Please sign in to comment.