@sablier/indexers 4.0.0-beta.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Data indexers for the [Sablier](https://sablier.com) protocol for onchain token
|
|
|
13
13
|
Sablier's smart contract events and transform them into structured, queryable data APIs via GraphQL. The data is used to
|
|
14
14
|
power the [Sablier Interface](https://app.sablier.com).
|
|
15
15
|
|
|
16
|
-
There are two indexing providers: [
|
|
16
|
+
There are two indexing providers: [Envio](https://envio.dev) (preferred) and [The Graph](https://thegraph.com).
|
|
17
17
|
|
|
18
18
|
## Documentation 📚
|
|
19
19
|
|
|
@@ -22,9 +22,10 @@ In-depth documentation is available at [docs.sablier.com](https://docs.sablier.c
|
|
|
22
22
|
The package now exposes two public indexer keys:
|
|
23
23
|
|
|
24
24
|
- `airdrops` for campaign distribution data
|
|
25
|
-
- `streams` for the
|
|
25
|
+
- `streams` for the Flow + Lockup streams
|
|
26
26
|
|
|
27
|
-
`analytics` remains a separate target rather than a public indexer key
|
|
27
|
+
`analytics` remains a separate target rather than a public indexer key because it's meant to be a private indexer for
|
|
28
|
+
internal use only.
|
|
28
29
|
|
|
29
30
|
Protocol-specific docs remain available here:
|
|
30
31
|
|
|
@@ -34,11 +35,22 @@ Protocol-specific docs remain available here:
|
|
|
34
35
|
|
|
35
36
|
## Quickstart 🚀
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
You can query the public Envio GraphQL endpoints directly to access Sablier protocol data:
|
|
38
39
|
|
|
39
40
|
- **Airdrops**: `https://indexer.hyperindex.xyz/508d217/v1/graphql`
|
|
40
41
|
- **Streams**: `https://indexer.hyperindex.xyz/53b7e25/v1/graphql`
|
|
41
42
|
|
|
43
|
+
The standard Envio endpoints require [Hasura](https://docs.envio.dev/docs/HyperIndex/navigating-hasura) GraphQL query
|
|
44
|
+
syntax.
|
|
45
|
+
|
|
46
|
+
> [!TIP]
|
|
47
|
+
>
|
|
48
|
+
> If you're migrating from The Graph, Envio also exposes `/converter` endpoints that accept subgraph-compatible queries,
|
|
49
|
+
> convert them to HyperIndex (standard GraphQL), and return responses in the same format as a standard subgraph:
|
|
50
|
+
>
|
|
51
|
+
> - **Airdrops**: `https://indexer.hyperindex.xyz/508d217/converter`
|
|
52
|
+
> - **Streams**: `https://indexer.hyperindex.xyz/53b7e25/converter`
|
|
53
|
+
|
|
42
54
|
For detailed documentation, queries, and examples, visit our [API docs](https://docs.sablier.com/api/overview).
|
|
43
55
|
|
|
44
56
|
## Contributing 🤝
|
|
@@ -52,5 +64,3 @@ feedback.
|
|
|
52
64
|
## License 📄
|
|
53
65
|
|
|
54
66
|
This repo is licensed under GPL 3-0 or later.
|
|
55
|
-
|
|
56
|
-
v2
|
|
@@ -6,7 +6,7 @@ function getIndexerURL(id) {
|
|
|
6
6
|
return `https://indexer.hyperindex.xyz/${id}/v1/graphql`;
|
|
7
7
|
}
|
|
8
8
|
function getConverterURL(id) {
|
|
9
|
-
return
|
|
9
|
+
return `https://indexer.hyperindex.xyz/${id}/converter`;
|
|
10
10
|
}
|
|
11
11
|
function createDeployment(args) {
|
|
12
12
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envio-deployments.js","sourceRoot":"","sources":["../../../src/indexers/envio-deployments.ts"],"names":[],"mappings":";;;AAsDA,gDAEC;AAtDD,SAAS,aAAa,CAAC,EAAU;IAC/B,OAAO,kCAAkC,EAAE,aAAa,CAAC;AAC3D,CAAC;AAED,SAAS,eAAe,CAAC,EAAU;IACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"envio-deployments.js","sourceRoot":"","sources":["../../../src/indexers/envio-deployments.ts"],"names":[],"mappings":";;;AAsDA,gDAEC;AAtDD,SAAS,aAAa,CAAC,EAAU;IAC/B,OAAO,kCAAkC,EAAE,aAAa,CAAC;AAC3D,CAAC;AAED,SAAS,eAAe,CAAC,EAAU;IACjC,OAAO,kCAAkC,EAAE,YAAY,CAAC;AAC1D,CAAC;AAED,SAAS,gBAAgB,CAAC,IAKzB;IACC,OAAO;QACL,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI,YAAY;YACd,OAAO,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC3C,CAAC;QACD,QAAQ,EAAE;YACR,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,GAAG;gBACL,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChC,CAAC;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,iBAAiB,GAAG;IACxB,QAAQ,EAAE,gBAAgB,CAAC;QACzB,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,iDAAiD;QAC9D,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,UAAU;KACpB,CAAC;IAGF,OAAO,EAAE,gBAAgB,CAAC;QACxB,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,iDAAiD;QAC9D,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,SAAS;KACnB,CAAC;CACoE,CAAC;AAE5D,QAAA,gBAAgB,GAAwD;IACnF,QAAQ,EAAE,iBAAiB,CAAC,QAAQ;IACpC,OAAO,EAAE,iBAAiB,CAAC,OAAO;CACnC,CAAC;AAEF,SAAgB,kBAAkB,CAAC,OAA2B;IAC5D,OAAO,wBAAgB,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import type { Indexer } from \"../types.js\";\n\nfunction getIndexerURL(id: string) {\n return `https://indexer.hyperindex.xyz/${id}/v1/graphql`;\n}\n\nfunction getConverterURL(id: string) {\n return `https://indexer.hyperindex.xyz/${id}/converter`;\n}\n\nfunction createDeployment(args: {\n createdOn?: number;\n explorerURL: string;\n id: string;\n indexer: Indexer.IndexerKey;\n}): Indexer.EnvioDeployment {\n return {\n createdOn: args.createdOn,\n explorerURL: args.explorerURL,\n indexer: args.indexer,\n get converterURL() {\n return getConverterURL(this.endpoint.id);\n },\n endpoint: {\n id: args.id,\n get url() {\n return getIndexerURL(this.id);\n },\n },\n };\n}\n\nconst publicDeployments = {\n airdrops: createDeployment({\n createdOn: 1_712_673_343, // April 8, 2024\n explorerURL: \"https://envio.dev/app/sablier-labs/merkle-envio\",\n id: \"508d217\",\n indexer: \"airdrops\",\n }),\n // Streams ships through the legacy \"Lockup\" Envio deployment. We kept it to\n // avoid a full redeployment and to preserve the existing billing plan.\n streams: createDeployment({\n createdOn: 1_712_673_343, // April 8, 2024\n explorerURL: \"https://envio.dev/app/sablier-labs/lockup-envio\",\n id: \"53b7e25\",\n indexer: \"streams\",\n }),\n} as const satisfies Record<Indexer.IndexerKey, Indexer.EnvioDeployment>;\n\nexport const envioDeployments: Record<Indexer.IndexerKey, Indexer.EnvioDeployment> = {\n airdrops: publicDeployments.airdrops,\n streams: publicDeployments.streams,\n};\n\nexport function getEnvioDeployment(indexer: Indexer.IndexerKey): Indexer.EnvioDeployment {\n return envioDeployments[indexer];\n}\n"]}
|
|
@@ -2,7 +2,7 @@ function getIndexerURL(id) {
|
|
|
2
2
|
return `https://indexer.hyperindex.xyz/${id}/v1/graphql`;
|
|
3
3
|
}
|
|
4
4
|
function getConverterURL(id) {
|
|
5
|
-
return
|
|
5
|
+
return `https://indexer.hyperindex.xyz/${id}/converter`;
|
|
6
6
|
}
|
|
7
7
|
function createDeployment(args) {
|
|
8
8
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envio-deployments.js","sourceRoot":"","sources":["../../../src/indexers/envio-deployments.ts"],"names":[],"mappings":"AAEA,SAAS,aAAa,CAAC,EAAU;IAC/B,OAAO,kCAAkC,EAAE,aAAa,CAAC;AAC3D,CAAC;AAED,SAAS,eAAe,CAAC,EAAU;IACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"envio-deployments.js","sourceRoot":"","sources":["../../../src/indexers/envio-deployments.ts"],"names":[],"mappings":"AAEA,SAAS,aAAa,CAAC,EAAU;IAC/B,OAAO,kCAAkC,EAAE,aAAa,CAAC;AAC3D,CAAC;AAED,SAAS,eAAe,CAAC,EAAU;IACjC,OAAO,kCAAkC,EAAE,YAAY,CAAC;AAC1D,CAAC;AAED,SAAS,gBAAgB,CAAC,IAKzB;IACC,OAAO;QACL,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI,YAAY;YACd,OAAO,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC3C,CAAC;QACD,QAAQ,EAAE;YACR,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,GAAG;gBACL,OAAO,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChC,CAAC;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,iBAAiB,GAAG;IACxB,QAAQ,EAAE,gBAAgB,CAAC;QACzB,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,iDAAiD;QAC9D,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,UAAU;KACpB,CAAC;IAGF,OAAO,EAAE,gBAAgB,CAAC;QACxB,SAAS,EAAE,aAAa;QACxB,WAAW,EAAE,iDAAiD;QAC9D,EAAE,EAAE,SAAS;QACb,OAAO,EAAE,SAAS;KACnB,CAAC;CACoE,CAAC;AAEzE,MAAM,CAAC,MAAM,gBAAgB,GAAwD;IACnF,QAAQ,EAAE,iBAAiB,CAAC,QAAQ;IACpC,OAAO,EAAE,iBAAiB,CAAC,OAAO;CACnC,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,OAA2B;IAC5D,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import type { Indexer } from \"../types.js\";\n\nfunction getIndexerURL(id: string) {\n return `https://indexer.hyperindex.xyz/${id}/v1/graphql`;\n}\n\nfunction getConverterURL(id: string) {\n return `https://indexer.hyperindex.xyz/${id}/converter`;\n}\n\nfunction createDeployment(args: {\n createdOn?: number;\n explorerURL: string;\n id: string;\n indexer: Indexer.IndexerKey;\n}): Indexer.EnvioDeployment {\n return {\n createdOn: args.createdOn,\n explorerURL: args.explorerURL,\n indexer: args.indexer,\n get converterURL() {\n return getConverterURL(this.endpoint.id);\n },\n endpoint: {\n id: args.id,\n get url() {\n return getIndexerURL(this.id);\n },\n },\n };\n}\n\nconst publicDeployments = {\n airdrops: createDeployment({\n createdOn: 1_712_673_343, // April 8, 2024\n explorerURL: \"https://envio.dev/app/sablier-labs/merkle-envio\",\n id: \"508d217\",\n indexer: \"airdrops\",\n }),\n // Streams ships through the legacy \"Lockup\" Envio deployment. We kept it to\n // avoid a full redeployment and to preserve the existing billing plan.\n streams: createDeployment({\n createdOn: 1_712_673_343, // April 8, 2024\n explorerURL: \"https://envio.dev/app/sablier-labs/lockup-envio\",\n id: \"53b7e25\",\n indexer: \"streams\",\n }),\n} as const satisfies Record<Indexer.IndexerKey, Indexer.EnvioDeployment>;\n\nexport const envioDeployments: Record<Indexer.IndexerKey, Indexer.EnvioDeployment> = {\n airdrops: publicDeployments.airdrops,\n streams: publicDeployments.streams,\n};\n\nexport function getEnvioDeployment(indexer: Indexer.IndexerKey): Indexer.EnvioDeployment {\n return envioDeployments[indexer];\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sablier/indexers",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Data indexers for the Sablier Protocol",
|
|
5
5
|
"homepage": "https://github.com/sablier-labs/indexers#readme",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
@@ -47,11 +47,10 @@
|
|
|
47
47
|
"@sablier/devkit": "^1.15.3",
|
|
48
48
|
"@sablier/price-data": "github:sablier-labs/price-data#main",
|
|
49
49
|
"@types/js-yaml": "^4.0.9",
|
|
50
|
-
"@types/lodash": "^4.17.
|
|
50
|
+
"@types/lodash-es": "^4.17.12",
|
|
51
51
|
"@types/node": "^25.0.3",
|
|
52
52
|
"@vitest/ui": "^3.2.4",
|
|
53
53
|
"abitype": "^1.2.3",
|
|
54
|
-
"app-root-path": "^3.1.0",
|
|
55
54
|
"assemblyscript": "^0.28.9",
|
|
56
55
|
"axios": "^1.13.2",
|
|
57
56
|
"axios-retry": "^4.5.0",
|
|
@@ -59,10 +58,9 @@
|
|
|
59
58
|
"cli-table3": "^0.6.5",
|
|
60
59
|
"concurrently": "^9.2.1",
|
|
61
60
|
"dayjs": "^1.11.19",
|
|
62
|
-
"dependency-cruiser": "^17.3.8",
|
|
63
61
|
"dotenv": "^17.2.3",
|
|
64
62
|
"effect": "^3.21.0",
|
|
65
|
-
"envio": "
|
|
63
|
+
"envio": "3.0.0-alpha.21",
|
|
66
64
|
"graphql": "^16.12.0",
|
|
67
65
|
"graphql-request": "^7.4.0",
|
|
68
66
|
"graphql-tag": "^2.12.6",
|
|
@@ -71,7 +69,7 @@
|
|
|
71
69
|
"knip": "^5.78.0",
|
|
72
70
|
"linkifyjs": "^4.3.2",
|
|
73
71
|
"lint-staged": "^16.2.7",
|
|
74
|
-
"lodash": "^4.
|
|
72
|
+
"lodash-es": "^4.18.1",
|
|
75
73
|
"ora": "^8.2.0",
|
|
76
74
|
"prettier": "^3.7.4",
|
|
77
75
|
"strip-ansi": "^7.1.2",
|
|
@@ -99,6 +97,6 @@
|
|
|
99
97
|
},
|
|
100
98
|
"scripts": {
|
|
101
99
|
"prepack": "pnpm install --frozen-lockfile && just build",
|
|
102
|
-
"start": "cd ./envio/$ENVIO_INDEXER_NAME && ts-node ./bindings/src/Index.res.
|
|
100
|
+
"start": "cd ./envio/$ENVIO_INDEXER_NAME && ts-node ./bindings/src/Index.res.mjs"
|
|
103
101
|
}
|
|
104
102
|
}
|