@beblurt/blurt-nodes-checker 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/README.md +318 -0
- package/dist/blurt-nodes-checker.min.js +23 -0
- package/lib/helpers/BLOCK_API/GET_BLOCK.d.ts +26 -0
- package/lib/helpers/BLOCK_API/GET_BLOCK.js +2 -0
- package/lib/helpers/BLOCK_API/GET_BLOCK.js.map +1 -0
- package/lib/helpers/CONDENSER_API/DYNAMIC_GLOBAL_PROPERTIES.d.ts +67 -0
- package/lib/helpers/CONDENSER_API/DYNAMIC_GLOBAL_PROPERTIES.js +2 -0
- package/lib/helpers/CONDENSER_API/DYNAMIC_GLOBAL_PROPERTIES.js.map +1 -0
- package/lib/helpers/CONDENSER_API/GET_ACCOUNT.d.ts +73 -0
- package/lib/helpers/CONDENSER_API/GET_ACCOUNT.js +2 -0
- package/lib/helpers/CONDENSER_API/GET_ACCOUNT.js.map +1 -0
- package/lib/helpers/CONDENSER_API/GET_BLOG_ENTRY.d.ts +7 -0
- package/lib/helpers/CONDENSER_API/GET_BLOG_ENTRY.js +2 -0
- package/lib/helpers/CONDENSER_API/GET_BLOG_ENTRY.js.map +1 -0
- package/lib/helpers/CONDENSER_API/GET_CONFIG.d.ts +174 -0
- package/lib/helpers/CONDENSER_API/GET_CONFIG.js +2 -0
- package/lib/helpers/CONDENSER_API/GET_CONFIG.js.map +1 -0
- package/lib/helpers/CONDENSER_API/GET_CONTENT.d.ts +54 -0
- package/lib/helpers/CONDENSER_API/GET_CONTENT.js +2 -0
- package/lib/helpers/CONDENSER_API/GET_CONTENT.js.map +1 -0
- package/lib/helpers/CONDENSER_API/GET_DISCUSSION.d.ts +39 -0
- package/lib/helpers/CONDENSER_API/GET_DISCUSSION.js +2 -0
- package/lib/helpers/CONDENSER_API/GET_DISCUSSION.js.map +1 -0
- package/lib/helpers/index.d.ts +54 -0
- package/lib/helpers/index.js +2 -0
- package/lib/helpers/index.js.map +1 -0
- package/lib/hrtime.d.ts +1 -0
- package/lib/hrtime.js +29 -0
- package/lib/hrtime.js.map +1 -0
- package/lib/index.d.ts +43 -0
- package/lib/index.js +337 -0
- package/lib/index.js.map +1 -0
- package/lib/test.d.ts +22 -0
- package/lib/test.js +53 -0
- package/lib/test.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
export declare type GET_CONFIG = {
|
|
2
|
+
IS_TEST_NET: false;
|
|
3
|
+
BLURT_REDUCED_VOTE_POWER_RATE: number;
|
|
4
|
+
BLURT_100_PERCENT: number;
|
|
5
|
+
BLURT_1_PERCENT: number;
|
|
6
|
+
BLURT_ACCOUNT_RECOVERY_REQUEST_EXPIRATION_PERIOD: string;
|
|
7
|
+
BLURT_ACTIVE_CHALLENGE_COOLDOWN: string;
|
|
8
|
+
BLURT_ACTIVE_CHALLENGE_FEE: {
|
|
9
|
+
amount: string;
|
|
10
|
+
precision: number;
|
|
11
|
+
nai: string;
|
|
12
|
+
};
|
|
13
|
+
BLURT_ADDRESS_PREFIX: string;
|
|
14
|
+
BLURT_APR_PERCENT_MULTIPLY_PER_BLOCK: string;
|
|
15
|
+
BLURT_APR_PERCENT_MULTIPLY_PER_HOUR: string;
|
|
16
|
+
BLURT_APR_PERCENT_MULTIPLY_PER_ROUND: string;
|
|
17
|
+
BLURT_APR_PERCENT_SHIFT_PER_BLOCK: number;
|
|
18
|
+
BLURT_APR_PERCENT_SHIFT_PER_HOUR: number;
|
|
19
|
+
BLURT_APR_PERCENT_SHIFT_PER_ROUND: number;
|
|
20
|
+
BLURT_BANDWIDTH_AVERAGE_WINDOW_SECONDS: number;
|
|
21
|
+
BLURT_BANDWIDTH_PRECISION: number;
|
|
22
|
+
BLURT_BENEFICIARY_LIMIT: number;
|
|
23
|
+
BLURT_BLOCKCHAIN_PRECISION: number;
|
|
24
|
+
BLURT_BLOCKCHAIN_PRECISION_DIGITS: number;
|
|
25
|
+
BLURT_BLOCKCHAIN_HARDFORK_VERSION: string;
|
|
26
|
+
BLURT_BLOCKCHAIN_VERSION: string;
|
|
27
|
+
BLURT_BLOCK_INTERVAL: number;
|
|
28
|
+
BLURT_BLOCKS_PER_DAY: number;
|
|
29
|
+
BLURT_BLOCKS_PER_HOUR: number;
|
|
30
|
+
BLURT_BLOCKS_PER_YEAR: number;
|
|
31
|
+
BLURT_CASHOUT_WINDOW_SECONDS: number;
|
|
32
|
+
BLURT_CHAIN_ID: string;
|
|
33
|
+
BLURT_COMMENT_TITLE_LIMIT: number;
|
|
34
|
+
BLURT_REWARD_CONSTANT: string;
|
|
35
|
+
BLURT_CONTENT_REWARD_PERCENT_HF21: number;
|
|
36
|
+
BLURT_CUSTOM_OP_DATA_MAX_LENGTH: number;
|
|
37
|
+
BLURT_CUSTOM_OP_ID_MAX_LENGTH: number;
|
|
38
|
+
BLURT_GENESIS_TIME: string;
|
|
39
|
+
BLURT_HARDFORK_REQUIRED_WITNESSES: number;
|
|
40
|
+
BLURT_HF21_CONVERGENT_LINEAR_RECENT_CLAIMS: string;
|
|
41
|
+
BLURT_INFLATION_NARROWING_PERIOD: number;
|
|
42
|
+
BLURT_INFLATION_RATE_START_PERCENT: number;
|
|
43
|
+
BLURT_INFLATION_RATE_STOP_PERCENT: number;
|
|
44
|
+
BLURT_INIT_MINER_NAME: string;
|
|
45
|
+
BLURT_INIT_PUBLIC_KEY_STR: string;
|
|
46
|
+
BLURT_INIT_SUPPLY: string;
|
|
47
|
+
BLURT_IRREVERSIBLE_THRESHOLD: number;
|
|
48
|
+
BLURT_MAX_ACCOUNT_CREATION_FEE: number;
|
|
49
|
+
BLURT_MAX_ACCOUNT_NAME_LENGTH: number;
|
|
50
|
+
BLURT_MAX_ACCOUNT_WITNESS_VOTES: number;
|
|
51
|
+
BLURT_MAX_ASSET_WHITELIST_AUTHORITIES: number;
|
|
52
|
+
BLURT_MAX_AUTHORITY_MEMBERSHIP: number;
|
|
53
|
+
BLURT_MAX_BLOCK_SIZE: number;
|
|
54
|
+
BLURT_SOFT_MAX_BLOCK_SIZE: number;
|
|
55
|
+
BLURT_MAX_CASHOUT_WINDOW_SECONDS: number;
|
|
56
|
+
BLURT_MAX_COMMENT_DEPTH: number;
|
|
57
|
+
BLURT_MAX_INSTANCE_ID: string;
|
|
58
|
+
BLURT_MAX_MEMO_SIZE: number;
|
|
59
|
+
BLURT_MAX_WITNESSES: number;
|
|
60
|
+
BLURT_MAX_PERMLINK_LENGTH: number;
|
|
61
|
+
BLURT_MAX_PROXY_RECURSION_DEPTH: number;
|
|
62
|
+
BLURT_MAX_RUNNER_WITNESSES_HF17: number;
|
|
63
|
+
BLURT_MAX_SATOSHIS: string;
|
|
64
|
+
BLURT_MAX_SHARE_SUPPLY: string;
|
|
65
|
+
BLURT_MAX_SIG_CHECK_DEPTH: number;
|
|
66
|
+
BLURT_MAX_SIG_CHECK_ACCOUNTS: number;
|
|
67
|
+
BLURT_MAX_TIME_UNTIL_EXPIRATION: number;
|
|
68
|
+
BLURT_MAX_TRANSACTION_SIZE: number;
|
|
69
|
+
BLURT_MAX_UNDO_HISTORY: number;
|
|
70
|
+
BLURT_MAX_URL_LENGTH: number;
|
|
71
|
+
BLURT_MAX_VOTE_CHANGES: number;
|
|
72
|
+
BLURT_MAX_VOTED_WITNESSES_HF17: number;
|
|
73
|
+
BLURT_MAX_WITHDRAW_ROUTES: number;
|
|
74
|
+
BLURT_MAX_WITNESS_URL_LENGTH: number;
|
|
75
|
+
BLURT_MIN_ACCOUNT_CREATION_FEE: number;
|
|
76
|
+
BLURT_MIN_ACCOUNT_NAME_LENGTH: number;
|
|
77
|
+
BLURT_MIN_BLOCK_SIZE_LIMIT: number;
|
|
78
|
+
BLURT_MIN_BLOCK_SIZE: number;
|
|
79
|
+
BLURT_MIN_CONTENT_REWARD: {
|
|
80
|
+
amount: string;
|
|
81
|
+
precision: number;
|
|
82
|
+
nai: string;
|
|
83
|
+
};
|
|
84
|
+
BLURT_MIN_CURATE_REWARD: {
|
|
85
|
+
amount: string;
|
|
86
|
+
precision: number;
|
|
87
|
+
nai: string;
|
|
88
|
+
};
|
|
89
|
+
BLURT_MIN_PERMLINK_LENGTH: number;
|
|
90
|
+
BLURT_MIN_REPLY_INTERVAL_HF20: number;
|
|
91
|
+
BLURT_MIN_ROOT_COMMENT_INTERVAL: number;
|
|
92
|
+
BLURT_MIN_COMMENT_EDIT_INTERVAL: number;
|
|
93
|
+
BLURT_MIN_VOTE_INTERVAL_SEC: number;
|
|
94
|
+
BLURT_MINER_ACCOUNT: string;
|
|
95
|
+
BLURT_MIN_PAYOUT: {
|
|
96
|
+
amount: string;
|
|
97
|
+
precision: number;
|
|
98
|
+
nai: string;
|
|
99
|
+
};
|
|
100
|
+
BLURT_MIN_PRODUCER_REWARD: {
|
|
101
|
+
amount: string;
|
|
102
|
+
precision: number;
|
|
103
|
+
nai: string;
|
|
104
|
+
};
|
|
105
|
+
BLURT_MIN_TRANSACTION_EXPIRATION_LIMIT: number;
|
|
106
|
+
BLURT_MIN_TRANSACTION_SIZE_LIMIT: number;
|
|
107
|
+
BLURT_MIN_UNDO_HISTORY: number;
|
|
108
|
+
BLURT_NULL_ACCOUNT: string;
|
|
109
|
+
BLURT_OWNER_AUTH_RECOVERY_PERIOD: string;
|
|
110
|
+
BLURT_OWNER_CHALLENGE_COOLDOWN: string;
|
|
111
|
+
BLURT_OWNER_CHALLENGE_FEE: {
|
|
112
|
+
amount: string;
|
|
113
|
+
precision: number;
|
|
114
|
+
nai: string;
|
|
115
|
+
};
|
|
116
|
+
BLURT_OWNER_UPDATE_LIMIT: number;
|
|
117
|
+
BLURT_POST_REWARD_FUND_NAME: string;
|
|
118
|
+
BLURT_PROXY_TO_SELF_ACCOUNT: string;
|
|
119
|
+
BLURT_SECONDS_PER_YEAR: number;
|
|
120
|
+
BLURT_PROPOSAL_FUND_PERCENT_HF21: number;
|
|
121
|
+
BLURT_RECENT_RSHARES_DECAY_TIME_HF19: string;
|
|
122
|
+
BLURT_REVERSE_AUCTION_WINDOW_SECONDS_HF21: number;
|
|
123
|
+
BLURT_ROOT_POST_PARENT: string;
|
|
124
|
+
BLURT_SAVINGS_WITHDRAW_REQUEST_LIMIT: number;
|
|
125
|
+
BLURT_SAVINGS_WITHDRAW_TIME: string;
|
|
126
|
+
BLURT_SOFT_MAX_COMMENT_DEPTH: number;
|
|
127
|
+
BLURT_TEMP_ACCOUNT: string;
|
|
128
|
+
BLURT_UPVOTE_LOCKOUT_HF17: string;
|
|
129
|
+
BLURT_UPVOTE_LOCKOUT_SECONDS: number;
|
|
130
|
+
BLURT_VESTING_FUND_PERCENT_HF16: number;
|
|
131
|
+
BLURT_VESTING_WITHDRAW_INTERVALS: number;
|
|
132
|
+
BLURT_VESTING_WITHDRAW_INTERVALS_HF5: number;
|
|
133
|
+
BLURT_VESTING_WITHDRAW_INTERVAL_SECONDS: number;
|
|
134
|
+
BLURT_VOTE_DUST_THRESHOLD: number;
|
|
135
|
+
BLURT_VOTING_MANA_REGENERATION_SECONDS: number;
|
|
136
|
+
BLURT_SYMBOL: {
|
|
137
|
+
nai: string;
|
|
138
|
+
decimals: number;
|
|
139
|
+
};
|
|
140
|
+
VESTS_SYMBOL: {
|
|
141
|
+
nai: string;
|
|
142
|
+
decimals: number;
|
|
143
|
+
};
|
|
144
|
+
BLURT_VIRTUAL_SCHEDULE_LAP_LENGTH2: string;
|
|
145
|
+
BLURT_DELEGATION_RETURN_PERIOD_HF20: number;
|
|
146
|
+
BLURT_RD_MIN_DECAY_BITS: number;
|
|
147
|
+
BLURT_RD_MAX_DECAY_BITS: number;
|
|
148
|
+
BLURT_RD_DECAY_DENOM_SHIFT: number;
|
|
149
|
+
BLURT_RD_MAX_POOL_BITS: number;
|
|
150
|
+
BLURT_RD_MAX_BUDGET_1: string;
|
|
151
|
+
BLURT_RD_MAX_BUDGET_2: number;
|
|
152
|
+
BLURT_RD_MAX_BUDGET_3: number;
|
|
153
|
+
BLURT_RD_MAX_BUDGET: number;
|
|
154
|
+
BLURT_RD_MIN_DECAY: number;
|
|
155
|
+
BLURT_RD_MIN_BUDGET: number;
|
|
156
|
+
BLURT_RD_MAX_DECAY: number;
|
|
157
|
+
BLURT_ACCOUNT_SUBSIDY_PRECISION: number;
|
|
158
|
+
BLURT_WITNESS_SUBSIDY_BUDGET_PERCENT: number;
|
|
159
|
+
BLURT_WITNESS_SUBSIDY_DECAY_PERCENT: number;
|
|
160
|
+
BLURT_DEFAULT_ACCOUNT_SUBSIDY_DECAY: number;
|
|
161
|
+
BLURT_DEFAULT_ACCOUNT_SUBSIDY_BUDGET: number;
|
|
162
|
+
BLURT_DECAY_BACKSTOP_PERCENT: number;
|
|
163
|
+
BLURT_BLOCK_GENERATION_POSTPONED_TX_LIMIT: number;
|
|
164
|
+
BLURT_PENDING_TRANSACTION_EXECUTION_LIMIT: number;
|
|
165
|
+
BLURT_TREASURY_ACCOUNT: string;
|
|
166
|
+
BLURT_TREASURY_FEE: number;
|
|
167
|
+
BLURT_PROPOSAL_MAINTENANCE_PERIOD: number;
|
|
168
|
+
BLURT_PROPOSAL_MAINTENANCE_CLEANUP: number;
|
|
169
|
+
BLURT_PROPOSAL_SUBJECT_MAX_LENGTH: number;
|
|
170
|
+
BLURT_PROPOSAL_MAX_IDS_NUMBER: number;
|
|
171
|
+
BLURT_PROPOSAL_MAX_END_DATE: number;
|
|
172
|
+
BLURT_PROPOSAL_EXPIRATION_UNFUNDED: number;
|
|
173
|
+
BLURT_INIT_POST_REWARD_BALANCE: number;
|
|
174
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET_CONFIG.js","sourceRoot":"","sources":["../../../src/helpers/CONDENSER_API/GET_CONFIG.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare type GET_CONTENT = {
|
|
2
|
+
id: number;
|
|
3
|
+
author: string;
|
|
4
|
+
permlink: string;
|
|
5
|
+
category: string;
|
|
6
|
+
parent_author: string | '';
|
|
7
|
+
parent_permlink: string | '';
|
|
8
|
+
title: string | '';
|
|
9
|
+
body: string;
|
|
10
|
+
json_metadata: string;
|
|
11
|
+
last_update: string;
|
|
12
|
+
created: string;
|
|
13
|
+
active: string;
|
|
14
|
+
last_payout: string;
|
|
15
|
+
depth: number;
|
|
16
|
+
children: number;
|
|
17
|
+
net_rshares: string;
|
|
18
|
+
abs_rshares: string;
|
|
19
|
+
vote_rshares: string;
|
|
20
|
+
children_abs_rshares: string;
|
|
21
|
+
cashout_time: string;
|
|
22
|
+
max_cashout_time: string;
|
|
23
|
+
total_vote_weight: number;
|
|
24
|
+
reward_weight: number;
|
|
25
|
+
total_payout_value: string;
|
|
26
|
+
curator_payout_value: string;
|
|
27
|
+
author_rewards: number;
|
|
28
|
+
net_votes: number;
|
|
29
|
+
root_author: string;
|
|
30
|
+
root_permlink: string;
|
|
31
|
+
max_accepted_payout: string;
|
|
32
|
+
percent_blurt: number;
|
|
33
|
+
allow_replies: boolean;
|
|
34
|
+
allow_votes: boolean;
|
|
35
|
+
allow_curation_rewards: boolean;
|
|
36
|
+
beneficiaries: [[string, number]];
|
|
37
|
+
url: string;
|
|
38
|
+
root_title: string;
|
|
39
|
+
pending_payout_value: string;
|
|
40
|
+
total_pending_payout_value: string;
|
|
41
|
+
active_votes: [
|
|
42
|
+
{
|
|
43
|
+
voter: string;
|
|
44
|
+
weight: number;
|
|
45
|
+
rshares: number;
|
|
46
|
+
percent: number;
|
|
47
|
+
time: string;
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
replies: Array<unknown>;
|
|
51
|
+
promoted: "0.000 BLURT";
|
|
52
|
+
body_length: 0;
|
|
53
|
+
reblogged_by: Array<unknown>;
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET_CONTENT.js","sourceRoot":"","sources":["../../../src/helpers/CONDENSER_API/GET_CONTENT.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare type GET_DISCUSSION = {
|
|
2
|
+
"author": string;
|
|
3
|
+
"permlink": string;
|
|
4
|
+
"category": string;
|
|
5
|
+
"title": string;
|
|
6
|
+
"body": string;
|
|
7
|
+
"json_metadata": string;
|
|
8
|
+
"created": string;
|
|
9
|
+
"last_update": string;
|
|
10
|
+
"depth": number;
|
|
11
|
+
"children": number;
|
|
12
|
+
"last_payout": string;
|
|
13
|
+
"cashout_time": string;
|
|
14
|
+
"total_payout_value": string;
|
|
15
|
+
"curator_payout_value": string;
|
|
16
|
+
"pending_payout_value": string;
|
|
17
|
+
"promoted": string;
|
|
18
|
+
"replies": Array<string>;
|
|
19
|
+
"body_length": number;
|
|
20
|
+
"author_reputation": number;
|
|
21
|
+
"parent_author": string;
|
|
22
|
+
"parent_permlink": string;
|
|
23
|
+
"url": string;
|
|
24
|
+
"root_title": string;
|
|
25
|
+
"beneficiaries": Array<{
|
|
26
|
+
account: string;
|
|
27
|
+
weight: number;
|
|
28
|
+
}>;
|
|
29
|
+
"max_accepted_payout": string;
|
|
30
|
+
"percent_hbd": number;
|
|
31
|
+
"post_id": number;
|
|
32
|
+
"net_rshares": number;
|
|
33
|
+
"active_votes": Array<{
|
|
34
|
+
"percent": string;
|
|
35
|
+
"reputation": number;
|
|
36
|
+
"rshares": number;
|
|
37
|
+
"voter": string;
|
|
38
|
+
}>;
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GET_DISCUSSION.js","sourceRoot":"","sources":["../../../src/helpers/CONDENSER_API/GET_DISCUSSION.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** TYPE */
|
|
2
|
+
import { BLOCK_GET_BLOCK } from "./BLOCK_API/GET_BLOCK.js";
|
|
3
|
+
import { DYNAMIC_GLOBAL_PROPERTIES } from "./CONDENSER_API/DYNAMIC_GLOBAL_PROPERTIES.js";
|
|
4
|
+
import { GET_ACCOUNT } from "./CONDENSER_API/GET_ACCOUNT.js";
|
|
5
|
+
import { GET_BLOG_ENTRY } from "./CONDENSER_API/GET_BLOG_ENTRY.js";
|
|
6
|
+
import { GET_CONFIG } from "./CONDENSER_API/GET_CONFIG.js";
|
|
7
|
+
import { GET_CONTENT } from "./CONDENSER_API/GET_CONTENT.js";
|
|
8
|
+
import { GET_DISCUSSION } from "./CONDENSER_API/GET_DISCUSSION.js";
|
|
9
|
+
export declare type OPTIONS = {
|
|
10
|
+
full?: boolean;
|
|
11
|
+
timeout?: number;
|
|
12
|
+
interval?: number;
|
|
13
|
+
reset?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare type JSONRPC = {
|
|
16
|
+
jsonrpc: string;
|
|
17
|
+
id: number | string;
|
|
18
|
+
result?: GET_CONFIG | BLOCK_GET_BLOCK | DYNAMIC_GLOBAL_PROPERTIES | Array<GET_ACCOUNT> | Array<GET_BLOG_ENTRY> | GET_CONTENT | Array<GET_DISCUSSION>;
|
|
19
|
+
error?: {
|
|
20
|
+
code: number;
|
|
21
|
+
message: string;
|
|
22
|
+
data?: unknown;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare type TEST_RPC_NODE = {
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
method: string;
|
|
29
|
+
success: boolean;
|
|
30
|
+
duration: number;
|
|
31
|
+
error?: string;
|
|
32
|
+
last_check: number;
|
|
33
|
+
};
|
|
34
|
+
export declare type RPC_NODE = {
|
|
35
|
+
url: string;
|
|
36
|
+
nb_ok: number;
|
|
37
|
+
nb_error: number;
|
|
38
|
+
nb_degraded: number;
|
|
39
|
+
error?: string;
|
|
40
|
+
last_check: number;
|
|
41
|
+
status: "unkown" | "online" | "degraded" | "error";
|
|
42
|
+
duration?: number;
|
|
43
|
+
average_time?: number;
|
|
44
|
+
version?: string;
|
|
45
|
+
deactivated?: boolean;
|
|
46
|
+
test_result: Array<TEST_RPC_NODE>;
|
|
47
|
+
};
|
|
48
|
+
export declare type FULL_TEST = {
|
|
49
|
+
name: string;
|
|
50
|
+
description: string;
|
|
51
|
+
method: "block_api.get_block" | "condenser_api.get_accounts" | "condenser_api.get_blog_entries" | "condenser_api.get_content" | "condenser_api.get_dynamic_global_properties" | "condenser_api.get_discussions_by_blog";
|
|
52
|
+
params: unknown;
|
|
53
|
+
validator: (result: GET_CONFIG | BLOCK_GET_BLOCK | DYNAMIC_GLOBAL_PROPERTIES | Array<GET_ACCOUNT> | Array<GET_BLOG_ENTRY> | GET_CONTENT | Array<GET_DISCUSSION>) => boolean;
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":""}
|
package/lib/hrtime.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const hrtime: (previousTimestamp?: [number, number]) => [number, number];
|
package/lib/hrtime.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const hrtime = (previousTimestamp) => {
|
|
2
|
+
if (typeof process === 'object') {
|
|
3
|
+
return previousTimestamp ? process.hrtime(previousTimestamp) : process.hrtime();
|
|
4
|
+
}
|
|
5
|
+
else {
|
|
6
|
+
/** polyfil for window.performance.now */
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
|
+
const performance = global.performance || {};
|
|
9
|
+
const performanceNow = performance.now ||
|
|
10
|
+
performance.mozNow ||
|
|
11
|
+
performance.msNow ||
|
|
12
|
+
performance.oNow ||
|
|
13
|
+
performance.webkitNow ||
|
|
14
|
+
function () { return (new Date()).getTime(); };
|
|
15
|
+
const clocktime = performanceNow.call(performance) * 1e-3;
|
|
16
|
+
let seconds = Math.floor(clocktime);
|
|
17
|
+
let nanoseconds = Math.floor((clocktime % 1) * 1e9);
|
|
18
|
+
if (previousTimestamp) {
|
|
19
|
+
seconds = seconds - previousTimestamp[0];
|
|
20
|
+
nanoseconds = nanoseconds - previousTimestamp[1];
|
|
21
|
+
if (nanoseconds < 0) {
|
|
22
|
+
seconds--;
|
|
23
|
+
nanoseconds += 1e9;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return [seconds, nanoseconds];
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=hrtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hrtime.js","sourceRoot":"","sources":["../src/hrtime.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,iBAAoC,EAAoB,EAAE;IAC/E,IAAG,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC9B,OAAO,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,CAAA;KAChF;SAAM;QACL,yCAAyC;QACzC,8DAA8D;QAC9D,MAAM,WAAW,GAAQ,MAAM,CAAC,WAAW,IAAI,EAAE,CAAA;QACjD,MAAM,cAAc,GAClB,WAAW,CAAC,GAAG;YACf,WAAW,CAAC,MAAM;YAClB,WAAW,CAAC,KAAK;YACjB,WAAW,CAAC,IAAI;YAChB,WAAW,CAAC,SAAS;YACrB,cAAY,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAA,CAAC,CAAC,CAAA;QAE3C,MAAM,SAAS,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,GAAC,IAAI,CAAA;QACvD,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;QACnC,IAAI,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,GAAC,CAAC,CAAC,GAAC,GAAG,CAAC,CAAA;QAC/C,IAAI,iBAAiB,EAAE;YACrB,OAAO,GAAG,OAAO,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAA;YACxC,WAAW,GAAG,WAAW,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAA;YAChD,IAAI,WAAW,GAAC,CAAC,EAAE;gBACjB,OAAO,EAAE,CAAA;gBACT,WAAW,IAAI,GAAG,CAAA;aACnB;SACF;QACD,OAAO,CAAC,OAAO,EAAC,WAAW,CAAC,CAAA;KAC/B;AACH,CAAC,CAAA"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @project @beblurt/blurt-nodes-checker
|
|
3
|
+
* @author @beblurt (https://blurt.blog/@beblurt)
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright (C) 2022 IMT ASE Co., LTD
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU General Public License
|
|
18
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
/** Axios */
|
|
21
|
+
import axios from "axios";
|
|
22
|
+
/** RxJS */
|
|
23
|
+
import { Subject } from "rxjs";
|
|
24
|
+
import { OPTIONS, RPC_NODE, FULL_TEST } from "./helpers/index.js";
|
|
25
|
+
export { TEST_RPC_NODE, RPC_NODE } from "./helpers/index.js";
|
|
26
|
+
export declare class BlurtNodesChecker {
|
|
27
|
+
nodes: RPC_NODE[];
|
|
28
|
+
message: Subject<RPC_NODE[]>;
|
|
29
|
+
timer: ReturnType<typeof setTimeout>;
|
|
30
|
+
full: boolean;
|
|
31
|
+
interval: number;
|
|
32
|
+
timeout: number;
|
|
33
|
+
reset?: number;
|
|
34
|
+
instance: axios.AxiosInstance;
|
|
35
|
+
intercept?: string;
|
|
36
|
+
tests: FULL_TEST[];
|
|
37
|
+
constructor(nodes: string[], options?: OPTIONS);
|
|
38
|
+
start(): Promise<void>;
|
|
39
|
+
stop(): void;
|
|
40
|
+
restart(): void;
|
|
41
|
+
private check;
|
|
42
|
+
private sendMessage;
|
|
43
|
+
}
|