Go to file
2022-02-11 17:56:24 +01:00
.vscode fix(core): update 2022-02-11 17:49:12 +01:00
test fix(core): update 2022-02-11 17:53:50 +01:00
ts fix(core): update 2022-02-11 17:53:50 +01:00
.gitignore fix(core): update 2022-02-11 17:49:12 +01:00
.gitlab-ci.yml fix(core): update 2022-02-11 17:49:12 +01:00
license fix(core): update 2022-02-11 17:49:12 +01:00
npmextra.json fix(core): update 2022-02-11 17:49:12 +01:00
package-lock.json 1.0.5 2022-02-11 17:56:24 +01:00
package.json 1.0.5 2022-02-11 17:56:24 +01:00
readme.md fix(core): update 2022-02-11 17:56:23 +01:00
tslint.json fix(core): update 2022-02-11 17:49:12 +01:00

@mojoio/helium

a helium api package

Status for master

Status Category Status Badge
GitLab Pipelines pipeline status
GitLab Pipline Test Coverage coverage report
npm npm downloads per month
Snyk Known Vulnerabilities
TypeScript Support TypeScript
node Support node
Code Style Code Style
PackagePhobia (total standalone install weight) PackagePhobia
PackagePhobia (package size on registry) PackagePhobia
BundlePhobia (total size when bundled) BundlePhobia
Platform support Supports Windows 10 Supports Mac OS X

Usage

Use TypeScript for best in class intellisense

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 or contribute monthly. :)

For further information read the linked docs at the top of this readme.

MIT licensed | © Lossless GmbH | By using this npm module you agree to our privacy policy

repo-footer