fix(core): update
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
|||||||
|
.nogit/
|
||||||
|
|
||||||
|
# artifacts
|
||||||
|
coverage/
|
||||||
|
public/
|
||||||
|
pages/
|
||||||
|
|
||||||
|
# installs
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# caches
|
||||||
|
.yarn/
|
||||||
|
.cache/
|
||||||
|
.rpt2_cache
|
||||||
|
|
||||||
|
# builds
|
||||||
|
dist/
|
||||||
|
dist_*/
|
||||||
|
|
||||||
|
# custom
|
||||||
+141
@@ -0,0 +1,141 @@
|
|||||||
|
# gitzone ci_default
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .npmci_cache/
|
||||||
|
key: '$CI_BUILD_STAGE'
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- security
|
||||||
|
- test
|
||||||
|
- release
|
||||||
|
- metadata
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- npm install -g @shipzone/npmci
|
||||||
|
|
||||||
|
# ====================
|
||||||
|
# security stage
|
||||||
|
# ====================
|
||||||
|
mirror:
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci git mirror
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- notpriv
|
||||||
|
|
||||||
|
auditProductionDependencies:
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci command npm install --production --ignore-scripts
|
||||||
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
- npmci command npm audit --audit-level=high --only=prod --production
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
auditDevDependencies:
|
||||||
|
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci command npm install --ignore-scripts
|
||||||
|
- npmci command npm config set registry https://registry.npmjs.org
|
||||||
|
- npmci command npm audit --audit-level=high --only=dev
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
# ====================
|
||||||
|
# test stage
|
||||||
|
# ====================
|
||||||
|
|
||||||
|
testStable:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
testBuild:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci command npm run build
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
release:
|
||||||
|
stage: release
|
||||||
|
script:
|
||||||
|
- npmci node install stable
|
||||||
|
- npmci npm publish
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- notpriv
|
||||||
|
|
||||||
|
# ====================
|
||||||
|
# metadata stage
|
||||||
|
# ====================
|
||||||
|
codequality:
|
||||||
|
stage: metadata
|
||||||
|
allow_failure: true
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
script:
|
||||||
|
- npmci command npm install -g tslint typescript
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci npm install
|
||||||
|
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- priv
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
stage: metadata
|
||||||
|
script:
|
||||||
|
- npmci trigger
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- notpriv
|
||||||
|
|
||||||
|
pages:
|
||||||
|
stage: metadata
|
||||||
|
script:
|
||||||
|
- npmci node install lts
|
||||||
|
- npmci command npm install -g @gitzone/tsdoc
|
||||||
|
- npmci npm prepare
|
||||||
|
- npmci npm install
|
||||||
|
- npmci command tsdoc
|
||||||
|
tags:
|
||||||
|
- lossless
|
||||||
|
- docker
|
||||||
|
- notpriv
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
artifacts:
|
||||||
|
expire_in: 1 week
|
||||||
|
paths:
|
||||||
|
- public
|
||||||
|
allow_failure: true
|
||||||
Vendored
+11
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"command": "npm test",
|
||||||
|
"name": "Run npm test",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "node-terminal"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Vendored
+26
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"json.schemas": [
|
||||||
|
{
|
||||||
|
"fileMatch": ["/npmextra.json"],
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"npmci": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "settings for npmci"
|
||||||
|
},
|
||||||
|
"gitzone": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "settings for gitzone",
|
||||||
|
"properties": {
|
||||||
|
"projectType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["website", "element", "service", "npm", "wcc"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
Copyright (c) 2022 Lossless GmbH (hello@lossless.com)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"gitzone": {
|
||||||
|
"projectType": "npm",
|
||||||
|
"module": {
|
||||||
|
"githost": "gitlab.com",
|
||||||
|
"gitscope": "mojoio",
|
||||||
|
"gitrepo": "helium",
|
||||||
|
"description": "a helium api package",
|
||||||
|
"npmPackagename": "@mojoio/helium",
|
||||||
|
"license": "MIT",
|
||||||
|
"projectDomain": "mojo.io"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"npmci": {
|
||||||
|
"npmGlobalTools": [],
|
||||||
|
"npmAccessLevel": "public"
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+27597
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"name": "@mojoio/helium",
|
||||||
|
"version": "1.0.1",
|
||||||
|
"private": false,
|
||||||
|
"description": "a helium api package",
|
||||||
|
"main": "dist_ts/index.js",
|
||||||
|
"typings": "dist_ts/index.d.ts",
|
||||||
|
"author": "Lossless GmbH",
|
||||||
|
"license": "MIT",
|
||||||
|
"scripts": {
|
||||||
|
"test": "(tstest test/ --web)",
|
||||||
|
"build": "(tsbuild --web)"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@gitzone/tsbuild": "^2.1.25",
|
||||||
|
"@gitzone/tsbundle": "^1.0.78",
|
||||||
|
"@gitzone/tstest": "^1.0.44",
|
||||||
|
"@pushrocks/tapbundle": "^4.0.3",
|
||||||
|
"@types/node": "^17.0.17",
|
||||||
|
"tslint": "^6.1.3",
|
||||||
|
"tslint-config-prettier": "^1.15.0"
|
||||||
|
},
|
||||||
|
"browserslist": [
|
||||||
|
"last 1 chrome versions"
|
||||||
|
],
|
||||||
|
"files": [
|
||||||
|
"ts/**/*",
|
||||||
|
"ts_web/**/*",
|
||||||
|
"dist/**/*",
|
||||||
|
"dist_*/**/*",
|
||||||
|
"dist_ts/**/*",
|
||||||
|
"dist_ts_web/**/*",
|
||||||
|
"assets/**/*",
|
||||||
|
"cli.js",
|
||||||
|
"npmextra.json",
|
||||||
|
"readme.md"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"@pushrocks/smarttime": "^3.0.45",
|
||||||
|
"@pushrocks/webrequest": "^2.0.15"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# @mojoio/helium
|
||||||
|
a helium api package
|
||||||
|
|
||||||
|
## Availabililty and Links
|
||||||
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@mojoio/helium)
|
||||||
|
* [gitlab.com (source)](https://gitlab.com/mojoio/helium)
|
||||||
|
* [github.com (source mirror)](https://github.com/mojoio/helium)
|
||||||
|
* [docs (typedoc)](https://mojoio.gitlab.io/helium/)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
|
|
||||||
|
Status Category | Status Badge
|
||||||
|
-- | --
|
||||||
|
GitLab Pipelines | [](https://lossless.cloud)
|
||||||
|
GitLab Pipline Test Coverage | [](https://lossless.cloud)
|
||||||
|
npm | [](https://lossless.cloud)
|
||||||
|
Snyk | [](https://lossless.cloud)
|
||||||
|
TypeScript Support | [](https://lossless.cloud)
|
||||||
|
node Support | [](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
|
Code Style | [](https://lossless.cloud)
|
||||||
|
PackagePhobia (total standalone install weight) | [](https://lossless.cloud)
|
||||||
|
PackagePhobia (package size on registry) | [](https://lossless.cloud)
|
||||||
|
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
|
||||||
|
Platform support | [](https://lossless.cloud) [](https://lossless.cloud)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Use TypeScript for best in class intellisense
|
||||||
|
|
||||||
|
## 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). :)
|
||||||
|
|
||||||
|
For further information read the linked docs at the top of this readme.
|
||||||
|
|
||||||
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||||
|
|
||||||
|
[](https://maintainedby.lossless.com)
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import { expect, tap } from '@pushrocks/tapbundle';
|
||||||
|
import * as helium from '../ts/index';
|
||||||
|
|
||||||
|
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');
|
||||||
|
console.log(wallet.earningsHnt24h);
|
||||||
|
console.log(wallet.earningsHnt7d);
|
||||||
|
console.log(wallet.earningsHnt14d);
|
||||||
|
console.log(wallet.earningsHnt30d);
|
||||||
|
console.log(wallet.hotspots);
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.start();
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
import * as plugins from './helium.plugins';
|
||||||
|
|
||||||
|
import { HeliumWallet } from './helium.classes.heliumwallet';
|
||||||
|
|
||||||
|
export class Helium {
|
||||||
|
public baseApiUrl = 'https://helium-api.stakejoy.com';
|
||||||
|
public wallets: HeliumWallet[] = [];
|
||||||
|
|
||||||
|
public async addWalletByAddress(walletAddressArg: string) {
|
||||||
|
const newWallet = new HeliumWallet(this, walletAddressArg);
|
||||||
|
await newWallet.update();
|
||||||
|
this.wallets.push(newWallet);
|
||||||
|
return newWallet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async request<T = any>(urlArg: string): Promise<T> {
|
||||||
|
const webrequest = new plugins.webrequest.WebRequest();
|
||||||
|
const response = await webrequest.request(urlArg, {
|
||||||
|
method: 'GET',
|
||||||
|
headers: {
|
||||||
|
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return response.json();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
import * as plugins from './helium.plugins';
|
||||||
|
import * as interfaces from './interfaces';
|
||||||
|
|
||||||
|
import { Helium } from './helium.classes.helium';
|
||||||
|
import { HeliumHotspot } from './helium.classes.hotspot';
|
||||||
|
|
||||||
|
export class HeliumWallet {
|
||||||
|
heliumRef: Helium;
|
||||||
|
lastUpdate: plugins.smarttime.ExtendedDate;
|
||||||
|
|
||||||
|
originalData: interfaces.IWalletResponse['data'];
|
||||||
|
|
||||||
|
public walletAddress: string;
|
||||||
|
public earningsHnt24h: number;
|
||||||
|
public earningsHnt7d: number;
|
||||||
|
public earningsHnt14d: number;
|
||||||
|
public earningsHnt30d: number;
|
||||||
|
|
||||||
|
public hotspots: HeliumHotspot[] = [];
|
||||||
|
|
||||||
|
constructor(heliumRefArg: Helium, walletAddressArg: string) {
|
||||||
|
this.heliumRef = heliumRefArg;
|
||||||
|
this.walletAddress = walletAddressArg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async update() {
|
||||||
|
const currentDate = new plugins.smarttime.ExtendedDate();
|
||||||
|
|
||||||
|
const walletResponse: interfaces.IWalletResponse = await this.heliumRef.request(`${this.heliumRef.baseApiUrl}/v1/accounts/${this.walletAddress}`)
|
||||||
|
this.originalData = walletResponse.data;
|
||||||
|
|
||||||
|
const getHntEarningsForHours = async (hoursArg: number) => {
|
||||||
|
const earningsResponse: interfaces.IWalletEarningsResponse = await this.heliumRef.request(`${this.heliumRef.baseApiUrl}/v1/accounts/${this.walletAddress}/rewards/sum?min_time=-${hoursArg}%20hour&max_time=${currentDate.toISOString()}&bucket=hour`);
|
||||||
|
const reducedData:number = earningsResponse.data.map(dataArg => dataArg.sum).reduce((previous = 0, currentArg) => {
|
||||||
|
return previous + currentArg;
|
||||||
|
})
|
||||||
|
return reducedData / 100000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.hotspots = await HeliumHotspot.getAllHotspotsForWallet(this)
|
||||||
|
|
||||||
|
|
||||||
|
this.earningsHnt24h = await getHntEarningsForHours(24);
|
||||||
|
this.earningsHnt7d = await getHntEarningsForHours(24 * 7);
|
||||||
|
this.earningsHnt14d = await getHntEarningsForHours(24 * 14);
|
||||||
|
this.earningsHnt30d = await getHntEarningsForHours(24 * 30);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
import * as plugins from './helium.plugins';
|
||||||
|
import * as interfaces from './interfaces';
|
||||||
|
|
||||||
|
import { HeliumWallet } from './helium.classes.heliumwallet';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* a helium hotspot
|
||||||
|
*/
|
||||||
|
export class HeliumHotspot {
|
||||||
|
public static async getAllHotspotsForWallet(walletArg: HeliumWallet) {
|
||||||
|
const hotspotsResponse: interfaces.IWalletHotspotResponse = await walletArg.heliumRef.request(
|
||||||
|
`${walletArg.heliumRef.baseApiUrl}/v1/accounts/13L7By1BmboTx1hRUuN3MtMjNmTFaWj5C6EbRZCK2sceaRCWZev/hotspots`
|
||||||
|
);
|
||||||
|
|
||||||
|
const returnHotspots: HeliumHotspot[] = [];
|
||||||
|
for (const hotspotArg of hotspotsResponse.data) {
|
||||||
|
const newHotspot = new HeliumHotspot(walletArg, hotspotArg.address);
|
||||||
|
await newHotspot.update();
|
||||||
|
returnHotspots.push(newHotspot);
|
||||||
|
}
|
||||||
|
return returnHotspots;
|
||||||
|
}
|
||||||
|
|
||||||
|
// INSTANCE
|
||||||
|
|
||||||
|
heliumWalletRef: HeliumWallet;
|
||||||
|
hotspotAddress: string;
|
||||||
|
public originalData: interfaces.IHotspotResponse['data'];
|
||||||
|
constructor(walletArg: HeliumWallet, hotspotAddress: string) {
|
||||||
|
this.heliumWalletRef = walletArg;
|
||||||
|
this.hotspotAddress = hotspotAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async update() {
|
||||||
|
const hotspotResponse: interfaces.IHotspotResponse = await this.heliumWalletRef.heliumRef.request(
|
||||||
|
`${this.heliumWalletRef.heliumRef.baseApiUrl}/v1/hotspots/${this.hotspotAddress}`
|
||||||
|
);
|
||||||
|
this.originalData = hotspotResponse.data
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import * as smarttime from '@pushrocks/smarttime';
|
||||||
|
import * as webrequest from '@pushrocks/webrequest';
|
||||||
|
|
||||||
|
export {
|
||||||
|
smarttime,
|
||||||
|
webrequest
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from './helium.classes.helium';
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import { IWalletHotspotResponse } from './wallet';
|
||||||
|
|
||||||
|
export interface IHotspotResponse {
|
||||||
|
data: IWalletHotspotResponse['data'][0];
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
export * from './wallet';
|
||||||
|
export * from './hotspots';
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
export interface IWalletResponse {
|
||||||
|
data: {
|
||||||
|
validator_count: number;
|
||||||
|
staked_balance: number;
|
||||||
|
speculative_sec_nonce: number;
|
||||||
|
speculative_nonce: number;
|
||||||
|
sec_nonce: number;
|
||||||
|
sec_balance: number;
|
||||||
|
nonce: number;
|
||||||
|
hotspot_count: number;
|
||||||
|
dc_nonce: number;
|
||||||
|
dc_balance: number;
|
||||||
|
block: number;
|
||||||
|
balance: number;
|
||||||
|
address: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IWalletEarningsResponse {
|
||||||
|
meta: { min_time: string; max_time: string; bucket: 'hour' };
|
||||||
|
data: {
|
||||||
|
total: number;
|
||||||
|
timestamp: string;
|
||||||
|
sum: number;
|
||||||
|
stddev: number;
|
||||||
|
min: number;
|
||||||
|
median: number;
|
||||||
|
max: number;
|
||||||
|
avg: number;
|
||||||
|
}[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IWalletHotspotResponse {
|
||||||
|
data: {
|
||||||
|
lng: number;
|
||||||
|
lat: number;
|
||||||
|
timestamp_added: string;
|
||||||
|
status: {
|
||||||
|
timestamp: string;
|
||||||
|
online: 'online' | 'offline';
|
||||||
|
listen_addrs: string[];
|
||||||
|
height: number;
|
||||||
|
};
|
||||||
|
reward_scale: number;
|
||||||
|
payer: string;
|
||||||
|
owner: string;
|
||||||
|
nonce: number;
|
||||||
|
name: string;
|
||||||
|
mode: 'full' | 'light';
|
||||||
|
location_hex: string;
|
||||||
|
location: string;
|
||||||
|
last_poc_challenge: number;
|
||||||
|
last_change_block: number;
|
||||||
|
geocode: {
|
||||||
|
short_street: string;
|
||||||
|
short_state: string;
|
||||||
|
short_country: string;
|
||||||
|
short_city: string;
|
||||||
|
long_street: string;
|
||||||
|
long_state: string;
|
||||||
|
long_country: string;
|
||||||
|
long_city: string;
|
||||||
|
city_id: string;
|
||||||
|
};
|
||||||
|
gain: number;
|
||||||
|
elevation: number;
|
||||||
|
block_added: number;
|
||||||
|
block: number;
|
||||||
|
address: string;
|
||||||
|
}[];
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||||
|
"rules": {
|
||||||
|
"semicolon": [true, "always"],
|
||||||
|
"no-console": false,
|
||||||
|
"ordered-imports": false,
|
||||||
|
"object-literal-sort-keys": false,
|
||||||
|
"member-ordering": {
|
||||||
|
"options":{
|
||||||
|
"order": [
|
||||||
|
"static-method"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defaultSeverity": "warning"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user