@glowlabs-org/utils 0.0.1
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/README.md +98 -0
- package/lib/cjs/constants/index.d.ts +1 -0
- package/lib/cjs/constants/index.js +5 -0
- package/lib/cjs/constants/index.js.map +1 -0
- package/lib/cjs/default-values/gca-to-server-urls.d.ts +0 -0
- package/lib/cjs/default-values/gca-to-server-urls.js +9 -0
- package/lib/cjs/default-values/gca-to-server-urls.js.map +1 -0
- package/lib/cjs/index.d.ts +3 -0
- package/lib/cjs/index.js +22 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/lib/create-weekly-report/index.d.ts +43 -0
- package/lib/cjs/lib/create-weekly-report/index.js +177 -0
- package/lib/cjs/lib/create-weekly-report/index.js.map +1 -0
- package/lib/cjs/lib/create-weekly-report/utils/hash-leaf.d.ts +7 -0
- package/lib/cjs/lib/create-weekly-report/utils/hash-leaf.js +16 -0
- package/lib/cjs/lib/create-weekly-report/utils/hash-leaf.js.map +1 -0
- package/lib/cjs/package.json +1 -0
- package/lib/cjs/types/AuditCompleted.d.ts +3 -0
- package/lib/cjs/types/AuditCompleted.js +4 -0
- package/lib/cjs/types/AuditCompleted.js.map +1 -0
- package/lib/cjs/types/AuditInherited.d.ts +6 -0
- package/lib/cjs/types/AuditInherited.js +4 -0
- package/lib/cjs/types/AuditInherited.js.map +1 -0
- package/lib/cjs/types/Device.d.ts +5 -0
- package/lib/cjs/types/Device.js +4 -0
- package/lib/cjs/types/Device.js.map +1 -0
- package/lib/cjs/types/DuplicatedButPastAuditCompleted.d.ts +8 -0
- package/lib/cjs/types/DuplicatedButPastAuditCompleted.js +3 -0
- package/lib/cjs/types/DuplicatedButPastAuditCompleted.js.map +1 -0
- package/lib/cjs/types/Farm.d.ts +20 -0
- package/lib/cjs/types/Farm.js +3 -0
- package/lib/cjs/types/Farm.js.map +1 -0
- package/lib/cjs/types/FarmStatus.d.ts +14 -0
- package/lib/cjs/types/FarmStatus.js +3 -0
- package/lib/cjs/types/FarmStatus.js.map +1 -0
- package/lib/cjs/types/GCAAndServerUrl.d.ts +5 -0
- package/lib/cjs/types/GCAAndServerUrl.js +3 -0
- package/lib/cjs/types/GCAAndServerUrl.js.map +1 -0
- package/lib/cjs/types/GCAServerResponse.d.ts +6 -0
- package/lib/cjs/types/GCAServerResponse.js +3 -0
- package/lib/cjs/types/GCAServerResponse.js.map +1 -0
- package/lib/cjs/types/GetEquipmentDataHandlerParams.d.ts +5 -0
- package/lib/cjs/types/GetEquipmentDataHandlerParams.js +4 -0
- package/lib/cjs/types/GetEquipmentDataHandlerParams.js.map +1 -0
- package/lib/cjs/types/PayoutWalletAndSplit.d.ts +17 -0
- package/lib/cjs/types/PayoutWalletAndSplit.js +3 -0
- package/lib/cjs/types/PayoutWalletAndSplit.js.map +1 -0
- package/lib/cjs/types/PayoutWalletAndSplitWithRewardSplits.d.ts +15 -0
- package/lib/cjs/types/PayoutWalletAndSplitWithRewardSplits.js +3 -0
- package/lib/cjs/types/PayoutWalletAndSplitWithRewardSplits.js.map +1 -0
- package/lib/cjs/types/RewardSplit.d.ts +5 -0
- package/lib/cjs/types/RewardSplit.js +4 -0
- package/lib/cjs/types/RewardSplit.js.map +1 -0
- package/lib/cjs/types/RewardSplits.d.ts +2 -0
- package/lib/cjs/types/RewardSplits.js +3 -0
- package/lib/cjs/types/RewardSplits.js.map +1 -0
- package/lib/cjs/types/SlotRange.d.ts +4 -0
- package/lib/cjs/types/SlotRange.js +4 -0
- package/lib/cjs/types/SlotRange.js.map +1 -0
- package/lib/cjs/types/WeekAndSlotRange.d.ts +5 -0
- package/lib/cjs/types/WeekAndSlotRange.js +3 -0
- package/lib/cjs/types/WeekAndSlotRange.js.map +1 -0
- package/lib/cjs/types/index.d.ts +14 -0
- package/lib/cjs/types/index.js +31 -0
- package/lib/cjs/types/index.js.map +1 -0
- package/lib/cjs/types/stashed-Farm.d.ts +20 -0
- package/lib/cjs/types/stashed-Farm.js +3 -0
- package/lib/cjs/types/stashed-Farm.js.map +1 -0
- package/lib/esm/constants/index.d.ts +1 -0
- package/lib/esm/constants/index.js +2 -0
- package/lib/esm/constants/index.js.map +1 -0
- package/lib/esm/default-values/gca-to-server-urls.d.ts +0 -0
- package/lib/esm/default-values/gca-to-server-urls.js +9 -0
- package/lib/esm/default-values/gca-to-server-urls.js.map +1 -0
- package/lib/esm/index.d.ts +3 -0
- package/lib/esm/index.js +4 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/lib/create-weekly-report/index.d.ts +43 -0
- package/lib/esm/lib/create-weekly-report/index.js +170 -0
- package/lib/esm/lib/create-weekly-report/index.js.map +1 -0
- package/lib/esm/lib/create-weekly-report/utils/hash-leaf.d.ts +7 -0
- package/lib/esm/lib/create-weekly-report/utils/hash-leaf.js +12 -0
- package/lib/esm/lib/create-weekly-report/utils/hash-leaf.js.map +1 -0
- package/lib/esm/package.json +1 -0
- package/lib/esm/types/AuditCompleted.d.ts +3 -0
- package/lib/esm/types/AuditCompleted.js +3 -0
- package/lib/esm/types/AuditCompleted.js.map +1 -0
- package/lib/esm/types/AuditInherited.d.ts +6 -0
- package/lib/esm/types/AuditInherited.js +3 -0
- package/lib/esm/types/AuditInherited.js.map +1 -0
- package/lib/esm/types/Device.d.ts +5 -0
- package/lib/esm/types/Device.js +3 -0
- package/lib/esm/types/Device.js.map +1 -0
- package/lib/esm/types/DuplicatedButPastAuditCompleted.d.ts +8 -0
- package/lib/esm/types/DuplicatedButPastAuditCompleted.js +2 -0
- package/lib/esm/types/DuplicatedButPastAuditCompleted.js.map +1 -0
- package/lib/esm/types/Farm.d.ts +20 -0
- package/lib/esm/types/Farm.js +2 -0
- package/lib/esm/types/Farm.js.map +1 -0
- package/lib/esm/types/FarmStatus.d.ts +14 -0
- package/lib/esm/types/FarmStatus.js +2 -0
- package/lib/esm/types/FarmStatus.js.map +1 -0
- package/lib/esm/types/GCAAndServerUrl.d.ts +5 -0
- package/lib/esm/types/GCAAndServerUrl.js +2 -0
- package/lib/esm/types/GCAAndServerUrl.js.map +1 -0
- package/lib/esm/types/GCAServerResponse.d.ts +6 -0
- package/lib/esm/types/GCAServerResponse.js +2 -0
- package/lib/esm/types/GCAServerResponse.js.map +1 -0
- package/lib/esm/types/GetEquipmentDataHandlerParams.d.ts +5 -0
- package/lib/esm/types/GetEquipmentDataHandlerParams.js +3 -0
- package/lib/esm/types/GetEquipmentDataHandlerParams.js.map +1 -0
- package/lib/esm/types/PayoutWalletAndSplit.d.ts +17 -0
- package/lib/esm/types/PayoutWalletAndSplit.js +2 -0
- package/lib/esm/types/PayoutWalletAndSplit.js.map +1 -0
- package/lib/esm/types/PayoutWalletAndSplitWithRewardSplits.d.ts +15 -0
- package/lib/esm/types/PayoutWalletAndSplitWithRewardSplits.js +2 -0
- package/lib/esm/types/PayoutWalletAndSplitWithRewardSplits.js.map +1 -0
- package/lib/esm/types/RewardSplit.d.ts +5 -0
- package/lib/esm/types/RewardSplit.js +3 -0
- package/lib/esm/types/RewardSplit.js.map +1 -0
- package/lib/esm/types/RewardSplits.d.ts +2 -0
- package/lib/esm/types/RewardSplits.js +2 -0
- package/lib/esm/types/RewardSplits.js.map +1 -0
- package/lib/esm/types/SlotRange.d.ts +4 -0
- package/lib/esm/types/SlotRange.js +3 -0
- package/lib/esm/types/SlotRange.js.map +1 -0
- package/lib/esm/types/WeekAndSlotRange.d.ts +5 -0
- package/lib/esm/types/WeekAndSlotRange.js +2 -0
- package/lib/esm/types/WeekAndSlotRange.js.map +1 -0
- package/lib/esm/types/index.d.ts +14 -0
- package/lib/esm/types/index.js +15 -0
- package/lib/esm/types/index.js.map +1 -0
- package/lib/esm/types/stashed-Farm.d.ts +20 -0
- package/lib/esm/types/stashed-Farm.js +2 -0
- package/lib/esm/types/stashed-Farm.js.map +1 -0
- package/package.json +46 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
import type { FarmStatus } from "./FarmStatus";
|
2
|
+
import type { SlotRange } from "./SlotRange";
|
3
|
+
export interface PayoutWalletAndSplit {
|
4
|
+
short_id: bigint;
|
5
|
+
payout_wallet: string;
|
6
|
+
auditor: string;
|
7
|
+
auditor_percenage_glow_weight: number;
|
8
|
+
auditor_percentage_usdc_weight: number;
|
9
|
+
glow_weight: number;
|
10
|
+
comments: Array<string> | null;
|
11
|
+
payment_tx_hash: string | null;
|
12
|
+
protocol_fee_paid_week: number;
|
13
|
+
status: FarmStatus | null;
|
14
|
+
weeks_and_slot_ranges_to_invert_power_map: Record<number, Array<SlotRange>> | null;
|
15
|
+
weeks_and_slots_to_invalidate_power_map: Record<number, Array<SlotRange>> | null;
|
16
|
+
timestamp_audited_completed: bigint | null;
|
17
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PayoutWalletAndSplit.js","sourceRoot":"","sources":["../../../src/types/PayoutWalletAndSplit.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { FarmStatus } from "./FarmStatus";
|
2
|
+
import type { RewardSplits } from "./RewardSplits";
|
3
|
+
import type { SlotRange } from "./SlotRange";
|
4
|
+
export interface PayoutWalletAndSplitWithRewardSplits {
|
5
|
+
short_id: bigint;
|
6
|
+
reward_splits: RewardSplits | null;
|
7
|
+
glow_weight: number;
|
8
|
+
comments: Array<string> | null;
|
9
|
+
payment_tx_hash: string | null;
|
10
|
+
protocol_fee_paid_week: number;
|
11
|
+
status: FarmStatus | null;
|
12
|
+
weeks_and_slot_ranges_to_invert_power_map: Record<number, Array<SlotRange>> | null;
|
13
|
+
weeks_and_slots_to_invalidate_power_map: Record<number, Array<SlotRange>> | null;
|
14
|
+
timestamp_audited_completed: bigint | null;
|
15
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PayoutWalletAndSplitWithRewardSplits.js","sourceRoot":"","sources":["../../../src/types/PayoutWalletAndSplitWithRewardSplits.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RewardSplit.js","sourceRoot":"","sources":["../../../src/types/RewardSplit.ts"],"names":[],"mappings":"AAAA,4GAA4G"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RewardSplits.js","sourceRoot":"","sources":["../../../src/types/RewardSplits.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SlotRange.js","sourceRoot":"","sources":["../../../src/types/SlotRange.ts"],"names":[],"mappings":"AAAA,4GAA4G"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"WeekAndSlotRange.js","sourceRoot":"","sources":["../../../src/types/WeekAndSlotRange.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export * from "./AuditCompleted";
|
2
|
+
export * from "./AuditInherited";
|
3
|
+
export * from "./Device";
|
4
|
+
export * from "./DuplicatedButPastAuditCompleted";
|
5
|
+
export * from "./Farm";
|
6
|
+
export * from "./FarmStatus";
|
7
|
+
export * from "./GCAServerResponse";
|
8
|
+
export * from "./GetEquipmentDataHandlerParams";
|
9
|
+
export * from "./PayoutWalletAndSplit";
|
10
|
+
export * from "./PayoutWalletAndSplitWithRewardSplits";
|
11
|
+
export * from "./RewardSplit";
|
12
|
+
export * from "./RewardSplits";
|
13
|
+
export * from "./SlotRange";
|
14
|
+
export * from "./WeekAndSlotRange";
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export * from "./AuditCompleted";
|
2
|
+
export * from "./AuditInherited";
|
3
|
+
export * from "./Device";
|
4
|
+
export * from "./DuplicatedButPastAuditCompleted";
|
5
|
+
export * from "./Farm";
|
6
|
+
export * from "./FarmStatus";
|
7
|
+
export * from "./GCAServerResponse";
|
8
|
+
export * from "./GetEquipmentDataHandlerParams";
|
9
|
+
export * from "./PayoutWalletAndSplit";
|
10
|
+
export * from "./PayoutWalletAndSplitWithRewardSplits";
|
11
|
+
export * from "./RewardSplit";
|
12
|
+
export * from "./RewardSplits";
|
13
|
+
export * from "./SlotRange";
|
14
|
+
export * from "./WeekAndSlotRange";
|
15
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,mCAAmC,CAAC;AAClD,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,wCAAwC,CAAC;AACvD,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import type { FarmStatus } from "./FarmStatus";
|
2
|
+
import type { RewardSplits } from "./RewardSplits";
|
3
|
+
import type { SlotRange } from "./SlotRange";
|
4
|
+
export interface Farm {
|
5
|
+
hexlifiedPublicKey: string;
|
6
|
+
carbonCreditsProduced: number;
|
7
|
+
powerOutputs: Array<number>;
|
8
|
+
impactRates: Array<number>;
|
9
|
+
weeklyPayment: number;
|
10
|
+
rollingImpactPoints: number;
|
11
|
+
powerOutput: number;
|
12
|
+
shortId: bigint;
|
13
|
+
protocolFee: number;
|
14
|
+
rewardSplits: RewardSplits | null;
|
15
|
+
status: FarmStatus;
|
16
|
+
protocolFeePaymentHash: string | null;
|
17
|
+
weeksAndSlotRangesToInvertPowerMap: Record<number, Array<SlotRange>> | null;
|
18
|
+
weeksAndSlotsToInvalidatePowerMap: Record<number, Array<SlotRange>> | null;
|
19
|
+
timestampAuditedComplete: bigint | null;
|
20
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stashed-Farm.js","sourceRoot":"","sources":["../../../src/types/stashed-Farm.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
{
|
2
|
+
"name": "@glowlabs-org/utils",
|
3
|
+
"version": "0.0.1",
|
4
|
+
"description": "A library containing all typechain types and addresses relating to the glow guarded launch",
|
5
|
+
"scripts": {
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
7
|
+
"build": "npm run build:cjs && npm run build:esm",
|
8
|
+
"build:cjs": "tsc -p ./tsconfig.build.json --module commonjs --outDir ./lib/cjs && node postbuild-cjs.mjs",
|
9
|
+
"build:esm": "tsc -p ./tsconfig.build.json --module es2015 --outDir ./lib/esm && node postbuild-esm.mjs"
|
10
|
+
},
|
11
|
+
"keywords": [],
|
12
|
+
"author": "",
|
13
|
+
"license": "ISC",
|
14
|
+
"type": "module",
|
15
|
+
"main": "./lib/cjs/index.js",
|
16
|
+
"types": "./lib/esm/index.d.ts",
|
17
|
+
"module": "./lib/esm/index.js",
|
18
|
+
"files": [
|
19
|
+
"lib"
|
20
|
+
],
|
21
|
+
"publishConfig": {
|
22
|
+
"access": "public"
|
23
|
+
},
|
24
|
+
"repository": {
|
25
|
+
"type": "git",
|
26
|
+
"url": "https://github.com/glowlabs-org/glow-utils"
|
27
|
+
},
|
28
|
+
"sideEffects": false,
|
29
|
+
"exports": {
|
30
|
+
"types": "./lib/esm/index.d.ts",
|
31
|
+
"import": "./lib/esm/index.js",
|
32
|
+
"require": "./lib/cjs/index.js"
|
33
|
+
},
|
34
|
+
"engines": {
|
35
|
+
"node": ">=16"
|
36
|
+
},
|
37
|
+
"peerDependencies": {
|
38
|
+
"ethers": "5.x.x",
|
39
|
+
"merkletreejs": "^0.3.11"
|
40
|
+
},
|
41
|
+
"devDependencies": {
|
42
|
+
"@types/node": "^20.10.5",
|
43
|
+
"ethers": "^5.7.2",
|
44
|
+
"typescript": "^5.3.3"
|
45
|
+
}
|
46
|
+
}
|