@cityofzion/bs-ethereum 2.2.13 → 2.3.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/dist/BSEthereum.d.ts +6 -6
- package/dist/BSEthereum.js +66 -50
- package/dist/{BSEthereumHelper.d.ts → constants/BSEthereumConstants.d.ts} +6 -15
- package/dist/constants/BSEthereumConstants.js +235 -0
- package/dist/helpers/BSEthereumHelper.d.ts +16 -0
- package/dist/helpers/BSEthereumHelper.js +58 -0
- package/dist/index.d.ts +11 -7
- package/dist/index.js +11 -7
- package/dist/{BlockscoutNeoXBDSEthereum.d.ts → services/blockchain-data/BlockscoutBDSEthereum.d.ts} +2 -2
- package/dist/{BlockscoutNeoXBDSEthereum.js → services/blockchain-data/BlockscoutBDSEthereum.js} +23 -22
- package/dist/{MoralisBDSEthereum.d.ts → services/blockchain-data/MoralisBDSEthereum.d.ts} +1 -1
- package/dist/{MoralisBDSEthereum.js → services/blockchain-data/MoralisBDSEthereum.js} +2 -2
- package/dist/{RpcBDSEthereum.d.ts → services/blockchain-data/RpcBDSEthereum.d.ts} +1 -1
- package/dist/{RpcBDSEthereum.js → services/blockchain-data/RpcBDSEthereum.js} +2 -2
- package/dist/{BlockscoutNeoXEDSEthereum.d.ts → services/exchange-data/BlockscoutEDSEthereum.d.ts} +1 -1
- package/dist/{BlockscoutNeoXEDSEthereum.js → services/exchange-data/BlockscoutEDSEthereum.js} +17 -15
- package/dist/{MoralisEDSEthereum.d.ts → services/exchange-data/MoralisEDSEthereum.d.ts} +1 -1
- package/dist/{MoralisEDSEthereum.js → services/exchange-data/MoralisEDSEthereum.js} +2 -2
- package/dist/{BlockscoutNeoXESEthereum.d.ts → services/explorer/BlockscoutESEthereum.d.ts} +2 -2
- package/dist/{BlockscoutNeoXESEthereum.js → services/explorer/BlockscoutESEthereum.js} +25 -16
- package/dist/{EthersLedgerServiceEthereum.d.ts → services/ledger/EthersLedgerServiceEthereum.d.ts} +8 -7
- package/dist/{EthersLedgerServiceEthereum.js → services/ledger/EthersLedgerServiceEthereum.js} +40 -58
- package/dist/{GhostMarketNDSEthereum.d.ts → services/nft-data/GhostMarketNDSEthereum.d.ts} +1 -1
- package/dist/{RpcNDSEthereum.js → services/nft-data/RpcNDSEthereum.js} +1 -1
- package/package.json +2 -2
- package/dist/BSEthereumHelper.js +0 -259
- /package/dist/{GhostMarketNDSEthereum.js → services/nft-data/GhostMarketNDSEthereum.js} +0 -0
- /package/dist/{RpcNDSEthereum.d.ts → services/nft-data/RpcNDSEthereum.d.ts} +0 -0
package/dist/BSEthereumHelper.js
DELETED
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var _a, _BSEthereumHelper_NATIVE_ASSET, _BSEthereumHelper_NATIVE_SYMBOL_BY_NETWORK_ID, _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID;
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.BSEthereumHelper = void 0;
|
|
10
|
-
class BSEthereumHelper {
|
|
11
|
-
static getNativeAsset(network) {
|
|
12
|
-
const symbol = this.getNativeSymbol(network);
|
|
13
|
-
return Object.assign(Object.assign({}, __classPrivateFieldGet(this, _a, "f", _BSEthereumHelper_NATIVE_ASSET)), { symbol, name: symbol });
|
|
14
|
-
}
|
|
15
|
-
static getNativeSymbol(network) {
|
|
16
|
-
var _b;
|
|
17
|
-
return (_b = __classPrivateFieldGet(this, _a, "f", _BSEthereumHelper_NATIVE_SYMBOL_BY_NETWORK_ID)[network.id]) !== null && _b !== void 0 ? _b : 'ETH';
|
|
18
|
-
}
|
|
19
|
-
static getRpcList(network) {
|
|
20
|
-
var _b;
|
|
21
|
-
return (_b = __classPrivateFieldGet(this, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)[network.id]) !== null && _b !== void 0 ? _b : [];
|
|
22
|
-
}
|
|
23
|
-
static isMainnet(network) {
|
|
24
|
-
return this.MAINNET_NETWORK_IDS.includes(network.id);
|
|
25
|
-
}
|
|
26
|
-
static normalizeHash(hash) {
|
|
27
|
-
return hash.startsWith('0x') ? hash.slice(2) : hash;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.BSEthereumHelper = BSEthereumHelper;
|
|
31
|
-
_a = BSEthereumHelper;
|
|
32
|
-
BSEthereumHelper.DEFAULT_DECIMALS = 18;
|
|
33
|
-
BSEthereumHelper.DEFAULT_GAS_LIMIT = 0x5208;
|
|
34
|
-
_BSEthereumHelper_NATIVE_ASSET = { value: {
|
|
35
|
-
decimals: 18,
|
|
36
|
-
hash: '-',
|
|
37
|
-
name: 'ETH',
|
|
38
|
-
symbol: 'ETH',
|
|
39
|
-
} };
|
|
40
|
-
_BSEthereumHelper_NATIVE_SYMBOL_BY_NETWORK_ID = { value: {
|
|
41
|
-
'1': 'ETH',
|
|
42
|
-
'10': 'ETH',
|
|
43
|
-
'25': 'CRO',
|
|
44
|
-
'56': 'BNB',
|
|
45
|
-
'137': 'MATIC',
|
|
46
|
-
'1101': 'ETH',
|
|
47
|
-
'250': 'FTM',
|
|
48
|
-
'8453': 'ETH',
|
|
49
|
-
'80002': 'MATIC',
|
|
50
|
-
'42161': 'ETH',
|
|
51
|
-
'42220': 'CELO',
|
|
52
|
-
'43114': 'AVAX',
|
|
53
|
-
'59144': 'ETH',
|
|
54
|
-
'11155111': 'ETH',
|
|
55
|
-
'47763': 'GAS',
|
|
56
|
-
'12227332': 'GAS',
|
|
57
|
-
} };
|
|
58
|
-
_BSEthereumHelper_RPC_LIST_BY_NETWORK_ID = { value: {
|
|
59
|
-
'1': [
|
|
60
|
-
'https://eth.llamarpc.com',
|
|
61
|
-
'https://mainnet.infura.io/v3/',
|
|
62
|
-
'https://ethereum-rpc.publicnode.com',
|
|
63
|
-
'https://endpoints.omniatech.io/v1/eth/mainnet/public',
|
|
64
|
-
'https://rpc.flashbots.net',
|
|
65
|
-
'https://rpc.mevblocker.io',
|
|
66
|
-
],
|
|
67
|
-
'10': [
|
|
68
|
-
'https://optimism.llamarpc.com',
|
|
69
|
-
'https://endpoints.omniatech.io/v1/op/mainnet/public',
|
|
70
|
-
'https://optimism-rpc.publicnode.com',
|
|
71
|
-
'https://optimism.meowrpc.com',
|
|
72
|
-
'https://optimism.rpc.subquery.network/public',
|
|
73
|
-
],
|
|
74
|
-
'25': ['https://cronos-evm-rpc.publicnode.com', 'https://1rpc.io/cro', 'https://rpc.vvs.finance'],
|
|
75
|
-
'56': [
|
|
76
|
-
'https://bsc-dataseed.binance.org/',
|
|
77
|
-
'https://binance.llamarpc.com',
|
|
78
|
-
'https://bsc-dataseed.bnbchain.org',
|
|
79
|
-
'https://endpoints.omniatech.io/v1/bsc/mainnet/public',
|
|
80
|
-
'https://bsc-rpc.publicnode.com',
|
|
81
|
-
],
|
|
82
|
-
'137': [
|
|
83
|
-
'https://polygon-mainnet.infura.io',
|
|
84
|
-
'https://polygon.llamarpc.com',
|
|
85
|
-
'https://endpoints.omniatech.io/v1/matic/mainnet/public',
|
|
86
|
-
'https://polygon.drpc.org',
|
|
87
|
-
'https://polygon.meowrpc.com',
|
|
88
|
-
],
|
|
89
|
-
'250': [
|
|
90
|
-
'https://endpoints.omniatech.io/v1/fantom/mainnet/public',
|
|
91
|
-
'https://rpcapi.fantom.network',
|
|
92
|
-
'https://fantom-pokt.nodies.app',
|
|
93
|
-
'https://fantom-rpc.publicnode.com',
|
|
94
|
-
'https://fantom.drpc.org',
|
|
95
|
-
],
|
|
96
|
-
'1101': [
|
|
97
|
-
'https://polygon-zkevm.drpc.org',
|
|
98
|
-
'https://polygon-zkevm.blockpi.network/v1/rpc/public',
|
|
99
|
-
'https://1rpc.io/polygon/zkevm',
|
|
100
|
-
],
|
|
101
|
-
'80002': [
|
|
102
|
-
'https://polygon-amoy.drpc.org',
|
|
103
|
-
'https://rpc.ankr.com/polygon_amoy',
|
|
104
|
-
'https://polygon-amoy-bor-rpc.publicnode.com',
|
|
105
|
-
],
|
|
106
|
-
'8453': [
|
|
107
|
-
'https://base.rpc.subquery.network/public',
|
|
108
|
-
'https://base.llamarpc.com',
|
|
109
|
-
'https://mainnet.base.org',
|
|
110
|
-
'https://1rpc.io/base',
|
|
111
|
-
'https://base.meowrpc.com',
|
|
112
|
-
'https://base-rpc.publicnode.com',
|
|
113
|
-
'https://endpoints.omniatech.io/v1/base/mainnet/public',
|
|
114
|
-
],
|
|
115
|
-
'42161': [
|
|
116
|
-
'https://arbitrum.llamarpc.com',
|
|
117
|
-
'https://arbitrum-one-rpc.publicnode.com',
|
|
118
|
-
'https://arb-mainnet-public.unifra.io',
|
|
119
|
-
'https://arbitrum-one.publicnode.com',
|
|
120
|
-
],
|
|
121
|
-
'42220': [
|
|
122
|
-
'https://forno.celo.org',
|
|
123
|
-
'https://api.tatum.io/v3/blockchain/node/celo-mainnet',
|
|
124
|
-
'https://rpc.ankr.com/celo',
|
|
125
|
-
],
|
|
126
|
-
'43114': [
|
|
127
|
-
'https://avalanche-mainnet.infura.io',
|
|
128
|
-
'https://avalanche-c-chain-rpc.publicnode.com',
|
|
129
|
-
'https://avalanche.public-rpc.com',
|
|
130
|
-
'https://endpoints.omniatech.io/v1/avax/mainnet/public',
|
|
131
|
-
'https://avalanche.drpc.org',
|
|
132
|
-
],
|
|
133
|
-
'59144': [
|
|
134
|
-
'https://linea.decubate.com',
|
|
135
|
-
'https://linea.blockpi.network/v1/rpc/public',
|
|
136
|
-
'https://linea.decubate.com',
|
|
137
|
-
],
|
|
138
|
-
'11155111': [
|
|
139
|
-
'https://ethereum-sepolia.rpc.subquery.network/public',
|
|
140
|
-
'https://ethereum-sepolia-rpc.publicnode.com',
|
|
141
|
-
'https://endpoints.omniatech.io/v1/eth/sepolia/public',
|
|
142
|
-
'https://eth-sepolia.public.blastapi.io',
|
|
143
|
-
'https://eth-sepolia-public.unifra.io',
|
|
144
|
-
'https://1rpc.io/sepolia',
|
|
145
|
-
'https://eth-sepolia.api.onfinality.io/public',
|
|
146
|
-
],
|
|
147
|
-
'47763': ['https://mainnet-1.rpc.banelabs.org'],
|
|
148
|
-
'12227332': ['https://neoxt4seed1.ngd.network'],
|
|
149
|
-
} };
|
|
150
|
-
BSEthereumHelper.DERIVATION_PATH = "m/44'/60'/0'/0/?";
|
|
151
|
-
BSEthereumHelper.DEFAULT_PATH = "44'/60'/0'/0/0";
|
|
152
|
-
BSEthereumHelper.NEOX_TESTNET_NETWORK_ID = '12227332';
|
|
153
|
-
BSEthereumHelper.NEOX_MAINNET_NETWORK_ID = '47763';
|
|
154
|
-
BSEthereumHelper.NEOX_NETWORK_IDS = [_a.NEOX_TESTNET_NETWORK_ID, _a.NEOX_MAINNET_NETWORK_ID];
|
|
155
|
-
BSEthereumHelper.NEOX_TESTNET_NETWORK = {
|
|
156
|
-
id: _a.NEOX_TESTNET_NETWORK_ID,
|
|
157
|
-
name: 'NeoX Testnet',
|
|
158
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)[_a.NEOX_TESTNET_NETWORK_ID][0],
|
|
159
|
-
};
|
|
160
|
-
BSEthereumHelper.NEOX_MAINNET_NETWORK = {
|
|
161
|
-
id: _a.NEOX_MAINNET_NETWORK_ID,
|
|
162
|
-
name: 'NeoX Mainnet',
|
|
163
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)[_a.NEOX_MAINNET_NETWORK_ID][0],
|
|
164
|
-
};
|
|
165
|
-
BSEthereumHelper.NEOX_NETWORKS = [_a.NEOX_TESTNET_NETWORK, _a.NEOX_MAINNET_NETWORK];
|
|
166
|
-
BSEthereumHelper.MAINNET_NETWORK_IDS = [
|
|
167
|
-
'1',
|
|
168
|
-
'10',
|
|
169
|
-
'25',
|
|
170
|
-
'56',
|
|
171
|
-
'137',
|
|
172
|
-
'250',
|
|
173
|
-
'8453',
|
|
174
|
-
'42161',
|
|
175
|
-
'42220',
|
|
176
|
-
'43114',
|
|
177
|
-
'59144',
|
|
178
|
-
_a.NEOX_MAINNET_NETWORK_ID,
|
|
179
|
-
];
|
|
180
|
-
BSEthereumHelper.TESTNET_NETWORK_IDS = ['1101', '80002', '11155111', _a.NEOX_TESTNET_NETWORK_ID];
|
|
181
|
-
BSEthereumHelper.ALL_NETWORK_IDS = [..._a.MAINNET_NETWORK_IDS, ..._a.TESTNET_NETWORK_IDS];
|
|
182
|
-
BSEthereumHelper.MAINNET_NETWORKS = [
|
|
183
|
-
{
|
|
184
|
-
id: '1',
|
|
185
|
-
name: 'Ethereum Mainnet',
|
|
186
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['1'][0],
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
id: '10',
|
|
190
|
-
name: 'Optimism Mainnet',
|
|
191
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['10'][0],
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
id: '25',
|
|
195
|
-
name: 'Cronos Mainnet',
|
|
196
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['25'][0],
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
id: '56',
|
|
200
|
-
name: 'Binance Smart Chain Mainnet',
|
|
201
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['56'][0],
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
id: '137',
|
|
205
|
-
name: 'Polygon Mainnet',
|
|
206
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['137'][0],
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
id: '250',
|
|
210
|
-
name: 'Fantom Mainnet',
|
|
211
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['250'][0],
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
id: '8453',
|
|
215
|
-
name: 'Base Protocol Mainnet',
|
|
216
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['8453'][0],
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
id: '42161',
|
|
220
|
-
name: 'Arbitrum Mainnet',
|
|
221
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['42161'][0],
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
id: '42220',
|
|
225
|
-
name: 'Celo Mainnet',
|
|
226
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['42220'][0],
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
id: '43114',
|
|
230
|
-
name: 'Avalanche Mainnet',
|
|
231
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['43114'][0],
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
id: '59144',
|
|
235
|
-
name: 'Linea Mainnet',
|
|
236
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['59144'][0],
|
|
237
|
-
},
|
|
238
|
-
_a.NEOX_MAINNET_NETWORK,
|
|
239
|
-
];
|
|
240
|
-
BSEthereumHelper.TESTNET_NETWORKS = [
|
|
241
|
-
{
|
|
242
|
-
id: '1101',
|
|
243
|
-
name: 'Polygon zkEVM Testnet',
|
|
244
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['1101'][0],
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
id: '80002',
|
|
248
|
-
name: 'Polygon Testnet Amoy',
|
|
249
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['80002'][0],
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
id: '11155111',
|
|
253
|
-
name: 'Sepolia Testnet',
|
|
254
|
-
url: __classPrivateFieldGet(_a, _a, "f", _BSEthereumHelper_RPC_LIST_BY_NETWORK_ID)['11155111'][0],
|
|
255
|
-
},
|
|
256
|
-
_a.NEOX_TESTNET_NETWORK,
|
|
257
|
-
];
|
|
258
|
-
BSEthereumHelper.ALL_NETWORKS = [..._a.MAINNET_NETWORKS, ..._a.TESTNET_NETWORKS];
|
|
259
|
-
BSEthereumHelper.DEFAULT_NETWORK = _a.MAINNET_NETWORKS[0];
|
|
File without changes
|
|
File without changes
|