Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
7ccbdf356c | |||
017977b4ba | |||
a1e9c02126 | |||
235c11c2c2 | |||
23aa90252b | |||
1e6253e3f4 |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@mojoio/helium",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@mojoio/helium",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.5",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/smarttime": "^3.0.45",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mojoio/helium",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.5",
|
||||
"private": false,
|
||||
"description": "a helium api package",
|
||||
"main": "dist_ts/index.js",
|
||||
|
29
readme.md
29
readme.md
@ -27,6 +27,35 @@ Platform support | [ => {
|
||||
testHelium = new helium.Helium();
|
||||
expect(testHelium).toBeInstanceOf(helium.Helium);
|
||||
});
|
||||
|
||||
tap.test('should create and update a wallet', async () => {
|
||||
const wallet = await testHelium.addWalletByAddress('13L7By1BmboTx1hRUuN3MtMjNmTFaWj5C6EbRZCK2sceaRCWZev');
|
||||
expect(wallet).toBeInstanceOf(helium.HeliumWallet);
|
||||
console.log(wallet.earningsHnt24h);
|
||||
console.log(wallet.earningsHnt7d);
|
||||
console.log(wallet.earningsHnt14d);
|
||||
console.log(wallet.earningsHnt30d);
|
||||
console.log(wallet.hotspots);
|
||||
|
||||
expect(wallet.hotspots[0]).toBeInstanceOf(helium.HeliumHotspot);
|
||||
|
||||
// you can call wallet.update() at any time to update all wallet information
|
||||
// also wallet.hotspots[0].update() will only update an individual hotspot;
|
||||
})
|
||||
|
||||
tap.start();
|
||||
```
|
||||
|
||||
## Contribution
|
||||
|
||||
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
||||
|
@ -10,11 +10,17 @@ tap.test('should create a valid helium class', async () => {
|
||||
|
||||
tap.test('should create and update a wallet', async () => {
|
||||
const wallet = await testHelium.addWalletByAddress('13L7By1BmboTx1hRUuN3MtMjNmTFaWj5C6EbRZCK2sceaRCWZev');
|
||||
expect(wallet).toBeInstanceOf(helium.HeliumWallet);
|
||||
console.log(wallet.earningsHnt24h);
|
||||
console.log(wallet.earningsHnt7d);
|
||||
console.log(wallet.earningsHnt14d);
|
||||
console.log(wallet.earningsHnt30d);
|
||||
console.log(wallet.hotspots);
|
||||
|
||||
expect(wallet.hotspots[0]).toBeInstanceOf(helium.HeliumHotspot);
|
||||
|
||||
// you can call wallet.update() at any time to update all wallet information
|
||||
// also wallet.hotspots[0].update() will only update an individual hotspot;
|
||||
})
|
||||
|
||||
tap.start();
|
||||
|
@ -1 +1,3 @@
|
||||
export * from './helium.classes.helium';
|
||||
export * from './helium.classes.helium';
|
||||
export * from './helium.classes.heliumwallet';
|
||||
export * from './helium.classes.hotspot';
|
Loading…
x
Reference in New Issue
Block a user