Compare commits

...

6 Commits

Author SHA1 Message Date
7ccbdf356c 1.0.5 2022-02-11 17:56:24 +01:00
017977b4ba fix(core): update 2022-02-11 17:56:23 +01:00
a1e9c02126 1.0.4 2022-02-11 17:55:35 +01:00
235c11c2c2 fix(core): update 2022-02-11 17:55:34 +01:00
23aa90252b 1.0.3 2022-02-11 17:53:50 +01:00
1e6253e3f4 fix(core): update 2022-02-11 17:53:50 +01:00
5 changed files with 41 additions and 4 deletions

4
package-lock.json generated
View File

@ -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",

View File

@ -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",

View File

@ -27,6 +27,35 @@ Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20W
Use TypeScript for best in class intellisense
```typescript
import { expect, tap } from '@pushrocks/tapbundle';
import * as helium from '@mojoio/helium';
let testHelium: helium.Helium;
tap.test('should create a valid helium class', async () => {
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). :)

View File

@ -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();

View File

@ -1 +1,3 @@
export * from './helium.classes.helium';
export * from './helium.classes.helium';
export * from './helium.classes.heliumwallet';
export * from './helium.classes.hotspot';