@eternl/network-id 0.2.1 → 0.9.22
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/dist/byron-BpRcvdPh.mjs +648 -0
- package/dist/byron-BpRcvdPh.mjs.map +1 -0
- package/dist/byron-Hv7K7fjg.cjs +756 -0
- package/dist/byron-Hv7K7fjg.cjs.map +1 -0
- package/dist/chain.cjs +182 -0
- package/dist/chain.cjs.map +1 -0
- package/dist/chain.d.cts +37 -0
- package/dist/chain.d.cts.map +1 -0
- package/dist/chain.d.mts +37 -0
- package/dist/chain.d.mts.map +1 -0
- package/dist/chain.mjs +163 -0
- package/dist/chain.mjs.map +1 -0
- package/dist/index.cjs +40 -161
- package/dist/index.d.cts +7 -31
- package/dist/index.d.mts +7 -31
- package/dist/index.mjs +5 -145
- package/dist/network/GenesisStore.cjs +46 -0
- package/dist/network/GenesisStore.cjs.map +1 -0
- package/dist/network/GenesisStore.d.cts +8 -0
- package/dist/network/GenesisStore.d.cts.map +1 -0
- package/dist/network/GenesisStore.d.mts +8 -0
- package/dist/network/GenesisStore.d.mts.map +1 -0
- package/dist/network/GenesisStore.mjs +45 -0
- package/dist/network/GenesisStore.mjs.map +1 -0
- package/dist/network/IGenesisStore.cjs +0 -0
- package/dist/network/IGenesisStore.d.cts +37 -0
- package/dist/network/IGenesisStore.d.cts.map +1 -0
- package/dist/network/IGenesisStore.d.mts +37 -0
- package/dist/network/IGenesisStore.d.mts.map +1 -0
- package/dist/network/IGenesisStore.mjs +1 -0
- package/dist/types/DateId.cjs +0 -0
- package/dist/types/DateId.d.cts +10 -0
- package/dist/types/DateId.d.cts.map +1 -0
- package/dist/types/DateId.d.mts +10 -0
- package/dist/types/DateId.d.mts.map +1 -0
- package/dist/types/DateId.mjs +1 -0
- package/dist/types/IChainTip.cjs +22 -0
- package/dist/types/IChainTip.cjs.map +1 -0
- package/dist/types/IChainTip.d.cts +20 -0
- package/dist/types/IChainTip.d.cts.map +1 -0
- package/dist/types/IChainTip.d.mts +20 -0
- package/dist/types/IChainTip.d.mts.map +1 -0
- package/dist/types/IChainTip.mjs +20 -0
- package/dist/types/IChainTip.mjs.map +1 -0
- package/dist/types/NetworkId.cjs +163 -0
- package/dist/types/NetworkId.cjs.map +1 -0
- package/dist/types/NetworkId.d.cts +31 -0
- package/dist/types/NetworkId.d.cts.map +1 -0
- package/dist/types/NetworkId.d.mts +31 -0
- package/dist/types/NetworkId.d.mts.map +1 -0
- package/dist/types/NetworkId.mjs +146 -0
- package/dist/types/NetworkId.mjs.map +1 -0
- package/package.json +19 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,163 +1,42 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_types_NetworkId = require('./types/NetworkId.cjs');
|
|
3
|
+
const require_network_GenesisStore = require('./network/GenesisStore.cjs');
|
|
4
|
+
const require_chain = require('./chain.cjs');
|
|
5
|
+
const require_types_IChainTip = require('./types/IChainTip.cjs');
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
NETWORK_ID.MAINNET,
|
|
40
|
-
NETWORK_ID.PREPROD,
|
|
41
|
-
NETWORK_ID.PREVIEW,
|
|
42
|
-
NETWORK_ID.GUILD,
|
|
43
|
-
NETWORK_ID.SANCHO
|
|
44
|
-
],
|
|
45
|
-
APEX: [
|
|
46
|
-
NETWORK_ID.AFVT,
|
|
47
|
-
NETWORK_ID.AFVM,
|
|
48
|
-
NETWORK_ID.AFPT,
|
|
49
|
-
NETWORK_ID.AFPM
|
|
50
|
-
]
|
|
51
|
-
};
|
|
52
|
-
const networkShelleyTransitionEpoch = {
|
|
53
|
-
[NETWORK_ID.MAINNET]: 208,
|
|
54
|
-
[NETWORK_ID.SANCHO]: 0,
|
|
55
|
-
[NETWORK_ID.GUILD]: 2,
|
|
56
|
-
[NETWORK_ID.PREPROD]: 4,
|
|
57
|
-
[NETWORK_ID.PREVIEW]: 0,
|
|
58
|
-
[NETWORK_ID.AFVT]: 2,
|
|
59
|
-
[NETWORK_ID.AFVM]: 2,
|
|
60
|
-
[NETWORK_ID.AFPT]: 0,
|
|
61
|
-
[NETWORK_ID.AFPM]: 2
|
|
62
|
-
};
|
|
63
|
-
const networkAddressPrefix = {
|
|
64
|
-
[NETWORK_ID.MAINNET]: "addr",
|
|
65
|
-
[NETWORK_ID.SANCHO]: "addr_test",
|
|
66
|
-
[NETWORK_ID.GUILD]: "addr_test",
|
|
67
|
-
[NETWORK_ID.PREPROD]: "addr_test",
|
|
68
|
-
[NETWORK_ID.PREVIEW]: "addr_test",
|
|
69
|
-
[NETWORK_ID.AFVT]: "addr",
|
|
70
|
-
[NETWORK_ID.AFVM]: "addr",
|
|
71
|
-
[NETWORK_ID.AFPT]: "addr_test",
|
|
72
|
-
[NETWORK_ID.AFPM]: "addr"
|
|
73
|
-
};
|
|
74
|
-
const networkStakeAddressPrefix = {
|
|
75
|
-
[NETWORK_ID.MAINNET]: "stake",
|
|
76
|
-
[NETWORK_ID.SANCHO]: "stake_test",
|
|
77
|
-
[NETWORK_ID.GUILD]: "stake_test",
|
|
78
|
-
[NETWORK_ID.PREPROD]: "stake_test",
|
|
79
|
-
[NETWORK_ID.PREVIEW]: "stake_test",
|
|
80
|
-
[NETWORK_ID.AFVT]: "stake",
|
|
81
|
-
[NETWORK_ID.AFVM]: "stake",
|
|
82
|
-
[NETWORK_ID.AFPT]: "stake_test",
|
|
83
|
-
[NETWORK_ID.AFPM]: "stake"
|
|
84
|
-
};
|
|
85
|
-
const networkCurrencyCode = {
|
|
86
|
-
[NETWORK_ID.MAINNET]: "ADA",
|
|
87
|
-
[NETWORK_ID.SANCHO]: "tADA",
|
|
88
|
-
[NETWORK_ID.GUILD]: "tADA",
|
|
89
|
-
[NETWORK_ID.PREPROD]: "tADA",
|
|
90
|
-
[NETWORK_ID.PREVIEW]: "tADA",
|
|
91
|
-
[NETWORK_ID.AFVT]: "tAP3X",
|
|
92
|
-
[NETWORK_ID.AFVM]: "AP3X",
|
|
93
|
-
[NETWORK_ID.AFPT]: "tAP3X",
|
|
94
|
-
[NETWORK_ID.AFPM]: "AP3X"
|
|
95
|
-
};
|
|
96
|
-
const networkCurrencySymbol = {
|
|
97
|
-
[NETWORK_ID.MAINNET]: "₳",
|
|
98
|
-
[NETWORK_ID.SANCHO]: "t₳",
|
|
99
|
-
[NETWORK_ID.GUILD]: "t₳",
|
|
100
|
-
[NETWORK_ID.PREPROD]: "t₳",
|
|
101
|
-
[NETWORK_ID.PREVIEW]: "t₳",
|
|
102
|
-
[NETWORK_ID.AFVT]: "tÂ",
|
|
103
|
-
[NETWORK_ID.AFVM]: "Â",
|
|
104
|
-
[NETWORK_ID.AFPT]: "tÂ",
|
|
105
|
-
[NETWORK_ID.AFPM]: "Â"
|
|
106
|
-
};
|
|
107
|
-
const isSupportedNetworkId = (id) => networkIdList.includes(id);
|
|
108
|
-
const getNetworkId = (id) => {
|
|
109
|
-
switch (id) {
|
|
110
|
-
case NETWORK_ID.MAINNET: return 1;
|
|
111
|
-
case NETWORK_ID.GUILD: return 0;
|
|
112
|
-
case NETWORK_ID.SANCHO: return 0;
|
|
113
|
-
case NETWORK_ID.PREPROD: return 0;
|
|
114
|
-
case NETWORK_ID.PREVIEW: return 0;
|
|
115
|
-
case NETWORK_ID.AFVT: return 1;
|
|
116
|
-
case NETWORK_ID.AFVM: return 1;
|
|
117
|
-
case NETWORK_ID.AFPT: return 0;
|
|
118
|
-
case NETWORK_ID.AFPM: return 1;
|
|
119
|
-
}
|
|
120
|
-
throw new Error("Error: INetwork.getNetworkId: unknown network: " + id);
|
|
121
|
-
};
|
|
122
|
-
const getNetworkDecimals = (id) => {
|
|
123
|
-
switch (id) {
|
|
124
|
-
case NETWORK_ID.SANCHO: return 6;
|
|
125
|
-
default: return 6;
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
const isTestnetNetwork = (networkId) => {
|
|
129
|
-
switch (networkId) {
|
|
130
|
-
case NETWORK_ID.MAINNET: return false;
|
|
131
|
-
case NETWORK_ID.GUILD: return true;
|
|
132
|
-
case NETWORK_ID.SANCHO: return true;
|
|
133
|
-
case NETWORK_ID.PREPROD: return true;
|
|
134
|
-
case NETWORK_ID.PREVIEW: return true;
|
|
135
|
-
case NETWORK_ID.AFVT: return true;
|
|
136
|
-
case NETWORK_ID.AFVM: return false;
|
|
137
|
-
case NETWORK_ID.AFPT: return true;
|
|
138
|
-
case NETWORK_ID.AFPM: return false;
|
|
139
|
-
default: return false;
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
const isCustomNetwork = (networkId) => !isTestnetNetwork(networkId) && networkId !== NETWORK_ID.MAINNET;
|
|
143
|
-
const getNetworkCurrencyCode = (id) => networkCurrencyCode[id] || "-";
|
|
144
|
-
const getNetworkCurrencySymbol = (id) => networkCurrencySymbol[id] || "?";
|
|
145
|
-
|
|
146
|
-
//#endregion
|
|
147
|
-
exports.NETWORK_ID = NETWORK_ID;
|
|
148
|
-
exports.getNetworkCurrencyCode = getNetworkCurrencyCode;
|
|
149
|
-
exports.getNetworkCurrencySymbol = getNetworkCurrencySymbol;
|
|
150
|
-
exports.getNetworkDecimals = getNetworkDecimals;
|
|
151
|
-
exports.getNetworkId = getNetworkId;
|
|
152
|
-
exports.isCustomNetwork = isCustomNetwork;
|
|
153
|
-
exports.isSupportedNetworkId = isSupportedNetworkId;
|
|
154
|
-
exports.isTestnetNetwork = isTestnetNetwork;
|
|
155
|
-
exports.networkAddressPrefix = networkAddressPrefix;
|
|
156
|
-
exports.networkCurrencyCode = networkCurrencyCode;
|
|
157
|
-
exports.networkCurrencySymbol = networkCurrencySymbol;
|
|
158
|
-
exports.networkGroups = networkGroups;
|
|
159
|
-
exports.networkIdList = networkIdList;
|
|
160
|
-
exports.networkIdx = networkIdx;
|
|
161
|
-
exports.networkShelleyTransitionEpoch = networkShelleyTransitionEpoch;
|
|
162
|
-
exports.networkStakeAddressPrefix = networkStakeAddressPrefix;
|
|
163
|
-
//# sourceMappingURL=index.cjs.map
|
|
7
|
+
exports.GenesisStore = require_network_GenesisStore.GenesisStore;
|
|
8
|
+
exports.NETWORK_ID = require_types_NetworkId.NETWORK_ID;
|
|
9
|
+
exports.createIChainTip = require_types_IChainTip.createIChainTip;
|
|
10
|
+
exports.getByron = require_chain.getByron;
|
|
11
|
+
exports.getCalculatedChainTip = require_chain.getCalculatedChainTip;
|
|
12
|
+
exports.getCalculatedEpoch = require_chain.getCalculatedEpoch;
|
|
13
|
+
exports.getCalculatedEpochSlot = require_chain.getCalculatedEpochSlot;
|
|
14
|
+
exports.getCalculatedSlotFromBlockTime = require_chain.getCalculatedSlotFromBlockTime;
|
|
15
|
+
exports.getDateIdFromSlot = require_chain.getDateIdFromSlot;
|
|
16
|
+
exports.getDateIdFromTimestamp = require_chain.getDateIdFromTimestamp;
|
|
17
|
+
exports.getEpochFromSlot = require_chain.getEpochFromSlot;
|
|
18
|
+
exports.getEpochLength = require_chain.getEpochLength;
|
|
19
|
+
exports.getEpochStart = require_chain.getEpochStart;
|
|
20
|
+
exports.getGenesis = require_chain.getGenesis;
|
|
21
|
+
exports.getLastSlotOfEpoch = require_chain.getLastSlotOfEpoch;
|
|
22
|
+
exports.getNetworkCurrencyCode = require_types_NetworkId.getNetworkCurrencyCode;
|
|
23
|
+
exports.getNetworkCurrencySymbol = require_types_NetworkId.getNetworkCurrencySymbol;
|
|
24
|
+
exports.getNetworkDecimals = require_types_NetworkId.getNetworkDecimals;
|
|
25
|
+
exports.getNetworkId = require_types_NetworkId.getNetworkId;
|
|
26
|
+
exports.getNetworkMagic = require_chain.getNetworkMagic;
|
|
27
|
+
exports.getNumEpochBlocks = require_chain.getNumEpochBlocks;
|
|
28
|
+
exports.getShelley = require_chain.getShelley;
|
|
29
|
+
exports.getSlotFromDateId = require_chain.getSlotFromDateId;
|
|
30
|
+
exports.getTimestampFromSlot = require_chain.getTimestampFromSlot;
|
|
31
|
+
exports.isCustomNetwork = require_types_NetworkId.isCustomNetwork;
|
|
32
|
+
exports.isSupportedNetworkId = require_types_NetworkId.isSupportedNetworkId;
|
|
33
|
+
exports.isTestnetNetwork = require_types_NetworkId.isTestnetNetwork;
|
|
34
|
+
exports.networkAddressPrefix = require_types_NetworkId.networkAddressPrefix;
|
|
35
|
+
exports.networkCurrencyCode = require_types_NetworkId.networkCurrencyCode;
|
|
36
|
+
exports.networkCurrencySymbol = require_types_NetworkId.networkCurrencySymbol;
|
|
37
|
+
exports.networkGroups = require_types_NetworkId.networkGroups;
|
|
38
|
+
exports.networkIdList = require_types_NetworkId.networkIdList;
|
|
39
|
+
exports.networkIdx = require_types_NetworkId.networkIdx;
|
|
40
|
+
exports.networkShelleyTransitionEpoch = require_types_NetworkId.networkShelleyTransitionEpoch;
|
|
41
|
+
exports.networkStakeAddressPrefix = require_types_NetworkId.networkStakeAddressPrefix;
|
|
42
|
+
exports.updateChainTip = require_chain.updateChainTip;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,31 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
readonly AFVT: "afvt";
|
|
9
|
-
readonly AFVM: "afvm";
|
|
10
|
-
readonly AFPT: "afpt";
|
|
11
|
-
readonly AFPM: "afpm";
|
|
12
|
-
};
|
|
13
|
-
type NetworkId = typeof NETWORK_ID[keyof typeof NETWORK_ID];
|
|
14
|
-
declare const networkIdList: NetworkId[];
|
|
15
|
-
declare const networkIdx: Record<NetworkId, number>;
|
|
16
|
-
declare const networkGroups: Record<string, NetworkId[]>;
|
|
17
|
-
declare const networkShelleyTransitionEpoch: Record<NetworkId, number>;
|
|
18
|
-
declare const networkAddressPrefix: Record<NetworkId, string>;
|
|
19
|
-
declare const networkStakeAddressPrefix: Record<NetworkId, string>;
|
|
20
|
-
declare const networkCurrencyCode: Record<NetworkId, string>;
|
|
21
|
-
declare const networkCurrencySymbol: Record<NetworkId, string>;
|
|
22
|
-
declare const isSupportedNetworkId: (id?: string | null) => id is NetworkId;
|
|
23
|
-
declare const getNetworkId: (id: string) => number;
|
|
24
|
-
declare const getNetworkDecimals: (id: NetworkId) => number;
|
|
25
|
-
declare const isTestnetNetwork: (networkId: NetworkId) => boolean;
|
|
26
|
-
declare const isCustomNetwork: (networkId: NetworkId) => boolean;
|
|
27
|
-
declare const getNetworkCurrencyCode: (id: NetworkId) => string;
|
|
28
|
-
declare const getNetworkCurrencySymbol: (id: NetworkId) => string;
|
|
29
|
-
//#endregion
|
|
30
|
-
export { NETWORK_ID, NetworkId, getNetworkCurrencyCode, getNetworkCurrencySymbol, getNetworkDecimals, getNetworkId, isCustomNetwork, isSupportedNetworkId, isTestnetNetwork, networkAddressPrefix, networkCurrencyCode, networkCurrencySymbol, networkGroups, networkIdList, networkIdx, networkShelleyTransitionEpoch, networkStakeAddressPrefix };
|
|
31
|
-
//# sourceMappingURL=index.d.cts.map
|
|
1
|
+
import { NETWORK_ID, NetworkId, getNetworkCurrencyCode, getNetworkCurrencySymbol, getNetworkDecimals, getNetworkId, isCustomNetwork, isSupportedNetworkId, isTestnetNetwork, networkAddressPrefix, networkCurrencyCode, networkCurrencySymbol, networkGroups, networkIdList, networkIdx, networkShelleyTransitionEpoch, networkStakeAddressPrefix } from "./types/NetworkId.cjs";
|
|
2
|
+
import { IBlockVersionData, IByron, IGenesisStore, IProtocolConsts, IShelley } from "./network/IGenesisStore.cjs";
|
|
3
|
+
import { GenesisStore } from "./network/GenesisStore.cjs";
|
|
4
|
+
import { DateId } from "./types/DateId.cjs";
|
|
5
|
+
import { IChainTip, createIChainTip } from "./types/IChainTip.cjs";
|
|
6
|
+
import { getByron, getCalculatedChainTip, getCalculatedEpoch, getCalculatedEpochSlot, getCalculatedSlotFromBlockTime, getDateIdFromSlot, getDateIdFromTimestamp, getEpochFromSlot, getEpochLength, getEpochStart, getGenesis, getLastSlotOfEpoch, getNetworkMagic, getNumEpochBlocks, getShelley, getSlotFromDateId, getTimestampFromSlot, updateChainTip } from "./chain.cjs";
|
|
7
|
+
export { DateId, GenesisStore, IBlockVersionData, IByron, IChainTip, IGenesisStore, IProtocolConsts, IShelley, NETWORK_ID, NetworkId, createIChainTip, getByron, getCalculatedChainTip, getCalculatedEpoch, getCalculatedEpochSlot, getCalculatedSlotFromBlockTime, getDateIdFromSlot, getDateIdFromTimestamp, getEpochFromSlot, getEpochLength, getEpochStart, getGenesis, getLastSlotOfEpoch, getNetworkCurrencyCode, getNetworkCurrencySymbol, getNetworkDecimals, getNetworkId, getNetworkMagic, getNumEpochBlocks, getShelley, getSlotFromDateId, getTimestampFromSlot, isCustomNetwork, isSupportedNetworkId, isTestnetNetwork, networkAddressPrefix, networkCurrencyCode, networkCurrencySymbol, networkGroups, networkIdList, networkIdx, networkShelleyTransitionEpoch, networkStakeAddressPrefix, updateChainTip };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,31 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
readonly AFVT: "afvt";
|
|
9
|
-
readonly AFVM: "afvm";
|
|
10
|
-
readonly AFPT: "afpt";
|
|
11
|
-
readonly AFPM: "afpm";
|
|
12
|
-
};
|
|
13
|
-
type NetworkId = typeof NETWORK_ID[keyof typeof NETWORK_ID];
|
|
14
|
-
declare const networkIdList: NetworkId[];
|
|
15
|
-
declare const networkIdx: Record<NetworkId, number>;
|
|
16
|
-
declare const networkGroups: Record<string, NetworkId[]>;
|
|
17
|
-
declare const networkShelleyTransitionEpoch: Record<NetworkId, number>;
|
|
18
|
-
declare const networkAddressPrefix: Record<NetworkId, string>;
|
|
19
|
-
declare const networkStakeAddressPrefix: Record<NetworkId, string>;
|
|
20
|
-
declare const networkCurrencyCode: Record<NetworkId, string>;
|
|
21
|
-
declare const networkCurrencySymbol: Record<NetworkId, string>;
|
|
22
|
-
declare const isSupportedNetworkId: (id?: string | null) => id is NetworkId;
|
|
23
|
-
declare const getNetworkId: (id: string) => number;
|
|
24
|
-
declare const getNetworkDecimals: (id: NetworkId) => number;
|
|
25
|
-
declare const isTestnetNetwork: (networkId: NetworkId) => boolean;
|
|
26
|
-
declare const isCustomNetwork: (networkId: NetworkId) => boolean;
|
|
27
|
-
declare const getNetworkCurrencyCode: (id: NetworkId) => string;
|
|
28
|
-
declare const getNetworkCurrencySymbol: (id: NetworkId) => string;
|
|
29
|
-
//#endregion
|
|
30
|
-
export { NETWORK_ID, NetworkId, getNetworkCurrencyCode, getNetworkCurrencySymbol, getNetworkDecimals, getNetworkId, isCustomNetwork, isSupportedNetworkId, isTestnetNetwork, networkAddressPrefix, networkCurrencyCode, networkCurrencySymbol, networkGroups, networkIdList, networkIdx, networkShelleyTransitionEpoch, networkStakeAddressPrefix };
|
|
31
|
-
//# sourceMappingURL=index.d.mts.map
|
|
1
|
+
import { NETWORK_ID, NetworkId, getNetworkCurrencyCode, getNetworkCurrencySymbol, getNetworkDecimals, getNetworkId, isCustomNetwork, isSupportedNetworkId, isTestnetNetwork, networkAddressPrefix, networkCurrencyCode, networkCurrencySymbol, networkGroups, networkIdList, networkIdx, networkShelleyTransitionEpoch, networkStakeAddressPrefix } from "./types/NetworkId.mjs";
|
|
2
|
+
import { IBlockVersionData, IByron, IGenesisStore, IProtocolConsts, IShelley } from "./network/IGenesisStore.mjs";
|
|
3
|
+
import { GenesisStore } from "./network/GenesisStore.mjs";
|
|
4
|
+
import { DateId } from "./types/DateId.mjs";
|
|
5
|
+
import { IChainTip, createIChainTip } from "./types/IChainTip.mjs";
|
|
6
|
+
import { getByron, getCalculatedChainTip, getCalculatedEpoch, getCalculatedEpochSlot, getCalculatedSlotFromBlockTime, getDateIdFromSlot, getDateIdFromTimestamp, getEpochFromSlot, getEpochLength, getEpochStart, getGenesis, getLastSlotOfEpoch, getNetworkMagic, getNumEpochBlocks, getShelley, getSlotFromDateId, getTimestampFromSlot, updateChainTip } from "./chain.mjs";
|
|
7
|
+
export { DateId, GenesisStore, IBlockVersionData, IByron, IChainTip, IGenesisStore, IProtocolConsts, IShelley, NETWORK_ID, NetworkId, createIChainTip, getByron, getCalculatedChainTip, getCalculatedEpoch, getCalculatedEpochSlot, getCalculatedSlotFromBlockTime, getDateIdFromSlot, getDateIdFromTimestamp, getEpochFromSlot, getEpochLength, getEpochStart, getGenesis, getLastSlotOfEpoch, getNetworkCurrencyCode, getNetworkCurrencySymbol, getNetworkDecimals, getNetworkId, getNetworkMagic, getNumEpochBlocks, getShelley, getSlotFromDateId, getTimestampFromSlot, isCustomNetwork, isSupportedNetworkId, isTestnetNetwork, networkAddressPrefix, networkCurrencyCode, networkCurrencySymbol, networkGroups, networkIdList, networkIdx, networkShelleyTransitionEpoch, networkStakeAddressPrefix, updateChainTip };
|
package/dist/index.mjs
CHANGED
|
@@ -1,146 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
SANCHO: "sancho",
|
|
6
|
-
PREPROD: "preprod",
|
|
7
|
-
PREVIEW: "preview",
|
|
8
|
-
AFVT: "afvt",
|
|
9
|
-
AFVM: "afvm",
|
|
10
|
-
AFPT: "afpt",
|
|
11
|
-
AFPM: "afpm"
|
|
12
|
-
};
|
|
13
|
-
const networkIdList = [
|
|
14
|
-
NETWORK_ID.MAINNET,
|
|
15
|
-
NETWORK_ID.PREPROD,
|
|
16
|
-
NETWORK_ID.PREVIEW,
|
|
17
|
-
NETWORK_ID.GUILD,
|
|
18
|
-
NETWORK_ID.SANCHO,
|
|
19
|
-
NETWORK_ID.AFVT,
|
|
20
|
-
NETWORK_ID.AFVM,
|
|
21
|
-
NETWORK_ID.AFPT,
|
|
22
|
-
NETWORK_ID.AFPM
|
|
23
|
-
];
|
|
24
|
-
const networkIdx = {
|
|
25
|
-
[NETWORK_ID.MAINNET]: 0,
|
|
26
|
-
[NETWORK_ID.SANCHO]: 1,
|
|
27
|
-
[NETWORK_ID.GUILD]: 2,
|
|
28
|
-
[NETWORK_ID.PREPROD]: 4,
|
|
29
|
-
[NETWORK_ID.PREVIEW]: 5,
|
|
30
|
-
[NETWORK_ID.AFVT]: 6,
|
|
31
|
-
[NETWORK_ID.AFVM]: 7,
|
|
32
|
-
[NETWORK_ID.AFPT]: 8,
|
|
33
|
-
[NETWORK_ID.AFPM]: 9
|
|
34
|
-
};
|
|
35
|
-
const networkGroups = {
|
|
36
|
-
Cardano: [
|
|
37
|
-
NETWORK_ID.MAINNET,
|
|
38
|
-
NETWORK_ID.PREPROD,
|
|
39
|
-
NETWORK_ID.PREVIEW,
|
|
40
|
-
NETWORK_ID.GUILD,
|
|
41
|
-
NETWORK_ID.SANCHO
|
|
42
|
-
],
|
|
43
|
-
APEX: [
|
|
44
|
-
NETWORK_ID.AFVT,
|
|
45
|
-
NETWORK_ID.AFVM,
|
|
46
|
-
NETWORK_ID.AFPT,
|
|
47
|
-
NETWORK_ID.AFPM
|
|
48
|
-
]
|
|
49
|
-
};
|
|
50
|
-
const networkShelleyTransitionEpoch = {
|
|
51
|
-
[NETWORK_ID.MAINNET]: 208,
|
|
52
|
-
[NETWORK_ID.SANCHO]: 0,
|
|
53
|
-
[NETWORK_ID.GUILD]: 2,
|
|
54
|
-
[NETWORK_ID.PREPROD]: 4,
|
|
55
|
-
[NETWORK_ID.PREVIEW]: 0,
|
|
56
|
-
[NETWORK_ID.AFVT]: 2,
|
|
57
|
-
[NETWORK_ID.AFVM]: 2,
|
|
58
|
-
[NETWORK_ID.AFPT]: 0,
|
|
59
|
-
[NETWORK_ID.AFPM]: 2
|
|
60
|
-
};
|
|
61
|
-
const networkAddressPrefix = {
|
|
62
|
-
[NETWORK_ID.MAINNET]: "addr",
|
|
63
|
-
[NETWORK_ID.SANCHO]: "addr_test",
|
|
64
|
-
[NETWORK_ID.GUILD]: "addr_test",
|
|
65
|
-
[NETWORK_ID.PREPROD]: "addr_test",
|
|
66
|
-
[NETWORK_ID.PREVIEW]: "addr_test",
|
|
67
|
-
[NETWORK_ID.AFVT]: "addr",
|
|
68
|
-
[NETWORK_ID.AFVM]: "addr",
|
|
69
|
-
[NETWORK_ID.AFPT]: "addr_test",
|
|
70
|
-
[NETWORK_ID.AFPM]: "addr"
|
|
71
|
-
};
|
|
72
|
-
const networkStakeAddressPrefix = {
|
|
73
|
-
[NETWORK_ID.MAINNET]: "stake",
|
|
74
|
-
[NETWORK_ID.SANCHO]: "stake_test",
|
|
75
|
-
[NETWORK_ID.GUILD]: "stake_test",
|
|
76
|
-
[NETWORK_ID.PREPROD]: "stake_test",
|
|
77
|
-
[NETWORK_ID.PREVIEW]: "stake_test",
|
|
78
|
-
[NETWORK_ID.AFVT]: "stake",
|
|
79
|
-
[NETWORK_ID.AFVM]: "stake",
|
|
80
|
-
[NETWORK_ID.AFPT]: "stake_test",
|
|
81
|
-
[NETWORK_ID.AFPM]: "stake"
|
|
82
|
-
};
|
|
83
|
-
const networkCurrencyCode = {
|
|
84
|
-
[NETWORK_ID.MAINNET]: "ADA",
|
|
85
|
-
[NETWORK_ID.SANCHO]: "tADA",
|
|
86
|
-
[NETWORK_ID.GUILD]: "tADA",
|
|
87
|
-
[NETWORK_ID.PREPROD]: "tADA",
|
|
88
|
-
[NETWORK_ID.PREVIEW]: "tADA",
|
|
89
|
-
[NETWORK_ID.AFVT]: "tAP3X",
|
|
90
|
-
[NETWORK_ID.AFVM]: "AP3X",
|
|
91
|
-
[NETWORK_ID.AFPT]: "tAP3X",
|
|
92
|
-
[NETWORK_ID.AFPM]: "AP3X"
|
|
93
|
-
};
|
|
94
|
-
const networkCurrencySymbol = {
|
|
95
|
-
[NETWORK_ID.MAINNET]: "₳",
|
|
96
|
-
[NETWORK_ID.SANCHO]: "t₳",
|
|
97
|
-
[NETWORK_ID.GUILD]: "t₳",
|
|
98
|
-
[NETWORK_ID.PREPROD]: "t₳",
|
|
99
|
-
[NETWORK_ID.PREVIEW]: "t₳",
|
|
100
|
-
[NETWORK_ID.AFVT]: "tÂ",
|
|
101
|
-
[NETWORK_ID.AFVM]: "Â",
|
|
102
|
-
[NETWORK_ID.AFPT]: "tÂ",
|
|
103
|
-
[NETWORK_ID.AFPM]: "Â"
|
|
104
|
-
};
|
|
105
|
-
const isSupportedNetworkId = (id) => networkIdList.includes(id);
|
|
106
|
-
const getNetworkId = (id) => {
|
|
107
|
-
switch (id) {
|
|
108
|
-
case NETWORK_ID.MAINNET: return 1;
|
|
109
|
-
case NETWORK_ID.GUILD: return 0;
|
|
110
|
-
case NETWORK_ID.SANCHO: return 0;
|
|
111
|
-
case NETWORK_ID.PREPROD: return 0;
|
|
112
|
-
case NETWORK_ID.PREVIEW: return 0;
|
|
113
|
-
case NETWORK_ID.AFVT: return 1;
|
|
114
|
-
case NETWORK_ID.AFVM: return 1;
|
|
115
|
-
case NETWORK_ID.AFPT: return 0;
|
|
116
|
-
case NETWORK_ID.AFPM: return 1;
|
|
117
|
-
}
|
|
118
|
-
throw new Error("Error: INetwork.getNetworkId: unknown network: " + id);
|
|
119
|
-
};
|
|
120
|
-
const getNetworkDecimals = (id) => {
|
|
121
|
-
switch (id) {
|
|
122
|
-
case NETWORK_ID.SANCHO: return 6;
|
|
123
|
-
default: return 6;
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
const isTestnetNetwork = (networkId) => {
|
|
127
|
-
switch (networkId) {
|
|
128
|
-
case NETWORK_ID.MAINNET: return false;
|
|
129
|
-
case NETWORK_ID.GUILD: return true;
|
|
130
|
-
case NETWORK_ID.SANCHO: return true;
|
|
131
|
-
case NETWORK_ID.PREPROD: return true;
|
|
132
|
-
case NETWORK_ID.PREVIEW: return true;
|
|
133
|
-
case NETWORK_ID.AFVT: return true;
|
|
134
|
-
case NETWORK_ID.AFVM: return false;
|
|
135
|
-
case NETWORK_ID.AFPT: return true;
|
|
136
|
-
case NETWORK_ID.AFPM: return false;
|
|
137
|
-
default: return false;
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
const isCustomNetwork = (networkId) => !isTestnetNetwork(networkId) && networkId !== NETWORK_ID.MAINNET;
|
|
141
|
-
const getNetworkCurrencyCode = (id) => networkCurrencyCode[id] || "-";
|
|
142
|
-
const getNetworkCurrencySymbol = (id) => networkCurrencySymbol[id] || "?";
|
|
1
|
+
import { NETWORK_ID, getNetworkCurrencyCode, getNetworkCurrencySymbol, getNetworkDecimals, getNetworkId, isCustomNetwork, isSupportedNetworkId, isTestnetNetwork, networkAddressPrefix, networkCurrencyCode, networkCurrencySymbol, networkGroups, networkIdList, networkIdx, networkShelleyTransitionEpoch, networkStakeAddressPrefix } from "./types/NetworkId.mjs";
|
|
2
|
+
import { GenesisStore } from "./network/GenesisStore.mjs";
|
|
3
|
+
import { getByron, getCalculatedChainTip, getCalculatedEpoch, getCalculatedEpochSlot, getCalculatedSlotFromBlockTime, getDateIdFromSlot, getDateIdFromTimestamp, getEpochFromSlot, getEpochLength, getEpochStart, getGenesis, getLastSlotOfEpoch, getNetworkMagic, getNumEpochBlocks, getShelley, getSlotFromDateId, getTimestampFromSlot, updateChainTip } from "./chain.mjs";
|
|
4
|
+
import { createIChainTip } from "./types/IChainTip.mjs";
|
|
143
5
|
|
|
144
|
-
|
|
145
|
-
export { NETWORK_ID, getNetworkCurrencyCode, getNetworkCurrencySymbol, getNetworkDecimals, getNetworkId, isCustomNetwork, isSupportedNetworkId, isTestnetNetwork, networkAddressPrefix, networkCurrencyCode, networkCurrencySymbol, networkGroups, networkIdList, networkIdx, networkShelleyTransitionEpoch, networkStakeAddressPrefix };
|
|
146
|
-
//# sourceMappingURL=index.mjs.map
|
|
6
|
+
export { GenesisStore, NETWORK_ID, createIChainTip, getByron, getCalculatedChainTip, getCalculatedEpoch, getCalculatedEpochSlot, getCalculatedSlotFromBlockTime, getDateIdFromSlot, getDateIdFromTimestamp, getEpochFromSlot, getEpochLength, getEpochStart, getGenesis, getLastSlotOfEpoch, getNetworkCurrencyCode, getNetworkCurrencySymbol, getNetworkDecimals, getNetworkId, getNetworkMagic, getNumEpochBlocks, getShelley, getSlotFromDateId, getTimestampFromSlot, isCustomNetwork, isSupportedNetworkId, isTestnetNetwork, networkAddressPrefix, networkCurrencyCode, networkCurrencySymbol, networkGroups, networkIdList, networkIdx, networkShelleyTransitionEpoch, networkStakeAddressPrefix, updateChainTip };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_byron = require('../byron-Hv7K7fjg.cjs');
|
|
3
|
+
|
|
4
|
+
//#region src/network/GenesisStore.ts
|
|
5
|
+
const GenesisStore = {
|
|
6
|
+
mainnet: {
|
|
7
|
+
shelley: require_byron.shelley_default$8,
|
|
8
|
+
byron: require_byron.byron_default$8
|
|
9
|
+
},
|
|
10
|
+
guild: {
|
|
11
|
+
shelley: require_byron.shelley_default$7,
|
|
12
|
+
byron: require_byron.byron_default$7
|
|
13
|
+
},
|
|
14
|
+
sancho: {
|
|
15
|
+
shelley: require_byron.shelley_default$6,
|
|
16
|
+
byron: require_byron.byron_default$6
|
|
17
|
+
},
|
|
18
|
+
preprod: {
|
|
19
|
+
shelley: require_byron.shelley_default$5,
|
|
20
|
+
byron: require_byron.byron_default$5
|
|
21
|
+
},
|
|
22
|
+
preview: {
|
|
23
|
+
shelley: require_byron.shelley_default$4,
|
|
24
|
+
byron: require_byron.byron_default$4
|
|
25
|
+
},
|
|
26
|
+
afvt: {
|
|
27
|
+
shelley: require_byron.shelley_default$3,
|
|
28
|
+
byron: require_byron.byron_default$3
|
|
29
|
+
},
|
|
30
|
+
afvm: {
|
|
31
|
+
shelley: require_byron.shelley_default$2,
|
|
32
|
+
byron: require_byron.byron_default$2
|
|
33
|
+
},
|
|
34
|
+
afpt: {
|
|
35
|
+
shelley: require_byron.shelley_default$1,
|
|
36
|
+
byron: require_byron.byron_default$1
|
|
37
|
+
},
|
|
38
|
+
afpm: {
|
|
39
|
+
shelley: require_byron.shelley_default,
|
|
40
|
+
byron: require_byron.byron_default
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
exports.GenesisStore = GenesisStore;
|
|
46
|
+
//# sourceMappingURL=GenesisStore.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenesisStore.cjs","names":["mainnetShelley","mainnetByron","guildShelley","guildByron","sanchoShelley","sanchoByron","preprodShelley","preprodByron","previewShelley","previewByron","afvtShelley","afvtByron","afvmShelley","afvmByron","afptShelley","afptByron","afpmShelley","afpmByron"],"sources":["../../src/network/GenesisStore.ts"],"sourcesContent":["import { type NetworkId } from '../index'\n\nimport { IGenesisStore } from './IGenesisStore'\n\nimport mainnetShelley from './mainnet/shelley.json'\nimport guildShelley from './guild/shelley.json'\nimport sanchoShelley from './sancho/shelley.json'\nimport preprodShelley from './preprod/shelley.json'\nimport previewShelley from './preview/shelley.json'\nimport afvtShelley from './afvt/shelley.json'\nimport afvmShelley from './afvm/shelley.json'\nimport afptShelley from './afpt/shelley.json'\nimport afpmShelley from './afpm/shelley.json'\n\nimport mainnetByron from './mainnet/byron.json'\nimport guildByron from './guild/byron.json'\nimport sanchoByron from './sancho/byron.json'\nimport preprodByron from './preprod/byron.json'\nimport previewByron from './preview/byron.json'\nimport afvtByron from './afvt/byron.json'\nimport afvmByron from './afvm/byron.json'\nimport afptByron from './afpt/byron.json'\nimport afpmByron from './afpm/byron.json'\n\nexport const GenesisStore : Record<NetworkId, IGenesisStore> = {\n\n mainnet: {\n\n shelley: mainnetShelley,\n byron: mainnetByron\n },\n\n guild: {\n\n shelley: guildShelley,\n byron: guildByron\n },\n\n sancho: {\n\n shelley: sanchoShelley,\n byron: sanchoByron\n },\n\n preprod: {\n\n shelley: preprodShelley,\n byron: preprodByron\n },\n\n preview: {\n\n shelley: previewShelley,\n byron: previewByron\n },\n\n afvt: {\n\n shelley: afvtShelley,\n byron: afvtByron\n },\n\n afvm: {\n\n shelley: afvmShelley,\n byron: afvmByron\n },\n\n afpt: {\n\n shelley: afptShelley,\n byron: afptByron\n },\n\n afpm: {\n\n shelley: afpmShelley,\n byron: afpmByron\n },\n}\n"],"mappings":";;;;AAwBA,MAAa,eAAkD;CAE7D,SAA4B;EAE1B,SAA0BA;EAC1B,OAA0BC;EAC3B;CAED,OAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,QAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,SAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,SAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,MAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,MAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,MAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,MAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NetworkId } from "../types/NetworkId.cjs";
|
|
2
|
+
import { IGenesisStore } from "./IGenesisStore.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/network/GenesisStore.d.ts
|
|
5
|
+
declare const GenesisStore: Record<NetworkId, IGenesisStore>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { GenesisStore };
|
|
8
|
+
//# sourceMappingURL=GenesisStore.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenesisStore.d.cts","names":[],"sources":["../../src/network/GenesisStore.ts"],"mappings":";;;;cAwBa,YAAA,EAAe,MAAA,CAAO,SAAA,EAAW,aAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NetworkId } from "../types/NetworkId.mjs";
|
|
2
|
+
import { IGenesisStore } from "./IGenesisStore.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/network/GenesisStore.d.ts
|
|
5
|
+
declare const GenesisStore: Record<NetworkId, IGenesisStore>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { GenesisStore };
|
|
8
|
+
//# sourceMappingURL=GenesisStore.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenesisStore.d.mts","names":[],"sources":["../../src/network/GenesisStore.ts"],"mappings":";;;;cAwBa,YAAA,EAAe,MAAA,CAAO,SAAA,EAAW,aAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { _ as shelley_default$1, a as byron_default$4, c as byron_default$1, d as shelley_default$7, f as shelley_default$6, g as shelley_default$2, h as shelley_default$3, i as byron_default$5, l as byron_default, m as shelley_default$4, n as byron_default$7, o as byron_default$3, p as shelley_default$5, r as byron_default$6, s as byron_default$2, t as byron_default$8, u as shelley_default$8, v as shelley_default } from "../byron-BpRcvdPh.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/network/GenesisStore.ts
|
|
4
|
+
const GenesisStore = {
|
|
5
|
+
mainnet: {
|
|
6
|
+
shelley: shelley_default,
|
|
7
|
+
byron: byron_default
|
|
8
|
+
},
|
|
9
|
+
guild: {
|
|
10
|
+
shelley: shelley_default$1,
|
|
11
|
+
byron: byron_default$1
|
|
12
|
+
},
|
|
13
|
+
sancho: {
|
|
14
|
+
shelley: shelley_default$2,
|
|
15
|
+
byron: byron_default$2
|
|
16
|
+
},
|
|
17
|
+
preprod: {
|
|
18
|
+
shelley: shelley_default$3,
|
|
19
|
+
byron: byron_default$3
|
|
20
|
+
},
|
|
21
|
+
preview: {
|
|
22
|
+
shelley: shelley_default$4,
|
|
23
|
+
byron: byron_default$4
|
|
24
|
+
},
|
|
25
|
+
afvt: {
|
|
26
|
+
shelley: shelley_default$5,
|
|
27
|
+
byron: byron_default$5
|
|
28
|
+
},
|
|
29
|
+
afvm: {
|
|
30
|
+
shelley: shelley_default$6,
|
|
31
|
+
byron: byron_default$6
|
|
32
|
+
},
|
|
33
|
+
afpt: {
|
|
34
|
+
shelley: shelley_default$7,
|
|
35
|
+
byron: byron_default$7
|
|
36
|
+
},
|
|
37
|
+
afpm: {
|
|
38
|
+
shelley: shelley_default$8,
|
|
39
|
+
byron: byron_default$8
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { GenesisStore };
|
|
45
|
+
//# sourceMappingURL=GenesisStore.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenesisStore.mjs","names":["mainnetShelley","mainnetByron","guildShelley","guildByron","sanchoShelley","sanchoByron","preprodShelley","preprodByron","previewShelley","previewByron","afvtShelley","afvtByron","afvmShelley","afvmByron","afptShelley","afptByron","afpmShelley","afpmByron"],"sources":["../../src/network/GenesisStore.ts"],"sourcesContent":["import { type NetworkId } from '../index'\n\nimport { IGenesisStore } from './IGenesisStore'\n\nimport mainnetShelley from './mainnet/shelley.json'\nimport guildShelley from './guild/shelley.json'\nimport sanchoShelley from './sancho/shelley.json'\nimport preprodShelley from './preprod/shelley.json'\nimport previewShelley from './preview/shelley.json'\nimport afvtShelley from './afvt/shelley.json'\nimport afvmShelley from './afvm/shelley.json'\nimport afptShelley from './afpt/shelley.json'\nimport afpmShelley from './afpm/shelley.json'\n\nimport mainnetByron from './mainnet/byron.json'\nimport guildByron from './guild/byron.json'\nimport sanchoByron from './sancho/byron.json'\nimport preprodByron from './preprod/byron.json'\nimport previewByron from './preview/byron.json'\nimport afvtByron from './afvt/byron.json'\nimport afvmByron from './afvm/byron.json'\nimport afptByron from './afpt/byron.json'\nimport afpmByron from './afpm/byron.json'\n\nexport const GenesisStore : Record<NetworkId, IGenesisStore> = {\n\n mainnet: {\n\n shelley: mainnetShelley,\n byron: mainnetByron\n },\n\n guild: {\n\n shelley: guildShelley,\n byron: guildByron\n },\n\n sancho: {\n\n shelley: sanchoShelley,\n byron: sanchoByron\n },\n\n preprod: {\n\n shelley: preprodShelley,\n byron: preprodByron\n },\n\n preview: {\n\n shelley: previewShelley,\n byron: previewByron\n },\n\n afvt: {\n\n shelley: afvtShelley,\n byron: afvtByron\n },\n\n afvm: {\n\n shelley: afvmShelley,\n byron: afvmByron\n },\n\n afpt: {\n\n shelley: afptShelley,\n byron: afptByron\n },\n\n afpm: {\n\n shelley: afpmShelley,\n byron: afpmByron\n },\n}\n"],"mappings":";;;AAwBA,MAAa,eAAkD;CAE7D,SAA4B;EAE1B,SAA0BA;EAC1B,OAA0BC;EAC3B;CAED,OAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,QAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,SAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,SAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,MAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,MAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,MAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CAED,MAA4B;EAE1B,SAA0BC;EAC1B,OAA0BC;EAC3B;CACF"}
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/network/IGenesisStore.d.ts
|
|
2
|
+
interface IShelley {
|
|
3
|
+
activeSlotsCoeff: number;
|
|
4
|
+
epochLength: number;
|
|
5
|
+
maxKESEvolutions: number;
|
|
6
|
+
maxLovelaceSupply: number;
|
|
7
|
+
networkId: string;
|
|
8
|
+
networkMagic: number;
|
|
9
|
+
securityParam: number;
|
|
10
|
+
slotLength: number;
|
|
11
|
+
slotsPerKESPeriod: number;
|
|
12
|
+
systemStart: string;
|
|
13
|
+
updateQuorum: number;
|
|
14
|
+
}
|
|
15
|
+
interface IBlockVersionData {
|
|
16
|
+
slotDuration: string;
|
|
17
|
+
maxBlockSize: string;
|
|
18
|
+
maxHeaderSize: string;
|
|
19
|
+
maxTxSize: string;
|
|
20
|
+
maxProposalSize: string;
|
|
21
|
+
}
|
|
22
|
+
interface IProtocolConsts {
|
|
23
|
+
k: number;
|
|
24
|
+
protocolMagic: number;
|
|
25
|
+
}
|
|
26
|
+
interface IByron {
|
|
27
|
+
startTime: number;
|
|
28
|
+
blockVersionData: IBlockVersionData;
|
|
29
|
+
protocolConsts: IProtocolConsts;
|
|
30
|
+
}
|
|
31
|
+
interface IGenesisStore {
|
|
32
|
+
shelley: IShelley;
|
|
33
|
+
byron: IByron;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { IBlockVersionData, IByron, IGenesisStore, IProtocolConsts, IShelley };
|
|
37
|
+
//# sourceMappingURL=IGenesisStore.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IGenesisStore.d.cts","names":[],"sources":["../../src/network/IGenesisStore.ts"],"mappings":";UAsBiB,QAAA;EAEf,gBAAA;EACA,WAAA;EACA,gBAAA;EACA,iBAAA;EACA,SAAA;EACA,YAAA;EAEA,aAAA;EACA,UAAA;EACA,iBAAA;EACA,WAAA;EACA,YAAA;AAAA;AAAA,UAGe,iBAAA;EAEf,YAAA;EACA,YAAA;EACA,aAAA;EACA,SAAA;EACA,eAAA;AAAA;AAAA,UAGe,eAAA;EAEf,CAAA;EACA,aAAA;AAAA;AAAA,UAGe,MAAA;EAEf,SAAA;EACA,gBAAA,EAA4B,iBAAA;EAC5B,cAAA,EAA4B,eAAA;AAAA;AAAA,UAGb,aAAA;EAEf,OAAA,EAA4B,QAAA;EAC5B,KAAA,EAA4B,MAAA;AAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/network/IGenesisStore.d.ts
|
|
2
|
+
interface IShelley {
|
|
3
|
+
activeSlotsCoeff: number;
|
|
4
|
+
epochLength: number;
|
|
5
|
+
maxKESEvolutions: number;
|
|
6
|
+
maxLovelaceSupply: number;
|
|
7
|
+
networkId: string;
|
|
8
|
+
networkMagic: number;
|
|
9
|
+
securityParam: number;
|
|
10
|
+
slotLength: number;
|
|
11
|
+
slotsPerKESPeriod: number;
|
|
12
|
+
systemStart: string;
|
|
13
|
+
updateQuorum: number;
|
|
14
|
+
}
|
|
15
|
+
interface IBlockVersionData {
|
|
16
|
+
slotDuration: string;
|
|
17
|
+
maxBlockSize: string;
|
|
18
|
+
maxHeaderSize: string;
|
|
19
|
+
maxTxSize: string;
|
|
20
|
+
maxProposalSize: string;
|
|
21
|
+
}
|
|
22
|
+
interface IProtocolConsts {
|
|
23
|
+
k: number;
|
|
24
|
+
protocolMagic: number;
|
|
25
|
+
}
|
|
26
|
+
interface IByron {
|
|
27
|
+
startTime: number;
|
|
28
|
+
blockVersionData: IBlockVersionData;
|
|
29
|
+
protocolConsts: IProtocolConsts;
|
|
30
|
+
}
|
|
31
|
+
interface IGenesisStore {
|
|
32
|
+
shelley: IShelley;
|
|
33
|
+
byron: IByron;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { IBlockVersionData, IByron, IGenesisStore, IProtocolConsts, IShelley };
|
|
37
|
+
//# sourceMappingURL=IGenesisStore.d.mts.map
|