multichain-analytics-indexer 0.2.1__py3-none-any.whl
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.
- multichain_analytics_indexer-0.2.1.dist-info/METADATA +344 -0
- multichain_analytics_indexer-0.2.1.dist-info/RECORD +36 -0
- multichain_analytics_indexer-0.2.1.dist-info/WHEEL +4 -0
- multichain_analytics_indexer-0.2.1.dist-info/entry_points.txt +2 -0
- multichain_analytics_indexer-0.2.1.dist-info/licenses/LICENSE +202 -0
- multichain_indexer/__init__.py +52 -0
- multichain_indexer/adapters/__init__.py +6 -0
- multichain_indexer/adapters/algorand/__init__.py +3 -0
- multichain_indexer/adapters/algorand/adapter.py +215 -0
- multichain_indexer/adapters/algorand/client.py +87 -0
- multichain_indexer/adapters/algorand/metrics.py +42 -0
- multichain_indexer/adapters/algorand/models.py +116 -0
- multichain_indexer/adapters/algorand/parser.py +424 -0
- multichain_indexer/adapters/solana/__init__.py +3 -0
- multichain_indexer/adapters/solana/adapter.py +304 -0
- multichain_indexer/adapters/solana/client.py +138 -0
- multichain_indexer/adapters/solana/metrics.py +60 -0
- multichain_indexer/adapters/solana/models.py +104 -0
- multichain_indexer/adapters/solana/parser.py +699 -0
- multichain_indexer/api.py +299 -0
- multichain_indexer/cli.py +282 -0
- multichain_indexer/core/__init__.py +0 -0
- multichain_indexer/core/base_indexer.py +120 -0
- multichain_indexer/core/cache.py +32 -0
- multichain_indexer/core/config.py +91 -0
- multichain_indexer/core/errors.py +43 -0
- multichain_indexer/core/export.py +62 -0
- multichain_indexer/core/http.py +242 -0
- multichain_indexer/core/metrics.py +79 -0
- multichain_indexer/core/models.py +109 -0
- multichain_indexer/core/observability.py +91 -0
- multichain_indexer/core/pipeline.py +135 -0
- multichain_indexer/core/ratelimit.py +30 -0
- multichain_indexer/core/registry.py +63 -0
- multichain_indexer/core/storage.py +309 -0
- multichain_indexer/py.typed +0 -0
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: multichain-analytics-indexer
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Index and analyse blockchain accounts and transactions, in each chain's own terms.
|
|
5
|
+
Project-URL: Homepage, https://github.com/majidali32ms-lang/multichain-analytics-indexer
|
|
6
|
+
Project-URL: Issues, https://github.com/majidali32ms-lang/multichain-analytics-indexer/issues
|
|
7
|
+
Author: Majid Khan
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: algorand,analytics,blockchain,indexer,solana
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: aiohttp<4,>=3.11
|
|
23
|
+
Requires-Dist: base58<3,>=2.1
|
|
24
|
+
Requires-Dist: click<9,>=8.1
|
|
25
|
+
Requires-Dist: pandas<4,>=2.2
|
|
26
|
+
Requires-Dist: py-algorand-sdk<3,>=2.12
|
|
27
|
+
Requires-Dist: pyarrow>=18
|
|
28
|
+
Requires-Dist: pydantic<3,>=2.10
|
|
29
|
+
Requires-Dist: python-dotenv<2,>=1.0
|
|
30
|
+
Requires-Dist: solders<0.30,>=0.29
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# multichain-analytics-indexer
|
|
34
|
+
|
|
35
|
+
[](https://github.com/majidali32ms-lang/multichain-analytics-indexer/actions/workflows/ci.yml)
|
|
36
|
+

|
|
37
|
+
[](LICENSE)
|
|
38
|
+
|
|
39
|
+
A Python library and command line for indexing and analysing blockchain accounts and
|
|
40
|
+
transactions, in each chain's own terms. It keeps what it reads in a local database,
|
|
41
|
+
syncs incrementally, and produces metrics and exports for analysis.
|
|
42
|
+
|
|
43
|
+
This version supports **Algorand** and **Solana**. See the [roadmap](#roadmap) for what
|
|
44
|
+
comes next.
|
|
45
|
+
|
|
46
|
+
## Install
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install .
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Python 3.11 or newer. The package is not on PyPI yet, so install it from a checkout of
|
|
53
|
+
this repository.
|
|
54
|
+
|
|
55
|
+
## Quick start
|
|
56
|
+
|
|
57
|
+
From Python:
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
from multichain_indexer import Indexer
|
|
61
|
+
|
|
62
|
+
with Indexer("algorand") as indexer: # testnet by default
|
|
63
|
+
address = "JCN7TCSQEG6YHAQ7F6BS73J2UDXI2L7S7WJU35LYMIK22IL264ZRJO55QM"
|
|
64
|
+
print(indexer.account(address).balance) # microAlgos
|
|
65
|
+
print(indexer.sync(address).records_fetched)
|
|
66
|
+
print(indexer.metrics(days=30, account=address).transactions)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`AsyncIndexer` has the same methods as coroutines.
|
|
70
|
+
|
|
71
|
+
From the command line:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
multichain-indexer index account JCN7TCSQEG6YHAQ7F6BS73J2UDXI2L7S7WJU35LYMIK22IL264ZRJO55QM
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
Address JCN7TCSQEG6YHAQ7F6BS73J2UDXI2L7S7WJU35LYMIK22IL264ZRJO55QM
|
|
79
|
+
Balance 0.482 ALGO
|
|
80
|
+
Min balance 0.3 ALGO
|
|
81
|
+
Participation Offline
|
|
82
|
+
Rekeyed to not rekeyed
|
|
83
|
+
ASAs held 2
|
|
84
|
+
Apps opted in 0
|
|
85
|
+
ASAs created 0
|
|
86
|
+
Apps created 0
|
|
87
|
+
As of round 68936216
|
|
88
|
+
|
|
89
|
+
2026-11-03 10:52 5KIYIOY7WTMLMIWC6BVGWBUTQCMXKQDHC7H6Y3CY4CG5ZU2ILBDA transfer 1000 of ASA 106414664 0.001 ALGO
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Algorand
|
|
93
|
+
|
|
94
|
+
Reads the official [Algorand Indexer REST API](https://dev.algorand.co/reference/rest-api/indexer/)
|
|
95
|
+
over `aiohttp`, which gives async requests and the HTTP status needed to recognise rate
|
|
96
|
+
limits. `py-algorand-sdk` (`algosdk`) handles address validation and encoding, before
|
|
97
|
+
any request is sent.
|
|
98
|
+
|
|
99
|
+
| Option | Meaning |
|
|
100
|
+
|---|---|
|
|
101
|
+
| `--network testnet` | The default. Uses Nodely's free public endpoint. |
|
|
102
|
+
| `--network mainnet` | Must be asked for explicitly. |
|
|
103
|
+
| `--network localnet` | AlgoKit LocalNet, at `http://localhost:8980`. |
|
|
104
|
+
|
|
105
|
+
Set `ALGORAND_<NETWORK>_INDEXER_SERVER` and `ALGORAND_<NETWORK>_INDEXER_TOKEN` in `.env`
|
|
106
|
+
to use your own endpoint. See [`.env.example`](.env.example).
|
|
107
|
+
|
|
108
|
+
### Commands
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
multichain-indexer index account <address>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
multichain-indexer index asset <asa-id>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
multichain-indexer index app <app-id>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
multichain-indexer sync <address>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
multichain-indexer metrics --days 30
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
multichain-indexer export --format parquet --output transactions.parquet
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
`sync` stores an account's history, then only fetches rounds it has not seen:
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
Synced JCN7TCSQEG6YHAQ7F6BS73J2UDXI2L7S7WJU35LYMIK22IL264ZRJO55QM on algorand testnet: 108 transactions up to height 68936400, 3 requests in 1.3s
|
|
138
|
+
Synced JCN7TCSQEG6YHAQ7F6BS73J2UDXI2L7S7WJU35LYMIK22IL264ZRJO55QM on algorand testnet: 0 transactions up to height 68936403, 2 requests in 1.0s
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
`metrics` works on what has been stored:
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"chain": "algorand",
|
|
146
|
+
"network": "testnet",
|
|
147
|
+
"days": 30,
|
|
148
|
+
"account": null,
|
|
149
|
+
"transactions": 24,
|
|
150
|
+
"transactions_per_day": {
|
|
151
|
+
"2026-10-08": 13,
|
|
152
|
+
"2026-10-09": 4,
|
|
153
|
+
"2026-10-12": 4,
|
|
154
|
+
"2026-11-03": 3
|
|
155
|
+
},
|
|
156
|
+
"active_accounts": 3,
|
|
157
|
+
"total_fees": 24000,
|
|
158
|
+
"failure_rate": 0.0,
|
|
159
|
+
"native": {
|
|
160
|
+
"fees_microalgos": 24000,
|
|
161
|
+
"app_calls": 0,
|
|
162
|
+
"asa_opt_ins": 0,
|
|
163
|
+
"group_transaction_share": 0.0,
|
|
164
|
+
"inner_transactions": 0,
|
|
165
|
+
"top_asas_by_transfers": [
|
|
166
|
+
{
|
|
167
|
+
"asa_id": 106414664,
|
|
168
|
+
"transfers": 24
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### What is recorded
|
|
176
|
+
|
|
177
|
+
Every transaction has shared fields (`id`, `time`, `sender`, `receiver`, `amount`, `fee`,
|
|
178
|
+
`status`, `chain`, `network`) and a `native` block with Algorand's own concepts:
|
|
179
|
+
|
|
180
|
+
- **ASAs:** create, reconfigure, destroy, opt-in, opt-out, transfer, clawback, freeze and
|
|
181
|
+
unfreeze.
|
|
182
|
+
- **Applications:** app ID, on-completion, and logs decoded as ARC-4 return values, text
|
|
183
|
+
or raw bytes.
|
|
184
|
+
- **Inner transactions:** kept as a tree under their parent.
|
|
185
|
+
- **Atomic groups:** the group ID.
|
|
186
|
+
- **Rekeying:** `rekey_to` on the transaction, and `auth_addr` on transactions and
|
|
187
|
+
accounts.
|
|
188
|
+
- **Accounts:** minimum balance, participation status, ASA holdings.
|
|
189
|
+
|
|
190
|
+
A few things worth knowing when reading the numbers:
|
|
191
|
+
|
|
192
|
+
- `amount` is in microAlgos for a payment and in the ASA's base units for an asset
|
|
193
|
+
transfer.
|
|
194
|
+
- `fee` is the transaction's fee plus those of its inner transactions.
|
|
195
|
+
- Active accounts counts distinct senders.
|
|
196
|
+
- Every record is `final`: Algorand has instant finality, and a transaction that fails
|
|
197
|
+
never reaches a block.
|
|
198
|
+
|
|
199
|
+
## Solana
|
|
200
|
+
|
|
201
|
+
Reads the Solana JSON-RPC API over `aiohttp`. `solders` validates public keys, before any
|
|
202
|
+
request is sent. A mint or program records no creator on-chain, so `creator` is empty and
|
|
203
|
+
the mint and upgrade authorities are in `native`.
|
|
204
|
+
|
|
205
|
+
| Option | Meaning |
|
|
206
|
+
|---|---|
|
|
207
|
+
| `--network devnet` | The default. |
|
|
208
|
+
| `--network testnet` | The public testnet endpoint. |
|
|
209
|
+
| `--network mainnet` | Must be asked for explicitly. |
|
|
210
|
+
| `--network localnet` | `solana-test-validator`, at `http://localhost:8899`. |
|
|
211
|
+
|
|
212
|
+
Set `SOLANA_<NETWORK>_RPC_SERVER` in `.env` to use your own endpoint, and
|
|
213
|
+
`SOLANA_<NETWORK>_COMMITMENT` to choose `confirmed` (the default) or `finalized`.
|
|
214
|
+
|
|
215
|
+
A sync makes one `getTransaction` per signature, and public endpoints limit that method
|
|
216
|
+
tightly: at 1 request per second they still answered HTTP 429, and at 1 every 2 seconds
|
|
217
|
+
they did not, so that is the default. Raise it with `MCI_REQUESTS_PER_SECOND` on a
|
|
218
|
+
dedicated endpoint. If a public endpoint keeps answering 429, the error says so and
|
|
219
|
+
suggests one. The [Solana page](https://majidali32ms-lang.github.io/multichain-analytics-indexer/chains/solana/)
|
|
220
|
+
has the measurements.
|
|
221
|
+
|
|
222
|
+
### Commands
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
multichain-indexer --chain solana index account <address>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
multichain-indexer --chain solana index token <mint>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
multichain-indexer --chain solana index program <program-id>
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
multichain-indexer --chain solana sync <address>
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
multichain-indexer --chain solana metrics --days 30
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
multichain-indexer --chain solana export --format csv --output transactions.csv
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
```text
|
|
249
|
+
Synced FwcsNmTLbf8VVqxuBMjEDTh39gXR87n3vAnAwvAiPtRy on solana devnet: 6 transactions up to height 519016039, 8 requests in 15.2s
|
|
250
|
+
Synced FwcsNmTLbf8VVqxuBMjEDTh39gXR87n3vAnAwvAiPtRy on solana devnet: 0 transactions up to height 519016125, 2 requests in 2.8s
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Transaction versions
|
|
254
|
+
|
|
255
|
+
Legacy, v0 and v1 transactions are all read. Priority fees are in lamports for every
|
|
256
|
+
version, so metrics compare correctly:
|
|
257
|
+
|
|
258
|
+
| | Compute unit limit | Priority fee |
|
|
259
|
+
|---|---|---|
|
|
260
|
+
| v1 | `transactionConfig.computeUnitLimit` | `transactionConfig.priorityFee`, the total |
|
|
261
|
+
| v0, legacy | Compute Budget instruction | Compute Budget price per unit, times the limit |
|
|
262
|
+
|
|
263
|
+
### What is recorded
|
|
264
|
+
|
|
265
|
+
The `native` block holds the slot, transaction version, compute units, priority fee,
|
|
266
|
+
address lookup tables, every instruction including inner ones, and SOL, SPL Token and
|
|
267
|
+
Token-2022 transfers. Accounts include their SPL token accounts.
|
|
268
|
+
|
|
269
|
+
- `amount` is the first transfer in the transaction: in lamports, or in a token's base
|
|
270
|
+
units when `native.amount_mint` is set. All transfers are in `native`.
|
|
271
|
+
- `sender` is the fee payer.
|
|
272
|
+
- `status` is `pending` until finalized, then `final` or `failed`. Pending records are
|
|
273
|
+
fetched again on the next sync.
|
|
274
|
+
|
|
275
|
+
## How it is built
|
|
276
|
+
|
|
277
|
+
```text
|
|
278
|
+
multichain_indexer/
|
|
279
|
+
api.py Indexer and AsyncIndexer, the public API
|
|
280
|
+
cli.py the command line, which only calls api.py
|
|
281
|
+
core/ shared code that knows nothing about a specific chain
|
|
282
|
+
base_indexer.py the contract every adapter implements
|
|
283
|
+
registry.py chain name to adapter
|
|
284
|
+
pipeline.py fetch, store, summarise; incremental sync
|
|
285
|
+
storage.py SQLite behind a storage interface
|
|
286
|
+
metrics.py pandas metrics any chain can use
|
|
287
|
+
export.py CSV, JSON and Parquet
|
|
288
|
+
http.py timeouts, retries, Retry-After
|
|
289
|
+
ratelimit.py per-endpoint request pacing
|
|
290
|
+
cache.py optional cache for data that can never change
|
|
291
|
+
config.py settings from .env and the environment
|
|
292
|
+
observability.py structured logs with secrets masked
|
|
293
|
+
adapters/algorand/ client, parser, metrics
|
|
294
|
+
adapters/solana/ client, parser, metrics
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
A sync can be stopped at any point and picks up where it left off. It walks a fixed
|
|
298
|
+
range of rounds, and each page's records and the cursor for the next page are saved in
|
|
299
|
+
one database transaction, so the two can never disagree. Writes are upserts, so nothing
|
|
300
|
+
is stored twice, and the checkpoint only moves once the whole range is stored. While a
|
|
301
|
+
sync runs it shows a running count, because the total is not known in advance.
|
|
302
|
+
|
|
303
|
+
## Security
|
|
304
|
+
|
|
305
|
+
- This version reads public data only. It does not handle private keys and cannot sign or
|
|
306
|
+
send anything.
|
|
307
|
+
- Endpoint URLs and tokens come from `.env` or the environment. They are masked in logs
|
|
308
|
+
and left out of error messages.
|
|
309
|
+
- `.env` is parsed, not loaded, so its values are never copied into the process
|
|
310
|
+
environment.
|
|
311
|
+
- Plain `http` endpoints are refused, except on localhost.
|
|
312
|
+
- Addresses and IDs are validated before any request is sent.
|
|
313
|
+
|
|
314
|
+
See [SECURITY.md](SECURITY.md) to report a vulnerability.
|
|
315
|
+
|
|
316
|
+
## Development
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
uv sync
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
uv run pytest
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Tests use saved testnet responses and need no network. `uv run pytest -m live --no-cov`
|
|
327
|
+
runs the ones that talk to testnet. [CONTRIBUTING.md](CONTRIBUTING.md) has the rest.
|
|
328
|
+
|
|
329
|
+
## Roadmap
|
|
330
|
+
|
|
331
|
+
| Version | Adds |
|
|
332
|
+
|---|---|
|
|
333
|
+
| 0.1 | Core and Algorand |
|
|
334
|
+
| 0.2 | Solana: SPL tokens, programs, compute units, priority fees |
|
|
335
|
+
| 0.3 | NEAR: named accounts, receipts, function calls, access keys |
|
|
336
|
+
| 0.4 | EVM chains: Ethereum, Arbitrum, Optimism, Base, Polygon PoS, BNB Smart Chain |
|
|
337
|
+
| 0.5 | Bitcoin: UTXOs, address types, fee rates |
|
|
338
|
+
| 0.6 | Cross-chain metrics and reports, PostgreSQL, a read-only HTTP API, follow mode, plugins, Docker |
|
|
339
|
+
| 0.7 | Wallet utilities: pre-flight checks, simulation, signing on test networks first |
|
|
340
|
+
| 1.0 | Stable release on PyPI, with a docs page and demo per chain |
|
|
341
|
+
|
|
342
|
+
## License
|
|
343
|
+
|
|
344
|
+
[Apache-2.0](LICENSE)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
multichain_indexer/__init__.py,sha256=Gi8W86-DEBA6lMNhKwEFG4gxgIVX-aMu0W1_S91In1Q,1048
|
|
2
|
+
multichain_indexer/api.py,sha256=gQ07oFDCZuwl9LrIYOujt-VLpxDeNeutn7AJA6K_4-Y,10447
|
|
3
|
+
multichain_indexer/cli.py,sha256=O08RAzJvCxVobhkPPg4nk7td6LuVXCRsZjousGBvXZI,9327
|
|
4
|
+
multichain_indexer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
multichain_indexer/adapters/__init__.py,sha256=TBhJbPQ-U_K2iftcLKWp6SAeqsG4HFU526ni1w4Djgc,309
|
|
6
|
+
multichain_indexer/adapters/algorand/__init__.py,sha256=YHcc4DgE5D9KknAJ50JYeQ2due1Tqt5vVkuCidZNrFo,138
|
|
7
|
+
multichain_indexer/adapters/algorand/adapter.py,sha256=_7S1Pg0qtM4RAVT4h-qlauZum1WwQbIA4iflqXr_5SM,7893
|
|
8
|
+
multichain_indexer/adapters/algorand/client.py,sha256=Ovni459V1LwyampB4fb_fPChoL1Eq3EyJU7q7qie40U,3265
|
|
9
|
+
multichain_indexer/adapters/algorand/metrics.py,sha256=k_PmevcErNBJMxd0CA7ompdGLetASyqYTHp96rL4f70,1663
|
|
10
|
+
multichain_indexer/adapters/algorand/models.py,sha256=2V3yaRiJgDPtPQ-kgSqWkh43nH03sUZZKRhqJCMllUo,3190
|
|
11
|
+
multichain_indexer/adapters/algorand/parser.py,sha256=qBSUG6p_ISbjeoRzdjnJC2eI4VvFJlkwZGgDNn6Xxxo,13397
|
|
12
|
+
multichain_indexer/adapters/solana/__init__.py,sha256=m4QOeAh7j9RDp2Delr91e_pOhco1ID_3HYNUWbJnBis,132
|
|
13
|
+
multichain_indexer/adapters/solana/adapter.py,sha256=-CIcO4xy6d73TL5L7FrbdBKbyxFhoHximsMIN03tqj4,11268
|
|
14
|
+
multichain_indexer/adapters/solana/client.py,sha256=XOdniGNzJLmXPLSPxj-VW8TQZYWG5_0uCO-Eak2pA9M,5298
|
|
15
|
+
multichain_indexer/adapters/solana/metrics.py,sha256=ZNdWhKg017vPvGS6HXQhiBHvpl2aAuNnDlKf4RVjNic,2306
|
|
16
|
+
multichain_indexer/adapters/solana/models.py,sha256=Dr_j-05U_ah-UvdjCV-4E69RySAxKw03iFpjfcr1Xi0,3072
|
|
17
|
+
multichain_indexer/adapters/solana/parser.py,sha256=lGjroiXTMvwZeDTTOPsjCDsz7-e8e4hUhjZKTjmVpvY,23688
|
|
18
|
+
multichain_indexer/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
+
multichain_indexer/core/base_indexer.py,sha256=ZKlW9OJ-j5Tfgp7gKJl0ypceQdGNqLt7BiwkhWgkwqI,3720
|
|
20
|
+
multichain_indexer/core/cache.py,sha256=wYcmTk8QHQ_npC4M2suWEMzNuHccUvdhoHBEjRSRV3U,1048
|
|
21
|
+
multichain_indexer/core/config.py,sha256=rlIbWfRehJMWEutOy-cnPN1OFOFZPwf-1nrquG7ZRYc,3833
|
|
22
|
+
multichain_indexer/core/errors.py,sha256=fBFW8lrf5gU62SNKQfnE8Zg8_EwaI9UhpDhZ6froitc,1182
|
|
23
|
+
multichain_indexer/core/export.py,sha256=UlOEgmjiV5soRBZF3UGhsUBJTU2JH_EznJ-eiBV0ViY,2133
|
|
24
|
+
multichain_indexer/core/http.py,sha256=mAfyJneESmFVx0iL4IayvdpFfDnW54Qv5LJdHtoim5E,8397
|
|
25
|
+
multichain_indexer/core/metrics.py,sha256=aiQ6-dS9-Kxv6mVQWrcHwPQgvNkB1qpwEd-DMro4zHg,2315
|
|
26
|
+
multichain_indexer/core/models.py,sha256=wvHJUQhIdhNQpNosOi4X8ESVBauhG6GE1wIwnGMXN-A,3062
|
|
27
|
+
multichain_indexer/core/observability.py,sha256=INw5yqRS4-aLjJkcr5PCeWSkus-UhUTUiHovVynOuZU,3210
|
|
28
|
+
multichain_indexer/core/pipeline.py,sha256=XaNisdsbMQlgIkTHnS6s1lcrQpbeq-EgjD5vksu34-E,5583
|
|
29
|
+
multichain_indexer/core/ratelimit.py,sha256=q1O3PZyXILf30PWICzSuyVQNOukpVGWb7seNXPnhSHU,1082
|
|
30
|
+
multichain_indexer/core/registry.py,sha256=edGUWD51zJ3StU6Ske1HKKQvxCzzAAeXVjxxY3IS6IQ,1975
|
|
31
|
+
multichain_indexer/core/storage.py,sha256=a6xuT8j_s0QC0uvlSXbQeaYbkjqQ7hynW8tVplfAlJg,9623
|
|
32
|
+
multichain_analytics_indexer-0.2.1.dist-info/METADATA,sha256=OIQLv_TrClZqXjSewRnKkXewE8vz8c-V8gKEQHNgbZI,11813
|
|
33
|
+
multichain_analytics_indexer-0.2.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
34
|
+
multichain_analytics_indexer-0.2.1.dist-info/entry_points.txt,sha256=mTUpIouXIQXtyLrHg3z6Q7xs90xY59_0L8OKrzNatEY,67
|
|
35
|
+
multichain_analytics_indexer-0.2.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
36
|
+
multichain_analytics_indexer-0.2.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""Index and analyse blockchain accounts and transactions, in each chain's own terms."""
|
|
2
|
+
|
|
3
|
+
from multichain_indexer.api import AsyncIndexer, Indexer
|
|
4
|
+
from multichain_indexer.core.errors import (
|
|
5
|
+
ConfigError,
|
|
6
|
+
IndexerError,
|
|
7
|
+
InvalidAddress,
|
|
8
|
+
InvalidInput,
|
|
9
|
+
MalformedResponse,
|
|
10
|
+
NetworkError,
|
|
11
|
+
NotFound,
|
|
12
|
+
RateLimited,
|
|
13
|
+
UnsupportedChain,
|
|
14
|
+
WrongNetwork,
|
|
15
|
+
)
|
|
16
|
+
from multichain_indexer.core.models import (
|
|
17
|
+
AccountRecord,
|
|
18
|
+
AssetRecord,
|
|
19
|
+
ContractRecord,
|
|
20
|
+
MetricsReport,
|
|
21
|
+
NativeData,
|
|
22
|
+
Status,
|
|
23
|
+
SyncResult,
|
|
24
|
+
TransactionPage,
|
|
25
|
+
TransactionRecord,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
__version__ = "0.2.1"
|
|
29
|
+
|
|
30
|
+
__all__ = [
|
|
31
|
+
"AccountRecord",
|
|
32
|
+
"AssetRecord",
|
|
33
|
+
"AsyncIndexer",
|
|
34
|
+
"ConfigError",
|
|
35
|
+
"ContractRecord",
|
|
36
|
+
"Indexer",
|
|
37
|
+
"IndexerError",
|
|
38
|
+
"InvalidAddress",
|
|
39
|
+
"InvalidInput",
|
|
40
|
+
"MalformedResponse",
|
|
41
|
+
"MetricsReport",
|
|
42
|
+
"NativeData",
|
|
43
|
+
"NetworkError",
|
|
44
|
+
"NotFound",
|
|
45
|
+
"RateLimited",
|
|
46
|
+
"Status",
|
|
47
|
+
"SyncResult",
|
|
48
|
+
"TransactionPage",
|
|
49
|
+
"TransactionRecord",
|
|
50
|
+
"UnsupportedChain",
|
|
51
|
+
"WrongNetwork",
|
|
52
|
+
]
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"""Chain adapters, made available through the registry and imported only when used."""
|
|
2
|
+
|
|
3
|
+
from multichain_indexer.core.registry import register_chain
|
|
4
|
+
|
|
5
|
+
register_chain("algorand", "multichain_indexer.adapters.algorand:create_indexer")
|
|
6
|
+
register_chain("solana", "multichain_indexer.adapters.solana:create_indexer")
|