@provex/indexer-client 1.6.2 → 1.7.0-rc.20260522201545.020a3eb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +68 -0
- package/dist/index.cjs +449 -137
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +141 -4
- package/dist/index.d.ts +141 -4
- package/dist/index.js +419 -113
- package/dist/index.js.map +1 -1
- package/package.json +8 -5
- package/skills/indexer-client-integration/SKILL.md +134 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Provex
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# @provex/indexer-client
|
|
2
|
+
|
|
3
|
+
Typed client and React hooks for querying the Provex indexer. Ships with the indexer schema bundled inline, so the package works out of the box against the hosted Provex indexer at `https://indexer.provex.com` and can be re-pointed at a self-hosted indexer with a single config option.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @provex/indexer-client @tanstack/react-query react viem
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Peer Dependencies
|
|
12
|
+
|
|
13
|
+
| Package | Version |
|
|
14
|
+
|---------|---------|
|
|
15
|
+
| `react` | `^18.0.0 \|\| ^19.0.0` |
|
|
16
|
+
| `@tanstack/react-query` | `^5.0.0` |
|
|
17
|
+
| `viem` | `^2.0.0` |
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { createPonderAdapter, useDeposits } from '@provex/indexer-client'
|
|
23
|
+
|
|
24
|
+
const indexer = createPonderAdapter()
|
|
25
|
+
// Defaults to the hosted Provex indexer. Override with:
|
|
26
|
+
// createPonderAdapter({ url: 'https://my-indexer.example.com' })
|
|
27
|
+
|
|
28
|
+
function DepositList() {
|
|
29
|
+
const { data, isLoading } = useDeposits({ token: '0x...', paymentMethod: 'venmo' })
|
|
30
|
+
// ...
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The hooks need to be inside a `QueryClientProvider` from `@tanstack/react-query` and a `ProvexProvider` from `@provex/react`. See the [@provex/react quick-start](https://www.npmjs.com/package/@provex/react) for the full setup.
|
|
35
|
+
|
|
36
|
+
## Configuration
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import { createProvexIndexerClient } from '@provex/indexer-client'
|
|
40
|
+
|
|
41
|
+
const client = createProvexIndexerClient({
|
|
42
|
+
url: 'https://my-indexer.example.com',
|
|
43
|
+
// schema: customSchema, // optional — override the bundled schema
|
|
44
|
+
})
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Environment Variables
|
|
48
|
+
|
|
49
|
+
When using `createPonderAdapter()` without explicit config, the following env vars are consulted (Vite naming):
|
|
50
|
+
|
|
51
|
+
| Variable | Default | Purpose |
|
|
52
|
+
|----------|---------|---------|
|
|
53
|
+
| `VITE_INDEXER_URL` | `https://indexer.provex.com` | Provex indexer base URL |
|
|
54
|
+
| `VITE_TOKEN_INDEXER_URL` | `https://token.provex.com` | Token-list indexer base URL |
|
|
55
|
+
|
|
56
|
+
## What's bundled
|
|
57
|
+
|
|
58
|
+
The package inlines the schema definitions for both the main indexer (deposits, intents, events) and the token indexer (token metadata) via tsup. This means consumers get a single dependency for the full indexer surface — no separate schema package to install or version.
|
|
59
|
+
|
|
60
|
+
The bundled schemas track the deployed Provex indexer. If you run a custom indexer with a different schema, pass it explicitly via `createProvexIndexerClient({ schema })`.
|
|
61
|
+
|
|
62
|
+
## Integration
|
|
63
|
+
|
|
64
|
+
For the React hooks and SDK built on this client, see [@provex/react](https://www.npmjs.com/package/@provex/react). For the underlying contract ABIs, see [@provex/abis](https://www.npmjs.com/package/@provex/abis).
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
MIT
|